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