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