]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/ada/ChangeLog
[Ada] Incorrect values in conversion from fixed-point subtype with 'Small
[thirdparty/gcc.git] / gcc / ada / ChangeLog
CommitLineData
36167f09 12019-07-22 Ed Schonberg <schonberg@adacore.com>
2
3 * freeze.adb (Freeze_Fixed_Point_Type): When freezing a
4 fixed-point subtype, check whether the parent type declarastion
5 includes an aspect specification for the 'Small type attribute,
6 and inherit the specified value.
7
b5293e2d 82019-07-22 Javier Miranda <miranda@adacore.com>
9
10 * freeze.adb (Freeze_Subprogram): Check that C++ constructors
11 must have external or link name.
12
7c48993c 132019-07-22 Ed Schonberg <schonberg@adacore.com>
14
15 * sem_res.adb (Resolve_Selected_Component): If the prefix has a
16 deferred reference, generate the correct reference now, to
17 indicate that the previous assignment is used. This prevents
18 spurious warnings on useless assignments when compiling with all
19 warnings enabled. when there is a subsequent call in the same
20 stqtement list, in which the prefix of the selected component is
21 the actual for an out parameter.
22
0b87f8cf 232019-07-22 Eric Botcazou <ebotcazou@adacore.com>
24
25 * exp_attr.adb (Expand_Loop_Entry_Attribute): Copy the condition
26 of a while loop instead of simply relocating it.
27
0c41e160 282019-07-18 Arnaud Charlet <charlet@adacore.com>
29
30 * Makefile.rtl, expect.c, env.c, aux-io.c, mkdir.c, initialize.c,
31 cstreams.c, raise.c, tracebak.c, adadecode.c, init.c, raise-gcc.c,
32 argv.c, adaint.c, adaint.h, ctrl_c.c, sysdep.c, rtinit.c, cio.c,
33 seh_init.c, exit.c, targext.c: Introduce a "STANDALONE" mode where C
34 runtime files do not have any dependency on GCC include files.
35 Remove unnecessary includes.
36 Remove remaining references to VMS in runtime C file.
37 * runtime.h: new File.
38
0e972d45 392019-07-13 Andreas Schwab <schwab@linux-m68k.org>
40
41 * Makefile.rtl: Use g-sercom__linux.adb for all linuxes.
42
77fe13f0 432019-07-11 Piotr Trojanek <trojanek@adacore.com>
44
45 * lib-writ.adb (Ensure_System_Dependency,
46 Up_To_Date_ALI_File_Exists, Write_ALI): Replace low-level access
47 to table with a high-level query.
48
56903255 492019-07-11 Piotr Trojanek <trojanek@adacore.com>
50
51 * checks.adb: Fix typo in comment.
52 * sem.adb (Semantics): Avoid repeated calls to
53 In_Extended_Main_Source_Unit by reusing an already-cached
54 result.
55 * sem_util.adb (First_Global): Fix style.
56
85f6c73a 572019-07-11 Yannick Moy <moy@adacore.com>
58
59 * sem_res.adb (Resolve_Call): Do not perform dimensionality
60 checking on inlined bodies.
61
5083f119 622019-07-11 Yannick Moy <moy@adacore.com>
63
64 * debug.adb: Flip meaning of debug switch -gnatdF.
65
f237e5eb 662019-07-11 Yannick Moy <moy@adacore.com>
67
68 * sem_eval.adb (Is_Same_Value): Add special case for rewritten
69 Loop_Entry attribute.
70
1e5359c0 712019-07-11 Claire Dross <dross@adacore.com>
72
73 * gnat1drv.adb: SPARK checking rules for pointer aliasing are
74 moved to GNATprove backend.
75 * sem_spark.ads, sem_spark.adb (Sem_SPARK): Is now a generic
76 unit. Takes as parameters:
77 - Retysp which is used to query the most underlying type
78 visible in SPARK. We do not introduce aliasing checks for
79 types which are not visibly deep.
80 - Component_Is_Visible_In_SPARK is used to avoid doing pointer
81 aliasing checks on components which are not visible in SPARK.
82 - Emit_Messages returns True in the second phase of SPARK
83 analysis. Error messages for failed aliasing checks are only
84 output in this case.
85 Additionally, errors on constructs not supported in SPARK are
86 removed as duplicates of marking errors. Components are stored
87 in the permission map using their original component to avoid
88 inconsistencies between components of different views of the
89 same type.
90 (Check_Expression): Handle delta constraints.
91 (Is_Deep): Exported so that we can check for SPARK restrictions
92 on deep types inside SPARK semantic checkings.
93 (Is_Traversal_Function): Exported so that we can check for SPARK
94 restrictions on traversal functions inside SPARK semantic
95 checkings.
96 (Check_Call_Statement, Read_Indexes): Check wether we are
97 dealing with a subprogram pointer type before querying called
98 entity.
99 (Is_Subpath_Expression): Image attribute can appear inside a
100 path.
101 (Check_Loop_Statement): Correct order of statements in the loop.
102 (Check_Node): Ignore raise nodes.
103 (Check_Statement): Use Last_Non_Pragma to get the object
104 declaration in an extended return statement.
105
fb7f0b28 1062019-07-11 Patrick Bernardi <bernardi@adacore.com>
107
108 * bindgen.adb (Gen_Main): Do not generate a reference to
109 Ada_Main_Program_Name when the Minimal_Binder flag is set.
110 (Gen_Output_File_Ada): Do not output GNAT_Version and
111 Ada_Main_Program_Name info if Minimal_Binder flag is set.
112 * bindusg.adb: Add documentation for new -minimal switch.
113 * gnatbind.adb (Scan_Bind_Arg): Scan -minimal switch.
114 * opt.ads: Add new global flag Minimal_Binder to indicate if the
115 binder should not produce global variables.
116 * doc/gnat_ugn/building_executable_programs_with_gnat.rst:
117 Update documentation with new binder -minimal switch.
118 * gnat_ugn.texi: Regenerate.
119
6e0725a9 1202019-07-11 Eric Botcazou <ebotcazou@adacore.com>
121
122 * Makefile.rtl: Add warning note about compilation flags and
123 capitalize.
124
263dcfe9 1252019-07-11 Ed Schonberg <schonberg@adacore.com>
126
127 * exp_ch9.adb (Expand_N_Protected_Type_Declaaration): New
128 subsidiary routine Replace_Access_Definition, to handle properly
129 a protected type PT one of whose private components is of type
130 access PT.
131
dc001f3e 1322019-07-11 Dmitriy Anisimkov <anisimko@adacore.com>
133
134 * libgnat/g-socket.ads (Level_Type): Add enumerators for
135 IP_Protocol_For_ICMP, IP_Protocol_For_IGMP,
136 IP_Protocol_For_RAW_Level.
137 * libgnat/g-socket.adb (Levels): Handle them.
138 * s-oscons-tmplt.c: Import socket protocols defined in
139 netinet/in.h.
140
3bcff314 1412019-07-11 Claire Dross <dross@adacore.com>
142
143 * libgnat/a-cfhama.adb, libgnat/a-cfhase.adb (Free): Do not
144 reset the Has_Element flag if no element is freed.
145
8e22ede8 1462019-07-11 Arnaud Charlet <charlet@adacore.com>
147
148 * errno.c: Remove obsolete support for MaRTE OS.
149
180bd06b 1502019-07-11 Ed Schonberg <schonberg@adacore.com>
151
152 * exp_ch4.adb (Expand_N_Type_Conversion): If a predicate check
153 is generated, analyze it with range check suppressed, because
154 that check has been previously applied.
155 * exp_ch5.adb (Expand_N_Assignment_Statement): If the RHS is a
156 type conversion to the type of the LHS, do not apply a predicate
157 check to the RHS because it will have been generated already
158 during its expansion.
159 * exp_ch6.adb (Can_Fold_Predicate_Call): Extend processing to
160 handle a predicate check on a constant entity whose value is
161 static.
162
32859955 1632019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
164
165 * bindo.adb: Remove the documentation of switch -d_N because it
166 is no longer in use.
167 * bindo-graphs.ads, bindo-graphs.adb (Is_Spec_Before_Body_Edge):
168 New routine.
169 * bindo-writers.adb (Write_Dependency_Edge): Add the missing
170 case of a spec-before-body edge.
171
0595f8ff 1722019-07-11 Dmitriy Anisimkov <anisimko@adacore.com>
173
174 * libgnat/g-socket.ads (Mode_Type): Add a Socket_Raw enumerator.
175 * libgnat/g-socket.adb (Modes): Handle Socket_Raw.
176
af7bae25 1772019-07-11 Justin Squirek <squirek@adacore.com>
178
179 * exp_ch9.adb (Build_Private_Protected_Declaration): Add
180 exception for the moving of pragmas to internally generated
181 specs for pragma Unreferenced.
182
87259588 1832019-07-11 Bob Duff <duff@adacore.com>
184
185 * doc/gnat_ugn/gnat_utility_programs.rst: Fix inconsistent
186 documentation for gnatmetric.
187 * gnat_ugn.texi: Regenerate.
188
2d95f0f8 1892019-07-11 Bob Duff <duff@adacore.com>
190
191 * doc/gnat_ugn/gnat_utility_programs.rst: Document gnatpp's
192 --spaces-only switch.
193
814e7b6e 1942019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
195
196 * sem_util.adb (Null_Status): Assume that an erroneous construct
197 has an undefined null status.
198
53904d64 1992019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
200
201 * checks.adb, exp_ch6.adb, gnat1drv.adb, sem_aux.adb,
202 sem_ch2.adb, sem_ch8.adb, sem_res.adb: Minor reformatting.
203
21dccd5f 2042019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
205
206 * sem_ch8.adb (Analyze_Object_Renaming): Obtain the object being
207 renamed using routine Get_Object_Name which takes care of
208 various name forms.
209 (Get_Object_Name): New routine.
210
3da5e0d4 2112019-07-11 Ed Schonberg <schonberg@adacore.com>
212
213 * exp_ch6.adb (Can_Fold_Predicate_Call): New function,
214 subsidiary of Expand_Call_Helper, to compute statically a
215 predicate check when the argument is a static integer.
216
3d95efc8 2172019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
218
219 * sem_res.adb (Resolve_Op_Not): Do not rewrite an equality
220 operator into a function call when the operator is intrinsic.
221
8c93b71c 2222019-07-11 Thomas Quinot <quinot@adacore.com>
223
224 * sem_prag.adb (Analyze_Pragma, case pragma Check): Do not call
225 Set_SCO_Pragma_Enabled for the dynamic predicate case.
226
001b1b6a 2272019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
228
229 * exp_util.ads, exp_util.adb (Needs_Finalization): Move to
230 Sem_Util.
231 * sem_ch9.adb (Analyze_Protected_Definition): Code cleanup. Mark
232 the protected type as having controlled components when it
233 contains at least one such component.
234 * sem_util.ads, sem_util.adb (Needs_Finalization): New
235 function.
236
5dc190e5 2372019-07-11 Eric Botcazou <ebotcazou@adacore.com>
238
239 * alloc.ads (Rep_JSON_Table_Initial): New constant.
240 (Rep_JSON_Table_Increment): Likewise.
241 * debug.adb: Document -gnatd_j switch.
242 * gcc-interface/Make-lang.in (GNAT_ADA_OBJS): Add
243 repinfo-input.o.
244 * gnat1drv.adb: Add with clause for Repinfo.Input.
245 Add with and use clauses for Sinput.
246 (Read_JSON_Files_For_Repinfo): New procedure.
247 (Gnat1drv1): Deal with -gnatd_j switch.
248 * repinfo-input.ad[sb]: New unit.
249 * snames.ads-tmpl (Name_Discriminant): New constant.
250 (Name_Operands): Likewise.
251
b1118eb8 2522019-07-11 Justin Squirek <squirek@adacore.com>
253
254 * checks.adb (Apply_Accessibility_Check): Add check for constant
255 folded conditions on accessibility checks.
256
ef0b2206 2572019-07-11 Arnaud Charlet <charlet@adacore.com>
258
259 * libgnarl/g-thread.ads, libgnarl/g-thread.adb (Get_Thread):
260 Update comments. Add new version taking a Task_Id.
261
12b1c23b 2622019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
263
264 * bindo.adb: Update the section of switches and debugging
265 elaboration issues.
266 * bindo.ads: Add type Elaboration_Phase.
267 * bindo-augmentors.adb: Add use clause for
268 Bindo.Writers.Phase_Writers.
269 (Augment_Library_Graph): Signal the start and end of the
270 aubmentation phase.
271 * bindo-builders.adb: Add with and use clause for Bindo.Writers.
272 Add use clause for Bindo.Writers.Phase_Writers.
273 (Build_Invocation_Graph): Signal the start and end of the
274 invocation graph construction phase.
275 (Build_Library_Graph): Signal the start and end of the library
276 graph construction phase.
277 * bindo-diagnostics.adb: Add use clause for
278 Bindo.Writers.Phase_Writers.
279 (Diagnose_Cycle): Signal the start and end of the cycle
280 diagnostic phase.
281 * bindo-elaborators.adb: Add use clause for
282 Bindo.Writers.Phase_Writers.
283 (Elaborate_Units): Signal the start and end of the unit
284 elaboration phase.
285 * bindo-graphs.adb: Add use clause for
286 Bindo.Writers.Phase_Writers.
287 (Find_Components): Signal the start and end of the component
288 discovery phase.
289 (Find_Cycles): Signal the start and end of the cycle discovery
290 phase.
291 * bindo-units.adb: Add with and use clause for Bindo.Writers.
292 Add use clause for Bindo.Writers.Phase_Writers.
293 (Collect_Elaborable_Units): Signal the start and end of the unit
294 collection phase.
295 * bindo-validators.adb: Add with and use clause for
296 Bindo.Writers. Add use clause for Bindo.Writers.Phase_Writers.
297 (Validate_Cycles, Validate_Elaboration_Order,
298 Validate_Invocation_Graph, Validate_Library_Graph): Signal the
299 start and end of the libray graph validation phase.
300 * bindo-writers.ads, bindo-writers.adb: Add new nested package
301 Phase_Writers.
302 * debug.adb: Update the documentation of switch d_S.
303
d7569e04 3042019-07-11 Yannick Moy <moy@adacore.com>
305
306 * sem_res.adb (Check_Argument_Order): Special case calls to
307 operators.
308
604c5bca 3092019-07-10 Dmitriy Anisimkov <anisimko@adacore.com>
310
311 * libgnat/s-ststop.adb: Remove System.Strings.Stream_Ops
312 dependence on System.Streams.Stream_IO.
313
ce9565a8 3142019-07-10 Ed Schonberg <schonberg@adacore.com>
315
316 * sem_ch2.adb (Analyze_Integer_Literal): Preserve the type of
317 the literal if prior analysis determined that its type is a
318 modular integer type.
319
e97ee616 3202019-07-10 Doug Rupp <rupp@adacore.com>
321
322 * init.c: Do not attempt to re-arm guard page on x86_64-vx7(r2).
323
c0e85bb6 3242019-07-10 Ed Schonberg <schonberg@adacore.com>
325
326 * sem_ch8.adb (Check_Constrained_Object): A record that is
327 limited because of the presence of a limited component is
328 constrained, and no subtype indiciation needs to be created for
329 it, just as is the case for declared limited records.
330
94654315 3312019-07-10 Yannick Moy <moy@adacore.com>
332
333 * sem_aux.adb, sem_aux.ads (Is_Protected_Operation): New
334 function to determine if a subprogram is protected.
335 * sem_spark.adb (Setup_Protected_Components): New procedure to
336 add protected components to the environment.
337 (Check_Callable_Body): Call the new Setup_Protected_Components.
338 (Check_Package_Spec): Merge local environment with enclosing one
339 when done.
340
9ac24568 3412019-07-10 Claire Dross <dross@adacore.com>
342
343 * sem_spark.adb (Check_Expression): Allow digits constraints as
344 input.
345 (Illegal_Global_Usage): Pass in the entity.
346 (Is_Subpath_Expression): New function to allow different nodes
347 as inner parts of a path expression.
348 (Read_Indexes): Allow concatenation and aggregates with box
349 expressions. Allow attributes Update and Loop_Entry.
350 (Check_Expression): Allow richer membership test.
351 (Check_Node): Ignore bodies of generics.
352 (Get_Root_Object): Allow concatenation and attributes.
353
95266217 3542019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
355
356 * sem_ch6.adb (Check_Discriminant_Conformance): Use Find_Type to
357 discover the type of a full view discriminant.
358
f9d615a1 3592019-07-10 Arnaud Charlet <charlet@adacore.com>
360
361 * doc/gnat_ugn/gnat_and_program_execution.rst: Improve gnatmem's
362 doc for the depth switch.
363
55d7c660 3642019-07-10 Bob Duff <duff@adacore.com>
365
366 * doc/gnat_ugn/gnat_utility_programs.rst: Document gnatpp's
367 --source-line-breaks switch.
368
e94f4600 3692019-07-10 Justin Squirek <squirek@adacore.com>
370
371 * doc/gnat_rm/implementation_defined_attributes.rst: Add mention
372 of 'Image attribute with 'Img's entry to mention additional
373 added 2012 usage of Obj'Image.
374 * doc/gnat_rm/implementation_defined_pragmas.rst: Correct
375 mispelling of Async_Writers.
376 * gnat_rm.texi: Regenerate.
377 * sem_prag.adb (Analyze_Pragma): Correct mispelling of
378 Async_Writers.
379 * sem_util.adb (State_Has_Enabled_Property): Correct mispelling
380 of Async_Writers.
381
2bf00b7f 3822019-07-10 Simon Buist <buist@adacore.com>
383
384 * sem_util.ads (Child_Prefix): New constant.
385 * sem_util.adb (Unique_Name): Add a special prefix to child
386 units that have a nested subprogram or package.
387
9dda714b 3882019-07-10 Arnaud Charlet <charlet@adacore.com>
389
390 * sfn_scan.adb (Scan_SFN_Pragmas): Add pragma Assert.
391
fd8a528d 3922019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
393
394 * sem_ch3.adb (Check_Nonoverridable_Aspects): Correct the
395 spelling in certain error messages.
396 (Check_Pragma_Implemented): Correct the spelling in certain
397 error messages.
398
97f0aa19 3992019-07-10 Eric Botcazou <ebotcazou@adacore.com>
400
401 * Makefile.rtl (GNATRTL_NONTASKING_OBJS): Add g-brapre.
402 * libgnat/g-brapre.ads: New package specification.
403 * doc/gnat_rm/the_gnat_library.rst: Document it.
404 * gnat_rm.texi: Regenerate.
405
d2506f16 4062019-07-10 Yannick Moy <moy@adacore.com>
407
408 * osint-c.adb (Set_File_Name): Always add extension for multiple
409 units per file mode.
410
c6db401c 4112019-07-10 Corentin Gay <gay@adacore.com>
412
413 * sysdep.c: Put include directive for 'vxWorks.h' before any
414 other VxWorks headers.
415
344c2639 4162019-07-10 Eric Botcazou <ebotcazou@adacore.com>
417
418 * doc/gnat_rm/implementation_defined_attributes.rst
419 (Scalar_Storage_Order): Minor tweaks. Add note about debuggers.
420 * gnat_rm.texi: Regenerate.
421
8a9900a9 4222019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
423
424 * exp_ch4.adb (Expand_N_Case_Expression): Mark the generated
425 assignments to the temporary result as being OK because the
426 expansion of case expressions is correct by construction.
427 (Is_Copy_Type): Update the predicate to match the comment
428 within.
429
8c21443b 4302019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
431
432 * bindo-graphs.adb, bindo.adb, debug.adb, exp_ch6.adb,
433 sem_ch10.adb, sem_ch13.adb, sem_ch3.adb, sem_ch4.adb,
434 sem_ch6.adb, sem_ch7.adb, sem_res.adb, sem_spark.adb,
435 sem_util.adb, warnsw.ads: Minor reformatting.
436
2e7929f0 4372019-07-10 Joffrey Huguet <huguet@adacore.com>
438
439 * libgnat/a-strbou.ads, libgnat/a-strfix.ads,
440 libgnat/a-strunb.ads, libgnat/a-strunb__shared.ads: Add global
441 contracts, contract cases, preconditions and postconditions to
442 procedures and functions.
443
87d55fe2 4442019-07-10 Doug Rupp <rupp@adacore.com>
445
446 * sysdep.c (__gnat_is_file_not_found_error): Reformulate to also
447 work for vxworks7r2 SR0610.
448
82d7e1f4 4492019-07-10 Doug Rupp <rupp@adacore.com>
450
451 * env.c (__gnat_environ): Reformulate to also work for
452 vxworks7r2 SR0610.
453
7f6066e1 4542019-07-10 Patrick Bernardi <bernardi@adacore.com>
455
456 * Makefile.rtl: Handle vxworks7r2 ppc target
457
6523468f 4582019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
459
460 * bindo.adb: Update the section on switches.
461 * bindo-graphs.adb
462 (Add_Cycle, Add_Vertex_And_Complement): Remove.
463 (Create): The graph no longer needs a set of recorded cycles
464 because the cycles are not rediscovered in permuted forms.
465 (Cycle_End_Vertices): New routine.
466 (Destroy): The graph no longer needs a set of recorded cycles
467 because the cycles are not rediscovered in permuted forms.
468 (Destroy_Library_Graph_Vertex): Move to the library level.
469 (Find_All_Cycles_Through_Vertex, Find_All_Cycles_With_Edge):
470 Remove.
471 (Find_Cycles_From_Successor, Find_Cycles_From_Vertex,
472 Find_Cycles_In_Component, Has_Elaborate_All_Edge): New routines.
473 (Insert_And_Sort): Remove.
474 (Is_Elaborate_Body_Edge): Use predicate
475 Is_Vertex_With_Elaborate_Body.
476 (Is_Recorded_Cycle): Remove.
477 (Is_Vertex_With_Elaborate_Body): New routine.
478 (Normalize_And_Add_Cycle): Remove.
479 (Precedence): Rename to xxx_Precedence, where xxx relates to the
480 input. These versions better reflect the desired input
481 precedence.
482 (Record_Cycle): New routine.
483 (Remove_Vertex_And_Complement, Set_Is_Recorded_Cycle): Remove.
484 (Trace_xxx): Update all versions to use debug switch -d_t.
485 (Trace_Component): New routine.
486 (Trace_Eol): Removed.
487 (Trace_Vertex): Do not output the component as this information
488 is already available when the component is traced.
489 (Unvisit, Visit): New routine.
490 * bindo-graphs.ads: Add new instance LGV_Lists. Remove instance
491 RC_Sets. Update the structure of type Library_Graph_Attributes
492 to remove the set of recorded cycles.
493 (Destroy_Library_Graph_Vertex): Move to the library level.
494 * bindo-writers.adb (Write_Component_Vertices): Output
495 information about the number of vertices.
496 * debug.adb: Document the use of binder switch -d_t. Update the
497 use of binder switch -d_T.
498
9eaacd61 4992019-07-10 Yannick Moy <moy@adacore.com>
500
501 * sem_spark.adb (Get_Root_Object): Replace precondition by error
502 message.
503 (Read_Indexes): Replace precondition by error message.
504 (Check_Callable_Body): Check only traversal function returns an
505 anonymous access type.
506 (Check_Expression): Issue error on unexpected expression as
507 path.
508 * sem_util.adb (First_Global): Fix access to global on
509 entry/task.
510
2ac657bd 5112019-07-10 Javier Miranda <miranda@adacore.com>
512
513 * exp_ch6.adb (Is_Class_Wide_Interface_Type): New subprogram.
514 (Expand_Call_Helper): Handle non-limited views when we check if
515 any formal is a class-wide interface type.
516 * exp_disp.adb (Expand_Interface_Actuals): Handle non-limited
517 views when we look for interface type formals to force "this"
518 displacement.
519
d3fb378d 5202019-07-10 Ed Schonberg <schonberg@adacore.com>
521
522 * sem_res.adb (Resolve_Equality_Op): Do not replace the resolved
523 operator by its alias if expander is not active, because the
524 operand type may not be frozen yet and its inherited operations
525 have not yet been created.
526
ab8418a3 5272019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
528
529 * bindo-elaborators.adb (Elaborate_Units): Set attribute
530 Elab_Position of all elaborated units.
531 (Set_Unit_Elaboration_Positions): New routine.
532
6e618828 5332019-07-10 Gary Dismukes <dismukes@adacore.com>
534
535 * exp_util.adb: Reformatting and a typo fix.
536
97f6f798 5372019-07-10 Yannick Moy <moy@adacore.com>
538
539 * exp_util.adb (Remove_Side_Effects): Prefer renamings for
540 objects of possible owning type in GNATprove mode.
541
89c67bd9 5422019-07-09 Ed Schonberg <schonberg@adacore.com>
543
544 * sem_ch3.adb (Analyze_Object_Declaration): If the object type
545 is a composite type that has a dynamic predicate and, the
546 expression in the declaration is an aggregate, the generated
547 predicate check must appear after the expanded code for the
548 aggregate, which will appear after the rewritten object
549 declarastion.
550
fb739c45 5512019-07-09 Justin Squirek <squirek@adacore.com>
552
553 * sem_eval.adb (Expr_Value_E): Add conditional to correctly
554 handle constant enumerated character types.
555
54b39f26 5562019-07-09 Eric Botcazou <ebotcazou@adacore.com>
557
558 * libgnarl/s-osinte__mingw.ads (CRITICAL_SECTION): Use proper
559 type for SpinCount component.
560
9b57fc30 5612019-07-09 Justin Squirek <squirek@adacore.com>
562
563 * exp_ch4.adb (Expand_N_Allocator): Add conditional to detect
564 the presence of anoymous access type allocators and issue a
565 warning if the appropriate warning flag is enabled.
566 * warnsw.ads: Add new warning flag for anonymous allocators
567 * warnsw.adb (All_Warnings, Restore_Warnings, Save_Warnings,
568 Set_Underscore_Warning_Switch): Register new flags.
569 (WA_Warnings): Register new flag as an "all warnings" switch
570 * usage.adb,
571 doc/gnat_ugn/building_executable_programs_with_gnat.rst:
572 Document new warning switches -gnatw_a and -gnatw_A.
573 * gnat_ugn.texi: Regenerate.
574
2463fa93 5752019-07-09 Ed Schonberg <schonberg@adacore.com>
576
577 * sem_ch4.adb (Diagnose_Call): Improve error recovery when a
578 local subprogram name hides a possible candidate name declared
579 in a child package in the context of the current unit.
580 * sem_ch6.adb (Process_Formals): Protect against malformed
581 formal types when the parameter type does not denote an entity.
582
7389bee5 5832019-07-09 Hristian Kirtchev <kirtchev@adacore.com>
584
585 * bindo-augmentors.adb (Visit_Elaboration_Root): Do not start a
586 DFS from an elaboration root whose corresponding unit lacks
587 elaboration code. This behavior mimics that of the old
588 elaboration order mechanism.
589 * bindo-graphs.adb (Find_All_Cycles_Through_Vertex): Move the
590 vertex tracing within the functional branches of the routine.
591 This prevents spurious trace output.
592 (Has_No_Elaboration_Code): New routine.
593 (Trace_Cycle, Trace_Edge): Update the various Ids to use the
594 "standard" trace format.
595 * bindo-graphs.ads (Has_No_Elaboration_Code): New routine.
596 * bindo-units.ads, bindo-units.adb (Has_No_Elaboration_Code):
597 New routine.
598
06d78d4c 5992019-07-09 Piotr Trojanek <trojanek@adacore.com>
600
601 * ali.ads, bindo-graphs.adb, bindo-validators.adb, clean.adb,
602 doc/gnat_ugn/elaboration_order_handling_in_gnat.rst, einfo.ads,
603 exp_aggr.adb, exp_ch13.adb, exp_ch4.adb, exp_ch5.adb,
604 exp_ch6.adb, exp_ch7.adb, exp_ch9.adb, exp_pakd.adb,
605 fname-uf.ads, gnatlink.adb, inline.adb, lib.ads, make.adb,
606 namet.ads, opt.ads, par-ch4.adb, par-ch6.adb, par-labl.adb,
607 prep.adb, sem_aggr.adb, sem_ch13.adb, sem_ch4.adb, sem_ch5.adb,
608 sem_ch6.adb, sem_ch6.ads, sem_ch7.adb, sem_ch8.adb, sem_dim.adb,
609 sem_disp.adb, sem_prag.adb, sem_res.adb, sem_warn.adb,
610 sinfo.ads: Replace ". " with ". ". Minor reformatting and typo
611 corrections.
612 * gnat_ugn.texi: Generate.
613
7ed20965 6142019-07-09 Hristian Kirtchev <kirtchev@adacore.com>
615
616 * bindo.ads: Move type Precedence_Kind from the private to the
617 visible part of the unit.
618 * bindo-augmentors.adb: Remove the use of global data as it is
619 bad practice.
620 (Augment_Library_Graph): Update the parameter profile.
621 (Is_Visited, Set_Is_Visited): Remove.
622 (Visit_Elaboration_Root, Visit_Elaboration_Roots): Update the
623 parameter profile and comment on usage.
624 (Visit_Vertex): Likewise. Also keep track of which invocation
625 edge activates a task.
626 * bindo-augmentors.ads (Augment_Library_Graph): Update the
627 parameter profile and comment on usage.
628 * bindo-builders.adb (Create_Forced_Edge,
629 Create_Spec_And_Body_Edge, Create_With_Edge): Update the call to
630 Add_Edge.
631 * bindo-diagnostics.adb: Add with end use clauses for Restrict
632 and Rident.
633 (Output_Dynamic_Model_Suggestions): Remove.
634 (Output_Invocation_Related_Suggestions): New routine.
635 (Output_Suggestions): Output all invocation-related suggestions
636 together.
637 * bindo-elaborators.adb: Remove types Comparator_Ptr and
638 Predicate_Ptr.
639 (Find_Best_Vertex): Update the parameter profile.
640 * bindo-graphs.adb (Activates_Task): New routine.
641 (Add_Body_Before_Spec_Edge): Update the call to
642 Add_Edge_With_Return.
643 (Add_Edge): Update the parameter profile and the call to
644 Add_Edge_With_Return.
645 (Add_Edge_With_Return): Update the parameter profile and comment
646 on usage.
647 (At_Least_One_Edge_Satisfies): New routine.
648 (Contains_Elaborate_All_Edge): Reimplement.
649 (Contains_Static_Successor_Edge, Contains_Task_Activation): New
650 routine.
651 (Contains_Weak_Static_Successor): Remove.
652 (Is_Static_Successor_Edge): New routine.
653 * bindo-graphs.ads: Add types LGE_Predicate_Ptr,
654 LGV_Comparator_Ptr, and LGV_Predicate_Ptr. Update type
655 Library_Graph_Edge_Attributes to capture whether an invocation
656 edge activates a task. Update the value of
657 No_Library_Graph_Edge_Attributes.
658 (Activates_Task): Update the parameter profile and comment on
659 usage.
660 (Contains_Static_Successor_Edge, Contains_Task_Activation): New
661 routines.
662 (Contains_Weak_Static_Successor): Remove.
663 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst:
664 Update the documentation to reflect the new task-related advice.
665 * gnat_ugn.texi: Regenerate.
666
247527b7 6672019-07-09 Piotr Trojanek <trojanek@adacore.com>
668
669 * exp_util.adb (Containing_Package_With_Ext_Axioms): Replace
670 low-level Ekind test with a high-level wrapper.
671
1d7a9954 6722019-07-09 Arnaud Charlet <charlet@adacore.com>
673
674 * libgnat/s-memory.adb: Disable calls to Abort defer/undefer
675 when ZCX_By_Default.
676
7667b40a 6772019-07-09 Javier Miranda <miranda@adacore.com>
678
679 * sem_ch13.adb (Rep_Item_Too_Early): Representation clauses are
680 not allowed for a derivation of a generic type. Extend the
681 current test to check that none of the parents is a generic
682 type.
683
98eb8111 6842019-07-09 Hristian Kirtchev <kirtchev@adacore.com>
685
686 * exp_ch9.adb, exp_util.adb, repinfo.adb, sem_ch12.adb,
687 sem_prag.adb, sem_res.adb, sem_spark.adb, sem_util.adb: Minor
688 reformatting.
689
5ffa473a 6902019-07-09 Ed Schonberg <schonberg@adacore.com>
691
692 * sem_res.adb (Resolve_Equality_Op): If the node was overloaded,
693 set properly the entity to which the node has been resolved. The
694 original entity is the first one found during analysis, and is
695 not necessarily the resolved one.
696 (Resolve_Op_Not): If the argument of negation is an overloaded
697 equality operation, call its resolution directly given that the
698 context type does not participate in overload resolution.
699
f7197450 7002019-07-09 Hristian Kirtchev <kirtchev@adacore.com>
701
702 * bindo.adb: Remove with and use clauses for Debug. Add with
703 and use clauses for Opt.
704 (Find_Elaboration_Order): Enable the v4.0 elaboration order. The
705 v3.0 mechanism is now available under binder switch -H.
706 * bindusg.adb (Display): Enable switch -H.
707 * debug.adb: Free compiler switch -gnatd_G. Free binder switch
708 -d_N.
709 * sem_elab.adb: Update the section on switches to remove
710 -gnatd_G.
711 (Invocation_Graph_Recording_OK): The invocation graph is now
712 unconditionally recorded in ALI files.
713 * switch-b.adb (Scan_Binder_Switches): Scan switch -H.
714 * doc/gnat_ugn/building_executable_programs_with_gnat.rst:
715 Update the documentation on compiler switches related to
716 elaboration. Update the documentation on binder switches to
717 include switch -H.
718 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update
719 the documentation on elaboration order handling in GNAT.
720 * gnat_ugn.texi: Regenerate.
721
a2c6c634 7222019-07-09 Eric Botcazou <ebotcazou@adacore.com>
723
724 * repinfo.adb (List_Entities): Disregard formals altogether.
725 (List_Name): Properly escape the double quote in the JSON
726 output.
727
3933efcf 7282019-07-09 Javier Miranda <miranda@adacore.com>
729
730 * exp_util.adb (Remove_Side_Effects): Preserve the
731 Do_Range_Check flag.
732
2166bdef 7332019-07-09 Yannick Moy <moy@adacore.com>
734
735 * sinfo.ads: Refine comment for Do_Range_Check.
736
dbf9a3d7 7372019-07-09 Yannick Moy <moy@adacore.com>
738
739 * exp_spark.adb (Expand_SPARK_N_Attribute_Reference): Expand
740 attribute reference on Enum_Rep.
741
44e00a56 7422019-07-09 Ed Schonberg <schonberg@adacore.com>
743
744 * sem_ch12.adb (Instantiate_Formal_Package): Handle properly the
745 case where the actual for a formal package in an instance is the
746 current instance of an enclosing generic package.
747 (Check_Formal_Packages): If the formal package declaration is
748 box-initialized or lacks associations altogether, no internal
749 instance was created to verify conformance, and there is no
750 validating package to remove from tree.
751
3e4e7139 7522019-07-09 Yannick Moy <moy@adacore.com>
753
754 * freeze.adb (Build_Renamed_Body): Do not set body to inline in
755 GNATprove mode.
756
8235b943 7572019-07-09 Yannick Moy <moy@adacore.com>
758
759 * exp_util.adb (Expand_Subtype_From_Expr): Still expand the type
760 of static expressions in GNATprove_Mode.
761 * sem_ch3.adb (Analyze_Object_Declaration): Remove obsolete
762 special case for GNATprove_Mode.
763
cf9af2fa 7642019-07-09 Piotr Trojanek <trojanek@adacore.com>
765
766 * doc/gnat_rm/the_gnat_library.rst,
767 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
768 erroutc.adb, libgnat/g-comlin.adb, libgnat/g-comlin.ads,
769 libgnat/g-regexp.ads, libgnat/g-regpat.ads,
770 libgnat/g-spipat.ads, libgnat/s-os_lib.ads,
771 libgnat/s-regexp.ads: Reword "wild card" to "wildcard".
772 * gnat_rm.texi, gnat_ugn.texi: Regenerate.
773
a080baa9 7742019-07-09 Yannick Moy <moy@adacore.com>
775
776 * sem_spark.adb (Check_Expression): Handle correctly implicit
777 assignments as part of allocators and (extension) aggregates.
778 (Get_Root_Object): Adapt for new path expressions.
779 (Is_Path_Expression): Return True for (extension) aggregate.
780
d9b7ae15 7812019-07-09 Piotr Trojanek <trojanek@adacore.com>
782
783 * einfo.ads: Fix a typo.
784
4c24efa6 7852019-07-09 Ed Schonberg <schonberg@adacore.com>
786
787 * sem_util.adb (Scope_Within_Or_Same): Handle properly task
788 bodies and protected bodies, so that local variables within have
789 their proper scopes after these constructs have been rewritten
790 during expansion. This patch resembles but is not identical to
791 the code in Scope_Within.
792
6c334e66 7932019-07-09 Arnaud Charlet <charlet@adacore.com>
794
795 * gnat1drv.adb (Adjust_Global_Switches): Set
796 Dynamic_Elaboration_Checks to True in CodePeer mode.
797
82c20af0 7982019-07-09 Yannick Moy <moy@adacore.com>
799
800 * sem_spark.adb (Get_Perm_Or_Tree): Issue an error when
801 encountering unknown global variable.
802
a42b8e6a 8032019-07-09 Yannick Moy <moy@adacore.com>
804
805 * sem_spark.adb (Check_Expression): Change signature to take an
806 Extended_Checking_Mode, for handling read permission checking of
807 sub-expressions in an assignment.
808 (Check_Parameter_Or_Global): Adapt to new behavior of
809 Check_Expression for mode Assign.
810 (Check_Safe_Pointers): Do not analyze generic bodies.
811 (Check_Assignment): Separate checking of the target of an
812 assignment.
813
5fb4f6e3 8142019-07-09 Eric Botcazou <ebotcazou@adacore.com>
815
816 * repinfo.ads (JSON format): Adjust.
817 * repinfo.adb (Need_Blank_Line): Rename to...
818 (Need_Separator): ...this.
819 (Blank_Line): Rename to...
820 (Write_Separator): ...this and add JSON specific handling.
821 (List_Array_Info): Adjust to above renaming.
822 (List_Object_Info): Likewise.
823 (List_Record_Info): Likewise.
824 (List_Subprogram_Info): Likewise.
825 (List_Type_Info): Likewise.
826 (List_Entities): Do not set Need_Blank_Line.
827 (List_Rep_Info): Set Need_Separator and add JSON specific
828 handling. Output a single JSON stream in the normal case.
829
b389ec1e 8302019-07-09 Arnaud Charlet <charlet@adacore.com>
831
832 * doc/gnat_ugn/the_gnat_compilation_model.rst: Update doc on
833 -fdump-ada-spec now that we generate Ada 2012.
834 * gnat_ugn.texi: Regenerate.
835
5acb3702 8362019-07-08 Eric Botcazou <ebotcazou@adacore.com>
837
838 * repinfo.adb (List_Common_Type_Info): New procedure extracted
839 from...
840 (List_Type_Info): ...here. Call it for the common information,
841 start with a blank line and output the linker section at the
842 end, if any.
843 (List_Mechanisms): Rename to...
844 (List_Subprogram_Info): ...this.
845 (List_Array_Info): Call List_Common_Type_Info.
846 (List_Entities): Adjust to above change and renaming.
847 (List_Record_Info): Call List_Common_Type_Info.
848
6eb57612 8492019-07-08 Dmitriy Anisimkov <anisimko@adacore.com>
850
851 * libgnat/g-sercom.ads
852 (Serial_Port_Descriptor): New type.
853 (Serial_Port): Add a comment, make it hold a
854 Serial_Port_Descriptor.
855 (To_Ada, To_C): New procedures.
856 (Port_Data, Port_Data_Access): Remove types.
857 * libgnat/g-sercom.adb (To_Ada): New stub.
858 * libgnat/g-sercom__linux.adb, libgnat/g-sercom__mingw.adb:
859 Update implementations accordingly.
860 * s-oscons-tmplt.c: Bind Serial_Port_Descriptor to
861 System.Win32.HANDLE on Windows, and to Interfaces.C.int on
862 Linux. Add "Interfaces.C." prefix for other basic integer type
863 bindings.
864 * xoscons.adb (Output_Info): Remove the "Interfaces.C." prefix
865 for subtypes generation.
866
08da2ad9 8672019-07-08 Arnaud Charlet <charlet@adacore.com>
868
869 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
870 Update documentation on No_Exceptions restriction.
871 * gnat_rm.texi: Regenerate.
872
89b07420 8732019-07-08 Dmitriy Anisimkov <anisimko@adacore.com>
874
875 * libgnat/s-os_lib.adb: Do not call __gnat_kill for Invalid_Pid.
876
0cc34fed 8772019-07-08 Piotr Trojanek <trojanek@adacore.com>
878
879 * sem_util.adb (Enclosing_Package_Or_Subprogram): Do not expect
880 package and subprogram bodies.
881
46299a06 8822019-07-08 Bob Duff <duff@adacore.com>
883
884 * doc/gnat_ugn/gnat_utility_programs.rst: Remove documentation
885 of ignored GNATpp switch.
886
4475d2f0 8872019-07-08 Hristian Kirtchev <kirtchev@adacore.com>
888
889 * doc/gnat_rm/implementation_defined_pragmas.rst:
890 Update the documentation of pragma Initialize_Scalars.
891 * gnat_rm.texi: Regenerate.
892
b282b25b 8932019-07-08 Javier Miranda <miranda@adacore.com>
894
895 * exp_ch4.adb (Tagged_Membership): Fix regression silently
896 introduced in r260738 that erroneouslusy causes the evaluation
897 to True of the membership test when the left operand of the
898 membership test is a class-wide interface object and the right
899 operand is a type that implements such interface type.
900
703ee0e0 9012019-07-08 Hristian Kirtchev <kirtchev@adacore.com>
902
903 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
904 register an address clause when its prefix denotes a generic
905 formal object.
906
e6b4414e 9072019-07-08 Hristian Kirtchev <kirtchev@adacore.com>
908
909 * bindo-diagnostics.adb (Diagnose_Cycle): Capture the presence
910 of an Elaborate_All edge before iterating over the edges of the
911 cycle.
912 (Output_Elaborate_Body_Transition): Update the parameter profile
913 and the comment on usage. Add a missing case where the edge is
914 within the context of an Elaborate_All.
915 (Output_Transition): Update the call to
916 Output_Elaborate_Body_Transition.
917 * bindo-graphs.ads, bindo-graphs.adb
918 (Contains_Elaborate_All_Edge): New routine.
919
5a4de65a 9202019-07-08 Piotr Trojanek <trojanek@adacore.com>
921
922 * lib-xref-spark_specific.adb (Create_Heap): Set dummy Etype for
923 the fake __HEAP entity.
924
42253061 9252019-07-08 Daniel Mercier <mercier@adacore.com>
926
927 * gnat1drv.adb: Suppress warnings on memory representation in
928 CodePeer compiler mode.
929
a7c8fd7e 9302019-07-08 Nicolas Roche <roche@adacore.com>
931
932 * rtinit.c (__gnat_runtime_initialize): Remove dependency on
933 CommandLineToArgvW.
934
89c9dd55 9352019-07-08 Doug Rupp <rupp@adacore.com>
936
937 * Makefile.rtl: Handle vxworks7r2 in x86_64 and x86 vxworks7.
938
944903c8 9392019-07-08 Dmitriy Anisimkov <anisimko@adacore.com>
940
941 * Makefile.rtl: Use g-sercom__linux.adb for all linuxes.
942
e51a140c 9432019-07-08 Yannick Moy <moy@adacore.com>
944
945 * expander.adb (Expand): Do not reset Analyzed flag always.
946 * sem_eval.adb (Fold_Ureal): Mark node as analyzed.
947
f117e449 9482019-07-08 Ed Schonberg <schonberg@adacore.com>
949
950 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Do not insert twice
951 the assignment statement that computes the delay value, to
952 prevent improper tree sharing when the value is a type
953 conversion and Float_Overflow checks are enabled.
954
f5cb3a59 9552019-07-08 Hristian Kirtchev <kirtchev@adacore.com>
956
957 * bindo.adb: Update the section on terminology to include new
958 concepts. Update the section on switches to include new
959 entries.
960 * bindo.ads: Add type Precedence_Kind.
961 * bindo-builders.adb: Add with and use clauses for Debug and
962 Bindo.Validators. Add use clauses for
963 Bindo.Validators.Invocation_Graph_Validators and
964 Bindo.Validators.Library_Graph_Validators.
965 (Build_Invocation_Graph): Validate the graph immediately after
966 it was built.
967 (Build_Library_Graph): Update the parameter profile. The
968 creation of the graph is now elaboration model-agnostic.
969 Validate the graph immediately after it was built.
970 (Create_With_Edge): Create regular with edges for Elaborate and
971 Elaborate_All edges when the appropriate debug switches are in
972 effect.
973 * bindo-builders.ads (Build_Library_Graph): Update the parameter
974 profile.
975 * bindo-diagnostics.adb (Diagnose_Cycle): Track the presence of
976 an Elaborate_All edge throughout the inspection of the cycle's
977 edges.
978 (Output_Dynamic_Model_Suggestions): Output the suggestion only
979 when the cycle contains at least one weak edge where the
980 successor was statically elaborated.
981 (Output_Elaborate_Body_Transition, Output_Forced_Transition,
982 Output_With_Transition): Update the assertions.
983 * bindo-elaborators.adb: Remove use clauses for
984 Bindo.Validators.Invocation_Graph_Validators and
985 Bindo.Validators.Library_Graph_Validators. Remove strings
986 Add_To_All_Candidates_Msg and Add_To_Comp_Candidates_Msg.
987 Remove type String_Ptr.
988 (Add_Vertex, Add_Vertex_If_Elaborable, Create_All_Candidates_Set
989 Create_Component_Candidates_Set): Remove.
990 (Create_Component_Vertex_Sets, Create_Vertex_Sets): New routine.
991 (Elaborate_Component): Update the parameter profile and the
992 comment on usage. Reimplement the elaboration of a component.
993 The algorithm will now attempt to elaborate as many vertices
994 possible. If this is not possible, and a weakly elaborable
995 vertex is available use unit was compiled using the dynamic
996 model, the algorithm will elaborate it.
997 (Elaborate_Library_Graph): Reimplement the elaboration of the
998 graph. The algorithm will now attempt to elaborate as many
999 vertices along with their components as possible. If this is not
1000 possible, and a weakly elaborable vertex is available use unit
1001 was compiled using the dynamic model, the algorithm will
1002 elaborate it along with its component.
1003 (Elaborate_Units): Merge with the functionality of
1004 Elaborate_Units_Common.
1005 (Elaborate_Units_Common, Elaborate_Units_Dynamic,
1006 Elaborate_Units_Static): Remove.
1007 (Elaborate_Vertex): Update the parameter profile and the comment
1008 on usage. Reimplemented.
1009 (Find_Best_Candidate): Remove.
1010 (Find_Best_Elaborable_Vertex, Find_Best_Vertex,
1011 Find_Best_Weakly_Elaborable_Vertex, Has_Elaborable_Body,
1012 Insert_Elaborable_Successor, Insert_Vertex): New routines.
1013 (Is_Better_Candidate): Remove.
1014 (Is_Better_Elaborable_Vertex,
1015 Is_Better_Weakly_Elaborable_Vertex,
1016 Is_Suitable_Elaborable_Vertex,
1017 Is_Suitable_Weakly_Elaborable_Vertex): New routines.
1018 (Trace_Candidate_Vertices): Remove.
1019 (Trace_Component): Output the number of strong and weak
1020 predecessors.
1021 (Trace_Unelaborated_Vertices): Remove.
1022 (Trace_Vertex): Output the number of strong and weak
1023 predecessors.
1024 (Trace_Vertices): New routine.
1025 (Update_Successor, Update_Successors): Update the parameter
1026 profile and the comment on usage.
1027 * bindo-graphs.adb: Remove type Precedence_Kind.
1028 (Add_Edge_With_Return): Update the increment of pending
1029 predecessors.
1030 (Add_Vertex): Provide default values for strong and weak
1031 predecessors.
1032 (Complementary_Vertex): Move the initial declaration to the
1033 spec. Update the parameter profile and the comment on usage.
1034 (Contains_Weak_Static_Successor): New routine.
1035 (Create): Update the parameter profile. The creation of the
1036 graph is now elaboration model-agnostic.
1037 (Decrement_Pending_Predecessors): Update the parameter profile
1038 and the comment on usage. Reimplemented.
1039 (Delete_Edge): Update the decrement of pending predecesors.
1040 (Has_Elaborate_Body): Do not treat a vertex as being subject to
1041 Elaborate_Body when a debug switch is in effect.
1042 (Increment_Pending_Predecessors): Update the parameter profile
1043 and the comment on usage. Reimplemented.
1044 (Is_Elaborable_Component): Reimplemented.
1045 (Is_Elaborable_Vertex): Move the initial declaration to the
1046 spec. Reimplemented.
1047 (Is_Elaborate_Body_Pair): New routine.
1048 (Is_Dynamically_Elaborated): Update the parameter profile.
1049 Reimplemented.
1050 (Is_Weakly_Elaborable_Vertex): New routine.
1051 (Pending_Predecessors): Removed.
1052 (Pending_Predecessors_For_Elaboration,
1053 Pending_Strong_Predecessors, Pending_Weak_Predecessors,
1054 Update_Pending_Predecessors): New routines.
1055 (Update_Pending_Predecessors_Of_Components): Update the
1056 increment of pending predecessors.
1057 * bindo-graphs.ads: Update the components of type
1058 Component_Attributes. Update the components of type
1059 Library_Graph_Attributes. Update the components of type
1060 Library_Graph_Vertex_Attributes. Update the initialization of
1061 No_Component_Attributes. Update the initialization of
1062 No_Library_Graph_Vertex_Attributes.
1063 (Complementary_Vertex, Contains_Weak_Static_Successor): New
1064 routines.
1065 (Create): Update the parameter profile and the comment on usage.
1066 (Decrement_Pending_Predecessors, Is_Dynamically_Elaborated):
1067 Update the parameter profile and the comment on usage.
1068 (Is_Elaborate_Body_Pair, Is_Weakly_Elaborable_Vertex): New
1069 routines.
1070 (Pending_Predecessors): Removed.
1071 (Pending_Predecessors_For_Elaboration,
1072 Pending_Strong_Predecessors, Pending_Weak_Predecessors): New
1073 routines.
1074 * bindo-writers.adb (Write_Components): Moved from the spec.
1075 (Write_Component): Output the strong and weak predecessors.
1076 (Write_Library_Graph): Output the components as part of the
1077 graph.
1078 (Write_Library_Graph_Vertex): Output the strong and weak
1079 predecessors.
1080 * bindo-writers.ads (Write_Components): Moved to the body.
1081 * debug.adb: Add and document new GNATbind switches -d_a, -d_b,
1082 -d_e.
1083 * bindo-validators.adb: Minor reformattings.
1084
7b8ca6b2 10852019-07-08 Bob Duff <duff@adacore.com>
1086
1087 * libgnat/g-sercom.ads, libgnat/g-sercom__linux.adb (Data_Rate):
1088 Support additional data rates.
1089
364c746f 10902019-07-08 Olivier Hainque <hainque@adacore.com>
1091
1092 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Don't request
1093 DECL_ARTIFICIAL_P on elab proc declarations.
1094
2dbfbbb2 10952019-07-08 Eric Botcazou <ebotcazou@adacore.com>
1096
1097 * repinfo.adb (List_Record_Info): Declare Incomplete_Layout and
1098 Not_In_Extended_Main local exceptions.
1099 (List_Structural_Record_Layout): For an extension, raise the
1100 former if the parent subtype has not been built and the latter
1101 if it is not declared in the main source unit. Fall back to the
1102 flat layout if either exception has been raised.
1103
3e05bbec 11042019-07-08 Ed Schonberg <schonberg@adacore.com>
1105
1106 * libgnat/a-strfix.adb (Delete): The RM describes the semantics
1107 of Delete as equivalent to that of Replace_String with a null
1108 argument. As a result, deleting a null string that starts past
1109 the end of its argument is a noop and must not raise
1110 Index_Error.
1111
c98aac61 11122019-07-08 Javier Miranda <miranda@adacore.com>
1113
1114 * exp_disp.adb (Register_Primitive): When registering a
1115 primitive in the secondary dispatch table, handle primitive
1116 inherited through several levels of type derivation (required to
1117 properly handle inherited 'null' primitive).
1118
221b67b6 11192019-07-08 Bob Duff <duff@adacore.com>
1120
1121 * doc/gnat_ugn/gnat_utility_programs.rst: Document handling of
1122 preprocessor directives in GNATpp.
1123
aed4e06a 11242019-07-08 Javier Miranda <miranda@adacore.com>
1125
1126 * gnat1drv.adb (Post_Compilation_Validation_Checks:
1127 Validate_Compile_Time_Warning_Errors is now located in sem_prag
1128 (instead of sem_ch13).
1129 * sem_ch13.ads (Validate_Compile_Time_Warning_Error,
1130 Validate_Compile_Time_Warning_Errors): Move to sem_prag.
1131 * sem_ch13.adb
1132 (Compile_Time_Warnings_Errors): Move to sem_prag.
1133 (Initialize): Remove initialization of table
1134 Compile_Time_Warning_Errors.
1135 (Validate_Compile_Time_Warning_Error,
1136 Validate_Compile_Time_Warning_Errors): Move to sem_prag.
1137 * sem_prag.ads (Validate_Compile_Time_Warning_Errors): New
1138 procedure.
1139 * sem_prag.adb (Initialize): Initialize table
1140 Compile_Time_Warning_Errors.
1141
b9bd5934 11422019-07-08 Ed Schonberg <schonberg@adacore.com>
1143
1144 * sem_ch13.adb (Analyze_Aspect_Specifications): For a
1145 pre/postcondition of a generic subprogram declaration, do not
1146 use Relocate_Node on the aspect expression to construct the
1147 corresponding attribute specification, to prevent tree anomalies
1148 when the expression is a call with named actual parameters.
1149
63bb17d8 11502019-07-08 Javier Miranda <miranda@adacore.com>
1151
1152 * sem_attr.adb (Analyze_Attribute [Attribute_Size]): For pragmas
1153 used to report user defined compile time warning or errors
1154 handle 'Size for types with known static RM size.
1155
1979cbfe 11562019-07-08 Justin Squirek <squirek@adacore.com>
1157
1158 * exp_imgv.adb (Build_Enumeration_Image_Tables): Default SSO for
1159 the building of image tables.
1160 (Expand_Image_Attribute): Minor cleanup.
1161
bcb0a375 11622019-07-08 Dmitriy Anisimkov <anisimko@adacore.com>
1163
1164 * libgnat/g-socket.ads, libgnat/g-socket.adb: Improve
1165 documentation.
1166 (Get_Socket_Option, Set_Socket_Option): Remove default value for
1167 the Level formal.
1168
429822c1 11692019-07-08 Ed Schonberg <schonberg@adacore.com>
1170
1171 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): For an
1172 unanalized aspect in a generic context that has not been
1173 analyzed yet, if the aspect applies to a type, place the type on
1174 the scope stack to make its components visible, before checking
1175 conformance with the version of the expression analyzed at the
1176 freeze point.
1177
e1415398 11782019-07-05 Justin Squirek <squirek@adacore.com>
1179
1180 * checks.adb (Apply_Accessibility_Check): Add logic to fetch the
1181 function result accessibility level if one is required within
1182 the generated check.
1183 * exp_ch6.adb (Needs_Result_Accessibility_Level): Modify
1184 controlling elsif block to handle more cases such as anonymous
1185 access results and disable checking for coextensions.
1186
dad9e9f8 11872019-07-05 Ed Schonberg <schonberg@adacore.com>
1188
1189 * sem_ch9.adb (Analyze_Accept_Statement): If this is an illegal
1190 accept statement for an enclosing entry abandon analysis to
1191 prevent scope mismatches and potential infinite loops in
1192 compiler.
1193
627d0751 11942019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
1195
1196 * ali.adb (For_Each_Invocation_Construct,
1197 For_Each_Invocation_Relation): New version.
1198 (Scan_ALI): Initialize field Invocation_Graph_Encoding.
1199 (Set_Invocation_Graph_Encoding): Update the setting of the
1200 invocation graph encoding.
1201 * ali.ads: Move field Invocation_Graph_Encoding from Unit_Record
1202 to ALI_Record because the encoding applies to the whole ALI,
1203 rather than one of the units (spec or body) for which the ALI
1204 file was created.
1205 (For_Each_Invocation_Construct, For_Each_Invocation_Relation):
1206 New version.
1207 * bindo.adb: Update the section on switches. Complete the
1208 section of debugging elaboration order issues.
1209 (Find_Elaboration_Order): Prepare the routine for the switch
1210 from the old to the new elaboration order mechanism.
1211 * bindo-diagnostics.adb (Find_And_Output_Invocation_Paths):
1212 Manage a visited set used by Visit_Vertex.
1213 (Output_All_Cycles_Suggestions,
1214 Output_Dynamic_Model_Suggestions): Clarify the nature of the
1215 suggested switch.
1216 (Output_Elaborate_Body_Transition): Update the diagnostic to
1217 emit a better message.
1218 (Output_Forced_Suggestions, Output_Full_Encoding_Suggestions):
1219 Clarify the nature of the suggested switch.
1220 (Visit_Vertex): Update the parameter profile to add a set of
1221 invokers visited during the transition. This set prevents
1222 infinite exploration of the graph in case the invocations are
1223 recursive.
1224 * bindo-elaborators.adb: Add a use clause for
1225 Bindo.Writers.Dependency_Writers.
1226 (Elaborate_Units_Common): Output the library graph after it has
1227 been augmented with invocation edges. Output just the components
1228 instead of outputting the whole library graph again.
1229 (Elaborate_Units_Dynamic, Elaborate_Units_Static): Output the
1230 dependencies as expressed in the library graph.
1231 * bindo-units.adb (Invocation_Graph_Encoding): Update the
1232 extraction of the invocation graph encoding.
1233 * bindo-writers.adb: Add with and use clauses for Binderr and
1234 Butil.
1235 (palgc, plgc): New debug routine.
1236 (Write_Components): Moved to the spec. Add a header for the
1237 output.
1238 (Write_Dependencies, Write_Dependencies_Of_Vertex,
1239 Write_Dependency_Edge): New routine.
1240 (Write_Elaboration_Order): Update the logic to follow the format
1241 of Binde's order output.
1242 (Write_Library_Graph): Do not output the components every time
1243 the graph is written.
1244 (Write_Unit): Output the invocation graph encoding of the unit.
1245 Output the invocation constructs and relations for the unit
1246 only.
1247 * bindo-writers.ads (Write_Components): Moved from the body.
1248 (Write_Dependencies): New routine.
1249 * bindusg.adb: Prepare the routine for the switch from the old
1250 to the new elaboration order mechanism.
1251 * debug.adb: Binder switch -d_O is now not associated with any
1252 functionality.
1253 * einfo.adb (Is_Elaboration_Target): The attribute applies to
1254 packages, as specified by the comment on the attribute usage.
1255 * opt.ads: Add a global flag which controls the choice between
1256 the new and the legacy elaboration order mechanism.
1257 * sem_elab.adb: Add Package_Target to type Target_Kind.
1258 (Build_Elaborate_Body_Procedure, Build_Elaborate_Procedure,
1259 Build_Elaborate_Spec_Procedure, Check_Elaboration_Scenarios,
1260 Check_SPARK_Model_In_Effect): Use Main_Unit_Entity to obtain the
1261 entity of the main unit.
1262 (Create_Package_Rep): New routine.
1263 (Create_Target_Rep): Add processing for packages.
1264 (Declaration_Placement_Of_Node, Has_Prior_Elaboration): Use
1265 Main_Unit_Entity to obtain the entity of the main
1266 unit.
1267 (Invocation_Graph_Recording_OK): Prepare the routine for the
1268 switch from the old to the new elaboration order mechanism.
1269 (Main_Unit_Entity): New routine.
1270 (Meet_Elaboration_Requirement,
1271 Process_Conditional_ABE_Variable_Reference): Use
1272 Main_Unit_Entity to obtain the entity of the main unit.
1273 (Process_Invocation_Instantiation): New routine.
1274 (Process_Invocation_Scenario): Add processing for
1275 instantiations.
1276 * switch-b.adb (Scan_Binder_Switches): Prepare the routine for
1277 the switch from the old to the new elaboration order mechanism.
1278
30fb27b1 12792019-07-05 Joffrey Huguet <huguet@adacore.com>
1280
1281 * libgnat/a-textio.adb: Add abstract state refinment.
1282 * libgnat/a-textio.ads: Add File_System abstract state. Add
1283 global contracts, contract cases, preconditions and
1284 postconditions to procedures and functions.
1285 (Set_Input, Set_Output, Set_Error, Standard_Input,
1286 Standard_Output, Standard_Error, Current_Input, Current_Output,
1287 Current_Error): Turn SPARK_Mode off.
1288 (Get_Line): Turn SPARK_Mode off on Get_Line functions.
1289 * libgnat/a-tideio.ads, libgnat/a-tienio.ads,
1290 libgnat/a-tifiio.ads, libgnat/a-tiflio.ads,
1291 libgnat/a-tiinio.ads, libgnat/a-timoio.ads: Add global
1292 contracts, contract cases, preconditions and postconditions to
1293 procedures and functions.
1294
ce99fc8a 12952019-07-05 Arnaud Charlet <charlet@adacore.com>
1296
1297 * doc/gnat_ugn/platform_specific_information.rst: Refresh doc on
1298 installing from the command line on Windows. Remove obsolete
1299 part.
1300 * gnat_ugn.texi: Regenerate.
1301
26ea5003 13022019-07-05 Vasiliy Fofanov <fofanov@adacore.com>
1303
1304 * libgnat/a-wichha.ads (Is_Alphanumeric): Replace comment with
1305 the correct one. Also capitalize references to False
1306 throughout.
1307
c9c81835 13082019-07-05 Eric Botcazou <ebotcazou@adacore.com>
1309
1310 * exp_ch4.adb (Expand_N_Indexed_Component): Do not expand actual
1311 parameters of function calls here either.
1312
50948c8a 13132019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
1314
1315 * bindo-units.adb, checks.adb, exp_attr.adb, exp_ch3.adb,
1316 exp_ch4.adb, exp_pakd.adb, lib-writ.adb, libgnat/g-traceb.adb,
1317 libgnat/g-traceb.ads, libgnat/s-stratt.ads, sem_aux.ads,
1318 sem_util.adb: Minor reformatting.
1319
a9fa50ab 13202019-07-05 Ed Schonberg <schonberg@adacore.com>
1321
1322 * sem_ch13.adb (Build_Predicate_Functions): If a subtype that
1323 carries a static predicate aspect is frozen immediately after
1324 its declaration, ensure that the generated function body created
1325 for predicate checking is inserted after the corresponding
1326 subprogram declaration, which is created at the point the
1327 declaration is elaborated.
1328
ee4e1dd7 13292019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
1330
1331 * exp_ch7.adb (Cleanup_Record): Use the underlying type when
1332 checking for components with tasks.
1333
2028580f 13342019-07-05 Arnaud Charlet <charlet@adacore.com>
1335
1336 * libgnarl/s-osinte__linux.ads: Link with -lrt before -lpthread.
1337
ec1e481f 13382019-07-05 Ed Schonberg <schonberg@adacore.com>
1339
1340 * exp_pakd.adb (Expand_Bit_Packed_Element_Set): Add explicit
1341 range checks when the index type of the bit-packed array is an
1342 enumeration type with a non-standard representation,
1343
ae60396a 13442019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
1345
1346 * sem_res.adb (Is_Control_Flow_Statement): Delay statements
1347 contain an expression, which in turn may have side effects and
1348 affect the infinite recursion. As a result, delay statements
1349 should not be treated specially.
1350
d33025f2 13512019-07-05 Arnaud Charlet <charlet@adacore.com>
1352
1353 * libgnarl/s-linux.ads, libgnarl/s-linux__alpha.ads,
1354 libgnarl/s-linux__android.ads, libgnarl/s-linux__hppa.ads,
1355 libgnarl/s-linux__mips.ads, libgnarl/s-linux__riscv.ads,
1356 libgnarl/s-linux__sparc.ads: Fix typos in comments.
1357
51f2c7f9 13582019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
1359
1360 * sem_res.adb (Check_Infinite_Recursion): Reimplemented.
1361 (Enclosing_Declaration_Or_Statement,
1362 Invoked_With_Different_Arguments, Is_Conditional_Statement,
1363 Is_Control_Flow_Statement, Is_Immediately_Within_Body,
1364 Is_Raise_Idiom, Is_Raise_Statement, Is_Sole_Statement,
1365 Preceded_By_Control_Flow_Statement,
1366 Within_Conditional_Statement): New routines.
1367
0e6f6ee1 13682019-07-05 Javier Miranda <miranda@adacore.com>
1369
1370 * exp_ch4.adb (Expand_N_Type_Conversion): Do not apply an
1371 accessibility check when the conversion is an access to
1372 class-wide interface type and it is an actual parameter.
1373 * exp_ch6.adb (Expand_Call_Helper): Add documentation on the
1374 accessibility level of an anonymous allocator defining the value
1375 of an access parameter.
1376 * sem_util.ads, sem_util.adb (Dynamic_Accessibility_Level): Add
1377 support for an anonymous allocator whose type is that of a
1378 stand-alone object of an anonymous access to object type.
1379
f28a3d6c 13802019-07-05 Piotr Trojanek <trojanek@adacore.com>
1381
1382 * einfo.ads, sem_res.adb: Typo fixes in comments.
1383
2d8a0eb3 13842019-07-05 Bob Duff <duff@adacore.com>
1385
1386 * exp_ch6.adb (Is_Build_In_Place_Function): Narrow the check for
1387 Has_Foreign_Convention to the imported case only. If a
1388 build-in-place function is exported, and called from Ada code,
1389 build-in-place protocols should be used.
1390
6eddee84 13912019-07-05 Ed Schonberg <schonberg@adacore.com>
1392
1393 * sem_util.adb (Encloing_Subprogram): If Enclosing_Dynamic_Scope
1394 is a loop, continue climbing the scope stack to find the
1395 enclosing subprogram.
1396 (Gather_Components): Handle properly a choice in a record
1397 aggregate that is given by a subtype with a static predicate.
1398
249e38a7 13992019-07-05 Javier Miranda <miranda@adacore.com>
1400
1401 * debug.adb (-gnatd.K): Leave available this switch.
1402 * contracts.adb (Build_And_Analyze_Contract_Only_Subprograms):
1403 Remove.
1404 * scil_ll.ads, scil_ll.adb (Contract_Only_Body_Flag,
1405 Contract_Only_Body_Nodes, Get_Contract_Only_Body,
1406 Is_Contract_Only_Body, Set_Contract_Only_Body): Remove.
1407
33ae0c9f 14082019-07-05 Pierre-Marie de Rodat <derodat@adacore.com>
1409
1410 * libgnat/a-strunb.ads: Import documentation from the RM
1411
70f9c8aa 14122019-07-05 Pierre-Marie de Rodat <derodat@adacore.com>
1413
1414 * libgnat/a-strfix.ads: Import documentation from the RM
1415
1bc68ac2 14162019-07-05 Yannick Moy <moy@adacore.com>
1417
1418 * adabkend.adb (Scan_Back_End_Switches): Accept -Og and -Ofast
1419 switches.
1420
2500be2f 14212019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
1422
1423 * ali.adb: Relocate types Invocation_Construct_Record,
1424 Invocation_Relation_Record, and Invocation_Signature_Record to
1425 the body of ALI. Relocate tables Invocation_Constructs,
1426 Invocation_Relations, and Invocation_Signatures to the body of
1427 ALI. Remove type Body_Placement_Codes. Add new types
1428 Declaration_Placement_Codes, and
1429 Invocation_Graph_Encoding_Codes. Update the literals of type
1430 Invocation_Graph_Line_Codes.
1431 (Add_Invocation_Construct): Update the parameter profile. Add an
1432 invocation construct built from all attributes provided.
1433 (Add_Invocation_Relation): Update the parameter profile. Add an
1434 invocation relation built from all attributes provided.
1435 (Body_Placement): New routine.
1436 (Body_Placement_Kind_To_Code, Code_To_Body_Placement_Kind):
1437 Removed.
1438 (Code_To_Declaration_Placement_Kind,
1439 Code_To_Invocation_Graph_Encoding_Kind, Column,
1440 Declaration_Placement_Kind_To_Code, Extra,
1441 For_Each_Invocation_Construct, For_Each_Invocation_Relation,
1442 Invocation_Graph_Encoding,
1443 Invocation_Graph_Encoding_Kind_To_Code, Invoker, Kind, Line,
1444 Locations, Name): New routine.
1445 (Scan_Invocation_Construct_Line): Reimplement the scanning
1446 mechanism.
1447 (Scan_Invocation_Graph_Attributes_Line): New routine.
1448 (Scan_Invocation_Graph_Line): Use a case statement to dispatch.
1449 (Scan_Invocation_Relation_Line): Reimplement the scanning
1450 mechanism.
1451 (Scope): New routine.
1452 (Set_Invocation_Graph_Encoding, Signature, Spec_Placement,
1453 Target): New routine.
1454 * ali.ads: Add new type Invocation_Graph_Encoding_Kind. Add
1455 component Invocation_Graph_Encoding to type Unit_Record.
1456 Relocate various types and data structures to the body of ALI.
1457 (Add_Invocation_Construct, Add_Invocation_Relation): Update the
1458 parameter profile.
1459 (Body_Placement): New routine.
1460 (Body_Placement_Kind_To_Code, Code_To_Body_Placement_Kind):
1461 Removed.
1462 (Code_To_Declaration_Placement_Kind,
1463 Code_To_Invocation_Graph_Encoding_Kind, Column,
1464 Declaration_Placement_Kind_To_Code, Extra,
1465 For_Each_Invocation_Construct, For_Each_Invocation_Relation,
1466 Invocation_Graph_Encoding,
1467 Invocation_Graph_Encoding_Kind_To_Code, Invoker, Kind, Line,
1468 Locations, Name, Scope, Set_Invocation_Graph_Encoding,
1469 Signature, Spec_Placement, Target): New routine.
1470 * bindo.adb: Add with clause for Binde. Add with and use
1471 clauses for Debug. Update the documentation. Add new switches.
1472 (Find_Elaboration_Order): Dispatch to the proper elaboration
1473 mechanism.
1474 * bindo-augmentors.adb:
1475 Remove with and use clauses for GNAT and GNAT.Sets. Remove
1476 membership set VS. Update the parameter profiles of most
1477 routines to use better parameter names. Update the
1478 implementation of most routine to use the new parameter names.
1479 Remove various redundant assertions.
1480 * bindo-builders.adb: Use better names for instantiated data
1481 structures. Update all references to these names. Update the
1482 parameter profiles of most routines to use better parameter
1483 names. Update the implementation of most routine to use the new
1484 parameter names.
1485 (Build_Library_Graph): Update the parameter profile. Update the
1486 call to Create.
1487 (Create_Vertex): Reimplemented.
1488 (Declaration_Placement_Vertex): New routine.
1489 * bindo-builders.ads (Build_Library_Graph): Update the parameter
1490 profile and comment on usage.
1491 * bindo-diagnostics.adb: Almost a new unit.
1492 * bindo-diagnostics.ads: Add a use clause for
1493 Bindo.Graphs.Invocation_Graphs. Remove package
1494 Cycle_Diagnostics.
1495 (Diagnose_Circularities): New routine.
1496 * bindo-elaborators.adb: Remove the with and use clauses for
1497 Binderr and GNAT.Sets. Remove the use clause for
1498 Bindo.Diagnostics.Cycle_Diagnostics. Remove membership set VS.
1499 Update the parameter profiles of most routines to use better
1500 parameter names. Update the implementation of most routine to
1501 use the new parameter names. (Elaborate_Units_Common): Update
1502 the parameter profile. Pass an infication to the library graph
1503 builder whether the dynamic model is in effect.
1504 (Elaborate_Units_Dynamic, Elaborate_Units_Static): Use
1505 Diagnose_Circularities to provide diagnostics.
1506 (Update_Successor): Use routine In_Same_Component to determine
1507 whether the predecessor and successor reside in different
1508 components.
1509 * bindo-graphs.adb: Add with and use clauses for Butil, Debug,
1510 Output, and Bindo.Writers. Remove with and use clauses for
1511 GNAT.Lists. Update the parameter profiles of most routines to
1512 use better parameter names. Update the implementation of most
1513 routine to use the new parameter names. Remove various
1514 redundant assertions. Remove doubly linked list EL. Add new
1515 type Precedence_Kind.
1516 (Add_Cycle): New routine.
1517 (Add_Vertex): Update the parameter profile. Update the creation
1518 of vertex attributes.
1519 (Add_Vertex_And_Complement, Body_Vertex, Column,
1520 Complementary_Vertex, Copy_Cycle_Path, Cycle_Kind_Of): New
1521 routines.
1522 (Destroy_Invocation_Graph_Edge, Destroy_Library_Graph_Cycle,
1523 Destroy_Library_Graph_Edge, Extra, File_Name,
1524 Find_All_Cycles_Through_Vertex, Find_All_Cycles_With_Edge,
1525 Find_Cycles, Find_First_Lower_Precedence_Cycle,
1526 Get_LGC_Attributes, Has_Next, Hash_Library_Graph_Cycle,
1527 Hash_Library_Graph_Cycle_Attributes, Highest_Precedence_Cycle,
1528 Highest_Precedence_Edge, In_Same_Component, Insert_And_Sort,
1529 Invocation_Edge_Count, Invocation_Graph_Encoding,
1530 Is_Cycle_Initiating_Edge, Is_Cyclic_Edge,
1531 Is_Cyclic_Elaborate_All_Edge, Is_Cyclic_Elaborate_Body_Edge,
1532 Is_Cyclic_Elaborate_Edge, Is_Cyclic_Forced_Edge,
1533 Is_Cyclic_Invocation_Edge, Is_Cyclic_With_Edge,
1534 Is_Dynamically_Elaborated, Is_Elaborate_All_Edge,
1535 Is_Elaborate_Body_Edge, Is_Elaborate_Edge: New routines.
1536 (Is_Existing_Predecessor_Successor_Relation): Removed.
1537 (Is_Forced_Edge, Is_Invocation_Edge, Is_Recorded_Cycle,
1538 Is_Recorded_Edge, Is_With_Edge, Iterate_Edges_Of_Cycle, Kind,
1539 Length): New routine.
1540 (Lib_Vertex): Removed.
1541 (Line, Links_Vertices_In_Same_Component,
1542 Maximum_Invocation_Edge_Count, Next, Normalize_And_Add_Cycle,
1543 Normalize_Cycle_Path, Number_Of_Cycles, Path, Precedence,
1544 Remove_Vertex_And_Complement, Sequence_Next_Cycle): New routines.
1545 (Sequence_Next_IGE_Id): Renamed to Sequence_Next_Edge.
1546 (Sequence_Next_IGV_Id): Renamed to Sequence_Next_Vertex.
1547 (Sequence_Next_LGE_Id): Renamed to Sequence_Next_Edge.
1548 (Sequence_Next_LGV_Id): Renamed to Sequence_Next_Vertex.
1549 (Set_Is_Existing_Predecessor_Successor_Relation): Removed.
1550 (Set_Is_Recorded_Cycle, Set_Is_Recorded_Edge,
1551 Set_LGC_Attributes, Spec_Vertex, Trace_Cycle, Trace_Edge,
1552 Trace_Eol, Trace_Vertex): New routines.
1553 * bindo-graphs.ads: Add with and use clauses for Types and
1554 GNAT.Lists. Update the parameter profiles of most routines to
1555 use better parameter names. Update the implementation of most
1556 routine to use the new parameter names. Add the new
1557 instantiated data structures IGE_Lists, IGV_Sets, LGC_Lists,
1558 LGE_Lists, LGE_Sets, LGV_Sets, and RC_Sets. Add new type
1559 Library_Graph_Cycle_Id along with an empty and initial value.
1560 Remove component Lib_Vertex and add new components Body_Vertex
1561 and Spec_Vertex to type Invocation_Graph_Vertex_Attributes. Add
1562 new type Library_Graph_Cycle_Kind. Add new iterators
1563 All_Cycle_Iterator and Edges_Of_Cycle_Iterator. Add new type
1564 Library_Graph_Cycle_Attributes. Add new components
1565 Cycle_Attributes, Cycles, and Dynamically_Elaborated to type
1566 Library_Graph_Attributes.
1567 (Body_Vertex, Column, Destroy_Invocation_Graph_Edge,
1568 Destroy_Library_Graph_Cycle_Attributes,
1569 Destroy_Library_Graph_Edge, Extra, File_Name, Find_Cycles,
1570 Has_Elaborate_All_Cycle, Has_Next, Hash_Library_Graph_Cycle,
1571 Hash_Library_Graph_Cycle_Attributes, Highest_Precedence_Cycle,
1572 In_Same_Component, Invocation_Edge_Count,
1573 Invocation_Graph_Encoding, Is_Dynamically_Elaborated,
1574 Is_Elaborate_All_Edge, Is_Elaborate_Body_Edge,
1575 Is_Elaborate_Edge, Is_Forced_Edge, Is_Invocation_Edge,
1576 Is_With_Edge, Iterate_All_Cycles, Iterate_Edges_Of_Cycle, Kind):
1577 New routines.
1578 (Length, Lib_Vertex, (Line, Next, Number_Of_Cycles, Present,
1579 Same_Library_Graph_Cycle_Attributes, Spec_Vertex): New routines.
1580 * bindo-units.adb (File_Name, Invocation_Graph_Encoding): New
1581 routines.
1582 * bindo-units.ads: Add new instantiated data structure
1583 Unit_Sets.
1584 (File_Name, Invocation_Graph_Encoding): New routine.
1585 * bindo-validators.adb: Remove with and use clauses for GNAT and
1586 GNAT.Sets. Remove membership set US. Update the parameter
1587 profiles of most routines to use better parameter names. Update
1588 the implementation of most routine to use the new parameter
1589 names.
1590 (Validate_Cycle, Validate_Cycle_Path, Validate_Cycles,
1591 Validate_Invocation_Graph_Vertex): Remove the validation of
1592 component Lib_Vertex. Add the validation of components
1593 Body_Vertex and Spec_Vertex.
1594 (Write_Error): New routine.
1595 * bindo-validators.ads (Validate_Cycles): New routine.
1596 * bindo-writers.adb: Update the parameter profiles of most
1597 routines to use better parameter names. Update the
1598 implementation of most routine to use the new parameter names.
1599 (Write_Cycle, Write_Cyclic_Edge, Write_Cycles): New routines.
1600 (Write_Invocation_Graph_Vertex): Remove the output of component
1601 Lib_Vertex. Add the output of components Body_Vertex and
1602 Spec_Vertex.
1603 * bindo-writers.ads (Write_Cycles): New routine.
1604 * debug.adb: Use binder switches -d_C and -d_P, add
1605 documentation on their usage.
1606 * gnatbind.adb: Remove with and use clauses for Binde. Delegate
1607 the choice of elaboration mechanism to Bindo.
1608 * lib-writ.adb (Column, Extra, Invoker, Kind, Line, Locations,
1609 Name, Placement, Scope, Signature, Target): Removed.
1610 (Write_Invocation_Graph): Moved at the top level.
1611 (Write_Invocation_Graph_Attributes): New routine.
1612 (Write_Invocation_Relation, Write_Invocation_Signature): Moved
1613 at the top level.
1614 * lib-writ.ads: Add a documentation section on invocation graph
1615 attributes.
1616 * sem_elab.adb (Body_Placement_Of): New routine.
1617 (Declare_Invocation_Construct): Update the call to
1618 Add_Invocation_Construct.
1619 (Declaration_Placement_Of_Node): New routine.
1620 (Get_Invocation_Attributes): Correct the retrieval of the
1621 enclosing subprogram where the postcondition procedure lives.
1622 (Placement_Of, Placement_Of_Node): Removed.
1623 (Record_Invocation_Graph): Record the encoding format used.
1624 (Record_Invocation_Graph_Encoding): New routine.
1625 (Record_Invocation_Relation): Update the call to
1626 Add_Invocation_Relation.
1627 (Spec_Placement_Of): Removed.
1628 * libgnat/g-lists.ads, libgnat/g-lists.adb (Equal): New routine.
1629
164597c5 16302019-07-05 Ed Schonberg <schonberg@adacore.com>
1631
1632 * checks.adb (Apply_Predicate_Check): Except within the
1633 subprogram body that defines the formal, do not apply predicate
1634 check on a formal IN parameter: such a check is redundant and
1635 its expansion can lead to out-of-scope references when it is
1636 originates in a function call in a precondition,
1637
572a4bc5 16382019-07-05 Yannick Moy <moy@adacore.com>
1639
1640 * sem_res.adb (Resolve_Call): Cannot inline in quantified
1641 expressions.
1642 * sem_util.adb, sem_util.ads (In_Quantified_Expression): New
1643 function.
1644
2c3ad474 16452019-07-05 Bob Duff <duff@adacore.com>
1646
1647 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
1648 Fix typo.
1649 * gnat_rm.texi: Regenerate.
1650
2f67af4c 16512019-07-05 Bob Duff <duff@adacore.com>
1652
1653 * exp_attr.adb (Input): Take the No_Stream_Optimizations
1654 restriction into account.
1655
1cb1fd0f 16562019-07-05 Claire Dross <dross@adacore.com>
1657
1658 * libgnat/a-cofove.ads, libgnat/a-cofove.adb: Definite formal
1659 vectors are now always bounded so that they do not need to be
1660 limited anymore.
1661
d2d09f3e 16622019-07-05 Dmitriy Anisimkov <anisimko@adacore.com>
1663
1664 * libgnat/g-traceb.ads, libgnat/g-traceb.adb (Call_Chain): New
1665 function.
1666
14e0bfed 16672019-07-04 James Clarke <jrtc27@debian.org>
1668
1669 * libgnarl/s-osinte__kfreebsd-gnu.ads (clockid_t): Make type
1670 definition public.
1671 (CLOCK_REALTIME): Make value public.
1672
ecd07d3b 16732019-07-04 Javier Miranda <miranda@adacore.com>
1674
1675 * exp_tss.adb (Init_Proc): Adding missing support for access to
1676 subprograms and access to protected subprograms of non-default
1677 C++ constructors.
1678
e0ff1639 16792019-07-04 Eric Botcazou <ebotcazou@adacore.com>
1680
1681 * gnat1drv.adb (Adjust_Global_Switches): Use proper interface to
1682 set the validity settings in CodePeer mode.
1683 * par-load.adb (Load): Remove all code dealing with validity
1684 settings.
1685 * validsw.ads (Validity_Check_Copies): Alphabetize.
1686 * validsw.adb (Reset_Validity_Check_Options): Set all options to
1687 off.
1688 (Save_Validity_Check_Options): Save all options.
1689
40bff3a0 16902019-07-04 Hristian Kirtchev <kirtchev@adacore.com>
1691
1692 * exp_ch3.adb, exp_ch4.adb, exp_ch4.ads, exp_ch5.adb,
1693 exp_ch7.adb, exp_ch9.adb, exp_ch11.adb, exp_unst.adb,
1694 rtsfind.ads, sem_attr.adb, sem_ch10.adb, sem_ch12.adb,
1695 sem_ch13.adb, sem_dim.adb, sem_disp.adb, xref_lib.adb: Minor
1696 reformatting.
1697
0ebaade4 16982019-07-04 Joffrey Huguet <huguet@adacore.com>
1699
1700 * libgnarl/a-taside.ads: Add assertion policy to ignore
1701 preconditions.
1702 (Abort_Task, Is_Terminated, Is_Callable): Add preconditions.
1703
f14a590b 17042019-07-04 Eric Botcazou <ebotcazou@adacore.com>
1705
1706 * doc/gnat_rm/implementation_defined_pragmas.rst: Fix
1707 capitalization and parenthesis glitches.
1708 * gnat_rm.texi: Regenerate.
1709
f5388f99 17102019-07-04 Ed Schonberg <schonberg@adacore.com>
1711
1712 * sem_ch10.adb (Remove_Context_Clauses): Handle properly the
1713 removal of a limited_with_clause which appears in the library
1714 unit oF the main unit, when some other unit in the context has a
1715 regular with_clause on the same unit, to prevent spurious
1716 visibility errors in the subsequent analysis of pending instance
1717 bodies.
1718
c930bc82 17192019-07-04 Hristian Kirtchev <kirtchev@adacore.com>
1720
1721 * sem_elab.adb: Add new type Elaboration_Phase_Status along with
1722 a global to keep track of the elaboration phase status.
1723 Initialize all internal data structures to Nil for services
1724 Elaborated_Units, Internal_Representation, and Scenario_Storage.
1725 (Build_Call_Marker): Do not create a call marker when the
1726 elaboration phase is not active.
1727 (Build_Variable_Reference_Marker): Do not create a call marker
1728 when the elaboration phase is not active.
1729 (Check_Elaboration_Scenarios): Destroy all internal structures
1730 when the elaboration phase does not have to run. Do not execute
1731 when the elaboration phase is not active.
1732 (Elaboration_Phase_Active): New routine.
1733 (Finalize_All_Data_Structures): New routine.
1734 (Initialize): Initialize all internal data structures and signal
1735 that the elaboration phase has started.
1736 (Initialize_All_Data_Structures): New routine.
1737 (Initialize_Elaborated_Units): Initialize all internal data
1738 structures.
1739 (Initialize_Internal_Representation): Initialize all internal
1740 data structures.
1741 (Initialize_Scenario_Storage): Initialize all internal data
1742 structures.
1743 (Kill_Elaboration_Scenario): Do not execute when the elaboration
1744 phase is not active.
1745 (Set_Elaboration_Phase): New routine.
1746 (Update_Elaboration_Scenario): Do not execute when the
1747 elaboration phase is not active.
1748
39dec7f4 17492019-07-04 Gary Dismukes <dismukes@adacore.com>
1750
1751 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The special
1752 treatment of calling Mask_Unfrozen_Types must also be done in
1753 the case of an Ignored_Ghost_Entity, because Expander_Active is
1754 False in that case.
1755
92b004be 17562019-07-04 Yannick Moy <moy@adacore.com>
1757
1758 * sem_prag.adb (Check_Library_Level_Entity): Update for new rule
1759 on SPARK_Mode.
1760
12795e1c 17612019-07-04 Justin Squirek <squirek@adacore.com>
1762
1763 * sem_disp.adb (Check_Controlling_Formals): Obtain the full view
1764 before type comparison.
1765
63fe3141 17662019-07-04 Ed Schonberg <schonberg@adacore.com>
1767
1768 * exp_ch4.ads, exp_ch4.adb (Build_Eq_Call): New visible
1769 subprogram, extracted from Expand_Composite_Equality, to handle
1770 properly the composition of equality for variant record types.
1771 * exp_ch3.adb (MAke_Eq_If): Use Build_Eq_Call for each
1772 component, to handle properly the case of a component with a
1773 user-defined equality. Revert to predefined equality if the
1774 user-defined operation is abstract, to maintain compatibility
1775 with older versions,
1776
17fa952a 17772019-07-04 Justin Squirek <squirek@adacore.com>
1778
1779 * exp_ch3.adb (Build_Initialization_Call): Fixup
1780 *_skip_null_excluding_check argument to handle new default.
1781 (Init_Formals): Make *_skip_null_excluding_check formal default
1782 to False
1783 * exp_ch4.adb (Expand_N_Allocator): Add comment to note heavy
1784 code duplication
1785
cf32543d 17862019-07-04 Bob Duff <duff@adacore.com>
1787
1788 * sem_ch3.adb (Access_Definition): Do not create a master unless
1789 Tasking_Allowed. Otherwise, this fails on restricted runtimes.
1790
eb4dbf20 17912019-07-04 Hristian Kirtchev <kirtchev@adacore.com>
1792
1793 * sem_util.adb (Propagate_DIC_Attributes): Do not propagate the
1794 Default_Initial_Condition attributes to an incomplete type.
1795
25ddc6ba 17962019-07-04 Ed Schonberg <schonberg@adacore.com>
1797
1798 * sem_attr.adb (Check_Array_Type): An array type attribute such
1799 as 'First can be applied to an unconstrained array tyope when
1800 the attribute reference appears within an aspect specification
1801 and the prefix is a current instance, given that the prefix of
1802 the attribute will become a formal of the subprogram that
1803 implements the aspect (typically a predicate check).
1804
74a5962a 18052019-07-04 Piotr Trojanek <trojanek@adacore.com>
1806
1807 * sem_util.adb (Yields_Synchronized_Object): Fix typos in
1808 comments.
1809
c65d33a8 18102019-07-04 Yannick Moy <moy@adacore.com>
1811
1812 * sem_util.adb (Yields_Synchronized_Object): Adapt to new SPARK
1813 rule.
1814
afd77d39 18152019-07-04 Yannick Moy <moy@adacore.com>
1816
1817 * sem_spark.adb (Check_Statement): Only check permission of
1818 object in extended return when it is of a deep type.
1819
2281b807 18202019-07-04 Justin Squirek <squirek@adacore.com>
1821
1822 * sem_ch12.adb (Perform_Appropriate_Analysis): Added for
1823 selecting which type of analysis based on wheither the
1824 instantiation is a generic at the library-level. In which case
1825 expansion during analysis.
1826 (Preanalyze_Actuals): Modify calls to Analyze to use the new
1827 routine.
1828
542b3e26 18292019-07-04 Ed Schonberg <schonberg@adacore.com>
1830
1831 * exp_unst.adb: Handle conditional expressions.
1832
7754aad4 18332019-07-04 Yannick Moy <moy@adacore.com>
1834
1835 * sem_spark.adb (Check_Package_Spec, Check_Package_Body): Only
1836 analyze parts of the code marked in SPARK.
1837
3843c1bd 18382019-07-04 Hristian Kirtchev <kirtchev@adacore.com>
1839
1840 * erroutc.adb, exp_aggr.adb, inline.adb, opt.adb, sem_ch3.adb:
1841 Minor reformatting.
1842
5bc0f990 18432019-07-04 Yannick Moy <moy@adacore.com>
1844
1845 * sem_spark.adb (Explanation, Get_Expl): New functions to get
1846 the explanation for a permission mismatch.
1847 (Perm_Error, Perm_Mismatch, Perm_Error_Loop_Exit): Take
1848 explanation into account for issuing a more precise error
1849 message.
1850 (Set_Perm_Prefixes, Set_Perm_Extensions,
1851 Set_Perm_Extensions_Move): Pass suitable argument for the
1852 explanation node.
1853
11903e68 18542019-07-04 Arnaud Charlet <charlet@adacore.com>
1855
1856 * exp_aggr.adb (In_Place_Assign_OK): Moved to top level and add
1857 support for record aggregates.
1858 (Component_Check): Use Is_CCG_Supported_Aggregate instead of a
1859 similar local predicate.
1860 (Convert_To_Assignments): Take advantage of In_Place_Assign_OK
1861 predicate when possible.
1862 (Is_CCG_Supported_Aggregate): Return False for records with
1863 representation clauses and fix the logic for dealing with nested
1864 aggregates.
1865
b0c19ea3 18662019-07-04 Piotr Trojanek <trojanek@adacore.com>
1867
1868 * opt.adb (Set_Config_Switches): Keep assertions policy as
1869 enabled when analysing internal units in GNATprove mode.
1870
90f2b146 18712019-07-04 Arnaud Charlet <charlet@adacore.com>
1872
1873 * exp_ch4.adb (Expand_Short_Circuit_Operator): Strip
1874 N_Variable_Reference_Marker when checking for the presence of
1875 actions.
1876
39ecad34 18772019-07-04 Arnaud Charlet <charlet@adacore.com>
1878
1879 * exp_aggr.adb (Check_Component): Take into account type
1880 conversions.
1881
c0e899f1 18822019-07-04 Dmitriy Anisimkov <anisimko@adacore.com>
1883
1884 * doc/gnat_ugn/platform_specific_information.rst: Document
1885 Windows socket timeout particularity.
1886 * gnat_ugn.texi: Regenerate.
1887 * gsocket.h: Include versionhelpers.h.
1888 * socket.c (__gnat_minus_500ms): New function.
1889 * libgnat/g-sothco.ads (Minus_500ms_Windows_Timeout): New
1890 imported function.
1891 * libgnat/g-socket.adb (Set_Socket_Option): Refactor to remove
1892 500ms from the requested timeout only on old Windows version.
1893
363b1a8e 18942019-07-04 Thomas Quinot <quinot@adacore.com>
1895
1896 * get_scos.adb: Remove bogus, dead code.
1897
4ae0a9ce 18982019-07-04 Ed Schonberg <schonberg@adacore.com>
1899
1900 * sem_dim.adb (Analyze_Dimension_Array_Aggregate): If the
1901 component is an entity name, its dimensions are those of its
1902 type.
1903
d60fa3c9 19042019-07-03 Bob Duff <duff@adacore.com>
1905
1906 * doc/gnat_ugn/gnat_utility_programs.rst: Document new flags in
1907 GNATpp.
1908
877ad320 19092019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
1910
1911 * binde.adb: Remove with clause for System.OS_Lib.
1912 (Force_Elab_Order): Refactor the majority of the code in Butil.
1913 Use the new forced units iterator to obtain unit names.
1914 * bindo-builders.adb: Add with and use clauses for Binderr,
1915 Butil, Opt, Output, Types, GNAT, and GNAT.Dynamic_HTables. Add
1916 a hash table which maps units to line number in the forced
1917 elaboration order file.
1918 (Add_Unit): New routine.
1919 (Build_Library_Graph): Create forced edges between pairs of
1920 units listed in the forced elaboration order file.
1921 (Create_Forced_Edge, Create_Forced_Edges, Destroy_Line_Number,
1922 Duplicate_Unit_Error, Hash_Unit, Internal_Unit_Info,
1923 Is_Duplicate_Unit, Missing_Unit_Info): New routines.
1924 * bindo-graphs.adb (Is_Internal_Unit, Is_Predefined_Unit):
1925 Refactor some of the behavior to Bindo-Units.
1926 * bindo-graphs.ads: Enable the enumeration literal for forced
1927 edges.
1928 * bindo-units.adb, bindo-units.ads (Is_Internal_Unit,
1929 Is_Predefined_Unit): New routines.
1930 * butil.adb: Add with and use clauses for Opt, GNAT, and
1931 System.OS_Lib. Add with clause for Unchecked_Deallocation.
1932 (Has_Next, Iterate_Forced_Units, Next, Parse_Next_Unit_Name,
1933 Read_Forced_Elab_Order_File): New routines.
1934 * butil.ads: Add with and use clauses for Types. Add new
1935 iterator over the units listed in the forced elaboration order
1936 file.
1937 (Has_Next, Iterate_Forced_Units, Next): New routine.
1938 * namet.adb, namet.ads (Present): New routine.
1939
01e6eb2f 19402019-07-03 Bob Duff <duff@adacore.com>
1941
1942 * sem_ch3.adb (Access_Definition): The code was creating a
1943 master in the case where the designated type is a class-wide
1944 interface type. Create a master in the noninterface case as
1945 well. That is, create a master for all limited class-wide types.
1946
9ad42832 19472019-07-03 Yannick Moy <moy@adacore.com>
1948
1949 * erroutc.adb (Sloc_In_Range): New function to determine whether
1950 the range of a pragma Warnings covers a location, taking
1951 instantiations into account.
1952
f2a8d64e 19532019-07-03 Johannes Kanig <kanig@adacore.com>
1954
1955 * osint.ads, osint.adb (Get_First_Main_File_Name): New routine
1956 to access the first file provided on the command line.
1957
d4f28933 19582019-07-03 Ed Schonberg <schonberg@adacore.com>
1959
1960 * inline.adb (Process_Formals_In_Aspects): New procedure within
1961 Expand_Inlined_Call, to perform a replacement of references to
1962 formals that appear in aspect specifications within the body
1963 being inlined.
1964
23e7fc9b 19652019-07-03 Justin Squirek <squirek@adacore.com>
1966
1967 * sem_ch8.adb (Analyze_Object_Renaming): Add call to search for
1968 the appropriate actual subtype of the object renaming being
1969 analyzed.
1970 (Check_Constrained_Object): Minor cleanup.
1971
f8e6d133 19722019-07-03 Yannick Moy <moy@adacore.com>
1973
1974 * sem_spark.adb (Get_Observed_Or_Borrowed_Expr): New function to
1975 return go through traversal function call.
1976 (Check_Type): Consistently use underlying type.
1977 (Get_Perm): Adapt for case of elaboration code where variables
1978 are not declared in the environment. Remove incorrect handling
1979 of borrow and observe.
1980
d044ba5c 19812019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
1982
1983 * inline.adb (Build_Return_Object_Formal): New routine.
1984 (Can_Split_Unconstrained_Function): Code clean up.
1985 (Copy_Formals,Copy_Return_Object): New routines.
1986 (Split_Unconstrained_Function): Code clean up and refactoring.
1987
8699de72 19882019-07-03 Gary Dismukes <dismukes@adacore.com>
1989
1990 * bindo-augmentors.adb, bindo-augmentors.ads,
1991 bindo-builders.ads, bindo-elaborators.adb, sem_ch12.adb,
1992 sem_ch13.adb, sem_spark.adb, sinfo.ads: Minor editorial
1993 corrections and reformatting.
1994
2ccf6539 19952019-07-03 Bob Duff <duff@adacore.com>
1996
1997 * sem_warn.adb (Check_Infinite_Loop_Warning): Avoid the warning
1998 if an Iterator_Specification is present.
1999
17b5260d 20002019-07-03 Bob Duff <duff@adacore.com>
2001
2002 * doc/gnat_ugn/gnat_utility_programs.rst: Document default
2003 new-line behavior.
2004
5f71d12c 20052019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
2006
2007 * ali.adb: Add with and use clauses for GNAT,
2008 GNAT.Dynamic_HTables, and Snames. Add a map from invocation
2009 signature records to invocation signature ids. Add various
2010 encodings of invocation-related attributes. Sort and update
2011 table Known_ALI_Lines.
2012 (Add_Invocation_Construct, Add_Invocation_Relation,
2013 Body_Placement_Kind_To_Code, Code_To_Body_Placement_Kind,
2014 Code_To_Invocation_Construct_Kind, Code_To_Invocation_Kind,
2015 Code_To_Invocation_Graph_Line_Kind, Destroy, Hash): New
2016 routines.
2017 (Initialize_ALI): Sort the initialization sequence. Add
2018 initialization for all invocation-related tables.
2019 (Invocation_Construct_Kind_To_Code,
2020 Invocation_Graph_Line_Kind_To_Code, Invocation_Kind_To_Code,
2021 Invocation_Signature_Of, Present): New routines.
2022 (Scan_ALI): Add the default values for invocation-related ids.
2023 Scan invocation graph lines.
2024 (Scan_Invocation_Graph_Line): New routine.
2025 * ali.ads: Add with clause for GNAT.Dynamic_Tables. Add types
2026 for invocation constructs, relations, and signatures. Add
2027 tables for invocation constructs, relations, and signatures.
2028 Update Unit_Record to capture invocation-related ids. Relocate
2029 table Unit_Id_Tables and subtypes Unit_Id_Table, Unit_Id_Array
2030 from Binde.
2031 (Add_Invocation_Construct, Add_Invocation_Relation,
2032 Body_Placement_Kind_To_Code, Code_To_Body_Placement_Kind,
2033 Code_To_Invocation_Construct_Kind, Code_To_Invocation_Kind,
2034 Code_To_Invocation_Graph_Line_Kind,
2035 Invocation_Construct_Kind_To_Code,
2036 Invocation_Graph_Line_Kind_To_Code, Invocation_Kind_To_Code,
2037 Invocation_Signature_Of, Present): New routines.
2038 * binde.adb: Add with and use clause for Types. Add use clause
2039 for ALI.Unit_Id_Tables;
2040 * binde.ads: Relocate table Unit_Id_Tables and subtypes
2041 Unit_Id_Table, Unit_Id_Array to ALI.
2042 * bindgen.adb: Remove with and use clause for ALI.
2043 * bindgen.ads: Remove with and use clause for Binde. Add with
2044 and use clause for ALI.
2045 * bindo.adb, bindo.ads, bindo-augmentors.adb,
2046 bindo-augmentors.ads, bindo-builders.adb, bindo-builders.ads,
2047 bindo-diagnostics.adb, bindo-diagnostics.ads,
2048 bindo-elaborators.adb, bindo-elaborators.ads, bindo-graphs.adb,
2049 bindo-graphs.ads, bindo-units.adb, bindo-units.ads,
2050 bindo-validators.adb, bindo-validators.ads, bindo-writers.adb,
2051 bindo-writers.ads: New units.
2052 * debug.adb: Use and describe GNAT debug switches -gnatd_F and
2053 -gnatd_G. Add GNATbind debug switches in the ranges dA .. dZ,
2054 d.a .. d.z, d.A .. d.Z, d.1 .. d.9, d_a .. d_z, d_A .. d_Z, and
2055 d_1 .. d_9. Use and describe GNATbind debug switches -d_A,
2056 -d_I, -d_L, -d_N, -d_O, -d_T, and -d_V.
2057 * exp_util.adb, exp_util.ads (Exceptions_OK): Relocate to
2058 Sem_Util.
2059 * gnatbind.adb: Add with and use clause for Bindo. Use the new
2060 Bindo elaboration order only when -d_N is in effect.
2061 * lib-writ.adb
2062 (Column, Extra, Invoker, Kind, Line, Locations, Name, Placement,
2063 Scope, Signature, Target): New routines.
2064 (Write_ALI): Output all invocation-related data.
2065 (Write_Invocation_Graph): New routine.
2066 * lib-writ.ads: Document the invocation graph ALI line.
2067 * namet.adb, namet.ads (Present): New routines.
2068 * sem_ch8.adb (Find_Direct_Name): Capture the status of
2069 elaboration checks and warnings of an identifier.
2070 (Find_Expanded_Name): Capture the status of elaboration checks
2071 and warnings of an expanded name.
2072 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Ensure
2073 that invocation graph-related data within the body of the main
2074 unit is encoded in the ALI file.
2075 (Analyze_Generic_Subprogram_Declaration): Ensure that invocation
2076 graph-related data within the body of the main unit is encoded
2077 in the ALI file.
2078 (Analyze_Package_Instantiation): Perform minimal decoration of
2079 the instance entity.
2080 (Analyze_Subprogram_Instantiation): Perform minimal decoration
2081 of the instance entity.
2082 * sem_elab.adb: Perform heavy refactoring of all code. The unit
2083 is now split into "services" which specialize in one area of ABE
2084 checks. Add processing in order to capture invocation-graph
2085 related attributes of the main unit, and encode them in the ALI
2086 file. The Processing phase can now operate in multiple modes,
2087 all described by type Processing_Kind. Scenarios and targets
2088 are now distinct at the higher level, and carry their own
2089 representations. This eliminates the need to constantly
2090 recompute their attributes, and offers the various processors a
2091 uniform interface. The various initial states of the Processing
2092 phase are now encoded using type Processing_In_State, and
2093 xxx_State constants.
2094 * sem_elab.ads: Update the literals of type
2095 Enclosing_Level_Kind. Add Inline pragmas on several routines.
2096 * sem_prag.adb (Process_Inline): Ensure that invocation
2097 graph-related data within the body of the main unit is encoded
2098 in the ALI file.
2099 * sem_util.adb (Enclosing_Generic_Body, Enclosing_Generic_Unit):
2100 Code clean up.
2101 (Exceptions_OK): Relocated from Sem_Util.
2102 (Mark_Save_Invocation_Graph_Of_Body): New routine.
2103 * sem_util.ads (Exceptions_OK): Relocated from Sem_Util.
2104 (Mark_Save_Invocation_Graph_Of_Body): New routine.
2105 * sinfo.adb (Is_Elaboration_Checks_OK_Node): Now applicable to
2106 N_Variable_Reference_Marker.
2107 (Is_Elaboration_Warnings_OK_Node): Now applicable to
2108 N_Expanded_Name, N_Identifier, N_Variable_Reference_Marker.
2109 (Is_Read): Use Flag4.
2110 (Is_SPARK_Mode_On_Node): New applicable to
2111 N_Variable_Reference_Marker.
2112 (Is_Write): Use Flag5.
2113 (Save_Invocation_Graph_Of_Body): New routine.
2114 (Set_Is_Elaboration_Checks_OK_Node): Now applicable to
2115 N_Variable_Reference_Marker.
2116 (Set_Is_Elaboration_Warnings_OK_Node): Now applicable to
2117 N_Expanded_Name, N_Identifier, N_Variable_Reference_Marker.
2118 (Set_Is_SPARK_Mode_On_Node): New applicable to
2119 N_Variable_Reference_Marker.
2120 (Set_Save_Invocation_Graph_Of_Body): New routine.
2121 * sinfo.ads: Update the documentation of attributes
2122 Is_Elaboration_Checks_OK_Node, Is_Elaboration_Warnings_OK_Node,
2123 Is_SPARK_Mode_On_Node. Update the flag usage of attributes
2124 Is_Read, Is_Write. Add attribute Save_Invocation_Graph_Of_Body
2125 and update its occurrence in nodes.
2126 (Save_Invocation_Graph_Of_Body): New routine along with pragma
2127 Inline.
2128 (Set_Save_Invocation_Graph_Of_Body): New routine along with
2129 pragma Inline.
2130 * switch-b.adb (Scan_Binder_Switches): Refactor the scanning of
2131 debug switches.
2132 (Scan_Debug_Switches): New routine.
2133 * libgnat/g-dynhta.adb, libgnat/g-dynhta.ads (Contains): New routine.
2134 * libgnat/g-graphs.adb (Associate_Vertices): Update the use of
2135 Component_Vertex_Iterator.
2136 (Contains_Component, Contains_Edge, Contains_Vertex, Has_Next):
2137 Reimplemented.
2138 (Iterate_Component_Vertices): New routine.
2139 (Iterate_Vertices): Removed.
2140 (Next): Update the parameter profile.
2141 (Number_Of_Component_Vertices, Number_Of_Outgoing_Edges): New
2142 routines.
2143 * libgnat/g-graphs.ads: Update the initialization of
2144 No_Component. Add type Component_Vertex_Iterator. Remove type
2145 Vertex_Iterator.
2146 (Has_Next): Add new versions and remove old ones.
2147 (Iterate_Component_Vertices): New routine.
2148 (Iterate_Vertices): Removed.
2149 (Next): Add new versions and remove old ones.
2150 (Number_Of_Component_Vertices, Number_Of_Outgoing_Edges): New
2151 routines.
2152 * libgnat/g-sets.adb (Contains): Reimplemented.
2153 * gcc-interface/Make-lang.in (GNATBIND_OBJS): Add
2154 GNAT.Dynamic_HTables, GNAT.Graphs and Bindo units.
2155 * rtsfind.ads: Remove extra space.
2156
df177848 21572019-07-03 Yannick Moy <moy@adacore.com>
2158
2159 * sem_spark.adb: Add support for locally borrowing and observing
2160 a path.
2161 (Get_Root_Object): Add parameter Through_Traversal to denote
2162 when we are interesting in getting to the traversed parameter.
2163 (Is_Prefix_Or_Almost): New function to support detection of
2164 illegal access to borrowed or observed paths.
2165 (Check_Pragma): Add analysis of assertion pragmas.
2166
f3f142ac 21672019-07-03 Ed Schonberg <schonberg@adacore.com>
2168
2169 * sem_ch13.adb (Build_Predicate_Functions): In a generic context
2170 we do not build the bodies of predicate fuctions, but the
2171 expression in a static predicate must be elaborated to allow
2172 case coverage checking within the generic unit.
2173 (Build_Discrete_Static_Predicate): In a generic context, return
2174 without building function body once the
2175 Static_Discrete_Predicate expression for the type has been
2176 constructed.
2177
99d90c85 21782019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
2179
2180 * bindgen.adb, inline.adb, layout.adb, sem_ch12.adb,
2181 sem_ch13.adb, sem_ch7.adb, styleg.adb: Minor reformatting.
2182
800597f6 21832019-07-03 Bob Duff <duff@adacore.com>
2184
2185 * par-ch3.adb (P_Defining_Identifier): Call
2186 Check_Defining_Identifier_Casing.
2187 * style.ads, styleg.ads, styleg.adb
2188 (Check_Defining_Identifier_Casing): New procedure to check for
2189 mixed-case defining identifiers.
2190 * stylesw.ads, stylesw.adb (Style_Check_Mixed_Case_Decls): New
2191 flag for checking for mixed-case defining identifiers.
2192 * doc/gnat_ugn/building_executable_programs_with_gnat.rst:
2193 Document new feature.
2194 * gnat_ugn.texi: Regenerate.
2195
2c75027a 21962019-07-03 Eric Botcazou <ebotcazou@adacore.com>
2197
2198 * doc/gnat_ugn/building_executable_programs_with_gnat.rst
2199 (Warning message control): Document that -gnatw.z/Z apply to
2200 array types.
2201 * freeze.adb (Freeze_Entity): Give -gnatw.z warning for array
2202 types as well, but not if the specified alignment is the minimum
2203 one.
2204 * gnat_ugn.texi: Regenerate.
2205
08237d0d 22062019-07-03 Bob Duff <duff@adacore.com>
2207
2208 * einfo.ads, exp_util.adb, layout.ads, sinfo.ads: Spell "laid"
2209 correctly.
2210
0396441f 22112019-07-03 Ed Schonberg <schonberg@adacore.com>
2212
2213 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): No error
2214 message on attribute applied to a renaming when the renamed
2215 object is an aggregate (from code reading).
2216 (Check_Aspect_At_End_Of_Declarations): In a generic context
2217 where freeze nodes are not generated, the original expression
2218 for an aspect may need to be analyzed to precent spurious
2219 conformance errors when compared with the expression that is
2220 anakyzed at the end of the current declarative list.
2221
c8406f30 22222019-07-03 Eric Botcazou <ebotcazou@adacore.com>
2223
2224 * layout.adb (Layout_Type): Do not set the component size of an
2225 array with a scalar component if the component type is
2226 overaligned.
2227
c38b32ea 22282019-07-03 Ed Schonberg <schonberg@adacore.com>
2229
2230 * inline.adb (Make_Loop_Labels_Unique): New procedure to modify
2231 the source code of subprograms that are inlined by the
2232 front-end, to prevent accidental duplication between loop labels
2233 in the inlined code and the code surrounding the inlined call.
2234
6d6f134e 22352019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
2236
2237 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update
2238 the section on resolving elaboration circularities to eliminate
2239 certain combinations of switches which together do not produce
2240 the desired effect and confuse users.
2241 * gnat_ugn.texi: Regenerate.
2242
f3e16ef4 22432019-07-03 Arnaud Charlet <charlet@adacore.com>
2244
2245 * bindgen.adb (Gen_Main): Disable generation of reference to
2246 Ada_Main_Program_Name for CCG.
2247 * bindusg.adb (Display): Add -G to the command-line usage for
2248 gnatbind.
2249 * opt.ads (Generate_C_Code): Update comment.
2250 * switch-b.adb (Scan_Binder_Switches): Add handling for -G.
2251
f4a31b16 22522019-07-03 Arnaud Charlet <charlet@adacore.com>
2253
2254 * sem_ch7.adb (Has_Referencer): Do not consider inlined
2255 subprograms when generating C code, which allows us to generate
2256 static inline subprograms.
2257
2f65e9f7 22582019-07-03 Justin Squirek <squirek@adacore.com>
2259
2260 * sem_ch6.adb (Check_Conformance): Add expression checking for
2261 constant modifiers in anonymous access types (in addition to
2262 "non-null" types) so that they are considered "matching" for
2263 subsequent conformance tests.
2264
c336ed70 22652019-07-03 Arnaud Charlet <charlet@adacore.com>
2266
2267 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
2268 Clarify wording on No_Multiple_Elaboration.
2269 * gnat_rm.texi: Regenerate.
2270
78611c86 22712019-07-03 Ed Schonberg <schonberg@adacore.com>
2272
2273 * sem_ch8.adb (Find_Selected_Component): If the prefix is the
2274 current instance of a type or subtype, complete the resolution
2275 of the name by finding the component of the type denoted by the
2276 selector name.
2277
5a87a4d9 22782019-07-03 Eric Botcazou <ebotcazou@adacore.com>
2279
2280 * doc/gnat_rm/interfacing_to_other_languages.rst (Interfacing to C):
2281 Document that boolean types with convention C now map to C99 bool.
2282 * gnat_rm.texi: Regenerate.
2283
371c539c 22842019-07-03 Javier Miranda <miranda@adacore.com>
2285
2286 * exp_attr.adb (Expand_Min_Max_Attribute): Code cleanup:
2287 removing code that it is now never executed in the CCG compiler
2288 (dead code).
2289
89d2d652 22902019-07-02 Iain Sandoe <iain@sandoe.co.uk>
2291
2292 * libgnat/system-darwin-ppc.ads: Set Stack_Check_Probes True for
2293 PPC Darwin.
2294
d21e66fb 22952019-07-01 Ed Schonberg <schonberg@adacore.com>
2296
2297 * sem_ch12.adb (Is_Defaulted): New predicate in
2298 Check_Formal_Package_Intance, to skip the conformance of checks
2299 on parameters of a formal package that are defaulted,
2300
7a42b778 23012019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
2302
2303 * checks.adb, exp_ch9.adb, exp_unst.adb, sem_ch4.adb,
2304 sem_prag.adb, sem_spark.adb: Minor reformatting.
2305
fc8ae496 23062019-07-01 Ed Schonberg <schonberg@adacore.com>
2307
2308 * sem_attr.adb (Analyze_Attribute, case Enum_Rep): Allow prefix
2309 of attribute to be an attribute reference of a discrete type.
2310
9d27ea41 23112019-07-01 Eric Botcazou <ebotcazou@adacore.com>
2312
2313 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Move up
2314 handling of Has_Pragma_Inline_Always and deal with
2315 Has_Pragma_No_Inline.
2316
bcb8dcf3 23172019-07-01 Ed Schonberg <schonberg@adacore.com>
2318
2319 * sem_ch3.adb (Build_Derived_Record_Type): If the parent type is
2320 declared as a subtype of a private type with an inherited
2321 discriminant constraint, its generated full base appears as a
2322 record subtype, so we need to retrieve its oen base type so that
2323 the inherited constraint can be applied to it.
2324
d087b9ca 23252019-07-01 Yannick Moy <moy@adacore.com>
2326
2327 * sem_spark.adb: Completely rework the algorithm for ownership
2328 checking, as the rules in SPARK RM have changed a lot.
2329 * sem_spark.ads: Update comments.
2330
fe48ee0a 23312019-07-01 Dmitriy Anisimkov <anisimko@adacore.com>
2332
2333 * gsocket.h (Has_Sockaddr_Len): Use the offset of sin_family offset in
2334 the sockaddr_in structure to determine the existence of length field
2335 before the sin_family.
2336
b20f7e2c 23372019-07-01 Ed Schonberg <schonberg@adacore.com>
2338
2339 * sem_prag.adb (Analyze_Pragma, case Weak_External): Pragma only
2340 applies to entities with run-time addresses, not to types.
2341
374fdf94 23422019-07-01 Piotr Trojanek <trojanek@adacore.com>
2343
2344 * einfo.adb, sem_ch7.adb, sem_prag.adb, sem_util.adb: Update
2345 references to the SPARK RM after the removal of Rule 7.1.4(5).
2346
bf13a79d 23472019-07-01 Piotr Trojanek <trojanek@adacore.com>
2348
2349 * sysdep.c: Cleanup references to LynuxWorks in docs and
2350 comments.
2351
866fa2d0 23522019-07-01 Ed Schonberg <schonberg@adacore.com>
2353
2354 * checks.adb (Insert_Valid_Check): Do not apply validity check
2355 to variable declared within a protected object that uses the
2356 Lock_Free implementation, to prevent unwarranted constant
2357 folding, because entities within such an object msut be treated
2358 as volatile.
2359
bcb5ab83 23602019-07-01 Eric Botcazou <ebotcazou@adacore.com>
2361
2362 * exp_ch9.adb (Check_Inlining): Deal with Has_Pragma_No_Inline.
2363
2db33bd6 23642019-07-01 Ed Schonberg <schonberg@adacore.com>
2365
2366 * exp_unst.adb (Visit_Node, Check_Static_Type): Improve the
2367 handling of private and incomplete types whose full view is an
2368 access type, to detect additional uplevel references in dynamic
2369 bounds. This is relevant to N_Free_Statement among others that
2370 manipulate types whose full viww may be an access type.
2371
6b4f0b7d 23722019-07-01 Pat Rogers <rogers@adacore.com>
2373
2374 * doc/gnat_rm/representation_clauses_and_pragmas.rst: Correct
2375 size indicated for R as a component of an array.
2376 * gnat_rm.texi: Regenerate.
2377
cdee70d7 23782019-07-01 Justin Squirek <squirek@adacore.com>
2379
2380 * libgnat/s-win32.ads: Add definition for ULONG, modify
2381 OVERLAPPED type, and add appropriate pragmas.
2382
2cf822b7 23832019-07-01 Bob Duff <duff@adacore.com>
2384
2385 * gnat1drv.adb (gnat1drv): Call Write_ALI if the main unit is
2386 ignored-ghost.
2387
0a1ece97 23882019-07-01 Yannick Moy <moy@adacore.com>
2389
2390 * sem_ch4.adb (Operator_Check): Refine error message.
2391
ee4279ef 23922019-07-01 Piotr Trojanek <trojanek@adacore.com>
2393
2394 * libgnat/a-calend.ads: Revert "Global => null" contracts on
2395 non-pure routines.
2396
2c6b4ada 23972019-07-01 Piotr Trojanek <trojanek@adacore.com>
2398
2399 * exp_attr.adb, libgnat/g-graphs.ads: Fix typos in comments:
2400 componant -> component.
2401
175c4526 24022019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
2403
2404 * libgnat/g-graphs.adb: Use type Directed_Graph rather than
2405 Instance in various routines.
2406 * libgnat/g-graphs.ads: Change type Instance to Directed_Graph.
2407 Update various routines that mention the type.
2408
a0d15509 24092019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
2410
2411 * libgnat/g-sets.adb: Use type Membership_Set rathern than
2412 Instance in various routines.
2413 * libgnat/g-sets.ads: Change type Instance to Membership_Set.
2414 Update various routines that mention the type.
2415
205a23a3 24162019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
2417
2418 * libgnat/g-lists.adb: Use type Doubly_Linked_List rather than
2419 Instance in various routines.
2420 * libgnat/g-lists.ads: Change type Instance to
2421 Doubly_Linked_List. Update various routines that mention the
2422 type.
2423
17fdf8c2 24242019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
2425
2426 * libgnat/g-dynhta.adb: Use type Dynamic_Hash_Table rather than
2427 Instance in various routines.
2428 * libgnat/g-dynhta.ads: Change type Instance to
2429 Dynamic_Hash_Table. Update various routines that mention the
2430 type.
2431
216ffc64 24322019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
2433
2434 * exp_attr.adb, exp_ch7.adb, exp_unst.adb, sem_ch3.adb,
2435 sem_util.adb, uintp.adb, uintp.ads: Minor reformatting.
2436
5051fe35 24372019-07-01 Javier Miranda <miranda@adacore.com>
2438
2439 * exp_attr.adb (Expand_Min_Max_Attribute): Disable expansion of
2440 'Min/'Max on integer, enumeration, fixed point and floating
2441 point types since the CCG backend now provides in file
2442 standard.h routines to support it.
2443
830a2a71 24442019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
2445
2446 * impunit.adb: Add GNAT.Graphs to list Non_Imp_File_Names_95.
2447 * Makefile.rtl, gcc-interface/Make-lang.in: Register unit
2448 GNAT.Graphs.
2449 * libgnat/g-dynhta.adb: Various minor cleanups (use Present
2450 rather than direct comparisons).
2451 (Delete): Reimplement to use Delete_Node.
2452 (Delete_Node): New routine.
2453 (Destroy_Bucket): Invoke the provided destructor.
2454 (Present): New routines.
2455 * libgnat/g-dynhta.ads: Add new generic formal Destroy_Value.
2456 Use better names for the components of iterators.
2457 * libgnat/g-graphs.adb, libgnat/g-graphs.ads: New unit.
2458 * libgnat/g-lists.adb: Various minor cleanups (use Present
2459 rather than direct comparisons).
2460 (Delete_Node): Invoke the provided destructor.
2461 (Present): New routine.
2462 * libgnat/g-lists.ads: Add new generic formal Destroy_Element.
2463 Use better names for the components of iterators.
2464 (Present): New routine.
2465 * libgnat/g-sets.adb, libgnat/g-sets.ads (Destroy, Preset,
2466 Reset): New routines.
2467
b0111d94 24682019-07-01 Dmitriy Anisimkov <anisimko@adacore.com>
2469
2470 * libgnat/g-sothco.adb (Get_Address): Fix the case when AF_INET6
2471 is not defined.
2472
7362896b 24732019-07-01 Ed Schonberg <schonberg@adacore.com>
2474
2475 * exp_attr.adb (Expand_Attribute_Reference, case Invalid_Value):
2476 Resolve result of call to Get_Simple_Init_Val, which may be a
2477 conversion of a literal.
2478
0dae8dc2 24792019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
2480
2481 * freeze.adb (Freeze_Expression): Remove the horrible useless
2482 name hiding of N. Insert the freeze nodes generated by the
2483 expression prior to the expression when the nearest enclosing
2484 scope is transient.
2485
487da8ff 24862019-07-01 Pierre-Marie de Rodat <derodat@adacore.com>
2487
2488 * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Fix
2489 formatting issues in the -gnatR section.
2490 * gnat_ugn.texi: Regenerate.
2491
1d79fa18 24922019-06-30 Iain Sandoe <iain@sandoe.co.uk>
2493
2494 * gnatlink.adb (Link_Step): Remove duplicate -static-libgcc switches.
2495 Push -shared-libgcc explicitly, when it is the target default (unless
2496 overidden by the static flag).
2497 When the user has put an instance of shared/static-libgcc do not push
2498 a duplicate of this.
2499
a850edcd 25002019-06-29 Eric Botcazou <ebotcazou@adacore.com>
2501
2502 * gcc-interface/decl.c (gnat_to_gnu_entity): Beep up comment on SAVED,
2503 and tweak comment on the assertion about the scopes of Itypes. Do not
2504 skip the regular processing for Itypes that are E_Record_Subtype with
2505 a Cloned_Subtype. Get the Cloned_Subtype for every E_Record_Subtype
2506 if the type is dummy and hasn't got its own freeze node.
2507 <E_Record_Subtype>: Save again the DECL of the Cloned_Subtype, if any.
2508 <E_Access_Subtype>: Save again the DECL of the equivalent type.
2509 (Gigi_Equivalent_Type) <E_Access_Subtype>: New case.
2510
b1e46fb1 25112019-06-29 Eric Botcazou <ebotcazou@adacore.com>
2512
2513 * gcc-interface/utils.c (unchecked_convert): Tweak comment. Only skip
2514 dereferences when padding to have the same size on both sides. Do it
2515 for destination types with self-referential size too.
2516
07e38949 25172019-06-29 Eric Botcazou <ebotcazou@adacore.com>
2518
2519 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: If the
2520 type requires strict alignment, then set the RM size to the type size.
2521 Rework handling of alignment and sizes of tagged types in ASIS mode.
2522 (validate_size): Rename local variable and remove special handling for
2523 strict-alignment types.
2524 * gcc-interface/utils.c (finish_record_type): Constify local variables
2525 and use properly typed constants.
2526
f4409741 25272019-06-29 Eric Botcazou <ebotcazou@adacore.com>
2528
2529 * gcc-interface/decl.c (gnat_to_gnu_field): Rework error messages for
2530 fields requiring strict alignment, add explicit test on Storage_Unit
2531 for position and size, and mention type alignment for position.
2532
5882c515 25332019-06-29 Eric Botcazou <ebotcazou@adacore.com>
2534
2535 * gcc-interface/trans.c (mark_visited_r): Set TYPE_SIZES_GIMPLIFIED on
2536 the main variant of a type, if any.
2537
d0de0a27 25382019-06-29 Eric Botcazou <ebotcazou@adacore.com>
2539
2540 * gcc-interface/decl.c (set_nonaliased_component_on_array_type): Add
2541 missing guard for the presence of TYPE_CANONICAL.
2542 (set_reverse_storage_order_on_array_type): Likewise.
2543
2074c859 25442019-06-29 Eric Botcazou <ebotcazou@adacore.com>
2545
2546 * gcc-interface/gigi.h (make_packable_type): Remove default value.
2547 (value_factor_p): Tweak prototype.
2548 * gcc-interface/decl.c (gnat_to_gnu_entity): Add comment.
2549 (gnat_to_gnu_component_type): Likewise.
2550 (gnat_to_gnu_field): Likewise. Fetch the position of the field earlier
2551 and simplify the condition under which the type is packed. Declare
2552 local variable is_bitfield. Pass 1 as max_align to make_packable_type
2553 if it is set to true.
2554 (copy_and_substitute_in_layout): Pass 0 to make_packable_type.
2555 * gcc-interface/utils.c (make_packable_array_type): New function.
2556 (make_packable_type): Use it to rewrite the type of array field.
2557 (maybe_pad_type): Pass align parameter to make_packable_type.
2558 (create_field_decl): Minor tweaks.
2559 (value_factor_p): Assert that FACTOR is a power of 2 and replace the
2560 modulo computation by a masking operation.
2561
83c6da22 25622019-06-25 Eric Botcazou <ebotcazou@adacore.com>
2563
2564 * gcc-interface/decl.c (gnat_to_gnu_entity): Remove superfluous test
2565 in previous change.
2566 * gcc-interface/gigi.h (maybe_character_type): Fix formatting.
2567 (maybe_character_value): Likewise.
2568
aaabc7bc 25692019-06-24 Jan Hubicka <jh@suse.cz>
2570
2571 * gcc-interface/decl.c (gnat_to_gnu_entity): Check that
2572 type is array or integer prior checking string flag.
83c6da22 2573 * gcc-interface/gigi.h (maybe_character_type): Likewise.
2574 (maybe_character_value): Likewise.
aaabc7bc 2575
5fe09a56 25762019-06-24 Martin Sebor <msebor@redhat.com>
2577
2578 * gcc-interface/utils.c (handle_nonnull_attribute): Quote attribute
2579 name.
2580
bd9331d6 25812019-06-18 Arnaud Charlet <charlet@adacore.com>
2582
83c6da22 2583 PR ada/80590
bd9331d6 2584 * sem_ch5.adb (Analyze_Loop_Statement): Avoid exception propagation
2585 during normal processing.
2586
8a5a7d1c 25872019-06-17 Arnaud Charlet <charlet@adacore.com>
2588
83c6da22 2589 PR ada/80590
8a5a7d1c 2590 * exp_ch9.adb (Expand_N_Delay_Relative_Statement): Swap the two
2591 conditions to avoid a unnecessary exception propagation in the default
2592 case.
2593
580934f6 25942019-05-28 Eric Botcazou <ebotcazou@adacore.com>
2595
2596 * gcc-interface/utils.c (handle_stack_protect_attribute): Move around.
2597
c8956236 25982019-05-28 Eric Botcazou <ebotcazou@adacore.com>
2599
2600 * doc/gnat_rm/implementation_defined_pragmas.rst (Machine_Attribute):
2601 Document additional optional parameters.
2602 * sem_prag.adb (Analyze_Pragma) <Pragma_Machine_Attribute>: Accept
2603 more than one optional parameter.
2604 * gcc-interface/decl.c (prepend_one_attribute_pragma): Alphabetize
2605 the list of supported pragmas. Simplify the handling of parameters
2606 and add support for more than one optional parameter.
2607 * gcc-interface/utils.c (attr_cold_hot_exclusions): New constant.
2608 (gnat_internal_attribute_table): Add entry for no_icf, noipa, flatten,
2609 used, cold, hot, target and target_clones.
2610 (begin_subprog_body): Do not create the RTL for the subprogram here.
2611 (handle_noicf_attribute): New static function.
2612 (handle_noipa_attribute): Likewise.
2613 (handle_flatten_attribute): Likewise.
2614 (handle_used_attribute): Likewise.
2615 (handle_cold_attribute): Likewise.
2616 (handle_hot_attribute): Likewise.
2617 (handle_target_attribute): Likewise.
2618 (handle_target_clones_attribute): Likewise.
2619
62b762c2 26202019-05-28 Eric Botcazou <ebotcazou@adacore.com>
2621
2622 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Return 0
2623 for 'Size too.
2624 (Identifier_to_gnu): Use the actual subtype for a reference to a
2625 packed array in a return statement.
2626 (Attribute_to_gnu) <Attr_Size>: Do not strip VIEW_CONVERT_EXPRs from
2627 the prefix in every case.
2628
336a61a3 26292019-05-28 Eric Botcazou <ebotcazou@adacore.com>
2630
2631 * gcc-interface/trans.c (gnat_to_gnu): Remove superfluous tests on
2632 Backend_Overflow_Checks_On_Target and rework comments.
2633
983c5b5e 26342019-05-28 Eric Botcazou <ebotcazou@adacore.com>
2635
2636 * gcc-interface/trans.c (walk_nesting_tree): New static function.
2637 (finalize_nrv): Use it to walk the entire nesting tree.
2638
96b4b84e 26392019-05-28 Eric Botcazou <ebotcazou@adacore.com>
2640
2641 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Remove
2642 obsolete test on Is_For_Access_Subtype.
2643
0b74284e 26442019-05-28 Eric Botcazou <ebotcazou@adacore.com>
2645
2646 * gcc-interface/decl.c (components_to_record): Set a name on the type
2647 created for the REP part, if any.
2648 * gcc-interface/utils.c (finish_record_type): Only take the maximum
2649 when merging sizes for a variant part at offset 0.
2650 (merge_sizes): Rename has_rep parameter into max.
2651
689dab9d 26522019-05-28 Eric Botcazou <ebotcazou@adacore.com>
2653
2654 * gcc-interface/utils.c (gnat_internal_attribute_table): Add support
2655 for stack_protect attribute.
2656 (handle_stack_protect_attribute): New static function.
2657
804f7d39 26582019-05-28 Eric Botcazou <ebotcazou@adacore.com>
2659
2660 * gcc-interface/decl.c (intrin_arglists_compatible_p): Do not return
2661 false if the internal builtin uses a variable list.
2662
f07f94cc 26632019-05-27 Eric Botcazou <ebotcazou@adacore.com>
2664
2665 * gcc-interface/trans.c (Call_to_gnu): Do not initialize the temporary
2666 created out of addressability concerns if it's for the _Init parameter
2667 of an initialization procedure.
2668
abfd658b 26692019-05-27 Eric Botcazou <ebotcazou@adacore.com>
2670
2671 * gcc-interface/ada-builtin-types.def: New file.
2672 * gcc-interface/ada-builtins.def: Likewise.
2673 * gcc-interface/ada-tree.h (BUILT_IN_LIKELY): New macro.
2674 (BUILT_IN_UNLIKELY): Likewise.
2675 * gcc-interface/trans.c (independent_iterations_p): Initialize the
2676 auto-vector to 16 elements.
2677 (Call_to_gnu): Remove local variable and change the vector of actual
2678 parameters to an auto-vector. Do not convert actual parameters to
2679 the argument type for front-end built-in functions. Add support for
2680 front-end built-in functions.
2681 (build_noreturn_cond): Use internal instead of built-in function.
2682 * gcc-interface/utils.c (c_builtin_type): Include ada-builtin-types.def
2683 (install_builtin_function_types): Likewise.
2684 (install_builtin_functions): Include ada-builtins.def first.
2685
caab73a2 26862019-05-27 Eric Botcazou <ebotcazou@adacore.com>
2687
2688 * gcc-interface/utils.c (maybe_pad_type): Issue the warning for the
2689 specific case of component types preferably.
2690
f1ca2388 26912019-05-27 Eric Botcazou <ebotcazou@adacore.com>
2692
2693 * gcc-interface/trans.c (Identifier_to_gnu): Minor tweaks.
2694 (gnat_to_gnu): Do not convert the result if it is a reference to an
2695 unconstrained array used as the prefix of an attribute reference that
2696 requires an lvalue.
2697
e3f3573c 26982019-05-27 Eric Botcazou <ebotcazou@adacore.com>
2699
2700 * gcc-interface/trans.c (Gigi_Types_Compatible): New predicate.
2701 (Identifier_to_gnu): Use it to assert that the type of the identifier
2702 and that of its entity are compatible for gigi. Rename a couple of
2703 local variables and separate the processing of the result type.
2704
2306cd17 27052019-05-27 Eric Botcazou <ebotcazou@adacore.com>
2706
2707 * gcc-interface/trans.c (Call_to_gnu): Use the unpadded type when
2708 putting back an intermediate conversion the type of the actuals.
2709
6e4e9378 27102019-05-27 Eric Botcazou <ebotcazou@adacore.com>
2711
2712 * gcc-interface/trans.c (gnat_to_gnu) <Shift operations>: Convert the
2713 count to the unsigned version of its base type before proceeding.
2714
85b9be9b 27152019-05-16 Martin Sebor <msebor@redhat.com>
2716
3d6be0d5 2717 * gcc-interface/trans.c (check_inlining_for_nested_subprog): Quote
2718 reserved names.
85b9be9b 2719
65d973ca 27202019-05-08 Arnaud Charlet <charlet@adacore.com>
2721
2722 * standard.ads.h: New file.
2723
ff628b99 27242019-05-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2725
2726 * gcc-interface/Makefile.in (install-gcc-specs): Use foreach.
2727 Honor DESTDIR.
2728
ebd761d4 27292019-04-29 Michael K. Darling <darlingm@gmail.com>
2730
2731 * gnatvsn.ads: Bump Library_Version to 10.
2732
5f260823 27332019-04-24 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2734 Bernd Edlinger <bernd.edlinger@hotmail.de>
2735 Jakub Jelinek <jakub@redhat.com>
2736
2737 PR target/89093
2738 * raise-gcc.c (TARGET_ATTRIBUTE): Define.
2739 (continue_unwind, personality_body, PERSONALITY_FUNCTION): Add
2740 TARGET_ATTRIBUTE.
2741
d7ca95c0 27422019-04-07 Eric Botcazou <ebotcazou@adacore.com>
2743
2744 * libgnat/i-cexten.ads (CFloat_128): New type.
2745
26b21081 27462019-03-22 Dmitriy Anisimkov <anisimko@adacore.com>
2747
2748 PR ada/89583
2749 * libgnat/g-socket.adb (Bind_Socket, Connect_Socket,
2750 Send_Socket): Fix the computation of structure lengths passed to
2751 low level routines.
2752 (Is_IPv6_Address): Fix the number of expected colons.
2753
2f6d557f 27542019-03-11 Martin Liska <mliska@suse.cz>
2755
d325ee67 2756 * gcc-interface/misc.c (gnat_post_options): Wrap option name in string
2757 format message and fix GNU coding style.
2f6d557f 2758
c1ad6672 27592019-02-08 Eric Botcazou <ebotcazou@adacore.com>
2760
2761 * gcc-interface/trans.c (gnat_to_gnu) <N_Aggregate>: Minor tweak.
2762 * gcc-interface/utils.c (convert): Do not pad when doing an unchecked
2763 conversion here. Use TREE_CONSTANT throughout the function.
2764 (unchecked_convert): Also pad if the source is a CONSTRUCTOR and the
2765 destination is a more aligned array type or a larger aggregate type,
2766 but not between original and packable versions of a type.
2767
62a6ebbd 27682019-02-08 Eric Botcazou <ebotcazou@adacore.com>
2769
2770 * gcc-interface/utils.c (max_size) <tcc_unary>: Be prepared for an
2771 operand with VOID_TYPE.
2772
da383d19 27732019-02-08 Eric Botcazou <ebotcazou@adacore.com>
2774
2775 * gcc-interface/trans.c (elaborate_all_entities): Do not elaborate the
2776 entities of a package renaming another one.
2777
09c123a0 27782019-02-08 Eric Botcazou <ebotcazou@adacore.com>
2779
2780 * gcc-interface/trans.c (Regular_Loop_to_gnu): Replace tests on
2781 individual flag_unswitch_loops and flag_tree_loop_vectorize switches
2782 with test on global optimize switch.
2783 (Raise_Error_to_gnu): Likewise.
2784
a9dd7273 27852019-02-07 Eric Botcazou <ebotcazou@adacore.com>
2786
2787 * libgnarl/s-linux__sparc.ads (ETIMEDOUT): Set to correct value.
2788
4836c4f1 27892019-02-06 Arnaud Charlet <charlet@adacore.com>
2790
2791 * libgnarl/s-linux__x32.ads: Resync list of signals with s-linux.ads
2792
6b56937c 27932019-01-27 Eric Botcazou <ebotcazou@adacore.com>
2794
2795 * repinfo.adb (List_Component_Layout): Remove superfluous space for
2796 zero-sized field.
2797 * gcc-interface/ada-tree.h (TYPE_IS_EXTRA_SUBTYPE_P): New macro.
2798 * gcc-interface/gigi.h (create_extra_subtype): Declare.
2799 * gcc-interface/decl.c (TYPE_ARRAY_SIZE_LIMIT): Likewise.
2800 (update_n_elem): New function.
2801 (gnat_to_gnu_entity): Use create_extra_subtype to create extra subtypes
2802 instead of doing it manually.
2803 <E_Array_Type>: Use update_n_elem to compute the maximum size. Use the
2804 index type instead of base type for the bounds. Set TYPE_ARRAY_MAX_SIZE
2805 of the array to the maximum size.
2806 <E_Array_Subtype>: Create an extra subtype using the index type of the
2807 base array type for self-referential bounds. Use update_n_elem to
2808 compute the maximum size. Set TYPE_ARRAY_MAX_SIZE of the array to the
2809 maximum size.
2810 (gnat_to_gnu_field): Clear DECL_NONADDRESSABLE_P on discriminants.
2811 * gcc-interface/misc.c (gnat_get_alias_set): Return the alias set of
2812 the base type for an extra subtype.
2813 (gnat_type_max_size): Remove obsolete code.
2814 * gcc-interface/trans.c (Attribute_to_gnu): Minor tweak.
2815 (can_be_lower_p): Deal with pathological types.
2816 * gcc-interface/utils.c (create_extra_subtype): New function.
2817 (create_field_decl): Minor tweak.
2818 (max_size) <tcc_reference>: Compute a better value by using the extra
2819 subtypes on the self-referential bounds.
2820 <tcc_binary>: Rewrite. Deal with "negative value" in unsigned types.
2821 <tcc_expression>: Likewise.
2822 * gcc-interface/utils2.c (compare_arrays): Retrieve the original bounds
2823 of the arrays upfront. Swap only if the second length is not constant.
2824 Use comparisons on the original bounds consistently for the null tests.
2825 (build_binary_op): Use TYPE_IS_EXTRA_SUBTYPE_P macro.
2826 (build_allocator): Minor tweak.
2827
ecb2c722 28282019-01-27 Eric Botcazou <ebotcazou@adacore.com>
2829
2830 * gcc-interface/decl.c (array_type_has_nonaliased_component): Return
2831 the same value for every dimension of a multidimensional array type.
2832
10f25579 28332019-01-26 Eric Botcazou <ebotcazou@adacore.com>
2834
2835 * gcc-interface/trans.c (Regular_Loop_to_gnu): Use the SLOC of the
2836 iteration scheme, if present, throughout the translation.
2837
aced6683 28382019-01-26 Eric Botcazou <ebotcazou@adacore.com>
2839
2840 * gcc-interface/trans.c (gnat_to_gnu) <N_Assignment_Statement>: Use
2841 DECL_SIZE_UNIT instead of TYPE_SIZE_UNIT for the size to be assigned
2842 by a call to memset if the LHS is a DECL.
2843
18b4b30e 28442019-01-26 Eric Botcazou <ebotcazou@adacore.com>
2845
2846 * gcc-interface/trans.c (struct loop_info_d): Remove artificial field.
2847 (Loop_Statement_to_gnu): Do not set it.
2848
6dce35b7 28492019-01-26 Eric Botcazou <ebotcazou@adacore.com>
2850
2851 * gcc-interface/trans.c (Iterate_Acc_Clause_Arg): Fix formatting.
2852 (Acc_gnat_to_gnu): Likewise.
2853 (Acc_Data_to_gnu): Likewise.
2854 (Acc_Var_to_gnu): Likewise.
2855 (Acc_Reduc_to_gnu): Likewise.
2856 (Acc_Size_List_to_gnu): Likewise.
2857 (Pragma_to_gnu) <Pragma_Acc_Loop>: Likewise.
2858 <Pragma_Acc_Data>): Likewise.
2859 (find_loop_for): Remove default value for parameters.
2860 * gcc-interface/trans.c (gnat_to_gnu) <N_Op_And>: Merge into...
2861 <N_Op_Eq>): ...this.
2862
f8cd11ee 28632019-01-26 Eric Botcazou <ebotcazou@adacore.com>
2864
2865 * gcc-interface/decl.c (annotate_value) <INTEGER_CST>: Use test on
2866 the sign bit instead of on the sign of the value.
2867 <PLUS_EXPR>: Turn addition of negative constant into subtraction.
2868 <MULT_EXPR>: Add test for degenerate case.
2869 <BIT_AND_EXPR>: Simplify.
2870
9a3c51d9 28712019-01-18 Sebastian Huber <sebastian.huber@embedded-brains.de>
2872
2873 * s-oscons-tmplt.c (AF_INET6): Do not undefine for RTEMS.
2874
07c11f2b 28752019-01-09 Sandra Loosemore <sandra@codesourcery.com>
2876
2877 PR other/16615
07c11f2b 2878 * exp_ch11.adb: Change "can not" to "cannot".
2879 * sem_ch4.adb: Likewise.
2880
f4d3c071 28812019-01-09 Sandra Loosemore <sandra@codesourcery.com>
2882
2883 PR other/16615
f4d3c071 2884 * exp_ch9.adb: Mechanically replace "can not" with "cannot".
2885 * libgnat/s-regpat.ads: Likewise.
2886 * par-ch4.adb: Likewise.
2887 * set_targ.adb: Likewise.
2888 * types.ads: Likewise.
2889
902071d1 28902019-01-08 Justin Squirek <squirek@adacore.com>
2891
2892 Revert:
902071d1 2893 2018-07-31 Justin Squirek <squirek@adacore.com>
2894
76fb0465 2895 * lib-writ.adb (Write_With_Lines): Modfiy the generation
2896 of dependencies within ali files so that source unit
2897 bodies are properly listed even if said bodies are
2898 missing. Perform legacy behavior in GNATprove mode.
2899 * lib-writ.ads: Modify documentation to reflect current
2900 behavior.
902071d1 2901
2902 and:
902071d1 2903 2018-09-26 Justin Squirek <squirek@adacore.com>
2904
76fb0465 2905 * lib-writ.adb, lib-writ.ads (Write_With_Lines): Add
2906 documentation and an extra conditional check for RCI
2907 units so that generated ali files will list the spec
2908 only instead of a body when a body is not found.
902071d1 2909
65a33d4a 29102019-01-04 Eric Botcazou <ebotcazou@adacore.com>
2911
2912 * gnatvsn.ads: Bump copyright year.
2913
3d8932fd 29142019-01-01 Jakub Jelinek <jakub@redhat.com>
8e8f6434 2915
fbd26352 2916 Update copyright years.
2917
277184bc 2918 * gnat_ugn.texi: Bump @copying's copyright year.
2919 * gnat_rm.texi: Likewise.
7dfbd804 2920\f
3d8932fd 2921Copyright (C) 2019 Free Software Foundation, Inc.
7dfbd804 2922
2923Copying and distribution of this file, with or without modification,
2924are permitted in any medium without royalty provided the copyright
2925notice and this notice are preserved.