[Ada] Define __gnat_personality_v0 for SEH
[official-gcc.git] / gcc / ada / ChangeLog
blobf911670d4ec272b9f4ab5fdf15d7efa77f221071
1 2019-12-12  Arnaud Charlet  <charlet@adacore.com>
3         * raise-gcc.c (__gnat_personality_v0): Define for SEH.
5 2019-12-12  Gary Dismukes  <dismukes@adacore.com>
7         * exp_ch9.adb (Build_Protected_Entry): Analyze the block created
8         to hold the declarations and statements of the protected entry
9         body right after it's created, and then call Reset_Scopes_To on
10         that block to reset the Scope of nested entities to the block
11         scope.
12         (Reset_Scope): Add handling for N_Freeze_Entity nodes, calling
13         Reset_Scopes recursively on the Actions of such nodes. Also, for
14         subprogram bodies that are encountered that might not have a
15         separate declaration (such as type init procedures), reset the
16         Scope of the subprogram's entity.
18 2019-12-12  Justin Squirek  <squirek@adacore.com>
20         * sem_attr.adb (Analyze_Attribute): Add error message for
21         invalid usage of Attribute_Result.
23 2019-12-12  Bob Duff  <duff@adacore.com>
25         * sem_attr.adb (Eval_Attribute): Never mark T'Descriptor_Size as
26         static, even if T is a static subtype, because otherwise we will
27         request the value of the attribute, which will crash because we
28         have not evaluated it.
30 2019-12-12  Ed Schonberg  <schonberg@adacore.com>
32         * exp_ch5.adb (Expand_N_Assognment_Statement): Extend the
33         processing involving private types with unknown discriminants to
34         handle the case where the full view of the type is an
35         unconstrained array type.
37 2019-12-12  Bob Duff  <duff@adacore.com>
39         * sem_ch4.adb (Transform_Object_Operation): Deal properly with
40         prefix notation in instances.
42 2019-12-12  Claire Dross  <dross@adacore.com>
44         * libgnat/a-cofove.adb, libgnat/a-cfinve.adb (Find_Index): Use
45         Extended_Index for call to Last.
47 2019-12-12  Gary Dismukes  <dismukes@adacore.com>
49         * sem_ch3.adb, sem_util.adb: Minor reformatting.
51 2019-12-12  Bob Duff  <duff@adacore.com>
53         * doc/gnat_ugn/gnat_utility_programs.rst: Update gnatmetric
54         documentation for average lengths
56 2019-12-12  Ed Schonberg  <schonberg@adacore.com>
58         * sem_ch3.adb (Constrain_Access): Remove obsolete comments and
59         warning concerning component types of an access type whose
60         designated type is a constrained record type. (Such constraints
61         were previously ignored). Set scope of itype for component to
62         the scope of the enclosing record.
63         * sem_ch4.adb: Remove call to Set_Ekind.
64         * sem_util.adb (Build_Actual_Subtype_Of_Component): Handle
65         components whose type is an access to a constrained
66         discriminant, where the constraints may be given by the
67         discriminants of the enclosing type. New subprogram
68         Build_Access_Record_Constraint.
70 2019-12-12  Justin Squirek  <squirek@adacore.com>
72         * exp_ch6.adb (Expand_Call_Helper): Added null case for
73         'Loop_Entry, 'Old, and 'Result when calculating whether to
74         create extra accessibility parameters.
75         * sem_util.adb (Dynamic_Accessibility_Level): Added null case
76         for 'Loop_Entry, 'Old, and 'Result when  calculating
77         accessibility level based on access-valued attributes.  Also
78         added special handling for uses of 'Loop_Entry when used in its
79         indexed component form.
81 2019-12-12  Arnaud Charlet  <charlet@adacore.com>
83         * raise-gcc.c: Remove references to VMS
85 2019-12-12  Eric Botcazou  <ebotcazou@adacore.com>
87         * atree.ads, comperr.ads, debug.ads, einfo.ads, elists.ads,
88         err_vars.ads, errout.ads, exp_ch11.ads, exp_code.ads,
89         exp_dbug.ads, exp_tss.ads, exp_util.ads, lib.ads, namet.ads,
90         nlists.ads, opt.ads, repinfo.ads, restrict.ads, scos.ads,
91         sem_aggr.ads, sem_aux.ads, sem_eval.ads, sem_util.ads,
92         sinfo.ads, sinput.ads, stringt.ads, targparm.ads, types.ads,
93         urealp.ads warnsw.ads: Add WARNING line(s) in commentary.
94         * atree.h, elists.h, namet.h, nlists.h, repinfo.h, scos.h,
95         stringt.h, types.h, uintp.h, urealp.h: Tidy up.
96         * fe.h: Likewise.  Document WARNING mark.
98 2019-12-12  Dmitriy Anisimkov  <anisimko@adacore.com>
100         * libgnat/g-comlin.ads (Get_Argument): New routine similar to
101         original Get_Argument but with one more out parameter
102         End_Of_Arguments.
103         (Get_Arguments): Comment improved.
104         * libgnat/g-comlin.adb (Get_Argument): Implementation taken from
105         original Get_Argument and improved.
106         (Get_Argument): Calls new routine Get_Argument with additional
107         parameter.
109 2019-12-03  Eric Botcazou  <ebotcazou@adacore.com>
111         * gcc-interface/utils.c (potential_alignment_gap): Delete.
112         (rest_of_record_type_compilation): Do not call above function.  Use
113         the alignment of the field instead of that of its type, if need be.
114         When the original field has variable size, always lower the alignment
115         of the pointer type.  Reset the bit-field status of the new field if
116         it does not encode a bit-field.
118 2019-12-03  Eric Botcazou  <ebotcazou@adacore.com>
120         * gcc-interface/utils.c (fold_convert_size): New function.
121         (fold_bit_position): Invoke it to do further folding.
123 2019-12-03  Eric Botcazou  <ebotcazou@adacore.com>
125         * gcc-interface/decl.c (gnat_to_gnu_subprog_type): With the Copy-In/
126         Copy-Out mechanism, do not promote the mode of the return type to an
127         integral mode if it contains a field on a non-integral type and even
128         demote it for 64-bit targets.
130 2019-11-25  Eric Botcazou  <ebotcazou@adacore.com>
132         PR ada/92362
133         * gcc-interface/trans.c (gnat_to_gnu) <N_Attribute_Definition_Clause>:
134         Use a temporary instead of clobbering the result with a freeze node.
136 2019-11-25  Eric Botcazou  <ebotcazou@adacore.com>
138         PR ada/92575
139         * expect.c (__gnat_expect_poll [VMS, HPUX]): Fix typo.
141 2019-11-06  Eric Botcazou  <ebotcazou@adacore.com>
142             Alexandre Oliva  <oliva@adacore.com>
144         * gcc-interface/misc.c (callgraph_info_file): Delete.
146 2019-10-27  Jakub Jelinek  <jakub@redhat.com>
148         * locales.c (iso_3166): Add missing comma after "United-States".
150 2019-10-15  Arnaud Charlet  <charlet@adacore.com>
152         * Makefile.rtl (a-except.o): Put -O1 earlier so that it can be
153         overriden if needed by other variables.
155 2019-10-12  Eric Botcazou  <ebotcazou@adacore.com>
157         PR ada/91995
158         * sem_ch8.adb (Chain_Use_Clause): Remove second argument in calls
159         to Defining_Entity.
160         * sem_elab.adb (Find_Unit_Entity): Likewise.  Deal with N_Subunit
161         here in lieu of in Defining_Entity.
162         * sem_util.ads (Defining_Entity): Remove 2nd and 3th parameters.
163         * sem_util.adb (Defining_Entity): Remove 2nd and 3th parameters,
164         and adjust accordingly.  Deal with N_Compilation_Unit.
166 2019-10-11  Eric Botcazou  <ebotcazou@adacore.com>
168         * gcc-interface/decl.c (elaborate_reference_1): Specifically deal with
169         pointer displacement.
171         * gcc-interface/decl.c (components_to_record): Use proper name.
173         * gcc-interface/trans.c (Sloc_to_locus): Use standard types.
175 2019-10-11  Eric Botcazou  <ebotcazou@adacore.com>
177         * gcc-interface/decl.c (gnat_to_gnu_field): Adjust again the packing
178         for a field without strict alignment and with an oversized clause.
180 2019-10-11  Eric Botcazou  <ebotcazou@adacore.com>
182         * gcc-interface/decl.c (annotate_value) <INTEGER_CST>: Really test the
183         sign of the value when deciding to build a NEGATE_EXPR.
184         <PLUS_EXPR>: Remove redundant line.
185         <BIT_AND_EXPR>: Do the negation here.
187 2019-10-11  Eric Botcazou  <ebotcazou@adacore.com>
189         * gcc-interface/decl.c (Gigi_Equivalent_Type) <E_Array_Subtype>: New
190         case.  Return the base type if the subtype is not constrained.
192 2019-10-11  Eric Botcazou  <ebotcazou@adacore.com>
194         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Named_{Integer|Real}>:
195         New case to deal with the definition of named numbers.
196         <E_Variable>: Minor tweaks.  Set DECL_IGNORED_P on the CONST_DECL
197         if a corresponding variable is built.
198         * gcc-interface/trans.c (gnat_to_gnu) <N_Integer_Literal>: Return
199         error_mark_node instead of aborting on overflow for named numbers.
200         <N_Number_Declaration>: Reuse the <N_Object_Declaration> case and
201         deal with error_mark_node specifically.
202         * gcc-interface/utils.c (create_var_decl): Do not set DECL_IGNORED_P
203         on CONST_DECLs.
204         (gnat_write_global_declarations): Output global constants.
206 2019-10-10  Gary Dismukes  <dismukes@adacore.com>
208         * exp_ch7.adb (Check_Unnesting_In_Decls_Or_Stmts): When
209         encountering a loop at the top level of a package declaration
210         list (that is, within the declarations of a package spec or
211         body) that has nested subprograms, call Unnest_Loop to create a
212         new library-level procedure that will contain the loop, to allow
213         for proper handling of up-level references from within nested
214         subprograms, such as to loop parameters.
215         (Unnest_Loop): New procedure that takes a loop statement and
216         creates a new procedure body to enclose the loop statement,
217         along with generating a call to the procedure.
219 2019-10-10  Arnaud Charlet  <charlet@adacore.com>
221         * freeze.adb (Freeze_Subprogram): Ensure constructor is a C++
222         constructor.
224 2019-10-10  Gary Dismukes  <dismukes@adacore.com>
226         * libgnat/a-ststio.ads (File_Type): Apply pragma
227         Preelaborable_Initialization to the type.
229 2019-10-10  Yannick Moy  <moy@adacore.com>
231         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do not peek
232         under private types whose completion is SPARK_Mode Off.
234 2019-10-10  Gary Dismukes  <dismukes@adacore.com>
236         * exp_ch4.adb, sem_cat.adb, sem_ch12.adb, sem_ch3.adb,
237         sem_ch6.adb, sem_prag.adb, sem_util.adb, sem_util.ads: Minor
238         typo fixes.
240 2019-10-10  Ed Schonberg  <schonberg@adacore.com>
242         * sem_warn.adb (Warn_On_Useless_Assignment): Do not warn if the
243         second assignment is at the same source position as the first.
245 2019-10-10  Gary Dismukes  <dismukes@adacore.com>
247         * sem_util.adb (Enclosing_Subprogram): Handle the case of
248         E_Entry_Family, returning the entry family's associated
249         Protected_Body_Subprogram (as was already done for E_Entry).
250         * exp_ch9.adb (Expand_N_Accept_Statement): Call Reset_Scopes_To
251         on the block created for an accept statement to reset the scopes
252         of any local entities to the block scope.
254 2019-10-10  Ed Schonberg  <schonberg@adacore.com>
256         * sem_ch12.adb (Analyze_Formal_Package_Declaration): Propagate
257         an aspect specification for Abstract_State from generic package
258         to formal package, so that it is available when analyzing the
259         constructed formal.
261 2019-10-10  Eric Botcazou  <ebotcazou@adacore.com>
263         * sem_ch6.adb (Set_Actual_Subtypes): Put the freeze node of the
264         actual subtype after its declaration when the type of the formal
265         has a predicate.
267 2019-10-10  Eric Botcazou  <ebotcazou@adacore.com>
269         * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order): Do not use
270         the Esize of the component to compute its layout, but only the
271         Component_Clause.  Do not issue a warning for the _Tag
272         component.  Also set the Esize of the component at the end of
273         the layout.
274         (Analyze_Record_Representation_Clause): Remove Hbit local
275         variable.  Lay out the Original_Record_Component only if it's
276         distinct from the component.
277         (Check_Record_Representation_Clause): Fix off-by-one bug for the
278         Last_Bit of the artificial clause built for the _Tag component.
280 2019-10-10  Bob Duff  <duff@adacore.com>
282         * treepr.ads, treepr.adb (ppar): New procedure.
284 2019-10-10  Bob Duff  <duff@adacore.com>
286         * sem_aggr.adb (Resolve_Aggregate): Add missing cases in the
287         Others_Allowed => True case -- N_Case_Expression_Alternative and
288         N_If_Expression.  Use Nkind_In.
289         * atree.adb, atree.ads, sinfo.adb, sinfo.ads (Nkind_In): New
290         16-parameter version.
292 2019-10-10  Ed Schonberg  <schonberg@adacore.com>
294         * sem_aggr.adb (Resolve_Array_Aggregate): Set properly the
295         Predicated_Parent link of an itype created for an aggregate, so
296         that the predicate_function of the parent can support proofs on
297         the object that it initializes.
299 2019-10-10  Eric Botcazou  <ebotcazou@adacore.com>
301         * sem_ch3.adb (Analyze_Number_Declaration): Set
302         Debug_Info_Needed in the case where the expression is an integer
303         literal.
305 2019-10-10  Yannick Moy  <moy@adacore.com>
307         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Add subprograms
308         with deep parameter or result type as not candidates for
309         inlining.
311 2019-10-10  Vadim Godunko  <godunko@adacore.com>
313         * libgnat/g-exptty.ads (TTY_Process_Descriptor): Set default
314         value for Process.
316 2019-10-10  Bob Duff  <duff@adacore.com>
318         * sem_prag.adb (Defer_Compile_Time_Warning_Error_To_BE): In
319         addition to saving the pragma for further processing, copy the
320         pragma into the main unit if necessary.
322 2019-10-10  Bob Duff  <duff@adacore.com>
324         * einfo.ads, einfo.adb (Invariants_Ignored): New flag on types.
325         This leaves just one unused flag.
326         * sem_prag.adb (Invariant): Set the flag if appropriate.
327         * exp_util.adb (Make_Invariant_Call): Check the flag.
329 2019-10-10  Arnaud Charlet  <charlet@adacore.com>
331         * gnat1drv.adb (Gnat1drv): Skip code generation when handling an
332         incomplete unit with -gnatceg.
334 2019-10-10  Gary Dismukes  <dismukes@adacore.com>
336         * exp_ch7.adb (Check_Unnesting_Elaboration_Code): Various
337         cleanups.
338         (Set_Elab_Proc): New procedure to create the defining identifier
339         for a procedure created to encapsulate top-level blocks
340         occurring as a part of library package elaboration.
341         (First_Local_Scope): Function replaced by
342         Reset_Scopes_To_Elab_Proc.
343         (Reset_Scopes_To_Elab_Proc): New recursive procedure based on
344         First_Local_Scope, which it replaces, that is called to traverse
345         the statements of a library package body to locate top-level
346         blocks and determine whether they contain nested subprograms
347         that might address library-level objects of the package. Such
348         blocks (and loops) and certain top-level subprograms within the
349         statements will have their Scope reset here to match an
350         encapsulating procedure created by
351         Check_Unnesting_Elaboration_Code that will contain the
352         statements.
353         (Check_Unnesting_In_Decls_Or_Stmts): Code for handling blocks
354         factored out into Unnest_Block. Add handling for package
355         declarations and bodies, making recursive calls for
356         visible/private declarations, body declarations, statements, and
357         exception handlers. Also remove test for Is_Compilation_Unit:
358         caller tests for Is_Library_Level_Entity instead.  Also, this
359         proc's name was changed from Check_Unnesting_In_Declarations.
360         (Check_Unnesting_In_Handlers): New procedure to traverse a
361         sequence of exception handlers, calling
362         Check_Unnesting_In_Decls_Or_Stmts on the statements of each
363         handler.
364         (Expand_N_Package_Body): Call Check_Unnesting_* routines only
365         when Unnest_Subprogram_Mode is set and the current scope is a
366         library-level entity (which includes packages and instantiations
367         nested directly within a library unit).
368         (Expand_N_Package_Declaration): Call Check_Unnesting_* routines
369         only when Unnest_Subprogram_Mode is set and the current scope is
370         a library-level entity (which includes packages and
371         instantiations nested directly within a library unit).
372         (Unnest_Block): New procedure factored out of
373         Check_Unnesting_In_Decls_Or_Stmts, for creating a new procedure
374         to replace a block statement and resetting the Scope fields of
375         the block's top-level entities.
377 2019-10-10  Anthony Leonardo Gracio  <leonardo@adacore.com>
379         * doc/gnat_ugn/about_this_guide.rst,
380         doc/gnat_ugn/building_executable_programs_with_gnat.rst,
381         doc/gnat_ugn/getting_started_with_gnat.rst,
382         doc/gnat_ugn/gnat_and_program_execution.rst, errout.ads,
383         exp_ch3.adb, gnatls.adb, impunit.adb, lib-writ.ads, opt.ads,
384         sem_ch7.adb, sem_prag.adb, sem_res.adb, sem_warn.adb,
385         terminals.c: Replace GPS by GNAT Studio.
386         * gnat_ugn.texi: Regenerate.
388 2019-10-10  Ed Schonberg  <schonberg@adacore.com>
390         * exp_ch6.adb (Expand_Simple_Function_Return_Statement): If the
391         function to which the return statement applies is an
392         Ignored_Ghost_Function, do not indicate that it uses the
393         secondary stack when the return type is unconstrained.
395 2019-10-10  Bob Duff  <duff@adacore.com>
397         * libgnat/a-cbdlli.adb, libgnat/a-cbhama.adb,
398         libgnat/a-cbhase.adb, libgnat/a-cbmutr.adb,
399         libgnat/a-cborma.adb, libgnat/a-cborse.adb,
400         libgnat/a-cdlili.adb, libgnat/a-cidlli.adb,
401         libgnat/a-cihama.adb, libgnat/a-cihase.adb,
402         libgnat/a-cimutr.adb, libgnat/a-ciorma.adb,
403         libgnat/a-ciorse.adb, libgnat/a-cobove.adb,
404         libgnat/a-cohama.adb, libgnat/a-cohase.adb,
405         libgnat/a-coinve.adb, libgnat/a-comutr.adb,
406         libgnat/a-conhel.adb, libgnat/a-convec.adb,
407         libgnat/a-coorma.adb, libgnat/a-coorse.adb (Reference,
408         Constant_Reference): Use Busy instead of Lock, so we forbid
409         tampering with cursors, rather than tampering with elements.
411 2019-10-10  Ed Schonberg  <schonberg@adacore.com>
413         * sem_cat.adb (Set_Categorization_From_Pragma): Do not modify
414         any visibility settings if there are no compilation_unit pragmas
415         following the package declaration. Add comments for future
416         cleanup.
418 2019-10-10  Patrick Bernardi  <bernardi@adacore.com>
420         * bindgen.adb (System_Secondary_Stack_Package_In_Closure):
421         Renamed flag System_Secondary_Stack_Used to be clearer of what
422         it represents.
423         (Gen_Adainit): Refactor secondary stack related code to make it
424         clearer.
425         * rtsfind.adb (Load_RTU): Don't set Sec_Stack_Used flag here
426         (RTE): Set Sec_Stack_Used if the System.Secondary_Stack is
427         referenced, but not if we're ignoring ghost code.
429 2019-10-10  Piotr Trojanek  <trojanek@adacore.com>
431         * sem_prag.adb (Analyze_Global_In_Decl_Part): Simplify previous
432         test, just like in a recent commit we simplified a similar test
433         for Depends contract.
435 2019-10-04  Joseph Myers  <joseph@codesourcery.com>
437         * gcc-interface/utils.c (flag_isoc2x): New variable.
439 2019-10-01  Maciej W. Rozycki  <macro@wdc.com>
441         * gcc-interface/Makefile.in (ADA_RTL_DSO_DIR): New variable.
442         (install-gnatlib): Use it in place of ADA_RTL_OBJ_DIR for shared 
443         library installation.
445 2019-10-01  Maciej W. Rozycki  <macro@wdc.com>
447         * gcc-interface/Make-lang.in (ada.install-common): Split into...
448         (gnat-install-tools, gnat-install-lib): ... these.
450 2019-09-26  Alexandre Oliva <oliva@adacore.com>
452         * gcc-interface/decl.c (components_to_record): Set
453         DECL_SIZE_UNIT for zero-sized fields.
455 2019-09-26  Arnaud Charlet  <charlet@adacore.com>
457         * osint.adb (OS_Time_To_GNAT_Time): Remove dependency on To_C/To_Ada
459 2019-09-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
461         * libgnarl/s-osinte__solaris.ads (sysconf): Declare.
462         (SC_NPROCESSORS_ONLN): Define.
463         * libgnarl/s-tasinf__solaris.ads (Number_Of_Processors): Declare.
464         * libgnarl/s-tasinf__solaris.adb (N_CPU): New variable.
465         (Number_Of_Processors): New function.
467 2019-09-23  Eric Botcazou  <ebotcazou@adacore.com>
469         * gcc-interface/trans.c (Regular_Loop_to_gnu): Do not rotate the loop
470         if -Og is enabled.
471         (build_return_expr): Do not perform NRV if -Og is enabled.
472         (Subprogram_Body_to_gnu): Likewise.
473         (gnat_to_gnu) <N_Simple_Return_Statement>: Likewise.
474         (Handled_Sequence_Of_Statements_to_gnu): Do not inline finalizers if
475         -Og is enabled.
476         * gcc-interface/utils.c (convert_to_index_type): Return early if -Og
477         is enabled.
479 2019-09-23  Eric Botcazou  <ebotcazou@adacore.com>
481         * gcc-interface/trans.c (gnat_compile_time_expr_list): New variable.
482         (Pragma_to_gnu): Rename local variable.  Save the (first) expression
483         of pragma Compile_Time_{Error|Warning} for later processing.
484         (Compilation_Unit_to_gnu): Process the expressions saved above.
486 2019-09-23  Eric Botcazou  <ebotcazou@adacore.com>
488         * gcc-interface/trans.c (Attribute_to_gnu): Test Can_Use_Internal_Rep
489         on the underlying type of the node.
490         (Call_to_gnu): Likewise with the type of the prefix.
492 2019-09-23  Eric Botcazou  <ebotcazou@adacore.com>
494         * gcc-interface/decl.c (components_to_record): Do not reorder fields
495         in packed record types if they contain fixed-size fields that cannot
496         be laid out in a packed manner.
498 2019-09-19  Tom Tromey  <tromey@adacore.com>
500         * gcc-interface/misc.c (gnat_get_type_bias): Return the bias
501         when -fgnat-encodings=gdb.
503 2019-09-19  Steve Baird  <baird@adacore.com>
505         * sem_prag.adb (Preferred_String_Type): A new function. Given an
506         expression, determines whether the preference rules defined for
507         the third-and-later arguments of pragma Annotate suffice to
508         determine the type of the expression. If so, then the preferred
509         type is returned; if not then Empty is returned. Handles
510         concatenations.
511         (Analyze_Pragma): Replace previous code, which dealt only with
512         string literals, with calls to the new Preferred_String_Type
513         function, which also handles concatenations.
514         * doc/gnat_rm/implementation_defined_pragmas.rst: Update
515         documentation for pragma Annotate.
516         * gnat_rm.texi: Regenerate.
518 2019-09-19  Eric Botcazou  <ebotcazou@adacore.com>
520         * exp_util.adb (Is_Possibly_Unaligned_Slice): Do not return true
521         on pure alignment considerations if the target does not require
522         the strict alignment of memory accesses.
524 2019-09-19  Eric Botcazou  <ebotcazou@adacore.com>
526         * sem_ch12.adb (Check_Private_View): Add a comment to indicate
527         future work.
529 2019-09-19  Eric Botcazou  <ebotcazou@adacore.com>
531         * exp_aggr.adb (Has_Mutable_Components): Look at the underlying
532         type of components to find out whether they are mutable.
534 2019-09-19  Eric Botcazou  <ebotcazou@adacore.com>
536         * sem_ch12.adb (Instantiate_Package_Body): Check that the body
537         has not already been instantiated when the body of the parent
538         was being loaded.
540 2019-09-19  Eric Botcazou  <ebotcazou@adacore.com>
542         * sem_util.adb (In_Instance): Test whether the current unit has
543         been analyzed instead of being on the scope stack to detect the
544         case of actuals of an instantiation of a generic child unit done
545         as a compilation unit.
547 2019-09-19  Dmitriy Anisimkov  <anisimko@adacore.com>
549         * libgnat/g-socket.ads, libgnat/g-socket.adb
550         (Create_Socket_Pair): New routine.
551         * libgnat/g-socthi.ads (OS_Has_Socketpair): Boolean constant.
552         (C_Socketpair): New imported routine.
553         * libgnat/g-socthi__mingw.ads, libgnat/g-socthi__vxworks.ads
554         (Default_Socket_Pair_Family): New constant.
555         (C_Socketpair): New routine.
556         * libgnat/g-socthi__mingw.adb, libgnat/g-socthi__vxworks.adb
557         (C_Socketpair): Is separated in anouther file.
558         * libgnat/g-sthcso.adb (C_Socketpair): Non UNIX implementation.
559         * libgnat/g-stsifd__sockets.adb: Reuse C_Socketpair.
561 2019-09-19  Yannick Moy  <moy@adacore.com>
563         * sem_prag.adb (Analyze_Depends_In_Decl_Part): Simplify previous
564         test.
566 2019-09-19  Ed Schonberg  <schonberg@adacore.com>
568         * sem_ch7.adb (Install_Parent_Private_Declarations): If a
569         generic child unit is instantiated within a sibling child unit,
570         the analysis of its private part requires that the private part
571         of the ancestor be available, as is done when the context
572         includes an instance of the ancestor.
574 2019-09-19  Yannick Moy  <moy@adacore.com>
576         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Add special
577         case for traversal functions.
579 2019-09-19  Yannick Moy  <moy@adacore.com>
581         * sem_prag.adb (Analyze_Global_In_Decl_Part): Do not issue an
582         error when a constant of an access type is used as output in a
583         Global contract.
584         (Analyze_Depends_In_Decl_Part): Do not issue an error when a
585         constant of an access type is used as output in a Depends
586         contract.
588 2019-09-19  Arnaud Charlet  <charlet@adacore.com>
590         * exp_attr.adb: Remove obsolete comment.
592 2019-09-19  Eric Botcazou  <ebotcazou@adacore.com>
594         * sem_ch3.adb (Build_Derived_Access_Type): If this is an access-
595         to-subprogram type, copy Can_Use_Internal_Rep from the parent.
597 2019-09-19  Yannick Moy  <moy@adacore.com>
599         * gcc-interface/Make-lang.in: Remove references to sem_spark.
600         * sem_spark.adb, sem_spark.ads: Remove unit.
602 2019-09-19  Eric Botcazou  <ebotcazou@adacore.com>
604         * exp_attr.adb (Is_Inline_Floating_Point_Attribute): Treat
605         Machine_Rounding as an alias for Rounding.
606         * sem_res.adb (Simplify_Type_Conversion): Likewise.
608 2019-09-19  Gary Dismukes  <dismukes@adacore.com>
610         * exp_unst.adb (Unnest_Subprogram): Bypass the transformation of
611         up-level references unless Opt.Generate_C_Code is enabled.
613 2019-09-19  Eric Botcazou  <ebotcazou@adacore.com>
615         * exp_ch4.adb (Expand_Array_Equality): If optimization is
616         enabled, generate a simple conjunction of comparisons for the
617         specific case of constrained 1-dimensional 2-element arrays.
618         Fix formatting.
620 2019-09-19  Piotr Trojanek  <trojanek@adacore.com>
622         * exp_dbug.ads, exp_dbug.adb (Get_Homonym_Number): Remove.
623         (Append_Homonym_Number): Use Homonym_Number instead of
624         Get_Homonym_Number.
625         * exp_util.ads, exp_util.adb (Homonym_Number): Mirror style of
626         the removed Get_Homonym_Number routine, i.e. initialize local
627         objects at declaration and refine the type of result.
628         * sem_util.adb (Add_Homonym_Suffix): Use Homonym_Number instead
629         of Get_Homonym_Number.
631 2019-09-19  Ed Schonberg  <schonberg@adacore.com>
633         * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Simplify
634         handling of expressions in predicates when the context is a
635         generic unit.
637 2019-09-19  Bob Duff  <duff@adacore.com>
639         * sem_attr.adb (Resolve_Attribute): Make sure the secondary
640         stack is properly managed in the case of a 'Range attribute in a
641         loop.
643 2019-09-19  Raphael Amiard  <amiard@adacore.com>
645         * libgnat/a-cfhase.ads (Set): Add comments to public primitives.
647 2019-09-19  Raphael Amiard  <amiard@adacore.com>
649         * libgnat/a-cbhama.ads, libgnat/a-cbhase.ads,
650         libgnat/a-chtgop.ads (Clear): Refine comments
652 2019-09-19  Eric Botcazou  <ebotcazou@adacore.com>
654         * sem_ch12.adb (Restore_Private_Views): Comment out new code
655         that clear the Is_Generic_Actual_Type also on the full view.
657 2019-09-19  Bob Duff  <duff@adacore.com>
659         * exp_ch3.adb (Rewrite_As_Renaming): Return False if there are
660         any aspect specifications, because otherwise Insert_Actions
661         blows up.
663 2019-09-19  Eric Botcazou  <ebotcazou@adacore.com>
665         * exp_ch6.adb (Add_Simple_Call_By_Copy_Code): Add
666         Bit_Packed_Array parameter and documet it. Always insert a copy
667         if it is set True.
668         (Expand_Actuals): Adjust the calls to
669         Add_Simple_Call_By_Copy_Code.
671 2019-09-19  Bob Duff  <duff@adacore.com>
673         * xref_lib.adb (Get_Symbol_Name): If we reach EOF in the first
674         loop without finding the symbol, return "???". Otherwise, it's
675         an infinite loop.
676         (Parse_EOL): Assert that we're not already at EOF.  Remove
677         processing of LF/CR -- there are no operating systems that use
678         that.
680 2019-09-19  Eric Botcazou  <ebotcazou@adacore.com>
682         * exp_ch6.adb (Is_Legal_Copy): Also return false for an aliased
683         formal and a formal passed by reference in convention Ada.  Add
684         missing guard to the existing test on Is_Valued_Procedure.
686 2019-09-19  Bob Duff  <duff@adacore.com>
688         * rtsfind.ads (RTE_Available): Improve comment.
690 2019-09-18  Bob Duff  <duff@adacore.com>
692         * exp_ch5.adb (Expand_Assign_Array_Loop_Or_Bitfield): Move call
693         to RTE_Available later, so it doesn't disturb the elab order.
694         The RE_Copy_Bitfield entity is defined in package
695         System.Bitfields which has a dependency on package
696         System.Bitfield_Utils, which has it its spec:
697            pragma Elaborate_Body;
698         The query on RTE_Available forces loading and analyzing
699         System.Bitfields and all its withed units.
701 2019-09-18  Eric Botcazou  <ebotcazou@adacore.com>
703         * checks.ads (Alignment_Warnings_Record): Add P component.
704         * checks.adb (Apply_Address_Clause_Check): Be prepared to kill
705         the warning also if the clause is of the form X'Address.
706         (Validate_Alignment_Check_Warning): Kill the warning if the
707         clause is of the form X'Address and the alignment of X is
708         compatible.
710 2019-09-18  Ed Schonberg  <schonberg@adacore.com>
712         * sem_res.adb (Set_Mixed_Node_Expression): If a conditional
713         expression has universal_real alternaitves and the context is
714         Universal_Fixed, as when it is an operand in a fixed-point
715         multiplication or division, resolve the expression with a
716         visible fixed-point type, which must be unique.
718 2019-09-18  Ed Schonberg  <schonberg@adacore.com>
720         * sem_ch3.adb (Constrain_Component_Type): For a discriminated
721         type, handle the case of a constraint given by a conversion of a
722         discriminant of the enclosing type. Necessary when compiling a
723         discriminated task for a restricted run-time, when the generated
724         Secondary_Stack component may be set by means of an aspect on
725         the task type.
727 2019-09-18  Ed Schonberg  <schonberg@adacore.com>
729         * exp_aggr.adb (Expand_Record_Aggregate, Rewrite_Discriminant):
730         After rewriting a reference to an outer discriminant as a
731         selected component of the enclosing object, analyze the selected
732         component to ensure that the entity of the selector name is
733         properly set. This is necessary when the aggregate appears
734         within an expression that may have been analyzed already.
736 2019-09-18  Justin Squirek  <squirek@adacore.com>
738         * sem_ch8.adb (Use_One_Type): Add guard to prevent warning on a
739         reundant use package clause where there is no previous
740         use_clause in the chain.
742 2019-09-18  Justin Squirek  <squirek@adacore.com>
744         * exp_ch4.adb (Expand_N_Type_Conversion): Add calculation of an
745         alternative operand for the purposes of generating accessibility
746         checks.
748 2019-09-18  Eric Botcazou  <ebotcazou@adacore.com>
750         * exp_aggr.adb (Build_Array_Aggr_Code): In STEP 1 (c), duplicate
751         the expression and reset the Loop_Actions for each loop
752         generated for an others choice.
754 2019-09-18  Justin Squirek  <squirek@adacore.com>
756         * einfo.adb, einfo.ads (Minimum_Accessibility): Added new field.
757         (Set_Minimum_Accessibility): Added to set new field.
758         (Minimum_Accessibility): Added to fetch new field.
759         * exp_ch6.adb (Expand_Subprogram_Call): Modify calls to fetch
760         accessibility levels to the new subprogram Get_Accessibility
761         which handles cases where minimum accessibility might be needed.
762         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Add section to
763         generate a Minimum_Accessibility object within relevant
764         subprograms.
765         * sem_util.adb, sem_util.ads (Dynamic_Accessibility_Level):
766         Additional documentation added and modify section to use new
767         function Get_Accessibility.
768         (Get_Accessibility): Added to centralize processing of
769         accessibility levels.
771 2019-09-18  Steve Baird  <baird@adacore.com>
773         * sem_util.ads (Interval_Lists): A new visible package. This
774         package is visible because it is also intended for eventual use
775         in Sem_Eval.Subtypes_Statically_Compatible when that function is
776         someday upgraded to handle static predicates correctly.  This
777         new package doesn't really need to be visible for now, but it
778         still seems like a good idea.
779         * sem_util.adb (Gather_Components): Implement AI12-0086 via the
780         following strategy. The existing code knows how to take a static
781         discriminant value and identify the corresponding variant; in
782         the newly-permitted case of a non-static value of a static
783         subtype, we arbitrarily select a value of the subtype and find
784         the corresponding variant using the existing code. Subsequently,
785         we check that every other value of the discriminant's subtype
786         corresponds to the same variant; this is done using the newly
787         introduced Interval_Lists package.
788         (Interval_Lists): Provide a body for the new package.
790 2019-09-18  Javier Miranda  <miranda@adacore.com>
792         * exp_ch4.adb (Expand_N_Op_Eq): The frontend assumes that we can
793         do a bit-for-bit comparison of two access to protected
794         subprogram pointers. However, there are two reasons why we may
795         not be able to do that: (1) there may be padding bits for
796         alignment before the access to subprogram, and (2) the access to
797         subprogram itself may not be compared bit-for- bit because the
798         activation record part is undefined: two pointers are equal iff
799         the subprogram addresses are equal. This patch fixes it by
800         forcing a field-by-field comparison.
801         * bindgen.adb (Gen_Adainit): The type No_Param_Proc is defined
802         in the library as having Favor_Top_Level, but when we create an
803         object of that type in the binder file we don't have that
804         pragma, so the types are different. This patch fixes this issue.
805         * libgnarl/s-interr.adb, libgnarl/s-interr__hwint.adb,
806         libgnarl/s-interr__sigaction.adb, libgnarl/s-interr__vxworks.adb
807         (Is_Registered): This routine erroneously assumes that the
808         access to protected subprogram is two addresses. We need to
809         create the same record that the compiler makes to ensure that
810         any padding is the same. Then we have to look at just the first
811         word of the access to subprogram. This patch fixes this issue.
813 2019-09-18  Bob Duff  <duff@adacore.com>
815         * exp_ch5.adb (Expand_Assign_Array_Loop_Or_Bitfield): The call
816         to Copy_Bitfield is now enabled.
817         (Expand_Assign_Array_Bitfield): Multiply 'Length times
818         'Component_Size "by hand" instead of using 'Size.
820 2019-09-18  Vasiliy Fofanov  <fofanov@adacore.com>
822         * doc/gnat_rm/implementation_defined_pragmas.rst: Fix minor
823         formatting issue.
825 2019-09-18  Javier Miranda  <miranda@adacore.com>
827         * exp_disp.adb (Make_DT, Make_Secondary_DT): Remove generation
828         of alignment representation clause for the following tables:
829         Predef_Prims, Iface_DT, TSD, ITable, DT.
831 2019-09-18  Steve Baird  <baird@adacore.com>
833         * sem_eval.adb (Expr_Value): Do not fail "the type of a null
834         literal must be an access type" assertion if errors have already
835         been posted on the given node.
837 2019-09-18  Piotr Trojanek  <trojanek@adacore.com>
839         * exp_dbug.ads, exp_dbug.adb (Get_Homonym_Number): Refine type
840         from Nat to Pos.
841         * sem_util.adb (Add_Homonym_Suffix): Refine type of a local
842         variable.
844 2019-09-18  Yannick Moy  <moy@adacore.com>
846         * exp_dbug.adb (Append_Homonym_Number): Use new function
847         Get_Homonym_Number.
848         (Get_Homonym_Number): New function to return the homonym number.
849         (Qualify_Entity_Name): Remove special case for GNATprove.
850         * exp_dbug.ads (Get_Homonym_Number): Make the new function
851         public for use in GNATprove.
852         * frontend.adb (Frontend): Do not qualify names in GNATprove
853         mode.
854         * sem_util.adb (Unique_Name): Append homonym suffix where needed
855         for entities which have local homonyms in the same scope.
857 2019-09-18  Nicolas Roche  <roche@adacore.com>
859         * libgnat/s-valrea.adb (Scan_Integral_Digits): New procedure.
860         (Scan_Decimal_Digits): New procedure.
861         (As_Digit): New function.
862         (Scan_Real): Use Scan_Integral_Digits and Scan_Decimal_Digits.
864 2019-09-18  Claire Dross  <dross@adacore.com>
866         * exp_attr.adb (Expand_N_Attribute_Reference): Call routine from
867         Exp_Util to know the value of the Constrained attribute in the
868         static case.
869         * exp_spark.adb (Expand_SPARK_N_Attribute_Reference): Make
870         implicit dereferences inside the Constrained attribute explicit.
871         * exp_util.ads, exp_util.adb
872         (Attribute_Constrained_Static_Value): New routine to compute the
873         value of a statically known reference to the Constrained
874         attribute.
876 2019-09-18  Vadim Godunko  <godunko@adacore.com>
878         * libgnat/g-expect.adb (Expect_Internal): Don't include invalid
879         file descriptors into the set of file descriptors for Poll.
880         Raise Process_Died exception when computed set of file
881         descriptors to monitor is empty.
883 2019-09-18  Frederic Konrad  <konrad@adacore.com>
885         * adaint.c: Include dosFsLib.h and vwModNum.h for VxWorks 6.
886         (__gnat_rename): Map S_dosFsLib_FILE_NOT_FOUND to ENOENT.
888 2019-09-18  Steve Baird  <baird@adacore.com>
890         * freeze.adb (Freeze_Object_Declaration): Do not call
891         Check_Large_Modular_Array when the object declaration being
892         frozen is an ignored ghost entity.
894 2019-09-18  Tom Tromey  <tromey@adacore.com>
896         * make.adb (Initialize): Fix typo.
898 2019-09-18  Olivier Hainque  <hainque@adacore.com>
900         * libgnat/s-win32.ads (DWORD_PTR): New type, pointer size
901         unsigned int.
902         (SYSTEM_INFO): Use it for dwActiveProcessorMask.
904 2019-09-18  Arnaud Charlet  <charlet@adacore.com>
906         * doc/gnat_rm/implementation_defined_pragmas.rst: Improve doc on
907         Warning_As_Error.
908         * gnat_rm.texi: Regenerate.
910 2019-09-18  Arnaud Charlet  <charlet@adacore.com>
912         * doc/gnat_rm/implementation_defined_characteristics.rst,
913         doc/gnat_rm/implementation_defined_pragmas.rst,
914         doc/gnat_rm/implementation_of_specific_ada_features.rst: Remove
915         remaining references to VMS support
916         * gnat_rm.texi: Regenerate.
918 2019-09-18  Arnaud Charlet  <charlet@adacore.com>
920         * libgnat/s-stausa.adb: Fix a typo
922 2019-09-18  Bob Duff  <duff@adacore.com>
924         * libgnat/a-cbhama.adb, libgnat/a-cbhase.adb,
925         libgnat/a-cbmutr.adb, libgnat/a-cborma.adb,
926         libgnat/a-cborse.adb, libgnat/a-cobove.adb (Copy): Avoid reading
927         the uninitialized variable C in the Checks = False case. Change
928         variable to be a constant.
930 2019-09-18  Claire Dross  <dross@adacore.com>
932         * libgnat/a-cofuma.adb (Remove, Elements_Equal_Except,
933         Keys_Included, Keys_Included_Except): Rename loop indexes and
934         global constants from I to J.
936 2019-09-18  Arnaud Charlet  <charlet@adacore.com>
938         * exp_unst.adb (Unnest_Subprograms): Refine previous change.
940 2019-09-17  Claire Dross  <dross@adacore.com>
942         * libgnat/a-cofuma.ads, libgnat/a-cofuma.adb (Remove): New
943         function which returns a copy of the input container without a
944         given mapping.
946 2019-09-17  Yannick Moy  <moy@adacore.com>
948         * libgnat/s-arit64.adb (Double_Divide): Correctly handle the
949         special case when rounding.
951 2019-09-17  Javier Miranda  <miranda@adacore.com>
953         * sem_ch3.adb (Complete_Private_Subtype): Propagate attributes
954         Has_Attributes and Predicate_Function to the cloned subtype.
956 2019-09-17  Eric Botcazou  <ebotcazou@adacore.com>
958         * sem.adb (Do_Analyze): Save Style_Check_Max_Line_Length on
959         entry and restore it on exit instead of recomputing it.
961 2019-09-17  Tom Tromey  <tromey@adacore.com>
963         * exp_dbug.ads: Update character type comment.
965 2019-09-17  Yannick Moy  <moy@adacore.com>
967         * libgnat/s-arit64.adb (Double_Divide): Simplify needlessly
968         complex computation. Fix comments.
969         (Scaled_Divide): Fix comments. Explain why implementation does
970         not suffer from bugs in Algorithm D from 2nd Edition of TAOCP.
972 2019-09-17  Yannick Moy  <moy@adacore.com>
974         * libgnat/s-arit64.adb (Scaled_Divide): Add protection against
975         undesirable wrap-around.
977 2019-09-17  Yannick Moy  <moy@adacore.com>
979         * libgnat/s-arit64.adb (Double_Divide): Fix two possible
980         overflows.
982 2019-09-17  Dmitriy Anisimkov  <anisimko@adacore.com>
984         * make_util.ads (On_Windows): Move...
985         * osint.ads (On_Windows): There.
986         * osint.adb (OS_Time_To_GNAT_Time): If odd incremented on
987         Windows before conversion to Time_Stamp_Type.
989 2019-09-17  Yannick Moy  <moy@adacore.com>
991         * sem_spark.adb (Check_Declaration): Do not check the assignment
992         from an illegal declaration.
994 2019-09-17  Bob Duff  <duff@adacore.com>
996         * doc/gnat_ugn/gnat_and_program_execution.rst: Clarify
997         documentation.
998         * gnat_ugn.texi: Regenerate.
999         * libgnat/s-stausa.ads: Clarify comments.
1001 2019-09-17  Steve Baird  <baird@adacore.com>
1003         * sem_util.adb (Wrong_Type): In deciding to suppress a message,
1004         it is not enough for In_Instance to be True; in addition,
1005         In_Generic_Actual (Expr) must be False.
1006         * sem_type.adb (In_Generic_Actual): Fix bug where traversal of
1007         parents skips every other node.
1009 2019-09-17  Claire Dross  <dross@adacore.com>
1011         * sem_spark.adb (Get_Observed_Or_Borrowed_Expr): If the
1012         definition of a local borrower contains calls to traversal
1013         functions, the borrowed expression is the first parameter of the
1014         first traversal function call in the definition.
1016 2019-09-17  Ed Falis  <falis@adacore.com>
1018         * doc/gnat_rm/implementation_defined_pragmas.rst: Remove
1019         section.
1020         * gnat_rm.texi, gnat_ugn.texi: Regenerate.
1022 2019-09-17  Vadim Godunko  <godunko@adacore.com>
1024         * libgnat/g-exptty.ads (Close_Input): New subprogram.
1025         * libgnat/g-exptty.adb (Close_Input): New subprogram.
1026         (Close): Move close of TTY to Close_Input.
1027         * terminals.c (__gnat_close_tty): Set file descriptors to
1028         invalid value after close.
1030 2019-09-17  Vadim Godunko  <godunko@adacore.com>
1032         * libgnat/g-expect.adb (Expect_Internal): Try to call 'poll' few
1033         times.
1035 2019-09-17  Vadim Godunko  <godunko@adacore.com>
1037         * libgnat/g-expect.ads, libgnat/g-expect.adb (Close_Input): New
1038         subprogram.
1039         (Get_Command_Output): Call Close_Input to close input stream.
1040         (Expect_Internal): Likewise.
1041         (Close): Likewise.
1042         * libgnat/g-exptty.adb (Close): Likewise.
1044 2019-09-17  Piotr Trojanek  <trojanek@adacore.com>
1046         * sem_util.ads, sem_util.adb (Is_Attribute_Old): New utility
1047         routine.
1049 2019-09-17  Yannick Moy  <moy@adacore.com>
1051         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Add handling
1052         for dispatching operations.
1054 2019-09-17  Ed Schonberg  <schonberg@adacore.com>
1056         * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): In a
1057         generic context, for a Predicate aspect, use
1058         Preanalyze_Spec_Expression to verify conformance.
1060 2019-09-17  Javier Miranda  <miranda@adacore.com>
1062         * sem_ch3.adb (Constrain_Corresponding_Record): Propagate
1063         attribute Is_Tagged_Type.
1065 2019-09-17  Javier Miranda  <miranda@adacore.com>
1067         * exp_ch3.adb (Build_Record_Init_Proc): Do not generate code to
1068         adjust the tag component when the record is initialized with a
1069         raise expression.
1070         * sem_aggr.adb (Valid_Limited_Ancestor): Return True for
1071         N_Raise_Expression nodes.
1072         (Valid_Ancestor_Type): Return True for raise expressions.
1073         * sem_ch3.adb (Analyze_Component_Declaration): Do not report an
1074         error when a component is initialized with a raise expression.
1075         * sem_ch4.adb (Analyze_Qualified_Expression): Do not report an
1076         error when the aggregate has a raise expression.
1078 2019-09-17  Piotr Trojanek  <trojanek@adacore.com>
1080         * ali.ads: Fix casing in comment.
1081         * ali-util.ads, ali-util.adb (Read_Withed_ALIs): Remove
1082         Ignore_Errors parameter; it was only set to non-default value of
1083         True when running in GNATprove_Mode and wrongly reset to False
1084         when calling this routine recursively. Now in GNATprove mode we
1085         want it to be always True, so in fact it is equivalent to
1086         GNATProve_Mode flag itself (which was already used in this
1087         routine).
1089 2019-09-17  Arnaud Charlet  <charlet@adacore.com>
1091         * adaint.c (_REENTRANT, _THREAD_SAFE): Only define if needed.
1093 2019-09-17  Arnaud Charlet  <charlet@adacore.com>
1095         * libgnat/s-bitfie.ads (Val_Bits, Val_Bytes): Define from
1096         Long_Long_Integer'Size.
1098 2019-09-17  Javier Miranda  <miranda@adacore.com>
1100         * exp_ch6.ads (Needs_BIP_Task_Actuals): New subprogram.
1101         * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call): Code
1102         cleanup.
1103         (Check_Number_Of_Actuals): New subprogram.
1104         (Make_Build_In_Place_Call_In_Allocator): Adding assertion.
1105         (Make_Build_In_Place_Call_In_Anonymous_Context): Adding
1106         assertion.
1107         (Make_Build_In_Place_Call_In_Assignment): Adding assertion.
1108         (Make_Build_In_Place_Call_In_Object_Declaration): Code cleanup
1109         plus assertion addition.
1110         (Needs_BIP_Task_Actuals): New subprogram.
1111         * sem_ch6.adb (Create_Extra_Formals): Rely on
1112         Needs_BIP_Task_Actuals() to check if the master of the tasks to
1113         be created, and the caller's activation chain formals are
1114         needed.
1116 2019-09-17  Bob Duff  <duff@adacore.com>
1118         * libgnat/s-bituti.adb (Get_Val_2, Set_Val_2): Use new routines
1119         for getting and setting a Val_2, avoiding touching the second
1120         half when that half might not exist.
1121         * exp_ch5.adb (Expand_Assign_Array_Loop_Or_Bitfield): Correct
1122         tests for potential volatile or independent components. In
1123         particular, do not call Prefix unless we know it's a slice.
1125 2019-09-17  Dmitriy Anisimkov  <anisimko@adacore.com>
1127         * gsocket.h: Include sys/un.h.
1128         * s-oscons-tmplt.c (AF_UNIX): New constant generation.
1129         (SIZEOF_sockaddr_un): Idem.
1130         * libgnat/g-socket.ads (Family_Type): New value Family_Unix
1131         added.
1132         (Family_Inet_4_6): New subtype only for network families.
1133         (Sock_Addr_Type): Add Unbounded_String field for Family_Unix
1134         variant.
1135         (Unix_Socket_Address): Create Sock_Addr_Type from socket
1136         pathname.
1137         (Network_Socket_Address): Create Sock_Addr_Type from
1138         Inet_Addr_Type and Port_Type parameters.
1139         * libgnat/g-socket.adb: Support local unix address in socket
1140         routines.
1141         (Get_Address_Info): Disable warning about Result may be
1142         referenced before it has a value. Remove duplicated code to exit
1143         from Look_For_Supported.
1144         * libgnat/g-sothco.ads (Unix_Name_Length): New constant defining
1145         maximum number of characters in local socket address path.
1146         (Sockaddr): Add variant for Family_Unix address family. Move
1147         Sin_Port and Sin_Family to Family_Inet section. Add Sin6_Port
1148         and Sin6_Family to Family_Inet6 section.
1149         (Set_Address): Add out parameter Length to return valuable
1150         Sockaddr data length.
1151         (Get_Address): Add input parameter Length to set valuable
1152         Sockaddr data length.
1153         * libgnat/g-sothco.adb: Support local unix address in socket
1154         routines.
1156 2019-09-17  Eric Botcazou  <ebotcazou@adacore.com>
1158         * exp_attr.adb (Expand_Size_Attribute): Chain the special cases
1159         on the back-end path and rewrite the attribute appled to slices
1160         of bit-packed arrays into the product of the Length and the
1161         Compoent_Size attributes of the slices.
1162         * exp_ch5.adb (Expand_Assign_Array_Bitfield): Use Size attribute
1163         directly to compute the bitfield's size.
1165 2019-09-17  Bob Duff  <duff@adacore.com>
1167         * exp_ch5.adb (Expand_Assign_Array_Loop_Or_Bitfield): Add tests
1168         for potential volatile or independent components.
1169         * libgnat/s-bituti.adb (Copy_Small_Bitfield,
1170         Copy_Large_Bitfield): Move declarations to more appropriate
1171         place.
1173 2019-09-13  Maciej W. Rozycki  <macro@wdc.com>
1175         * make.adb (Scan_Make_Arg): Also accept `--sysroot=' for the 
1176         compiler and the linker.
1178 2019-08-30  Eric Botcazou  <ebotcazou@adacore.com>
1180         * gcc-interface/decl.c (maybe_saturate_size): New function.
1181         (gnat_to_gnu_entity): Invoke it on the Esize of types before sending
1182         it for back-annotations.
1183         * gcc-interface/trans.c: Fix typo.
1185 2019-08-30  Eric Botcazou  <ebotcazou@adacore.com>
1187         * gcc-interface/ada-tree.h (DECL_FORCED_BY_REF_P): New macro.
1188         * gcc-interface/decl.c (gnat_to_gnu_param): Set it on parameters
1189         whose mechanism was forced to by-reference.
1190         * gcc-interface/trans.c (Call_to_gnu): Do not issue a warning about a
1191         misaligned actual parameter if it is based on a CONSTRUCTOR.  Remove
1192         obsolete warning for users of Starlet.  Issue a warning if a temporary
1193         is make around the call for a parameter with DECL_FORCED_BY_REF_P set.
1194         (addressable_p): Return true for REAL_CST and ADDR_EXPR.
1196 2019-08-30  Eric Botcazou  <ebotcazou@adacore.com>
1198         * gcc-interface/trans.c (gnat_to_gnu): Do not set the location on an
1199         expression used for a tag.
1201 2019-08-30  Eric Botcazou  <ebotcazou@adacore.com>
1203         * gcc-interface/gigi.h (aggregate_type_contains_array_p): Declare.
1204         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: For an
1205         extension, test Has_Record_Rep_Clause instead of Has_Specified_Layout.
1206         (adjust_packed): Return 0 if the type of the field is an aggregate
1207         type that contains (or is) a self-referential array.
1208         (type_has_variable_size): Delete.
1209         * gcc-interface/utils.c (inish_record_type): Constify a variable.
1210         (aggregate_type_contains_array_p): Add parameter SELF_REFERENTIAL.
1211         <RECORD_TYPE>: Pass it in the recursive call.
1212         <ARRAY_TYPE>: If it is true, return true only if the array type is
1213         self-referential.
1214         (create_field_decl): Streamline the setting of the alignment on the
1215         field.  Pass false to aggregate_type_contains_array_p.
1217 2019-08-30  Eric Botcazou  <ebotcazou@adacore.com>
1219         * gcc-interface/trans.c (lvalue_required_p) <N_Slice>: Adjust GNU_TYPE
1220         in the recursive call.
1221         <N_Selected_Component>: Likewise.
1223 2019-08-30  Eric Botcazou  <ebotcazou@adacore.com>
1225         * gcc-interface/utils.c (build_template): Deal with parameters
1226         passed by pointer to component of multi-dimensional arrays.
1228 2019-08-30  Eric Botcazou  <ebotcazou@adacore.com>
1230         * gcc-interface/decl.c (annotate_value) <CALL_EXPR>: Inline the call
1231         also if List_Representation_Info is greater than 3.
1233 2019-08-30  Eric Botcazou  <ebotcazou@adacore.com>
1235         * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Size>: Add assertion.
1237 2019-08-30  Eric Botcazou  <ebotcazou@adacore.com>
1239         * gcc-interface/gigi.h (gigi_checking_assert): New macro.
1240         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Modular_Integer_Type>:
1241         Remove redundant test and adjust comments.  Minor tweaks.
1242         * gcc-interface/trans.c (Call_to_gnu): Do not generate range checks,
1243         instead assert that the Do_Range_Check flag is not set.  Adjust call
1244         to convert_with_check.
1245         (gnat_to_gnu): Likewise.
1246         (assoc_to_constructor): Likewise.
1247         (pos_to_constructor): Likewise.  Remove GNAT_COMPONENT_TYPE parameter.
1248         (emit_range_check): Delete.
1249         (convert_with_check): Remove RANGE_P parameter and adjust.  Do a single
1250         overflow check for modular types.
1252 2019-08-23  Jakub Jelinek  <jakub@redhat.com>
1254         PR middle-end/91283
1255         * gcc-interface/misc.c (gnat_post_options): Set flag_excess_precision
1256         instead of flag_excess_precision_cmdline.
1258 2019-08-21  Vadim Godunko  <godunko@adacore.com>
1260         * libgnat/g-expect.adb (Expect_Internal): Attempt to read
1261         several times when 'read' returns non-positive.
1263 2019-08-21  Piotr Trojanek  <trojanek@adacore.com>
1265         * einfo.adb (Is_Discriminal): Remove extra parens.
1266         (Is_Constant_Object): Simplify by reusing Ekind_In.
1267         (Is_Prival): Remove extra parens.
1268         * checks.adb, exp_ch4.adb, sem_ch3.adb, sem_spark.adb: Minor
1269         reformattings.
1271 2019-08-21  Claire Dross  <dross@adacore.com>
1273         * libgnat/a-cofove.ads (Vector): Add an Iterable aspect to allow
1274         iteration.
1275         (Iter_First, Iter_Next): Primitives used for iteration.
1277 2019-08-21  Yannick Moy  <moy@adacore.com>
1279         * sem_ch3.adb (Analyze_Subtype_Declaration): Inherit RM_Size
1280         field for formal type parameters in generic instantiations.
1282 2019-08-21  Yannick Moy  <moy@adacore.com>
1284         * sem_spark.adb: Update references to the SPARK RM.
1286 2019-08-21  Eric Botcazou  <ebotcazou@adacore.com>
1288         * repinfo.adb (List_Array_Info): In -gnatR4 mode, set the
1289         relevant flag on the component type here instead of...
1290         (List_Object_Info): Likewise for the object type.
1291         (List_Entities): ...here.  In -gnatR4 mode, recurse into
1292         entities local to a record type.
1293         (List_Component_Layout): In -gnatR4 mode, mark the type as
1294         relevant.
1296 2019-08-21  Bob Duff  <duff@adacore.com>
1298         * Makefile.rtl (GNATRTL_NONTASKING_OBJS): Add s-bitutil.o and
1299         s-biutin.o.
1300         * exp_ch5.adb (Expand_Assign_Array_Bitfield): New function to
1301         generate a call to Copy_Bitfield. This is disabled for now.
1302         (Expand_Assign_Array_Loop_Or_Bitfield): New function to decide
1303         whether to call Expand_Assign_Array_Bitfield.
1304         (Expand_Assign_Array): Call Expand_Assign_Array_Loop_Or_Bitfield
1305         instead of Expand_Assign_Array_Loop.
1306         * libgnat/s-bitfie.ads, libgnat/s-bituti.adb,
1307         libgnat/s-bituti.ads: New units.
1308         * rtsfind.ads: Add enum literals for accessing Copy_Bitfield.
1310 2019-08-21  Piotr Trojanek  <trojanek@adacore.com>
1312         * bindo-graphs.ads (Iterate_Edges_To_Successors): Fix typo in
1313         pragma Inline.
1314         * bindo-graphs.adb (Delete_Edge): Fix layout in parameter list.
1316 2019-08-21  Gary Dismukes  <dismukes@adacore.com>
1318         * exp_ch3.adb (Build_Master): Suppress call to
1319         Build_Class_Wide_Master in the case where the
1320         access-to-limited-class-wide type was created for a component in
1321         an entry's formal parameter
1322         block (Is_Parameter_Block_Component_Type), to prevent a master
1323         from being created for such access types generated by the front
1324         end in a task spec for entry formals in a parameter block.  Add
1325         a ??? about whether this suppression should be done more
1326         generally (such as by using Comes_From_Source).
1328 2019-08-21  Eric Botcazou  <ebotcazou@adacore.com>
1330         * exp_ch6.adb (Expand_N_Extended_Return_Statement): In the case
1331         of a built-in-place function that doesn't need a BIP_Alloc_Form
1332         parameter but returns unconstrained, build the return
1333         consistently using the function's result subtype.  Remove bypass
1334         added in previous change.
1336 2019-08-21  Piotr Trojanek  <trojanek@adacore.com>
1338         * sem_prag.adb (Max_Entry_Queue_Length): Do not substitute
1339         expression of the pragma argument with its value during
1340         analysis.
1341         * sem_util.adb (Get_Max_Queue_Length): Compute value of the
1342         pragma argument when needed.
1344 2019-08-21  Yannick Moy  <moy@adacore.com>
1346         * checks.adb (Install_Null_Excluding_Check): Do not install
1347         check in GNATprove mode.
1349 2019-08-21  Yannick Moy  <moy@adacore.com>
1351         * sem_spark.adb (Process_Path): Do nothing on address of
1352         subprogram.
1354 2019-08-21  Eric Botcazou  <ebotcazou@adacore.com>
1356         * exp_util.adb (Finalize_Address): Deal consistently with
1357         subtypes of private protected types.
1359 2019-08-21  Piotr Trojanek  <trojanek@adacore.com>
1361         * exp_util.adb (Corresponding_Runtime_Package): Use high-level
1362         Is_Protected_Type.
1363         * sem_ch8.adb (Analyze_Renamed_Entry): Likewise.
1364         * sem_ch9.adb (Analyze_Requeue): Likewise.
1366 2019-08-21  Javier Miranda  <miranda@adacore.com>
1368         * sem_util.adb (Update_Named_Associations): Update
1369         First_Named_Actual when the subprogram call has a single named
1370         actual.
1372 2019-08-21  Joel Brobecker  <brobecker@adacore.com>
1374         * doc/Makefile (mk_empty_dirs): New (PHONY) rule.
1375         (%.html, %.pdf, %.txt, %.info, %.texinfo): Add dependencies on
1376         mk_empty_dirs.
1378 2019-08-21  Justin Squirek  <squirek@adacore.com>
1380         * doc/gnat_rm/implementation_defined_pragmas.rst: Modify
1381         documentation to reflect expected behavior.
1382         * gnat_rm.texi: Regenerate.
1383         * sem_prag.adb (Analyze_Pragma): Modify handling of pragma
1384         Max_Entry_Queue_Length to not reject integer values of negative
1385         one.
1386         * sem_util.adb (Get_Max_Queue_Length): Add processing for values
1387         of negative one to fit within the current scheme.
1389 2019-08-20  Arnaud Charlet  <charlet@adacore.com>
1391         * exp_unst.adb (Unnest_Subprograms, Unnest_Subprogram): Take
1392         inlining (-gnatn) into account.
1394 2019-08-20  Ed Schonberg  <schonberg@adacore.com>
1396         * exp_ch13.adb (Expand_N_Attribute_Definition_Clause, case
1397         Storage_Size): If the expression for Storage_Size is not static
1398         it may depend on characterstics of another type that may bot be
1399         frozen yet, so the elaboration of the expression for the aspect
1400         must be attached directly to the freeze actions of the type to
1401         which it applies.
1403 2019-08-20  Piotr Trojanek  <trojanek@adacore.com>
1405         * exp_util.adb (Build_DIC_Procedure_Declaration): Set the last
1406         entity of the generated Default_Initial_Condition procedure in
1407         order to construct a proper entity chain.
1409 2019-08-20  Yannick Moy  <moy@adacore.com>
1411         * exp_spark.adb (Expand_SPARK_N_Slice_Or_Indexed_Component):
1412         Renaming of function to apply to slices as well.
1413         (Expand_SPARK): Expand prefix of slices of access type.
1415 2019-08-20  Bob Duff  <duff@adacore.com>
1417         * exp_aggr.adb (Expand_Array_Aggregate): Use build-in-place in
1418         the nonlimited case in STEP 4. This improves the efficiency of
1419         things like (1 .. 1000 => <>).  We still generate some code for
1420         that, unfortunately, but it is much improved.
1421         (Aggr_Assignment_OK_For_Backend): Return false if <> components
1422         are present.
1424 2019-08-20  Bob Duff  <duff@adacore.com>
1426         * exp_ch6.adb (Needs_BIP_Alloc_Form): Call
1427         Requires_Transient_Scope rather than checking constrainedness
1428         and so forth.  We have previously improved
1429         Requires_Transient_Scope to return False in various cases,
1430         notably a limited record with an access discriminant. This
1431         change takes advantage of that to avoid using the secondary
1432         stack for functions returning such types.
1433         (Make_Build_In_Place_Call_In_Allocator): Be consistent by
1434         calling Needs_BIP_Alloc_Form rather than Is_Constrained and so
1435         forth.
1436         * sem_ch4.adb (Analyze_Allocator): The above change causes the
1437         compiler to generate code that is not legal Ada, in particular
1438         an uninitialized allocator for indefinite subtype.  This is
1439         harmless, so we suppress the error message in this case.
1441 2019-08-20  Gary Dismukes  <dismukes@adacore.com>
1443         * ali.adb, ali.ads, aspects.adb, checks.ads, checks.adb,
1444         doc/gnat_rm/implementation_defined_pragmas.rst,
1445         doc/gnat_ugn/building_executable_programs_with_gnat.rst,
1446         einfo.ads, exp_aggr.adb, exp_ch11.adb, exp_ch3.ads, exp_ch4.adb,
1447         exp_disp.adb, inline.adb, libgnat/a-locale.ads,
1448         libgnat/s-soflin.ads, par_sco.adb, repinfo.adb, sem_ch5.adb,
1449         sem_disp.adb, sem_elab.adb, sem_eval.adb, sem_spark.adb,
1450         sem_spark.ads, sinfo.ads: Minor reformattings, typo fixes and
1451         and rewordings.
1453 2019-08-20  Dmitriy Anisimkov  <anisimko@adacore.com>
1455         * adaint.c (__gnat_to_gm_time): On _WIN32, don't round time up
1456         to even second.
1458 2019-08-20  Ed Schonberg  <schonberg@adacore.com>
1460         * sem_ch3.adb (Analyze_Object_Declaration): If actual type is
1461         private and distinct from nominal type in declaration, propagate
1462         flags Is_Constr_Subt_For_U_Nominal and _UN_Aliased to full view
1463         of private type.
1465 2019-08-20  Ed Schonberg  <schonberg@adacore.com>
1467         * exp_attr.adb (Expand_Loop_Entry_Attribute): When expanding a
1468         loop entry attribute for a while_loop we construct a function
1469         that incorporates the expanded condition of the loop. The itypes
1470         that may be generated in that expansion must carry the scope of
1471         the constructed function for proper handling in gigi.
1473 2019-08-20  Ed Schonberg  <schonberg@adacore.com>
1475         * exp_disp.adb (Build_Class_Wide_Check, Replace_Formals): When a
1476         dispatching call tp a subprogram with a class-wide precondition
1477         occurrs in the same declarative part as the ancestor subprogram
1478         being called, the`expression for the precondition has not been
1479         analyzed yet. Such a call may appear, e.g. in an expression
1480         function. In that case, the replacement of formals by actuals in
1481         the call cannot use the formal entities of the subprogram being
1482         called, and the occurrence of the formals in the expression must
1483         be located by name (Chars fields) as would be done at a later
1484         freeze point, when the expression is resolved in the context of
1485         the subprogram itself.
1487 2019-08-20  Bob Duff  <duff@adacore.com>
1489         * sem_prag.adb (Persistent_BSS): If an initialization is present
1490         because of Initialize_Scalars or Normalize_Scalars, generate an
1491         implicit pragma Suppress_Initialization to remove that, because
1492         initialization is not allowed for these variables. Other
1493         initializations remain illegal.
1495 2019-08-20  Gary Dismukes  <dismukes@adacore.com>
1497         * sem_ch3.adb (OK_For_Limited_Init_In_05): In the case of type
1498         conversions, apply the recursive call to the Original_Node of
1499         the expression Exp rather than the Expression of the
1500         Original_Node, in the case where Exp has been rewritten;
1501         otherwise, when Original_Node is the same as Exp, apply the
1502         recursive call to the Expression.
1503         (Check_Initialization): Revise condition for special check on
1504         type conversions of limited function calls to test Original_Node
1505         (avoiding spurious errors on expanded unchecked conversions
1506         applied to build-in-place dispatching calls).
1508 2019-08-20  Patrick Bernardi  <bernardi@adacore.com>
1510         * exp_aggr.adb (Expand_Record_Aggregate): Always convert a
1511         record Aggregate to assignment statements if the option
1512         Aggregate_Individually_Assign is set.
1513         * opt.ads (Aggregate_Individually_Assign): New option.
1514         * par-prag.adb (Prag): Add Pragma_Aggregate_Individually_Assign.
1515         * sem_prag.adb (Analyze_Pragma): Likewise.
1516         * snames.ads-tmpl: Add Pragma_Aggregate_Individually_Assign and
1517         Name_Aggregate_Individually_Assign.
1518         * doc/gnat_rm/implementation_defined_pragmas.rst: Document
1519         pragma Aggregate_Individually_Assign.
1520         * gnat_rm.texi: Regenerate.
1522 2019-08-20  Bob Duff  <duff@adacore.com>
1524         * par-ch4.adb: Minor wording change in error messages.
1525         * sem_aggr.adb (Resolve_Delta_Aggregate): Emit an error for Ada
1526         versions prior to Ada 2020.
1528 2019-08-20  Bob Duff  <duff@adacore.com>
1530         * freeze.adb (Is_Atomic_VFA_Aggregate): Make the temp for
1531         initialization of the atomic variable be constant. This is
1532         cleaner, and might improve efficiency.
1534 2019-08-20  Eric Botcazou  <ebotcazou@adacore.com>
1536         * repinfo.adb (List_Record_Info): In -gnatR4 mode, set the
1537         relevant flag on the implicit base type of a record subtype.
1539 2019-08-20  Bob Duff  <duff@adacore.com>
1541         * sem_eval.adb (Expr_Value): Implement the case of an unchecked
1542         conversion of a static expression.
1544 2019-08-20  Bob Duff  <duff@adacore.com>
1546         * sem_ch13.adb (Is_Null_Array): New function, used to detect the
1547         null array case; used to warn about uncheckedly converting to a
1548         zero-sized array.  It is unfortunate that we can't just check
1549         the size, and warn on all cases of converting from a
1550         nonzero-sized type to a zero-sized one. That's because "0" means
1551         two different things: "size is zero" and "size is unknown".
1552         Until we fix that design flaw, we need this more targeted fix.
1554 2019-08-20  Bob Duff  <duff@adacore.com>
1556         * libgnat/a-cborma.adb, libgnat/a-cborse.adb (Clear): Repeatedly
1557         call Delete. This avoids clearing the free list, which
1558         substantially speeds up future Delete operations.
1560 2019-08-20  Bob Duff  <duff@adacore.com>
1562         * sem_ch13.adb (Component_Order_Check): New procedure to check
1563         for out-of-order clauses.
1564         * warnsw.ads, warnsw.adb: New -gnatw_r switch.
1565         * doc/gnat_ugn/building_executable_programs_with_gnat.rst:
1566         Document new switch.
1567         * gnat_ugn.texi: Regenerate.
1569 2019-08-20  Bob Duff  <duff@adacore.com>
1571         * sem_ch13.adb (Object_Size): Give an error for zero. It really
1572         rubs me the wrong way that we don't honor "for T'Object_Size use
1573         0;", but it's not important enough to fix. In any case, if we're
1574         not going to obey the clause, we should give an error.
1576 2019-08-20  Bob Duff  <duff@adacore.com>
1578         * errout.adb (Error_Msg_Internal): Set Warn_Err in case of
1579         Is_Style_Msg.
1580         * erroutc.adb (Output_Msg_Text): Do Warnings_Treated_As_Errors
1581         processing and [warning-as-error] modification for style
1582         messages.  Clean up code, simplify, remove unnecessary block
1583         statement, add renaming of table entry.
1584         * erroutc.ads (Warning_Treated_As_Error): Fix comment: no such
1585         thing as Set_Warning_As_Error.
1586         * opt.ads: Clean up comments and move related declarations near
1587         each other.
1588         * par-prag.adb: Process Warning_As_Error. This is necessary
1589         because many style warning happen during parsing.
1590         * sem_prag.adb: Use new Acquire_Warning_Match_String.
1591         * sem_util.ads, sem_util.adb (Acquire_Warning_Match_String): New
1592         function shared by par-prag.adb and sem_prag.adb. Replaces the
1593         procedure in sem_prag.adb. Avoid use of global variables.
1594         * stringt.ads, stringt.adb (To_String): New function to convert
1595         String_Id to String.
1596         * doc/gnat_rm/implementation_defined_pragmas.rst: Document the
1597         new feature.
1598         * gnat_rm.texi: Regenerate.
1600 2019-08-20  Eric Botcazou  <ebotcazou@adacore.com>
1602         * lib.ads: Add with clause for GNAT.HTable.
1603         Add pragma Inline for Is_Loaded and alphabetize the list.
1604         (Unit_Name_Table_Size): New constant.
1605         (Unit_Name_Header_Num): New subtype.
1606         (Unit_Name_Hash): New function declaration.
1607         (Unit_Names): New simple hash table.
1608         (Init_Unit_Name): New procedure declaration.
1609         * lib.adb (Set_Unit_Name): Unregister the old name in the table,
1610         if any, and then register the new name.
1611         (Init_Unit_Name): New procedure.
1612         (Is_Loaded): Reimplement using a lookup in the names table.
1613         (Remove_Unit): Unregister the name.
1614         (Unit_Name_Hash): New function.
1615         * lib-load.adb (Create_Dummy_Package_Unit): Call Init_Unit_Name.
1616         (Load_Unit): Use a lookup in the names table to find out whether
1617         the unit has already been loaded.  Call Init_Unit_Name and then
1618         Remove_Unit if the loading has failed.
1619         (Make_Child_Decl_Unit): Call Init_Unit_Name.
1620         (Make_Instance_Unit): Likewise.
1621         * lib-writ.adb (Ensure_System_Dependency): Likewise.
1623 2019-08-20  Bob Duff  <duff@adacore.com>
1625         * sem_ch13.adb (Record_Hole_Check): Initialize After_Last.
1627 2019-08-20  Piotr Trojanek  <trojanek@adacore.com>
1629         * impunit.adb (Get_Kind_Of_Unit): Revert change for adapting
1630         this routine for gnatprove.
1632 2019-08-20  Arnaud Charlet  <charlet@adacore.com>
1634         * doc/gnat_rm/implementation_defined_pragmas.rst: Document
1635         requirements for Pragma Lock_Free.
1636         * gnat_rm.texi: Regenerate.
1638 2019-08-20  Philippe Gil  <gil@adacore.com>
1640         * bindgen.adb (Gen_Main): Set gnat_argc/gnat_argv to argc/argv
1641         only when still uninitialized.
1643 2019-08-20  Bob Duff  <duff@adacore.com>
1645         * libgnat/g-comlin.ads (Exit_From_Command_Line): Fix
1646         documentation for GNAT.Command_Line.
1648 2019-08-20  Pierre-Marie de Rodat  <derodat@adacore.com>
1650         PR ada/91492
1651         * gcc-interface/lang.opt (-fdump-scos): Add missing dot at the
1652         end of the documentation.
1654 2019-08-20  Richard Sandiford  <richard.sandiford@arm.com>
1656         * gcc-interface/misc.c (default_pass_by_ref): Update call to
1657         pass_by_reference.
1659 2019-08-19  Bob Duff  <duff@adacore.com>
1661         * doc/gnat_rm/implementation_advice.rst: Fix documentation for
1662         stream oriented attributes.
1663         * gnat_rm.texi: Regenerate.
1665 2019-08-19  Gary Dismukes  <dismukes@adacore.com>
1667         * einfo.ads (E_Function, E_Procedure): Update comments to
1668         reflect that Renamed_Entity is also used for nongeneric
1669         subprograms.
1671 2019-08-19  Eric Botcazou  <ebotcazou@adacore.com>
1673         * sem_prag.adb (Is_Before_First_Decl): Deal with rewritten
1674         pragmas.
1676 2019-08-19  Bob Duff  <duff@adacore.com>
1678         * sem_warn.adb (Warn_On_Unreferenced_Entity): Suppress warning
1679         on formal parameters of dispatching operations.
1681 2019-08-19  Ed Schonberg  <schonberg@adacore.com>
1683         * sem_res.adb (Resolve_Call): A call to an expression function
1684         freezes when expander is active, unless the call appears within
1685         the body of another expression function,
1687 2019-08-19  Dmitriy Anisimkov  <anisimko@adacore.com>
1689         * libgnat/s-os_lib.ads, libgnat/s-os_lib.adb (To_Ada, To_C): New
1690         routines.
1692 2019-08-19  Bob Duff  <duff@adacore.com>
1694         * exp_attr.adb (Attribute_Valid): Correct the handling of
1695         private types where the full type is modular. System.Address is
1696         an example. Otherwise, we convert uncheckedly to a signed type,
1697         so we get an incorrect range 0 .. -1, for which all values will
1698         fail.  The 'Valid attribute is illegal for such types, but we
1699         generate such illegal attribute_references for 'Valid_Scalars,
1700         and we generate 'Valid_Scalars when the -gnateV switch is used.
1701         Rename Btyp --> PBtyp to avoid hiding the outer Btyp, which was
1702         confusing.
1703         * libgnat/a-except.adb: Set the Exception_Raised component.
1704         Otherwise, we have incorrect reads of invalid data.
1706 2019-08-19  Pierre-Marie de Rodat  <derodat@adacore.com>
1708         * libgnat/a-cgaaso.ads, libgnat/a-cgarso.ads,
1709         libgnat/a-cogeso.ads, libgnat/a-contai.ads,
1710         libgnat/a-locale.ads: Import documentation from the RM.
1712 2019-08-19  Jerome Guitton  <guitton@adacore.com>
1714         * Makefile.rtl (system.o): New target to add generation of
1715         target properties.
1716         * gcc-interface/Makefile.in (install-gnatlib): Install
1717         ada_target_properties.
1719 2019-08-19  Eric Botcazou  <ebotcazou@adacore.com>
1721         * inline.adb (Add_Inlined_Body): Do not special-case instances
1722         that are compilation units.
1723         (Add_Pending_Instantiation): Likewise.
1724         (Instantiate_Body): Skip instantiations that are compilation
1725         units and have already been performed.
1726         * sem_ch12.adb (Needs_Body_Instantiated): Do not special-case
1727         instances that are compilation units.
1728         (Load_Parent_Of_Generic): Be prepared for parent that is a
1729         compilation unit but whose instantiation node has not been
1730         replaced.
1732 2019-08-19  Eric Botcazou  <ebotcazou@adacore.com>
1734         * inline.adb (Initialize, Lock): Deal with
1735         Called_Pending_Instantiations.
1737 2019-08-19  Ed Schonberg  <schonberg@adacore.com>
1739         * sem_ch6.adb (Check_Synchronized_Overriding): Complete
1740         predicate that applies legality check in 9.4 (11.9/2): if an
1741         inherited subprogram is implemented by a protected procedure or
1742         entry, its first paarameter must be out, in_out or
1743         access_to_varible.
1745 2019-08-19  Javier Miranda  <miranda@adacore.com>
1747         PR ada/65696
1748         * exp_atag.ads, exp_atag.adb (Build_Inherit_Predefined_Prims):
1749         Adding formal to specify how many predefined primitives are
1750         inherited from the parent type.
1751         * exp_disp.adb (Number_Of_Predefined_Prims): New subprogram.
1752         (Make_Secondary_DT): Compute the number of predefined primitives
1753         of all tagged types (including tagged types not defined at
1754         library level).  Previously we unconditionally relied on the
1755         Max_Predef_Prims constant value when building the dispatch
1756         tables of tagged types not defined at library level (thus
1757         consuming more memory for their dispatch tables than required).
1758         (Make_DT): Compute the number of predefined primitives that must
1759         be inherited from their parent type when building the dispatch
1760         tables of tagged types not defined at library level. Previously
1761         we unconditionally relied on the Max_Predef_Prims constant value
1762         when building the dispatch tables of tagged types not defined at
1763         library level (thus copying more data than required from the
1764         parent type).
1766 2019-08-19  Bob Duff  <duff@adacore.com>
1768         * sem_ch13.adb (Record_Hole_Check): Procedure to check for holes
1769         that incudes processing type extensions. A type extension is
1770         processed by first calling Record_Hole_Check recursively on the
1771         parent type to compute the bit number after the last component
1772         of the parent.
1774 2019-08-19  Gary Dismukes  <dismukes@adacore.com>
1776         * checks.adb (Length_Mismatch_Info_Message): New function in
1777         Selected_Length_Checks to return a message indicating the
1778         element counts for the mismatched lengths for a failed
1779         compile-time length check.
1780         (Plural_Or_Singular_Ending): Support function in
1781         Length_Mismatch_Info_Message to return either "" or "s", for
1782         concatenating to the end of words.
1783         (Selected_Length_Checks): Pass the result of
1784         Length_Mismatch_Info_Message as an extra warning message to
1785         Compile_Time_Constraint_Error to indicate the mismatched lengths
1786         for a failed compile-time length check.
1787         * sem_util.ads (Compile_Time_Constraint_Error): Add an optional
1788         message formal (Extra_Msg), defaulted to the empty string.
1789         * sem_util.adb (Compile_Time_Constraint_Error): Output an extra
1790         message following the main warning message (when Extra_Msg is
1791         not the empty string).
1793 2019-08-19  Patrick Bernardi  <bernardi@adacore.com>
1795         * socket.c: Removed the redefinition of getaddrinfo, getnameinfo
1796         and freeaddrinfo to internal VxWorks kernel calls because they
1797         are, well, internal kernel calls and cannot be called from RTPs.
1798         VxWorks provides the necessary components to call these routines
1799         directly.
1801 2019-08-19  Eric Botcazou  <ebotcazou@adacore.com>
1803         * exp_dist.adb (Is_Generic_Actual_Subtype): New predicate.
1804         (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
1805         Use it instead of Is_Generic_Actual_Type flag to detect subtypes
1806         representing generic actual types.
1808 2019-08-19  Ed Schonberg  <schonberg@adacore.com>
1810         * sem_warn.adb (Check_References, Generic_Body_Formal): When a
1811         formal parameter of a generic subprogram is not referenced in
1812         the body, place the corresponding warning on the corresponding
1813         entity in the specification of the generic body, as is done for
1814         non-generic subprograms.
1816 2019-08-19  Bob Duff  <duff@adacore.com>
1818         * errout.ads (Size_Too_Small_Message): New constant.
1819         * errout.adb, freeze.adb, sem_ch13.adb: Use it.
1821 2019-08-19  Eric Botcazou  <ebotcazou@adacore.com>
1823         * exp_dist.adb (Build_Package_Stubs): Do not specifically visit
1824         the declarations of an N_Subprogram_Instantiation node.
1826 2019-08-19  Bob Duff  <duff@adacore.com>
1828         * doc/gnat_ugn/gnat_utility_programs.rst: Document missing
1829         metrics switches.
1831 2019-08-19  Piotr Trojanek  <trojanek@adacore.com>
1833         * sem_ch12.adb (Get_Unit_Instantiation_Node): Simplify Nkind_In
1834         membership test.
1835         * sem.adb (Depends_On_Main): Whitespace cleanup; only assign a
1836         local variable if needed.
1838 2019-08-19  Claire Dross  <dross@adacore.com>
1840         * sem_spark.ads, sem_spark.adb (Is_Pledge_Function): New
1841         parameter of the generic. Function used to decide whether a
1842         function is a pledge function.
1843         (Check_Not_Borrowed): Disable check inside the second parameter
1844         of a pledge function for the path borrowed by the first
1845         parameter. Also disable checks for entities inside a Global
1846         contract.
1848 2019-08-19  Joffrey Huguet  <huguet@adacore.com>
1850         * libgnat/a-cfdlli.ads, libgnat/a-cfhama.ads,
1851         libgnat/a-cfinve.ads, libgnat/a-cforma.ads,
1852         libgnat/a-cofove.ads, libgnat/a-cofuma.ads,
1853         libgnat/a-cofuve.ads: Add formal function parameter "=" (L, R :
1854         Element_Type) to the generic packages.
1856 2019-08-19  Eric Botcazou  <ebotcazou@adacore.com>
1858         * opt.ads: Clean up left-overs of earlier implementation in
1859         comment:
1861 2019-08-19  Ed Schonberg  <schonberg@adacore.com>
1863         * sem_ch3.adb (Derived_Enumeration_Type): Do no freeze anonymous
1864         base type if the bounds in the derived type declaration are
1865         literals of the type.
1867 2019-08-19  Yannick Moy  <moy@adacore.com>
1869         * sem_res.adb (Resolve_Call): Check non-aliasing rules before
1870         GNATprove inlining.
1872 2019-08-19  Eric Botcazou  <ebotcazou@adacore.com>
1874         * inline.adb (Add_Inlined_Body): Do not add pending
1875         instantiations.
1876         * sem_ch12.adb (Needs_Body_Instantiated): New predicate.
1877         (Analyze_Package_Instantiation): Use it to decide whether to add
1878         a pending instantiation for the body of the package.
1880 2019-08-19  Olivier Hainque  <hainque@adacore.com>
1882         * gcc-interface/trans.c (Acc_Loop_to_gnu): Return the openacc
1883         BIND_EXPR node we have constructed on purpose.  Remove unused
1884         variable.
1886 2019-08-19  Pierre-Marie de Rodat  <derodat@adacore.com>
1888         * gcc-interface/lang.opt (fdump-scos): Define.
1889         * gcc-interface/misc.c (gnat_handle_option): Handle
1890         OPT_fdump_scos.
1892 2019-08-14  Joffrey Huguet  <huguet@adacore.com>
1894         * libgnat/a-cofuba.ads: Add a Length attribute to type
1895         Container. Add a type Array_Base which replaces the previous
1896         Elements attribute of Container.
1897         (Content_Init): New subprogram. It is used to initialize the
1898         Base attribute of Container.
1899         * libgnat/a-cofuba.adb (Resize): New subprogram. It is used to
1900         resize the underlying array of a container if necessary.
1901         (=, <=, Find, Get, Intersection, Length, Num_Overlaps, Set,
1902         Union): Update to match changes in type declarations.
1903         (Add): Modify body to damp the time and space cost in a specific
1904         case.
1905         (Content_Init): New subprogram. It is used to initialize the
1906         Base attribute of Container.
1907         (Remove): Modify body to damp the time and space cost in a
1908         specific case.
1910 2019-08-14  Bob Duff  <duff@adacore.com>
1912         * sem_ch13.adb (Get_Alignment_Value): Return 1 for Alignment 0,
1913         and do not give an error.
1914         * doc/gnat_rm/representation_clauses_and_pragmas.rst: Update the
1915         corresponding documentation.
1916         * gnat_rm.texi: Regenerate.
1918 2019-08-14  Eric Botcazou  <ebotcazou@adacore.com>
1920         * inline.adb (Add_Pending_Instantiation): Fix off-by-one error
1921         in the comparison against the maximum number of instantiations.
1923 2019-08-14  Eric Botcazou  <ebotcazou@adacore.com>
1925         * inline.adb (Add_Pending_Instantiation): Use greater-or-equal
1926         in the comparison against the maximum number of instantiations.
1928 2019-08-14  Ed Schonberg  <schonberg@adacore.com>
1930         * sem_aux.adb (Next_Rep_Item): If a node in the rep chain
1931         involves a Ghost aspect it may have been replaced by a null
1932         statement; use the original node to find next Rep_Item.
1933         * repinfo.adb (List_Entities): Do not list an Ignored
1934         Ghost_Entity, for which information may have been deleted.
1936 2019-08-14  Bob Duff  <duff@adacore.com>
1938         * sem_prag.ads, sem_prag.adb
1939         (Process_Compile_Time_Warning_Or_Error): In parameterless
1940         version, improve detection of whether we are in a generic unit
1941         to cover the case of an instance within a generic unit.
1942         (Process_Compile_Time_Warning_Or_Error): Rename the
1943         two-parameter version to be
1944         Validate_Compile_Time_Warning_Or_Error, and do not export it.
1945         Issue a warning if the condition is not known at compile time.
1946         The key point is that the warning must be given only for pragmas
1947         deferred to the back end, because the back end discovers
1948         additional values that are known at compile time.  Previous
1949         changes in this ticket have enabled this by deferring to the
1950         back end without checking for special cases such as 'Size.
1951         (Validate_Compile_Time_Warning_Or_Error): Rename to be
1952         Defer_Compile_Time_Warning_Error_To_BE.
1953         * warnsw.ads, warnsw.adb (Warn_On_Unknown_Compile_Time_Warning):
1954         Add new switches -gnatw_c and -gnatw_C to control the above
1955         warning.
1956         * doc/gnat_ugn/building_executable_programs_with_gnat.rst:
1957         Document new switches.
1958         * gnat_ugn.texi: Regenerate.
1960 2019-08-14  Eric Botcazou  <ebotcazou@adacore.com>
1962         * sem_ch12.adb (Might_Inline_Subp): Rework comment and restrict
1963         the shortcut based on Is_Inlined to the back-end inlining case.
1965 2019-08-14  Bob Duff  <duff@adacore.com>
1967         * inline.adb (Check_And_Split_Unconstrained_Function): Ignore
1968         protected functions to get rid of spurious error. The
1969         transformation done by this procedure triggers legality errors
1970         in the generated code in this case.
1972 2019-08-14  Bob Duff  <duff@adacore.com>
1974         * sem_prag.adb (Process_Compile_Time_Warning_Or_Error): Defer
1975         processing to the back end in all cases where the pragma's
1976         condition is not known at compile time during the front end
1977         (except in generics), as opposed to detecting 'Size attributes
1978         and the like. This ensures that we take advantage of whatever
1979         can be compile-time known after running the back end, as opposed
1980         to having the front end guess what the back end can do.  Remove
1981         a little duplicated code at the call site.
1982         * gnat1drv.adb (Post_Compilation_Validation_Checks): Unlock the
1983         Elists while in Validate_Compile_Time_Warning_Errors, because it
1984         does analysis and name resolution, which sometimes involves
1985         adding Elists.
1987 2019-08-14  Eric Botcazou  <ebotcazou@adacore.com>
1989         * einfo.ads (Is_Called): Document new usage on E_Package
1990         entities.
1991         * einfo.adb (Is_Called): Accept E_Package entities.
1992         (Set_Is_Called): Likewise.
1993         * exp_ch6.adb (Expand_Call_Helper): Move code dealing with
1994         instances for back-end inlining to Add_Inlined_Body.
1995         * inline.ads: Remove with clauses for Alloc and Table.
1996         (Pending_Instantiations): Move to...
1997         * inline.adb: Add with clauses for Alloc, Uintp, Table and
1998         GNAT.HTable.
1999         (Backend_Instances): New variable.
2000         (Pending_Instantiations): ...here.
2001         (Called_Pending_Instantiations): New table.
2002         (Node_Table_Size): New constant.
2003         (Node_Header_Num): New subtype.
2004         (Node_Hash): New function.
2005         (To_Pending_Instantiations): New hash table.
2006         (Add_Inlined_Body): Bail out early for subprograms in the main
2007         unit or subunit.  Likewise if the Is_Called flag is set.  If the
2008         subprogram is an instance, invoke Add_Inlined_Instance.  Call
2009         Set_Is_Called earlier.  If the subrogram is within an instance,
2010         invoke Add_Inlined_Instance.  Also deal with the case where the
2011         call itself is within an instance.
2012         (Add_Inlined_Instance): New procedure.
2013         (Add_Inlined_Subprogram): Remove conditions always fulfilled.
2014         (Add_Pending_Instantiation): Move the defence against ludicruous
2015         number of instantiations to here. When back-end inlining is
2016         enabled, associate an instantiation with its index in table and
2017         mark a few selected kinds of instantiations as always needed.
2018         (Initialize): Set Backend_Instances to No_Elist.
2019         (Instantiate_Body): New procedure doing the work extracted
2020         from...
2021         (Instantiate_Bodies): ...here.  When back-end inlining is
2022         enabled, loop over Called_Pending_Instantiations instead of
2023         Pending_Instantiations.
2024         (Is_Nested): Minor tweak.
2025         (List_Inlining_Info): Also list the contents of
2026         Backend_Instances.
2027         * sem_ch12.adb (Might_Inline_Subp): Return early if Is_Inlined
2028         is set and otherwise set it before returning true.
2029         (Analyze_Package_Instantiation): Remove the defence against
2030         ludicruous number of instantiations.  Invoke
2031         Remove_Dead_Instance instead of doing the removal manually if
2032         there is a guaranteed ABE.
2034 2019-08-14  Gary Dismukes  <dismukes@adacore.com>
2036         * exp_ch3.adb (Predef_Spec_Or_Body): For an equality operation
2037         of an interface type, create an expression function (that
2038         returns False) rather than declaring an abstract function.
2039         * freeze.adb (Check_Inherited_Conditions): Set Needs_Wrapper to
2040         False unconditionally at the start of the loop creating wrappers
2041         for inherited operations.
2043 2019-08-14  Bob Duff  <duff@adacore.com>
2045         * table.adb: Assert that the table is not locked when increasing
2046         Last, even if it doesn't cause reallocation.  In other words,
2047         assert that on operations that MIGHT cause reallocation.
2048         * table.ads: Fix comment accordingly.
2050 2019-08-14  Arnaud Charlet  <charlet@adacore.com>
2052         * doc/gnat_ugn/gnat_and_program_execution.rst: Remove
2053         documentation of gnatelim.
2055 2019-08-14  Bob Duff  <duff@adacore.com>
2057         * sem_prag.adb (Validate_Compile_Time_Warning_Error): Attach the
2058         warning to the Sloc of the first pragma argument, rather than to
2059         the pragma itself. This is to make pragmas processed after the
2060         back end use the same Sloc as pragmas processed earlier, in the
2061         front end. There's no reason for this discrepancy, and it
2062         hinders further work on this ticket.
2064 2019-08-14  Bob Duff  <duff@adacore.com>
2066         * sem.ads (Inside_A_Generic): Remove the ??? comment.
2068 2019-08-14  Eric Botcazou  <ebotcazou@adacore.com>
2070         * inline.ads (Pending_Descriptor): Delete.
2071         * inline.adb (Initialize): Do not initialize it.
2072         * sem_ch12.adb (Delay_Descriptors): Delete.
2073         (Analyze_Package_Instantiation): Call
2074         Set_Delay_Subprogram_Descriptors instead of Delay_Descriptors
2075         throughout.
2077 2019-08-14  Bob Duff  <duff@adacore.com>
2079         * exp_aggr.adb (Init_Hidden_Discriminants): Avoid processing the
2080         wrong discriminant, which could be of the wrong type.
2082 2019-08-14  Eric Botcazou  <ebotcazou@adacore.com>
2084         * sem_ch12.adb (Analyze_Instance_And_Renamings): Do not reset
2085         the Is_Generic_Instance flag previously set on the package
2086         generated for the instantiation of a generic subprogram.
2088 2019-08-14  Ed Schonberg  <schonberg@adacore.com>
2090         * exp_ch4.adb (Expand_N_Quantified_Expression): Freeze
2091         explicitly the type of the loop parameter.
2093 2019-08-14  Javier Miranda  <miranda@adacore.com>
2095         * sem_util.adb (New_Copy_Tree.Copy_Node_With_Replacement):
2096         Update the Chars attribute of identifiers.
2098 2019-08-14  Yannick Moy  <moy@adacore.com>
2100         * sem_spark.adb, sem_spark.ads (Is_Legal): New function exposed
2101         for use in GNATprove, to test legality rules not related to
2102         permissions.
2103         (Check_Declaration_Legality): Extract the part of
2104         Check_Declaration that checks rules not related to permissions.
2105         (Check_Declaration): Call the new Check_Declaration_Legality.
2106         (Check_Type_Legality): Rename of Check_Type. Introduce
2107         parameters to force or not checking, and update a flag detecting
2108         illegalities.
2109         (Check_Node): Ignore attribute references in statement position.
2111 2019-08-14  Yannick Moy  <moy@adacore.com>
2113         * sem_spark.adb (Check_Old_Loop_Entry): New procedure to check
2114         correct use of Old  and Loop_Entry.
2115         (Check_Node): Check subprogram contracts.
2116         (Check_Pragma): Check Loop_Variant.
2117         (Check_Safe_Pointers): Apply checking to library-level
2118         subprogram  declarations as well, in order to check their
2119         contract.
2121 2019-08-14  Yannick Moy  <moy@adacore.com>
2123         * sem_spark.adb (Is_Subpath_Expression): Take into account
2124         conversion and qualification.
2126 2019-08-14  Eric Botcazou  <ebotcazou@adacore.com>
2128         * sem_ch7.adb (Install_Private_Declarations)
2129         <Swap_Private_Dependents>: Do not rely solely on the
2130         Is_Child_Unit flag on the unit to recurse.
2131         (Uninstall_Declarations) <Swap_Private_Dependents>: New
2132         function.  Use it to recurse on the private dependent entities
2133         for child units.
2135 2019-08-14  Javier Miranda  <miranda@adacore.com>
2137         * exp_aggr.adb (Is_CCG_Supported_Aggregate): Return False for
2138         arrays with bounds not known at compile time.
2140 2019-08-14  Ed Schonberg  <schonberg@adacore.com>
2142         * sem_util.adb (New_Copy_Tree, Visit_Entity): A quantified
2143         expression includes the implicit declaration of the loop
2144         parameter. When a quantified expression is copied during
2145         expansion, for example when building the precondition code from
2146         the generated pragma, a new loop parameter must be created for
2147         the new tree, to prevent duplicate declarations for the same
2148         symbol.
2150 2019-08-14  Yannick Moy  <moy@adacore.com>
2152         * sem_disp.adb (Check_Dispatching_Operation): Update assertion
2153         for the separate declarations created in GNATprove mode.
2154         * sem_disp.ads (Is_Overriding_Subprogram): Update comment.
2155         * sem_elab.adb (SPARK_Processor): Fix test for checking of
2156         overriding primitives.
2158 2019-08-14  Eric Botcazou  <ebotcazou@adacore.com>
2160         * inline.adb (Add_Inlined_Body): Tweak comments.
2161         (List_Inlining_Info): Also list information about non-main
2162         units.
2164 2019-08-14  Gary Dismukes  <dismukes@adacore.com>
2166         * sem_ch4.adb (Analyze_Selected_Component): In the case where
2167         the prefix is of a concurrent type, and the selected entity
2168         matching the selector is the first private declaration of the
2169         type (such as the first local variable in a task's body), set
2170         Is_Private_Op.
2172 2019-08-14  Piotr Trojanek  <trojanek@adacore.com>
2174         * einfo.adb (Is_Generic_Actual_Subprogram): Replace repeated
2175         calls to Ekind with Ekind_In.
2177 2019-08-13  Richard Sandiford  <richard.sandiford@arm.com>
2179         PR middle-end/91421
2180         * gcc-interface/trans.c (gigi): Call set_decl_buillt_in_function.
2181         (Call_to_gnu): Use DECL_FE_FUNCTION_CODE instead of DECL_FUNCTION_CODE.
2183 2019-08-13  Eric Botcazou  <ebotcazou@adacore.com>
2185         * ali.ads (Linker_Option_Record): Remove Original_Pos component.
2186         * ali.adb (Scan_ALI): Do not set it.
2188 2019-08-13  Eric Botcazou  <ebotcazou@adacore.com>
2190         * sem_ch3.adb (Build_Derived_Concurrent_Type): Add a couple of
2191         local variables and use them.  When the derived type fully
2192         constrains the parent type, rewrite it as a subtype of an
2193         implicit (unconstrained) derived type instead of the other way
2194         around.
2195         (Copy_And_Build): Deal with concurrent types and use predicates.
2196         (Build_Derived_Private_Type): Build the full derivation if
2197         needed for concurrent types too.
2198         (Build_Derived_Record_Type): Add marker comment.
2199         (Complete_Private_Subtype): Use predicates.
2201 2019-08-13  Ed Schonberg  <schonberg@adacore.com>
2203         * sem_ch3.adb (Check_Generic_Ancestor): New subprogram,
2204         aubsidiary to Build_Derived_Record_Type. to enforce the rule
2205         that a type extension declared in a generic body cznnot have an
2206         ancestor that is a generic formal (RM 3.9.1 (4/2)). The rule
2207         applies to all ancestors of the type, including interface
2208         progenitors.
2210 2019-08-13  Eric Botcazou  <ebotcazou@adacore.com>
2212         * sem_ch3.adb (Build_Underlying_Full_View): Delete.
2213         (Complete_Private_Subtype): Do not set the full view on the
2214         private subtype here.  If the full base is itself derived from
2215         private, do not re-derive the parent type but instead constrain
2216         an existing underlying full view.
2217         (Prepare_Private_Subtype_Completion): Do not get to the
2218         underlying full view, if any.  Set the full view on the private
2219         subtype here.
2220         (Process_Full_View): Likewise.
2221         * sem_ch12.adb (Check_Generic_Actuals): Also set
2222         Is_Generic_Actual_Type on the full view if the type of the
2223         actual is private.
2224         (Restore_Private_Views): Also reset Is_Generic_Actual_Type on
2225         the full view if the type of the actual is private.
2226         * sem_eval.adb (Subtypes_Statically_Match): Remove bypass for
2227         generic actual types.
2229 2019-08-13  Javier Miranda  <miranda@adacore.com>
2231         * sem_res.adb (Resolve_Selected_Component): When the type of the
2232         component is an access to a class-wide type and the type of the
2233         context is an access to a tagged type the relevant type is that
2234         of the component (since in such case we may need to generate
2235         implicit type conversions or dispatching calls).
2237 2019-08-13  Ed Schonberg  <schonberg@adacore.com>
2239         * exp_aggr.adb (Aggr_Assignment_OK_For_Backend):  Preanalyze
2240         expression, rather do a full analysis, to prevent unwanted
2241         removal of side effects which mask the intent of the expression.
2243 2019-08-13  Eric Botcazou  <ebotcazou@adacore.com>
2245         * impunit.adb (Non_Imp_File_Names_95): Add
2246         GNAT.Branch_Prediction.
2248 2019-08-13  Eric Botcazou  <ebotcazou@adacore.com>
2250         * exp_ch6.adb: Remove with and use clauses for Sem_Ch12.
2251         (Expand_Call_Helper): Swap the back-end inlining case and the
2252         special front-end expansion case.  In back-end inlining mode, do
2253         not invoke Add_Inlined_Body unless the call may be inlined.
2254         * inline.ads (Add_Pending_Instantiation): New function moved
2255         from...
2256         * inline.adb (Add_Inlined_Body): Simplify comment.  Turn test on
2257         the enclosing unit into assertion.
2258         (Add_Pending_Instantiation): New function moved from...
2259         * sem_ch12.ads (Add_Pending_Instantiation): ...here.
2260         * sem_ch12.adb (Add_Pending_Instantiation): ...here.
2262 2019-08-13  Eric Botcazou  <ebotcazou@adacore.com>
2264         * sem.adb (Do_Analyze): Recompute Style_Check_Max_Line_Length
2265         after restoring Style_Max_Line_Length.
2267 2019-08-13  Arnaud Charlet  <charlet@adacore.com>
2269         * sem_ch13.adb (Check_Iterator_Functions): Protect against
2270         cascaded errors.
2272 2019-08-13  Ed Schonberg  <schonberg@adacore.com>
2274         * sem_ch8.adb (Analyze_Subprogram_Renaming): Do no suppress mode
2275         conformance checks on child unit instance that is a compilation
2276         unit.
2278 2019-08-13  Gary Dismukes  <dismukes@adacore.com>
2280         * exp_dbug.adb (Fully_Qualify_Name): Add full name qualification
2281         for the E_Exception case.
2283 2019-08-13  Gary Dismukes  <dismukes@adacore.com>
2285         * exp_aggr.adb (Aggr_Size_OK): Compute the aggregate size using
2286         universal arithmetic, to avoid situations where the size
2287         computation overflows.
2289 2019-08-13  Justin Squirek  <squirek@adacore.com>
2291         * repinfo.adb (List_Scalar_Storage_Order): Modify conditionals
2292         for displaying ordering to always be triggered when -gnatR4 is
2293         in effect.
2295 2019-08-13  Justin Squirek  <squirek@adacore.com>
2297         * aspects.adb, aspects.ads: Register new aspect.
2298         * par-prag.adb (Prag): Register new pragma
2299         * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing
2300         for new aspect similar to Aspect_Max_Entry_Queue_Length.
2301         * sem_prag.adb, sem_prag.ads (Analyze_Pragma): Register new
2302         pragma and set it to use the same processing as
2303         Pragma_Max_Queue_Length.
2304         * snames.ads-tmpl: Move definition of
2305         Name_Max_Entry_Queue_Length so that it can be processed as a
2306         pragma in addition to a restriction and add an entry for the
2307         pragma itself.
2309 2019-08-13  Yannick Moy  <moy@adacore.com>
2311         * sem_ch4.adb (Analyze_Allocator): Do not insert subtype
2312         declaration for allocator inside a spec expression.
2314 2019-08-13  Yannick Moy  <moy@adacore.com>
2316         * sem_res.adb (Resolve_Call): Do not inline calls inside record
2317         types.
2319 2019-08-13  Eric Botcazou  <ebotcazou@adacore.com>
2321         * sem_ch4.adb (Analyze_One_Call): Remove bypass for type
2322         mismatch in nested instantiations.
2323         * sem_ch8.adb (Find_Nearer_Entity): New function.
2324         (Find_Renamed_Entity): Use it to disambiguate the candidates for
2325         the renaming generated for an instantiation when it is
2326         ambiguous.
2328 2019-08-13  Eric Botcazou  <ebotcazou@adacore.com>
2330         * gnat1drv.adb (Adjust_Global_Switches): Do not set
2331         Back_End_Inlining in ASIS mode either.
2333 2019-08-13  Olivier Hainque  <hainque@adacore.com>
2335         * libgnat/s-win32.ads: Define size_t and fix the MapViewOfFile
2336         binding to use it instead of DWORD for the dwNumberOfBytesToMap
2337         argument.
2338         * libgnat/g-sercom__mingw.adb (Read): State which definition of
2339         size_t to fetch in call to Last_Index.
2341 2019-08-13  Arnaud Charlet  <charlet@adacore.com>
2343         * gcc-interface/Make-lang.in: Remove unused TRACE variable. Pass
2344         LN_S to relevant gnatlib targets.
2345         * gcc-interface/Makefile.in: Systematically pass LN_S to
2346         relevant gnatlib targets.
2348 2019-08-13  Yannick Moy  <moy@adacore.com>
2350         * sem_dim.adb (Analyze_Dimension,
2351         Analyze_Dimension_Array_Aggregate, Analyze_Dimension_Call,
2352         Analyze_Dimension_Extension_Or_Record_Aggregate): Return
2353         immediately when inside an inlined body.
2354         * sem_res.adb (Resolve_Call): Remove special checking now done
2355         inside Analyze_Dimension_Call.
2357 2019-08-13  Justin Squirek  <squirek@adacore.com>
2359         * exp_ch4.adb (Expand_N_Allocator): Add condition to detect
2360         library-level object declarations
2362 2019-08-13  Eric Botcazou  <ebotcazou@adacore.com>
2364         * doc/gnat_ugn/building_executable_programs_with_gnat.rst
2365         (-gnateT): Document Double_Float_Alignment parameter and fix
2366         description of Double_Scalar_Alignment parameter.
2367         * gnat_ugn.texi: Regenerate.
2369 2019-08-13  Eric Botcazou  <ebotcazou@adacore.com>
2371         * exp_ch6.adb (Expand_Call_Helper): If back-end inlining is
2372         enabled, also instantiate the body of a generic unit containing
2373         a subprogram subject to aspect/pragma Inline_Always at
2374         optimization level zero.
2375         * sem_ch12.adb (Might_Inline_Subp): Minor tweak.
2376         (Analyze_Package_Instantiation): Do not instantiate the package
2377         body because of inlining considerations if the instantiation is
2378         done in a generic unit.  Move around similar condition involving
2379         the main unit.  Add test on Back_End_Inlining to processing for
2380         front-end inlining.
2382 2019-08-13  Javier Miranda  <miranda@adacore.com>
2384         * exp_disp.adb (Make_Secondary_DT): Handle record type
2385         derivations that have interface components located at fixed
2386         positions and interface components located at variable offset.
2387         The offset of components located at fixed positions is computed
2388         using the dummy object (similar to the case where all the
2389         interface components are located at fixed positions).
2390         (Make_DT): Build the dummy object for all tagged types that
2391         implement interface types (that is, build it also for types with
2392         variable size components), and use the dummy object to compute
2393         the offset of all tag components located at fixed positions when
2394         initializing the Interface_Table object.
2396 2019-08-13  Justin Squirek  <squirek@adacore.com>
2398         * gnatcmd.adb (GNATCmd): Add constant for new compiler switch
2399         --help-ada, and include usage subprogram. Add line to usage help
2400         explaining the new flag.
2401         (GNATCmd_Usage): Rename from locally declared Usage so as not to
2402         confuse with the newly imported version. Add new argument case
2403         for --help-ada and add bug report email to implicit display of
2404         help without the --help flag so as to unify output between the
2405         two cases.
2407 2019-08-13  Dmitriy Anisimkov  <anisimko@adacore.com>
2409         * libgnat/g-comlin.adb (Getopt): Quote unrecognized switch in
2410         Invalid_Switch exception message.
2412 2019-08-13  Yannick Moy  <moy@adacore.com>
2414         * sem_util.adb (Traverse_More_Func): Take into account
2415         Loop_Actions inside N_Iterated_Component_Association nodes.
2416         * sinfo.ads: Document correctly Loop_Actions as a field of nodes
2417         of kind N_Iterated_Component_Association.
2419 2019-08-13  Claire Dross  <dross@adacore.com>
2421         * libgnat/a-cfinve.adb, libgnat/a-cofove.adb (Find_Index,
2422         Reverse_Find_Index): Use bigger type to avoid range check
2423         failure at the last loop iteration.
2425 2019-08-12  Dmitriy Anisimkov  <anisimko@adacore.com>
2427         * libgnat/g-socket.adb (Is_IPv6_Address): Check that no less
2428         then 2 colons in IPv6 numeric address.
2430 2019-08-12  Dmitriy Anisimkov  <anisimko@adacore.com>
2432         * libgnat/g-comlin.ads, libgnat/g-comlin.adb (Getopt): Add
2433         parameter Quiet. Need to do not output error messages to
2434         console. Invalid_Switch exception generation surrounded by an
2435         error message.
2437 2019-08-12  Ed Schonberg  <schonberg@adacore.com>
2439         * exp_ch6.adb (Expand_Actuals. Add_Call_By_Copy_Code): Add code
2440         to generate proper checks when an actual for an in-out or out
2441         parameter has a non-null access type.  No constraints are
2442         applied to an inbound access parameter, but on exit a not-null
2443         check must be performed if the type of the actual requires it.
2445 2019-08-12  Ed Schonberg  <schonberg@adacore.com>
2447         * sem_util.adb (Is_Expaned_Priority_Attribute): Check whether
2448         call comes from a rewritten attribute before comparing name with
2449         Get_Ceiling run-time subprogram.
2451 2019-08-12  Eric Botcazou  <ebotcazou@adacore.com>
2453         * exp_util.ads (Component_May_Be_Bit_Aligned): Small comment
2454         tweaks.
2455         (Possible_Bit_Aligned_Component): Likewise.
2456         (Type_May_Have_Bit_Aligned_Components): Likewise.
2457         * exp_util.adb (Component_May_Be_Bit_Aligned): Likewise.
2458         (Possible_Bit_Aligned_Component): Likewise.
2459         (Type_May_Have_Bit_Aligned_Components): Likewise.
2461 2019-08-12  Eric Botcazou  <ebotcazou@adacore.com>
2463         * exp_ch4.adb (Expand_N_Op_Eq): Expand the array equality if
2464         either operand is a possibly unaligned slice.
2465         * exp_ch6.adb (Expand_Simple_Function_Return): Do not generate a
2466         copy for a possibly unaligned object if it is represented as a
2467         scalar.
2468         * exp_util.adb (Is_Possibly_Unaligned_Slice): Do not always
2469         return false if the target doesn't have strict alignment.
2471 2019-08-12  Bob Duff  <duff@adacore.com>
2473         * sem_ch12.adb (Instantiate_Package_Body): Remove suppression of
2474         checks in instances of internal units.
2475         * sem_ch6.adb (Analyze_Function_Return): Do not generate a
2476         constraint check on an extended_return_statement if the subtype
2477         of the return object in the statement is identical to the return
2478         subtype of the function.
2480 2019-08-12  Bob Duff  <duff@adacore.com>
2482         * libgnat/a-cbmutr.adb (Is_Reachable): Declare Idx to be of the
2483         base subtype.  Clearly it makes no sense to loop "while Idx >=
2484         0", if Idx is of a nonnegative subtype.
2486 2019-08-12  Bob Duff  <duff@adacore.com>
2488         * libgnat/a-tifiio.adb (Put_Scaled): Prevent AA from being
2489         negative, since Field is range 0 .. something.
2491 2019-08-12  Bob Duff  <duff@adacore.com>
2493         * doc/gnat_ugn/gnat_utility_programs.rst (gnatmetric, gnatpp,
2494         gnatstub): Remove documentation for Ada language version
2495         switches, and note that they are no longer needed.
2497 2019-08-12  Gary Dismukes  <dismukes@adacore.com>
2499         * sem_ch5.adb (Prepare_Param_Spec_Loop): Set the parents of the
2500         copied low and high bounds in the case where the loop range is
2501         given by a discrete_subtype_indication, to prevent hanging (or
2502         Assert_Failure) in Insert_Actions.
2504 2019-08-12  Ed Schonberg  <schonberg@adacore.com>
2506         * sem_ch6.adb (heck_Untagged_Equality): Verify that user-defined
2507         equality has the same profile as the predefined equality before
2508         applying legality rule in RM 4.5.2 (9.8).
2510 2019-08-12  Bob Duff  <duff@adacore.com>
2512         * libgnat/a-except.ads: Update obsolete comment, still making
2513         clear that this is a variant.  Add explicit default for Id
2514         component of Exception_Occurrence, because that value is used.
2515         Define Null_Occurrence less redundantly.
2516         * libgnat/a-einuoc.adb: Minor simplification of code.
2518 2019-08-12  Justin Squirek  <squirek@adacore.com>
2520         * libgnat/a-dhfina.adb, libgnat/a-dhfina.ads (Is_Simple_Name,
2521         Is_Root_Directory, Is_Parent_Directory,
2522         Is_Current_Directory_Name, Is_Relative_Name, Initial_Directory,
2523         Relative_Name, Compose): Add implementation and documentation.
2524         * libgnat/a-direct.adb (Containing_Directory): Modify routine to
2525         use routines from Ada.Directories.Hierarchical_File_Names and
2526         remove incorrect special case for parent directories.
2527         (Fetch_Next_Entry): Add check for current directory and parent
2528         directory and ignore them under certain circumstances.
2529         (Simple_Nmae): Add check for null result from
2530         Simple_Name_Internal and raise Name_Error.
2531         (Simple_Name_Internal): Add explicit check for root directories,
2532         sanitize trailing directory separators, and modify behavior so
2533         that current and parent directories are considered valid
2534         results.
2535         * Makefile.rtl: Add entry to GNATRTL_NONTASKING_OBJS.
2537 2019-08-12  Eric Botcazou  <ebotcazou@adacore.com>
2539         * freeze.adb (Freeze_Entity): Give the same error for an
2540         Object_Size clause on a variable-sized type as for a Size
2541         clause.
2543 2019-08-12  Gary Dismukes  <dismukes@adacore.com>
2545         * sem_prag.adb (Analyze_Pragma, Pragma_Suppress_Initialization):
2546         For private types, set the Suppress_Initialization flag on the
2547         Full_View of the entity rather than the entity's base type.
2549 2019-08-12  Yannick Moy  <moy@adacore.com>
2551         * aspects.adb, aspects.ads (Aspect_No_Caching): New aspect.
2552         * contracts.adb, contracts.ads (Add_Contract_Item): Add handling
2553         of No_Caching.
2554         (Analyze_Object_Contract): Add handling of No_Caching.
2555         * einfo.adb, einfo.ads
2556         (Get_Pragma): Add handling of No_Caching.
2557         * doc/gnat_rm/implementation_defined_aspects.rst,
2558         doc/gnat_rm/implementation_defined_pragmas.rst: Document new
2559         aspect/pragma.
2560         * gnat_rm.texi: Regenerate.
2561         * par-prag.adb (Prag): New pragma Pragma_No_Caching.
2562         * sem_ch13.adb (Analyze_Aspect_Specifications,
2563         Check_Aspect_At_Freeze_Point): Add handling of No_Caching.
2564         * sem_prag.adb (Analyze_Pragma): Deal with pragma No_Caching.
2565         * sem_prag.ads (Analyze_External_Property_In_Decl_Part): Now
2566         applies to No_Caching.
2567         * sem_util.adb, sem_util.ads (Is_Effectively_Volatile): Add
2568         handling of No_Caching.
2569         (No_Caching_Enabled): New query function.
2570         * snames.ads-tmpl: New names for pragma.
2572 2019-08-12  Yannick Moy  <moy@adacore.com>
2574         * sem_util.adb, sem_util.ads (Traverse_More_Func,
2575         Traverse_More_Proc): Add formal parameter for Itypes traversal.
2577 2019-08-12  Yannick Moy  <moy@adacore.com>
2579         * exp_attr.adb, exp_attr.ads (Expand_Size_Attribute): New
2580         procedure to share part of the attribute expansion with
2581         GNATprove mode.
2582         (Expand_N_Attribute_Reference): Extract part of the
2583         Size/Object_Size expansion in the new procedure
2584         Expand_Size_Attribute.
2585         * exp_spark.adb (Expand_SPARK_N_Attribute_Reference): Expand
2586         Size/Object_Size attributes using the new procedure
2587         Expand_Size_Attribute.
2589 2019-08-12  Yannick Moy  <moy@adacore.com>
2591         * exp_spark.adb (Expand_SPARK_N_Attribute_Reference): Only
2592         expand Enum_Rep attribute when its parameter is a literal.
2594 2019-08-12  Justin Squirek  <squirek@adacore.com>
2596         * sem_eval.adb (Check_Non_Static_Context): Add a condition to
2597         determine if a range violation constitues a warning or an error.
2598         (Out_Of_Range): Add a condition to determine if a range
2599         violation constitues a warning or an error.
2601 2019-08-12  Eric Botcazou  <ebotcazou@adacore.com>
2603         * exp_ch4.adb (Real_Range_Check): Do not rewrite the conversion
2604         node but its expression instead, after having fetched its
2605         current value.  Clear the Do_Range_Check flag on entry.  Return
2606         early for a rewritten float-to-float conversion.  Remove
2607         redundant local variable.  Suppress all checks when inserting
2608         the temporary and do not reanalyze the node.
2610 2019-08-12  Eric Botcazou  <ebotcazou@adacore.com>
2612         * sprint.ads: Minor comment tweak.
2614 2019-08-12  Eric Botcazou  <ebotcazou@adacore.com>
2616         * checks.adb (Insert_Valid_Check): Do not retrieve the
2617         Do_Range_Check flag from the Original_Node but from the
2618         Validated_Object.  Remove useless bypass for floating-point
2619         types.
2621 2019-08-12  Yannick Moy  <moy@adacore.com>
2623         * sem_util.adb, sem_util.ads (Traverse_More_Func,
2624         Traverse_More_Proc): New traversal subprograms.
2626 2019-08-12  Jerome Lambourg  <lambourg@adacore.com>
2628         * libgnarl/s-taprop__vxworks.adb (Abort_Handler): Only call
2629         s-tpopsp.Self when actually needed.
2631 2019-08-12  Eric Botcazou  <ebotcazou@adacore.com>
2633         * exp_ch4.adb (Discrete_Range_Check): Return if checks are
2634         suppressed.
2636 2019-08-12  Eric Botcazou  <ebotcazou@adacore.com>
2638         * sem_res.adb: Add with & use clause for Sem_Mech and
2639         alphabetize.
2640         (Resolve_Actuals): Do not apply a scalar range check for the
2641         source of a conversion whose result is passed by reference to a
2642         valued procedure.
2644 2019-08-12  Eric Botcazou  <ebotcazou@adacore.com>
2646         * checks.adb (Insert_Valid_Check): Reset the Do_Range_Check flag
2647         on the validated object.
2648         * exp_ch6.adb (Add_Call_By_Copy_Code): Reset the Do_Range_Check
2649         flag on the actual here, as well as on the Expression if the
2650         actual is a N_Type_Conversion node.
2651         (Add_Validation_Call_By_Copy_Code): Generate the incoming range
2652         check if needed and reset the Do_Range_Check flag on the
2653         Expression if the actual is a N_Type_Conversion node.
2654         (Expand_Actuals): Do not reset the Do_Range_Check flag here.
2655         Generate the incoming range check for In parameters here instead
2656         of...
2657         (Expand_Call_Helper): ...here.  Remove redudant condition.
2658         * sem_res.adb (Resolve_Actuals): Use local variable A_Typ and
2659         remove obsolete comments.
2660         (Resolve_Type_Conversion): Do not force the Do_Range_Check flag
2661         on the operand if range checks are suppressed.
2663 2019-08-12  Eric Botcazou  <ebotcazou@adacore.com>
2665         * checks.adb (Activate_Range_Check): Remove redundant argument.
2666         (Generate_Range_Check): Likewise.
2667         (Apply_Float_Conversion_Check): Reset the Do_Range_Check flag on
2668         entry and remove redundant condition.
2670 2019-08-02  Alexandre Oliva  <oliva@adacore.com>
2672         * libgnat/a-exexpr.adb (Begin_Handler_v1, End_Handler_v1): New.
2673         (Claimed_Cleanup): New.
2674         (Begin_Handler, End_Handler): Document.
2675         * gcc-interface/trans.c (gigi): Switch to exception handler
2676         ABI #1.
2677         (Exception_Handler_to_gnu_gcc): Save the original cleanup
2678         returned by begin handler, pass it to end handler, and use
2679         EH_ELSE_EXPR to pass a propagating exception to end handler.
2680         (gnat_to_gnu): Leave the exception pointer alone for reraise.
2681         (add_cleanup): Handle EH_ELSE_EXPR, require it by itself.
2683 2019-07-23  Ed Schonberg  <schonberg@adacore.com>
2685         * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations,
2686         Freeze_Entity_Checks): Include Aspect_CPU with other aspects
2687         whose expresssion may depend on a discriminant, and thus require
2688         that components of the type be made visible.
2690 2019-07-23  Eric Botcazou  <ebotcazou@adacore.com>
2692         * checks.adb (Convert_And_Check_Range): Add Suppress parameter
2693         and pass it in the call to Insert_Actions.  Rename local
2694         variable.
2695         (Generate_Range_Check): Minor comment fixes.  Pass Range_Check
2696         in the first call to Convert_And_Check_Range and All_Checks in
2697         the second call.
2698         * exp_ch4.adb (Expand_N_Type_Conversion): Reset the
2699         Do_Overflow_Check flag in the float-to-float case too if there
2700         is also a range check.
2702 2019-07-23  Eric Botcazou  <ebotcazou@adacore.com>
2704         * checks.adb (Activate_Overflow_Check): Remove redundant
2705         argument.
2706         * exp_ch4.adb (Discrete_Range_Check): Reset the overflow flag.
2707         (Expand_N_Type_Conversion): Do not reset it here.
2709 2019-07-23  Eric Botcazou  <ebotcazou@adacore.com>
2711         * repinfo.adb (List_Component_Layout): Pass Decimal to UI_Write.
2712         (Write_Val): Likewise.
2714 2019-07-23  Ed Schonberg  <schonberg@adacore.com>
2716         * aspects.ads: New table Operational_Aspect, used to distinguish
2717         between aspects that are view-specific, such as those related to
2718         iterators, and representation aspects that apply to all views of
2719         a type.
2720         * aspects.adb (Find_Aspect): If the aspect being sought is
2721         operational, do not ecamine the full view of a private type to
2722         retrieve it.
2723         * sem_ch5.adb (Analyze_Iterator_Specification): Improve error
2724         message when the intended domain of iteration does not implement
2725         the required iterator aspects.
2727 2019-07-23  Yannick Moy  <moy@adacore.com>
2729         * sem_spark.ads (Is_Local_Context): New function.
2730         * sem_spark.adb (Check_Declaration): Issue errors on violations
2731         of SPARK RM 3.10(4)
2732         (Process_Path): Do not issue error on borrow/observe during
2733         elaboration, as these are caught by the new rule.
2735 2019-07-23  Yannick Moy  <moy@adacore.com>
2737         * exp_ch7.adb (Create_Finalizer): Force finalizer not to be
2738         Ghost enabled.
2739         * exp_dbug.adb (Get_External_Name): Explain special case of
2740         Ghost finalizer.
2742 2019-07-22  Eric Botcazou  <ebotcazou@adacore.com>
2744         * repinfo.adb (List_Entities): Also list compiled-generated
2745         types present as Etype of objects.
2747 2019-07-22  Eric Botcazou  <ebotcazou@adacore.com>
2749         * sinfo.ads: Update the documentation about the
2750         Do_Division_Check, Do_Overflow_Check and Do_Range_Check flags.
2752 2019-07-22  Eric Botcazou  <ebotcazou@adacore.com>
2754         * exp_ch4.adb (Expand_N_Type_Conversion): Beef up comment.
2755         (Fixup_Universal_Fixed_Operation): Set the base type instead of
2756         the type of the enclosing type conversion on the operation.
2758 2019-07-22  Ed Schonberg  <schonberg@adacore.com>
2760         * exp_ch4.adb (Expand_N_In): Do not suggest the use of attribute
2761         'Valid as a replacement for a range check on a discrete type
2762         when the bounds of the range are given by type conversions,
2763         because in such a case there are distinct types involved and the
2764         subbested attribute replacement would be misplaced.
2766 2019-07-22  Yannick Moy  <moy@adacore.com>
2768         * sem_spark.adb (Get_Root_Object, Is_Path_Expression,
2769         Is_Subpath_Expression): Add parameter Is_Traversal to adapt
2770         these functions to the case of paths returned from a traversal
2771         function.
2772         (Read_Indexes): Handle the case of an if-expression or
2773         case-expression.
2774         (Check_Statement): Check Emit_Messages only when issuing an
2775         error message. This is important as Emit_Messages may store the
2776         information that an error was detected.
2778 2019-07-22  Eric Botcazou  <ebotcazou@adacore.com>
2780         * checks.adb (Apply_Type_Conversion_Checks): Do not set
2781         Do_Range_Check flag on conversions from fixed-point types
2782         either.
2783         * exp_attr.adb: Add use and with clause for Expander.
2784         (Expand_N_Attribute_Reference) <Fixed_Value, Integer_Value>: Set
2785         the Conversion_OK flag and do not generate overflow/range checks
2786         manually.
2787         * exp_ch4.adb (Expand_N_Qualified_Expression): Remove
2788         superfluous clearing of Do_Range_Check flag.
2789         (Discrete_Range_Check): New procedure to generate a range check
2790         for discrete types.
2791         (Real_Range_Check): Remove redundant local variable and adjust.
2792         Remove useless shortcut.  Clear Do_Range_Check flag on all
2793         paths.
2794         (Expand_N_Type_Conversion): Remove redundant test on
2795         Conversion_OK.  Call Discrete_Range_Check to generate range
2796         checks on discrete types.  Remove obsolete code for
2797         float-to-integer conversions.  Add code to generate range checks
2798         for conversions involving fixed-point types.
2800 2019-07-22  Eric Botcazou  <ebotcazou@adacore.com>
2802         * sprint.ads: Fix pasto in comment.
2804 2019-07-22  Javier Miranda  <miranda@adacore.com>
2806         * sem_res.adb (Resolve_Actuals): Replace code that displaces the
2807         pointer to an allocated object to reference its secondary
2808         dispatch table by a type conversion (which takes care of
2809         handling all cases).
2811 2019-07-22  Eric Botcazou  <ebotcazou@adacore.com>
2813         * sprint.adb (Sprint_Node_Actual)
2814         <N_Decimal_Fixed_Point_Definition>: Swap a couple of spaces.
2815         (Write_Itype): Minor consistency fixes throughout.  Add support
2816         for printing ordinary and decimal fixed-point types and
2817         subtypes.
2819 2019-07-22  Eric Botcazou  <ebotcazou@adacore.com>
2821         * exp_attr.adb (Expand_Loop_Entry_Attribute): Beef up comment.
2823 2019-07-22  Ed Schonberg  <schonberg@adacore.com>
2825         * libgnat/s-valboo.ads, libgnat/s-valcha.ads,
2826         libgnat/s-valdec.ads, libgnat/s-valenu.ads,
2827         libgnat/s-valint.ads, libgnat/s-vallld.ads,
2828         libgnat/s-vallli.ads, libgnat/s-valllu.ads,
2829         libgnat/s-valrea.ads, libgnat/s-valuns.ads,
2830         libgnat/s-valwch.ads: Change categorization of packages that
2831         implement attribute 'Value from Pure to Preelaborate, to prevent
2832         undesirable optimizations when the evaluation of the attribute
2833         raises Constraint_Error, but subsequent use of the result of
2834         this evsaluation is removed by a subsequent optimization.
2836 2019-07-22  Ed Schonberg  <schonberg@adacore.com>
2838         * sem_warn.adb (Check_References): Do not emit s warning on a
2839         referenced entity with no explicit assignment if the type of the
2840         entity has Preelaborable_Initialixation, such as
2841         Exception_Occurrence.
2843 2019-07-22  Javier Miranda  <miranda@adacore.com>
2845         * exp_ch4.adb (Size_In_Storage_Elements): Improve the expansion
2846         to handle array indexes that are modular type.
2847         (Expand_N_Allocator): For 32-bit targets improve the generation
2848         of the runtime check associated with large arrays supporting
2849         arrays initialized with a qualified expression.
2850         * libgnat/s-imenne.adb (Image_Enumeration_8,
2851         Image_Enumeration_16, Image_Enumeration_32): Define the index of
2852         Index_Table with range Natural'First .. Names'Length since in
2853         the worst case all the literals of the enumeration type would be
2854         single letter literals and the Table built by the frontend would
2855         have as many components as the length of the names string. As a
2856         result of this enhancement, the internal tables declared using
2857         Index_Table have a length closer to the real needs, thus
2858         avoiding the declaration of large arrays on 32-bit CCG targets.
2860 2019-07-22  Yannick Moy  <moy@adacore.com>
2862         * sem_ch3.adb (Constrain_Access): Issue a message about ignored
2863         constraint.
2865 2019-07-22  Eric Botcazou  <ebotcazou@adacore.com>
2867         * sem_ch8.adb (End_Use_Type): Reset the In_Use flag on the
2868         class-wide type if the type is tagged.
2869         (Use_One_Type): Add commentary on the handling of the class-wide
2870         type.
2872 2019-07-22  Eric Botcazou  <ebotcazou@adacore.com>
2874         * einfo.ads (Is_For_Access_Subtype): Delete.
2875         (Set_Is_For_Access_Subtype): Likewise.
2876         * einfo.adb (Is_For_Access_Subtype): Likewise.
2877         (Set_Is_For_Access_Subtype): Likewise.
2878         (Write_Entity_Flags): Do not write Is_For_Access_Subtype.
2879         * exp_ch4.adb (Expand_N_Selected_Component): Do not deal with
2880         it.
2881         * exp_spark.adb (Expand_SPARK_N_Selected_Component): Likewise.
2882         * sem_ch4.adb (Analyze_Explicit_Dereference): Likewise.
2883         * sem_ch3.adb (Build_Discriminated_Subtype): Do not build a
2884         special private subtype for access-to-record subtypes.
2886 2019-07-22  Eric Botcazou  <ebotcazou@adacore.com>
2888         * sem_ch3.adb (Complete_Private_Subtype): Rework the setting of
2889         the Etype of the full view for full base types that cannot
2890         contain any discriminant.  Remove code and comment about it in
2891         the main path.
2893 2019-07-22  Ed Schonberg  <schonberg@adacore.com>
2895         * sem_ch3.adb (Convert_Bound): Subsidiary of
2896         Floating_Point_Type_Declaration, to handle properly range
2897         specifications with bounds that may include static constants of
2898         a given type rather than real literals.
2900 2019-07-22  Eric Botcazou  <ebotcazou@adacore.com>
2902         * sem_aggr.adb (Rewrite_Bound): Be prepared for discriminals
2903         too.
2904         (Rewrite_Range;): Minor tweak.
2905         (Resolve_Record_Aggregate): For a component with default
2906         initialization whose expression is an array aggregate, also
2907         rewrite the bounds of the component associations, if any.
2909 2019-07-22  Gary Dismukes  <dismukes@adacore.com>
2911         * exp_ch5.adb (Expand_N_Case_Statement): In the case where a
2912         case statement is rewritten as an equivalent if statement,
2913         inherit the From_Condition_Expression flag from the case
2914         statement.
2916 2019-07-22  Eric Botcazou  <ebotcazou@adacore.com>
2918         * sem_ch8.adb (Check_Constrained_Object): Further extend the
2919         special optimization to all limited types.
2921 2019-07-22  Eric Botcazou  <ebotcazou@adacore.com>
2923         * exp_attr.adb (Expand_N_Attribute_Reference)
2924         <Attribute_Enum_Val>: Set No_Truncation on the
2925         N_Unchecked_Type_Conversion built around the argument passed to
2926         the attribute.
2928 2019-07-22  Nicolas Roche  <roche@adacore.com>
2930         * libgnat/s-valrea.adb (Scan_Real): Ignore non significative
2931         digits to avoid converging to infinity in some cases.
2933 2019-07-22  Eric Botcazou  <ebotcazou@adacore.com>
2935         * libgnat/g-encstr.adb (Encode_Wide_String): Fix oversight.
2936         (Encode_Wide_Wide_String): Likewise.
2938 2019-07-22  Eric Botcazou  <ebotcazou@adacore.com>
2940         * sem_warn.adb (Find_Var): Bail out for a function call with an
2941         Out or In/Out parameter.
2943 2019-07-22  Nicolas Roche  <roche@adacore.com>
2945         * terminals.c (__gnat_tty_waitpid): Support both blocking and
2946         not blocking mode.
2947         * libgnat/g-exptty.ads (Is_Process_Running): New function.
2948         * libgnat/g-exptty.adb (Close): Don't try to interrupt/terminate
2949         a process if it is already dead.
2951 2019-07-22  Ed Schonberg  <schonberg@adacore.com>
2953         * freeze.adb (Freeze_Fixed_Point_Type): When freezing a
2954         fixed-point subtype, check whether the parent type declarastion
2955         includes an aspect specification for the 'Small type attribute,
2956         and inherit the specified value.
2958 2019-07-22  Javier Miranda  <miranda@adacore.com>
2960         * freeze.adb (Freeze_Subprogram): Check that C++ constructors
2961         must have external or link name.
2963 2019-07-22  Ed Schonberg  <schonberg@adacore.com>
2965         * sem_res.adb (Resolve_Selected_Component): If the prefix has a
2966         deferred reference, generate the correct reference now, to
2967         indicate that the previous assignment is used.  This prevents
2968         spurious warnings on useless assignments when compiling with all
2969         warnings enabled. when there is a subsequent call in the same
2970         stqtement list, in which the prefix of the selected component is
2971         the actual for an out parameter.
2973 2019-07-22  Eric Botcazou  <ebotcazou@adacore.com>
2975         * exp_attr.adb (Expand_Loop_Entry_Attribute): Copy the condition
2976         of a while loop instead of simply relocating it.
2978 2019-07-18  Arnaud Charlet  <charlet@adacore.com>
2980         * Makefile.rtl, expect.c, env.c, aux-io.c, mkdir.c, initialize.c,
2981         cstreams.c, raise.c, tracebak.c, adadecode.c, init.c, raise-gcc.c,
2982         argv.c, adaint.c, adaint.h, ctrl_c.c, sysdep.c, rtinit.c, cio.c,
2983         seh_init.c, exit.c, targext.c: Introduce a "STANDALONE" mode where C
2984         runtime files do not have any dependency on GCC include files.
2985         Remove unnecessary includes.
2986         Remove remaining references to VMS in runtime C file.
2987         * runtime.h: new File.
2989 2019-07-13  Andreas Schwab  <schwab@linux-m68k.org>
2991         * Makefile.rtl: Use g-sercom__linux.adb for all linuxes.
2993 2019-07-11  Piotr Trojanek  <trojanek@adacore.com>
2995         * lib-writ.adb (Ensure_System_Dependency,
2996         Up_To_Date_ALI_File_Exists, Write_ALI): Replace low-level access
2997         to table with a high-level query.
2999 2019-07-11  Piotr Trojanek  <trojanek@adacore.com>
3001         * checks.adb: Fix typo in comment.
3002         * sem.adb (Semantics): Avoid repeated calls to
3003         In_Extended_Main_Source_Unit by reusing an already-cached
3004         result.
3005         * sem_util.adb (First_Global): Fix style.
3007 2019-07-11  Yannick Moy  <moy@adacore.com>
3009         * sem_res.adb (Resolve_Call): Do not perform dimensionality
3010         checking on inlined bodies.
3012 2019-07-11  Yannick Moy  <moy@adacore.com>
3014         * debug.adb: Flip meaning of debug switch -gnatdF.
3016 2019-07-11  Yannick Moy  <moy@adacore.com>
3018         * sem_eval.adb (Is_Same_Value): Add special case for rewritten
3019         Loop_Entry attribute.
3021 2019-07-11  Claire Dross  <dross@adacore.com>
3023         * gnat1drv.adb: SPARK checking rules for pointer aliasing are
3024         moved to GNATprove backend.
3025         * sem_spark.ads, sem_spark.adb (Sem_SPARK): Is now a generic
3026         unit. Takes as parameters:
3027          - Retysp which is used to query the most underlying type
3028            visible in SPARK. We do not introduce aliasing checks for
3029            types which are not visibly deep.
3030          - Component_Is_Visible_In_SPARK is used to avoid doing pointer
3031            aliasing checks on components which are not visible in SPARK.
3032          - Emit_Messages returns True in the second phase of SPARK
3033            analysis. Error messages for failed aliasing checks are only
3034            output in this case.
3035         Additionally, errors on constructs not supported in SPARK are
3036         removed as duplicates of marking errors. Components are stored
3037         in the permission map using their original component to avoid
3038         inconsistencies between components of different views of the
3039         same type.
3040         (Check_Expression): Handle delta constraints.
3041         (Is_Deep): Exported so that we can check for SPARK restrictions
3042         on deep types inside SPARK semantic checkings.
3043         (Is_Traversal_Function): Exported so that we can check for SPARK
3044         restrictions on traversal functions inside SPARK semantic
3045         checkings.
3046         (Check_Call_Statement, Read_Indexes): Check wether we are
3047         dealing with a subprogram pointer type before querying called
3048         entity.
3049         (Is_Subpath_Expression): Image attribute can appear inside a
3050         path.
3051         (Check_Loop_Statement): Correct order of statements in the loop.
3052         (Check_Node): Ignore raise nodes.
3053         (Check_Statement): Use Last_Non_Pragma to get the object
3054         declaration in an extended return statement.
3056 2019-07-11  Patrick Bernardi  <bernardi@adacore.com>
3058         * bindgen.adb (Gen_Main): Do not generate a reference to
3059         Ada_Main_Program_Name when the Minimal_Binder flag is set.
3060         (Gen_Output_File_Ada): Do not output GNAT_Version and
3061         Ada_Main_Program_Name info if Minimal_Binder flag is set.
3062         * bindusg.adb: Add documentation for new -minimal switch.
3063         * gnatbind.adb (Scan_Bind_Arg): Scan -minimal switch.
3064         * opt.ads: Add new global flag Minimal_Binder to indicate if the
3065         binder should not produce global variables.
3066         * doc/gnat_ugn/building_executable_programs_with_gnat.rst:
3067         Update documentation with new binder -minimal switch.
3068         * gnat_ugn.texi: Regenerate.
3070 2019-07-11  Eric Botcazou  <ebotcazou@adacore.com>
3072         * Makefile.rtl: Add warning note about compilation flags and
3073         capitalize.
3075 2019-07-11  Ed Schonberg  <schonberg@adacore.com>
3077         * exp_ch9.adb (Expand_N_Protected_Type_Declaaration): New
3078         subsidiary routine Replace_Access_Definition, to handle properly
3079         a protected type PT one of whose private components is of type
3080         access PT.
3082 2019-07-11  Dmitriy Anisimkov  <anisimko@adacore.com>
3084         * libgnat/g-socket.ads (Level_Type): Add enumerators for
3085         IP_Protocol_For_ICMP, IP_Protocol_For_IGMP,
3086         IP_Protocol_For_RAW_Level.
3087         * libgnat/g-socket.adb (Levels): Handle them.
3088         * s-oscons-tmplt.c: Import socket protocols defined in
3089         netinet/in.h.
3091 2019-07-11  Claire Dross  <dross@adacore.com>
3093         * libgnat/a-cfhama.adb, libgnat/a-cfhase.adb (Free): Do not
3094         reset the Has_Element flag if no element is freed.
3096 2019-07-11  Arnaud Charlet  <charlet@adacore.com>
3098         * errno.c: Remove obsolete support for MaRTE OS.
3100 2019-07-11  Ed Schonberg  <schonberg@adacore.com>
3102         * exp_ch4.adb (Expand_N_Type_Conversion): If a predicate check
3103         is generated, analyze it with range check suppressed, because
3104         that check has been previously applied.
3105         * exp_ch5.adb (Expand_N_Assignment_Statement): If the RHS is a
3106         type conversion to the type of the LHS, do not apply a predicate
3107         check to the RHS because it will have been generated already
3108         during its expansion.
3109         * exp_ch6.adb (Can_Fold_Predicate_Call): Extend processing to
3110         handle a predicate check on a constant entity whose value is
3111         static.
3113 2019-07-11  Hristian Kirtchev  <kirtchev@adacore.com>
3115         * bindo.adb: Remove the documentation of switch -d_N because it
3116         is no longer in use.
3117         * bindo-graphs.ads, bindo-graphs.adb (Is_Spec_Before_Body_Edge):
3118         New routine.
3119         * bindo-writers.adb (Write_Dependency_Edge): Add the missing
3120         case of a spec-before-body edge.
3122 2019-07-11  Dmitriy Anisimkov  <anisimko@adacore.com>
3124         * libgnat/g-socket.ads (Mode_Type): Add a Socket_Raw enumerator.
3125         * libgnat/g-socket.adb (Modes): Handle Socket_Raw.
3127 2019-07-11  Justin Squirek  <squirek@adacore.com>
3129         * exp_ch9.adb (Build_Private_Protected_Declaration): Add
3130         exception for the moving of pragmas to internally generated
3131         specs for pragma Unreferenced.
3133 2019-07-11  Bob Duff  <duff@adacore.com>
3135         * doc/gnat_ugn/gnat_utility_programs.rst: Fix inconsistent
3136         documentation for gnatmetric.
3137         * gnat_ugn.texi: Regenerate.
3139 2019-07-11  Bob Duff  <duff@adacore.com>
3141         * doc/gnat_ugn/gnat_utility_programs.rst: Document gnatpp's
3142         --spaces-only switch.
3144 2019-07-11  Hristian Kirtchev  <kirtchev@adacore.com>
3146         * sem_util.adb (Null_Status): Assume that an erroneous construct
3147         has an undefined null status.
3149 2019-07-11  Hristian Kirtchev  <kirtchev@adacore.com>
3151         * checks.adb, exp_ch6.adb, gnat1drv.adb, sem_aux.adb,
3152         sem_ch2.adb, sem_ch8.adb, sem_res.adb: Minor reformatting.
3154 2019-07-11  Hristian Kirtchev  <kirtchev@adacore.com>
3156         * sem_ch8.adb (Analyze_Object_Renaming): Obtain the object being
3157         renamed using routine Get_Object_Name which takes care of
3158         various name forms.
3159         (Get_Object_Name): New routine.
3161 2019-07-11  Ed Schonberg  <schonberg@adacore.com>
3163         * exp_ch6.adb (Can_Fold_Predicate_Call): New function,
3164         subsidiary of Expand_Call_Helper, to compute statically a
3165         predicate check when the argument is a static integer.
3167 2019-07-11  Hristian Kirtchev  <kirtchev@adacore.com>
3169         * sem_res.adb (Resolve_Op_Not): Do not rewrite an equality
3170         operator into a function call when the operator is intrinsic.
3172 2019-07-11  Thomas Quinot  <quinot@adacore.com>
3174         * sem_prag.adb (Analyze_Pragma, case pragma Check): Do not call
3175         Set_SCO_Pragma_Enabled for the dynamic predicate case.
3177 2019-07-11  Hristian Kirtchev  <kirtchev@adacore.com>
3179         * exp_util.ads, exp_util.adb (Needs_Finalization): Move to
3180         Sem_Util.
3181         * sem_ch9.adb (Analyze_Protected_Definition): Code cleanup. Mark
3182         the protected type as having controlled components when it
3183         contains at least one such component.
3184         * sem_util.ads, sem_util.adb (Needs_Finalization): New
3185         function.
3187 2019-07-11  Eric Botcazou  <ebotcazou@adacore.com>
3189         * alloc.ads (Rep_JSON_Table_Initial): New constant.
3190         (Rep_JSON_Table_Increment): Likewise.
3191         * debug.adb: Document -gnatd_j switch.
3192         * gcc-interface/Make-lang.in (GNAT_ADA_OBJS): Add
3193         repinfo-input.o.
3194         * gnat1drv.adb: Add with clause for Repinfo.Input.
3195         Add with and use clauses for Sinput.
3196         (Read_JSON_Files_For_Repinfo): New procedure.
3197         (Gnat1drv1): Deal with -gnatd_j switch.
3198         * repinfo-input.ad[sb]: New unit.
3199         * snames.ads-tmpl (Name_Discriminant): New constant.
3200         (Name_Operands): Likewise.
3202 2019-07-11  Justin Squirek  <squirek@adacore.com>
3204         * checks.adb (Apply_Accessibility_Check): Add check for constant
3205         folded conditions on accessibility checks.
3207 2019-07-11  Arnaud Charlet  <charlet@adacore.com>
3209         * libgnarl/g-thread.ads, libgnarl/g-thread.adb (Get_Thread):
3210         Update comments. Add new version taking a Task_Id.
3212 2019-07-11  Hristian Kirtchev  <kirtchev@adacore.com>
3214         * bindo.adb: Update the section of switches and debugging
3215         elaboration issues.
3216         * bindo.ads: Add type Elaboration_Phase.
3217         * bindo-augmentors.adb: Add use clause for
3218         Bindo.Writers.Phase_Writers.
3219         (Augment_Library_Graph): Signal the start and end of the
3220         aubmentation phase.
3221         * bindo-builders.adb: Add with and use clause for Bindo.Writers.
3222         Add use clause for Bindo.Writers.Phase_Writers.
3223         (Build_Invocation_Graph): Signal the start and end of the
3224         invocation graph construction phase.
3225         (Build_Library_Graph): Signal the start and end of the library
3226         graph construction phase.
3227         * bindo-diagnostics.adb: Add use clause for
3228         Bindo.Writers.Phase_Writers.
3229         (Diagnose_Cycle): Signal the start and end of the cycle
3230         diagnostic phase.
3231         * bindo-elaborators.adb: Add use clause for
3232         Bindo.Writers.Phase_Writers.
3233         (Elaborate_Units): Signal the start and end of the unit
3234         elaboration phase.
3235         * bindo-graphs.adb: Add use clause for
3236         Bindo.Writers.Phase_Writers.
3237         (Find_Components): Signal the start and end of the component
3238         discovery phase.
3239         (Find_Cycles): Signal the start and end of the cycle discovery
3240         phase.
3241         * bindo-units.adb: Add with and use clause for Bindo.Writers.
3242         Add use clause for Bindo.Writers.Phase_Writers.
3243         (Collect_Elaborable_Units): Signal the start and end of the unit
3244         collection phase.
3245         * bindo-validators.adb: Add with and use clause for
3246         Bindo.Writers.  Add use clause for Bindo.Writers.Phase_Writers.
3247         (Validate_Cycles, Validate_Elaboration_Order,
3248         Validate_Invocation_Graph, Validate_Library_Graph): Signal the
3249         start and end of the libray graph validation phase.
3250         * bindo-writers.ads, bindo-writers.adb: Add new nested package
3251         Phase_Writers.
3252         * debug.adb: Update the documentation of switch d_S.
3254 2019-07-11  Yannick Moy  <moy@adacore.com>
3256         * sem_res.adb (Check_Argument_Order): Special case calls to
3257         operators.
3259 2019-07-10  Dmitriy Anisimkov  <anisimko@adacore.com>
3261         * libgnat/s-ststop.adb: Remove System.Strings.Stream_Ops
3262         dependence on System.Streams.Stream_IO.
3264 2019-07-10  Ed Schonberg  <schonberg@adacore.com>
3266         * sem_ch2.adb (Analyze_Integer_Literal): Preserve the type of
3267         the literal if prior analysis determined that its type is a
3268         modular integer type.
3270 2019-07-10  Doug Rupp  <rupp@adacore.com>
3272         * init.c: Do not attempt to re-arm guard page on x86_64-vx7(r2).
3274 2019-07-10  Ed Schonberg  <schonberg@adacore.com>
3276         * sem_ch8.adb (Check_Constrained_Object): A record that is
3277         limited because of the presence of a limited component is
3278         constrained, and no subtype indiciation needs to be created for
3279         it, just as is the case for declared limited records.
3281 2019-07-10  Yannick Moy  <moy@adacore.com>
3283         * sem_aux.adb, sem_aux.ads (Is_Protected_Operation): New
3284         function to determine if a subprogram is protected.
3285         * sem_spark.adb (Setup_Protected_Components): New procedure to
3286         add protected components to the environment.
3287         (Check_Callable_Body): Call the new Setup_Protected_Components.
3288         (Check_Package_Spec): Merge local environment with enclosing one
3289         when done.
3291 2019-07-10  Claire Dross  <dross@adacore.com>
3293         * sem_spark.adb (Check_Expression): Allow digits constraints as
3294         input.
3295         (Illegal_Global_Usage): Pass in the entity.
3296         (Is_Subpath_Expression): New function to allow different nodes
3297         as inner parts of a path expression.
3298         (Read_Indexes): Allow concatenation and aggregates with box
3299         expressions.  Allow attributes Update and Loop_Entry.
3300         (Check_Expression): Allow richer membership test.
3301         (Check_Node): Ignore bodies of generics.
3302         (Get_Root_Object): Allow concatenation and attributes.
3304 2019-07-10  Hristian Kirtchev  <kirtchev@adacore.com>
3306         * sem_ch6.adb (Check_Discriminant_Conformance): Use Find_Type to
3307         discover the type of a full view discriminant.
3309 2019-07-10  Arnaud Charlet  <charlet@adacore.com>
3311         * doc/gnat_ugn/gnat_and_program_execution.rst: Improve gnatmem's
3312         doc for the depth switch.
3314 2019-07-10  Bob Duff  <duff@adacore.com>
3316         * doc/gnat_ugn/gnat_utility_programs.rst: Document gnatpp's
3317         --source-line-breaks switch.
3319 2019-07-10  Justin Squirek  <squirek@adacore.com>
3321         * doc/gnat_rm/implementation_defined_attributes.rst: Add mention
3322         of 'Image attribute with 'Img's entry to mention additional
3323         added 2012 usage of Obj'Image.
3324         * doc/gnat_rm/implementation_defined_pragmas.rst: Correct
3325         mispelling of Async_Writers.
3326         * gnat_rm.texi: Regenerate.
3327         * sem_prag.adb (Analyze_Pragma): Correct mispelling of
3328         Async_Writers.
3329         * sem_util.adb (State_Has_Enabled_Property): Correct mispelling
3330         of Async_Writers.
3332 2019-07-10  Simon Buist  <buist@adacore.com>
3334         * sem_util.ads (Child_Prefix): New constant.
3335         * sem_util.adb (Unique_Name): Add a special prefix to child
3336         units that have a nested subprogram or package.
3338 2019-07-10  Arnaud Charlet  <charlet@adacore.com>
3340         * sfn_scan.adb (Scan_SFN_Pragmas): Add pragma Assert.
3342 2019-07-10  Hristian Kirtchev  <kirtchev@adacore.com>
3344         * sem_ch3.adb (Check_Nonoverridable_Aspects): Correct the
3345         spelling in certain error messages.
3346         (Check_Pragma_Implemented): Correct the spelling in certain
3347         error messages.
3349 2019-07-10  Eric Botcazou  <ebotcazou@adacore.com>
3351         * Makefile.rtl (GNATRTL_NONTASKING_OBJS): Add g-brapre.
3352         * libgnat/g-brapre.ads: New package specification.
3353         * doc/gnat_rm/the_gnat_library.rst: Document it.
3354         * gnat_rm.texi: Regenerate.
3356 2019-07-10  Yannick Moy  <moy@adacore.com>
3358         * osint-c.adb (Set_File_Name): Always add extension for multiple
3359         units per file mode.
3361 2019-07-10  Corentin Gay  <gay@adacore.com>
3363         * sysdep.c: Put include directive for 'vxWorks.h' before any
3364         other VxWorks headers.
3366 2019-07-10  Eric Botcazou  <ebotcazou@adacore.com>
3368         * doc/gnat_rm/implementation_defined_attributes.rst
3369         (Scalar_Storage_Order): Minor tweaks.  Add note about debuggers.
3370         * gnat_rm.texi: Regenerate.
3372 2019-07-10  Hristian Kirtchev  <kirtchev@adacore.com>
3374         * exp_ch4.adb (Expand_N_Case_Expression): Mark the generated
3375         assignments to the temporary result as being OK because the
3376         expansion of case expressions is correct by construction.
3377         (Is_Copy_Type): Update the predicate to match the comment
3378         within.
3380 2019-07-10  Hristian Kirtchev  <kirtchev@adacore.com>
3382         * bindo-graphs.adb, bindo.adb, debug.adb, exp_ch6.adb,
3383         sem_ch10.adb, sem_ch13.adb, sem_ch3.adb, sem_ch4.adb,
3384         sem_ch6.adb, sem_ch7.adb, sem_res.adb, sem_spark.adb,
3385         sem_util.adb, warnsw.ads: Minor reformatting.
3387 2019-07-10  Joffrey Huguet  <huguet@adacore.com>
3389         * libgnat/a-strbou.ads, libgnat/a-strfix.ads,
3390         libgnat/a-strunb.ads, libgnat/a-strunb__shared.ads: Add global
3391         contracts, contract cases, preconditions and postconditions to
3392         procedures and functions.
3394 2019-07-10  Doug Rupp  <rupp@adacore.com>
3396         * sysdep.c (__gnat_is_file_not_found_error): Reformulate to also
3397         work for vxworks7r2 SR0610.
3399 2019-07-10  Doug Rupp  <rupp@adacore.com>
3401         * env.c (__gnat_environ): Reformulate to also work for
3402         vxworks7r2 SR0610.
3404 2019-07-10  Patrick Bernardi  <bernardi@adacore.com>
3406         * Makefile.rtl: Handle vxworks7r2 ppc target
3408 2019-07-10  Hristian Kirtchev  <kirtchev@adacore.com>
3410         * bindo.adb: Update the section on switches.
3411         * bindo-graphs.adb
3412         (Add_Cycle, Add_Vertex_And_Complement): Remove.
3413         (Create): The graph no longer needs a set of recorded cycles
3414         because the cycles are not rediscovered in permuted forms.
3415         (Cycle_End_Vertices): New routine.
3416         (Destroy): The graph no longer needs a set of recorded cycles
3417         because the cycles are not rediscovered in permuted forms.
3418         (Destroy_Library_Graph_Vertex): Move to the library level.
3419         (Find_All_Cycles_Through_Vertex, Find_All_Cycles_With_Edge):
3420         Remove.
3421         (Find_Cycles_From_Successor, Find_Cycles_From_Vertex,
3422         Find_Cycles_In_Component, Has_Elaborate_All_Edge): New routines.
3423         (Insert_And_Sort): Remove.
3424         (Is_Elaborate_Body_Edge): Use predicate
3425         Is_Vertex_With_Elaborate_Body.
3426         (Is_Recorded_Cycle): Remove.
3427         (Is_Vertex_With_Elaborate_Body): New routine.
3428         (Normalize_And_Add_Cycle): Remove.
3429         (Precedence): Rename to xxx_Precedence, where xxx relates to the
3430         input.  These versions better reflect the desired input
3431         precedence.
3432         (Record_Cycle): New routine.
3433         (Remove_Vertex_And_Complement, Set_Is_Recorded_Cycle): Remove.
3434         (Trace_xxx): Update all versions to use debug switch -d_t.
3435         (Trace_Component): New routine.
3436         (Trace_Eol): Removed.
3437         (Trace_Vertex): Do not output the component as this information
3438         is already available when the component is traced.
3439         (Unvisit, Visit): New routine.
3440         * bindo-graphs.ads: Add new instance LGV_Lists.  Remove instance
3441         RC_Sets.  Update the structure of type Library_Graph_Attributes
3442         to remove the set of recorded cycles.
3443         (Destroy_Library_Graph_Vertex): Move to the library level.
3444         * bindo-writers.adb (Write_Component_Vertices): Output
3445         information about the number of vertices.
3446         * debug.adb: Document the use of binder switch -d_t.  Update the
3447         use of binder switch -d_T.
3449 2019-07-10  Yannick Moy  <moy@adacore.com>
3451         * sem_spark.adb (Get_Root_Object): Replace precondition by error
3452         message.
3453         (Read_Indexes): Replace precondition by error message.
3454         (Check_Callable_Body): Check only traversal function returns an
3455         anonymous access type.
3456         (Check_Expression): Issue error on unexpected expression as
3457         path.
3458         * sem_util.adb (First_Global): Fix access to global on
3459         entry/task.
3461 2019-07-10  Javier Miranda  <miranda@adacore.com>
3463         * exp_ch6.adb (Is_Class_Wide_Interface_Type): New subprogram.
3464         (Expand_Call_Helper): Handle non-limited views when we check if
3465         any formal is a class-wide interface type.
3466         * exp_disp.adb (Expand_Interface_Actuals): Handle non-limited
3467         views when we look for interface type formals to force "this"
3468         displacement.
3470 2019-07-10  Ed Schonberg  <schonberg@adacore.com>
3472         * sem_res.adb (Resolve_Equality_Op): Do not replace the resolved
3473         operator by its alias if expander is not active, because the
3474         operand type may not be frozen yet and its inherited operations
3475         have not yet been created.
3477 2019-07-10  Hristian Kirtchev  <kirtchev@adacore.com>
3479         * bindo-elaborators.adb (Elaborate_Units): Set attribute
3480         Elab_Position of all elaborated units.
3481         (Set_Unit_Elaboration_Positions): New routine.
3483 2019-07-10  Gary Dismukes  <dismukes@adacore.com>
3485         * exp_util.adb: Reformatting and a typo fix.
3487 2019-07-10  Yannick Moy  <moy@adacore.com>
3489         * exp_util.adb (Remove_Side_Effects): Prefer renamings for
3490         objects of possible owning type in GNATprove mode.
3492 2019-07-09  Ed Schonberg  <schonberg@adacore.com>
3494         * sem_ch3.adb (Analyze_Object_Declaration): If the object type
3495         is a composite type that has a dynamic predicate and, the
3496         expression in the declaration is an aggregate, the generated
3497         predicate check must appear after the expanded code for the
3498         aggregate, which will appear after the rewritten object
3499         declarastion.
3501 2019-07-09  Justin Squirek  <squirek@adacore.com>
3503         * sem_eval.adb (Expr_Value_E): Add conditional to correctly
3504         handle constant enumerated character types.
3506 2019-07-09  Eric Botcazou  <ebotcazou@adacore.com>
3508         * libgnarl/s-osinte__mingw.ads (CRITICAL_SECTION): Use proper
3509         type for SpinCount component.
3511 2019-07-09  Justin Squirek  <squirek@adacore.com>
3513         * exp_ch4.adb (Expand_N_Allocator): Add conditional to detect
3514         the presence of anoymous access type allocators and issue a
3515         warning if the appropriate warning flag is enabled.
3516         * warnsw.ads: Add new warning flag for anonymous allocators
3517         * warnsw.adb (All_Warnings, Restore_Warnings, Save_Warnings,
3518         Set_Underscore_Warning_Switch): Register new flags.
3519         (WA_Warnings): Register new flag as an "all warnings" switch
3520         * usage.adb,
3521         doc/gnat_ugn/building_executable_programs_with_gnat.rst:
3522         Document new warning switches -gnatw_a and -gnatw_A.
3523         * gnat_ugn.texi: Regenerate.
3525 2019-07-09  Ed Schonberg  <schonberg@adacore.com>
3527         * sem_ch4.adb (Diagnose_Call): Improve error recovery when a
3528         local subprogram name hides a possible candidate name declared
3529         in a child package in the context of the current unit.
3530         * sem_ch6.adb (Process_Formals): Protect against malformed
3531         formal types when the parameter type does not denote an entity.
3533 2019-07-09  Hristian Kirtchev  <kirtchev@adacore.com>
3535         * bindo-augmentors.adb (Visit_Elaboration_Root): Do not start a
3536         DFS from an elaboration root whose corresponding unit lacks
3537         elaboration code. This behavior mimics that of the old
3538         elaboration order mechanism.
3539         * bindo-graphs.adb (Find_All_Cycles_Through_Vertex): Move the
3540         vertex tracing within the functional branches of the routine.
3541         This prevents spurious trace output.
3542         (Has_No_Elaboration_Code): New routine.
3543         (Trace_Cycle, Trace_Edge): Update the various Ids to use the
3544         "standard" trace format.
3545         * bindo-graphs.ads (Has_No_Elaboration_Code): New routine.
3546         * bindo-units.ads, bindo-units.adb (Has_No_Elaboration_Code):
3547         New routine.
3549 2019-07-09  Piotr Trojanek  <trojanek@adacore.com>
3551         * ali.ads, bindo-graphs.adb, bindo-validators.adb, clean.adb,
3552         doc/gnat_ugn/elaboration_order_handling_in_gnat.rst, einfo.ads,
3553         exp_aggr.adb, exp_ch13.adb, exp_ch4.adb, exp_ch5.adb,
3554         exp_ch6.adb, exp_ch7.adb, exp_ch9.adb, exp_pakd.adb,
3555         fname-uf.ads, gnatlink.adb, inline.adb, lib.ads, make.adb,
3556         namet.ads, opt.ads, par-ch4.adb, par-ch6.adb, par-labl.adb,
3557         prep.adb, sem_aggr.adb, sem_ch13.adb, sem_ch4.adb, sem_ch5.adb,
3558         sem_ch6.adb, sem_ch6.ads, sem_ch7.adb, sem_ch8.adb, sem_dim.adb,
3559         sem_disp.adb, sem_prag.adb, sem_res.adb, sem_warn.adb,
3560         sinfo.ads: Replace ".  " with ". ". Minor reformatting and typo
3561         corrections.
3562         * gnat_ugn.texi: Generate.
3564 2019-07-09  Hristian Kirtchev  <kirtchev@adacore.com>
3566         * bindo.ads: Move type Precedence_Kind from the private to the
3567         visible part of the unit.
3568         * bindo-augmentors.adb: Remove the use of global data as it is
3569         bad practice.
3570         (Augment_Library_Graph): Update the parameter profile.
3571         (Is_Visited, Set_Is_Visited): Remove.
3572         (Visit_Elaboration_Root, Visit_Elaboration_Roots): Update the
3573         parameter profile and comment on usage.
3574         (Visit_Vertex): Likewise.  Also keep track of which invocation
3575         edge activates a task.
3576         * bindo-augmentors.ads (Augment_Library_Graph): Update the
3577         parameter profile and comment on usage.
3578         * bindo-builders.adb (Create_Forced_Edge,
3579         Create_Spec_And_Body_Edge, Create_With_Edge): Update the call to
3580         Add_Edge.
3581         * bindo-diagnostics.adb: Add with end use clauses for Restrict
3582         and Rident.
3583         (Output_Dynamic_Model_Suggestions): Remove.
3584         (Output_Invocation_Related_Suggestions): New routine.
3585         (Output_Suggestions): Output all invocation-related suggestions
3586         together.
3587         * bindo-elaborators.adb: Remove types Comparator_Ptr and
3588         Predicate_Ptr.
3589         (Find_Best_Vertex): Update the parameter profile.
3590         * bindo-graphs.adb (Activates_Task): New routine.
3591         (Add_Body_Before_Spec_Edge): Update the call to
3592         Add_Edge_With_Return.
3593         (Add_Edge): Update the parameter profile and the call to
3594         Add_Edge_With_Return.
3595         (Add_Edge_With_Return): Update the parameter profile and comment
3596         on usage.
3597         (At_Least_One_Edge_Satisfies): New routine.
3598         (Contains_Elaborate_All_Edge): Reimplement.
3599         (Contains_Static_Successor_Edge, Contains_Task_Activation): New
3600         routine.
3601         (Contains_Weak_Static_Successor): Remove.
3602         (Is_Static_Successor_Edge): New routine.
3603         * bindo-graphs.ads: Add types LGE_Predicate_Ptr,
3604         LGV_Comparator_Ptr, and LGV_Predicate_Ptr.  Update type
3605         Library_Graph_Edge_Attributes to capture whether an invocation
3606         edge activates a task.  Update the value of
3607         No_Library_Graph_Edge_Attributes.
3608         (Activates_Task): Update the parameter profile and comment on
3609         usage.
3610         (Contains_Static_Successor_Edge, Contains_Task_Activation): New
3611         routines.
3612         (Contains_Weak_Static_Successor): Remove.
3613         * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst:
3614         Update the documentation to reflect the new task-related advice.
3615         * gnat_ugn.texi: Regenerate.
3617 2019-07-09  Piotr Trojanek  <trojanek@adacore.com>
3619         * exp_util.adb (Containing_Package_With_Ext_Axioms): Replace
3620         low-level Ekind test with a high-level wrapper.
3622 2019-07-09  Arnaud Charlet  <charlet@adacore.com>
3624         * libgnat/s-memory.adb: Disable calls to Abort defer/undefer
3625         when ZCX_By_Default.
3627 2019-07-09  Javier Miranda  <miranda@adacore.com>
3629         * sem_ch13.adb (Rep_Item_Too_Early): Representation clauses are
3630         not allowed for a derivation of a generic type. Extend the
3631         current test to check that none of the parents is a generic
3632         type.
3634 2019-07-09  Hristian Kirtchev  <kirtchev@adacore.com>
3636         * exp_ch9.adb, exp_util.adb, repinfo.adb, sem_ch12.adb,
3637         sem_prag.adb, sem_res.adb, sem_spark.adb, sem_util.adb: Minor
3638         reformatting.
3640 2019-07-09  Ed Schonberg  <schonberg@adacore.com>
3642         * sem_res.adb (Resolve_Equality_Op): If the node was overloaded,
3643         set properly the entity to which the node has been resolved. The
3644         original entity is the first one found during analysis, and is
3645         not necessarily the resolved one.
3646         (Resolve_Op_Not): If the argument of negation is an overloaded
3647         equality operation, call its resolution directly given that the
3648         context type does not participate in overload resolution.
3650 2019-07-09  Hristian Kirtchev  <kirtchev@adacore.com>
3652         * bindo.adb: Remove with and use clauses for Debug.  Add with
3653         and use clauses for Opt.
3654         (Find_Elaboration_Order): Enable the v4.0 elaboration order. The
3655         v3.0 mechanism is now available under binder switch -H.
3656         * bindusg.adb (Display): Enable switch -H.
3657         * debug.adb: Free compiler switch -gnatd_G.  Free binder switch
3658         -d_N.
3659         * sem_elab.adb: Update the section on switches to remove
3660         -gnatd_G.
3661         (Invocation_Graph_Recording_OK): The invocation graph is now
3662         unconditionally recorded in ALI files.
3663         * switch-b.adb (Scan_Binder_Switches): Scan switch -H.
3664         * doc/gnat_ugn/building_executable_programs_with_gnat.rst:
3665         Update the documentation on compiler switches related to
3666         elaboration.  Update the documentation on binder switches to
3667         include switch -H.
3668         * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update
3669         the documentation on elaboration order handling in GNAT.
3670         * gnat_ugn.texi: Regenerate.
3672 2019-07-09  Eric Botcazou  <ebotcazou@adacore.com>
3674         * repinfo.adb (List_Entities): Disregard formals altogether.
3675         (List_Name): Properly escape the double quote in the JSON
3676         output.
3678 2019-07-09  Javier Miranda  <miranda@adacore.com>
3680         * exp_util.adb (Remove_Side_Effects): Preserve the
3681         Do_Range_Check flag.
3683 2019-07-09  Yannick Moy  <moy@adacore.com>
3685         * sinfo.ads: Refine comment for Do_Range_Check.
3687 2019-07-09  Yannick Moy  <moy@adacore.com>
3689         * exp_spark.adb (Expand_SPARK_N_Attribute_Reference): Expand
3690         attribute reference on Enum_Rep.
3692 2019-07-09  Ed Schonberg  <schonberg@adacore.com>
3694         * sem_ch12.adb (Instantiate_Formal_Package): Handle properly the
3695         case where the actual for a formal package in an instance is the
3696         current instance of an enclosing generic package.
3697         (Check_Formal_Packages): If the formal package declaration is
3698         box-initialized or lacks associations altogether, no internal
3699         instance was created to verify conformance, and there is no
3700         validating package to remove from tree.
3702 2019-07-09  Yannick Moy  <moy@adacore.com>
3704         * freeze.adb (Build_Renamed_Body): Do not set body to inline in
3705         GNATprove mode.
3707 2019-07-09  Yannick Moy  <moy@adacore.com>
3709         * exp_util.adb (Expand_Subtype_From_Expr): Still expand the type
3710         of static expressions in GNATprove_Mode.
3711         * sem_ch3.adb (Analyze_Object_Declaration): Remove obsolete
3712         special case for GNATprove_Mode.
3714 2019-07-09  Piotr Trojanek  <trojanek@adacore.com>
3716         * doc/gnat_rm/the_gnat_library.rst,
3717         doc/gnat_ugn/building_executable_programs_with_gnat.rst,
3718         erroutc.adb, libgnat/g-comlin.adb, libgnat/g-comlin.ads,
3719         libgnat/g-regexp.ads, libgnat/g-regpat.ads,
3720         libgnat/g-spipat.ads, libgnat/s-os_lib.ads,
3721         libgnat/s-regexp.ads: Reword "wild card" to "wildcard".
3722         * gnat_rm.texi, gnat_ugn.texi: Regenerate.
3724 2019-07-09  Yannick Moy  <moy@adacore.com>
3726         * sem_spark.adb (Check_Expression): Handle correctly implicit
3727         assignments as part of allocators and (extension) aggregates.
3728         (Get_Root_Object): Adapt for new path expressions.
3729         (Is_Path_Expression): Return True for (extension) aggregate.
3731 2019-07-09  Piotr Trojanek  <trojanek@adacore.com>
3733         * einfo.ads: Fix a typo.
3735 2019-07-09  Ed Schonberg  <schonberg@adacore.com>
3737         * sem_util.adb (Scope_Within_Or_Same): Handle properly task
3738         bodies and protected bodies, so that local variables within have
3739         their proper scopes after these constructs have been rewritten
3740         during expansion. This patch resembles but is not identical to
3741         the code in Scope_Within.
3743 2019-07-09  Arnaud Charlet  <charlet@adacore.com>
3745         * gnat1drv.adb (Adjust_Global_Switches): Set
3746         Dynamic_Elaboration_Checks to True in CodePeer mode.
3748 2019-07-09  Yannick Moy  <moy@adacore.com>
3750         * sem_spark.adb (Get_Perm_Or_Tree): Issue an error when
3751         encountering unknown global variable.
3753 2019-07-09  Yannick Moy  <moy@adacore.com>
3755         * sem_spark.adb (Check_Expression): Change signature to take an
3756         Extended_Checking_Mode, for handling read permission checking of
3757         sub-expressions in an assignment.
3758         (Check_Parameter_Or_Global): Adapt to new behavior of
3759         Check_Expression for mode Assign.
3760         (Check_Safe_Pointers): Do not analyze generic bodies.
3761         (Check_Assignment): Separate checking of the target of an
3762         assignment.
3764 2019-07-09  Eric Botcazou  <ebotcazou@adacore.com>
3766         * repinfo.ads (JSON format): Adjust.
3767         * repinfo.adb (Need_Blank_Line): Rename to...
3768         (Need_Separator): ...this.
3769         (Blank_Line): Rename to...
3770         (Write_Separator): ...this and add JSON specific handling.
3771         (List_Array_Info): Adjust to above renaming.
3772         (List_Object_Info): Likewise.
3773         (List_Record_Info): Likewise.
3774         (List_Subprogram_Info): Likewise.
3775         (List_Type_Info): Likewise.
3776         (List_Entities): Do not set Need_Blank_Line.
3777         (List_Rep_Info): Set Need_Separator and add JSON specific
3778         handling. Output a single JSON stream in the  normal case.
3780 2019-07-09  Arnaud Charlet  <charlet@adacore.com>
3782         * doc/gnat_ugn/the_gnat_compilation_model.rst: Update doc on
3783         -fdump-ada-spec now that we generate Ada 2012.
3784         * gnat_ugn.texi: Regenerate.
3786 2019-07-08  Eric Botcazou  <ebotcazou@adacore.com>
3788         * repinfo.adb (List_Common_Type_Info): New procedure extracted
3789         from...
3790         (List_Type_Info): ...here.  Call it for the common information,
3791         start with a blank line and output the linker section at the
3792         end, if any.
3793         (List_Mechanisms): Rename to...
3794         (List_Subprogram_Info): ...this.
3795         (List_Array_Info): Call List_Common_Type_Info.
3796         (List_Entities): Adjust to above change and renaming.
3797         (List_Record_Info): Call List_Common_Type_Info.
3799 2019-07-08  Dmitriy Anisimkov  <anisimko@adacore.com>
3801         * libgnat/g-sercom.ads
3802         (Serial_Port_Descriptor): New type.
3803         (Serial_Port): Add a comment, make it hold a
3804         Serial_Port_Descriptor.
3805         (To_Ada, To_C): New procedures.
3806         (Port_Data, Port_Data_Access): Remove types.
3807         * libgnat/g-sercom.adb (To_Ada): New stub.
3808         * libgnat/g-sercom__linux.adb, libgnat/g-sercom__mingw.adb:
3809         Update implementations accordingly.
3810         * s-oscons-tmplt.c: Bind Serial_Port_Descriptor to
3811         System.Win32.HANDLE on Windows, and to Interfaces.C.int on
3812         Linux. Add "Interfaces.C." prefix for other basic integer type
3813         bindings.
3814         * xoscons.adb (Output_Info): Remove the "Interfaces.C." prefix
3815         for subtypes generation.
3817 2019-07-08  Arnaud Charlet  <charlet@adacore.com>
3819         * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
3820         Update documentation on No_Exceptions restriction.
3821         * gnat_rm.texi: Regenerate.
3823 2019-07-08  Dmitriy Anisimkov  <anisimko@adacore.com>
3825         * libgnat/s-os_lib.adb: Do not call __gnat_kill for Invalid_Pid.
3827 2019-07-08  Piotr Trojanek  <trojanek@adacore.com>
3829         * sem_util.adb (Enclosing_Package_Or_Subprogram): Do not expect
3830         package and subprogram bodies.
3832 2019-07-08  Bob Duff  <duff@adacore.com>
3834         * doc/gnat_ugn/gnat_utility_programs.rst: Remove documentation
3835         of ignored GNATpp switch.
3837 2019-07-08  Hristian Kirtchev  <kirtchev@adacore.com>
3839         * doc/gnat_rm/implementation_defined_pragmas.rst:
3840         Update the documentation of pragma Initialize_Scalars.
3841         * gnat_rm.texi: Regenerate.
3843 2019-07-08  Javier Miranda  <miranda@adacore.com>
3845         * exp_ch4.adb (Tagged_Membership): Fix regression silently
3846         introduced in r260738 that erroneouslusy causes the evaluation
3847         to True of the membership test when the left operand of the
3848         membership test is a class-wide interface object and the right
3849         operand is a type that implements such interface type.
3851 2019-07-08  Hristian Kirtchev  <kirtchev@adacore.com>
3853         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
3854         register an address clause when its prefix denotes a generic
3855         formal object.
3857 2019-07-08  Hristian Kirtchev  <kirtchev@adacore.com>
3859         * bindo-diagnostics.adb (Diagnose_Cycle): Capture the presence
3860         of an Elaborate_All edge before iterating over the edges of the
3861         cycle.
3862         (Output_Elaborate_Body_Transition): Update the parameter profile
3863         and the comment on usage. Add a missing case where the edge is
3864         within the context of an Elaborate_All.
3865         (Output_Transition): Update the call to
3866         Output_Elaborate_Body_Transition.
3867         * bindo-graphs.ads, bindo-graphs.adb
3868         (Contains_Elaborate_All_Edge): New routine.
3870 2019-07-08  Piotr Trojanek  <trojanek@adacore.com>
3872         * lib-xref-spark_specific.adb (Create_Heap): Set dummy Etype for
3873         the fake __HEAP entity.
3875 2019-07-08  Daniel Mercier  <mercier@adacore.com>
3877         * gnat1drv.adb: Suppress warnings on memory representation in
3878         CodePeer compiler mode.
3880 2019-07-08  Nicolas Roche  <roche@adacore.com>
3882         * rtinit.c (__gnat_runtime_initialize): Remove dependency on
3883         CommandLineToArgvW.
3885 2019-07-08  Doug Rupp  <rupp@adacore.com>
3887         * Makefile.rtl: Handle vxworks7r2 in x86_64 and x86 vxworks7.
3889 2019-07-08  Dmitriy Anisimkov  <anisimko@adacore.com>
3891         * Makefile.rtl: Use g-sercom__linux.adb for all linuxes.
3893 2019-07-08  Yannick Moy  <moy@adacore.com>
3895         * expander.adb (Expand): Do not reset Analyzed flag always.
3896         * sem_eval.adb (Fold_Ureal): Mark node as analyzed.
3898 2019-07-08  Ed Schonberg  <schonberg@adacore.com>
3900         * exp_ch9.adb (Expand_N_Timed_Entry_Call): Do not insert twice
3901         the assignment statement that computes the delay value, to
3902         prevent improper tree sharing when the value is a type
3903         conversion and Float_Overflow checks are enabled.
3905 2019-07-08  Hristian Kirtchev  <kirtchev@adacore.com>
3907         * bindo.adb: Update the section on terminology to include new
3908         concepts.  Update the section on switches to include new
3909         entries.
3910         * bindo.ads: Add type Precedence_Kind.
3911         * bindo-builders.adb: Add with and use clauses for Debug and
3912         Bindo.Validators.  Add use clauses for
3913         Bindo.Validators.Invocation_Graph_Validators and
3914         Bindo.Validators.Library_Graph_Validators.
3915         (Build_Invocation_Graph): Validate the graph immediately after
3916         it was built.
3917         (Build_Library_Graph): Update the parameter profile. The
3918         creation of the graph is now elaboration model-agnostic.
3919         Validate the graph immediately after it was built.
3920         (Create_With_Edge): Create regular with edges for Elaborate and
3921         Elaborate_All edges when the appropriate debug switches are in
3922         effect.
3923         * bindo-builders.ads (Build_Library_Graph): Update the parameter
3924         profile.
3925         * bindo-diagnostics.adb (Diagnose_Cycle): Track the presence of
3926         an Elaborate_All edge throughout the inspection of the cycle's
3927         edges.
3928         (Output_Dynamic_Model_Suggestions): Output the suggestion only
3929         when the cycle contains at least one weak edge where the
3930         successor was statically elaborated.
3931         (Output_Elaborate_Body_Transition, Output_Forced_Transition,
3932         Output_With_Transition): Update the assertions.
3933         * bindo-elaborators.adb: Remove use clauses for
3934         Bindo.Validators.Invocation_Graph_Validators and
3935         Bindo.Validators.Library_Graph_Validators.  Remove strings
3936         Add_To_All_Candidates_Msg and Add_To_Comp_Candidates_Msg.
3937         Remove type String_Ptr.
3938         (Add_Vertex, Add_Vertex_If_Elaborable, Create_All_Candidates_Set
3939         Create_Component_Candidates_Set): Remove.
3940         (Create_Component_Vertex_Sets, Create_Vertex_Sets): New routine.
3941         (Elaborate_Component): Update the parameter profile and the
3942         comment on usage.  Reimplement the elaboration of a component.
3943         The algorithm will now attempt to elaborate as many vertices
3944         possible. If this is not possible, and a weakly elaborable
3945         vertex is available use unit was compiled using the dynamic
3946         model, the algorithm will elaborate it.
3947         (Elaborate_Library_Graph): Reimplement the elaboration of the
3948         graph. The algorithm will now attempt to elaborate as many
3949         vertices along with their components as possible. If this is not
3950         possible, and a weakly elaborable vertex is available use unit
3951         was compiled using the dynamic model, the algorithm will
3952         elaborate it along with its component.
3953         (Elaborate_Units): Merge with the functionality of
3954         Elaborate_Units_Common.
3955         (Elaborate_Units_Common, Elaborate_Units_Dynamic,
3956         Elaborate_Units_Static): Remove.
3957         (Elaborate_Vertex): Update the parameter profile and the comment
3958         on usage.  Reimplemented.
3959         (Find_Best_Candidate): Remove.
3960         (Find_Best_Elaborable_Vertex, Find_Best_Vertex,
3961         Find_Best_Weakly_Elaborable_Vertex, Has_Elaborable_Body,
3962         Insert_Elaborable_Successor, Insert_Vertex): New routines.
3963         (Is_Better_Candidate): Remove.
3964         (Is_Better_Elaborable_Vertex,
3965         Is_Better_Weakly_Elaborable_Vertex,
3966         Is_Suitable_Elaborable_Vertex,
3967         Is_Suitable_Weakly_Elaborable_Vertex): New routines.
3968         (Trace_Candidate_Vertices): Remove.
3969         (Trace_Component): Output the number of strong and weak
3970         predecessors.
3971         (Trace_Unelaborated_Vertices): Remove.
3972         (Trace_Vertex): Output the number of strong and weak
3973         predecessors.
3974         (Trace_Vertices): New routine.
3975         (Update_Successor, Update_Successors): Update the parameter
3976         profile and the comment on usage.
3977         * bindo-graphs.adb: Remove type Precedence_Kind.
3978         (Add_Edge_With_Return): Update the increment of pending
3979         predecessors.
3980         (Add_Vertex): Provide default values for strong and weak
3981         predecessors.
3982         (Complementary_Vertex): Move the initial declaration to the
3983         spec. Update the parameter profile and the comment on usage.
3984         (Contains_Weak_Static_Successor): New routine.
3985         (Create): Update the parameter profile. The creation of the
3986         graph is now elaboration model-agnostic.
3987         (Decrement_Pending_Predecessors): Update the parameter profile
3988         and the comment on usage. Reimplemented.
3989         (Delete_Edge): Update the decrement of pending predecesors.
3990         (Has_Elaborate_Body): Do not treat a vertex as being subject to
3991         Elaborate_Body when a debug switch is in effect.
3992         (Increment_Pending_Predecessors): Update the parameter profile
3993         and the comment on usage. Reimplemented.
3994         (Is_Elaborable_Component): Reimplemented.
3995         (Is_Elaborable_Vertex): Move the initial declaration to the
3996         spec.  Reimplemented.
3997         (Is_Elaborate_Body_Pair): New routine.
3998         (Is_Dynamically_Elaborated): Update the parameter profile.
3999         Reimplemented.
4000         (Is_Weakly_Elaborable_Vertex): New routine.
4001         (Pending_Predecessors): Removed.
4002         (Pending_Predecessors_For_Elaboration,
4003         Pending_Strong_Predecessors, Pending_Weak_Predecessors,
4004         Update_Pending_Predecessors): New routines.
4005         (Update_Pending_Predecessors_Of_Components): Update the
4006         increment of pending predecessors.
4007         * bindo-graphs.ads: Update the components of type
4008         Component_Attributes.  Update the components of type
4009         Library_Graph_Attributes.  Update the components of type
4010         Library_Graph_Vertex_Attributes.  Update the initialization of
4011         No_Component_Attributes.  Update the initialization of
4012         No_Library_Graph_Vertex_Attributes.
4013         (Complementary_Vertex, Contains_Weak_Static_Successor): New
4014         routines.
4015         (Create): Update the parameter profile and the comment on usage.
4016         (Decrement_Pending_Predecessors, Is_Dynamically_Elaborated):
4017         Update the parameter profile and the comment on usage.
4018         (Is_Elaborate_Body_Pair, Is_Weakly_Elaborable_Vertex): New
4019         routines.
4020         (Pending_Predecessors): Removed.
4021         (Pending_Predecessors_For_Elaboration,
4022         Pending_Strong_Predecessors, Pending_Weak_Predecessors): New
4023         routines.
4024         * bindo-writers.adb (Write_Components): Moved from the spec.
4025         (Write_Component): Output the strong and weak predecessors.
4026         (Write_Library_Graph): Output the components as part of the
4027         graph.
4028         (Write_Library_Graph_Vertex): Output the strong and weak
4029         predecessors.
4030         * bindo-writers.ads (Write_Components): Moved to the body.
4031         * debug.adb: Add and document new GNATbind switches -d_a, -d_b,
4032         -d_e.
4033         * bindo-validators.adb: Minor reformattings.
4035 2019-07-08  Bob Duff  <duff@adacore.com>
4037         * libgnat/g-sercom.ads, libgnat/g-sercom__linux.adb (Data_Rate):
4038         Support additional data rates.
4040 2019-07-08  Olivier Hainque  <hainque@adacore.com>
4042         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Don't request
4043         DECL_ARTIFICIAL_P on elab proc declarations.
4045 2019-07-08  Eric Botcazou  <ebotcazou@adacore.com>
4047         * repinfo.adb (List_Record_Info): Declare Incomplete_Layout and
4048         Not_In_Extended_Main local exceptions.
4049         (List_Structural_Record_Layout): For an extension, raise the
4050         former if the parent subtype has not been built and the latter
4051         if it is not declared in the main source unit.  Fall back to the
4052         flat layout if either exception has been raised.
4054 2019-07-08  Ed Schonberg  <schonberg@adacore.com>
4056         * libgnat/a-strfix.adb (Delete): The RM describes the semantics
4057         of Delete as equivalent to that of Replace_String with a null
4058         argument. As a result, deleting a null string that starts past
4059         the end of its argument is a noop and must not raise
4060         Index_Error.
4062 2019-07-08  Javier Miranda  <miranda@adacore.com>
4064         * exp_disp.adb (Register_Primitive): When registering a
4065         primitive in the secondary dispatch table, handle primitive
4066         inherited through several levels of type derivation (required to
4067         properly handle inherited 'null' primitive).
4069 2019-07-08  Bob Duff  <duff@adacore.com>
4071         * doc/gnat_ugn/gnat_utility_programs.rst: Document handling of
4072         preprocessor directives in GNATpp.
4074 2019-07-08  Javier Miranda  <miranda@adacore.com>
4076         * gnat1drv.adb (Post_Compilation_Validation_Checks:
4077         Validate_Compile_Time_Warning_Errors is now located in sem_prag
4078         (instead of sem_ch13).
4079         * sem_ch13.ads (Validate_Compile_Time_Warning_Error,
4080         Validate_Compile_Time_Warning_Errors): Move to sem_prag.
4081         * sem_ch13.adb
4082         (Compile_Time_Warnings_Errors): Move to sem_prag.
4083         (Initialize): Remove initialization of table
4084         Compile_Time_Warning_Errors.
4085         (Validate_Compile_Time_Warning_Error,
4086         Validate_Compile_Time_Warning_Errors): Move to sem_prag.
4087         * sem_prag.ads (Validate_Compile_Time_Warning_Errors): New
4088         procedure.
4089         * sem_prag.adb (Initialize): Initialize table
4090         Compile_Time_Warning_Errors.
4092 2019-07-08  Ed Schonberg  <schonberg@adacore.com>
4094         * sem_ch13.adb (Analyze_Aspect_Specifications): For a
4095         pre/postcondition of a generic subprogram declaration, do not
4096         use Relocate_Node on the aspect expression to construct the
4097         corresponding attribute specification, to prevent tree anomalies
4098         when the expression is a call with named actual parameters.
4100 2019-07-08  Javier Miranda  <miranda@adacore.com>
4102         * sem_attr.adb (Analyze_Attribute [Attribute_Size]): For pragmas
4103         used to report user defined compile time warning or errors
4104         handle 'Size for types with known static RM size.
4106 2019-07-08  Justin Squirek  <squirek@adacore.com>
4108         * exp_imgv.adb (Build_Enumeration_Image_Tables): Default SSO for
4109         the building of image tables.
4110         (Expand_Image_Attribute): Minor cleanup.
4112 2019-07-08  Dmitriy Anisimkov  <anisimko@adacore.com>
4114         * libgnat/g-socket.ads, libgnat/g-socket.adb: Improve
4115         documentation.
4116         (Get_Socket_Option, Set_Socket_Option): Remove default value for
4117         the Level formal.
4119 2019-07-08  Ed Schonberg  <schonberg@adacore.com>
4121         * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): For an
4122         unanalized aspect in a generic context that has not been
4123         analyzed yet, if the aspect applies to a type, place the type on
4124         the scope stack to make its components visible, before checking
4125         conformance with the version of the expression analyzed at the
4126         freeze point.
4128 2019-07-05  Justin Squirek  <squirek@adacore.com>
4130         * checks.adb (Apply_Accessibility_Check): Add logic to fetch the
4131         function result accessibility level if one is required within
4132         the generated check.
4133         * exp_ch6.adb (Needs_Result_Accessibility_Level): Modify
4134         controlling elsif block to handle more cases such as anonymous
4135         access results and disable checking for coextensions.
4137 2019-07-05  Ed Schonberg  <schonberg@adacore.com>
4139         * sem_ch9.adb (Analyze_Accept_Statement): If this is an illegal
4140         accept statement for an enclosing entry abandon analysis to
4141         prevent scope mismatches and potential infinite loops in
4142         compiler.
4144 2019-07-05  Hristian Kirtchev  <kirtchev@adacore.com>
4146         * ali.adb (For_Each_Invocation_Construct,
4147         For_Each_Invocation_Relation): New version.
4148         (Scan_ALI): Initialize field Invocation_Graph_Encoding.
4149         (Set_Invocation_Graph_Encoding): Update the setting of the
4150         invocation graph encoding.
4151         * ali.ads: Move field Invocation_Graph_Encoding from Unit_Record
4152         to ALI_Record because the encoding applies to the whole ALI,
4153         rather than one of the units (spec or body) for which the ALI
4154         file was created.
4155         (For_Each_Invocation_Construct, For_Each_Invocation_Relation):
4156         New version.
4157         * bindo.adb: Update the section on switches.  Complete the
4158         section of debugging elaboration order issues.
4159         (Find_Elaboration_Order): Prepare the routine for the switch
4160         from the old to the new elaboration order mechanism.
4161         * bindo-diagnostics.adb (Find_And_Output_Invocation_Paths):
4162         Manage a visited set used by Visit_Vertex.
4163         (Output_All_Cycles_Suggestions,
4164         Output_Dynamic_Model_Suggestions): Clarify the nature of the
4165         suggested switch.
4166         (Output_Elaborate_Body_Transition): Update the diagnostic to
4167         emit a better message.
4168         (Output_Forced_Suggestions, Output_Full_Encoding_Suggestions):
4169         Clarify the nature of the suggested switch.
4170         (Visit_Vertex): Update the parameter profile to add a set of
4171         invokers visited during the transition. This set prevents
4172         infinite exploration of the graph in case the invocations are
4173         recursive.
4174         * bindo-elaborators.adb: Add a use clause for
4175         Bindo.Writers.Dependency_Writers.
4176         (Elaborate_Units_Common): Output the library graph after it has
4177         been augmented with invocation edges. Output just the components
4178         instead of outputting the whole library graph again.
4179         (Elaborate_Units_Dynamic, Elaborate_Units_Static): Output the
4180         dependencies as expressed in the library graph.
4181         * bindo-units.adb (Invocation_Graph_Encoding): Update the
4182         extraction of the invocation graph encoding.
4183         * bindo-writers.adb: Add with and use clauses for Binderr and
4184         Butil.
4185         (palgc, plgc): New debug routine.
4186         (Write_Components): Moved to the spec. Add a header for the
4187         output.
4188         (Write_Dependencies, Write_Dependencies_Of_Vertex,
4189         Write_Dependency_Edge): New routine.
4190         (Write_Elaboration_Order): Update the logic to follow the format
4191         of Binde's order output.
4192         (Write_Library_Graph): Do not output the components every time
4193         the graph is written.
4194         (Write_Unit): Output the invocation graph encoding of the unit.
4195         Output the invocation constructs and relations for the unit
4196         only.
4197         * bindo-writers.ads (Write_Components): Moved from the body.
4198         (Write_Dependencies): New routine.
4199         * bindusg.adb: Prepare the routine for the switch from the old
4200         to the new elaboration order mechanism.
4201         * debug.adb: Binder switch -d_O is now not associated with any
4202         functionality.
4203         * einfo.adb (Is_Elaboration_Target): The attribute applies to
4204         packages, as specified by the comment on the attribute usage.
4205         * opt.ads: Add a global flag which controls the choice between
4206         the new and the legacy elaboration order mechanism.
4207         * sem_elab.adb: Add Package_Target to type Target_Kind.
4208         (Build_Elaborate_Body_Procedure, Build_Elaborate_Procedure,
4209         Build_Elaborate_Spec_Procedure, Check_Elaboration_Scenarios,
4210         Check_SPARK_Model_In_Effect): Use Main_Unit_Entity to obtain the
4211         entity of the main unit.
4212         (Create_Package_Rep): New routine.
4213         (Create_Target_Rep): Add processing for packages.
4214         (Declaration_Placement_Of_Node, Has_Prior_Elaboration): Use
4215         Main_Unit_Entity to obtain the entity of the main
4216          unit.
4217         (Invocation_Graph_Recording_OK): Prepare the routine for the
4218         switch from the old to the new elaboration order mechanism.
4219         (Main_Unit_Entity): New routine.
4220         (Meet_Elaboration_Requirement,
4221         Process_Conditional_ABE_Variable_Reference): Use
4222         Main_Unit_Entity to obtain the entity of the main unit.
4223         (Process_Invocation_Instantiation): New routine.
4224         (Process_Invocation_Scenario): Add processing for
4225         instantiations.
4226         * switch-b.adb (Scan_Binder_Switches): Prepare the routine for
4227         the switch from the old to the new elaboration order mechanism.
4229 2019-07-05  Joffrey Huguet  <huguet@adacore.com>
4231         * libgnat/a-textio.adb: Add abstract state refinment.
4232         * libgnat/a-textio.ads: Add File_System abstract state.  Add
4233         global contracts, contract cases, preconditions and
4234         postconditions to procedures and functions.
4235         (Set_Input, Set_Output, Set_Error, Standard_Input,
4236         Standard_Output, Standard_Error, Current_Input, Current_Output,
4237         Current_Error): Turn SPARK_Mode off.
4238         (Get_Line): Turn SPARK_Mode off on Get_Line functions.
4239         * libgnat/a-tideio.ads, libgnat/a-tienio.ads,
4240         libgnat/a-tifiio.ads, libgnat/a-tiflio.ads,
4241         libgnat/a-tiinio.ads, libgnat/a-timoio.ads: Add global
4242         contracts, contract cases, preconditions and postconditions to
4243         procedures and functions.
4245 2019-07-05  Arnaud Charlet  <charlet@adacore.com>
4247         * doc/gnat_ugn/platform_specific_information.rst: Refresh doc on
4248         installing from the command line on Windows.  Remove obsolete
4249         part.
4250         * gnat_ugn.texi: Regenerate.
4252 2019-07-05  Vasiliy Fofanov  <fofanov@adacore.com>
4254         * libgnat/a-wichha.ads (Is_Alphanumeric): Replace comment with
4255         the correct one.  Also capitalize references to False
4256         throughout.
4258 2019-07-05  Eric Botcazou  <ebotcazou@adacore.com>
4260         * exp_ch4.adb (Expand_N_Indexed_Component): Do not expand actual
4261         parameters of function calls here either.
4263 2019-07-05  Hristian Kirtchev  <kirtchev@adacore.com>
4265         * bindo-units.adb, checks.adb, exp_attr.adb, exp_ch3.adb,
4266         exp_ch4.adb, exp_pakd.adb, lib-writ.adb, libgnat/g-traceb.adb,
4267         libgnat/g-traceb.ads, libgnat/s-stratt.ads, sem_aux.ads,
4268         sem_util.adb: Minor reformatting.
4270 2019-07-05  Ed Schonberg  <schonberg@adacore.com>
4272         * sem_ch13.adb (Build_Predicate_Functions): If a subtype that
4273         carries a static predicate aspect is frozen immediately after
4274         its declaration, ensure that the generated function body created
4275         for predicate checking is inserted after the corresponding
4276         subprogram declaration, which is created at the point the
4277         declaration is elaborated.
4279 2019-07-05  Hristian Kirtchev  <kirtchev@adacore.com>
4281         * exp_ch7.adb (Cleanup_Record): Use the underlying type when
4282         checking for components with tasks.
4284 2019-07-05  Arnaud Charlet  <charlet@adacore.com>
4286         * libgnarl/s-osinte__linux.ads: Link with -lrt before -lpthread.
4288 2019-07-05  Ed Schonberg  <schonberg@adacore.com>
4290         * exp_pakd.adb (Expand_Bit_Packed_Element_Set): Add explicit
4291         range checks when the index type of the bit-packed array is an
4292         enumeration type with a non-standard representation,
4294 2019-07-05  Hristian Kirtchev  <kirtchev@adacore.com>
4296         * sem_res.adb (Is_Control_Flow_Statement): Delay statements
4297         contain an expression, which in turn may have side effects and
4298         affect the infinite recursion. As a result, delay statements
4299         should not be treated specially.
4301 2019-07-05  Arnaud Charlet  <charlet@adacore.com>
4303         * libgnarl/s-linux.ads, libgnarl/s-linux__alpha.ads,
4304         libgnarl/s-linux__android.ads, libgnarl/s-linux__hppa.ads,
4305         libgnarl/s-linux__mips.ads, libgnarl/s-linux__riscv.ads,
4306         libgnarl/s-linux__sparc.ads: Fix typos in comments.
4308 2019-07-05  Hristian Kirtchev  <kirtchev@adacore.com>
4310         * sem_res.adb (Check_Infinite_Recursion): Reimplemented.
4311         (Enclosing_Declaration_Or_Statement,
4312         Invoked_With_Different_Arguments, Is_Conditional_Statement,
4313         Is_Control_Flow_Statement, Is_Immediately_Within_Body,
4314         Is_Raise_Idiom, Is_Raise_Statement, Is_Sole_Statement,
4315         Preceded_By_Control_Flow_Statement,
4316         Within_Conditional_Statement): New routines.
4318 2019-07-05  Javier Miranda  <miranda@adacore.com>
4320         * exp_ch4.adb (Expand_N_Type_Conversion): Do not apply an
4321         accessibility check when the conversion is an access to
4322         class-wide interface type and it is an actual parameter.
4323         * exp_ch6.adb (Expand_Call_Helper): Add documentation on the
4324         accessibility level of an anonymous allocator defining the value
4325         of an access parameter.
4326         * sem_util.ads, sem_util.adb (Dynamic_Accessibility_Level): Add
4327         support for an anonymous allocator whose type is that of a
4328         stand-alone object of an anonymous access to object type.
4330 2019-07-05  Piotr Trojanek  <trojanek@adacore.com>
4332         * einfo.ads, sem_res.adb: Typo fixes in comments.
4334 2019-07-05  Bob Duff  <duff@adacore.com>
4336         * exp_ch6.adb (Is_Build_In_Place_Function): Narrow the check for
4337         Has_Foreign_Convention to the imported case only.  If a
4338         build-in-place function is exported, and called from Ada code,
4339         build-in-place protocols should be used.
4341 2019-07-05  Ed Schonberg  <schonberg@adacore.com>
4343         * sem_util.adb (Encloing_Subprogram): If Enclosing_Dynamic_Scope
4344         is a loop, continue climbing the scope stack to find the
4345         enclosing subprogram.
4346         (Gather_Components): Handle properly a choice in a record
4347         aggregate that is given by a subtype with a static predicate.
4349 2019-07-05  Javier Miranda  <miranda@adacore.com>
4351         * debug.adb (-gnatd.K): Leave available this switch.
4352         * contracts.adb (Build_And_Analyze_Contract_Only_Subprograms):
4353         Remove.
4354         * scil_ll.ads, scil_ll.adb (Contract_Only_Body_Flag,
4355         Contract_Only_Body_Nodes, Get_Contract_Only_Body,
4356         Is_Contract_Only_Body, Set_Contract_Only_Body): Remove.
4358 2019-07-05  Pierre-Marie de Rodat  <derodat@adacore.com>
4360         * libgnat/a-strunb.ads: Import documentation from the RM
4362 2019-07-05  Pierre-Marie de Rodat  <derodat@adacore.com>
4364         * libgnat/a-strfix.ads: Import documentation from the RM
4366 2019-07-05  Yannick Moy  <moy@adacore.com>
4368         * adabkend.adb (Scan_Back_End_Switches): Accept -Og and -Ofast
4369         switches.
4371 2019-07-05  Hristian Kirtchev  <kirtchev@adacore.com>
4373         * ali.adb: Relocate types Invocation_Construct_Record,
4374         Invocation_Relation_Record, and Invocation_Signature_Record to
4375         the body of ALI.  Relocate tables Invocation_Constructs,
4376         Invocation_Relations, and Invocation_Signatures to the body of
4377         ALI.  Remove type Body_Placement_Codes.  Add new types
4378         Declaration_Placement_Codes, and
4379         Invocation_Graph_Encoding_Codes.  Update the literals of type
4380         Invocation_Graph_Line_Codes.
4381         (Add_Invocation_Construct): Update the parameter profile. Add an
4382         invocation construct built from all attributes provided.
4383         (Add_Invocation_Relation): Update the parameter profile. Add an
4384         invocation relation built from all attributes provided.
4385         (Body_Placement): New routine.
4386         (Body_Placement_Kind_To_Code, Code_To_Body_Placement_Kind):
4387         Removed.
4388         (Code_To_Declaration_Placement_Kind,
4389         Code_To_Invocation_Graph_Encoding_Kind, Column,
4390         Declaration_Placement_Kind_To_Code, Extra,
4391         For_Each_Invocation_Construct, For_Each_Invocation_Relation,
4392         Invocation_Graph_Encoding,
4393         Invocation_Graph_Encoding_Kind_To_Code, Invoker, Kind, Line,
4394         Locations, Name): New routine.
4395         (Scan_Invocation_Construct_Line): Reimplement the scanning
4396         mechanism.
4397         (Scan_Invocation_Graph_Attributes_Line): New routine.
4398         (Scan_Invocation_Graph_Line): Use a case statement to dispatch.
4399         (Scan_Invocation_Relation_Line): Reimplement the scanning
4400         mechanism.
4401         (Scope): New routine.
4402         (Set_Invocation_Graph_Encoding, Signature, Spec_Placement,
4403         Target): New routine.
4404         * ali.ads: Add new type Invocation_Graph_Encoding_Kind.  Add
4405         component Invocation_Graph_Encoding to type Unit_Record.
4406         Relocate various types and data structures to the body of ALI.
4407         (Add_Invocation_Construct, Add_Invocation_Relation): Update the
4408         parameter profile.
4409         (Body_Placement): New routine.
4410         (Body_Placement_Kind_To_Code, Code_To_Body_Placement_Kind):
4411         Removed.
4412         (Code_To_Declaration_Placement_Kind,
4413         Code_To_Invocation_Graph_Encoding_Kind, Column,
4414         Declaration_Placement_Kind_To_Code, Extra,
4415         For_Each_Invocation_Construct, For_Each_Invocation_Relation,
4416         Invocation_Graph_Encoding,
4417         Invocation_Graph_Encoding_Kind_To_Code, Invoker, Kind, Line,
4418         Locations, Name, Scope, Set_Invocation_Graph_Encoding,
4419         Signature, Spec_Placement, Target): New routine.
4420         * bindo.adb: Add with clause for Binde.  Add with and use
4421         clauses for Debug.  Update the documentation.  Add new switches.
4422         (Find_Elaboration_Order): Dispatch to the proper elaboration
4423         mechanism.
4424         * bindo-augmentors.adb:
4425         Remove with and use clauses for GNAT and GNAT.Sets.  Remove
4426         membership set VS.  Update the parameter profiles of most
4427         routines to use better parameter names.  Update the
4428         implementation of most routine to use the new parameter names.
4429         Remove various redundant assertions.
4430         * bindo-builders.adb: Use better names for instantiated data
4431         structures. Update all references to these names.  Update the
4432         parameter profiles of most routines to use better parameter
4433         names.  Update the implementation of most routine to use the new
4434         parameter names.
4435         (Build_Library_Graph): Update the parameter profile. Update the
4436         call to Create.
4437         (Create_Vertex): Reimplemented.
4438         (Declaration_Placement_Vertex): New routine.
4439         * bindo-builders.ads (Build_Library_Graph): Update the parameter
4440         profile and comment on usage.
4441         * bindo-diagnostics.adb: Almost a new unit.
4442         * bindo-diagnostics.ads: Add a use clause for
4443         Bindo.Graphs.Invocation_Graphs.  Remove package
4444         Cycle_Diagnostics.
4445         (Diagnose_Circularities): New routine.
4446         * bindo-elaborators.adb: Remove the with and use clauses for
4447         Binderr and GNAT.Sets.  Remove the use clause for
4448         Bindo.Diagnostics.Cycle_Diagnostics.  Remove membership set VS.
4449         Update the parameter profiles of most routines to use better
4450         parameter names.  Update the implementation of most routine to
4451         use the new parameter names.  (Elaborate_Units_Common): Update
4452         the parameter profile. Pass an infication to the library graph
4453         builder whether the dynamic model is in effect.
4454         (Elaborate_Units_Dynamic, Elaborate_Units_Static): Use
4455         Diagnose_Circularities to provide diagnostics.
4456         (Update_Successor): Use routine In_Same_Component to determine
4457         whether the predecessor and successor reside in different
4458         components.
4459         * bindo-graphs.adb: Add with and use clauses for Butil, Debug,
4460         Output, and Bindo.Writers.  Remove with and use clauses for
4461         GNAT.Lists.  Update the parameter profiles of most routines to
4462         use better parameter names.  Update the implementation of most
4463         routine to use the new parameter names.  Remove various
4464         redundant assertions.  Remove doubly linked list EL.  Add new
4465         type Precedence_Kind.
4466         (Add_Cycle): New routine.
4467         (Add_Vertex): Update the parameter profile. Update the creation
4468         of vertex attributes.
4469         (Add_Vertex_And_Complement, Body_Vertex, Column,
4470         Complementary_Vertex, Copy_Cycle_Path, Cycle_Kind_Of): New
4471         routines.
4472         (Destroy_Invocation_Graph_Edge, Destroy_Library_Graph_Cycle,
4473         Destroy_Library_Graph_Edge, Extra, File_Name,
4474         Find_All_Cycles_Through_Vertex, Find_All_Cycles_With_Edge,
4475         Find_Cycles, Find_First_Lower_Precedence_Cycle,
4476         Get_LGC_Attributes, Has_Next, Hash_Library_Graph_Cycle,
4477         Hash_Library_Graph_Cycle_Attributes, Highest_Precedence_Cycle,
4478         Highest_Precedence_Edge, In_Same_Component, Insert_And_Sort,
4479         Invocation_Edge_Count, Invocation_Graph_Encoding,
4480         Is_Cycle_Initiating_Edge, Is_Cyclic_Edge,
4481         Is_Cyclic_Elaborate_All_Edge, Is_Cyclic_Elaborate_Body_Edge,
4482         Is_Cyclic_Elaborate_Edge, Is_Cyclic_Forced_Edge,
4483         Is_Cyclic_Invocation_Edge, Is_Cyclic_With_Edge,
4484         Is_Dynamically_Elaborated, Is_Elaborate_All_Edge,
4485         Is_Elaborate_Body_Edge, Is_Elaborate_Edge: New routines.
4486         (Is_Existing_Predecessor_Successor_Relation): Removed.
4487         (Is_Forced_Edge, Is_Invocation_Edge, Is_Recorded_Cycle,
4488         Is_Recorded_Edge, Is_With_Edge, Iterate_Edges_Of_Cycle, Kind,
4489         Length): New routine.
4490         (Lib_Vertex): Removed.
4491         (Line, Links_Vertices_In_Same_Component,
4492         Maximum_Invocation_Edge_Count, Next, Normalize_And_Add_Cycle,
4493         Normalize_Cycle_Path, Number_Of_Cycles, Path, Precedence,
4494         Remove_Vertex_And_Complement, Sequence_Next_Cycle): New routines.
4495         (Sequence_Next_IGE_Id): Renamed to Sequence_Next_Edge.
4496         (Sequence_Next_IGV_Id): Renamed to Sequence_Next_Vertex.
4497         (Sequence_Next_LGE_Id): Renamed to Sequence_Next_Edge.
4498         (Sequence_Next_LGV_Id): Renamed to Sequence_Next_Vertex.
4499         (Set_Is_Existing_Predecessor_Successor_Relation): Removed.
4500         (Set_Is_Recorded_Cycle, Set_Is_Recorded_Edge,
4501         Set_LGC_Attributes, Spec_Vertex, Trace_Cycle, Trace_Edge,
4502         Trace_Eol, Trace_Vertex): New routines.
4503         * bindo-graphs.ads: Add with and use clauses for Types and
4504         GNAT.Lists.  Update the parameter profiles of most routines to
4505         use better parameter names.  Update the implementation of most
4506         routine to use the new parameter names.  Add the new
4507         instantiated data structures IGE_Lists, IGV_Sets, LGC_Lists,
4508         LGE_Lists, LGE_Sets, LGV_Sets, and RC_Sets.  Add new type
4509         Library_Graph_Cycle_Id along with an empty and initial value.
4510         Remove component Lib_Vertex and add new components Body_Vertex
4511         and Spec_Vertex to type Invocation_Graph_Vertex_Attributes.  Add
4512         new type Library_Graph_Cycle_Kind.  Add new iterators
4513         All_Cycle_Iterator and Edges_Of_Cycle_Iterator.  Add new type
4514         Library_Graph_Cycle_Attributes.  Add new components
4515         Cycle_Attributes, Cycles, and Dynamically_Elaborated to type
4516         Library_Graph_Attributes.
4517         (Body_Vertex, Column, Destroy_Invocation_Graph_Edge,
4518         Destroy_Library_Graph_Cycle_Attributes,
4519         Destroy_Library_Graph_Edge, Extra, File_Name, Find_Cycles,
4520         Has_Elaborate_All_Cycle, Has_Next, Hash_Library_Graph_Cycle,
4521         Hash_Library_Graph_Cycle_Attributes, Highest_Precedence_Cycle,
4522         In_Same_Component, Invocation_Edge_Count,
4523         Invocation_Graph_Encoding, Is_Dynamically_Elaborated,
4524         Is_Elaborate_All_Edge, Is_Elaborate_Body_Edge,
4525         Is_Elaborate_Edge, Is_Forced_Edge, Is_Invocation_Edge,
4526         Is_With_Edge, Iterate_All_Cycles, Iterate_Edges_Of_Cycle, Kind):
4527         New routines.
4528         (Length, Lib_Vertex, (Line, Next, Number_Of_Cycles, Present,
4529         Same_Library_Graph_Cycle_Attributes, Spec_Vertex): New routines.
4530         * bindo-units.adb (File_Name, Invocation_Graph_Encoding): New
4531         routines.
4532         * bindo-units.ads: Add new instantiated data structure
4533         Unit_Sets.
4534         (File_Name, Invocation_Graph_Encoding): New routine.
4535         * bindo-validators.adb: Remove with and use clauses for GNAT and
4536         GNAT.Sets.  Remove membership set US.  Update the parameter
4537         profiles of most routines to use better parameter names.  Update
4538         the implementation of most routine to use the new parameter
4539         names.
4540         (Validate_Cycle, Validate_Cycle_Path, Validate_Cycles,
4541         Validate_Invocation_Graph_Vertex): Remove the validation of
4542         component Lib_Vertex. Add the validation of components
4543         Body_Vertex and Spec_Vertex.
4544         (Write_Error): New routine.
4545         * bindo-validators.ads (Validate_Cycles): New routine.
4546         * bindo-writers.adb: Update the parameter profiles of most
4547         routines to use better parameter names.  Update the
4548         implementation of most routine to use the new parameter names.
4549         (Write_Cycle, Write_Cyclic_Edge, Write_Cycles): New routines.
4550         (Write_Invocation_Graph_Vertex): Remove the output of component
4551         Lib_Vertex. Add the output of components Body_Vertex and
4552         Spec_Vertex.
4553         * bindo-writers.ads (Write_Cycles): New routine.
4554         * debug.adb: Use binder switches -d_C and -d_P, add
4555         documentation on their usage.
4556         * gnatbind.adb: Remove with and use clauses for Binde.  Delegate
4557         the choice of elaboration mechanism to Bindo.
4558         * lib-writ.adb (Column, Extra, Invoker, Kind, Line, Locations,
4559         Name, Placement, Scope, Signature, Target): Removed.
4560         (Write_Invocation_Graph): Moved at the top level.
4561         (Write_Invocation_Graph_Attributes): New routine.
4562         (Write_Invocation_Relation, Write_Invocation_Signature): Moved
4563         at the top level.
4564         * lib-writ.ads: Add a documentation section on invocation graph
4565         attributes.
4566         * sem_elab.adb (Body_Placement_Of): New routine.
4567         (Declare_Invocation_Construct): Update the call to
4568         Add_Invocation_Construct.
4569         (Declaration_Placement_Of_Node): New routine.
4570         (Get_Invocation_Attributes): Correct the retrieval of the
4571         enclosing subprogram where the postcondition procedure lives.
4572         (Placement_Of, Placement_Of_Node): Removed.
4573         (Record_Invocation_Graph): Record the encoding format used.
4574         (Record_Invocation_Graph_Encoding): New routine.
4575         (Record_Invocation_Relation): Update the call to
4576         Add_Invocation_Relation.
4577         (Spec_Placement_Of): Removed.
4578         * libgnat/g-lists.ads, libgnat/g-lists.adb (Equal): New routine.
4580 2019-07-05  Ed Schonberg  <schonberg@adacore.com>
4582         * checks.adb (Apply_Predicate_Check): Except within the
4583         subprogram body that defines the formal, do not apply predicate
4584         check on a formal IN parameter: such a check is redundant and
4585         its expansion can lead to out-of-scope references when it is
4586         originates in a function call in a precondition,
4588 2019-07-05  Yannick Moy  <moy@adacore.com>
4590         * sem_res.adb (Resolve_Call): Cannot inline in quantified
4591         expressions.
4592         * sem_util.adb, sem_util.ads (In_Quantified_Expression): New
4593         function.
4595 2019-07-05  Bob Duff  <duff@adacore.com>
4597         * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
4598         Fix typo.
4599         * gnat_rm.texi: Regenerate.
4601 2019-07-05  Bob Duff  <duff@adacore.com>
4603         * exp_attr.adb (Input): Take the No_Stream_Optimizations
4604         restriction into account.
4606 2019-07-05  Claire Dross  <dross@adacore.com>
4608         * libgnat/a-cofove.ads, libgnat/a-cofove.adb: Definite formal
4609         vectors are now always bounded so that they do not need to be
4610         limited anymore.
4612 2019-07-05  Dmitriy Anisimkov  <anisimko@adacore.com>
4614         * libgnat/g-traceb.ads, libgnat/g-traceb.adb (Call_Chain): New
4615         function.
4617 2019-07-04  James Clarke  <jrtc27@debian.org>
4619         * libgnarl/s-osinte__kfreebsd-gnu.ads (clockid_t): Make type
4620         definition public.
4621         (CLOCK_REALTIME): Make value public.
4623 2019-07-04  Javier Miranda  <miranda@adacore.com>
4625         * exp_tss.adb (Init_Proc): Adding missing support for access to
4626         subprograms and access to protected subprograms of non-default
4627         C++ constructors.
4629 2019-07-04  Eric Botcazou  <ebotcazou@adacore.com>
4631         * gnat1drv.adb (Adjust_Global_Switches): Use proper interface to
4632         set the validity settings in CodePeer mode.
4633         * par-load.adb (Load): Remove all code dealing with validity
4634         settings.
4635         * validsw.ads (Validity_Check_Copies): Alphabetize.
4636         * validsw.adb (Reset_Validity_Check_Options): Set all options to
4637         off.
4638         (Save_Validity_Check_Options): Save all options.
4640 2019-07-04  Hristian Kirtchev  <kirtchev@adacore.com>
4642         * exp_ch3.adb, exp_ch4.adb, exp_ch4.ads, exp_ch5.adb,
4643         exp_ch7.adb, exp_ch9.adb, exp_ch11.adb, exp_unst.adb,
4644         rtsfind.ads, sem_attr.adb, sem_ch10.adb, sem_ch12.adb,
4645         sem_ch13.adb, sem_dim.adb, sem_disp.adb, xref_lib.adb: Minor
4646         reformatting.
4648 2019-07-04  Joffrey Huguet  <huguet@adacore.com>
4650         * libgnarl/a-taside.ads: Add assertion policy to ignore
4651         preconditions.
4652         (Abort_Task, Is_Terminated, Is_Callable): Add preconditions.
4654 2019-07-04  Eric Botcazou  <ebotcazou@adacore.com>
4656         * doc/gnat_rm/implementation_defined_pragmas.rst: Fix
4657         capitalization and parenthesis glitches.
4658         * gnat_rm.texi: Regenerate.
4660 2019-07-04  Ed Schonberg  <schonberg@adacore.com>
4662         * sem_ch10.adb (Remove_Context_Clauses): Handle properly the
4663         removal of a limited_with_clause which appears in the library
4664         unit oF the main unit, when some other unit in the context has a
4665         regular with_clause on the same unit, to prevent spurious
4666         visibility errors in the subsequent analysis of pending instance
4667         bodies.
4669 2019-07-04  Hristian Kirtchev  <kirtchev@adacore.com>
4671         * sem_elab.adb: Add new type Elaboration_Phase_Status along with
4672         a global to keep track of the elaboration phase status.
4673         Initialize all internal data structures to Nil for services
4674         Elaborated_Units, Internal_Representation, and Scenario_Storage.
4675         (Build_Call_Marker): Do not create a call marker when the
4676         elaboration phase is not active.
4677         (Build_Variable_Reference_Marker): Do not create a call marker
4678         when the elaboration phase is not active.
4679         (Check_Elaboration_Scenarios): Destroy all internal structures
4680         when the elaboration phase does not have to run. Do not execute
4681         when the elaboration phase is not active.
4682         (Elaboration_Phase_Active): New routine.
4683         (Finalize_All_Data_Structures): New routine.
4684         (Initialize): Initialize all internal data structures and signal
4685         that the elaboration phase has started.
4686         (Initialize_All_Data_Structures): New routine.
4687         (Initialize_Elaborated_Units): Initialize all internal data
4688         structures.
4689         (Initialize_Internal_Representation): Initialize all internal
4690         data structures.
4691         (Initialize_Scenario_Storage): Initialize all internal data
4692         structures.
4693         (Kill_Elaboration_Scenario): Do not execute when the elaboration
4694         phase is not active.
4695         (Set_Elaboration_Phase): New routine.
4696         (Update_Elaboration_Scenario): Do not execute when the
4697         elaboration phase is not active.
4699 2019-07-04  Gary Dismukes  <dismukes@adacore.com>
4701         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The special
4702         treatment of calling Mask_Unfrozen_Types must also be done in
4703         the case of an Ignored_Ghost_Entity, because Expander_Active is
4704         False in that case.
4706 2019-07-04  Yannick Moy  <moy@adacore.com>
4708         * sem_prag.adb (Check_Library_Level_Entity): Update for new rule
4709         on SPARK_Mode.
4711 2019-07-04  Justin Squirek  <squirek@adacore.com>
4713         * sem_disp.adb (Check_Controlling_Formals): Obtain the full view
4714         before type comparison.
4716 2019-07-04  Ed Schonberg  <schonberg@adacore.com>
4718         * exp_ch4.ads, exp_ch4.adb (Build_Eq_Call): New visible
4719         subprogram, extracted from Expand_Composite_Equality, to handle
4720         properly the composition of equality for variant record types.
4721         * exp_ch3.adb (MAke_Eq_If): Use Build_Eq_Call for each
4722         component, to handle properly the case of a component with a
4723         user-defined equality. Revert to predefined equality if the
4724         user-defined operation is abstract, to maintain compatibility
4725         with older versions,
4727 2019-07-04  Justin Squirek  <squirek@adacore.com>
4729         * exp_ch3.adb (Build_Initialization_Call): Fixup
4730         *_skip_null_excluding_check argument to handle new default.
4731         (Init_Formals): Make *_skip_null_excluding_check formal default
4732         to False
4733         * exp_ch4.adb (Expand_N_Allocator): Add comment to note heavy
4734         code duplication
4736 2019-07-04  Bob Duff  <duff@adacore.com>
4738         * sem_ch3.adb (Access_Definition): Do not create a master unless
4739         Tasking_Allowed. Otherwise, this fails on restricted runtimes.
4741 2019-07-04  Hristian Kirtchev  <kirtchev@adacore.com>
4743         * sem_util.adb (Propagate_DIC_Attributes): Do not propagate the
4744         Default_Initial_Condition attributes to an incomplete type.
4746 2019-07-04  Ed Schonberg  <schonberg@adacore.com>
4748         * sem_attr.adb (Check_Array_Type): An array type attribute such
4749         as 'First can be applied to an unconstrained array tyope when
4750         the attribute reference appears within an aspect specification
4751         and the prefix is a current instance, given that the prefix of
4752         the attribute will become a formal of the subprogram that
4753         implements the aspect (typically a predicate check).
4755 2019-07-04  Piotr Trojanek  <trojanek@adacore.com>
4757         * sem_util.adb (Yields_Synchronized_Object): Fix typos in
4758         comments.
4760 2019-07-04  Yannick Moy  <moy@adacore.com>
4762         * sem_util.adb (Yields_Synchronized_Object): Adapt to new SPARK
4763         rule.
4765 2019-07-04  Yannick Moy  <moy@adacore.com>
4767         * sem_spark.adb (Check_Statement): Only check permission of
4768         object in extended return when it is of a deep type.
4770 2019-07-04  Justin Squirek  <squirek@adacore.com>
4772         * sem_ch12.adb (Perform_Appropriate_Analysis): Added for
4773         selecting which type of analysis based on wheither the
4774         instantiation is a generic at the library-level. In which case
4775         expansion during analysis.
4776         (Preanalyze_Actuals): Modify calls to Analyze to use the new
4777         routine.
4779 2019-07-04  Ed Schonberg  <schonberg@adacore.com>
4781         * exp_unst.adb: Handle conditional expressions.
4783 2019-07-04  Yannick Moy  <moy@adacore.com>
4785         * sem_spark.adb (Check_Package_Spec, Check_Package_Body): Only
4786         analyze parts of the code marked in SPARK.
4788 2019-07-04  Hristian Kirtchev  <kirtchev@adacore.com>
4790         * erroutc.adb, exp_aggr.adb, inline.adb, opt.adb, sem_ch3.adb:
4791         Minor reformatting.
4793 2019-07-04  Yannick Moy  <moy@adacore.com>
4795         * sem_spark.adb (Explanation, Get_Expl): New functions to get
4796         the explanation for a permission mismatch.
4797         (Perm_Error, Perm_Mismatch, Perm_Error_Loop_Exit): Take
4798         explanation into account for issuing a more precise error
4799         message.
4800         (Set_Perm_Prefixes, Set_Perm_Extensions,
4801         Set_Perm_Extensions_Move): Pass suitable argument for the
4802         explanation node.
4804 2019-07-04  Arnaud Charlet  <charlet@adacore.com>
4806         * exp_aggr.adb (In_Place_Assign_OK): Moved to top level and add
4807         support for record aggregates.
4808         (Component_Check): Use Is_CCG_Supported_Aggregate instead of a
4809         similar local predicate.
4810         (Convert_To_Assignments): Take advantage of In_Place_Assign_OK
4811         predicate when possible.
4812         (Is_CCG_Supported_Aggregate): Return False for records with
4813         representation clauses and fix the logic for dealing with nested
4814         aggregates.
4816 2019-07-04  Piotr Trojanek  <trojanek@adacore.com>
4818         * opt.adb (Set_Config_Switches): Keep assertions policy as
4819         enabled when analysing internal units in GNATprove mode.
4821 2019-07-04  Arnaud Charlet  <charlet@adacore.com>
4823         * exp_ch4.adb (Expand_Short_Circuit_Operator): Strip
4824         N_Variable_Reference_Marker when checking for the presence of
4825         actions.
4827 2019-07-04  Arnaud Charlet  <charlet@adacore.com>
4829         * exp_aggr.adb (Check_Component): Take into account type
4830         conversions.
4832 2019-07-04  Dmitriy Anisimkov  <anisimko@adacore.com>
4834         * doc/gnat_ugn/platform_specific_information.rst: Document
4835         Windows socket timeout particularity.
4836         * gnat_ugn.texi: Regenerate.
4837         * gsocket.h: Include versionhelpers.h.
4838         * socket.c (__gnat_minus_500ms): New function.
4839         * libgnat/g-sothco.ads (Minus_500ms_Windows_Timeout): New
4840         imported function.
4841         * libgnat/g-socket.adb (Set_Socket_Option): Refactor to remove
4842         500ms from the requested timeout only on old Windows version.
4844 2019-07-04  Thomas Quinot  <quinot@adacore.com>
4846         * get_scos.adb: Remove bogus, dead code.
4848 2019-07-04  Ed Schonberg  <schonberg@adacore.com>
4850         * sem_dim.adb (Analyze_Dimension_Array_Aggregate): If the
4851         component is an entity name, its dimensions are those of its
4852         type.
4854 2019-07-03  Bob Duff  <duff@adacore.com>
4856         * doc/gnat_ugn/gnat_utility_programs.rst: Document new flags in
4857         GNATpp.
4859 2019-07-03  Hristian Kirtchev  <kirtchev@adacore.com>
4861         * binde.adb: Remove with clause for System.OS_Lib.
4862         (Force_Elab_Order): Refactor the majority of the code in Butil.
4863         Use the new forced units iterator to obtain unit names.
4864         * bindo-builders.adb: Add with and use clauses for Binderr,
4865         Butil, Opt, Output, Types, GNAT, and GNAT.Dynamic_HTables.  Add
4866         a hash table which maps units to line number in the forced
4867         elaboration order file.
4868         (Add_Unit): New routine.
4869         (Build_Library_Graph): Create forced edges between pairs of
4870         units listed in the forced elaboration order file.
4871         (Create_Forced_Edge, Create_Forced_Edges, Destroy_Line_Number,
4872         Duplicate_Unit_Error, Hash_Unit, Internal_Unit_Info,
4873         Is_Duplicate_Unit, Missing_Unit_Info): New routines.
4874         * bindo-graphs.adb (Is_Internal_Unit, Is_Predefined_Unit):
4875         Refactor some of the behavior to Bindo-Units.
4876         * bindo-graphs.ads: Enable the enumeration literal for forced
4877         edges.
4878         * bindo-units.adb, bindo-units.ads (Is_Internal_Unit,
4879         Is_Predefined_Unit): New routines.
4880         * butil.adb: Add with and use clauses for Opt, GNAT, and
4881         System.OS_Lib.  Add with clause for Unchecked_Deallocation.
4882         (Has_Next, Iterate_Forced_Units, Next, Parse_Next_Unit_Name,
4883         Read_Forced_Elab_Order_File): New routines.
4884         * butil.ads: Add with and use clauses for Types.  Add new
4885         iterator over the units listed in the forced elaboration order
4886         file.
4887         (Has_Next, Iterate_Forced_Units, Next): New routine.
4888         * namet.adb, namet.ads (Present): New routine.
4890 2019-07-03  Bob Duff  <duff@adacore.com>
4892         * sem_ch3.adb (Access_Definition): The code was creating a
4893         master in the case where the designated type is a class-wide
4894         interface type. Create a master in the noninterface case as
4895         well. That is, create a master for all limited class-wide types.
4897 2019-07-03  Yannick Moy  <moy@adacore.com>
4899         * erroutc.adb (Sloc_In_Range): New function to determine whether
4900         the range of a pragma Warnings covers a location, taking
4901         instantiations into account.
4903 2019-07-03  Johannes Kanig  <kanig@adacore.com>
4905         * osint.ads, osint.adb (Get_First_Main_File_Name): New routine
4906         to access the first file provided on the command line.
4908 2019-07-03  Ed Schonberg  <schonberg@adacore.com>
4910         * inline.adb (Process_Formals_In_Aspects): New procedure within
4911         Expand_Inlined_Call, to perform a replacement of references to
4912         formals that appear in aspect specifications within the body
4913         being inlined.
4915 2019-07-03  Justin Squirek  <squirek@adacore.com>
4917         * sem_ch8.adb (Analyze_Object_Renaming): Add call to search for
4918         the appropriate actual subtype of the object renaming being
4919         analyzed.
4920         (Check_Constrained_Object): Minor cleanup.
4922 2019-07-03  Yannick Moy  <moy@adacore.com>
4924         * sem_spark.adb (Get_Observed_Or_Borrowed_Expr): New function to
4925         return go through traversal function call.
4926         (Check_Type): Consistently use underlying type.
4927         (Get_Perm): Adapt for case of elaboration code where variables
4928         are not declared in the environment. Remove incorrect handling
4929         of borrow and observe.
4931 2019-07-03  Hristian Kirtchev  <kirtchev@adacore.com>
4933         * inline.adb (Build_Return_Object_Formal): New routine.
4934         (Can_Split_Unconstrained_Function): Code clean up.
4935         (Copy_Formals,Copy_Return_Object): New routines.
4936         (Split_Unconstrained_Function): Code clean up and refactoring.
4938 2019-07-03  Gary Dismukes  <dismukes@adacore.com>
4940         * bindo-augmentors.adb, bindo-augmentors.ads,
4941         bindo-builders.ads, bindo-elaborators.adb, sem_ch12.adb,
4942         sem_ch13.adb, sem_spark.adb, sinfo.ads: Minor editorial
4943         corrections and reformatting.
4945 2019-07-03  Bob Duff  <duff@adacore.com>
4947         * sem_warn.adb (Check_Infinite_Loop_Warning): Avoid the warning
4948         if an Iterator_Specification is present.
4950 2019-07-03  Bob Duff  <duff@adacore.com>
4952         * doc/gnat_ugn/gnat_utility_programs.rst: Document default
4953         new-line behavior.
4955 2019-07-03  Hristian Kirtchev  <kirtchev@adacore.com>
4957         * ali.adb: Add with and use clauses for GNAT,
4958         GNAT.Dynamic_HTables, and Snames.  Add a map from invocation
4959         signature records to invocation signature ids.  Add various
4960         encodings of invocation-related attributes.  Sort and update
4961         table Known_ALI_Lines.
4962         (Add_Invocation_Construct, Add_Invocation_Relation,
4963         Body_Placement_Kind_To_Code, Code_To_Body_Placement_Kind,
4964         Code_To_Invocation_Construct_Kind, Code_To_Invocation_Kind,
4965         Code_To_Invocation_Graph_Line_Kind, Destroy, Hash): New
4966         routines.
4967         (Initialize_ALI): Sort the initialization sequence. Add
4968         initialization for all invocation-related tables.
4969         (Invocation_Construct_Kind_To_Code,
4970         Invocation_Graph_Line_Kind_To_Code, Invocation_Kind_To_Code,
4971         Invocation_Signature_Of, Present): New routines.
4972         (Scan_ALI): Add the default values for invocation-related ids.
4973         Scan invocation graph lines.
4974         (Scan_Invocation_Graph_Line): New routine.
4975         * ali.ads: Add with clause for GNAT.Dynamic_Tables.  Add types
4976         for invocation constructs, relations, and signatures.  Add
4977         tables for invocation constructs, relations, and signatures.
4978         Update Unit_Record to capture invocation-related ids.  Relocate
4979         table Unit_Id_Tables and subtypes Unit_Id_Table, Unit_Id_Array
4980         from Binde.
4981         (Add_Invocation_Construct, Add_Invocation_Relation,
4982         Body_Placement_Kind_To_Code, Code_To_Body_Placement_Kind,
4983         Code_To_Invocation_Construct_Kind, Code_To_Invocation_Kind,
4984         Code_To_Invocation_Graph_Line_Kind,
4985         Invocation_Construct_Kind_To_Code,
4986         Invocation_Graph_Line_Kind_To_Code, Invocation_Kind_To_Code,
4987         Invocation_Signature_Of, Present): New routines.
4988         * binde.adb: Add with and use clause for Types.  Add use clause
4989         for ALI.Unit_Id_Tables;
4990         * binde.ads: Relocate table Unit_Id_Tables and subtypes
4991         Unit_Id_Table, Unit_Id_Array to ALI.
4992         * bindgen.adb: Remove with and use clause for ALI.
4993         * bindgen.ads: Remove with and use clause for Binde.  Add with
4994         and use clause for ALI.
4995         * bindo.adb,  bindo.ads, bindo-augmentors.adb,
4996         bindo-augmentors.ads, bindo-builders.adb, bindo-builders.ads,
4997         bindo-diagnostics.adb, bindo-diagnostics.ads,
4998         bindo-elaborators.adb, bindo-elaborators.ads, bindo-graphs.adb,
4999         bindo-graphs.ads, bindo-units.adb, bindo-units.ads,
5000         bindo-validators.adb, bindo-validators.ads, bindo-writers.adb,
5001         bindo-writers.ads: New units.
5002         * debug.adb: Use and describe GNAT debug switches -gnatd_F and
5003         -gnatd_G.  Add GNATbind debug switches in the ranges dA .. dZ,
5004         d.a .. d.z, d.A .. d.Z, d.1 .. d.9, d_a .. d_z, d_A .. d_Z, and
5005         d_1 .. d_9.  Use and describe GNATbind debug switches -d_A,
5006         -d_I, -d_L, -d_N, -d_O, -d_T, and -d_V.
5007         * exp_util.adb, exp_util.ads (Exceptions_OK): Relocate to
5008         Sem_Util.
5009         * gnatbind.adb: Add with and use clause for Bindo.  Use the new
5010         Bindo elaboration order only when -d_N is in effect.
5011         * lib-writ.adb
5012         (Column, Extra, Invoker, Kind, Line, Locations, Name, Placement,
5013         Scope, Signature, Target): New routines.
5014         (Write_ALI): Output all invocation-related data.
5015         (Write_Invocation_Graph): New routine.
5016         * lib-writ.ads: Document the invocation graph ALI line.
5017         * namet.adb, namet.ads (Present): New routines.
5018         * sem_ch8.adb (Find_Direct_Name): Capture the status of
5019         elaboration checks and warnings of an identifier.
5020         (Find_Expanded_Name): Capture the status of elaboration checks
5021         and warnings of an expanded name.
5022         * sem_ch12.adb (Analyze_Generic_Package_Declaration): Ensure
5023         that invocation graph-related data within the body of the main
5024         unit is encoded in the ALI file.
5025         (Analyze_Generic_Subprogram_Declaration): Ensure that invocation
5026         graph-related data within the body of the main unit is encoded
5027         in the ALI file.
5028         (Analyze_Package_Instantiation): Perform minimal decoration of
5029         the instance entity.
5030         (Analyze_Subprogram_Instantiation): Perform minimal decoration
5031         of the instance entity.
5032         * sem_elab.adb: Perform heavy refactoring of all code. The unit
5033         is now split into "services" which specialize in one area of ABE
5034         checks.  Add processing in order to capture invocation-graph
5035         related attributes of the main unit, and encode them in the ALI
5036         file.  The Processing phase can now operate in multiple modes,
5037         all described by type Processing_Kind.  Scenarios and targets
5038         are now distinct at the higher level, and carry their own
5039         representations. This eliminates the need to constantly
5040         recompute their attributes, and offers the various processors a
5041         uniform interface.  The various initial states of the Processing
5042         phase are now encoded using type Processing_In_State, and
5043         xxx_State constants.
5044         * sem_elab.ads: Update the literals of type
5045         Enclosing_Level_Kind.  Add Inline pragmas on several routines.
5046         * sem_prag.adb (Process_Inline): Ensure that invocation
5047         graph-related data within the body of the main unit is encoded
5048         in the ALI file.
5049         * sem_util.adb (Enclosing_Generic_Body, Enclosing_Generic_Unit):
5050         Code clean up.
5051         (Exceptions_OK): Relocated from Sem_Util.
5052         (Mark_Save_Invocation_Graph_Of_Body): New routine.
5053         * sem_util.ads (Exceptions_OK): Relocated from Sem_Util.
5054         (Mark_Save_Invocation_Graph_Of_Body): New routine.
5055         * sinfo.adb (Is_Elaboration_Checks_OK_Node): Now applicable to
5056         N_Variable_Reference_Marker.
5057         (Is_Elaboration_Warnings_OK_Node): Now applicable to
5058         N_Expanded_Name, N_Identifier, N_Variable_Reference_Marker.
5059         (Is_Read): Use Flag4.
5060         (Is_SPARK_Mode_On_Node): New applicable to
5061         N_Variable_Reference_Marker.
5062         (Is_Write): Use Flag5.
5063         (Save_Invocation_Graph_Of_Body): New routine.
5064         (Set_Is_Elaboration_Checks_OK_Node): Now applicable to
5065         N_Variable_Reference_Marker.
5066         (Set_Is_Elaboration_Warnings_OK_Node): Now applicable to
5067         N_Expanded_Name, N_Identifier, N_Variable_Reference_Marker.
5068         (Set_Is_SPARK_Mode_On_Node): New applicable to
5069         N_Variable_Reference_Marker.
5070         (Set_Save_Invocation_Graph_Of_Body): New routine.
5071         * sinfo.ads: Update the documentation of attributes
5072         Is_Elaboration_Checks_OK_Node, Is_Elaboration_Warnings_OK_Node,
5073         Is_SPARK_Mode_On_Node.  Update the flag usage of attributes
5074         Is_Read, Is_Write.  Add attribute Save_Invocation_Graph_Of_Body
5075         and update its occurrence in nodes.
5076         (Save_Invocation_Graph_Of_Body): New routine along with pragma
5077         Inline.
5078         (Set_Save_Invocation_Graph_Of_Body): New routine along with
5079         pragma Inline.
5080         * switch-b.adb (Scan_Binder_Switches): Refactor the scanning of
5081         debug switches.
5082         (Scan_Debug_Switches): New routine.
5083         * libgnat/g-dynhta.adb, libgnat/g-dynhta.ads (Contains): New routine.
5084         * libgnat/g-graphs.adb (Associate_Vertices): Update the use of
5085         Component_Vertex_Iterator.
5086         (Contains_Component, Contains_Edge, Contains_Vertex, Has_Next):
5087         Reimplemented.
5088         (Iterate_Component_Vertices): New routine.
5089         (Iterate_Vertices): Removed.
5090         (Next): Update the parameter profile.
5091         (Number_Of_Component_Vertices, Number_Of_Outgoing_Edges): New
5092         routines.
5093         * libgnat/g-graphs.ads: Update the initialization of
5094         No_Component.  Add type Component_Vertex_Iterator.  Remove type
5095         Vertex_Iterator.
5096         (Has_Next): Add new versions and remove old ones.
5097         (Iterate_Component_Vertices): New routine.
5098         (Iterate_Vertices): Removed.
5099         (Next): Add new versions and remove old ones.
5100         (Number_Of_Component_Vertices, Number_Of_Outgoing_Edges): New
5101         routines.
5102         * libgnat/g-sets.adb (Contains): Reimplemented.
5103         * gcc-interface/Make-lang.in (GNATBIND_OBJS): Add
5104         GNAT.Dynamic_HTables, GNAT.Graphs and Bindo units.
5105         * rtsfind.ads: Remove extra space.
5107 2019-07-03  Yannick Moy  <moy@adacore.com>
5109         * sem_spark.adb: Add support for locally borrowing and observing
5110         a path.
5111         (Get_Root_Object): Add parameter Through_Traversal to denote
5112         when we are interesting in getting to the traversed parameter.
5113         (Is_Prefix_Or_Almost): New function to support detection of
5114         illegal access to borrowed or observed paths.
5115         (Check_Pragma): Add analysis of assertion pragmas.
5117 2019-07-03  Ed Schonberg  <schonberg@adacore.com>
5119         * sem_ch13.adb (Build_Predicate_Functions): In a generic context
5120         we do not build the bodies of predicate fuctions, but the
5121         expression in a static predicate must be elaborated to allow
5122         case coverage checking within the generic unit.
5123         (Build_Discrete_Static_Predicate): In a generic context, return
5124         without building function body once the
5125         Static_Discrete_Predicate expression for the type has been
5126         constructed.
5128 2019-07-03  Hristian Kirtchev  <kirtchev@adacore.com>
5130         * bindgen.adb, inline.adb, layout.adb, sem_ch12.adb,
5131         sem_ch13.adb, sem_ch7.adb, styleg.adb: Minor reformatting.
5133 2019-07-03  Bob Duff  <duff@adacore.com>
5135         * par-ch3.adb (P_Defining_Identifier): Call
5136         Check_Defining_Identifier_Casing.
5137         * style.ads, styleg.ads, styleg.adb
5138         (Check_Defining_Identifier_Casing): New procedure to check for
5139         mixed-case defining identifiers.
5140         * stylesw.ads, stylesw.adb (Style_Check_Mixed_Case_Decls): New
5141         flag for checking for mixed-case defining identifiers.
5142         * doc/gnat_ugn/building_executable_programs_with_gnat.rst:
5143         Document new feature.
5144         * gnat_ugn.texi: Regenerate.
5146 2019-07-03  Eric Botcazou  <ebotcazou@adacore.com>
5148         * doc/gnat_ugn/building_executable_programs_with_gnat.rst
5149         (Warning message control): Document that -gnatw.z/Z apply to
5150         array types.
5151         * freeze.adb (Freeze_Entity): Give -gnatw.z warning for array
5152         types as well, but not if the specified alignment is the minimum
5153         one.
5154         * gnat_ugn.texi: Regenerate.
5156 2019-07-03  Bob Duff  <duff@adacore.com>
5158         * einfo.ads, exp_util.adb, layout.ads, sinfo.ads: Spell "laid"
5159         correctly.
5161 2019-07-03  Ed Schonberg  <schonberg@adacore.com>
5163         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): No error
5164         message on attribute applied to a renaming when the renamed
5165         object is an aggregate (from code reading).
5166         (Check_Aspect_At_End_Of_Declarations): In a generic context
5167         where freeze nodes are not generated, the original expression
5168         for an aspect may need to be analyzed to precent spurious
5169         conformance errors when compared with the expression that is
5170         anakyzed at the end of the current declarative list.
5172 2019-07-03  Eric Botcazou  <ebotcazou@adacore.com>
5174         * layout.adb (Layout_Type): Do not set the component size of an
5175         array with a scalar component if the component type is
5176         overaligned.
5178 2019-07-03  Ed Schonberg  <schonberg@adacore.com>
5180         * inline.adb (Make_Loop_Labels_Unique): New procedure to modify
5181         the source code of subprograms that are inlined by the
5182         front-end, to prevent accidental duplication between loop labels
5183         in the inlined code and the code surrounding the inlined call.
5185 2019-07-03  Hristian Kirtchev  <kirtchev@adacore.com>
5187         * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update
5188         the section on resolving elaboration circularities to eliminate
5189         certain combinations of switches which together do not produce
5190         the desired effect and confuse users.
5191         * gnat_ugn.texi: Regenerate.
5193 2019-07-03  Arnaud Charlet  <charlet@adacore.com>
5195         * bindgen.adb (Gen_Main): Disable generation of reference to
5196         Ada_Main_Program_Name for CCG.
5197         * bindusg.adb (Display): Add -G to the command-line usage for
5198         gnatbind.
5199         * opt.ads (Generate_C_Code): Update comment.
5200         * switch-b.adb (Scan_Binder_Switches): Add handling for -G.
5202 2019-07-03  Arnaud Charlet  <charlet@adacore.com>
5204         * sem_ch7.adb (Has_Referencer): Do not consider inlined
5205         subprograms when generating C code, which allows us to generate
5206         static inline subprograms.
5208 2019-07-03  Justin Squirek  <squirek@adacore.com>
5210         * sem_ch6.adb (Check_Conformance): Add expression checking for
5211         constant modifiers in anonymous access types (in addition to
5212         "non-null" types) so that they are considered "matching" for
5213         subsequent conformance tests.
5215 2019-07-03  Arnaud Charlet  <charlet@adacore.com>
5217         * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
5218         Clarify wording on No_Multiple_Elaboration.
5219         * gnat_rm.texi: Regenerate.
5221 2019-07-03  Ed Schonberg  <schonberg@adacore.com>
5223         * sem_ch8.adb (Find_Selected_Component): If the prefix is the
5224         current instance of a type or subtype, complete the resolution
5225         of the name by finding the component of the type denoted by the
5226         selector name.
5228 2019-07-03  Eric Botcazou  <ebotcazou@adacore.com>
5230         * doc/gnat_rm/interfacing_to_other_languages.rst (Interfacing to C):
5231         Document that boolean types with convention C now map to C99 bool.
5232         * gnat_rm.texi: Regenerate.
5234 2019-07-03  Javier Miranda  <miranda@adacore.com>
5236         * exp_attr.adb (Expand_Min_Max_Attribute): Code cleanup:
5237         removing code that it is now never executed in the CCG compiler
5238         (dead code).
5240 2019-07-02  Iain Sandoe  <iain@sandoe.co.uk>
5242         * libgnat/system-darwin-ppc.ads: Set Stack_Check_Probes True for
5243         PPC Darwin.
5245 2019-07-01  Ed Schonberg  <schonberg@adacore.com>
5247         * sem_ch12.adb (Is_Defaulted): New predicate in
5248         Check_Formal_Package_Intance, to skip the conformance of checks
5249         on parameters of a formal package that are defaulted,
5251 2019-07-01  Hristian Kirtchev  <kirtchev@adacore.com>
5253         * checks.adb, exp_ch9.adb, exp_unst.adb, sem_ch4.adb,
5254         sem_prag.adb, sem_spark.adb: Minor reformatting.
5256 2019-07-01  Ed Schonberg  <schonberg@adacore.com>
5258         * sem_attr.adb (Analyze_Attribute, case Enum_Rep): Allow prefix
5259         of attribute to be an attribute reference of a discrete type.
5261 2019-07-01  Eric Botcazou  <ebotcazou@adacore.com>
5263         * sem_ch12.adb (Analyze_Subprogram_Instantiation): Move up
5264         handling of Has_Pragma_Inline_Always and deal with
5265         Has_Pragma_No_Inline.
5267 2019-07-01  Ed Schonberg  <schonberg@adacore.com>
5269         * sem_ch3.adb (Build_Derived_Record_Type): If the parent type is
5270         declared as a subtype of a private type with an inherited
5271         discriminant constraint, its generated full base appears as a
5272         record subtype, so we need to retrieve its oen base type so that
5273         the inherited constraint can be applied to it.
5275 2019-07-01  Yannick Moy  <moy@adacore.com>
5277         * sem_spark.adb: Completely rework the algorithm for ownership
5278         checking, as the rules in SPARK RM have changed a lot.
5279         * sem_spark.ads: Update comments.
5281 2019-07-01  Dmitriy Anisimkov  <anisimko@adacore.com>
5283         * gsocket.h (Has_Sockaddr_Len): Use the offset of sin_family offset in
5284         the sockaddr_in structure to determine the existence of length field
5285         before the sin_family.
5287 2019-07-01  Ed Schonberg  <schonberg@adacore.com>
5289         * sem_prag.adb (Analyze_Pragma, case Weak_External): Pragma only
5290         applies to entities with run-time addresses, not to types.
5292 2019-07-01  Piotr Trojanek  <trojanek@adacore.com>
5294         * einfo.adb, sem_ch7.adb, sem_prag.adb, sem_util.adb: Update
5295         references to the SPARK RM after the removal of Rule 7.1.4(5).
5297 2019-07-01  Piotr Trojanek  <trojanek@adacore.com>
5299         * sysdep.c: Cleanup references to LynuxWorks in docs and
5300         comments.
5302 2019-07-01  Ed Schonberg  <schonberg@adacore.com>
5304         * checks.adb (Insert_Valid_Check): Do not apply validity check
5305         to variable declared within a protected object that uses the
5306         Lock_Free implementation, to prevent unwarranted constant
5307         folding, because entities within such an object msut be treated
5308         as volatile.
5310 2019-07-01  Eric Botcazou  <ebotcazou@adacore.com>
5312         * exp_ch9.adb (Check_Inlining): Deal with Has_Pragma_No_Inline.
5314 2019-07-01  Ed Schonberg  <schonberg@adacore.com>
5316         * exp_unst.adb (Visit_Node, Check_Static_Type): Improve the
5317         handling of private and incomplete types whose full view is an
5318         access type, to detect additional uplevel references in dynamic
5319         bounds. This is relevant to N_Free_Statement among others that
5320         manipulate types whose full viww may be an access type.
5322 2019-07-01  Pat Rogers  <rogers@adacore.com>
5324         * doc/gnat_rm/representation_clauses_and_pragmas.rst: Correct
5325         size indicated for R as a component of an array.
5326         * gnat_rm.texi: Regenerate.
5328 2019-07-01  Justin Squirek  <squirek@adacore.com>
5330         * libgnat/s-win32.ads: Add definition for ULONG, modify
5331         OVERLAPPED type, and add appropriate pragmas.
5333 2019-07-01  Bob Duff  <duff@adacore.com>
5335         * gnat1drv.adb (gnat1drv): Call Write_ALI if the main unit is
5336         ignored-ghost.
5338 2019-07-01  Yannick Moy  <moy@adacore.com>
5340         * sem_ch4.adb (Operator_Check): Refine error message.
5342 2019-07-01  Piotr Trojanek  <trojanek@adacore.com>
5344         * libgnat/a-calend.ads: Revert "Global => null" contracts on
5345         non-pure routines.
5347 2019-07-01  Piotr Trojanek  <trojanek@adacore.com>
5349         * exp_attr.adb, libgnat/g-graphs.ads: Fix typos in comments:
5350         componant -> component.
5352 2019-07-01  Hristian Kirtchev  <kirtchev@adacore.com>
5354         * libgnat/g-graphs.adb: Use type Directed_Graph rather than
5355         Instance in various routines.
5356         * libgnat/g-graphs.ads: Change type Instance to Directed_Graph.
5357         Update various routines that mention the type.
5359 2019-07-01  Hristian Kirtchev  <kirtchev@adacore.com>
5361         * libgnat/g-sets.adb: Use type Membership_Set rathern than
5362         Instance in various routines.
5363         * libgnat/g-sets.ads: Change type Instance to Membership_Set.
5364         Update various routines that mention the type.
5366 2019-07-01  Hristian Kirtchev  <kirtchev@adacore.com>
5368         * libgnat/g-lists.adb: Use type Doubly_Linked_List rather than
5369         Instance in various routines.
5370         * libgnat/g-lists.ads: Change type Instance to
5371         Doubly_Linked_List. Update various routines that mention the
5372         type.
5374 2019-07-01  Hristian Kirtchev  <kirtchev@adacore.com>
5376         * libgnat/g-dynhta.adb: Use type Dynamic_Hash_Table rather than
5377         Instance in various routines.
5378         * libgnat/g-dynhta.ads: Change type Instance to
5379         Dynamic_Hash_Table. Update various routines that mention the
5380         type.
5382 2019-07-01  Hristian Kirtchev  <kirtchev@adacore.com>
5384         * exp_attr.adb, exp_ch7.adb, exp_unst.adb, sem_ch3.adb,
5385         sem_util.adb, uintp.adb, uintp.ads: Minor reformatting.
5387 2019-07-01  Javier Miranda  <miranda@adacore.com>
5389         * exp_attr.adb (Expand_Min_Max_Attribute): Disable expansion of
5390         'Min/'Max on integer, enumeration, fixed point and floating
5391         point types since the CCG backend now provides in file
5392         standard.h routines to support it.
5394 2019-07-01  Hristian Kirtchev  <kirtchev@adacore.com>
5396         * impunit.adb: Add GNAT.Graphs to list Non_Imp_File_Names_95.
5397         * Makefile.rtl, gcc-interface/Make-lang.in: Register unit
5398         GNAT.Graphs.
5399         * libgnat/g-dynhta.adb: Various minor cleanups (use Present
5400         rather than direct comparisons).
5401         (Delete): Reimplement to use Delete_Node.
5402         (Delete_Node): New routine.
5403         (Destroy_Bucket): Invoke the provided destructor.
5404         (Present): New routines.
5405         * libgnat/g-dynhta.ads: Add new generic formal Destroy_Value.
5406         Use better names for the components of iterators.
5407         * libgnat/g-graphs.adb, libgnat/g-graphs.ads: New unit.
5408         * libgnat/g-lists.adb: Various minor cleanups (use Present
5409         rather than direct comparisons).
5410         (Delete_Node): Invoke the provided destructor.
5411         (Present): New routine.
5412         * libgnat/g-lists.ads: Add new generic formal Destroy_Element.
5413         Use better names for the components of iterators.
5414         (Present): New routine.
5415         * libgnat/g-sets.adb, libgnat/g-sets.ads (Destroy, Preset,
5416         Reset): New routines.
5418 2019-07-01  Dmitriy Anisimkov  <anisimko@adacore.com>
5420         * libgnat/g-sothco.adb (Get_Address): Fix the case when AF_INET6
5421         is not defined.
5423 2019-07-01  Ed Schonberg  <schonberg@adacore.com>
5425         * exp_attr.adb (Expand_Attribute_Reference, case Invalid_Value):
5426         Resolve result of call to Get_Simple_Init_Val, which may be a
5427         conversion of a literal.
5429 2019-07-01  Hristian Kirtchev  <kirtchev@adacore.com>
5431         * freeze.adb (Freeze_Expression): Remove the horrible useless
5432         name hiding of N. Insert the freeze nodes generated by the
5433         expression prior to the expression when the nearest enclosing
5434         scope is transient.
5436 2019-07-01  Pierre-Marie de Rodat  <derodat@adacore.com>
5438         * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Fix
5439         formatting issues in the -gnatR section.
5440         * gnat_ugn.texi: Regenerate.
5442 2019-06-30  Iain Sandoe  <iain@sandoe.co.uk>
5444         * gnatlink.adb (Link_Step): Remove duplicate -static-libgcc switches.
5445         Push -shared-libgcc explicitly, when it is the target default (unless
5446         overidden by the static flag).
5447         When the user has put an instance of shared/static-libgcc do not push
5448         a duplicate of this.
5450 2019-06-29  Eric Botcazou  <ebotcazou@adacore.com>
5452         * gcc-interface/decl.c (gnat_to_gnu_entity): Beep up comment on SAVED,
5453         and tweak comment on the assertion about the scopes of Itypes.  Do not
5454         skip the regular processing for Itypes that are E_Record_Subtype with
5455         a Cloned_Subtype.  Get the Cloned_Subtype for every E_Record_Subtype
5456         if the type is dummy and hasn't got its own freeze node.
5457         <E_Record_Subtype>: Save again the DECL of the Cloned_Subtype, if any.
5458         <E_Access_Subtype>: Save again the DECL of the equivalent type.
5459         (Gigi_Equivalent_Type) <E_Access_Subtype>: New case.
5461 2019-06-29  Eric Botcazou  <ebotcazou@adacore.com>
5463         * gcc-interface/utils.c (unchecked_convert): Tweak comment.  Only skip
5464         dereferences when padding to have the same size on both sides.  Do it
5465         for destination types with self-referential size too.
5467 2019-06-29  Eric Botcazou  <ebotcazou@adacore.com>
5469         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: If the
5470         type requires strict alignment, then set the RM size to the type size.
5471         Rework handling of alignment and sizes of tagged types in ASIS mode.
5472         (validate_size): Rename local variable and remove special handling for
5473         strict-alignment types.
5474         * gcc-interface/utils.c (finish_record_type): Constify local variables
5475         and use properly typed constants.
5477 2019-06-29  Eric Botcazou  <ebotcazou@adacore.com>
5479         * gcc-interface/decl.c (gnat_to_gnu_field): Rework error messages for
5480         fields requiring strict alignment, add explicit test on Storage_Unit
5481         for position and size, and mention type alignment for position.
5483 2019-06-29  Eric Botcazou  <ebotcazou@adacore.com>
5485         * gcc-interface/trans.c (mark_visited_r): Set TYPE_SIZES_GIMPLIFIED on
5486         the main variant of a type, if any.
5488 2019-06-29  Eric Botcazou  <ebotcazou@adacore.com>
5490         * gcc-interface/decl.c (set_nonaliased_component_on_array_type): Add
5491         missing guard for the presence of TYPE_CANONICAL.
5492         (set_reverse_storage_order_on_array_type): Likewise.
5494 2019-06-29  Eric Botcazou  <ebotcazou@adacore.com>
5496         * gcc-interface/gigi.h (make_packable_type): Remove default value.
5497         (value_factor_p): Tweak prototype.
5498         * gcc-interface/decl.c (gnat_to_gnu_entity): Add comment.
5499         (gnat_to_gnu_component_type): Likewise.
5500         (gnat_to_gnu_field): Likewise.  Fetch the position of the field earlier
5501         and simplify the condition under which the type is packed.  Declare
5502         local variable is_bitfield.  Pass 1 as max_align to make_packable_type
5503         if it is set to true.
5504         (copy_and_substitute_in_layout): Pass 0 to make_packable_type.
5505         * gcc-interface/utils.c (make_packable_array_type): New function.
5506         (make_packable_type): Use it to rewrite the type of array field.
5507         (maybe_pad_type): Pass align parameter to make_packable_type.
5508         (create_field_decl): Minor tweaks.
5509         (value_factor_p): Assert that FACTOR is a power of 2 and replace the
5510         modulo computation by a masking operation.
5512 2019-06-25  Eric Botcazou  <ebotcazou@adacore.com>
5514         * gcc-interface/decl.c (gnat_to_gnu_entity): Remove superfluous test
5515         in previous change.
5516         * gcc-interface/gigi.h (maybe_character_type): Fix formatting.
5517         (maybe_character_value): Likewise.
5519 2019-06-24  Jan Hubicka  <jh@suse.cz>
5521         * gcc-interface/decl.c (gnat_to_gnu_entity): Check that
5522         type is array or integer prior checking string flag.
5523         * gcc-interface/gigi.h (maybe_character_type): Likewise.
5524         (maybe_character_value): Likewise.
5526 2019-06-24  Martin Sebor  <msebor@redhat.com>
5528         * gcc-interface/utils.c (handle_nonnull_attribute): Quote attribute
5529         name.
5531 2019-06-18  Arnaud Charlet  <charlet@adacore.com>
5533         PR ada/80590
5534         * sem_ch5.adb (Analyze_Loop_Statement): Avoid exception propagation
5535         during normal processing.
5537 2019-06-17  Arnaud Charlet  <charlet@adacore.com>
5539         PR ada/80590
5540         * exp_ch9.adb (Expand_N_Delay_Relative_Statement): Swap the two
5541         conditions to avoid a unnecessary exception propagation in the default
5542         case.
5544 2019-05-28  Eric Botcazou  <ebotcazou@adacore.com>
5546         * gcc-interface/utils.c (handle_stack_protect_attribute): Move around.
5548 2019-05-28  Eric Botcazou  <ebotcazou@adacore.com>
5550         * doc/gnat_rm/implementation_defined_pragmas.rst (Machine_Attribute):
5551         Document additional optional parameters.
5552         * sem_prag.adb (Analyze_Pragma) <Pragma_Machine_Attribute>: Accept
5553         more than one optional parameter.
5554         * gcc-interface/decl.c (prepend_one_attribute_pragma): Alphabetize
5555         the list of supported pragmas.  Simplify the handling of parameters
5556         and add support for more than one optional parameter.
5557         * gcc-interface/utils.c (attr_cold_hot_exclusions): New constant.
5558         (gnat_internal_attribute_table): Add entry for no_icf, noipa, flatten,
5559         used, cold, hot, target and target_clones.
5560         (begin_subprog_body): Do not create the RTL for the subprogram here.
5561         (handle_noicf_attribute): New static function.
5562         (handle_noipa_attribute): Likewise.
5563         (handle_flatten_attribute): Likewise.
5564         (handle_used_attribute): Likewise.
5565         (handle_cold_attribute): Likewise.
5566         (handle_hot_attribute): Likewise.
5567         (handle_target_attribute): Likewise.
5568         (handle_target_clones_attribute): Likewise.
5570 2019-05-28  Eric Botcazou  <ebotcazou@adacore.com>
5572         * gcc-interface/trans.c (lvalue_required_for_attribute_p): Return 0
5573         for 'Size too.
5574         (Identifier_to_gnu): Use the actual subtype for a reference to a
5575         packed array in a return statement.
5576         (Attribute_to_gnu) <Attr_Size>: Do not strip VIEW_CONVERT_EXPRs from
5577         the prefix in every case.
5579 2019-05-28  Eric Botcazou  <ebotcazou@adacore.com>
5581         * gcc-interface/trans.c (gnat_to_gnu): Remove superfluous tests on
5582         Backend_Overflow_Checks_On_Target and rework comments.
5584 2019-05-28  Eric Botcazou  <ebotcazou@adacore.com>
5586         * gcc-interface/trans.c (walk_nesting_tree): New static function.
5587         (finalize_nrv): Use it to walk the entire nesting tree.
5589 2019-05-28  Eric Botcazou  <ebotcazou@adacore.com>
5591         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Remove
5592         obsolete test on Is_For_Access_Subtype.
5594 2019-05-28  Eric Botcazou  <ebotcazou@adacore.com>
5596         * gcc-interface/decl.c (components_to_record): Set a name on the type
5597         created for the REP part, if any.
5598         * gcc-interface/utils.c (finish_record_type): Only take the maximum
5599         when merging sizes for a variant part at offset 0.
5600         (merge_sizes): Rename has_rep parameter into max.
5602 2019-05-28  Eric Botcazou  <ebotcazou@adacore.com>
5604         * gcc-interface/utils.c (gnat_internal_attribute_table): Add support
5605         for stack_protect attribute.
5606         (handle_stack_protect_attribute): New static function.
5608 2019-05-28  Eric Botcazou  <ebotcazou@adacore.com>
5610         * gcc-interface/decl.c (intrin_arglists_compatible_p): Do not return
5611         false if the internal builtin uses a variable list.
5613 2019-05-27  Eric Botcazou  <ebotcazou@adacore.com>
5615         * gcc-interface/trans.c (Call_to_gnu): Do not initialize the temporary
5616         created out of addressability concerns if it's for the _Init parameter
5617         of an initialization procedure.
5619 2019-05-27  Eric Botcazou  <ebotcazou@adacore.com>
5621         * gcc-interface/ada-builtin-types.def: New file.
5622         * gcc-interface/ada-builtins.def: Likewise.
5623         * gcc-interface/ada-tree.h (BUILT_IN_LIKELY): New macro.
5624         (BUILT_IN_UNLIKELY): Likewise.
5625         * gcc-interface/trans.c (independent_iterations_p): Initialize the
5626         auto-vector to 16 elements.
5627         (Call_to_gnu): Remove local variable and change the vector of actual
5628         parameters to an auto-vector.  Do not convert actual parameters to
5629         the argument type for front-end built-in functions.  Add support for
5630         front-end built-in functions.
5631         (build_noreturn_cond): Use internal instead of built-in function.
5632         * gcc-interface/utils.c (c_builtin_type): Include ada-builtin-types.def
5633         (install_builtin_function_types): Likewise.
5634         (install_builtin_functions): Include ada-builtins.def first.
5636 2019-05-27  Eric Botcazou  <ebotcazou@adacore.com>
5638         * gcc-interface/utils.c (maybe_pad_type): Issue the warning for the
5639         specific case of component types preferably.
5641 2019-05-27  Eric Botcazou  <ebotcazou@adacore.com>
5643         * gcc-interface/trans.c (Identifier_to_gnu): Minor tweaks.
5644         (gnat_to_gnu): Do not convert the result if it is a reference to an
5645         unconstrained array used as the prefix of an attribute reference that
5646         requires an lvalue.
5648 2019-05-27  Eric Botcazou  <ebotcazou@adacore.com>
5650         * gcc-interface/trans.c (Gigi_Types_Compatible): New predicate.
5651         (Identifier_to_gnu): Use it to assert that the type of the identifier
5652         and that of its entity are compatible for gigi.  Rename a couple of
5653         local variables and separate the processing of the result type.
5655 2019-05-27  Eric Botcazou  <ebotcazou@adacore.com>
5657         * gcc-interface/trans.c (Call_to_gnu): Use the unpadded type when
5658         putting back an intermediate conversion the type of the actuals.
5660 2019-05-27  Eric Botcazou  <ebotcazou@adacore.com>
5662         * gcc-interface/trans.c (gnat_to_gnu) <Shift operations>: Convert the
5663         count to the unsigned version of its base type before proceeding.
5665 2019-05-16  Martin Sebor  <msebor@redhat.com>
5667         * gcc-interface/trans.c (check_inlining_for_nested_subprog): Quote
5668         reserved names.
5670 2019-05-08  Arnaud Charlet  <charlet@adacore.com>
5672         * standard.ads.h: New file.
5674 2019-05-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5676         * gcc-interface/Makefile.in (install-gcc-specs): Use foreach.
5677         Honor DESTDIR.
5679 2019-04-29  Michael K. Darling  <darlingm@gmail.com>
5681         * gnatvsn.ads: Bump Library_Version to 10.
5683 2019-04-24  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
5684             Bernd Edlinger  <bernd.edlinger@hotmail.de>
5685             Jakub Jelinek  <jakub@redhat.com>
5687         PR target/89093
5688         * raise-gcc.c (TARGET_ATTRIBUTE): Define.
5689         (continue_unwind, personality_body, PERSONALITY_FUNCTION): Add
5690         TARGET_ATTRIBUTE.
5692 2019-04-07  Eric Botcazou  <ebotcazou@adacore.com>
5694         * libgnat/i-cexten.ads (CFloat_128): New type.
5696 2019-03-22  Dmitriy Anisimkov  <anisimko@adacore.com>
5698         PR ada/89583
5699         * libgnat/g-socket.adb (Bind_Socket, Connect_Socket,
5700         Send_Socket): Fix the computation of structure lengths passed to
5701         low level routines.
5702         (Is_IPv6_Address): Fix the number of expected colons.
5704 2019-03-11  Martin Liska  <mliska@suse.cz>
5706         * gcc-interface/misc.c (gnat_post_options): Wrap option name in string
5707         format message and fix GNU coding style.
5709 2019-02-08  Eric Botcazou  <ebotcazou@adacore.com>
5711         * gcc-interface/trans.c (gnat_to_gnu) <N_Aggregate>: Minor tweak.
5712         * gcc-interface/utils.c (convert): Do not pad when doing an unchecked
5713         conversion here.  Use TREE_CONSTANT throughout the function.
5714         (unchecked_convert): Also pad if the source is a CONSTRUCTOR and the
5715         destination is a more aligned array type or a larger aggregate type,
5716         but not between original and packable versions of a type.
5718 2019-02-08  Eric Botcazou  <ebotcazou@adacore.com>
5720         * gcc-interface/utils.c (max_size) <tcc_unary>: Be prepared for an
5721         operand with VOID_TYPE.
5723 2019-02-08  Eric Botcazou  <ebotcazou@adacore.com>
5725         * gcc-interface/trans.c (elaborate_all_entities): Do not elaborate the
5726         entities of a package renaming another one.
5728 2019-02-08  Eric Botcazou  <ebotcazou@adacore.com>
5730         * gcc-interface/trans.c (Regular_Loop_to_gnu): Replace tests on
5731         individual flag_unswitch_loops and flag_tree_loop_vectorize switches
5732         with test on global optimize switch.
5733         (Raise_Error_to_gnu): Likewise.
5735 2019-02-07  Eric Botcazou  <ebotcazou@adacore.com>
5737         * libgnarl/s-linux__sparc.ads (ETIMEDOUT): Set to correct value.
5739 2019-02-06  Arnaud Charlet  <charlet@adacore.com>
5741         * libgnarl/s-linux__x32.ads: Resync list of signals with s-linux.ads
5743 2019-01-27  Eric Botcazou  <ebotcazou@adacore.com>
5745         * repinfo.adb (List_Component_Layout): Remove superfluous space for
5746         zero-sized field.
5747         * gcc-interface/ada-tree.h (TYPE_IS_EXTRA_SUBTYPE_P): New macro.
5748         * gcc-interface/gigi.h (create_extra_subtype): Declare.
5749         * gcc-interface/decl.c (TYPE_ARRAY_SIZE_LIMIT): Likewise.
5750         (update_n_elem): New function.
5751         (gnat_to_gnu_entity): Use create_extra_subtype to create extra subtypes
5752         instead of doing it manually.
5753         <E_Array_Type>: Use update_n_elem to compute the maximum size.  Use the
5754         index type instead of base type for the bounds. Set TYPE_ARRAY_MAX_SIZE
5755         of the array to the maximum size.
5756         <E_Array_Subtype>: Create an extra subtype using the index type of the
5757         base array type for self-referential bounds.  Use update_n_elem to
5758         compute the maximum size.  Set TYPE_ARRAY_MAX_SIZE of the array to the
5759         maximum size.
5760         (gnat_to_gnu_field): Clear DECL_NONADDRESSABLE_P on discriminants.
5761         * gcc-interface/misc.c (gnat_get_alias_set): Return the alias set of
5762         the base type for an extra subtype.
5763         (gnat_type_max_size): Remove obsolete code.
5764         * gcc-interface/trans.c (Attribute_to_gnu): Minor tweak.
5765         (can_be_lower_p): Deal with pathological types.
5766         * gcc-interface/utils.c (create_extra_subtype): New function.
5767         (create_field_decl): Minor tweak.
5768         (max_size) <tcc_reference>: Compute a better value by using the extra
5769         subtypes on the self-referential bounds.
5770         <tcc_binary>: Rewrite.  Deal with "negative value" in unsigned types.
5771         <tcc_expression>: Likewise.
5772         * gcc-interface/utils2.c (compare_arrays): Retrieve the original bounds
5773         of the arrays upfront.  Swap only if the second length is not constant.
5774         Use comparisons on the original bounds consistently for the null tests.
5775         (build_binary_op): Use TYPE_IS_EXTRA_SUBTYPE_P macro.
5776         (build_allocator): Minor tweak.
5778 2019-01-27  Eric Botcazou  <ebotcazou@adacore.com>
5780         * gcc-interface/decl.c (array_type_has_nonaliased_component): Return
5781         the same value for every dimension of a multidimensional array type.
5783 2019-01-26  Eric Botcazou  <ebotcazou@adacore.com>
5785         * gcc-interface/trans.c (Regular_Loop_to_gnu): Use the SLOC of the
5786         iteration scheme, if present, throughout the translation.
5788 2019-01-26  Eric Botcazou  <ebotcazou@adacore.com>
5790         * gcc-interface/trans.c (gnat_to_gnu) <N_Assignment_Statement>: Use
5791         DECL_SIZE_UNIT instead of TYPE_SIZE_UNIT for the size to be assigned
5792         by a call to memset if the LHS is a DECL.
5794 2019-01-26  Eric Botcazou  <ebotcazou@adacore.com>
5796         * gcc-interface/trans.c (struct loop_info_d): Remove artificial field.
5797         (Loop_Statement_to_gnu): Do not set it.
5799 2019-01-26  Eric Botcazou  <ebotcazou@adacore.com>
5801         * gcc-interface/trans.c (Iterate_Acc_Clause_Arg): Fix formatting.
5802         (Acc_gnat_to_gnu): Likewise.
5803         (Acc_Data_to_gnu): Likewise.
5804         (Acc_Var_to_gnu): Likewise.
5805         (Acc_Reduc_to_gnu): Likewise.
5806         (Acc_Size_List_to_gnu): Likewise.
5807         (Pragma_to_gnu) <Pragma_Acc_Loop>: Likewise.
5808         <Pragma_Acc_Data>): Likewise.
5809         (find_loop_for): Remove default value for parameters.
5810         * gcc-interface/trans.c (gnat_to_gnu) <N_Op_And>: Merge into...
5811         <N_Op_Eq>): ...this.
5813 2019-01-26  Eric Botcazou  <ebotcazou@adacore.com>
5815         * gcc-interface/decl.c (annotate_value) <INTEGER_CST>: Use test on
5816         the sign bit instead of on the sign of the value.
5817         <PLUS_EXPR>: Turn addition of negative constant into subtraction.
5818         <MULT_EXPR>: Add test for degenerate case.
5819         <BIT_AND_EXPR>: Simplify.
5821 2019-01-18  Sebastian Huber  <sebastian.huber@embedded-brains.de>
5823         * s-oscons-tmplt.c (AF_INET6): Do not undefine for RTEMS.
5825 2019-01-09  Sandra Loosemore  <sandra@codesourcery.com>
5827         PR other/16615
5828         * exp_ch11.adb: Change "can not" to "cannot".
5829         * sem_ch4.adb: Likewise.
5831 2019-01-09  Sandra Loosemore  <sandra@codesourcery.com>
5833         PR other/16615
5834         * exp_ch9.adb: Mechanically replace "can not" with "cannot".
5835         * libgnat/s-regpat.ads: Likewise.
5836         * par-ch4.adb: Likewise.
5837         * set_targ.adb: Likewise.
5838         * types.ads: Likewise.
5840 2019-01-08  Justin Squirek  <squirek@adacore.com>
5842         Revert:
5843         2018-07-31  Justin Squirek  <squirek@adacore.com>
5845         * lib-writ.adb (Write_With_Lines): Modfiy the generation
5846         of dependencies within ali files so that source unit
5847         bodies are properly listed even if said bodies are
5848         missing.  Perform legacy behavior in GNATprove mode.
5849         * lib-writ.ads: Modify documentation to reflect current
5850         behavior.
5852         and:
5853         2018-09-26  Justin Squirek  <squirek@adacore.com>
5855         * lib-writ.adb, lib-writ.ads (Write_With_Lines): Add
5856         documentation and an extra conditional check for RCI
5857         units so that generated ali files will list the spec
5858         only instead of a body when a body is not found.
5860 2019-01-04  Eric Botcazou  <ebotcazou@adacore.com>
5862         * gnatvsn.ads: Bump copyright year.
5864 2019-01-01  Jakub Jelinek  <jakub@redhat.com>
5866         Update copyright years.
5868         * gnat_ugn.texi: Bump @copying's copyright year.
5869         * gnat_rm.texi: Likewise.
5871 Copyright (C) 2019 Free Software Foundation, Inc.
5873 Copying and distribution of this file, with or without modification,
5874 are permitted in any medium without royalty provided the copyright
5875 notice and this notice are preserved.