[Ada] Factor out the "size for& too small..." error message
[gcc.git] / gcc / ada / ChangeLog
1 2019-08-19 Bob Duff <duff@adacore.com>
2
3 * errout.ads (Size_Too_Small_Message): New constant.
4 * errout.adb, freeze.adb, sem_ch13.adb: Use it.
5
6 2019-08-19 Eric Botcazou <ebotcazou@adacore.com>
7
8 * exp_dist.adb (Build_Package_Stubs): Do not specifically visit
9 the declarations of an N_Subprogram_Instantiation node.
10
11 2019-08-19 Bob Duff <duff@adacore.com>
12
13 * doc/gnat_ugn/gnat_utility_programs.rst: Document missing
14 metrics switches.
15
16 2019-08-19 Piotr Trojanek <trojanek@adacore.com>
17
18 * sem_ch12.adb (Get_Unit_Instantiation_Node): Simplify Nkind_In
19 membership test.
20 * sem.adb (Depends_On_Main): Whitespace cleanup; only assign a
21 local variable if needed.
22
23 2019-08-19 Claire Dross <dross@adacore.com>
24
25 * sem_spark.ads, sem_spark.adb (Is_Pledge_Function): New
26 parameter of the generic. Function used to decide whether a
27 function is a pledge function.
28 (Check_Not_Borrowed): Disable check inside the second parameter
29 of a pledge function for the path borrowed by the first
30 parameter. Also disable checks for entities inside a Global
31 contract.
32
33 2019-08-19 Joffrey Huguet <huguet@adacore.com>
34
35 * libgnat/a-cfdlli.ads, libgnat/a-cfhama.ads,
36 libgnat/a-cfinve.ads, libgnat/a-cforma.ads,
37 libgnat/a-cofove.ads, libgnat/a-cofuma.ads,
38 libgnat/a-cofuve.ads: Add formal function parameter "=" (L, R :
39 Element_Type) to the generic packages.
40
41 2019-08-19 Eric Botcazou <ebotcazou@adacore.com>
42
43 * opt.ads: Clean up left-overs of earlier implementation in
44 comment:
45
46 2019-08-19 Ed Schonberg <schonberg@adacore.com>
47
48 * sem_ch3.adb (Derived_Enumeration_Type): Do no freeze anonymous
49 base type if the bounds in the derived type declaration are
50 literals of the type.
51
52 2019-08-19 Yannick Moy <moy@adacore.com>
53
54 * sem_res.adb (Resolve_Call): Check non-aliasing rules before
55 GNATprove inlining.
56
57 2019-08-19 Eric Botcazou <ebotcazou@adacore.com>
58
59 * inline.adb (Add_Inlined_Body): Do not add pending
60 instantiations.
61 * sem_ch12.adb (Needs_Body_Instantiated): New predicate.
62 (Analyze_Package_Instantiation): Use it to decide whether to add
63 a pending instantiation for the body of the package.
64
65 2019-08-19 Olivier Hainque <hainque@adacore.com>
66
67 * gcc-interface/trans.c (Acc_Loop_to_gnu): Return the openacc
68 BIND_EXPR node we have constructed on purpose. Remove unused
69 variable.
70
71 2019-08-19 Pierre-Marie de Rodat <derodat@adacore.com>
72
73 * gcc-interface/lang.opt (fdump-scos): Define.
74 * gcc-interface/misc.c (gnat_handle_option): Handle
75 OPT_fdump_scos.
76
77 2019-08-14 Joffrey Huguet <huguet@adacore.com>
78
79 * libgnat/a-cofuba.ads: Add a Length attribute to type
80 Container. Add a type Array_Base which replaces the previous
81 Elements attribute of Container.
82 (Content_Init): New subprogram. It is used to initialize the
83 Base attribute of Container.
84 * libgnat/a-cofuba.adb (Resize): New subprogram. It is used to
85 resize the underlying array of a container if necessary.
86 (=, <=, Find, Get, Intersection, Length, Num_Overlaps, Set,
87 Union): Update to match changes in type declarations.
88 (Add): Modify body to damp the time and space cost in a specific
89 case.
90 (Content_Init): New subprogram. It is used to initialize the
91 Base attribute of Container.
92 (Remove): Modify body to damp the time and space cost in a
93 specific case.
94
95 2019-08-14 Bob Duff <duff@adacore.com>
96
97 * sem_ch13.adb (Get_Alignment_Value): Return 1 for Alignment 0,
98 and do not give an error.
99 * doc/gnat_rm/representation_clauses_and_pragmas.rst: Update the
100 corresponding documentation.
101 * gnat_rm.texi: Regenerate.
102
103 2019-08-14 Eric Botcazou <ebotcazou@adacore.com>
104
105 * inline.adb (Add_Pending_Instantiation): Fix off-by-one error
106 in the comparison against the maximum number of instantiations.
107
108 2019-08-14 Eric Botcazou <ebotcazou@adacore.com>
109
110 * inline.adb (Add_Pending_Instantiation): Use greater-or-equal
111 in the comparison against the maximum number of instantiations.
112
113 2019-08-14 Ed Schonberg <schonberg@adacore.com>
114
115 * sem_aux.adb (Next_Rep_Item): If a node in the rep chain
116 involves a Ghost aspect it may have been replaced by a null
117 statement; use the original node to find next Rep_Item.
118 * repinfo.adb (List_Entities): Do not list an Ignored
119 Ghost_Entity, for which information may have been deleted.
120
121 2019-08-14 Bob Duff <duff@adacore.com>
122
123 * sem_prag.ads, sem_prag.adb
124 (Process_Compile_Time_Warning_Or_Error): In parameterless
125 version, improve detection of whether we are in a generic unit
126 to cover the case of an instance within a generic unit.
127 (Process_Compile_Time_Warning_Or_Error): Rename the
128 two-parameter version to be
129 Validate_Compile_Time_Warning_Or_Error, and do not export it.
130 Issue a warning if the condition is not known at compile time.
131 The key point is that the warning must be given only for pragmas
132 deferred to the back end, because the back end discovers
133 additional values that are known at compile time. Previous
134 changes in this ticket have enabled this by deferring to the
135 back end without checking for special cases such as 'Size.
136 (Validate_Compile_Time_Warning_Or_Error): Rename to be
137 Defer_Compile_Time_Warning_Error_To_BE.
138 * warnsw.ads, warnsw.adb (Warn_On_Unknown_Compile_Time_Warning):
139 Add new switches -gnatw_c and -gnatw_C to control the above
140 warning.
141 * doc/gnat_ugn/building_executable_programs_with_gnat.rst:
142 Document new switches.
143 * gnat_ugn.texi: Regenerate.
144
145 2019-08-14 Eric Botcazou <ebotcazou@adacore.com>
146
147 * sem_ch12.adb (Might_Inline_Subp): Rework comment and restrict
148 the shortcut based on Is_Inlined to the back-end inlining case.
149
150 2019-08-14 Bob Duff <duff@adacore.com>
151
152 * inline.adb (Check_And_Split_Unconstrained_Function): Ignore
153 protected functions to get rid of spurious error. The
154 transformation done by this procedure triggers legality errors
155 in the generated code in this case.
156
157 2019-08-14 Bob Duff <duff@adacore.com>
158
159 * sem_prag.adb (Process_Compile_Time_Warning_Or_Error): Defer
160 processing to the back end in all cases where the pragma's
161 condition is not known at compile time during the front end
162 (except in generics), as opposed to detecting 'Size attributes
163 and the like. This ensures that we take advantage of whatever
164 can be compile-time known after running the back end, as opposed
165 to having the front end guess what the back end can do. Remove
166 a little duplicated code at the call site.
167 * gnat1drv.adb (Post_Compilation_Validation_Checks): Unlock the
168 Elists while in Validate_Compile_Time_Warning_Errors, because it
169 does analysis and name resolution, which sometimes involves
170 adding Elists.
171
172 2019-08-14 Eric Botcazou <ebotcazou@adacore.com>
173
174 * einfo.ads (Is_Called): Document new usage on E_Package
175 entities.
176 * einfo.adb (Is_Called): Accept E_Package entities.
177 (Set_Is_Called): Likewise.
178 * exp_ch6.adb (Expand_Call_Helper): Move code dealing with
179 instances for back-end inlining to Add_Inlined_Body.
180 * inline.ads: Remove with clauses for Alloc and Table.
181 (Pending_Instantiations): Move to...
182 * inline.adb: Add with clauses for Alloc, Uintp, Table and
183 GNAT.HTable.
184 (Backend_Instances): New variable.
185 (Pending_Instantiations): ...here.
186 (Called_Pending_Instantiations): New table.
187 (Node_Table_Size): New constant.
188 (Node_Header_Num): New subtype.
189 (Node_Hash): New function.
190 (To_Pending_Instantiations): New hash table.
191 (Add_Inlined_Body): Bail out early for subprograms in the main
192 unit or subunit. Likewise if the Is_Called flag is set. If the
193 subprogram is an instance, invoke Add_Inlined_Instance. Call
194 Set_Is_Called earlier. If the subrogram is within an instance,
195 invoke Add_Inlined_Instance. Also deal with the case where the
196 call itself is within an instance.
197 (Add_Inlined_Instance): New procedure.
198 (Add_Inlined_Subprogram): Remove conditions always fulfilled.
199 (Add_Pending_Instantiation): Move the defence against ludicruous
200 number of instantiations to here. When back-end inlining is
201 enabled, associate an instantiation with its index in table and
202 mark a few selected kinds of instantiations as always needed.
203 (Initialize): Set Backend_Instances to No_Elist.
204 (Instantiate_Body): New procedure doing the work extracted
205 from...
206 (Instantiate_Bodies): ...here. When back-end inlining is
207 enabled, loop over Called_Pending_Instantiations instead of
208 Pending_Instantiations.
209 (Is_Nested): Minor tweak.
210 (List_Inlining_Info): Also list the contents of
211 Backend_Instances.
212 * sem_ch12.adb (Might_Inline_Subp): Return early if Is_Inlined
213 is set and otherwise set it before returning true.
214 (Analyze_Package_Instantiation): Remove the defence against
215 ludicruous number of instantiations. Invoke
216 Remove_Dead_Instance instead of doing the removal manually if
217 there is a guaranteed ABE.
218
219 2019-08-14 Gary Dismukes <dismukes@adacore.com>
220
221 * exp_ch3.adb (Predef_Spec_Or_Body): For an equality operation
222 of an interface type, create an expression function (that
223 returns False) rather than declaring an abstract function.
224 * freeze.adb (Check_Inherited_Conditions): Set Needs_Wrapper to
225 False unconditionally at the start of the loop creating wrappers
226 for inherited operations.
227
228 2019-08-14 Bob Duff <duff@adacore.com>
229
230 * table.adb: Assert that the table is not locked when increasing
231 Last, even if it doesn't cause reallocation. In other words,
232 assert that on operations that MIGHT cause reallocation.
233 * table.ads: Fix comment accordingly.
234
235 2019-08-14 Arnaud Charlet <charlet@adacore.com>
236
237 * doc/gnat_ugn/gnat_and_program_execution.rst: Remove
238 documentation of gnatelim.
239
240 2019-08-14 Bob Duff <duff@adacore.com>
241
242 * sem_prag.adb (Validate_Compile_Time_Warning_Error): Attach the
243 warning to the Sloc of the first pragma argument, rather than to
244 the pragma itself. This is to make pragmas processed after the
245 back end use the same Sloc as pragmas processed earlier, in the
246 front end. There's no reason for this discrepancy, and it
247 hinders further work on this ticket.
248
249 2019-08-14 Bob Duff <duff@adacore.com>
250
251 * sem.ads (Inside_A_Generic): Remove the ??? comment.
252
253 2019-08-14 Eric Botcazou <ebotcazou@adacore.com>
254
255 * inline.ads (Pending_Descriptor): Delete.
256 * inline.adb (Initialize): Do not initialize it.
257 * sem_ch12.adb (Delay_Descriptors): Delete.
258 (Analyze_Package_Instantiation): Call
259 Set_Delay_Subprogram_Descriptors instead of Delay_Descriptors
260 throughout.
261
262 2019-08-14 Bob Duff <duff@adacore.com>
263
264 * exp_aggr.adb (Init_Hidden_Discriminants): Avoid processing the
265 wrong discriminant, which could be of the wrong type.
266
267 2019-08-14 Eric Botcazou <ebotcazou@adacore.com>
268
269 * sem_ch12.adb (Analyze_Instance_And_Renamings): Do not reset
270 the Is_Generic_Instance flag previously set on the package
271 generated for the instantiation of a generic subprogram.
272
273 2019-08-14 Ed Schonberg <schonberg@adacore.com>
274
275 * exp_ch4.adb (Expand_N_Quantified_Expression): Freeze
276 explicitly the type of the loop parameter.
277
278 2019-08-14 Javier Miranda <miranda@adacore.com>
279
280 * sem_util.adb (New_Copy_Tree.Copy_Node_With_Replacement):
281 Update the Chars attribute of identifiers.
282
283 2019-08-14 Yannick Moy <moy@adacore.com>
284
285 * sem_spark.adb, sem_spark.ads (Is_Legal): New function exposed
286 for use in GNATprove, to test legality rules not related to
287 permissions.
288 (Check_Declaration_Legality): Extract the part of
289 Check_Declaration that checks rules not related to permissions.
290 (Check_Declaration): Call the new Check_Declaration_Legality.
291 (Check_Type_Legality): Rename of Check_Type. Introduce
292 parameters to force or not checking, and update a flag detecting
293 illegalities.
294 (Check_Node): Ignore attribute references in statement position.
295
296 2019-08-14 Yannick Moy <moy@adacore.com>
297
298 * sem_spark.adb (Check_Old_Loop_Entry): New procedure to check
299 correct use of Old and Loop_Entry.
300 (Check_Node): Check subprogram contracts.
301 (Check_Pragma): Check Loop_Variant.
302 (Check_Safe_Pointers): Apply checking to library-level
303 subprogram declarations as well, in order to check their
304 contract.
305
306 2019-08-14 Yannick Moy <moy@adacore.com>
307
308 * sem_spark.adb (Is_Subpath_Expression): Take into account
309 conversion and qualification.
310
311 2019-08-14 Eric Botcazou <ebotcazou@adacore.com>
312
313 * sem_ch7.adb (Install_Private_Declarations)
314 <Swap_Private_Dependents>: Do not rely solely on the
315 Is_Child_Unit flag on the unit to recurse.
316 (Uninstall_Declarations) <Swap_Private_Dependents>: New
317 function. Use it to recurse on the private dependent entities
318 for child units.
319
320 2019-08-14 Javier Miranda <miranda@adacore.com>
321
322 * exp_aggr.adb (Is_CCG_Supported_Aggregate): Return False for
323 arrays with bounds not known at compile time.
324
325 2019-08-14 Ed Schonberg <schonberg@adacore.com>
326
327 * sem_util.adb (New_Copy_Tree, Visit_Entity): A quantified
328 expression includes the implicit declaration of the loop
329 parameter. When a quantified expression is copied during
330 expansion, for example when building the precondition code from
331 the generated pragma, a new loop parameter must be created for
332 the new tree, to prevent duplicate declarations for the same
333 symbol.
334
335 2019-08-14 Yannick Moy <moy@adacore.com>
336
337 * sem_disp.adb (Check_Dispatching_Operation): Update assertion
338 for the separate declarations created in GNATprove mode.
339 * sem_disp.ads (Is_Overriding_Subprogram): Update comment.
340 * sem_elab.adb (SPARK_Processor): Fix test for checking of
341 overriding primitives.
342
343 2019-08-14 Eric Botcazou <ebotcazou@adacore.com>
344
345 * inline.adb (Add_Inlined_Body): Tweak comments.
346 (List_Inlining_Info): Also list information about non-main
347 units.
348
349 2019-08-14 Gary Dismukes <dismukes@adacore.com>
350
351 * sem_ch4.adb (Analyze_Selected_Component): In the case where
352 the prefix is of a concurrent type, and the selected entity
353 matching the selector is the first private declaration of the
354 type (such as the first local variable in a task's body), set
355 Is_Private_Op.
356
357 2019-08-14 Piotr Trojanek <trojanek@adacore.com>
358
359 * einfo.adb (Is_Generic_Actual_Subprogram): Replace repeated
360 calls to Ekind with Ekind_In.
361
362 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
363
364 PR middle-end/91421
365 * gcc-interface/trans.c (gigi): Call set_decl_buillt_in_function.
366 (Call_to_gnu): Use DECL_FE_FUNCTION_CODE instead of DECL_FUNCTION_CODE.
367
368 2019-08-13 Eric Botcazou <ebotcazou@adacore.com>
369
370 * ali.ads (Linker_Option_Record): Remove Original_Pos component.
371 * ali.adb (Scan_ALI): Do not set it.
372
373 2019-08-13 Eric Botcazou <ebotcazou@adacore.com>
374
375 * sem_ch3.adb (Build_Derived_Concurrent_Type): Add a couple of
376 local variables and use them. When the derived type fully
377 constrains the parent type, rewrite it as a subtype of an
378 implicit (unconstrained) derived type instead of the other way
379 around.
380 (Copy_And_Build): Deal with concurrent types and use predicates.
381 (Build_Derived_Private_Type): Build the full derivation if
382 needed for concurrent types too.
383 (Build_Derived_Record_Type): Add marker comment.
384 (Complete_Private_Subtype): Use predicates.
385
386 2019-08-13 Ed Schonberg <schonberg@adacore.com>
387
388 * sem_ch3.adb (Check_Generic_Ancestor): New subprogram,
389 aubsidiary to Build_Derived_Record_Type. to enforce the rule
390 that a type extension declared in a generic body cznnot have an
391 ancestor that is a generic formal (RM 3.9.1 (4/2)). The rule
392 applies to all ancestors of the type, including interface
393 progenitors.
394
395 2019-08-13 Eric Botcazou <ebotcazou@adacore.com>
396
397 * sem_ch3.adb (Build_Underlying_Full_View): Delete.
398 (Complete_Private_Subtype): Do not set the full view on the
399 private subtype here. If the full base is itself derived from
400 private, do not re-derive the parent type but instead constrain
401 an existing underlying full view.
402 (Prepare_Private_Subtype_Completion): Do not get to the
403 underlying full view, if any. Set the full view on the private
404 subtype here.
405 (Process_Full_View): Likewise.
406 * sem_ch12.adb (Check_Generic_Actuals): Also set
407 Is_Generic_Actual_Type on the full view if the type of the
408 actual is private.
409 (Restore_Private_Views): Also reset Is_Generic_Actual_Type on
410 the full view if the type of the actual is private.
411 * sem_eval.adb (Subtypes_Statically_Match): Remove bypass for
412 generic actual types.
413
414 2019-08-13 Javier Miranda <miranda@adacore.com>
415
416 * sem_res.adb (Resolve_Selected_Component): When the type of the
417 component is an access to a class-wide type and the type of the
418 context is an access to a tagged type the relevant type is that
419 of the component (since in such case we may need to generate
420 implicit type conversions or dispatching calls).
421
422 2019-08-13 Ed Schonberg <schonberg@adacore.com>
423
424 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Preanalyze
425 expression, rather do a full analysis, to prevent unwanted
426 removal of side effects which mask the intent of the expression.
427
428 2019-08-13 Eric Botcazou <ebotcazou@adacore.com>
429
430 * impunit.adb (Non_Imp_File_Names_95): Add
431 GNAT.Branch_Prediction.
432
433 2019-08-13 Eric Botcazou <ebotcazou@adacore.com>
434
435 * exp_ch6.adb: Remove with and use clauses for Sem_Ch12.
436 (Expand_Call_Helper): Swap the back-end inlining case and the
437 special front-end expansion case. In back-end inlining mode, do
438 not invoke Add_Inlined_Body unless the call may be inlined.
439 * inline.ads (Add_Pending_Instantiation): New function moved
440 from...
441 * inline.adb (Add_Inlined_Body): Simplify comment. Turn test on
442 the enclosing unit into assertion.
443 (Add_Pending_Instantiation): New function moved from...
444 * sem_ch12.ads (Add_Pending_Instantiation): ...here.
445 * sem_ch12.adb (Add_Pending_Instantiation): ...here.
446
447 2019-08-13 Eric Botcazou <ebotcazou@adacore.com>
448
449 * sem.adb (Do_Analyze): Recompute Style_Check_Max_Line_Length
450 after restoring Style_Max_Line_Length.
451
452 2019-08-13 Arnaud Charlet <charlet@adacore.com>
453
454 * sem_ch13.adb (Check_Iterator_Functions): Protect against
455 cascaded errors.
456
457 2019-08-13 Ed Schonberg <schonberg@adacore.com>
458
459 * sem_ch8.adb (Analyze_Subprogram_Renaming): Do no suppress mode
460 conformance checks on child unit instance that is a compilation
461 unit.
462
463 2019-08-13 Gary Dismukes <dismukes@adacore.com>
464
465 * exp_dbug.adb (Fully_Qualify_Name): Add full name qualification
466 for the E_Exception case.
467
468 2019-08-13 Gary Dismukes <dismukes@adacore.com>
469
470 * exp_aggr.adb (Aggr_Size_OK): Compute the aggregate size using
471 universal arithmetic, to avoid situations where the size
472 computation overflows.
473
474 2019-08-13 Justin Squirek <squirek@adacore.com>
475
476 * repinfo.adb (List_Scalar_Storage_Order): Modify conditionals
477 for displaying ordering to always be triggered when -gnatR4 is
478 in effect.
479
480 2019-08-13 Justin Squirek <squirek@adacore.com>
481
482 * aspects.adb, aspects.ads: Register new aspect.
483 * par-prag.adb (Prag): Register new pragma
484 * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing
485 for new aspect similar to Aspect_Max_Entry_Queue_Length.
486 * sem_prag.adb, sem_prag.ads (Analyze_Pragma): Register new
487 pragma and set it to use the same processing as
488 Pragma_Max_Queue_Length.
489 * snames.ads-tmpl: Move definition of
490 Name_Max_Entry_Queue_Length so that it can be processed as a
491 pragma in addition to a restriction and add an entry for the
492 pragma itself.
493
494 2019-08-13 Yannick Moy <moy@adacore.com>
495
496 * sem_ch4.adb (Analyze_Allocator): Do not insert subtype
497 declaration for allocator inside a spec expression.
498
499 2019-08-13 Yannick Moy <moy@adacore.com>
500
501 * sem_res.adb (Resolve_Call): Do not inline calls inside record
502 types.
503
504 2019-08-13 Eric Botcazou <ebotcazou@adacore.com>
505
506 * sem_ch4.adb (Analyze_One_Call): Remove bypass for type
507 mismatch in nested instantiations.
508 * sem_ch8.adb (Find_Nearer_Entity): New function.
509 (Find_Renamed_Entity): Use it to disambiguate the candidates for
510 the renaming generated for an instantiation when it is
511 ambiguous.
512
513 2019-08-13 Eric Botcazou <ebotcazou@adacore.com>
514
515 * gnat1drv.adb (Adjust_Global_Switches): Do not set
516 Back_End_Inlining in ASIS mode either.
517
518 2019-08-13 Olivier Hainque <hainque@adacore.com>
519
520 * libgnat/s-win32.ads: Define size_t and fix the MapViewOfFile
521 binding to use it instead of DWORD for the dwNumberOfBytesToMap
522 argument.
523 * libgnat/g-sercom__mingw.adb (Read): State which definition of
524 size_t to fetch in call to Last_Index.
525
526 2019-08-13 Arnaud Charlet <charlet@adacore.com>
527
528 * gcc-interface/Make-lang.in: Remove unused TRACE variable. Pass
529 LN_S to relevant gnatlib targets.
530 * gcc-interface/Makefile.in: Systematically pass LN_S to
531 relevant gnatlib targets.
532
533 2019-08-13 Yannick Moy <moy@adacore.com>
534
535 * sem_dim.adb (Analyze_Dimension,
536 Analyze_Dimension_Array_Aggregate, Analyze_Dimension_Call,
537 Analyze_Dimension_Extension_Or_Record_Aggregate): Return
538 immediately when inside an inlined body.
539 * sem_res.adb (Resolve_Call): Remove special checking now done
540 inside Analyze_Dimension_Call.
541
542 2019-08-13 Justin Squirek <squirek@adacore.com>
543
544 * exp_ch4.adb (Expand_N_Allocator): Add condition to detect
545 library-level object declarations
546
547 2019-08-13 Eric Botcazou <ebotcazou@adacore.com>
548
549 * doc/gnat_ugn/building_executable_programs_with_gnat.rst
550 (-gnateT): Document Double_Float_Alignment parameter and fix
551 description of Double_Scalar_Alignment parameter.
552 * gnat_ugn.texi: Regenerate.
553
554 2019-08-13 Eric Botcazou <ebotcazou@adacore.com>
555
556 * exp_ch6.adb (Expand_Call_Helper): If back-end inlining is
557 enabled, also instantiate the body of a generic unit containing
558 a subprogram subject to aspect/pragma Inline_Always at
559 optimization level zero.
560 * sem_ch12.adb (Might_Inline_Subp): Minor tweak.
561 (Analyze_Package_Instantiation): Do not instantiate the package
562 body because of inlining considerations if the instantiation is
563 done in a generic unit. Move around similar condition involving
564 the main unit. Add test on Back_End_Inlining to processing for
565 front-end inlining.
566
567 2019-08-13 Javier Miranda <miranda@adacore.com>
568
569 * exp_disp.adb (Make_Secondary_DT): Handle record type
570 derivations that have interface components located at fixed
571 positions and interface components located at variable offset.
572 The offset of components located at fixed positions is computed
573 using the dummy object (similar to the case where all the
574 interface components are located at fixed positions).
575 (Make_DT): Build the dummy object for all tagged types that
576 implement interface types (that is, build it also for types with
577 variable size components), and use the dummy object to compute
578 the offset of all tag components located at fixed positions when
579 initializing the Interface_Table object.
580
581 2019-08-13 Justin Squirek <squirek@adacore.com>
582
583 * gnatcmd.adb (GNATCmd): Add constant for new compiler switch
584 --help-ada, and include usage subprogram. Add line to usage help
585 explaining the new flag.
586 (GNATCmd_Usage): Rename from locally declared Usage so as not to
587 confuse with the newly imported version. Add new argument case
588 for --help-ada and add bug report email to implicit display of
589 help without the --help flag so as to unify output between the
590 two cases.
591
592 2019-08-13 Dmitriy Anisimkov <anisimko@adacore.com>
593
594 * libgnat/g-comlin.adb (Getopt): Quote unrecognized switch in
595 Invalid_Switch exception message.
596
597 2019-08-13 Yannick Moy <moy@adacore.com>
598
599 * sem_util.adb (Traverse_More_Func): Take into account
600 Loop_Actions inside N_Iterated_Component_Association nodes.
601 * sinfo.ads: Document correctly Loop_Actions as a field of nodes
602 of kind N_Iterated_Component_Association.
603
604 2019-08-13 Claire Dross <dross@adacore.com>
605
606 * libgnat/a-cfinve.adb, libgnat/a-cofove.adb (Find_Index,
607 Reverse_Find_Index): Use bigger type to avoid range check
608 failure at the last loop iteration.
609
610 2019-08-12 Dmitriy Anisimkov <anisimko@adacore.com>
611
612 * libgnat/g-socket.adb (Is_IPv6_Address): Check that no less
613 then 2 colons in IPv6 numeric address.
614
615 2019-08-12 Dmitriy Anisimkov <anisimko@adacore.com>
616
617 * libgnat/g-comlin.ads, libgnat/g-comlin.adb (Getopt): Add
618 parameter Quiet. Need to do not output error messages to
619 console. Invalid_Switch exception generation surrounded by an
620 error message.
621
622 2019-08-12 Ed Schonberg <schonberg@adacore.com>
623
624 * exp_ch6.adb (Expand_Actuals. Add_Call_By_Copy_Code): Add code
625 to generate proper checks when an actual for an in-out or out
626 parameter has a non-null access type. No constraints are
627 applied to an inbound access parameter, but on exit a not-null
628 check must be performed if the type of the actual requires it.
629
630 2019-08-12 Ed Schonberg <schonberg@adacore.com>
631
632 * sem_util.adb (Is_Expaned_Priority_Attribute): Check whether
633 call comes from a rewritten attribute before comparing name with
634 Get_Ceiling run-time subprogram.
635
636 2019-08-12 Eric Botcazou <ebotcazou@adacore.com>
637
638 * exp_util.ads (Component_May_Be_Bit_Aligned): Small comment
639 tweaks.
640 (Possible_Bit_Aligned_Component): Likewise.
641 (Type_May_Have_Bit_Aligned_Components): Likewise.
642 * exp_util.adb (Component_May_Be_Bit_Aligned): Likewise.
643 (Possible_Bit_Aligned_Component): Likewise.
644 (Type_May_Have_Bit_Aligned_Components): Likewise.
645
646 2019-08-12 Eric Botcazou <ebotcazou@adacore.com>
647
648 * exp_ch4.adb (Expand_N_Op_Eq): Expand the array equality if
649 either operand is a possibly unaligned slice.
650 * exp_ch6.adb (Expand_Simple_Function_Return): Do not generate a
651 copy for a possibly unaligned object if it is represented as a
652 scalar.
653 * exp_util.adb (Is_Possibly_Unaligned_Slice): Do not always
654 return false if the target doesn't have strict alignment.
655
656 2019-08-12 Bob Duff <duff@adacore.com>
657
658 * sem_ch12.adb (Instantiate_Package_Body): Remove suppression of
659 checks in instances of internal units.
660 * sem_ch6.adb (Analyze_Function_Return): Do not generate a
661 constraint check on an extended_return_statement if the subtype
662 of the return object in the statement is identical to the return
663 subtype of the function.
664
665 2019-08-12 Bob Duff <duff@adacore.com>
666
667 * libgnat/a-cbmutr.adb (Is_Reachable): Declare Idx to be of the
668 base subtype. Clearly it makes no sense to loop "while Idx >=
669 0", if Idx is of a nonnegative subtype.
670
671 2019-08-12 Bob Duff <duff@adacore.com>
672
673 * libgnat/a-tifiio.adb (Put_Scaled): Prevent AA from being
674 negative, since Field is range 0 .. something.
675
676 2019-08-12 Bob Duff <duff@adacore.com>
677
678 * doc/gnat_ugn/gnat_utility_programs.rst (gnatmetric, gnatpp,
679 gnatstub): Remove documentation for Ada language version
680 switches, and note that they are no longer needed.
681
682 2019-08-12 Gary Dismukes <dismukes@adacore.com>
683
684 * sem_ch5.adb (Prepare_Param_Spec_Loop): Set the parents of the
685 copied low and high bounds in the case where the loop range is
686 given by a discrete_subtype_indication, to prevent hanging (or
687 Assert_Failure) in Insert_Actions.
688
689 2019-08-12 Ed Schonberg <schonberg@adacore.com>
690
691 * sem_ch6.adb (heck_Untagged_Equality): Verify that user-defined
692 equality has the same profile as the predefined equality before
693 applying legality rule in RM 4.5.2 (9.8).
694
695 2019-08-12 Bob Duff <duff@adacore.com>
696
697 * libgnat/a-except.ads: Update obsolete comment, still making
698 clear that this is a variant. Add explicit default for Id
699 component of Exception_Occurrence, because that value is used.
700 Define Null_Occurrence less redundantly.
701 * libgnat/a-einuoc.adb: Minor simplification of code.
702
703 2019-08-12 Justin Squirek <squirek@adacore.com>
704
705 * libgnat/a-dhfina.adb, libgnat/a-dhfina.ads (Is_Simple_Name,
706 Is_Root_Directory, Is_Parent_Directory,
707 Is_Current_Directory_Name, Is_Relative_Name, Initial_Directory,
708 Relative_Name, Compose): Add implementation and documentation.
709 * libgnat/a-direct.adb (Containing_Directory): Modify routine to
710 use routines from Ada.Directories.Hierarchical_File_Names and
711 remove incorrect special case for parent directories.
712 (Fetch_Next_Entry): Add check for current directory and parent
713 directory and ignore them under certain circumstances.
714 (Simple_Nmae): Add check for null result from
715 Simple_Name_Internal and raise Name_Error.
716 (Simple_Name_Internal): Add explicit check for root directories,
717 sanitize trailing directory separators, and modify behavior so
718 that current and parent directories are considered valid
719 results.
720 * Makefile.rtl: Add entry to GNATRTL_NONTASKING_OBJS.
721
722 2019-08-12 Eric Botcazou <ebotcazou@adacore.com>
723
724 * freeze.adb (Freeze_Entity): Give the same error for an
725 Object_Size clause on a variable-sized type as for a Size
726 clause.
727
728 2019-08-12 Gary Dismukes <dismukes@adacore.com>
729
730 * sem_prag.adb (Analyze_Pragma, Pragma_Suppress_Initialization):
731 For private types, set the Suppress_Initialization flag on the
732 Full_View of the entity rather than the entity's base type.
733
734 2019-08-12 Yannick Moy <moy@adacore.com>
735
736 * aspects.adb, aspects.ads (Aspect_No_Caching): New aspect.
737 * contracts.adb, contracts.ads (Add_Contract_Item): Add handling
738 of No_Caching.
739 (Analyze_Object_Contract): Add handling of No_Caching.
740 * einfo.adb, einfo.ads
741 (Get_Pragma): Add handling of No_Caching.
742 * doc/gnat_rm/implementation_defined_aspects.rst,
743 doc/gnat_rm/implementation_defined_pragmas.rst: Document new
744 aspect/pragma.
745 * gnat_rm.texi: Regenerate.
746 * par-prag.adb (Prag): New pragma Pragma_No_Caching.
747 * sem_ch13.adb (Analyze_Aspect_Specifications,
748 Check_Aspect_At_Freeze_Point): Add handling of No_Caching.
749 * sem_prag.adb (Analyze_Pragma): Deal with pragma No_Caching.
750 * sem_prag.ads (Analyze_External_Property_In_Decl_Part): Now
751 applies to No_Caching.
752 * sem_util.adb, sem_util.ads (Is_Effectively_Volatile): Add
753 handling of No_Caching.
754 (No_Caching_Enabled): New query function.
755 * snames.ads-tmpl: New names for pragma.
756
757 2019-08-12 Yannick Moy <moy@adacore.com>
758
759 * sem_util.adb, sem_util.ads (Traverse_More_Func,
760 Traverse_More_Proc): Add formal parameter for Itypes traversal.
761
762 2019-08-12 Yannick Moy <moy@adacore.com>
763
764 * exp_attr.adb, exp_attr.ads (Expand_Size_Attribute): New
765 procedure to share part of the attribute expansion with
766 GNATprove mode.
767 (Expand_N_Attribute_Reference): Extract part of the
768 Size/Object_Size expansion in the new procedure
769 Expand_Size_Attribute.
770 * exp_spark.adb (Expand_SPARK_N_Attribute_Reference): Expand
771 Size/Object_Size attributes using the new procedure
772 Expand_Size_Attribute.
773
774 2019-08-12 Yannick Moy <moy@adacore.com>
775
776 * exp_spark.adb (Expand_SPARK_N_Attribute_Reference): Only
777 expand Enum_Rep attribute when its parameter is a literal.
778
779 2019-08-12 Justin Squirek <squirek@adacore.com>
780
781 * sem_eval.adb (Check_Non_Static_Context): Add a condition to
782 determine if a range violation constitues a warning or an error.
783 (Out_Of_Range): Add a condition to determine if a range
784 violation constitues a warning or an error.
785
786 2019-08-12 Eric Botcazou <ebotcazou@adacore.com>
787
788 * exp_ch4.adb (Real_Range_Check): Do not rewrite the conversion
789 node but its expression instead, after having fetched its
790 current value. Clear the Do_Range_Check flag on entry. Return
791 early for a rewritten float-to-float conversion. Remove
792 redundant local variable. Suppress all checks when inserting
793 the temporary and do not reanalyze the node.
794
795 2019-08-12 Eric Botcazou <ebotcazou@adacore.com>
796
797 * sprint.ads: Minor comment tweak.
798
799 2019-08-12 Eric Botcazou <ebotcazou@adacore.com>
800
801 * checks.adb (Insert_Valid_Check): Do not retrieve the
802 Do_Range_Check flag from the Original_Node but from the
803 Validated_Object. Remove useless bypass for floating-point
804 types.
805
806 2019-08-12 Yannick Moy <moy@adacore.com>
807
808 * sem_util.adb, sem_util.ads (Traverse_More_Func,
809 Traverse_More_Proc): New traversal subprograms.
810
811 2019-08-12 Jerome Lambourg <lambourg@adacore.com>
812
813 * libgnarl/s-taprop__vxworks.adb (Abort_Handler): Only call
814 s-tpopsp.Self when actually needed.
815
816 2019-08-12 Eric Botcazou <ebotcazou@adacore.com>
817
818 * exp_ch4.adb (Discrete_Range_Check): Return if checks are
819 suppressed.
820
821 2019-08-12 Eric Botcazou <ebotcazou@adacore.com>
822
823 * sem_res.adb: Add with & use clause for Sem_Mech and
824 alphabetize.
825 (Resolve_Actuals): Do not apply a scalar range check for the
826 source of a conversion whose result is passed by reference to a
827 valued procedure.
828
829 2019-08-12 Eric Botcazou <ebotcazou@adacore.com>
830
831 * checks.adb (Insert_Valid_Check): Reset the Do_Range_Check flag
832 on the validated object.
833 * exp_ch6.adb (Add_Call_By_Copy_Code): Reset the Do_Range_Check
834 flag on the actual here, as well as on the Expression if the
835 actual is a N_Type_Conversion node.
836 (Add_Validation_Call_By_Copy_Code): Generate the incoming range
837 check if needed and reset the Do_Range_Check flag on the
838 Expression if the actual is a N_Type_Conversion node.
839 (Expand_Actuals): Do not reset the Do_Range_Check flag here.
840 Generate the incoming range check for In parameters here instead
841 of...
842 (Expand_Call_Helper): ...here. Remove redudant condition.
843 * sem_res.adb (Resolve_Actuals): Use local variable A_Typ and
844 remove obsolete comments.
845 (Resolve_Type_Conversion): Do not force the Do_Range_Check flag
846 on the operand if range checks are suppressed.
847
848 2019-08-12 Eric Botcazou <ebotcazou@adacore.com>
849
850 * checks.adb (Activate_Range_Check): Remove redundant argument.
851 (Generate_Range_Check): Likewise.
852 (Apply_Float_Conversion_Check): Reset the Do_Range_Check flag on
853 entry and remove redundant condition.
854
855 2019-08-02 Alexandre Oliva <oliva@adacore.com>
856
857 * libgnat/a-exexpr.adb (Begin_Handler_v1, End_Handler_v1): New.
858 (Claimed_Cleanup): New.
859 (Begin_Handler, End_Handler): Document.
860 * gcc-interface/trans.c (gigi): Switch to exception handler
861 ABI #1.
862 (Exception_Handler_to_gnu_gcc): Save the original cleanup
863 returned by begin handler, pass it to end handler, and use
864 EH_ELSE_EXPR to pass a propagating exception to end handler.
865 (gnat_to_gnu): Leave the exception pointer alone for reraise.
866 (add_cleanup): Handle EH_ELSE_EXPR, require it by itself.
867
868 2019-07-23 Ed Schonberg <schonberg@adacore.com>
869
870 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations,
871 Freeze_Entity_Checks): Include Aspect_CPU with other aspects
872 whose expresssion may depend on a discriminant, and thus require
873 that components of the type be made visible.
874
875 2019-07-23 Eric Botcazou <ebotcazou@adacore.com>
876
877 * checks.adb (Convert_And_Check_Range): Add Suppress parameter
878 and pass it in the call to Insert_Actions. Rename local
879 variable.
880 (Generate_Range_Check): Minor comment fixes. Pass Range_Check
881 in the first call to Convert_And_Check_Range and All_Checks in
882 the second call.
883 * exp_ch4.adb (Expand_N_Type_Conversion): Reset the
884 Do_Overflow_Check flag in the float-to-float case too if there
885 is also a range check.
886
887 2019-07-23 Eric Botcazou <ebotcazou@adacore.com>
888
889 * checks.adb (Activate_Overflow_Check): Remove redundant
890 argument.
891 * exp_ch4.adb (Discrete_Range_Check): Reset the overflow flag.
892 (Expand_N_Type_Conversion): Do not reset it here.
893
894 2019-07-23 Eric Botcazou <ebotcazou@adacore.com>
895
896 * repinfo.adb (List_Component_Layout): Pass Decimal to UI_Write.
897 (Write_Val): Likewise.
898
899 2019-07-23 Ed Schonberg <schonberg@adacore.com>
900
901 * aspects.ads: New table Operational_Aspect, used to distinguish
902 between aspects that are view-specific, such as those related to
903 iterators, and representation aspects that apply to all views of
904 a type.
905 * aspects.adb (Find_Aspect): If the aspect being sought is
906 operational, do not ecamine the full view of a private type to
907 retrieve it.
908 * sem_ch5.adb (Analyze_Iterator_Specification): Improve error
909 message when the intended domain of iteration does not implement
910 the required iterator aspects.
911
912 2019-07-23 Yannick Moy <moy@adacore.com>
913
914 * sem_spark.ads (Is_Local_Context): New function.
915 * sem_spark.adb (Check_Declaration): Issue errors on violations
916 of SPARK RM 3.10(4)
917 (Process_Path): Do not issue error on borrow/observe during
918 elaboration, as these are caught by the new rule.
919
920 2019-07-23 Yannick Moy <moy@adacore.com>
921
922 * exp_ch7.adb (Create_Finalizer): Force finalizer not to be
923 Ghost enabled.
924 * exp_dbug.adb (Get_External_Name): Explain special case of
925 Ghost finalizer.
926
927 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
928
929 * repinfo.adb (List_Entities): Also list compiled-generated
930 types present as Etype of objects.
931
932 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
933
934 * sinfo.ads: Update the documentation about the
935 Do_Division_Check, Do_Overflow_Check and Do_Range_Check flags.
936
937 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
938
939 * exp_ch4.adb (Expand_N_Type_Conversion): Beef up comment.
940 (Fixup_Universal_Fixed_Operation): Set the base type instead of
941 the type of the enclosing type conversion on the operation.
942
943 2019-07-22 Ed Schonberg <schonberg@adacore.com>
944
945 * exp_ch4.adb (Expand_N_In): Do not suggest the use of attribute
946 'Valid as a replacement for a range check on a discrete type
947 when the bounds of the range are given by type conversions,
948 because in such a case there are distinct types involved and the
949 subbested attribute replacement would be misplaced.
950
951 2019-07-22 Yannick Moy <moy@adacore.com>
952
953 * sem_spark.adb (Get_Root_Object, Is_Path_Expression,
954 Is_Subpath_Expression): Add parameter Is_Traversal to adapt
955 these functions to the case of paths returned from a traversal
956 function.
957 (Read_Indexes): Handle the case of an if-expression or
958 case-expression.
959 (Check_Statement): Check Emit_Messages only when issuing an
960 error message. This is important as Emit_Messages may store the
961 information that an error was detected.
962
963 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
964
965 * checks.adb (Apply_Type_Conversion_Checks): Do not set
966 Do_Range_Check flag on conversions from fixed-point types
967 either.
968 * exp_attr.adb: Add use and with clause for Expander.
969 (Expand_N_Attribute_Reference) <Fixed_Value, Integer_Value>: Set
970 the Conversion_OK flag and do not generate overflow/range checks
971 manually.
972 * exp_ch4.adb (Expand_N_Qualified_Expression): Remove
973 superfluous clearing of Do_Range_Check flag.
974 (Discrete_Range_Check): New procedure to generate a range check
975 for discrete types.
976 (Real_Range_Check): Remove redundant local variable and adjust.
977 Remove useless shortcut. Clear Do_Range_Check flag on all
978 paths.
979 (Expand_N_Type_Conversion): Remove redundant test on
980 Conversion_OK. Call Discrete_Range_Check to generate range
981 checks on discrete types. Remove obsolete code for
982 float-to-integer conversions. Add code to generate range checks
983 for conversions involving fixed-point types.
984
985 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
986
987 * sprint.ads: Fix pasto in comment.
988
989 2019-07-22 Javier Miranda <miranda@adacore.com>
990
991 * sem_res.adb (Resolve_Actuals): Replace code that displaces the
992 pointer to an allocated object to reference its secondary
993 dispatch table by a type conversion (which takes care of
994 handling all cases).
995
996 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
997
998 * sprint.adb (Sprint_Node_Actual)
999 <N_Decimal_Fixed_Point_Definition>: Swap a couple of spaces.
1000 (Write_Itype): Minor consistency fixes throughout. Add support
1001 for printing ordinary and decimal fixed-point types and
1002 subtypes.
1003
1004 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
1005
1006 * exp_attr.adb (Expand_Loop_Entry_Attribute): Beef up comment.
1007
1008 2019-07-22 Ed Schonberg <schonberg@adacore.com>
1009
1010 * libgnat/s-valboo.ads, libgnat/s-valcha.ads,
1011 libgnat/s-valdec.ads, libgnat/s-valenu.ads,
1012 libgnat/s-valint.ads, libgnat/s-vallld.ads,
1013 libgnat/s-vallli.ads, libgnat/s-valllu.ads,
1014 libgnat/s-valrea.ads, libgnat/s-valuns.ads,
1015 libgnat/s-valwch.ads: Change categorization of packages that
1016 implement attribute 'Value from Pure to Preelaborate, to prevent
1017 undesirable optimizations when the evaluation of the attribute
1018 raises Constraint_Error, but subsequent use of the result of
1019 this evsaluation is removed by a subsequent optimization.
1020
1021 2019-07-22 Ed Schonberg <schonberg@adacore.com>
1022
1023 * sem_warn.adb (Check_References): Do not emit s warning on a
1024 referenced entity with no explicit assignment if the type of the
1025 entity has Preelaborable_Initialixation, such as
1026 Exception_Occurrence.
1027
1028 2019-07-22 Javier Miranda <miranda@adacore.com>
1029
1030 * exp_ch4.adb (Size_In_Storage_Elements): Improve the expansion
1031 to handle array indexes that are modular type.
1032 (Expand_N_Allocator): For 32-bit targets improve the generation
1033 of the runtime check associated with large arrays supporting
1034 arrays initialized with a qualified expression.
1035 * libgnat/s-imenne.adb (Image_Enumeration_8,
1036 Image_Enumeration_16, Image_Enumeration_32): Define the index of
1037 Index_Table with range Natural'First .. Names'Length since in
1038 the worst case all the literals of the enumeration type would be
1039 single letter literals and the Table built by the frontend would
1040 have as many components as the length of the names string. As a
1041 result of this enhancement, the internal tables declared using
1042 Index_Table have a length closer to the real needs, thus
1043 avoiding the declaration of large arrays on 32-bit CCG targets.
1044
1045 2019-07-22 Yannick Moy <moy@adacore.com>
1046
1047 * sem_ch3.adb (Constrain_Access): Issue a message about ignored
1048 constraint.
1049
1050 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
1051
1052 * sem_ch8.adb (End_Use_Type): Reset the In_Use flag on the
1053 class-wide type if the type is tagged.
1054 (Use_One_Type): Add commentary on the handling of the class-wide
1055 type.
1056
1057 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
1058
1059 * einfo.ads (Is_For_Access_Subtype): Delete.
1060 (Set_Is_For_Access_Subtype): Likewise.
1061 * einfo.adb (Is_For_Access_Subtype): Likewise.
1062 (Set_Is_For_Access_Subtype): Likewise.
1063 (Write_Entity_Flags): Do not write Is_For_Access_Subtype.
1064 * exp_ch4.adb (Expand_N_Selected_Component): Do not deal with
1065 it.
1066 * exp_spark.adb (Expand_SPARK_N_Selected_Component): Likewise.
1067 * sem_ch4.adb (Analyze_Explicit_Dereference): Likewise.
1068 * sem_ch3.adb (Build_Discriminated_Subtype): Do not build a
1069 special private subtype for access-to-record subtypes.
1070
1071 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
1072
1073 * sem_ch3.adb (Complete_Private_Subtype): Rework the setting of
1074 the Etype of the full view for full base types that cannot
1075 contain any discriminant. Remove code and comment about it in
1076 the main path.
1077
1078 2019-07-22 Ed Schonberg <schonberg@adacore.com>
1079
1080 * sem_ch3.adb (Convert_Bound): Subsidiary of
1081 Floating_Point_Type_Declaration, to handle properly range
1082 specifications with bounds that may include static constants of
1083 a given type rather than real literals.
1084
1085 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
1086
1087 * sem_aggr.adb (Rewrite_Bound): Be prepared for discriminals
1088 too.
1089 (Rewrite_Range;): Minor tweak.
1090 (Resolve_Record_Aggregate): For a component with default
1091 initialization whose expression is an array aggregate, also
1092 rewrite the bounds of the component associations, if any.
1093
1094 2019-07-22 Gary Dismukes <dismukes@adacore.com>
1095
1096 * exp_ch5.adb (Expand_N_Case_Statement): In the case where a
1097 case statement is rewritten as an equivalent if statement,
1098 inherit the From_Condition_Expression flag from the case
1099 statement.
1100
1101 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
1102
1103 * sem_ch8.adb (Check_Constrained_Object): Further extend the
1104 special optimization to all limited types.
1105
1106 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
1107
1108 * exp_attr.adb (Expand_N_Attribute_Reference)
1109 <Attribute_Enum_Val>: Set No_Truncation on the
1110 N_Unchecked_Type_Conversion built around the argument passed to
1111 the attribute.
1112
1113 2019-07-22 Nicolas Roche <roche@adacore.com>
1114
1115 * libgnat/s-valrea.adb (Scan_Real): Ignore non significative
1116 digits to avoid converging to infinity in some cases.
1117
1118 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
1119
1120 * libgnat/g-encstr.adb (Encode_Wide_String): Fix oversight.
1121 (Encode_Wide_Wide_String): Likewise.
1122
1123 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
1124
1125 * sem_warn.adb (Find_Var): Bail out for a function call with an
1126 Out or In/Out parameter.
1127
1128 2019-07-22 Nicolas Roche <roche@adacore.com>
1129
1130 * terminals.c (__gnat_tty_waitpid): Support both blocking and
1131 not blocking mode.
1132 * libgnat/g-exptty.ads (Is_Process_Running): New function.
1133 * libgnat/g-exptty.adb (Close): Don't try to interrupt/terminate
1134 a process if it is already dead.
1135
1136 2019-07-22 Ed Schonberg <schonberg@adacore.com>
1137
1138 * freeze.adb (Freeze_Fixed_Point_Type): When freezing a
1139 fixed-point subtype, check whether the parent type declarastion
1140 includes an aspect specification for the 'Small type attribute,
1141 and inherit the specified value.
1142
1143 2019-07-22 Javier Miranda <miranda@adacore.com>
1144
1145 * freeze.adb (Freeze_Subprogram): Check that C++ constructors
1146 must have external or link name.
1147
1148 2019-07-22 Ed Schonberg <schonberg@adacore.com>
1149
1150 * sem_res.adb (Resolve_Selected_Component): If the prefix has a
1151 deferred reference, generate the correct reference now, to
1152 indicate that the previous assignment is used. This prevents
1153 spurious warnings on useless assignments when compiling with all
1154 warnings enabled. when there is a subsequent call in the same
1155 stqtement list, in which the prefix of the selected component is
1156 the actual for an out parameter.
1157
1158 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
1159
1160 * exp_attr.adb (Expand_Loop_Entry_Attribute): Copy the condition
1161 of a while loop instead of simply relocating it.
1162
1163 2019-07-18 Arnaud Charlet <charlet@adacore.com>
1164
1165 * Makefile.rtl, expect.c, env.c, aux-io.c, mkdir.c, initialize.c,
1166 cstreams.c, raise.c, tracebak.c, adadecode.c, init.c, raise-gcc.c,
1167 argv.c, adaint.c, adaint.h, ctrl_c.c, sysdep.c, rtinit.c, cio.c,
1168 seh_init.c, exit.c, targext.c: Introduce a "STANDALONE" mode where C
1169 runtime files do not have any dependency on GCC include files.
1170 Remove unnecessary includes.
1171 Remove remaining references to VMS in runtime C file.
1172 * runtime.h: new File.
1173
1174 2019-07-13 Andreas Schwab <schwab@linux-m68k.org>
1175
1176 * Makefile.rtl: Use g-sercom__linux.adb for all linuxes.
1177
1178 2019-07-11 Piotr Trojanek <trojanek@adacore.com>
1179
1180 * lib-writ.adb (Ensure_System_Dependency,
1181 Up_To_Date_ALI_File_Exists, Write_ALI): Replace low-level access
1182 to table with a high-level query.
1183
1184 2019-07-11 Piotr Trojanek <trojanek@adacore.com>
1185
1186 * checks.adb: Fix typo in comment.
1187 * sem.adb (Semantics): Avoid repeated calls to
1188 In_Extended_Main_Source_Unit by reusing an already-cached
1189 result.
1190 * sem_util.adb (First_Global): Fix style.
1191
1192 2019-07-11 Yannick Moy <moy@adacore.com>
1193
1194 * sem_res.adb (Resolve_Call): Do not perform dimensionality
1195 checking on inlined bodies.
1196
1197 2019-07-11 Yannick Moy <moy@adacore.com>
1198
1199 * debug.adb: Flip meaning of debug switch -gnatdF.
1200
1201 2019-07-11 Yannick Moy <moy@adacore.com>
1202
1203 * sem_eval.adb (Is_Same_Value): Add special case for rewritten
1204 Loop_Entry attribute.
1205
1206 2019-07-11 Claire Dross <dross@adacore.com>
1207
1208 * gnat1drv.adb: SPARK checking rules for pointer aliasing are
1209 moved to GNATprove backend.
1210 * sem_spark.ads, sem_spark.adb (Sem_SPARK): Is now a generic
1211 unit. Takes as parameters:
1212 - Retysp which is used to query the most underlying type
1213 visible in SPARK. We do not introduce aliasing checks for
1214 types which are not visibly deep.
1215 - Component_Is_Visible_In_SPARK is used to avoid doing pointer
1216 aliasing checks on components which are not visible in SPARK.
1217 - Emit_Messages returns True in the second phase of SPARK
1218 analysis. Error messages for failed aliasing checks are only
1219 output in this case.
1220 Additionally, errors on constructs not supported in SPARK are
1221 removed as duplicates of marking errors. Components are stored
1222 in the permission map using their original component to avoid
1223 inconsistencies between components of different views of the
1224 same type.
1225 (Check_Expression): Handle delta constraints.
1226 (Is_Deep): Exported so that we can check for SPARK restrictions
1227 on deep types inside SPARK semantic checkings.
1228 (Is_Traversal_Function): Exported so that we can check for SPARK
1229 restrictions on traversal functions inside SPARK semantic
1230 checkings.
1231 (Check_Call_Statement, Read_Indexes): Check wether we are
1232 dealing with a subprogram pointer type before querying called
1233 entity.
1234 (Is_Subpath_Expression): Image attribute can appear inside a
1235 path.
1236 (Check_Loop_Statement): Correct order of statements in the loop.
1237 (Check_Node): Ignore raise nodes.
1238 (Check_Statement): Use Last_Non_Pragma to get the object
1239 declaration in an extended return statement.
1240
1241 2019-07-11 Patrick Bernardi <bernardi@adacore.com>
1242
1243 * bindgen.adb (Gen_Main): Do not generate a reference to
1244 Ada_Main_Program_Name when the Minimal_Binder flag is set.
1245 (Gen_Output_File_Ada): Do not output GNAT_Version and
1246 Ada_Main_Program_Name info if Minimal_Binder flag is set.
1247 * bindusg.adb: Add documentation for new -minimal switch.
1248 * gnatbind.adb (Scan_Bind_Arg): Scan -minimal switch.
1249 * opt.ads: Add new global flag Minimal_Binder to indicate if the
1250 binder should not produce global variables.
1251 * doc/gnat_ugn/building_executable_programs_with_gnat.rst:
1252 Update documentation with new binder -minimal switch.
1253 * gnat_ugn.texi: Regenerate.
1254
1255 2019-07-11 Eric Botcazou <ebotcazou@adacore.com>
1256
1257 * Makefile.rtl: Add warning note about compilation flags and
1258 capitalize.
1259
1260 2019-07-11 Ed Schonberg <schonberg@adacore.com>
1261
1262 * exp_ch9.adb (Expand_N_Protected_Type_Declaaration): New
1263 subsidiary routine Replace_Access_Definition, to handle properly
1264 a protected type PT one of whose private components is of type
1265 access PT.
1266
1267 2019-07-11 Dmitriy Anisimkov <anisimko@adacore.com>
1268
1269 * libgnat/g-socket.ads (Level_Type): Add enumerators for
1270 IP_Protocol_For_ICMP, IP_Protocol_For_IGMP,
1271 IP_Protocol_For_RAW_Level.
1272 * libgnat/g-socket.adb (Levels): Handle them.
1273 * s-oscons-tmplt.c: Import socket protocols defined in
1274 netinet/in.h.
1275
1276 2019-07-11 Claire Dross <dross@adacore.com>
1277
1278 * libgnat/a-cfhama.adb, libgnat/a-cfhase.adb (Free): Do not
1279 reset the Has_Element flag if no element is freed.
1280
1281 2019-07-11 Arnaud Charlet <charlet@adacore.com>
1282
1283 * errno.c: Remove obsolete support for MaRTE OS.
1284
1285 2019-07-11 Ed Schonberg <schonberg@adacore.com>
1286
1287 * exp_ch4.adb (Expand_N_Type_Conversion): If a predicate check
1288 is generated, analyze it with range check suppressed, because
1289 that check has been previously applied.
1290 * exp_ch5.adb (Expand_N_Assignment_Statement): If the RHS is a
1291 type conversion to the type of the LHS, do not apply a predicate
1292 check to the RHS because it will have been generated already
1293 during its expansion.
1294 * exp_ch6.adb (Can_Fold_Predicate_Call): Extend processing to
1295 handle a predicate check on a constant entity whose value is
1296 static.
1297
1298 2019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
1299
1300 * bindo.adb: Remove the documentation of switch -d_N because it
1301 is no longer in use.
1302 * bindo-graphs.ads, bindo-graphs.adb (Is_Spec_Before_Body_Edge):
1303 New routine.
1304 * bindo-writers.adb (Write_Dependency_Edge): Add the missing
1305 case of a spec-before-body edge.
1306
1307 2019-07-11 Dmitriy Anisimkov <anisimko@adacore.com>
1308
1309 * libgnat/g-socket.ads (Mode_Type): Add a Socket_Raw enumerator.
1310 * libgnat/g-socket.adb (Modes): Handle Socket_Raw.
1311
1312 2019-07-11 Justin Squirek <squirek@adacore.com>
1313
1314 * exp_ch9.adb (Build_Private_Protected_Declaration): Add
1315 exception for the moving of pragmas to internally generated
1316 specs for pragma Unreferenced.
1317
1318 2019-07-11 Bob Duff <duff@adacore.com>
1319
1320 * doc/gnat_ugn/gnat_utility_programs.rst: Fix inconsistent
1321 documentation for gnatmetric.
1322 * gnat_ugn.texi: Regenerate.
1323
1324 2019-07-11 Bob Duff <duff@adacore.com>
1325
1326 * doc/gnat_ugn/gnat_utility_programs.rst: Document gnatpp's
1327 --spaces-only switch.
1328
1329 2019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
1330
1331 * sem_util.adb (Null_Status): Assume that an erroneous construct
1332 has an undefined null status.
1333
1334 2019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
1335
1336 * checks.adb, exp_ch6.adb, gnat1drv.adb, sem_aux.adb,
1337 sem_ch2.adb, sem_ch8.adb, sem_res.adb: Minor reformatting.
1338
1339 2019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
1340
1341 * sem_ch8.adb (Analyze_Object_Renaming): Obtain the object being
1342 renamed using routine Get_Object_Name which takes care of
1343 various name forms.
1344 (Get_Object_Name): New routine.
1345
1346 2019-07-11 Ed Schonberg <schonberg@adacore.com>
1347
1348 * exp_ch6.adb (Can_Fold_Predicate_Call): New function,
1349 subsidiary of Expand_Call_Helper, to compute statically a
1350 predicate check when the argument is a static integer.
1351
1352 2019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
1353
1354 * sem_res.adb (Resolve_Op_Not): Do not rewrite an equality
1355 operator into a function call when the operator is intrinsic.
1356
1357 2019-07-11 Thomas Quinot <quinot@adacore.com>
1358
1359 * sem_prag.adb (Analyze_Pragma, case pragma Check): Do not call
1360 Set_SCO_Pragma_Enabled for the dynamic predicate case.
1361
1362 2019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
1363
1364 * exp_util.ads, exp_util.adb (Needs_Finalization): Move to
1365 Sem_Util.
1366 * sem_ch9.adb (Analyze_Protected_Definition): Code cleanup. Mark
1367 the protected type as having controlled components when it
1368 contains at least one such component.
1369 * sem_util.ads, sem_util.adb (Needs_Finalization): New
1370 function.
1371
1372 2019-07-11 Eric Botcazou <ebotcazou@adacore.com>
1373
1374 * alloc.ads (Rep_JSON_Table_Initial): New constant.
1375 (Rep_JSON_Table_Increment): Likewise.
1376 * debug.adb: Document -gnatd_j switch.
1377 * gcc-interface/Make-lang.in (GNAT_ADA_OBJS): Add
1378 repinfo-input.o.
1379 * gnat1drv.adb: Add with clause for Repinfo.Input.
1380 Add with and use clauses for Sinput.
1381 (Read_JSON_Files_For_Repinfo): New procedure.
1382 (Gnat1drv1): Deal with -gnatd_j switch.
1383 * repinfo-input.ad[sb]: New unit.
1384 * snames.ads-tmpl (Name_Discriminant): New constant.
1385 (Name_Operands): Likewise.
1386
1387 2019-07-11 Justin Squirek <squirek@adacore.com>
1388
1389 * checks.adb (Apply_Accessibility_Check): Add check for constant
1390 folded conditions on accessibility checks.
1391
1392 2019-07-11 Arnaud Charlet <charlet@adacore.com>
1393
1394 * libgnarl/g-thread.ads, libgnarl/g-thread.adb (Get_Thread):
1395 Update comments. Add new version taking a Task_Id.
1396
1397 2019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
1398
1399 * bindo.adb: Update the section of switches and debugging
1400 elaboration issues.
1401 * bindo.ads: Add type Elaboration_Phase.
1402 * bindo-augmentors.adb: Add use clause for
1403 Bindo.Writers.Phase_Writers.
1404 (Augment_Library_Graph): Signal the start and end of the
1405 aubmentation phase.
1406 * bindo-builders.adb: Add with and use clause for Bindo.Writers.
1407 Add use clause for Bindo.Writers.Phase_Writers.
1408 (Build_Invocation_Graph): Signal the start and end of the
1409 invocation graph construction phase.
1410 (Build_Library_Graph): Signal the start and end of the library
1411 graph construction phase.
1412 * bindo-diagnostics.adb: Add use clause for
1413 Bindo.Writers.Phase_Writers.
1414 (Diagnose_Cycle): Signal the start and end of the cycle
1415 diagnostic phase.
1416 * bindo-elaborators.adb: Add use clause for
1417 Bindo.Writers.Phase_Writers.
1418 (Elaborate_Units): Signal the start and end of the unit
1419 elaboration phase.
1420 * bindo-graphs.adb: Add use clause for
1421 Bindo.Writers.Phase_Writers.
1422 (Find_Components): Signal the start and end of the component
1423 discovery phase.
1424 (Find_Cycles): Signal the start and end of the cycle discovery
1425 phase.
1426 * bindo-units.adb: Add with and use clause for Bindo.Writers.
1427 Add use clause for Bindo.Writers.Phase_Writers.
1428 (Collect_Elaborable_Units): Signal the start and end of the unit
1429 collection phase.
1430 * bindo-validators.adb: Add with and use clause for
1431 Bindo.Writers. Add use clause for Bindo.Writers.Phase_Writers.
1432 (Validate_Cycles, Validate_Elaboration_Order,
1433 Validate_Invocation_Graph, Validate_Library_Graph): Signal the
1434 start and end of the libray graph validation phase.
1435 * bindo-writers.ads, bindo-writers.adb: Add new nested package
1436 Phase_Writers.
1437 * debug.adb: Update the documentation of switch d_S.
1438
1439 2019-07-11 Yannick Moy <moy@adacore.com>
1440
1441 * sem_res.adb (Check_Argument_Order): Special case calls to
1442 operators.
1443
1444 2019-07-10 Dmitriy Anisimkov <anisimko@adacore.com>
1445
1446 * libgnat/s-ststop.adb: Remove System.Strings.Stream_Ops
1447 dependence on System.Streams.Stream_IO.
1448
1449 2019-07-10 Ed Schonberg <schonberg@adacore.com>
1450
1451 * sem_ch2.adb (Analyze_Integer_Literal): Preserve the type of
1452 the literal if prior analysis determined that its type is a
1453 modular integer type.
1454
1455 2019-07-10 Doug Rupp <rupp@adacore.com>
1456
1457 * init.c: Do not attempt to re-arm guard page on x86_64-vx7(r2).
1458
1459 2019-07-10 Ed Schonberg <schonberg@adacore.com>
1460
1461 * sem_ch8.adb (Check_Constrained_Object): A record that is
1462 limited because of the presence of a limited component is
1463 constrained, and no subtype indiciation needs to be created for
1464 it, just as is the case for declared limited records.
1465
1466 2019-07-10 Yannick Moy <moy@adacore.com>
1467
1468 * sem_aux.adb, sem_aux.ads (Is_Protected_Operation): New
1469 function to determine if a subprogram is protected.
1470 * sem_spark.adb (Setup_Protected_Components): New procedure to
1471 add protected components to the environment.
1472 (Check_Callable_Body): Call the new Setup_Protected_Components.
1473 (Check_Package_Spec): Merge local environment with enclosing one
1474 when done.
1475
1476 2019-07-10 Claire Dross <dross@adacore.com>
1477
1478 * sem_spark.adb (Check_Expression): Allow digits constraints as
1479 input.
1480 (Illegal_Global_Usage): Pass in the entity.
1481 (Is_Subpath_Expression): New function to allow different nodes
1482 as inner parts of a path expression.
1483 (Read_Indexes): Allow concatenation and aggregates with box
1484 expressions. Allow attributes Update and Loop_Entry.
1485 (Check_Expression): Allow richer membership test.
1486 (Check_Node): Ignore bodies of generics.
1487 (Get_Root_Object): Allow concatenation and attributes.
1488
1489 2019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
1490
1491 * sem_ch6.adb (Check_Discriminant_Conformance): Use Find_Type to
1492 discover the type of a full view discriminant.
1493
1494 2019-07-10 Arnaud Charlet <charlet@adacore.com>
1495
1496 * doc/gnat_ugn/gnat_and_program_execution.rst: Improve gnatmem's
1497 doc for the depth switch.
1498
1499 2019-07-10 Bob Duff <duff@adacore.com>
1500
1501 * doc/gnat_ugn/gnat_utility_programs.rst: Document gnatpp's
1502 --source-line-breaks switch.
1503
1504 2019-07-10 Justin Squirek <squirek@adacore.com>
1505
1506 * doc/gnat_rm/implementation_defined_attributes.rst: Add mention
1507 of 'Image attribute with 'Img's entry to mention additional
1508 added 2012 usage of Obj'Image.
1509 * doc/gnat_rm/implementation_defined_pragmas.rst: Correct
1510 mispelling of Async_Writers.
1511 * gnat_rm.texi: Regenerate.
1512 * sem_prag.adb (Analyze_Pragma): Correct mispelling of
1513 Async_Writers.
1514 * sem_util.adb (State_Has_Enabled_Property): Correct mispelling
1515 of Async_Writers.
1516
1517 2019-07-10 Simon Buist <buist@adacore.com>
1518
1519 * sem_util.ads (Child_Prefix): New constant.
1520 * sem_util.adb (Unique_Name): Add a special prefix to child
1521 units that have a nested subprogram or package.
1522
1523 2019-07-10 Arnaud Charlet <charlet@adacore.com>
1524
1525 * sfn_scan.adb (Scan_SFN_Pragmas): Add pragma Assert.
1526
1527 2019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
1528
1529 * sem_ch3.adb (Check_Nonoverridable_Aspects): Correct the
1530 spelling in certain error messages.
1531 (Check_Pragma_Implemented): Correct the spelling in certain
1532 error messages.
1533
1534 2019-07-10 Eric Botcazou <ebotcazou@adacore.com>
1535
1536 * Makefile.rtl (GNATRTL_NONTASKING_OBJS): Add g-brapre.
1537 * libgnat/g-brapre.ads: New package specification.
1538 * doc/gnat_rm/the_gnat_library.rst: Document it.
1539 * gnat_rm.texi: Regenerate.
1540
1541 2019-07-10 Yannick Moy <moy@adacore.com>
1542
1543 * osint-c.adb (Set_File_Name): Always add extension for multiple
1544 units per file mode.
1545
1546 2019-07-10 Corentin Gay <gay@adacore.com>
1547
1548 * sysdep.c: Put include directive for 'vxWorks.h' before any
1549 other VxWorks headers.
1550
1551 2019-07-10 Eric Botcazou <ebotcazou@adacore.com>
1552
1553 * doc/gnat_rm/implementation_defined_attributes.rst
1554 (Scalar_Storage_Order): Minor tweaks. Add note about debuggers.
1555 * gnat_rm.texi: Regenerate.
1556
1557 2019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
1558
1559 * exp_ch4.adb (Expand_N_Case_Expression): Mark the generated
1560 assignments to the temporary result as being OK because the
1561 expansion of case expressions is correct by construction.
1562 (Is_Copy_Type): Update the predicate to match the comment
1563 within.
1564
1565 2019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
1566
1567 * bindo-graphs.adb, bindo.adb, debug.adb, exp_ch6.adb,
1568 sem_ch10.adb, sem_ch13.adb, sem_ch3.adb, sem_ch4.adb,
1569 sem_ch6.adb, sem_ch7.adb, sem_res.adb, sem_spark.adb,
1570 sem_util.adb, warnsw.ads: Minor reformatting.
1571
1572 2019-07-10 Joffrey Huguet <huguet@adacore.com>
1573
1574 * libgnat/a-strbou.ads, libgnat/a-strfix.ads,
1575 libgnat/a-strunb.ads, libgnat/a-strunb__shared.ads: Add global
1576 contracts, contract cases, preconditions and postconditions to
1577 procedures and functions.
1578
1579 2019-07-10 Doug Rupp <rupp@adacore.com>
1580
1581 * sysdep.c (__gnat_is_file_not_found_error): Reformulate to also
1582 work for vxworks7r2 SR0610.
1583
1584 2019-07-10 Doug Rupp <rupp@adacore.com>
1585
1586 * env.c (__gnat_environ): Reformulate to also work for
1587 vxworks7r2 SR0610.
1588
1589 2019-07-10 Patrick Bernardi <bernardi@adacore.com>
1590
1591 * Makefile.rtl: Handle vxworks7r2 ppc target
1592
1593 2019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
1594
1595 * bindo.adb: Update the section on switches.
1596 * bindo-graphs.adb
1597 (Add_Cycle, Add_Vertex_And_Complement): Remove.
1598 (Create): The graph no longer needs a set of recorded cycles
1599 because the cycles are not rediscovered in permuted forms.
1600 (Cycle_End_Vertices): New routine.
1601 (Destroy): The graph no longer needs a set of recorded cycles
1602 because the cycles are not rediscovered in permuted forms.
1603 (Destroy_Library_Graph_Vertex): Move to the library level.
1604 (Find_All_Cycles_Through_Vertex, Find_All_Cycles_With_Edge):
1605 Remove.
1606 (Find_Cycles_From_Successor, Find_Cycles_From_Vertex,
1607 Find_Cycles_In_Component, Has_Elaborate_All_Edge): New routines.
1608 (Insert_And_Sort): Remove.
1609 (Is_Elaborate_Body_Edge): Use predicate
1610 Is_Vertex_With_Elaborate_Body.
1611 (Is_Recorded_Cycle): Remove.
1612 (Is_Vertex_With_Elaborate_Body): New routine.
1613 (Normalize_And_Add_Cycle): Remove.
1614 (Precedence): Rename to xxx_Precedence, where xxx relates to the
1615 input. These versions better reflect the desired input
1616 precedence.
1617 (Record_Cycle): New routine.
1618 (Remove_Vertex_And_Complement, Set_Is_Recorded_Cycle): Remove.
1619 (Trace_xxx): Update all versions to use debug switch -d_t.
1620 (Trace_Component): New routine.
1621 (Trace_Eol): Removed.
1622 (Trace_Vertex): Do not output the component as this information
1623 is already available when the component is traced.
1624 (Unvisit, Visit): New routine.
1625 * bindo-graphs.ads: Add new instance LGV_Lists. Remove instance
1626 RC_Sets. Update the structure of type Library_Graph_Attributes
1627 to remove the set of recorded cycles.
1628 (Destroy_Library_Graph_Vertex): Move to the library level.
1629 * bindo-writers.adb (Write_Component_Vertices): Output
1630 information about the number of vertices.
1631 * debug.adb: Document the use of binder switch -d_t. Update the
1632 use of binder switch -d_T.
1633
1634 2019-07-10 Yannick Moy <moy@adacore.com>
1635
1636 * sem_spark.adb (Get_Root_Object): Replace precondition by error
1637 message.
1638 (Read_Indexes): Replace precondition by error message.
1639 (Check_Callable_Body): Check only traversal function returns an
1640 anonymous access type.
1641 (Check_Expression): Issue error on unexpected expression as
1642 path.
1643 * sem_util.adb (First_Global): Fix access to global on
1644 entry/task.
1645
1646 2019-07-10 Javier Miranda <miranda@adacore.com>
1647
1648 * exp_ch6.adb (Is_Class_Wide_Interface_Type): New subprogram.
1649 (Expand_Call_Helper): Handle non-limited views when we check if
1650 any formal is a class-wide interface type.
1651 * exp_disp.adb (Expand_Interface_Actuals): Handle non-limited
1652 views when we look for interface type formals to force "this"
1653 displacement.
1654
1655 2019-07-10 Ed Schonberg <schonberg@adacore.com>
1656
1657 * sem_res.adb (Resolve_Equality_Op): Do not replace the resolved
1658 operator by its alias if expander is not active, because the
1659 operand type may not be frozen yet and its inherited operations
1660 have not yet been created.
1661
1662 2019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
1663
1664 * bindo-elaborators.adb (Elaborate_Units): Set attribute
1665 Elab_Position of all elaborated units.
1666 (Set_Unit_Elaboration_Positions): New routine.
1667
1668 2019-07-10 Gary Dismukes <dismukes@adacore.com>
1669
1670 * exp_util.adb: Reformatting and a typo fix.
1671
1672 2019-07-10 Yannick Moy <moy@adacore.com>
1673
1674 * exp_util.adb (Remove_Side_Effects): Prefer renamings for
1675 objects of possible owning type in GNATprove mode.
1676
1677 2019-07-09 Ed Schonberg <schonberg@adacore.com>
1678
1679 * sem_ch3.adb (Analyze_Object_Declaration): If the object type
1680 is a composite type that has a dynamic predicate and, the
1681 expression in the declaration is an aggregate, the generated
1682 predicate check must appear after the expanded code for the
1683 aggregate, which will appear after the rewritten object
1684 declarastion.
1685
1686 2019-07-09 Justin Squirek <squirek@adacore.com>
1687
1688 * sem_eval.adb (Expr_Value_E): Add conditional to correctly
1689 handle constant enumerated character types.
1690
1691 2019-07-09 Eric Botcazou <ebotcazou@adacore.com>
1692
1693 * libgnarl/s-osinte__mingw.ads (CRITICAL_SECTION): Use proper
1694 type for SpinCount component.
1695
1696 2019-07-09 Justin Squirek <squirek@adacore.com>
1697
1698 * exp_ch4.adb (Expand_N_Allocator): Add conditional to detect
1699 the presence of anoymous access type allocators and issue a
1700 warning if the appropriate warning flag is enabled.
1701 * warnsw.ads: Add new warning flag for anonymous allocators
1702 * warnsw.adb (All_Warnings, Restore_Warnings, Save_Warnings,
1703 Set_Underscore_Warning_Switch): Register new flags.
1704 (WA_Warnings): Register new flag as an "all warnings" switch
1705 * usage.adb,
1706 doc/gnat_ugn/building_executable_programs_with_gnat.rst:
1707 Document new warning switches -gnatw_a and -gnatw_A.
1708 * gnat_ugn.texi: Regenerate.
1709
1710 2019-07-09 Ed Schonberg <schonberg@adacore.com>
1711
1712 * sem_ch4.adb (Diagnose_Call): Improve error recovery when a
1713 local subprogram name hides a possible candidate name declared
1714 in a child package in the context of the current unit.
1715 * sem_ch6.adb (Process_Formals): Protect against malformed
1716 formal types when the parameter type does not denote an entity.
1717
1718 2019-07-09 Hristian Kirtchev <kirtchev@adacore.com>
1719
1720 * bindo-augmentors.adb (Visit_Elaboration_Root): Do not start a
1721 DFS from an elaboration root whose corresponding unit lacks
1722 elaboration code. This behavior mimics that of the old
1723 elaboration order mechanism.
1724 * bindo-graphs.adb (Find_All_Cycles_Through_Vertex): Move the
1725 vertex tracing within the functional branches of the routine.
1726 This prevents spurious trace output.
1727 (Has_No_Elaboration_Code): New routine.
1728 (Trace_Cycle, Trace_Edge): Update the various Ids to use the
1729 "standard" trace format.
1730 * bindo-graphs.ads (Has_No_Elaboration_Code): New routine.
1731 * bindo-units.ads, bindo-units.adb (Has_No_Elaboration_Code):
1732 New routine.
1733
1734 2019-07-09 Piotr Trojanek <trojanek@adacore.com>
1735
1736 * ali.ads, bindo-graphs.adb, bindo-validators.adb, clean.adb,
1737 doc/gnat_ugn/elaboration_order_handling_in_gnat.rst, einfo.ads,
1738 exp_aggr.adb, exp_ch13.adb, exp_ch4.adb, exp_ch5.adb,
1739 exp_ch6.adb, exp_ch7.adb, exp_ch9.adb, exp_pakd.adb,
1740 fname-uf.ads, gnatlink.adb, inline.adb, lib.ads, make.adb,
1741 namet.ads, opt.ads, par-ch4.adb, par-ch6.adb, par-labl.adb,
1742 prep.adb, sem_aggr.adb, sem_ch13.adb, sem_ch4.adb, sem_ch5.adb,
1743 sem_ch6.adb, sem_ch6.ads, sem_ch7.adb, sem_ch8.adb, sem_dim.adb,
1744 sem_disp.adb, sem_prag.adb, sem_res.adb, sem_warn.adb,
1745 sinfo.ads: Replace ". " with ". ". Minor reformatting and typo
1746 corrections.
1747 * gnat_ugn.texi: Generate.
1748
1749 2019-07-09 Hristian Kirtchev <kirtchev@adacore.com>
1750
1751 * bindo.ads: Move type Precedence_Kind from the private to the
1752 visible part of the unit.
1753 * bindo-augmentors.adb: Remove the use of global data as it is
1754 bad practice.
1755 (Augment_Library_Graph): Update the parameter profile.
1756 (Is_Visited, Set_Is_Visited): Remove.
1757 (Visit_Elaboration_Root, Visit_Elaboration_Roots): Update the
1758 parameter profile and comment on usage.
1759 (Visit_Vertex): Likewise. Also keep track of which invocation
1760 edge activates a task.
1761 * bindo-augmentors.ads (Augment_Library_Graph): Update the
1762 parameter profile and comment on usage.
1763 * bindo-builders.adb (Create_Forced_Edge,
1764 Create_Spec_And_Body_Edge, Create_With_Edge): Update the call to
1765 Add_Edge.
1766 * bindo-diagnostics.adb: Add with end use clauses for Restrict
1767 and Rident.
1768 (Output_Dynamic_Model_Suggestions): Remove.
1769 (Output_Invocation_Related_Suggestions): New routine.
1770 (Output_Suggestions): Output all invocation-related suggestions
1771 together.
1772 * bindo-elaborators.adb: Remove types Comparator_Ptr and
1773 Predicate_Ptr.
1774 (Find_Best_Vertex): Update the parameter profile.
1775 * bindo-graphs.adb (Activates_Task): New routine.
1776 (Add_Body_Before_Spec_Edge): Update the call to
1777 Add_Edge_With_Return.
1778 (Add_Edge): Update the parameter profile and the call to
1779 Add_Edge_With_Return.
1780 (Add_Edge_With_Return): Update the parameter profile and comment
1781 on usage.
1782 (At_Least_One_Edge_Satisfies): New routine.
1783 (Contains_Elaborate_All_Edge): Reimplement.
1784 (Contains_Static_Successor_Edge, Contains_Task_Activation): New
1785 routine.
1786 (Contains_Weak_Static_Successor): Remove.
1787 (Is_Static_Successor_Edge): New routine.
1788 * bindo-graphs.ads: Add types LGE_Predicate_Ptr,
1789 LGV_Comparator_Ptr, and LGV_Predicate_Ptr. Update type
1790 Library_Graph_Edge_Attributes to capture whether an invocation
1791 edge activates a task. Update the value of
1792 No_Library_Graph_Edge_Attributes.
1793 (Activates_Task): Update the parameter profile and comment on
1794 usage.
1795 (Contains_Static_Successor_Edge, Contains_Task_Activation): New
1796 routines.
1797 (Contains_Weak_Static_Successor): Remove.
1798 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst:
1799 Update the documentation to reflect the new task-related advice.
1800 * gnat_ugn.texi: Regenerate.
1801
1802 2019-07-09 Piotr Trojanek <trojanek@adacore.com>
1803
1804 * exp_util.adb (Containing_Package_With_Ext_Axioms): Replace
1805 low-level Ekind test with a high-level wrapper.
1806
1807 2019-07-09 Arnaud Charlet <charlet@adacore.com>
1808
1809 * libgnat/s-memory.adb: Disable calls to Abort defer/undefer
1810 when ZCX_By_Default.
1811
1812 2019-07-09 Javier Miranda <miranda@adacore.com>
1813
1814 * sem_ch13.adb (Rep_Item_Too_Early): Representation clauses are
1815 not allowed for a derivation of a generic type. Extend the
1816 current test to check that none of the parents is a generic
1817 type.
1818
1819 2019-07-09 Hristian Kirtchev <kirtchev@adacore.com>
1820
1821 * exp_ch9.adb, exp_util.adb, repinfo.adb, sem_ch12.adb,
1822 sem_prag.adb, sem_res.adb, sem_spark.adb, sem_util.adb: Minor
1823 reformatting.
1824
1825 2019-07-09 Ed Schonberg <schonberg@adacore.com>
1826
1827 * sem_res.adb (Resolve_Equality_Op): If the node was overloaded,
1828 set properly the entity to which the node has been resolved. The
1829 original entity is the first one found during analysis, and is
1830 not necessarily the resolved one.
1831 (Resolve_Op_Not): If the argument of negation is an overloaded
1832 equality operation, call its resolution directly given that the
1833 context type does not participate in overload resolution.
1834
1835 2019-07-09 Hristian Kirtchev <kirtchev@adacore.com>
1836
1837 * bindo.adb: Remove with and use clauses for Debug. Add with
1838 and use clauses for Opt.
1839 (Find_Elaboration_Order): Enable the v4.0 elaboration order. The
1840 v3.0 mechanism is now available under binder switch -H.
1841 * bindusg.adb (Display): Enable switch -H.
1842 * debug.adb: Free compiler switch -gnatd_G. Free binder switch
1843 -d_N.
1844 * sem_elab.adb: Update the section on switches to remove
1845 -gnatd_G.
1846 (Invocation_Graph_Recording_OK): The invocation graph is now
1847 unconditionally recorded in ALI files.
1848 * switch-b.adb (Scan_Binder_Switches): Scan switch -H.
1849 * doc/gnat_ugn/building_executable_programs_with_gnat.rst:
1850 Update the documentation on compiler switches related to
1851 elaboration. Update the documentation on binder switches to
1852 include switch -H.
1853 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update
1854 the documentation on elaboration order handling in GNAT.
1855 * gnat_ugn.texi: Regenerate.
1856
1857 2019-07-09 Eric Botcazou <ebotcazou@adacore.com>
1858
1859 * repinfo.adb (List_Entities): Disregard formals altogether.
1860 (List_Name): Properly escape the double quote in the JSON
1861 output.
1862
1863 2019-07-09 Javier Miranda <miranda@adacore.com>
1864
1865 * exp_util.adb (Remove_Side_Effects): Preserve the
1866 Do_Range_Check flag.
1867
1868 2019-07-09 Yannick Moy <moy@adacore.com>
1869
1870 * sinfo.ads: Refine comment for Do_Range_Check.
1871
1872 2019-07-09 Yannick Moy <moy@adacore.com>
1873
1874 * exp_spark.adb (Expand_SPARK_N_Attribute_Reference): Expand
1875 attribute reference on Enum_Rep.
1876
1877 2019-07-09 Ed Schonberg <schonberg@adacore.com>
1878
1879 * sem_ch12.adb (Instantiate_Formal_Package): Handle properly the
1880 case where the actual for a formal package in an instance is the
1881 current instance of an enclosing generic package.
1882 (Check_Formal_Packages): If the formal package declaration is
1883 box-initialized or lacks associations altogether, no internal
1884 instance was created to verify conformance, and there is no
1885 validating package to remove from tree.
1886
1887 2019-07-09 Yannick Moy <moy@adacore.com>
1888
1889 * freeze.adb (Build_Renamed_Body): Do not set body to inline in
1890 GNATprove mode.
1891
1892 2019-07-09 Yannick Moy <moy@adacore.com>
1893
1894 * exp_util.adb (Expand_Subtype_From_Expr): Still expand the type
1895 of static expressions in GNATprove_Mode.
1896 * sem_ch3.adb (Analyze_Object_Declaration): Remove obsolete
1897 special case for GNATprove_Mode.
1898
1899 2019-07-09 Piotr Trojanek <trojanek@adacore.com>
1900
1901 * doc/gnat_rm/the_gnat_library.rst,
1902 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
1903 erroutc.adb, libgnat/g-comlin.adb, libgnat/g-comlin.ads,
1904 libgnat/g-regexp.ads, libgnat/g-regpat.ads,
1905 libgnat/g-spipat.ads, libgnat/s-os_lib.ads,
1906 libgnat/s-regexp.ads: Reword "wild card" to "wildcard".
1907 * gnat_rm.texi, gnat_ugn.texi: Regenerate.
1908
1909 2019-07-09 Yannick Moy <moy@adacore.com>
1910
1911 * sem_spark.adb (Check_Expression): Handle correctly implicit
1912 assignments as part of allocators and (extension) aggregates.
1913 (Get_Root_Object): Adapt for new path expressions.
1914 (Is_Path_Expression): Return True for (extension) aggregate.
1915
1916 2019-07-09 Piotr Trojanek <trojanek@adacore.com>
1917
1918 * einfo.ads: Fix a typo.
1919
1920 2019-07-09 Ed Schonberg <schonberg@adacore.com>
1921
1922 * sem_util.adb (Scope_Within_Or_Same): Handle properly task
1923 bodies and protected bodies, so that local variables within have
1924 their proper scopes after these constructs have been rewritten
1925 during expansion. This patch resembles but is not identical to
1926 the code in Scope_Within.
1927
1928 2019-07-09 Arnaud Charlet <charlet@adacore.com>
1929
1930 * gnat1drv.adb (Adjust_Global_Switches): Set
1931 Dynamic_Elaboration_Checks to True in CodePeer mode.
1932
1933 2019-07-09 Yannick Moy <moy@adacore.com>
1934
1935 * sem_spark.adb (Get_Perm_Or_Tree): Issue an error when
1936 encountering unknown global variable.
1937
1938 2019-07-09 Yannick Moy <moy@adacore.com>
1939
1940 * sem_spark.adb (Check_Expression): Change signature to take an
1941 Extended_Checking_Mode, for handling read permission checking of
1942 sub-expressions in an assignment.
1943 (Check_Parameter_Or_Global): Adapt to new behavior of
1944 Check_Expression for mode Assign.
1945 (Check_Safe_Pointers): Do not analyze generic bodies.
1946 (Check_Assignment): Separate checking of the target of an
1947 assignment.
1948
1949 2019-07-09 Eric Botcazou <ebotcazou@adacore.com>
1950
1951 * repinfo.ads (JSON format): Adjust.
1952 * repinfo.adb (Need_Blank_Line): Rename to...
1953 (Need_Separator): ...this.
1954 (Blank_Line): Rename to...
1955 (Write_Separator): ...this and add JSON specific handling.
1956 (List_Array_Info): Adjust to above renaming.
1957 (List_Object_Info): Likewise.
1958 (List_Record_Info): Likewise.
1959 (List_Subprogram_Info): Likewise.
1960 (List_Type_Info): Likewise.
1961 (List_Entities): Do not set Need_Blank_Line.
1962 (List_Rep_Info): Set Need_Separator and add JSON specific
1963 handling. Output a single JSON stream in the normal case.
1964
1965 2019-07-09 Arnaud Charlet <charlet@adacore.com>
1966
1967 * doc/gnat_ugn/the_gnat_compilation_model.rst: Update doc on
1968 -fdump-ada-spec now that we generate Ada 2012.
1969 * gnat_ugn.texi: Regenerate.
1970
1971 2019-07-08 Eric Botcazou <ebotcazou@adacore.com>
1972
1973 * repinfo.adb (List_Common_Type_Info): New procedure extracted
1974 from...
1975 (List_Type_Info): ...here. Call it for the common information,
1976 start with a blank line and output the linker section at the
1977 end, if any.
1978 (List_Mechanisms): Rename to...
1979 (List_Subprogram_Info): ...this.
1980 (List_Array_Info): Call List_Common_Type_Info.
1981 (List_Entities): Adjust to above change and renaming.
1982 (List_Record_Info): Call List_Common_Type_Info.
1983
1984 2019-07-08 Dmitriy Anisimkov <anisimko@adacore.com>
1985
1986 * libgnat/g-sercom.ads
1987 (Serial_Port_Descriptor): New type.
1988 (Serial_Port): Add a comment, make it hold a
1989 Serial_Port_Descriptor.
1990 (To_Ada, To_C): New procedures.
1991 (Port_Data, Port_Data_Access): Remove types.
1992 * libgnat/g-sercom.adb (To_Ada): New stub.
1993 * libgnat/g-sercom__linux.adb, libgnat/g-sercom__mingw.adb:
1994 Update implementations accordingly.
1995 * s-oscons-tmplt.c: Bind Serial_Port_Descriptor to
1996 System.Win32.HANDLE on Windows, and to Interfaces.C.int on
1997 Linux. Add "Interfaces.C." prefix for other basic integer type
1998 bindings.
1999 * xoscons.adb (Output_Info): Remove the "Interfaces.C." prefix
2000 for subtypes generation.
2001
2002 2019-07-08 Arnaud Charlet <charlet@adacore.com>
2003
2004 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
2005 Update documentation on No_Exceptions restriction.
2006 * gnat_rm.texi: Regenerate.
2007
2008 2019-07-08 Dmitriy Anisimkov <anisimko@adacore.com>
2009
2010 * libgnat/s-os_lib.adb: Do not call __gnat_kill for Invalid_Pid.
2011
2012 2019-07-08 Piotr Trojanek <trojanek@adacore.com>
2013
2014 * sem_util.adb (Enclosing_Package_Or_Subprogram): Do not expect
2015 package and subprogram bodies.
2016
2017 2019-07-08 Bob Duff <duff@adacore.com>
2018
2019 * doc/gnat_ugn/gnat_utility_programs.rst: Remove documentation
2020 of ignored GNATpp switch.
2021
2022 2019-07-08 Hristian Kirtchev <kirtchev@adacore.com>
2023
2024 * doc/gnat_rm/implementation_defined_pragmas.rst:
2025 Update the documentation of pragma Initialize_Scalars.
2026 * gnat_rm.texi: Regenerate.
2027
2028 2019-07-08 Javier Miranda <miranda@adacore.com>
2029
2030 * exp_ch4.adb (Tagged_Membership): Fix regression silently
2031 introduced in r260738 that erroneouslusy causes the evaluation
2032 to True of the membership test when the left operand of the
2033 membership test is a class-wide interface object and the right
2034 operand is a type that implements such interface type.
2035
2036 2019-07-08 Hristian Kirtchev <kirtchev@adacore.com>
2037
2038 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
2039 register an address clause when its prefix denotes a generic
2040 formal object.
2041
2042 2019-07-08 Hristian Kirtchev <kirtchev@adacore.com>
2043
2044 * bindo-diagnostics.adb (Diagnose_Cycle): Capture the presence
2045 of an Elaborate_All edge before iterating over the edges of the
2046 cycle.
2047 (Output_Elaborate_Body_Transition): Update the parameter profile
2048 and the comment on usage. Add a missing case where the edge is
2049 within the context of an Elaborate_All.
2050 (Output_Transition): Update the call to
2051 Output_Elaborate_Body_Transition.
2052 * bindo-graphs.ads, bindo-graphs.adb
2053 (Contains_Elaborate_All_Edge): New routine.
2054
2055 2019-07-08 Piotr Trojanek <trojanek@adacore.com>
2056
2057 * lib-xref-spark_specific.adb (Create_Heap): Set dummy Etype for
2058 the fake __HEAP entity.
2059
2060 2019-07-08 Daniel Mercier <mercier@adacore.com>
2061
2062 * gnat1drv.adb: Suppress warnings on memory representation in
2063 CodePeer compiler mode.
2064
2065 2019-07-08 Nicolas Roche <roche@adacore.com>
2066
2067 * rtinit.c (__gnat_runtime_initialize): Remove dependency on
2068 CommandLineToArgvW.
2069
2070 2019-07-08 Doug Rupp <rupp@adacore.com>
2071
2072 * Makefile.rtl: Handle vxworks7r2 in x86_64 and x86 vxworks7.
2073
2074 2019-07-08 Dmitriy Anisimkov <anisimko@adacore.com>
2075
2076 * Makefile.rtl: Use g-sercom__linux.adb for all linuxes.
2077
2078 2019-07-08 Yannick Moy <moy@adacore.com>
2079
2080 * expander.adb (Expand): Do not reset Analyzed flag always.
2081 * sem_eval.adb (Fold_Ureal): Mark node as analyzed.
2082
2083 2019-07-08 Ed Schonberg <schonberg@adacore.com>
2084
2085 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Do not insert twice
2086 the assignment statement that computes the delay value, to
2087 prevent improper tree sharing when the value is a type
2088 conversion and Float_Overflow checks are enabled.
2089
2090 2019-07-08 Hristian Kirtchev <kirtchev@adacore.com>
2091
2092 * bindo.adb: Update the section on terminology to include new
2093 concepts. Update the section on switches to include new
2094 entries.
2095 * bindo.ads: Add type Precedence_Kind.
2096 * bindo-builders.adb: Add with and use clauses for Debug and
2097 Bindo.Validators. Add use clauses for
2098 Bindo.Validators.Invocation_Graph_Validators and
2099 Bindo.Validators.Library_Graph_Validators.
2100 (Build_Invocation_Graph): Validate the graph immediately after
2101 it was built.
2102 (Build_Library_Graph): Update the parameter profile. The
2103 creation of the graph is now elaboration model-agnostic.
2104 Validate the graph immediately after it was built.
2105 (Create_With_Edge): Create regular with edges for Elaborate and
2106 Elaborate_All edges when the appropriate debug switches are in
2107 effect.
2108 * bindo-builders.ads (Build_Library_Graph): Update the parameter
2109 profile.
2110 * bindo-diagnostics.adb (Diagnose_Cycle): Track the presence of
2111 an Elaborate_All edge throughout the inspection of the cycle's
2112 edges.
2113 (Output_Dynamic_Model_Suggestions): Output the suggestion only
2114 when the cycle contains at least one weak edge where the
2115 successor was statically elaborated.
2116 (Output_Elaborate_Body_Transition, Output_Forced_Transition,
2117 Output_With_Transition): Update the assertions.
2118 * bindo-elaborators.adb: Remove use clauses for
2119 Bindo.Validators.Invocation_Graph_Validators and
2120 Bindo.Validators.Library_Graph_Validators. Remove strings
2121 Add_To_All_Candidates_Msg and Add_To_Comp_Candidates_Msg.
2122 Remove type String_Ptr.
2123 (Add_Vertex, Add_Vertex_If_Elaborable, Create_All_Candidates_Set
2124 Create_Component_Candidates_Set): Remove.
2125 (Create_Component_Vertex_Sets, Create_Vertex_Sets): New routine.
2126 (Elaborate_Component): Update the parameter profile and the
2127 comment on usage. Reimplement the elaboration of a component.
2128 The algorithm will now attempt to elaborate as many vertices
2129 possible. If this is not possible, and a weakly elaborable
2130 vertex is available use unit was compiled using the dynamic
2131 model, the algorithm will elaborate it.
2132 (Elaborate_Library_Graph): Reimplement the elaboration of the
2133 graph. The algorithm will now attempt to elaborate as many
2134 vertices along with their components as possible. If this is not
2135 possible, and a weakly elaborable vertex is available use unit
2136 was compiled using the dynamic model, the algorithm will
2137 elaborate it along with its component.
2138 (Elaborate_Units): Merge with the functionality of
2139 Elaborate_Units_Common.
2140 (Elaborate_Units_Common, Elaborate_Units_Dynamic,
2141 Elaborate_Units_Static): Remove.
2142 (Elaborate_Vertex): Update the parameter profile and the comment
2143 on usage. Reimplemented.
2144 (Find_Best_Candidate): Remove.
2145 (Find_Best_Elaborable_Vertex, Find_Best_Vertex,
2146 Find_Best_Weakly_Elaborable_Vertex, Has_Elaborable_Body,
2147 Insert_Elaborable_Successor, Insert_Vertex): New routines.
2148 (Is_Better_Candidate): Remove.
2149 (Is_Better_Elaborable_Vertex,
2150 Is_Better_Weakly_Elaborable_Vertex,
2151 Is_Suitable_Elaborable_Vertex,
2152 Is_Suitable_Weakly_Elaborable_Vertex): New routines.
2153 (Trace_Candidate_Vertices): Remove.
2154 (Trace_Component): Output the number of strong and weak
2155 predecessors.
2156 (Trace_Unelaborated_Vertices): Remove.
2157 (Trace_Vertex): Output the number of strong and weak
2158 predecessors.
2159 (Trace_Vertices): New routine.
2160 (Update_Successor, Update_Successors): Update the parameter
2161 profile and the comment on usage.
2162 * bindo-graphs.adb: Remove type Precedence_Kind.
2163 (Add_Edge_With_Return): Update the increment of pending
2164 predecessors.
2165 (Add_Vertex): Provide default values for strong and weak
2166 predecessors.
2167 (Complementary_Vertex): Move the initial declaration to the
2168 spec. Update the parameter profile and the comment on usage.
2169 (Contains_Weak_Static_Successor): New routine.
2170 (Create): Update the parameter profile. The creation of the
2171 graph is now elaboration model-agnostic.
2172 (Decrement_Pending_Predecessors): Update the parameter profile
2173 and the comment on usage. Reimplemented.
2174 (Delete_Edge): Update the decrement of pending predecesors.
2175 (Has_Elaborate_Body): Do not treat a vertex as being subject to
2176 Elaborate_Body when a debug switch is in effect.
2177 (Increment_Pending_Predecessors): Update the parameter profile
2178 and the comment on usage. Reimplemented.
2179 (Is_Elaborable_Component): Reimplemented.
2180 (Is_Elaborable_Vertex): Move the initial declaration to the
2181 spec. Reimplemented.
2182 (Is_Elaborate_Body_Pair): New routine.
2183 (Is_Dynamically_Elaborated): Update the parameter profile.
2184 Reimplemented.
2185 (Is_Weakly_Elaborable_Vertex): New routine.
2186 (Pending_Predecessors): Removed.
2187 (Pending_Predecessors_For_Elaboration,
2188 Pending_Strong_Predecessors, Pending_Weak_Predecessors,
2189 Update_Pending_Predecessors): New routines.
2190 (Update_Pending_Predecessors_Of_Components): Update the
2191 increment of pending predecessors.
2192 * bindo-graphs.ads: Update the components of type
2193 Component_Attributes. Update the components of type
2194 Library_Graph_Attributes. Update the components of type
2195 Library_Graph_Vertex_Attributes. Update the initialization of
2196 No_Component_Attributes. Update the initialization of
2197 No_Library_Graph_Vertex_Attributes.
2198 (Complementary_Vertex, Contains_Weak_Static_Successor): New
2199 routines.
2200 (Create): Update the parameter profile and the comment on usage.
2201 (Decrement_Pending_Predecessors, Is_Dynamically_Elaborated):
2202 Update the parameter profile and the comment on usage.
2203 (Is_Elaborate_Body_Pair, Is_Weakly_Elaborable_Vertex): New
2204 routines.
2205 (Pending_Predecessors): Removed.
2206 (Pending_Predecessors_For_Elaboration,
2207 Pending_Strong_Predecessors, Pending_Weak_Predecessors): New
2208 routines.
2209 * bindo-writers.adb (Write_Components): Moved from the spec.
2210 (Write_Component): Output the strong and weak predecessors.
2211 (Write_Library_Graph): Output the components as part of the
2212 graph.
2213 (Write_Library_Graph_Vertex): Output the strong and weak
2214 predecessors.
2215 * bindo-writers.ads (Write_Components): Moved to the body.
2216 * debug.adb: Add and document new GNATbind switches -d_a, -d_b,
2217 -d_e.
2218 * bindo-validators.adb: Minor reformattings.
2219
2220 2019-07-08 Bob Duff <duff@adacore.com>
2221
2222 * libgnat/g-sercom.ads, libgnat/g-sercom__linux.adb (Data_Rate):
2223 Support additional data rates.
2224
2225 2019-07-08 Olivier Hainque <hainque@adacore.com>
2226
2227 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Don't request
2228 DECL_ARTIFICIAL_P on elab proc declarations.
2229
2230 2019-07-08 Eric Botcazou <ebotcazou@adacore.com>
2231
2232 * repinfo.adb (List_Record_Info): Declare Incomplete_Layout and
2233 Not_In_Extended_Main local exceptions.
2234 (List_Structural_Record_Layout): For an extension, raise the
2235 former if the parent subtype has not been built and the latter
2236 if it is not declared in the main source unit. Fall back to the
2237 flat layout if either exception has been raised.
2238
2239 2019-07-08 Ed Schonberg <schonberg@adacore.com>
2240
2241 * libgnat/a-strfix.adb (Delete): The RM describes the semantics
2242 of Delete as equivalent to that of Replace_String with a null
2243 argument. As a result, deleting a null string that starts past
2244 the end of its argument is a noop and must not raise
2245 Index_Error.
2246
2247 2019-07-08 Javier Miranda <miranda@adacore.com>
2248
2249 * exp_disp.adb (Register_Primitive): When registering a
2250 primitive in the secondary dispatch table, handle primitive
2251 inherited through several levels of type derivation (required to
2252 properly handle inherited 'null' primitive).
2253
2254 2019-07-08 Bob Duff <duff@adacore.com>
2255
2256 * doc/gnat_ugn/gnat_utility_programs.rst: Document handling of
2257 preprocessor directives in GNATpp.
2258
2259 2019-07-08 Javier Miranda <miranda@adacore.com>
2260
2261 * gnat1drv.adb (Post_Compilation_Validation_Checks:
2262 Validate_Compile_Time_Warning_Errors is now located in sem_prag
2263 (instead of sem_ch13).
2264 * sem_ch13.ads (Validate_Compile_Time_Warning_Error,
2265 Validate_Compile_Time_Warning_Errors): Move to sem_prag.
2266 * sem_ch13.adb
2267 (Compile_Time_Warnings_Errors): Move to sem_prag.
2268 (Initialize): Remove initialization of table
2269 Compile_Time_Warning_Errors.
2270 (Validate_Compile_Time_Warning_Error,
2271 Validate_Compile_Time_Warning_Errors): Move to sem_prag.
2272 * sem_prag.ads (Validate_Compile_Time_Warning_Errors): New
2273 procedure.
2274 * sem_prag.adb (Initialize): Initialize table
2275 Compile_Time_Warning_Errors.
2276
2277 2019-07-08 Ed Schonberg <schonberg@adacore.com>
2278
2279 * sem_ch13.adb (Analyze_Aspect_Specifications): For a
2280 pre/postcondition of a generic subprogram declaration, do not
2281 use Relocate_Node on the aspect expression to construct the
2282 corresponding attribute specification, to prevent tree anomalies
2283 when the expression is a call with named actual parameters.
2284
2285 2019-07-08 Javier Miranda <miranda@adacore.com>
2286
2287 * sem_attr.adb (Analyze_Attribute [Attribute_Size]): For pragmas
2288 used to report user defined compile time warning or errors
2289 handle 'Size for types with known static RM size.
2290
2291 2019-07-08 Justin Squirek <squirek@adacore.com>
2292
2293 * exp_imgv.adb (Build_Enumeration_Image_Tables): Default SSO for
2294 the building of image tables.
2295 (Expand_Image_Attribute): Minor cleanup.
2296
2297 2019-07-08 Dmitriy Anisimkov <anisimko@adacore.com>
2298
2299 * libgnat/g-socket.ads, libgnat/g-socket.adb: Improve
2300 documentation.
2301 (Get_Socket_Option, Set_Socket_Option): Remove default value for
2302 the Level formal.
2303
2304 2019-07-08 Ed Schonberg <schonberg@adacore.com>
2305
2306 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): For an
2307 unanalized aspect in a generic context that has not been
2308 analyzed yet, if the aspect applies to a type, place the type on
2309 the scope stack to make its components visible, before checking
2310 conformance with the version of the expression analyzed at the
2311 freeze point.
2312
2313 2019-07-05 Justin Squirek <squirek@adacore.com>
2314
2315 * checks.adb (Apply_Accessibility_Check): Add logic to fetch the
2316 function result accessibility level if one is required within
2317 the generated check.
2318 * exp_ch6.adb (Needs_Result_Accessibility_Level): Modify
2319 controlling elsif block to handle more cases such as anonymous
2320 access results and disable checking for coextensions.
2321
2322 2019-07-05 Ed Schonberg <schonberg@adacore.com>
2323
2324 * sem_ch9.adb (Analyze_Accept_Statement): If this is an illegal
2325 accept statement for an enclosing entry abandon analysis to
2326 prevent scope mismatches and potential infinite loops in
2327 compiler.
2328
2329 2019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
2330
2331 * ali.adb (For_Each_Invocation_Construct,
2332 For_Each_Invocation_Relation): New version.
2333 (Scan_ALI): Initialize field Invocation_Graph_Encoding.
2334 (Set_Invocation_Graph_Encoding): Update the setting of the
2335 invocation graph encoding.
2336 * ali.ads: Move field Invocation_Graph_Encoding from Unit_Record
2337 to ALI_Record because the encoding applies to the whole ALI,
2338 rather than one of the units (spec or body) for which the ALI
2339 file was created.
2340 (For_Each_Invocation_Construct, For_Each_Invocation_Relation):
2341 New version.
2342 * bindo.adb: Update the section on switches. Complete the
2343 section of debugging elaboration order issues.
2344 (Find_Elaboration_Order): Prepare the routine for the switch
2345 from the old to the new elaboration order mechanism.
2346 * bindo-diagnostics.adb (Find_And_Output_Invocation_Paths):
2347 Manage a visited set used by Visit_Vertex.
2348 (Output_All_Cycles_Suggestions,
2349 Output_Dynamic_Model_Suggestions): Clarify the nature of the
2350 suggested switch.
2351 (Output_Elaborate_Body_Transition): Update the diagnostic to
2352 emit a better message.
2353 (Output_Forced_Suggestions, Output_Full_Encoding_Suggestions):
2354 Clarify the nature of the suggested switch.
2355 (Visit_Vertex): Update the parameter profile to add a set of
2356 invokers visited during the transition. This set prevents
2357 infinite exploration of the graph in case the invocations are
2358 recursive.
2359 * bindo-elaborators.adb: Add a use clause for
2360 Bindo.Writers.Dependency_Writers.
2361 (Elaborate_Units_Common): Output the library graph after it has
2362 been augmented with invocation edges. Output just the components
2363 instead of outputting the whole library graph again.
2364 (Elaborate_Units_Dynamic, Elaborate_Units_Static): Output the
2365 dependencies as expressed in the library graph.
2366 * bindo-units.adb (Invocation_Graph_Encoding): Update the
2367 extraction of the invocation graph encoding.
2368 * bindo-writers.adb: Add with and use clauses for Binderr and
2369 Butil.
2370 (palgc, plgc): New debug routine.
2371 (Write_Components): Moved to the spec. Add a header for the
2372 output.
2373 (Write_Dependencies, Write_Dependencies_Of_Vertex,
2374 Write_Dependency_Edge): New routine.
2375 (Write_Elaboration_Order): Update the logic to follow the format
2376 of Binde's order output.
2377 (Write_Library_Graph): Do not output the components every time
2378 the graph is written.
2379 (Write_Unit): Output the invocation graph encoding of the unit.
2380 Output the invocation constructs and relations for the unit
2381 only.
2382 * bindo-writers.ads (Write_Components): Moved from the body.
2383 (Write_Dependencies): New routine.
2384 * bindusg.adb: Prepare the routine for the switch from the old
2385 to the new elaboration order mechanism.
2386 * debug.adb: Binder switch -d_O is now not associated with any
2387 functionality.
2388 * einfo.adb (Is_Elaboration_Target): The attribute applies to
2389 packages, as specified by the comment on the attribute usage.
2390 * opt.ads: Add a global flag which controls the choice between
2391 the new and the legacy elaboration order mechanism.
2392 * sem_elab.adb: Add Package_Target to type Target_Kind.
2393 (Build_Elaborate_Body_Procedure, Build_Elaborate_Procedure,
2394 Build_Elaborate_Spec_Procedure, Check_Elaboration_Scenarios,
2395 Check_SPARK_Model_In_Effect): Use Main_Unit_Entity to obtain the
2396 entity of the main unit.
2397 (Create_Package_Rep): New routine.
2398 (Create_Target_Rep): Add processing for packages.
2399 (Declaration_Placement_Of_Node, Has_Prior_Elaboration): Use
2400 Main_Unit_Entity to obtain the entity of the main
2401 unit.
2402 (Invocation_Graph_Recording_OK): Prepare the routine for the
2403 switch from the old to the new elaboration order mechanism.
2404 (Main_Unit_Entity): New routine.
2405 (Meet_Elaboration_Requirement,
2406 Process_Conditional_ABE_Variable_Reference): Use
2407 Main_Unit_Entity to obtain the entity of the main unit.
2408 (Process_Invocation_Instantiation): New routine.
2409 (Process_Invocation_Scenario): Add processing for
2410 instantiations.
2411 * switch-b.adb (Scan_Binder_Switches): Prepare the routine for
2412 the switch from the old to the new elaboration order mechanism.
2413
2414 2019-07-05 Joffrey Huguet <huguet@adacore.com>
2415
2416 * libgnat/a-textio.adb: Add abstract state refinment.
2417 * libgnat/a-textio.ads: Add File_System abstract state. Add
2418 global contracts, contract cases, preconditions and
2419 postconditions to procedures and functions.
2420 (Set_Input, Set_Output, Set_Error, Standard_Input,
2421 Standard_Output, Standard_Error, Current_Input, Current_Output,
2422 Current_Error): Turn SPARK_Mode off.
2423 (Get_Line): Turn SPARK_Mode off on Get_Line functions.
2424 * libgnat/a-tideio.ads, libgnat/a-tienio.ads,
2425 libgnat/a-tifiio.ads, libgnat/a-tiflio.ads,
2426 libgnat/a-tiinio.ads, libgnat/a-timoio.ads: Add global
2427 contracts, contract cases, preconditions and postconditions to
2428 procedures and functions.
2429
2430 2019-07-05 Arnaud Charlet <charlet@adacore.com>
2431
2432 * doc/gnat_ugn/platform_specific_information.rst: Refresh doc on
2433 installing from the command line on Windows. Remove obsolete
2434 part.
2435 * gnat_ugn.texi: Regenerate.
2436
2437 2019-07-05 Vasiliy Fofanov <fofanov@adacore.com>
2438
2439 * libgnat/a-wichha.ads (Is_Alphanumeric): Replace comment with
2440 the correct one. Also capitalize references to False
2441 throughout.
2442
2443 2019-07-05 Eric Botcazou <ebotcazou@adacore.com>
2444
2445 * exp_ch4.adb (Expand_N_Indexed_Component): Do not expand actual
2446 parameters of function calls here either.
2447
2448 2019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
2449
2450 * bindo-units.adb, checks.adb, exp_attr.adb, exp_ch3.adb,
2451 exp_ch4.adb, exp_pakd.adb, lib-writ.adb, libgnat/g-traceb.adb,
2452 libgnat/g-traceb.ads, libgnat/s-stratt.ads, sem_aux.ads,
2453 sem_util.adb: Minor reformatting.
2454
2455 2019-07-05 Ed Schonberg <schonberg@adacore.com>
2456
2457 * sem_ch13.adb (Build_Predicate_Functions): If a subtype that
2458 carries a static predicate aspect is frozen immediately after
2459 its declaration, ensure that the generated function body created
2460 for predicate checking is inserted after the corresponding
2461 subprogram declaration, which is created at the point the
2462 declaration is elaborated.
2463
2464 2019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
2465
2466 * exp_ch7.adb (Cleanup_Record): Use the underlying type when
2467 checking for components with tasks.
2468
2469 2019-07-05 Arnaud Charlet <charlet@adacore.com>
2470
2471 * libgnarl/s-osinte__linux.ads: Link with -lrt before -lpthread.
2472
2473 2019-07-05 Ed Schonberg <schonberg@adacore.com>
2474
2475 * exp_pakd.adb (Expand_Bit_Packed_Element_Set): Add explicit
2476 range checks when the index type of the bit-packed array is an
2477 enumeration type with a non-standard representation,
2478
2479 2019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
2480
2481 * sem_res.adb (Is_Control_Flow_Statement): Delay statements
2482 contain an expression, which in turn may have side effects and
2483 affect the infinite recursion. As a result, delay statements
2484 should not be treated specially.
2485
2486 2019-07-05 Arnaud Charlet <charlet@adacore.com>
2487
2488 * libgnarl/s-linux.ads, libgnarl/s-linux__alpha.ads,
2489 libgnarl/s-linux__android.ads, libgnarl/s-linux__hppa.ads,
2490 libgnarl/s-linux__mips.ads, libgnarl/s-linux__riscv.ads,
2491 libgnarl/s-linux__sparc.ads: Fix typos in comments.
2492
2493 2019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
2494
2495 * sem_res.adb (Check_Infinite_Recursion): Reimplemented.
2496 (Enclosing_Declaration_Or_Statement,
2497 Invoked_With_Different_Arguments, Is_Conditional_Statement,
2498 Is_Control_Flow_Statement, Is_Immediately_Within_Body,
2499 Is_Raise_Idiom, Is_Raise_Statement, Is_Sole_Statement,
2500 Preceded_By_Control_Flow_Statement,
2501 Within_Conditional_Statement): New routines.
2502
2503 2019-07-05 Javier Miranda <miranda@adacore.com>
2504
2505 * exp_ch4.adb (Expand_N_Type_Conversion): Do not apply an
2506 accessibility check when the conversion is an access to
2507 class-wide interface type and it is an actual parameter.
2508 * exp_ch6.adb (Expand_Call_Helper): Add documentation on the
2509 accessibility level of an anonymous allocator defining the value
2510 of an access parameter.
2511 * sem_util.ads, sem_util.adb (Dynamic_Accessibility_Level): Add
2512 support for an anonymous allocator whose type is that of a
2513 stand-alone object of an anonymous access to object type.
2514
2515 2019-07-05 Piotr Trojanek <trojanek@adacore.com>
2516
2517 * einfo.ads, sem_res.adb: Typo fixes in comments.
2518
2519 2019-07-05 Bob Duff <duff@adacore.com>
2520
2521 * exp_ch6.adb (Is_Build_In_Place_Function): Narrow the check for
2522 Has_Foreign_Convention to the imported case only. If a
2523 build-in-place function is exported, and called from Ada code,
2524 build-in-place protocols should be used.
2525
2526 2019-07-05 Ed Schonberg <schonberg@adacore.com>
2527
2528 * sem_util.adb (Encloing_Subprogram): If Enclosing_Dynamic_Scope
2529 is a loop, continue climbing the scope stack to find the
2530 enclosing subprogram.
2531 (Gather_Components): Handle properly a choice in a record
2532 aggregate that is given by a subtype with a static predicate.
2533
2534 2019-07-05 Javier Miranda <miranda@adacore.com>
2535
2536 * debug.adb (-gnatd.K): Leave available this switch.
2537 * contracts.adb (Build_And_Analyze_Contract_Only_Subprograms):
2538 Remove.
2539 * scil_ll.ads, scil_ll.adb (Contract_Only_Body_Flag,
2540 Contract_Only_Body_Nodes, Get_Contract_Only_Body,
2541 Is_Contract_Only_Body, Set_Contract_Only_Body): Remove.
2542
2543 2019-07-05 Pierre-Marie de Rodat <derodat@adacore.com>
2544
2545 * libgnat/a-strunb.ads: Import documentation from the RM
2546
2547 2019-07-05 Pierre-Marie de Rodat <derodat@adacore.com>
2548
2549 * libgnat/a-strfix.ads: Import documentation from the RM
2550
2551 2019-07-05 Yannick Moy <moy@adacore.com>
2552
2553 * adabkend.adb (Scan_Back_End_Switches): Accept -Og and -Ofast
2554 switches.
2555
2556 2019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
2557
2558 * ali.adb: Relocate types Invocation_Construct_Record,
2559 Invocation_Relation_Record, and Invocation_Signature_Record to
2560 the body of ALI. Relocate tables Invocation_Constructs,
2561 Invocation_Relations, and Invocation_Signatures to the body of
2562 ALI. Remove type Body_Placement_Codes. Add new types
2563 Declaration_Placement_Codes, and
2564 Invocation_Graph_Encoding_Codes. Update the literals of type
2565 Invocation_Graph_Line_Codes.
2566 (Add_Invocation_Construct): Update the parameter profile. Add an
2567 invocation construct built from all attributes provided.
2568 (Add_Invocation_Relation): Update the parameter profile. Add an
2569 invocation relation built from all attributes provided.
2570 (Body_Placement): New routine.
2571 (Body_Placement_Kind_To_Code, Code_To_Body_Placement_Kind):
2572 Removed.
2573 (Code_To_Declaration_Placement_Kind,
2574 Code_To_Invocation_Graph_Encoding_Kind, Column,
2575 Declaration_Placement_Kind_To_Code, Extra,
2576 For_Each_Invocation_Construct, For_Each_Invocation_Relation,
2577 Invocation_Graph_Encoding,
2578 Invocation_Graph_Encoding_Kind_To_Code, Invoker, Kind, Line,
2579 Locations, Name): New routine.
2580 (Scan_Invocation_Construct_Line): Reimplement the scanning
2581 mechanism.
2582 (Scan_Invocation_Graph_Attributes_Line): New routine.
2583 (Scan_Invocation_Graph_Line): Use a case statement to dispatch.
2584 (Scan_Invocation_Relation_Line): Reimplement the scanning
2585 mechanism.
2586 (Scope): New routine.
2587 (Set_Invocation_Graph_Encoding, Signature, Spec_Placement,
2588 Target): New routine.
2589 * ali.ads: Add new type Invocation_Graph_Encoding_Kind. Add
2590 component Invocation_Graph_Encoding to type Unit_Record.
2591 Relocate various types and data structures to the body of ALI.
2592 (Add_Invocation_Construct, Add_Invocation_Relation): Update the
2593 parameter profile.
2594 (Body_Placement): New routine.
2595 (Body_Placement_Kind_To_Code, Code_To_Body_Placement_Kind):
2596 Removed.
2597 (Code_To_Declaration_Placement_Kind,
2598 Code_To_Invocation_Graph_Encoding_Kind, Column,
2599 Declaration_Placement_Kind_To_Code, Extra,
2600 For_Each_Invocation_Construct, For_Each_Invocation_Relation,
2601 Invocation_Graph_Encoding,
2602 Invocation_Graph_Encoding_Kind_To_Code, Invoker, Kind, Line,
2603 Locations, Name, Scope, Set_Invocation_Graph_Encoding,
2604 Signature, Spec_Placement, Target): New routine.
2605 * bindo.adb: Add with clause for Binde. Add with and use
2606 clauses for Debug. Update the documentation. Add new switches.
2607 (Find_Elaboration_Order): Dispatch to the proper elaboration
2608 mechanism.
2609 * bindo-augmentors.adb:
2610 Remove with and use clauses for GNAT and GNAT.Sets. Remove
2611 membership set VS. Update the parameter profiles of most
2612 routines to use better parameter names. Update the
2613 implementation of most routine to use the new parameter names.
2614 Remove various redundant assertions.
2615 * bindo-builders.adb: Use better names for instantiated data
2616 structures. Update all references to these names. Update the
2617 parameter profiles of most routines to use better parameter
2618 names. Update the implementation of most routine to use the new
2619 parameter names.
2620 (Build_Library_Graph): Update the parameter profile. Update the
2621 call to Create.
2622 (Create_Vertex): Reimplemented.
2623 (Declaration_Placement_Vertex): New routine.
2624 * bindo-builders.ads (Build_Library_Graph): Update the parameter
2625 profile and comment on usage.
2626 * bindo-diagnostics.adb: Almost a new unit.
2627 * bindo-diagnostics.ads: Add a use clause for
2628 Bindo.Graphs.Invocation_Graphs. Remove package
2629 Cycle_Diagnostics.
2630 (Diagnose_Circularities): New routine.
2631 * bindo-elaborators.adb: Remove the with and use clauses for
2632 Binderr and GNAT.Sets. Remove the use clause for
2633 Bindo.Diagnostics.Cycle_Diagnostics. Remove membership set VS.
2634 Update the parameter profiles of most routines to use better
2635 parameter names. Update the implementation of most routine to
2636 use the new parameter names. (Elaborate_Units_Common): Update
2637 the parameter profile. Pass an infication to the library graph
2638 builder whether the dynamic model is in effect.
2639 (Elaborate_Units_Dynamic, Elaborate_Units_Static): Use
2640 Diagnose_Circularities to provide diagnostics.
2641 (Update_Successor): Use routine In_Same_Component to determine
2642 whether the predecessor and successor reside in different
2643 components.
2644 * bindo-graphs.adb: Add with and use clauses for Butil, Debug,
2645 Output, and Bindo.Writers. Remove with and use clauses for
2646 GNAT.Lists. Update the parameter profiles of most routines to
2647 use better parameter names. Update the implementation of most
2648 routine to use the new parameter names. Remove various
2649 redundant assertions. Remove doubly linked list EL. Add new
2650 type Precedence_Kind.
2651 (Add_Cycle): New routine.
2652 (Add_Vertex): Update the parameter profile. Update the creation
2653 of vertex attributes.
2654 (Add_Vertex_And_Complement, Body_Vertex, Column,
2655 Complementary_Vertex, Copy_Cycle_Path, Cycle_Kind_Of): New
2656 routines.
2657 (Destroy_Invocation_Graph_Edge, Destroy_Library_Graph_Cycle,
2658 Destroy_Library_Graph_Edge, Extra, File_Name,
2659 Find_All_Cycles_Through_Vertex, Find_All_Cycles_With_Edge,
2660 Find_Cycles, Find_First_Lower_Precedence_Cycle,
2661 Get_LGC_Attributes, Has_Next, Hash_Library_Graph_Cycle,
2662 Hash_Library_Graph_Cycle_Attributes, Highest_Precedence_Cycle,
2663 Highest_Precedence_Edge, In_Same_Component, Insert_And_Sort,
2664 Invocation_Edge_Count, Invocation_Graph_Encoding,
2665 Is_Cycle_Initiating_Edge, Is_Cyclic_Edge,
2666 Is_Cyclic_Elaborate_All_Edge, Is_Cyclic_Elaborate_Body_Edge,
2667 Is_Cyclic_Elaborate_Edge, Is_Cyclic_Forced_Edge,
2668 Is_Cyclic_Invocation_Edge, Is_Cyclic_With_Edge,
2669 Is_Dynamically_Elaborated, Is_Elaborate_All_Edge,
2670 Is_Elaborate_Body_Edge, Is_Elaborate_Edge: New routines.
2671 (Is_Existing_Predecessor_Successor_Relation): Removed.
2672 (Is_Forced_Edge, Is_Invocation_Edge, Is_Recorded_Cycle,
2673 Is_Recorded_Edge, Is_With_Edge, Iterate_Edges_Of_Cycle, Kind,
2674 Length): New routine.
2675 (Lib_Vertex): Removed.
2676 (Line, Links_Vertices_In_Same_Component,
2677 Maximum_Invocation_Edge_Count, Next, Normalize_And_Add_Cycle,
2678 Normalize_Cycle_Path, Number_Of_Cycles, Path, Precedence,
2679 Remove_Vertex_And_Complement, Sequence_Next_Cycle): New routines.
2680 (Sequence_Next_IGE_Id): Renamed to Sequence_Next_Edge.
2681 (Sequence_Next_IGV_Id): Renamed to Sequence_Next_Vertex.
2682 (Sequence_Next_LGE_Id): Renamed to Sequence_Next_Edge.
2683 (Sequence_Next_LGV_Id): Renamed to Sequence_Next_Vertex.
2684 (Set_Is_Existing_Predecessor_Successor_Relation): Removed.
2685 (Set_Is_Recorded_Cycle, Set_Is_Recorded_Edge,
2686 Set_LGC_Attributes, Spec_Vertex, Trace_Cycle, Trace_Edge,
2687 Trace_Eol, Trace_Vertex): New routines.
2688 * bindo-graphs.ads: Add with and use clauses for Types and
2689 GNAT.Lists. Update the parameter profiles of most routines to
2690 use better parameter names. Update the implementation of most
2691 routine to use the new parameter names. Add the new
2692 instantiated data structures IGE_Lists, IGV_Sets, LGC_Lists,
2693 LGE_Lists, LGE_Sets, LGV_Sets, and RC_Sets. Add new type
2694 Library_Graph_Cycle_Id along with an empty and initial value.
2695 Remove component Lib_Vertex and add new components Body_Vertex
2696 and Spec_Vertex to type Invocation_Graph_Vertex_Attributes. Add
2697 new type Library_Graph_Cycle_Kind. Add new iterators
2698 All_Cycle_Iterator and Edges_Of_Cycle_Iterator. Add new type
2699 Library_Graph_Cycle_Attributes. Add new components
2700 Cycle_Attributes, Cycles, and Dynamically_Elaborated to type
2701 Library_Graph_Attributes.
2702 (Body_Vertex, Column, Destroy_Invocation_Graph_Edge,
2703 Destroy_Library_Graph_Cycle_Attributes,
2704 Destroy_Library_Graph_Edge, Extra, File_Name, Find_Cycles,
2705 Has_Elaborate_All_Cycle, Has_Next, Hash_Library_Graph_Cycle,
2706 Hash_Library_Graph_Cycle_Attributes, Highest_Precedence_Cycle,
2707 In_Same_Component, Invocation_Edge_Count,
2708 Invocation_Graph_Encoding, Is_Dynamically_Elaborated,
2709 Is_Elaborate_All_Edge, Is_Elaborate_Body_Edge,
2710 Is_Elaborate_Edge, Is_Forced_Edge, Is_Invocation_Edge,
2711 Is_With_Edge, Iterate_All_Cycles, Iterate_Edges_Of_Cycle, Kind):
2712 New routines.
2713 (Length, Lib_Vertex, (Line, Next, Number_Of_Cycles, Present,
2714 Same_Library_Graph_Cycle_Attributes, Spec_Vertex): New routines.
2715 * bindo-units.adb (File_Name, Invocation_Graph_Encoding): New
2716 routines.
2717 * bindo-units.ads: Add new instantiated data structure
2718 Unit_Sets.
2719 (File_Name, Invocation_Graph_Encoding): New routine.
2720 * bindo-validators.adb: Remove with and use clauses for GNAT and
2721 GNAT.Sets. Remove membership set US. Update the parameter
2722 profiles of most routines to use better parameter names. Update
2723 the implementation of most routine to use the new parameter
2724 names.
2725 (Validate_Cycle, Validate_Cycle_Path, Validate_Cycles,
2726 Validate_Invocation_Graph_Vertex): Remove the validation of
2727 component Lib_Vertex. Add the validation of components
2728 Body_Vertex and Spec_Vertex.
2729 (Write_Error): New routine.
2730 * bindo-validators.ads (Validate_Cycles): New routine.
2731 * bindo-writers.adb: Update the parameter profiles of most
2732 routines to use better parameter names. Update the
2733 implementation of most routine to use the new parameter names.
2734 (Write_Cycle, Write_Cyclic_Edge, Write_Cycles): New routines.
2735 (Write_Invocation_Graph_Vertex): Remove the output of component
2736 Lib_Vertex. Add the output of components Body_Vertex and
2737 Spec_Vertex.
2738 * bindo-writers.ads (Write_Cycles): New routine.
2739 * debug.adb: Use binder switches -d_C and -d_P, add
2740 documentation on their usage.
2741 * gnatbind.adb: Remove with and use clauses for Binde. Delegate
2742 the choice of elaboration mechanism to Bindo.
2743 * lib-writ.adb (Column, Extra, Invoker, Kind, Line, Locations,
2744 Name, Placement, Scope, Signature, Target): Removed.
2745 (Write_Invocation_Graph): Moved at the top level.
2746 (Write_Invocation_Graph_Attributes): New routine.
2747 (Write_Invocation_Relation, Write_Invocation_Signature): Moved
2748 at the top level.
2749 * lib-writ.ads: Add a documentation section on invocation graph
2750 attributes.
2751 * sem_elab.adb (Body_Placement_Of): New routine.
2752 (Declare_Invocation_Construct): Update the call to
2753 Add_Invocation_Construct.
2754 (Declaration_Placement_Of_Node): New routine.
2755 (Get_Invocation_Attributes): Correct the retrieval of the
2756 enclosing subprogram where the postcondition procedure lives.
2757 (Placement_Of, Placement_Of_Node): Removed.
2758 (Record_Invocation_Graph): Record the encoding format used.
2759 (Record_Invocation_Graph_Encoding): New routine.
2760 (Record_Invocation_Relation): Update the call to
2761 Add_Invocation_Relation.
2762 (Spec_Placement_Of): Removed.
2763 * libgnat/g-lists.ads, libgnat/g-lists.adb (Equal): New routine.
2764
2765 2019-07-05 Ed Schonberg <schonberg@adacore.com>
2766
2767 * checks.adb (Apply_Predicate_Check): Except within the
2768 subprogram body that defines the formal, do not apply predicate
2769 check on a formal IN parameter: such a check is redundant and
2770 its expansion can lead to out-of-scope references when it is
2771 originates in a function call in a precondition,
2772
2773 2019-07-05 Yannick Moy <moy@adacore.com>
2774
2775 * sem_res.adb (Resolve_Call): Cannot inline in quantified
2776 expressions.
2777 * sem_util.adb, sem_util.ads (In_Quantified_Expression): New
2778 function.
2779
2780 2019-07-05 Bob Duff <duff@adacore.com>
2781
2782 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
2783 Fix typo.
2784 * gnat_rm.texi: Regenerate.
2785
2786 2019-07-05 Bob Duff <duff@adacore.com>
2787
2788 * exp_attr.adb (Input): Take the No_Stream_Optimizations
2789 restriction into account.
2790
2791 2019-07-05 Claire Dross <dross@adacore.com>
2792
2793 * libgnat/a-cofove.ads, libgnat/a-cofove.adb: Definite formal
2794 vectors are now always bounded so that they do not need to be
2795 limited anymore.
2796
2797 2019-07-05 Dmitriy Anisimkov <anisimko@adacore.com>
2798
2799 * libgnat/g-traceb.ads, libgnat/g-traceb.adb (Call_Chain): New
2800 function.
2801
2802 2019-07-04 James Clarke <jrtc27@debian.org>
2803
2804 * libgnarl/s-osinte__kfreebsd-gnu.ads (clockid_t): Make type
2805 definition public.
2806 (CLOCK_REALTIME): Make value public.
2807
2808 2019-07-04 Javier Miranda <miranda@adacore.com>
2809
2810 * exp_tss.adb (Init_Proc): Adding missing support for access to
2811 subprograms and access to protected subprograms of non-default
2812 C++ constructors.
2813
2814 2019-07-04 Eric Botcazou <ebotcazou@adacore.com>
2815
2816 * gnat1drv.adb (Adjust_Global_Switches): Use proper interface to
2817 set the validity settings in CodePeer mode.
2818 * par-load.adb (Load): Remove all code dealing with validity
2819 settings.
2820 * validsw.ads (Validity_Check_Copies): Alphabetize.
2821 * validsw.adb (Reset_Validity_Check_Options): Set all options to
2822 off.
2823 (Save_Validity_Check_Options): Save all options.
2824
2825 2019-07-04 Hristian Kirtchev <kirtchev@adacore.com>
2826
2827 * exp_ch3.adb, exp_ch4.adb, exp_ch4.ads, exp_ch5.adb,
2828 exp_ch7.adb, exp_ch9.adb, exp_ch11.adb, exp_unst.adb,
2829 rtsfind.ads, sem_attr.adb, sem_ch10.adb, sem_ch12.adb,
2830 sem_ch13.adb, sem_dim.adb, sem_disp.adb, xref_lib.adb: Minor
2831 reformatting.
2832
2833 2019-07-04 Joffrey Huguet <huguet@adacore.com>
2834
2835 * libgnarl/a-taside.ads: Add assertion policy to ignore
2836 preconditions.
2837 (Abort_Task, Is_Terminated, Is_Callable): Add preconditions.
2838
2839 2019-07-04 Eric Botcazou <ebotcazou@adacore.com>
2840
2841 * doc/gnat_rm/implementation_defined_pragmas.rst: Fix
2842 capitalization and parenthesis glitches.
2843 * gnat_rm.texi: Regenerate.
2844
2845 2019-07-04 Ed Schonberg <schonberg@adacore.com>
2846
2847 * sem_ch10.adb (Remove_Context_Clauses): Handle properly the
2848 removal of a limited_with_clause which appears in the library
2849 unit oF the main unit, when some other unit in the context has a
2850 regular with_clause on the same unit, to prevent spurious
2851 visibility errors in the subsequent analysis of pending instance
2852 bodies.
2853
2854 2019-07-04 Hristian Kirtchev <kirtchev@adacore.com>
2855
2856 * sem_elab.adb: Add new type Elaboration_Phase_Status along with
2857 a global to keep track of the elaboration phase status.
2858 Initialize all internal data structures to Nil for services
2859 Elaborated_Units, Internal_Representation, and Scenario_Storage.
2860 (Build_Call_Marker): Do not create a call marker when the
2861 elaboration phase is not active.
2862 (Build_Variable_Reference_Marker): Do not create a call marker
2863 when the elaboration phase is not active.
2864 (Check_Elaboration_Scenarios): Destroy all internal structures
2865 when the elaboration phase does not have to run. Do not execute
2866 when the elaboration phase is not active.
2867 (Elaboration_Phase_Active): New routine.
2868 (Finalize_All_Data_Structures): New routine.
2869 (Initialize): Initialize all internal data structures and signal
2870 that the elaboration phase has started.
2871 (Initialize_All_Data_Structures): New routine.
2872 (Initialize_Elaborated_Units): Initialize all internal data
2873 structures.
2874 (Initialize_Internal_Representation): Initialize all internal
2875 data structures.
2876 (Initialize_Scenario_Storage): Initialize all internal data
2877 structures.
2878 (Kill_Elaboration_Scenario): Do not execute when the elaboration
2879 phase is not active.
2880 (Set_Elaboration_Phase): New routine.
2881 (Update_Elaboration_Scenario): Do not execute when the
2882 elaboration phase is not active.
2883
2884 2019-07-04 Gary Dismukes <dismukes@adacore.com>
2885
2886 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The special
2887 treatment of calling Mask_Unfrozen_Types must also be done in
2888 the case of an Ignored_Ghost_Entity, because Expander_Active is
2889 False in that case.
2890
2891 2019-07-04 Yannick Moy <moy@adacore.com>
2892
2893 * sem_prag.adb (Check_Library_Level_Entity): Update for new rule
2894 on SPARK_Mode.
2895
2896 2019-07-04 Justin Squirek <squirek@adacore.com>
2897
2898 * sem_disp.adb (Check_Controlling_Formals): Obtain the full view
2899 before type comparison.
2900
2901 2019-07-04 Ed Schonberg <schonberg@adacore.com>
2902
2903 * exp_ch4.ads, exp_ch4.adb (Build_Eq_Call): New visible
2904 subprogram, extracted from Expand_Composite_Equality, to handle
2905 properly the composition of equality for variant record types.
2906 * exp_ch3.adb (MAke_Eq_If): Use Build_Eq_Call for each
2907 component, to handle properly the case of a component with a
2908 user-defined equality. Revert to predefined equality if the
2909 user-defined operation is abstract, to maintain compatibility
2910 with older versions,
2911
2912 2019-07-04 Justin Squirek <squirek@adacore.com>
2913
2914 * exp_ch3.adb (Build_Initialization_Call): Fixup
2915 *_skip_null_excluding_check argument to handle new default.
2916 (Init_Formals): Make *_skip_null_excluding_check formal default
2917 to False
2918 * exp_ch4.adb (Expand_N_Allocator): Add comment to note heavy
2919 code duplication
2920
2921 2019-07-04 Bob Duff <duff@adacore.com>
2922
2923 * sem_ch3.adb (Access_Definition): Do not create a master unless
2924 Tasking_Allowed. Otherwise, this fails on restricted runtimes.
2925
2926 2019-07-04 Hristian Kirtchev <kirtchev@adacore.com>
2927
2928 * sem_util.adb (Propagate_DIC_Attributes): Do not propagate the
2929 Default_Initial_Condition attributes to an incomplete type.
2930
2931 2019-07-04 Ed Schonberg <schonberg@adacore.com>
2932
2933 * sem_attr.adb (Check_Array_Type): An array type attribute such
2934 as 'First can be applied to an unconstrained array tyope when
2935 the attribute reference appears within an aspect specification
2936 and the prefix is a current instance, given that the prefix of
2937 the attribute will become a formal of the subprogram that
2938 implements the aspect (typically a predicate check).
2939
2940 2019-07-04 Piotr Trojanek <trojanek@adacore.com>
2941
2942 * sem_util.adb (Yields_Synchronized_Object): Fix typos in
2943 comments.
2944
2945 2019-07-04 Yannick Moy <moy@adacore.com>
2946
2947 * sem_util.adb (Yields_Synchronized_Object): Adapt to new SPARK
2948 rule.
2949
2950 2019-07-04 Yannick Moy <moy@adacore.com>
2951
2952 * sem_spark.adb (Check_Statement): Only check permission of
2953 object in extended return when it is of a deep type.
2954
2955 2019-07-04 Justin Squirek <squirek@adacore.com>
2956
2957 * sem_ch12.adb (Perform_Appropriate_Analysis): Added for
2958 selecting which type of analysis based on wheither the
2959 instantiation is a generic at the library-level. In which case
2960 expansion during analysis.
2961 (Preanalyze_Actuals): Modify calls to Analyze to use the new
2962 routine.
2963
2964 2019-07-04 Ed Schonberg <schonberg@adacore.com>
2965
2966 * exp_unst.adb: Handle conditional expressions.
2967
2968 2019-07-04 Yannick Moy <moy@adacore.com>
2969
2970 * sem_spark.adb (Check_Package_Spec, Check_Package_Body): Only
2971 analyze parts of the code marked in SPARK.
2972
2973 2019-07-04 Hristian Kirtchev <kirtchev@adacore.com>
2974
2975 * erroutc.adb, exp_aggr.adb, inline.adb, opt.adb, sem_ch3.adb:
2976 Minor reformatting.
2977
2978 2019-07-04 Yannick Moy <moy@adacore.com>
2979
2980 * sem_spark.adb (Explanation, Get_Expl): New functions to get
2981 the explanation for a permission mismatch.
2982 (Perm_Error, Perm_Mismatch, Perm_Error_Loop_Exit): Take
2983 explanation into account for issuing a more precise error
2984 message.
2985 (Set_Perm_Prefixes, Set_Perm_Extensions,
2986 Set_Perm_Extensions_Move): Pass suitable argument for the
2987 explanation node.
2988
2989 2019-07-04 Arnaud Charlet <charlet@adacore.com>
2990
2991 * exp_aggr.adb (In_Place_Assign_OK): Moved to top level and add
2992 support for record aggregates.
2993 (Component_Check): Use Is_CCG_Supported_Aggregate instead of a
2994 similar local predicate.
2995 (Convert_To_Assignments): Take advantage of In_Place_Assign_OK
2996 predicate when possible.
2997 (Is_CCG_Supported_Aggregate): Return False for records with
2998 representation clauses and fix the logic for dealing with nested
2999 aggregates.
3000
3001 2019-07-04 Piotr Trojanek <trojanek@adacore.com>
3002
3003 * opt.adb (Set_Config_Switches): Keep assertions policy as
3004 enabled when analysing internal units in GNATprove mode.
3005
3006 2019-07-04 Arnaud Charlet <charlet@adacore.com>
3007
3008 * exp_ch4.adb (Expand_Short_Circuit_Operator): Strip
3009 N_Variable_Reference_Marker when checking for the presence of
3010 actions.
3011
3012 2019-07-04 Arnaud Charlet <charlet@adacore.com>
3013
3014 * exp_aggr.adb (Check_Component): Take into account type
3015 conversions.
3016
3017 2019-07-04 Dmitriy Anisimkov <anisimko@adacore.com>
3018
3019 * doc/gnat_ugn/platform_specific_information.rst: Document
3020 Windows socket timeout particularity.
3021 * gnat_ugn.texi: Regenerate.
3022 * gsocket.h: Include versionhelpers.h.
3023 * socket.c (__gnat_minus_500ms): New function.
3024 * libgnat/g-sothco.ads (Minus_500ms_Windows_Timeout): New
3025 imported function.
3026 * libgnat/g-socket.adb (Set_Socket_Option): Refactor to remove
3027 500ms from the requested timeout only on old Windows version.
3028
3029 2019-07-04 Thomas Quinot <quinot@adacore.com>
3030
3031 * get_scos.adb: Remove bogus, dead code.
3032
3033 2019-07-04 Ed Schonberg <schonberg@adacore.com>
3034
3035 * sem_dim.adb (Analyze_Dimension_Array_Aggregate): If the
3036 component is an entity name, its dimensions are those of its
3037 type.
3038
3039 2019-07-03 Bob Duff <duff@adacore.com>
3040
3041 * doc/gnat_ugn/gnat_utility_programs.rst: Document new flags in
3042 GNATpp.
3043
3044 2019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
3045
3046 * binde.adb: Remove with clause for System.OS_Lib.
3047 (Force_Elab_Order): Refactor the majority of the code in Butil.
3048 Use the new forced units iterator to obtain unit names.
3049 * bindo-builders.adb: Add with and use clauses for Binderr,
3050 Butil, Opt, Output, Types, GNAT, and GNAT.Dynamic_HTables. Add
3051 a hash table which maps units to line number in the forced
3052 elaboration order file.
3053 (Add_Unit): New routine.
3054 (Build_Library_Graph): Create forced edges between pairs of
3055 units listed in the forced elaboration order file.
3056 (Create_Forced_Edge, Create_Forced_Edges, Destroy_Line_Number,
3057 Duplicate_Unit_Error, Hash_Unit, Internal_Unit_Info,
3058 Is_Duplicate_Unit, Missing_Unit_Info): New routines.
3059 * bindo-graphs.adb (Is_Internal_Unit, Is_Predefined_Unit):
3060 Refactor some of the behavior to Bindo-Units.
3061 * bindo-graphs.ads: Enable the enumeration literal for forced
3062 edges.
3063 * bindo-units.adb, bindo-units.ads (Is_Internal_Unit,
3064 Is_Predefined_Unit): New routines.
3065 * butil.adb: Add with and use clauses for Opt, GNAT, and
3066 System.OS_Lib. Add with clause for Unchecked_Deallocation.
3067 (Has_Next, Iterate_Forced_Units, Next, Parse_Next_Unit_Name,
3068 Read_Forced_Elab_Order_File): New routines.
3069 * butil.ads: Add with and use clauses for Types. Add new
3070 iterator over the units listed in the forced elaboration order
3071 file.
3072 (Has_Next, Iterate_Forced_Units, Next): New routine.
3073 * namet.adb, namet.ads (Present): New routine.
3074
3075 2019-07-03 Bob Duff <duff@adacore.com>
3076
3077 * sem_ch3.adb (Access_Definition): The code was creating a
3078 master in the case where the designated type is a class-wide
3079 interface type. Create a master in the noninterface case as
3080 well. That is, create a master for all limited class-wide types.
3081
3082 2019-07-03 Yannick Moy <moy@adacore.com>
3083
3084 * erroutc.adb (Sloc_In_Range): New function to determine whether
3085 the range of a pragma Warnings covers a location, taking
3086 instantiations into account.
3087
3088 2019-07-03 Johannes Kanig <kanig@adacore.com>
3089
3090 * osint.ads, osint.adb (Get_First_Main_File_Name): New routine
3091 to access the first file provided on the command line.
3092
3093 2019-07-03 Ed Schonberg <schonberg@adacore.com>
3094
3095 * inline.adb (Process_Formals_In_Aspects): New procedure within
3096 Expand_Inlined_Call, to perform a replacement of references to
3097 formals that appear in aspect specifications within the body
3098 being inlined.
3099
3100 2019-07-03 Justin Squirek <squirek@adacore.com>
3101
3102 * sem_ch8.adb (Analyze_Object_Renaming): Add call to search for
3103 the appropriate actual subtype of the object renaming being
3104 analyzed.
3105 (Check_Constrained_Object): Minor cleanup.
3106
3107 2019-07-03 Yannick Moy <moy@adacore.com>
3108
3109 * sem_spark.adb (Get_Observed_Or_Borrowed_Expr): New function to
3110 return go through traversal function call.
3111 (Check_Type): Consistently use underlying type.
3112 (Get_Perm): Adapt for case of elaboration code where variables
3113 are not declared in the environment. Remove incorrect handling
3114 of borrow and observe.
3115
3116 2019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
3117
3118 * inline.adb (Build_Return_Object_Formal): New routine.
3119 (Can_Split_Unconstrained_Function): Code clean up.
3120 (Copy_Formals,Copy_Return_Object): New routines.
3121 (Split_Unconstrained_Function): Code clean up and refactoring.
3122
3123 2019-07-03 Gary Dismukes <dismukes@adacore.com>
3124
3125 * bindo-augmentors.adb, bindo-augmentors.ads,
3126 bindo-builders.ads, bindo-elaborators.adb, sem_ch12.adb,
3127 sem_ch13.adb, sem_spark.adb, sinfo.ads: Minor editorial
3128 corrections and reformatting.
3129
3130 2019-07-03 Bob Duff <duff@adacore.com>
3131
3132 * sem_warn.adb (Check_Infinite_Loop_Warning): Avoid the warning
3133 if an Iterator_Specification is present.
3134
3135 2019-07-03 Bob Duff <duff@adacore.com>
3136
3137 * doc/gnat_ugn/gnat_utility_programs.rst: Document default
3138 new-line behavior.
3139
3140 2019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
3141
3142 * ali.adb: Add with and use clauses for GNAT,
3143 GNAT.Dynamic_HTables, and Snames. Add a map from invocation
3144 signature records to invocation signature ids. Add various
3145 encodings of invocation-related attributes. Sort and update
3146 table Known_ALI_Lines.
3147 (Add_Invocation_Construct, Add_Invocation_Relation,
3148 Body_Placement_Kind_To_Code, Code_To_Body_Placement_Kind,
3149 Code_To_Invocation_Construct_Kind, Code_To_Invocation_Kind,
3150 Code_To_Invocation_Graph_Line_Kind, Destroy, Hash): New
3151 routines.
3152 (Initialize_ALI): Sort the initialization sequence. Add
3153 initialization for all invocation-related tables.
3154 (Invocation_Construct_Kind_To_Code,
3155 Invocation_Graph_Line_Kind_To_Code, Invocation_Kind_To_Code,
3156 Invocation_Signature_Of, Present): New routines.
3157 (Scan_ALI): Add the default values for invocation-related ids.
3158 Scan invocation graph lines.
3159 (Scan_Invocation_Graph_Line): New routine.
3160 * ali.ads: Add with clause for GNAT.Dynamic_Tables. Add types
3161 for invocation constructs, relations, and signatures. Add
3162 tables for invocation constructs, relations, and signatures.
3163 Update Unit_Record to capture invocation-related ids. Relocate
3164 table Unit_Id_Tables and subtypes Unit_Id_Table, Unit_Id_Array
3165 from Binde.
3166 (Add_Invocation_Construct, Add_Invocation_Relation,
3167 Body_Placement_Kind_To_Code, Code_To_Body_Placement_Kind,
3168 Code_To_Invocation_Construct_Kind, Code_To_Invocation_Kind,
3169 Code_To_Invocation_Graph_Line_Kind,
3170 Invocation_Construct_Kind_To_Code,
3171 Invocation_Graph_Line_Kind_To_Code, Invocation_Kind_To_Code,
3172 Invocation_Signature_Of, Present): New routines.
3173 * binde.adb: Add with and use clause for Types. Add use clause
3174 for ALI.Unit_Id_Tables;
3175 * binde.ads: Relocate table Unit_Id_Tables and subtypes
3176 Unit_Id_Table, Unit_Id_Array to ALI.
3177 * bindgen.adb: Remove with and use clause for ALI.
3178 * bindgen.ads: Remove with and use clause for Binde. Add with
3179 and use clause for ALI.
3180 * bindo.adb, bindo.ads, bindo-augmentors.adb,
3181 bindo-augmentors.ads, bindo-builders.adb, bindo-builders.ads,
3182 bindo-diagnostics.adb, bindo-diagnostics.ads,
3183 bindo-elaborators.adb, bindo-elaborators.ads, bindo-graphs.adb,
3184 bindo-graphs.ads, bindo-units.adb, bindo-units.ads,
3185 bindo-validators.adb, bindo-validators.ads, bindo-writers.adb,
3186 bindo-writers.ads: New units.
3187 * debug.adb: Use and describe GNAT debug switches -gnatd_F and
3188 -gnatd_G. Add GNATbind debug switches in the ranges dA .. dZ,
3189 d.a .. d.z, d.A .. d.Z, d.1 .. d.9, d_a .. d_z, d_A .. d_Z, and
3190 d_1 .. d_9. Use and describe GNATbind debug switches -d_A,
3191 -d_I, -d_L, -d_N, -d_O, -d_T, and -d_V.
3192 * exp_util.adb, exp_util.ads (Exceptions_OK): Relocate to
3193 Sem_Util.
3194 * gnatbind.adb: Add with and use clause for Bindo. Use the new
3195 Bindo elaboration order only when -d_N is in effect.
3196 * lib-writ.adb
3197 (Column, Extra, Invoker, Kind, Line, Locations, Name, Placement,
3198 Scope, Signature, Target): New routines.
3199 (Write_ALI): Output all invocation-related data.
3200 (Write_Invocation_Graph): New routine.
3201 * lib-writ.ads: Document the invocation graph ALI line.
3202 * namet.adb, namet.ads (Present): New routines.
3203 * sem_ch8.adb (Find_Direct_Name): Capture the status of
3204 elaboration checks and warnings of an identifier.
3205 (Find_Expanded_Name): Capture the status of elaboration checks
3206 and warnings of an expanded name.
3207 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Ensure
3208 that invocation graph-related data within the body of the main
3209 unit is encoded in the ALI file.
3210 (Analyze_Generic_Subprogram_Declaration): Ensure that invocation
3211 graph-related data within the body of the main unit is encoded
3212 in the ALI file.
3213 (Analyze_Package_Instantiation): Perform minimal decoration of
3214 the instance entity.
3215 (Analyze_Subprogram_Instantiation): Perform minimal decoration
3216 of the instance entity.
3217 * sem_elab.adb: Perform heavy refactoring of all code. The unit
3218 is now split into "services" which specialize in one area of ABE
3219 checks. Add processing in order to capture invocation-graph
3220 related attributes of the main unit, and encode them in the ALI
3221 file. The Processing phase can now operate in multiple modes,
3222 all described by type Processing_Kind. Scenarios and targets
3223 are now distinct at the higher level, and carry their own
3224 representations. This eliminates the need to constantly
3225 recompute their attributes, and offers the various processors a
3226 uniform interface. The various initial states of the Processing
3227 phase are now encoded using type Processing_In_State, and
3228 xxx_State constants.
3229 * sem_elab.ads: Update the literals of type
3230 Enclosing_Level_Kind. Add Inline pragmas on several routines.
3231 * sem_prag.adb (Process_Inline): Ensure that invocation
3232 graph-related data within the body of the main unit is encoded
3233 in the ALI file.
3234 * sem_util.adb (Enclosing_Generic_Body, Enclosing_Generic_Unit):
3235 Code clean up.
3236 (Exceptions_OK): Relocated from Sem_Util.
3237 (Mark_Save_Invocation_Graph_Of_Body): New routine.
3238 * sem_util.ads (Exceptions_OK): Relocated from Sem_Util.
3239 (Mark_Save_Invocation_Graph_Of_Body): New routine.
3240 * sinfo.adb (Is_Elaboration_Checks_OK_Node): Now applicable to
3241 N_Variable_Reference_Marker.
3242 (Is_Elaboration_Warnings_OK_Node): Now applicable to
3243 N_Expanded_Name, N_Identifier, N_Variable_Reference_Marker.
3244 (Is_Read): Use Flag4.
3245 (Is_SPARK_Mode_On_Node): New applicable to
3246 N_Variable_Reference_Marker.
3247 (Is_Write): Use Flag5.
3248 (Save_Invocation_Graph_Of_Body): New routine.
3249 (Set_Is_Elaboration_Checks_OK_Node): Now applicable to
3250 N_Variable_Reference_Marker.
3251 (Set_Is_Elaboration_Warnings_OK_Node): Now applicable to
3252 N_Expanded_Name, N_Identifier, N_Variable_Reference_Marker.
3253 (Set_Is_SPARK_Mode_On_Node): New applicable to
3254 N_Variable_Reference_Marker.
3255 (Set_Save_Invocation_Graph_Of_Body): New routine.
3256 * sinfo.ads: Update the documentation of attributes
3257 Is_Elaboration_Checks_OK_Node, Is_Elaboration_Warnings_OK_Node,
3258 Is_SPARK_Mode_On_Node. Update the flag usage of attributes
3259 Is_Read, Is_Write. Add attribute Save_Invocation_Graph_Of_Body
3260 and update its occurrence in nodes.
3261 (Save_Invocation_Graph_Of_Body): New routine along with pragma
3262 Inline.
3263 (Set_Save_Invocation_Graph_Of_Body): New routine along with
3264 pragma Inline.
3265 * switch-b.adb (Scan_Binder_Switches): Refactor the scanning of
3266 debug switches.
3267 (Scan_Debug_Switches): New routine.
3268 * libgnat/g-dynhta.adb, libgnat/g-dynhta.ads (Contains): New routine.
3269 * libgnat/g-graphs.adb (Associate_Vertices): Update the use of
3270 Component_Vertex_Iterator.
3271 (Contains_Component, Contains_Edge, Contains_Vertex, Has_Next):
3272 Reimplemented.
3273 (Iterate_Component_Vertices): New routine.
3274 (Iterate_Vertices): Removed.
3275 (Next): Update the parameter profile.
3276 (Number_Of_Component_Vertices, Number_Of_Outgoing_Edges): New
3277 routines.
3278 * libgnat/g-graphs.ads: Update the initialization of
3279 No_Component. Add type Component_Vertex_Iterator. Remove type
3280 Vertex_Iterator.
3281 (Has_Next): Add new versions and remove old ones.
3282 (Iterate_Component_Vertices): New routine.
3283 (Iterate_Vertices): Removed.
3284 (Next): Add new versions and remove old ones.
3285 (Number_Of_Component_Vertices, Number_Of_Outgoing_Edges): New
3286 routines.
3287 * libgnat/g-sets.adb (Contains): Reimplemented.
3288 * gcc-interface/Make-lang.in (GNATBIND_OBJS): Add
3289 GNAT.Dynamic_HTables, GNAT.Graphs and Bindo units.
3290 * rtsfind.ads: Remove extra space.
3291
3292 2019-07-03 Yannick Moy <moy@adacore.com>
3293
3294 * sem_spark.adb: Add support for locally borrowing and observing
3295 a path.
3296 (Get_Root_Object): Add parameter Through_Traversal to denote
3297 when we are interesting in getting to the traversed parameter.
3298 (Is_Prefix_Or_Almost): New function to support detection of
3299 illegal access to borrowed or observed paths.
3300 (Check_Pragma): Add analysis of assertion pragmas.
3301
3302 2019-07-03 Ed Schonberg <schonberg@adacore.com>
3303
3304 * sem_ch13.adb (Build_Predicate_Functions): In a generic context
3305 we do not build the bodies of predicate fuctions, but the
3306 expression in a static predicate must be elaborated to allow
3307 case coverage checking within the generic unit.
3308 (Build_Discrete_Static_Predicate): In a generic context, return
3309 without building function body once the
3310 Static_Discrete_Predicate expression for the type has been
3311 constructed.
3312
3313 2019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
3314
3315 * bindgen.adb, inline.adb, layout.adb, sem_ch12.adb,
3316 sem_ch13.adb, sem_ch7.adb, styleg.adb: Minor reformatting.
3317
3318 2019-07-03 Bob Duff <duff@adacore.com>
3319
3320 * par-ch3.adb (P_Defining_Identifier): Call
3321 Check_Defining_Identifier_Casing.
3322 * style.ads, styleg.ads, styleg.adb
3323 (Check_Defining_Identifier_Casing): New procedure to check for
3324 mixed-case defining identifiers.
3325 * stylesw.ads, stylesw.adb (Style_Check_Mixed_Case_Decls): New
3326 flag for checking for mixed-case defining identifiers.
3327 * doc/gnat_ugn/building_executable_programs_with_gnat.rst:
3328 Document new feature.
3329 * gnat_ugn.texi: Regenerate.
3330
3331 2019-07-03 Eric Botcazou <ebotcazou@adacore.com>
3332
3333 * doc/gnat_ugn/building_executable_programs_with_gnat.rst
3334 (Warning message control): Document that -gnatw.z/Z apply to
3335 array types.
3336 * freeze.adb (Freeze_Entity): Give -gnatw.z warning for array
3337 types as well, but not if the specified alignment is the minimum
3338 one.
3339 * gnat_ugn.texi: Regenerate.
3340
3341 2019-07-03 Bob Duff <duff@adacore.com>
3342
3343 * einfo.ads, exp_util.adb, layout.ads, sinfo.ads: Spell "laid"
3344 correctly.
3345
3346 2019-07-03 Ed Schonberg <schonberg@adacore.com>
3347
3348 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): No error
3349 message on attribute applied to a renaming when the renamed
3350 object is an aggregate (from code reading).
3351 (Check_Aspect_At_End_Of_Declarations): In a generic context
3352 where freeze nodes are not generated, the original expression
3353 for an aspect may need to be analyzed to precent spurious
3354 conformance errors when compared with the expression that is
3355 anakyzed at the end of the current declarative list.
3356
3357 2019-07-03 Eric Botcazou <ebotcazou@adacore.com>
3358
3359 * layout.adb (Layout_Type): Do not set the component size of an
3360 array with a scalar component if the component type is
3361 overaligned.
3362
3363 2019-07-03 Ed Schonberg <schonberg@adacore.com>
3364
3365 * inline.adb (Make_Loop_Labels_Unique): New procedure to modify
3366 the source code of subprograms that are inlined by the
3367 front-end, to prevent accidental duplication between loop labels
3368 in the inlined code and the code surrounding the inlined call.
3369
3370 2019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
3371
3372 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update
3373 the section on resolving elaboration circularities to eliminate
3374 certain combinations of switches which together do not produce
3375 the desired effect and confuse users.
3376 * gnat_ugn.texi: Regenerate.
3377
3378 2019-07-03 Arnaud Charlet <charlet@adacore.com>
3379
3380 * bindgen.adb (Gen_Main): Disable generation of reference to
3381 Ada_Main_Program_Name for CCG.
3382 * bindusg.adb (Display): Add -G to the command-line usage for
3383 gnatbind.
3384 * opt.ads (Generate_C_Code): Update comment.
3385 * switch-b.adb (Scan_Binder_Switches): Add handling for -G.
3386
3387 2019-07-03 Arnaud Charlet <charlet@adacore.com>
3388
3389 * sem_ch7.adb (Has_Referencer): Do not consider inlined
3390 subprograms when generating C code, which allows us to generate
3391 static inline subprograms.
3392
3393 2019-07-03 Justin Squirek <squirek@adacore.com>
3394
3395 * sem_ch6.adb (Check_Conformance): Add expression checking for
3396 constant modifiers in anonymous access types (in addition to
3397 "non-null" types) so that they are considered "matching" for
3398 subsequent conformance tests.
3399
3400 2019-07-03 Arnaud Charlet <charlet@adacore.com>
3401
3402 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
3403 Clarify wording on No_Multiple_Elaboration.
3404 * gnat_rm.texi: Regenerate.
3405
3406 2019-07-03 Ed Schonberg <schonberg@adacore.com>
3407
3408 * sem_ch8.adb (Find_Selected_Component): If the prefix is the
3409 current instance of a type or subtype, complete the resolution
3410 of the name by finding the component of the type denoted by the
3411 selector name.
3412
3413 2019-07-03 Eric Botcazou <ebotcazou@adacore.com>
3414
3415 * doc/gnat_rm/interfacing_to_other_languages.rst (Interfacing to C):
3416 Document that boolean types with convention C now map to C99 bool.
3417 * gnat_rm.texi: Regenerate.
3418
3419 2019-07-03 Javier Miranda <miranda@adacore.com>
3420
3421 * exp_attr.adb (Expand_Min_Max_Attribute): Code cleanup:
3422 removing code that it is now never executed in the CCG compiler
3423 (dead code).
3424
3425 2019-07-02 Iain Sandoe <iain@sandoe.co.uk>
3426
3427 * libgnat/system-darwin-ppc.ads: Set Stack_Check_Probes True for
3428 PPC Darwin.
3429
3430 2019-07-01 Ed Schonberg <schonberg@adacore.com>
3431
3432 * sem_ch12.adb (Is_Defaulted): New predicate in
3433 Check_Formal_Package_Intance, to skip the conformance of checks
3434 on parameters of a formal package that are defaulted,
3435
3436 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
3437
3438 * checks.adb, exp_ch9.adb, exp_unst.adb, sem_ch4.adb,
3439 sem_prag.adb, sem_spark.adb: Minor reformatting.
3440
3441 2019-07-01 Ed Schonberg <schonberg@adacore.com>
3442
3443 * sem_attr.adb (Analyze_Attribute, case Enum_Rep): Allow prefix
3444 of attribute to be an attribute reference of a discrete type.
3445
3446 2019-07-01 Eric Botcazou <ebotcazou@adacore.com>
3447
3448 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Move up
3449 handling of Has_Pragma_Inline_Always and deal with
3450 Has_Pragma_No_Inline.
3451
3452 2019-07-01 Ed Schonberg <schonberg@adacore.com>
3453
3454 * sem_ch3.adb (Build_Derived_Record_Type): If the parent type is
3455 declared as a subtype of a private type with an inherited
3456 discriminant constraint, its generated full base appears as a
3457 record subtype, so we need to retrieve its oen base type so that
3458 the inherited constraint can be applied to it.
3459
3460 2019-07-01 Yannick Moy <moy@adacore.com>
3461
3462 * sem_spark.adb: Completely rework the algorithm for ownership
3463 checking, as the rules in SPARK RM have changed a lot.
3464 * sem_spark.ads: Update comments.
3465
3466 2019-07-01 Dmitriy Anisimkov <anisimko@adacore.com>
3467
3468 * gsocket.h (Has_Sockaddr_Len): Use the offset of sin_family offset in
3469 the sockaddr_in structure to determine the existence of length field
3470 before the sin_family.
3471
3472 2019-07-01 Ed Schonberg <schonberg@adacore.com>
3473
3474 * sem_prag.adb (Analyze_Pragma, case Weak_External): Pragma only
3475 applies to entities with run-time addresses, not to types.
3476
3477 2019-07-01 Piotr Trojanek <trojanek@adacore.com>
3478
3479 * einfo.adb, sem_ch7.adb, sem_prag.adb, sem_util.adb: Update
3480 references to the SPARK RM after the removal of Rule 7.1.4(5).
3481
3482 2019-07-01 Piotr Trojanek <trojanek@adacore.com>
3483
3484 * sysdep.c: Cleanup references to LynuxWorks in docs and
3485 comments.
3486
3487 2019-07-01 Ed Schonberg <schonberg@adacore.com>
3488
3489 * checks.adb (Insert_Valid_Check): Do not apply validity check
3490 to variable declared within a protected object that uses the
3491 Lock_Free implementation, to prevent unwarranted constant
3492 folding, because entities within such an object msut be treated
3493 as volatile.
3494
3495 2019-07-01 Eric Botcazou <ebotcazou@adacore.com>
3496
3497 * exp_ch9.adb (Check_Inlining): Deal with Has_Pragma_No_Inline.
3498
3499 2019-07-01 Ed Schonberg <schonberg@adacore.com>
3500
3501 * exp_unst.adb (Visit_Node, Check_Static_Type): Improve the
3502 handling of private and incomplete types whose full view is an
3503 access type, to detect additional uplevel references in dynamic
3504 bounds. This is relevant to N_Free_Statement among others that
3505 manipulate types whose full viww may be an access type.
3506
3507 2019-07-01 Pat Rogers <rogers@adacore.com>
3508
3509 * doc/gnat_rm/representation_clauses_and_pragmas.rst: Correct
3510 size indicated for R as a component of an array.
3511 * gnat_rm.texi: Regenerate.
3512
3513 2019-07-01 Justin Squirek <squirek@adacore.com>
3514
3515 * libgnat/s-win32.ads: Add definition for ULONG, modify
3516 OVERLAPPED type, and add appropriate pragmas.
3517
3518 2019-07-01 Bob Duff <duff@adacore.com>
3519
3520 * gnat1drv.adb (gnat1drv): Call Write_ALI if the main unit is
3521 ignored-ghost.
3522
3523 2019-07-01 Yannick Moy <moy@adacore.com>
3524
3525 * sem_ch4.adb (Operator_Check): Refine error message.
3526
3527 2019-07-01 Piotr Trojanek <trojanek@adacore.com>
3528
3529 * libgnat/a-calend.ads: Revert "Global => null" contracts on
3530 non-pure routines.
3531
3532 2019-07-01 Piotr Trojanek <trojanek@adacore.com>
3533
3534 * exp_attr.adb, libgnat/g-graphs.ads: Fix typos in comments:
3535 componant -> component.
3536
3537 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
3538
3539 * libgnat/g-graphs.adb: Use type Directed_Graph rather than
3540 Instance in various routines.
3541 * libgnat/g-graphs.ads: Change type Instance to Directed_Graph.
3542 Update various routines that mention the type.
3543
3544 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
3545
3546 * libgnat/g-sets.adb: Use type Membership_Set rathern than
3547 Instance in various routines.
3548 * libgnat/g-sets.ads: Change type Instance to Membership_Set.
3549 Update various routines that mention the type.
3550
3551 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
3552
3553 * libgnat/g-lists.adb: Use type Doubly_Linked_List rather than
3554 Instance in various routines.
3555 * libgnat/g-lists.ads: Change type Instance to
3556 Doubly_Linked_List. Update various routines that mention the
3557 type.
3558
3559 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
3560
3561 * libgnat/g-dynhta.adb: Use type Dynamic_Hash_Table rather than
3562 Instance in various routines.
3563 * libgnat/g-dynhta.ads: Change type Instance to
3564 Dynamic_Hash_Table. Update various routines that mention the
3565 type.
3566
3567 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
3568
3569 * exp_attr.adb, exp_ch7.adb, exp_unst.adb, sem_ch3.adb,
3570 sem_util.adb, uintp.adb, uintp.ads: Minor reformatting.
3571
3572 2019-07-01 Javier Miranda <miranda@adacore.com>
3573
3574 * exp_attr.adb (Expand_Min_Max_Attribute): Disable expansion of
3575 'Min/'Max on integer, enumeration, fixed point and floating
3576 point types since the CCG backend now provides in file
3577 standard.h routines to support it.
3578
3579 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
3580
3581 * impunit.adb: Add GNAT.Graphs to list Non_Imp_File_Names_95.
3582 * Makefile.rtl, gcc-interface/Make-lang.in: Register unit
3583 GNAT.Graphs.
3584 * libgnat/g-dynhta.adb: Various minor cleanups (use Present
3585 rather than direct comparisons).
3586 (Delete): Reimplement to use Delete_Node.
3587 (Delete_Node): New routine.
3588 (Destroy_Bucket): Invoke the provided destructor.
3589 (Present): New routines.
3590 * libgnat/g-dynhta.ads: Add new generic formal Destroy_Value.
3591 Use better names for the components of iterators.
3592 * libgnat/g-graphs.adb, libgnat/g-graphs.ads: New unit.
3593 * libgnat/g-lists.adb: Various minor cleanups (use Present
3594 rather than direct comparisons).
3595 (Delete_Node): Invoke the provided destructor.
3596 (Present): New routine.
3597 * libgnat/g-lists.ads: Add new generic formal Destroy_Element.
3598 Use better names for the components of iterators.
3599 (Present): New routine.
3600 * libgnat/g-sets.adb, libgnat/g-sets.ads (Destroy, Preset,
3601 Reset): New routines.
3602
3603 2019-07-01 Dmitriy Anisimkov <anisimko@adacore.com>
3604
3605 * libgnat/g-sothco.adb (Get_Address): Fix the case when AF_INET6
3606 is not defined.
3607
3608 2019-07-01 Ed Schonberg <schonberg@adacore.com>
3609
3610 * exp_attr.adb (Expand_Attribute_Reference, case Invalid_Value):
3611 Resolve result of call to Get_Simple_Init_Val, which may be a
3612 conversion of a literal.
3613
3614 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
3615
3616 * freeze.adb (Freeze_Expression): Remove the horrible useless
3617 name hiding of N. Insert the freeze nodes generated by the
3618 expression prior to the expression when the nearest enclosing
3619 scope is transient.
3620
3621 2019-07-01 Pierre-Marie de Rodat <derodat@adacore.com>
3622
3623 * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Fix
3624 formatting issues in the -gnatR section.
3625 * gnat_ugn.texi: Regenerate.
3626
3627 2019-06-30 Iain Sandoe <iain@sandoe.co.uk>
3628
3629 * gnatlink.adb (Link_Step): Remove duplicate -static-libgcc switches.
3630 Push -shared-libgcc explicitly, when it is the target default (unless
3631 overidden by the static flag).
3632 When the user has put an instance of shared/static-libgcc do not push
3633 a duplicate of this.
3634
3635 2019-06-29 Eric Botcazou <ebotcazou@adacore.com>
3636
3637 * gcc-interface/decl.c (gnat_to_gnu_entity): Beep up comment on SAVED,
3638 and tweak comment on the assertion about the scopes of Itypes. Do not
3639 skip the regular processing for Itypes that are E_Record_Subtype with
3640 a Cloned_Subtype. Get the Cloned_Subtype for every E_Record_Subtype
3641 if the type is dummy and hasn't got its own freeze node.
3642 <E_Record_Subtype>: Save again the DECL of the Cloned_Subtype, if any.
3643 <E_Access_Subtype>: Save again the DECL of the equivalent type.
3644 (Gigi_Equivalent_Type) <E_Access_Subtype>: New case.
3645
3646 2019-06-29 Eric Botcazou <ebotcazou@adacore.com>
3647
3648 * gcc-interface/utils.c (unchecked_convert): Tweak comment. Only skip
3649 dereferences when padding to have the same size on both sides. Do it
3650 for destination types with self-referential size too.
3651
3652 2019-06-29 Eric Botcazou <ebotcazou@adacore.com>
3653
3654 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: If the
3655 type requires strict alignment, then set the RM size to the type size.
3656 Rework handling of alignment and sizes of tagged types in ASIS mode.
3657 (validate_size): Rename local variable and remove special handling for
3658 strict-alignment types.
3659 * gcc-interface/utils.c (finish_record_type): Constify local variables
3660 and use properly typed constants.
3661
3662 2019-06-29 Eric Botcazou <ebotcazou@adacore.com>
3663
3664 * gcc-interface/decl.c (gnat_to_gnu_field): Rework error messages for
3665 fields requiring strict alignment, add explicit test on Storage_Unit
3666 for position and size, and mention type alignment for position.
3667
3668 2019-06-29 Eric Botcazou <ebotcazou@adacore.com>
3669
3670 * gcc-interface/trans.c (mark_visited_r): Set TYPE_SIZES_GIMPLIFIED on
3671 the main variant of a type, if any.
3672
3673 2019-06-29 Eric Botcazou <ebotcazou@adacore.com>
3674
3675 * gcc-interface/decl.c (set_nonaliased_component_on_array_type): Add
3676 missing guard for the presence of TYPE_CANONICAL.
3677 (set_reverse_storage_order_on_array_type): Likewise.
3678
3679 2019-06-29 Eric Botcazou <ebotcazou@adacore.com>
3680
3681 * gcc-interface/gigi.h (make_packable_type): Remove default value.
3682 (value_factor_p): Tweak prototype.
3683 * gcc-interface/decl.c (gnat_to_gnu_entity): Add comment.
3684 (gnat_to_gnu_component_type): Likewise.
3685 (gnat_to_gnu_field): Likewise. Fetch the position of the field earlier
3686 and simplify the condition under which the type is packed. Declare
3687 local variable is_bitfield. Pass 1 as max_align to make_packable_type
3688 if it is set to true.
3689 (copy_and_substitute_in_layout): Pass 0 to make_packable_type.
3690 * gcc-interface/utils.c (make_packable_array_type): New function.
3691 (make_packable_type): Use it to rewrite the type of array field.
3692 (maybe_pad_type): Pass align parameter to make_packable_type.
3693 (create_field_decl): Minor tweaks.
3694 (value_factor_p): Assert that FACTOR is a power of 2 and replace the
3695 modulo computation by a masking operation.
3696
3697 2019-06-25 Eric Botcazou <ebotcazou@adacore.com>
3698
3699 * gcc-interface/decl.c (gnat_to_gnu_entity): Remove superfluous test
3700 in previous change.
3701 * gcc-interface/gigi.h (maybe_character_type): Fix formatting.
3702 (maybe_character_value): Likewise.
3703
3704 2019-06-24 Jan Hubicka <jh@suse.cz>
3705
3706 * gcc-interface/decl.c (gnat_to_gnu_entity): Check that
3707 type is array or integer prior checking string flag.
3708 * gcc-interface/gigi.h (maybe_character_type): Likewise.
3709 (maybe_character_value): Likewise.
3710
3711 2019-06-24 Martin Sebor <msebor@redhat.com>
3712
3713 * gcc-interface/utils.c (handle_nonnull_attribute): Quote attribute
3714 name.
3715
3716 2019-06-18 Arnaud Charlet <charlet@adacore.com>
3717
3718 PR ada/80590
3719 * sem_ch5.adb (Analyze_Loop_Statement): Avoid exception propagation
3720 during normal processing.
3721
3722 2019-06-17 Arnaud Charlet <charlet@adacore.com>
3723
3724 PR ada/80590
3725 * exp_ch9.adb (Expand_N_Delay_Relative_Statement): Swap the two
3726 conditions to avoid a unnecessary exception propagation in the default
3727 case.
3728
3729 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
3730
3731 * gcc-interface/utils.c (handle_stack_protect_attribute): Move around.
3732
3733 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
3734
3735 * doc/gnat_rm/implementation_defined_pragmas.rst (Machine_Attribute):
3736 Document additional optional parameters.
3737 * sem_prag.adb (Analyze_Pragma) <Pragma_Machine_Attribute>: Accept
3738 more than one optional parameter.
3739 * gcc-interface/decl.c (prepend_one_attribute_pragma): Alphabetize
3740 the list of supported pragmas. Simplify the handling of parameters
3741 and add support for more than one optional parameter.
3742 * gcc-interface/utils.c (attr_cold_hot_exclusions): New constant.
3743 (gnat_internal_attribute_table): Add entry for no_icf, noipa, flatten,
3744 used, cold, hot, target and target_clones.
3745 (begin_subprog_body): Do not create the RTL for the subprogram here.
3746 (handle_noicf_attribute): New static function.
3747 (handle_noipa_attribute): Likewise.
3748 (handle_flatten_attribute): Likewise.
3749 (handle_used_attribute): Likewise.
3750 (handle_cold_attribute): Likewise.
3751 (handle_hot_attribute): Likewise.
3752 (handle_target_attribute): Likewise.
3753 (handle_target_clones_attribute): Likewise.
3754
3755 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
3756
3757 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Return 0
3758 for 'Size too.
3759 (Identifier_to_gnu): Use the actual subtype for a reference to a
3760 packed array in a return statement.
3761 (Attribute_to_gnu) <Attr_Size>: Do not strip VIEW_CONVERT_EXPRs from
3762 the prefix in every case.
3763
3764 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
3765
3766 * gcc-interface/trans.c (gnat_to_gnu): Remove superfluous tests on
3767 Backend_Overflow_Checks_On_Target and rework comments.
3768
3769 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
3770
3771 * gcc-interface/trans.c (walk_nesting_tree): New static function.
3772 (finalize_nrv): Use it to walk the entire nesting tree.
3773
3774 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
3775
3776 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Remove
3777 obsolete test on Is_For_Access_Subtype.
3778
3779 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
3780
3781 * gcc-interface/decl.c (components_to_record): Set a name on the type
3782 created for the REP part, if any.
3783 * gcc-interface/utils.c (finish_record_type): Only take the maximum
3784 when merging sizes for a variant part at offset 0.
3785 (merge_sizes): Rename has_rep parameter into max.
3786
3787 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
3788
3789 * gcc-interface/utils.c (gnat_internal_attribute_table): Add support
3790 for stack_protect attribute.
3791 (handle_stack_protect_attribute): New static function.
3792
3793 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
3794
3795 * gcc-interface/decl.c (intrin_arglists_compatible_p): Do not return
3796 false if the internal builtin uses a variable list.
3797
3798 2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
3799
3800 * gcc-interface/trans.c (Call_to_gnu): Do not initialize the temporary
3801 created out of addressability concerns if it's for the _Init parameter
3802 of an initialization procedure.
3803
3804 2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
3805
3806 * gcc-interface/ada-builtin-types.def: New file.
3807 * gcc-interface/ada-builtins.def: Likewise.
3808 * gcc-interface/ada-tree.h (BUILT_IN_LIKELY): New macro.
3809 (BUILT_IN_UNLIKELY): Likewise.
3810 * gcc-interface/trans.c (independent_iterations_p): Initialize the
3811 auto-vector to 16 elements.
3812 (Call_to_gnu): Remove local variable and change the vector of actual
3813 parameters to an auto-vector. Do not convert actual parameters to
3814 the argument type for front-end built-in functions. Add support for
3815 front-end built-in functions.
3816 (build_noreturn_cond): Use internal instead of built-in function.
3817 * gcc-interface/utils.c (c_builtin_type): Include ada-builtin-types.def
3818 (install_builtin_function_types): Likewise.
3819 (install_builtin_functions): Include ada-builtins.def first.
3820
3821 2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
3822
3823 * gcc-interface/utils.c (maybe_pad_type): Issue the warning for the
3824 specific case of component types preferably.
3825
3826 2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
3827
3828 * gcc-interface/trans.c (Identifier_to_gnu): Minor tweaks.
3829 (gnat_to_gnu): Do not convert the result if it is a reference to an
3830 unconstrained array used as the prefix of an attribute reference that
3831 requires an lvalue.
3832
3833 2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
3834
3835 * gcc-interface/trans.c (Gigi_Types_Compatible): New predicate.
3836 (Identifier_to_gnu): Use it to assert that the type of the identifier
3837 and that of its entity are compatible for gigi. Rename a couple of
3838 local variables and separate the processing of the result type.
3839
3840 2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
3841
3842 * gcc-interface/trans.c (Call_to_gnu): Use the unpadded type when
3843 putting back an intermediate conversion the type of the actuals.
3844
3845 2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
3846
3847 * gcc-interface/trans.c (gnat_to_gnu) <Shift operations>: Convert the
3848 count to the unsigned version of its base type before proceeding.
3849
3850 2019-05-16 Martin Sebor <msebor@redhat.com>
3851
3852 * gcc-interface/trans.c (check_inlining_for_nested_subprog): Quote
3853 reserved names.
3854
3855 2019-05-08 Arnaud Charlet <charlet@adacore.com>
3856
3857 * standard.ads.h: New file.
3858
3859 2019-05-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3860
3861 * gcc-interface/Makefile.in (install-gcc-specs): Use foreach.
3862 Honor DESTDIR.
3863
3864 2019-04-29 Michael K. Darling <darlingm@gmail.com>
3865
3866 * gnatvsn.ads: Bump Library_Version to 10.
3867
3868 2019-04-24 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3869 Bernd Edlinger <bernd.edlinger@hotmail.de>
3870 Jakub Jelinek <jakub@redhat.com>
3871
3872 PR target/89093
3873 * raise-gcc.c (TARGET_ATTRIBUTE): Define.
3874 (continue_unwind, personality_body, PERSONALITY_FUNCTION): Add
3875 TARGET_ATTRIBUTE.
3876
3877 2019-04-07 Eric Botcazou <ebotcazou@adacore.com>
3878
3879 * libgnat/i-cexten.ads (CFloat_128): New type.
3880
3881 2019-03-22 Dmitriy Anisimkov <anisimko@adacore.com>
3882
3883 PR ada/89583
3884 * libgnat/g-socket.adb (Bind_Socket, Connect_Socket,
3885 Send_Socket): Fix the computation of structure lengths passed to
3886 low level routines.
3887 (Is_IPv6_Address): Fix the number of expected colons.
3888
3889 2019-03-11 Martin Liska <mliska@suse.cz>
3890
3891 * gcc-interface/misc.c (gnat_post_options): Wrap option name in string
3892 format message and fix GNU coding style.
3893
3894 2019-02-08 Eric Botcazou <ebotcazou@adacore.com>
3895
3896 * gcc-interface/trans.c (gnat_to_gnu) <N_Aggregate>: Minor tweak.
3897 * gcc-interface/utils.c (convert): Do not pad when doing an unchecked
3898 conversion here. Use TREE_CONSTANT throughout the function.
3899 (unchecked_convert): Also pad if the source is a CONSTRUCTOR and the
3900 destination is a more aligned array type or a larger aggregate type,
3901 but not between original and packable versions of a type.
3902
3903 2019-02-08 Eric Botcazou <ebotcazou@adacore.com>
3904
3905 * gcc-interface/utils.c (max_size) <tcc_unary>: Be prepared for an
3906 operand with VOID_TYPE.
3907
3908 2019-02-08 Eric Botcazou <ebotcazou@adacore.com>
3909
3910 * gcc-interface/trans.c (elaborate_all_entities): Do not elaborate the
3911 entities of a package renaming another one.
3912
3913 2019-02-08 Eric Botcazou <ebotcazou@adacore.com>
3914
3915 * gcc-interface/trans.c (Regular_Loop_to_gnu): Replace tests on
3916 individual flag_unswitch_loops and flag_tree_loop_vectorize switches
3917 with test on global optimize switch.
3918 (Raise_Error_to_gnu): Likewise.
3919
3920 2019-02-07 Eric Botcazou <ebotcazou@adacore.com>
3921
3922 * libgnarl/s-linux__sparc.ads (ETIMEDOUT): Set to correct value.
3923
3924 2019-02-06 Arnaud Charlet <charlet@adacore.com>
3925
3926 * libgnarl/s-linux__x32.ads: Resync list of signals with s-linux.ads
3927
3928 2019-01-27 Eric Botcazou <ebotcazou@adacore.com>
3929
3930 * repinfo.adb (List_Component_Layout): Remove superfluous space for
3931 zero-sized field.
3932 * gcc-interface/ada-tree.h (TYPE_IS_EXTRA_SUBTYPE_P): New macro.
3933 * gcc-interface/gigi.h (create_extra_subtype): Declare.
3934 * gcc-interface/decl.c (TYPE_ARRAY_SIZE_LIMIT): Likewise.
3935 (update_n_elem): New function.
3936 (gnat_to_gnu_entity): Use create_extra_subtype to create extra subtypes
3937 instead of doing it manually.
3938 <E_Array_Type>: Use update_n_elem to compute the maximum size. Use the
3939 index type instead of base type for the bounds. Set TYPE_ARRAY_MAX_SIZE
3940 of the array to the maximum size.
3941 <E_Array_Subtype>: Create an extra subtype using the index type of the
3942 base array type for self-referential bounds. Use update_n_elem to
3943 compute the maximum size. Set TYPE_ARRAY_MAX_SIZE of the array to the
3944 maximum size.
3945 (gnat_to_gnu_field): Clear DECL_NONADDRESSABLE_P on discriminants.
3946 * gcc-interface/misc.c (gnat_get_alias_set): Return the alias set of
3947 the base type for an extra subtype.
3948 (gnat_type_max_size): Remove obsolete code.
3949 * gcc-interface/trans.c (Attribute_to_gnu): Minor tweak.
3950 (can_be_lower_p): Deal with pathological types.
3951 * gcc-interface/utils.c (create_extra_subtype): New function.
3952 (create_field_decl): Minor tweak.
3953 (max_size) <tcc_reference>: Compute a better value by using the extra
3954 subtypes on the self-referential bounds.
3955 <tcc_binary>: Rewrite. Deal with "negative value" in unsigned types.
3956 <tcc_expression>: Likewise.
3957 * gcc-interface/utils2.c (compare_arrays): Retrieve the original bounds
3958 of the arrays upfront. Swap only if the second length is not constant.
3959 Use comparisons on the original bounds consistently for the null tests.
3960 (build_binary_op): Use TYPE_IS_EXTRA_SUBTYPE_P macro.
3961 (build_allocator): Minor tweak.
3962
3963 2019-01-27 Eric Botcazou <ebotcazou@adacore.com>
3964
3965 * gcc-interface/decl.c (array_type_has_nonaliased_component): Return
3966 the same value for every dimension of a multidimensional array type.
3967
3968 2019-01-26 Eric Botcazou <ebotcazou@adacore.com>
3969
3970 * gcc-interface/trans.c (Regular_Loop_to_gnu): Use the SLOC of the
3971 iteration scheme, if present, throughout the translation.
3972
3973 2019-01-26 Eric Botcazou <ebotcazou@adacore.com>
3974
3975 * gcc-interface/trans.c (gnat_to_gnu) <N_Assignment_Statement>: Use
3976 DECL_SIZE_UNIT instead of TYPE_SIZE_UNIT for the size to be assigned
3977 by a call to memset if the LHS is a DECL.
3978
3979 2019-01-26 Eric Botcazou <ebotcazou@adacore.com>
3980
3981 * gcc-interface/trans.c (struct loop_info_d): Remove artificial field.
3982 (Loop_Statement_to_gnu): Do not set it.
3983
3984 2019-01-26 Eric Botcazou <ebotcazou@adacore.com>
3985
3986 * gcc-interface/trans.c (Iterate_Acc_Clause_Arg): Fix formatting.
3987 (Acc_gnat_to_gnu): Likewise.
3988 (Acc_Data_to_gnu): Likewise.
3989 (Acc_Var_to_gnu): Likewise.
3990 (Acc_Reduc_to_gnu): Likewise.
3991 (Acc_Size_List_to_gnu): Likewise.
3992 (Pragma_to_gnu) <Pragma_Acc_Loop>: Likewise.
3993 <Pragma_Acc_Data>): Likewise.
3994 (find_loop_for): Remove default value for parameters.
3995 * gcc-interface/trans.c (gnat_to_gnu) <N_Op_And>: Merge into...
3996 <N_Op_Eq>): ...this.
3997
3998 2019-01-26 Eric Botcazou <ebotcazou@adacore.com>
3999
4000 * gcc-interface/decl.c (annotate_value) <INTEGER_CST>: Use test on
4001 the sign bit instead of on the sign of the value.
4002 <PLUS_EXPR>: Turn addition of negative constant into subtraction.
4003 <MULT_EXPR>: Add test for degenerate case.
4004 <BIT_AND_EXPR>: Simplify.
4005
4006 2019-01-18 Sebastian Huber <sebastian.huber@embedded-brains.de>
4007
4008 * s-oscons-tmplt.c (AF_INET6): Do not undefine for RTEMS.
4009
4010 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
4011
4012 PR other/16615
4013 * exp_ch11.adb: Change "can not" to "cannot".
4014 * sem_ch4.adb: Likewise.
4015
4016 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
4017
4018 PR other/16615
4019 * exp_ch9.adb: Mechanically replace "can not" with "cannot".
4020 * libgnat/s-regpat.ads: Likewise.
4021 * par-ch4.adb: Likewise.
4022 * set_targ.adb: Likewise.
4023 * types.ads: Likewise.
4024
4025 2019-01-08 Justin Squirek <squirek@adacore.com>
4026
4027 Revert:
4028 2018-07-31 Justin Squirek <squirek@adacore.com>
4029
4030 * lib-writ.adb (Write_With_Lines): Modfiy the generation
4031 of dependencies within ali files so that source unit
4032 bodies are properly listed even if said bodies are
4033 missing. Perform legacy behavior in GNATprove mode.
4034 * lib-writ.ads: Modify documentation to reflect current
4035 behavior.
4036
4037 and:
4038 2018-09-26 Justin Squirek <squirek@adacore.com>
4039
4040 * lib-writ.adb, lib-writ.ads (Write_With_Lines): Add
4041 documentation and an extra conditional check for RCI
4042 units so that generated ali files will list the spec
4043 only instead of a body when a body is not found.
4044
4045 2019-01-04 Eric Botcazou <ebotcazou@adacore.com>
4046
4047 * gnatvsn.ads: Bump copyright year.
4048
4049 2019-01-01 Jakub Jelinek <jakub@redhat.com>
4050
4051 Update copyright years.
4052
4053 * gnat_ugn.texi: Bump @copying's copyright year.
4054 * gnat_rm.texi: Likewise.
4055 \f
4056 Copyright (C) 2019 Free Software Foundation, Inc.
4057
4058 Copying and distribution of this file, with or without modification,
4059 are permitted in any medium without royalty provided the copyright
4060 notice and this notice are preserved.