1 2019-07-08 Dmitriy Anisimkov <anisimko@adacore.com>
3 * Makefile.rtl: Use g-sercom__linux.adb for all linuxes.
5 2019-07-08 Yannick Moy <moy@adacore.com>
7 * expander.adb (Expand): Do not reset Analyzed flag always.
8 * sem_eval.adb (Fold_Ureal): Mark node as analyzed.
10 2019-07-08 Ed Schonberg <schonberg@adacore.com>
12 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Do not insert twice
13 the assignment statement that computes the delay value, to
14 prevent improper tree sharing when the value is a type
15 conversion and Float_Overflow checks are enabled.
17 2019-07-08 Hristian Kirtchev <kirtchev@adacore.com>
19 * bindo.adb: Update the section on terminology to include new
20 concepts. Update the section on switches to include new
22 * bindo.ads: Add type Precedence_Kind.
23 * bindo-builders.adb: Add with and use clauses for Debug and
24 Bindo.Validators. Add use clauses for
25 Bindo.Validators.Invocation_Graph_Validators and
26 Bindo.Validators.Library_Graph_Validators.
27 (Build_Invocation_Graph): Validate the graph immediately after
29 (Build_Library_Graph): Update the parameter profile. The
30 creation of the graph is now elaboration model-agnostic.
31 Validate the graph immediately after it was built.
32 (Create_With_Edge): Create regular with edges for Elaborate and
33 Elaborate_All edges when the appropriate debug switches are in
35 * bindo-builders.ads (Build_Library_Graph): Update the parameter
37 * bindo-diagnostics.adb (Diagnose_Cycle): Track the presence of
38 an Elaborate_All edge throughout the inspection of the cycle's
40 (Output_Dynamic_Model_Suggestions): Output the suggestion only
41 when the cycle contains at least one weak edge where the
42 successor was statically elaborated.
43 (Output_Elaborate_Body_Transition, Output_Forced_Transition,
44 Output_With_Transition): Update the assertions.
45 * bindo-elaborators.adb: Remove use clauses for
46 Bindo.Validators.Invocation_Graph_Validators and
47 Bindo.Validators.Library_Graph_Validators. Remove strings
48 Add_To_All_Candidates_Msg and Add_To_Comp_Candidates_Msg.
49 Remove type String_Ptr.
50 (Add_Vertex, Add_Vertex_If_Elaborable, Create_All_Candidates_Set
51 Create_Component_Candidates_Set): Remove.
52 (Create_Component_Vertex_Sets, Create_Vertex_Sets): New routine.
53 (Elaborate_Component): Update the parameter profile and the
54 comment on usage. Reimplement the elaboration of a component.
55 The algorithm will now attempt to elaborate as many vertices
56 possible. If this is not possible, and a weakly elaborable
57 vertex is available use unit was compiled using the dynamic
58 model, the algorithm will elaborate it.
59 (Elaborate_Library_Graph): Reimplement the elaboration of the
60 graph. The algorithm will now attempt to elaborate as many
61 vertices along with their components as possible. If this is not
62 possible, and a weakly elaborable vertex is available use unit
63 was compiled using the dynamic model, the algorithm will
64 elaborate it along with its component.
65 (Elaborate_Units): Merge with the functionality of
66 Elaborate_Units_Common.
67 (Elaborate_Units_Common, Elaborate_Units_Dynamic,
68 Elaborate_Units_Static): Remove.
69 (Elaborate_Vertex): Update the parameter profile and the comment
70 on usage. Reimplemented.
71 (Find_Best_Candidate): Remove.
72 (Find_Best_Elaborable_Vertex, Find_Best_Vertex,
73 Find_Best_Weakly_Elaborable_Vertex, Has_Elaborable_Body,
74 Insert_Elaborable_Successor, Insert_Vertex): New routines.
75 (Is_Better_Candidate): Remove.
76 (Is_Better_Elaborable_Vertex,
77 Is_Better_Weakly_Elaborable_Vertex,
78 Is_Suitable_Elaborable_Vertex,
79 Is_Suitable_Weakly_Elaborable_Vertex): New routines.
80 (Trace_Candidate_Vertices): Remove.
81 (Trace_Component): Output the number of strong and weak
83 (Trace_Unelaborated_Vertices): Remove.
84 (Trace_Vertex): Output the number of strong and weak
86 (Trace_Vertices): New routine.
87 (Update_Successor, Update_Successors): Update the parameter
88 profile and the comment on usage.
89 * bindo-graphs.adb: Remove type Precedence_Kind.
90 (Add_Edge_With_Return): Update the increment of pending
92 (Add_Vertex): Provide default values for strong and weak
94 (Complementary_Vertex): Move the initial declaration to the
95 spec. Update the parameter profile and the comment on usage.
96 (Contains_Weak_Static_Successor): New routine.
97 (Create): Update the parameter profile. The creation of the
98 graph is now elaboration model-agnostic.
99 (Decrement_Pending_Predecessors): Update the parameter profile
100 and the comment on usage. Reimplemented.
101 (Delete_Edge): Update the decrement of pending predecesors.
102 (Has_Elaborate_Body): Do not treat a vertex as being subject to
103 Elaborate_Body when a debug switch is in effect.
104 (Increment_Pending_Predecessors): Update the parameter profile
105 and the comment on usage. Reimplemented.
106 (Is_Elaborable_Component): Reimplemented.
107 (Is_Elaborable_Vertex): Move the initial declaration to the
109 (Is_Elaborate_Body_Pair): New routine.
110 (Is_Dynamically_Elaborated): Update the parameter profile.
112 (Is_Weakly_Elaborable_Vertex): New routine.
113 (Pending_Predecessors): Removed.
114 (Pending_Predecessors_For_Elaboration,
115 Pending_Strong_Predecessors, Pending_Weak_Predecessors,
116 Update_Pending_Predecessors): New routines.
117 (Update_Pending_Predecessors_Of_Components): Update the
118 increment of pending predecessors.
119 * bindo-graphs.ads: Update the components of type
120 Component_Attributes. Update the components of type
121 Library_Graph_Attributes. Update the components of type
122 Library_Graph_Vertex_Attributes. Update the initialization of
123 No_Component_Attributes. Update the initialization of
124 No_Library_Graph_Vertex_Attributes.
125 (Complementary_Vertex, Contains_Weak_Static_Successor): New
127 (Create): Update the parameter profile and the comment on usage.
128 (Decrement_Pending_Predecessors, Is_Dynamically_Elaborated):
129 Update the parameter profile and the comment on usage.
130 (Is_Elaborate_Body_Pair, Is_Weakly_Elaborable_Vertex): New
132 (Pending_Predecessors): Removed.
133 (Pending_Predecessors_For_Elaboration,
134 Pending_Strong_Predecessors, Pending_Weak_Predecessors): New
136 * bindo-writers.adb (Write_Components): Moved from the spec.
137 (Write_Component): Output the strong and weak predecessors.
138 (Write_Library_Graph): Output the components as part of the
140 (Write_Library_Graph_Vertex): Output the strong and weak
142 * bindo-writers.ads (Write_Components): Moved to the body.
143 * debug.adb: Add and document new GNATbind switches -d_a, -d_b,
145 * bindo-validators.adb: Minor reformattings.
147 2019-07-08 Bob Duff <duff@adacore.com>
149 * libgnat/g-sercom.ads, libgnat/g-sercom__linux.adb (Data_Rate):
150 Support additional data rates.
152 2019-07-08 Olivier Hainque <hainque@adacore.com>
154 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Don't request
155 DECL_ARTIFICIAL_P on elab proc declarations.
157 2019-07-08 Eric Botcazou <ebotcazou@adacore.com>
159 * repinfo.adb (List_Record_Info): Declare Incomplete_Layout and
160 Not_In_Extended_Main local exceptions.
161 (List_Structural_Record_Layout): For an extension, raise the
162 former if the parent subtype has not been built and the latter
163 if it is not declared in the main source unit. Fall back to the
164 flat layout if either exception has been raised.
166 2019-07-08 Ed Schonberg <schonberg@adacore.com>
168 * libgnat/a-strfix.adb (Delete): The RM describes the semantics
169 of Delete as equivalent to that of Replace_String with a null
170 argument. As a result, deleting a null string that starts past
171 the end of its argument is a noop and must not raise
174 2019-07-08 Javier Miranda <miranda@adacore.com>
176 * exp_disp.adb (Register_Primitive): When registering a
177 primitive in the secondary dispatch table, handle primitive
178 inherited through several levels of type derivation (required to
179 properly handle inherited 'null' primitive).
181 2019-07-08 Bob Duff <duff@adacore.com>
183 * doc/gnat_ugn/gnat_utility_programs.rst: Document handling of
184 preprocessor directives in GNATpp.
186 2019-07-08 Javier Miranda <miranda@adacore.com>
188 * gnat1drv.adb (Post_Compilation_Validation_Checks:
189 Validate_Compile_Time_Warning_Errors is now located in sem_prag
190 (instead of sem_ch13).
191 * sem_ch13.ads (Validate_Compile_Time_Warning_Error,
192 Validate_Compile_Time_Warning_Errors): Move to sem_prag.
194 (Compile_Time_Warnings_Errors): Move to sem_prag.
195 (Initialize): Remove initialization of table
196 Compile_Time_Warning_Errors.
197 (Validate_Compile_Time_Warning_Error,
198 Validate_Compile_Time_Warning_Errors): Move to sem_prag.
199 * sem_prag.ads (Validate_Compile_Time_Warning_Errors): New
201 * sem_prag.adb (Initialize): Initialize table
202 Compile_Time_Warning_Errors.
204 2019-07-08 Ed Schonberg <schonberg@adacore.com>
206 * sem_ch13.adb (Analyze_Aspect_Specifications): For a
207 pre/postcondition of a generic subprogram declaration, do not
208 use Relocate_Node on the aspect expression to construct the
209 corresponding attribute specification, to prevent tree anomalies
210 when the expression is a call with named actual parameters.
212 2019-07-08 Javier Miranda <miranda@adacore.com>
214 * sem_attr.adb (Analyze_Attribute [Attribute_Size]): For pragmas
215 used to report user defined compile time warning or errors
216 handle 'Size for types with known static RM size.
218 2019-07-08 Justin Squirek <squirek@adacore.com>
220 * exp_imgv.adb (Build_Enumeration_Image_Tables): Default SSO for
221 the building of image tables.
222 (Expand_Image_Attribute): Minor cleanup.
224 2019-07-08 Dmitriy Anisimkov <anisimko@adacore.com>
226 * libgnat/g-socket.ads, libgnat/g-socket.adb: Improve
228 (Get_Socket_Option, Set_Socket_Option): Remove default value for
231 2019-07-08 Ed Schonberg <schonberg@adacore.com>
233 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): For an
234 unanalized aspect in a generic context that has not been
235 analyzed yet, if the aspect applies to a type, place the type on
236 the scope stack to make its components visible, before checking
237 conformance with the version of the expression analyzed at the
240 2019-07-05 Justin Squirek <squirek@adacore.com>
242 * checks.adb (Apply_Accessibility_Check): Add logic to fetch the
243 function result accessibility level if one is required within
245 * exp_ch6.adb (Needs_Result_Accessibility_Level): Modify
246 controlling elsif block to handle more cases such as anonymous
247 access results and disable checking for coextensions.
249 2019-07-05 Ed Schonberg <schonberg@adacore.com>
251 * sem_ch9.adb (Analyze_Accept_Statement): If this is an illegal
252 accept statement for an enclosing entry abandon analysis to
253 prevent scope mismatches and potential infinite loops in
256 2019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
258 * ali.adb (For_Each_Invocation_Construct,
259 For_Each_Invocation_Relation): New version.
260 (Scan_ALI): Initialize field Invocation_Graph_Encoding.
261 (Set_Invocation_Graph_Encoding): Update the setting of the
262 invocation graph encoding.
263 * ali.ads: Move field Invocation_Graph_Encoding from Unit_Record
264 to ALI_Record because the encoding applies to the whole ALI,
265 rather than one of the units (spec or body) for which the ALI
267 (For_Each_Invocation_Construct, For_Each_Invocation_Relation):
269 * bindo.adb: Update the section on switches. Complete the
270 section of debugging elaboration order issues.
271 (Find_Elaboration_Order): Prepare the routine for the switch
272 from the old to the new elaboration order mechanism.
273 * bindo-diagnostics.adb (Find_And_Output_Invocation_Paths):
274 Manage a visited set used by Visit_Vertex.
275 (Output_All_Cycles_Suggestions,
276 Output_Dynamic_Model_Suggestions): Clarify the nature of the
278 (Output_Elaborate_Body_Transition): Update the diagnostic to
279 emit a better message.
280 (Output_Forced_Suggestions, Output_Full_Encoding_Suggestions):
281 Clarify the nature of the suggested switch.
282 (Visit_Vertex): Update the parameter profile to add a set of
283 invokers visited during the transition. This set prevents
284 infinite exploration of the graph in case the invocations are
286 * bindo-elaborators.adb: Add a use clause for
287 Bindo.Writers.Dependency_Writers.
288 (Elaborate_Units_Common): Output the library graph after it has
289 been augmented with invocation edges. Output just the components
290 instead of outputting the whole library graph again.
291 (Elaborate_Units_Dynamic, Elaborate_Units_Static): Output the
292 dependencies as expressed in the library graph.
293 * bindo-units.adb (Invocation_Graph_Encoding): Update the
294 extraction of the invocation graph encoding.
295 * bindo-writers.adb: Add with and use clauses for Binderr and
297 (palgc, plgc): New debug routine.
298 (Write_Components): Moved to the spec. Add a header for the
300 (Write_Dependencies, Write_Dependencies_Of_Vertex,
301 Write_Dependency_Edge): New routine.
302 (Write_Elaboration_Order): Update the logic to follow the format
303 of Binde's order output.
304 (Write_Library_Graph): Do not output the components every time
305 the graph is written.
306 (Write_Unit): Output the invocation graph encoding of the unit.
307 Output the invocation constructs and relations for the unit
309 * bindo-writers.ads (Write_Components): Moved from the body.
310 (Write_Dependencies): New routine.
311 * bindusg.adb: Prepare the routine for the switch from the old
312 to the new elaboration order mechanism.
313 * debug.adb: Binder switch -d_O is now not associated with any
315 * einfo.adb (Is_Elaboration_Target): The attribute applies to
316 packages, as specified by the comment on the attribute usage.
317 * opt.ads: Add a global flag which controls the choice between
318 the new and the legacy elaboration order mechanism.
319 * sem_elab.adb: Add Package_Target to type Target_Kind.
320 (Build_Elaborate_Body_Procedure, Build_Elaborate_Procedure,
321 Build_Elaborate_Spec_Procedure, Check_Elaboration_Scenarios,
322 Check_SPARK_Model_In_Effect): Use Main_Unit_Entity to obtain the
323 entity of the main unit.
324 (Create_Package_Rep): New routine.
325 (Create_Target_Rep): Add processing for packages.
326 (Declaration_Placement_Of_Node, Has_Prior_Elaboration): Use
327 Main_Unit_Entity to obtain the entity of the main
329 (Invocation_Graph_Recording_OK): Prepare the routine for the
330 switch from the old to the new elaboration order mechanism.
331 (Main_Unit_Entity): New routine.
332 (Meet_Elaboration_Requirement,
333 Process_Conditional_ABE_Variable_Reference): Use
334 Main_Unit_Entity to obtain the entity of the main unit.
335 (Process_Invocation_Instantiation): New routine.
336 (Process_Invocation_Scenario): Add processing for
338 * switch-b.adb (Scan_Binder_Switches): Prepare the routine for
339 the switch from the old to the new elaboration order mechanism.
341 2019-07-05 Joffrey Huguet <huguet@adacore.com>
343 * libgnat/a-textio.adb: Add abstract state refinment.
344 * libgnat/a-textio.ads: Add File_System abstract state. Add
345 global contracts, contract cases, preconditions and
346 postconditions to procedures and functions.
347 (Set_Input, Set_Output, Set_Error, Standard_Input,
348 Standard_Output, Standard_Error, Current_Input, Current_Output,
349 Current_Error): Turn SPARK_Mode off.
350 (Get_Line): Turn SPARK_Mode off on Get_Line functions.
351 * libgnat/a-tideio.ads, libgnat/a-tienio.ads,
352 libgnat/a-tifiio.ads, libgnat/a-tiflio.ads,
353 libgnat/a-tiinio.ads, libgnat/a-timoio.ads: Add global
354 contracts, contract cases, preconditions and postconditions to
355 procedures and functions.
357 2019-07-05 Arnaud Charlet <charlet@adacore.com>
359 * doc/gnat_ugn/platform_specific_information.rst: Refresh doc on
360 installing from the command line on Windows. Remove obsolete
362 * gnat_ugn.texi: Regenerate.
364 2019-07-05 Vasiliy Fofanov <fofanov@adacore.com>
366 * libgnat/a-wichha.ads (Is_Alphanumeric): Replace comment with
367 the correct one. Also capitalize references to False
370 2019-07-05 Eric Botcazou <ebotcazou@adacore.com>
372 * exp_ch4.adb (Expand_N_Indexed_Component): Do not expand actual
373 parameters of function calls here either.
375 2019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
377 * bindo-units.adb, checks.adb, exp_attr.adb, exp_ch3.adb,
378 exp_ch4.adb, exp_pakd.adb, lib-writ.adb, libgnat/g-traceb.adb,
379 libgnat/g-traceb.ads, libgnat/s-stratt.ads, sem_aux.ads,
380 sem_util.adb: Minor reformatting.
382 2019-07-05 Ed Schonberg <schonberg@adacore.com>
384 * sem_ch13.adb (Build_Predicate_Functions): If a subtype that
385 carries a static predicate aspect is frozen immediately after
386 its declaration, ensure that the generated function body created
387 for predicate checking is inserted after the corresponding
388 subprogram declaration, which is created at the point the
389 declaration is elaborated.
391 2019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
393 * exp_ch7.adb (Cleanup_Record): Use the underlying type when
394 checking for components with tasks.
396 2019-07-05 Arnaud Charlet <charlet@adacore.com>
398 * libgnarl/s-osinte__linux.ads: Link with -lrt before -lpthread.
400 2019-07-05 Ed Schonberg <schonberg@adacore.com>
402 * exp_pakd.adb (Expand_Bit_Packed_Element_Set): Add explicit
403 range checks when the index type of the bit-packed array is an
404 enumeration type with a non-standard representation,
406 2019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
408 * sem_res.adb (Is_Control_Flow_Statement): Delay statements
409 contain an expression, which in turn may have side effects and
410 affect the infinite recursion. As a result, delay statements
411 should not be treated specially.
413 2019-07-05 Arnaud Charlet <charlet@adacore.com>
415 * libgnarl/s-linux.ads, libgnarl/s-linux__alpha.ads,
416 libgnarl/s-linux__android.ads, libgnarl/s-linux__hppa.ads,
417 libgnarl/s-linux__mips.ads, libgnarl/s-linux__riscv.ads,
418 libgnarl/s-linux__sparc.ads: Fix typos in comments.
420 2019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
422 * sem_res.adb (Check_Infinite_Recursion): Reimplemented.
423 (Enclosing_Declaration_Or_Statement,
424 Invoked_With_Different_Arguments, Is_Conditional_Statement,
425 Is_Control_Flow_Statement, Is_Immediately_Within_Body,
426 Is_Raise_Idiom, Is_Raise_Statement, Is_Sole_Statement,
427 Preceded_By_Control_Flow_Statement,
428 Within_Conditional_Statement): New routines.
430 2019-07-05 Javier Miranda <miranda@adacore.com>
432 * exp_ch4.adb (Expand_N_Type_Conversion): Do not apply an
433 accessibility check when the conversion is an access to
434 class-wide interface type and it is an actual parameter.
435 * exp_ch6.adb (Expand_Call_Helper): Add documentation on the
436 accessibility level of an anonymous allocator defining the value
437 of an access parameter.
438 * sem_util.ads, sem_util.adb (Dynamic_Accessibility_Level): Add
439 support for an anonymous allocator whose type is that of a
440 stand-alone object of an anonymous access to object type.
442 2019-07-05 Piotr Trojanek <trojanek@adacore.com>
444 * einfo.ads, sem_res.adb: Typo fixes in comments.
446 2019-07-05 Bob Duff <duff@adacore.com>
448 * exp_ch6.adb (Is_Build_In_Place_Function): Narrow the check for
449 Has_Foreign_Convention to the imported case only. If a
450 build-in-place function is exported, and called from Ada code,
451 build-in-place protocols should be used.
453 2019-07-05 Ed Schonberg <schonberg@adacore.com>
455 * sem_util.adb (Encloing_Subprogram): If Enclosing_Dynamic_Scope
456 is a loop, continue climbing the scope stack to find the
457 enclosing subprogram.
458 (Gather_Components): Handle properly a choice in a record
459 aggregate that is given by a subtype with a static predicate.
461 2019-07-05 Javier Miranda <miranda@adacore.com>
463 * debug.adb (-gnatd.K): Leave available this switch.
464 * contracts.adb (Build_And_Analyze_Contract_Only_Subprograms):
466 * scil_ll.ads, scil_ll.adb (Contract_Only_Body_Flag,
467 Contract_Only_Body_Nodes, Get_Contract_Only_Body,
468 Is_Contract_Only_Body, Set_Contract_Only_Body): Remove.
470 2019-07-05 Pierre-Marie de Rodat <derodat@adacore.com>
472 * libgnat/a-strunb.ads: Import documentation from the RM
474 2019-07-05 Pierre-Marie de Rodat <derodat@adacore.com>
476 * libgnat/a-strfix.ads: Import documentation from the RM
478 2019-07-05 Yannick Moy <moy@adacore.com>
480 * adabkend.adb (Scan_Back_End_Switches): Accept -Og and -Ofast
483 2019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
485 * ali.adb: Relocate types Invocation_Construct_Record,
486 Invocation_Relation_Record, and Invocation_Signature_Record to
487 the body of ALI. Relocate tables Invocation_Constructs,
488 Invocation_Relations, and Invocation_Signatures to the body of
489 ALI. Remove type Body_Placement_Codes. Add new types
490 Declaration_Placement_Codes, and
491 Invocation_Graph_Encoding_Codes. Update the literals of type
492 Invocation_Graph_Line_Codes.
493 (Add_Invocation_Construct): Update the parameter profile. Add an
494 invocation construct built from all attributes provided.
495 (Add_Invocation_Relation): Update the parameter profile. Add an
496 invocation relation built from all attributes provided.
497 (Body_Placement): New routine.
498 (Body_Placement_Kind_To_Code, Code_To_Body_Placement_Kind):
500 (Code_To_Declaration_Placement_Kind,
501 Code_To_Invocation_Graph_Encoding_Kind, Column,
502 Declaration_Placement_Kind_To_Code, Extra,
503 For_Each_Invocation_Construct, For_Each_Invocation_Relation,
504 Invocation_Graph_Encoding,
505 Invocation_Graph_Encoding_Kind_To_Code, Invoker, Kind, Line,
506 Locations, Name): New routine.
507 (Scan_Invocation_Construct_Line): Reimplement the scanning
509 (Scan_Invocation_Graph_Attributes_Line): New routine.
510 (Scan_Invocation_Graph_Line): Use a case statement to dispatch.
511 (Scan_Invocation_Relation_Line): Reimplement the scanning
513 (Scope): New routine.
514 (Set_Invocation_Graph_Encoding, Signature, Spec_Placement,
515 Target): New routine.
516 * ali.ads: Add new type Invocation_Graph_Encoding_Kind. Add
517 component Invocation_Graph_Encoding to type Unit_Record.
518 Relocate various types and data structures to the body of ALI.
519 (Add_Invocation_Construct, Add_Invocation_Relation): Update the
521 (Body_Placement): New routine.
522 (Body_Placement_Kind_To_Code, Code_To_Body_Placement_Kind):
524 (Code_To_Declaration_Placement_Kind,
525 Code_To_Invocation_Graph_Encoding_Kind, Column,
526 Declaration_Placement_Kind_To_Code, Extra,
527 For_Each_Invocation_Construct, For_Each_Invocation_Relation,
528 Invocation_Graph_Encoding,
529 Invocation_Graph_Encoding_Kind_To_Code, Invoker, Kind, Line,
530 Locations, Name, Scope, Set_Invocation_Graph_Encoding,
531 Signature, Spec_Placement, Target): New routine.
532 * bindo.adb: Add with clause for Binde. Add with and use
533 clauses for Debug. Update the documentation. Add new switches.
534 (Find_Elaboration_Order): Dispatch to the proper elaboration
536 * bindo-augmentors.adb:
537 Remove with and use clauses for GNAT and GNAT.Sets. Remove
538 membership set VS. Update the parameter profiles of most
539 routines to use better parameter names. Update the
540 implementation of most routine to use the new parameter names.
541 Remove various redundant assertions.
542 * bindo-builders.adb: Use better names for instantiated data
543 structures. Update all references to these names. Update the
544 parameter profiles of most routines to use better parameter
545 names. Update the implementation of most routine to use the new
547 (Build_Library_Graph): Update the parameter profile. Update the
549 (Create_Vertex): Reimplemented.
550 (Declaration_Placement_Vertex): New routine.
551 * bindo-builders.ads (Build_Library_Graph): Update the parameter
552 profile and comment on usage.
553 * bindo-diagnostics.adb: Almost a new unit.
554 * bindo-diagnostics.ads: Add a use clause for
555 Bindo.Graphs.Invocation_Graphs. Remove package
557 (Diagnose_Circularities): New routine.
558 * bindo-elaborators.adb: Remove the with and use clauses for
559 Binderr and GNAT.Sets. Remove the use clause for
560 Bindo.Diagnostics.Cycle_Diagnostics. Remove membership set VS.
561 Update the parameter profiles of most routines to use better
562 parameter names. Update the implementation of most routine to
563 use the new parameter names. (Elaborate_Units_Common): Update
564 the parameter profile. Pass an infication to the library graph
565 builder whether the dynamic model is in effect.
566 (Elaborate_Units_Dynamic, Elaborate_Units_Static): Use
567 Diagnose_Circularities to provide diagnostics.
568 (Update_Successor): Use routine In_Same_Component to determine
569 whether the predecessor and successor reside in different
571 * bindo-graphs.adb: Add with and use clauses for Butil, Debug,
572 Output, and Bindo.Writers. Remove with and use clauses for
573 GNAT.Lists. Update the parameter profiles of most routines to
574 use better parameter names. Update the implementation of most
575 routine to use the new parameter names. Remove various
576 redundant assertions. Remove doubly linked list EL. Add new
577 type Precedence_Kind.
578 (Add_Cycle): New routine.
579 (Add_Vertex): Update the parameter profile. Update the creation
580 of vertex attributes.
581 (Add_Vertex_And_Complement, Body_Vertex, Column,
582 Complementary_Vertex, Copy_Cycle_Path, Cycle_Kind_Of): New
584 (Destroy_Invocation_Graph_Edge, Destroy_Library_Graph_Cycle,
585 Destroy_Library_Graph_Edge, Extra, File_Name,
586 Find_All_Cycles_Through_Vertex, Find_All_Cycles_With_Edge,
587 Find_Cycles, Find_First_Lower_Precedence_Cycle,
588 Get_LGC_Attributes, Has_Next, Hash_Library_Graph_Cycle,
589 Hash_Library_Graph_Cycle_Attributes, Highest_Precedence_Cycle,
590 Highest_Precedence_Edge, In_Same_Component, Insert_And_Sort,
591 Invocation_Edge_Count, Invocation_Graph_Encoding,
592 Is_Cycle_Initiating_Edge, Is_Cyclic_Edge,
593 Is_Cyclic_Elaborate_All_Edge, Is_Cyclic_Elaborate_Body_Edge,
594 Is_Cyclic_Elaborate_Edge, Is_Cyclic_Forced_Edge,
595 Is_Cyclic_Invocation_Edge, Is_Cyclic_With_Edge,
596 Is_Dynamically_Elaborated, Is_Elaborate_All_Edge,
597 Is_Elaborate_Body_Edge, Is_Elaborate_Edge: New routines.
598 (Is_Existing_Predecessor_Successor_Relation): Removed.
599 (Is_Forced_Edge, Is_Invocation_Edge, Is_Recorded_Cycle,
600 Is_Recorded_Edge, Is_With_Edge, Iterate_Edges_Of_Cycle, Kind,
601 Length): New routine.
602 (Lib_Vertex): Removed.
603 (Line, Links_Vertices_In_Same_Component,
604 Maximum_Invocation_Edge_Count, Next, Normalize_And_Add_Cycle,
605 Normalize_Cycle_Path, Number_Of_Cycles, Path, Precedence,
606 Remove_Vertex_And_Complement, Sequence_Next_Cycle): New routines.
607 (Sequence_Next_IGE_Id): Renamed to Sequence_Next_Edge.
608 (Sequence_Next_IGV_Id): Renamed to Sequence_Next_Vertex.
609 (Sequence_Next_LGE_Id): Renamed to Sequence_Next_Edge.
610 (Sequence_Next_LGV_Id): Renamed to Sequence_Next_Vertex.
611 (Set_Is_Existing_Predecessor_Successor_Relation): Removed.
612 (Set_Is_Recorded_Cycle, Set_Is_Recorded_Edge,
613 Set_LGC_Attributes, Spec_Vertex, Trace_Cycle, Trace_Edge,
614 Trace_Eol, Trace_Vertex): New routines.
615 * bindo-graphs.ads: Add with and use clauses for Types and
616 GNAT.Lists. Update the parameter profiles of most routines to
617 use better parameter names. Update the implementation of most
618 routine to use the new parameter names. Add the new
619 instantiated data structures IGE_Lists, IGV_Sets, LGC_Lists,
620 LGE_Lists, LGE_Sets, LGV_Sets, and RC_Sets. Add new type
621 Library_Graph_Cycle_Id along with an empty and initial value.
622 Remove component Lib_Vertex and add new components Body_Vertex
623 and Spec_Vertex to type Invocation_Graph_Vertex_Attributes. Add
624 new type Library_Graph_Cycle_Kind. Add new iterators
625 All_Cycle_Iterator and Edges_Of_Cycle_Iterator. Add new type
626 Library_Graph_Cycle_Attributes. Add new components
627 Cycle_Attributes, Cycles, and Dynamically_Elaborated to type
628 Library_Graph_Attributes.
629 (Body_Vertex, Column, Destroy_Invocation_Graph_Edge,
630 Destroy_Library_Graph_Cycle_Attributes,
631 Destroy_Library_Graph_Edge, Extra, File_Name, Find_Cycles,
632 Has_Elaborate_All_Cycle, Has_Next, Hash_Library_Graph_Cycle,
633 Hash_Library_Graph_Cycle_Attributes, Highest_Precedence_Cycle,
634 In_Same_Component, Invocation_Edge_Count,
635 Invocation_Graph_Encoding, Is_Dynamically_Elaborated,
636 Is_Elaborate_All_Edge, Is_Elaborate_Body_Edge,
637 Is_Elaborate_Edge, Is_Forced_Edge, Is_Invocation_Edge,
638 Is_With_Edge, Iterate_All_Cycles, Iterate_Edges_Of_Cycle, Kind):
640 (Length, Lib_Vertex, (Line, Next, Number_Of_Cycles, Present,
641 Same_Library_Graph_Cycle_Attributes, Spec_Vertex): New routines.
642 * bindo-units.adb (File_Name, Invocation_Graph_Encoding): New
644 * bindo-units.ads: Add new instantiated data structure
646 (File_Name, Invocation_Graph_Encoding): New routine.
647 * bindo-validators.adb: Remove with and use clauses for GNAT and
648 GNAT.Sets. Remove membership set US. Update the parameter
649 profiles of most routines to use better parameter names. Update
650 the implementation of most routine to use the new parameter
652 (Validate_Cycle, Validate_Cycle_Path, Validate_Cycles,
653 Validate_Invocation_Graph_Vertex): Remove the validation of
654 component Lib_Vertex. Add the validation of components
655 Body_Vertex and Spec_Vertex.
656 (Write_Error): New routine.
657 * bindo-validators.ads (Validate_Cycles): New routine.
658 * bindo-writers.adb: Update the parameter profiles of most
659 routines to use better parameter names. Update the
660 implementation of most routine to use the new parameter names.
661 (Write_Cycle, Write_Cyclic_Edge, Write_Cycles): New routines.
662 (Write_Invocation_Graph_Vertex): Remove the output of component
663 Lib_Vertex. Add the output of components Body_Vertex and
665 * bindo-writers.ads (Write_Cycles): New routine.
666 * debug.adb: Use binder switches -d_C and -d_P, add
667 documentation on their usage.
668 * gnatbind.adb: Remove with and use clauses for Binde. Delegate
669 the choice of elaboration mechanism to Bindo.
670 * lib-writ.adb (Column, Extra, Invoker, Kind, Line, Locations,
671 Name, Placement, Scope, Signature, Target): Removed.
672 (Write_Invocation_Graph): Moved at the top level.
673 (Write_Invocation_Graph_Attributes): New routine.
674 (Write_Invocation_Relation, Write_Invocation_Signature): Moved
676 * lib-writ.ads: Add a documentation section on invocation graph
678 * sem_elab.adb (Body_Placement_Of): New routine.
679 (Declare_Invocation_Construct): Update the call to
680 Add_Invocation_Construct.
681 (Declaration_Placement_Of_Node): New routine.
682 (Get_Invocation_Attributes): Correct the retrieval of the
683 enclosing subprogram where the postcondition procedure lives.
684 (Placement_Of, Placement_Of_Node): Removed.
685 (Record_Invocation_Graph): Record the encoding format used.
686 (Record_Invocation_Graph_Encoding): New routine.
687 (Record_Invocation_Relation): Update the call to
688 Add_Invocation_Relation.
689 (Spec_Placement_Of): Removed.
690 * libgnat/g-lists.ads, libgnat/g-lists.adb (Equal): New routine.
692 2019-07-05 Ed Schonberg <schonberg@adacore.com>
694 * checks.adb (Apply_Predicate_Check): Except within the
695 subprogram body that defines the formal, do not apply predicate
696 check on a formal IN parameter: such a check is redundant and
697 its expansion can lead to out-of-scope references when it is
698 originates in a function call in a precondition,
700 2019-07-05 Yannick Moy <moy@adacore.com>
702 * sem_res.adb (Resolve_Call): Cannot inline in quantified
704 * sem_util.adb, sem_util.ads (In_Quantified_Expression): New
707 2019-07-05 Bob Duff <duff@adacore.com>
709 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
711 * gnat_rm.texi: Regenerate.
713 2019-07-05 Bob Duff <duff@adacore.com>
715 * exp_attr.adb (Input): Take the No_Stream_Optimizations
716 restriction into account.
718 2019-07-05 Claire Dross <dross@adacore.com>
720 * libgnat/a-cofove.ads, libgnat/a-cofove.adb: Definite formal
721 vectors are now always bounded so that they do not need to be
724 2019-07-05 Dmitriy Anisimkov <anisimko@adacore.com>
726 * libgnat/g-traceb.ads, libgnat/g-traceb.adb (Call_Chain): New
729 2019-07-04 James Clarke <jrtc27@debian.org>
731 * libgnarl/s-osinte__kfreebsd-gnu.ads (clockid_t): Make type
733 (CLOCK_REALTIME): Make value public.
735 2019-07-04 Javier Miranda <miranda@adacore.com>
737 * exp_tss.adb (Init_Proc): Adding missing support for access to
738 subprograms and access to protected subprograms of non-default
741 2019-07-04 Eric Botcazou <ebotcazou@adacore.com>
743 * gnat1drv.adb (Adjust_Global_Switches): Use proper interface to
744 set the validity settings in CodePeer mode.
745 * par-load.adb (Load): Remove all code dealing with validity
747 * validsw.ads (Validity_Check_Copies): Alphabetize.
748 * validsw.adb (Reset_Validity_Check_Options): Set all options to
750 (Save_Validity_Check_Options): Save all options.
752 2019-07-04 Hristian Kirtchev <kirtchev@adacore.com>
754 * exp_ch3.adb, exp_ch4.adb, exp_ch4.ads, exp_ch5.adb,
755 exp_ch7.adb, exp_ch9.adb, exp_ch11.adb, exp_unst.adb,
756 rtsfind.ads, sem_attr.adb, sem_ch10.adb, sem_ch12.adb,
757 sem_ch13.adb, sem_dim.adb, sem_disp.adb, xref_lib.adb: Minor
760 2019-07-04 Joffrey Huguet <huguet@adacore.com>
762 * libgnarl/a-taside.ads: Add assertion policy to ignore
764 (Abort_Task, Is_Terminated, Is_Callable): Add preconditions.
766 2019-07-04 Eric Botcazou <ebotcazou@adacore.com>
768 * doc/gnat_rm/implementation_defined_pragmas.rst: Fix
769 capitalization and parenthesis glitches.
770 * gnat_rm.texi: Regenerate.
772 2019-07-04 Ed Schonberg <schonberg@adacore.com>
774 * sem_ch10.adb (Remove_Context_Clauses): Handle properly the
775 removal of a limited_with_clause which appears in the library
776 unit oF the main unit, when some other unit in the context has a
777 regular with_clause on the same unit, to prevent spurious
778 visibility errors in the subsequent analysis of pending instance
781 2019-07-04 Hristian Kirtchev <kirtchev@adacore.com>
783 * sem_elab.adb: Add new type Elaboration_Phase_Status along with
784 a global to keep track of the elaboration phase status.
785 Initialize all internal data structures to Nil for services
786 Elaborated_Units, Internal_Representation, and Scenario_Storage.
787 (Build_Call_Marker): Do not create a call marker when the
788 elaboration phase is not active.
789 (Build_Variable_Reference_Marker): Do not create a call marker
790 when the elaboration phase is not active.
791 (Check_Elaboration_Scenarios): Destroy all internal structures
792 when the elaboration phase does not have to run. Do not execute
793 when the elaboration phase is not active.
794 (Elaboration_Phase_Active): New routine.
795 (Finalize_All_Data_Structures): New routine.
796 (Initialize): Initialize all internal data structures and signal
797 that the elaboration phase has started.
798 (Initialize_All_Data_Structures): New routine.
799 (Initialize_Elaborated_Units): Initialize all internal data
801 (Initialize_Internal_Representation): Initialize all internal
803 (Initialize_Scenario_Storage): Initialize all internal data
805 (Kill_Elaboration_Scenario): Do not execute when the elaboration
807 (Set_Elaboration_Phase): New routine.
808 (Update_Elaboration_Scenario): Do not execute when the
809 elaboration phase is not active.
811 2019-07-04 Gary Dismukes <dismukes@adacore.com>
813 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The special
814 treatment of calling Mask_Unfrozen_Types must also be done in
815 the case of an Ignored_Ghost_Entity, because Expander_Active is
818 2019-07-04 Yannick Moy <moy@adacore.com>
820 * sem_prag.adb (Check_Library_Level_Entity): Update for new rule
823 2019-07-04 Justin Squirek <squirek@adacore.com>
825 * sem_disp.adb (Check_Controlling_Formals): Obtain the full view
826 before type comparison.
828 2019-07-04 Ed Schonberg <schonberg@adacore.com>
830 * exp_ch4.ads, exp_ch4.adb (Build_Eq_Call): New visible
831 subprogram, extracted from Expand_Composite_Equality, to handle
832 properly the composition of equality for variant record types.
833 * exp_ch3.adb (MAke_Eq_If): Use Build_Eq_Call for each
834 component, to handle properly the case of a component with a
835 user-defined equality. Revert to predefined equality if the
836 user-defined operation is abstract, to maintain compatibility
839 2019-07-04 Justin Squirek <squirek@adacore.com>
841 * exp_ch3.adb (Build_Initialization_Call): Fixup
842 *_skip_null_excluding_check argument to handle new default.
843 (Init_Formals): Make *_skip_null_excluding_check formal default
845 * exp_ch4.adb (Expand_N_Allocator): Add comment to note heavy
848 2019-07-04 Bob Duff <duff@adacore.com>
850 * sem_ch3.adb (Access_Definition): Do not create a master unless
851 Tasking_Allowed. Otherwise, this fails on restricted runtimes.
853 2019-07-04 Hristian Kirtchev <kirtchev@adacore.com>
855 * sem_util.adb (Propagate_DIC_Attributes): Do not propagate the
856 Default_Initial_Condition attributes to an incomplete type.
858 2019-07-04 Ed Schonberg <schonberg@adacore.com>
860 * sem_attr.adb (Check_Array_Type): An array type attribute such
861 as 'First can be applied to an unconstrained array tyope when
862 the attribute reference appears within an aspect specification
863 and the prefix is a current instance, given that the prefix of
864 the attribute will become a formal of the subprogram that
865 implements the aspect (typically a predicate check).
867 2019-07-04 Piotr Trojanek <trojanek@adacore.com>
869 * sem_util.adb (Yields_Synchronized_Object): Fix typos in
872 2019-07-04 Yannick Moy <moy@adacore.com>
874 * sem_util.adb (Yields_Synchronized_Object): Adapt to new SPARK
877 2019-07-04 Yannick Moy <moy@adacore.com>
879 * sem_spark.adb (Check_Statement): Only check permission of
880 object in extended return when it is of a deep type.
882 2019-07-04 Justin Squirek <squirek@adacore.com>
884 * sem_ch12.adb (Perform_Appropriate_Analysis): Added for
885 selecting which type of analysis based on wheither the
886 instantiation is a generic at the library-level. In which case
887 expansion during analysis.
888 (Preanalyze_Actuals): Modify calls to Analyze to use the new
891 2019-07-04 Ed Schonberg <schonberg@adacore.com>
893 * exp_unst.adb: Handle conditional expressions.
895 2019-07-04 Yannick Moy <moy@adacore.com>
897 * sem_spark.adb (Check_Package_Spec, Check_Package_Body): Only
898 analyze parts of the code marked in SPARK.
900 2019-07-04 Hristian Kirtchev <kirtchev@adacore.com>
902 * erroutc.adb, exp_aggr.adb, inline.adb, opt.adb, sem_ch3.adb:
905 2019-07-04 Yannick Moy <moy@adacore.com>
907 * sem_spark.adb (Explanation, Get_Expl): New functions to get
908 the explanation for a permission mismatch.
909 (Perm_Error, Perm_Mismatch, Perm_Error_Loop_Exit): Take
910 explanation into account for issuing a more precise error
912 (Set_Perm_Prefixes, Set_Perm_Extensions,
913 Set_Perm_Extensions_Move): Pass suitable argument for the
916 2019-07-04 Arnaud Charlet <charlet@adacore.com>
918 * exp_aggr.adb (In_Place_Assign_OK): Moved to top level and add
919 support for record aggregates.
920 (Component_Check): Use Is_CCG_Supported_Aggregate instead of a
921 similar local predicate.
922 (Convert_To_Assignments): Take advantage of In_Place_Assign_OK
923 predicate when possible.
924 (Is_CCG_Supported_Aggregate): Return False for records with
925 representation clauses and fix the logic for dealing with nested
928 2019-07-04 Piotr Trojanek <trojanek@adacore.com>
930 * opt.adb (Set_Config_Switches): Keep assertions policy as
931 enabled when analysing internal units in GNATprove mode.
933 2019-07-04 Arnaud Charlet <charlet@adacore.com>
935 * exp_ch4.adb (Expand_Short_Circuit_Operator): Strip
936 N_Variable_Reference_Marker when checking for the presence of
939 2019-07-04 Arnaud Charlet <charlet@adacore.com>
941 * exp_aggr.adb (Check_Component): Take into account type
944 2019-07-04 Dmitriy Anisimkov <anisimko@adacore.com>
946 * doc/gnat_ugn/platform_specific_information.rst: Document
947 Windows socket timeout particularity.
948 * gnat_ugn.texi: Regenerate.
949 * gsocket.h: Include versionhelpers.h.
950 * socket.c (__gnat_minus_500ms): New function.
951 * libgnat/g-sothco.ads (Minus_500ms_Windows_Timeout): New
953 * libgnat/g-socket.adb (Set_Socket_Option): Refactor to remove
954 500ms from the requested timeout only on old Windows version.
956 2019-07-04 Thomas Quinot <quinot@adacore.com>
958 * get_scos.adb: Remove bogus, dead code.
960 2019-07-04 Ed Schonberg <schonberg@adacore.com>
962 * sem_dim.adb (Analyze_Dimension_Array_Aggregate): If the
963 component is an entity name, its dimensions are those of its
966 2019-07-03 Bob Duff <duff@adacore.com>
968 * doc/gnat_ugn/gnat_utility_programs.rst: Document new flags in
971 2019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
973 * binde.adb: Remove with clause for System.OS_Lib.
974 (Force_Elab_Order): Refactor the majority of the code in Butil.
975 Use the new forced units iterator to obtain unit names.
976 * bindo-builders.adb: Add with and use clauses for Binderr,
977 Butil, Opt, Output, Types, GNAT, and GNAT.Dynamic_HTables. Add
978 a hash table which maps units to line number in the forced
979 elaboration order file.
980 (Add_Unit): New routine.
981 (Build_Library_Graph): Create forced edges between pairs of
982 units listed in the forced elaboration order file.
983 (Create_Forced_Edge, Create_Forced_Edges, Destroy_Line_Number,
984 Duplicate_Unit_Error, Hash_Unit, Internal_Unit_Info,
985 Is_Duplicate_Unit, Missing_Unit_Info): New routines.
986 * bindo-graphs.adb (Is_Internal_Unit, Is_Predefined_Unit):
987 Refactor some of the behavior to Bindo-Units.
988 * bindo-graphs.ads: Enable the enumeration literal for forced
990 * bindo-units.adb, bindo-units.ads (Is_Internal_Unit,
991 Is_Predefined_Unit): New routines.
992 * butil.adb: Add with and use clauses for Opt, GNAT, and
993 System.OS_Lib. Add with clause for Unchecked_Deallocation.
994 (Has_Next, Iterate_Forced_Units, Next, Parse_Next_Unit_Name,
995 Read_Forced_Elab_Order_File): New routines.
996 * butil.ads: Add with and use clauses for Types. Add new
997 iterator over the units listed in the forced elaboration order
999 (Has_Next, Iterate_Forced_Units, Next): New routine.
1000 * namet.adb, namet.ads (Present): New routine.
1002 2019-07-03 Bob Duff <duff@adacore.com>
1004 * sem_ch3.adb (Access_Definition): The code was creating a
1005 master in the case where the designated type is a class-wide
1006 interface type. Create a master in the noninterface case as
1007 well. That is, create a master for all limited class-wide types.
1009 2019-07-03 Yannick Moy <moy@adacore.com>
1011 * erroutc.adb (Sloc_In_Range): New function to determine whether
1012 the range of a pragma Warnings covers a location, taking
1013 instantiations into account.
1015 2019-07-03 Johannes Kanig <kanig@adacore.com>
1017 * osint.ads, osint.adb (Get_First_Main_File_Name): New routine
1018 to access the first file provided on the command line.
1020 2019-07-03 Ed Schonberg <schonberg@adacore.com>
1022 * inline.adb (Process_Formals_In_Aspects): New procedure within
1023 Expand_Inlined_Call, to perform a replacement of references to
1024 formals that appear in aspect specifications within the body
1027 2019-07-03 Justin Squirek <squirek@adacore.com>
1029 * sem_ch8.adb (Analyze_Object_Renaming): Add call to search for
1030 the appropriate actual subtype of the object renaming being
1032 (Check_Constrained_Object): Minor cleanup.
1034 2019-07-03 Yannick Moy <moy@adacore.com>
1036 * sem_spark.adb (Get_Observed_Or_Borrowed_Expr): New function to
1037 return go through traversal function call.
1038 (Check_Type): Consistently use underlying type.
1039 (Get_Perm): Adapt for case of elaboration code where variables
1040 are not declared in the environment. Remove incorrect handling
1041 of borrow and observe.
1043 2019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
1045 * inline.adb (Build_Return_Object_Formal): New routine.
1046 (Can_Split_Unconstrained_Function): Code clean up.
1047 (Copy_Formals,Copy_Return_Object): New routines.
1048 (Split_Unconstrained_Function): Code clean up and refactoring.
1050 2019-07-03 Gary Dismukes <dismukes@adacore.com>
1052 * bindo-augmentors.adb, bindo-augmentors.ads,
1053 bindo-builders.ads, bindo-elaborators.adb, sem_ch12.adb,
1054 sem_ch13.adb, sem_spark.adb, sinfo.ads: Minor editorial
1055 corrections and reformatting.
1057 2019-07-03 Bob Duff <duff@adacore.com>
1059 * sem_warn.adb (Check_Infinite_Loop_Warning): Avoid the warning
1060 if an Iterator_Specification is present.
1062 2019-07-03 Bob Duff <duff@adacore.com>
1064 * doc/gnat_ugn/gnat_utility_programs.rst: Document default
1067 2019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
1069 * ali.adb: Add with and use clauses for GNAT,
1070 GNAT.Dynamic_HTables, and Snames. Add a map from invocation
1071 signature records to invocation signature ids. Add various
1072 encodings of invocation-related attributes. Sort and update
1073 table Known_ALI_Lines.
1074 (Add_Invocation_Construct, Add_Invocation_Relation,
1075 Body_Placement_Kind_To_Code, Code_To_Body_Placement_Kind,
1076 Code_To_Invocation_Construct_Kind, Code_To_Invocation_Kind,
1077 Code_To_Invocation_Graph_Line_Kind, Destroy, Hash): New
1079 (Initialize_ALI): Sort the initialization sequence. Add
1080 initialization for all invocation-related tables.
1081 (Invocation_Construct_Kind_To_Code,
1082 Invocation_Graph_Line_Kind_To_Code, Invocation_Kind_To_Code,
1083 Invocation_Signature_Of, Present): New routines.
1084 (Scan_ALI): Add the default values for invocation-related ids.
1085 Scan invocation graph lines.
1086 (Scan_Invocation_Graph_Line): New routine.
1087 * ali.ads: Add with clause for GNAT.Dynamic_Tables. Add types
1088 for invocation constructs, relations, and signatures. Add
1089 tables for invocation constructs, relations, and signatures.
1090 Update Unit_Record to capture invocation-related ids. Relocate
1091 table Unit_Id_Tables and subtypes Unit_Id_Table, Unit_Id_Array
1093 (Add_Invocation_Construct, Add_Invocation_Relation,
1094 Body_Placement_Kind_To_Code, Code_To_Body_Placement_Kind,
1095 Code_To_Invocation_Construct_Kind, Code_To_Invocation_Kind,
1096 Code_To_Invocation_Graph_Line_Kind,
1097 Invocation_Construct_Kind_To_Code,
1098 Invocation_Graph_Line_Kind_To_Code, Invocation_Kind_To_Code,
1099 Invocation_Signature_Of, Present): New routines.
1100 * binde.adb: Add with and use clause for Types. Add use clause
1101 for ALI.Unit_Id_Tables;
1102 * binde.ads: Relocate table Unit_Id_Tables and subtypes
1103 Unit_Id_Table, Unit_Id_Array to ALI.
1104 * bindgen.adb: Remove with and use clause for ALI.
1105 * bindgen.ads: Remove with and use clause for Binde. Add with
1106 and use clause for ALI.
1107 * bindo.adb, bindo.ads, bindo-augmentors.adb,
1108 bindo-augmentors.ads, bindo-builders.adb, bindo-builders.ads,
1109 bindo-diagnostics.adb, bindo-diagnostics.ads,
1110 bindo-elaborators.adb, bindo-elaborators.ads, bindo-graphs.adb,
1111 bindo-graphs.ads, bindo-units.adb, bindo-units.ads,
1112 bindo-validators.adb, bindo-validators.ads, bindo-writers.adb,
1113 bindo-writers.ads: New units.
1114 * debug.adb: Use and describe GNAT debug switches -gnatd_F and
1115 -gnatd_G. Add GNATbind debug switches in the ranges dA .. dZ,
1116 d.a .. d.z, d.A .. d.Z, d.1 .. d.9, d_a .. d_z, d_A .. d_Z, and
1117 d_1 .. d_9. Use and describe GNATbind debug switches -d_A,
1118 -d_I, -d_L, -d_N, -d_O, -d_T, and -d_V.
1119 * exp_util.adb, exp_util.ads (Exceptions_OK): Relocate to
1121 * gnatbind.adb: Add with and use clause for Bindo. Use the new
1122 Bindo elaboration order only when -d_N is in effect.
1124 (Column, Extra, Invoker, Kind, Line, Locations, Name, Placement,
1125 Scope, Signature, Target): New routines.
1126 (Write_ALI): Output all invocation-related data.
1127 (Write_Invocation_Graph): New routine.
1128 * lib-writ.ads: Document the invocation graph ALI line.
1129 * namet.adb, namet.ads (Present): New routines.
1130 * sem_ch8.adb (Find_Direct_Name): Capture the status of
1131 elaboration checks and warnings of an identifier.
1132 (Find_Expanded_Name): Capture the status of elaboration checks
1133 and warnings of an expanded name.
1134 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Ensure
1135 that invocation graph-related data within the body of the main
1136 unit is encoded in the ALI file.
1137 (Analyze_Generic_Subprogram_Declaration): Ensure that invocation
1138 graph-related data within the body of the main unit is encoded
1140 (Analyze_Package_Instantiation): Perform minimal decoration of
1141 the instance entity.
1142 (Analyze_Subprogram_Instantiation): Perform minimal decoration
1143 of the instance entity.
1144 * sem_elab.adb: Perform heavy refactoring of all code. The unit
1145 is now split into "services" which specialize in one area of ABE
1146 checks. Add processing in order to capture invocation-graph
1147 related attributes of the main unit, and encode them in the ALI
1148 file. The Processing phase can now operate in multiple modes,
1149 all described by type Processing_Kind. Scenarios and targets
1150 are now distinct at the higher level, and carry their own
1151 representations. This eliminates the need to constantly
1152 recompute their attributes, and offers the various processors a
1153 uniform interface. The various initial states of the Processing
1154 phase are now encoded using type Processing_In_State, and
1155 xxx_State constants.
1156 * sem_elab.ads: Update the literals of type
1157 Enclosing_Level_Kind. Add Inline pragmas on several routines.
1158 * sem_prag.adb (Process_Inline): Ensure that invocation
1159 graph-related data within the body of the main unit is encoded
1161 * sem_util.adb (Enclosing_Generic_Body, Enclosing_Generic_Unit):
1163 (Exceptions_OK): Relocated from Sem_Util.
1164 (Mark_Save_Invocation_Graph_Of_Body): New routine.
1165 * sem_util.ads (Exceptions_OK): Relocated from Sem_Util.
1166 (Mark_Save_Invocation_Graph_Of_Body): New routine.
1167 * sinfo.adb (Is_Elaboration_Checks_OK_Node): Now applicable to
1168 N_Variable_Reference_Marker.
1169 (Is_Elaboration_Warnings_OK_Node): Now applicable to
1170 N_Expanded_Name, N_Identifier, N_Variable_Reference_Marker.
1171 (Is_Read): Use Flag4.
1172 (Is_SPARK_Mode_On_Node): New applicable to
1173 N_Variable_Reference_Marker.
1174 (Is_Write): Use Flag5.
1175 (Save_Invocation_Graph_Of_Body): New routine.
1176 (Set_Is_Elaboration_Checks_OK_Node): Now applicable to
1177 N_Variable_Reference_Marker.
1178 (Set_Is_Elaboration_Warnings_OK_Node): Now applicable to
1179 N_Expanded_Name, N_Identifier, N_Variable_Reference_Marker.
1180 (Set_Is_SPARK_Mode_On_Node): New applicable to
1181 N_Variable_Reference_Marker.
1182 (Set_Save_Invocation_Graph_Of_Body): New routine.
1183 * sinfo.ads: Update the documentation of attributes
1184 Is_Elaboration_Checks_OK_Node, Is_Elaboration_Warnings_OK_Node,
1185 Is_SPARK_Mode_On_Node. Update the flag usage of attributes
1186 Is_Read, Is_Write. Add attribute Save_Invocation_Graph_Of_Body
1187 and update its occurrence in nodes.
1188 (Save_Invocation_Graph_Of_Body): New routine along with pragma
1190 (Set_Save_Invocation_Graph_Of_Body): New routine along with
1192 * switch-b.adb (Scan_Binder_Switches): Refactor the scanning of
1194 (Scan_Debug_Switches): New routine.
1195 * libgnat/g-dynhta.adb, libgnat/g-dynhta.ads (Contains): New routine.
1196 * libgnat/g-graphs.adb (Associate_Vertices): Update the use of
1197 Component_Vertex_Iterator.
1198 (Contains_Component, Contains_Edge, Contains_Vertex, Has_Next):
1200 (Iterate_Component_Vertices): New routine.
1201 (Iterate_Vertices): Removed.
1202 (Next): Update the parameter profile.
1203 (Number_Of_Component_Vertices, Number_Of_Outgoing_Edges): New
1205 * libgnat/g-graphs.ads: Update the initialization of
1206 No_Component. Add type Component_Vertex_Iterator. Remove type
1208 (Has_Next): Add new versions and remove old ones.
1209 (Iterate_Component_Vertices): New routine.
1210 (Iterate_Vertices): Removed.
1211 (Next): Add new versions and remove old ones.
1212 (Number_Of_Component_Vertices, Number_Of_Outgoing_Edges): New
1214 * libgnat/g-sets.adb (Contains): Reimplemented.
1215 * gcc-interface/Make-lang.in (GNATBIND_OBJS): Add
1216 GNAT.Dynamic_HTables, GNAT.Graphs and Bindo units.
1217 * rtsfind.ads: Remove extra space.
1219 2019-07-03 Yannick Moy <moy@adacore.com>
1221 * sem_spark.adb: Add support for locally borrowing and observing
1223 (Get_Root_Object): Add parameter Through_Traversal to denote
1224 when we are interesting in getting to the traversed parameter.
1225 (Is_Prefix_Or_Almost): New function to support detection of
1226 illegal access to borrowed or observed paths.
1227 (Check_Pragma): Add analysis of assertion pragmas.
1229 2019-07-03 Ed Schonberg <schonberg@adacore.com>
1231 * sem_ch13.adb (Build_Predicate_Functions): In a generic context
1232 we do not build the bodies of predicate fuctions, but the
1233 expression in a static predicate must be elaborated to allow
1234 case coverage checking within the generic unit.
1235 (Build_Discrete_Static_Predicate): In a generic context, return
1236 without building function body once the
1237 Static_Discrete_Predicate expression for the type has been
1240 2019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
1242 * bindgen.adb, inline.adb, layout.adb, sem_ch12.adb,
1243 sem_ch13.adb, sem_ch7.adb, styleg.adb: Minor reformatting.
1245 2019-07-03 Bob Duff <duff@adacore.com>
1247 * par-ch3.adb (P_Defining_Identifier): Call
1248 Check_Defining_Identifier_Casing.
1249 * style.ads, styleg.ads, styleg.adb
1250 (Check_Defining_Identifier_Casing): New procedure to check for
1251 mixed-case defining identifiers.
1252 * stylesw.ads, stylesw.adb (Style_Check_Mixed_Case_Decls): New
1253 flag for checking for mixed-case defining identifiers.
1254 * doc/gnat_ugn/building_executable_programs_with_gnat.rst:
1255 Document new feature.
1256 * gnat_ugn.texi: Regenerate.
1258 2019-07-03 Eric Botcazou <ebotcazou@adacore.com>
1260 * doc/gnat_ugn/building_executable_programs_with_gnat.rst
1261 (Warning message control): Document that -gnatw.z/Z apply to
1263 * freeze.adb (Freeze_Entity): Give -gnatw.z warning for array
1264 types as well, but not if the specified alignment is the minimum
1266 * gnat_ugn.texi: Regenerate.
1268 2019-07-03 Bob Duff <duff@adacore.com>
1270 * einfo.ads, exp_util.adb, layout.ads, sinfo.ads: Spell "laid"
1273 2019-07-03 Ed Schonberg <schonberg@adacore.com>
1275 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): No error
1276 message on attribute applied to a renaming when the renamed
1277 object is an aggregate (from code reading).
1278 (Check_Aspect_At_End_Of_Declarations): In a generic context
1279 where freeze nodes are not generated, the original expression
1280 for an aspect may need to be analyzed to precent spurious
1281 conformance errors when compared with the expression that is
1282 anakyzed at the end of the current declarative list.
1284 2019-07-03 Eric Botcazou <ebotcazou@adacore.com>
1286 * layout.adb (Layout_Type): Do not set the component size of an
1287 array with a scalar component if the component type is
1290 2019-07-03 Ed Schonberg <schonberg@adacore.com>
1292 * inline.adb (Make_Loop_Labels_Unique): New procedure to modify
1293 the source code of subprograms that are inlined by the
1294 front-end, to prevent accidental duplication between loop labels
1295 in the inlined code and the code surrounding the inlined call.
1297 2019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
1299 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update
1300 the section on resolving elaboration circularities to eliminate
1301 certain combinations of switches which together do not produce
1302 the desired effect and confuse users.
1303 * gnat_ugn.texi: Regenerate.
1305 2019-07-03 Arnaud Charlet <charlet@adacore.com>
1307 * bindgen.adb (Gen_Main): Disable generation of reference to
1308 Ada_Main_Program_Name for CCG.
1309 * bindusg.adb (Display): Add -G to the command-line usage for
1311 * opt.ads (Generate_C_Code): Update comment.
1312 * switch-b.adb (Scan_Binder_Switches): Add handling for -G.
1314 2019-07-03 Arnaud Charlet <charlet@adacore.com>
1316 * sem_ch7.adb (Has_Referencer): Do not consider inlined
1317 subprograms when generating C code, which allows us to generate
1318 static inline subprograms.
1320 2019-07-03 Justin Squirek <squirek@adacore.com>
1322 * sem_ch6.adb (Check_Conformance): Add expression checking for
1323 constant modifiers in anonymous access types (in addition to
1324 "non-null" types) so that they are considered "matching" for
1325 subsequent conformance tests.
1327 2019-07-03 Arnaud Charlet <charlet@adacore.com>
1329 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
1330 Clarify wording on No_Multiple_Elaboration.
1331 * gnat_rm.texi: Regenerate.
1333 2019-07-03 Ed Schonberg <schonberg@adacore.com>
1335 * sem_ch8.adb (Find_Selected_Component): If the prefix is the
1336 current instance of a type or subtype, complete the resolution
1337 of the name by finding the component of the type denoted by the
1340 2019-07-03 Eric Botcazou <ebotcazou@adacore.com>
1342 * doc/gnat_rm/interfacing_to_other_languages.rst (Interfacing to C):
1343 Document that boolean types with convention C now map to C99 bool.
1344 * gnat_rm.texi: Regenerate.
1346 2019-07-03 Javier Miranda <miranda@adacore.com>
1348 * exp_attr.adb (Expand_Min_Max_Attribute): Code cleanup:
1349 removing code that it is now never executed in the CCG compiler
1352 2019-07-02 Iain Sandoe <iain@sandoe.co.uk>
1354 * libgnat/system-darwin-ppc.ads: Set Stack_Check_Probes True for
1357 2019-07-01 Ed Schonberg <schonberg@adacore.com>
1359 * sem_ch12.adb (Is_Defaulted): New predicate in
1360 Check_Formal_Package_Intance, to skip the conformance of checks
1361 on parameters of a formal package that are defaulted,
1363 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
1365 * checks.adb, exp_ch9.adb, exp_unst.adb, sem_ch4.adb,
1366 sem_prag.adb, sem_spark.adb: Minor reformatting.
1368 2019-07-01 Ed Schonberg <schonberg@adacore.com>
1370 * sem_attr.adb (Analyze_Attribute, case Enum_Rep): Allow prefix
1371 of attribute to be an attribute reference of a discrete type.
1373 2019-07-01 Eric Botcazou <ebotcazou@adacore.com>
1375 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Move up
1376 handling of Has_Pragma_Inline_Always and deal with
1377 Has_Pragma_No_Inline.
1379 2019-07-01 Ed Schonberg <schonberg@adacore.com>
1381 * sem_ch3.adb (Build_Derived_Record_Type): If the parent type is
1382 declared as a subtype of a private type with an inherited
1383 discriminant constraint, its generated full base appears as a
1384 record subtype, so we need to retrieve its oen base type so that
1385 the inherited constraint can be applied to it.
1387 2019-07-01 Yannick Moy <moy@adacore.com>
1389 * sem_spark.adb: Completely rework the algorithm for ownership
1390 checking, as the rules in SPARK RM have changed a lot.
1391 * sem_spark.ads: Update comments.
1393 2019-07-01 Dmitriy Anisimkov <anisimko@adacore.com>
1395 * gsocket.h (Has_Sockaddr_Len): Use the offset of sin_family offset in
1396 the sockaddr_in structure to determine the existence of length field
1397 before the sin_family.
1399 2019-07-01 Ed Schonberg <schonberg@adacore.com>
1401 * sem_prag.adb (Analyze_Pragma, case Weak_External): Pragma only
1402 applies to entities with run-time addresses, not to types.
1404 2019-07-01 Piotr Trojanek <trojanek@adacore.com>
1406 * einfo.adb, sem_ch7.adb, sem_prag.adb, sem_util.adb: Update
1407 references to the SPARK RM after the removal of Rule 7.1.4(5).
1409 2019-07-01 Piotr Trojanek <trojanek@adacore.com>
1411 * sysdep.c: Cleanup references to LynuxWorks in docs and
1414 2019-07-01 Ed Schonberg <schonberg@adacore.com>
1416 * checks.adb (Insert_Valid_Check): Do not apply validity check
1417 to variable declared within a protected object that uses the
1418 Lock_Free implementation, to prevent unwarranted constant
1419 folding, because entities within such an object msut be treated
1422 2019-07-01 Eric Botcazou <ebotcazou@adacore.com>
1424 * exp_ch9.adb (Check_Inlining): Deal with Has_Pragma_No_Inline.
1426 2019-07-01 Ed Schonberg <schonberg@adacore.com>
1428 * exp_unst.adb (Visit_Node, Check_Static_Type): Improve the
1429 handling of private and incomplete types whose full view is an
1430 access type, to detect additional uplevel references in dynamic
1431 bounds. This is relevant to N_Free_Statement among others that
1432 manipulate types whose full viww may be an access type.
1434 2019-07-01 Pat Rogers <rogers@adacore.com>
1436 * doc/gnat_rm/representation_clauses_and_pragmas.rst: Correct
1437 size indicated for R as a component of an array.
1438 * gnat_rm.texi: Regenerate.
1440 2019-07-01 Justin Squirek <squirek@adacore.com>
1442 * libgnat/s-win32.ads: Add definition for ULONG, modify
1443 OVERLAPPED type, and add appropriate pragmas.
1445 2019-07-01 Bob Duff <duff@adacore.com>
1447 * gnat1drv.adb (gnat1drv): Call Write_ALI if the main unit is
1450 2019-07-01 Yannick Moy <moy@adacore.com>
1452 * sem_ch4.adb (Operator_Check): Refine error message.
1454 2019-07-01 Piotr Trojanek <trojanek@adacore.com>
1456 * libgnat/a-calend.ads: Revert "Global => null" contracts on
1459 2019-07-01 Piotr Trojanek <trojanek@adacore.com>
1461 * exp_attr.adb, libgnat/g-graphs.ads: Fix typos in comments:
1462 componant -> component.
1464 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
1466 * libgnat/g-graphs.adb: Use type Directed_Graph rather than
1467 Instance in various routines.
1468 * libgnat/g-graphs.ads: Change type Instance to Directed_Graph.
1469 Update various routines that mention the type.
1471 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
1473 * libgnat/g-sets.adb: Use type Membership_Set rathern than
1474 Instance in various routines.
1475 * libgnat/g-sets.ads: Change type Instance to Membership_Set.
1476 Update various routines that mention the type.
1478 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
1480 * libgnat/g-lists.adb: Use type Doubly_Linked_List rather than
1481 Instance in various routines.
1482 * libgnat/g-lists.ads: Change type Instance to
1483 Doubly_Linked_List. Update various routines that mention the
1486 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
1488 * libgnat/g-dynhta.adb: Use type Dynamic_Hash_Table rather than
1489 Instance in various routines.
1490 * libgnat/g-dynhta.ads: Change type Instance to
1491 Dynamic_Hash_Table. Update various routines that mention the
1494 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
1496 * exp_attr.adb, exp_ch7.adb, exp_unst.adb, sem_ch3.adb,
1497 sem_util.adb, uintp.adb, uintp.ads: Minor reformatting.
1499 2019-07-01 Javier Miranda <miranda@adacore.com>
1501 * exp_attr.adb (Expand_Min_Max_Attribute): Disable expansion of
1502 'Min/'Max on integer, enumeration, fixed point and floating
1503 point types since the CCG backend now provides in file
1504 standard.h routines to support it.
1506 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
1508 * impunit.adb: Add GNAT.Graphs to list Non_Imp_File_Names_95.
1509 * Makefile.rtl, gcc-interface/Make-lang.in: Register unit
1511 * libgnat/g-dynhta.adb: Various minor cleanups (use Present
1512 rather than direct comparisons).
1513 (Delete): Reimplement to use Delete_Node.
1514 (Delete_Node): New routine.
1515 (Destroy_Bucket): Invoke the provided destructor.
1516 (Present): New routines.
1517 * libgnat/g-dynhta.ads: Add new generic formal Destroy_Value.
1518 Use better names for the components of iterators.
1519 * libgnat/g-graphs.adb, libgnat/g-graphs.ads: New unit.
1520 * libgnat/g-lists.adb: Various minor cleanups (use Present
1521 rather than direct comparisons).
1522 (Delete_Node): Invoke the provided destructor.
1523 (Present): New routine.
1524 * libgnat/g-lists.ads: Add new generic formal Destroy_Element.
1525 Use better names for the components of iterators.
1526 (Present): New routine.
1527 * libgnat/g-sets.adb, libgnat/g-sets.ads (Destroy, Preset,
1528 Reset): New routines.
1530 2019-07-01 Dmitriy Anisimkov <anisimko@adacore.com>
1532 * libgnat/g-sothco.adb (Get_Address): Fix the case when AF_INET6
1535 2019-07-01 Ed Schonberg <schonberg@adacore.com>
1537 * exp_attr.adb (Expand_Attribute_Reference, case Invalid_Value):
1538 Resolve result of call to Get_Simple_Init_Val, which may be a
1539 conversion of a literal.
1541 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
1543 * freeze.adb (Freeze_Expression): Remove the horrible useless
1544 name hiding of N. Insert the freeze nodes generated by the
1545 expression prior to the expression when the nearest enclosing
1548 2019-07-01 Pierre-Marie de Rodat <derodat@adacore.com>
1550 * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Fix
1551 formatting issues in the -gnatR section.
1552 * gnat_ugn.texi: Regenerate.
1554 2019-06-30 Iain Sandoe <iain@sandoe.co.uk>
1556 * gnatlink.adb (Link_Step): Remove duplicate -static-libgcc switches.
1557 Push -shared-libgcc explicitly, when it is the target default (unless
1558 overidden by the static flag).
1559 When the user has put an instance of shared/static-libgcc do not push
1560 a duplicate of this.
1562 2019-06-29 Eric Botcazou <ebotcazou@adacore.com>
1564 * gcc-interface/decl.c (gnat_to_gnu_entity): Beep up comment on SAVED,
1565 and tweak comment on the assertion about the scopes of Itypes. Do not
1566 skip the regular processing for Itypes that are E_Record_Subtype with
1567 a Cloned_Subtype. Get the Cloned_Subtype for every E_Record_Subtype
1568 if the type is dummy and hasn't got its own freeze node.
1569 <E_Record_Subtype>: Save again the DECL of the Cloned_Subtype, if any.
1570 <E_Access_Subtype>: Save again the DECL of the equivalent type.
1571 (Gigi_Equivalent_Type) <E_Access_Subtype>: New case.
1573 2019-06-29 Eric Botcazou <ebotcazou@adacore.com>
1575 * gcc-interface/utils.c (unchecked_convert): Tweak comment. Only skip
1576 dereferences when padding to have the same size on both sides. Do it
1577 for destination types with self-referential size too.
1579 2019-06-29 Eric Botcazou <ebotcazou@adacore.com>
1581 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: If the
1582 type requires strict alignment, then set the RM size to the type size.
1583 Rework handling of alignment and sizes of tagged types in ASIS mode.
1584 (validate_size): Rename local variable and remove special handling for
1585 strict-alignment types.
1586 * gcc-interface/utils.c (finish_record_type): Constify local variables
1587 and use properly typed constants.
1589 2019-06-29 Eric Botcazou <ebotcazou@adacore.com>
1591 * gcc-interface/decl.c (gnat_to_gnu_field): Rework error messages for
1592 fields requiring strict alignment, add explicit test on Storage_Unit
1593 for position and size, and mention type alignment for position.
1595 2019-06-29 Eric Botcazou <ebotcazou@adacore.com>
1597 * gcc-interface/trans.c (mark_visited_r): Set TYPE_SIZES_GIMPLIFIED on
1598 the main variant of a type, if any.
1600 2019-06-29 Eric Botcazou <ebotcazou@adacore.com>
1602 * gcc-interface/decl.c (set_nonaliased_component_on_array_type): Add
1603 missing guard for the presence of TYPE_CANONICAL.
1604 (set_reverse_storage_order_on_array_type): Likewise.
1606 2019-06-29 Eric Botcazou <ebotcazou@adacore.com>
1608 * gcc-interface/gigi.h (make_packable_type): Remove default value.
1609 (value_factor_p): Tweak prototype.
1610 * gcc-interface/decl.c (gnat_to_gnu_entity): Add comment.
1611 (gnat_to_gnu_component_type): Likewise.
1612 (gnat_to_gnu_field): Likewise. Fetch the position of the field earlier
1613 and simplify the condition under which the type is packed. Declare
1614 local variable is_bitfield. Pass 1 as max_align to make_packable_type
1615 if it is set to true.
1616 (copy_and_substitute_in_layout): Pass 0 to make_packable_type.
1617 * gcc-interface/utils.c (make_packable_array_type): New function.
1618 (make_packable_type): Use it to rewrite the type of array field.
1619 (maybe_pad_type): Pass align parameter to make_packable_type.
1620 (create_field_decl): Minor tweaks.
1621 (value_factor_p): Assert that FACTOR is a power of 2 and replace the
1622 modulo computation by a masking operation.
1624 2019-06-25 Eric Botcazou <ebotcazou@adacore.com>
1626 * gcc-interface/decl.c (gnat_to_gnu_entity): Remove superfluous test
1628 * gcc-interface/gigi.h (maybe_character_type): Fix formatting.
1629 (maybe_character_value): Likewise.
1631 2019-06-24 Jan Hubicka <jh@suse.cz>
1633 * gcc-interface/decl.c (gnat_to_gnu_entity): Check that
1634 type is array or integer prior checking string flag.
1635 * gcc-interface/gigi.h (maybe_character_type): Likewise.
1636 (maybe_character_value): Likewise.
1638 2019-06-24 Martin Sebor <msebor@redhat.com>
1640 * gcc-interface/utils.c (handle_nonnull_attribute): Quote attribute
1643 2019-06-18 Arnaud Charlet <charlet@adacore.com>
1646 * sem_ch5.adb (Analyze_Loop_Statement): Avoid exception propagation
1647 during normal processing.
1649 2019-06-17 Arnaud Charlet <charlet@adacore.com>
1652 * exp_ch9.adb (Expand_N_Delay_Relative_Statement): Swap the two
1653 conditions to avoid a unnecessary exception propagation in the default
1656 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
1658 * gcc-interface/utils.c (handle_stack_protect_attribute): Move around.
1660 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
1662 * doc/gnat_rm/implementation_defined_pragmas.rst (Machine_Attribute):
1663 Document additional optional parameters.
1664 * sem_prag.adb (Analyze_Pragma) <Pragma_Machine_Attribute>: Accept
1665 more than one optional parameter.
1666 * gcc-interface/decl.c (prepend_one_attribute_pragma): Alphabetize
1667 the list of supported pragmas. Simplify the handling of parameters
1668 and add support for more than one optional parameter.
1669 * gcc-interface/utils.c (attr_cold_hot_exclusions): New constant.
1670 (gnat_internal_attribute_table): Add entry for no_icf, noipa, flatten,
1671 used, cold, hot, target and target_clones.
1672 (begin_subprog_body): Do not create the RTL for the subprogram here.
1673 (handle_noicf_attribute): New static function.
1674 (handle_noipa_attribute): Likewise.
1675 (handle_flatten_attribute): Likewise.
1676 (handle_used_attribute): Likewise.
1677 (handle_cold_attribute): Likewise.
1678 (handle_hot_attribute): Likewise.
1679 (handle_target_attribute): Likewise.
1680 (handle_target_clones_attribute): Likewise.
1682 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
1684 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Return 0
1686 (Identifier_to_gnu): Use the actual subtype for a reference to a
1687 packed array in a return statement.
1688 (Attribute_to_gnu) <Attr_Size>: Do not strip VIEW_CONVERT_EXPRs from
1689 the prefix in every case.
1691 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
1693 * gcc-interface/trans.c (gnat_to_gnu): Remove superfluous tests on
1694 Backend_Overflow_Checks_On_Target and rework comments.
1696 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
1698 * gcc-interface/trans.c (walk_nesting_tree): New static function.
1699 (finalize_nrv): Use it to walk the entire nesting tree.
1701 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
1703 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Remove
1704 obsolete test on Is_For_Access_Subtype.
1706 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
1708 * gcc-interface/decl.c (components_to_record): Set a name on the type
1709 created for the REP part, if any.
1710 * gcc-interface/utils.c (finish_record_type): Only take the maximum
1711 when merging sizes for a variant part at offset 0.
1712 (merge_sizes): Rename has_rep parameter into max.
1714 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
1716 * gcc-interface/utils.c (gnat_internal_attribute_table): Add support
1717 for stack_protect attribute.
1718 (handle_stack_protect_attribute): New static function.
1720 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
1722 * gcc-interface/decl.c (intrin_arglists_compatible_p): Do not return
1723 false if the internal builtin uses a variable list.
1725 2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
1727 * gcc-interface/trans.c (Call_to_gnu): Do not initialize the temporary
1728 created out of addressability concerns if it's for the _Init parameter
1729 of an initialization procedure.
1731 2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
1733 * gcc-interface/ada-builtin-types.def: New file.
1734 * gcc-interface/ada-builtins.def: Likewise.
1735 * gcc-interface/ada-tree.h (BUILT_IN_LIKELY): New macro.
1736 (BUILT_IN_UNLIKELY): Likewise.
1737 * gcc-interface/trans.c (independent_iterations_p): Initialize the
1738 auto-vector to 16 elements.
1739 (Call_to_gnu): Remove local variable and change the vector of actual
1740 parameters to an auto-vector. Do not convert actual parameters to
1741 the argument type for front-end built-in functions. Add support for
1742 front-end built-in functions.
1743 (build_noreturn_cond): Use internal instead of built-in function.
1744 * gcc-interface/utils.c (c_builtin_type): Include ada-builtin-types.def
1745 (install_builtin_function_types): Likewise.
1746 (install_builtin_functions): Include ada-builtins.def first.
1748 2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
1750 * gcc-interface/utils.c (maybe_pad_type): Issue the warning for the
1751 specific case of component types preferably.
1753 2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
1755 * gcc-interface/trans.c (Identifier_to_gnu): Minor tweaks.
1756 (gnat_to_gnu): Do not convert the result if it is a reference to an
1757 unconstrained array used as the prefix of an attribute reference that
1760 2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
1762 * gcc-interface/trans.c (Gigi_Types_Compatible): New predicate.
1763 (Identifier_to_gnu): Use it to assert that the type of the identifier
1764 and that of its entity are compatible for gigi. Rename a couple of
1765 local variables and separate the processing of the result type.
1767 2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
1769 * gcc-interface/trans.c (Call_to_gnu): Use the unpadded type when
1770 putting back an intermediate conversion the type of the actuals.
1772 2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
1774 * gcc-interface/trans.c (gnat_to_gnu) <Shift operations>: Convert the
1775 count to the unsigned version of its base type before proceeding.
1777 2019-05-16 Martin Sebor <msebor@redhat.com>
1779 * gcc-interface/trans.c (check_inlining_for_nested_subprog): Quote
1782 2019-05-08 Arnaud Charlet <charlet@adacore.com>
1784 * standard.ads.h: New file.
1786 2019-05-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1788 * gcc-interface/Makefile.in (install-gcc-specs): Use foreach.
1791 2019-04-29 Michael K. Darling <darlingm@gmail.com>
1793 * gnatvsn.ads: Bump Library_Version to 10.
1795 2019-04-24 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1796 Bernd Edlinger <bernd.edlinger@hotmail.de>
1797 Jakub Jelinek <jakub@redhat.com>
1800 * raise-gcc.c (TARGET_ATTRIBUTE): Define.
1801 (continue_unwind, personality_body, PERSONALITY_FUNCTION): Add
1804 2019-04-07 Eric Botcazou <ebotcazou@adacore.com>
1806 * libgnat/i-cexten.ads (CFloat_128): New type.
1808 2019-03-22 Dmitriy Anisimkov <anisimko@adacore.com>
1811 * libgnat/g-socket.adb (Bind_Socket, Connect_Socket,
1812 Send_Socket): Fix the computation of structure lengths passed to
1814 (Is_IPv6_Address): Fix the number of expected colons.
1816 2019-03-11 Martin Liska <mliska@suse.cz>
1818 * gcc-interface/misc.c (gnat_post_options): Wrap option name in string
1819 format message and fix GNU coding style.
1821 2019-02-08 Eric Botcazou <ebotcazou@adacore.com>
1823 * gcc-interface/trans.c (gnat_to_gnu) <N_Aggregate>: Minor tweak.
1824 * gcc-interface/utils.c (convert): Do not pad when doing an unchecked
1825 conversion here. Use TREE_CONSTANT throughout the function.
1826 (unchecked_convert): Also pad if the source is a CONSTRUCTOR and the
1827 destination is a more aligned array type or a larger aggregate type,
1828 but not between original and packable versions of a type.
1830 2019-02-08 Eric Botcazou <ebotcazou@adacore.com>
1832 * gcc-interface/utils.c (max_size) <tcc_unary>: Be prepared for an
1833 operand with VOID_TYPE.
1835 2019-02-08 Eric Botcazou <ebotcazou@adacore.com>
1837 * gcc-interface/trans.c (elaborate_all_entities): Do not elaborate the
1838 entities of a package renaming another one.
1840 2019-02-08 Eric Botcazou <ebotcazou@adacore.com>
1842 * gcc-interface/trans.c (Regular_Loop_to_gnu): Replace tests on
1843 individual flag_unswitch_loops and flag_tree_loop_vectorize switches
1844 with test on global optimize switch.
1845 (Raise_Error_to_gnu): Likewise.
1847 2019-02-07 Eric Botcazou <ebotcazou@adacore.com>
1849 * libgnarl/s-linux__sparc.ads (ETIMEDOUT): Set to correct value.
1851 2019-02-06 Arnaud Charlet <charlet@adacore.com>
1853 * libgnarl/s-linux__x32.ads: Resync list of signals with s-linux.ads
1855 2019-01-27 Eric Botcazou <ebotcazou@adacore.com>
1857 * repinfo.adb (List_Component_Layout): Remove superfluous space for
1859 * gcc-interface/ada-tree.h (TYPE_IS_EXTRA_SUBTYPE_P): New macro.
1860 * gcc-interface/gigi.h (create_extra_subtype): Declare.
1861 * gcc-interface/decl.c (TYPE_ARRAY_SIZE_LIMIT): Likewise.
1862 (update_n_elem): New function.
1863 (gnat_to_gnu_entity): Use create_extra_subtype to create extra subtypes
1864 instead of doing it manually.
1865 <E_Array_Type>: Use update_n_elem to compute the maximum size. Use the
1866 index type instead of base type for the bounds. Set TYPE_ARRAY_MAX_SIZE
1867 of the array to the maximum size.
1868 <E_Array_Subtype>: Create an extra subtype using the index type of the
1869 base array type for self-referential bounds. Use update_n_elem to
1870 compute the maximum size. Set TYPE_ARRAY_MAX_SIZE of the array to the
1872 (gnat_to_gnu_field): Clear DECL_NONADDRESSABLE_P on discriminants.
1873 * gcc-interface/misc.c (gnat_get_alias_set): Return the alias set of
1874 the base type for an extra subtype.
1875 (gnat_type_max_size): Remove obsolete code.
1876 * gcc-interface/trans.c (Attribute_to_gnu): Minor tweak.
1877 (can_be_lower_p): Deal with pathological types.
1878 * gcc-interface/utils.c (create_extra_subtype): New function.
1879 (create_field_decl): Minor tweak.
1880 (max_size) <tcc_reference>: Compute a better value by using the extra
1881 subtypes on the self-referential bounds.
1882 <tcc_binary>: Rewrite. Deal with "negative value" in unsigned types.
1883 <tcc_expression>: Likewise.
1884 * gcc-interface/utils2.c (compare_arrays): Retrieve the original bounds
1885 of the arrays upfront. Swap only if the second length is not constant.
1886 Use comparisons on the original bounds consistently for the null tests.
1887 (build_binary_op): Use TYPE_IS_EXTRA_SUBTYPE_P macro.
1888 (build_allocator): Minor tweak.
1890 2019-01-27 Eric Botcazou <ebotcazou@adacore.com>
1892 * gcc-interface/decl.c (array_type_has_nonaliased_component): Return
1893 the same value for every dimension of a multidimensional array type.
1895 2019-01-26 Eric Botcazou <ebotcazou@adacore.com>
1897 * gcc-interface/trans.c (Regular_Loop_to_gnu): Use the SLOC of the
1898 iteration scheme, if present, throughout the translation.
1900 2019-01-26 Eric Botcazou <ebotcazou@adacore.com>
1902 * gcc-interface/trans.c (gnat_to_gnu) <N_Assignment_Statement>: Use
1903 DECL_SIZE_UNIT instead of TYPE_SIZE_UNIT for the size to be assigned
1904 by a call to memset if the LHS is a DECL.
1906 2019-01-26 Eric Botcazou <ebotcazou@adacore.com>
1908 * gcc-interface/trans.c (struct loop_info_d): Remove artificial field.
1909 (Loop_Statement_to_gnu): Do not set it.
1911 2019-01-26 Eric Botcazou <ebotcazou@adacore.com>
1913 * gcc-interface/trans.c (Iterate_Acc_Clause_Arg): Fix formatting.
1914 (Acc_gnat_to_gnu): Likewise.
1915 (Acc_Data_to_gnu): Likewise.
1916 (Acc_Var_to_gnu): Likewise.
1917 (Acc_Reduc_to_gnu): Likewise.
1918 (Acc_Size_List_to_gnu): Likewise.
1919 (Pragma_to_gnu) <Pragma_Acc_Loop>: Likewise.
1920 <Pragma_Acc_Data>): Likewise.
1921 (find_loop_for): Remove default value for parameters.
1922 * gcc-interface/trans.c (gnat_to_gnu) <N_Op_And>: Merge into...
1923 <N_Op_Eq>): ...this.
1925 2019-01-26 Eric Botcazou <ebotcazou@adacore.com>
1927 * gcc-interface/decl.c (annotate_value) <INTEGER_CST>: Use test on
1928 the sign bit instead of on the sign of the value.
1929 <PLUS_EXPR>: Turn addition of negative constant into subtraction.
1930 <MULT_EXPR>: Add test for degenerate case.
1931 <BIT_AND_EXPR>: Simplify.
1933 2019-01-18 Sebastian Huber <sebastian.huber@embedded-brains.de>
1935 * s-oscons-tmplt.c (AF_INET6): Do not undefine for RTEMS.
1937 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
1940 * exp_ch11.adb: Change "can not" to "cannot".
1941 * sem_ch4.adb: Likewise.
1943 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
1946 * exp_ch9.adb: Mechanically replace "can not" with "cannot".
1947 * libgnat/s-regpat.ads: Likewise.
1948 * par-ch4.adb: Likewise.
1949 * set_targ.adb: Likewise.
1950 * types.ads: Likewise.
1952 2019-01-08 Justin Squirek <squirek@adacore.com>
1955 2018-07-31 Justin Squirek <squirek@adacore.com>
1957 * lib-writ.adb (Write_With_Lines): Modfiy the generation
1958 of dependencies within ali files so that source unit
1959 bodies are properly listed even if said bodies are
1960 missing. Perform legacy behavior in GNATprove mode.
1961 * lib-writ.ads: Modify documentation to reflect current
1965 2018-09-26 Justin Squirek <squirek@adacore.com>
1967 * lib-writ.adb, lib-writ.ads (Write_With_Lines): Add
1968 documentation and an extra conditional check for RCI
1969 units so that generated ali files will list the spec
1970 only instead of a body when a body is not found.
1972 2019-01-04 Eric Botcazou <ebotcazou@adacore.com>
1974 * gnatvsn.ads: Bump copyright year.
1976 2019-01-01 Jakub Jelinek <jakub@redhat.com>
1978 Update copyright years.
1980 * gnat_ugn.texi: Bump @copying's copyright year.
1981 * gnat_rm.texi: Likewise.
1983 Copyright (C) 2019 Free Software Foundation, Inc.
1985 Copying and distribution of this file, with or without modification,
1986 are permitted in any medium without royalty provided the copyright
1987 notice and this notice are preserved.