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