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