]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/ada/ChangeLog
[Ada] Use renamings in GNATprove mode for side-effects extraction
[thirdparty/gcc.git] / gcc / ada / ChangeLog
CommitLineData
97f6f798 12019-07-10 Yannick Moy <moy@adacore.com>
2
3 * exp_util.adb (Remove_Side_Effects): Prefer renamings for
4 objects of possible owning type in GNATprove mode.
5
89c67bd9 62019-07-09 Ed Schonberg <schonberg@adacore.com>
7
8 * sem_ch3.adb (Analyze_Object_Declaration): If the object type
9 is a composite type that has a dynamic predicate and, the
10 expression in the declaration is an aggregate, the generated
11 predicate check must appear after the expanded code for the
12 aggregate, which will appear after the rewritten object
13 declarastion.
14
fb739c45 152019-07-09 Justin Squirek <squirek@adacore.com>
16
17 * sem_eval.adb (Expr_Value_E): Add conditional to correctly
18 handle constant enumerated character types.
19
54b39f26 202019-07-09 Eric Botcazou <ebotcazou@adacore.com>
21
22 * libgnarl/s-osinte__mingw.ads (CRITICAL_SECTION): Use proper
23 type for SpinCount component.
24
9b57fc30 252019-07-09 Justin Squirek <squirek@adacore.com>
26
27 * exp_ch4.adb (Expand_N_Allocator): Add conditional to detect
28 the presence of anoymous access type allocators and issue a
29 warning if the appropriate warning flag is enabled.
30 * warnsw.ads: Add new warning flag for anonymous allocators
31 * warnsw.adb (All_Warnings, Restore_Warnings, Save_Warnings,
32 Set_Underscore_Warning_Switch): Register new flags.
33 (WA_Warnings): Register new flag as an "all warnings" switch
34 * usage.adb,
35 doc/gnat_ugn/building_executable_programs_with_gnat.rst:
36 Document new warning switches -gnatw_a and -gnatw_A.
37 * gnat_ugn.texi: Regenerate.
38
2463fa93 392019-07-09 Ed Schonberg <schonberg@adacore.com>
40
41 * sem_ch4.adb (Diagnose_Call): Improve error recovery when a
42 local subprogram name hides a possible candidate name declared
43 in a child package in the context of the current unit.
44 * sem_ch6.adb (Process_Formals): Protect against malformed
45 formal types when the parameter type does not denote an entity.
46
7389bee5 472019-07-09 Hristian Kirtchev <kirtchev@adacore.com>
48
49 * bindo-augmentors.adb (Visit_Elaboration_Root): Do not start a
50 DFS from an elaboration root whose corresponding unit lacks
51 elaboration code. This behavior mimics that of the old
52 elaboration order mechanism.
53 * bindo-graphs.adb (Find_All_Cycles_Through_Vertex): Move the
54 vertex tracing within the functional branches of the routine.
55 This prevents spurious trace output.
56 (Has_No_Elaboration_Code): New routine.
57 (Trace_Cycle, Trace_Edge): Update the various Ids to use the
58 "standard" trace format.
59 * bindo-graphs.ads (Has_No_Elaboration_Code): New routine.
60 * bindo-units.ads, bindo-units.adb (Has_No_Elaboration_Code):
61 New routine.
62
06d78d4c 632019-07-09 Piotr Trojanek <trojanek@adacore.com>
64
65 * ali.ads, bindo-graphs.adb, bindo-validators.adb, clean.adb,
66 doc/gnat_ugn/elaboration_order_handling_in_gnat.rst, einfo.ads,
67 exp_aggr.adb, exp_ch13.adb, exp_ch4.adb, exp_ch5.adb,
68 exp_ch6.adb, exp_ch7.adb, exp_ch9.adb, exp_pakd.adb,
69 fname-uf.ads, gnatlink.adb, inline.adb, lib.ads, make.adb,
70 namet.ads, opt.ads, par-ch4.adb, par-ch6.adb, par-labl.adb,
71 prep.adb, sem_aggr.adb, sem_ch13.adb, sem_ch4.adb, sem_ch5.adb,
72 sem_ch6.adb, sem_ch6.ads, sem_ch7.adb, sem_ch8.adb, sem_dim.adb,
73 sem_disp.adb, sem_prag.adb, sem_res.adb, sem_warn.adb,
74 sinfo.ads: Replace ". " with ". ". Minor reformatting and typo
75 corrections.
76 * gnat_ugn.texi: Generate.
77
7ed20965 782019-07-09 Hristian Kirtchev <kirtchev@adacore.com>
79
80 * bindo.ads: Move type Precedence_Kind from the private to the
81 visible part of the unit.
82 * bindo-augmentors.adb: Remove the use of global data as it is
83 bad practice.
84 (Augment_Library_Graph): Update the parameter profile.
85 (Is_Visited, Set_Is_Visited): Remove.
86 (Visit_Elaboration_Root, Visit_Elaboration_Roots): Update the
87 parameter profile and comment on usage.
88 (Visit_Vertex): Likewise. Also keep track of which invocation
89 edge activates a task.
90 * bindo-augmentors.ads (Augment_Library_Graph): Update the
91 parameter profile and comment on usage.
92 * bindo-builders.adb (Create_Forced_Edge,
93 Create_Spec_And_Body_Edge, Create_With_Edge): Update the call to
94 Add_Edge.
95 * bindo-diagnostics.adb: Add with end use clauses for Restrict
96 and Rident.
97 (Output_Dynamic_Model_Suggestions): Remove.
98 (Output_Invocation_Related_Suggestions): New routine.
99 (Output_Suggestions): Output all invocation-related suggestions
100 together.
101 * bindo-elaborators.adb: Remove types Comparator_Ptr and
102 Predicate_Ptr.
103 (Find_Best_Vertex): Update the parameter profile.
104 * bindo-graphs.adb (Activates_Task): New routine.
105 (Add_Body_Before_Spec_Edge): Update the call to
106 Add_Edge_With_Return.
107 (Add_Edge): Update the parameter profile and the call to
108 Add_Edge_With_Return.
109 (Add_Edge_With_Return): Update the parameter profile and comment
110 on usage.
111 (At_Least_One_Edge_Satisfies): New routine.
112 (Contains_Elaborate_All_Edge): Reimplement.
113 (Contains_Static_Successor_Edge, Contains_Task_Activation): New
114 routine.
115 (Contains_Weak_Static_Successor): Remove.
116 (Is_Static_Successor_Edge): New routine.
117 * bindo-graphs.ads: Add types LGE_Predicate_Ptr,
118 LGV_Comparator_Ptr, and LGV_Predicate_Ptr. Update type
119 Library_Graph_Edge_Attributes to capture whether an invocation
120 edge activates a task. Update the value of
121 No_Library_Graph_Edge_Attributes.
122 (Activates_Task): Update the parameter profile and comment on
123 usage.
124 (Contains_Static_Successor_Edge, Contains_Task_Activation): New
125 routines.
126 (Contains_Weak_Static_Successor): Remove.
127 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst:
128 Update the documentation to reflect the new task-related advice.
129 * gnat_ugn.texi: Regenerate.
130
247527b7 1312019-07-09 Piotr Trojanek <trojanek@adacore.com>
132
133 * exp_util.adb (Containing_Package_With_Ext_Axioms): Replace
134 low-level Ekind test with a high-level wrapper.
135
1d7a9954 1362019-07-09 Arnaud Charlet <charlet@adacore.com>
137
138 * libgnat/s-memory.adb: Disable calls to Abort defer/undefer
139 when ZCX_By_Default.
140
7667b40a 1412019-07-09 Javier Miranda <miranda@adacore.com>
142
143 * sem_ch13.adb (Rep_Item_Too_Early): Representation clauses are
144 not allowed for a derivation of a generic type. Extend the
145 current test to check that none of the parents is a generic
146 type.
147
98eb8111 1482019-07-09 Hristian Kirtchev <kirtchev@adacore.com>
149
150 * exp_ch9.adb, exp_util.adb, repinfo.adb, sem_ch12.adb,
151 sem_prag.adb, sem_res.adb, sem_spark.adb, sem_util.adb: Minor
152 reformatting.
153
5ffa473a 1542019-07-09 Ed Schonberg <schonberg@adacore.com>
155
156 * sem_res.adb (Resolve_Equality_Op): If the node was overloaded,
157 set properly the entity to which the node has been resolved. The
158 original entity is the first one found during analysis, and is
159 not necessarily the resolved one.
160 (Resolve_Op_Not): If the argument of negation is an overloaded
161 equality operation, call its resolution directly given that the
162 context type does not participate in overload resolution.
163
f7197450 1642019-07-09 Hristian Kirtchev <kirtchev@adacore.com>
165
166 * bindo.adb: Remove with and use clauses for Debug. Add with
167 and use clauses for Opt.
168 (Find_Elaboration_Order): Enable the v4.0 elaboration order. The
169 v3.0 mechanism is now available under binder switch -H.
170 * bindusg.adb (Display): Enable switch -H.
171 * debug.adb: Free compiler switch -gnatd_G. Free binder switch
172 -d_N.
173 * sem_elab.adb: Update the section on switches to remove
174 -gnatd_G.
175 (Invocation_Graph_Recording_OK): The invocation graph is now
176 unconditionally recorded in ALI files.
177 * switch-b.adb (Scan_Binder_Switches): Scan switch -H.
178 * doc/gnat_ugn/building_executable_programs_with_gnat.rst:
179 Update the documentation on compiler switches related to
180 elaboration. Update the documentation on binder switches to
181 include switch -H.
182 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update
183 the documentation on elaboration order handling in GNAT.
184 * gnat_ugn.texi: Regenerate.
185
a2c6c634 1862019-07-09 Eric Botcazou <ebotcazou@adacore.com>
187
188 * repinfo.adb (List_Entities): Disregard formals altogether.
189 (List_Name): Properly escape the double quote in the JSON
190 output.
191
3933efcf 1922019-07-09 Javier Miranda <miranda@adacore.com>
193
194 * exp_util.adb (Remove_Side_Effects): Preserve the
195 Do_Range_Check flag.
196
2166bdef 1972019-07-09 Yannick Moy <moy@adacore.com>
198
199 * sinfo.ads: Refine comment for Do_Range_Check.
200
dbf9a3d7 2012019-07-09 Yannick Moy <moy@adacore.com>
202
203 * exp_spark.adb (Expand_SPARK_N_Attribute_Reference): Expand
204 attribute reference on Enum_Rep.
205
44e00a56 2062019-07-09 Ed Schonberg <schonberg@adacore.com>
207
208 * sem_ch12.adb (Instantiate_Formal_Package): Handle properly the
209 case where the actual for a formal package in an instance is the
210 current instance of an enclosing generic package.
211 (Check_Formal_Packages): If the formal package declaration is
212 box-initialized or lacks associations altogether, no internal
213 instance was created to verify conformance, and there is no
214 validating package to remove from tree.
215
3e4e7139 2162019-07-09 Yannick Moy <moy@adacore.com>
217
218 * freeze.adb (Build_Renamed_Body): Do not set body to inline in
219 GNATprove mode.
220
8235b943 2212019-07-09 Yannick Moy <moy@adacore.com>
222
223 * exp_util.adb (Expand_Subtype_From_Expr): Still expand the type
224 of static expressions in GNATprove_Mode.
225 * sem_ch3.adb (Analyze_Object_Declaration): Remove obsolete
226 special case for GNATprove_Mode.
227
cf9af2fa 2282019-07-09 Piotr Trojanek <trojanek@adacore.com>
229
230 * doc/gnat_rm/the_gnat_library.rst,
231 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
232 erroutc.adb, libgnat/g-comlin.adb, libgnat/g-comlin.ads,
233 libgnat/g-regexp.ads, libgnat/g-regpat.ads,
234 libgnat/g-spipat.ads, libgnat/s-os_lib.ads,
235 libgnat/s-regexp.ads: Reword "wild card" to "wildcard".
236 * gnat_rm.texi, gnat_ugn.texi: Regenerate.
237
a080baa9 2382019-07-09 Yannick Moy <moy@adacore.com>
239
240 * sem_spark.adb (Check_Expression): Handle correctly implicit
241 assignments as part of allocators and (extension) aggregates.
242 (Get_Root_Object): Adapt for new path expressions.
243 (Is_Path_Expression): Return True for (extension) aggregate.
244
d9b7ae15 2452019-07-09 Piotr Trojanek <trojanek@adacore.com>
246
247 * einfo.ads: Fix a typo.
248
4c24efa6 2492019-07-09 Ed Schonberg <schonberg@adacore.com>
250
251 * sem_util.adb (Scope_Within_Or_Same): Handle properly task
252 bodies and protected bodies, so that local variables within have
253 their proper scopes after these constructs have been rewritten
254 during expansion. This patch resembles but is not identical to
255 the code in Scope_Within.
256
6c334e66 2572019-07-09 Arnaud Charlet <charlet@adacore.com>
258
259 * gnat1drv.adb (Adjust_Global_Switches): Set
260 Dynamic_Elaboration_Checks to True in CodePeer mode.
261
82c20af0 2622019-07-09 Yannick Moy <moy@adacore.com>
263
264 * sem_spark.adb (Get_Perm_Or_Tree): Issue an error when
265 encountering unknown global variable.
266
a42b8e6a 2672019-07-09 Yannick Moy <moy@adacore.com>
268
269 * sem_spark.adb (Check_Expression): Change signature to take an
270 Extended_Checking_Mode, for handling read permission checking of
271 sub-expressions in an assignment.
272 (Check_Parameter_Or_Global): Adapt to new behavior of
273 Check_Expression for mode Assign.
274 (Check_Safe_Pointers): Do not analyze generic bodies.
275 (Check_Assignment): Separate checking of the target of an
276 assignment.
277
5fb4f6e3 2782019-07-09 Eric Botcazou <ebotcazou@adacore.com>
279
280 * repinfo.ads (JSON format): Adjust.
281 * repinfo.adb (Need_Blank_Line): Rename to...
282 (Need_Separator): ...this.
283 (Blank_Line): Rename to...
284 (Write_Separator): ...this and add JSON specific handling.
285 (List_Array_Info): Adjust to above renaming.
286 (List_Object_Info): Likewise.
287 (List_Record_Info): Likewise.
288 (List_Subprogram_Info): Likewise.
289 (List_Type_Info): Likewise.
290 (List_Entities): Do not set Need_Blank_Line.
291 (List_Rep_Info): Set Need_Separator and add JSON specific
292 handling. Output a single JSON stream in the normal case.
293
b389ec1e 2942019-07-09 Arnaud Charlet <charlet@adacore.com>
295
296 * doc/gnat_ugn/the_gnat_compilation_model.rst: Update doc on
297 -fdump-ada-spec now that we generate Ada 2012.
298 * gnat_ugn.texi: Regenerate.
299
5acb3702 3002019-07-08 Eric Botcazou <ebotcazou@adacore.com>
301
302 * repinfo.adb (List_Common_Type_Info): New procedure extracted
303 from...
304 (List_Type_Info): ...here. Call it for the common information,
305 start with a blank line and output the linker section at the
306 end, if any.
307 (List_Mechanisms): Rename to...
308 (List_Subprogram_Info): ...this.
309 (List_Array_Info): Call List_Common_Type_Info.
310 (List_Entities): Adjust to above change and renaming.
311 (List_Record_Info): Call List_Common_Type_Info.
312
6eb57612 3132019-07-08 Dmitriy Anisimkov <anisimko@adacore.com>
314
315 * libgnat/g-sercom.ads
316 (Serial_Port_Descriptor): New type.
317 (Serial_Port): Add a comment, make it hold a
318 Serial_Port_Descriptor.
319 (To_Ada, To_C): New procedures.
320 (Port_Data, Port_Data_Access): Remove types.
321 * libgnat/g-sercom.adb (To_Ada): New stub.
322 * libgnat/g-sercom__linux.adb, libgnat/g-sercom__mingw.adb:
323 Update implementations accordingly.
324 * s-oscons-tmplt.c: Bind Serial_Port_Descriptor to
325 System.Win32.HANDLE on Windows, and to Interfaces.C.int on
326 Linux. Add "Interfaces.C." prefix for other basic integer type
327 bindings.
328 * xoscons.adb (Output_Info): Remove the "Interfaces.C." prefix
329 for subtypes generation.
330
08da2ad9 3312019-07-08 Arnaud Charlet <charlet@adacore.com>
332
333 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
334 Update documentation on No_Exceptions restriction.
335 * gnat_rm.texi: Regenerate.
336
89b07420 3372019-07-08 Dmitriy Anisimkov <anisimko@adacore.com>
338
339 * libgnat/s-os_lib.adb: Do not call __gnat_kill for Invalid_Pid.
340
0cc34fed 3412019-07-08 Piotr Trojanek <trojanek@adacore.com>
342
343 * sem_util.adb (Enclosing_Package_Or_Subprogram): Do not expect
344 package and subprogram bodies.
345
46299a06 3462019-07-08 Bob Duff <duff@adacore.com>
347
348 * doc/gnat_ugn/gnat_utility_programs.rst: Remove documentation
349 of ignored GNATpp switch.
350
4475d2f0 3512019-07-08 Hristian Kirtchev <kirtchev@adacore.com>
352
353 * doc/gnat_rm/implementation_defined_pragmas.rst:
354 Update the documentation of pragma Initialize_Scalars.
355 * gnat_rm.texi: Regenerate.
356
b282b25b 3572019-07-08 Javier Miranda <miranda@adacore.com>
358
359 * exp_ch4.adb (Tagged_Membership): Fix regression silently
360 introduced in r260738 that erroneouslusy causes the evaluation
361 to True of the membership test when the left operand of the
362 membership test is a class-wide interface object and the right
363 operand is a type that implements such interface type.
364
703ee0e0 3652019-07-08 Hristian Kirtchev <kirtchev@adacore.com>
366
367 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
368 register an address clause when its prefix denotes a generic
369 formal object.
370
e6b4414e 3712019-07-08 Hristian Kirtchev <kirtchev@adacore.com>
372
373 * bindo-diagnostics.adb (Diagnose_Cycle): Capture the presence
374 of an Elaborate_All edge before iterating over the edges of the
375 cycle.
376 (Output_Elaborate_Body_Transition): Update the parameter profile
377 and the comment on usage. Add a missing case where the edge is
378 within the context of an Elaborate_All.
379 (Output_Transition): Update the call to
380 Output_Elaborate_Body_Transition.
381 * bindo-graphs.ads, bindo-graphs.adb
382 (Contains_Elaborate_All_Edge): New routine.
383
5a4de65a 3842019-07-08 Piotr Trojanek <trojanek@adacore.com>
385
386 * lib-xref-spark_specific.adb (Create_Heap): Set dummy Etype for
387 the fake __HEAP entity.
388
42253061 3892019-07-08 Daniel Mercier <mercier@adacore.com>
390
391 * gnat1drv.adb: Suppress warnings on memory representation in
392 CodePeer compiler mode.
393
a7c8fd7e 3942019-07-08 Nicolas Roche <roche@adacore.com>
395
396 * rtinit.c (__gnat_runtime_initialize): Remove dependency on
397 CommandLineToArgvW.
398
89c9dd55 3992019-07-08 Doug Rupp <rupp@adacore.com>
400
401 * Makefile.rtl: Handle vxworks7r2 in x86_64 and x86 vxworks7.
402
944903c8 4032019-07-08 Dmitriy Anisimkov <anisimko@adacore.com>
404
405 * Makefile.rtl: Use g-sercom__linux.adb for all linuxes.
406
e51a140c 4072019-07-08 Yannick Moy <moy@adacore.com>
408
409 * expander.adb (Expand): Do not reset Analyzed flag always.
410 * sem_eval.adb (Fold_Ureal): Mark node as analyzed.
411
f117e449 4122019-07-08 Ed Schonberg <schonberg@adacore.com>
413
414 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Do not insert twice
415 the assignment statement that computes the delay value, to
416 prevent improper tree sharing when the value is a type
417 conversion and Float_Overflow checks are enabled.
418
f5cb3a59 4192019-07-08 Hristian Kirtchev <kirtchev@adacore.com>
420
421 * bindo.adb: Update the section on terminology to include new
422 concepts. Update the section on switches to include new
423 entries.
424 * bindo.ads: Add type Precedence_Kind.
425 * bindo-builders.adb: Add with and use clauses for Debug and
426 Bindo.Validators. Add use clauses for
427 Bindo.Validators.Invocation_Graph_Validators and
428 Bindo.Validators.Library_Graph_Validators.
429 (Build_Invocation_Graph): Validate the graph immediately after
430 it was built.
431 (Build_Library_Graph): Update the parameter profile. The
432 creation of the graph is now elaboration model-agnostic.
433 Validate the graph immediately after it was built.
434 (Create_With_Edge): Create regular with edges for Elaborate and
435 Elaborate_All edges when the appropriate debug switches are in
436 effect.
437 * bindo-builders.ads (Build_Library_Graph): Update the parameter
438 profile.
439 * bindo-diagnostics.adb (Diagnose_Cycle): Track the presence of
440 an Elaborate_All edge throughout the inspection of the cycle's
441 edges.
442 (Output_Dynamic_Model_Suggestions): Output the suggestion only
443 when the cycle contains at least one weak edge where the
444 successor was statically elaborated.
445 (Output_Elaborate_Body_Transition, Output_Forced_Transition,
446 Output_With_Transition): Update the assertions.
447 * bindo-elaborators.adb: Remove use clauses for
448 Bindo.Validators.Invocation_Graph_Validators and
449 Bindo.Validators.Library_Graph_Validators. Remove strings
450 Add_To_All_Candidates_Msg and Add_To_Comp_Candidates_Msg.
451 Remove type String_Ptr.
452 (Add_Vertex, Add_Vertex_If_Elaborable, Create_All_Candidates_Set
453 Create_Component_Candidates_Set): Remove.
454 (Create_Component_Vertex_Sets, Create_Vertex_Sets): New routine.
455 (Elaborate_Component): Update the parameter profile and the
456 comment on usage. Reimplement the elaboration of a component.
457 The algorithm will now attempt to elaborate as many vertices
458 possible. If this is not possible, and a weakly elaborable
459 vertex is available use unit was compiled using the dynamic
460 model, the algorithm will elaborate it.
461 (Elaborate_Library_Graph): Reimplement the elaboration of the
462 graph. The algorithm will now attempt to elaborate as many
463 vertices along with their components as possible. If this is not
464 possible, and a weakly elaborable vertex is available use unit
465 was compiled using the dynamic model, the algorithm will
466 elaborate it along with its component.
467 (Elaborate_Units): Merge with the functionality of
468 Elaborate_Units_Common.
469 (Elaborate_Units_Common, Elaborate_Units_Dynamic,
470 Elaborate_Units_Static): Remove.
471 (Elaborate_Vertex): Update the parameter profile and the comment
472 on usage. Reimplemented.
473 (Find_Best_Candidate): Remove.
474 (Find_Best_Elaborable_Vertex, Find_Best_Vertex,
475 Find_Best_Weakly_Elaborable_Vertex, Has_Elaborable_Body,
476 Insert_Elaborable_Successor, Insert_Vertex): New routines.
477 (Is_Better_Candidate): Remove.
478 (Is_Better_Elaborable_Vertex,
479 Is_Better_Weakly_Elaborable_Vertex,
480 Is_Suitable_Elaborable_Vertex,
481 Is_Suitable_Weakly_Elaborable_Vertex): New routines.
482 (Trace_Candidate_Vertices): Remove.
483 (Trace_Component): Output the number of strong and weak
484 predecessors.
485 (Trace_Unelaborated_Vertices): Remove.
486 (Trace_Vertex): Output the number of strong and weak
487 predecessors.
488 (Trace_Vertices): New routine.
489 (Update_Successor, Update_Successors): Update the parameter
490 profile and the comment on usage.
491 * bindo-graphs.adb: Remove type Precedence_Kind.
492 (Add_Edge_With_Return): Update the increment of pending
493 predecessors.
494 (Add_Vertex): Provide default values for strong and weak
495 predecessors.
496 (Complementary_Vertex): Move the initial declaration to the
497 spec. Update the parameter profile and the comment on usage.
498 (Contains_Weak_Static_Successor): New routine.
499 (Create): Update the parameter profile. The creation of the
500 graph is now elaboration model-agnostic.
501 (Decrement_Pending_Predecessors): Update the parameter profile
502 and the comment on usage. Reimplemented.
503 (Delete_Edge): Update the decrement of pending predecesors.
504 (Has_Elaborate_Body): Do not treat a vertex as being subject to
505 Elaborate_Body when a debug switch is in effect.
506 (Increment_Pending_Predecessors): Update the parameter profile
507 and the comment on usage. Reimplemented.
508 (Is_Elaborable_Component): Reimplemented.
509 (Is_Elaborable_Vertex): Move the initial declaration to the
510 spec. Reimplemented.
511 (Is_Elaborate_Body_Pair): New routine.
512 (Is_Dynamically_Elaborated): Update the parameter profile.
513 Reimplemented.
514 (Is_Weakly_Elaborable_Vertex): New routine.
515 (Pending_Predecessors): Removed.
516 (Pending_Predecessors_For_Elaboration,
517 Pending_Strong_Predecessors, Pending_Weak_Predecessors,
518 Update_Pending_Predecessors): New routines.
519 (Update_Pending_Predecessors_Of_Components): Update the
520 increment of pending predecessors.
521 * bindo-graphs.ads: Update the components of type
522 Component_Attributes. Update the components of type
523 Library_Graph_Attributes. Update the components of type
524 Library_Graph_Vertex_Attributes. Update the initialization of
525 No_Component_Attributes. Update the initialization of
526 No_Library_Graph_Vertex_Attributes.
527 (Complementary_Vertex, Contains_Weak_Static_Successor): New
528 routines.
529 (Create): Update the parameter profile and the comment on usage.
530 (Decrement_Pending_Predecessors, Is_Dynamically_Elaborated):
531 Update the parameter profile and the comment on usage.
532 (Is_Elaborate_Body_Pair, Is_Weakly_Elaborable_Vertex): New
533 routines.
534 (Pending_Predecessors): Removed.
535 (Pending_Predecessors_For_Elaboration,
536 Pending_Strong_Predecessors, Pending_Weak_Predecessors): New
537 routines.
538 * bindo-writers.adb (Write_Components): Moved from the spec.
539 (Write_Component): Output the strong and weak predecessors.
540 (Write_Library_Graph): Output the components as part of the
541 graph.
542 (Write_Library_Graph_Vertex): Output the strong and weak
543 predecessors.
544 * bindo-writers.ads (Write_Components): Moved to the body.
545 * debug.adb: Add and document new GNATbind switches -d_a, -d_b,
546 -d_e.
547 * bindo-validators.adb: Minor reformattings.
548
7b8ca6b2 5492019-07-08 Bob Duff <duff@adacore.com>
550
551 * libgnat/g-sercom.ads, libgnat/g-sercom__linux.adb (Data_Rate):
552 Support additional data rates.
553
364c746f 5542019-07-08 Olivier Hainque <hainque@adacore.com>
555
556 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Don't request
557 DECL_ARTIFICIAL_P on elab proc declarations.
558
2dbfbbb2 5592019-07-08 Eric Botcazou <ebotcazou@adacore.com>
560
561 * repinfo.adb (List_Record_Info): Declare Incomplete_Layout and
562 Not_In_Extended_Main local exceptions.
563 (List_Structural_Record_Layout): For an extension, raise the
564 former if the parent subtype has not been built and the latter
565 if it is not declared in the main source unit. Fall back to the
566 flat layout if either exception has been raised.
567
3e05bbec 5682019-07-08 Ed Schonberg <schonberg@adacore.com>
569
570 * libgnat/a-strfix.adb (Delete): The RM describes the semantics
571 of Delete as equivalent to that of Replace_String with a null
572 argument. As a result, deleting a null string that starts past
573 the end of its argument is a noop and must not raise
574 Index_Error.
575
c98aac61 5762019-07-08 Javier Miranda <miranda@adacore.com>
577
578 * exp_disp.adb (Register_Primitive): When registering a
579 primitive in the secondary dispatch table, handle primitive
580 inherited through several levels of type derivation (required to
581 properly handle inherited 'null' primitive).
582
221b67b6 5832019-07-08 Bob Duff <duff@adacore.com>
584
585 * doc/gnat_ugn/gnat_utility_programs.rst: Document handling of
586 preprocessor directives in GNATpp.
587
aed4e06a 5882019-07-08 Javier Miranda <miranda@adacore.com>
589
590 * gnat1drv.adb (Post_Compilation_Validation_Checks:
591 Validate_Compile_Time_Warning_Errors is now located in sem_prag
592 (instead of sem_ch13).
593 * sem_ch13.ads (Validate_Compile_Time_Warning_Error,
594 Validate_Compile_Time_Warning_Errors): Move to sem_prag.
595 * sem_ch13.adb
596 (Compile_Time_Warnings_Errors): Move to sem_prag.
597 (Initialize): Remove initialization of table
598 Compile_Time_Warning_Errors.
599 (Validate_Compile_Time_Warning_Error,
600 Validate_Compile_Time_Warning_Errors): Move to sem_prag.
601 * sem_prag.ads (Validate_Compile_Time_Warning_Errors): New
602 procedure.
603 * sem_prag.adb (Initialize): Initialize table
604 Compile_Time_Warning_Errors.
605
b9bd5934 6062019-07-08 Ed Schonberg <schonberg@adacore.com>
607
608 * sem_ch13.adb (Analyze_Aspect_Specifications): For a
609 pre/postcondition of a generic subprogram declaration, do not
610 use Relocate_Node on the aspect expression to construct the
611 corresponding attribute specification, to prevent tree anomalies
612 when the expression is a call with named actual parameters.
613
63bb17d8 6142019-07-08 Javier Miranda <miranda@adacore.com>
615
616 * sem_attr.adb (Analyze_Attribute [Attribute_Size]): For pragmas
617 used to report user defined compile time warning or errors
618 handle 'Size for types with known static RM size.
619
1979cbfe 6202019-07-08 Justin Squirek <squirek@adacore.com>
621
622 * exp_imgv.adb (Build_Enumeration_Image_Tables): Default SSO for
623 the building of image tables.
624 (Expand_Image_Attribute): Minor cleanup.
625
bcb0a375 6262019-07-08 Dmitriy Anisimkov <anisimko@adacore.com>
627
628 * libgnat/g-socket.ads, libgnat/g-socket.adb: Improve
629 documentation.
630 (Get_Socket_Option, Set_Socket_Option): Remove default value for
631 the Level formal.
632
429822c1 6332019-07-08 Ed Schonberg <schonberg@adacore.com>
634
635 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): For an
636 unanalized aspect in a generic context that has not been
637 analyzed yet, if the aspect applies to a type, place the type on
638 the scope stack to make its components visible, before checking
639 conformance with the version of the expression analyzed at the
640 freeze point.
641
e1415398 6422019-07-05 Justin Squirek <squirek@adacore.com>
643
644 * checks.adb (Apply_Accessibility_Check): Add logic to fetch the
645 function result accessibility level if one is required within
646 the generated check.
647 * exp_ch6.adb (Needs_Result_Accessibility_Level): Modify
648 controlling elsif block to handle more cases such as anonymous
649 access results and disable checking for coextensions.
650
dad9e9f8 6512019-07-05 Ed Schonberg <schonberg@adacore.com>
652
653 * sem_ch9.adb (Analyze_Accept_Statement): If this is an illegal
654 accept statement for an enclosing entry abandon analysis to
655 prevent scope mismatches and potential infinite loops in
656 compiler.
657
627d0751 6582019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
659
660 * ali.adb (For_Each_Invocation_Construct,
661 For_Each_Invocation_Relation): New version.
662 (Scan_ALI): Initialize field Invocation_Graph_Encoding.
663 (Set_Invocation_Graph_Encoding): Update the setting of the
664 invocation graph encoding.
665 * ali.ads: Move field Invocation_Graph_Encoding from Unit_Record
666 to ALI_Record because the encoding applies to the whole ALI,
667 rather than one of the units (spec or body) for which the ALI
668 file was created.
669 (For_Each_Invocation_Construct, For_Each_Invocation_Relation):
670 New version.
671 * bindo.adb: Update the section on switches. Complete the
672 section of debugging elaboration order issues.
673 (Find_Elaboration_Order): Prepare the routine for the switch
674 from the old to the new elaboration order mechanism.
675 * bindo-diagnostics.adb (Find_And_Output_Invocation_Paths):
676 Manage a visited set used by Visit_Vertex.
677 (Output_All_Cycles_Suggestions,
678 Output_Dynamic_Model_Suggestions): Clarify the nature of the
679 suggested switch.
680 (Output_Elaborate_Body_Transition): Update the diagnostic to
681 emit a better message.
682 (Output_Forced_Suggestions, Output_Full_Encoding_Suggestions):
683 Clarify the nature of the suggested switch.
684 (Visit_Vertex): Update the parameter profile to add a set of
685 invokers visited during the transition. This set prevents
686 infinite exploration of the graph in case the invocations are
687 recursive.
688 * bindo-elaborators.adb: Add a use clause for
689 Bindo.Writers.Dependency_Writers.
690 (Elaborate_Units_Common): Output the library graph after it has
691 been augmented with invocation edges. Output just the components
692 instead of outputting the whole library graph again.
693 (Elaborate_Units_Dynamic, Elaborate_Units_Static): Output the
694 dependencies as expressed in the library graph.
695 * bindo-units.adb (Invocation_Graph_Encoding): Update the
696 extraction of the invocation graph encoding.
697 * bindo-writers.adb: Add with and use clauses for Binderr and
698 Butil.
699 (palgc, plgc): New debug routine.
700 (Write_Components): Moved to the spec. Add a header for the
701 output.
702 (Write_Dependencies, Write_Dependencies_Of_Vertex,
703 Write_Dependency_Edge): New routine.
704 (Write_Elaboration_Order): Update the logic to follow the format
705 of Binde's order output.
706 (Write_Library_Graph): Do not output the components every time
707 the graph is written.
708 (Write_Unit): Output the invocation graph encoding of the unit.
709 Output the invocation constructs and relations for the unit
710 only.
711 * bindo-writers.ads (Write_Components): Moved from the body.
712 (Write_Dependencies): New routine.
713 * bindusg.adb: Prepare the routine for the switch from the old
714 to the new elaboration order mechanism.
715 * debug.adb: Binder switch -d_O is now not associated with any
716 functionality.
717 * einfo.adb (Is_Elaboration_Target): The attribute applies to
718 packages, as specified by the comment on the attribute usage.
719 * opt.ads: Add a global flag which controls the choice between
720 the new and the legacy elaboration order mechanism.
721 * sem_elab.adb: Add Package_Target to type Target_Kind.
722 (Build_Elaborate_Body_Procedure, Build_Elaborate_Procedure,
723 Build_Elaborate_Spec_Procedure, Check_Elaboration_Scenarios,
724 Check_SPARK_Model_In_Effect): Use Main_Unit_Entity to obtain the
725 entity of the main unit.
726 (Create_Package_Rep): New routine.
727 (Create_Target_Rep): Add processing for packages.
728 (Declaration_Placement_Of_Node, Has_Prior_Elaboration): Use
729 Main_Unit_Entity to obtain the entity of the main
730 unit.
731 (Invocation_Graph_Recording_OK): Prepare the routine for the
732 switch from the old to the new elaboration order mechanism.
733 (Main_Unit_Entity): New routine.
734 (Meet_Elaboration_Requirement,
735 Process_Conditional_ABE_Variable_Reference): Use
736 Main_Unit_Entity to obtain the entity of the main unit.
737 (Process_Invocation_Instantiation): New routine.
738 (Process_Invocation_Scenario): Add processing for
739 instantiations.
740 * switch-b.adb (Scan_Binder_Switches): Prepare the routine for
741 the switch from the old to the new elaboration order mechanism.
742
30fb27b1 7432019-07-05 Joffrey Huguet <huguet@adacore.com>
744
745 * libgnat/a-textio.adb: Add abstract state refinment.
746 * libgnat/a-textio.ads: Add File_System abstract state. Add
747 global contracts, contract cases, preconditions and
748 postconditions to procedures and functions.
749 (Set_Input, Set_Output, Set_Error, Standard_Input,
750 Standard_Output, Standard_Error, Current_Input, Current_Output,
751 Current_Error): Turn SPARK_Mode off.
752 (Get_Line): Turn SPARK_Mode off on Get_Line functions.
753 * libgnat/a-tideio.ads, libgnat/a-tienio.ads,
754 libgnat/a-tifiio.ads, libgnat/a-tiflio.ads,
755 libgnat/a-tiinio.ads, libgnat/a-timoio.ads: Add global
756 contracts, contract cases, preconditions and postconditions to
757 procedures and functions.
758
ce99fc8a 7592019-07-05 Arnaud Charlet <charlet@adacore.com>
760
761 * doc/gnat_ugn/platform_specific_information.rst: Refresh doc on
762 installing from the command line on Windows. Remove obsolete
763 part.
764 * gnat_ugn.texi: Regenerate.
765
26ea5003 7662019-07-05 Vasiliy Fofanov <fofanov@adacore.com>
767
768 * libgnat/a-wichha.ads (Is_Alphanumeric): Replace comment with
769 the correct one. Also capitalize references to False
770 throughout.
771
c9c81835 7722019-07-05 Eric Botcazou <ebotcazou@adacore.com>
773
774 * exp_ch4.adb (Expand_N_Indexed_Component): Do not expand actual
775 parameters of function calls here either.
776
50948c8a 7772019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
778
779 * bindo-units.adb, checks.adb, exp_attr.adb, exp_ch3.adb,
780 exp_ch4.adb, exp_pakd.adb, lib-writ.adb, libgnat/g-traceb.adb,
781 libgnat/g-traceb.ads, libgnat/s-stratt.ads, sem_aux.ads,
782 sem_util.adb: Minor reformatting.
783
a9fa50ab 7842019-07-05 Ed Schonberg <schonberg@adacore.com>
785
786 * sem_ch13.adb (Build_Predicate_Functions): If a subtype that
787 carries a static predicate aspect is frozen immediately after
788 its declaration, ensure that the generated function body created
789 for predicate checking is inserted after the corresponding
790 subprogram declaration, which is created at the point the
791 declaration is elaborated.
792
ee4e1dd7 7932019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
794
795 * exp_ch7.adb (Cleanup_Record): Use the underlying type when
796 checking for components with tasks.
797
2028580f 7982019-07-05 Arnaud Charlet <charlet@adacore.com>
799
800 * libgnarl/s-osinte__linux.ads: Link with -lrt before -lpthread.
801
ec1e481f 8022019-07-05 Ed Schonberg <schonberg@adacore.com>
803
804 * exp_pakd.adb (Expand_Bit_Packed_Element_Set): Add explicit
805 range checks when the index type of the bit-packed array is an
806 enumeration type with a non-standard representation,
807
ae60396a 8082019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
809
810 * sem_res.adb (Is_Control_Flow_Statement): Delay statements
811 contain an expression, which in turn may have side effects and
812 affect the infinite recursion. As a result, delay statements
813 should not be treated specially.
814
d33025f2 8152019-07-05 Arnaud Charlet <charlet@adacore.com>
816
817 * libgnarl/s-linux.ads, libgnarl/s-linux__alpha.ads,
818 libgnarl/s-linux__android.ads, libgnarl/s-linux__hppa.ads,
819 libgnarl/s-linux__mips.ads, libgnarl/s-linux__riscv.ads,
820 libgnarl/s-linux__sparc.ads: Fix typos in comments.
821
51f2c7f9 8222019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
823
824 * sem_res.adb (Check_Infinite_Recursion): Reimplemented.
825 (Enclosing_Declaration_Or_Statement,
826 Invoked_With_Different_Arguments, Is_Conditional_Statement,
827 Is_Control_Flow_Statement, Is_Immediately_Within_Body,
828 Is_Raise_Idiom, Is_Raise_Statement, Is_Sole_Statement,
829 Preceded_By_Control_Flow_Statement,
830 Within_Conditional_Statement): New routines.
831
0e6f6ee1 8322019-07-05 Javier Miranda <miranda@adacore.com>
833
834 * exp_ch4.adb (Expand_N_Type_Conversion): Do not apply an
835 accessibility check when the conversion is an access to
836 class-wide interface type and it is an actual parameter.
837 * exp_ch6.adb (Expand_Call_Helper): Add documentation on the
838 accessibility level of an anonymous allocator defining the value
839 of an access parameter.
840 * sem_util.ads, sem_util.adb (Dynamic_Accessibility_Level): Add
841 support for an anonymous allocator whose type is that of a
842 stand-alone object of an anonymous access to object type.
843
f28a3d6c 8442019-07-05 Piotr Trojanek <trojanek@adacore.com>
845
846 * einfo.ads, sem_res.adb: Typo fixes in comments.
847
2d8a0eb3 8482019-07-05 Bob Duff <duff@adacore.com>
849
850 * exp_ch6.adb (Is_Build_In_Place_Function): Narrow the check for
851 Has_Foreign_Convention to the imported case only. If a
852 build-in-place function is exported, and called from Ada code,
853 build-in-place protocols should be used.
854
6eddee84 8552019-07-05 Ed Schonberg <schonberg@adacore.com>
856
857 * sem_util.adb (Encloing_Subprogram): If Enclosing_Dynamic_Scope
858 is a loop, continue climbing the scope stack to find the
859 enclosing subprogram.
860 (Gather_Components): Handle properly a choice in a record
861 aggregate that is given by a subtype with a static predicate.
862
249e38a7 8632019-07-05 Javier Miranda <miranda@adacore.com>
864
865 * debug.adb (-gnatd.K): Leave available this switch.
866 * contracts.adb (Build_And_Analyze_Contract_Only_Subprograms):
867 Remove.
868 * scil_ll.ads, scil_ll.adb (Contract_Only_Body_Flag,
869 Contract_Only_Body_Nodes, Get_Contract_Only_Body,
870 Is_Contract_Only_Body, Set_Contract_Only_Body): Remove.
871
33ae0c9f 8722019-07-05 Pierre-Marie de Rodat <derodat@adacore.com>
873
874 * libgnat/a-strunb.ads: Import documentation from the RM
875
70f9c8aa 8762019-07-05 Pierre-Marie de Rodat <derodat@adacore.com>
877
878 * libgnat/a-strfix.ads: Import documentation from the RM
879
1bc68ac2 8802019-07-05 Yannick Moy <moy@adacore.com>
881
882 * adabkend.adb (Scan_Back_End_Switches): Accept -Og and -Ofast
883 switches.
884
2500be2f 8852019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
886
887 * ali.adb: Relocate types Invocation_Construct_Record,
888 Invocation_Relation_Record, and Invocation_Signature_Record to
889 the body of ALI. Relocate tables Invocation_Constructs,
890 Invocation_Relations, and Invocation_Signatures to the body of
891 ALI. Remove type Body_Placement_Codes. Add new types
892 Declaration_Placement_Codes, and
893 Invocation_Graph_Encoding_Codes. Update the literals of type
894 Invocation_Graph_Line_Codes.
895 (Add_Invocation_Construct): Update the parameter profile. Add an
896 invocation construct built from all attributes provided.
897 (Add_Invocation_Relation): Update the parameter profile. Add an
898 invocation relation built from all attributes provided.
899 (Body_Placement): New routine.
900 (Body_Placement_Kind_To_Code, Code_To_Body_Placement_Kind):
901 Removed.
902 (Code_To_Declaration_Placement_Kind,
903 Code_To_Invocation_Graph_Encoding_Kind, Column,
904 Declaration_Placement_Kind_To_Code, Extra,
905 For_Each_Invocation_Construct, For_Each_Invocation_Relation,
906 Invocation_Graph_Encoding,
907 Invocation_Graph_Encoding_Kind_To_Code, Invoker, Kind, Line,
908 Locations, Name): New routine.
909 (Scan_Invocation_Construct_Line): Reimplement the scanning
910 mechanism.
911 (Scan_Invocation_Graph_Attributes_Line): New routine.
912 (Scan_Invocation_Graph_Line): Use a case statement to dispatch.
913 (Scan_Invocation_Relation_Line): Reimplement the scanning
914 mechanism.
915 (Scope): New routine.
916 (Set_Invocation_Graph_Encoding, Signature, Spec_Placement,
917 Target): New routine.
918 * ali.ads: Add new type Invocation_Graph_Encoding_Kind. Add
919 component Invocation_Graph_Encoding to type Unit_Record.
920 Relocate various types and data structures to the body of ALI.
921 (Add_Invocation_Construct, Add_Invocation_Relation): Update the
922 parameter profile.
923 (Body_Placement): New routine.
924 (Body_Placement_Kind_To_Code, Code_To_Body_Placement_Kind):
925 Removed.
926 (Code_To_Declaration_Placement_Kind,
927 Code_To_Invocation_Graph_Encoding_Kind, Column,
928 Declaration_Placement_Kind_To_Code, Extra,
929 For_Each_Invocation_Construct, For_Each_Invocation_Relation,
930 Invocation_Graph_Encoding,
931 Invocation_Graph_Encoding_Kind_To_Code, Invoker, Kind, Line,
932 Locations, Name, Scope, Set_Invocation_Graph_Encoding,
933 Signature, Spec_Placement, Target): New routine.
934 * bindo.adb: Add with clause for Binde. Add with and use
935 clauses for Debug. Update the documentation. Add new switches.
936 (Find_Elaboration_Order): Dispatch to the proper elaboration
937 mechanism.
938 * bindo-augmentors.adb:
939 Remove with and use clauses for GNAT and GNAT.Sets. Remove
940 membership set VS. Update the parameter profiles of most
941 routines to use better parameter names. Update the
942 implementation of most routine to use the new parameter names.
943 Remove various redundant assertions.
944 * bindo-builders.adb: Use better names for instantiated data
945 structures. Update all references to these names. Update the
946 parameter profiles of most routines to use better parameter
947 names. Update the implementation of most routine to use the new
948 parameter names.
949 (Build_Library_Graph): Update the parameter profile. Update the
950 call to Create.
951 (Create_Vertex): Reimplemented.
952 (Declaration_Placement_Vertex): New routine.
953 * bindo-builders.ads (Build_Library_Graph): Update the parameter
954 profile and comment on usage.
955 * bindo-diagnostics.adb: Almost a new unit.
956 * bindo-diagnostics.ads: Add a use clause for
957 Bindo.Graphs.Invocation_Graphs. Remove package
958 Cycle_Diagnostics.
959 (Diagnose_Circularities): New routine.
960 * bindo-elaborators.adb: Remove the with and use clauses for
961 Binderr and GNAT.Sets. Remove the use clause for
962 Bindo.Diagnostics.Cycle_Diagnostics. Remove membership set VS.
963 Update the parameter profiles of most routines to use better
964 parameter names. Update the implementation of most routine to
965 use the new parameter names. (Elaborate_Units_Common): Update
966 the parameter profile. Pass an infication to the library graph
967 builder whether the dynamic model is in effect.
968 (Elaborate_Units_Dynamic, Elaborate_Units_Static): Use
969 Diagnose_Circularities to provide diagnostics.
970 (Update_Successor): Use routine In_Same_Component to determine
971 whether the predecessor and successor reside in different
972 components.
973 * bindo-graphs.adb: Add with and use clauses for Butil, Debug,
974 Output, and Bindo.Writers. Remove with and use clauses for
975 GNAT.Lists. Update the parameter profiles of most routines to
976 use better parameter names. Update the implementation of most
977 routine to use the new parameter names. Remove various
978 redundant assertions. Remove doubly linked list EL. Add new
979 type Precedence_Kind.
980 (Add_Cycle): New routine.
981 (Add_Vertex): Update the parameter profile. Update the creation
982 of vertex attributes.
983 (Add_Vertex_And_Complement, Body_Vertex, Column,
984 Complementary_Vertex, Copy_Cycle_Path, Cycle_Kind_Of): New
985 routines.
986 (Destroy_Invocation_Graph_Edge, Destroy_Library_Graph_Cycle,
987 Destroy_Library_Graph_Edge, Extra, File_Name,
988 Find_All_Cycles_Through_Vertex, Find_All_Cycles_With_Edge,
989 Find_Cycles, Find_First_Lower_Precedence_Cycle,
990 Get_LGC_Attributes, Has_Next, Hash_Library_Graph_Cycle,
991 Hash_Library_Graph_Cycle_Attributes, Highest_Precedence_Cycle,
992 Highest_Precedence_Edge, In_Same_Component, Insert_And_Sort,
993 Invocation_Edge_Count, Invocation_Graph_Encoding,
994 Is_Cycle_Initiating_Edge, Is_Cyclic_Edge,
995 Is_Cyclic_Elaborate_All_Edge, Is_Cyclic_Elaborate_Body_Edge,
996 Is_Cyclic_Elaborate_Edge, Is_Cyclic_Forced_Edge,
997 Is_Cyclic_Invocation_Edge, Is_Cyclic_With_Edge,
998 Is_Dynamically_Elaborated, Is_Elaborate_All_Edge,
999 Is_Elaborate_Body_Edge, Is_Elaborate_Edge: New routines.
1000 (Is_Existing_Predecessor_Successor_Relation): Removed.
1001 (Is_Forced_Edge, Is_Invocation_Edge, Is_Recorded_Cycle,
1002 Is_Recorded_Edge, Is_With_Edge, Iterate_Edges_Of_Cycle, Kind,
1003 Length): New routine.
1004 (Lib_Vertex): Removed.
1005 (Line, Links_Vertices_In_Same_Component,
1006 Maximum_Invocation_Edge_Count, Next, Normalize_And_Add_Cycle,
1007 Normalize_Cycle_Path, Number_Of_Cycles, Path, Precedence,
1008 Remove_Vertex_And_Complement, Sequence_Next_Cycle): New routines.
1009 (Sequence_Next_IGE_Id): Renamed to Sequence_Next_Edge.
1010 (Sequence_Next_IGV_Id): Renamed to Sequence_Next_Vertex.
1011 (Sequence_Next_LGE_Id): Renamed to Sequence_Next_Edge.
1012 (Sequence_Next_LGV_Id): Renamed to Sequence_Next_Vertex.
1013 (Set_Is_Existing_Predecessor_Successor_Relation): Removed.
1014 (Set_Is_Recorded_Cycle, Set_Is_Recorded_Edge,
1015 Set_LGC_Attributes, Spec_Vertex, Trace_Cycle, Trace_Edge,
1016 Trace_Eol, Trace_Vertex): New routines.
1017 * bindo-graphs.ads: Add with and use clauses for Types and
1018 GNAT.Lists. Update the parameter profiles of most routines to
1019 use better parameter names. Update the implementation of most
1020 routine to use the new parameter names. Add the new
1021 instantiated data structures IGE_Lists, IGV_Sets, LGC_Lists,
1022 LGE_Lists, LGE_Sets, LGV_Sets, and RC_Sets. Add new type
1023 Library_Graph_Cycle_Id along with an empty and initial value.
1024 Remove component Lib_Vertex and add new components Body_Vertex
1025 and Spec_Vertex to type Invocation_Graph_Vertex_Attributes. Add
1026 new type Library_Graph_Cycle_Kind. Add new iterators
1027 All_Cycle_Iterator and Edges_Of_Cycle_Iterator. Add new type
1028 Library_Graph_Cycle_Attributes. Add new components
1029 Cycle_Attributes, Cycles, and Dynamically_Elaborated to type
1030 Library_Graph_Attributes.
1031 (Body_Vertex, Column, Destroy_Invocation_Graph_Edge,
1032 Destroy_Library_Graph_Cycle_Attributes,
1033 Destroy_Library_Graph_Edge, Extra, File_Name, Find_Cycles,
1034 Has_Elaborate_All_Cycle, Has_Next, Hash_Library_Graph_Cycle,
1035 Hash_Library_Graph_Cycle_Attributes, Highest_Precedence_Cycle,
1036 In_Same_Component, Invocation_Edge_Count,
1037 Invocation_Graph_Encoding, Is_Dynamically_Elaborated,
1038 Is_Elaborate_All_Edge, Is_Elaborate_Body_Edge,
1039 Is_Elaborate_Edge, Is_Forced_Edge, Is_Invocation_Edge,
1040 Is_With_Edge, Iterate_All_Cycles, Iterate_Edges_Of_Cycle, Kind):
1041 New routines.
1042 (Length, Lib_Vertex, (Line, Next, Number_Of_Cycles, Present,
1043 Same_Library_Graph_Cycle_Attributes, Spec_Vertex): New routines.
1044 * bindo-units.adb (File_Name, Invocation_Graph_Encoding): New
1045 routines.
1046 * bindo-units.ads: Add new instantiated data structure
1047 Unit_Sets.
1048 (File_Name, Invocation_Graph_Encoding): New routine.
1049 * bindo-validators.adb: Remove with and use clauses for GNAT and
1050 GNAT.Sets. Remove membership set US. Update the parameter
1051 profiles of most routines to use better parameter names. Update
1052 the implementation of most routine to use the new parameter
1053 names.
1054 (Validate_Cycle, Validate_Cycle_Path, Validate_Cycles,
1055 Validate_Invocation_Graph_Vertex): Remove the validation of
1056 component Lib_Vertex. Add the validation of components
1057 Body_Vertex and Spec_Vertex.
1058 (Write_Error): New routine.
1059 * bindo-validators.ads (Validate_Cycles): New routine.
1060 * bindo-writers.adb: Update the parameter profiles of most
1061 routines to use better parameter names. Update the
1062 implementation of most routine to use the new parameter names.
1063 (Write_Cycle, Write_Cyclic_Edge, Write_Cycles): New routines.
1064 (Write_Invocation_Graph_Vertex): Remove the output of component
1065 Lib_Vertex. Add the output of components Body_Vertex and
1066 Spec_Vertex.
1067 * bindo-writers.ads (Write_Cycles): New routine.
1068 * debug.adb: Use binder switches -d_C and -d_P, add
1069 documentation on their usage.
1070 * gnatbind.adb: Remove with and use clauses for Binde. Delegate
1071 the choice of elaboration mechanism to Bindo.
1072 * lib-writ.adb (Column, Extra, Invoker, Kind, Line, Locations,
1073 Name, Placement, Scope, Signature, Target): Removed.
1074 (Write_Invocation_Graph): Moved at the top level.
1075 (Write_Invocation_Graph_Attributes): New routine.
1076 (Write_Invocation_Relation, Write_Invocation_Signature): Moved
1077 at the top level.
1078 * lib-writ.ads: Add a documentation section on invocation graph
1079 attributes.
1080 * sem_elab.adb (Body_Placement_Of): New routine.
1081 (Declare_Invocation_Construct): Update the call to
1082 Add_Invocation_Construct.
1083 (Declaration_Placement_Of_Node): New routine.
1084 (Get_Invocation_Attributes): Correct the retrieval of the
1085 enclosing subprogram where the postcondition procedure lives.
1086 (Placement_Of, Placement_Of_Node): Removed.
1087 (Record_Invocation_Graph): Record the encoding format used.
1088 (Record_Invocation_Graph_Encoding): New routine.
1089 (Record_Invocation_Relation): Update the call to
1090 Add_Invocation_Relation.
1091 (Spec_Placement_Of): Removed.
1092 * libgnat/g-lists.ads, libgnat/g-lists.adb (Equal): New routine.
1093
164597c5 10942019-07-05 Ed Schonberg <schonberg@adacore.com>
1095
1096 * checks.adb (Apply_Predicate_Check): Except within the
1097 subprogram body that defines the formal, do not apply predicate
1098 check on a formal IN parameter: such a check is redundant and
1099 its expansion can lead to out-of-scope references when it is
1100 originates in a function call in a precondition,
1101
572a4bc5 11022019-07-05 Yannick Moy <moy@adacore.com>
1103
1104 * sem_res.adb (Resolve_Call): Cannot inline in quantified
1105 expressions.
1106 * sem_util.adb, sem_util.ads (In_Quantified_Expression): New
1107 function.
1108
2c3ad474 11092019-07-05 Bob Duff <duff@adacore.com>
1110
1111 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
1112 Fix typo.
1113 * gnat_rm.texi: Regenerate.
1114
2f67af4c 11152019-07-05 Bob Duff <duff@adacore.com>
1116
1117 * exp_attr.adb (Input): Take the No_Stream_Optimizations
1118 restriction into account.
1119
1cb1fd0f 11202019-07-05 Claire Dross <dross@adacore.com>
1121
1122 * libgnat/a-cofove.ads, libgnat/a-cofove.adb: Definite formal
1123 vectors are now always bounded so that they do not need to be
1124 limited anymore.
1125
d2d09f3e 11262019-07-05 Dmitriy Anisimkov <anisimko@adacore.com>
1127
1128 * libgnat/g-traceb.ads, libgnat/g-traceb.adb (Call_Chain): New
1129 function.
1130
14e0bfed 11312019-07-04 James Clarke <jrtc27@debian.org>
1132
1133 * libgnarl/s-osinte__kfreebsd-gnu.ads (clockid_t): Make type
1134 definition public.
1135 (CLOCK_REALTIME): Make value public.
1136
ecd07d3b 11372019-07-04 Javier Miranda <miranda@adacore.com>
1138
1139 * exp_tss.adb (Init_Proc): Adding missing support for access to
1140 subprograms and access to protected subprograms of non-default
1141 C++ constructors.
1142
e0ff1639 11432019-07-04 Eric Botcazou <ebotcazou@adacore.com>
1144
1145 * gnat1drv.adb (Adjust_Global_Switches): Use proper interface to
1146 set the validity settings in CodePeer mode.
1147 * par-load.adb (Load): Remove all code dealing with validity
1148 settings.
1149 * validsw.ads (Validity_Check_Copies): Alphabetize.
1150 * validsw.adb (Reset_Validity_Check_Options): Set all options to
1151 off.
1152 (Save_Validity_Check_Options): Save all options.
1153
40bff3a0 11542019-07-04 Hristian Kirtchev <kirtchev@adacore.com>
1155
1156 * exp_ch3.adb, exp_ch4.adb, exp_ch4.ads, exp_ch5.adb,
1157 exp_ch7.adb, exp_ch9.adb, exp_ch11.adb, exp_unst.adb,
1158 rtsfind.ads, sem_attr.adb, sem_ch10.adb, sem_ch12.adb,
1159 sem_ch13.adb, sem_dim.adb, sem_disp.adb, xref_lib.adb: Minor
1160 reformatting.
1161
0ebaade4 11622019-07-04 Joffrey Huguet <huguet@adacore.com>
1163
1164 * libgnarl/a-taside.ads: Add assertion policy to ignore
1165 preconditions.
1166 (Abort_Task, Is_Terminated, Is_Callable): Add preconditions.
1167
f14a590b 11682019-07-04 Eric Botcazou <ebotcazou@adacore.com>
1169
1170 * doc/gnat_rm/implementation_defined_pragmas.rst: Fix
1171 capitalization and parenthesis glitches.
1172 * gnat_rm.texi: Regenerate.
1173
f5388f99 11742019-07-04 Ed Schonberg <schonberg@adacore.com>
1175
1176 * sem_ch10.adb (Remove_Context_Clauses): Handle properly the
1177 removal of a limited_with_clause which appears in the library
1178 unit oF the main unit, when some other unit in the context has a
1179 regular with_clause on the same unit, to prevent spurious
1180 visibility errors in the subsequent analysis of pending instance
1181 bodies.
1182
c930bc82 11832019-07-04 Hristian Kirtchev <kirtchev@adacore.com>
1184
1185 * sem_elab.adb: Add new type Elaboration_Phase_Status along with
1186 a global to keep track of the elaboration phase status.
1187 Initialize all internal data structures to Nil for services
1188 Elaborated_Units, Internal_Representation, and Scenario_Storage.
1189 (Build_Call_Marker): Do not create a call marker when the
1190 elaboration phase is not active.
1191 (Build_Variable_Reference_Marker): Do not create a call marker
1192 when the elaboration phase is not active.
1193 (Check_Elaboration_Scenarios): Destroy all internal structures
1194 when the elaboration phase does not have to run. Do not execute
1195 when the elaboration phase is not active.
1196 (Elaboration_Phase_Active): New routine.
1197 (Finalize_All_Data_Structures): New routine.
1198 (Initialize): Initialize all internal data structures and signal
1199 that the elaboration phase has started.
1200 (Initialize_All_Data_Structures): New routine.
1201 (Initialize_Elaborated_Units): Initialize all internal data
1202 structures.
1203 (Initialize_Internal_Representation): Initialize all internal
1204 data structures.
1205 (Initialize_Scenario_Storage): Initialize all internal data
1206 structures.
1207 (Kill_Elaboration_Scenario): Do not execute when the elaboration
1208 phase is not active.
1209 (Set_Elaboration_Phase): New routine.
1210 (Update_Elaboration_Scenario): Do not execute when the
1211 elaboration phase is not active.
1212
39dec7f4 12132019-07-04 Gary Dismukes <dismukes@adacore.com>
1214
1215 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The special
1216 treatment of calling Mask_Unfrozen_Types must also be done in
1217 the case of an Ignored_Ghost_Entity, because Expander_Active is
1218 False in that case.
1219
92b004be 12202019-07-04 Yannick Moy <moy@adacore.com>
1221
1222 * sem_prag.adb (Check_Library_Level_Entity): Update for new rule
1223 on SPARK_Mode.
1224
12795e1c 12252019-07-04 Justin Squirek <squirek@adacore.com>
1226
1227 * sem_disp.adb (Check_Controlling_Formals): Obtain the full view
1228 before type comparison.
1229
63fe3141 12302019-07-04 Ed Schonberg <schonberg@adacore.com>
1231
1232 * exp_ch4.ads, exp_ch4.adb (Build_Eq_Call): New visible
1233 subprogram, extracted from Expand_Composite_Equality, to handle
1234 properly the composition of equality for variant record types.
1235 * exp_ch3.adb (MAke_Eq_If): Use Build_Eq_Call for each
1236 component, to handle properly the case of a component with a
1237 user-defined equality. Revert to predefined equality if the
1238 user-defined operation is abstract, to maintain compatibility
1239 with older versions,
1240
17fa952a 12412019-07-04 Justin Squirek <squirek@adacore.com>
1242
1243 * exp_ch3.adb (Build_Initialization_Call): Fixup
1244 *_skip_null_excluding_check argument to handle new default.
1245 (Init_Formals): Make *_skip_null_excluding_check formal default
1246 to False
1247 * exp_ch4.adb (Expand_N_Allocator): Add comment to note heavy
1248 code duplication
1249
cf32543d 12502019-07-04 Bob Duff <duff@adacore.com>
1251
1252 * sem_ch3.adb (Access_Definition): Do not create a master unless
1253 Tasking_Allowed. Otherwise, this fails on restricted runtimes.
1254
eb4dbf20 12552019-07-04 Hristian Kirtchev <kirtchev@adacore.com>
1256
1257 * sem_util.adb (Propagate_DIC_Attributes): Do not propagate the
1258 Default_Initial_Condition attributes to an incomplete type.
1259
25ddc6ba 12602019-07-04 Ed Schonberg <schonberg@adacore.com>
1261
1262 * sem_attr.adb (Check_Array_Type): An array type attribute such
1263 as 'First can be applied to an unconstrained array tyope when
1264 the attribute reference appears within an aspect specification
1265 and the prefix is a current instance, given that the prefix of
1266 the attribute will become a formal of the subprogram that
1267 implements the aspect (typically a predicate check).
1268
74a5962a 12692019-07-04 Piotr Trojanek <trojanek@adacore.com>
1270
1271 * sem_util.adb (Yields_Synchronized_Object): Fix typos in
1272 comments.
1273
c65d33a8 12742019-07-04 Yannick Moy <moy@adacore.com>
1275
1276 * sem_util.adb (Yields_Synchronized_Object): Adapt to new SPARK
1277 rule.
1278
afd77d39 12792019-07-04 Yannick Moy <moy@adacore.com>
1280
1281 * sem_spark.adb (Check_Statement): Only check permission of
1282 object in extended return when it is of a deep type.
1283
2281b807 12842019-07-04 Justin Squirek <squirek@adacore.com>
1285
1286 * sem_ch12.adb (Perform_Appropriate_Analysis): Added for
1287 selecting which type of analysis based on wheither the
1288 instantiation is a generic at the library-level. In which case
1289 expansion during analysis.
1290 (Preanalyze_Actuals): Modify calls to Analyze to use the new
1291 routine.
1292
542b3e26 12932019-07-04 Ed Schonberg <schonberg@adacore.com>
1294
1295 * exp_unst.adb: Handle conditional expressions.
1296
7754aad4 12972019-07-04 Yannick Moy <moy@adacore.com>
1298
1299 * sem_spark.adb (Check_Package_Spec, Check_Package_Body): Only
1300 analyze parts of the code marked in SPARK.
1301
3843c1bd 13022019-07-04 Hristian Kirtchev <kirtchev@adacore.com>
1303
1304 * erroutc.adb, exp_aggr.adb, inline.adb, opt.adb, sem_ch3.adb:
1305 Minor reformatting.
1306
5bc0f990 13072019-07-04 Yannick Moy <moy@adacore.com>
1308
1309 * sem_spark.adb (Explanation, Get_Expl): New functions to get
1310 the explanation for a permission mismatch.
1311 (Perm_Error, Perm_Mismatch, Perm_Error_Loop_Exit): Take
1312 explanation into account for issuing a more precise error
1313 message.
1314 (Set_Perm_Prefixes, Set_Perm_Extensions,
1315 Set_Perm_Extensions_Move): Pass suitable argument for the
1316 explanation node.
1317
11903e68 13182019-07-04 Arnaud Charlet <charlet@adacore.com>
1319
1320 * exp_aggr.adb (In_Place_Assign_OK): Moved to top level and add
1321 support for record aggregates.
1322 (Component_Check): Use Is_CCG_Supported_Aggregate instead of a
1323 similar local predicate.
1324 (Convert_To_Assignments): Take advantage of In_Place_Assign_OK
1325 predicate when possible.
1326 (Is_CCG_Supported_Aggregate): Return False for records with
1327 representation clauses and fix the logic for dealing with nested
1328 aggregates.
1329
b0c19ea3 13302019-07-04 Piotr Trojanek <trojanek@adacore.com>
1331
1332 * opt.adb (Set_Config_Switches): Keep assertions policy as
1333 enabled when analysing internal units in GNATprove mode.
1334
90f2b146 13352019-07-04 Arnaud Charlet <charlet@adacore.com>
1336
1337 * exp_ch4.adb (Expand_Short_Circuit_Operator): Strip
1338 N_Variable_Reference_Marker when checking for the presence of
1339 actions.
1340
39ecad34 13412019-07-04 Arnaud Charlet <charlet@adacore.com>
1342
1343 * exp_aggr.adb (Check_Component): Take into account type
1344 conversions.
1345
c0e899f1 13462019-07-04 Dmitriy Anisimkov <anisimko@adacore.com>
1347
1348 * doc/gnat_ugn/platform_specific_information.rst: Document
1349 Windows socket timeout particularity.
1350 * gnat_ugn.texi: Regenerate.
1351 * gsocket.h: Include versionhelpers.h.
1352 * socket.c (__gnat_minus_500ms): New function.
1353 * libgnat/g-sothco.ads (Minus_500ms_Windows_Timeout): New
1354 imported function.
1355 * libgnat/g-socket.adb (Set_Socket_Option): Refactor to remove
1356 500ms from the requested timeout only on old Windows version.
1357
363b1a8e 13582019-07-04 Thomas Quinot <quinot@adacore.com>
1359
1360 * get_scos.adb: Remove bogus, dead code.
1361
4ae0a9ce 13622019-07-04 Ed Schonberg <schonberg@adacore.com>
1363
1364 * sem_dim.adb (Analyze_Dimension_Array_Aggregate): If the
1365 component is an entity name, its dimensions are those of its
1366 type.
1367
d60fa3c9 13682019-07-03 Bob Duff <duff@adacore.com>
1369
1370 * doc/gnat_ugn/gnat_utility_programs.rst: Document new flags in
1371 GNATpp.
1372
877ad320 13732019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
1374
1375 * binde.adb: Remove with clause for System.OS_Lib.
1376 (Force_Elab_Order): Refactor the majority of the code in Butil.
1377 Use the new forced units iterator to obtain unit names.
1378 * bindo-builders.adb: Add with and use clauses for Binderr,
1379 Butil, Opt, Output, Types, GNAT, and GNAT.Dynamic_HTables. Add
1380 a hash table which maps units to line number in the forced
1381 elaboration order file.
1382 (Add_Unit): New routine.
1383 (Build_Library_Graph): Create forced edges between pairs of
1384 units listed in the forced elaboration order file.
1385 (Create_Forced_Edge, Create_Forced_Edges, Destroy_Line_Number,
1386 Duplicate_Unit_Error, Hash_Unit, Internal_Unit_Info,
1387 Is_Duplicate_Unit, Missing_Unit_Info): New routines.
1388 * bindo-graphs.adb (Is_Internal_Unit, Is_Predefined_Unit):
1389 Refactor some of the behavior to Bindo-Units.
1390 * bindo-graphs.ads: Enable the enumeration literal for forced
1391 edges.
1392 * bindo-units.adb, bindo-units.ads (Is_Internal_Unit,
1393 Is_Predefined_Unit): New routines.
1394 * butil.adb: Add with and use clauses for Opt, GNAT, and
1395 System.OS_Lib. Add with clause for Unchecked_Deallocation.
1396 (Has_Next, Iterate_Forced_Units, Next, Parse_Next_Unit_Name,
1397 Read_Forced_Elab_Order_File): New routines.
1398 * butil.ads: Add with and use clauses for Types. Add new
1399 iterator over the units listed in the forced elaboration order
1400 file.
1401 (Has_Next, Iterate_Forced_Units, Next): New routine.
1402 * namet.adb, namet.ads (Present): New routine.
1403
01e6eb2f 14042019-07-03 Bob Duff <duff@adacore.com>
1405
1406 * sem_ch3.adb (Access_Definition): The code was creating a
1407 master in the case where the designated type is a class-wide
1408 interface type. Create a master in the noninterface case as
1409 well. That is, create a master for all limited class-wide types.
1410
9ad42832 14112019-07-03 Yannick Moy <moy@adacore.com>
1412
1413 * erroutc.adb (Sloc_In_Range): New function to determine whether
1414 the range of a pragma Warnings covers a location, taking
1415 instantiations into account.
1416
f2a8d64e 14172019-07-03 Johannes Kanig <kanig@adacore.com>
1418
1419 * osint.ads, osint.adb (Get_First_Main_File_Name): New routine
1420 to access the first file provided on the command line.
1421
d4f28933 14222019-07-03 Ed Schonberg <schonberg@adacore.com>
1423
1424 * inline.adb (Process_Formals_In_Aspects): New procedure within
1425 Expand_Inlined_Call, to perform a replacement of references to
1426 formals that appear in aspect specifications within the body
1427 being inlined.
1428
23e7fc9b 14292019-07-03 Justin Squirek <squirek@adacore.com>
1430
1431 * sem_ch8.adb (Analyze_Object_Renaming): Add call to search for
1432 the appropriate actual subtype of the object renaming being
1433 analyzed.
1434 (Check_Constrained_Object): Minor cleanup.
1435
f8e6d133 14362019-07-03 Yannick Moy <moy@adacore.com>
1437
1438 * sem_spark.adb (Get_Observed_Or_Borrowed_Expr): New function to
1439 return go through traversal function call.
1440 (Check_Type): Consistently use underlying type.
1441 (Get_Perm): Adapt for case of elaboration code where variables
1442 are not declared in the environment. Remove incorrect handling
1443 of borrow and observe.
1444
d044ba5c 14452019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
1446
1447 * inline.adb (Build_Return_Object_Formal): New routine.
1448 (Can_Split_Unconstrained_Function): Code clean up.
1449 (Copy_Formals,Copy_Return_Object): New routines.
1450 (Split_Unconstrained_Function): Code clean up and refactoring.
1451
8699de72 14522019-07-03 Gary Dismukes <dismukes@adacore.com>
1453
1454 * bindo-augmentors.adb, bindo-augmentors.ads,
1455 bindo-builders.ads, bindo-elaborators.adb, sem_ch12.adb,
1456 sem_ch13.adb, sem_spark.adb, sinfo.ads: Minor editorial
1457 corrections and reformatting.
1458
2ccf6539 14592019-07-03 Bob Duff <duff@adacore.com>
1460
1461 * sem_warn.adb (Check_Infinite_Loop_Warning): Avoid the warning
1462 if an Iterator_Specification is present.
1463
17b5260d 14642019-07-03 Bob Duff <duff@adacore.com>
1465
1466 * doc/gnat_ugn/gnat_utility_programs.rst: Document default
1467 new-line behavior.
1468
5f71d12c 14692019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
1470
1471 * ali.adb: Add with and use clauses for GNAT,
1472 GNAT.Dynamic_HTables, and Snames. Add a map from invocation
1473 signature records to invocation signature ids. Add various
1474 encodings of invocation-related attributes. Sort and update
1475 table Known_ALI_Lines.
1476 (Add_Invocation_Construct, Add_Invocation_Relation,
1477 Body_Placement_Kind_To_Code, Code_To_Body_Placement_Kind,
1478 Code_To_Invocation_Construct_Kind, Code_To_Invocation_Kind,
1479 Code_To_Invocation_Graph_Line_Kind, Destroy, Hash): New
1480 routines.
1481 (Initialize_ALI): Sort the initialization sequence. Add
1482 initialization for all invocation-related tables.
1483 (Invocation_Construct_Kind_To_Code,
1484 Invocation_Graph_Line_Kind_To_Code, Invocation_Kind_To_Code,
1485 Invocation_Signature_Of, Present): New routines.
1486 (Scan_ALI): Add the default values for invocation-related ids.
1487 Scan invocation graph lines.
1488 (Scan_Invocation_Graph_Line): New routine.
1489 * ali.ads: Add with clause for GNAT.Dynamic_Tables. Add types
1490 for invocation constructs, relations, and signatures. Add
1491 tables for invocation constructs, relations, and signatures.
1492 Update Unit_Record to capture invocation-related ids. Relocate
1493 table Unit_Id_Tables and subtypes Unit_Id_Table, Unit_Id_Array
1494 from Binde.
1495 (Add_Invocation_Construct, Add_Invocation_Relation,
1496 Body_Placement_Kind_To_Code, Code_To_Body_Placement_Kind,
1497 Code_To_Invocation_Construct_Kind, Code_To_Invocation_Kind,
1498 Code_To_Invocation_Graph_Line_Kind,
1499 Invocation_Construct_Kind_To_Code,
1500 Invocation_Graph_Line_Kind_To_Code, Invocation_Kind_To_Code,
1501 Invocation_Signature_Of, Present): New routines.
1502 * binde.adb: Add with and use clause for Types. Add use clause
1503 for ALI.Unit_Id_Tables;
1504 * binde.ads: Relocate table Unit_Id_Tables and subtypes
1505 Unit_Id_Table, Unit_Id_Array to ALI.
1506 * bindgen.adb: Remove with and use clause for ALI.
1507 * bindgen.ads: Remove with and use clause for Binde. Add with
1508 and use clause for ALI.
1509 * bindo.adb, bindo.ads, bindo-augmentors.adb,
1510 bindo-augmentors.ads, bindo-builders.adb, bindo-builders.ads,
1511 bindo-diagnostics.adb, bindo-diagnostics.ads,
1512 bindo-elaborators.adb, bindo-elaborators.ads, bindo-graphs.adb,
1513 bindo-graphs.ads, bindo-units.adb, bindo-units.ads,
1514 bindo-validators.adb, bindo-validators.ads, bindo-writers.adb,
1515 bindo-writers.ads: New units.
1516 * debug.adb: Use and describe GNAT debug switches -gnatd_F and
1517 -gnatd_G. Add GNATbind debug switches in the ranges dA .. dZ,
1518 d.a .. d.z, d.A .. d.Z, d.1 .. d.9, d_a .. d_z, d_A .. d_Z, and
1519 d_1 .. d_9. Use and describe GNATbind debug switches -d_A,
1520 -d_I, -d_L, -d_N, -d_O, -d_T, and -d_V.
1521 * exp_util.adb, exp_util.ads (Exceptions_OK): Relocate to
1522 Sem_Util.
1523 * gnatbind.adb: Add with and use clause for Bindo. Use the new
1524 Bindo elaboration order only when -d_N is in effect.
1525 * lib-writ.adb
1526 (Column, Extra, Invoker, Kind, Line, Locations, Name, Placement,
1527 Scope, Signature, Target): New routines.
1528 (Write_ALI): Output all invocation-related data.
1529 (Write_Invocation_Graph): New routine.
1530 * lib-writ.ads: Document the invocation graph ALI line.
1531 * namet.adb, namet.ads (Present): New routines.
1532 * sem_ch8.adb (Find_Direct_Name): Capture the status of
1533 elaboration checks and warnings of an identifier.
1534 (Find_Expanded_Name): Capture the status of elaboration checks
1535 and warnings of an expanded name.
1536 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Ensure
1537 that invocation graph-related data within the body of the main
1538 unit is encoded in the ALI file.
1539 (Analyze_Generic_Subprogram_Declaration): Ensure that invocation
1540 graph-related data within the body of the main unit is encoded
1541 in the ALI file.
1542 (Analyze_Package_Instantiation): Perform minimal decoration of
1543 the instance entity.
1544 (Analyze_Subprogram_Instantiation): Perform minimal decoration
1545 of the instance entity.
1546 * sem_elab.adb: Perform heavy refactoring of all code. The unit
1547 is now split into "services" which specialize in one area of ABE
1548 checks. Add processing in order to capture invocation-graph
1549 related attributes of the main unit, and encode them in the ALI
1550 file. The Processing phase can now operate in multiple modes,
1551 all described by type Processing_Kind. Scenarios and targets
1552 are now distinct at the higher level, and carry their own
1553 representations. This eliminates the need to constantly
1554 recompute their attributes, and offers the various processors a
1555 uniform interface. The various initial states of the Processing
1556 phase are now encoded using type Processing_In_State, and
1557 xxx_State constants.
1558 * sem_elab.ads: Update the literals of type
1559 Enclosing_Level_Kind. Add Inline pragmas on several routines.
1560 * sem_prag.adb (Process_Inline): Ensure that invocation
1561 graph-related data within the body of the main unit is encoded
1562 in the ALI file.
1563 * sem_util.adb (Enclosing_Generic_Body, Enclosing_Generic_Unit):
1564 Code clean up.
1565 (Exceptions_OK): Relocated from Sem_Util.
1566 (Mark_Save_Invocation_Graph_Of_Body): New routine.
1567 * sem_util.ads (Exceptions_OK): Relocated from Sem_Util.
1568 (Mark_Save_Invocation_Graph_Of_Body): New routine.
1569 * sinfo.adb (Is_Elaboration_Checks_OK_Node): Now applicable to
1570 N_Variable_Reference_Marker.
1571 (Is_Elaboration_Warnings_OK_Node): Now applicable to
1572 N_Expanded_Name, N_Identifier, N_Variable_Reference_Marker.
1573 (Is_Read): Use Flag4.
1574 (Is_SPARK_Mode_On_Node): New applicable to
1575 N_Variable_Reference_Marker.
1576 (Is_Write): Use Flag5.
1577 (Save_Invocation_Graph_Of_Body): New routine.
1578 (Set_Is_Elaboration_Checks_OK_Node): Now applicable to
1579 N_Variable_Reference_Marker.
1580 (Set_Is_Elaboration_Warnings_OK_Node): Now applicable to
1581 N_Expanded_Name, N_Identifier, N_Variable_Reference_Marker.
1582 (Set_Is_SPARK_Mode_On_Node): New applicable to
1583 N_Variable_Reference_Marker.
1584 (Set_Save_Invocation_Graph_Of_Body): New routine.
1585 * sinfo.ads: Update the documentation of attributes
1586 Is_Elaboration_Checks_OK_Node, Is_Elaboration_Warnings_OK_Node,
1587 Is_SPARK_Mode_On_Node. Update the flag usage of attributes
1588 Is_Read, Is_Write. Add attribute Save_Invocation_Graph_Of_Body
1589 and update its occurrence in nodes.
1590 (Save_Invocation_Graph_Of_Body): New routine along with pragma
1591 Inline.
1592 (Set_Save_Invocation_Graph_Of_Body): New routine along with
1593 pragma Inline.
1594 * switch-b.adb (Scan_Binder_Switches): Refactor the scanning of
1595 debug switches.
1596 (Scan_Debug_Switches): New routine.
1597 * libgnat/g-dynhta.adb, libgnat/g-dynhta.ads (Contains): New routine.
1598 * libgnat/g-graphs.adb (Associate_Vertices): Update the use of
1599 Component_Vertex_Iterator.
1600 (Contains_Component, Contains_Edge, Contains_Vertex, Has_Next):
1601 Reimplemented.
1602 (Iterate_Component_Vertices): New routine.
1603 (Iterate_Vertices): Removed.
1604 (Next): Update the parameter profile.
1605 (Number_Of_Component_Vertices, Number_Of_Outgoing_Edges): New
1606 routines.
1607 * libgnat/g-graphs.ads: Update the initialization of
1608 No_Component. Add type Component_Vertex_Iterator. Remove type
1609 Vertex_Iterator.
1610 (Has_Next): Add new versions and remove old ones.
1611 (Iterate_Component_Vertices): New routine.
1612 (Iterate_Vertices): Removed.
1613 (Next): Add new versions and remove old ones.
1614 (Number_Of_Component_Vertices, Number_Of_Outgoing_Edges): New
1615 routines.
1616 * libgnat/g-sets.adb (Contains): Reimplemented.
1617 * gcc-interface/Make-lang.in (GNATBIND_OBJS): Add
1618 GNAT.Dynamic_HTables, GNAT.Graphs and Bindo units.
1619 * rtsfind.ads: Remove extra space.
1620
df177848 16212019-07-03 Yannick Moy <moy@adacore.com>
1622
1623 * sem_spark.adb: Add support for locally borrowing and observing
1624 a path.
1625 (Get_Root_Object): Add parameter Through_Traversal to denote
1626 when we are interesting in getting to the traversed parameter.
1627 (Is_Prefix_Or_Almost): New function to support detection of
1628 illegal access to borrowed or observed paths.
1629 (Check_Pragma): Add analysis of assertion pragmas.
1630
f3f142ac 16312019-07-03 Ed Schonberg <schonberg@adacore.com>
1632
1633 * sem_ch13.adb (Build_Predicate_Functions): In a generic context
1634 we do not build the bodies of predicate fuctions, but the
1635 expression in a static predicate must be elaborated to allow
1636 case coverage checking within the generic unit.
1637 (Build_Discrete_Static_Predicate): In a generic context, return
1638 without building function body once the
1639 Static_Discrete_Predicate expression for the type has been
1640 constructed.
1641
99d90c85 16422019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
1643
1644 * bindgen.adb, inline.adb, layout.adb, sem_ch12.adb,
1645 sem_ch13.adb, sem_ch7.adb, styleg.adb: Minor reformatting.
1646
800597f6 16472019-07-03 Bob Duff <duff@adacore.com>
1648
1649 * par-ch3.adb (P_Defining_Identifier): Call
1650 Check_Defining_Identifier_Casing.
1651 * style.ads, styleg.ads, styleg.adb
1652 (Check_Defining_Identifier_Casing): New procedure to check for
1653 mixed-case defining identifiers.
1654 * stylesw.ads, stylesw.adb (Style_Check_Mixed_Case_Decls): New
1655 flag for checking for mixed-case defining identifiers.
1656 * doc/gnat_ugn/building_executable_programs_with_gnat.rst:
1657 Document new feature.
1658 * gnat_ugn.texi: Regenerate.
1659
2c75027a 16602019-07-03 Eric Botcazou <ebotcazou@adacore.com>
1661
1662 * doc/gnat_ugn/building_executable_programs_with_gnat.rst
1663 (Warning message control): Document that -gnatw.z/Z apply to
1664 array types.
1665 * freeze.adb (Freeze_Entity): Give -gnatw.z warning for array
1666 types as well, but not if the specified alignment is the minimum
1667 one.
1668 * gnat_ugn.texi: Regenerate.
1669
08237d0d 16702019-07-03 Bob Duff <duff@adacore.com>
1671
1672 * einfo.ads, exp_util.adb, layout.ads, sinfo.ads: Spell "laid"
1673 correctly.
1674
0396441f 16752019-07-03 Ed Schonberg <schonberg@adacore.com>
1676
1677 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): No error
1678 message on attribute applied to a renaming when the renamed
1679 object is an aggregate (from code reading).
1680 (Check_Aspect_At_End_Of_Declarations): In a generic context
1681 where freeze nodes are not generated, the original expression
1682 for an aspect may need to be analyzed to precent spurious
1683 conformance errors when compared with the expression that is
1684 anakyzed at the end of the current declarative list.
1685
c8406f30 16862019-07-03 Eric Botcazou <ebotcazou@adacore.com>
1687
1688 * layout.adb (Layout_Type): Do not set the component size of an
1689 array with a scalar component if the component type is
1690 overaligned.
1691
c38b32ea 16922019-07-03 Ed Schonberg <schonberg@adacore.com>
1693
1694 * inline.adb (Make_Loop_Labels_Unique): New procedure to modify
1695 the source code of subprograms that are inlined by the
1696 front-end, to prevent accidental duplication between loop labels
1697 in the inlined code and the code surrounding the inlined call.
1698
6d6f134e 16992019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
1700
1701 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update
1702 the section on resolving elaboration circularities to eliminate
1703 certain combinations of switches which together do not produce
1704 the desired effect and confuse users.
1705 * gnat_ugn.texi: Regenerate.
1706
f3e16ef4 17072019-07-03 Arnaud Charlet <charlet@adacore.com>
1708
1709 * bindgen.adb (Gen_Main): Disable generation of reference to
1710 Ada_Main_Program_Name for CCG.
1711 * bindusg.adb (Display): Add -G to the command-line usage for
1712 gnatbind.
1713 * opt.ads (Generate_C_Code): Update comment.
1714 * switch-b.adb (Scan_Binder_Switches): Add handling for -G.
1715
f4a31b16 17162019-07-03 Arnaud Charlet <charlet@adacore.com>
1717
1718 * sem_ch7.adb (Has_Referencer): Do not consider inlined
1719 subprograms when generating C code, which allows us to generate
1720 static inline subprograms.
1721
2f65e9f7 17222019-07-03 Justin Squirek <squirek@adacore.com>
1723
1724 * sem_ch6.adb (Check_Conformance): Add expression checking for
1725 constant modifiers in anonymous access types (in addition to
1726 "non-null" types) so that they are considered "matching" for
1727 subsequent conformance tests.
1728
c336ed70 17292019-07-03 Arnaud Charlet <charlet@adacore.com>
1730
1731 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
1732 Clarify wording on No_Multiple_Elaboration.
1733 * gnat_rm.texi: Regenerate.
1734
78611c86 17352019-07-03 Ed Schonberg <schonberg@adacore.com>
1736
1737 * sem_ch8.adb (Find_Selected_Component): If the prefix is the
1738 current instance of a type or subtype, complete the resolution
1739 of the name by finding the component of the type denoted by the
1740 selector name.
1741
5a87a4d9 17422019-07-03 Eric Botcazou <ebotcazou@adacore.com>
1743
1744 * doc/gnat_rm/interfacing_to_other_languages.rst (Interfacing to C):
1745 Document that boolean types with convention C now map to C99 bool.
1746 * gnat_rm.texi: Regenerate.
1747
371c539c 17482019-07-03 Javier Miranda <miranda@adacore.com>
1749
1750 * exp_attr.adb (Expand_Min_Max_Attribute): Code cleanup:
1751 removing code that it is now never executed in the CCG compiler
1752 (dead code).
1753
89d2d652 17542019-07-02 Iain Sandoe <iain@sandoe.co.uk>
1755
1756 * libgnat/system-darwin-ppc.ads: Set Stack_Check_Probes True for
1757 PPC Darwin.
1758
d21e66fb 17592019-07-01 Ed Schonberg <schonberg@adacore.com>
1760
1761 * sem_ch12.adb (Is_Defaulted): New predicate in
1762 Check_Formal_Package_Intance, to skip the conformance of checks
1763 on parameters of a formal package that are defaulted,
1764
7a42b778 17652019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
1766
1767 * checks.adb, exp_ch9.adb, exp_unst.adb, sem_ch4.adb,
1768 sem_prag.adb, sem_spark.adb: Minor reformatting.
1769
fc8ae496 17702019-07-01 Ed Schonberg <schonberg@adacore.com>
1771
1772 * sem_attr.adb (Analyze_Attribute, case Enum_Rep): Allow prefix
1773 of attribute to be an attribute reference of a discrete type.
1774
9d27ea41 17752019-07-01 Eric Botcazou <ebotcazou@adacore.com>
1776
1777 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Move up
1778 handling of Has_Pragma_Inline_Always and deal with
1779 Has_Pragma_No_Inline.
1780
bcb8dcf3 17812019-07-01 Ed Schonberg <schonberg@adacore.com>
1782
1783 * sem_ch3.adb (Build_Derived_Record_Type): If the parent type is
1784 declared as a subtype of a private type with an inherited
1785 discriminant constraint, its generated full base appears as a
1786 record subtype, so we need to retrieve its oen base type so that
1787 the inherited constraint can be applied to it.
1788
d087b9ca 17892019-07-01 Yannick Moy <moy@adacore.com>
1790
1791 * sem_spark.adb: Completely rework the algorithm for ownership
1792 checking, as the rules in SPARK RM have changed a lot.
1793 * sem_spark.ads: Update comments.
1794
fe48ee0a 17952019-07-01 Dmitriy Anisimkov <anisimko@adacore.com>
1796
1797 * gsocket.h (Has_Sockaddr_Len): Use the offset of sin_family offset in
1798 the sockaddr_in structure to determine the existence of length field
1799 before the sin_family.
1800
b20f7e2c 18012019-07-01 Ed Schonberg <schonberg@adacore.com>
1802
1803 * sem_prag.adb (Analyze_Pragma, case Weak_External): Pragma only
1804 applies to entities with run-time addresses, not to types.
1805
374fdf94 18062019-07-01 Piotr Trojanek <trojanek@adacore.com>
1807
1808 * einfo.adb, sem_ch7.adb, sem_prag.adb, sem_util.adb: Update
1809 references to the SPARK RM after the removal of Rule 7.1.4(5).
1810
bf13a79d 18112019-07-01 Piotr Trojanek <trojanek@adacore.com>
1812
1813 * sysdep.c: Cleanup references to LynuxWorks in docs and
1814 comments.
1815
866fa2d0 18162019-07-01 Ed Schonberg <schonberg@adacore.com>
1817
1818 * checks.adb (Insert_Valid_Check): Do not apply validity check
1819 to variable declared within a protected object that uses the
1820 Lock_Free implementation, to prevent unwarranted constant
1821 folding, because entities within such an object msut be treated
1822 as volatile.
1823
bcb5ab83 18242019-07-01 Eric Botcazou <ebotcazou@adacore.com>
1825
1826 * exp_ch9.adb (Check_Inlining): Deal with Has_Pragma_No_Inline.
1827
2db33bd6 18282019-07-01 Ed Schonberg <schonberg@adacore.com>
1829
1830 * exp_unst.adb (Visit_Node, Check_Static_Type): Improve the
1831 handling of private and incomplete types whose full view is an
1832 access type, to detect additional uplevel references in dynamic
1833 bounds. This is relevant to N_Free_Statement among others that
1834 manipulate types whose full viww may be an access type.
1835
6b4f0b7d 18362019-07-01 Pat Rogers <rogers@adacore.com>
1837
1838 * doc/gnat_rm/representation_clauses_and_pragmas.rst: Correct
1839 size indicated for R as a component of an array.
1840 * gnat_rm.texi: Regenerate.
1841
cdee70d7 18422019-07-01 Justin Squirek <squirek@adacore.com>
1843
1844 * libgnat/s-win32.ads: Add definition for ULONG, modify
1845 OVERLAPPED type, and add appropriate pragmas.
1846
2cf822b7 18472019-07-01 Bob Duff <duff@adacore.com>
1848
1849 * gnat1drv.adb (gnat1drv): Call Write_ALI if the main unit is
1850 ignored-ghost.
1851
0a1ece97 18522019-07-01 Yannick Moy <moy@adacore.com>
1853
1854 * sem_ch4.adb (Operator_Check): Refine error message.
1855
ee4279ef 18562019-07-01 Piotr Trojanek <trojanek@adacore.com>
1857
1858 * libgnat/a-calend.ads: Revert "Global => null" contracts on
1859 non-pure routines.
1860
2c6b4ada 18612019-07-01 Piotr Trojanek <trojanek@adacore.com>
1862
1863 * exp_attr.adb, libgnat/g-graphs.ads: Fix typos in comments:
1864 componant -> component.
1865
175c4526 18662019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
1867
1868 * libgnat/g-graphs.adb: Use type Directed_Graph rather than
1869 Instance in various routines.
1870 * libgnat/g-graphs.ads: Change type Instance to Directed_Graph.
1871 Update various routines that mention the type.
1872
a0d15509 18732019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
1874
1875 * libgnat/g-sets.adb: Use type Membership_Set rathern than
1876 Instance in various routines.
1877 * libgnat/g-sets.ads: Change type Instance to Membership_Set.
1878 Update various routines that mention the type.
1879
205a23a3 18802019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
1881
1882 * libgnat/g-lists.adb: Use type Doubly_Linked_List rather than
1883 Instance in various routines.
1884 * libgnat/g-lists.ads: Change type Instance to
1885 Doubly_Linked_List. Update various routines that mention the
1886 type.
1887
17fdf8c2 18882019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
1889
1890 * libgnat/g-dynhta.adb: Use type Dynamic_Hash_Table rather than
1891 Instance in various routines.
1892 * libgnat/g-dynhta.ads: Change type Instance to
1893 Dynamic_Hash_Table. Update various routines that mention the
1894 type.
1895
216ffc64 18962019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
1897
1898 * exp_attr.adb, exp_ch7.adb, exp_unst.adb, sem_ch3.adb,
1899 sem_util.adb, uintp.adb, uintp.ads: Minor reformatting.
1900
5051fe35 19012019-07-01 Javier Miranda <miranda@adacore.com>
1902
1903 * exp_attr.adb (Expand_Min_Max_Attribute): Disable expansion of
1904 'Min/'Max on integer, enumeration, fixed point and floating
1905 point types since the CCG backend now provides in file
1906 standard.h routines to support it.
1907
830a2a71 19082019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
1909
1910 * impunit.adb: Add GNAT.Graphs to list Non_Imp_File_Names_95.
1911 * Makefile.rtl, gcc-interface/Make-lang.in: Register unit
1912 GNAT.Graphs.
1913 * libgnat/g-dynhta.adb: Various minor cleanups (use Present
1914 rather than direct comparisons).
1915 (Delete): Reimplement to use Delete_Node.
1916 (Delete_Node): New routine.
1917 (Destroy_Bucket): Invoke the provided destructor.
1918 (Present): New routines.
1919 * libgnat/g-dynhta.ads: Add new generic formal Destroy_Value.
1920 Use better names for the components of iterators.
1921 * libgnat/g-graphs.adb, libgnat/g-graphs.ads: New unit.
1922 * libgnat/g-lists.adb: Various minor cleanups (use Present
1923 rather than direct comparisons).
1924 (Delete_Node): Invoke the provided destructor.
1925 (Present): New routine.
1926 * libgnat/g-lists.ads: Add new generic formal Destroy_Element.
1927 Use better names for the components of iterators.
1928 (Present): New routine.
1929 * libgnat/g-sets.adb, libgnat/g-sets.ads (Destroy, Preset,
1930 Reset): New routines.
1931
b0111d94 19322019-07-01 Dmitriy Anisimkov <anisimko@adacore.com>
1933
1934 * libgnat/g-sothco.adb (Get_Address): Fix the case when AF_INET6
1935 is not defined.
1936
7362896b 19372019-07-01 Ed Schonberg <schonberg@adacore.com>
1938
1939 * exp_attr.adb (Expand_Attribute_Reference, case Invalid_Value):
1940 Resolve result of call to Get_Simple_Init_Val, which may be a
1941 conversion of a literal.
1942
0dae8dc2 19432019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
1944
1945 * freeze.adb (Freeze_Expression): Remove the horrible useless
1946 name hiding of N. Insert the freeze nodes generated by the
1947 expression prior to the expression when the nearest enclosing
1948 scope is transient.
1949
487da8ff 19502019-07-01 Pierre-Marie de Rodat <derodat@adacore.com>
1951
1952 * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Fix
1953 formatting issues in the -gnatR section.
1954 * gnat_ugn.texi: Regenerate.
1955
1d79fa18 19562019-06-30 Iain Sandoe <iain@sandoe.co.uk>
1957
1958 * gnatlink.adb (Link_Step): Remove duplicate -static-libgcc switches.
1959 Push -shared-libgcc explicitly, when it is the target default (unless
1960 overidden by the static flag).
1961 When the user has put an instance of shared/static-libgcc do not push
1962 a duplicate of this.
1963
a850edcd 19642019-06-29 Eric Botcazou <ebotcazou@adacore.com>
1965
1966 * gcc-interface/decl.c (gnat_to_gnu_entity): Beep up comment on SAVED,
1967 and tweak comment on the assertion about the scopes of Itypes. Do not
1968 skip the regular processing for Itypes that are E_Record_Subtype with
1969 a Cloned_Subtype. Get the Cloned_Subtype for every E_Record_Subtype
1970 if the type is dummy and hasn't got its own freeze node.
1971 <E_Record_Subtype>: Save again the DECL of the Cloned_Subtype, if any.
1972 <E_Access_Subtype>: Save again the DECL of the equivalent type.
1973 (Gigi_Equivalent_Type) <E_Access_Subtype>: New case.
1974
b1e46fb1 19752019-06-29 Eric Botcazou <ebotcazou@adacore.com>
1976
1977 * gcc-interface/utils.c (unchecked_convert): Tweak comment. Only skip
1978 dereferences when padding to have the same size on both sides. Do it
1979 for destination types with self-referential size too.
1980
07e38949 19812019-06-29 Eric Botcazou <ebotcazou@adacore.com>
1982
1983 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: If the
1984 type requires strict alignment, then set the RM size to the type size.
1985 Rework handling of alignment and sizes of tagged types in ASIS mode.
1986 (validate_size): Rename local variable and remove special handling for
1987 strict-alignment types.
1988 * gcc-interface/utils.c (finish_record_type): Constify local variables
1989 and use properly typed constants.
1990
f4409741 19912019-06-29 Eric Botcazou <ebotcazou@adacore.com>
1992
1993 * gcc-interface/decl.c (gnat_to_gnu_field): Rework error messages for
1994 fields requiring strict alignment, add explicit test on Storage_Unit
1995 for position and size, and mention type alignment for position.
1996
5882c515 19972019-06-29 Eric Botcazou <ebotcazou@adacore.com>
1998
1999 * gcc-interface/trans.c (mark_visited_r): Set TYPE_SIZES_GIMPLIFIED on
2000 the main variant of a type, if any.
2001
d0de0a27 20022019-06-29 Eric Botcazou <ebotcazou@adacore.com>
2003
2004 * gcc-interface/decl.c (set_nonaliased_component_on_array_type): Add
2005 missing guard for the presence of TYPE_CANONICAL.
2006 (set_reverse_storage_order_on_array_type): Likewise.
2007
2074c859 20082019-06-29 Eric Botcazou <ebotcazou@adacore.com>
2009
2010 * gcc-interface/gigi.h (make_packable_type): Remove default value.
2011 (value_factor_p): Tweak prototype.
2012 * gcc-interface/decl.c (gnat_to_gnu_entity): Add comment.
2013 (gnat_to_gnu_component_type): Likewise.
2014 (gnat_to_gnu_field): Likewise. Fetch the position of the field earlier
2015 and simplify the condition under which the type is packed. Declare
2016 local variable is_bitfield. Pass 1 as max_align to make_packable_type
2017 if it is set to true.
2018 (copy_and_substitute_in_layout): Pass 0 to make_packable_type.
2019 * gcc-interface/utils.c (make_packable_array_type): New function.
2020 (make_packable_type): Use it to rewrite the type of array field.
2021 (maybe_pad_type): Pass align parameter to make_packable_type.
2022 (create_field_decl): Minor tweaks.
2023 (value_factor_p): Assert that FACTOR is a power of 2 and replace the
2024 modulo computation by a masking operation.
2025
83c6da22 20262019-06-25 Eric Botcazou <ebotcazou@adacore.com>
2027
2028 * gcc-interface/decl.c (gnat_to_gnu_entity): Remove superfluous test
2029 in previous change.
2030 * gcc-interface/gigi.h (maybe_character_type): Fix formatting.
2031 (maybe_character_value): Likewise.
2032
aaabc7bc 20332019-06-24 Jan Hubicka <jh@suse.cz>
2034
2035 * gcc-interface/decl.c (gnat_to_gnu_entity): Check that
2036 type is array or integer prior checking string flag.
83c6da22 2037 * gcc-interface/gigi.h (maybe_character_type): Likewise.
2038 (maybe_character_value): Likewise.
aaabc7bc 2039
5fe09a56 20402019-06-24 Martin Sebor <msebor@redhat.com>
2041
2042 * gcc-interface/utils.c (handle_nonnull_attribute): Quote attribute
2043 name.
2044
bd9331d6 20452019-06-18 Arnaud Charlet <charlet@adacore.com>
2046
83c6da22 2047 PR ada/80590
bd9331d6 2048 * sem_ch5.adb (Analyze_Loop_Statement): Avoid exception propagation
2049 during normal processing.
2050
8a5a7d1c 20512019-06-17 Arnaud Charlet <charlet@adacore.com>
2052
83c6da22 2053 PR ada/80590
8a5a7d1c 2054 * exp_ch9.adb (Expand_N_Delay_Relative_Statement): Swap the two
2055 conditions to avoid a unnecessary exception propagation in the default
2056 case.
2057
580934f6 20582019-05-28 Eric Botcazou <ebotcazou@adacore.com>
2059
2060 * gcc-interface/utils.c (handle_stack_protect_attribute): Move around.
2061
c8956236 20622019-05-28 Eric Botcazou <ebotcazou@adacore.com>
2063
2064 * doc/gnat_rm/implementation_defined_pragmas.rst (Machine_Attribute):
2065 Document additional optional parameters.
2066 * sem_prag.adb (Analyze_Pragma) <Pragma_Machine_Attribute>: Accept
2067 more than one optional parameter.
2068 * gcc-interface/decl.c (prepend_one_attribute_pragma): Alphabetize
2069 the list of supported pragmas. Simplify the handling of parameters
2070 and add support for more than one optional parameter.
2071 * gcc-interface/utils.c (attr_cold_hot_exclusions): New constant.
2072 (gnat_internal_attribute_table): Add entry for no_icf, noipa, flatten,
2073 used, cold, hot, target and target_clones.
2074 (begin_subprog_body): Do not create the RTL for the subprogram here.
2075 (handle_noicf_attribute): New static function.
2076 (handle_noipa_attribute): Likewise.
2077 (handle_flatten_attribute): Likewise.
2078 (handle_used_attribute): Likewise.
2079 (handle_cold_attribute): Likewise.
2080 (handle_hot_attribute): Likewise.
2081 (handle_target_attribute): Likewise.
2082 (handle_target_clones_attribute): Likewise.
2083
62b762c2 20842019-05-28 Eric Botcazou <ebotcazou@adacore.com>
2085
2086 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Return 0
2087 for 'Size too.
2088 (Identifier_to_gnu): Use the actual subtype for a reference to a
2089 packed array in a return statement.
2090 (Attribute_to_gnu) <Attr_Size>: Do not strip VIEW_CONVERT_EXPRs from
2091 the prefix in every case.
2092
336a61a3 20932019-05-28 Eric Botcazou <ebotcazou@adacore.com>
2094
2095 * gcc-interface/trans.c (gnat_to_gnu): Remove superfluous tests on
2096 Backend_Overflow_Checks_On_Target and rework comments.
2097
983c5b5e 20982019-05-28 Eric Botcazou <ebotcazou@adacore.com>
2099
2100 * gcc-interface/trans.c (walk_nesting_tree): New static function.
2101 (finalize_nrv): Use it to walk the entire nesting tree.
2102
96b4b84e 21032019-05-28 Eric Botcazou <ebotcazou@adacore.com>
2104
2105 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Remove
2106 obsolete test on Is_For_Access_Subtype.
2107
0b74284e 21082019-05-28 Eric Botcazou <ebotcazou@adacore.com>
2109
2110 * gcc-interface/decl.c (components_to_record): Set a name on the type
2111 created for the REP part, if any.
2112 * gcc-interface/utils.c (finish_record_type): Only take the maximum
2113 when merging sizes for a variant part at offset 0.
2114 (merge_sizes): Rename has_rep parameter into max.
2115
689dab9d 21162019-05-28 Eric Botcazou <ebotcazou@adacore.com>
2117
2118 * gcc-interface/utils.c (gnat_internal_attribute_table): Add support
2119 for stack_protect attribute.
2120 (handle_stack_protect_attribute): New static function.
2121
804f7d39 21222019-05-28 Eric Botcazou <ebotcazou@adacore.com>
2123
2124 * gcc-interface/decl.c (intrin_arglists_compatible_p): Do not return
2125 false if the internal builtin uses a variable list.
2126
f07f94cc 21272019-05-27 Eric Botcazou <ebotcazou@adacore.com>
2128
2129 * gcc-interface/trans.c (Call_to_gnu): Do not initialize the temporary
2130 created out of addressability concerns if it's for the _Init parameter
2131 of an initialization procedure.
2132
abfd658b 21332019-05-27 Eric Botcazou <ebotcazou@adacore.com>
2134
2135 * gcc-interface/ada-builtin-types.def: New file.
2136 * gcc-interface/ada-builtins.def: Likewise.
2137 * gcc-interface/ada-tree.h (BUILT_IN_LIKELY): New macro.
2138 (BUILT_IN_UNLIKELY): Likewise.
2139 * gcc-interface/trans.c (independent_iterations_p): Initialize the
2140 auto-vector to 16 elements.
2141 (Call_to_gnu): Remove local variable and change the vector of actual
2142 parameters to an auto-vector. Do not convert actual parameters to
2143 the argument type for front-end built-in functions. Add support for
2144 front-end built-in functions.
2145 (build_noreturn_cond): Use internal instead of built-in function.
2146 * gcc-interface/utils.c (c_builtin_type): Include ada-builtin-types.def
2147 (install_builtin_function_types): Likewise.
2148 (install_builtin_functions): Include ada-builtins.def first.
2149
caab73a2 21502019-05-27 Eric Botcazou <ebotcazou@adacore.com>
2151
2152 * gcc-interface/utils.c (maybe_pad_type): Issue the warning for the
2153 specific case of component types preferably.
2154
f1ca2388 21552019-05-27 Eric Botcazou <ebotcazou@adacore.com>
2156
2157 * gcc-interface/trans.c (Identifier_to_gnu): Minor tweaks.
2158 (gnat_to_gnu): Do not convert the result if it is a reference to an
2159 unconstrained array used as the prefix of an attribute reference that
2160 requires an lvalue.
2161
e3f3573c 21622019-05-27 Eric Botcazou <ebotcazou@adacore.com>
2163
2164 * gcc-interface/trans.c (Gigi_Types_Compatible): New predicate.
2165 (Identifier_to_gnu): Use it to assert that the type of the identifier
2166 and that of its entity are compatible for gigi. Rename a couple of
2167 local variables and separate the processing of the result type.
2168
2306cd17 21692019-05-27 Eric Botcazou <ebotcazou@adacore.com>
2170
2171 * gcc-interface/trans.c (Call_to_gnu): Use the unpadded type when
2172 putting back an intermediate conversion the type of the actuals.
2173
6e4e9378 21742019-05-27 Eric Botcazou <ebotcazou@adacore.com>
2175
2176 * gcc-interface/trans.c (gnat_to_gnu) <Shift operations>: Convert the
2177 count to the unsigned version of its base type before proceeding.
2178
85b9be9b 21792019-05-16 Martin Sebor <msebor@redhat.com>
2180
3d6be0d5 2181 * gcc-interface/trans.c (check_inlining_for_nested_subprog): Quote
2182 reserved names.
85b9be9b 2183
65d973ca 21842019-05-08 Arnaud Charlet <charlet@adacore.com>
2185
2186 * standard.ads.h: New file.
2187
ff628b99 21882019-05-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2189
2190 * gcc-interface/Makefile.in (install-gcc-specs): Use foreach.
2191 Honor DESTDIR.
2192
ebd761d4 21932019-04-29 Michael K. Darling <darlingm@gmail.com>
2194
2195 * gnatvsn.ads: Bump Library_Version to 10.
2196
5f260823 21972019-04-24 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2198 Bernd Edlinger <bernd.edlinger@hotmail.de>
2199 Jakub Jelinek <jakub@redhat.com>
2200
2201 PR target/89093
2202 * raise-gcc.c (TARGET_ATTRIBUTE): Define.
2203 (continue_unwind, personality_body, PERSONALITY_FUNCTION): Add
2204 TARGET_ATTRIBUTE.
2205
d7ca95c0 22062019-04-07 Eric Botcazou <ebotcazou@adacore.com>
2207
2208 * libgnat/i-cexten.ads (CFloat_128): New type.
2209
26b21081 22102019-03-22 Dmitriy Anisimkov <anisimko@adacore.com>
2211
2212 PR ada/89583
2213 * libgnat/g-socket.adb (Bind_Socket, Connect_Socket,
2214 Send_Socket): Fix the computation of structure lengths passed to
2215 low level routines.
2216 (Is_IPv6_Address): Fix the number of expected colons.
2217
2f6d557f 22182019-03-11 Martin Liska <mliska@suse.cz>
2219
d325ee67 2220 * gcc-interface/misc.c (gnat_post_options): Wrap option name in string
2221 format message and fix GNU coding style.
2f6d557f 2222
c1ad6672 22232019-02-08 Eric Botcazou <ebotcazou@adacore.com>
2224
2225 * gcc-interface/trans.c (gnat_to_gnu) <N_Aggregate>: Minor tweak.
2226 * gcc-interface/utils.c (convert): Do not pad when doing an unchecked
2227 conversion here. Use TREE_CONSTANT throughout the function.
2228 (unchecked_convert): Also pad if the source is a CONSTRUCTOR and the
2229 destination is a more aligned array type or a larger aggregate type,
2230 but not between original and packable versions of a type.
2231
62a6ebbd 22322019-02-08 Eric Botcazou <ebotcazou@adacore.com>
2233
2234 * gcc-interface/utils.c (max_size) <tcc_unary>: Be prepared for an
2235 operand with VOID_TYPE.
2236
da383d19 22372019-02-08 Eric Botcazou <ebotcazou@adacore.com>
2238
2239 * gcc-interface/trans.c (elaborate_all_entities): Do not elaborate the
2240 entities of a package renaming another one.
2241
09c123a0 22422019-02-08 Eric Botcazou <ebotcazou@adacore.com>
2243
2244 * gcc-interface/trans.c (Regular_Loop_to_gnu): Replace tests on
2245 individual flag_unswitch_loops and flag_tree_loop_vectorize switches
2246 with test on global optimize switch.
2247 (Raise_Error_to_gnu): Likewise.
2248
a9dd7273 22492019-02-07 Eric Botcazou <ebotcazou@adacore.com>
2250
2251 * libgnarl/s-linux__sparc.ads (ETIMEDOUT): Set to correct value.
2252
4836c4f1 22532019-02-06 Arnaud Charlet <charlet@adacore.com>
2254
2255 * libgnarl/s-linux__x32.ads: Resync list of signals with s-linux.ads
2256
6b56937c 22572019-01-27 Eric Botcazou <ebotcazou@adacore.com>
2258
2259 * repinfo.adb (List_Component_Layout): Remove superfluous space for
2260 zero-sized field.
2261 * gcc-interface/ada-tree.h (TYPE_IS_EXTRA_SUBTYPE_P): New macro.
2262 * gcc-interface/gigi.h (create_extra_subtype): Declare.
2263 * gcc-interface/decl.c (TYPE_ARRAY_SIZE_LIMIT): Likewise.
2264 (update_n_elem): New function.
2265 (gnat_to_gnu_entity): Use create_extra_subtype to create extra subtypes
2266 instead of doing it manually.
2267 <E_Array_Type>: Use update_n_elem to compute the maximum size. Use the
2268 index type instead of base type for the bounds. Set TYPE_ARRAY_MAX_SIZE
2269 of the array to the maximum size.
2270 <E_Array_Subtype>: Create an extra subtype using the index type of the
2271 base array type for self-referential bounds. Use update_n_elem to
2272 compute the maximum size. Set TYPE_ARRAY_MAX_SIZE of the array to the
2273 maximum size.
2274 (gnat_to_gnu_field): Clear DECL_NONADDRESSABLE_P on discriminants.
2275 * gcc-interface/misc.c (gnat_get_alias_set): Return the alias set of
2276 the base type for an extra subtype.
2277 (gnat_type_max_size): Remove obsolete code.
2278 * gcc-interface/trans.c (Attribute_to_gnu): Minor tweak.
2279 (can_be_lower_p): Deal with pathological types.
2280 * gcc-interface/utils.c (create_extra_subtype): New function.
2281 (create_field_decl): Minor tweak.
2282 (max_size) <tcc_reference>: Compute a better value by using the extra
2283 subtypes on the self-referential bounds.
2284 <tcc_binary>: Rewrite. Deal with "negative value" in unsigned types.
2285 <tcc_expression>: Likewise.
2286 * gcc-interface/utils2.c (compare_arrays): Retrieve the original bounds
2287 of the arrays upfront. Swap only if the second length is not constant.
2288 Use comparisons on the original bounds consistently for the null tests.
2289 (build_binary_op): Use TYPE_IS_EXTRA_SUBTYPE_P macro.
2290 (build_allocator): Minor tweak.
2291
ecb2c722 22922019-01-27 Eric Botcazou <ebotcazou@adacore.com>
2293
2294 * gcc-interface/decl.c (array_type_has_nonaliased_component): Return
2295 the same value for every dimension of a multidimensional array type.
2296
10f25579 22972019-01-26 Eric Botcazou <ebotcazou@adacore.com>
2298
2299 * gcc-interface/trans.c (Regular_Loop_to_gnu): Use the SLOC of the
2300 iteration scheme, if present, throughout the translation.
2301
aced6683 23022019-01-26 Eric Botcazou <ebotcazou@adacore.com>
2303
2304 * gcc-interface/trans.c (gnat_to_gnu) <N_Assignment_Statement>: Use
2305 DECL_SIZE_UNIT instead of TYPE_SIZE_UNIT for the size to be assigned
2306 by a call to memset if the LHS is a DECL.
2307
18b4b30e 23082019-01-26 Eric Botcazou <ebotcazou@adacore.com>
2309
2310 * gcc-interface/trans.c (struct loop_info_d): Remove artificial field.
2311 (Loop_Statement_to_gnu): Do not set it.
2312
6dce35b7 23132019-01-26 Eric Botcazou <ebotcazou@adacore.com>
2314
2315 * gcc-interface/trans.c (Iterate_Acc_Clause_Arg): Fix formatting.
2316 (Acc_gnat_to_gnu): Likewise.
2317 (Acc_Data_to_gnu): Likewise.
2318 (Acc_Var_to_gnu): Likewise.
2319 (Acc_Reduc_to_gnu): Likewise.
2320 (Acc_Size_List_to_gnu): Likewise.
2321 (Pragma_to_gnu) <Pragma_Acc_Loop>: Likewise.
2322 <Pragma_Acc_Data>): Likewise.
2323 (find_loop_for): Remove default value for parameters.
2324 * gcc-interface/trans.c (gnat_to_gnu) <N_Op_And>: Merge into...
2325 <N_Op_Eq>): ...this.
2326
f8cd11ee 23272019-01-26 Eric Botcazou <ebotcazou@adacore.com>
2328
2329 * gcc-interface/decl.c (annotate_value) <INTEGER_CST>: Use test on
2330 the sign bit instead of on the sign of the value.
2331 <PLUS_EXPR>: Turn addition of negative constant into subtraction.
2332 <MULT_EXPR>: Add test for degenerate case.
2333 <BIT_AND_EXPR>: Simplify.
2334
9a3c51d9 23352019-01-18 Sebastian Huber <sebastian.huber@embedded-brains.de>
2336
2337 * s-oscons-tmplt.c (AF_INET6): Do not undefine for RTEMS.
2338
07c11f2b 23392019-01-09 Sandra Loosemore <sandra@codesourcery.com>
2340
2341 PR other/16615
07c11f2b 2342 * exp_ch11.adb: Change "can not" to "cannot".
2343 * sem_ch4.adb: Likewise.
2344
f4d3c071 23452019-01-09 Sandra Loosemore <sandra@codesourcery.com>
2346
2347 PR other/16615
f4d3c071 2348 * exp_ch9.adb: Mechanically replace "can not" with "cannot".
2349 * libgnat/s-regpat.ads: Likewise.
2350 * par-ch4.adb: Likewise.
2351 * set_targ.adb: Likewise.
2352 * types.ads: Likewise.
2353
902071d1 23542019-01-08 Justin Squirek <squirek@adacore.com>
2355
2356 Revert:
902071d1 2357 2018-07-31 Justin Squirek <squirek@adacore.com>
2358
76fb0465 2359 * lib-writ.adb (Write_With_Lines): Modfiy the generation
2360 of dependencies within ali files so that source unit
2361 bodies are properly listed even if said bodies are
2362 missing. Perform legacy behavior in GNATprove mode.
2363 * lib-writ.ads: Modify documentation to reflect current
2364 behavior.
902071d1 2365
2366 and:
902071d1 2367 2018-09-26 Justin Squirek <squirek@adacore.com>
2368
76fb0465 2369 * lib-writ.adb, lib-writ.ads (Write_With_Lines): Add
2370 documentation and an extra conditional check for RCI
2371 units so that generated ali files will list the spec
2372 only instead of a body when a body is not found.
902071d1 2373
65a33d4a 23742019-01-04 Eric Botcazou <ebotcazou@adacore.com>
2375
2376 * gnatvsn.ads: Bump copyright year.
2377
3d8932fd 23782019-01-01 Jakub Jelinek <jakub@redhat.com>
8e8f6434 2379
fbd26352 2380 Update copyright years.
2381
277184bc 2382 * gnat_ugn.texi: Bump @copying's copyright year.
2383 * gnat_rm.texi: Likewise.
7dfbd804 2384\f
3d8932fd 2385Copyright (C) 2019 Free Software Foundation, Inc.
7dfbd804 2386
2387Copying and distribution of this file, with or without modification,
2388are permitted in any medium without royalty provided the copyright
2389notice and this notice are preserved.