]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/ada/ChangeLog
decl.c (annotate_value): Really test the sign of the value when deciding to build...
[thirdparty/gcc.git] / gcc / ada / ChangeLog
CommitLineData
05626b02
EB
12019-10-11 Eric Botcazou <ebotcazou@adacore.com>
2
3 * gcc-interface/decl.c (annotate_value) <INTEGER_CST>: Really test the
4 sign of the value when deciding to build a NEGATE_EXPR.
5 <PLUS_EXPR>: Remove redundant line.
6 <BIT_AND_EXPR>: Do the negation here.
7
43b60e57
EB
82019-10-11 Eric Botcazou <ebotcazou@adacore.com>
9
10 * gcc-interface/decl.c (Gigi_Equivalent_Type) <E_Array_Subtype>: New
11 case. Return the base type if the subtype is not constrained.
12
104099b8
EB
132019-10-11 Eric Botcazou <ebotcazou@adacore.com>
14
15 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Named_{Integer|Real}>:
16 New case to deal with the definition of named numbers.
17 <E_Variable>: Minor tweaks. Set DECL_IGNORED_P on the CONST_DECL
18 if a corresponding variable is built.
19 * gcc-interface/trans.c (gnat_to_gnu) <N_Integer_Literal>: Return
20 error_mark_node instead of aborting on overflow for named numbers.
21 <N_Number_Declaration>: Reuse the <N_Object_Declaration> case and
22 deal with error_mark_node specifically.
23 * gcc-interface/utils.c (create_var_decl): Do not set DECL_IGNORED_P
24 on CONST_DECLs.
25 (gnat_write_global_declarations): Output global constants.
26
7e536bfd 272019-10-10 Gary Dismukes <dismukes@adacore.com>
0fa00483 28
7e536bfd
GD
29 * exp_ch7.adb (Check_Unnesting_In_Decls_Or_Stmts): When
30 encountering a loop at the top level of a package declaration
31 list (that is, within the declarations of a package spec or
32 body) that has nested subprograms, call Unnest_Loop to create a
33 new library-level procedure that will contain the loop, to allow
34 for proper handling of up-level references from within nested
35 subprograms, such as to loop parameters.
36 (Unnest_Loop): New procedure that takes a loop statement and
37 creates a new procedure body to enclose the loop statement,
848830dc
PMR
38 along with generating a call to the procedure.
39
402019-10-10 Arnaud Charlet <charlet@adacore.com>
41
42 * freeze.adb (Freeze_Subprogram): Ensure constructor is a C++
43 constructor.
44
452019-10-10 Gary Dismukes <dismukes@adacore.com>
46
47 * libgnat/a-ststio.ads (File_Type): Apply pragma
48 Preelaborable_Initialization to the type.
49
502019-10-10 Yannick Moy <moy@adacore.com>
51
52 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do not peek
53 under private types whose completion is SPARK_Mode Off.
54
552019-10-10 Gary Dismukes <dismukes@adacore.com>
56
57 * exp_ch4.adb, sem_cat.adb, sem_ch12.adb, sem_ch3.adb,
58 sem_ch6.adb, sem_prag.adb, sem_util.adb, sem_util.ads: Minor
59 typo fixes.
60
612019-10-10 Ed Schonberg <schonberg@adacore.com>
62
63 * sem_warn.adb (Warn_On_Useless_Assignment): Do not warn if the
64 second assignment is at the same source position as the first.
65
662019-10-10 Gary Dismukes <dismukes@adacore.com>
67
68 * sem_util.adb (Enclosing_Subprogram): Handle the case of
69 E_Entry_Family, returning the entry family's associated
70 Protected_Body_Subprogram (as was already done for E_Entry).
71 * exp_ch9.adb (Expand_N_Accept_Statement): Call Reset_Scopes_To
72 on the block created for an accept statement to reset the scopes
73 of any local entities to the block scope.
74
752019-10-10 Ed Schonberg <schonberg@adacore.com>
76
77 * sem_ch12.adb (Analyze_Formal_Package_Declaration): Propagate
78 an aspect specification for Abstract_State from generic package
79 to formal package, so that it is available when analyzing the
80 constructed formal.
81
822019-10-10 Eric Botcazou <ebotcazou@adacore.com>
83
84 * sem_ch6.adb (Set_Actual_Subtypes): Put the freeze node of the
85 actual subtype after its declaration when the type of the formal
86 has a predicate.
87
882019-10-10 Eric Botcazou <ebotcazou@adacore.com>
89
90 * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order): Do not use
91 the Esize of the component to compute its layout, but only the
92 Component_Clause. Do not issue a warning for the _Tag
93 component. Also set the Esize of the component at the end of
94 the layout.
95 (Analyze_Record_Representation_Clause): Remove Hbit local
96 variable. Lay out the Original_Record_Component only if it's
97 distinct from the component.
98 (Check_Record_Representation_Clause): Fix off-by-one bug for the
99 Last_Bit of the artificial clause built for the _Tag component.
100
1012019-10-10 Bob Duff <duff@adacore.com>
102
103 * treepr.ads, treepr.adb (ppar): New procedure.
104
1052019-10-10 Bob Duff <duff@adacore.com>
106
107 * sem_aggr.adb (Resolve_Aggregate): Add missing cases in the
108 Others_Allowed => True case -- N_Case_Expression_Alternative and
109 N_If_Expression. Use Nkind_In.
110 * atree.adb, atree.ads, sinfo.adb, sinfo.ads (Nkind_In): New
111 16-parameter version.
112
1132019-10-10 Ed Schonberg <schonberg@adacore.com>
114
115 * sem_aggr.adb (Resolve_Array_Aggregate): Set properly the
116 Predicated_Parent link of an itype created for an aggregate, so
117 that the predicate_function of the parent can support proofs on
118 the object that it initializes.
119
1202019-10-10 Eric Botcazou <ebotcazou@adacore.com>
121
122 * sem_ch3.adb (Analyze_Number_Declaration): Set
123 Debug_Info_Needed in the case where the expression is an integer
124 literal.
125
1262019-10-10 Yannick Moy <moy@adacore.com>
127
128 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Add subprograms
129 with deep parameter or result type as not candidates for
130 inlining.
131
1322019-10-10 Vadim Godunko <godunko@adacore.com>
133
134 * libgnat/g-exptty.ads (TTY_Process_Descriptor): Set default
135 value for Process.
136
1372019-10-10 Bob Duff <duff@adacore.com>
138
139 * sem_prag.adb (Defer_Compile_Time_Warning_Error_To_BE): In
140 addition to saving the pragma for further processing, copy the
141 pragma into the main unit if necessary.
142
1432019-10-10 Bob Duff <duff@adacore.com>
144
145 * einfo.ads, einfo.adb (Invariants_Ignored): New flag on types.
146 This leaves just one unused flag.
147 * sem_prag.adb (Invariant): Set the flag if appropriate.
148 * exp_util.adb (Make_Invariant_Call): Check the flag.
149
1502019-10-10 Arnaud Charlet <charlet@adacore.com>
151
152 * gnat1drv.adb (Gnat1drv): Skip code generation when handling an
153 incomplete unit with -gnatceg.
154
1552019-10-10 Gary Dismukes <dismukes@adacore.com>
156
157 * exp_ch7.adb (Check_Unnesting_Elaboration_Code): Various
158 cleanups.
159 (Set_Elab_Proc): New procedure to create the defining identifier
160 for a procedure created to encapsulate top-level blocks
161 occurring as a part of library package elaboration.
162 (First_Local_Scope): Function replaced by
163 Reset_Scopes_To_Elab_Proc.
164 (Reset_Scopes_To_Elab_Proc): New recursive procedure based on
165 First_Local_Scope, which it replaces, that is called to traverse
166 the statements of a library package body to locate top-level
167 blocks and determine whether they contain nested subprograms
168 that might address library-level objects of the package. Such
169 blocks (and loops) and certain top-level subprograms within the
170 statements will have their Scope reset here to match an
171 encapsulating procedure created by
172 Check_Unnesting_Elaboration_Code that will contain the
173 statements.
174 (Check_Unnesting_In_Decls_Or_Stmts): Code for handling blocks
175 factored out into Unnest_Block. Add handling for package
176 declarations and bodies, making recursive calls for
177 visible/private declarations, body declarations, statements, and
178 exception handlers. Also remove test for Is_Compilation_Unit:
179 caller tests for Is_Library_Level_Entity instead. Also, this
180 proc's name was changed from Check_Unnesting_In_Declarations.
181 (Check_Unnesting_In_Handlers): New procedure to traverse a
182 sequence of exception handlers, calling
183 Check_Unnesting_In_Decls_Or_Stmts on the statements of each
184 handler.
185 (Expand_N_Package_Body): Call Check_Unnesting_* routines only
186 when Unnest_Subprogram_Mode is set and the current scope is a
187 library-level entity (which includes packages and instantiations
188 nested directly within a library unit).
189 (Expand_N_Package_Declaration): Call Check_Unnesting_* routines
190 only when Unnest_Subprogram_Mode is set and the current scope is
191 a library-level entity (which includes packages and
192 instantiations nested directly within a library unit).
193 (Unnest_Block): New procedure factored out of
194 Check_Unnesting_In_Decls_Or_Stmts, for creating a new procedure
195 to replace a block statement and resetting the Scope fields of
196 the block's top-level entities.
197
1982019-10-10 Anthony Leonardo Gracio <leonardo@adacore.com>
199
200 * doc/gnat_ugn/about_this_guide.rst,
201 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
202 doc/gnat_ugn/getting_started_with_gnat.rst,
203 doc/gnat_ugn/gnat_and_program_execution.rst, errout.ads,
204 exp_ch3.adb, gnatls.adb, impunit.adb, lib-writ.ads, opt.ads,
205 sem_ch7.adb, sem_prag.adb, sem_res.adb, sem_warn.adb,
206 terminals.c: Replace GPS by GNAT Studio.
207 * gnat_ugn.texi: Regenerate.
208
2092019-10-10 Ed Schonberg <schonberg@adacore.com>
210
211 * exp_ch6.adb (Expand_Simple_Function_Return_Statement): If the
212 function to which the return statement applies is an
213 Ignored_Ghost_Function, do not indicate that it uses the
214 secondary stack when the return type is unconstrained.
215
2162019-10-10 Bob Duff <duff@adacore.com>
217
218 * libgnat/a-cbdlli.adb, libgnat/a-cbhama.adb,
219 libgnat/a-cbhase.adb, libgnat/a-cbmutr.adb,
220 libgnat/a-cborma.adb, libgnat/a-cborse.adb,
221 libgnat/a-cdlili.adb, libgnat/a-cidlli.adb,
222 libgnat/a-cihama.adb, libgnat/a-cihase.adb,
223 libgnat/a-cimutr.adb, libgnat/a-ciorma.adb,
224 libgnat/a-ciorse.adb, libgnat/a-cobove.adb,
225 libgnat/a-cohama.adb, libgnat/a-cohase.adb,
226 libgnat/a-coinve.adb, libgnat/a-comutr.adb,
227 libgnat/a-conhel.adb, libgnat/a-convec.adb,
228 libgnat/a-coorma.adb, libgnat/a-coorse.adb (Reference,
229 Constant_Reference): Use Busy instead of Lock, so we forbid
230 tampering with cursors, rather than tampering with elements.
231
2322019-10-10 Ed Schonberg <schonberg@adacore.com>
233
234 * sem_cat.adb (Set_Categorization_From_Pragma): Do not modify
235 any visibility settings if there are no compilation_unit pragmas
236 following the package declaration. Add comments for future
237 cleanup.
238
2392019-10-10 Patrick Bernardi <bernardi@adacore.com>
240
241 * bindgen.adb (System_Secondary_Stack_Package_In_Closure):
242 Renamed flag System_Secondary_Stack_Used to be clearer of what
243 it represents.
244 (Gen_Adainit): Refactor secondary stack related code to make it
245 clearer.
246 * rtsfind.adb (Load_RTU): Don't set Sec_Stack_Used flag here
247 (RTE): Set Sec_Stack_Used if the System.Secondary_Stack is
248 referenced, but not if we're ignoring ghost code.
249
2502019-10-10 Piotr Trojanek <trojanek@adacore.com>
251
252 * sem_prag.adb (Analyze_Global_In_Decl_Part): Simplify previous
253 test, just like in a recent commit we simplified a similar test
254 for Depends contract.
255
2562019-10-04 Joseph Myers <joseph@codesourcery.com>
257
258 * gcc-interface/utils.c (flag_isoc2x): New variable.
259
2602019-10-01 Maciej W. Rozycki <macro@wdc.com>
261
262 * gcc-interface/Makefile.in (ADA_RTL_DSO_DIR): New variable.
263 (install-gnatlib): Use it in place of ADA_RTL_OBJ_DIR for shared
264 library installation.
265
2662019-10-01 Maciej W. Rozycki <macro@wdc.com>
267
268 * gcc-interface/Make-lang.in (ada.install-common): Split into...
269 (gnat-install-tools, gnat-install-lib): ... these.
270
2712019-09-26 Alexandre Oliva <oliva@adacore.com>
272
273 * gcc-interface/decl.c (components_to_record): Set
274 DECL_SIZE_UNIT for zero-sized fields.
275
2762019-09-26 Arnaud Charlet <charlet@adacore.com>
277
278 * osint.adb (OS_Time_To_GNAT_Time): Remove dependency on To_C/To_Ada
279
2802019-09-23 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
281
282 * libgnarl/s-osinte__solaris.ads (sysconf): Declare.
283 (SC_NPROCESSORS_ONLN): Define.
284 * libgnarl/s-tasinf__solaris.ads (Number_Of_Processors): Declare.
285 * libgnarl/s-tasinf__solaris.adb (N_CPU): New variable.
286 (Number_Of_Processors): New function.
287
2882019-09-23 Eric Botcazou <ebotcazou@adacore.com>
289
290 * gcc-interface/trans.c (Regular_Loop_to_gnu): Do not rotate the loop
291 if -Og is enabled.
292 (build_return_expr): Do not perform NRV if -Og is enabled.
293 (Subprogram_Body_to_gnu): Likewise.
294 (gnat_to_gnu) <N_Simple_Return_Statement>: Likewise.
295 (Handled_Sequence_Of_Statements_to_gnu): Do not inline finalizers if
296 -Og is enabled.
297 * gcc-interface/utils.c (convert_to_index_type): Return early if -Og
298 is enabled.
299
3002019-09-23 Eric Botcazou <ebotcazou@adacore.com>
301
302 * gcc-interface/trans.c (gnat_compile_time_expr_list): New variable.
303 (Pragma_to_gnu): Rename local variable. Save the (first) expression
304 of pragma Compile_Time_{Error|Warning} for later processing.
305 (Compilation_Unit_to_gnu): Process the expressions saved above.
306
3072019-09-23 Eric Botcazou <ebotcazou@adacore.com>
308
309 * gcc-interface/trans.c (Attribute_to_gnu): Test Can_Use_Internal_Rep
310 on the underlying type of the node.
311 (Call_to_gnu): Likewise with the type of the prefix.
312
3132019-09-23 Eric Botcazou <ebotcazou@adacore.com>
314
315 * gcc-interface/decl.c (components_to_record): Do not reorder fields
316 in packed record types if they contain fixed-size fields that cannot
317 be laid out in a packed manner.
318
3192019-09-19 Tom Tromey <tromey@adacore.com>
320
321 * gcc-interface/misc.c (gnat_get_type_bias): Return the bias
322 when -fgnat-encodings=gdb.
323
3242019-09-19 Steve Baird <baird@adacore.com>
325
326 * sem_prag.adb (Preferred_String_Type): A new function. Given an
327 expression, determines whether the preference rules defined for
328 the third-and-later arguments of pragma Annotate suffice to
329 determine the type of the expression. If so, then the preferred
330 type is returned; if not then Empty is returned. Handles
331 concatenations.
332 (Analyze_Pragma): Replace previous code, which dealt only with
333 string literals, with calls to the new Preferred_String_Type
334 function, which also handles concatenations.
335 * doc/gnat_rm/implementation_defined_pragmas.rst: Update
336 documentation for pragma Annotate.
337 * gnat_rm.texi: Regenerate.
338
3392019-09-19 Eric Botcazou <ebotcazou@adacore.com>
340
341 * exp_util.adb (Is_Possibly_Unaligned_Slice): Do not return true
342 on pure alignment considerations if the target does not require
343 the strict alignment of memory accesses.
344
3452019-09-19 Eric Botcazou <ebotcazou@adacore.com>
346
347 * sem_ch12.adb (Check_Private_View): Add a comment to indicate
348 future work.
349
3502019-09-19 Eric Botcazou <ebotcazou@adacore.com>
351
352 * exp_aggr.adb (Has_Mutable_Components): Look at the underlying
353 type of components to find out whether they are mutable.
354
3552019-09-19 Eric Botcazou <ebotcazou@adacore.com>
356
357 * sem_ch12.adb (Instantiate_Package_Body): Check that the body
358 has not already been instantiated when the body of the parent
359 was being loaded.
360
3612019-09-19 Eric Botcazou <ebotcazou@adacore.com>
362
363 * sem_util.adb (In_Instance): Test whether the current unit has
364 been analyzed instead of being on the scope stack to detect the
365 case of actuals of an instantiation of a generic child unit done
366 as a compilation unit.
367
3682019-09-19 Dmitriy Anisimkov <anisimko@adacore.com>
369
370 * libgnat/g-socket.ads, libgnat/g-socket.adb
371 (Create_Socket_Pair): New routine.
372 * libgnat/g-socthi.ads (OS_Has_Socketpair): Boolean constant.
373 (C_Socketpair): New imported routine.
374 * libgnat/g-socthi__mingw.ads, libgnat/g-socthi__vxworks.ads
375 (Default_Socket_Pair_Family): New constant.
376 (C_Socketpair): New routine.
377 * libgnat/g-socthi__mingw.adb, libgnat/g-socthi__vxworks.adb
378 (C_Socketpair): Is separated in anouther file.
379 * libgnat/g-sthcso.adb (C_Socketpair): Non UNIX implementation.
380 * libgnat/g-stsifd__sockets.adb: Reuse C_Socketpair.
381
3822019-09-19 Yannick Moy <moy@adacore.com>
383
384 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Simplify previous
385 test.
386
3872019-09-19 Ed Schonberg <schonberg@adacore.com>
388
389 * sem_ch7.adb (Install_Parent_Private_Declarations): If a
390 generic child unit is instantiated within a sibling child unit,
391 the analysis of its private part requires that the private part
392 of the ancestor be available, as is done when the context
393 includes an instance of the ancestor.
394
3952019-09-19 Yannick Moy <moy@adacore.com>
396
397 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Add special
398 case for traversal functions.
399
4002019-09-19 Yannick Moy <moy@adacore.com>
401
402 * sem_prag.adb (Analyze_Global_In_Decl_Part): Do not issue an
403 error when a constant of an access type is used as output in a
404 Global contract.
405 (Analyze_Depends_In_Decl_Part): Do not issue an error when a
406 constant of an access type is used as output in a Depends
407 contract.
408
4092019-09-19 Arnaud Charlet <charlet@adacore.com>
410
411 * exp_attr.adb: Remove obsolete comment.
412
4132019-09-19 Eric Botcazou <ebotcazou@adacore.com>
414
415 * sem_ch3.adb (Build_Derived_Access_Type): If this is an access-
416 to-subprogram type, copy Can_Use_Internal_Rep from the parent.
417
4182019-09-19 Yannick Moy <moy@adacore.com>
419
420 * gcc-interface/Make-lang.in: Remove references to sem_spark.
421 * sem_spark.adb, sem_spark.ads: Remove unit.
422
4232019-09-19 Eric Botcazou <ebotcazou@adacore.com>
424
425 * exp_attr.adb (Is_Inline_Floating_Point_Attribute): Treat
426 Machine_Rounding as an alias for Rounding.
427 * sem_res.adb (Simplify_Type_Conversion): Likewise.
428
4292019-09-19 Gary Dismukes <dismukes@adacore.com>
430
431 * exp_unst.adb (Unnest_Subprogram): Bypass the transformation of
432 up-level references unless Opt.Generate_C_Code is enabled.
433
4342019-09-19 Eric Botcazou <ebotcazou@adacore.com>
435
436 * exp_ch4.adb (Expand_Array_Equality): If optimization is
437 enabled, generate a simple conjunction of comparisons for the
438 specific case of constrained 1-dimensional 2-element arrays.
439 Fix formatting.
440
4412019-09-19 Piotr Trojanek <trojanek@adacore.com>
442
443 * exp_dbug.ads, exp_dbug.adb (Get_Homonym_Number): Remove.
444 (Append_Homonym_Number): Use Homonym_Number instead of
445 Get_Homonym_Number.
446 * exp_util.ads, exp_util.adb (Homonym_Number): Mirror style of
447 the removed Get_Homonym_Number routine, i.e. initialize local
448 objects at declaration and refine the type of result.
449 * sem_util.adb (Add_Homonym_Suffix): Use Homonym_Number instead
450 of Get_Homonym_Number.
451
4522019-09-19 Ed Schonberg <schonberg@adacore.com>
453
454 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Simplify
455 handling of expressions in predicates when the context is a
456 generic unit.
457
4582019-09-19 Bob Duff <duff@adacore.com>
459
460 * sem_attr.adb (Resolve_Attribute): Make sure the secondary
461 stack is properly managed in the case of a 'Range attribute in a
462 loop.
463
4642019-09-19 Raphael Amiard <amiard@adacore.com>
465
466 * libgnat/a-cfhase.ads (Set): Add comments to public primitives.
467
4682019-09-19 Raphael Amiard <amiard@adacore.com>
469
470 * libgnat/a-cbhama.ads, libgnat/a-cbhase.ads,
471 libgnat/a-chtgop.ads (Clear): Refine comments
472
4732019-09-19 Eric Botcazou <ebotcazou@adacore.com>
474
475 * sem_ch12.adb (Restore_Private_Views): Comment out new code
476 that clear the Is_Generic_Actual_Type also on the full view.
477
4782019-09-19 Bob Duff <duff@adacore.com>
479
480 * exp_ch3.adb (Rewrite_As_Renaming): Return False if there are
481 any aspect specifications, because otherwise Insert_Actions
482 blows up.
483
4842019-09-19 Eric Botcazou <ebotcazou@adacore.com>
485
486 * exp_ch6.adb (Add_Simple_Call_By_Copy_Code): Add
487 Bit_Packed_Array parameter and documet it. Always insert a copy
488 if it is set True.
489 (Expand_Actuals): Adjust the calls to
490 Add_Simple_Call_By_Copy_Code.
491
4922019-09-19 Bob Duff <duff@adacore.com>
493
494 * xref_lib.adb (Get_Symbol_Name): If we reach EOF in the first
495 loop without finding the symbol, return "???". Otherwise, it's
496 an infinite loop.
497 (Parse_EOL): Assert that we're not already at EOF. Remove
498 processing of LF/CR -- there are no operating systems that use
499 that.
500
5012019-09-19 Eric Botcazou <ebotcazou@adacore.com>
502
503 * exp_ch6.adb (Is_Legal_Copy): Also return false for an aliased
504 formal and a formal passed by reference in convention Ada. Add
505 missing guard to the existing test on Is_Valued_Procedure.
506
5072019-09-19 Bob Duff <duff@adacore.com>
508
509 * rtsfind.ads (RTE_Available): Improve comment.
510
5112019-09-18 Bob Duff <duff@adacore.com>
512
513 * exp_ch5.adb (Expand_Assign_Array_Loop_Or_Bitfield): Move call
514 to RTE_Available later, so it doesn't disturb the elab order.
515 The RE_Copy_Bitfield entity is defined in package
516 System.Bitfields which has a dependency on package
517 System.Bitfield_Utils, which has it its spec:
518 pragma Elaborate_Body;
519 The query on RTE_Available forces loading and analyzing
520 System.Bitfields and all its withed units.
521
5222019-09-18 Eric Botcazou <ebotcazou@adacore.com>
523
524 * checks.ads (Alignment_Warnings_Record): Add P component.
525 * checks.adb (Apply_Address_Clause_Check): Be prepared to kill
526 the warning also if the clause is of the form X'Address.
527 (Validate_Alignment_Check_Warning): Kill the warning if the
528 clause is of the form X'Address and the alignment of X is
529 compatible.
530
5312019-09-18 Ed Schonberg <schonberg@adacore.com>
532
533 * sem_res.adb (Set_Mixed_Node_Expression): If a conditional
534 expression has universal_real alternaitves and the context is
535 Universal_Fixed, as when it is an operand in a fixed-point
536 multiplication or division, resolve the expression with a
537 visible fixed-point type, which must be unique.
538
5392019-09-18 Ed Schonberg <schonberg@adacore.com>
540
541 * sem_ch3.adb (Constrain_Component_Type): For a discriminated
542 type, handle the case of a constraint given by a conversion of a
543 discriminant of the enclosing type. Necessary when compiling a
544 discriminated task for a restricted run-time, when the generated
545 Secondary_Stack component may be set by means of an aspect on
546 the task type.
547
5482019-09-18 Ed Schonberg <schonberg@adacore.com>
549
550 * exp_aggr.adb (Expand_Record_Aggregate, Rewrite_Discriminant):
551 After rewriting a reference to an outer discriminant as a
552 selected component of the enclosing object, analyze the selected
553 component to ensure that the entity of the selector name is
554 properly set. This is necessary when the aggregate appears
555 within an expression that may have been analyzed already.
556
5572019-09-18 Justin Squirek <squirek@adacore.com>
558
559 * sem_ch8.adb (Use_One_Type): Add guard to prevent warning on a
560 reundant use package clause where there is no previous
561 use_clause in the chain.
562
5632019-09-18 Justin Squirek <squirek@adacore.com>
564
565 * exp_ch4.adb (Expand_N_Type_Conversion): Add calculation of an
566 alternative operand for the purposes of generating accessibility
567 checks.
568
5692019-09-18 Eric Botcazou <ebotcazou@adacore.com>
570
571 * exp_aggr.adb (Build_Array_Aggr_Code): In STEP 1 (c), duplicate
572 the expression and reset the Loop_Actions for each loop
573 generated for an others choice.
574
5752019-09-18 Justin Squirek <squirek@adacore.com>
576
577 * einfo.adb, einfo.ads (Minimum_Accessibility): Added new field.
578 (Set_Minimum_Accessibility): Added to set new field.
579 (Minimum_Accessibility): Added to fetch new field.
580 * exp_ch6.adb (Expand_Subprogram_Call): Modify calls to fetch
581 accessibility levels to the new subprogram Get_Accessibility
582 which handles cases where minimum accessibility might be needed.
583 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Add section to
584 generate a Minimum_Accessibility object within relevant
585 subprograms.
586 * sem_util.adb, sem_util.ads (Dynamic_Accessibility_Level):
587 Additional documentation added and modify section to use new
588 function Get_Accessibility.
589 (Get_Accessibility): Added to centralize processing of
590 accessibility levels.
591
5922019-09-18 Steve Baird <baird@adacore.com>
593
594 * sem_util.ads (Interval_Lists): A new visible package. This
595 package is visible because it is also intended for eventual use
596 in Sem_Eval.Subtypes_Statically_Compatible when that function is
597 someday upgraded to handle static predicates correctly. This
598 new package doesn't really need to be visible for now, but it
599 still seems like a good idea.
600 * sem_util.adb (Gather_Components): Implement AI12-0086 via the
601 following strategy. The existing code knows how to take a static
602 discriminant value and identify the corresponding variant; in
603 the newly-permitted case of a non-static value of a static
604 subtype, we arbitrarily select a value of the subtype and find
605 the corresponding variant using the existing code. Subsequently,
606 we check that every other value of the discriminant's subtype
607 corresponds to the same variant; this is done using the newly
608 introduced Interval_Lists package.
609 (Interval_Lists): Provide a body for the new package.
610
6112019-09-18 Javier Miranda <miranda@adacore.com>
612
613 * exp_ch4.adb (Expand_N_Op_Eq): The frontend assumes that we can
614 do a bit-for-bit comparison of two access to protected
615 subprogram pointers. However, there are two reasons why we may
616 not be able to do that: (1) there may be padding bits for
617 alignment before the access to subprogram, and (2) the access to
618 subprogram itself may not be compared bit-for- bit because the
619 activation record part is undefined: two pointers are equal iff
620 the subprogram addresses are equal. This patch fixes it by
621 forcing a field-by-field comparison.
622 * bindgen.adb (Gen_Adainit): The type No_Param_Proc is defined
623 in the library as having Favor_Top_Level, but when we create an
624 object of that type in the binder file we don't have that
625 pragma, so the types are different. This patch fixes this issue.
626 * libgnarl/s-interr.adb, libgnarl/s-interr__hwint.adb,
627 libgnarl/s-interr__sigaction.adb, libgnarl/s-interr__vxworks.adb
628 (Is_Registered): This routine erroneously assumes that the
629 access to protected subprogram is two addresses. We need to
630 create the same record that the compiler makes to ensure that
631 any padding is the same. Then we have to look at just the first
632 word of the access to subprogram. This patch fixes this issue.
633
6342019-09-18 Bob Duff <duff@adacore.com>
635
636 * exp_ch5.adb (Expand_Assign_Array_Loop_Or_Bitfield): The call
637 to Copy_Bitfield is now enabled.
638 (Expand_Assign_Array_Bitfield): Multiply 'Length times
639 'Component_Size "by hand" instead of using 'Size.
640
6412019-09-18 Vasiliy Fofanov <fofanov@adacore.com>
642
643 * doc/gnat_rm/implementation_defined_pragmas.rst: Fix minor
644 formatting issue.
645
6462019-09-18 Javier Miranda <miranda@adacore.com>
647
648 * exp_disp.adb (Make_DT, Make_Secondary_DT): Remove generation
649 of alignment representation clause for the following tables:
650 Predef_Prims, Iface_DT, TSD, ITable, DT.
651
6522019-09-18 Steve Baird <baird@adacore.com>
653
654 * sem_eval.adb (Expr_Value): Do not fail "the type of a null
655 literal must be an access type" assertion if errors have already
656 been posted on the given node.
657
6582019-09-18 Piotr Trojanek <trojanek@adacore.com>
659
660 * exp_dbug.ads, exp_dbug.adb (Get_Homonym_Number): Refine type
661 from Nat to Pos.
662 * sem_util.adb (Add_Homonym_Suffix): Refine type of a local
663 variable.
664
6652019-09-18 Yannick Moy <moy@adacore.com>
666
667 * exp_dbug.adb (Append_Homonym_Number): Use new function
668 Get_Homonym_Number.
669 (Get_Homonym_Number): New function to return the homonym number.
670 (Qualify_Entity_Name): Remove special case for GNATprove.
671 * exp_dbug.ads (Get_Homonym_Number): Make the new function
672 public for use in GNATprove.
673 * frontend.adb (Frontend): Do not qualify names in GNATprove
674 mode.
675 * sem_util.adb (Unique_Name): Append homonym suffix where needed
676 for entities which have local homonyms in the same scope.
677
6782019-09-18 Nicolas Roche <roche@adacore.com>
679
680 * libgnat/s-valrea.adb (Scan_Integral_Digits): New procedure.
681 (Scan_Decimal_Digits): New procedure.
682 (As_Digit): New function.
683 (Scan_Real): Use Scan_Integral_Digits and Scan_Decimal_Digits.
684
6852019-09-18 Claire Dross <dross@adacore.com>
686
687 * exp_attr.adb (Expand_N_Attribute_Reference): Call routine from
688 Exp_Util to know the value of the Constrained attribute in the
689 static case.
690 * exp_spark.adb (Expand_SPARK_N_Attribute_Reference): Make
691 implicit dereferences inside the Constrained attribute explicit.
692 * exp_util.ads, exp_util.adb
693 (Attribute_Constrained_Static_Value): New routine to compute the
694 value of a statically known reference to the Constrained
695 attribute.
696
6972019-09-18 Vadim Godunko <godunko@adacore.com>
698
699 * libgnat/g-expect.adb (Expect_Internal): Don't include invalid
700 file descriptors into the set of file descriptors for Poll.
701 Raise Process_Died exception when computed set of file
702 descriptors to monitor is empty.
703
7042019-09-18 Frederic Konrad <konrad@adacore.com>
705
706 * adaint.c: Include dosFsLib.h and vwModNum.h for VxWorks 6.
707 (__gnat_rename): Map S_dosFsLib_FILE_NOT_FOUND to ENOENT.
708
7092019-09-18 Steve Baird <baird@adacore.com>
710
711 * freeze.adb (Freeze_Object_Declaration): Do not call
712 Check_Large_Modular_Array when the object declaration being
713 frozen is an ignored ghost entity.
714
7152019-09-18 Tom Tromey <tromey@adacore.com>
716
717 * make.adb (Initialize): Fix typo.
718
7192019-09-18 Olivier Hainque <hainque@adacore.com>
720
721 * libgnat/s-win32.ads (DWORD_PTR): New type, pointer size
722 unsigned int.
723 (SYSTEM_INFO): Use it for dwActiveProcessorMask.
724
7252019-09-18 Arnaud Charlet <charlet@adacore.com>
726
727 * doc/gnat_rm/implementation_defined_pragmas.rst: Improve doc on
728 Warning_As_Error.
729 * gnat_rm.texi: Regenerate.
730
7312019-09-18 Arnaud Charlet <charlet@adacore.com>
732
733 * doc/gnat_rm/implementation_defined_characteristics.rst,
734 doc/gnat_rm/implementation_defined_pragmas.rst,
735 doc/gnat_rm/implementation_of_specific_ada_features.rst: Remove
736 remaining references to VMS support
737 * gnat_rm.texi: Regenerate.
738
7392019-09-18 Arnaud Charlet <charlet@adacore.com>
740
741 * libgnat/s-stausa.adb: Fix a typo
742
7432019-09-18 Bob Duff <duff@adacore.com>
744
745 * libgnat/a-cbhama.adb, libgnat/a-cbhase.adb,
746 libgnat/a-cbmutr.adb, libgnat/a-cborma.adb,
747 libgnat/a-cborse.adb, libgnat/a-cobove.adb (Copy): Avoid reading
748 the uninitialized variable C in the Checks = False case. Change
749 variable to be a constant.
750
7512019-09-18 Claire Dross <dross@adacore.com>
752
753 * libgnat/a-cofuma.adb (Remove, Elements_Equal_Except,
754 Keys_Included, Keys_Included_Except): Rename loop indexes and
755 global constants from I to J.
756
7572019-09-18 Arnaud Charlet <charlet@adacore.com>
758
759 * exp_unst.adb (Unnest_Subprograms): Refine previous change.
760
7612019-09-17 Claire Dross <dross@adacore.com>
762
763 * libgnat/a-cofuma.ads, libgnat/a-cofuma.adb (Remove): New
764 function which returns a copy of the input container without a
765 given mapping.
766
7672019-09-17 Yannick Moy <moy@adacore.com>
768
769 * libgnat/s-arit64.adb (Double_Divide): Correctly handle the
770 special case when rounding.
771
7722019-09-17 Javier Miranda <miranda@adacore.com>
773
774 * sem_ch3.adb (Complete_Private_Subtype): Propagate attributes
775 Has_Attributes and Predicate_Function to the cloned subtype.
776
7772019-09-17 Eric Botcazou <ebotcazou@adacore.com>
778
779 * sem.adb (Do_Analyze): Save Style_Check_Max_Line_Length on
780 entry and restore it on exit instead of recomputing it.
781
7822019-09-17 Tom Tromey <tromey@adacore.com>
783
784 * exp_dbug.ads: Update character type comment.
785
7862019-09-17 Yannick Moy <moy@adacore.com>
787
788 * libgnat/s-arit64.adb (Double_Divide): Simplify needlessly
789 complex computation. Fix comments.
790 (Scaled_Divide): Fix comments. Explain why implementation does
791 not suffer from bugs in Algorithm D from 2nd Edition of TAOCP.
792
7932019-09-17 Yannick Moy <moy@adacore.com>
794
795 * libgnat/s-arit64.adb (Scaled_Divide): Add protection against
796 undesirable wrap-around.
797
7982019-09-17 Yannick Moy <moy@adacore.com>
799
800 * libgnat/s-arit64.adb (Double_Divide): Fix two possible
801 overflows.
802
8032019-09-17 Dmitriy Anisimkov <anisimko@adacore.com>
804
805 * make_util.ads (On_Windows): Move...
806 * osint.ads (On_Windows): There.
807 * osint.adb (OS_Time_To_GNAT_Time): If odd incremented on
808 Windows before conversion to Time_Stamp_Type.
809
8102019-09-17 Yannick Moy <moy@adacore.com>
811
812 * sem_spark.adb (Check_Declaration): Do not check the assignment
813 from an illegal declaration.
814
8152019-09-17 Bob Duff <duff@adacore.com>
816
817 * doc/gnat_ugn/gnat_and_program_execution.rst: Clarify
818 documentation.
819 * gnat_ugn.texi: Regenerate.
820 * libgnat/s-stausa.ads: Clarify comments.
821
8222019-09-17 Steve Baird <baird@adacore.com>
823
824 * sem_util.adb (Wrong_Type): In deciding to suppress a message,
825 it is not enough for In_Instance to be True; in addition,
826 In_Generic_Actual (Expr) must be False.
827 * sem_type.adb (In_Generic_Actual): Fix bug where traversal of
828 parents skips every other node.
829
8302019-09-17 Claire Dross <dross@adacore.com>
831
832 * sem_spark.adb (Get_Observed_Or_Borrowed_Expr): If the
833 definition of a local borrower contains calls to traversal
834 functions, the borrowed expression is the first parameter of the
835 first traversal function call in the definition.
836
8372019-09-17 Ed Falis <falis@adacore.com>
838
839 * doc/gnat_rm/implementation_defined_pragmas.rst: Remove
840 section.
841 * gnat_rm.texi, gnat_ugn.texi: Regenerate.
842
8432019-09-17 Vadim Godunko <godunko@adacore.com>
844
845 * libgnat/g-exptty.ads (Close_Input): New subprogram.
846 * libgnat/g-exptty.adb (Close_Input): New subprogram.
847 (Close): Move close of TTY to Close_Input.
848 * terminals.c (__gnat_close_tty): Set file descriptors to
849 invalid value after close.
850
8512019-09-17 Vadim Godunko <godunko@adacore.com>
852
853 * libgnat/g-expect.adb (Expect_Internal): Try to call 'poll' few
854 times.
855
8562019-09-17 Vadim Godunko <godunko@adacore.com>
857
858 * libgnat/g-expect.ads, libgnat/g-expect.adb (Close_Input): New
859 subprogram.
860 (Get_Command_Output): Call Close_Input to close input stream.
861 (Expect_Internal): Likewise.
862 (Close): Likewise.
863 * libgnat/g-exptty.adb (Close): Likewise.
864
8652019-09-17 Piotr Trojanek <trojanek@adacore.com>
866
867 * sem_util.ads, sem_util.adb (Is_Attribute_Old): New utility
868 routine.
869
8702019-09-17 Yannick Moy <moy@adacore.com>
871
872 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Add handling
873 for dispatching operations.
874
8752019-09-17 Ed Schonberg <schonberg@adacore.com>
876
877 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): In a
878 generic context, for a Predicate aspect, use
879 Preanalyze_Spec_Expression to verify conformance.
880
8812019-09-17 Javier Miranda <miranda@adacore.com>
882
883 * sem_ch3.adb (Constrain_Corresponding_Record): Propagate
884 attribute Is_Tagged_Type.
885
8862019-09-17 Javier Miranda <miranda@adacore.com>
887
888 * exp_ch3.adb (Build_Record_Init_Proc): Do not generate code to
889 adjust the tag component when the record is initialized with a
890 raise expression.
891 * sem_aggr.adb (Valid_Limited_Ancestor): Return True for
892 N_Raise_Expression nodes.
893 (Valid_Ancestor_Type): Return True for raise expressions.
894 * sem_ch3.adb (Analyze_Component_Declaration): Do not report an
895 error when a component is initialized with a raise expression.
896 * sem_ch4.adb (Analyze_Qualified_Expression): Do not report an
897 error when the aggregate has a raise expression.
898
8992019-09-17 Piotr Trojanek <trojanek@adacore.com>
900
901 * ali.ads: Fix casing in comment.
902 * ali-util.ads, ali-util.adb (Read_Withed_ALIs): Remove
903 Ignore_Errors parameter; it was only set to non-default value of
904 True when running in GNATprove_Mode and wrongly reset to False
905 when calling this routine recursively. Now in GNATprove mode we
906 want it to be always True, so in fact it is equivalent to
907 GNATProve_Mode flag itself (which was already used in this
908 routine).
909
9102019-09-17 Arnaud Charlet <charlet@adacore.com>
911
912 * adaint.c (_REENTRANT, _THREAD_SAFE): Only define if needed.
913
9142019-09-17 Arnaud Charlet <charlet@adacore.com>
915
916 * libgnat/s-bitfie.ads (Val_Bits, Val_Bytes): Define from
917 Long_Long_Integer'Size.
918
9192019-09-17 Javier Miranda <miranda@adacore.com>
920
921 * exp_ch6.ads (Needs_BIP_Task_Actuals): New subprogram.
922 * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call): Code
923 cleanup.
924 (Check_Number_Of_Actuals): New subprogram.
925 (Make_Build_In_Place_Call_In_Allocator): Adding assertion.
926 (Make_Build_In_Place_Call_In_Anonymous_Context): Adding
927 assertion.
928 (Make_Build_In_Place_Call_In_Assignment): Adding assertion.
929 (Make_Build_In_Place_Call_In_Object_Declaration): Code cleanup
930 plus assertion addition.
931 (Needs_BIP_Task_Actuals): New subprogram.
932 * sem_ch6.adb (Create_Extra_Formals): Rely on
933 Needs_BIP_Task_Actuals() to check if the master of the tasks to
934 be created, and the caller's activation chain formals are
935 needed.
936
9372019-09-17 Bob Duff <duff@adacore.com>
938
939 * libgnat/s-bituti.adb (Get_Val_2, Set_Val_2): Use new routines
940 for getting and setting a Val_2, avoiding touching the second
941 half when that half might not exist.
942 * exp_ch5.adb (Expand_Assign_Array_Loop_Or_Bitfield): Correct
943 tests for potential volatile or independent components. In
944 particular, do not call Prefix unless we know it's a slice.
945
9462019-09-17 Dmitriy Anisimkov <anisimko@adacore.com>
947
948 * gsocket.h: Include sys/un.h.
949 * s-oscons-tmplt.c (AF_UNIX): New constant generation.
950 (SIZEOF_sockaddr_un): Idem.
951 * libgnat/g-socket.ads (Family_Type): New value Family_Unix
952 added.
953 (Family_Inet_4_6): New subtype only for network families.
954 (Sock_Addr_Type): Add Unbounded_String field for Family_Unix
955 variant.
956 (Unix_Socket_Address): Create Sock_Addr_Type from socket
957 pathname.
958 (Network_Socket_Address): Create Sock_Addr_Type from
959 Inet_Addr_Type and Port_Type parameters.
960 * libgnat/g-socket.adb: Support local unix address in socket
961 routines.
962 (Get_Address_Info): Disable warning about Result may be
963 referenced before it has a value. Remove duplicated code to exit
964 from Look_For_Supported.
965 * libgnat/g-sothco.ads (Unix_Name_Length): New constant defining
966 maximum number of characters in local socket address path.
967 (Sockaddr): Add variant for Family_Unix address family. Move
968 Sin_Port and Sin_Family to Family_Inet section. Add Sin6_Port
969 and Sin6_Family to Family_Inet6 section.
970 (Set_Address): Add out parameter Length to return valuable
971 Sockaddr data length.
972 (Get_Address): Add input parameter Length to set valuable
973 Sockaddr data length.
974 * libgnat/g-sothco.adb: Support local unix address in socket
975 routines.
976
9772019-09-17 Eric Botcazou <ebotcazou@adacore.com>
978
979 * exp_attr.adb (Expand_Size_Attribute): Chain the special cases
980 on the back-end path and rewrite the attribute appled to slices
981 of bit-packed arrays into the product of the Length and the
982 Compoent_Size attributes of the slices.
983 * exp_ch5.adb (Expand_Assign_Array_Bitfield): Use Size attribute
984 directly to compute the bitfield's size.
985
9862019-09-17 Bob Duff <duff@adacore.com>
987
988 * exp_ch5.adb (Expand_Assign_Array_Loop_Or_Bitfield): Add tests
989 for potential volatile or independent components.
990 * libgnat/s-bituti.adb (Copy_Small_Bitfield,
991 Copy_Large_Bitfield): Move declarations to more appropriate
992 place.
993
9942019-09-13 Maciej W. Rozycki <macro@wdc.com>
995
996 * make.adb (Scan_Make_Arg): Also accept `--sysroot=' for the
997 compiler and the linker.
998
9992019-08-30 Eric Botcazou <ebotcazou@adacore.com>
1000
1001 * gcc-interface/decl.c (maybe_saturate_size): New function.
1002 (gnat_to_gnu_entity): Invoke it on the Esize of types before sending
1003 it for back-annotations.
1004 * gcc-interface/trans.c: Fix typo.
1005
10062019-08-30 Eric Botcazou <ebotcazou@adacore.com>
1007
1008 * gcc-interface/ada-tree.h (DECL_FORCED_BY_REF_P): New macro.
1009 * gcc-interface/decl.c (gnat_to_gnu_param): Set it on parameters
1010 whose mechanism was forced to by-reference.
1011 * gcc-interface/trans.c (Call_to_gnu): Do not issue a warning about a
1012 misaligned actual parameter if it is based on a CONSTRUCTOR. Remove
1013 obsolete warning for users of Starlet. Issue a warning if a temporary
1014 is make around the call for a parameter with DECL_FORCED_BY_REF_P set.
1015 (addressable_p): Return true for REAL_CST and ADDR_EXPR.
1016
10172019-08-30 Eric Botcazou <ebotcazou@adacore.com>
1018
1019 * gcc-interface/trans.c (gnat_to_gnu): Do not set the location on an
1020 expression used for a tag.
1021
10222019-08-30 Eric Botcazou <ebotcazou@adacore.com>
1023
1024 * gcc-interface/gigi.h (aggregate_type_contains_array_p): Declare.
1025 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: For an
1026 extension, test Has_Record_Rep_Clause instead of Has_Specified_Layout.
1027 (adjust_packed): Return 0 if the type of the field is an aggregate
1028 type that contains (or is) a self-referential array.
1029 (type_has_variable_size): Delete.
1030 * gcc-interface/utils.c (inish_record_type): Constify a variable.
1031 (aggregate_type_contains_array_p): Add parameter SELF_REFERENTIAL.
1032 <RECORD_TYPE>: Pass it in the recursive call.
1033 <ARRAY_TYPE>: If it is true, return true only if the array type is
1034 self-referential.
1035 (create_field_decl): Streamline the setting of the alignment on the
1036 field. Pass false to aggregate_type_contains_array_p.
1037
10382019-08-30 Eric Botcazou <ebotcazou@adacore.com>
1039
1040 * gcc-interface/trans.c (lvalue_required_p) <N_Slice>: Adjust GNU_TYPE
1041 in the recursive call.
1042 <N_Selected_Component>: Likewise.
1043
10442019-08-30 Eric Botcazou <ebotcazou@adacore.com>
1045
1046 * gcc-interface/utils.c (build_template): Deal with parameters
1047 passed by pointer to component of multi-dimensional arrays.
1048
10492019-08-30 Eric Botcazou <ebotcazou@adacore.com>
1050
1051 * gcc-interface/decl.c (annotate_value) <CALL_EXPR>: Inline the call
1052 also if List_Representation_Info is greater than 3.
1053
10542019-08-30 Eric Botcazou <ebotcazou@adacore.com>
1055
1056 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Size>: Add assertion.
1057
10582019-08-30 Eric Botcazou <ebotcazou@adacore.com>
1059
1060 * gcc-interface/gigi.h (gigi_checking_assert): New macro.
1061 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Modular_Integer_Type>:
1062 Remove redundant test and adjust comments. Minor tweaks.
1063 * gcc-interface/trans.c (Call_to_gnu): Do not generate range checks,
1064 instead assert that the Do_Range_Check flag is not set. Adjust call
1065 to convert_with_check.
1066 (gnat_to_gnu): Likewise.
1067 (assoc_to_constructor): Likewise.
1068 (pos_to_constructor): Likewise. Remove GNAT_COMPONENT_TYPE parameter.
1069 (emit_range_check): Delete.
1070 (convert_with_check): Remove RANGE_P parameter and adjust. Do a single
1071 overflow check for modular types.
1072
10732019-08-23 Jakub Jelinek <jakub@redhat.com>
1074
1075 PR middle-end/91283
1076 * gcc-interface/misc.c (gnat_post_options): Set flag_excess_precision
1077 instead of flag_excess_precision_cmdline.
1078
10792019-08-21 Vadim Godunko <godunko@adacore.com>
1080
1081 * libgnat/g-expect.adb (Expect_Internal): Attempt to read
1082 several times when 'read' returns non-positive.
1083
10842019-08-21 Piotr Trojanek <trojanek@adacore.com>
1085
1086 * einfo.adb (Is_Discriminal): Remove extra parens.
1087 (Is_Constant_Object): Simplify by reusing Ekind_In.
1088 (Is_Prival): Remove extra parens.
1089 * checks.adb, exp_ch4.adb, sem_ch3.adb, sem_spark.adb: Minor
1090 reformattings.
1091
10922019-08-21 Claire Dross <dross@adacore.com>
1093
1094 * libgnat/a-cofove.ads (Vector): Add an Iterable aspect to allow
1095 iteration.
1096 (Iter_First, Iter_Next): Primitives used for iteration.
1097
10982019-08-21 Yannick Moy <moy@adacore.com>
1099
1100 * sem_ch3.adb (Analyze_Subtype_Declaration): Inherit RM_Size
1101 field for formal type parameters in generic instantiations.
1102
11032019-08-21 Yannick Moy <moy@adacore.com>
1104
1105 * sem_spark.adb: Update references to the SPARK RM.
1106
11072019-08-21 Eric Botcazou <ebotcazou@adacore.com>
1108
1109 * repinfo.adb (List_Array_Info): In -gnatR4 mode, set the
1110 relevant flag on the component type here instead of...
1111 (List_Object_Info): Likewise for the object type.
1112 (List_Entities): ...here. In -gnatR4 mode, recurse into
1113 entities local to a record type.
1114 (List_Component_Layout): In -gnatR4 mode, mark the type as
1115 relevant.
1116
11172019-08-21 Bob Duff <duff@adacore.com>
1118
1119 * Makefile.rtl (GNATRTL_NONTASKING_OBJS): Add s-bitutil.o and
1120 s-biutin.o.
1121 * exp_ch5.adb (Expand_Assign_Array_Bitfield): New function to
1122 generate a call to Copy_Bitfield. This is disabled for now.
1123 (Expand_Assign_Array_Loop_Or_Bitfield): New function to decide
1124 whether to call Expand_Assign_Array_Bitfield.
1125 (Expand_Assign_Array): Call Expand_Assign_Array_Loop_Or_Bitfield
1126 instead of Expand_Assign_Array_Loop.
1127 * libgnat/s-bitfie.ads, libgnat/s-bituti.adb,
1128 libgnat/s-bituti.ads: New units.
1129 * rtsfind.ads: Add enum literals for accessing Copy_Bitfield.
1130
11312019-08-21 Piotr Trojanek <trojanek@adacore.com>
1132
1133 * bindo-graphs.ads (Iterate_Edges_To_Successors): Fix typo in
1134 pragma Inline.
1135 * bindo-graphs.adb (Delete_Edge): Fix layout in parameter list.
1136
11372019-08-21 Gary Dismukes <dismukes@adacore.com>
1138
1139 * exp_ch3.adb (Build_Master): Suppress call to
1140 Build_Class_Wide_Master in the case where the
1141 access-to-limited-class-wide type was created for a component in
1142 an entry's formal parameter
1143 block (Is_Parameter_Block_Component_Type), to prevent a master
1144 from being created for such access types generated by the front
1145 end in a task spec for entry formals in a parameter block. Add
1146 a ??? about whether this suppression should be done more
1147 generally (such as by using Comes_From_Source).
1148
11492019-08-21 Eric Botcazou <ebotcazou@adacore.com>
1150
1151 * exp_ch6.adb (Expand_N_Extended_Return_Statement): In the case
1152 of a built-in-place function that doesn't need a BIP_Alloc_Form
1153 parameter but returns unconstrained, build the return
1154 consistently using the function's result subtype. Remove bypass
1155 added in previous change.
1156
11572019-08-21 Piotr Trojanek <trojanek@adacore.com>
1158
1159 * sem_prag.adb (Max_Entry_Queue_Length): Do not substitute
1160 expression of the pragma argument with its value during
1161 analysis.
1162 * sem_util.adb (Get_Max_Queue_Length): Compute value of the
1163 pragma argument when needed.
1164
11652019-08-21 Yannick Moy <moy@adacore.com>
1166
1167 * checks.adb (Install_Null_Excluding_Check): Do not install
1168 check in GNATprove mode.
1169
11702019-08-21 Yannick Moy <moy@adacore.com>
1171
1172 * sem_spark.adb (Process_Path): Do nothing on address of
1173 subprogram.
1174
11752019-08-21 Eric Botcazou <ebotcazou@adacore.com>
1176
1177 * exp_util.adb (Finalize_Address): Deal consistently with
1178 subtypes of private protected types.
1179
11802019-08-21 Piotr Trojanek <trojanek@adacore.com>
1181
1182 * exp_util.adb (Corresponding_Runtime_Package): Use high-level
1183 Is_Protected_Type.
1184 * sem_ch8.adb (Analyze_Renamed_Entry): Likewise.
1185 * sem_ch9.adb (Analyze_Requeue): Likewise.
1186
11872019-08-21 Javier Miranda <miranda@adacore.com>
1188
1189 * sem_util.adb (Update_Named_Associations): Update
1190 First_Named_Actual when the subprogram call has a single named
1191 actual.
1192
11932019-08-21 Joel Brobecker <brobecker@adacore.com>
1194
1195 * doc/Makefile (mk_empty_dirs): New (PHONY) rule.
1196 (%.html, %.pdf, %.txt, %.info, %.texinfo): Add dependencies on
1197 mk_empty_dirs.
1198
11992019-08-21 Justin Squirek <squirek@adacore.com>
1200
1201 * doc/gnat_rm/implementation_defined_pragmas.rst: Modify
1202 documentation to reflect expected behavior.
1203 * gnat_rm.texi: Regenerate.
1204 * sem_prag.adb (Analyze_Pragma): Modify handling of pragma
1205 Max_Entry_Queue_Length to not reject integer values of negative
1206 one.
1207 * sem_util.adb (Get_Max_Queue_Length): Add processing for values
1208 of negative one to fit within the current scheme.
1209
12102019-08-20 Arnaud Charlet <charlet@adacore.com>
1211
1212 * exp_unst.adb (Unnest_Subprograms, Unnest_Subprogram): Take
1213 inlining (-gnatn) into account.
1214
12152019-08-20 Ed Schonberg <schonberg@adacore.com>
1216
1217 * exp_ch13.adb (Expand_N_Attribute_Definition_Clause, case
1218 Storage_Size): If the expression for Storage_Size is not static
1219 it may depend on characterstics of another type that may bot be
1220 frozen yet, so the elaboration of the expression for the aspect
1221 must be attached directly to the freeze actions of the type to
1222 which it applies.
1223
12242019-08-20 Piotr Trojanek <trojanek@adacore.com>
1225
1226 * exp_util.adb (Build_DIC_Procedure_Declaration): Set the last
1227 entity of the generated Default_Initial_Condition procedure in
1228 order to construct a proper entity chain.
1229
12302019-08-20 Yannick Moy <moy@adacore.com>
1231
1232 * exp_spark.adb (Expand_SPARK_N_Slice_Or_Indexed_Component):
1233 Renaming of function to apply to slices as well.
1234 (Expand_SPARK): Expand prefix of slices of access type.
1235
12362019-08-20 Bob Duff <duff@adacore.com>
1237
1238 * exp_aggr.adb (Expand_Array_Aggregate): Use build-in-place in
1239 the nonlimited case in STEP 4. This improves the efficiency of
1240 things like (1 .. 1000 => <>). We still generate some code for
1241 that, unfortunately, but it is much improved.
1242 (Aggr_Assignment_OK_For_Backend): Return false if <> components
1243 are present.
1244
12452019-08-20 Bob Duff <duff@adacore.com>
1246
1247 * exp_ch6.adb (Needs_BIP_Alloc_Form): Call
1248 Requires_Transient_Scope rather than checking constrainedness
1249 and so forth. We have previously improved
1250 Requires_Transient_Scope to return False in various cases,
1251 notably a limited record with an access discriminant. This
1252 change takes advantage of that to avoid using the secondary
1253 stack for functions returning such types.
1254 (Make_Build_In_Place_Call_In_Allocator): Be consistent by
1255 calling Needs_BIP_Alloc_Form rather than Is_Constrained and so
1256 forth.
1257 * sem_ch4.adb (Analyze_Allocator): The above change causes the
1258 compiler to generate code that is not legal Ada, in particular
1259 an uninitialized allocator for indefinite subtype. This is
1260 harmless, so we suppress the error message in this case.
1261
12622019-08-20 Gary Dismukes <dismukes@adacore.com>
1263
1264 * ali.adb, ali.ads, aspects.adb, checks.ads, checks.adb,
1265 doc/gnat_rm/implementation_defined_pragmas.rst,
1266 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
1267 einfo.ads, exp_aggr.adb, exp_ch11.adb, exp_ch3.ads, exp_ch4.adb,
1268 exp_disp.adb, inline.adb, libgnat/a-locale.ads,
1269 libgnat/s-soflin.ads, par_sco.adb, repinfo.adb, sem_ch5.adb,
1270 sem_disp.adb, sem_elab.adb, sem_eval.adb, sem_spark.adb,
1271 sem_spark.ads, sinfo.ads: Minor reformattings, typo fixes and
1272 and rewordings.
1273
12742019-08-20 Dmitriy Anisimkov <anisimko@adacore.com>
1275
1276 * adaint.c (__gnat_to_gm_time): On _WIN32, don't round time up
1277 to even second.
1278
12792019-08-20 Ed Schonberg <schonberg@adacore.com>
1280
1281 * sem_ch3.adb (Analyze_Object_Declaration): If actual type is
1282 private and distinct from nominal type in declaration, propagate
1283 flags Is_Constr_Subt_For_U_Nominal and _UN_Aliased to full view
1284 of private type.
1285
12862019-08-20 Ed Schonberg <schonberg@adacore.com>
1287
1288 * exp_attr.adb (Expand_Loop_Entry_Attribute): When expanding a
1289 loop entry attribute for a while_loop we construct a function
1290 that incorporates the expanded condition of the loop. The itypes
1291 that may be generated in that expansion must carry the scope of
1292 the constructed function for proper handling in gigi.
1293
12942019-08-20 Ed Schonberg <schonberg@adacore.com>
1295
1296 * exp_disp.adb (Build_Class_Wide_Check, Replace_Formals): When a
1297 dispatching call tp a subprogram with a class-wide precondition
1298 occurrs in the same declarative part as the ancestor subprogram
1299 being called, the`expression for the precondition has not been
1300 analyzed yet. Such a call may appear, e.g. in an expression
1301 function. In that case, the replacement of formals by actuals in
1302 the call cannot use the formal entities of the subprogram being
1303 called, and the occurrence of the formals in the expression must
1304 be located by name (Chars fields) as would be done at a later
1305 freeze point, when the expression is resolved in the context of
1306 the subprogram itself.
1307
13082019-08-20 Bob Duff <duff@adacore.com>
1309
1310 * sem_prag.adb (Persistent_BSS): If an initialization is present
1311 because of Initialize_Scalars or Normalize_Scalars, generate an
1312 implicit pragma Suppress_Initialization to remove that, because
1313 initialization is not allowed for these variables. Other
1314 initializations remain illegal.
1315
13162019-08-20 Gary Dismukes <dismukes@adacore.com>
1317
1318 * sem_ch3.adb (OK_For_Limited_Init_In_05): In the case of type
1319 conversions, apply the recursive call to the Original_Node of
1320 the expression Exp rather than the Expression of the
1321 Original_Node, in the case where Exp has been rewritten;
1322 otherwise, when Original_Node is the same as Exp, apply the
1323 recursive call to the Expression.
1324 (Check_Initialization): Revise condition for special check on
1325 type conversions of limited function calls to test Original_Node
1326 (avoiding spurious errors on expanded unchecked conversions
1327 applied to build-in-place dispatching calls).
1328
13292019-08-20 Patrick Bernardi <bernardi@adacore.com>
1330
1331 * exp_aggr.adb (Expand_Record_Aggregate): Always convert a
1332 record Aggregate to assignment statements if the option
1333 Aggregate_Individually_Assign is set.
1334 * opt.ads (Aggregate_Individually_Assign): New option.
1335 * par-prag.adb (Prag): Add Pragma_Aggregate_Individually_Assign.
1336 * sem_prag.adb (Analyze_Pragma): Likewise.
1337 * snames.ads-tmpl: Add Pragma_Aggregate_Individually_Assign and
1338 Name_Aggregate_Individually_Assign.
1339 * doc/gnat_rm/implementation_defined_pragmas.rst: Document
1340 pragma Aggregate_Individually_Assign.
1341 * gnat_rm.texi: Regenerate.
1342
13432019-08-20 Bob Duff <duff@adacore.com>
1344
1345 * par-ch4.adb: Minor wording change in error messages.
1346 * sem_aggr.adb (Resolve_Delta_Aggregate): Emit an error for Ada
1347 versions prior to Ada 2020.
1348
13492019-08-20 Bob Duff <duff@adacore.com>
1350
1351 * freeze.adb (Is_Atomic_VFA_Aggregate): Make the temp for
1352 initialization of the atomic variable be constant. This is
1353 cleaner, and might improve efficiency.
1354
13552019-08-20 Eric Botcazou <ebotcazou@adacore.com>
1356
1357 * repinfo.adb (List_Record_Info): In -gnatR4 mode, set the
1358 relevant flag on the implicit base type of a record subtype.
1359
13602019-08-20 Bob Duff <duff@adacore.com>
1361
1362 * sem_eval.adb (Expr_Value): Implement the case of an unchecked
1363 conversion of a static expression.
1364
13652019-08-20 Bob Duff <duff@adacore.com>
1366
1367 * sem_ch13.adb (Is_Null_Array): New function, used to detect the
1368 null array case; used to warn about uncheckedly converting to a
1369 zero-sized array. It is unfortunate that we can't just check
1370 the size, and warn on all cases of converting from a
1371 nonzero-sized type to a zero-sized one. That's because "0" means
1372 two different things: "size is zero" and "size is unknown".
1373 Until we fix that design flaw, we need this more targeted fix.
1374
13752019-08-20 Bob Duff <duff@adacore.com>
1376
1377 * libgnat/a-cborma.adb, libgnat/a-cborse.adb (Clear): Repeatedly
1378 call Delete. This avoids clearing the free list, which
1379 substantially speeds up future Delete operations.
1380
13812019-08-20 Bob Duff <duff@adacore.com>
1382
1383 * sem_ch13.adb (Component_Order_Check): New procedure to check
1384 for out-of-order clauses.
1385 * warnsw.ads, warnsw.adb: New -gnatw_r switch.
1386 * doc/gnat_ugn/building_executable_programs_with_gnat.rst:
1387 Document new switch.
1388 * gnat_ugn.texi: Regenerate.
1389
13902019-08-20 Bob Duff <duff@adacore.com>
1391
1392 * sem_ch13.adb (Object_Size): Give an error for zero. It really
1393 rubs me the wrong way that we don't honor "for T'Object_Size use
1394 0;", but it's not important enough to fix. In any case, if we're
1395 not going to obey the clause, we should give an error.
1396
13972019-08-20 Bob Duff <duff@adacore.com>
1398
1399 * errout.adb (Error_Msg_Internal): Set Warn_Err in case of
1400 Is_Style_Msg.
1401 * erroutc.adb (Output_Msg_Text): Do Warnings_Treated_As_Errors
1402 processing and [warning-as-error] modification for style
1403 messages. Clean up code, simplify, remove unnecessary block
1404 statement, add renaming of table entry.
1405 * erroutc.ads (Warning_Treated_As_Error): Fix comment: no such
1406 thing as Set_Warning_As_Error.
1407 * opt.ads: Clean up comments and move related declarations near
1408 each other.
1409 * par-prag.adb: Process Warning_As_Error. This is necessary
1410 because many style warning happen during parsing.
1411 * sem_prag.adb: Use new Acquire_Warning_Match_String.
1412 * sem_util.ads, sem_util.adb (Acquire_Warning_Match_String): New
1413 function shared by par-prag.adb and sem_prag.adb. Replaces the
1414 procedure in sem_prag.adb. Avoid use of global variables.
1415 * stringt.ads, stringt.adb (To_String): New function to convert
1416 String_Id to String.
1417 * doc/gnat_rm/implementation_defined_pragmas.rst: Document the
1418 new feature.
1419 * gnat_rm.texi: Regenerate.
1420
14212019-08-20 Eric Botcazou <ebotcazou@adacore.com>
1422
1423 * lib.ads: Add with clause for GNAT.HTable.
1424 Add pragma Inline for Is_Loaded and alphabetize the list.
1425 (Unit_Name_Table_Size): New constant.
1426 (Unit_Name_Header_Num): New subtype.
1427 (Unit_Name_Hash): New function declaration.
1428 (Unit_Names): New simple hash table.
1429 (Init_Unit_Name): New procedure declaration.
1430 * lib.adb (Set_Unit_Name): Unregister the old name in the table,
1431 if any, and then register the new name.
1432 (Init_Unit_Name): New procedure.
1433 (Is_Loaded): Reimplement using a lookup in the names table.
1434 (Remove_Unit): Unregister the name.
1435 (Unit_Name_Hash): New function.
1436 * lib-load.adb (Create_Dummy_Package_Unit): Call Init_Unit_Name.
1437 (Load_Unit): Use a lookup in the names table to find out whether
1438 the unit has already been loaded. Call Init_Unit_Name and then
1439 Remove_Unit if the loading has failed.
1440 (Make_Child_Decl_Unit): Call Init_Unit_Name.
1441 (Make_Instance_Unit): Likewise.
1442 * lib-writ.adb (Ensure_System_Dependency): Likewise.
1443
14442019-08-20 Bob Duff <duff@adacore.com>
1445
1446 * sem_ch13.adb (Record_Hole_Check): Initialize After_Last.
1447
14482019-08-20 Piotr Trojanek <trojanek@adacore.com>
1449
1450 * impunit.adb (Get_Kind_Of_Unit): Revert change for adapting
1451 this routine for gnatprove.
1452
14532019-08-20 Arnaud Charlet <charlet@adacore.com>
1454
1455 * doc/gnat_rm/implementation_defined_pragmas.rst: Document
1456 requirements for Pragma Lock_Free.
1457 * gnat_rm.texi: Regenerate.
1458
14592019-08-20 Philippe Gil <gil@adacore.com>
1460
1461 * bindgen.adb (Gen_Main): Set gnat_argc/gnat_argv to argc/argv
1462 only when still uninitialized.
1463
14642019-08-20 Bob Duff <duff@adacore.com>
1465
1466 * libgnat/g-comlin.ads (Exit_From_Command_Line): Fix
1467 documentation for GNAT.Command_Line.
1468
14692019-08-20 Pierre-Marie de Rodat <derodat@adacore.com>
1470
1471 PR ada/91492
1472 * gcc-interface/lang.opt (-fdump-scos): Add missing dot at the
1473 end of the documentation.
1474
14752019-08-20 Richard Sandiford <richard.sandiford@arm.com>
1476
1477 * gcc-interface/misc.c (default_pass_by_ref): Update call to
1478 pass_by_reference.
1479
14802019-08-19 Bob Duff <duff@adacore.com>
1481
1482 * doc/gnat_rm/implementation_advice.rst: Fix documentation for
1483 stream oriented attributes.
1484 * gnat_rm.texi: Regenerate.
1485
14862019-08-19 Gary Dismukes <dismukes@adacore.com>
1487
1488 * einfo.ads (E_Function, E_Procedure): Update comments to
1489 reflect that Renamed_Entity is also used for nongeneric
1490 subprograms.
1491
14922019-08-19 Eric Botcazou <ebotcazou@adacore.com>
1493
1494 * sem_prag.adb (Is_Before_First_Decl): Deal with rewritten
1495 pragmas.
1496
14972019-08-19 Bob Duff <duff@adacore.com>
1498
1499 * sem_warn.adb (Warn_On_Unreferenced_Entity): Suppress warning
1500 on formal parameters of dispatching operations.
1501
15022019-08-19 Ed Schonberg <schonberg@adacore.com>
1503
1504 * sem_res.adb (Resolve_Call): A call to an expression function
1505 freezes when expander is active, unless the call appears within
1506 the body of another expression function,
1507
15082019-08-19 Dmitriy Anisimkov <anisimko@adacore.com>
1509
1510 * libgnat/s-os_lib.ads, libgnat/s-os_lib.adb (To_Ada, To_C): New
1511 routines.
1512
15132019-08-19 Bob Duff <duff@adacore.com>
1514
1515 * exp_attr.adb (Attribute_Valid): Correct the handling of
1516 private types where the full type is modular. System.Address is
1517 an example. Otherwise, we convert uncheckedly to a signed type,
1518 so we get an incorrect range 0 .. -1, for which all values will
1519 fail. The 'Valid attribute is illegal for such types, but we
1520 generate such illegal attribute_references for 'Valid_Scalars,
1521 and we generate 'Valid_Scalars when the -gnateV switch is used.
1522 Rename Btyp --> PBtyp to avoid hiding the outer Btyp, which was
1523 confusing.
1524 * libgnat/a-except.adb: Set the Exception_Raised component.
1525 Otherwise, we have incorrect reads of invalid data.
1526
15272019-08-19 Pierre-Marie de Rodat <derodat@adacore.com>
1528
1529 * libgnat/a-cgaaso.ads, libgnat/a-cgarso.ads,
1530 libgnat/a-cogeso.ads, libgnat/a-contai.ads,
1531 libgnat/a-locale.ads: Import documentation from the RM.
1532
15332019-08-19 Jerome Guitton <guitton@adacore.com>
1534
1535 * Makefile.rtl (system.o): New target to add generation of
1536 target properties.
1537 * gcc-interface/Makefile.in (install-gnatlib): Install
1538 ada_target_properties.
1539
15402019-08-19 Eric Botcazou <ebotcazou@adacore.com>
1541
1542 * inline.adb (Add_Inlined_Body): Do not special-case instances
1543 that are compilation units.
1544 (Add_Pending_Instantiation): Likewise.
1545 (Instantiate_Body): Skip instantiations that are compilation
1546 units and have already been performed.
1547 * sem_ch12.adb (Needs_Body_Instantiated): Do not special-case
1548 instances that are compilation units.
1549 (Load_Parent_Of_Generic): Be prepared for parent that is a
1550 compilation unit but whose instantiation node has not been
1551 replaced.
1552
15532019-08-19 Eric Botcazou <ebotcazou@adacore.com>
1554
1555 * inline.adb (Initialize, Lock): Deal with
1556 Called_Pending_Instantiations.
1557
15582019-08-19 Ed Schonberg <schonberg@adacore.com>
1559
1560 * sem_ch6.adb (Check_Synchronized_Overriding): Complete
1561 predicate that applies legality check in 9.4 (11.9/2): if an
1562 inherited subprogram is implemented by a protected procedure or
1563 entry, its first paarameter must be out, in_out or
1564 access_to_varible.
1565
15662019-08-19 Javier Miranda <miranda@adacore.com>
1567
1568 PR ada/65696
1569 * exp_atag.ads, exp_atag.adb (Build_Inherit_Predefined_Prims):
1570 Adding formal to specify how many predefined primitives are
1571 inherited from the parent type.
1572 * exp_disp.adb (Number_Of_Predefined_Prims): New subprogram.
1573 (Make_Secondary_DT): Compute the number of predefined primitives
1574 of all tagged types (including tagged types not defined at
1575 library level). Previously we unconditionally relied on the
1576 Max_Predef_Prims constant value when building the dispatch
1577 tables of tagged types not defined at library level (thus
1578 consuming more memory for their dispatch tables than required).
1579 (Make_DT): Compute the number of predefined primitives that must
1580 be inherited from their parent type when building the dispatch
1581 tables of tagged types not defined at library level. Previously
1582 we unconditionally relied on the Max_Predef_Prims constant value
1583 when building the dispatch tables of tagged types not defined at
1584 library level (thus copying more data than required from the
1585 parent type).
1586
15872019-08-19 Bob Duff <duff@adacore.com>
1588
1589 * sem_ch13.adb (Record_Hole_Check): Procedure to check for holes
1590 that incudes processing type extensions. A type extension is
1591 processed by first calling Record_Hole_Check recursively on the
1592 parent type to compute the bit number after the last component
1593 of the parent.
1594
15952019-08-19 Gary Dismukes <dismukes@adacore.com>
1596
1597 * checks.adb (Length_Mismatch_Info_Message): New function in
1598 Selected_Length_Checks to return a message indicating the
1599 element counts for the mismatched lengths for a failed
1600 compile-time length check.
1601 (Plural_Or_Singular_Ending): Support function in
1602 Length_Mismatch_Info_Message to return either "" or "s", for
1603 concatenating to the end of words.
1604 (Selected_Length_Checks): Pass the result of
1605 Length_Mismatch_Info_Message as an extra warning message to
1606 Compile_Time_Constraint_Error to indicate the mismatched lengths
1607 for a failed compile-time length check.
1608 * sem_util.ads (Compile_Time_Constraint_Error): Add an optional
1609 message formal (Extra_Msg), defaulted to the empty string.
1610 * sem_util.adb (Compile_Time_Constraint_Error): Output an extra
1611 message following the main warning message (when Extra_Msg is
1612 not the empty string).
1613
16142019-08-19 Patrick Bernardi <bernardi@adacore.com>
1615
1616 * socket.c: Removed the redefinition of getaddrinfo, getnameinfo
1617 and freeaddrinfo to internal VxWorks kernel calls because they
1618 are, well, internal kernel calls and cannot be called from RTPs.
1619 VxWorks provides the necessary components to call these routines
1620 directly.
1621
16222019-08-19 Eric Botcazou <ebotcazou@adacore.com>
1623
1624 * exp_dist.adb (Is_Generic_Actual_Subtype): New predicate.
1625 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
1626 Use it instead of Is_Generic_Actual_Type flag to detect subtypes
1627 representing generic actual types.
1628
16292019-08-19 Ed Schonberg <schonberg@adacore.com>
1630
1631 * sem_warn.adb (Check_References, Generic_Body_Formal): When a
1632 formal parameter of a generic subprogram is not referenced in
1633 the body, place the corresponding warning on the corresponding
1634 entity in the specification of the generic body, as is done for
1635 non-generic subprograms.
1636
16372019-08-19 Bob Duff <duff@adacore.com>
1638
1639 * errout.ads (Size_Too_Small_Message): New constant.
1640 * errout.adb, freeze.adb, sem_ch13.adb: Use it.
1641
16422019-08-19 Eric Botcazou <ebotcazou@adacore.com>
1643
1644 * exp_dist.adb (Build_Package_Stubs): Do not specifically visit
1645 the declarations of an N_Subprogram_Instantiation node.
1646
16472019-08-19 Bob Duff <duff@adacore.com>
1648
1649 * doc/gnat_ugn/gnat_utility_programs.rst: Document missing
1650 metrics switches.
1651
16522019-08-19 Piotr Trojanek <trojanek@adacore.com>
1653
1654 * sem_ch12.adb (Get_Unit_Instantiation_Node): Simplify Nkind_In
1655 membership test.
1656 * sem.adb (Depends_On_Main): Whitespace cleanup; only assign a
1657 local variable if needed.
1658
16592019-08-19 Claire Dross <dross@adacore.com>
1660
1661 * sem_spark.ads, sem_spark.adb (Is_Pledge_Function): New
1662 parameter of the generic. Function used to decide whether a
1663 function is a pledge function.
1664 (Check_Not_Borrowed): Disable check inside the second parameter
1665 of a pledge function for the path borrowed by the first
1666 parameter. Also disable checks for entities inside a Global
1667 contract.
1668
16692019-08-19 Joffrey Huguet <huguet@adacore.com>
1670
1671 * libgnat/a-cfdlli.ads, libgnat/a-cfhama.ads,
1672 libgnat/a-cfinve.ads, libgnat/a-cforma.ads,
1673 libgnat/a-cofove.ads, libgnat/a-cofuma.ads,
1674 libgnat/a-cofuve.ads: Add formal function parameter "=" (L, R :
1675 Element_Type) to the generic packages.
1676
16772019-08-19 Eric Botcazou <ebotcazou@adacore.com>
1678
1679 * opt.ads: Clean up left-overs of earlier implementation in
1680 comment:
1681
16822019-08-19 Ed Schonberg <schonberg@adacore.com>
1683
1684 * sem_ch3.adb (Derived_Enumeration_Type): Do no freeze anonymous
1685 base type if the bounds in the derived type declaration are
1686 literals of the type.
1687
16882019-08-19 Yannick Moy <moy@adacore.com>
1689
1690 * sem_res.adb (Resolve_Call): Check non-aliasing rules before
1691 GNATprove inlining.
1692
16932019-08-19 Eric Botcazou <ebotcazou@adacore.com>
1694
1695 * inline.adb (Add_Inlined_Body): Do not add pending
1696 instantiations.
1697 * sem_ch12.adb (Needs_Body_Instantiated): New predicate.
1698 (Analyze_Package_Instantiation): Use it to decide whether to add
1699 a pending instantiation for the body of the package.
1700
17012019-08-19 Olivier Hainque <hainque@adacore.com>
1702
1703 * gcc-interface/trans.c (Acc_Loop_to_gnu): Return the openacc
1704 BIND_EXPR node we have constructed on purpose. Remove unused
1705 variable.
1706
17072019-08-19 Pierre-Marie de Rodat <derodat@adacore.com>
1708
1709 * gcc-interface/lang.opt (fdump-scos): Define.
1710 * gcc-interface/misc.c (gnat_handle_option): Handle
1711 OPT_fdump_scos.
1712
17132019-08-14 Joffrey Huguet <huguet@adacore.com>
1714
1715 * libgnat/a-cofuba.ads: Add a Length attribute to type
1716 Container. Add a type Array_Base which replaces the previous
1717 Elements attribute of Container.
1718 (Content_Init): New subprogram. It is used to initialize the
1719 Base attribute of Container.
1720 * libgnat/a-cofuba.adb (Resize): New subprogram. It is used to
1721 resize the underlying array of a container if necessary.
1722 (=, <=, Find, Get, Intersection, Length, Num_Overlaps, Set,
1723 Union): Update to match changes in type declarations.
1724 (Add): Modify body to damp the time and space cost in a specific
1725 case.
1726 (Content_Init): New subprogram. It is used to initialize the
1727 Base attribute of Container.
1728 (Remove): Modify body to damp the time and space cost in a
1729 specific case.
1730
17312019-08-14 Bob Duff <duff@adacore.com>
1732
1733 * sem_ch13.adb (Get_Alignment_Value): Return 1 for Alignment 0,
1734 and do not give an error.
1735 * doc/gnat_rm/representation_clauses_and_pragmas.rst: Update the
1736 corresponding documentation.
1737 * gnat_rm.texi: Regenerate.
1738
17392019-08-14 Eric Botcazou <ebotcazou@adacore.com>
1740
1741 * inline.adb (Add_Pending_Instantiation): Fix off-by-one error
1742 in the comparison against the maximum number of instantiations.
1743
17442019-08-14 Eric Botcazou <ebotcazou@adacore.com>
1745
1746 * inline.adb (Add_Pending_Instantiation): Use greater-or-equal
1747 in the comparison against the maximum number of instantiations.
1748
17492019-08-14 Ed Schonberg <schonberg@adacore.com>
1750
1751 * sem_aux.adb (Next_Rep_Item): If a node in the rep chain
1752 involves a Ghost aspect it may have been replaced by a null
1753 statement; use the original node to find next Rep_Item.
1754 * repinfo.adb (List_Entities): Do not list an Ignored
1755 Ghost_Entity, for which information may have been deleted.
1756
17572019-08-14 Bob Duff <duff@adacore.com>
1758
1759 * sem_prag.ads, sem_prag.adb
1760 (Process_Compile_Time_Warning_Or_Error): In parameterless
1761 version, improve detection of whether we are in a generic unit
1762 to cover the case of an instance within a generic unit.
1763 (Process_Compile_Time_Warning_Or_Error): Rename the
1764 two-parameter version to be
1765 Validate_Compile_Time_Warning_Or_Error, and do not export it.
1766 Issue a warning if the condition is not known at compile time.
1767 The key point is that the warning must be given only for pragmas
1768 deferred to the back end, because the back end discovers
1769 additional values that are known at compile time. Previous
1770 changes in this ticket have enabled this by deferring to the
1771 back end without checking for special cases such as 'Size.
1772 (Validate_Compile_Time_Warning_Or_Error): Rename to be
1773 Defer_Compile_Time_Warning_Error_To_BE.
1774 * warnsw.ads, warnsw.adb (Warn_On_Unknown_Compile_Time_Warning):
1775 Add new switches -gnatw_c and -gnatw_C to control the above
1776 warning.
1777 * doc/gnat_ugn/building_executable_programs_with_gnat.rst:
1778 Document new switches.
1779 * gnat_ugn.texi: Regenerate.
1780
17812019-08-14 Eric Botcazou <ebotcazou@adacore.com>
1782
1783 * sem_ch12.adb (Might_Inline_Subp): Rework comment and restrict
1784 the shortcut based on Is_Inlined to the back-end inlining case.
1785
17862019-08-14 Bob Duff <duff@adacore.com>
1787
1788 * inline.adb (Check_And_Split_Unconstrained_Function): Ignore
1789 protected functions to get rid of spurious error. The
1790 transformation done by this procedure triggers legality errors
1791 in the generated code in this case.
1792
17932019-08-14 Bob Duff <duff@adacore.com>
1794
1795 * sem_prag.adb (Process_Compile_Time_Warning_Or_Error): Defer
1796 processing to the back end in all cases where the pragma's
1797 condition is not known at compile time during the front end
1798 (except in generics), as opposed to detecting 'Size attributes
1799 and the like. This ensures that we take advantage of whatever
1800 can be compile-time known after running the back end, as opposed
1801 to having the front end guess what the back end can do. Remove
1802 a little duplicated code at the call site.
1803 * gnat1drv.adb (Post_Compilation_Validation_Checks): Unlock the
1804 Elists while in Validate_Compile_Time_Warning_Errors, because it
1805 does analysis and name resolution, which sometimes involves
1806 adding Elists.
1807
18082019-08-14 Eric Botcazou <ebotcazou@adacore.com>
1809
1810 * einfo.ads (Is_Called): Document new usage on E_Package
1811 entities.
1812 * einfo.adb (Is_Called): Accept E_Package entities.
1813 (Set_Is_Called): Likewise.
1814 * exp_ch6.adb (Expand_Call_Helper): Move code dealing with
1815 instances for back-end inlining to Add_Inlined_Body.
1816 * inline.ads: Remove with clauses for Alloc and Table.
1817 (Pending_Instantiations): Move to...
1818 * inline.adb: Add with clauses for Alloc, Uintp, Table and
1819 GNAT.HTable.
1820 (Backend_Instances): New variable.
1821 (Pending_Instantiations): ...here.
1822 (Called_Pending_Instantiations): New table.
1823 (Node_Table_Size): New constant.
1824 (Node_Header_Num): New subtype.
1825 (Node_Hash): New function.
1826 (To_Pending_Instantiations): New hash table.
1827 (Add_Inlined_Body): Bail out early for subprograms in the main
1828 unit or subunit. Likewise if the Is_Called flag is set. If the
1829 subprogram is an instance, invoke Add_Inlined_Instance. Call
1830 Set_Is_Called earlier. If the subrogram is within an instance,
1831 invoke Add_Inlined_Instance. Also deal with the case where the
1832 call itself is within an instance.
1833 (Add_Inlined_Instance): New procedure.
1834 (Add_Inlined_Subprogram): Remove conditions always fulfilled.
1835 (Add_Pending_Instantiation): Move the defence against ludicruous
1836 number of instantiations to here. When back-end inlining is
1837 enabled, associate an instantiation with its index in table and
1838 mark a few selected kinds of instantiations as always needed.
1839 (Initialize): Set Backend_Instances to No_Elist.
1840 (Instantiate_Body): New procedure doing the work extracted
1841 from...
1842 (Instantiate_Bodies): ...here. When back-end inlining is
1843 enabled, loop over Called_Pending_Instantiations instead of
1844 Pending_Instantiations.
1845 (Is_Nested): Minor tweak.
1846 (List_Inlining_Info): Also list the contents of
1847 Backend_Instances.
1848 * sem_ch12.adb (Might_Inline_Subp): Return early if Is_Inlined
1849 is set and otherwise set it before returning true.
1850 (Analyze_Package_Instantiation): Remove the defence against
1851 ludicruous number of instantiations. Invoke
1852 Remove_Dead_Instance instead of doing the removal manually if
1853 there is a guaranteed ABE.
1854
18552019-08-14 Gary Dismukes <dismukes@adacore.com>
1856
1857 * exp_ch3.adb (Predef_Spec_Or_Body): For an equality operation
1858 of an interface type, create an expression function (that
1859 returns False) rather than declaring an abstract function.
1860 * freeze.adb (Check_Inherited_Conditions): Set Needs_Wrapper to
1861 False unconditionally at the start of the loop creating wrappers
1862 for inherited operations.
1863
18642019-08-14 Bob Duff <duff@adacore.com>
1865
1866 * table.adb: Assert that the table is not locked when increasing
1867 Last, even if it doesn't cause reallocation. In other words,
1868 assert that on operations that MIGHT cause reallocation.
1869 * table.ads: Fix comment accordingly.
1870
18712019-08-14 Arnaud Charlet <charlet@adacore.com>
1872
1873 * doc/gnat_ugn/gnat_and_program_execution.rst: Remove
1874 documentation of gnatelim.
1875
18762019-08-14 Bob Duff <duff@adacore.com>
1877
1878 * sem_prag.adb (Validate_Compile_Time_Warning_Error): Attach the
1879 warning to the Sloc of the first pragma argument, rather than to
1880 the pragma itself. This is to make pragmas processed after the
1881 back end use the same Sloc as pragmas processed earlier, in the
1882 front end. There's no reason for this discrepancy, and it
1883 hinders further work on this ticket.
1884
18852019-08-14 Bob Duff <duff@adacore.com>
1886
1887 * sem.ads (Inside_A_Generic): Remove the ??? comment.
1888
18892019-08-14 Eric Botcazou <ebotcazou@adacore.com>
1890
1891 * inline.ads (Pending_Descriptor): Delete.
1892 * inline.adb (Initialize): Do not initialize it.
1893 * sem_ch12.adb (Delay_Descriptors): Delete.
1894 (Analyze_Package_Instantiation): Call
1895 Set_Delay_Subprogram_Descriptors instead of Delay_Descriptors
1896 throughout.
1897
18982019-08-14 Bob Duff <duff@adacore.com>
1899
1900 * exp_aggr.adb (Init_Hidden_Discriminants): Avoid processing the
1901 wrong discriminant, which could be of the wrong type.
1902
19032019-08-14 Eric Botcazou <ebotcazou@adacore.com>
1904
1905 * sem_ch12.adb (Analyze_Instance_And_Renamings): Do not reset
1906 the Is_Generic_Instance flag previously set on the package
1907 generated for the instantiation of a generic subprogram.
1908
19092019-08-14 Ed Schonberg <schonberg@adacore.com>
1910
1911 * exp_ch4.adb (Expand_N_Quantified_Expression): Freeze
1912 explicitly the type of the loop parameter.
1913
19142019-08-14 Javier Miranda <miranda@adacore.com>
1915
1916 * sem_util.adb (New_Copy_Tree.Copy_Node_With_Replacement):
1917 Update the Chars attribute of identifiers.
1918
19192019-08-14 Yannick Moy <moy@adacore.com>
1920
1921 * sem_spark.adb, sem_spark.ads (Is_Legal): New function exposed
1922 for use in GNATprove, to test legality rules not related to
1923 permissions.
1924 (Check_Declaration_Legality): Extract the part of
1925 Check_Declaration that checks rules not related to permissions.
1926 (Check_Declaration): Call the new Check_Declaration_Legality.
1927 (Check_Type_Legality): Rename of Check_Type. Introduce
1928 parameters to force or not checking, and update a flag detecting
1929 illegalities.
1930 (Check_Node): Ignore attribute references in statement position.
1931
19322019-08-14 Yannick Moy <moy@adacore.com>
1933
1934 * sem_spark.adb (Check_Old_Loop_Entry): New procedure to check
1935 correct use of Old and Loop_Entry.
1936 (Check_Node): Check subprogram contracts.
1937 (Check_Pragma): Check Loop_Variant.
1938 (Check_Safe_Pointers): Apply checking to library-level
1939 subprogram declarations as well, in order to check their
1940 contract.
1941
19422019-08-14 Yannick Moy <moy@adacore.com>
1943
1944 * sem_spark.adb (Is_Subpath_Expression): Take into account
1945 conversion and qualification.
1946
19472019-08-14 Eric Botcazou <ebotcazou@adacore.com>
1948
1949 * sem_ch7.adb (Install_Private_Declarations)
1950 <Swap_Private_Dependents>: Do not rely solely on the
1951 Is_Child_Unit flag on the unit to recurse.
1952 (Uninstall_Declarations) <Swap_Private_Dependents>: New
1953 function. Use it to recurse on the private dependent entities
1954 for child units.
1955
19562019-08-14 Javier Miranda <miranda@adacore.com>
1957
1958 * exp_aggr.adb (Is_CCG_Supported_Aggregate): Return False for
1959 arrays with bounds not known at compile time.
1960
19612019-08-14 Ed Schonberg <schonberg@adacore.com>
1962
1963 * sem_util.adb (New_Copy_Tree, Visit_Entity): A quantified
1964 expression includes the implicit declaration of the loop
1965 parameter. When a quantified expression is copied during
1966 expansion, for example when building the precondition code from
1967 the generated pragma, a new loop parameter must be created for
1968 the new tree, to prevent duplicate declarations for the same
1969 symbol.
1970
19712019-08-14 Yannick Moy <moy@adacore.com>
1972
1973 * sem_disp.adb (Check_Dispatching_Operation): Update assertion
1974 for the separate declarations created in GNATprove mode.
1975 * sem_disp.ads (Is_Overriding_Subprogram): Update comment.
1976 * sem_elab.adb (SPARK_Processor): Fix test for checking of
1977 overriding primitives.
1978
19792019-08-14 Eric Botcazou <ebotcazou@adacore.com>
1980
1981 * inline.adb (Add_Inlined_Body): Tweak comments.
1982 (List_Inlining_Info): Also list information about non-main
1983 units.
1984
19852019-08-14 Gary Dismukes <dismukes@adacore.com>
1986
1987 * sem_ch4.adb (Analyze_Selected_Component): In the case where
1988 the prefix is of a concurrent type, and the selected entity
1989 matching the selector is the first private declaration of the
1990 type (such as the first local variable in a task's body), set
1991 Is_Private_Op.
1992
19932019-08-14 Piotr Trojanek <trojanek@adacore.com>
1994
1995 * einfo.adb (Is_Generic_Actual_Subprogram): Replace repeated
1996 calls to Ekind with Ekind_In.
1997
19982019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1999
2000 PR middle-end/91421
2001 * gcc-interface/trans.c (gigi): Call set_decl_buillt_in_function.
2002 (Call_to_gnu): Use DECL_FE_FUNCTION_CODE instead of DECL_FUNCTION_CODE.
2003
20042019-08-13 Eric Botcazou <ebotcazou@adacore.com>
2005
2006 * ali.ads (Linker_Option_Record): Remove Original_Pos component.
2007 * ali.adb (Scan_ALI): Do not set it.
2008
20092019-08-13 Eric Botcazou <ebotcazou@adacore.com>
2010
2011 * sem_ch3.adb (Build_Derived_Concurrent_Type): Add a couple of
2012 local variables and use them. When the derived type fully
2013 constrains the parent type, rewrite it as a subtype of an
2014 implicit (unconstrained) derived type instead of the other way
2015 around.
2016 (Copy_And_Build): Deal with concurrent types and use predicates.
2017 (Build_Derived_Private_Type): Build the full derivation if
2018 needed for concurrent types too.
2019 (Build_Derived_Record_Type): Add marker comment.
2020 (Complete_Private_Subtype): Use predicates.
2021
20222019-08-13 Ed Schonberg <schonberg@adacore.com>
2023
2024 * sem_ch3.adb (Check_Generic_Ancestor): New subprogram,
2025 aubsidiary to Build_Derived_Record_Type. to enforce the rule
2026 that a type extension declared in a generic body cznnot have an
2027 ancestor that is a generic formal (RM 3.9.1 (4/2)). The rule
2028 applies to all ancestors of the type, including interface
2029 progenitors.
2030
20312019-08-13 Eric Botcazou <ebotcazou@adacore.com>
2032
2033 * sem_ch3.adb (Build_Underlying_Full_View): Delete.
2034 (Complete_Private_Subtype): Do not set the full view on the
2035 private subtype here. If the full base is itself derived from
2036 private, do not re-derive the parent type but instead constrain
2037 an existing underlying full view.
2038 (Prepare_Private_Subtype_Completion): Do not get to the
2039 underlying full view, if any. Set the full view on the private
2040 subtype here.
2041 (Process_Full_View): Likewise.
2042 * sem_ch12.adb (Check_Generic_Actuals): Also set
2043 Is_Generic_Actual_Type on the full view if the type of the
2044 actual is private.
2045 (Restore_Private_Views): Also reset Is_Generic_Actual_Type on
2046 the full view if the type of the actual is private.
2047 * sem_eval.adb (Subtypes_Statically_Match): Remove bypass for
2048 generic actual types.
2049
20502019-08-13 Javier Miranda <miranda@adacore.com>
2051
2052 * sem_res.adb (Resolve_Selected_Component): When the type of the
2053 component is an access to a class-wide type and the type of the
2054 context is an access to a tagged type the relevant type is that
2055 of the component (since in such case we may need to generate
2056 implicit type conversions or dispatching calls).
2057
20582019-08-13 Ed Schonberg <schonberg@adacore.com>
2059
2060 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Preanalyze
2061 expression, rather do a full analysis, to prevent unwanted
2062 removal of side effects which mask the intent of the expression.
2063
20642019-08-13 Eric Botcazou <ebotcazou@adacore.com>
2065
2066 * impunit.adb (Non_Imp_File_Names_95): Add
2067 GNAT.Branch_Prediction.
2068
20692019-08-13 Eric Botcazou <ebotcazou@adacore.com>
2070
2071 * exp_ch6.adb: Remove with and use clauses for Sem_Ch12.
2072 (Expand_Call_Helper): Swap the back-end inlining case and the
2073 special front-end expansion case. In back-end inlining mode, do
2074 not invoke Add_Inlined_Body unless the call may be inlined.
2075 * inline.ads (Add_Pending_Instantiation): New function moved
2076 from...
2077 * inline.adb (Add_Inlined_Body): Simplify comment. Turn test on
2078 the enclosing unit into assertion.
2079 (Add_Pending_Instantiation): New function moved from...
2080 * sem_ch12.ads (Add_Pending_Instantiation): ...here.
2081 * sem_ch12.adb (Add_Pending_Instantiation): ...here.
2082
20832019-08-13 Eric Botcazou <ebotcazou@adacore.com>
2084
2085 * sem.adb (Do_Analyze): Recompute Style_Check_Max_Line_Length
2086 after restoring Style_Max_Line_Length.
2087
20882019-08-13 Arnaud Charlet <charlet@adacore.com>
2089
2090 * sem_ch13.adb (Check_Iterator_Functions): Protect against
2091 cascaded errors.
2092
20932019-08-13 Ed Schonberg <schonberg@adacore.com>
2094
2095 * sem_ch8.adb (Analyze_Subprogram_Renaming): Do no suppress mode
2096 conformance checks on child unit instance that is a compilation
2097 unit.
2098
20992019-08-13 Gary Dismukes <dismukes@adacore.com>
2100
2101 * exp_dbug.adb (Fully_Qualify_Name): Add full name qualification
2102 for the E_Exception case.
2103
21042019-08-13 Gary Dismukes <dismukes@adacore.com>
2105
2106 * exp_aggr.adb (Aggr_Size_OK): Compute the aggregate size using
2107 universal arithmetic, to avoid situations where the size
2108 computation overflows.
2109
21102019-08-13 Justin Squirek <squirek@adacore.com>
2111
2112 * repinfo.adb (List_Scalar_Storage_Order): Modify conditionals
2113 for displaying ordering to always be triggered when -gnatR4 is
2114 in effect.
2115
21162019-08-13 Justin Squirek <squirek@adacore.com>
2117
2118 * aspects.adb, aspects.ads: Register new aspect.
2119 * par-prag.adb (Prag): Register new pragma
2120 * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing
2121 for new aspect similar to Aspect_Max_Entry_Queue_Length.
2122 * sem_prag.adb, sem_prag.ads (Analyze_Pragma): Register new
2123 pragma and set it to use the same processing as
2124 Pragma_Max_Queue_Length.
2125 * snames.ads-tmpl: Move definition of
2126 Name_Max_Entry_Queue_Length so that it can be processed as a
2127 pragma in addition to a restriction and add an entry for the
2128 pragma itself.
2129
21302019-08-13 Yannick Moy <moy@adacore.com>
2131
2132 * sem_ch4.adb (Analyze_Allocator): Do not insert subtype
2133 declaration for allocator inside a spec expression.
2134
21352019-08-13 Yannick Moy <moy@adacore.com>
2136
2137 * sem_res.adb (Resolve_Call): Do not inline calls inside record
2138 types.
2139
21402019-08-13 Eric Botcazou <ebotcazou@adacore.com>
2141
2142 * sem_ch4.adb (Analyze_One_Call): Remove bypass for type
2143 mismatch in nested instantiations.
2144 * sem_ch8.adb (Find_Nearer_Entity): New function.
2145 (Find_Renamed_Entity): Use it to disambiguate the candidates for
2146 the renaming generated for an instantiation when it is
2147 ambiguous.
2148
21492019-08-13 Eric Botcazou <ebotcazou@adacore.com>
2150
2151 * gnat1drv.adb (Adjust_Global_Switches): Do not set
2152 Back_End_Inlining in ASIS mode either.
2153
21542019-08-13 Olivier Hainque <hainque@adacore.com>
2155
2156 * libgnat/s-win32.ads: Define size_t and fix the MapViewOfFile
2157 binding to use it instead of DWORD for the dwNumberOfBytesToMap
2158 argument.
2159 * libgnat/g-sercom__mingw.adb (Read): State which definition of
2160 size_t to fetch in call to Last_Index.
2161
21622019-08-13 Arnaud Charlet <charlet@adacore.com>
2163
2164 * gcc-interface/Make-lang.in: Remove unused TRACE variable. Pass
2165 LN_S to relevant gnatlib targets.
2166 * gcc-interface/Makefile.in: Systematically pass LN_S to
2167 relevant gnatlib targets.
2168
21692019-08-13 Yannick Moy <moy@adacore.com>
2170
2171 * sem_dim.adb (Analyze_Dimension,
2172 Analyze_Dimension_Array_Aggregate, Analyze_Dimension_Call,
2173 Analyze_Dimension_Extension_Or_Record_Aggregate): Return
2174 immediately when inside an inlined body.
2175 * sem_res.adb (Resolve_Call): Remove special checking now done
2176 inside Analyze_Dimension_Call.
2177
21782019-08-13 Justin Squirek <squirek@adacore.com>
2179
2180 * exp_ch4.adb (Expand_N_Allocator): Add condition to detect
2181 library-level object declarations
2182
21832019-08-13 Eric Botcazou <ebotcazou@adacore.com>
2184
2185 * doc/gnat_ugn/building_executable_programs_with_gnat.rst
2186 (-gnateT): Document Double_Float_Alignment parameter and fix
2187 description of Double_Scalar_Alignment parameter.
2188 * gnat_ugn.texi: Regenerate.
2189
21902019-08-13 Eric Botcazou <ebotcazou@adacore.com>
2191
2192 * exp_ch6.adb (Expand_Call_Helper): If back-end inlining is
2193 enabled, also instantiate the body of a generic unit containing
2194 a subprogram subject to aspect/pragma Inline_Always at
2195 optimization level zero.
2196 * sem_ch12.adb (Might_Inline_Subp): Minor tweak.
2197 (Analyze_Package_Instantiation): Do not instantiate the package
2198 body because of inlining considerations if the instantiation is
2199 done in a generic unit. Move around similar condition involving
2200 the main unit. Add test on Back_End_Inlining to processing for
2201 front-end inlining.
2202
22032019-08-13 Javier Miranda <miranda@adacore.com>
2204
2205 * exp_disp.adb (Make_Secondary_DT): Handle record type
2206 derivations that have interface components located at fixed
2207 positions and interface components located at variable offset.
2208 The offset of components located at fixed positions is computed
2209 using the dummy object (similar to the case where all the
2210 interface components are located at fixed positions).
2211 (Make_DT): Build the dummy object for all tagged types that
2212 implement interface types (that is, build it also for types with
2213 variable size components), and use the dummy object to compute
2214 the offset of all tag components located at fixed positions when
2215 initializing the Interface_Table object.
2216
22172019-08-13 Justin Squirek <squirek@adacore.com>
2218
2219 * gnatcmd.adb (GNATCmd): Add constant for new compiler switch
2220 --help-ada, and include usage subprogram. Add line to usage help
2221 explaining the new flag.
2222 (GNATCmd_Usage): Rename from locally declared Usage so as not to
2223 confuse with the newly imported version. Add new argument case
2224 for --help-ada and add bug report email to implicit display of
2225 help without the --help flag so as to unify output between the
2226 two cases.
2227
22282019-08-13 Dmitriy Anisimkov <anisimko@adacore.com>
2229
2230 * libgnat/g-comlin.adb (Getopt): Quote unrecognized switch in
2231 Invalid_Switch exception message.
2232
22332019-08-13 Yannick Moy <moy@adacore.com>
2234
2235 * sem_util.adb (Traverse_More_Func): Take into account
2236 Loop_Actions inside N_Iterated_Component_Association nodes.
2237 * sinfo.ads: Document correctly Loop_Actions as a field of nodes
2238 of kind N_Iterated_Component_Association.
2239
22402019-08-13 Claire Dross <dross@adacore.com>
2241
2242 * libgnat/a-cfinve.adb, libgnat/a-cofove.adb (Find_Index,
2243 Reverse_Find_Index): Use bigger type to avoid range check
2244 failure at the last loop iteration.
2245
22462019-08-12 Dmitriy Anisimkov <anisimko@adacore.com>
2247
2248 * libgnat/g-socket.adb (Is_IPv6_Address): Check that no less
2249 then 2 colons in IPv6 numeric address.
2250
22512019-08-12 Dmitriy Anisimkov <anisimko@adacore.com>
2252
2253 * libgnat/g-comlin.ads, libgnat/g-comlin.adb (Getopt): Add
2254 parameter Quiet. Need to do not output error messages to
2255 console. Invalid_Switch exception generation surrounded by an
2256 error message.
2257
22582019-08-12 Ed Schonberg <schonberg@adacore.com>
2259
2260 * exp_ch6.adb (Expand_Actuals. Add_Call_By_Copy_Code): Add code
2261 to generate proper checks when an actual for an in-out or out
2262 parameter has a non-null access type. No constraints are
2263 applied to an inbound access parameter, but on exit a not-null
2264 check must be performed if the type of the actual requires it.
2265
22662019-08-12 Ed Schonberg <schonberg@adacore.com>
2267
2268 * sem_util.adb (Is_Expaned_Priority_Attribute): Check whether
2269 call comes from a rewritten attribute before comparing name with
2270 Get_Ceiling run-time subprogram.
2271
22722019-08-12 Eric Botcazou <ebotcazou@adacore.com>
2273
2274 * exp_util.ads (Component_May_Be_Bit_Aligned): Small comment
2275 tweaks.
2276 (Possible_Bit_Aligned_Component): Likewise.
2277 (Type_May_Have_Bit_Aligned_Components): Likewise.
2278 * exp_util.adb (Component_May_Be_Bit_Aligned): Likewise.
2279 (Possible_Bit_Aligned_Component): Likewise.
2280 (Type_May_Have_Bit_Aligned_Components): Likewise.
2281
22822019-08-12 Eric Botcazou <ebotcazou@adacore.com>
2283
2284 * exp_ch4.adb (Expand_N_Op_Eq): Expand the array equality if
2285 either operand is a possibly unaligned slice.
2286 * exp_ch6.adb (Expand_Simple_Function_Return): Do not generate a
2287 copy for a possibly unaligned object if it is represented as a
2288 scalar.
2289 * exp_util.adb (Is_Possibly_Unaligned_Slice): Do not always
2290 return false if the target doesn't have strict alignment.
2291
22922019-08-12 Bob Duff <duff@adacore.com>
2293
2294 * sem_ch12.adb (Instantiate_Package_Body): Remove suppression of
2295 checks in instances of internal units.
2296 * sem_ch6.adb (Analyze_Function_Return): Do not generate a
2297 constraint check on an extended_return_statement if the subtype
2298 of the return object in the statement is identical to the return
2299 subtype of the function.
2300
23012019-08-12 Bob Duff <duff@adacore.com>
2302
2303 * libgnat/a-cbmutr.adb (Is_Reachable): Declare Idx to be of the
2304 base subtype. Clearly it makes no sense to loop "while Idx >=
2305 0", if Idx is of a nonnegative subtype.
2306
23072019-08-12 Bob Duff <duff@adacore.com>
2308
2309 * libgnat/a-tifiio.adb (Put_Scaled): Prevent AA from being
2310 negative, since Field is range 0 .. something.
2311
23122019-08-12 Bob Duff <duff@adacore.com>
2313
2314 * doc/gnat_ugn/gnat_utility_programs.rst (gnatmetric, gnatpp,
2315 gnatstub): Remove documentation for Ada language version
2316 switches, and note that they are no longer needed.
2317
23182019-08-12 Gary Dismukes <dismukes@adacore.com>
2319
2320 * sem_ch5.adb (Prepare_Param_Spec_Loop): Set the parents of the
2321 copied low and high bounds in the case where the loop range is
2322 given by a discrete_subtype_indication, to prevent hanging (or
2323 Assert_Failure) in Insert_Actions.
2324
23252019-08-12 Ed Schonberg <schonberg@adacore.com>
2326
2327 * sem_ch6.adb (heck_Untagged_Equality): Verify that user-defined
2328 equality has the same profile as the predefined equality before
2329 applying legality rule in RM 4.5.2 (9.8).
2330
23312019-08-12 Bob Duff <duff@adacore.com>
2332
2333 * libgnat/a-except.ads: Update obsolete comment, still making
2334 clear that this is a variant. Add explicit default for Id
2335 component of Exception_Occurrence, because that value is used.
2336 Define Null_Occurrence less redundantly.
2337 * libgnat/a-einuoc.adb: Minor simplification of code.
2338
23392019-08-12 Justin Squirek <squirek@adacore.com>
2340
2341 * libgnat/a-dhfina.adb, libgnat/a-dhfina.ads (Is_Simple_Name,
2342 Is_Root_Directory, Is_Parent_Directory,
2343 Is_Current_Directory_Name, Is_Relative_Name, Initial_Directory,
2344 Relative_Name, Compose): Add implementation and documentation.
2345 * libgnat/a-direct.adb (Containing_Directory): Modify routine to
2346 use routines from Ada.Directories.Hierarchical_File_Names and
2347 remove incorrect special case for parent directories.
2348 (Fetch_Next_Entry): Add check for current directory and parent
2349 directory and ignore them under certain circumstances.
2350 (Simple_Nmae): Add check for null result from
2351 Simple_Name_Internal and raise Name_Error.
2352 (Simple_Name_Internal): Add explicit check for root directories,
2353 sanitize trailing directory separators, and modify behavior so
2354 that current and parent directories are considered valid
2355 results.
2356 * Makefile.rtl: Add entry to GNATRTL_NONTASKING_OBJS.
2357
23582019-08-12 Eric Botcazou <ebotcazou@adacore.com>
2359
2360 * freeze.adb (Freeze_Entity): Give the same error for an
2361 Object_Size clause on a variable-sized type as for a Size
2362 clause.
2363
23642019-08-12 Gary Dismukes <dismukes@adacore.com>
2365
2366 * sem_prag.adb (Analyze_Pragma, Pragma_Suppress_Initialization):
2367 For private types, set the Suppress_Initialization flag on the
2368 Full_View of the entity rather than the entity's base type.
2369
23702019-08-12 Yannick Moy <moy@adacore.com>
2371
2372 * aspects.adb, aspects.ads (Aspect_No_Caching): New aspect.
2373 * contracts.adb, contracts.ads (Add_Contract_Item): Add handling
2374 of No_Caching.
2375 (Analyze_Object_Contract): Add handling of No_Caching.
2376 * einfo.adb, einfo.ads
2377 (Get_Pragma): Add handling of No_Caching.
2378 * doc/gnat_rm/implementation_defined_aspects.rst,
2379 doc/gnat_rm/implementation_defined_pragmas.rst: Document new
2380 aspect/pragma.
2381 * gnat_rm.texi: Regenerate.
2382 * par-prag.adb (Prag): New pragma Pragma_No_Caching.
2383 * sem_ch13.adb (Analyze_Aspect_Specifications,
2384 Check_Aspect_At_Freeze_Point): Add handling of No_Caching.
2385 * sem_prag.adb (Analyze_Pragma): Deal with pragma No_Caching.
2386 * sem_prag.ads (Analyze_External_Property_In_Decl_Part): Now
2387 applies to No_Caching.
2388 * sem_util.adb, sem_util.ads (Is_Effectively_Volatile): Add
2389 handling of No_Caching.
2390 (No_Caching_Enabled): New query function.
2391 * snames.ads-tmpl: New names for pragma.
2392
23932019-08-12 Yannick Moy <moy@adacore.com>
2394
2395 * sem_util.adb, sem_util.ads (Traverse_More_Func,
2396 Traverse_More_Proc): Add formal parameter for Itypes traversal.
2397
23982019-08-12 Yannick Moy <moy@adacore.com>
2399
2400 * exp_attr.adb, exp_attr.ads (Expand_Size_Attribute): New
2401 procedure to share part of the attribute expansion with
2402 GNATprove mode.
2403 (Expand_N_Attribute_Reference): Extract part of the
2404 Size/Object_Size expansion in the new procedure
2405 Expand_Size_Attribute.
2406 * exp_spark.adb (Expand_SPARK_N_Attribute_Reference): Expand
2407 Size/Object_Size attributes using the new procedure
2408 Expand_Size_Attribute.
2409
24102019-08-12 Yannick Moy <moy@adacore.com>
2411
2412 * exp_spark.adb (Expand_SPARK_N_Attribute_Reference): Only
2413 expand Enum_Rep attribute when its parameter is a literal.
2414
24152019-08-12 Justin Squirek <squirek@adacore.com>
2416
2417 * sem_eval.adb (Check_Non_Static_Context): Add a condition to
2418 determine if a range violation constitues a warning or an error.
2419 (Out_Of_Range): Add a condition to determine if a range
2420 violation constitues a warning or an error.
2421
24222019-08-12 Eric Botcazou <ebotcazou@adacore.com>
2423
2424 * exp_ch4.adb (Real_Range_Check): Do not rewrite the conversion
2425 node but its expression instead, after having fetched its
2426 current value. Clear the Do_Range_Check flag on entry. Return
2427 early for a rewritten float-to-float conversion. Remove
2428 redundant local variable. Suppress all checks when inserting
2429 the temporary and do not reanalyze the node.
2430
24312019-08-12 Eric Botcazou <ebotcazou@adacore.com>
2432
2433 * sprint.ads: Minor comment tweak.
2434
24352019-08-12 Eric Botcazou <ebotcazou@adacore.com>
2436
2437 * checks.adb (Insert_Valid_Check): Do not retrieve the
2438 Do_Range_Check flag from the Original_Node but from the
2439 Validated_Object. Remove useless bypass for floating-point
2440 types.
2441
24422019-08-12 Yannick Moy <moy@adacore.com>
2443
2444 * sem_util.adb, sem_util.ads (Traverse_More_Func,
2445 Traverse_More_Proc): New traversal subprograms.
2446
24472019-08-12 Jerome Lambourg <lambourg@adacore.com>
2448
2449 * libgnarl/s-taprop__vxworks.adb (Abort_Handler): Only call
2450 s-tpopsp.Self when actually needed.
2451
24522019-08-12 Eric Botcazou <ebotcazou@adacore.com>
2453
2454 * exp_ch4.adb (Discrete_Range_Check): Return if checks are
2455 suppressed.
2456
24572019-08-12 Eric Botcazou <ebotcazou@adacore.com>
2458
2459 * sem_res.adb: Add with & use clause for Sem_Mech and
2460 alphabetize.
2461 (Resolve_Actuals): Do not apply a scalar range check for the
2462 source of a conversion whose result is passed by reference to a
2463 valued procedure.
2464
24652019-08-12 Eric Botcazou <ebotcazou@adacore.com>
2466
2467 * checks.adb (Insert_Valid_Check): Reset the Do_Range_Check flag
2468 on the validated object.
2469 * exp_ch6.adb (Add_Call_By_Copy_Code): Reset the Do_Range_Check
2470 flag on the actual here, as well as on the Expression if the
2471 actual is a N_Type_Conversion node.
2472 (Add_Validation_Call_By_Copy_Code): Generate the incoming range
2473 check if needed and reset the Do_Range_Check flag on the
2474 Expression if the actual is a N_Type_Conversion node.
2475 (Expand_Actuals): Do not reset the Do_Range_Check flag here.
2476 Generate the incoming range check for In parameters here instead
2477 of...
2478 (Expand_Call_Helper): ...here. Remove redudant condition.
2479 * sem_res.adb (Resolve_Actuals): Use local variable A_Typ and
2480 remove obsolete comments.
2481 (Resolve_Type_Conversion): Do not force the Do_Range_Check flag
2482 on the operand if range checks are suppressed.
2483
24842019-08-12 Eric Botcazou <ebotcazou@adacore.com>
2485
2486 * checks.adb (Activate_Range_Check): Remove redundant argument.
2487 (Generate_Range_Check): Likewise.
2488 (Apply_Float_Conversion_Check): Reset the Do_Range_Check flag on
2489 entry and remove redundant condition.
2490
24912019-08-02 Alexandre Oliva <oliva@adacore.com>
2492
2493 * libgnat/a-exexpr.adb (Begin_Handler_v1, End_Handler_v1): New.
2494 (Claimed_Cleanup): New.
2495 (Begin_Handler, End_Handler): Document.
2496 * gcc-interface/trans.c (gigi): Switch to exception handler
2497 ABI #1.
2498 (Exception_Handler_to_gnu_gcc): Save the original cleanup
2499 returned by begin handler, pass it to end handler, and use
2500 EH_ELSE_EXPR to pass a propagating exception to end handler.
2501 (gnat_to_gnu): Leave the exception pointer alone for reraise.
2502 (add_cleanup): Handle EH_ELSE_EXPR, require it by itself.
2503
25042019-07-23 Ed Schonberg <schonberg@adacore.com>
2505
2506 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations,
2507 Freeze_Entity_Checks): Include Aspect_CPU with other aspects
2508 whose expresssion may depend on a discriminant, and thus require
2509 that components of the type be made visible.
2510
25112019-07-23 Eric Botcazou <ebotcazou@adacore.com>
2512
2513 * checks.adb (Convert_And_Check_Range): Add Suppress parameter
2514 and pass it in the call to Insert_Actions. Rename local
2515 variable.
2516 (Generate_Range_Check): Minor comment fixes. Pass Range_Check
2517 in the first call to Convert_And_Check_Range and All_Checks in
2518 the second call.
2519 * exp_ch4.adb (Expand_N_Type_Conversion): Reset the
2520 Do_Overflow_Check flag in the float-to-float case too if there
2521 is also a range check.
2522
25232019-07-23 Eric Botcazou <ebotcazou@adacore.com>
2524
2525 * checks.adb (Activate_Overflow_Check): Remove redundant
2526 argument.
2527 * exp_ch4.adb (Discrete_Range_Check): Reset the overflow flag.
2528 (Expand_N_Type_Conversion): Do not reset it here.
2529
25302019-07-23 Eric Botcazou <ebotcazou@adacore.com>
2531
2532 * repinfo.adb (List_Component_Layout): Pass Decimal to UI_Write.
2533 (Write_Val): Likewise.
2534
25352019-07-23 Ed Schonberg <schonberg@adacore.com>
2536
2537 * aspects.ads: New table Operational_Aspect, used to distinguish
2538 between aspects that are view-specific, such as those related to
2539 iterators, and representation aspects that apply to all views of
2540 a type.
2541 * aspects.adb (Find_Aspect): If the aspect being sought is
2542 operational, do not ecamine the full view of a private type to
2543 retrieve it.
2544 * sem_ch5.adb (Analyze_Iterator_Specification): Improve error
2545 message when the intended domain of iteration does not implement
2546 the required iterator aspects.
2547
25482019-07-23 Yannick Moy <moy@adacore.com>
2549
2550 * sem_spark.ads (Is_Local_Context): New function.
2551 * sem_spark.adb (Check_Declaration): Issue errors on violations
2552 of SPARK RM 3.10(4)
2553 (Process_Path): Do not issue error on borrow/observe during
2554 elaboration, as these are caught by the new rule.
2555
25562019-07-23 Yannick Moy <moy@adacore.com>
2557
2558 * exp_ch7.adb (Create_Finalizer): Force finalizer not to be
2559 Ghost enabled.
2560 * exp_dbug.adb (Get_External_Name): Explain special case of
2561 Ghost finalizer.
2562
25632019-07-22 Eric Botcazou <ebotcazou@adacore.com>
2564
2565 * repinfo.adb (List_Entities): Also list compiled-generated
2566 types present as Etype of objects.
2567
25682019-07-22 Eric Botcazou <ebotcazou@adacore.com>
2569
2570 * sinfo.ads: Update the documentation about the
2571 Do_Division_Check, Do_Overflow_Check and Do_Range_Check flags.
2572
25732019-07-22 Eric Botcazou <ebotcazou@adacore.com>
2574
2575 * exp_ch4.adb (Expand_N_Type_Conversion): Beef up comment.
2576 (Fixup_Universal_Fixed_Operation): Set the base type instead of
2577 the type of the enclosing type conversion on the operation.
2578
25792019-07-22 Ed Schonberg <schonberg@adacore.com>
2580
2581 * exp_ch4.adb (Expand_N_In): Do not suggest the use of attribute
2582 'Valid as a replacement for a range check on a discrete type
2583 when the bounds of the range are given by type conversions,
2584 because in such a case there are distinct types involved and the
2585 subbested attribute replacement would be misplaced.
2586
25872019-07-22 Yannick Moy <moy@adacore.com>
2588
2589 * sem_spark.adb (Get_Root_Object, Is_Path_Expression,
2590 Is_Subpath_Expression): Add parameter Is_Traversal to adapt
2591 these functions to the case of paths returned from a traversal
2592 function.
2593 (Read_Indexes): Handle the case of an if-expression or
2594 case-expression.
2595 (Check_Statement): Check Emit_Messages only when issuing an
2596 error message. This is important as Emit_Messages may store the
2597 information that an error was detected.
2598
25992019-07-22 Eric Botcazou <ebotcazou@adacore.com>
2600
2601 * checks.adb (Apply_Type_Conversion_Checks): Do not set
2602 Do_Range_Check flag on conversions from fixed-point types
2603 either.
2604 * exp_attr.adb: Add use and with clause for Expander.
2605 (Expand_N_Attribute_Reference) <Fixed_Value, Integer_Value>: Set
2606 the Conversion_OK flag and do not generate overflow/range checks
2607 manually.
2608 * exp_ch4.adb (Expand_N_Qualified_Expression): Remove
2609 superfluous clearing of Do_Range_Check flag.
2610 (Discrete_Range_Check): New procedure to generate a range check
2611 for discrete types.
2612 (Real_Range_Check): Remove redundant local variable and adjust.
2613 Remove useless shortcut. Clear Do_Range_Check flag on all
2614 paths.
2615 (Expand_N_Type_Conversion): Remove redundant test on
2616 Conversion_OK. Call Discrete_Range_Check to generate range
2617 checks on discrete types. Remove obsolete code for
2618 float-to-integer conversions. Add code to generate range checks
2619 for conversions involving fixed-point types.
2620
26212019-07-22 Eric Botcazou <ebotcazou@adacore.com>
2622
2623 * sprint.ads: Fix pasto in comment.
2624
26252019-07-22 Javier Miranda <miranda@adacore.com>
2626
2627 * sem_res.adb (Resolve_Actuals): Replace code that displaces the
2628 pointer to an allocated object to reference its secondary
2629 dispatch table by a type conversion (which takes care of
2630 handling all cases).
2631
26322019-07-22 Eric Botcazou <ebotcazou@adacore.com>
2633
2634 * sprint.adb (Sprint_Node_Actual)
2635 <N_Decimal_Fixed_Point_Definition>: Swap a couple of spaces.
2636 (Write_Itype): Minor consistency fixes throughout. Add support
2637 for printing ordinary and decimal fixed-point types and
2638 subtypes.
2639
26402019-07-22 Eric Botcazou <ebotcazou@adacore.com>
2641
2642 * exp_attr.adb (Expand_Loop_Entry_Attribute): Beef up comment.
2643
26442019-07-22 Ed Schonberg <schonberg@adacore.com>
2645
2646 * libgnat/s-valboo.ads, libgnat/s-valcha.ads,
2647 libgnat/s-valdec.ads, libgnat/s-valenu.ads,
2648 libgnat/s-valint.ads, libgnat/s-vallld.ads,
2649 libgnat/s-vallli.ads, libgnat/s-valllu.ads,
2650 libgnat/s-valrea.ads, libgnat/s-valuns.ads,
2651 libgnat/s-valwch.ads: Change categorization of packages that
2652 implement attribute 'Value from Pure to Preelaborate, to prevent
2653 undesirable optimizations when the evaluation of the attribute
2654 raises Constraint_Error, but subsequent use of the result of
2655 this evsaluation is removed by a subsequent optimization.
2656
26572019-07-22 Ed Schonberg <schonberg@adacore.com>
2658
2659 * sem_warn.adb (Check_References): Do not emit s warning on a
2660 referenced entity with no explicit assignment if the type of the
2661 entity has Preelaborable_Initialixation, such as
2662 Exception_Occurrence.
2663
26642019-07-22 Javier Miranda <miranda@adacore.com>
2665
2666 * exp_ch4.adb (Size_In_Storage_Elements): Improve the expansion
2667 to handle array indexes that are modular type.
2668 (Expand_N_Allocator): For 32-bit targets improve the generation
2669 of the runtime check associated with large arrays supporting
2670 arrays initialized with a qualified expression.
2671 * libgnat/s-imenne.adb (Image_Enumeration_8,
2672 Image_Enumeration_16, Image_Enumeration_32): Define the index of
2673 Index_Table with range Natural'First .. Names'Length since in
2674 the worst case all the literals of the enumeration type would be
2675 single letter literals and the Table built by the frontend would
2676 have as many components as the length of the names string. As a
2677 result of this enhancement, the internal tables declared using
2678 Index_Table have a length closer to the real needs, thus
2679 avoiding the declaration of large arrays on 32-bit CCG targets.
2680
26812019-07-22 Yannick Moy <moy@adacore.com>
2682
2683 * sem_ch3.adb (Constrain_Access): Issue a message about ignored
2684 constraint.
2685
26862019-07-22 Eric Botcazou <ebotcazou@adacore.com>
2687
2688 * sem_ch8.adb (End_Use_Type): Reset the In_Use flag on the
2689 class-wide type if the type is tagged.
2690 (Use_One_Type): Add commentary on the handling of the class-wide
2691 type.
2692
26932019-07-22 Eric Botcazou <ebotcazou@adacore.com>
2694
2695 * einfo.ads (Is_For_Access_Subtype): Delete.
2696 (Set_Is_For_Access_Subtype): Likewise.
2697 * einfo.adb (Is_For_Access_Subtype): Likewise.
2698 (Set_Is_For_Access_Subtype): Likewise.
2699 (Write_Entity_Flags): Do not write Is_For_Access_Subtype.
2700 * exp_ch4.adb (Expand_N_Selected_Component): Do not deal with
2701 it.
2702 * exp_spark.adb (Expand_SPARK_N_Selected_Component): Likewise.
2703 * sem_ch4.adb (Analyze_Explicit_Dereference): Likewise.
2704 * sem_ch3.adb (Build_Discriminated_Subtype): Do not build a
2705 special private subtype for access-to-record subtypes.
2706
27072019-07-22 Eric Botcazou <ebotcazou@adacore.com>
2708
2709 * sem_ch3.adb (Complete_Private_Subtype): Rework the setting of
2710 the Etype of the full view for full base types that cannot
2711 contain any discriminant. Remove code and comment about it in
2712 the main path.
2713
27142019-07-22 Ed Schonberg <schonberg@adacore.com>
2715
2716 * sem_ch3.adb (Convert_Bound): Subsidiary of
2717 Floating_Point_Type_Declaration, to handle properly range
2718 specifications with bounds that may include static constants of
2719 a given type rather than real literals.
2720
27212019-07-22 Eric Botcazou <ebotcazou@adacore.com>
2722
2723 * sem_aggr.adb (Rewrite_Bound): Be prepared for discriminals
2724 too.
2725 (Rewrite_Range;): Minor tweak.
2726 (Resolve_Record_Aggregate): For a component with default
2727 initialization whose expression is an array aggregate, also
2728 rewrite the bounds of the component associations, if any.
2729
27302019-07-22 Gary Dismukes <dismukes@adacore.com>
2731
2732 * exp_ch5.adb (Expand_N_Case_Statement): In the case where a
2733 case statement is rewritten as an equivalent if statement,
2734 inherit the From_Condition_Expression flag from the case
2735 statement.
2736
27372019-07-22 Eric Botcazou <ebotcazou@adacore.com>
2738
2739 * sem_ch8.adb (Check_Constrained_Object): Further extend the
2740 special optimization to all limited types.
2741
27422019-07-22 Eric Botcazou <ebotcazou@adacore.com>
2743
2744 * exp_attr.adb (Expand_N_Attribute_Reference)
2745 <Attribute_Enum_Val>: Set No_Truncation on the
2746 N_Unchecked_Type_Conversion built around the argument passed to
2747 the attribute.
2748
27492019-07-22 Nicolas Roche <roche@adacore.com>
2750
2751 * libgnat/s-valrea.adb (Scan_Real): Ignore non significative
2752 digits to avoid converging to infinity in some cases.
2753
27542019-07-22 Eric Botcazou <ebotcazou@adacore.com>
2755
2756 * libgnat/g-encstr.adb (Encode_Wide_String): Fix oversight.
2757 (Encode_Wide_Wide_String): Likewise.
2758
27592019-07-22 Eric Botcazou <ebotcazou@adacore.com>
2760
2761 * sem_warn.adb (Find_Var): Bail out for a function call with an
2762 Out or In/Out parameter.
2763
27642019-07-22 Nicolas Roche <roche@adacore.com>
2765
2766 * terminals.c (__gnat_tty_waitpid): Support both blocking and
2767 not blocking mode.
2768 * libgnat/g-exptty.ads (Is_Process_Running): New function.
2769 * libgnat/g-exptty.adb (Close): Don't try to interrupt/terminate
2770 a process if it is already dead.
2771
27722019-07-22 Ed Schonberg <schonberg@adacore.com>
2773
2774 * freeze.adb (Freeze_Fixed_Point_Type): When freezing a
2775 fixed-point subtype, check whether the parent type declarastion
2776 includes an aspect specification for the 'Small type attribute,
2777 and inherit the specified value.
2778
27792019-07-22 Javier Miranda <miranda@adacore.com>
2780
2781 * freeze.adb (Freeze_Subprogram): Check that C++ constructors
2782 must have external or link name.
2783
27842019-07-22 Ed Schonberg <schonberg@adacore.com>
2785
2786 * sem_res.adb (Resolve_Selected_Component): If the prefix has a
2787 deferred reference, generate the correct reference now, to
2788 indicate that the previous assignment is used. This prevents
2789 spurious warnings on useless assignments when compiling with all
2790 warnings enabled. when there is a subsequent call in the same
2791 stqtement list, in which the prefix of the selected component is
2792 the actual for an out parameter.
2793
27942019-07-22 Eric Botcazou <ebotcazou@adacore.com>
2795
2796 * exp_attr.adb (Expand_Loop_Entry_Attribute): Copy the condition
2797 of a while loop instead of simply relocating it.
2798
27992019-07-18 Arnaud Charlet <charlet@adacore.com>
2800
2801 * Makefile.rtl, expect.c, env.c, aux-io.c, mkdir.c, initialize.c,
2802 cstreams.c, raise.c, tracebak.c, adadecode.c, init.c, raise-gcc.c,
2803 argv.c, adaint.c, adaint.h, ctrl_c.c, sysdep.c, rtinit.c, cio.c,
2804 seh_init.c, exit.c, targext.c: Introduce a "STANDALONE" mode where C
2805 runtime files do not have any dependency on GCC include files.
2806 Remove unnecessary includes.
2807 Remove remaining references to VMS in runtime C file.
2808 * runtime.h: new File.
2809
28102019-07-13 Andreas Schwab <schwab@linux-m68k.org>
2811
2812 * Makefile.rtl: Use g-sercom__linux.adb for all linuxes.
2813
28142019-07-11 Piotr Trojanek <trojanek@adacore.com>
2815
2816 * lib-writ.adb (Ensure_System_Dependency,
2817 Up_To_Date_ALI_File_Exists, Write_ALI): Replace low-level access
2818 to table with a high-level query.
2819
28202019-07-11 Piotr Trojanek <trojanek@adacore.com>
2821
2822 * checks.adb: Fix typo in comment.
2823 * sem.adb (Semantics): Avoid repeated calls to
2824 In_Extended_Main_Source_Unit by reusing an already-cached
2825 result.
2826 * sem_util.adb (First_Global): Fix style.
2827
28282019-07-11 Yannick Moy <moy@adacore.com>
2829
2830 * sem_res.adb (Resolve_Call): Do not perform dimensionality
2831 checking on inlined bodies.
2832
28332019-07-11 Yannick Moy <moy@adacore.com>
2834
2835 * debug.adb: Flip meaning of debug switch -gnatdF.
2836
28372019-07-11 Yannick Moy <moy@adacore.com>
2838
2839 * sem_eval.adb (Is_Same_Value): Add special case for rewritten
2840 Loop_Entry attribute.
2841
28422019-07-11 Claire Dross <dross@adacore.com>
2843
2844 * gnat1drv.adb: SPARK checking rules for pointer aliasing are
2845 moved to GNATprove backend.
2846 * sem_spark.ads, sem_spark.adb (Sem_SPARK): Is now a generic
2847 unit. Takes as parameters:
2848 - Retysp which is used to query the most underlying type
2849 visible in SPARK. We do not introduce aliasing checks for
2850 types which are not visibly deep.
2851 - Component_Is_Visible_In_SPARK is used to avoid doing pointer
2852 aliasing checks on components which are not visible in SPARK.
2853 - Emit_Messages returns True in the second phase of SPARK
2854 analysis. Error messages for failed aliasing checks are only
2855 output in this case.
2856 Additionally, errors on constructs not supported in SPARK are
2857 removed as duplicates of marking errors. Components are stored
2858 in the permission map using their original component to avoid
2859 inconsistencies between components of different views of the
2860 same type.
2861 (Check_Expression): Handle delta constraints.
2862 (Is_Deep): Exported so that we can check for SPARK restrictions
2863 on deep types inside SPARK semantic checkings.
2864 (Is_Traversal_Function): Exported so that we can check for SPARK
2865 restrictions on traversal functions inside SPARK semantic
2866 checkings.
2867 (Check_Call_Statement, Read_Indexes): Check wether we are
2868 dealing with a subprogram pointer type before querying called
2869 entity.
2870 (Is_Subpath_Expression): Image attribute can appear inside a
2871 path.
2872 (Check_Loop_Statement): Correct order of statements in the loop.
2873 (Check_Node): Ignore raise nodes.
2874 (Check_Statement): Use Last_Non_Pragma to get the object
2875 declaration in an extended return statement.
2876
28772019-07-11 Patrick Bernardi <bernardi@adacore.com>
2878
2879 * bindgen.adb (Gen_Main): Do not generate a reference to
2880 Ada_Main_Program_Name when the Minimal_Binder flag is set.
2881 (Gen_Output_File_Ada): Do not output GNAT_Version and
2882 Ada_Main_Program_Name info if Minimal_Binder flag is set.
2883 * bindusg.adb: Add documentation for new -minimal switch.
2884 * gnatbind.adb (Scan_Bind_Arg): Scan -minimal switch.
2885 * opt.ads: Add new global flag Minimal_Binder to indicate if the
2886 binder should not produce global variables.
2887 * doc/gnat_ugn/building_executable_programs_with_gnat.rst:
2888 Update documentation with new binder -minimal switch.
2889 * gnat_ugn.texi: Regenerate.
2890
28912019-07-11 Eric Botcazou <ebotcazou@adacore.com>
2892
2893 * Makefile.rtl: Add warning note about compilation flags and
2894 capitalize.
2895
28962019-07-11 Ed Schonberg <schonberg@adacore.com>
2897
2898 * exp_ch9.adb (Expand_N_Protected_Type_Declaaration): New
2899 subsidiary routine Replace_Access_Definition, to handle properly
2900 a protected type PT one of whose private components is of type
2901 access PT.
2902
29032019-07-11 Dmitriy Anisimkov <anisimko@adacore.com>
2904
2905 * libgnat/g-socket.ads (Level_Type): Add enumerators for
2906 IP_Protocol_For_ICMP, IP_Protocol_For_IGMP,
2907 IP_Protocol_For_RAW_Level.
2908 * libgnat/g-socket.adb (Levels): Handle them.
2909 * s-oscons-tmplt.c: Import socket protocols defined in
2910 netinet/in.h.
2911
29122019-07-11 Claire Dross <dross@adacore.com>
2913
2914 * libgnat/a-cfhama.adb, libgnat/a-cfhase.adb (Free): Do not
2915 reset the Has_Element flag if no element is freed.
2916
29172019-07-11 Arnaud Charlet <charlet@adacore.com>
2918
2919 * errno.c: Remove obsolete support for MaRTE OS.
2920
29212019-07-11 Ed Schonberg <schonberg@adacore.com>
2922
2923 * exp_ch4.adb (Expand_N_Type_Conversion): If a predicate check
2924 is generated, analyze it with range check suppressed, because
2925 that check has been previously applied.
2926 * exp_ch5.adb (Expand_N_Assignment_Statement): If the RHS is a
2927 type conversion to the type of the LHS, do not apply a predicate
2928 check to the RHS because it will have been generated already
2929 during its expansion.
2930 * exp_ch6.adb (Can_Fold_Predicate_Call): Extend processing to
2931 handle a predicate check on a constant entity whose value is
2932 static.
2933
29342019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
2935
2936 * bindo.adb: Remove the documentation of switch -d_N because it
2937 is no longer in use.
2938 * bindo-graphs.ads, bindo-graphs.adb (Is_Spec_Before_Body_Edge):
2939 New routine.
2940 * bindo-writers.adb (Write_Dependency_Edge): Add the missing
2941 case of a spec-before-body edge.
2942
29432019-07-11 Dmitriy Anisimkov <anisimko@adacore.com>
2944
2945 * libgnat/g-socket.ads (Mode_Type): Add a Socket_Raw enumerator.
2946 * libgnat/g-socket.adb (Modes): Handle Socket_Raw.
2947
29482019-07-11 Justin Squirek <squirek@adacore.com>
2949
2950 * exp_ch9.adb (Build_Private_Protected_Declaration): Add
2951 exception for the moving of pragmas to internally generated
2952 specs for pragma Unreferenced.
2953
29542019-07-11 Bob Duff <duff@adacore.com>
2955
2956 * doc/gnat_ugn/gnat_utility_programs.rst: Fix inconsistent
2957 documentation for gnatmetric.
2958 * gnat_ugn.texi: Regenerate.
2959
29602019-07-11 Bob Duff <duff@adacore.com>
2961
2962 * doc/gnat_ugn/gnat_utility_programs.rst: Document gnatpp's
2963 --spaces-only switch.
2964
29652019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
2966
2967 * sem_util.adb (Null_Status): Assume that an erroneous construct
2968 has an undefined null status.
2969
29702019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
2971
2972 * checks.adb, exp_ch6.adb, gnat1drv.adb, sem_aux.adb,
2973 sem_ch2.adb, sem_ch8.adb, sem_res.adb: Minor reformatting.
2974
29752019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
2976
2977 * sem_ch8.adb (Analyze_Object_Renaming): Obtain the object being
2978 renamed using routine Get_Object_Name which takes care of
2979 various name forms.
2980 (Get_Object_Name): New routine.
2981
29822019-07-11 Ed Schonberg <schonberg@adacore.com>
2983
2984 * exp_ch6.adb (Can_Fold_Predicate_Call): New function,
2985 subsidiary of Expand_Call_Helper, to compute statically a
2986 predicate check when the argument is a static integer.
2987
29882019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
2989
2990 * sem_res.adb (Resolve_Op_Not): Do not rewrite an equality
2991 operator into a function call when the operator is intrinsic.
2992
29932019-07-11 Thomas Quinot <quinot@adacore.com>
2994
2995 * sem_prag.adb (Analyze_Pragma, case pragma Check): Do not call
2996 Set_SCO_Pragma_Enabled for the dynamic predicate case.
2997
29982019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
2999
3000 * exp_util.ads, exp_util.adb (Needs_Finalization): Move to
3001 Sem_Util.
3002 * sem_ch9.adb (Analyze_Protected_Definition): Code cleanup. Mark
3003 the protected type as having controlled components when it
3004 contains at least one such component.
3005 * sem_util.ads, sem_util.adb (Needs_Finalization): New
3006 function.
3007
30082019-07-11 Eric Botcazou <ebotcazou@adacore.com>
3009
3010 * alloc.ads (Rep_JSON_Table_Initial): New constant.
3011 (Rep_JSON_Table_Increment): Likewise.
3012 * debug.adb: Document -gnatd_j switch.
3013 * gcc-interface/Make-lang.in (GNAT_ADA_OBJS): Add
3014 repinfo-input.o.
3015 * gnat1drv.adb: Add with clause for Repinfo.Input.
3016 Add with and use clauses for Sinput.
3017 (Read_JSON_Files_For_Repinfo): New procedure.
3018 (Gnat1drv1): Deal with -gnatd_j switch.
3019 * repinfo-input.ad[sb]: New unit.
3020 * snames.ads-tmpl (Name_Discriminant): New constant.
3021 (Name_Operands): Likewise.
3022
30232019-07-11 Justin Squirek <squirek@adacore.com>
3024
3025 * checks.adb (Apply_Accessibility_Check): Add check for constant
3026 folded conditions on accessibility checks.
3027
30282019-07-11 Arnaud Charlet <charlet@adacore.com>
3029
3030 * libgnarl/g-thread.ads, libgnarl/g-thread.adb (Get_Thread):
3031 Update comments. Add new version taking a Task_Id.
3032
30332019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
3034
3035 * bindo.adb: Update the section of switches and debugging
3036 elaboration issues.
3037 * bindo.ads: Add type Elaboration_Phase.
3038 * bindo-augmentors.adb: Add use clause for
3039 Bindo.Writers.Phase_Writers.
3040 (Augment_Library_Graph): Signal the start and end of the
3041 aubmentation phase.
3042 * bindo-builders.adb: Add with and use clause for Bindo.Writers.
3043 Add use clause for Bindo.Writers.Phase_Writers.
3044 (Build_Invocation_Graph): Signal the start and end of the
3045 invocation graph construction phase.
3046 (Build_Library_Graph): Signal the start and end of the library
3047 graph construction phase.
3048 * bindo-diagnostics.adb: Add use clause for
3049 Bindo.Writers.Phase_Writers.
3050 (Diagnose_Cycle): Signal the start and end of the cycle
3051 diagnostic phase.
3052 * bindo-elaborators.adb: Add use clause for
3053 Bindo.Writers.Phase_Writers.
3054 (Elaborate_Units): Signal the start and end of the unit
3055 elaboration phase.
3056 * bindo-graphs.adb: Add use clause for
3057 Bindo.Writers.Phase_Writers.
3058 (Find_Components): Signal the start and end of the component
3059 discovery phase.
3060 (Find_Cycles): Signal the start and end of the cycle discovery
3061 phase.
3062 * bindo-units.adb: Add with and use clause for Bindo.Writers.
3063 Add use clause for Bindo.Writers.Phase_Writers.
3064 (Collect_Elaborable_Units): Signal the start and end of the unit
3065 collection phase.
3066 * bindo-validators.adb: Add with and use clause for
3067 Bindo.Writers. Add use clause for Bindo.Writers.Phase_Writers.
3068 (Validate_Cycles, Validate_Elaboration_Order,
3069 Validate_Invocation_Graph, Validate_Library_Graph): Signal the
3070 start and end of the libray graph validation phase.
3071 * bindo-writers.ads, bindo-writers.adb: Add new nested package
3072 Phase_Writers.
3073 * debug.adb: Update the documentation of switch d_S.
3074
30752019-07-11 Yannick Moy <moy@adacore.com>
3076
3077 * sem_res.adb (Check_Argument_Order): Special case calls to
3078 operators.
3079
30802019-07-10 Dmitriy Anisimkov <anisimko@adacore.com>
3081
3082 * libgnat/s-ststop.adb: Remove System.Strings.Stream_Ops
3083 dependence on System.Streams.Stream_IO.
3084
30852019-07-10 Ed Schonberg <schonberg@adacore.com>
3086
3087 * sem_ch2.adb (Analyze_Integer_Literal): Preserve the type of
3088 the literal if prior analysis determined that its type is a
3089 modular integer type.
3090
30912019-07-10 Doug Rupp <rupp@adacore.com>
3092
3093 * init.c: Do not attempt to re-arm guard page on x86_64-vx7(r2).
3094
30952019-07-10 Ed Schonberg <schonberg@adacore.com>
3096
3097 * sem_ch8.adb (Check_Constrained_Object): A record that is
3098 limited because of the presence of a limited component is
3099 constrained, and no subtype indiciation needs to be created for
3100 it, just as is the case for declared limited records.
3101
31022019-07-10 Yannick Moy <moy@adacore.com>
3103
3104 * sem_aux.adb, sem_aux.ads (Is_Protected_Operation): New
3105 function to determine if a subprogram is protected.
3106 * sem_spark.adb (Setup_Protected_Components): New procedure to
3107 add protected components to the environment.
3108 (Check_Callable_Body): Call the new Setup_Protected_Components.
3109 (Check_Package_Spec): Merge local environment with enclosing one
3110 when done.
3111
31122019-07-10 Claire Dross <dross@adacore.com>
3113
3114 * sem_spark.adb (Check_Expression): Allow digits constraints as
3115 input.
3116 (Illegal_Global_Usage): Pass in the entity.
3117 (Is_Subpath_Expression): New function to allow different nodes
3118 as inner parts of a path expression.
3119 (Read_Indexes): Allow concatenation and aggregates with box
3120 expressions. Allow attributes Update and Loop_Entry.
3121 (Check_Expression): Allow richer membership test.
3122 (Check_Node): Ignore bodies of generics.
3123 (Get_Root_Object): Allow concatenation and attributes.
3124
31252019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
3126
3127 * sem_ch6.adb (Check_Discriminant_Conformance): Use Find_Type to
3128 discover the type of a full view discriminant.
3129
31302019-07-10 Arnaud Charlet <charlet@adacore.com>
3131
3132 * doc/gnat_ugn/gnat_and_program_execution.rst: Improve gnatmem's
3133 doc for the depth switch.
3134
31352019-07-10 Bob Duff <duff@adacore.com>
3136
3137 * doc/gnat_ugn/gnat_utility_programs.rst: Document gnatpp's
3138 --source-line-breaks switch.
3139
31402019-07-10 Justin Squirek <squirek@adacore.com>
3141
3142 * doc/gnat_rm/implementation_defined_attributes.rst: Add mention
3143 of 'Image attribute with 'Img's entry to mention additional
3144 added 2012 usage of Obj'Image.
3145 * doc/gnat_rm/implementation_defined_pragmas.rst: Correct
3146 mispelling of Async_Writers.
3147 * gnat_rm.texi: Regenerate.
3148 * sem_prag.adb (Analyze_Pragma): Correct mispelling of
3149 Async_Writers.
3150 * sem_util.adb (State_Has_Enabled_Property): Correct mispelling
3151 of Async_Writers.
3152
31532019-07-10 Simon Buist <buist@adacore.com>
3154
3155 * sem_util.ads (Child_Prefix): New constant.
3156 * sem_util.adb (Unique_Name): Add a special prefix to child
3157 units that have a nested subprogram or package.
3158
31592019-07-10 Arnaud Charlet <charlet@adacore.com>
3160
3161 * sfn_scan.adb (Scan_SFN_Pragmas): Add pragma Assert.
3162
31632019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
3164
3165 * sem_ch3.adb (Check_Nonoverridable_Aspects): Correct the
3166 spelling in certain error messages.
3167 (Check_Pragma_Implemented): Correct the spelling in certain
3168 error messages.
3169
31702019-07-10 Eric Botcazou <ebotcazou@adacore.com>
3171
3172 * Makefile.rtl (GNATRTL_NONTASKING_OBJS): Add g-brapre.
3173 * libgnat/g-brapre.ads: New package specification.
3174 * doc/gnat_rm/the_gnat_library.rst: Document it.
3175 * gnat_rm.texi: Regenerate.
3176
31772019-07-10 Yannick Moy <moy@adacore.com>
3178
3179 * osint-c.adb (Set_File_Name): Always add extension for multiple
3180 units per file mode.
3181
31822019-07-10 Corentin Gay <gay@adacore.com>
3183
3184 * sysdep.c: Put include directive for 'vxWorks.h' before any
3185 other VxWorks headers.
3186
31872019-07-10 Eric Botcazou <ebotcazou@adacore.com>
3188
3189 * doc/gnat_rm/implementation_defined_attributes.rst
3190 (Scalar_Storage_Order): Minor tweaks. Add note about debuggers.
3191 * gnat_rm.texi: Regenerate.
3192
31932019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
3194
3195 * exp_ch4.adb (Expand_N_Case_Expression): Mark the generated
3196 assignments to the temporary result as being OK because the
3197 expansion of case expressions is correct by construction.
3198 (Is_Copy_Type): Update the predicate to match the comment
3199 within.
3200
32012019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
3202
3203 * bindo-graphs.adb, bindo.adb, debug.adb, exp_ch6.adb,
3204 sem_ch10.adb, sem_ch13.adb, sem_ch3.adb, sem_ch4.adb,
3205 sem_ch6.adb, sem_ch7.adb, sem_res.adb, sem_spark.adb,
3206 sem_util.adb, warnsw.ads: Minor reformatting.
3207
32082019-07-10 Joffrey Huguet <huguet@adacore.com>
3209
3210 * libgnat/a-strbou.ads, libgnat/a-strfix.ads,
3211 libgnat/a-strunb.ads, libgnat/a-strunb__shared.ads: Add global
3212 contracts, contract cases, preconditions and postconditions to
3213 procedures and functions.
3214
32152019-07-10 Doug Rupp <rupp@adacore.com>
3216
3217 * sysdep.c (__gnat_is_file_not_found_error): Reformulate to also
3218 work for vxworks7r2 SR0610.
3219
32202019-07-10 Doug Rupp <rupp@adacore.com>
3221
3222 * env.c (__gnat_environ): Reformulate to also work for
3223 vxworks7r2 SR0610.
3224
32252019-07-10 Patrick Bernardi <bernardi@adacore.com>
3226
3227 * Makefile.rtl: Handle vxworks7r2 ppc target
3228
32292019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
3230
3231 * bindo.adb: Update the section on switches.
3232 * bindo-graphs.adb
3233 (Add_Cycle, Add_Vertex_And_Complement): Remove.
3234 (Create): The graph no longer needs a set of recorded cycles
3235 because the cycles are not rediscovered in permuted forms.
3236 (Cycle_End_Vertices): New routine.
3237 (Destroy): The graph no longer needs a set of recorded cycles
3238 because the cycles are not rediscovered in permuted forms.
3239 (Destroy_Library_Graph_Vertex): Move to the library level.
3240 (Find_All_Cycles_Through_Vertex, Find_All_Cycles_With_Edge):
3241 Remove.
3242 (Find_Cycles_From_Successor, Find_Cycles_From_Vertex,
3243 Find_Cycles_In_Component, Has_Elaborate_All_Edge): New routines.
3244 (Insert_And_Sort): Remove.
3245 (Is_Elaborate_Body_Edge): Use predicate
3246 Is_Vertex_With_Elaborate_Body.
3247 (Is_Recorded_Cycle): Remove.
3248 (Is_Vertex_With_Elaborate_Body): New routine.
3249 (Normalize_And_Add_Cycle): Remove.
3250 (Precedence): Rename to xxx_Precedence, where xxx relates to the
3251 input. These versions better reflect the desired input
3252 precedence.
3253 (Record_Cycle): New routine.
3254 (Remove_Vertex_And_Complement, Set_Is_Recorded_Cycle): Remove.
3255 (Trace_xxx): Update all versions to use debug switch -d_t.
3256 (Trace_Component): New routine.
3257 (Trace_Eol): Removed.
3258 (Trace_Vertex): Do not output the component as this information
3259 is already available when the component is traced.
3260 (Unvisit, Visit): New routine.
3261 * bindo-graphs.ads: Add new instance LGV_Lists. Remove instance
3262 RC_Sets. Update the structure of type Library_Graph_Attributes
3263 to remove the set of recorded cycles.
3264 (Destroy_Library_Graph_Vertex): Move to the library level.
3265 * bindo-writers.adb (Write_Component_Vertices): Output
3266 information about the number of vertices.
3267 * debug.adb: Document the use of binder switch -d_t. Update the
3268 use of binder switch -d_T.
3269
32702019-07-10 Yannick Moy <moy@adacore.com>
3271
3272 * sem_spark.adb (Get_Root_Object): Replace precondition by error
3273 message.
3274 (Read_Indexes): Replace precondition by error message.
3275 (Check_Callable_Body): Check only traversal function returns an
3276 anonymous access type.
3277 (Check_Expression): Issue error on unexpected expression as
3278 path.
3279 * sem_util.adb (First_Global): Fix access to global on
3280 entry/task.
3281
32822019-07-10 Javier Miranda <miranda@adacore.com>
3283
3284 * exp_ch6.adb (Is_Class_Wide_Interface_Type): New subprogram.
3285 (Expand_Call_Helper): Handle non-limited views when we check if
3286 any formal is a class-wide interface type.
3287 * exp_disp.adb (Expand_Interface_Actuals): Handle non-limited
3288 views when we look for interface type formals to force "this"
3289 displacement.
3290
32912019-07-10 Ed Schonberg <schonberg@adacore.com>
3292
3293 * sem_res.adb (Resolve_Equality_Op): Do not replace the resolved
3294 operator by its alias if expander is not active, because the
3295 operand type may not be frozen yet and its inherited operations
3296 have not yet been created.
3297
32982019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
3299
3300 * bindo-elaborators.adb (Elaborate_Units): Set attribute
3301 Elab_Position of all elaborated units.
3302 (Set_Unit_Elaboration_Positions): New routine.
3303
33042019-07-10 Gary Dismukes <dismukes@adacore.com>
3305
3306 * exp_util.adb: Reformatting and a typo fix.
3307
33082019-07-10 Yannick Moy <moy@adacore.com>
3309
3310 * exp_util.adb (Remove_Side_Effects): Prefer renamings for
3311 objects of possible owning type in GNATprove mode.
3312
33132019-07-09 Ed Schonberg <schonberg@adacore.com>
3314
3315 * sem_ch3.adb (Analyze_Object_Declaration): If the object type
3316 is a composite type that has a dynamic predicate and, the
3317 expression in the declaration is an aggregate, the generated
3318 predicate check must appear after the expanded code for the
3319 aggregate, which will appear after the rewritten object
3320 declarastion.
3321
33222019-07-09 Justin Squirek <squirek@adacore.com>
3323
3324 * sem_eval.adb (Expr_Value_E): Add conditional to correctly
3325 handle constant enumerated character types.
3326
33272019-07-09 Eric Botcazou <ebotcazou@adacore.com>
3328
3329 * libgnarl/s-osinte__mingw.ads (CRITICAL_SECTION): Use proper
3330 type for SpinCount component.
3331
33322019-07-09 Justin Squirek <squirek@adacore.com>
3333
3334 * exp_ch4.adb (Expand_N_Allocator): Add conditional to detect
3335 the presence of anoymous access type allocators and issue a
3336 warning if the appropriate warning flag is enabled.
3337 * warnsw.ads: Add new warning flag for anonymous allocators
3338 * warnsw.adb (All_Warnings, Restore_Warnings, Save_Warnings,
3339 Set_Underscore_Warning_Switch): Register new flags.
3340 (WA_Warnings): Register new flag as an "all warnings" switch
3341 * usage.adb,
3342 doc/gnat_ugn/building_executable_programs_with_gnat.rst:
3343 Document new warning switches -gnatw_a and -gnatw_A.
3344 * gnat_ugn.texi: Regenerate.
3345
33462019-07-09 Ed Schonberg <schonberg@adacore.com>
3347
3348 * sem_ch4.adb (Diagnose_Call): Improve error recovery when a
3349 local subprogram name hides a possible candidate name declared
3350 in a child package in the context of the current unit.
3351 * sem_ch6.adb (Process_Formals): Protect against malformed
3352 formal types when the parameter type does not denote an entity.
3353
33542019-07-09 Hristian Kirtchev <kirtchev@adacore.com>
3355
3356 * bindo-augmentors.adb (Visit_Elaboration_Root): Do not start a
3357 DFS from an elaboration root whose corresponding unit lacks
3358 elaboration code. This behavior mimics that of the old
3359 elaboration order mechanism.
3360 * bindo-graphs.adb (Find_All_Cycles_Through_Vertex): Move the
3361 vertex tracing within the functional branches of the routine.
3362 This prevents spurious trace output.
3363 (Has_No_Elaboration_Code): New routine.
3364 (Trace_Cycle, Trace_Edge): Update the various Ids to use the
3365 "standard" trace format.
3366 * bindo-graphs.ads (Has_No_Elaboration_Code): New routine.
3367 * bindo-units.ads, bindo-units.adb (Has_No_Elaboration_Code):
3368 New routine.
3369
33702019-07-09 Piotr Trojanek <trojanek@adacore.com>
3371
3372 * ali.ads, bindo-graphs.adb, bindo-validators.adb, clean.adb,
3373 doc/gnat_ugn/elaboration_order_handling_in_gnat.rst, einfo.ads,
3374 exp_aggr.adb, exp_ch13.adb, exp_ch4.adb, exp_ch5.adb,
3375 exp_ch6.adb, exp_ch7.adb, exp_ch9.adb, exp_pakd.adb,
3376 fname-uf.ads, gnatlink.adb, inline.adb, lib.ads, make.adb,
3377 namet.ads, opt.ads, par-ch4.adb, par-ch6.adb, par-labl.adb,
3378 prep.adb, sem_aggr.adb, sem_ch13.adb, sem_ch4.adb, sem_ch5.adb,
3379 sem_ch6.adb, sem_ch6.ads, sem_ch7.adb, sem_ch8.adb, sem_dim.adb,
3380 sem_disp.adb, sem_prag.adb, sem_res.adb, sem_warn.adb,
3381 sinfo.ads: Replace ". " with ". ". Minor reformatting and typo
3382 corrections.
3383 * gnat_ugn.texi: Generate.
3384
33852019-07-09 Hristian Kirtchev <kirtchev@adacore.com>
3386
3387 * bindo.ads: Move type Precedence_Kind from the private to the
3388 visible part of the unit.
3389 * bindo-augmentors.adb: Remove the use of global data as it is
3390 bad practice.
3391 (Augment_Library_Graph): Update the parameter profile.
3392 (Is_Visited, Set_Is_Visited): Remove.
3393 (Visit_Elaboration_Root, Visit_Elaboration_Roots): Update the
3394 parameter profile and comment on usage.
3395 (Visit_Vertex): Likewise. Also keep track of which invocation
3396 edge activates a task.
3397 * bindo-augmentors.ads (Augment_Library_Graph): Update the
3398 parameter profile and comment on usage.
3399 * bindo-builders.adb (Create_Forced_Edge,
3400 Create_Spec_And_Body_Edge, Create_With_Edge): Update the call to
3401 Add_Edge.
3402 * bindo-diagnostics.adb: Add with end use clauses for Restrict
3403 and Rident.
3404 (Output_Dynamic_Model_Suggestions): Remove.
3405 (Output_Invocation_Related_Suggestions): New routine.
3406 (Output_Suggestions): Output all invocation-related suggestions
3407 together.
3408 * bindo-elaborators.adb: Remove types Comparator_Ptr and
3409 Predicate_Ptr.
3410 (Find_Best_Vertex): Update the parameter profile.
3411 * bindo-graphs.adb (Activates_Task): New routine.
3412 (Add_Body_Before_Spec_Edge): Update the call to
3413 Add_Edge_With_Return.
3414 (Add_Edge): Update the parameter profile and the call to
3415 Add_Edge_With_Return.
3416 (Add_Edge_With_Return): Update the parameter profile and comment
3417 on usage.
3418 (At_Least_One_Edge_Satisfies): New routine.
3419 (Contains_Elaborate_All_Edge): Reimplement.
3420 (Contains_Static_Successor_Edge, Contains_Task_Activation): New
3421 routine.
3422 (Contains_Weak_Static_Successor): Remove.
3423 (Is_Static_Successor_Edge): New routine.
3424 * bindo-graphs.ads: Add types LGE_Predicate_Ptr,
3425 LGV_Comparator_Ptr, and LGV_Predicate_Ptr. Update type
3426 Library_Graph_Edge_Attributes to capture whether an invocation
3427 edge activates a task. Update the value of
3428 No_Library_Graph_Edge_Attributes.
3429 (Activates_Task): Update the parameter profile and comment on
3430 usage.
3431 (Contains_Static_Successor_Edge, Contains_Task_Activation): New
3432 routines.
3433 (Contains_Weak_Static_Successor): Remove.
3434 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst:
3435 Update the documentation to reflect the new task-related advice.
3436 * gnat_ugn.texi: Regenerate.
3437
34382019-07-09 Piotr Trojanek <trojanek@adacore.com>
3439
3440 * exp_util.adb (Containing_Package_With_Ext_Axioms): Replace
3441 low-level Ekind test with a high-level wrapper.
3442
34432019-07-09 Arnaud Charlet <charlet@adacore.com>
3444
3445 * libgnat/s-memory.adb: Disable calls to Abort defer/undefer
3446 when ZCX_By_Default.
3447
34482019-07-09 Javier Miranda <miranda@adacore.com>
3449
3450 * sem_ch13.adb (Rep_Item_Too_Early): Representation clauses are
3451 not allowed for a derivation of a generic type. Extend the
3452 current test to check that none of the parents is a generic
3453 type.
3454
34552019-07-09 Hristian Kirtchev <kirtchev@adacore.com>
3456
3457 * exp_ch9.adb, exp_util.adb, repinfo.adb, sem_ch12.adb,
3458 sem_prag.adb, sem_res.adb, sem_spark.adb, sem_util.adb: Minor
3459 reformatting.
3460
34612019-07-09 Ed Schonberg <schonberg@adacore.com>
3462
3463 * sem_res.adb (Resolve_Equality_Op): If the node was overloaded,
3464 set properly the entity to which the node has been resolved. The
3465 original entity is the first one found during analysis, and is
3466 not necessarily the resolved one.
3467 (Resolve_Op_Not): If the argument of negation is an overloaded
3468 equality operation, call its resolution directly given that the
3469 context type does not participate in overload resolution.
3470
34712019-07-09 Hristian Kirtchev <kirtchev@adacore.com>
3472
3473 * bindo.adb: Remove with and use clauses for Debug. Add with
3474 and use clauses for Opt.
3475 (Find_Elaboration_Order): Enable the v4.0 elaboration order. The
3476 v3.0 mechanism is now available under binder switch -H.
3477 * bindusg.adb (Display): Enable switch -H.
3478 * debug.adb: Free compiler switch -gnatd_G. Free binder switch
3479 -d_N.
3480 * sem_elab.adb: Update the section on switches to remove
3481 -gnatd_G.
3482 (Invocation_Graph_Recording_OK): The invocation graph is now
3483 unconditionally recorded in ALI files.
3484 * switch-b.adb (Scan_Binder_Switches): Scan switch -H.
3485 * doc/gnat_ugn/building_executable_programs_with_gnat.rst:
3486 Update the documentation on compiler switches related to
3487 elaboration. Update the documentation on binder switches to
3488 include switch -H.
3489 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update
3490 the documentation on elaboration order handling in GNAT.
3491 * gnat_ugn.texi: Regenerate.
3492
34932019-07-09 Eric Botcazou <ebotcazou@adacore.com>
3494
3495 * repinfo.adb (List_Entities): Disregard formals altogether.
3496 (List_Name): Properly escape the double quote in the JSON
3497 output.
3498
34992019-07-09 Javier Miranda <miranda@adacore.com>
3500
3501 * exp_util.adb (Remove_Side_Effects): Preserve the
3502 Do_Range_Check flag.
3503
35042019-07-09 Yannick Moy <moy@adacore.com>
3505
3506 * sinfo.ads: Refine comment for Do_Range_Check.
3507
35082019-07-09 Yannick Moy <moy@adacore.com>
3509
3510 * exp_spark.adb (Expand_SPARK_N_Attribute_Reference): Expand
3511 attribute reference on Enum_Rep.
3512
35132019-07-09 Ed Schonberg <schonberg@adacore.com>
3514
3515 * sem_ch12.adb (Instantiate_Formal_Package): Handle properly the
3516 case where the actual for a formal package in an instance is the
3517 current instance of an enclosing generic package.
3518 (Check_Formal_Packages): If the formal package declaration is
3519 box-initialized or lacks associations altogether, no internal
3520 instance was created to verify conformance, and there is no
3521 validating package to remove from tree.
3522
35232019-07-09 Yannick Moy <moy@adacore.com>
3524
3525 * freeze.adb (Build_Renamed_Body): Do not set body to inline in
3526 GNATprove mode.
3527
35282019-07-09 Yannick Moy <moy@adacore.com>
3529
3530 * exp_util.adb (Expand_Subtype_From_Expr): Still expand the type
3531 of static expressions in GNATprove_Mode.
3532 * sem_ch3.adb (Analyze_Object_Declaration): Remove obsolete
3533 special case for GNATprove_Mode.
3534
35352019-07-09 Piotr Trojanek <trojanek@adacore.com>
3536
3537 * doc/gnat_rm/the_gnat_library.rst,
3538 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
3539 erroutc.adb, libgnat/g-comlin.adb, libgnat/g-comlin.ads,
3540 libgnat/g-regexp.ads, libgnat/g-regpat.ads,
3541 libgnat/g-spipat.ads, libgnat/s-os_lib.ads,
3542 libgnat/s-regexp.ads: Reword "wild card" to "wildcard".
3543 * gnat_rm.texi, gnat_ugn.texi: Regenerate.
3544
35452019-07-09 Yannick Moy <moy@adacore.com>
3546
3547 * sem_spark.adb (Check_Expression): Handle correctly implicit
3548 assignments as part of allocators and (extension) aggregates.
3549 (Get_Root_Object): Adapt for new path expressions.
3550 (Is_Path_Expression): Return True for (extension) aggregate.
3551
35522019-07-09 Piotr Trojanek <trojanek@adacore.com>
3553
3554 * einfo.ads: Fix a typo.
3555
35562019-07-09 Ed Schonberg <schonberg@adacore.com>
3557
3558 * sem_util.adb (Scope_Within_Or_Same): Handle properly task
3559 bodies and protected bodies, so that local variables within have
3560 their proper scopes after these constructs have been rewritten
3561 during expansion. This patch resembles but is not identical to
3562 the code in Scope_Within.
3563
35642019-07-09 Arnaud Charlet <charlet@adacore.com>
3565
3566 * gnat1drv.adb (Adjust_Global_Switches): Set
3567 Dynamic_Elaboration_Checks to True in CodePeer mode.
3568
35692019-07-09 Yannick Moy <moy@adacore.com>
3570
3571 * sem_spark.adb (Get_Perm_Or_Tree): Issue an error when
3572 encountering unknown global variable.
3573
35742019-07-09 Yannick Moy <moy@adacore.com>
3575
3576 * sem_spark.adb (Check_Expression): Change signature to take an
3577 Extended_Checking_Mode, for handling read permission checking of
3578 sub-expressions in an assignment.
3579 (Check_Parameter_Or_Global): Adapt to new behavior of
3580 Check_Expression for mode Assign.
3581 (Check_Safe_Pointers): Do not analyze generic bodies.
3582 (Check_Assignment): Separate checking of the target of an
3583 assignment.
3584
35852019-07-09 Eric Botcazou <ebotcazou@adacore.com>
3586
3587 * repinfo.ads (JSON format): Adjust.
3588 * repinfo.adb (Need_Blank_Line): Rename to...
3589 (Need_Separator): ...this.
3590 (Blank_Line): Rename to...
3591 (Write_Separator): ...this and add JSON specific handling.
3592 (List_Array_Info): Adjust to above renaming.
3593 (List_Object_Info): Likewise.
3594 (List_Record_Info): Likewise.
3595 (List_Subprogram_Info): Likewise.
3596 (List_Type_Info): Likewise.
3597 (List_Entities): Do not set Need_Blank_Line.
3598 (List_Rep_Info): Set Need_Separator and add JSON specific
3599 handling. Output a single JSON stream in the normal case.
3600
36012019-07-09 Arnaud Charlet <charlet@adacore.com>
3602
3603 * doc/gnat_ugn/the_gnat_compilation_model.rst: Update doc on
3604 -fdump-ada-spec now that we generate Ada 2012.
3605 * gnat_ugn.texi: Regenerate.
3606
36072019-07-08 Eric Botcazou <ebotcazou@adacore.com>
3608
3609 * repinfo.adb (List_Common_Type_Info): New procedure extracted
3610 from...
3611 (List_Type_Info): ...here. Call it for the common information,
3612 start with a blank line and output the linker section at the
3613 end, if any.
3614 (List_Mechanisms): Rename to...
3615 (List_Subprogram_Info): ...this.
3616 (List_Array_Info): Call List_Common_Type_Info.
3617 (List_Entities): Adjust to above change and renaming.
3618 (List_Record_Info): Call List_Common_Type_Info.
3619
36202019-07-08 Dmitriy Anisimkov <anisimko@adacore.com>
3621
3622 * libgnat/g-sercom.ads
3623 (Serial_Port_Descriptor): New type.
3624 (Serial_Port): Add a comment, make it hold a
3625 Serial_Port_Descriptor.
3626 (To_Ada, To_C): New procedures.
3627 (Port_Data, Port_Data_Access): Remove types.
3628 * libgnat/g-sercom.adb (To_Ada): New stub.
3629 * libgnat/g-sercom__linux.adb, libgnat/g-sercom__mingw.adb:
3630 Update implementations accordingly.
3631 * s-oscons-tmplt.c: Bind Serial_Port_Descriptor to
3632 System.Win32.HANDLE on Windows, and to Interfaces.C.int on
3633 Linux. Add "Interfaces.C." prefix for other basic integer type
3634 bindings.
3635 * xoscons.adb (Output_Info): Remove the "Interfaces.C." prefix
3636 for subtypes generation.
3637
36382019-07-08 Arnaud Charlet <charlet@adacore.com>
3639
3640 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
3641 Update documentation on No_Exceptions restriction.
3642 * gnat_rm.texi: Regenerate.
3643
36442019-07-08 Dmitriy Anisimkov <anisimko@adacore.com>
3645
3646 * libgnat/s-os_lib.adb: Do not call __gnat_kill for Invalid_Pid.
3647
36482019-07-08 Piotr Trojanek <trojanek@adacore.com>
3649
3650 * sem_util.adb (Enclosing_Package_Or_Subprogram): Do not expect
3651 package and subprogram bodies.
3652
36532019-07-08 Bob Duff <duff@adacore.com>
3654
3655 * doc/gnat_ugn/gnat_utility_programs.rst: Remove documentation
3656 of ignored GNATpp switch.
3657
36582019-07-08 Hristian Kirtchev <kirtchev@adacore.com>
3659
3660 * doc/gnat_rm/implementation_defined_pragmas.rst:
3661 Update the documentation of pragma Initialize_Scalars.
3662 * gnat_rm.texi: Regenerate.
3663
36642019-07-08 Javier Miranda <miranda@adacore.com>
3665
3666 * exp_ch4.adb (Tagged_Membership): Fix regression silently
3667 introduced in r260738 that erroneouslusy causes the evaluation
3668 to True of the membership test when the left operand of the
3669 membership test is a class-wide interface object and the right
3670 operand is a type that implements such interface type.
3671
36722019-07-08 Hristian Kirtchev <kirtchev@adacore.com>
3673
3674 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
3675 register an address clause when its prefix denotes a generic
3676 formal object.
3677
36782019-07-08 Hristian Kirtchev <kirtchev@adacore.com>
3679
3680 * bindo-diagnostics.adb (Diagnose_Cycle): Capture the presence
3681 of an Elaborate_All edge before iterating over the edges of the
3682 cycle.
3683 (Output_Elaborate_Body_Transition): Update the parameter profile
3684 and the comment on usage. Add a missing case where the edge is
3685 within the context of an Elaborate_All.
3686 (Output_Transition): Update the call to
3687 Output_Elaborate_Body_Transition.
3688 * bindo-graphs.ads, bindo-graphs.adb
3689 (Contains_Elaborate_All_Edge): New routine.
3690
36912019-07-08 Piotr Trojanek <trojanek@adacore.com>
3692
3693 * lib-xref-spark_specific.adb (Create_Heap): Set dummy Etype for
3694 the fake __HEAP entity.
3695
36962019-07-08 Daniel Mercier <mercier@adacore.com>
3697
3698 * gnat1drv.adb: Suppress warnings on memory representation in
3699 CodePeer compiler mode.
3700
37012019-07-08 Nicolas Roche <roche@adacore.com>
3702
3703 * rtinit.c (__gnat_runtime_initialize): Remove dependency on
3704 CommandLineToArgvW.
3705
37062019-07-08 Doug Rupp <rupp@adacore.com>
3707
3708 * Makefile.rtl: Handle vxworks7r2 in x86_64 and x86 vxworks7.
3709
37102019-07-08 Dmitriy Anisimkov <anisimko@adacore.com>
3711
3712 * Makefile.rtl: Use g-sercom__linux.adb for all linuxes.
3713
37142019-07-08 Yannick Moy <moy@adacore.com>
3715
3716 * expander.adb (Expand): Do not reset Analyzed flag always.
3717 * sem_eval.adb (Fold_Ureal): Mark node as analyzed.
3718
37192019-07-08 Ed Schonberg <schonberg@adacore.com>
3720
3721 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Do not insert twice
3722 the assignment statement that computes the delay value, to
3723 prevent improper tree sharing when the value is a type
3724 conversion and Float_Overflow checks are enabled.
3725
37262019-07-08 Hristian Kirtchev <kirtchev@adacore.com>
3727
3728 * bindo.adb: Update the section on terminology to include new
3729 concepts. Update the section on switches to include new
3730 entries.
3731 * bindo.ads: Add type Precedence_Kind.
3732 * bindo-builders.adb: Add with and use clauses for Debug and
3733 Bindo.Validators. Add use clauses for
3734 Bindo.Validators.Invocation_Graph_Validators and
3735 Bindo.Validators.Library_Graph_Validators.
3736 (Build_Invocation_Graph): Validate the graph immediately after
3737 it was built.
3738 (Build_Library_Graph): Update the parameter profile. The
3739 creation of the graph is now elaboration model-agnostic.
3740 Validate the graph immediately after it was built.
3741 (Create_With_Edge): Create regular with edges for Elaborate and
3742 Elaborate_All edges when the appropriate debug switches are in
3743 effect.
3744 * bindo-builders.ads (Build_Library_Graph): Update the parameter
3745 profile.
3746 * bindo-diagnostics.adb (Diagnose_Cycle): Track the presence of
3747 an Elaborate_All edge throughout the inspection of the cycle's
3748 edges.
3749 (Output_Dynamic_Model_Suggestions): Output the suggestion only
3750 when the cycle contains at least one weak edge where the
3751 successor was statically elaborated.
3752 (Output_Elaborate_Body_Transition, Output_Forced_Transition,
3753 Output_With_Transition): Update the assertions.
3754 * bindo-elaborators.adb: Remove use clauses for
3755 Bindo.Validators.Invocation_Graph_Validators and
3756 Bindo.Validators.Library_Graph_Validators. Remove strings
3757 Add_To_All_Candidates_Msg and Add_To_Comp_Candidates_Msg.
3758 Remove type String_Ptr.
3759 (Add_Vertex, Add_Vertex_If_Elaborable, Create_All_Candidates_Set
3760 Create_Component_Candidates_Set): Remove.
3761 (Create_Component_Vertex_Sets, Create_Vertex_Sets): New routine.
3762 (Elaborate_Component): Update the parameter profile and the
3763 comment on usage. Reimplement the elaboration of a component.
3764 The algorithm will now attempt to elaborate as many vertices
3765 possible. If this is not possible, and a weakly elaborable
3766 vertex is available use unit was compiled using the dynamic
3767 model, the algorithm will elaborate it.
3768 (Elaborate_Library_Graph): Reimplement the elaboration of the
3769 graph. The algorithm will now attempt to elaborate as many
3770 vertices along with their components as possible. If this is not
3771 possible, and a weakly elaborable vertex is available use unit
3772 was compiled using the dynamic model, the algorithm will
3773 elaborate it along with its component.
3774 (Elaborate_Units): Merge with the functionality of
3775 Elaborate_Units_Common.
3776 (Elaborate_Units_Common, Elaborate_Units_Dynamic,
3777 Elaborate_Units_Static): Remove.
3778 (Elaborate_Vertex): Update the parameter profile and the comment
3779 on usage. Reimplemented.
3780 (Find_Best_Candidate): Remove.
3781 (Find_Best_Elaborable_Vertex, Find_Best_Vertex,
3782 Find_Best_Weakly_Elaborable_Vertex, Has_Elaborable_Body,
3783 Insert_Elaborable_Successor, Insert_Vertex): New routines.
3784 (Is_Better_Candidate): Remove.
3785 (Is_Better_Elaborable_Vertex,
3786 Is_Better_Weakly_Elaborable_Vertex,
3787 Is_Suitable_Elaborable_Vertex,
3788 Is_Suitable_Weakly_Elaborable_Vertex): New routines.
3789 (Trace_Candidate_Vertices): Remove.
3790 (Trace_Component): Output the number of strong and weak
3791 predecessors.
3792 (Trace_Unelaborated_Vertices): Remove.
3793 (Trace_Vertex): Output the number of strong and weak
3794 predecessors.
3795 (Trace_Vertices): New routine.
3796 (Update_Successor, Update_Successors): Update the parameter
3797 profile and the comment on usage.
3798 * bindo-graphs.adb: Remove type Precedence_Kind.
3799 (Add_Edge_With_Return): Update the increment of pending
3800 predecessors.
3801 (Add_Vertex): Provide default values for strong and weak
3802 predecessors.
3803 (Complementary_Vertex): Move the initial declaration to the
3804 spec. Update the parameter profile and the comment on usage.
3805 (Contains_Weak_Static_Successor): New routine.
3806 (Create): Update the parameter profile. The creation of the
3807 graph is now elaboration model-agnostic.
3808 (Decrement_Pending_Predecessors): Update the parameter profile
3809 and the comment on usage. Reimplemented.
3810 (Delete_Edge): Update the decrement of pending predecesors.
3811 (Has_Elaborate_Body): Do not treat a vertex as being subject to
3812 Elaborate_Body when a debug switch is in effect.
3813 (Increment_Pending_Predecessors): Update the parameter profile
3814 and the comment on usage. Reimplemented.
3815 (Is_Elaborable_Component): Reimplemented.
3816 (Is_Elaborable_Vertex): Move the initial declaration to the
3817 spec. Reimplemented.
3818 (Is_Elaborate_Body_Pair): New routine.
3819 (Is_Dynamically_Elaborated): Update the parameter profile.
3820 Reimplemented.
3821 (Is_Weakly_Elaborable_Vertex): New routine.
3822 (Pending_Predecessors): Removed.
3823 (Pending_Predecessors_For_Elaboration,
3824 Pending_Strong_Predecessors, Pending_Weak_Predecessors,
3825 Update_Pending_Predecessors): New routines.
3826 (Update_Pending_Predecessors_Of_Components): Update the
3827 increment of pending predecessors.
3828 * bindo-graphs.ads: Update the components of type
3829 Component_Attributes. Update the components of type
3830 Library_Graph_Attributes. Update the components of type
3831 Library_Graph_Vertex_Attributes. Update the initialization of
3832 No_Component_Attributes. Update the initialization of
3833 No_Library_Graph_Vertex_Attributes.
3834 (Complementary_Vertex, Contains_Weak_Static_Successor): New
3835 routines.
3836 (Create): Update the parameter profile and the comment on usage.
3837 (Decrement_Pending_Predecessors, Is_Dynamically_Elaborated):
3838 Update the parameter profile and the comment on usage.
3839 (Is_Elaborate_Body_Pair, Is_Weakly_Elaborable_Vertex): New
3840 routines.
3841 (Pending_Predecessors): Removed.
3842 (Pending_Predecessors_For_Elaboration,
3843 Pending_Strong_Predecessors, Pending_Weak_Predecessors): New
3844 routines.
3845 * bindo-writers.adb (Write_Components): Moved from the spec.
3846 (Write_Component): Output the strong and weak predecessors.
3847 (Write_Library_Graph): Output the components as part of the
3848 graph.
3849 (Write_Library_Graph_Vertex): Output the strong and weak
3850 predecessors.
3851 * bindo-writers.ads (Write_Components): Moved to the body.
3852 * debug.adb: Add and document new GNATbind switches -d_a, -d_b,
3853 -d_e.
3854 * bindo-validators.adb: Minor reformattings.
3855
38562019-07-08 Bob Duff <duff@adacore.com>
3857
3858 * libgnat/g-sercom.ads, libgnat/g-sercom__linux.adb (Data_Rate):
3859 Support additional data rates.
3860
38612019-07-08 Olivier Hainque <hainque@adacore.com>
3862
3863 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Don't request
3864 DECL_ARTIFICIAL_P on elab proc declarations.
3865
38662019-07-08 Eric Botcazou <ebotcazou@adacore.com>
3867
3868 * repinfo.adb (List_Record_Info): Declare Incomplete_Layout and
3869 Not_In_Extended_Main local exceptions.
3870 (List_Structural_Record_Layout): For an extension, raise the
3871 former if the parent subtype has not been built and the latter
3872 if it is not declared in the main source unit. Fall back to the
3873 flat layout if either exception has been raised.
3874
38752019-07-08 Ed Schonberg <schonberg@adacore.com>
3876
3877 * libgnat/a-strfix.adb (Delete): The RM describes the semantics
3878 of Delete as equivalent to that of Replace_String with a null
3879 argument. As a result, deleting a null string that starts past
3880 the end of its argument is a noop and must not raise
3881 Index_Error.
3882
38832019-07-08 Javier Miranda <miranda@adacore.com>
3884
3885 * exp_disp.adb (Register_Primitive): When registering a
3886 primitive in the secondary dispatch table, handle primitive
3887 inherited through several levels of type derivation (required to
3888 properly handle inherited 'null' primitive).
3889
38902019-07-08 Bob Duff <duff@adacore.com>
3891
3892 * doc/gnat_ugn/gnat_utility_programs.rst: Document handling of
3893 preprocessor directives in GNATpp.
3894
38952019-07-08 Javier Miranda <miranda@adacore.com>
3896
3897 * gnat1drv.adb (Post_Compilation_Validation_Checks:
3898 Validate_Compile_Time_Warning_Errors is now located in sem_prag
3899 (instead of sem_ch13).
3900 * sem_ch13.ads (Validate_Compile_Time_Warning_Error,
3901 Validate_Compile_Time_Warning_Errors): Move to sem_prag.
3902 * sem_ch13.adb
3903 (Compile_Time_Warnings_Errors): Move to sem_prag.
3904 (Initialize): Remove initialization of table
3905 Compile_Time_Warning_Errors.
3906 (Validate_Compile_Time_Warning_Error,
3907 Validate_Compile_Time_Warning_Errors): Move to sem_prag.
3908 * sem_prag.ads (Validate_Compile_Time_Warning_Errors): New
3909 procedure.
3910 * sem_prag.adb (Initialize): Initialize table
3911 Compile_Time_Warning_Errors.
3912
39132019-07-08 Ed Schonberg <schonberg@adacore.com>
3914
3915 * sem_ch13.adb (Analyze_Aspect_Specifications): For a
3916 pre/postcondition of a generic subprogram declaration, do not
3917 use Relocate_Node on the aspect expression to construct the
3918 corresponding attribute specification, to prevent tree anomalies
3919 when the expression is a call with named actual parameters.
3920
39212019-07-08 Javier Miranda <miranda@adacore.com>
3922
3923 * sem_attr.adb (Analyze_Attribute [Attribute_Size]): For pragmas
3924 used to report user defined compile time warning or errors
3925 handle 'Size for types with known static RM size.
3926
39272019-07-08 Justin Squirek <squirek@adacore.com>
3928
3929 * exp_imgv.adb (Build_Enumeration_Image_Tables): Default SSO for
3930 the building of image tables.
3931 (Expand_Image_Attribute): Minor cleanup.
3932
39332019-07-08 Dmitriy Anisimkov <anisimko@adacore.com>
3934
3935 * libgnat/g-socket.ads, libgnat/g-socket.adb: Improve
3936 documentation.
3937 (Get_Socket_Option, Set_Socket_Option): Remove default value for
3938 the Level formal.
3939
39402019-07-08 Ed Schonberg <schonberg@adacore.com>
3941
3942 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): For an
3943 unanalized aspect in a generic context that has not been
3944 analyzed yet, if the aspect applies to a type, place the type on
3945 the scope stack to make its components visible, before checking
3946 conformance with the version of the expression analyzed at the
3947 freeze point.
3948
39492019-07-05 Justin Squirek <squirek@adacore.com>
3950
3951 * checks.adb (Apply_Accessibility_Check): Add logic to fetch the
3952 function result accessibility level if one is required within
3953 the generated check.
3954 * exp_ch6.adb (Needs_Result_Accessibility_Level): Modify
3955 controlling elsif block to handle more cases such as anonymous
3956 access results and disable checking for coextensions.
3957
39582019-07-05 Ed Schonberg <schonberg@adacore.com>
3959
3960 * sem_ch9.adb (Analyze_Accept_Statement): If this is an illegal
3961 accept statement for an enclosing entry abandon analysis to
3962 prevent scope mismatches and potential infinite loops in
3963 compiler.
3964
39652019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
3966
3967 * ali.adb (For_Each_Invocation_Construct,
3968 For_Each_Invocation_Relation): New version.
3969 (Scan_ALI): Initialize field Invocation_Graph_Encoding.
3970 (Set_Invocation_Graph_Encoding): Update the setting of the
3971 invocation graph encoding.
3972 * ali.ads: Move field Invocation_Graph_Encoding from Unit_Record
3973 to ALI_Record because the encoding applies to the whole ALI,
3974 rather than one of the units (spec or body) for which the ALI
3975 file was created.
3976 (For_Each_Invocation_Construct, For_Each_Invocation_Relation):
3977 New version.
3978 * bindo.adb: Update the section on switches. Complete the
3979 section of debugging elaboration order issues.
3980 (Find_Elaboration_Order): Prepare the routine for the switch
3981 from the old to the new elaboration order mechanism.
3982 * bindo-diagnostics.adb (Find_And_Output_Invocation_Paths):
3983 Manage a visited set used by Visit_Vertex.
3984 (Output_All_Cycles_Suggestions,
3985 Output_Dynamic_Model_Suggestions): Clarify the nature of the
3986 suggested switch.
3987 (Output_Elaborate_Body_Transition): Update the diagnostic to
3988 emit a better message.
3989 (Output_Forced_Suggestions, Output_Full_Encoding_Suggestions):
3990 Clarify the nature of the suggested switch.
3991 (Visit_Vertex): Update the parameter profile to add a set of
3992 invokers visited during the transition. This set prevents
3993 infinite exploration of the graph in case the invocations are
3994 recursive.
3995 * bindo-elaborators.adb: Add a use clause for
3996 Bindo.Writers.Dependency_Writers.
3997 (Elaborate_Units_Common): Output the library graph after it has
3998 been augmented with invocation edges. Output just the components
3999 instead of outputting the whole library graph again.
4000 (Elaborate_Units_Dynamic, Elaborate_Units_Static): Output the
4001 dependencies as expressed in the library graph.
4002 * bindo-units.adb (Invocation_Graph_Encoding): Update the
4003 extraction of the invocation graph encoding.
4004 * bindo-writers.adb: Add with and use clauses for Binderr and
4005 Butil.
4006 (palgc, plgc): New debug routine.
4007 (Write_Components): Moved to the spec. Add a header for the
4008 output.
4009 (Write_Dependencies, Write_Dependencies_Of_Vertex,
4010 Write_Dependency_Edge): New routine.
4011 (Write_Elaboration_Order): Update the logic to follow the format
4012 of Binde's order output.
4013 (Write_Library_Graph): Do not output the components every time
4014 the graph is written.
4015 (Write_Unit): Output the invocation graph encoding of the unit.
4016 Output the invocation constructs and relations for the unit
4017 only.
4018 * bindo-writers.ads (Write_Components): Moved from the body.
4019 (Write_Dependencies): New routine.
4020 * bindusg.adb: Prepare the routine for the switch from the old
4021 to the new elaboration order mechanism.
4022 * debug.adb: Binder switch -d_O is now not associated with any
4023 functionality.
4024 * einfo.adb (Is_Elaboration_Target): The attribute applies to
4025 packages, as specified by the comment on the attribute usage.
4026 * opt.ads: Add a global flag which controls the choice between
4027 the new and the legacy elaboration order mechanism.
4028 * sem_elab.adb: Add Package_Target to type Target_Kind.
4029 (Build_Elaborate_Body_Procedure, Build_Elaborate_Procedure,
4030 Build_Elaborate_Spec_Procedure, Check_Elaboration_Scenarios,
4031 Check_SPARK_Model_In_Effect): Use Main_Unit_Entity to obtain the
4032 entity of the main unit.
4033 (Create_Package_Rep): New routine.
4034 (Create_Target_Rep): Add processing for packages.
4035 (Declaration_Placement_Of_Node, Has_Prior_Elaboration): Use
4036 Main_Unit_Entity to obtain the entity of the main
4037 unit.
4038 (Invocation_Graph_Recording_OK): Prepare the routine for the
4039 switch from the old to the new elaboration order mechanism.
4040 (Main_Unit_Entity): New routine.
4041 (Meet_Elaboration_Requirement,
4042 Process_Conditional_ABE_Variable_Reference): Use
4043 Main_Unit_Entity to obtain the entity of the main unit.
4044 (Process_Invocation_Instantiation): New routine.
4045 (Process_Invocation_Scenario): Add processing for
4046 instantiations.
4047 * switch-b.adb (Scan_Binder_Switches): Prepare the routine for
4048 the switch from the old to the new elaboration order mechanism.
4049
40502019-07-05 Joffrey Huguet <huguet@adacore.com>
4051
4052 * libgnat/a-textio.adb: Add abstract state refinment.
4053 * libgnat/a-textio.ads: Add File_System abstract state. Add
4054 global contracts, contract cases, preconditions and
4055 postconditions to procedures and functions.
4056 (Set_Input, Set_Output, Set_Error, Standard_Input,
4057 Standard_Output, Standard_Error, Current_Input, Current_Output,
4058 Current_Error): Turn SPARK_Mode off.
4059 (Get_Line): Turn SPARK_Mode off on Get_Line functions.
4060 * libgnat/a-tideio.ads, libgnat/a-tienio.ads,
4061 libgnat/a-tifiio.ads, libgnat/a-tiflio.ads,
4062 libgnat/a-tiinio.ads, libgnat/a-timoio.ads: Add global
4063 contracts, contract cases, preconditions and postconditions to
4064 procedures and functions.
4065
40662019-07-05 Arnaud Charlet <charlet@adacore.com>
4067
4068 * doc/gnat_ugn/platform_specific_information.rst: Refresh doc on
4069 installing from the command line on Windows. Remove obsolete
4070 part.
4071 * gnat_ugn.texi: Regenerate.
4072
40732019-07-05 Vasiliy Fofanov <fofanov@adacore.com>
4074
4075 * libgnat/a-wichha.ads (Is_Alphanumeric): Replace comment with
4076 the correct one. Also capitalize references to False
4077 throughout.
4078
40792019-07-05 Eric Botcazou <ebotcazou@adacore.com>
4080
4081 * exp_ch4.adb (Expand_N_Indexed_Component): Do not expand actual
4082 parameters of function calls here either.
4083
40842019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
4085
4086 * bindo-units.adb, checks.adb, exp_attr.adb, exp_ch3.adb,
4087 exp_ch4.adb, exp_pakd.adb, lib-writ.adb, libgnat/g-traceb.adb,
4088 libgnat/g-traceb.ads, libgnat/s-stratt.ads, sem_aux.ads,
4089 sem_util.adb: Minor reformatting.
4090
40912019-07-05 Ed Schonberg <schonberg@adacore.com>
4092
4093 * sem_ch13.adb (Build_Predicate_Functions): If a subtype that
4094 carries a static predicate aspect is frozen immediately after
4095 its declaration, ensure that the generated function body created
4096 for predicate checking is inserted after the corresponding
4097 subprogram declaration, which is created at the point the
4098 declaration is elaborated.
4099
41002019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
4101
4102 * exp_ch7.adb (Cleanup_Record): Use the underlying type when
4103 checking for components with tasks.
4104
41052019-07-05 Arnaud Charlet <charlet@adacore.com>
4106
4107 * libgnarl/s-osinte__linux.ads: Link with -lrt before -lpthread.
4108
41092019-07-05 Ed Schonberg <schonberg@adacore.com>
4110
4111 * exp_pakd.adb (Expand_Bit_Packed_Element_Set): Add explicit
4112 range checks when the index type of the bit-packed array is an
4113 enumeration type with a non-standard representation,
4114
41152019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
4116
4117 * sem_res.adb (Is_Control_Flow_Statement): Delay statements
4118 contain an expression, which in turn may have side effects and
4119 affect the infinite recursion. As a result, delay statements
4120 should not be treated specially.
4121
41222019-07-05 Arnaud Charlet <charlet@adacore.com>
4123
4124 * libgnarl/s-linux.ads, libgnarl/s-linux__alpha.ads,
4125 libgnarl/s-linux__android.ads, libgnarl/s-linux__hppa.ads,
4126 libgnarl/s-linux__mips.ads, libgnarl/s-linux__riscv.ads,
4127 libgnarl/s-linux__sparc.ads: Fix typos in comments.
4128
41292019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
4130
4131 * sem_res.adb (Check_Infinite_Recursion): Reimplemented.
4132 (Enclosing_Declaration_Or_Statement,
4133 Invoked_With_Different_Arguments, Is_Conditional_Statement,
4134 Is_Control_Flow_Statement, Is_Immediately_Within_Body,
4135 Is_Raise_Idiom, Is_Raise_Statement, Is_Sole_Statement,
4136 Preceded_By_Control_Flow_Statement,
4137 Within_Conditional_Statement): New routines.
4138
41392019-07-05 Javier Miranda <miranda@adacore.com>
4140
4141 * exp_ch4.adb (Expand_N_Type_Conversion): Do not apply an
4142 accessibility check when the conversion is an access to
4143 class-wide interface type and it is an actual parameter.
4144 * exp_ch6.adb (Expand_Call_Helper): Add documentation on the
4145 accessibility level of an anonymous allocator defining the value
4146 of an access parameter.
4147 * sem_util.ads, sem_util.adb (Dynamic_Accessibility_Level): Add
4148 support for an anonymous allocator whose type is that of a
4149 stand-alone object of an anonymous access to object type.
4150
41512019-07-05 Piotr Trojanek <trojanek@adacore.com>
4152
4153 * einfo.ads, sem_res.adb: Typo fixes in comments.
4154
41552019-07-05 Bob Duff <duff@adacore.com>
4156
4157 * exp_ch6.adb (Is_Build_In_Place_Function): Narrow the check for
4158 Has_Foreign_Convention to the imported case only. If a
4159 build-in-place function is exported, and called from Ada code,
4160 build-in-place protocols should be used.
4161
41622019-07-05 Ed Schonberg <schonberg@adacore.com>
4163
4164 * sem_util.adb (Encloing_Subprogram): If Enclosing_Dynamic_Scope
4165 is a loop, continue climbing the scope stack to find the
4166 enclosing subprogram.
4167 (Gather_Components): Handle properly a choice in a record
4168 aggregate that is given by a subtype with a static predicate.
4169
41702019-07-05 Javier Miranda <miranda@adacore.com>
4171
4172 * debug.adb (-gnatd.K): Leave available this switch.
4173 * contracts.adb (Build_And_Analyze_Contract_Only_Subprograms):
4174 Remove.
4175 * scil_ll.ads, scil_ll.adb (Contract_Only_Body_Flag,
4176 Contract_Only_Body_Nodes, Get_Contract_Only_Body,
4177 Is_Contract_Only_Body, Set_Contract_Only_Body): Remove.
4178
41792019-07-05 Pierre-Marie de Rodat <derodat@adacore.com>
4180
4181 * libgnat/a-strunb.ads: Import documentation from the RM
4182
41832019-07-05 Pierre-Marie de Rodat <derodat@adacore.com>
4184
4185 * libgnat/a-strfix.ads: Import documentation from the RM
4186
41872019-07-05 Yannick Moy <moy@adacore.com>
4188
4189 * adabkend.adb (Scan_Back_End_Switches): Accept -Og and -Ofast
4190 switches.
4191
41922019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
4193
4194 * ali.adb: Relocate types Invocation_Construct_Record,
4195 Invocation_Relation_Record, and Invocation_Signature_Record to
4196 the body of ALI. Relocate tables Invocation_Constructs,
4197 Invocation_Relations, and Invocation_Signatures to the body of
4198 ALI. Remove type Body_Placement_Codes. Add new types
4199 Declaration_Placement_Codes, and
4200 Invocation_Graph_Encoding_Codes. Update the literals of type
4201 Invocation_Graph_Line_Codes.
4202 (Add_Invocation_Construct): Update the parameter profile. Add an
4203 invocation construct built from all attributes provided.
4204 (Add_Invocation_Relation): Update the parameter profile. Add an
4205 invocation relation built from all attributes provided.
4206 (Body_Placement): New routine.
4207 (Body_Placement_Kind_To_Code, Code_To_Body_Placement_Kind):
4208 Removed.
4209 (Code_To_Declaration_Placement_Kind,
4210 Code_To_Invocation_Graph_Encoding_Kind, Column,
4211 Declaration_Placement_Kind_To_Code, Extra,
4212 For_Each_Invocation_Construct, For_Each_Invocation_Relation,
4213 Invocation_Graph_Encoding,
4214 Invocation_Graph_Encoding_Kind_To_Code, Invoker, Kind, Line,
4215 Locations, Name): New routine.
4216 (Scan_Invocation_Construct_Line): Reimplement the scanning
4217 mechanism.
4218 (Scan_Invocation_Graph_Attributes_Line): New routine.
4219 (Scan_Invocation_Graph_Line): Use a case statement to dispatch.
4220 (Scan_Invocation_Relation_Line): Reimplement the scanning
4221 mechanism.
4222 (Scope): New routine.
4223 (Set_Invocation_Graph_Encoding, Signature, Spec_Placement,
4224 Target): New routine.
4225 * ali.ads: Add new type Invocation_Graph_Encoding_Kind. Add
4226 component Invocation_Graph_Encoding to type Unit_Record.
4227 Relocate various types and data structures to the body of ALI.
4228 (Add_Invocation_Construct, Add_Invocation_Relation): Update the
4229 parameter profile.
4230 (Body_Placement): New routine.
4231 (Body_Placement_Kind_To_Code, Code_To_Body_Placement_Kind):
4232 Removed.
4233 (Code_To_Declaration_Placement_Kind,
4234 Code_To_Invocation_Graph_Encoding_Kind, Column,
4235 Declaration_Placement_Kind_To_Code, Extra,
4236 For_Each_Invocation_Construct, For_Each_Invocation_Relation,
4237 Invocation_Graph_Encoding,
4238 Invocation_Graph_Encoding_Kind_To_Code, Invoker, Kind, Line,
4239 Locations, Name, Scope, Set_Invocation_Graph_Encoding,
4240 Signature, Spec_Placement, Target): New routine.
4241 * bindo.adb: Add with clause for Binde. Add with and use
4242 clauses for Debug. Update the documentation. Add new switches.
4243 (Find_Elaboration_Order): Dispatch to the proper elaboration
4244 mechanism.
4245 * bindo-augmentors.adb:
4246 Remove with and use clauses for GNAT and GNAT.Sets. Remove
4247 membership set VS. Update the parameter profiles of most
4248 routines to use better parameter names. Update the
4249 implementation of most routine to use the new parameter names.
4250 Remove various redundant assertions.
4251 * bindo-builders.adb: Use better names for instantiated data
4252 structures. Update all references to these names. Update the
4253 parameter profiles of most routines to use better parameter
4254 names. Update the implementation of most routine to use the new
4255 parameter names.
4256 (Build_Library_Graph): Update the parameter profile. Update the
4257 call to Create.
4258 (Create_Vertex): Reimplemented.
4259 (Declaration_Placement_Vertex): New routine.
4260 * bindo-builders.ads (Build_Library_Graph): Update the parameter
4261 profile and comment on usage.
4262 * bindo-diagnostics.adb: Almost a new unit.
4263 * bindo-diagnostics.ads: Add a use clause for
4264 Bindo.Graphs.Invocation_Graphs. Remove package
4265 Cycle_Diagnostics.
4266 (Diagnose_Circularities): New routine.
4267 * bindo-elaborators.adb: Remove the with and use clauses for
4268 Binderr and GNAT.Sets. Remove the use clause for
4269 Bindo.Diagnostics.Cycle_Diagnostics. Remove membership set VS.
4270 Update the parameter profiles of most routines to use better
4271 parameter names. Update the implementation of most routine to
4272 use the new parameter names. (Elaborate_Units_Common): Update
4273 the parameter profile. Pass an infication to the library graph
4274 builder whether the dynamic model is in effect.
4275 (Elaborate_Units_Dynamic, Elaborate_Units_Static): Use
4276 Diagnose_Circularities to provide diagnostics.
4277 (Update_Successor): Use routine In_Same_Component to determine
4278 whether the predecessor and successor reside in different
4279 components.
4280 * bindo-graphs.adb: Add with and use clauses for Butil, Debug,
4281 Output, and Bindo.Writers. Remove with and use clauses for
4282 GNAT.Lists. Update the parameter profiles of most routines to
4283 use better parameter names. Update the implementation of most
4284 routine to use the new parameter names. Remove various
4285 redundant assertions. Remove doubly linked list EL. Add new
4286 type Precedence_Kind.
4287 (Add_Cycle): New routine.
4288 (Add_Vertex): Update the parameter profile. Update the creation
4289 of vertex attributes.
4290 (Add_Vertex_And_Complement, Body_Vertex, Column,
4291 Complementary_Vertex, Copy_Cycle_Path, Cycle_Kind_Of): New
4292 routines.
4293 (Destroy_Invocation_Graph_Edge, Destroy_Library_Graph_Cycle,
4294 Destroy_Library_Graph_Edge, Extra, File_Name,
4295 Find_All_Cycles_Through_Vertex, Find_All_Cycles_With_Edge,
4296 Find_Cycles, Find_First_Lower_Precedence_Cycle,
4297 Get_LGC_Attributes, Has_Next, Hash_Library_Graph_Cycle,
4298 Hash_Library_Graph_Cycle_Attributes, Highest_Precedence_Cycle,
4299 Highest_Precedence_Edge, In_Same_Component, Insert_And_Sort,
4300 Invocation_Edge_Count, Invocation_Graph_Encoding,
4301 Is_Cycle_Initiating_Edge, Is_Cyclic_Edge,
4302 Is_Cyclic_Elaborate_All_Edge, Is_Cyclic_Elaborate_Body_Edge,
4303 Is_Cyclic_Elaborate_Edge, Is_Cyclic_Forced_Edge,
4304 Is_Cyclic_Invocation_Edge, Is_Cyclic_With_Edge,
4305 Is_Dynamically_Elaborated, Is_Elaborate_All_Edge,
4306 Is_Elaborate_Body_Edge, Is_Elaborate_Edge: New routines.
4307 (Is_Existing_Predecessor_Successor_Relation): Removed.
4308 (Is_Forced_Edge, Is_Invocation_Edge, Is_Recorded_Cycle,
4309 Is_Recorded_Edge, Is_With_Edge, Iterate_Edges_Of_Cycle, Kind,
4310 Length): New routine.
4311 (Lib_Vertex): Removed.
4312 (Line, Links_Vertices_In_Same_Component,
4313 Maximum_Invocation_Edge_Count, Next, Normalize_And_Add_Cycle,
4314 Normalize_Cycle_Path, Number_Of_Cycles, Path, Precedence,
4315 Remove_Vertex_And_Complement, Sequence_Next_Cycle): New routines.
4316 (Sequence_Next_IGE_Id): Renamed to Sequence_Next_Edge.
4317 (Sequence_Next_IGV_Id): Renamed to Sequence_Next_Vertex.
4318 (Sequence_Next_LGE_Id): Renamed to Sequence_Next_Edge.
4319 (Sequence_Next_LGV_Id): Renamed to Sequence_Next_Vertex.
4320 (Set_Is_Existing_Predecessor_Successor_Relation): Removed.
4321 (Set_Is_Recorded_Cycle, Set_Is_Recorded_Edge,
4322 Set_LGC_Attributes, Spec_Vertex, Trace_Cycle, Trace_Edge,
4323 Trace_Eol, Trace_Vertex): New routines.
4324 * bindo-graphs.ads: Add with and use clauses for Types and
4325 GNAT.Lists. Update the parameter profiles of most routines to
4326 use better parameter names. Update the implementation of most
4327 routine to use the new parameter names. Add the new
4328 instantiated data structures IGE_Lists, IGV_Sets, LGC_Lists,
4329 LGE_Lists, LGE_Sets, LGV_Sets, and RC_Sets. Add new type
4330 Library_Graph_Cycle_Id along with an empty and initial value.
4331 Remove component Lib_Vertex and add new components Body_Vertex
4332 and Spec_Vertex to type Invocation_Graph_Vertex_Attributes. Add
4333 new type Library_Graph_Cycle_Kind. Add new iterators
4334 All_Cycle_Iterator and Edges_Of_Cycle_Iterator. Add new type
4335 Library_Graph_Cycle_Attributes. Add new components
4336 Cycle_Attributes, Cycles, and Dynamically_Elaborated to type
4337 Library_Graph_Attributes.
4338 (Body_Vertex, Column, Destroy_Invocation_Graph_Edge,
4339 Destroy_Library_Graph_Cycle_Attributes,
4340 Destroy_Library_Graph_Edge, Extra, File_Name, Find_Cycles,
4341 Has_Elaborate_All_Cycle, Has_Next, Hash_Library_Graph_Cycle,
4342 Hash_Library_Graph_Cycle_Attributes, Highest_Precedence_Cycle,
4343 In_Same_Component, Invocation_Edge_Count,
4344 Invocation_Graph_Encoding, Is_Dynamically_Elaborated,
4345 Is_Elaborate_All_Edge, Is_Elaborate_Body_Edge,
4346 Is_Elaborate_Edge, Is_Forced_Edge, Is_Invocation_Edge,
4347 Is_With_Edge, Iterate_All_Cycles, Iterate_Edges_Of_Cycle, Kind):
4348 New routines.
4349 (Length, Lib_Vertex, (Line, Next, Number_Of_Cycles, Present,
4350 Same_Library_Graph_Cycle_Attributes, Spec_Vertex): New routines.
4351 * bindo-units.adb (File_Name, Invocation_Graph_Encoding): New
4352 routines.
4353 * bindo-units.ads: Add new instantiated data structure
4354 Unit_Sets.
4355 (File_Name, Invocation_Graph_Encoding): New routine.
4356 * bindo-validators.adb: Remove with and use clauses for GNAT and
4357 GNAT.Sets. Remove membership set US. Update the parameter
4358 profiles of most routines to use better parameter names. Update
4359 the implementation of most routine to use the new parameter
4360 names.
4361 (Validate_Cycle, Validate_Cycle_Path, Validate_Cycles,
4362 Validate_Invocation_Graph_Vertex): Remove the validation of
4363 component Lib_Vertex. Add the validation of components
4364 Body_Vertex and Spec_Vertex.
4365 (Write_Error): New routine.
4366 * bindo-validators.ads (Validate_Cycles): New routine.
4367 * bindo-writers.adb: Update the parameter profiles of most
4368 routines to use better parameter names. Update the
4369 implementation of most routine to use the new parameter names.
4370 (Write_Cycle, Write_Cyclic_Edge, Write_Cycles): New routines.
4371 (Write_Invocation_Graph_Vertex): Remove the output of component
4372 Lib_Vertex. Add the output of components Body_Vertex and
4373 Spec_Vertex.
4374 * bindo-writers.ads (Write_Cycles): New routine.
4375 * debug.adb: Use binder switches -d_C and -d_P, add
4376 documentation on their usage.
4377 * gnatbind.adb: Remove with and use clauses for Binde. Delegate
4378 the choice of elaboration mechanism to Bindo.
4379 * lib-writ.adb (Column, Extra, Invoker, Kind, Line, Locations,
4380 Name, Placement, Scope, Signature, Target): Removed.
4381 (Write_Invocation_Graph): Moved at the top level.
4382 (Write_Invocation_Graph_Attributes): New routine.
4383 (Write_Invocation_Relation, Write_Invocation_Signature): Moved
4384 at the top level.
4385 * lib-writ.ads: Add a documentation section on invocation graph
4386 attributes.
4387 * sem_elab.adb (Body_Placement_Of): New routine.
4388 (Declare_Invocation_Construct): Update the call to
4389 Add_Invocation_Construct.
4390 (Declaration_Placement_Of_Node): New routine.
4391 (Get_Invocation_Attributes): Correct the retrieval of the
4392 enclosing subprogram where the postcondition procedure lives.
4393 (Placement_Of, Placement_Of_Node): Removed.
4394 (Record_Invocation_Graph): Record the encoding format used.
4395 (Record_Invocation_Graph_Encoding): New routine.
4396 (Record_Invocation_Relation): Update the call to
4397 Add_Invocation_Relation.
4398 (Spec_Placement_Of): Removed.
4399 * libgnat/g-lists.ads, libgnat/g-lists.adb (Equal): New routine.
4400
44012019-07-05 Ed Schonberg <schonberg@adacore.com>
4402
4403 * checks.adb (Apply_Predicate_Check): Except within the
4404 subprogram body that defines the formal, do not apply predicate
4405 check on a formal IN parameter: such a check is redundant and
4406 its expansion can lead to out-of-scope references when it is
4407 originates in a function call in a precondition,
4408
44092019-07-05 Yannick Moy <moy@adacore.com>
4410
4411 * sem_res.adb (Resolve_Call): Cannot inline in quantified
4412 expressions.
4413 * sem_util.adb, sem_util.ads (In_Quantified_Expression): New
4414 function.
4415
44162019-07-05 Bob Duff <duff@adacore.com>
4417
4418 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
4419 Fix typo.
4420 * gnat_rm.texi: Regenerate.
4421
44222019-07-05 Bob Duff <duff@adacore.com>
4423
4424 * exp_attr.adb (Input): Take the No_Stream_Optimizations
4425 restriction into account.
4426
44272019-07-05 Claire Dross <dross@adacore.com>
4428
4429 * libgnat/a-cofove.ads, libgnat/a-cofove.adb: Definite formal
4430 vectors are now always bounded so that they do not need to be
4431 limited anymore.
4432
44332019-07-05 Dmitriy Anisimkov <anisimko@adacore.com>
4434
4435 * libgnat/g-traceb.ads, libgnat/g-traceb.adb (Call_Chain): New
4436 function.
4437
44382019-07-04 James Clarke <jrtc27@debian.org>
4439
4440 * libgnarl/s-osinte__kfreebsd-gnu.ads (clockid_t): Make type
4441 definition public.
4442 (CLOCK_REALTIME): Make value public.
4443
44442019-07-04 Javier Miranda <miranda@adacore.com>
4445
4446 * exp_tss.adb (Init_Proc): Adding missing support for access to
4447 subprograms and access to protected subprograms of non-default
4448 C++ constructors.
4449
44502019-07-04 Eric Botcazou <ebotcazou@adacore.com>
4451
4452 * gnat1drv.adb (Adjust_Global_Switches): Use proper interface to
4453 set the validity settings in CodePeer mode.
4454 * par-load.adb (Load): Remove all code dealing with validity
4455 settings.
4456 * validsw.ads (Validity_Check_Copies): Alphabetize.
4457 * validsw.adb (Reset_Validity_Check_Options): Set all options to
4458 off.
4459 (Save_Validity_Check_Options): Save all options.
4460
44612019-07-04 Hristian Kirtchev <kirtchev@adacore.com>
4462
4463 * exp_ch3.adb, exp_ch4.adb, exp_ch4.ads, exp_ch5.adb,
4464 exp_ch7.adb, exp_ch9.adb, exp_ch11.adb, exp_unst.adb,
4465 rtsfind.ads, sem_attr.adb, sem_ch10.adb, sem_ch12.adb,
4466 sem_ch13.adb, sem_dim.adb, sem_disp.adb, xref_lib.adb: Minor
4467 reformatting.
4468
44692019-07-04 Joffrey Huguet <huguet@adacore.com>
4470
4471 * libgnarl/a-taside.ads: Add assertion policy to ignore
4472 preconditions.
4473 (Abort_Task, Is_Terminated, Is_Callable): Add preconditions.
4474
44752019-07-04 Eric Botcazou <ebotcazou@adacore.com>
4476
4477 * doc/gnat_rm/implementation_defined_pragmas.rst: Fix
4478 capitalization and parenthesis glitches.
4479 * gnat_rm.texi: Regenerate.
4480
44812019-07-04 Ed Schonberg <schonberg@adacore.com>
4482
4483 * sem_ch10.adb (Remove_Context_Clauses): Handle properly the
4484 removal of a limited_with_clause which appears in the library
4485 unit oF the main unit, when some other unit in the context has a
4486 regular with_clause on the same unit, to prevent spurious
4487 visibility errors in the subsequent analysis of pending instance
4488 bodies.
4489
44902019-07-04 Hristian Kirtchev <kirtchev@adacore.com>
4491
4492 * sem_elab.adb: Add new type Elaboration_Phase_Status along with
4493 a global to keep track of the elaboration phase status.
4494 Initialize all internal data structures to Nil for services
4495 Elaborated_Units, Internal_Representation, and Scenario_Storage.
4496 (Build_Call_Marker): Do not create a call marker when the
4497 elaboration phase is not active.
4498 (Build_Variable_Reference_Marker): Do not create a call marker
4499 when the elaboration phase is not active.
4500 (Check_Elaboration_Scenarios): Destroy all internal structures
4501 when the elaboration phase does not have to run. Do not execute
4502 when the elaboration phase is not active.
4503 (Elaboration_Phase_Active): New routine.
4504 (Finalize_All_Data_Structures): New routine.
4505 (Initialize): Initialize all internal data structures and signal
4506 that the elaboration phase has started.
4507 (Initialize_All_Data_Structures): New routine.
4508 (Initialize_Elaborated_Units): Initialize all internal data
4509 structures.
4510 (Initialize_Internal_Representation): Initialize all internal
4511 data structures.
4512 (Initialize_Scenario_Storage): Initialize all internal data
4513 structures.
4514 (Kill_Elaboration_Scenario): Do not execute when the elaboration
4515 phase is not active.
4516 (Set_Elaboration_Phase): New routine.
4517 (Update_Elaboration_Scenario): Do not execute when the
4518 elaboration phase is not active.
4519
45202019-07-04 Gary Dismukes <dismukes@adacore.com>
4521
4522 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The special
4523 treatment of calling Mask_Unfrozen_Types must also be done in
4524 the case of an Ignored_Ghost_Entity, because Expander_Active is
4525 False in that case.
4526
45272019-07-04 Yannick Moy <moy@adacore.com>
4528
4529 * sem_prag.adb (Check_Library_Level_Entity): Update for new rule
4530 on SPARK_Mode.
4531
45322019-07-04 Justin Squirek <squirek@adacore.com>
4533
4534 * sem_disp.adb (Check_Controlling_Formals): Obtain the full view
4535 before type comparison.
4536
45372019-07-04 Ed Schonberg <schonberg@adacore.com>
4538
4539 * exp_ch4.ads, exp_ch4.adb (Build_Eq_Call): New visible
4540 subprogram, extracted from Expand_Composite_Equality, to handle
4541 properly the composition of equality for variant record types.
4542 * exp_ch3.adb (MAke_Eq_If): Use Build_Eq_Call for each
4543 component, to handle properly the case of a component with a
4544 user-defined equality. Revert to predefined equality if the
4545 user-defined operation is abstract, to maintain compatibility
4546 with older versions,
4547
45482019-07-04 Justin Squirek <squirek@adacore.com>
4549
4550 * exp_ch3.adb (Build_Initialization_Call): Fixup
4551 *_skip_null_excluding_check argument to handle new default.
4552 (Init_Formals): Make *_skip_null_excluding_check formal default
4553 to False
4554 * exp_ch4.adb (Expand_N_Allocator): Add comment to note heavy
4555 code duplication
4556
45572019-07-04 Bob Duff <duff@adacore.com>
4558
4559 * sem_ch3.adb (Access_Definition): Do not create a master unless
4560 Tasking_Allowed. Otherwise, this fails on restricted runtimes.
4561
45622019-07-04 Hristian Kirtchev <kirtchev@adacore.com>
4563
4564 * sem_util.adb (Propagate_DIC_Attributes): Do not propagate the
4565 Default_Initial_Condition attributes to an incomplete type.
4566
45672019-07-04 Ed Schonberg <schonberg@adacore.com>
4568
4569 * sem_attr.adb (Check_Array_Type): An array type attribute such
4570 as 'First can be applied to an unconstrained array tyope when
4571 the attribute reference appears within an aspect specification
4572 and the prefix is a current instance, given that the prefix of
4573 the attribute will become a formal of the subprogram that
4574 implements the aspect (typically a predicate check).
4575
45762019-07-04 Piotr Trojanek <trojanek@adacore.com>
4577
4578 * sem_util.adb (Yields_Synchronized_Object): Fix typos in
4579 comments.
4580
45812019-07-04 Yannick Moy <moy@adacore.com>
4582
4583 * sem_util.adb (Yields_Synchronized_Object): Adapt to new SPARK
4584 rule.
4585
45862019-07-04 Yannick Moy <moy@adacore.com>
4587
4588 * sem_spark.adb (Check_Statement): Only check permission of
4589 object in extended return when it is of a deep type.
4590
45912019-07-04 Justin Squirek <squirek@adacore.com>
4592
4593 * sem_ch12.adb (Perform_Appropriate_Analysis): Added for
4594 selecting which type of analysis based on wheither the
4595 instantiation is a generic at the library-level. In which case
4596 expansion during analysis.
4597 (Preanalyze_Actuals): Modify calls to Analyze to use the new
4598 routine.
4599
46002019-07-04 Ed Schonberg <schonberg@adacore.com>
4601
4602 * exp_unst.adb: Handle conditional expressions.
4603
46042019-07-04 Yannick Moy <moy@adacore.com>
4605
4606 * sem_spark.adb (Check_Package_Spec, Check_Package_Body): Only
4607 analyze parts of the code marked in SPARK.
4608
46092019-07-04 Hristian Kirtchev <kirtchev@adacore.com>
4610
4611 * erroutc.adb, exp_aggr.adb, inline.adb, opt.adb, sem_ch3.adb:
4612 Minor reformatting.
4613
46142019-07-04 Yannick Moy <moy@adacore.com>
4615
4616 * sem_spark.adb (Explanation, Get_Expl): New functions to get
4617 the explanation for a permission mismatch.
4618 (Perm_Error, Perm_Mismatch, Perm_Error_Loop_Exit): Take
4619 explanation into account for issuing a more precise error
4620 message.
4621 (Set_Perm_Prefixes, Set_Perm_Extensions,
4622 Set_Perm_Extensions_Move): Pass suitable argument for the
4623 explanation node.
4624
46252019-07-04 Arnaud Charlet <charlet@adacore.com>
4626
4627 * exp_aggr.adb (In_Place_Assign_OK): Moved to top level and add
4628 support for record aggregates.
4629 (Component_Check): Use Is_CCG_Supported_Aggregate instead of a
4630 similar local predicate.
4631 (Convert_To_Assignments): Take advantage of In_Place_Assign_OK
4632 predicate when possible.
4633 (Is_CCG_Supported_Aggregate): Return False for records with
4634 representation clauses and fix the logic for dealing with nested
4635 aggregates.
4636
46372019-07-04 Piotr Trojanek <trojanek@adacore.com>
4638
4639 * opt.adb (Set_Config_Switches): Keep assertions policy as
4640 enabled when analysing internal units in GNATprove mode.
4641
46422019-07-04 Arnaud Charlet <charlet@adacore.com>
4643
4644 * exp_ch4.adb (Expand_Short_Circuit_Operator): Strip
4645 N_Variable_Reference_Marker when checking for the presence of
4646 actions.
4647
46482019-07-04 Arnaud Charlet <charlet@adacore.com>
4649
4650 * exp_aggr.adb (Check_Component): Take into account type
4651 conversions.
4652
46532019-07-04 Dmitriy Anisimkov <anisimko@adacore.com>
4654
4655 * doc/gnat_ugn/platform_specific_information.rst: Document
4656 Windows socket timeout particularity.
4657 * gnat_ugn.texi: Regenerate.
4658 * gsocket.h: Include versionhelpers.h.
4659 * socket.c (__gnat_minus_500ms): New function.
4660 * libgnat/g-sothco.ads (Minus_500ms_Windows_Timeout): New
4661 imported function.
4662 * libgnat/g-socket.adb (Set_Socket_Option): Refactor to remove
4663 500ms from the requested timeout only on old Windows version.
4664
46652019-07-04 Thomas Quinot <quinot@adacore.com>
4666
4667 * get_scos.adb: Remove bogus, dead code.
4668
46692019-07-04 Ed Schonberg <schonberg@adacore.com>
4670
4671 * sem_dim.adb (Analyze_Dimension_Array_Aggregate): If the
4672 component is an entity name, its dimensions are those of its
4673 type.
4674
46752019-07-03 Bob Duff <duff@adacore.com>
4676
4677 * doc/gnat_ugn/gnat_utility_programs.rst: Document new flags in
4678 GNATpp.
4679
46802019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
4681
4682 * binde.adb: Remove with clause for System.OS_Lib.
4683 (Force_Elab_Order): Refactor the majority of the code in Butil.
4684 Use the new forced units iterator to obtain unit names.
4685 * bindo-builders.adb: Add with and use clauses for Binderr,
4686 Butil, Opt, Output, Types, GNAT, and GNAT.Dynamic_HTables. Add
4687 a hash table which maps units to line number in the forced
4688 elaboration order file.
4689 (Add_Unit): New routine.
4690 (Build_Library_Graph): Create forced edges between pairs of
4691 units listed in the forced elaboration order file.
4692 (Create_Forced_Edge, Create_Forced_Edges, Destroy_Line_Number,
4693 Duplicate_Unit_Error, Hash_Unit, Internal_Unit_Info,
4694 Is_Duplicate_Unit, Missing_Unit_Info): New routines.
4695 * bindo-graphs.adb (Is_Internal_Unit, Is_Predefined_Unit):
4696 Refactor some of the behavior to Bindo-Units.
4697 * bindo-graphs.ads: Enable the enumeration literal for forced
4698 edges.
4699 * bindo-units.adb, bindo-units.ads (Is_Internal_Unit,
4700 Is_Predefined_Unit): New routines.
4701 * butil.adb: Add with and use clauses for Opt, GNAT, and
4702 System.OS_Lib. Add with clause for Unchecked_Deallocation.
4703 (Has_Next, Iterate_Forced_Units, Next, Parse_Next_Unit_Name,
4704 Read_Forced_Elab_Order_File): New routines.
4705 * butil.ads: Add with and use clauses for Types. Add new
4706 iterator over the units listed in the forced elaboration order
4707 file.
4708 (Has_Next, Iterate_Forced_Units, Next): New routine.
4709 * namet.adb, namet.ads (Present): New routine.
4710
47112019-07-03 Bob Duff <duff@adacore.com>
4712
4713 * sem_ch3.adb (Access_Definition): The code was creating a
4714 master in the case where the designated type is a class-wide
4715 interface type. Create a master in the noninterface case as
4716 well. That is, create a master for all limited class-wide types.
4717
47182019-07-03 Yannick Moy <moy@adacore.com>
4719
4720 * erroutc.adb (Sloc_In_Range): New function to determine whether
4721 the range of a pragma Warnings covers a location, taking
4722 instantiations into account.
4723
47242019-07-03 Johannes Kanig <kanig@adacore.com>
4725
4726 * osint.ads, osint.adb (Get_First_Main_File_Name): New routine
4727 to access the first file provided on the command line.
4728
47292019-07-03 Ed Schonberg <schonberg@adacore.com>
4730
4731 * inline.adb (Process_Formals_In_Aspects): New procedure within
4732 Expand_Inlined_Call, to perform a replacement of references to
4733 formals that appear in aspect specifications within the body
4734 being inlined.
4735
47362019-07-03 Justin Squirek <squirek@adacore.com>
4737
4738 * sem_ch8.adb (Analyze_Object_Renaming): Add call to search for
4739 the appropriate actual subtype of the object renaming being
4740 analyzed.
4741 (Check_Constrained_Object): Minor cleanup.
4742
47432019-07-03 Yannick Moy <moy@adacore.com>
4744
4745 * sem_spark.adb (Get_Observed_Or_Borrowed_Expr): New function to
4746 return go through traversal function call.
4747 (Check_Type): Consistently use underlying type.
4748 (Get_Perm): Adapt for case of elaboration code where variables
4749 are not declared in the environment. Remove incorrect handling
4750 of borrow and observe.
4751
47522019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
4753
4754 * inline.adb (Build_Return_Object_Formal): New routine.
4755 (Can_Split_Unconstrained_Function): Code clean up.
4756 (Copy_Formals,Copy_Return_Object): New routines.
4757 (Split_Unconstrained_Function): Code clean up and refactoring.
4758
47592019-07-03 Gary Dismukes <dismukes@adacore.com>
4760
4761 * bindo-augmentors.adb, bindo-augmentors.ads,
4762 bindo-builders.ads, bindo-elaborators.adb, sem_ch12.adb,
4763 sem_ch13.adb, sem_spark.adb, sinfo.ads: Minor editorial
4764 corrections and reformatting.
4765
47662019-07-03 Bob Duff <duff@adacore.com>
4767
4768 * sem_warn.adb (Check_Infinite_Loop_Warning): Avoid the warning
4769 if an Iterator_Specification is present.
4770
47712019-07-03 Bob Duff <duff@adacore.com>
4772
4773 * doc/gnat_ugn/gnat_utility_programs.rst: Document default
4774 new-line behavior.
4775
47762019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
4777
4778 * ali.adb: Add with and use clauses for GNAT,
4779 GNAT.Dynamic_HTables, and Snames. Add a map from invocation
4780 signature records to invocation signature ids. Add various
4781 encodings of invocation-related attributes. Sort and update
4782 table Known_ALI_Lines.
4783 (Add_Invocation_Construct, Add_Invocation_Relation,
4784 Body_Placement_Kind_To_Code, Code_To_Body_Placement_Kind,
4785 Code_To_Invocation_Construct_Kind, Code_To_Invocation_Kind,
4786 Code_To_Invocation_Graph_Line_Kind, Destroy, Hash): New
4787 routines.
4788 (Initialize_ALI): Sort the initialization sequence. Add
4789 initialization for all invocation-related tables.
4790 (Invocation_Construct_Kind_To_Code,
4791 Invocation_Graph_Line_Kind_To_Code, Invocation_Kind_To_Code,
4792 Invocation_Signature_Of, Present): New routines.
4793 (Scan_ALI): Add the default values for invocation-related ids.
4794 Scan invocation graph lines.
4795 (Scan_Invocation_Graph_Line): New routine.
4796 * ali.ads: Add with clause for GNAT.Dynamic_Tables. Add types
4797 for invocation constructs, relations, and signatures. Add
4798 tables for invocation constructs, relations, and signatures.
4799 Update Unit_Record to capture invocation-related ids. Relocate
4800 table Unit_Id_Tables and subtypes Unit_Id_Table, Unit_Id_Array
4801 from Binde.
4802 (Add_Invocation_Construct, Add_Invocation_Relation,
4803 Body_Placement_Kind_To_Code, Code_To_Body_Placement_Kind,
4804 Code_To_Invocation_Construct_Kind, Code_To_Invocation_Kind,
4805 Code_To_Invocation_Graph_Line_Kind,
4806 Invocation_Construct_Kind_To_Code,
4807 Invocation_Graph_Line_Kind_To_Code, Invocation_Kind_To_Code,
4808 Invocation_Signature_Of, Present): New routines.
4809 * binde.adb: Add with and use clause for Types. Add use clause
4810 for ALI.Unit_Id_Tables;
4811 * binde.ads: Relocate table Unit_Id_Tables and subtypes
4812 Unit_Id_Table, Unit_Id_Array to ALI.
4813 * bindgen.adb: Remove with and use clause for ALI.
4814 * bindgen.ads: Remove with and use clause for Binde. Add with
4815 and use clause for ALI.
4816 * bindo.adb, bindo.ads, bindo-augmentors.adb,
4817 bindo-augmentors.ads, bindo-builders.adb, bindo-builders.ads,
4818 bindo-diagnostics.adb, bindo-diagnostics.ads,
4819 bindo-elaborators.adb, bindo-elaborators.ads, bindo-graphs.adb,
4820 bindo-graphs.ads, bindo-units.adb, bindo-units.ads,
4821 bindo-validators.adb, bindo-validators.ads, bindo-writers.adb,
4822 bindo-writers.ads: New units.
4823 * debug.adb: Use and describe GNAT debug switches -gnatd_F and
4824 -gnatd_G. Add GNATbind debug switches in the ranges dA .. dZ,
4825 d.a .. d.z, d.A .. d.Z, d.1 .. d.9, d_a .. d_z, d_A .. d_Z, and
4826 d_1 .. d_9. Use and describe GNATbind debug switches -d_A,
4827 -d_I, -d_L, -d_N, -d_O, -d_T, and -d_V.
4828 * exp_util.adb, exp_util.ads (Exceptions_OK): Relocate to
4829 Sem_Util.
4830 * gnatbind.adb: Add with and use clause for Bindo. Use the new
4831 Bindo elaboration order only when -d_N is in effect.
4832 * lib-writ.adb
4833 (Column, Extra, Invoker, Kind, Line, Locations, Name, Placement,
4834 Scope, Signature, Target): New routines.
4835 (Write_ALI): Output all invocation-related data.
4836 (Write_Invocation_Graph): New routine.
4837 * lib-writ.ads: Document the invocation graph ALI line.
4838 * namet.adb, namet.ads (Present): New routines.
4839 * sem_ch8.adb (Find_Direct_Name): Capture the status of
4840 elaboration checks and warnings of an identifier.
4841 (Find_Expanded_Name): Capture the status of elaboration checks
4842 and warnings of an expanded name.
4843 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Ensure
4844 that invocation graph-related data within the body of the main
4845 unit is encoded in the ALI file.
4846 (Analyze_Generic_Subprogram_Declaration): Ensure that invocation
4847 graph-related data within the body of the main unit is encoded
4848 in the ALI file.
4849 (Analyze_Package_Instantiation): Perform minimal decoration of
4850 the instance entity.
4851 (Analyze_Subprogram_Instantiation): Perform minimal decoration
4852 of the instance entity.
4853 * sem_elab.adb: Perform heavy refactoring of all code. The unit
4854 is now split into "services" which specialize in one area of ABE
4855 checks. Add processing in order to capture invocation-graph
4856 related attributes of the main unit, and encode them in the ALI
4857 file. The Processing phase can now operate in multiple modes,
4858 all described by type Processing_Kind. Scenarios and targets
4859 are now distinct at the higher level, and carry their own
4860 representations. This eliminates the need to constantly
4861 recompute their attributes, and offers the various processors a
4862 uniform interface. The various initial states of the Processing
4863 phase are now encoded using type Processing_In_State, and
4864 xxx_State constants.
4865 * sem_elab.ads: Update the literals of type
4866 Enclosing_Level_Kind. Add Inline pragmas on several routines.
4867 * sem_prag.adb (Process_Inline): Ensure that invocation
4868 graph-related data within the body of the main unit is encoded
4869 in the ALI file.
4870 * sem_util.adb (Enclosing_Generic_Body, Enclosing_Generic_Unit):
4871 Code clean up.
4872 (Exceptions_OK): Relocated from Sem_Util.
4873 (Mark_Save_Invocation_Graph_Of_Body): New routine.
4874 * sem_util.ads (Exceptions_OK): Relocated from Sem_Util.
4875 (Mark_Save_Invocation_Graph_Of_Body): New routine.
4876 * sinfo.adb (Is_Elaboration_Checks_OK_Node): Now applicable to
4877 N_Variable_Reference_Marker.
4878 (Is_Elaboration_Warnings_OK_Node): Now applicable to
4879 N_Expanded_Name, N_Identifier, N_Variable_Reference_Marker.
4880 (Is_Read): Use Flag4.
4881 (Is_SPARK_Mode_On_Node): New applicable to
4882 N_Variable_Reference_Marker.
4883 (Is_Write): Use Flag5.
4884 (Save_Invocation_Graph_Of_Body): New routine.
4885 (Set_Is_Elaboration_Checks_OK_Node): Now applicable to
4886 N_Variable_Reference_Marker.
4887 (Set_Is_Elaboration_Warnings_OK_Node): Now applicable to
4888 N_Expanded_Name, N_Identifier, N_Variable_Reference_Marker.
4889 (Set_Is_SPARK_Mode_On_Node): New applicable to
4890 N_Variable_Reference_Marker.
4891 (Set_Save_Invocation_Graph_Of_Body): New routine.
4892 * sinfo.ads: Update the documentation of attributes
4893 Is_Elaboration_Checks_OK_Node, Is_Elaboration_Warnings_OK_Node,
4894 Is_SPARK_Mode_On_Node. Update the flag usage of attributes
4895 Is_Read, Is_Write. Add attribute Save_Invocation_Graph_Of_Body
4896 and update its occurrence in nodes.
4897 (Save_Invocation_Graph_Of_Body): New routine along with pragma
4898 Inline.
4899 (Set_Save_Invocation_Graph_Of_Body): New routine along with
4900 pragma Inline.
4901 * switch-b.adb (Scan_Binder_Switches): Refactor the scanning of
4902 debug switches.
4903 (Scan_Debug_Switches): New routine.
4904 * libgnat/g-dynhta.adb, libgnat/g-dynhta.ads (Contains): New routine.
4905 * libgnat/g-graphs.adb (Associate_Vertices): Update the use of
4906 Component_Vertex_Iterator.
4907 (Contains_Component, Contains_Edge, Contains_Vertex, Has_Next):
4908 Reimplemented.
4909 (Iterate_Component_Vertices): New routine.
4910 (Iterate_Vertices): Removed.
4911 (Next): Update the parameter profile.
4912 (Number_Of_Component_Vertices, Number_Of_Outgoing_Edges): New
4913 routines.
4914 * libgnat/g-graphs.ads: Update the initialization of
4915 No_Component. Add type Component_Vertex_Iterator. Remove type
4916 Vertex_Iterator.
4917 (Has_Next): Add new versions and remove old ones.
4918 (Iterate_Component_Vertices): New routine.
4919 (Iterate_Vertices): Removed.
4920 (Next): Add new versions and remove old ones.
4921 (Number_Of_Component_Vertices, Number_Of_Outgoing_Edges): New
4922 routines.
4923 * libgnat/g-sets.adb (Contains): Reimplemented.
4924 * gcc-interface/Make-lang.in (GNATBIND_OBJS): Add
4925 GNAT.Dynamic_HTables, GNAT.Graphs and Bindo units.
4926 * rtsfind.ads: Remove extra space.
4927
49282019-07-03 Yannick Moy <moy@adacore.com>
4929
4930 * sem_spark.adb: Add support for locally borrowing and observing
4931 a path.
4932 (Get_Root_Object): Add parameter Through_Traversal to denote
4933 when we are interesting in getting to the traversed parameter.
4934 (Is_Prefix_Or_Almost): New function to support detection of
4935 illegal access to borrowed or observed paths.
4936 (Check_Pragma): Add analysis of assertion pragmas.
4937
49382019-07-03 Ed Schonberg <schonberg@adacore.com>
4939
4940 * sem_ch13.adb (Build_Predicate_Functions): In a generic context
4941 we do not build the bodies of predicate fuctions, but the
4942 expression in a static predicate must be elaborated to allow
4943 case coverage checking within the generic unit.
4944 (Build_Discrete_Static_Predicate): In a generic context, return
4945 without building function body once the
4946 Static_Discrete_Predicate expression for the type has been
4947 constructed.
4948
49492019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
4950
4951 * bindgen.adb, inline.adb, layout.adb, sem_ch12.adb,
4952 sem_ch13.adb, sem_ch7.adb, styleg.adb: Minor reformatting.
4953
49542019-07-03 Bob Duff <duff@adacore.com>
4955
4956 * par-ch3.adb (P_Defining_Identifier): Call
4957 Check_Defining_Identifier_Casing.
4958 * style.ads, styleg.ads, styleg.adb
4959 (Check_Defining_Identifier_Casing): New procedure to check for
4960 mixed-case defining identifiers.
4961 * stylesw.ads, stylesw.adb (Style_Check_Mixed_Case_Decls): New
4962 flag for checking for mixed-case defining identifiers.
4963 * doc/gnat_ugn/building_executable_programs_with_gnat.rst:
4964 Document new feature.
4965 * gnat_ugn.texi: Regenerate.
4966
49672019-07-03 Eric Botcazou <ebotcazou@adacore.com>
4968
4969 * doc/gnat_ugn/building_executable_programs_with_gnat.rst
4970 (Warning message control): Document that -gnatw.z/Z apply to
4971 array types.
4972 * freeze.adb (Freeze_Entity): Give -gnatw.z warning for array
4973 types as well, but not if the specified alignment is the minimum
4974 one.
4975 * gnat_ugn.texi: Regenerate.
4976
49772019-07-03 Bob Duff <duff@adacore.com>
4978
4979 * einfo.ads, exp_util.adb, layout.ads, sinfo.ads: Spell "laid"
4980 correctly.
4981
49822019-07-03 Ed Schonberg <schonberg@adacore.com>
4983
4984 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): No error
4985 message on attribute applied to a renaming when the renamed
4986 object is an aggregate (from code reading).
4987 (Check_Aspect_At_End_Of_Declarations): In a generic context
4988 where freeze nodes are not generated, the original expression
4989 for an aspect may need to be analyzed to precent spurious
4990 conformance errors when compared with the expression that is
4991 anakyzed at the end of the current declarative list.
4992
49932019-07-03 Eric Botcazou <ebotcazou@adacore.com>
4994
4995 * layout.adb (Layout_Type): Do not set the component size of an
4996 array with a scalar component if the component type is
4997 overaligned.
4998
49992019-07-03 Ed Schonberg <schonberg@adacore.com>
5000
5001 * inline.adb (Make_Loop_Labels_Unique): New procedure to modify
5002 the source code of subprograms that are inlined by the
5003 front-end, to prevent accidental duplication between loop labels
5004 in the inlined code and the code surrounding the inlined call.
5005
50062019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
5007
5008 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update
5009 the section on resolving elaboration circularities to eliminate
5010 certain combinations of switches which together do not produce
5011 the desired effect and confuse users.
5012 * gnat_ugn.texi: Regenerate.
5013
50142019-07-03 Arnaud Charlet <charlet@adacore.com>
5015
5016 * bindgen.adb (Gen_Main): Disable generation of reference to
5017 Ada_Main_Program_Name for CCG.
5018 * bindusg.adb (Display): Add -G to the command-line usage for
5019 gnatbind.
5020 * opt.ads (Generate_C_Code): Update comment.
5021 * switch-b.adb (Scan_Binder_Switches): Add handling for -G.
5022
50232019-07-03 Arnaud Charlet <charlet@adacore.com>
5024
5025 * sem_ch7.adb (Has_Referencer): Do not consider inlined
5026 subprograms when generating C code, which allows us to generate
5027 static inline subprograms.
5028
50292019-07-03 Justin Squirek <squirek@adacore.com>
5030
5031 * sem_ch6.adb (Check_Conformance): Add expression checking for
5032 constant modifiers in anonymous access types (in addition to
5033 "non-null" types) so that they are considered "matching" for
5034 subsequent conformance tests.
5035
50362019-07-03 Arnaud Charlet <charlet@adacore.com>
5037
5038 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
5039 Clarify wording on No_Multiple_Elaboration.
5040 * gnat_rm.texi: Regenerate.
5041
50422019-07-03 Ed Schonberg <schonberg@adacore.com>
5043
5044 * sem_ch8.adb (Find_Selected_Component): If the prefix is the
5045 current instance of a type or subtype, complete the resolution
5046 of the name by finding the component of the type denoted by the
5047 selector name.
5048
50492019-07-03 Eric Botcazou <ebotcazou@adacore.com>
5050
5051 * doc/gnat_rm/interfacing_to_other_languages.rst (Interfacing to C):
5052 Document that boolean types with convention C now map to C99 bool.
5053 * gnat_rm.texi: Regenerate.
5054
50552019-07-03 Javier Miranda <miranda@adacore.com>
5056
5057 * exp_attr.adb (Expand_Min_Max_Attribute): Code cleanup:
5058 removing code that it is now never executed in the CCG compiler
5059 (dead code).
5060
50612019-07-02 Iain Sandoe <iain@sandoe.co.uk>
5062
5063 * libgnat/system-darwin-ppc.ads: Set Stack_Check_Probes True for
5064 PPC Darwin.
5065
50662019-07-01 Ed Schonberg <schonberg@adacore.com>
5067
5068 * sem_ch12.adb (Is_Defaulted): New predicate in
5069 Check_Formal_Package_Intance, to skip the conformance of checks
5070 on parameters of a formal package that are defaulted,
5071
50722019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
5073
5074 * checks.adb, exp_ch9.adb, exp_unst.adb, sem_ch4.adb,
5075 sem_prag.adb, sem_spark.adb: Minor reformatting.
5076
50772019-07-01 Ed Schonberg <schonberg@adacore.com>
5078
5079 * sem_attr.adb (Analyze_Attribute, case Enum_Rep): Allow prefix
5080 of attribute to be an attribute reference of a discrete type.
5081
50822019-07-01 Eric Botcazou <ebotcazou@adacore.com>
5083
5084 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Move up
5085 handling of Has_Pragma_Inline_Always and deal with
5086 Has_Pragma_No_Inline.
5087
50882019-07-01 Ed Schonberg <schonberg@adacore.com>
5089
5090 * sem_ch3.adb (Build_Derived_Record_Type): If the parent type is
5091 declared as a subtype of a private type with an inherited
5092 discriminant constraint, its generated full base appears as a
5093 record subtype, so we need to retrieve its oen base type so that
5094 the inherited constraint can be applied to it.
5095
50962019-07-01 Yannick Moy <moy@adacore.com>
5097
5098 * sem_spark.adb: Completely rework the algorithm for ownership
5099 checking, as the rules in SPARK RM have changed a lot.
5100 * sem_spark.ads: Update comments.
5101
51022019-07-01 Dmitriy Anisimkov <anisimko@adacore.com>
5103
5104 * gsocket.h (Has_Sockaddr_Len): Use the offset of sin_family offset in
5105 the sockaddr_in structure to determine the existence of length field
5106 before the sin_family.
5107
51082019-07-01 Ed Schonberg <schonberg@adacore.com>
5109
5110 * sem_prag.adb (Analyze_Pragma, case Weak_External): Pragma only
5111 applies to entities with run-time addresses, not to types.
5112
51132019-07-01 Piotr Trojanek <trojanek@adacore.com>
5114
5115 * einfo.adb, sem_ch7.adb, sem_prag.adb, sem_util.adb: Update
5116 references to the SPARK RM after the removal of Rule 7.1.4(5).
5117
51182019-07-01 Piotr Trojanek <trojanek@adacore.com>
5119
5120 * sysdep.c: Cleanup references to LynuxWorks in docs and
5121 comments.
5122
51232019-07-01 Ed Schonberg <schonberg@adacore.com>
5124
5125 * checks.adb (Insert_Valid_Check): Do not apply validity check
5126 to variable declared within a protected object that uses the
5127 Lock_Free implementation, to prevent unwarranted constant
5128 folding, because entities within such an object msut be treated
5129 as volatile.
5130
51312019-07-01 Eric Botcazou <ebotcazou@adacore.com>
5132
5133 * exp_ch9.adb (Check_Inlining): Deal with Has_Pragma_No_Inline.
5134
51352019-07-01 Ed Schonberg <schonberg@adacore.com>
5136
5137 * exp_unst.adb (Visit_Node, Check_Static_Type): Improve the
5138 handling of private and incomplete types whose full view is an
5139 access type, to detect additional uplevel references in dynamic
5140 bounds. This is relevant to N_Free_Statement among others that
5141 manipulate types whose full viww may be an access type.
5142
51432019-07-01 Pat Rogers <rogers@adacore.com>
5144
5145 * doc/gnat_rm/representation_clauses_and_pragmas.rst: Correct
5146 size indicated for R as a component of an array.
5147 * gnat_rm.texi: Regenerate.
5148
51492019-07-01 Justin Squirek <squirek@adacore.com>
5150
5151 * libgnat/s-win32.ads: Add definition for ULONG, modify
5152 OVERLAPPED type, and add appropriate pragmas.
5153
51542019-07-01 Bob Duff <duff@adacore.com>
5155
5156 * gnat1drv.adb (gnat1drv): Call Write_ALI if the main unit is
5157 ignored-ghost.
5158
51592019-07-01 Yannick Moy <moy@adacore.com>
5160
5161 * sem_ch4.adb (Operator_Check): Refine error message.
5162
51632019-07-01 Piotr Trojanek <trojanek@adacore.com>
5164
5165 * libgnat/a-calend.ads: Revert "Global => null" contracts on
5166 non-pure routines.
5167
51682019-07-01 Piotr Trojanek <trojanek@adacore.com>
5169
5170 * exp_attr.adb, libgnat/g-graphs.ads: Fix typos in comments:
5171 componant -> component.
5172
51732019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
5174
5175 * libgnat/g-graphs.adb: Use type Directed_Graph rather than
5176 Instance in various routines.
5177 * libgnat/g-graphs.ads: Change type Instance to Directed_Graph.
5178 Update various routines that mention the type.
5179
51802019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
5181
5182 * libgnat/g-sets.adb: Use type Membership_Set rathern than
5183 Instance in various routines.
5184 * libgnat/g-sets.ads: Change type Instance to Membership_Set.
5185 Update various routines that mention the type.
5186
51872019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
5188
5189 * libgnat/g-lists.adb: Use type Doubly_Linked_List rather than
5190 Instance in various routines.
5191 * libgnat/g-lists.ads: Change type Instance to
5192 Doubly_Linked_List. Update various routines that mention the
5193 type.
5194
51952019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
5196
5197 * libgnat/g-dynhta.adb: Use type Dynamic_Hash_Table rather than
5198 Instance in various routines.
5199 * libgnat/g-dynhta.ads: Change type Instance to
5200 Dynamic_Hash_Table. Update various routines that mention the
5201 type.
5202
52032019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
5204
5205 * exp_attr.adb, exp_ch7.adb, exp_unst.adb, sem_ch3.adb,
5206 sem_util.adb, uintp.adb, uintp.ads: Minor reformatting.
5207
52082019-07-01 Javier Miranda <miranda@adacore.com>
5209
5210 * exp_attr.adb (Expand_Min_Max_Attribute): Disable expansion of
5211 'Min/'Max on integer, enumeration, fixed point and floating
5212 point types since the CCG backend now provides in file
5213 standard.h routines to support it.
5214
52152019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
5216
5217 * impunit.adb: Add GNAT.Graphs to list Non_Imp_File_Names_95.
5218 * Makefile.rtl, gcc-interface/Make-lang.in: Register unit
5219 GNAT.Graphs.
5220 * libgnat/g-dynhta.adb: Various minor cleanups (use Present
5221 rather than direct comparisons).
5222 (Delete): Reimplement to use Delete_Node.
5223 (Delete_Node): New routine.
5224 (Destroy_Bucket): Invoke the provided destructor.
5225 (Present): New routines.
5226 * libgnat/g-dynhta.ads: Add new generic formal Destroy_Value.
5227 Use better names for the components of iterators.
5228 * libgnat/g-graphs.adb, libgnat/g-graphs.ads: New unit.
5229 * libgnat/g-lists.adb: Various minor cleanups (use Present
5230 rather than direct comparisons).
5231 (Delete_Node): Invoke the provided destructor.
5232 (Present): New routine.
5233 * libgnat/g-lists.ads: Add new generic formal Destroy_Element.
5234 Use better names for the components of iterators.
5235 (Present): New routine.
5236 * libgnat/g-sets.adb, libgnat/g-sets.ads (Destroy, Preset,
5237 Reset): New routines.
5238
52392019-07-01 Dmitriy Anisimkov <anisimko@adacore.com>
5240
5241 * libgnat/g-sothco.adb (Get_Address): Fix the case when AF_INET6
5242 is not defined.
5243
52442019-07-01 Ed Schonberg <schonberg@adacore.com>
5245
5246 * exp_attr.adb (Expand_Attribute_Reference, case Invalid_Value):
5247 Resolve result of call to Get_Simple_Init_Val, which may be a
5248 conversion of a literal.
5249
52502019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
5251
5252 * freeze.adb (Freeze_Expression): Remove the horrible useless
5253 name hiding of N. Insert the freeze nodes generated by the
5254 expression prior to the expression when the nearest enclosing
5255 scope is transient.
5256
52572019-07-01 Pierre-Marie de Rodat <derodat@adacore.com>
5258
5259 * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Fix
5260 formatting issues in the -gnatR section.
5261 * gnat_ugn.texi: Regenerate.
5262
52632019-06-30 Iain Sandoe <iain@sandoe.co.uk>
5264
5265 * gnatlink.adb (Link_Step): Remove duplicate -static-libgcc switches.
5266 Push -shared-libgcc explicitly, when it is the target default (unless
5267 overidden by the static flag).
5268 When the user has put an instance of shared/static-libgcc do not push
5269 a duplicate of this.
5270
52712019-06-29 Eric Botcazou <ebotcazou@adacore.com>
5272
5273 * gcc-interface/decl.c (gnat_to_gnu_entity): Beep up comment on SAVED,
5274 and tweak comment on the assertion about the scopes of Itypes. Do not
5275 skip the regular processing for Itypes that are E_Record_Subtype with
5276 a Cloned_Subtype. Get the Cloned_Subtype for every E_Record_Subtype
5277 if the type is dummy and hasn't got its own freeze node.
5278 <E_Record_Subtype>: Save again the DECL of the Cloned_Subtype, if any.
5279 <E_Access_Subtype>: Save again the DECL of the equivalent type.
5280 (Gigi_Equivalent_Type) <E_Access_Subtype>: New case.
5281
52822019-06-29 Eric Botcazou <ebotcazou@adacore.com>
5283
5284 * gcc-interface/utils.c (unchecked_convert): Tweak comment. Only skip
5285 dereferences when padding to have the same size on both sides. Do it
5286 for destination types with self-referential size too.
5287
52882019-06-29 Eric Botcazou <ebotcazou@adacore.com>
5289
5290 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: If the
5291 type requires strict alignment, then set the RM size to the type size.
5292 Rework handling of alignment and sizes of tagged types in ASIS mode.
5293 (validate_size): Rename local variable and remove special handling for
5294 strict-alignment types.
5295 * gcc-interface/utils.c (finish_record_type): Constify local variables
5296 and use properly typed constants.
5297
52982019-06-29 Eric Botcazou <ebotcazou@adacore.com>
5299
5300 * gcc-interface/decl.c (gnat_to_gnu_field): Rework error messages for
5301 fields requiring strict alignment, add explicit test on Storage_Unit
5302 for position and size, and mention type alignment for position.
5303
53042019-06-29 Eric Botcazou <ebotcazou@adacore.com>
5305
5306 * gcc-interface/trans.c (mark_visited_r): Set TYPE_SIZES_GIMPLIFIED on
5307 the main variant of a type, if any.
5308
53092019-06-29 Eric Botcazou <ebotcazou@adacore.com>
5310
5311 * gcc-interface/decl.c (set_nonaliased_component_on_array_type): Add
5312 missing guard for the presence of TYPE_CANONICAL.
5313 (set_reverse_storage_order_on_array_type): Likewise.
5314
53152019-06-29 Eric Botcazou <ebotcazou@adacore.com>
5316
5317 * gcc-interface/gigi.h (make_packable_type): Remove default value.
5318 (value_factor_p): Tweak prototype.
5319 * gcc-interface/decl.c (gnat_to_gnu_entity): Add comment.
5320 (gnat_to_gnu_component_type): Likewise.
5321 (gnat_to_gnu_field): Likewise. Fetch the position of the field earlier
5322 and simplify the condition under which the type is packed. Declare
5323 local variable is_bitfield. Pass 1 as max_align to make_packable_type
5324 if it is set to true.
5325 (copy_and_substitute_in_layout): Pass 0 to make_packable_type.
5326 * gcc-interface/utils.c (make_packable_array_type): New function.
5327 (make_packable_type): Use it to rewrite the type of array field.
5328 (maybe_pad_type): Pass align parameter to make_packable_type.
5329 (create_field_decl): Minor tweaks.
5330 (value_factor_p): Assert that FACTOR is a power of 2 and replace the
5331 modulo computation by a masking operation.
5332
53332019-06-25 Eric Botcazou <ebotcazou@adacore.com>
5334
5335 * gcc-interface/decl.c (gnat_to_gnu_entity): Remove superfluous test
5336 in previous change.
5337 * gcc-interface/gigi.h (maybe_character_type): Fix formatting.
5338 (maybe_character_value): Likewise.
5339
53402019-06-24 Jan Hubicka <jh@suse.cz>
5341
5342 * gcc-interface/decl.c (gnat_to_gnu_entity): Check that
5343 type is array or integer prior checking string flag.
5344 * gcc-interface/gigi.h (maybe_character_type): Likewise.
5345 (maybe_character_value): Likewise.
5346
53472019-06-24 Martin Sebor <msebor@redhat.com>
5348
5349 * gcc-interface/utils.c (handle_nonnull_attribute): Quote attribute
5350 name.
5351
53522019-06-18 Arnaud Charlet <charlet@adacore.com>
5353
5354 PR ada/80590
5355 * sem_ch5.adb (Analyze_Loop_Statement): Avoid exception propagation
5356 during normal processing.
5357
53582019-06-17 Arnaud Charlet <charlet@adacore.com>
5359
5360 PR ada/80590
5361 * exp_ch9.adb (Expand_N_Delay_Relative_Statement): Swap the two
5362 conditions to avoid a unnecessary exception propagation in the default
5363 case.
5364
53652019-05-28 Eric Botcazou <ebotcazou@adacore.com>
5366
5367 * gcc-interface/utils.c (handle_stack_protect_attribute): Move around.
5368
53692019-05-28 Eric Botcazou <ebotcazou@adacore.com>
5370
5371 * doc/gnat_rm/implementation_defined_pragmas.rst (Machine_Attribute):
5372 Document additional optional parameters.
5373 * sem_prag.adb (Analyze_Pragma) <Pragma_Machine_Attribute>: Accept
5374 more than one optional parameter.
5375 * gcc-interface/decl.c (prepend_one_attribute_pragma): Alphabetize
5376 the list of supported pragmas. Simplify the handling of parameters
5377 and add support for more than one optional parameter.
5378 * gcc-interface/utils.c (attr_cold_hot_exclusions): New constant.
5379 (gnat_internal_attribute_table): Add entry for no_icf, noipa, flatten,
5380 used, cold, hot, target and target_clones.
5381 (begin_subprog_body): Do not create the RTL for the subprogram here.
5382 (handle_noicf_attribute): New static function.
5383 (handle_noipa_attribute): Likewise.
5384 (handle_flatten_attribute): Likewise.
5385 (handle_used_attribute): Likewise.
5386 (handle_cold_attribute): Likewise.
5387 (handle_hot_attribute): Likewise.
5388 (handle_target_attribute): Likewise.
5389 (handle_target_clones_attribute): Likewise.
5390
53912019-05-28 Eric Botcazou <ebotcazou@adacore.com>
5392
5393 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Return 0
5394 for 'Size too.
5395 (Identifier_to_gnu): Use the actual subtype for a reference to a
5396 packed array in a return statement.
5397 (Attribute_to_gnu) <Attr_Size>: Do not strip VIEW_CONVERT_EXPRs from
5398 the prefix in every case.
5399
54002019-05-28 Eric Botcazou <ebotcazou@adacore.com>
5401
5402 * gcc-interface/trans.c (gnat_to_gnu): Remove superfluous tests on
5403 Backend_Overflow_Checks_On_Target and rework comments.
5404
54052019-05-28 Eric Botcazou <ebotcazou@adacore.com>
5406
5407 * gcc-interface/trans.c (walk_nesting_tree): New static function.
5408 (finalize_nrv): Use it to walk the entire nesting tree.
5409
54102019-05-28 Eric Botcazou <ebotcazou@adacore.com>
5411
5412 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Remove
5413 obsolete test on Is_For_Access_Subtype.
5414
54152019-05-28 Eric Botcazou <ebotcazou@adacore.com>
5416
5417 * gcc-interface/decl.c (components_to_record): Set a name on the type
5418 created for the REP part, if any.
5419 * gcc-interface/utils.c (finish_record_type): Only take the maximum
5420 when merging sizes for a variant part at offset 0.
5421 (merge_sizes): Rename has_rep parameter into max.
5422
54232019-05-28 Eric Botcazou <ebotcazou@adacore.com>
5424
5425 * gcc-interface/utils.c (gnat_internal_attribute_table): Add support
5426 for stack_protect attribute.
5427 (handle_stack_protect_attribute): New static function.
5428
54292019-05-28 Eric Botcazou <ebotcazou@adacore.com>
5430
5431 * gcc-interface/decl.c (intrin_arglists_compatible_p): Do not return
5432 false if the internal builtin uses a variable list.
5433
54342019-05-27 Eric Botcazou <ebotcazou@adacore.com>
5435
5436 * gcc-interface/trans.c (Call_to_gnu): Do not initialize the temporary
5437 created out of addressability concerns if it's for the _Init parameter
5438 of an initialization procedure.
5439
54402019-05-27 Eric Botcazou <ebotcazou@adacore.com>
5441
5442 * gcc-interface/ada-builtin-types.def: New file.
5443 * gcc-interface/ada-builtins.def: Likewise.
5444 * gcc-interface/ada-tree.h (BUILT_IN_LIKELY): New macro.
5445 (BUILT_IN_UNLIKELY): Likewise.
5446 * gcc-interface/trans.c (independent_iterations_p): Initialize the
5447 auto-vector to 16 elements.
5448 (Call_to_gnu): Remove local variable and change the vector of actual
5449 parameters to an auto-vector. Do not convert actual parameters to
5450 the argument type for front-end built-in functions. Add support for
5451 front-end built-in functions.
5452 (build_noreturn_cond): Use internal instead of built-in function.
5453 * gcc-interface/utils.c (c_builtin_type): Include ada-builtin-types.def
5454 (install_builtin_function_types): Likewise.
5455 (install_builtin_functions): Include ada-builtins.def first.
5456
54572019-05-27 Eric Botcazou <ebotcazou@adacore.com>
5458
5459 * gcc-interface/utils.c (maybe_pad_type): Issue the warning for the
5460 specific case of component types preferably.
5461
54622019-05-27 Eric Botcazou <ebotcazou@adacore.com>
5463
5464 * gcc-interface/trans.c (Identifier_to_gnu): Minor tweaks.
5465 (gnat_to_gnu): Do not convert the result if it is a reference to an
5466 unconstrained array used as the prefix of an attribute reference that
5467 requires an lvalue.
5468
54692019-05-27 Eric Botcazou <ebotcazou@adacore.com>
5470
5471 * gcc-interface/trans.c (Gigi_Types_Compatible): New predicate.
5472 (Identifier_to_gnu): Use it to assert that the type of the identifier
5473 and that of its entity are compatible for gigi. Rename a couple of
5474 local variables and separate the processing of the result type.
5475
54762019-05-27 Eric Botcazou <ebotcazou@adacore.com>
5477
5478 * gcc-interface/trans.c (Call_to_gnu): Use the unpadded type when
5479 putting back an intermediate conversion the type of the actuals.
5480
54812019-05-27 Eric Botcazou <ebotcazou@adacore.com>
5482
5483 * gcc-interface/trans.c (gnat_to_gnu) <Shift operations>: Convert the
5484 count to the unsigned version of its base type before proceeding.
5485
54862019-05-16 Martin Sebor <msebor@redhat.com>
5487
5488 * gcc-interface/trans.c (check_inlining_for_nested_subprog): Quote
5489 reserved names.
5490
54912019-05-08 Arnaud Charlet <charlet@adacore.com>
5492
5493 * standard.ads.h: New file.
5494
54952019-05-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5496
5497 * gcc-interface/Makefile.in (install-gcc-specs): Use foreach.
5498 Honor DESTDIR.
5499
55002019-04-29 Michael K. Darling <darlingm@gmail.com>
5501
5502 * gnatvsn.ads: Bump Library_Version to 10.
5503
55042019-04-24 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5505 Bernd Edlinger <bernd.edlinger@hotmail.de>
5506 Jakub Jelinek <jakub@redhat.com>
5507
5508 PR target/89093
5509 * raise-gcc.c (TARGET_ATTRIBUTE): Define.
5510 (continue_unwind, personality_body, PERSONALITY_FUNCTION): Add
5511 TARGET_ATTRIBUTE.
5512
55132019-04-07 Eric Botcazou <ebotcazou@adacore.com>
5514
5515 * libgnat/i-cexten.ads (CFloat_128): New type.
5516
55172019-03-22 Dmitriy Anisimkov <anisimko@adacore.com>
5518
5519 PR ada/89583
5520 * libgnat/g-socket.adb (Bind_Socket, Connect_Socket,
5521 Send_Socket): Fix the computation of structure lengths passed to
5522 low level routines.
5523 (Is_IPv6_Address): Fix the number of expected colons.
5524
55252019-03-11 Martin Liska <mliska@suse.cz>
5526
5527 * gcc-interface/misc.c (gnat_post_options): Wrap option name in string
5528 format message and fix GNU coding style.
5529
55302019-02-08 Eric Botcazou <ebotcazou@adacore.com>
5531
5532 * gcc-interface/trans.c (gnat_to_gnu) <N_Aggregate>: Minor tweak.
5533 * gcc-interface/utils.c (convert): Do not pad when doing an unchecked
5534 conversion here. Use TREE_CONSTANT throughout the function.
5535 (unchecked_convert): Also pad if the source is a CONSTRUCTOR and the
5536 destination is a more aligned array type or a larger aggregate type,
5537 but not between original and packable versions of a type.
5538
55392019-02-08 Eric Botcazou <ebotcazou@adacore.com>
5540
5541 * gcc-interface/utils.c (max_size) <tcc_unary>: Be prepared for an
5542 operand with VOID_TYPE.
5543
55442019-02-08 Eric Botcazou <ebotcazou@adacore.com>
5545
5546 * gcc-interface/trans.c (elaborate_all_entities): Do not elaborate the
5547 entities of a package renaming another one.
5548
55492019-02-08 Eric Botcazou <ebotcazou@adacore.com>
5550
5551 * gcc-interface/trans.c (Regular_Loop_to_gnu): Replace tests on
5552 individual flag_unswitch_loops and flag_tree_loop_vectorize switches
5553 with test on global optimize switch.
5554 (Raise_Error_to_gnu): Likewise.
5555
55562019-02-07 Eric Botcazou <ebotcazou@adacore.com>
5557
5558 * libgnarl/s-linux__sparc.ads (ETIMEDOUT): Set to correct value.
5559
55602019-02-06 Arnaud Charlet <charlet@adacore.com>
5561
5562 * libgnarl/s-linux__x32.ads: Resync list of signals with s-linux.ads
5563
55642019-01-27 Eric Botcazou <ebotcazou@adacore.com>
5565
5566 * repinfo.adb (List_Component_Layout): Remove superfluous space for
5567 zero-sized field.
5568 * gcc-interface/ada-tree.h (TYPE_IS_EXTRA_SUBTYPE_P): New macro.
5569 * gcc-interface/gigi.h (create_extra_subtype): Declare.
5570 * gcc-interface/decl.c (TYPE_ARRAY_SIZE_LIMIT): Likewise.
5571 (update_n_elem): New function.
5572 (gnat_to_gnu_entity): Use create_extra_subtype to create extra subtypes
5573 instead of doing it manually.
5574 <E_Array_Type>: Use update_n_elem to compute the maximum size. Use the
5575 index type instead of base type for the bounds. Set TYPE_ARRAY_MAX_SIZE
5576 of the array to the maximum size.
5577 <E_Array_Subtype>: Create an extra subtype using the index type of the
5578 base array type for self-referential bounds. Use update_n_elem to
5579 compute the maximum size. Set TYPE_ARRAY_MAX_SIZE of the array to the
5580 maximum size.
5581 (gnat_to_gnu_field): Clear DECL_NONADDRESSABLE_P on discriminants.
5582 * gcc-interface/misc.c (gnat_get_alias_set): Return the alias set of
5583 the base type for an extra subtype.
5584 (gnat_type_max_size): Remove obsolete code.
5585 * gcc-interface/trans.c (Attribute_to_gnu): Minor tweak.
5586 (can_be_lower_p): Deal with pathological types.
5587 * gcc-interface/utils.c (create_extra_subtype): New function.
5588 (create_field_decl): Minor tweak.
5589 (max_size) <tcc_reference>: Compute a better value by using the extra
5590 subtypes on the self-referential bounds.
5591 <tcc_binary>: Rewrite. Deal with "negative value" in unsigned types.
5592 <tcc_expression>: Likewise.
5593 * gcc-interface/utils2.c (compare_arrays): Retrieve the original bounds
5594 of the arrays upfront. Swap only if the second length is not constant.
5595 Use comparisons on the original bounds consistently for the null tests.
5596 (build_binary_op): Use TYPE_IS_EXTRA_SUBTYPE_P macro.
5597 (build_allocator): Minor tweak.
5598
55992019-01-27 Eric Botcazou <ebotcazou@adacore.com>
5600
5601 * gcc-interface/decl.c (array_type_has_nonaliased_component): Return
5602 the same value for every dimension of a multidimensional array type.
5603
56042019-01-26 Eric Botcazou <ebotcazou@adacore.com>
5605
5606 * gcc-interface/trans.c (Regular_Loop_to_gnu): Use the SLOC of the
5607 iteration scheme, if present, throughout the translation.
5608
56092019-01-26 Eric Botcazou <ebotcazou@adacore.com>
5610
5611 * gcc-interface/trans.c (gnat_to_gnu) <N_Assignment_Statement>: Use
5612 DECL_SIZE_UNIT instead of TYPE_SIZE_UNIT for the size to be assigned
5613 by a call to memset if the LHS is a DECL.
5614
56152019-01-26 Eric Botcazou <ebotcazou@adacore.com>
5616
5617 * gcc-interface/trans.c (struct loop_info_d): Remove artificial field.
5618 (Loop_Statement_to_gnu): Do not set it.
5619
56202019-01-26 Eric Botcazou <ebotcazou@adacore.com>
5621
5622 * gcc-interface/trans.c (Iterate_Acc_Clause_Arg): Fix formatting.
5623 (Acc_gnat_to_gnu): Likewise.
5624 (Acc_Data_to_gnu): Likewise.
5625 (Acc_Var_to_gnu): Likewise.
5626 (Acc_Reduc_to_gnu): Likewise.
5627 (Acc_Size_List_to_gnu): Likewise.
5628 (Pragma_to_gnu) <Pragma_Acc_Loop>: Likewise.
5629 <Pragma_Acc_Data>): Likewise.
5630 (find_loop_for): Remove default value for parameters.
5631 * gcc-interface/trans.c (gnat_to_gnu) <N_Op_And>: Merge into...
5632 <N_Op_Eq>): ...this.
5633
56342019-01-26 Eric Botcazou <ebotcazou@adacore.com>
5635
5636 * gcc-interface/decl.c (annotate_value) <INTEGER_CST>: Use test on
5637 the sign bit instead of on the sign of the value.
5638 <PLUS_EXPR>: Turn addition of negative constant into subtraction.
5639 <MULT_EXPR>: Add test for degenerate case.
5640 <BIT_AND_EXPR>: Simplify.
5641
56422019-01-18 Sebastian Huber <sebastian.huber@embedded-brains.de>
5643
5644 * s-oscons-tmplt.c (AF_INET6): Do not undefine for RTEMS.
5645
56462019-01-09 Sandra Loosemore <sandra@codesourcery.com>
5647
5648 PR other/16615
5649 * exp_ch11.adb: Change "can not" to "cannot".
5650 * sem_ch4.adb: Likewise.
5651
56522019-01-09 Sandra Loosemore <sandra@codesourcery.com>
5653
5654 PR other/16615
5655 * exp_ch9.adb: Mechanically replace "can not" with "cannot".
5656 * libgnat/s-regpat.ads: Likewise.
5657 * par-ch4.adb: Likewise.
5658 * set_targ.adb: Likewise.
5659 * types.ads: Likewise.
5660
56612019-01-08 Justin Squirek <squirek@adacore.com>
5662
5663 Revert:
5664 2018-07-31 Justin Squirek <squirek@adacore.com>
5665
5666 * lib-writ.adb (Write_With_Lines): Modfiy the generation
5667 of dependencies within ali files so that source unit
5668 bodies are properly listed even if said bodies are
5669 missing. Perform legacy behavior in GNATprove mode.
5670 * lib-writ.ads: Modify documentation to reflect current
5671 behavior.
5672
5673 and:
5674 2018-09-26 Justin Squirek <squirek@adacore.com>
5675
5676 * lib-writ.adb, lib-writ.ads (Write_With_Lines): Add
5677 documentation and an extra conditional check for RCI
5678 units so that generated ali files will list the spec
5679 only instead of a body when a body is not found.
5680
56812019-01-04 Eric Botcazou <ebotcazou@adacore.com>
5682
5683 * gnatvsn.ads: Bump copyright year.
5684
56852019-01-01 Jakub Jelinek <jakub@redhat.com>
5686
5687 Update copyright years.
5688
5689 * gnat_ugn.texi: Bump @copying's copyright year.
5690 * gnat_rm.texi: Likewise.
5691\f
5692Copyright (C) 2019 Free Software Foundation, Inc.
5693
5694Copying and distribution of this file, with or without modification,
5695are permitted in any medium without royalty provided the copyright
5696notice and this notice are preserved.