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