]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/ada/ChangeLog
[Ada] Infinite loop on illegal declaration
[thirdparty/gcc.git] / gcc / ada / ChangeLog
CommitLineData
814e7b6e 12019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
2
3 * sem_util.adb (Null_Status): Assume that an erroneous construct
4 has an undefined null status.
5
53904d64 62019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
7
8 * checks.adb, exp_ch6.adb, gnat1drv.adb, sem_aux.adb,
9 sem_ch2.adb, sem_ch8.adb, sem_res.adb: Minor reformatting.
10
21dccd5f 112019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
12
13 * sem_ch8.adb (Analyze_Object_Renaming): Obtain the object being
14 renamed using routine Get_Object_Name which takes care of
15 various name forms.
16 (Get_Object_Name): New routine.
17
3da5e0d4 182019-07-11 Ed Schonberg <schonberg@adacore.com>
19
20 * exp_ch6.adb (Can_Fold_Predicate_Call): New function,
21 subsidiary of Expand_Call_Helper, to compute statically a
22 predicate check when the argument is a static integer.
23
3d95efc8 242019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
25
26 * sem_res.adb (Resolve_Op_Not): Do not rewrite an equality
27 operator into a function call when the operator is intrinsic.
28
8c93b71c 292019-07-11 Thomas Quinot <quinot@adacore.com>
30
31 * sem_prag.adb (Analyze_Pragma, case pragma Check): Do not call
32 Set_SCO_Pragma_Enabled for the dynamic predicate case.
33
001b1b6a 342019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
35
36 * exp_util.ads, exp_util.adb (Needs_Finalization): Move to
37 Sem_Util.
38 * sem_ch9.adb (Analyze_Protected_Definition): Code cleanup. Mark
39 the protected type as having controlled components when it
40 contains at least one such component.
41 * sem_util.ads, sem_util.adb (Needs_Finalization): New
42 function.
43
5dc190e5 442019-07-11 Eric Botcazou <ebotcazou@adacore.com>
45
46 * alloc.ads (Rep_JSON_Table_Initial): New constant.
47 (Rep_JSON_Table_Increment): Likewise.
48 * debug.adb: Document -gnatd_j switch.
49 * gcc-interface/Make-lang.in (GNAT_ADA_OBJS): Add
50 repinfo-input.o.
51 * gnat1drv.adb: Add with clause for Repinfo.Input.
52 Add with and use clauses for Sinput.
53 (Read_JSON_Files_For_Repinfo): New procedure.
54 (Gnat1drv1): Deal with -gnatd_j switch.
55 * repinfo-input.ad[sb]: New unit.
56 * snames.ads-tmpl (Name_Discriminant): New constant.
57 (Name_Operands): Likewise.
58
b1118eb8 592019-07-11 Justin Squirek <squirek@adacore.com>
60
61 * checks.adb (Apply_Accessibility_Check): Add check for constant
62 folded conditions on accessibility checks.
63
ef0b2206 642019-07-11 Arnaud Charlet <charlet@adacore.com>
65
66 * libgnarl/g-thread.ads, libgnarl/g-thread.adb (Get_Thread):
67 Update comments. Add new version taking a Task_Id.
68
12b1c23b 692019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
70
71 * bindo.adb: Update the section of switches and debugging
72 elaboration issues.
73 * bindo.ads: Add type Elaboration_Phase.
74 * bindo-augmentors.adb: Add use clause for
75 Bindo.Writers.Phase_Writers.
76 (Augment_Library_Graph): Signal the start and end of the
77 aubmentation phase.
78 * bindo-builders.adb: Add with and use clause for Bindo.Writers.
79 Add use clause for Bindo.Writers.Phase_Writers.
80 (Build_Invocation_Graph): Signal the start and end of the
81 invocation graph construction phase.
82 (Build_Library_Graph): Signal the start and end of the library
83 graph construction phase.
84 * bindo-diagnostics.adb: Add use clause for
85 Bindo.Writers.Phase_Writers.
86 (Diagnose_Cycle): Signal the start and end of the cycle
87 diagnostic phase.
88 * bindo-elaborators.adb: Add use clause for
89 Bindo.Writers.Phase_Writers.
90 (Elaborate_Units): Signal the start and end of the unit
91 elaboration phase.
92 * bindo-graphs.adb: Add use clause for
93 Bindo.Writers.Phase_Writers.
94 (Find_Components): Signal the start and end of the component
95 discovery phase.
96 (Find_Cycles): Signal the start and end of the cycle discovery
97 phase.
98 * bindo-units.adb: Add with and use clause for Bindo.Writers.
99 Add use clause for Bindo.Writers.Phase_Writers.
100 (Collect_Elaborable_Units): Signal the start and end of the unit
101 collection phase.
102 * bindo-validators.adb: Add with and use clause for
103 Bindo.Writers. Add use clause for Bindo.Writers.Phase_Writers.
104 (Validate_Cycles, Validate_Elaboration_Order,
105 Validate_Invocation_Graph, Validate_Library_Graph): Signal the
106 start and end of the libray graph validation phase.
107 * bindo-writers.ads, bindo-writers.adb: Add new nested package
108 Phase_Writers.
109 * debug.adb: Update the documentation of switch d_S.
110
d7569e04 1112019-07-11 Yannick Moy <moy@adacore.com>
112
113 * sem_res.adb (Check_Argument_Order): Special case calls to
114 operators.
115
604c5bca 1162019-07-10 Dmitriy Anisimkov <anisimko@adacore.com>
117
118 * libgnat/s-ststop.adb: Remove System.Strings.Stream_Ops
119 dependence on System.Streams.Stream_IO.
120
ce9565a8 1212019-07-10 Ed Schonberg <schonberg@adacore.com>
122
123 * sem_ch2.adb (Analyze_Integer_Literal): Preserve the type of
124 the literal if prior analysis determined that its type is a
125 modular integer type.
126
e97ee616 1272019-07-10 Doug Rupp <rupp@adacore.com>
128
129 * init.c: Do not attempt to re-arm guard page on x86_64-vx7(r2).
130
c0e85bb6 1312019-07-10 Ed Schonberg <schonberg@adacore.com>
132
133 * sem_ch8.adb (Check_Constrained_Object): A record that is
134 limited because of the presence of a limited component is
135 constrained, and no subtype indiciation needs to be created for
136 it, just as is the case for declared limited records.
137
94654315 1382019-07-10 Yannick Moy <moy@adacore.com>
139
140 * sem_aux.adb, sem_aux.ads (Is_Protected_Operation): New
141 function to determine if a subprogram is protected.
142 * sem_spark.adb (Setup_Protected_Components): New procedure to
143 add protected components to the environment.
144 (Check_Callable_Body): Call the new Setup_Protected_Components.
145 (Check_Package_Spec): Merge local environment with enclosing one
146 when done.
147
9ac24568 1482019-07-10 Claire Dross <dross@adacore.com>
149
150 * sem_spark.adb (Check_Expression): Allow digits constraints as
151 input.
152 (Illegal_Global_Usage): Pass in the entity.
153 (Is_Subpath_Expression): New function to allow different nodes
154 as inner parts of a path expression.
155 (Read_Indexes): Allow concatenation and aggregates with box
156 expressions. Allow attributes Update and Loop_Entry.
157 (Check_Expression): Allow richer membership test.
158 (Check_Node): Ignore bodies of generics.
159 (Get_Root_Object): Allow concatenation and attributes.
160
95266217 1612019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
162
163 * sem_ch6.adb (Check_Discriminant_Conformance): Use Find_Type to
164 discover the type of a full view discriminant.
165
f9d615a1 1662019-07-10 Arnaud Charlet <charlet@adacore.com>
167
168 * doc/gnat_ugn/gnat_and_program_execution.rst: Improve gnatmem's
169 doc for the depth switch.
170
55d7c660 1712019-07-10 Bob Duff <duff@adacore.com>
172
173 * doc/gnat_ugn/gnat_utility_programs.rst: Document gnatpp's
174 --source-line-breaks switch.
175
e94f4600 1762019-07-10 Justin Squirek <squirek@adacore.com>
177
178 * doc/gnat_rm/implementation_defined_attributes.rst: Add mention
179 of 'Image attribute with 'Img's entry to mention additional
180 added 2012 usage of Obj'Image.
181 * doc/gnat_rm/implementation_defined_pragmas.rst: Correct
182 mispelling of Async_Writers.
183 * gnat_rm.texi: Regenerate.
184 * sem_prag.adb (Analyze_Pragma): Correct mispelling of
185 Async_Writers.
186 * sem_util.adb (State_Has_Enabled_Property): Correct mispelling
187 of Async_Writers.
188
2bf00b7f 1892019-07-10 Simon Buist <buist@adacore.com>
190
191 * sem_util.ads (Child_Prefix): New constant.
192 * sem_util.adb (Unique_Name): Add a special prefix to child
193 units that have a nested subprogram or package.
194
9dda714b 1952019-07-10 Arnaud Charlet <charlet@adacore.com>
196
197 * sfn_scan.adb (Scan_SFN_Pragmas): Add pragma Assert.
198
fd8a528d 1992019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
200
201 * sem_ch3.adb (Check_Nonoverridable_Aspects): Correct the
202 spelling in certain error messages.
203 (Check_Pragma_Implemented): Correct the spelling in certain
204 error messages.
205
97f0aa19 2062019-07-10 Eric Botcazou <ebotcazou@adacore.com>
207
208 * Makefile.rtl (GNATRTL_NONTASKING_OBJS): Add g-brapre.
209 * libgnat/g-brapre.ads: New package specification.
210 * doc/gnat_rm/the_gnat_library.rst: Document it.
211 * gnat_rm.texi: Regenerate.
212
d2506f16 2132019-07-10 Yannick Moy <moy@adacore.com>
214
215 * osint-c.adb (Set_File_Name): Always add extension for multiple
216 units per file mode.
217
c6db401c 2182019-07-10 Corentin Gay <gay@adacore.com>
219
220 * sysdep.c: Put include directive for 'vxWorks.h' before any
221 other VxWorks headers.
222
344c2639 2232019-07-10 Eric Botcazou <ebotcazou@adacore.com>
224
225 * doc/gnat_rm/implementation_defined_attributes.rst
226 (Scalar_Storage_Order): Minor tweaks. Add note about debuggers.
227 * gnat_rm.texi: Regenerate.
228
8a9900a9 2292019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
230
231 * exp_ch4.adb (Expand_N_Case_Expression): Mark the generated
232 assignments to the temporary result as being OK because the
233 expansion of case expressions is correct by construction.
234 (Is_Copy_Type): Update the predicate to match the comment
235 within.
236
8c21443b 2372019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
238
239 * bindo-graphs.adb, bindo.adb, debug.adb, exp_ch6.adb,
240 sem_ch10.adb, sem_ch13.adb, sem_ch3.adb, sem_ch4.adb,
241 sem_ch6.adb, sem_ch7.adb, sem_res.adb, sem_spark.adb,
242 sem_util.adb, warnsw.ads: Minor reformatting.
243
2e7929f0 2442019-07-10 Joffrey Huguet <huguet@adacore.com>
245
246 * libgnat/a-strbou.ads, libgnat/a-strfix.ads,
247 libgnat/a-strunb.ads, libgnat/a-strunb__shared.ads: Add global
248 contracts, contract cases, preconditions and postconditions to
249 procedures and functions.
250
87d55fe2 2512019-07-10 Doug Rupp <rupp@adacore.com>
252
253 * sysdep.c (__gnat_is_file_not_found_error): Reformulate to also
254 work for vxworks7r2 SR0610.
255
82d7e1f4 2562019-07-10 Doug Rupp <rupp@adacore.com>
257
258 * env.c (__gnat_environ): Reformulate to also work for
259 vxworks7r2 SR0610.
260
7f6066e1 2612019-07-10 Patrick Bernardi <bernardi@adacore.com>
262
263 * Makefile.rtl: Handle vxworks7r2 ppc target
264
6523468f 2652019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
266
267 * bindo.adb: Update the section on switches.
268 * bindo-graphs.adb
269 (Add_Cycle, Add_Vertex_And_Complement): Remove.
270 (Create): The graph no longer needs a set of recorded cycles
271 because the cycles are not rediscovered in permuted forms.
272 (Cycle_End_Vertices): New routine.
273 (Destroy): The graph no longer needs a set of recorded cycles
274 because the cycles are not rediscovered in permuted forms.
275 (Destroy_Library_Graph_Vertex): Move to the library level.
276 (Find_All_Cycles_Through_Vertex, Find_All_Cycles_With_Edge):
277 Remove.
278 (Find_Cycles_From_Successor, Find_Cycles_From_Vertex,
279 Find_Cycles_In_Component, Has_Elaborate_All_Edge): New routines.
280 (Insert_And_Sort): Remove.
281 (Is_Elaborate_Body_Edge): Use predicate
282 Is_Vertex_With_Elaborate_Body.
283 (Is_Recorded_Cycle): Remove.
284 (Is_Vertex_With_Elaborate_Body): New routine.
285 (Normalize_And_Add_Cycle): Remove.
286 (Precedence): Rename to xxx_Precedence, where xxx relates to the
287 input. These versions better reflect the desired input
288 precedence.
289 (Record_Cycle): New routine.
290 (Remove_Vertex_And_Complement, Set_Is_Recorded_Cycle): Remove.
291 (Trace_xxx): Update all versions to use debug switch -d_t.
292 (Trace_Component): New routine.
293 (Trace_Eol): Removed.
294 (Trace_Vertex): Do not output the component as this information
295 is already available when the component is traced.
296 (Unvisit, Visit): New routine.
297 * bindo-graphs.ads: Add new instance LGV_Lists. Remove instance
298 RC_Sets. Update the structure of type Library_Graph_Attributes
299 to remove the set of recorded cycles.
300 (Destroy_Library_Graph_Vertex): Move to the library level.
301 * bindo-writers.adb (Write_Component_Vertices): Output
302 information about the number of vertices.
303 * debug.adb: Document the use of binder switch -d_t. Update the
304 use of binder switch -d_T.
305
9eaacd61 3062019-07-10 Yannick Moy <moy@adacore.com>
307
308 * sem_spark.adb (Get_Root_Object): Replace precondition by error
309 message.
310 (Read_Indexes): Replace precondition by error message.
311 (Check_Callable_Body): Check only traversal function returns an
312 anonymous access type.
313 (Check_Expression): Issue error on unexpected expression as
314 path.
315 * sem_util.adb (First_Global): Fix access to global on
316 entry/task.
317
2ac657bd 3182019-07-10 Javier Miranda <miranda@adacore.com>
319
320 * exp_ch6.adb (Is_Class_Wide_Interface_Type): New subprogram.
321 (Expand_Call_Helper): Handle non-limited views when we check if
322 any formal is a class-wide interface type.
323 * exp_disp.adb (Expand_Interface_Actuals): Handle non-limited
324 views when we look for interface type formals to force "this"
325 displacement.
326
d3fb378d 3272019-07-10 Ed Schonberg <schonberg@adacore.com>
328
329 * sem_res.adb (Resolve_Equality_Op): Do not replace the resolved
330 operator by its alias if expander is not active, because the
331 operand type may not be frozen yet and its inherited operations
332 have not yet been created.
333
ab8418a3 3342019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
335
336 * bindo-elaborators.adb (Elaborate_Units): Set attribute
337 Elab_Position of all elaborated units.
338 (Set_Unit_Elaboration_Positions): New routine.
339
6e618828 3402019-07-10 Gary Dismukes <dismukes@adacore.com>
341
342 * exp_util.adb: Reformatting and a typo fix.
343
97f6f798 3442019-07-10 Yannick Moy <moy@adacore.com>
345
346 * exp_util.adb (Remove_Side_Effects): Prefer renamings for
347 objects of possible owning type in GNATprove mode.
348
89c67bd9 3492019-07-09 Ed Schonberg <schonberg@adacore.com>
350
351 * sem_ch3.adb (Analyze_Object_Declaration): If the object type
352 is a composite type that has a dynamic predicate and, the
353 expression in the declaration is an aggregate, the generated
354 predicate check must appear after the expanded code for the
355 aggregate, which will appear after the rewritten object
356 declarastion.
357
fb739c45 3582019-07-09 Justin Squirek <squirek@adacore.com>
359
360 * sem_eval.adb (Expr_Value_E): Add conditional to correctly
361 handle constant enumerated character types.
362
54b39f26 3632019-07-09 Eric Botcazou <ebotcazou@adacore.com>
364
365 * libgnarl/s-osinte__mingw.ads (CRITICAL_SECTION): Use proper
366 type for SpinCount component.
367
9b57fc30 3682019-07-09 Justin Squirek <squirek@adacore.com>
369
370 * exp_ch4.adb (Expand_N_Allocator): Add conditional to detect
371 the presence of anoymous access type allocators and issue a
372 warning if the appropriate warning flag is enabled.
373 * warnsw.ads: Add new warning flag for anonymous allocators
374 * warnsw.adb (All_Warnings, Restore_Warnings, Save_Warnings,
375 Set_Underscore_Warning_Switch): Register new flags.
376 (WA_Warnings): Register new flag as an "all warnings" switch
377 * usage.adb,
378 doc/gnat_ugn/building_executable_programs_with_gnat.rst:
379 Document new warning switches -gnatw_a and -gnatw_A.
380 * gnat_ugn.texi: Regenerate.
381
2463fa93 3822019-07-09 Ed Schonberg <schonberg@adacore.com>
383
384 * sem_ch4.adb (Diagnose_Call): Improve error recovery when a
385 local subprogram name hides a possible candidate name declared
386 in a child package in the context of the current unit.
387 * sem_ch6.adb (Process_Formals): Protect against malformed
388 formal types when the parameter type does not denote an entity.
389
7389bee5 3902019-07-09 Hristian Kirtchev <kirtchev@adacore.com>
391
392 * bindo-augmentors.adb (Visit_Elaboration_Root): Do not start a
393 DFS from an elaboration root whose corresponding unit lacks
394 elaboration code. This behavior mimics that of the old
395 elaboration order mechanism.
396 * bindo-graphs.adb (Find_All_Cycles_Through_Vertex): Move the
397 vertex tracing within the functional branches of the routine.
398 This prevents spurious trace output.
399 (Has_No_Elaboration_Code): New routine.
400 (Trace_Cycle, Trace_Edge): Update the various Ids to use the
401 "standard" trace format.
402 * bindo-graphs.ads (Has_No_Elaboration_Code): New routine.
403 * bindo-units.ads, bindo-units.adb (Has_No_Elaboration_Code):
404 New routine.
405
06d78d4c 4062019-07-09 Piotr Trojanek <trojanek@adacore.com>
407
408 * ali.ads, bindo-graphs.adb, bindo-validators.adb, clean.adb,
409 doc/gnat_ugn/elaboration_order_handling_in_gnat.rst, einfo.ads,
410 exp_aggr.adb, exp_ch13.adb, exp_ch4.adb, exp_ch5.adb,
411 exp_ch6.adb, exp_ch7.adb, exp_ch9.adb, exp_pakd.adb,
412 fname-uf.ads, gnatlink.adb, inline.adb, lib.ads, make.adb,
413 namet.ads, opt.ads, par-ch4.adb, par-ch6.adb, par-labl.adb,
414 prep.adb, sem_aggr.adb, sem_ch13.adb, sem_ch4.adb, sem_ch5.adb,
415 sem_ch6.adb, sem_ch6.ads, sem_ch7.adb, sem_ch8.adb, sem_dim.adb,
416 sem_disp.adb, sem_prag.adb, sem_res.adb, sem_warn.adb,
417 sinfo.ads: Replace ". " with ". ". Minor reformatting and typo
418 corrections.
419 * gnat_ugn.texi: Generate.
420
7ed20965 4212019-07-09 Hristian Kirtchev <kirtchev@adacore.com>
422
423 * bindo.ads: Move type Precedence_Kind from the private to the
424 visible part of the unit.
425 * bindo-augmentors.adb: Remove the use of global data as it is
426 bad practice.
427 (Augment_Library_Graph): Update the parameter profile.
428 (Is_Visited, Set_Is_Visited): Remove.
429 (Visit_Elaboration_Root, Visit_Elaboration_Roots): Update the
430 parameter profile and comment on usage.
431 (Visit_Vertex): Likewise. Also keep track of which invocation
432 edge activates a task.
433 * bindo-augmentors.ads (Augment_Library_Graph): Update the
434 parameter profile and comment on usage.
435 * bindo-builders.adb (Create_Forced_Edge,
436 Create_Spec_And_Body_Edge, Create_With_Edge): Update the call to
437 Add_Edge.
438 * bindo-diagnostics.adb: Add with end use clauses for Restrict
439 and Rident.
440 (Output_Dynamic_Model_Suggestions): Remove.
441 (Output_Invocation_Related_Suggestions): New routine.
442 (Output_Suggestions): Output all invocation-related suggestions
443 together.
444 * bindo-elaborators.adb: Remove types Comparator_Ptr and
445 Predicate_Ptr.
446 (Find_Best_Vertex): Update the parameter profile.
447 * bindo-graphs.adb (Activates_Task): New routine.
448 (Add_Body_Before_Spec_Edge): Update the call to
449 Add_Edge_With_Return.
450 (Add_Edge): Update the parameter profile and the call to
451 Add_Edge_With_Return.
452 (Add_Edge_With_Return): Update the parameter profile and comment
453 on usage.
454 (At_Least_One_Edge_Satisfies): New routine.
455 (Contains_Elaborate_All_Edge): Reimplement.
456 (Contains_Static_Successor_Edge, Contains_Task_Activation): New
457 routine.
458 (Contains_Weak_Static_Successor): Remove.
459 (Is_Static_Successor_Edge): New routine.
460 * bindo-graphs.ads: Add types LGE_Predicate_Ptr,
461 LGV_Comparator_Ptr, and LGV_Predicate_Ptr. Update type
462 Library_Graph_Edge_Attributes to capture whether an invocation
463 edge activates a task. Update the value of
464 No_Library_Graph_Edge_Attributes.
465 (Activates_Task): Update the parameter profile and comment on
466 usage.
467 (Contains_Static_Successor_Edge, Contains_Task_Activation): New
468 routines.
469 (Contains_Weak_Static_Successor): Remove.
470 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst:
471 Update the documentation to reflect the new task-related advice.
472 * gnat_ugn.texi: Regenerate.
473
247527b7 4742019-07-09 Piotr Trojanek <trojanek@adacore.com>
475
476 * exp_util.adb (Containing_Package_With_Ext_Axioms): Replace
477 low-level Ekind test with a high-level wrapper.
478
1d7a9954 4792019-07-09 Arnaud Charlet <charlet@adacore.com>
480
481 * libgnat/s-memory.adb: Disable calls to Abort defer/undefer
482 when ZCX_By_Default.
483
7667b40a 4842019-07-09 Javier Miranda <miranda@adacore.com>
485
486 * sem_ch13.adb (Rep_Item_Too_Early): Representation clauses are
487 not allowed for a derivation of a generic type. Extend the
488 current test to check that none of the parents is a generic
489 type.
490
98eb8111 4912019-07-09 Hristian Kirtchev <kirtchev@adacore.com>
492
493 * exp_ch9.adb, exp_util.adb, repinfo.adb, sem_ch12.adb,
494 sem_prag.adb, sem_res.adb, sem_spark.adb, sem_util.adb: Minor
495 reformatting.
496
5ffa473a 4972019-07-09 Ed Schonberg <schonberg@adacore.com>
498
499 * sem_res.adb (Resolve_Equality_Op): If the node was overloaded,
500 set properly the entity to which the node has been resolved. The
501 original entity is the first one found during analysis, and is
502 not necessarily the resolved one.
503 (Resolve_Op_Not): If the argument of negation is an overloaded
504 equality operation, call its resolution directly given that the
505 context type does not participate in overload resolution.
506
f7197450 5072019-07-09 Hristian Kirtchev <kirtchev@adacore.com>
508
509 * bindo.adb: Remove with and use clauses for Debug. Add with
510 and use clauses for Opt.
511 (Find_Elaboration_Order): Enable the v4.0 elaboration order. The
512 v3.0 mechanism is now available under binder switch -H.
513 * bindusg.adb (Display): Enable switch -H.
514 * debug.adb: Free compiler switch -gnatd_G. Free binder switch
515 -d_N.
516 * sem_elab.adb: Update the section on switches to remove
517 -gnatd_G.
518 (Invocation_Graph_Recording_OK): The invocation graph is now
519 unconditionally recorded in ALI files.
520 * switch-b.adb (Scan_Binder_Switches): Scan switch -H.
521 * doc/gnat_ugn/building_executable_programs_with_gnat.rst:
522 Update the documentation on compiler switches related to
523 elaboration. Update the documentation on binder switches to
524 include switch -H.
525 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update
526 the documentation on elaboration order handling in GNAT.
527 * gnat_ugn.texi: Regenerate.
528
a2c6c634 5292019-07-09 Eric Botcazou <ebotcazou@adacore.com>
530
531 * repinfo.adb (List_Entities): Disregard formals altogether.
532 (List_Name): Properly escape the double quote in the JSON
533 output.
534
3933efcf 5352019-07-09 Javier Miranda <miranda@adacore.com>
536
537 * exp_util.adb (Remove_Side_Effects): Preserve the
538 Do_Range_Check flag.
539
2166bdef 5402019-07-09 Yannick Moy <moy@adacore.com>
541
542 * sinfo.ads: Refine comment for Do_Range_Check.
543
dbf9a3d7 5442019-07-09 Yannick Moy <moy@adacore.com>
545
546 * exp_spark.adb (Expand_SPARK_N_Attribute_Reference): Expand
547 attribute reference on Enum_Rep.
548
44e00a56 5492019-07-09 Ed Schonberg <schonberg@adacore.com>
550
551 * sem_ch12.adb (Instantiate_Formal_Package): Handle properly the
552 case where the actual for a formal package in an instance is the
553 current instance of an enclosing generic package.
554 (Check_Formal_Packages): If the formal package declaration is
555 box-initialized or lacks associations altogether, no internal
556 instance was created to verify conformance, and there is no
557 validating package to remove from tree.
558
3e4e7139 5592019-07-09 Yannick Moy <moy@adacore.com>
560
561 * freeze.adb (Build_Renamed_Body): Do not set body to inline in
562 GNATprove mode.
563
8235b943 5642019-07-09 Yannick Moy <moy@adacore.com>
565
566 * exp_util.adb (Expand_Subtype_From_Expr): Still expand the type
567 of static expressions in GNATprove_Mode.
568 * sem_ch3.adb (Analyze_Object_Declaration): Remove obsolete
569 special case for GNATprove_Mode.
570
cf9af2fa 5712019-07-09 Piotr Trojanek <trojanek@adacore.com>
572
573 * doc/gnat_rm/the_gnat_library.rst,
574 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
575 erroutc.adb, libgnat/g-comlin.adb, libgnat/g-comlin.ads,
576 libgnat/g-regexp.ads, libgnat/g-regpat.ads,
577 libgnat/g-spipat.ads, libgnat/s-os_lib.ads,
578 libgnat/s-regexp.ads: Reword "wild card" to "wildcard".
579 * gnat_rm.texi, gnat_ugn.texi: Regenerate.
580
a080baa9 5812019-07-09 Yannick Moy <moy@adacore.com>
582
583 * sem_spark.adb (Check_Expression): Handle correctly implicit
584 assignments as part of allocators and (extension) aggregates.
585 (Get_Root_Object): Adapt for new path expressions.
586 (Is_Path_Expression): Return True for (extension) aggregate.
587
d9b7ae15 5882019-07-09 Piotr Trojanek <trojanek@adacore.com>
589
590 * einfo.ads: Fix a typo.
591
4c24efa6 5922019-07-09 Ed Schonberg <schonberg@adacore.com>
593
594 * sem_util.adb (Scope_Within_Or_Same): Handle properly task
595 bodies and protected bodies, so that local variables within have
596 their proper scopes after these constructs have been rewritten
597 during expansion. This patch resembles but is not identical to
598 the code in Scope_Within.
599
6c334e66 6002019-07-09 Arnaud Charlet <charlet@adacore.com>
601
602 * gnat1drv.adb (Adjust_Global_Switches): Set
603 Dynamic_Elaboration_Checks to True in CodePeer mode.
604
82c20af0 6052019-07-09 Yannick Moy <moy@adacore.com>
606
607 * sem_spark.adb (Get_Perm_Or_Tree): Issue an error when
608 encountering unknown global variable.
609
a42b8e6a 6102019-07-09 Yannick Moy <moy@adacore.com>
611
612 * sem_spark.adb (Check_Expression): Change signature to take an
613 Extended_Checking_Mode, for handling read permission checking of
614 sub-expressions in an assignment.
615 (Check_Parameter_Or_Global): Adapt to new behavior of
616 Check_Expression for mode Assign.
617 (Check_Safe_Pointers): Do not analyze generic bodies.
618 (Check_Assignment): Separate checking of the target of an
619 assignment.
620
5fb4f6e3 6212019-07-09 Eric Botcazou <ebotcazou@adacore.com>
622
623 * repinfo.ads (JSON format): Adjust.
624 * repinfo.adb (Need_Blank_Line): Rename to...
625 (Need_Separator): ...this.
626 (Blank_Line): Rename to...
627 (Write_Separator): ...this and add JSON specific handling.
628 (List_Array_Info): Adjust to above renaming.
629 (List_Object_Info): Likewise.
630 (List_Record_Info): Likewise.
631 (List_Subprogram_Info): Likewise.
632 (List_Type_Info): Likewise.
633 (List_Entities): Do not set Need_Blank_Line.
634 (List_Rep_Info): Set Need_Separator and add JSON specific
635 handling. Output a single JSON stream in the normal case.
636
b389ec1e 6372019-07-09 Arnaud Charlet <charlet@adacore.com>
638
639 * doc/gnat_ugn/the_gnat_compilation_model.rst: Update doc on
640 -fdump-ada-spec now that we generate Ada 2012.
641 * gnat_ugn.texi: Regenerate.
642
5acb3702 6432019-07-08 Eric Botcazou <ebotcazou@adacore.com>
644
645 * repinfo.adb (List_Common_Type_Info): New procedure extracted
646 from...
647 (List_Type_Info): ...here. Call it for the common information,
648 start with a blank line and output the linker section at the
649 end, if any.
650 (List_Mechanisms): Rename to...
651 (List_Subprogram_Info): ...this.
652 (List_Array_Info): Call List_Common_Type_Info.
653 (List_Entities): Adjust to above change and renaming.
654 (List_Record_Info): Call List_Common_Type_Info.
655
6eb57612 6562019-07-08 Dmitriy Anisimkov <anisimko@adacore.com>
657
658 * libgnat/g-sercom.ads
659 (Serial_Port_Descriptor): New type.
660 (Serial_Port): Add a comment, make it hold a
661 Serial_Port_Descriptor.
662 (To_Ada, To_C): New procedures.
663 (Port_Data, Port_Data_Access): Remove types.
664 * libgnat/g-sercom.adb (To_Ada): New stub.
665 * libgnat/g-sercom__linux.adb, libgnat/g-sercom__mingw.adb:
666 Update implementations accordingly.
667 * s-oscons-tmplt.c: Bind Serial_Port_Descriptor to
668 System.Win32.HANDLE on Windows, and to Interfaces.C.int on
669 Linux. Add "Interfaces.C." prefix for other basic integer type
670 bindings.
671 * xoscons.adb (Output_Info): Remove the "Interfaces.C." prefix
672 for subtypes generation.
673
08da2ad9 6742019-07-08 Arnaud Charlet <charlet@adacore.com>
675
676 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
677 Update documentation on No_Exceptions restriction.
678 * gnat_rm.texi: Regenerate.
679
89b07420 6802019-07-08 Dmitriy Anisimkov <anisimko@adacore.com>
681
682 * libgnat/s-os_lib.adb: Do not call __gnat_kill for Invalid_Pid.
683
0cc34fed 6842019-07-08 Piotr Trojanek <trojanek@adacore.com>
685
686 * sem_util.adb (Enclosing_Package_Or_Subprogram): Do not expect
687 package and subprogram bodies.
688
46299a06 6892019-07-08 Bob Duff <duff@adacore.com>
690
691 * doc/gnat_ugn/gnat_utility_programs.rst: Remove documentation
692 of ignored GNATpp switch.
693
4475d2f0 6942019-07-08 Hristian Kirtchev <kirtchev@adacore.com>
695
696 * doc/gnat_rm/implementation_defined_pragmas.rst:
697 Update the documentation of pragma Initialize_Scalars.
698 * gnat_rm.texi: Regenerate.
699
b282b25b 7002019-07-08 Javier Miranda <miranda@adacore.com>
701
702 * exp_ch4.adb (Tagged_Membership): Fix regression silently
703 introduced in r260738 that erroneouslusy causes the evaluation
704 to True of the membership test when the left operand of the
705 membership test is a class-wide interface object and the right
706 operand is a type that implements such interface type.
707
703ee0e0 7082019-07-08 Hristian Kirtchev <kirtchev@adacore.com>
709
710 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
711 register an address clause when its prefix denotes a generic
712 formal object.
713
e6b4414e 7142019-07-08 Hristian Kirtchev <kirtchev@adacore.com>
715
716 * bindo-diagnostics.adb (Diagnose_Cycle): Capture the presence
717 of an Elaborate_All edge before iterating over the edges of the
718 cycle.
719 (Output_Elaborate_Body_Transition): Update the parameter profile
720 and the comment on usage. Add a missing case where the edge is
721 within the context of an Elaborate_All.
722 (Output_Transition): Update the call to
723 Output_Elaborate_Body_Transition.
724 * bindo-graphs.ads, bindo-graphs.adb
725 (Contains_Elaborate_All_Edge): New routine.
726
5a4de65a 7272019-07-08 Piotr Trojanek <trojanek@adacore.com>
728
729 * lib-xref-spark_specific.adb (Create_Heap): Set dummy Etype for
730 the fake __HEAP entity.
731
42253061 7322019-07-08 Daniel Mercier <mercier@adacore.com>
733
734 * gnat1drv.adb: Suppress warnings on memory representation in
735 CodePeer compiler mode.
736
a7c8fd7e 7372019-07-08 Nicolas Roche <roche@adacore.com>
738
739 * rtinit.c (__gnat_runtime_initialize): Remove dependency on
740 CommandLineToArgvW.
741
89c9dd55 7422019-07-08 Doug Rupp <rupp@adacore.com>
743
744 * Makefile.rtl: Handle vxworks7r2 in x86_64 and x86 vxworks7.
745
944903c8 7462019-07-08 Dmitriy Anisimkov <anisimko@adacore.com>
747
748 * Makefile.rtl: Use g-sercom__linux.adb for all linuxes.
749
e51a140c 7502019-07-08 Yannick Moy <moy@adacore.com>
751
752 * expander.adb (Expand): Do not reset Analyzed flag always.
753 * sem_eval.adb (Fold_Ureal): Mark node as analyzed.
754
f117e449 7552019-07-08 Ed Schonberg <schonberg@adacore.com>
756
757 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Do not insert twice
758 the assignment statement that computes the delay value, to
759 prevent improper tree sharing when the value is a type
760 conversion and Float_Overflow checks are enabled.
761
f5cb3a59 7622019-07-08 Hristian Kirtchev <kirtchev@adacore.com>
763
764 * bindo.adb: Update the section on terminology to include new
765 concepts. Update the section on switches to include new
766 entries.
767 * bindo.ads: Add type Precedence_Kind.
768 * bindo-builders.adb: Add with and use clauses for Debug and
769 Bindo.Validators. Add use clauses for
770 Bindo.Validators.Invocation_Graph_Validators and
771 Bindo.Validators.Library_Graph_Validators.
772 (Build_Invocation_Graph): Validate the graph immediately after
773 it was built.
774 (Build_Library_Graph): Update the parameter profile. The
775 creation of the graph is now elaboration model-agnostic.
776 Validate the graph immediately after it was built.
777 (Create_With_Edge): Create regular with edges for Elaborate and
778 Elaborate_All edges when the appropriate debug switches are in
779 effect.
780 * bindo-builders.ads (Build_Library_Graph): Update the parameter
781 profile.
782 * bindo-diagnostics.adb (Diagnose_Cycle): Track the presence of
783 an Elaborate_All edge throughout the inspection of the cycle's
784 edges.
785 (Output_Dynamic_Model_Suggestions): Output the suggestion only
786 when the cycle contains at least one weak edge where the
787 successor was statically elaborated.
788 (Output_Elaborate_Body_Transition, Output_Forced_Transition,
789 Output_With_Transition): Update the assertions.
790 * bindo-elaborators.adb: Remove use clauses for
791 Bindo.Validators.Invocation_Graph_Validators and
792 Bindo.Validators.Library_Graph_Validators. Remove strings
793 Add_To_All_Candidates_Msg and Add_To_Comp_Candidates_Msg.
794 Remove type String_Ptr.
795 (Add_Vertex, Add_Vertex_If_Elaborable, Create_All_Candidates_Set
796 Create_Component_Candidates_Set): Remove.
797 (Create_Component_Vertex_Sets, Create_Vertex_Sets): New routine.
798 (Elaborate_Component): Update the parameter profile and the
799 comment on usage. Reimplement the elaboration of a component.
800 The algorithm will now attempt to elaborate as many vertices
801 possible. If this is not possible, and a weakly elaborable
802 vertex is available use unit was compiled using the dynamic
803 model, the algorithm will elaborate it.
804 (Elaborate_Library_Graph): Reimplement the elaboration of the
805 graph. The algorithm will now attempt to elaborate as many
806 vertices along with their components as possible. If this is not
807 possible, and a weakly elaborable vertex is available use unit
808 was compiled using the dynamic model, the algorithm will
809 elaborate it along with its component.
810 (Elaborate_Units): Merge with the functionality of
811 Elaborate_Units_Common.
812 (Elaborate_Units_Common, Elaborate_Units_Dynamic,
813 Elaborate_Units_Static): Remove.
814 (Elaborate_Vertex): Update the parameter profile and the comment
815 on usage. Reimplemented.
816 (Find_Best_Candidate): Remove.
817 (Find_Best_Elaborable_Vertex, Find_Best_Vertex,
818 Find_Best_Weakly_Elaborable_Vertex, Has_Elaborable_Body,
819 Insert_Elaborable_Successor, Insert_Vertex): New routines.
820 (Is_Better_Candidate): Remove.
821 (Is_Better_Elaborable_Vertex,
822 Is_Better_Weakly_Elaborable_Vertex,
823 Is_Suitable_Elaborable_Vertex,
824 Is_Suitable_Weakly_Elaborable_Vertex): New routines.
825 (Trace_Candidate_Vertices): Remove.
826 (Trace_Component): Output the number of strong and weak
827 predecessors.
828 (Trace_Unelaborated_Vertices): Remove.
829 (Trace_Vertex): Output the number of strong and weak
830 predecessors.
831 (Trace_Vertices): New routine.
832 (Update_Successor, Update_Successors): Update the parameter
833 profile and the comment on usage.
834 * bindo-graphs.adb: Remove type Precedence_Kind.
835 (Add_Edge_With_Return): Update the increment of pending
836 predecessors.
837 (Add_Vertex): Provide default values for strong and weak
838 predecessors.
839 (Complementary_Vertex): Move the initial declaration to the
840 spec. Update the parameter profile and the comment on usage.
841 (Contains_Weak_Static_Successor): New routine.
842 (Create): Update the parameter profile. The creation of the
843 graph is now elaboration model-agnostic.
844 (Decrement_Pending_Predecessors): Update the parameter profile
845 and the comment on usage. Reimplemented.
846 (Delete_Edge): Update the decrement of pending predecesors.
847 (Has_Elaborate_Body): Do not treat a vertex as being subject to
848 Elaborate_Body when a debug switch is in effect.
849 (Increment_Pending_Predecessors): Update the parameter profile
850 and the comment on usage. Reimplemented.
851 (Is_Elaborable_Component): Reimplemented.
852 (Is_Elaborable_Vertex): Move the initial declaration to the
853 spec. Reimplemented.
854 (Is_Elaborate_Body_Pair): New routine.
855 (Is_Dynamically_Elaborated): Update the parameter profile.
856 Reimplemented.
857 (Is_Weakly_Elaborable_Vertex): New routine.
858 (Pending_Predecessors): Removed.
859 (Pending_Predecessors_For_Elaboration,
860 Pending_Strong_Predecessors, Pending_Weak_Predecessors,
861 Update_Pending_Predecessors): New routines.
862 (Update_Pending_Predecessors_Of_Components): Update the
863 increment of pending predecessors.
864 * bindo-graphs.ads: Update the components of type
865 Component_Attributes. Update the components of type
866 Library_Graph_Attributes. Update the components of type
867 Library_Graph_Vertex_Attributes. Update the initialization of
868 No_Component_Attributes. Update the initialization of
869 No_Library_Graph_Vertex_Attributes.
870 (Complementary_Vertex, Contains_Weak_Static_Successor): New
871 routines.
872 (Create): Update the parameter profile and the comment on usage.
873 (Decrement_Pending_Predecessors, Is_Dynamically_Elaborated):
874 Update the parameter profile and the comment on usage.
875 (Is_Elaborate_Body_Pair, Is_Weakly_Elaborable_Vertex): New
876 routines.
877 (Pending_Predecessors): Removed.
878 (Pending_Predecessors_For_Elaboration,
879 Pending_Strong_Predecessors, Pending_Weak_Predecessors): New
880 routines.
881 * bindo-writers.adb (Write_Components): Moved from the spec.
882 (Write_Component): Output the strong and weak predecessors.
883 (Write_Library_Graph): Output the components as part of the
884 graph.
885 (Write_Library_Graph_Vertex): Output the strong and weak
886 predecessors.
887 * bindo-writers.ads (Write_Components): Moved to the body.
888 * debug.adb: Add and document new GNATbind switches -d_a, -d_b,
889 -d_e.
890 * bindo-validators.adb: Minor reformattings.
891
7b8ca6b2 8922019-07-08 Bob Duff <duff@adacore.com>
893
894 * libgnat/g-sercom.ads, libgnat/g-sercom__linux.adb (Data_Rate):
895 Support additional data rates.
896
364c746f 8972019-07-08 Olivier Hainque <hainque@adacore.com>
898
899 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Don't request
900 DECL_ARTIFICIAL_P on elab proc declarations.
901
2dbfbbb2 9022019-07-08 Eric Botcazou <ebotcazou@adacore.com>
903
904 * repinfo.adb (List_Record_Info): Declare Incomplete_Layout and
905 Not_In_Extended_Main local exceptions.
906 (List_Structural_Record_Layout): For an extension, raise the
907 former if the parent subtype has not been built and the latter
908 if it is not declared in the main source unit. Fall back to the
909 flat layout if either exception has been raised.
910
3e05bbec 9112019-07-08 Ed Schonberg <schonberg@adacore.com>
912
913 * libgnat/a-strfix.adb (Delete): The RM describes the semantics
914 of Delete as equivalent to that of Replace_String with a null
915 argument. As a result, deleting a null string that starts past
916 the end of its argument is a noop and must not raise
917 Index_Error.
918
c98aac61 9192019-07-08 Javier Miranda <miranda@adacore.com>
920
921 * exp_disp.adb (Register_Primitive): When registering a
922 primitive in the secondary dispatch table, handle primitive
923 inherited through several levels of type derivation (required to
924 properly handle inherited 'null' primitive).
925
221b67b6 9262019-07-08 Bob Duff <duff@adacore.com>
927
928 * doc/gnat_ugn/gnat_utility_programs.rst: Document handling of
929 preprocessor directives in GNATpp.
930
aed4e06a 9312019-07-08 Javier Miranda <miranda@adacore.com>
932
933 * gnat1drv.adb (Post_Compilation_Validation_Checks:
934 Validate_Compile_Time_Warning_Errors is now located in sem_prag
935 (instead of sem_ch13).
936 * sem_ch13.ads (Validate_Compile_Time_Warning_Error,
937 Validate_Compile_Time_Warning_Errors): Move to sem_prag.
938 * sem_ch13.adb
939 (Compile_Time_Warnings_Errors): Move to sem_prag.
940 (Initialize): Remove initialization of table
941 Compile_Time_Warning_Errors.
942 (Validate_Compile_Time_Warning_Error,
943 Validate_Compile_Time_Warning_Errors): Move to sem_prag.
944 * sem_prag.ads (Validate_Compile_Time_Warning_Errors): New
945 procedure.
946 * sem_prag.adb (Initialize): Initialize table
947 Compile_Time_Warning_Errors.
948
b9bd5934 9492019-07-08 Ed Schonberg <schonberg@adacore.com>
950
951 * sem_ch13.adb (Analyze_Aspect_Specifications): For a
952 pre/postcondition of a generic subprogram declaration, do not
953 use Relocate_Node on the aspect expression to construct the
954 corresponding attribute specification, to prevent tree anomalies
955 when the expression is a call with named actual parameters.
956
63bb17d8 9572019-07-08 Javier Miranda <miranda@adacore.com>
958
959 * sem_attr.adb (Analyze_Attribute [Attribute_Size]): For pragmas
960 used to report user defined compile time warning or errors
961 handle 'Size for types with known static RM size.
962
1979cbfe 9632019-07-08 Justin Squirek <squirek@adacore.com>
964
965 * exp_imgv.adb (Build_Enumeration_Image_Tables): Default SSO for
966 the building of image tables.
967 (Expand_Image_Attribute): Minor cleanup.
968
bcb0a375 9692019-07-08 Dmitriy Anisimkov <anisimko@adacore.com>
970
971 * libgnat/g-socket.ads, libgnat/g-socket.adb: Improve
972 documentation.
973 (Get_Socket_Option, Set_Socket_Option): Remove default value for
974 the Level formal.
975
429822c1 9762019-07-08 Ed Schonberg <schonberg@adacore.com>
977
978 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): For an
979 unanalized aspect in a generic context that has not been
980 analyzed yet, if the aspect applies to a type, place the type on
981 the scope stack to make its components visible, before checking
982 conformance with the version of the expression analyzed at the
983 freeze point.
984
e1415398 9852019-07-05 Justin Squirek <squirek@adacore.com>
986
987 * checks.adb (Apply_Accessibility_Check): Add logic to fetch the
988 function result accessibility level if one is required within
989 the generated check.
990 * exp_ch6.adb (Needs_Result_Accessibility_Level): Modify
991 controlling elsif block to handle more cases such as anonymous
992 access results and disable checking for coextensions.
993
dad9e9f8 9942019-07-05 Ed Schonberg <schonberg@adacore.com>
995
996 * sem_ch9.adb (Analyze_Accept_Statement): If this is an illegal
997 accept statement for an enclosing entry abandon analysis to
998 prevent scope mismatches and potential infinite loops in
999 compiler.
1000
627d0751 10012019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
1002
1003 * ali.adb (For_Each_Invocation_Construct,
1004 For_Each_Invocation_Relation): New version.
1005 (Scan_ALI): Initialize field Invocation_Graph_Encoding.
1006 (Set_Invocation_Graph_Encoding): Update the setting of the
1007 invocation graph encoding.
1008 * ali.ads: Move field Invocation_Graph_Encoding from Unit_Record
1009 to ALI_Record because the encoding applies to the whole ALI,
1010 rather than one of the units (spec or body) for which the ALI
1011 file was created.
1012 (For_Each_Invocation_Construct, For_Each_Invocation_Relation):
1013 New version.
1014 * bindo.adb: Update the section on switches. Complete the
1015 section of debugging elaboration order issues.
1016 (Find_Elaboration_Order): Prepare the routine for the switch
1017 from the old to the new elaboration order mechanism.
1018 * bindo-diagnostics.adb (Find_And_Output_Invocation_Paths):
1019 Manage a visited set used by Visit_Vertex.
1020 (Output_All_Cycles_Suggestions,
1021 Output_Dynamic_Model_Suggestions): Clarify the nature of the
1022 suggested switch.
1023 (Output_Elaborate_Body_Transition): Update the diagnostic to
1024 emit a better message.
1025 (Output_Forced_Suggestions, Output_Full_Encoding_Suggestions):
1026 Clarify the nature of the suggested switch.
1027 (Visit_Vertex): Update the parameter profile to add a set of
1028 invokers visited during the transition. This set prevents
1029 infinite exploration of the graph in case the invocations are
1030 recursive.
1031 * bindo-elaborators.adb: Add a use clause for
1032 Bindo.Writers.Dependency_Writers.
1033 (Elaborate_Units_Common): Output the library graph after it has
1034 been augmented with invocation edges. Output just the components
1035 instead of outputting the whole library graph again.
1036 (Elaborate_Units_Dynamic, Elaborate_Units_Static): Output the
1037 dependencies as expressed in the library graph.
1038 * bindo-units.adb (Invocation_Graph_Encoding): Update the
1039 extraction of the invocation graph encoding.
1040 * bindo-writers.adb: Add with and use clauses for Binderr and
1041 Butil.
1042 (palgc, plgc): New debug routine.
1043 (Write_Components): Moved to the spec. Add a header for the
1044 output.
1045 (Write_Dependencies, Write_Dependencies_Of_Vertex,
1046 Write_Dependency_Edge): New routine.
1047 (Write_Elaboration_Order): Update the logic to follow the format
1048 of Binde's order output.
1049 (Write_Library_Graph): Do not output the components every time
1050 the graph is written.
1051 (Write_Unit): Output the invocation graph encoding of the unit.
1052 Output the invocation constructs and relations for the unit
1053 only.
1054 * bindo-writers.ads (Write_Components): Moved from the body.
1055 (Write_Dependencies): New routine.
1056 * bindusg.adb: Prepare the routine for the switch from the old
1057 to the new elaboration order mechanism.
1058 * debug.adb: Binder switch -d_O is now not associated with any
1059 functionality.
1060 * einfo.adb (Is_Elaboration_Target): The attribute applies to
1061 packages, as specified by the comment on the attribute usage.
1062 * opt.ads: Add a global flag which controls the choice between
1063 the new and the legacy elaboration order mechanism.
1064 * sem_elab.adb: Add Package_Target to type Target_Kind.
1065 (Build_Elaborate_Body_Procedure, Build_Elaborate_Procedure,
1066 Build_Elaborate_Spec_Procedure, Check_Elaboration_Scenarios,
1067 Check_SPARK_Model_In_Effect): Use Main_Unit_Entity to obtain the
1068 entity of the main unit.
1069 (Create_Package_Rep): New routine.
1070 (Create_Target_Rep): Add processing for packages.
1071 (Declaration_Placement_Of_Node, Has_Prior_Elaboration): Use
1072 Main_Unit_Entity to obtain the entity of the main
1073 unit.
1074 (Invocation_Graph_Recording_OK): Prepare the routine for the
1075 switch from the old to the new elaboration order mechanism.
1076 (Main_Unit_Entity): New routine.
1077 (Meet_Elaboration_Requirement,
1078 Process_Conditional_ABE_Variable_Reference): Use
1079 Main_Unit_Entity to obtain the entity of the main unit.
1080 (Process_Invocation_Instantiation): New routine.
1081 (Process_Invocation_Scenario): Add processing for
1082 instantiations.
1083 * switch-b.adb (Scan_Binder_Switches): Prepare the routine for
1084 the switch from the old to the new elaboration order mechanism.
1085
30fb27b1 10862019-07-05 Joffrey Huguet <huguet@adacore.com>
1087
1088 * libgnat/a-textio.adb: Add abstract state refinment.
1089 * libgnat/a-textio.ads: Add File_System abstract state. Add
1090 global contracts, contract cases, preconditions and
1091 postconditions to procedures and functions.
1092 (Set_Input, Set_Output, Set_Error, Standard_Input,
1093 Standard_Output, Standard_Error, Current_Input, Current_Output,
1094 Current_Error): Turn SPARK_Mode off.
1095 (Get_Line): Turn SPARK_Mode off on Get_Line functions.
1096 * libgnat/a-tideio.ads, libgnat/a-tienio.ads,
1097 libgnat/a-tifiio.ads, libgnat/a-tiflio.ads,
1098 libgnat/a-tiinio.ads, libgnat/a-timoio.ads: Add global
1099 contracts, contract cases, preconditions and postconditions to
1100 procedures and functions.
1101
ce99fc8a 11022019-07-05 Arnaud Charlet <charlet@adacore.com>
1103
1104 * doc/gnat_ugn/platform_specific_information.rst: Refresh doc on
1105 installing from the command line on Windows. Remove obsolete
1106 part.
1107 * gnat_ugn.texi: Regenerate.
1108
26ea5003 11092019-07-05 Vasiliy Fofanov <fofanov@adacore.com>
1110
1111 * libgnat/a-wichha.ads (Is_Alphanumeric): Replace comment with
1112 the correct one. Also capitalize references to False
1113 throughout.
1114
c9c81835 11152019-07-05 Eric Botcazou <ebotcazou@adacore.com>
1116
1117 * exp_ch4.adb (Expand_N_Indexed_Component): Do not expand actual
1118 parameters of function calls here either.
1119
50948c8a 11202019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
1121
1122 * bindo-units.adb, checks.adb, exp_attr.adb, exp_ch3.adb,
1123 exp_ch4.adb, exp_pakd.adb, lib-writ.adb, libgnat/g-traceb.adb,
1124 libgnat/g-traceb.ads, libgnat/s-stratt.ads, sem_aux.ads,
1125 sem_util.adb: Minor reformatting.
1126
a9fa50ab 11272019-07-05 Ed Schonberg <schonberg@adacore.com>
1128
1129 * sem_ch13.adb (Build_Predicate_Functions): If a subtype that
1130 carries a static predicate aspect is frozen immediately after
1131 its declaration, ensure that the generated function body created
1132 for predicate checking is inserted after the corresponding
1133 subprogram declaration, which is created at the point the
1134 declaration is elaborated.
1135
ee4e1dd7 11362019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
1137
1138 * exp_ch7.adb (Cleanup_Record): Use the underlying type when
1139 checking for components with tasks.
1140
2028580f 11412019-07-05 Arnaud Charlet <charlet@adacore.com>
1142
1143 * libgnarl/s-osinte__linux.ads: Link with -lrt before -lpthread.
1144
ec1e481f 11452019-07-05 Ed Schonberg <schonberg@adacore.com>
1146
1147 * exp_pakd.adb (Expand_Bit_Packed_Element_Set): Add explicit
1148 range checks when the index type of the bit-packed array is an
1149 enumeration type with a non-standard representation,
1150
ae60396a 11512019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
1152
1153 * sem_res.adb (Is_Control_Flow_Statement): Delay statements
1154 contain an expression, which in turn may have side effects and
1155 affect the infinite recursion. As a result, delay statements
1156 should not be treated specially.
1157
d33025f2 11582019-07-05 Arnaud Charlet <charlet@adacore.com>
1159
1160 * libgnarl/s-linux.ads, libgnarl/s-linux__alpha.ads,
1161 libgnarl/s-linux__android.ads, libgnarl/s-linux__hppa.ads,
1162 libgnarl/s-linux__mips.ads, libgnarl/s-linux__riscv.ads,
1163 libgnarl/s-linux__sparc.ads: Fix typos in comments.
1164
51f2c7f9 11652019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
1166
1167 * sem_res.adb (Check_Infinite_Recursion): Reimplemented.
1168 (Enclosing_Declaration_Or_Statement,
1169 Invoked_With_Different_Arguments, Is_Conditional_Statement,
1170 Is_Control_Flow_Statement, Is_Immediately_Within_Body,
1171 Is_Raise_Idiom, Is_Raise_Statement, Is_Sole_Statement,
1172 Preceded_By_Control_Flow_Statement,
1173 Within_Conditional_Statement): New routines.
1174
0e6f6ee1 11752019-07-05 Javier Miranda <miranda@adacore.com>
1176
1177 * exp_ch4.adb (Expand_N_Type_Conversion): Do not apply an
1178 accessibility check when the conversion is an access to
1179 class-wide interface type and it is an actual parameter.
1180 * exp_ch6.adb (Expand_Call_Helper): Add documentation on the
1181 accessibility level of an anonymous allocator defining the value
1182 of an access parameter.
1183 * sem_util.ads, sem_util.adb (Dynamic_Accessibility_Level): Add
1184 support for an anonymous allocator whose type is that of a
1185 stand-alone object of an anonymous access to object type.
1186
f28a3d6c 11872019-07-05 Piotr Trojanek <trojanek@adacore.com>
1188
1189 * einfo.ads, sem_res.adb: Typo fixes in comments.
1190
2d8a0eb3 11912019-07-05 Bob Duff <duff@adacore.com>
1192
1193 * exp_ch6.adb (Is_Build_In_Place_Function): Narrow the check for
1194 Has_Foreign_Convention to the imported case only. If a
1195 build-in-place function is exported, and called from Ada code,
1196 build-in-place protocols should be used.
1197
6eddee84 11982019-07-05 Ed Schonberg <schonberg@adacore.com>
1199
1200 * sem_util.adb (Encloing_Subprogram): If Enclosing_Dynamic_Scope
1201 is a loop, continue climbing the scope stack to find the
1202 enclosing subprogram.
1203 (Gather_Components): Handle properly a choice in a record
1204 aggregate that is given by a subtype with a static predicate.
1205
249e38a7 12062019-07-05 Javier Miranda <miranda@adacore.com>
1207
1208 * debug.adb (-gnatd.K): Leave available this switch.
1209 * contracts.adb (Build_And_Analyze_Contract_Only_Subprograms):
1210 Remove.
1211 * scil_ll.ads, scil_ll.adb (Contract_Only_Body_Flag,
1212 Contract_Only_Body_Nodes, Get_Contract_Only_Body,
1213 Is_Contract_Only_Body, Set_Contract_Only_Body): Remove.
1214
33ae0c9f 12152019-07-05 Pierre-Marie de Rodat <derodat@adacore.com>
1216
1217 * libgnat/a-strunb.ads: Import documentation from the RM
1218
70f9c8aa 12192019-07-05 Pierre-Marie de Rodat <derodat@adacore.com>
1220
1221 * libgnat/a-strfix.ads: Import documentation from the RM
1222
1bc68ac2 12232019-07-05 Yannick Moy <moy@adacore.com>
1224
1225 * adabkend.adb (Scan_Back_End_Switches): Accept -Og and -Ofast
1226 switches.
1227
2500be2f 12282019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
1229
1230 * ali.adb: Relocate types Invocation_Construct_Record,
1231 Invocation_Relation_Record, and Invocation_Signature_Record to
1232 the body of ALI. Relocate tables Invocation_Constructs,
1233 Invocation_Relations, and Invocation_Signatures to the body of
1234 ALI. Remove type Body_Placement_Codes. Add new types
1235 Declaration_Placement_Codes, and
1236 Invocation_Graph_Encoding_Codes. Update the literals of type
1237 Invocation_Graph_Line_Codes.
1238 (Add_Invocation_Construct): Update the parameter profile. Add an
1239 invocation construct built from all attributes provided.
1240 (Add_Invocation_Relation): Update the parameter profile. Add an
1241 invocation relation built from all attributes provided.
1242 (Body_Placement): New routine.
1243 (Body_Placement_Kind_To_Code, Code_To_Body_Placement_Kind):
1244 Removed.
1245 (Code_To_Declaration_Placement_Kind,
1246 Code_To_Invocation_Graph_Encoding_Kind, Column,
1247 Declaration_Placement_Kind_To_Code, Extra,
1248 For_Each_Invocation_Construct, For_Each_Invocation_Relation,
1249 Invocation_Graph_Encoding,
1250 Invocation_Graph_Encoding_Kind_To_Code, Invoker, Kind, Line,
1251 Locations, Name): New routine.
1252 (Scan_Invocation_Construct_Line): Reimplement the scanning
1253 mechanism.
1254 (Scan_Invocation_Graph_Attributes_Line): New routine.
1255 (Scan_Invocation_Graph_Line): Use a case statement to dispatch.
1256 (Scan_Invocation_Relation_Line): Reimplement the scanning
1257 mechanism.
1258 (Scope): New routine.
1259 (Set_Invocation_Graph_Encoding, Signature, Spec_Placement,
1260 Target): New routine.
1261 * ali.ads: Add new type Invocation_Graph_Encoding_Kind. Add
1262 component Invocation_Graph_Encoding to type Unit_Record.
1263 Relocate various types and data structures to the body of ALI.
1264 (Add_Invocation_Construct, Add_Invocation_Relation): Update the
1265 parameter profile.
1266 (Body_Placement): New routine.
1267 (Body_Placement_Kind_To_Code, Code_To_Body_Placement_Kind):
1268 Removed.
1269 (Code_To_Declaration_Placement_Kind,
1270 Code_To_Invocation_Graph_Encoding_Kind, Column,
1271 Declaration_Placement_Kind_To_Code, Extra,
1272 For_Each_Invocation_Construct, For_Each_Invocation_Relation,
1273 Invocation_Graph_Encoding,
1274 Invocation_Graph_Encoding_Kind_To_Code, Invoker, Kind, Line,
1275 Locations, Name, Scope, Set_Invocation_Graph_Encoding,
1276 Signature, Spec_Placement, Target): New routine.
1277 * bindo.adb: Add with clause for Binde. Add with and use
1278 clauses for Debug. Update the documentation. Add new switches.
1279 (Find_Elaboration_Order): Dispatch to the proper elaboration
1280 mechanism.
1281 * bindo-augmentors.adb:
1282 Remove with and use clauses for GNAT and GNAT.Sets. Remove
1283 membership set VS. Update the parameter profiles of most
1284 routines to use better parameter names. Update the
1285 implementation of most routine to use the new parameter names.
1286 Remove various redundant assertions.
1287 * bindo-builders.adb: Use better names for instantiated data
1288 structures. Update all references to these names. Update the
1289 parameter profiles of most routines to use better parameter
1290 names. Update the implementation of most routine to use the new
1291 parameter names.
1292 (Build_Library_Graph): Update the parameter profile. Update the
1293 call to Create.
1294 (Create_Vertex): Reimplemented.
1295 (Declaration_Placement_Vertex): New routine.
1296 * bindo-builders.ads (Build_Library_Graph): Update the parameter
1297 profile and comment on usage.
1298 * bindo-diagnostics.adb: Almost a new unit.
1299 * bindo-diagnostics.ads: Add a use clause for
1300 Bindo.Graphs.Invocation_Graphs. Remove package
1301 Cycle_Diagnostics.
1302 (Diagnose_Circularities): New routine.
1303 * bindo-elaborators.adb: Remove the with and use clauses for
1304 Binderr and GNAT.Sets. Remove the use clause for
1305 Bindo.Diagnostics.Cycle_Diagnostics. Remove membership set VS.
1306 Update the parameter profiles of most routines to use better
1307 parameter names. Update the implementation of most routine to
1308 use the new parameter names. (Elaborate_Units_Common): Update
1309 the parameter profile. Pass an infication to the library graph
1310 builder whether the dynamic model is in effect.
1311 (Elaborate_Units_Dynamic, Elaborate_Units_Static): Use
1312 Diagnose_Circularities to provide diagnostics.
1313 (Update_Successor): Use routine In_Same_Component to determine
1314 whether the predecessor and successor reside in different
1315 components.
1316 * bindo-graphs.adb: Add with and use clauses for Butil, Debug,
1317 Output, and Bindo.Writers. Remove with and use clauses for
1318 GNAT.Lists. Update the parameter profiles of most routines to
1319 use better parameter names. Update the implementation of most
1320 routine to use the new parameter names. Remove various
1321 redundant assertions. Remove doubly linked list EL. Add new
1322 type Precedence_Kind.
1323 (Add_Cycle): New routine.
1324 (Add_Vertex): Update the parameter profile. Update the creation
1325 of vertex attributes.
1326 (Add_Vertex_And_Complement, Body_Vertex, Column,
1327 Complementary_Vertex, Copy_Cycle_Path, Cycle_Kind_Of): New
1328 routines.
1329 (Destroy_Invocation_Graph_Edge, Destroy_Library_Graph_Cycle,
1330 Destroy_Library_Graph_Edge, Extra, File_Name,
1331 Find_All_Cycles_Through_Vertex, Find_All_Cycles_With_Edge,
1332 Find_Cycles, Find_First_Lower_Precedence_Cycle,
1333 Get_LGC_Attributes, Has_Next, Hash_Library_Graph_Cycle,
1334 Hash_Library_Graph_Cycle_Attributes, Highest_Precedence_Cycle,
1335 Highest_Precedence_Edge, In_Same_Component, Insert_And_Sort,
1336 Invocation_Edge_Count, Invocation_Graph_Encoding,
1337 Is_Cycle_Initiating_Edge, Is_Cyclic_Edge,
1338 Is_Cyclic_Elaborate_All_Edge, Is_Cyclic_Elaborate_Body_Edge,
1339 Is_Cyclic_Elaborate_Edge, Is_Cyclic_Forced_Edge,
1340 Is_Cyclic_Invocation_Edge, Is_Cyclic_With_Edge,
1341 Is_Dynamically_Elaborated, Is_Elaborate_All_Edge,
1342 Is_Elaborate_Body_Edge, Is_Elaborate_Edge: New routines.
1343 (Is_Existing_Predecessor_Successor_Relation): Removed.
1344 (Is_Forced_Edge, Is_Invocation_Edge, Is_Recorded_Cycle,
1345 Is_Recorded_Edge, Is_With_Edge, Iterate_Edges_Of_Cycle, Kind,
1346 Length): New routine.
1347 (Lib_Vertex): Removed.
1348 (Line, Links_Vertices_In_Same_Component,
1349 Maximum_Invocation_Edge_Count, Next, Normalize_And_Add_Cycle,
1350 Normalize_Cycle_Path, Number_Of_Cycles, Path, Precedence,
1351 Remove_Vertex_And_Complement, Sequence_Next_Cycle): New routines.
1352 (Sequence_Next_IGE_Id): Renamed to Sequence_Next_Edge.
1353 (Sequence_Next_IGV_Id): Renamed to Sequence_Next_Vertex.
1354 (Sequence_Next_LGE_Id): Renamed to Sequence_Next_Edge.
1355 (Sequence_Next_LGV_Id): Renamed to Sequence_Next_Vertex.
1356 (Set_Is_Existing_Predecessor_Successor_Relation): Removed.
1357 (Set_Is_Recorded_Cycle, Set_Is_Recorded_Edge,
1358 Set_LGC_Attributes, Spec_Vertex, Trace_Cycle, Trace_Edge,
1359 Trace_Eol, Trace_Vertex): New routines.
1360 * bindo-graphs.ads: Add with and use clauses for Types and
1361 GNAT.Lists. Update the parameter profiles of most routines to
1362 use better parameter names. Update the implementation of most
1363 routine to use the new parameter names. Add the new
1364 instantiated data structures IGE_Lists, IGV_Sets, LGC_Lists,
1365 LGE_Lists, LGE_Sets, LGV_Sets, and RC_Sets. Add new type
1366 Library_Graph_Cycle_Id along with an empty and initial value.
1367 Remove component Lib_Vertex and add new components Body_Vertex
1368 and Spec_Vertex to type Invocation_Graph_Vertex_Attributes. Add
1369 new type Library_Graph_Cycle_Kind. Add new iterators
1370 All_Cycle_Iterator and Edges_Of_Cycle_Iterator. Add new type
1371 Library_Graph_Cycle_Attributes. Add new components
1372 Cycle_Attributes, Cycles, and Dynamically_Elaborated to type
1373 Library_Graph_Attributes.
1374 (Body_Vertex, Column, Destroy_Invocation_Graph_Edge,
1375 Destroy_Library_Graph_Cycle_Attributes,
1376 Destroy_Library_Graph_Edge, Extra, File_Name, Find_Cycles,
1377 Has_Elaborate_All_Cycle, Has_Next, Hash_Library_Graph_Cycle,
1378 Hash_Library_Graph_Cycle_Attributes, Highest_Precedence_Cycle,
1379 In_Same_Component, Invocation_Edge_Count,
1380 Invocation_Graph_Encoding, Is_Dynamically_Elaborated,
1381 Is_Elaborate_All_Edge, Is_Elaborate_Body_Edge,
1382 Is_Elaborate_Edge, Is_Forced_Edge, Is_Invocation_Edge,
1383 Is_With_Edge, Iterate_All_Cycles, Iterate_Edges_Of_Cycle, Kind):
1384 New routines.
1385 (Length, Lib_Vertex, (Line, Next, Number_Of_Cycles, Present,
1386 Same_Library_Graph_Cycle_Attributes, Spec_Vertex): New routines.
1387 * bindo-units.adb (File_Name, Invocation_Graph_Encoding): New
1388 routines.
1389 * bindo-units.ads: Add new instantiated data structure
1390 Unit_Sets.
1391 (File_Name, Invocation_Graph_Encoding): New routine.
1392 * bindo-validators.adb: Remove with and use clauses for GNAT and
1393 GNAT.Sets. Remove membership set US. Update the parameter
1394 profiles of most routines to use better parameter names. Update
1395 the implementation of most routine to use the new parameter
1396 names.
1397 (Validate_Cycle, Validate_Cycle_Path, Validate_Cycles,
1398 Validate_Invocation_Graph_Vertex): Remove the validation of
1399 component Lib_Vertex. Add the validation of components
1400 Body_Vertex and Spec_Vertex.
1401 (Write_Error): New routine.
1402 * bindo-validators.ads (Validate_Cycles): New routine.
1403 * bindo-writers.adb: Update the parameter profiles of most
1404 routines to use better parameter names. Update the
1405 implementation of most routine to use the new parameter names.
1406 (Write_Cycle, Write_Cyclic_Edge, Write_Cycles): New routines.
1407 (Write_Invocation_Graph_Vertex): Remove the output of component
1408 Lib_Vertex. Add the output of components Body_Vertex and
1409 Spec_Vertex.
1410 * bindo-writers.ads (Write_Cycles): New routine.
1411 * debug.adb: Use binder switches -d_C and -d_P, add
1412 documentation on their usage.
1413 * gnatbind.adb: Remove with and use clauses for Binde. Delegate
1414 the choice of elaboration mechanism to Bindo.
1415 * lib-writ.adb (Column, Extra, Invoker, Kind, Line, Locations,
1416 Name, Placement, Scope, Signature, Target): Removed.
1417 (Write_Invocation_Graph): Moved at the top level.
1418 (Write_Invocation_Graph_Attributes): New routine.
1419 (Write_Invocation_Relation, Write_Invocation_Signature): Moved
1420 at the top level.
1421 * lib-writ.ads: Add a documentation section on invocation graph
1422 attributes.
1423 * sem_elab.adb (Body_Placement_Of): New routine.
1424 (Declare_Invocation_Construct): Update the call to
1425 Add_Invocation_Construct.
1426 (Declaration_Placement_Of_Node): New routine.
1427 (Get_Invocation_Attributes): Correct the retrieval of the
1428 enclosing subprogram where the postcondition procedure lives.
1429 (Placement_Of, Placement_Of_Node): Removed.
1430 (Record_Invocation_Graph): Record the encoding format used.
1431 (Record_Invocation_Graph_Encoding): New routine.
1432 (Record_Invocation_Relation): Update the call to
1433 Add_Invocation_Relation.
1434 (Spec_Placement_Of): Removed.
1435 * libgnat/g-lists.ads, libgnat/g-lists.adb (Equal): New routine.
1436
164597c5 14372019-07-05 Ed Schonberg <schonberg@adacore.com>
1438
1439 * checks.adb (Apply_Predicate_Check): Except within the
1440 subprogram body that defines the formal, do not apply predicate
1441 check on a formal IN parameter: such a check is redundant and
1442 its expansion can lead to out-of-scope references when it is
1443 originates in a function call in a precondition,
1444
572a4bc5 14452019-07-05 Yannick Moy <moy@adacore.com>
1446
1447 * sem_res.adb (Resolve_Call): Cannot inline in quantified
1448 expressions.
1449 * sem_util.adb, sem_util.ads (In_Quantified_Expression): New
1450 function.
1451
2c3ad474 14522019-07-05 Bob Duff <duff@adacore.com>
1453
1454 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
1455 Fix typo.
1456 * gnat_rm.texi: Regenerate.
1457
2f67af4c 14582019-07-05 Bob Duff <duff@adacore.com>
1459
1460 * exp_attr.adb (Input): Take the No_Stream_Optimizations
1461 restriction into account.
1462
1cb1fd0f 14632019-07-05 Claire Dross <dross@adacore.com>
1464
1465 * libgnat/a-cofove.ads, libgnat/a-cofove.adb: Definite formal
1466 vectors are now always bounded so that they do not need to be
1467 limited anymore.
1468
d2d09f3e 14692019-07-05 Dmitriy Anisimkov <anisimko@adacore.com>
1470
1471 * libgnat/g-traceb.ads, libgnat/g-traceb.adb (Call_Chain): New
1472 function.
1473
14e0bfed 14742019-07-04 James Clarke <jrtc27@debian.org>
1475
1476 * libgnarl/s-osinte__kfreebsd-gnu.ads (clockid_t): Make type
1477 definition public.
1478 (CLOCK_REALTIME): Make value public.
1479
ecd07d3b 14802019-07-04 Javier Miranda <miranda@adacore.com>
1481
1482 * exp_tss.adb (Init_Proc): Adding missing support for access to
1483 subprograms and access to protected subprograms of non-default
1484 C++ constructors.
1485
e0ff1639 14862019-07-04 Eric Botcazou <ebotcazou@adacore.com>
1487
1488 * gnat1drv.adb (Adjust_Global_Switches): Use proper interface to
1489 set the validity settings in CodePeer mode.
1490 * par-load.adb (Load): Remove all code dealing with validity
1491 settings.
1492 * validsw.ads (Validity_Check_Copies): Alphabetize.
1493 * validsw.adb (Reset_Validity_Check_Options): Set all options to
1494 off.
1495 (Save_Validity_Check_Options): Save all options.
1496
40bff3a0 14972019-07-04 Hristian Kirtchev <kirtchev@adacore.com>
1498
1499 * exp_ch3.adb, exp_ch4.adb, exp_ch4.ads, exp_ch5.adb,
1500 exp_ch7.adb, exp_ch9.adb, exp_ch11.adb, exp_unst.adb,
1501 rtsfind.ads, sem_attr.adb, sem_ch10.adb, sem_ch12.adb,
1502 sem_ch13.adb, sem_dim.adb, sem_disp.adb, xref_lib.adb: Minor
1503 reformatting.
1504
0ebaade4 15052019-07-04 Joffrey Huguet <huguet@adacore.com>
1506
1507 * libgnarl/a-taside.ads: Add assertion policy to ignore
1508 preconditions.
1509 (Abort_Task, Is_Terminated, Is_Callable): Add preconditions.
1510
f14a590b 15112019-07-04 Eric Botcazou <ebotcazou@adacore.com>
1512
1513 * doc/gnat_rm/implementation_defined_pragmas.rst: Fix
1514 capitalization and parenthesis glitches.
1515 * gnat_rm.texi: Regenerate.
1516
f5388f99 15172019-07-04 Ed Schonberg <schonberg@adacore.com>
1518
1519 * sem_ch10.adb (Remove_Context_Clauses): Handle properly the
1520 removal of a limited_with_clause which appears in the library
1521 unit oF the main unit, when some other unit in the context has a
1522 regular with_clause on the same unit, to prevent spurious
1523 visibility errors in the subsequent analysis of pending instance
1524 bodies.
1525
c930bc82 15262019-07-04 Hristian Kirtchev <kirtchev@adacore.com>
1527
1528 * sem_elab.adb: Add new type Elaboration_Phase_Status along with
1529 a global to keep track of the elaboration phase status.
1530 Initialize all internal data structures to Nil for services
1531 Elaborated_Units, Internal_Representation, and Scenario_Storage.
1532 (Build_Call_Marker): Do not create a call marker when the
1533 elaboration phase is not active.
1534 (Build_Variable_Reference_Marker): Do not create a call marker
1535 when the elaboration phase is not active.
1536 (Check_Elaboration_Scenarios): Destroy all internal structures
1537 when the elaboration phase does not have to run. Do not execute
1538 when the elaboration phase is not active.
1539 (Elaboration_Phase_Active): New routine.
1540 (Finalize_All_Data_Structures): New routine.
1541 (Initialize): Initialize all internal data structures and signal
1542 that the elaboration phase has started.
1543 (Initialize_All_Data_Structures): New routine.
1544 (Initialize_Elaborated_Units): Initialize all internal data
1545 structures.
1546 (Initialize_Internal_Representation): Initialize all internal
1547 data structures.
1548 (Initialize_Scenario_Storage): Initialize all internal data
1549 structures.
1550 (Kill_Elaboration_Scenario): Do not execute when the elaboration
1551 phase is not active.
1552 (Set_Elaboration_Phase): New routine.
1553 (Update_Elaboration_Scenario): Do not execute when the
1554 elaboration phase is not active.
1555
39dec7f4 15562019-07-04 Gary Dismukes <dismukes@adacore.com>
1557
1558 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The special
1559 treatment of calling Mask_Unfrozen_Types must also be done in
1560 the case of an Ignored_Ghost_Entity, because Expander_Active is
1561 False in that case.
1562
92b004be 15632019-07-04 Yannick Moy <moy@adacore.com>
1564
1565 * sem_prag.adb (Check_Library_Level_Entity): Update for new rule
1566 on SPARK_Mode.
1567
12795e1c 15682019-07-04 Justin Squirek <squirek@adacore.com>
1569
1570 * sem_disp.adb (Check_Controlling_Formals): Obtain the full view
1571 before type comparison.
1572
63fe3141 15732019-07-04 Ed Schonberg <schonberg@adacore.com>
1574
1575 * exp_ch4.ads, exp_ch4.adb (Build_Eq_Call): New visible
1576 subprogram, extracted from Expand_Composite_Equality, to handle
1577 properly the composition of equality for variant record types.
1578 * exp_ch3.adb (MAke_Eq_If): Use Build_Eq_Call for each
1579 component, to handle properly the case of a component with a
1580 user-defined equality. Revert to predefined equality if the
1581 user-defined operation is abstract, to maintain compatibility
1582 with older versions,
1583
17fa952a 15842019-07-04 Justin Squirek <squirek@adacore.com>
1585
1586 * exp_ch3.adb (Build_Initialization_Call): Fixup
1587 *_skip_null_excluding_check argument to handle new default.
1588 (Init_Formals): Make *_skip_null_excluding_check formal default
1589 to False
1590 * exp_ch4.adb (Expand_N_Allocator): Add comment to note heavy
1591 code duplication
1592
cf32543d 15932019-07-04 Bob Duff <duff@adacore.com>
1594
1595 * sem_ch3.adb (Access_Definition): Do not create a master unless
1596 Tasking_Allowed. Otherwise, this fails on restricted runtimes.
1597
eb4dbf20 15982019-07-04 Hristian Kirtchev <kirtchev@adacore.com>
1599
1600 * sem_util.adb (Propagate_DIC_Attributes): Do not propagate the
1601 Default_Initial_Condition attributes to an incomplete type.
1602
25ddc6ba 16032019-07-04 Ed Schonberg <schonberg@adacore.com>
1604
1605 * sem_attr.adb (Check_Array_Type): An array type attribute such
1606 as 'First can be applied to an unconstrained array tyope when
1607 the attribute reference appears within an aspect specification
1608 and the prefix is a current instance, given that the prefix of
1609 the attribute will become a formal of the subprogram that
1610 implements the aspect (typically a predicate check).
1611
74a5962a 16122019-07-04 Piotr Trojanek <trojanek@adacore.com>
1613
1614 * sem_util.adb (Yields_Synchronized_Object): Fix typos in
1615 comments.
1616
c65d33a8 16172019-07-04 Yannick Moy <moy@adacore.com>
1618
1619 * sem_util.adb (Yields_Synchronized_Object): Adapt to new SPARK
1620 rule.
1621
afd77d39 16222019-07-04 Yannick Moy <moy@adacore.com>
1623
1624 * sem_spark.adb (Check_Statement): Only check permission of
1625 object in extended return when it is of a deep type.
1626
2281b807 16272019-07-04 Justin Squirek <squirek@adacore.com>
1628
1629 * sem_ch12.adb (Perform_Appropriate_Analysis): Added for
1630 selecting which type of analysis based on wheither the
1631 instantiation is a generic at the library-level. In which case
1632 expansion during analysis.
1633 (Preanalyze_Actuals): Modify calls to Analyze to use the new
1634 routine.
1635
542b3e26 16362019-07-04 Ed Schonberg <schonberg@adacore.com>
1637
1638 * exp_unst.adb: Handle conditional expressions.
1639
7754aad4 16402019-07-04 Yannick Moy <moy@adacore.com>
1641
1642 * sem_spark.adb (Check_Package_Spec, Check_Package_Body): Only
1643 analyze parts of the code marked in SPARK.
1644
3843c1bd 16452019-07-04 Hristian Kirtchev <kirtchev@adacore.com>
1646
1647 * erroutc.adb, exp_aggr.adb, inline.adb, opt.adb, sem_ch3.adb:
1648 Minor reformatting.
1649
5bc0f990 16502019-07-04 Yannick Moy <moy@adacore.com>
1651
1652 * sem_spark.adb (Explanation, Get_Expl): New functions to get
1653 the explanation for a permission mismatch.
1654 (Perm_Error, Perm_Mismatch, Perm_Error_Loop_Exit): Take
1655 explanation into account for issuing a more precise error
1656 message.
1657 (Set_Perm_Prefixes, Set_Perm_Extensions,
1658 Set_Perm_Extensions_Move): Pass suitable argument for the
1659 explanation node.
1660
11903e68 16612019-07-04 Arnaud Charlet <charlet@adacore.com>
1662
1663 * exp_aggr.adb (In_Place_Assign_OK): Moved to top level and add
1664 support for record aggregates.
1665 (Component_Check): Use Is_CCG_Supported_Aggregate instead of a
1666 similar local predicate.
1667 (Convert_To_Assignments): Take advantage of In_Place_Assign_OK
1668 predicate when possible.
1669 (Is_CCG_Supported_Aggregate): Return False for records with
1670 representation clauses and fix the logic for dealing with nested
1671 aggregates.
1672
b0c19ea3 16732019-07-04 Piotr Trojanek <trojanek@adacore.com>
1674
1675 * opt.adb (Set_Config_Switches): Keep assertions policy as
1676 enabled when analysing internal units in GNATprove mode.
1677
90f2b146 16782019-07-04 Arnaud Charlet <charlet@adacore.com>
1679
1680 * exp_ch4.adb (Expand_Short_Circuit_Operator): Strip
1681 N_Variable_Reference_Marker when checking for the presence of
1682 actions.
1683
39ecad34 16842019-07-04 Arnaud Charlet <charlet@adacore.com>
1685
1686 * exp_aggr.adb (Check_Component): Take into account type
1687 conversions.
1688
c0e899f1 16892019-07-04 Dmitriy Anisimkov <anisimko@adacore.com>
1690
1691 * doc/gnat_ugn/platform_specific_information.rst: Document
1692 Windows socket timeout particularity.
1693 * gnat_ugn.texi: Regenerate.
1694 * gsocket.h: Include versionhelpers.h.
1695 * socket.c (__gnat_minus_500ms): New function.
1696 * libgnat/g-sothco.ads (Minus_500ms_Windows_Timeout): New
1697 imported function.
1698 * libgnat/g-socket.adb (Set_Socket_Option): Refactor to remove
1699 500ms from the requested timeout only on old Windows version.
1700
363b1a8e 17012019-07-04 Thomas Quinot <quinot@adacore.com>
1702
1703 * get_scos.adb: Remove bogus, dead code.
1704
4ae0a9ce 17052019-07-04 Ed Schonberg <schonberg@adacore.com>
1706
1707 * sem_dim.adb (Analyze_Dimension_Array_Aggregate): If the
1708 component is an entity name, its dimensions are those of its
1709 type.
1710
d60fa3c9 17112019-07-03 Bob Duff <duff@adacore.com>
1712
1713 * doc/gnat_ugn/gnat_utility_programs.rst: Document new flags in
1714 GNATpp.
1715
877ad320 17162019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
1717
1718 * binde.adb: Remove with clause for System.OS_Lib.
1719 (Force_Elab_Order): Refactor the majority of the code in Butil.
1720 Use the new forced units iterator to obtain unit names.
1721 * bindo-builders.adb: Add with and use clauses for Binderr,
1722 Butil, Opt, Output, Types, GNAT, and GNAT.Dynamic_HTables. Add
1723 a hash table which maps units to line number in the forced
1724 elaboration order file.
1725 (Add_Unit): New routine.
1726 (Build_Library_Graph): Create forced edges between pairs of
1727 units listed in the forced elaboration order file.
1728 (Create_Forced_Edge, Create_Forced_Edges, Destroy_Line_Number,
1729 Duplicate_Unit_Error, Hash_Unit, Internal_Unit_Info,
1730 Is_Duplicate_Unit, Missing_Unit_Info): New routines.
1731 * bindo-graphs.adb (Is_Internal_Unit, Is_Predefined_Unit):
1732 Refactor some of the behavior to Bindo-Units.
1733 * bindo-graphs.ads: Enable the enumeration literal for forced
1734 edges.
1735 * bindo-units.adb, bindo-units.ads (Is_Internal_Unit,
1736 Is_Predefined_Unit): New routines.
1737 * butil.adb: Add with and use clauses for Opt, GNAT, and
1738 System.OS_Lib. Add with clause for Unchecked_Deallocation.
1739 (Has_Next, Iterate_Forced_Units, Next, Parse_Next_Unit_Name,
1740 Read_Forced_Elab_Order_File): New routines.
1741 * butil.ads: Add with and use clauses for Types. Add new
1742 iterator over the units listed in the forced elaboration order
1743 file.
1744 (Has_Next, Iterate_Forced_Units, Next): New routine.
1745 * namet.adb, namet.ads (Present): New routine.
1746
01e6eb2f 17472019-07-03 Bob Duff <duff@adacore.com>
1748
1749 * sem_ch3.adb (Access_Definition): The code was creating a
1750 master in the case where the designated type is a class-wide
1751 interface type. Create a master in the noninterface case as
1752 well. That is, create a master for all limited class-wide types.
1753
9ad42832 17542019-07-03 Yannick Moy <moy@adacore.com>
1755
1756 * erroutc.adb (Sloc_In_Range): New function to determine whether
1757 the range of a pragma Warnings covers a location, taking
1758 instantiations into account.
1759
f2a8d64e 17602019-07-03 Johannes Kanig <kanig@adacore.com>
1761
1762 * osint.ads, osint.adb (Get_First_Main_File_Name): New routine
1763 to access the first file provided on the command line.
1764
d4f28933 17652019-07-03 Ed Schonberg <schonberg@adacore.com>
1766
1767 * inline.adb (Process_Formals_In_Aspects): New procedure within
1768 Expand_Inlined_Call, to perform a replacement of references to
1769 formals that appear in aspect specifications within the body
1770 being inlined.
1771
23e7fc9b 17722019-07-03 Justin Squirek <squirek@adacore.com>
1773
1774 * sem_ch8.adb (Analyze_Object_Renaming): Add call to search for
1775 the appropriate actual subtype of the object renaming being
1776 analyzed.
1777 (Check_Constrained_Object): Minor cleanup.
1778
f8e6d133 17792019-07-03 Yannick Moy <moy@adacore.com>
1780
1781 * sem_spark.adb (Get_Observed_Or_Borrowed_Expr): New function to
1782 return go through traversal function call.
1783 (Check_Type): Consistently use underlying type.
1784 (Get_Perm): Adapt for case of elaboration code where variables
1785 are not declared in the environment. Remove incorrect handling
1786 of borrow and observe.
1787
d044ba5c 17882019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
1789
1790 * inline.adb (Build_Return_Object_Formal): New routine.
1791 (Can_Split_Unconstrained_Function): Code clean up.
1792 (Copy_Formals,Copy_Return_Object): New routines.
1793 (Split_Unconstrained_Function): Code clean up and refactoring.
1794
8699de72 17952019-07-03 Gary Dismukes <dismukes@adacore.com>
1796
1797 * bindo-augmentors.adb, bindo-augmentors.ads,
1798 bindo-builders.ads, bindo-elaborators.adb, sem_ch12.adb,
1799 sem_ch13.adb, sem_spark.adb, sinfo.ads: Minor editorial
1800 corrections and reformatting.
1801
2ccf6539 18022019-07-03 Bob Duff <duff@adacore.com>
1803
1804 * sem_warn.adb (Check_Infinite_Loop_Warning): Avoid the warning
1805 if an Iterator_Specification is present.
1806
17b5260d 18072019-07-03 Bob Duff <duff@adacore.com>
1808
1809 * doc/gnat_ugn/gnat_utility_programs.rst: Document default
1810 new-line behavior.
1811
5f71d12c 18122019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
1813
1814 * ali.adb: Add with and use clauses for GNAT,
1815 GNAT.Dynamic_HTables, and Snames. Add a map from invocation
1816 signature records to invocation signature ids. Add various
1817 encodings of invocation-related attributes. Sort and update
1818 table Known_ALI_Lines.
1819 (Add_Invocation_Construct, Add_Invocation_Relation,
1820 Body_Placement_Kind_To_Code, Code_To_Body_Placement_Kind,
1821 Code_To_Invocation_Construct_Kind, Code_To_Invocation_Kind,
1822 Code_To_Invocation_Graph_Line_Kind, Destroy, Hash): New
1823 routines.
1824 (Initialize_ALI): Sort the initialization sequence. Add
1825 initialization for all invocation-related tables.
1826 (Invocation_Construct_Kind_To_Code,
1827 Invocation_Graph_Line_Kind_To_Code, Invocation_Kind_To_Code,
1828 Invocation_Signature_Of, Present): New routines.
1829 (Scan_ALI): Add the default values for invocation-related ids.
1830 Scan invocation graph lines.
1831 (Scan_Invocation_Graph_Line): New routine.
1832 * ali.ads: Add with clause for GNAT.Dynamic_Tables. Add types
1833 for invocation constructs, relations, and signatures. Add
1834 tables for invocation constructs, relations, and signatures.
1835 Update Unit_Record to capture invocation-related ids. Relocate
1836 table Unit_Id_Tables and subtypes Unit_Id_Table, Unit_Id_Array
1837 from Binde.
1838 (Add_Invocation_Construct, Add_Invocation_Relation,
1839 Body_Placement_Kind_To_Code, Code_To_Body_Placement_Kind,
1840 Code_To_Invocation_Construct_Kind, Code_To_Invocation_Kind,
1841 Code_To_Invocation_Graph_Line_Kind,
1842 Invocation_Construct_Kind_To_Code,
1843 Invocation_Graph_Line_Kind_To_Code, Invocation_Kind_To_Code,
1844 Invocation_Signature_Of, Present): New routines.
1845 * binde.adb: Add with and use clause for Types. Add use clause
1846 for ALI.Unit_Id_Tables;
1847 * binde.ads: Relocate table Unit_Id_Tables and subtypes
1848 Unit_Id_Table, Unit_Id_Array to ALI.
1849 * bindgen.adb: Remove with and use clause for ALI.
1850 * bindgen.ads: Remove with and use clause for Binde. Add with
1851 and use clause for ALI.
1852 * bindo.adb, bindo.ads, bindo-augmentors.adb,
1853 bindo-augmentors.ads, bindo-builders.adb, bindo-builders.ads,
1854 bindo-diagnostics.adb, bindo-diagnostics.ads,
1855 bindo-elaborators.adb, bindo-elaborators.ads, bindo-graphs.adb,
1856 bindo-graphs.ads, bindo-units.adb, bindo-units.ads,
1857 bindo-validators.adb, bindo-validators.ads, bindo-writers.adb,
1858 bindo-writers.ads: New units.
1859 * debug.adb: Use and describe GNAT debug switches -gnatd_F and
1860 -gnatd_G. Add GNATbind debug switches in the ranges dA .. dZ,
1861 d.a .. d.z, d.A .. d.Z, d.1 .. d.9, d_a .. d_z, d_A .. d_Z, and
1862 d_1 .. d_9. Use and describe GNATbind debug switches -d_A,
1863 -d_I, -d_L, -d_N, -d_O, -d_T, and -d_V.
1864 * exp_util.adb, exp_util.ads (Exceptions_OK): Relocate to
1865 Sem_Util.
1866 * gnatbind.adb: Add with and use clause for Bindo. Use the new
1867 Bindo elaboration order only when -d_N is in effect.
1868 * lib-writ.adb
1869 (Column, Extra, Invoker, Kind, Line, Locations, Name, Placement,
1870 Scope, Signature, Target): New routines.
1871 (Write_ALI): Output all invocation-related data.
1872 (Write_Invocation_Graph): New routine.
1873 * lib-writ.ads: Document the invocation graph ALI line.
1874 * namet.adb, namet.ads (Present): New routines.
1875 * sem_ch8.adb (Find_Direct_Name): Capture the status of
1876 elaboration checks and warnings of an identifier.
1877 (Find_Expanded_Name): Capture the status of elaboration checks
1878 and warnings of an expanded name.
1879 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Ensure
1880 that invocation graph-related data within the body of the main
1881 unit is encoded in the ALI file.
1882 (Analyze_Generic_Subprogram_Declaration): Ensure that invocation
1883 graph-related data within the body of the main unit is encoded
1884 in the ALI file.
1885 (Analyze_Package_Instantiation): Perform minimal decoration of
1886 the instance entity.
1887 (Analyze_Subprogram_Instantiation): Perform minimal decoration
1888 of the instance entity.
1889 * sem_elab.adb: Perform heavy refactoring of all code. The unit
1890 is now split into "services" which specialize in one area of ABE
1891 checks. Add processing in order to capture invocation-graph
1892 related attributes of the main unit, and encode them in the ALI
1893 file. The Processing phase can now operate in multiple modes,
1894 all described by type Processing_Kind. Scenarios and targets
1895 are now distinct at the higher level, and carry their own
1896 representations. This eliminates the need to constantly
1897 recompute their attributes, and offers the various processors a
1898 uniform interface. The various initial states of the Processing
1899 phase are now encoded using type Processing_In_State, and
1900 xxx_State constants.
1901 * sem_elab.ads: Update the literals of type
1902 Enclosing_Level_Kind. Add Inline pragmas on several routines.
1903 * sem_prag.adb (Process_Inline): Ensure that invocation
1904 graph-related data within the body of the main unit is encoded
1905 in the ALI file.
1906 * sem_util.adb (Enclosing_Generic_Body, Enclosing_Generic_Unit):
1907 Code clean up.
1908 (Exceptions_OK): Relocated from Sem_Util.
1909 (Mark_Save_Invocation_Graph_Of_Body): New routine.
1910 * sem_util.ads (Exceptions_OK): Relocated from Sem_Util.
1911 (Mark_Save_Invocation_Graph_Of_Body): New routine.
1912 * sinfo.adb (Is_Elaboration_Checks_OK_Node): Now applicable to
1913 N_Variable_Reference_Marker.
1914 (Is_Elaboration_Warnings_OK_Node): Now applicable to
1915 N_Expanded_Name, N_Identifier, N_Variable_Reference_Marker.
1916 (Is_Read): Use Flag4.
1917 (Is_SPARK_Mode_On_Node): New applicable to
1918 N_Variable_Reference_Marker.
1919 (Is_Write): Use Flag5.
1920 (Save_Invocation_Graph_Of_Body): New routine.
1921 (Set_Is_Elaboration_Checks_OK_Node): Now applicable to
1922 N_Variable_Reference_Marker.
1923 (Set_Is_Elaboration_Warnings_OK_Node): Now applicable to
1924 N_Expanded_Name, N_Identifier, N_Variable_Reference_Marker.
1925 (Set_Is_SPARK_Mode_On_Node): New applicable to
1926 N_Variable_Reference_Marker.
1927 (Set_Save_Invocation_Graph_Of_Body): New routine.
1928 * sinfo.ads: Update the documentation of attributes
1929 Is_Elaboration_Checks_OK_Node, Is_Elaboration_Warnings_OK_Node,
1930 Is_SPARK_Mode_On_Node. Update the flag usage of attributes
1931 Is_Read, Is_Write. Add attribute Save_Invocation_Graph_Of_Body
1932 and update its occurrence in nodes.
1933 (Save_Invocation_Graph_Of_Body): New routine along with pragma
1934 Inline.
1935 (Set_Save_Invocation_Graph_Of_Body): New routine along with
1936 pragma Inline.
1937 * switch-b.adb (Scan_Binder_Switches): Refactor the scanning of
1938 debug switches.
1939 (Scan_Debug_Switches): New routine.
1940 * libgnat/g-dynhta.adb, libgnat/g-dynhta.ads (Contains): New routine.
1941 * libgnat/g-graphs.adb (Associate_Vertices): Update the use of
1942 Component_Vertex_Iterator.
1943 (Contains_Component, Contains_Edge, Contains_Vertex, Has_Next):
1944 Reimplemented.
1945 (Iterate_Component_Vertices): New routine.
1946 (Iterate_Vertices): Removed.
1947 (Next): Update the parameter profile.
1948 (Number_Of_Component_Vertices, Number_Of_Outgoing_Edges): New
1949 routines.
1950 * libgnat/g-graphs.ads: Update the initialization of
1951 No_Component. Add type Component_Vertex_Iterator. Remove type
1952 Vertex_Iterator.
1953 (Has_Next): Add new versions and remove old ones.
1954 (Iterate_Component_Vertices): New routine.
1955 (Iterate_Vertices): Removed.
1956 (Next): Add new versions and remove old ones.
1957 (Number_Of_Component_Vertices, Number_Of_Outgoing_Edges): New
1958 routines.
1959 * libgnat/g-sets.adb (Contains): Reimplemented.
1960 * gcc-interface/Make-lang.in (GNATBIND_OBJS): Add
1961 GNAT.Dynamic_HTables, GNAT.Graphs and Bindo units.
1962 * rtsfind.ads: Remove extra space.
1963
df177848 19642019-07-03 Yannick Moy <moy@adacore.com>
1965
1966 * sem_spark.adb: Add support for locally borrowing and observing
1967 a path.
1968 (Get_Root_Object): Add parameter Through_Traversal to denote
1969 when we are interesting in getting to the traversed parameter.
1970 (Is_Prefix_Or_Almost): New function to support detection of
1971 illegal access to borrowed or observed paths.
1972 (Check_Pragma): Add analysis of assertion pragmas.
1973
f3f142ac 19742019-07-03 Ed Schonberg <schonberg@adacore.com>
1975
1976 * sem_ch13.adb (Build_Predicate_Functions): In a generic context
1977 we do not build the bodies of predicate fuctions, but the
1978 expression in a static predicate must be elaborated to allow
1979 case coverage checking within the generic unit.
1980 (Build_Discrete_Static_Predicate): In a generic context, return
1981 without building function body once the
1982 Static_Discrete_Predicate expression for the type has been
1983 constructed.
1984
99d90c85 19852019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
1986
1987 * bindgen.adb, inline.adb, layout.adb, sem_ch12.adb,
1988 sem_ch13.adb, sem_ch7.adb, styleg.adb: Minor reformatting.
1989
800597f6 19902019-07-03 Bob Duff <duff@adacore.com>
1991
1992 * par-ch3.adb (P_Defining_Identifier): Call
1993 Check_Defining_Identifier_Casing.
1994 * style.ads, styleg.ads, styleg.adb
1995 (Check_Defining_Identifier_Casing): New procedure to check for
1996 mixed-case defining identifiers.
1997 * stylesw.ads, stylesw.adb (Style_Check_Mixed_Case_Decls): New
1998 flag for checking for mixed-case defining identifiers.
1999 * doc/gnat_ugn/building_executable_programs_with_gnat.rst:
2000 Document new feature.
2001 * gnat_ugn.texi: Regenerate.
2002
2c75027a 20032019-07-03 Eric Botcazou <ebotcazou@adacore.com>
2004
2005 * doc/gnat_ugn/building_executable_programs_with_gnat.rst
2006 (Warning message control): Document that -gnatw.z/Z apply to
2007 array types.
2008 * freeze.adb (Freeze_Entity): Give -gnatw.z warning for array
2009 types as well, but not if the specified alignment is the minimum
2010 one.
2011 * gnat_ugn.texi: Regenerate.
2012
08237d0d 20132019-07-03 Bob Duff <duff@adacore.com>
2014
2015 * einfo.ads, exp_util.adb, layout.ads, sinfo.ads: Spell "laid"
2016 correctly.
2017
0396441f 20182019-07-03 Ed Schonberg <schonberg@adacore.com>
2019
2020 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): No error
2021 message on attribute applied to a renaming when the renamed
2022 object is an aggregate (from code reading).
2023 (Check_Aspect_At_End_Of_Declarations): In a generic context
2024 where freeze nodes are not generated, the original expression
2025 for an aspect may need to be analyzed to precent spurious
2026 conformance errors when compared with the expression that is
2027 anakyzed at the end of the current declarative list.
2028
c8406f30 20292019-07-03 Eric Botcazou <ebotcazou@adacore.com>
2030
2031 * layout.adb (Layout_Type): Do not set the component size of an
2032 array with a scalar component if the component type is
2033 overaligned.
2034
c38b32ea 20352019-07-03 Ed Schonberg <schonberg@adacore.com>
2036
2037 * inline.adb (Make_Loop_Labels_Unique): New procedure to modify
2038 the source code of subprograms that are inlined by the
2039 front-end, to prevent accidental duplication between loop labels
2040 in the inlined code and the code surrounding the inlined call.
2041
6d6f134e 20422019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
2043
2044 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update
2045 the section on resolving elaboration circularities to eliminate
2046 certain combinations of switches which together do not produce
2047 the desired effect and confuse users.
2048 * gnat_ugn.texi: Regenerate.
2049
f3e16ef4 20502019-07-03 Arnaud Charlet <charlet@adacore.com>
2051
2052 * bindgen.adb (Gen_Main): Disable generation of reference to
2053 Ada_Main_Program_Name for CCG.
2054 * bindusg.adb (Display): Add -G to the command-line usage for
2055 gnatbind.
2056 * opt.ads (Generate_C_Code): Update comment.
2057 * switch-b.adb (Scan_Binder_Switches): Add handling for -G.
2058
f4a31b16 20592019-07-03 Arnaud Charlet <charlet@adacore.com>
2060
2061 * sem_ch7.adb (Has_Referencer): Do not consider inlined
2062 subprograms when generating C code, which allows us to generate
2063 static inline subprograms.
2064
2f65e9f7 20652019-07-03 Justin Squirek <squirek@adacore.com>
2066
2067 * sem_ch6.adb (Check_Conformance): Add expression checking for
2068 constant modifiers in anonymous access types (in addition to
2069 "non-null" types) so that they are considered "matching" for
2070 subsequent conformance tests.
2071
c336ed70 20722019-07-03 Arnaud Charlet <charlet@adacore.com>
2073
2074 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
2075 Clarify wording on No_Multiple_Elaboration.
2076 * gnat_rm.texi: Regenerate.
2077
78611c86 20782019-07-03 Ed Schonberg <schonberg@adacore.com>
2079
2080 * sem_ch8.adb (Find_Selected_Component): If the prefix is the
2081 current instance of a type or subtype, complete the resolution
2082 of the name by finding the component of the type denoted by the
2083 selector name.
2084
5a87a4d9 20852019-07-03 Eric Botcazou <ebotcazou@adacore.com>
2086
2087 * doc/gnat_rm/interfacing_to_other_languages.rst (Interfacing to C):
2088 Document that boolean types with convention C now map to C99 bool.
2089 * gnat_rm.texi: Regenerate.
2090
371c539c 20912019-07-03 Javier Miranda <miranda@adacore.com>
2092
2093 * exp_attr.adb (Expand_Min_Max_Attribute): Code cleanup:
2094 removing code that it is now never executed in the CCG compiler
2095 (dead code).
2096
89d2d652 20972019-07-02 Iain Sandoe <iain@sandoe.co.uk>
2098
2099 * libgnat/system-darwin-ppc.ads: Set Stack_Check_Probes True for
2100 PPC Darwin.
2101
d21e66fb 21022019-07-01 Ed Schonberg <schonberg@adacore.com>
2103
2104 * sem_ch12.adb (Is_Defaulted): New predicate in
2105 Check_Formal_Package_Intance, to skip the conformance of checks
2106 on parameters of a formal package that are defaulted,
2107
7a42b778 21082019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
2109
2110 * checks.adb, exp_ch9.adb, exp_unst.adb, sem_ch4.adb,
2111 sem_prag.adb, sem_spark.adb: Minor reformatting.
2112
fc8ae496 21132019-07-01 Ed Schonberg <schonberg@adacore.com>
2114
2115 * sem_attr.adb (Analyze_Attribute, case Enum_Rep): Allow prefix
2116 of attribute to be an attribute reference of a discrete type.
2117
9d27ea41 21182019-07-01 Eric Botcazou <ebotcazou@adacore.com>
2119
2120 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Move up
2121 handling of Has_Pragma_Inline_Always and deal with
2122 Has_Pragma_No_Inline.
2123
bcb8dcf3 21242019-07-01 Ed Schonberg <schonberg@adacore.com>
2125
2126 * sem_ch3.adb (Build_Derived_Record_Type): If the parent type is
2127 declared as a subtype of a private type with an inherited
2128 discriminant constraint, its generated full base appears as a
2129 record subtype, so we need to retrieve its oen base type so that
2130 the inherited constraint can be applied to it.
2131
d087b9ca 21322019-07-01 Yannick Moy <moy@adacore.com>
2133
2134 * sem_spark.adb: Completely rework the algorithm for ownership
2135 checking, as the rules in SPARK RM have changed a lot.
2136 * sem_spark.ads: Update comments.
2137
fe48ee0a 21382019-07-01 Dmitriy Anisimkov <anisimko@adacore.com>
2139
2140 * gsocket.h (Has_Sockaddr_Len): Use the offset of sin_family offset in
2141 the sockaddr_in structure to determine the existence of length field
2142 before the sin_family.
2143
b20f7e2c 21442019-07-01 Ed Schonberg <schonberg@adacore.com>
2145
2146 * sem_prag.adb (Analyze_Pragma, case Weak_External): Pragma only
2147 applies to entities with run-time addresses, not to types.
2148
374fdf94 21492019-07-01 Piotr Trojanek <trojanek@adacore.com>
2150
2151 * einfo.adb, sem_ch7.adb, sem_prag.adb, sem_util.adb: Update
2152 references to the SPARK RM after the removal of Rule 7.1.4(5).
2153
bf13a79d 21542019-07-01 Piotr Trojanek <trojanek@adacore.com>
2155
2156 * sysdep.c: Cleanup references to LynuxWorks in docs and
2157 comments.
2158
866fa2d0 21592019-07-01 Ed Schonberg <schonberg@adacore.com>
2160
2161 * checks.adb (Insert_Valid_Check): Do not apply validity check
2162 to variable declared within a protected object that uses the
2163 Lock_Free implementation, to prevent unwarranted constant
2164 folding, because entities within such an object msut be treated
2165 as volatile.
2166
bcb5ab83 21672019-07-01 Eric Botcazou <ebotcazou@adacore.com>
2168
2169 * exp_ch9.adb (Check_Inlining): Deal with Has_Pragma_No_Inline.
2170
2db33bd6 21712019-07-01 Ed Schonberg <schonberg@adacore.com>
2172
2173 * exp_unst.adb (Visit_Node, Check_Static_Type): Improve the
2174 handling of private and incomplete types whose full view is an
2175 access type, to detect additional uplevel references in dynamic
2176 bounds. This is relevant to N_Free_Statement among others that
2177 manipulate types whose full viww may be an access type.
2178
6b4f0b7d 21792019-07-01 Pat Rogers <rogers@adacore.com>
2180
2181 * doc/gnat_rm/representation_clauses_and_pragmas.rst: Correct
2182 size indicated for R as a component of an array.
2183 * gnat_rm.texi: Regenerate.
2184
cdee70d7 21852019-07-01 Justin Squirek <squirek@adacore.com>
2186
2187 * libgnat/s-win32.ads: Add definition for ULONG, modify
2188 OVERLAPPED type, and add appropriate pragmas.
2189
2cf822b7 21902019-07-01 Bob Duff <duff@adacore.com>
2191
2192 * gnat1drv.adb (gnat1drv): Call Write_ALI if the main unit is
2193 ignored-ghost.
2194
0a1ece97 21952019-07-01 Yannick Moy <moy@adacore.com>
2196
2197 * sem_ch4.adb (Operator_Check): Refine error message.
2198
ee4279ef 21992019-07-01 Piotr Trojanek <trojanek@adacore.com>
2200
2201 * libgnat/a-calend.ads: Revert "Global => null" contracts on
2202 non-pure routines.
2203
2c6b4ada 22042019-07-01 Piotr Trojanek <trojanek@adacore.com>
2205
2206 * exp_attr.adb, libgnat/g-graphs.ads: Fix typos in comments:
2207 componant -> component.
2208
175c4526 22092019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
2210
2211 * libgnat/g-graphs.adb: Use type Directed_Graph rather than
2212 Instance in various routines.
2213 * libgnat/g-graphs.ads: Change type Instance to Directed_Graph.
2214 Update various routines that mention the type.
2215
a0d15509 22162019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
2217
2218 * libgnat/g-sets.adb: Use type Membership_Set rathern than
2219 Instance in various routines.
2220 * libgnat/g-sets.ads: Change type Instance to Membership_Set.
2221 Update various routines that mention the type.
2222
205a23a3 22232019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
2224
2225 * libgnat/g-lists.adb: Use type Doubly_Linked_List rather than
2226 Instance in various routines.
2227 * libgnat/g-lists.ads: Change type Instance to
2228 Doubly_Linked_List. Update various routines that mention the
2229 type.
2230
17fdf8c2 22312019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
2232
2233 * libgnat/g-dynhta.adb: Use type Dynamic_Hash_Table rather than
2234 Instance in various routines.
2235 * libgnat/g-dynhta.ads: Change type Instance to
2236 Dynamic_Hash_Table. Update various routines that mention the
2237 type.
2238
216ffc64 22392019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
2240
2241 * exp_attr.adb, exp_ch7.adb, exp_unst.adb, sem_ch3.adb,
2242 sem_util.adb, uintp.adb, uintp.ads: Minor reformatting.
2243
5051fe35 22442019-07-01 Javier Miranda <miranda@adacore.com>
2245
2246 * exp_attr.adb (Expand_Min_Max_Attribute): Disable expansion of
2247 'Min/'Max on integer, enumeration, fixed point and floating
2248 point types since the CCG backend now provides in file
2249 standard.h routines to support it.
2250
830a2a71 22512019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
2252
2253 * impunit.adb: Add GNAT.Graphs to list Non_Imp_File_Names_95.
2254 * Makefile.rtl, gcc-interface/Make-lang.in: Register unit
2255 GNAT.Graphs.
2256 * libgnat/g-dynhta.adb: Various minor cleanups (use Present
2257 rather than direct comparisons).
2258 (Delete): Reimplement to use Delete_Node.
2259 (Delete_Node): New routine.
2260 (Destroy_Bucket): Invoke the provided destructor.
2261 (Present): New routines.
2262 * libgnat/g-dynhta.ads: Add new generic formal Destroy_Value.
2263 Use better names for the components of iterators.
2264 * libgnat/g-graphs.adb, libgnat/g-graphs.ads: New unit.
2265 * libgnat/g-lists.adb: Various minor cleanups (use Present
2266 rather than direct comparisons).
2267 (Delete_Node): Invoke the provided destructor.
2268 (Present): New routine.
2269 * libgnat/g-lists.ads: Add new generic formal Destroy_Element.
2270 Use better names for the components of iterators.
2271 (Present): New routine.
2272 * libgnat/g-sets.adb, libgnat/g-sets.ads (Destroy, Preset,
2273 Reset): New routines.
2274
b0111d94 22752019-07-01 Dmitriy Anisimkov <anisimko@adacore.com>
2276
2277 * libgnat/g-sothco.adb (Get_Address): Fix the case when AF_INET6
2278 is not defined.
2279
7362896b 22802019-07-01 Ed Schonberg <schonberg@adacore.com>
2281
2282 * exp_attr.adb (Expand_Attribute_Reference, case Invalid_Value):
2283 Resolve result of call to Get_Simple_Init_Val, which may be a
2284 conversion of a literal.
2285
0dae8dc2 22862019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
2287
2288 * freeze.adb (Freeze_Expression): Remove the horrible useless
2289 name hiding of N. Insert the freeze nodes generated by the
2290 expression prior to the expression when the nearest enclosing
2291 scope is transient.
2292
487da8ff 22932019-07-01 Pierre-Marie de Rodat <derodat@adacore.com>
2294
2295 * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Fix
2296 formatting issues in the -gnatR section.
2297 * gnat_ugn.texi: Regenerate.
2298
1d79fa18 22992019-06-30 Iain Sandoe <iain@sandoe.co.uk>
2300
2301 * gnatlink.adb (Link_Step): Remove duplicate -static-libgcc switches.
2302 Push -shared-libgcc explicitly, when it is the target default (unless
2303 overidden by the static flag).
2304 When the user has put an instance of shared/static-libgcc do not push
2305 a duplicate of this.
2306
a850edcd 23072019-06-29 Eric Botcazou <ebotcazou@adacore.com>
2308
2309 * gcc-interface/decl.c (gnat_to_gnu_entity): Beep up comment on SAVED,
2310 and tweak comment on the assertion about the scopes of Itypes. Do not
2311 skip the regular processing for Itypes that are E_Record_Subtype with
2312 a Cloned_Subtype. Get the Cloned_Subtype for every E_Record_Subtype
2313 if the type is dummy and hasn't got its own freeze node.
2314 <E_Record_Subtype>: Save again the DECL of the Cloned_Subtype, if any.
2315 <E_Access_Subtype>: Save again the DECL of the equivalent type.
2316 (Gigi_Equivalent_Type) <E_Access_Subtype>: New case.
2317
b1e46fb1 23182019-06-29 Eric Botcazou <ebotcazou@adacore.com>
2319
2320 * gcc-interface/utils.c (unchecked_convert): Tweak comment. Only skip
2321 dereferences when padding to have the same size on both sides. Do it
2322 for destination types with self-referential size too.
2323
07e38949 23242019-06-29 Eric Botcazou <ebotcazou@adacore.com>
2325
2326 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: If the
2327 type requires strict alignment, then set the RM size to the type size.
2328 Rework handling of alignment and sizes of tagged types in ASIS mode.
2329 (validate_size): Rename local variable and remove special handling for
2330 strict-alignment types.
2331 * gcc-interface/utils.c (finish_record_type): Constify local variables
2332 and use properly typed constants.
2333
f4409741 23342019-06-29 Eric Botcazou <ebotcazou@adacore.com>
2335
2336 * gcc-interface/decl.c (gnat_to_gnu_field): Rework error messages for
2337 fields requiring strict alignment, add explicit test on Storage_Unit
2338 for position and size, and mention type alignment for position.
2339
5882c515 23402019-06-29 Eric Botcazou <ebotcazou@adacore.com>
2341
2342 * gcc-interface/trans.c (mark_visited_r): Set TYPE_SIZES_GIMPLIFIED on
2343 the main variant of a type, if any.
2344
d0de0a27 23452019-06-29 Eric Botcazou <ebotcazou@adacore.com>
2346
2347 * gcc-interface/decl.c (set_nonaliased_component_on_array_type): Add
2348 missing guard for the presence of TYPE_CANONICAL.
2349 (set_reverse_storage_order_on_array_type): Likewise.
2350
2074c859 23512019-06-29 Eric Botcazou <ebotcazou@adacore.com>
2352
2353 * gcc-interface/gigi.h (make_packable_type): Remove default value.
2354 (value_factor_p): Tweak prototype.
2355 * gcc-interface/decl.c (gnat_to_gnu_entity): Add comment.
2356 (gnat_to_gnu_component_type): Likewise.
2357 (gnat_to_gnu_field): Likewise. Fetch the position of the field earlier
2358 and simplify the condition under which the type is packed. Declare
2359 local variable is_bitfield. Pass 1 as max_align to make_packable_type
2360 if it is set to true.
2361 (copy_and_substitute_in_layout): Pass 0 to make_packable_type.
2362 * gcc-interface/utils.c (make_packable_array_type): New function.
2363 (make_packable_type): Use it to rewrite the type of array field.
2364 (maybe_pad_type): Pass align parameter to make_packable_type.
2365 (create_field_decl): Minor tweaks.
2366 (value_factor_p): Assert that FACTOR is a power of 2 and replace the
2367 modulo computation by a masking operation.
2368
83c6da22 23692019-06-25 Eric Botcazou <ebotcazou@adacore.com>
2370
2371 * gcc-interface/decl.c (gnat_to_gnu_entity): Remove superfluous test
2372 in previous change.
2373 * gcc-interface/gigi.h (maybe_character_type): Fix formatting.
2374 (maybe_character_value): Likewise.
2375
aaabc7bc 23762019-06-24 Jan Hubicka <jh@suse.cz>
2377
2378 * gcc-interface/decl.c (gnat_to_gnu_entity): Check that
2379 type is array or integer prior checking string flag.
83c6da22 2380 * gcc-interface/gigi.h (maybe_character_type): Likewise.
2381 (maybe_character_value): Likewise.
aaabc7bc 2382
5fe09a56 23832019-06-24 Martin Sebor <msebor@redhat.com>
2384
2385 * gcc-interface/utils.c (handle_nonnull_attribute): Quote attribute
2386 name.
2387
bd9331d6 23882019-06-18 Arnaud Charlet <charlet@adacore.com>
2389
83c6da22 2390 PR ada/80590
bd9331d6 2391 * sem_ch5.adb (Analyze_Loop_Statement): Avoid exception propagation
2392 during normal processing.
2393
8a5a7d1c 23942019-06-17 Arnaud Charlet <charlet@adacore.com>
2395
83c6da22 2396 PR ada/80590
8a5a7d1c 2397 * exp_ch9.adb (Expand_N_Delay_Relative_Statement): Swap the two
2398 conditions to avoid a unnecessary exception propagation in the default
2399 case.
2400
580934f6 24012019-05-28 Eric Botcazou <ebotcazou@adacore.com>
2402
2403 * gcc-interface/utils.c (handle_stack_protect_attribute): Move around.
2404
c8956236 24052019-05-28 Eric Botcazou <ebotcazou@adacore.com>
2406
2407 * doc/gnat_rm/implementation_defined_pragmas.rst (Machine_Attribute):
2408 Document additional optional parameters.
2409 * sem_prag.adb (Analyze_Pragma) <Pragma_Machine_Attribute>: Accept
2410 more than one optional parameter.
2411 * gcc-interface/decl.c (prepend_one_attribute_pragma): Alphabetize
2412 the list of supported pragmas. Simplify the handling of parameters
2413 and add support for more than one optional parameter.
2414 * gcc-interface/utils.c (attr_cold_hot_exclusions): New constant.
2415 (gnat_internal_attribute_table): Add entry for no_icf, noipa, flatten,
2416 used, cold, hot, target and target_clones.
2417 (begin_subprog_body): Do not create the RTL for the subprogram here.
2418 (handle_noicf_attribute): New static function.
2419 (handle_noipa_attribute): Likewise.
2420 (handle_flatten_attribute): Likewise.
2421 (handle_used_attribute): Likewise.
2422 (handle_cold_attribute): Likewise.
2423 (handle_hot_attribute): Likewise.
2424 (handle_target_attribute): Likewise.
2425 (handle_target_clones_attribute): Likewise.
2426
62b762c2 24272019-05-28 Eric Botcazou <ebotcazou@adacore.com>
2428
2429 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Return 0
2430 for 'Size too.
2431 (Identifier_to_gnu): Use the actual subtype for a reference to a
2432 packed array in a return statement.
2433 (Attribute_to_gnu) <Attr_Size>: Do not strip VIEW_CONVERT_EXPRs from
2434 the prefix in every case.
2435
336a61a3 24362019-05-28 Eric Botcazou <ebotcazou@adacore.com>
2437
2438 * gcc-interface/trans.c (gnat_to_gnu): Remove superfluous tests on
2439 Backend_Overflow_Checks_On_Target and rework comments.
2440
983c5b5e 24412019-05-28 Eric Botcazou <ebotcazou@adacore.com>
2442
2443 * gcc-interface/trans.c (walk_nesting_tree): New static function.
2444 (finalize_nrv): Use it to walk the entire nesting tree.
2445
96b4b84e 24462019-05-28 Eric Botcazou <ebotcazou@adacore.com>
2447
2448 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Remove
2449 obsolete test on Is_For_Access_Subtype.
2450
0b74284e 24512019-05-28 Eric Botcazou <ebotcazou@adacore.com>
2452
2453 * gcc-interface/decl.c (components_to_record): Set a name on the type
2454 created for the REP part, if any.
2455 * gcc-interface/utils.c (finish_record_type): Only take the maximum
2456 when merging sizes for a variant part at offset 0.
2457 (merge_sizes): Rename has_rep parameter into max.
2458
689dab9d 24592019-05-28 Eric Botcazou <ebotcazou@adacore.com>
2460
2461 * gcc-interface/utils.c (gnat_internal_attribute_table): Add support
2462 for stack_protect attribute.
2463 (handle_stack_protect_attribute): New static function.
2464
804f7d39 24652019-05-28 Eric Botcazou <ebotcazou@adacore.com>
2466
2467 * gcc-interface/decl.c (intrin_arglists_compatible_p): Do not return
2468 false if the internal builtin uses a variable list.
2469
f07f94cc 24702019-05-27 Eric Botcazou <ebotcazou@adacore.com>
2471
2472 * gcc-interface/trans.c (Call_to_gnu): Do not initialize the temporary
2473 created out of addressability concerns if it's for the _Init parameter
2474 of an initialization procedure.
2475
abfd658b 24762019-05-27 Eric Botcazou <ebotcazou@adacore.com>
2477
2478 * gcc-interface/ada-builtin-types.def: New file.
2479 * gcc-interface/ada-builtins.def: Likewise.
2480 * gcc-interface/ada-tree.h (BUILT_IN_LIKELY): New macro.
2481 (BUILT_IN_UNLIKELY): Likewise.
2482 * gcc-interface/trans.c (independent_iterations_p): Initialize the
2483 auto-vector to 16 elements.
2484 (Call_to_gnu): Remove local variable and change the vector of actual
2485 parameters to an auto-vector. Do not convert actual parameters to
2486 the argument type for front-end built-in functions. Add support for
2487 front-end built-in functions.
2488 (build_noreturn_cond): Use internal instead of built-in function.
2489 * gcc-interface/utils.c (c_builtin_type): Include ada-builtin-types.def
2490 (install_builtin_function_types): Likewise.
2491 (install_builtin_functions): Include ada-builtins.def first.
2492
caab73a2 24932019-05-27 Eric Botcazou <ebotcazou@adacore.com>
2494
2495 * gcc-interface/utils.c (maybe_pad_type): Issue the warning for the
2496 specific case of component types preferably.
2497
f1ca2388 24982019-05-27 Eric Botcazou <ebotcazou@adacore.com>
2499
2500 * gcc-interface/trans.c (Identifier_to_gnu): Minor tweaks.
2501 (gnat_to_gnu): Do not convert the result if it is a reference to an
2502 unconstrained array used as the prefix of an attribute reference that
2503 requires an lvalue.
2504
e3f3573c 25052019-05-27 Eric Botcazou <ebotcazou@adacore.com>
2506
2507 * gcc-interface/trans.c (Gigi_Types_Compatible): New predicate.
2508 (Identifier_to_gnu): Use it to assert that the type of the identifier
2509 and that of its entity are compatible for gigi. Rename a couple of
2510 local variables and separate the processing of the result type.
2511
2306cd17 25122019-05-27 Eric Botcazou <ebotcazou@adacore.com>
2513
2514 * gcc-interface/trans.c (Call_to_gnu): Use the unpadded type when
2515 putting back an intermediate conversion the type of the actuals.
2516
6e4e9378 25172019-05-27 Eric Botcazou <ebotcazou@adacore.com>
2518
2519 * gcc-interface/trans.c (gnat_to_gnu) <Shift operations>: Convert the
2520 count to the unsigned version of its base type before proceeding.
2521
85b9be9b 25222019-05-16 Martin Sebor <msebor@redhat.com>
2523
3d6be0d5 2524 * gcc-interface/trans.c (check_inlining_for_nested_subprog): Quote
2525 reserved names.
85b9be9b 2526
65d973ca 25272019-05-08 Arnaud Charlet <charlet@adacore.com>
2528
2529 * standard.ads.h: New file.
2530
ff628b99 25312019-05-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2532
2533 * gcc-interface/Makefile.in (install-gcc-specs): Use foreach.
2534 Honor DESTDIR.
2535
ebd761d4 25362019-04-29 Michael K. Darling <darlingm@gmail.com>
2537
2538 * gnatvsn.ads: Bump Library_Version to 10.
2539
5f260823 25402019-04-24 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2541 Bernd Edlinger <bernd.edlinger@hotmail.de>
2542 Jakub Jelinek <jakub@redhat.com>
2543
2544 PR target/89093
2545 * raise-gcc.c (TARGET_ATTRIBUTE): Define.
2546 (continue_unwind, personality_body, PERSONALITY_FUNCTION): Add
2547 TARGET_ATTRIBUTE.
2548
d7ca95c0 25492019-04-07 Eric Botcazou <ebotcazou@adacore.com>
2550
2551 * libgnat/i-cexten.ads (CFloat_128): New type.
2552
26b21081 25532019-03-22 Dmitriy Anisimkov <anisimko@adacore.com>
2554
2555 PR ada/89583
2556 * libgnat/g-socket.adb (Bind_Socket, Connect_Socket,
2557 Send_Socket): Fix the computation of structure lengths passed to
2558 low level routines.
2559 (Is_IPv6_Address): Fix the number of expected colons.
2560
2f6d557f 25612019-03-11 Martin Liska <mliska@suse.cz>
2562
d325ee67 2563 * gcc-interface/misc.c (gnat_post_options): Wrap option name in string
2564 format message and fix GNU coding style.
2f6d557f 2565
c1ad6672 25662019-02-08 Eric Botcazou <ebotcazou@adacore.com>
2567
2568 * gcc-interface/trans.c (gnat_to_gnu) <N_Aggregate>: Minor tweak.
2569 * gcc-interface/utils.c (convert): Do not pad when doing an unchecked
2570 conversion here. Use TREE_CONSTANT throughout the function.
2571 (unchecked_convert): Also pad if the source is a CONSTRUCTOR and the
2572 destination is a more aligned array type or a larger aggregate type,
2573 but not between original and packable versions of a type.
2574
62a6ebbd 25752019-02-08 Eric Botcazou <ebotcazou@adacore.com>
2576
2577 * gcc-interface/utils.c (max_size) <tcc_unary>: Be prepared for an
2578 operand with VOID_TYPE.
2579
da383d19 25802019-02-08 Eric Botcazou <ebotcazou@adacore.com>
2581
2582 * gcc-interface/trans.c (elaborate_all_entities): Do not elaborate the
2583 entities of a package renaming another one.
2584
09c123a0 25852019-02-08 Eric Botcazou <ebotcazou@adacore.com>
2586
2587 * gcc-interface/trans.c (Regular_Loop_to_gnu): Replace tests on
2588 individual flag_unswitch_loops and flag_tree_loop_vectorize switches
2589 with test on global optimize switch.
2590 (Raise_Error_to_gnu): Likewise.
2591
a9dd7273 25922019-02-07 Eric Botcazou <ebotcazou@adacore.com>
2593
2594 * libgnarl/s-linux__sparc.ads (ETIMEDOUT): Set to correct value.
2595
4836c4f1 25962019-02-06 Arnaud Charlet <charlet@adacore.com>
2597
2598 * libgnarl/s-linux__x32.ads: Resync list of signals with s-linux.ads
2599
6b56937c 26002019-01-27 Eric Botcazou <ebotcazou@adacore.com>
2601
2602 * repinfo.adb (List_Component_Layout): Remove superfluous space for
2603 zero-sized field.
2604 * gcc-interface/ada-tree.h (TYPE_IS_EXTRA_SUBTYPE_P): New macro.
2605 * gcc-interface/gigi.h (create_extra_subtype): Declare.
2606 * gcc-interface/decl.c (TYPE_ARRAY_SIZE_LIMIT): Likewise.
2607 (update_n_elem): New function.
2608 (gnat_to_gnu_entity): Use create_extra_subtype to create extra subtypes
2609 instead of doing it manually.
2610 <E_Array_Type>: Use update_n_elem to compute the maximum size. Use the
2611 index type instead of base type for the bounds. Set TYPE_ARRAY_MAX_SIZE
2612 of the array to the maximum size.
2613 <E_Array_Subtype>: Create an extra subtype using the index type of the
2614 base array type for self-referential bounds. Use update_n_elem to
2615 compute the maximum size. Set TYPE_ARRAY_MAX_SIZE of the array to the
2616 maximum size.
2617 (gnat_to_gnu_field): Clear DECL_NONADDRESSABLE_P on discriminants.
2618 * gcc-interface/misc.c (gnat_get_alias_set): Return the alias set of
2619 the base type for an extra subtype.
2620 (gnat_type_max_size): Remove obsolete code.
2621 * gcc-interface/trans.c (Attribute_to_gnu): Minor tweak.
2622 (can_be_lower_p): Deal with pathological types.
2623 * gcc-interface/utils.c (create_extra_subtype): New function.
2624 (create_field_decl): Minor tweak.
2625 (max_size) <tcc_reference>: Compute a better value by using the extra
2626 subtypes on the self-referential bounds.
2627 <tcc_binary>: Rewrite. Deal with "negative value" in unsigned types.
2628 <tcc_expression>: Likewise.
2629 * gcc-interface/utils2.c (compare_arrays): Retrieve the original bounds
2630 of the arrays upfront. Swap only if the second length is not constant.
2631 Use comparisons on the original bounds consistently for the null tests.
2632 (build_binary_op): Use TYPE_IS_EXTRA_SUBTYPE_P macro.
2633 (build_allocator): Minor tweak.
2634
ecb2c722 26352019-01-27 Eric Botcazou <ebotcazou@adacore.com>
2636
2637 * gcc-interface/decl.c (array_type_has_nonaliased_component): Return
2638 the same value for every dimension of a multidimensional array type.
2639
10f25579 26402019-01-26 Eric Botcazou <ebotcazou@adacore.com>
2641
2642 * gcc-interface/trans.c (Regular_Loop_to_gnu): Use the SLOC of the
2643 iteration scheme, if present, throughout the translation.
2644
aced6683 26452019-01-26 Eric Botcazou <ebotcazou@adacore.com>
2646
2647 * gcc-interface/trans.c (gnat_to_gnu) <N_Assignment_Statement>: Use
2648 DECL_SIZE_UNIT instead of TYPE_SIZE_UNIT for the size to be assigned
2649 by a call to memset if the LHS is a DECL.
2650
18b4b30e 26512019-01-26 Eric Botcazou <ebotcazou@adacore.com>
2652
2653 * gcc-interface/trans.c (struct loop_info_d): Remove artificial field.
2654 (Loop_Statement_to_gnu): Do not set it.
2655
6dce35b7 26562019-01-26 Eric Botcazou <ebotcazou@adacore.com>
2657
2658 * gcc-interface/trans.c (Iterate_Acc_Clause_Arg): Fix formatting.
2659 (Acc_gnat_to_gnu): Likewise.
2660 (Acc_Data_to_gnu): Likewise.
2661 (Acc_Var_to_gnu): Likewise.
2662 (Acc_Reduc_to_gnu): Likewise.
2663 (Acc_Size_List_to_gnu): Likewise.
2664 (Pragma_to_gnu) <Pragma_Acc_Loop>: Likewise.
2665 <Pragma_Acc_Data>): Likewise.
2666 (find_loop_for): Remove default value for parameters.
2667 * gcc-interface/trans.c (gnat_to_gnu) <N_Op_And>: Merge into...
2668 <N_Op_Eq>): ...this.
2669
f8cd11ee 26702019-01-26 Eric Botcazou <ebotcazou@adacore.com>
2671
2672 * gcc-interface/decl.c (annotate_value) <INTEGER_CST>: Use test on
2673 the sign bit instead of on the sign of the value.
2674 <PLUS_EXPR>: Turn addition of negative constant into subtraction.
2675 <MULT_EXPR>: Add test for degenerate case.
2676 <BIT_AND_EXPR>: Simplify.
2677
9a3c51d9 26782019-01-18 Sebastian Huber <sebastian.huber@embedded-brains.de>
2679
2680 * s-oscons-tmplt.c (AF_INET6): Do not undefine for RTEMS.
2681
07c11f2b 26822019-01-09 Sandra Loosemore <sandra@codesourcery.com>
2683
2684 PR other/16615
07c11f2b 2685 * exp_ch11.adb: Change "can not" to "cannot".
2686 * sem_ch4.adb: Likewise.
2687
f4d3c071 26882019-01-09 Sandra Loosemore <sandra@codesourcery.com>
2689
2690 PR other/16615
f4d3c071 2691 * exp_ch9.adb: Mechanically replace "can not" with "cannot".
2692 * libgnat/s-regpat.ads: Likewise.
2693 * par-ch4.adb: Likewise.
2694 * set_targ.adb: Likewise.
2695 * types.ads: Likewise.
2696
902071d1 26972019-01-08 Justin Squirek <squirek@adacore.com>
2698
2699 Revert:
902071d1 2700 2018-07-31 Justin Squirek <squirek@adacore.com>
2701
76fb0465 2702 * lib-writ.adb (Write_With_Lines): Modfiy the generation
2703 of dependencies within ali files so that source unit
2704 bodies are properly listed even if said bodies are
2705 missing. Perform legacy behavior in GNATprove mode.
2706 * lib-writ.ads: Modify documentation to reflect current
2707 behavior.
902071d1 2708
2709 and:
902071d1 2710 2018-09-26 Justin Squirek <squirek@adacore.com>
2711
76fb0465 2712 * lib-writ.adb, lib-writ.ads (Write_With_Lines): Add
2713 documentation and an extra conditional check for RCI
2714 units so that generated ali files will list the spec
2715 only instead of a body when a body is not found.
902071d1 2716
65a33d4a 27172019-01-04 Eric Botcazou <ebotcazou@adacore.com>
2718
2719 * gnatvsn.ads: Bump copyright year.
2720
3d8932fd 27212019-01-01 Jakub Jelinek <jakub@redhat.com>
8e8f6434 2722
fbd26352 2723 Update copyright years.
2724
277184bc 2725 * gnat_ugn.texi: Bump @copying's copyright year.
2726 * gnat_rm.texi: Likewise.
7dfbd804 2727\f
3d8932fd 2728Copyright (C) 2019 Free Software Foundation, Inc.
7dfbd804 2729
2730Copying and distribution of this file, with or without modification,
2731are permitted in any medium without royalty provided the copyright
2732notice and this notice are preserved.