]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/ada/ChangeLog
[Ada] More data rates supported on Linux
[thirdparty/gcc.git] / gcc / ada / ChangeLog
CommitLineData
7b8ca6b2 12019-07-08 Bob Duff <duff@adacore.com>
2
3 * libgnat/g-sercom.ads, libgnat/g-sercom__linux.adb (Data_Rate):
4 Support additional data rates.
5
364c746f 62019-07-08 Olivier Hainque <hainque@adacore.com>
7
8 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Don't request
9 DECL_ARTIFICIAL_P on elab proc declarations.
10
2dbfbbb2 112019-07-08 Eric Botcazou <ebotcazou@adacore.com>
12
13 * repinfo.adb (List_Record_Info): Declare Incomplete_Layout and
14 Not_In_Extended_Main local exceptions.
15 (List_Structural_Record_Layout): For an extension, raise the
16 former if the parent subtype has not been built and the latter
17 if it is not declared in the main source unit. Fall back to the
18 flat layout if either exception has been raised.
19
3e05bbec 202019-07-08 Ed Schonberg <schonberg@adacore.com>
21
22 * libgnat/a-strfix.adb (Delete): The RM describes the semantics
23 of Delete as equivalent to that of Replace_String with a null
24 argument. As a result, deleting a null string that starts past
25 the end of its argument is a noop and must not raise
26 Index_Error.
27
c98aac61 282019-07-08 Javier Miranda <miranda@adacore.com>
29
30 * exp_disp.adb (Register_Primitive): When registering a
31 primitive in the secondary dispatch table, handle primitive
32 inherited through several levels of type derivation (required to
33 properly handle inherited 'null' primitive).
34
221b67b6 352019-07-08 Bob Duff <duff@adacore.com>
36
37 * doc/gnat_ugn/gnat_utility_programs.rst: Document handling of
38 preprocessor directives in GNATpp.
39
aed4e06a 402019-07-08 Javier Miranda <miranda@adacore.com>
41
42 * gnat1drv.adb (Post_Compilation_Validation_Checks:
43 Validate_Compile_Time_Warning_Errors is now located in sem_prag
44 (instead of sem_ch13).
45 * sem_ch13.ads (Validate_Compile_Time_Warning_Error,
46 Validate_Compile_Time_Warning_Errors): Move to sem_prag.
47 * sem_ch13.adb
48 (Compile_Time_Warnings_Errors): Move to sem_prag.
49 (Initialize): Remove initialization of table
50 Compile_Time_Warning_Errors.
51 (Validate_Compile_Time_Warning_Error,
52 Validate_Compile_Time_Warning_Errors): Move to sem_prag.
53 * sem_prag.ads (Validate_Compile_Time_Warning_Errors): New
54 procedure.
55 * sem_prag.adb (Initialize): Initialize table
56 Compile_Time_Warning_Errors.
57
b9bd5934 582019-07-08 Ed Schonberg <schonberg@adacore.com>
59
60 * sem_ch13.adb (Analyze_Aspect_Specifications): For a
61 pre/postcondition of a generic subprogram declaration, do not
62 use Relocate_Node on the aspect expression to construct the
63 corresponding attribute specification, to prevent tree anomalies
64 when the expression is a call with named actual parameters.
65
63bb17d8 662019-07-08 Javier Miranda <miranda@adacore.com>
67
68 * sem_attr.adb (Analyze_Attribute [Attribute_Size]): For pragmas
69 used to report user defined compile time warning or errors
70 handle 'Size for types with known static RM size.
71
1979cbfe 722019-07-08 Justin Squirek <squirek@adacore.com>
73
74 * exp_imgv.adb (Build_Enumeration_Image_Tables): Default SSO for
75 the building of image tables.
76 (Expand_Image_Attribute): Minor cleanup.
77
bcb0a375 782019-07-08 Dmitriy Anisimkov <anisimko@adacore.com>
79
80 * libgnat/g-socket.ads, libgnat/g-socket.adb: Improve
81 documentation.
82 (Get_Socket_Option, Set_Socket_Option): Remove default value for
83 the Level formal.
84
429822c1 852019-07-08 Ed Schonberg <schonberg@adacore.com>
86
87 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): For an
88 unanalized aspect in a generic context that has not been
89 analyzed yet, if the aspect applies to a type, place the type on
90 the scope stack to make its components visible, before checking
91 conformance with the version of the expression analyzed at the
92 freeze point.
93
e1415398 942019-07-05 Justin Squirek <squirek@adacore.com>
95
96 * checks.adb (Apply_Accessibility_Check): Add logic to fetch the
97 function result accessibility level if one is required within
98 the generated check.
99 * exp_ch6.adb (Needs_Result_Accessibility_Level): Modify
100 controlling elsif block to handle more cases such as anonymous
101 access results and disable checking for coextensions.
102
dad9e9f8 1032019-07-05 Ed Schonberg <schonberg@adacore.com>
104
105 * sem_ch9.adb (Analyze_Accept_Statement): If this is an illegal
106 accept statement for an enclosing entry abandon analysis to
107 prevent scope mismatches and potential infinite loops in
108 compiler.
109
627d0751 1102019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
111
112 * ali.adb (For_Each_Invocation_Construct,
113 For_Each_Invocation_Relation): New version.
114 (Scan_ALI): Initialize field Invocation_Graph_Encoding.
115 (Set_Invocation_Graph_Encoding): Update the setting of the
116 invocation graph encoding.
117 * ali.ads: Move field Invocation_Graph_Encoding from Unit_Record
118 to ALI_Record because the encoding applies to the whole ALI,
119 rather than one of the units (spec or body) for which the ALI
120 file was created.
121 (For_Each_Invocation_Construct, For_Each_Invocation_Relation):
122 New version.
123 * bindo.adb: Update the section on switches. Complete the
124 section of debugging elaboration order issues.
125 (Find_Elaboration_Order): Prepare the routine for the switch
126 from the old to the new elaboration order mechanism.
127 * bindo-diagnostics.adb (Find_And_Output_Invocation_Paths):
128 Manage a visited set used by Visit_Vertex.
129 (Output_All_Cycles_Suggestions,
130 Output_Dynamic_Model_Suggestions): Clarify the nature of the
131 suggested switch.
132 (Output_Elaborate_Body_Transition): Update the diagnostic to
133 emit a better message.
134 (Output_Forced_Suggestions, Output_Full_Encoding_Suggestions):
135 Clarify the nature of the suggested switch.
136 (Visit_Vertex): Update the parameter profile to add a set of
137 invokers visited during the transition. This set prevents
138 infinite exploration of the graph in case the invocations are
139 recursive.
140 * bindo-elaborators.adb: Add a use clause for
141 Bindo.Writers.Dependency_Writers.
142 (Elaborate_Units_Common): Output the library graph after it has
143 been augmented with invocation edges. Output just the components
144 instead of outputting the whole library graph again.
145 (Elaborate_Units_Dynamic, Elaborate_Units_Static): Output the
146 dependencies as expressed in the library graph.
147 * bindo-units.adb (Invocation_Graph_Encoding): Update the
148 extraction of the invocation graph encoding.
149 * bindo-writers.adb: Add with and use clauses for Binderr and
150 Butil.
151 (palgc, plgc): New debug routine.
152 (Write_Components): Moved to the spec. Add a header for the
153 output.
154 (Write_Dependencies, Write_Dependencies_Of_Vertex,
155 Write_Dependency_Edge): New routine.
156 (Write_Elaboration_Order): Update the logic to follow the format
157 of Binde's order output.
158 (Write_Library_Graph): Do not output the components every time
159 the graph is written.
160 (Write_Unit): Output the invocation graph encoding of the unit.
161 Output the invocation constructs and relations for the unit
162 only.
163 * bindo-writers.ads (Write_Components): Moved from the body.
164 (Write_Dependencies): New routine.
165 * bindusg.adb: Prepare the routine for the switch from the old
166 to the new elaboration order mechanism.
167 * debug.adb: Binder switch -d_O is now not associated with any
168 functionality.
169 * einfo.adb (Is_Elaboration_Target): The attribute applies to
170 packages, as specified by the comment on the attribute usage.
171 * opt.ads: Add a global flag which controls the choice between
172 the new and the legacy elaboration order mechanism.
173 * sem_elab.adb: Add Package_Target to type Target_Kind.
174 (Build_Elaborate_Body_Procedure, Build_Elaborate_Procedure,
175 Build_Elaborate_Spec_Procedure, Check_Elaboration_Scenarios,
176 Check_SPARK_Model_In_Effect): Use Main_Unit_Entity to obtain the
177 entity of the main unit.
178 (Create_Package_Rep): New routine.
179 (Create_Target_Rep): Add processing for packages.
180 (Declaration_Placement_Of_Node, Has_Prior_Elaboration): Use
181 Main_Unit_Entity to obtain the entity of the main
182 unit.
183 (Invocation_Graph_Recording_OK): Prepare the routine for the
184 switch from the old to the new elaboration order mechanism.
185 (Main_Unit_Entity): New routine.
186 (Meet_Elaboration_Requirement,
187 Process_Conditional_ABE_Variable_Reference): Use
188 Main_Unit_Entity to obtain the entity of the main unit.
189 (Process_Invocation_Instantiation): New routine.
190 (Process_Invocation_Scenario): Add processing for
191 instantiations.
192 * switch-b.adb (Scan_Binder_Switches): Prepare the routine for
193 the switch from the old to the new elaboration order mechanism.
194
30fb27b1 1952019-07-05 Joffrey Huguet <huguet@adacore.com>
196
197 * libgnat/a-textio.adb: Add abstract state refinment.
198 * libgnat/a-textio.ads: Add File_System abstract state. Add
199 global contracts, contract cases, preconditions and
200 postconditions to procedures and functions.
201 (Set_Input, Set_Output, Set_Error, Standard_Input,
202 Standard_Output, Standard_Error, Current_Input, Current_Output,
203 Current_Error): Turn SPARK_Mode off.
204 (Get_Line): Turn SPARK_Mode off on Get_Line functions.
205 * libgnat/a-tideio.ads, libgnat/a-tienio.ads,
206 libgnat/a-tifiio.ads, libgnat/a-tiflio.ads,
207 libgnat/a-tiinio.ads, libgnat/a-timoio.ads: Add global
208 contracts, contract cases, preconditions and postconditions to
209 procedures and functions.
210
ce99fc8a 2112019-07-05 Arnaud Charlet <charlet@adacore.com>
212
213 * doc/gnat_ugn/platform_specific_information.rst: Refresh doc on
214 installing from the command line on Windows. Remove obsolete
215 part.
216 * gnat_ugn.texi: Regenerate.
217
26ea5003 2182019-07-05 Vasiliy Fofanov <fofanov@adacore.com>
219
220 * libgnat/a-wichha.ads (Is_Alphanumeric): Replace comment with
221 the correct one. Also capitalize references to False
222 throughout.
223
c9c81835 2242019-07-05 Eric Botcazou <ebotcazou@adacore.com>
225
226 * exp_ch4.adb (Expand_N_Indexed_Component): Do not expand actual
227 parameters of function calls here either.
228
50948c8a 2292019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
230
231 * bindo-units.adb, checks.adb, exp_attr.adb, exp_ch3.adb,
232 exp_ch4.adb, exp_pakd.adb, lib-writ.adb, libgnat/g-traceb.adb,
233 libgnat/g-traceb.ads, libgnat/s-stratt.ads, sem_aux.ads,
234 sem_util.adb: Minor reformatting.
235
a9fa50ab 2362019-07-05 Ed Schonberg <schonberg@adacore.com>
237
238 * sem_ch13.adb (Build_Predicate_Functions): If a subtype that
239 carries a static predicate aspect is frozen immediately after
240 its declaration, ensure that the generated function body created
241 for predicate checking is inserted after the corresponding
242 subprogram declaration, which is created at the point the
243 declaration is elaborated.
244
ee4e1dd7 2452019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
246
247 * exp_ch7.adb (Cleanup_Record): Use the underlying type when
248 checking for components with tasks.
249
2028580f 2502019-07-05 Arnaud Charlet <charlet@adacore.com>
251
252 * libgnarl/s-osinte__linux.ads: Link with -lrt before -lpthread.
253
ec1e481f 2542019-07-05 Ed Schonberg <schonberg@adacore.com>
255
256 * exp_pakd.adb (Expand_Bit_Packed_Element_Set): Add explicit
257 range checks when the index type of the bit-packed array is an
258 enumeration type with a non-standard representation,
259
ae60396a 2602019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
261
262 * sem_res.adb (Is_Control_Flow_Statement): Delay statements
263 contain an expression, which in turn may have side effects and
264 affect the infinite recursion. As a result, delay statements
265 should not be treated specially.
266
d33025f2 2672019-07-05 Arnaud Charlet <charlet@adacore.com>
268
269 * libgnarl/s-linux.ads, libgnarl/s-linux__alpha.ads,
270 libgnarl/s-linux__android.ads, libgnarl/s-linux__hppa.ads,
271 libgnarl/s-linux__mips.ads, libgnarl/s-linux__riscv.ads,
272 libgnarl/s-linux__sparc.ads: Fix typos in comments.
273
51f2c7f9 2742019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
275
276 * sem_res.adb (Check_Infinite_Recursion): Reimplemented.
277 (Enclosing_Declaration_Or_Statement,
278 Invoked_With_Different_Arguments, Is_Conditional_Statement,
279 Is_Control_Flow_Statement, Is_Immediately_Within_Body,
280 Is_Raise_Idiom, Is_Raise_Statement, Is_Sole_Statement,
281 Preceded_By_Control_Flow_Statement,
282 Within_Conditional_Statement): New routines.
283
0e6f6ee1 2842019-07-05 Javier Miranda <miranda@adacore.com>
285
286 * exp_ch4.adb (Expand_N_Type_Conversion): Do not apply an
287 accessibility check when the conversion is an access to
288 class-wide interface type and it is an actual parameter.
289 * exp_ch6.adb (Expand_Call_Helper): Add documentation on the
290 accessibility level of an anonymous allocator defining the value
291 of an access parameter.
292 * sem_util.ads, sem_util.adb (Dynamic_Accessibility_Level): Add
293 support for an anonymous allocator whose type is that of a
294 stand-alone object of an anonymous access to object type.
295
f28a3d6c 2962019-07-05 Piotr Trojanek <trojanek@adacore.com>
297
298 * einfo.ads, sem_res.adb: Typo fixes in comments.
299
2d8a0eb3 3002019-07-05 Bob Duff <duff@adacore.com>
301
302 * exp_ch6.adb (Is_Build_In_Place_Function): Narrow the check for
303 Has_Foreign_Convention to the imported case only. If a
304 build-in-place function is exported, and called from Ada code,
305 build-in-place protocols should be used.
306
6eddee84 3072019-07-05 Ed Schonberg <schonberg@adacore.com>
308
309 * sem_util.adb (Encloing_Subprogram): If Enclosing_Dynamic_Scope
310 is a loop, continue climbing the scope stack to find the
311 enclosing subprogram.
312 (Gather_Components): Handle properly a choice in a record
313 aggregate that is given by a subtype with a static predicate.
314
249e38a7 3152019-07-05 Javier Miranda <miranda@adacore.com>
316
317 * debug.adb (-gnatd.K): Leave available this switch.
318 * contracts.adb (Build_And_Analyze_Contract_Only_Subprograms):
319 Remove.
320 * scil_ll.ads, scil_ll.adb (Contract_Only_Body_Flag,
321 Contract_Only_Body_Nodes, Get_Contract_Only_Body,
322 Is_Contract_Only_Body, Set_Contract_Only_Body): Remove.
323
33ae0c9f 3242019-07-05 Pierre-Marie de Rodat <derodat@adacore.com>
325
326 * libgnat/a-strunb.ads: Import documentation from the RM
327
70f9c8aa 3282019-07-05 Pierre-Marie de Rodat <derodat@adacore.com>
329
330 * libgnat/a-strfix.ads: Import documentation from the RM
331
1bc68ac2 3322019-07-05 Yannick Moy <moy@adacore.com>
333
334 * adabkend.adb (Scan_Back_End_Switches): Accept -Og and -Ofast
335 switches.
336
2500be2f 3372019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
338
339 * ali.adb: Relocate types Invocation_Construct_Record,
340 Invocation_Relation_Record, and Invocation_Signature_Record to
341 the body of ALI. Relocate tables Invocation_Constructs,
342 Invocation_Relations, and Invocation_Signatures to the body of
343 ALI. Remove type Body_Placement_Codes. Add new types
344 Declaration_Placement_Codes, and
345 Invocation_Graph_Encoding_Codes. Update the literals of type
346 Invocation_Graph_Line_Codes.
347 (Add_Invocation_Construct): Update the parameter profile. Add an
348 invocation construct built from all attributes provided.
349 (Add_Invocation_Relation): Update the parameter profile. Add an
350 invocation relation built from all attributes provided.
351 (Body_Placement): New routine.
352 (Body_Placement_Kind_To_Code, Code_To_Body_Placement_Kind):
353 Removed.
354 (Code_To_Declaration_Placement_Kind,
355 Code_To_Invocation_Graph_Encoding_Kind, Column,
356 Declaration_Placement_Kind_To_Code, Extra,
357 For_Each_Invocation_Construct, For_Each_Invocation_Relation,
358 Invocation_Graph_Encoding,
359 Invocation_Graph_Encoding_Kind_To_Code, Invoker, Kind, Line,
360 Locations, Name): New routine.
361 (Scan_Invocation_Construct_Line): Reimplement the scanning
362 mechanism.
363 (Scan_Invocation_Graph_Attributes_Line): New routine.
364 (Scan_Invocation_Graph_Line): Use a case statement to dispatch.
365 (Scan_Invocation_Relation_Line): Reimplement the scanning
366 mechanism.
367 (Scope): New routine.
368 (Set_Invocation_Graph_Encoding, Signature, Spec_Placement,
369 Target): New routine.
370 * ali.ads: Add new type Invocation_Graph_Encoding_Kind. Add
371 component Invocation_Graph_Encoding to type Unit_Record.
372 Relocate various types and data structures to the body of ALI.
373 (Add_Invocation_Construct, Add_Invocation_Relation): Update the
374 parameter profile.
375 (Body_Placement): New routine.
376 (Body_Placement_Kind_To_Code, Code_To_Body_Placement_Kind):
377 Removed.
378 (Code_To_Declaration_Placement_Kind,
379 Code_To_Invocation_Graph_Encoding_Kind, Column,
380 Declaration_Placement_Kind_To_Code, Extra,
381 For_Each_Invocation_Construct, For_Each_Invocation_Relation,
382 Invocation_Graph_Encoding,
383 Invocation_Graph_Encoding_Kind_To_Code, Invoker, Kind, Line,
384 Locations, Name, Scope, Set_Invocation_Graph_Encoding,
385 Signature, Spec_Placement, Target): New routine.
386 * bindo.adb: Add with clause for Binde. Add with and use
387 clauses for Debug. Update the documentation. Add new switches.
388 (Find_Elaboration_Order): Dispatch to the proper elaboration
389 mechanism.
390 * bindo-augmentors.adb:
391 Remove with and use clauses for GNAT and GNAT.Sets. Remove
392 membership set VS. Update the parameter profiles of most
393 routines to use better parameter names. Update the
394 implementation of most routine to use the new parameter names.
395 Remove various redundant assertions.
396 * bindo-builders.adb: Use better names for instantiated data
397 structures. Update all references to these names. Update the
398 parameter profiles of most routines to use better parameter
399 names. Update the implementation of most routine to use the new
400 parameter names.
401 (Build_Library_Graph): Update the parameter profile. Update the
402 call to Create.
403 (Create_Vertex): Reimplemented.
404 (Declaration_Placement_Vertex): New routine.
405 * bindo-builders.ads (Build_Library_Graph): Update the parameter
406 profile and comment on usage.
407 * bindo-diagnostics.adb: Almost a new unit.
408 * bindo-diagnostics.ads: Add a use clause for
409 Bindo.Graphs.Invocation_Graphs. Remove package
410 Cycle_Diagnostics.
411 (Diagnose_Circularities): New routine.
412 * bindo-elaborators.adb: Remove the with and use clauses for
413 Binderr and GNAT.Sets. Remove the use clause for
414 Bindo.Diagnostics.Cycle_Diagnostics. Remove membership set VS.
415 Update the parameter profiles of most routines to use better
416 parameter names. Update the implementation of most routine to
417 use the new parameter names. (Elaborate_Units_Common): Update
418 the parameter profile. Pass an infication to the library graph
419 builder whether the dynamic model is in effect.
420 (Elaborate_Units_Dynamic, Elaborate_Units_Static): Use
421 Diagnose_Circularities to provide diagnostics.
422 (Update_Successor): Use routine In_Same_Component to determine
423 whether the predecessor and successor reside in different
424 components.
425 * bindo-graphs.adb: Add with and use clauses for Butil, Debug,
426 Output, and Bindo.Writers. Remove with and use clauses for
427 GNAT.Lists. Update the parameter profiles of most routines to
428 use better parameter names. Update the implementation of most
429 routine to use the new parameter names. Remove various
430 redundant assertions. Remove doubly linked list EL. Add new
431 type Precedence_Kind.
432 (Add_Cycle): New routine.
433 (Add_Vertex): Update the parameter profile. Update the creation
434 of vertex attributes.
435 (Add_Vertex_And_Complement, Body_Vertex, Column,
436 Complementary_Vertex, Copy_Cycle_Path, Cycle_Kind_Of): New
437 routines.
438 (Destroy_Invocation_Graph_Edge, Destroy_Library_Graph_Cycle,
439 Destroy_Library_Graph_Edge, Extra, File_Name,
440 Find_All_Cycles_Through_Vertex, Find_All_Cycles_With_Edge,
441 Find_Cycles, Find_First_Lower_Precedence_Cycle,
442 Get_LGC_Attributes, Has_Next, Hash_Library_Graph_Cycle,
443 Hash_Library_Graph_Cycle_Attributes, Highest_Precedence_Cycle,
444 Highest_Precedence_Edge, In_Same_Component, Insert_And_Sort,
445 Invocation_Edge_Count, Invocation_Graph_Encoding,
446 Is_Cycle_Initiating_Edge, Is_Cyclic_Edge,
447 Is_Cyclic_Elaborate_All_Edge, Is_Cyclic_Elaborate_Body_Edge,
448 Is_Cyclic_Elaborate_Edge, Is_Cyclic_Forced_Edge,
449 Is_Cyclic_Invocation_Edge, Is_Cyclic_With_Edge,
450 Is_Dynamically_Elaborated, Is_Elaborate_All_Edge,
451 Is_Elaborate_Body_Edge, Is_Elaborate_Edge: New routines.
452 (Is_Existing_Predecessor_Successor_Relation): Removed.
453 (Is_Forced_Edge, Is_Invocation_Edge, Is_Recorded_Cycle,
454 Is_Recorded_Edge, Is_With_Edge, Iterate_Edges_Of_Cycle, Kind,
455 Length): New routine.
456 (Lib_Vertex): Removed.
457 (Line, Links_Vertices_In_Same_Component,
458 Maximum_Invocation_Edge_Count, Next, Normalize_And_Add_Cycle,
459 Normalize_Cycle_Path, Number_Of_Cycles, Path, Precedence,
460 Remove_Vertex_And_Complement, Sequence_Next_Cycle): New routines.
461 (Sequence_Next_IGE_Id): Renamed to Sequence_Next_Edge.
462 (Sequence_Next_IGV_Id): Renamed to Sequence_Next_Vertex.
463 (Sequence_Next_LGE_Id): Renamed to Sequence_Next_Edge.
464 (Sequence_Next_LGV_Id): Renamed to Sequence_Next_Vertex.
465 (Set_Is_Existing_Predecessor_Successor_Relation): Removed.
466 (Set_Is_Recorded_Cycle, Set_Is_Recorded_Edge,
467 Set_LGC_Attributes, Spec_Vertex, Trace_Cycle, Trace_Edge,
468 Trace_Eol, Trace_Vertex): New routines.
469 * bindo-graphs.ads: Add with and use clauses for Types and
470 GNAT.Lists. Update the parameter profiles of most routines to
471 use better parameter names. Update the implementation of most
472 routine to use the new parameter names. Add the new
473 instantiated data structures IGE_Lists, IGV_Sets, LGC_Lists,
474 LGE_Lists, LGE_Sets, LGV_Sets, and RC_Sets. Add new type
475 Library_Graph_Cycle_Id along with an empty and initial value.
476 Remove component Lib_Vertex and add new components Body_Vertex
477 and Spec_Vertex to type Invocation_Graph_Vertex_Attributes. Add
478 new type Library_Graph_Cycle_Kind. Add new iterators
479 All_Cycle_Iterator and Edges_Of_Cycle_Iterator. Add new type
480 Library_Graph_Cycle_Attributes. Add new components
481 Cycle_Attributes, Cycles, and Dynamically_Elaborated to type
482 Library_Graph_Attributes.
483 (Body_Vertex, Column, Destroy_Invocation_Graph_Edge,
484 Destroy_Library_Graph_Cycle_Attributes,
485 Destroy_Library_Graph_Edge, Extra, File_Name, Find_Cycles,
486 Has_Elaborate_All_Cycle, Has_Next, Hash_Library_Graph_Cycle,
487 Hash_Library_Graph_Cycle_Attributes, Highest_Precedence_Cycle,
488 In_Same_Component, Invocation_Edge_Count,
489 Invocation_Graph_Encoding, Is_Dynamically_Elaborated,
490 Is_Elaborate_All_Edge, Is_Elaborate_Body_Edge,
491 Is_Elaborate_Edge, Is_Forced_Edge, Is_Invocation_Edge,
492 Is_With_Edge, Iterate_All_Cycles, Iterate_Edges_Of_Cycle, Kind):
493 New routines.
494 (Length, Lib_Vertex, (Line, Next, Number_Of_Cycles, Present,
495 Same_Library_Graph_Cycle_Attributes, Spec_Vertex): New routines.
496 * bindo-units.adb (File_Name, Invocation_Graph_Encoding): New
497 routines.
498 * bindo-units.ads: Add new instantiated data structure
499 Unit_Sets.
500 (File_Name, Invocation_Graph_Encoding): New routine.
501 * bindo-validators.adb: Remove with and use clauses for GNAT and
502 GNAT.Sets. Remove membership set US. Update the parameter
503 profiles of most routines to use better parameter names. Update
504 the implementation of most routine to use the new parameter
505 names.
506 (Validate_Cycle, Validate_Cycle_Path, Validate_Cycles,
507 Validate_Invocation_Graph_Vertex): Remove the validation of
508 component Lib_Vertex. Add the validation of components
509 Body_Vertex and Spec_Vertex.
510 (Write_Error): New routine.
511 * bindo-validators.ads (Validate_Cycles): New routine.
512 * bindo-writers.adb: Update the parameter profiles of most
513 routines to use better parameter names. Update the
514 implementation of most routine to use the new parameter names.
515 (Write_Cycle, Write_Cyclic_Edge, Write_Cycles): New routines.
516 (Write_Invocation_Graph_Vertex): Remove the output of component
517 Lib_Vertex. Add the output of components Body_Vertex and
518 Spec_Vertex.
519 * bindo-writers.ads (Write_Cycles): New routine.
520 * debug.adb: Use binder switches -d_C and -d_P, add
521 documentation on their usage.
522 * gnatbind.adb: Remove with and use clauses for Binde. Delegate
523 the choice of elaboration mechanism to Bindo.
524 * lib-writ.adb (Column, Extra, Invoker, Kind, Line, Locations,
525 Name, Placement, Scope, Signature, Target): Removed.
526 (Write_Invocation_Graph): Moved at the top level.
527 (Write_Invocation_Graph_Attributes): New routine.
528 (Write_Invocation_Relation, Write_Invocation_Signature): Moved
529 at the top level.
530 * lib-writ.ads: Add a documentation section on invocation graph
531 attributes.
532 * sem_elab.adb (Body_Placement_Of): New routine.
533 (Declare_Invocation_Construct): Update the call to
534 Add_Invocation_Construct.
535 (Declaration_Placement_Of_Node): New routine.
536 (Get_Invocation_Attributes): Correct the retrieval of the
537 enclosing subprogram where the postcondition procedure lives.
538 (Placement_Of, Placement_Of_Node): Removed.
539 (Record_Invocation_Graph): Record the encoding format used.
540 (Record_Invocation_Graph_Encoding): New routine.
541 (Record_Invocation_Relation): Update the call to
542 Add_Invocation_Relation.
543 (Spec_Placement_Of): Removed.
544 * libgnat/g-lists.ads, libgnat/g-lists.adb (Equal): New routine.
545
164597c5 5462019-07-05 Ed Schonberg <schonberg@adacore.com>
547
548 * checks.adb (Apply_Predicate_Check): Except within the
549 subprogram body that defines the formal, do not apply predicate
550 check on a formal IN parameter: such a check is redundant and
551 its expansion can lead to out-of-scope references when it is
552 originates in a function call in a precondition,
553
572a4bc5 5542019-07-05 Yannick Moy <moy@adacore.com>
555
556 * sem_res.adb (Resolve_Call): Cannot inline in quantified
557 expressions.
558 * sem_util.adb, sem_util.ads (In_Quantified_Expression): New
559 function.
560
2c3ad474 5612019-07-05 Bob Duff <duff@adacore.com>
562
563 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
564 Fix typo.
565 * gnat_rm.texi: Regenerate.
566
2f67af4c 5672019-07-05 Bob Duff <duff@adacore.com>
568
569 * exp_attr.adb (Input): Take the No_Stream_Optimizations
570 restriction into account.
571
1cb1fd0f 5722019-07-05 Claire Dross <dross@adacore.com>
573
574 * libgnat/a-cofove.ads, libgnat/a-cofove.adb: Definite formal
575 vectors are now always bounded so that they do not need to be
576 limited anymore.
577
d2d09f3e 5782019-07-05 Dmitriy Anisimkov <anisimko@adacore.com>
579
580 * libgnat/g-traceb.ads, libgnat/g-traceb.adb (Call_Chain): New
581 function.
582
14e0bfed 5832019-07-04 James Clarke <jrtc27@debian.org>
584
585 * libgnarl/s-osinte__kfreebsd-gnu.ads (clockid_t): Make type
586 definition public.
587 (CLOCK_REALTIME): Make value public.
588
ecd07d3b 5892019-07-04 Javier Miranda <miranda@adacore.com>
590
591 * exp_tss.adb (Init_Proc): Adding missing support for access to
592 subprograms and access to protected subprograms of non-default
593 C++ constructors.
594
e0ff1639 5952019-07-04 Eric Botcazou <ebotcazou@adacore.com>
596
597 * gnat1drv.adb (Adjust_Global_Switches): Use proper interface to
598 set the validity settings in CodePeer mode.
599 * par-load.adb (Load): Remove all code dealing with validity
600 settings.
601 * validsw.ads (Validity_Check_Copies): Alphabetize.
602 * validsw.adb (Reset_Validity_Check_Options): Set all options to
603 off.
604 (Save_Validity_Check_Options): Save all options.
605
40bff3a0 6062019-07-04 Hristian Kirtchev <kirtchev@adacore.com>
607
608 * exp_ch3.adb, exp_ch4.adb, exp_ch4.ads, exp_ch5.adb,
609 exp_ch7.adb, exp_ch9.adb, exp_ch11.adb, exp_unst.adb,
610 rtsfind.ads, sem_attr.adb, sem_ch10.adb, sem_ch12.adb,
611 sem_ch13.adb, sem_dim.adb, sem_disp.adb, xref_lib.adb: Minor
612 reformatting.
613
0ebaade4 6142019-07-04 Joffrey Huguet <huguet@adacore.com>
615
616 * libgnarl/a-taside.ads: Add assertion policy to ignore
617 preconditions.
618 (Abort_Task, Is_Terminated, Is_Callable): Add preconditions.
619
f14a590b 6202019-07-04 Eric Botcazou <ebotcazou@adacore.com>
621
622 * doc/gnat_rm/implementation_defined_pragmas.rst: Fix
623 capitalization and parenthesis glitches.
624 * gnat_rm.texi: Regenerate.
625
f5388f99 6262019-07-04 Ed Schonberg <schonberg@adacore.com>
627
628 * sem_ch10.adb (Remove_Context_Clauses): Handle properly the
629 removal of a limited_with_clause which appears in the library
630 unit oF the main unit, when some other unit in the context has a
631 regular with_clause on the same unit, to prevent spurious
632 visibility errors in the subsequent analysis of pending instance
633 bodies.
634
c930bc82 6352019-07-04 Hristian Kirtchev <kirtchev@adacore.com>
636
637 * sem_elab.adb: Add new type Elaboration_Phase_Status along with
638 a global to keep track of the elaboration phase status.
639 Initialize all internal data structures to Nil for services
640 Elaborated_Units, Internal_Representation, and Scenario_Storage.
641 (Build_Call_Marker): Do not create a call marker when the
642 elaboration phase is not active.
643 (Build_Variable_Reference_Marker): Do not create a call marker
644 when the elaboration phase is not active.
645 (Check_Elaboration_Scenarios): Destroy all internal structures
646 when the elaboration phase does not have to run. Do not execute
647 when the elaboration phase is not active.
648 (Elaboration_Phase_Active): New routine.
649 (Finalize_All_Data_Structures): New routine.
650 (Initialize): Initialize all internal data structures and signal
651 that the elaboration phase has started.
652 (Initialize_All_Data_Structures): New routine.
653 (Initialize_Elaborated_Units): Initialize all internal data
654 structures.
655 (Initialize_Internal_Representation): Initialize all internal
656 data structures.
657 (Initialize_Scenario_Storage): Initialize all internal data
658 structures.
659 (Kill_Elaboration_Scenario): Do not execute when the elaboration
660 phase is not active.
661 (Set_Elaboration_Phase): New routine.
662 (Update_Elaboration_Scenario): Do not execute when the
663 elaboration phase is not active.
664
39dec7f4 6652019-07-04 Gary Dismukes <dismukes@adacore.com>
666
667 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The special
668 treatment of calling Mask_Unfrozen_Types must also be done in
669 the case of an Ignored_Ghost_Entity, because Expander_Active is
670 False in that case.
671
92b004be 6722019-07-04 Yannick Moy <moy@adacore.com>
673
674 * sem_prag.adb (Check_Library_Level_Entity): Update for new rule
675 on SPARK_Mode.
676
12795e1c 6772019-07-04 Justin Squirek <squirek@adacore.com>
678
679 * sem_disp.adb (Check_Controlling_Formals): Obtain the full view
680 before type comparison.
681
63fe3141 6822019-07-04 Ed Schonberg <schonberg@adacore.com>
683
684 * exp_ch4.ads, exp_ch4.adb (Build_Eq_Call): New visible
685 subprogram, extracted from Expand_Composite_Equality, to handle
686 properly the composition of equality for variant record types.
687 * exp_ch3.adb (MAke_Eq_If): Use Build_Eq_Call for each
688 component, to handle properly the case of a component with a
689 user-defined equality. Revert to predefined equality if the
690 user-defined operation is abstract, to maintain compatibility
691 with older versions,
692
17fa952a 6932019-07-04 Justin Squirek <squirek@adacore.com>
694
695 * exp_ch3.adb (Build_Initialization_Call): Fixup
696 *_skip_null_excluding_check argument to handle new default.
697 (Init_Formals): Make *_skip_null_excluding_check formal default
698 to False
699 * exp_ch4.adb (Expand_N_Allocator): Add comment to note heavy
700 code duplication
701
cf32543d 7022019-07-04 Bob Duff <duff@adacore.com>
703
704 * sem_ch3.adb (Access_Definition): Do not create a master unless
705 Tasking_Allowed. Otherwise, this fails on restricted runtimes.
706
eb4dbf20 7072019-07-04 Hristian Kirtchev <kirtchev@adacore.com>
708
709 * sem_util.adb (Propagate_DIC_Attributes): Do not propagate the
710 Default_Initial_Condition attributes to an incomplete type.
711
25ddc6ba 7122019-07-04 Ed Schonberg <schonberg@adacore.com>
713
714 * sem_attr.adb (Check_Array_Type): An array type attribute such
715 as 'First can be applied to an unconstrained array tyope when
716 the attribute reference appears within an aspect specification
717 and the prefix is a current instance, given that the prefix of
718 the attribute will become a formal of the subprogram that
719 implements the aspect (typically a predicate check).
720
74a5962a 7212019-07-04 Piotr Trojanek <trojanek@adacore.com>
722
723 * sem_util.adb (Yields_Synchronized_Object): Fix typos in
724 comments.
725
c65d33a8 7262019-07-04 Yannick Moy <moy@adacore.com>
727
728 * sem_util.adb (Yields_Synchronized_Object): Adapt to new SPARK
729 rule.
730
afd77d39 7312019-07-04 Yannick Moy <moy@adacore.com>
732
733 * sem_spark.adb (Check_Statement): Only check permission of
734 object in extended return when it is of a deep type.
735
2281b807 7362019-07-04 Justin Squirek <squirek@adacore.com>
737
738 * sem_ch12.adb (Perform_Appropriate_Analysis): Added for
739 selecting which type of analysis based on wheither the
740 instantiation is a generic at the library-level. In which case
741 expansion during analysis.
742 (Preanalyze_Actuals): Modify calls to Analyze to use the new
743 routine.
744
542b3e26 7452019-07-04 Ed Schonberg <schonberg@adacore.com>
746
747 * exp_unst.adb: Handle conditional expressions.
748
7754aad4 7492019-07-04 Yannick Moy <moy@adacore.com>
750
751 * sem_spark.adb (Check_Package_Spec, Check_Package_Body): Only
752 analyze parts of the code marked in SPARK.
753
3843c1bd 7542019-07-04 Hristian Kirtchev <kirtchev@adacore.com>
755
756 * erroutc.adb, exp_aggr.adb, inline.adb, opt.adb, sem_ch3.adb:
757 Minor reformatting.
758
5bc0f990 7592019-07-04 Yannick Moy <moy@adacore.com>
760
761 * sem_spark.adb (Explanation, Get_Expl): New functions to get
762 the explanation for a permission mismatch.
763 (Perm_Error, Perm_Mismatch, Perm_Error_Loop_Exit): Take
764 explanation into account for issuing a more precise error
765 message.
766 (Set_Perm_Prefixes, Set_Perm_Extensions,
767 Set_Perm_Extensions_Move): Pass suitable argument for the
768 explanation node.
769
11903e68 7702019-07-04 Arnaud Charlet <charlet@adacore.com>
771
772 * exp_aggr.adb (In_Place_Assign_OK): Moved to top level and add
773 support for record aggregates.
774 (Component_Check): Use Is_CCG_Supported_Aggregate instead of a
775 similar local predicate.
776 (Convert_To_Assignments): Take advantage of In_Place_Assign_OK
777 predicate when possible.
778 (Is_CCG_Supported_Aggregate): Return False for records with
779 representation clauses and fix the logic for dealing with nested
780 aggregates.
781
b0c19ea3 7822019-07-04 Piotr Trojanek <trojanek@adacore.com>
783
784 * opt.adb (Set_Config_Switches): Keep assertions policy as
785 enabled when analysing internal units in GNATprove mode.
786
90f2b146 7872019-07-04 Arnaud Charlet <charlet@adacore.com>
788
789 * exp_ch4.adb (Expand_Short_Circuit_Operator): Strip
790 N_Variable_Reference_Marker when checking for the presence of
791 actions.
792
39ecad34 7932019-07-04 Arnaud Charlet <charlet@adacore.com>
794
795 * exp_aggr.adb (Check_Component): Take into account type
796 conversions.
797
c0e899f1 7982019-07-04 Dmitriy Anisimkov <anisimko@adacore.com>
799
800 * doc/gnat_ugn/platform_specific_information.rst: Document
801 Windows socket timeout particularity.
802 * gnat_ugn.texi: Regenerate.
803 * gsocket.h: Include versionhelpers.h.
804 * socket.c (__gnat_minus_500ms): New function.
805 * libgnat/g-sothco.ads (Minus_500ms_Windows_Timeout): New
806 imported function.
807 * libgnat/g-socket.adb (Set_Socket_Option): Refactor to remove
808 500ms from the requested timeout only on old Windows version.
809
363b1a8e 8102019-07-04 Thomas Quinot <quinot@adacore.com>
811
812 * get_scos.adb: Remove bogus, dead code.
813
4ae0a9ce 8142019-07-04 Ed Schonberg <schonberg@adacore.com>
815
816 * sem_dim.adb (Analyze_Dimension_Array_Aggregate): If the
817 component is an entity name, its dimensions are those of its
818 type.
819
d60fa3c9 8202019-07-03 Bob Duff <duff@adacore.com>
821
822 * doc/gnat_ugn/gnat_utility_programs.rst: Document new flags in
823 GNATpp.
824
877ad320 8252019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
826
827 * binde.adb: Remove with clause for System.OS_Lib.
828 (Force_Elab_Order): Refactor the majority of the code in Butil.
829 Use the new forced units iterator to obtain unit names.
830 * bindo-builders.adb: Add with and use clauses for Binderr,
831 Butil, Opt, Output, Types, GNAT, and GNAT.Dynamic_HTables. Add
832 a hash table which maps units to line number in the forced
833 elaboration order file.
834 (Add_Unit): New routine.
835 (Build_Library_Graph): Create forced edges between pairs of
836 units listed in the forced elaboration order file.
837 (Create_Forced_Edge, Create_Forced_Edges, Destroy_Line_Number,
838 Duplicate_Unit_Error, Hash_Unit, Internal_Unit_Info,
839 Is_Duplicate_Unit, Missing_Unit_Info): New routines.
840 * bindo-graphs.adb (Is_Internal_Unit, Is_Predefined_Unit):
841 Refactor some of the behavior to Bindo-Units.
842 * bindo-graphs.ads: Enable the enumeration literal for forced
843 edges.
844 * bindo-units.adb, bindo-units.ads (Is_Internal_Unit,
845 Is_Predefined_Unit): New routines.
846 * butil.adb: Add with and use clauses for Opt, GNAT, and
847 System.OS_Lib. Add with clause for Unchecked_Deallocation.
848 (Has_Next, Iterate_Forced_Units, Next, Parse_Next_Unit_Name,
849 Read_Forced_Elab_Order_File): New routines.
850 * butil.ads: Add with and use clauses for Types. Add new
851 iterator over the units listed in the forced elaboration order
852 file.
853 (Has_Next, Iterate_Forced_Units, Next): New routine.
854 * namet.adb, namet.ads (Present): New routine.
855
01e6eb2f 8562019-07-03 Bob Duff <duff@adacore.com>
857
858 * sem_ch3.adb (Access_Definition): The code was creating a
859 master in the case where the designated type is a class-wide
860 interface type. Create a master in the noninterface case as
861 well. That is, create a master for all limited class-wide types.
862
9ad42832 8632019-07-03 Yannick Moy <moy@adacore.com>
864
865 * erroutc.adb (Sloc_In_Range): New function to determine whether
866 the range of a pragma Warnings covers a location, taking
867 instantiations into account.
868
f2a8d64e 8692019-07-03 Johannes Kanig <kanig@adacore.com>
870
871 * osint.ads, osint.adb (Get_First_Main_File_Name): New routine
872 to access the first file provided on the command line.
873
d4f28933 8742019-07-03 Ed Schonberg <schonberg@adacore.com>
875
876 * inline.adb (Process_Formals_In_Aspects): New procedure within
877 Expand_Inlined_Call, to perform a replacement of references to
878 formals that appear in aspect specifications within the body
879 being inlined.
880
23e7fc9b 8812019-07-03 Justin Squirek <squirek@adacore.com>
882
883 * sem_ch8.adb (Analyze_Object_Renaming): Add call to search for
884 the appropriate actual subtype of the object renaming being
885 analyzed.
886 (Check_Constrained_Object): Minor cleanup.
887
f8e6d133 8882019-07-03 Yannick Moy <moy@adacore.com>
889
890 * sem_spark.adb (Get_Observed_Or_Borrowed_Expr): New function to
891 return go through traversal function call.
892 (Check_Type): Consistently use underlying type.
893 (Get_Perm): Adapt for case of elaboration code where variables
894 are not declared in the environment. Remove incorrect handling
895 of borrow and observe.
896
d044ba5c 8972019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
898
899 * inline.adb (Build_Return_Object_Formal): New routine.
900 (Can_Split_Unconstrained_Function): Code clean up.
901 (Copy_Formals,Copy_Return_Object): New routines.
902 (Split_Unconstrained_Function): Code clean up and refactoring.
903
8699de72 9042019-07-03 Gary Dismukes <dismukes@adacore.com>
905
906 * bindo-augmentors.adb, bindo-augmentors.ads,
907 bindo-builders.ads, bindo-elaborators.adb, sem_ch12.adb,
908 sem_ch13.adb, sem_spark.adb, sinfo.ads: Minor editorial
909 corrections and reformatting.
910
2ccf6539 9112019-07-03 Bob Duff <duff@adacore.com>
912
913 * sem_warn.adb (Check_Infinite_Loop_Warning): Avoid the warning
914 if an Iterator_Specification is present.
915
17b5260d 9162019-07-03 Bob Duff <duff@adacore.com>
917
918 * doc/gnat_ugn/gnat_utility_programs.rst: Document default
919 new-line behavior.
920
5f71d12c 9212019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
922
923 * ali.adb: Add with and use clauses for GNAT,
924 GNAT.Dynamic_HTables, and Snames. Add a map from invocation
925 signature records to invocation signature ids. Add various
926 encodings of invocation-related attributes. Sort and update
927 table Known_ALI_Lines.
928 (Add_Invocation_Construct, Add_Invocation_Relation,
929 Body_Placement_Kind_To_Code, Code_To_Body_Placement_Kind,
930 Code_To_Invocation_Construct_Kind, Code_To_Invocation_Kind,
931 Code_To_Invocation_Graph_Line_Kind, Destroy, Hash): New
932 routines.
933 (Initialize_ALI): Sort the initialization sequence. Add
934 initialization for all invocation-related tables.
935 (Invocation_Construct_Kind_To_Code,
936 Invocation_Graph_Line_Kind_To_Code, Invocation_Kind_To_Code,
937 Invocation_Signature_Of, Present): New routines.
938 (Scan_ALI): Add the default values for invocation-related ids.
939 Scan invocation graph lines.
940 (Scan_Invocation_Graph_Line): New routine.
941 * ali.ads: Add with clause for GNAT.Dynamic_Tables. Add types
942 for invocation constructs, relations, and signatures. Add
943 tables for invocation constructs, relations, and signatures.
944 Update Unit_Record to capture invocation-related ids. Relocate
945 table Unit_Id_Tables and subtypes Unit_Id_Table, Unit_Id_Array
946 from Binde.
947 (Add_Invocation_Construct, Add_Invocation_Relation,
948 Body_Placement_Kind_To_Code, Code_To_Body_Placement_Kind,
949 Code_To_Invocation_Construct_Kind, Code_To_Invocation_Kind,
950 Code_To_Invocation_Graph_Line_Kind,
951 Invocation_Construct_Kind_To_Code,
952 Invocation_Graph_Line_Kind_To_Code, Invocation_Kind_To_Code,
953 Invocation_Signature_Of, Present): New routines.
954 * binde.adb: Add with and use clause for Types. Add use clause
955 for ALI.Unit_Id_Tables;
956 * binde.ads: Relocate table Unit_Id_Tables and subtypes
957 Unit_Id_Table, Unit_Id_Array to ALI.
958 * bindgen.adb: Remove with and use clause for ALI.
959 * bindgen.ads: Remove with and use clause for Binde. Add with
960 and use clause for ALI.
961 * bindo.adb, bindo.ads, bindo-augmentors.adb,
962 bindo-augmentors.ads, bindo-builders.adb, bindo-builders.ads,
963 bindo-diagnostics.adb, bindo-diagnostics.ads,
964 bindo-elaborators.adb, bindo-elaborators.ads, bindo-graphs.adb,
965 bindo-graphs.ads, bindo-units.adb, bindo-units.ads,
966 bindo-validators.adb, bindo-validators.ads, bindo-writers.adb,
967 bindo-writers.ads: New units.
968 * debug.adb: Use and describe GNAT debug switches -gnatd_F and
969 -gnatd_G. Add GNATbind debug switches in the ranges dA .. dZ,
970 d.a .. d.z, d.A .. d.Z, d.1 .. d.9, d_a .. d_z, d_A .. d_Z, and
971 d_1 .. d_9. Use and describe GNATbind debug switches -d_A,
972 -d_I, -d_L, -d_N, -d_O, -d_T, and -d_V.
973 * exp_util.adb, exp_util.ads (Exceptions_OK): Relocate to
974 Sem_Util.
975 * gnatbind.adb: Add with and use clause for Bindo. Use the new
976 Bindo elaboration order only when -d_N is in effect.
977 * lib-writ.adb
978 (Column, Extra, Invoker, Kind, Line, Locations, Name, Placement,
979 Scope, Signature, Target): New routines.
980 (Write_ALI): Output all invocation-related data.
981 (Write_Invocation_Graph): New routine.
982 * lib-writ.ads: Document the invocation graph ALI line.
983 * namet.adb, namet.ads (Present): New routines.
984 * sem_ch8.adb (Find_Direct_Name): Capture the status of
985 elaboration checks and warnings of an identifier.
986 (Find_Expanded_Name): Capture the status of elaboration checks
987 and warnings of an expanded name.
988 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Ensure
989 that invocation graph-related data within the body of the main
990 unit is encoded in the ALI file.
991 (Analyze_Generic_Subprogram_Declaration): Ensure that invocation
992 graph-related data within the body of the main unit is encoded
993 in the ALI file.
994 (Analyze_Package_Instantiation): Perform minimal decoration of
995 the instance entity.
996 (Analyze_Subprogram_Instantiation): Perform minimal decoration
997 of the instance entity.
998 * sem_elab.adb: Perform heavy refactoring of all code. The unit
999 is now split into "services" which specialize in one area of ABE
1000 checks. Add processing in order to capture invocation-graph
1001 related attributes of the main unit, and encode them in the ALI
1002 file. The Processing phase can now operate in multiple modes,
1003 all described by type Processing_Kind. Scenarios and targets
1004 are now distinct at the higher level, and carry their own
1005 representations. This eliminates the need to constantly
1006 recompute their attributes, and offers the various processors a
1007 uniform interface. The various initial states of the Processing
1008 phase are now encoded using type Processing_In_State, and
1009 xxx_State constants.
1010 * sem_elab.ads: Update the literals of type
1011 Enclosing_Level_Kind. Add Inline pragmas on several routines.
1012 * sem_prag.adb (Process_Inline): Ensure that invocation
1013 graph-related data within the body of the main unit is encoded
1014 in the ALI file.
1015 * sem_util.adb (Enclosing_Generic_Body, Enclosing_Generic_Unit):
1016 Code clean up.
1017 (Exceptions_OK): Relocated from Sem_Util.
1018 (Mark_Save_Invocation_Graph_Of_Body): New routine.
1019 * sem_util.ads (Exceptions_OK): Relocated from Sem_Util.
1020 (Mark_Save_Invocation_Graph_Of_Body): New routine.
1021 * sinfo.adb (Is_Elaboration_Checks_OK_Node): Now applicable to
1022 N_Variable_Reference_Marker.
1023 (Is_Elaboration_Warnings_OK_Node): Now applicable to
1024 N_Expanded_Name, N_Identifier, N_Variable_Reference_Marker.
1025 (Is_Read): Use Flag4.
1026 (Is_SPARK_Mode_On_Node): New applicable to
1027 N_Variable_Reference_Marker.
1028 (Is_Write): Use Flag5.
1029 (Save_Invocation_Graph_Of_Body): New routine.
1030 (Set_Is_Elaboration_Checks_OK_Node): Now applicable to
1031 N_Variable_Reference_Marker.
1032 (Set_Is_Elaboration_Warnings_OK_Node): Now applicable to
1033 N_Expanded_Name, N_Identifier, N_Variable_Reference_Marker.
1034 (Set_Is_SPARK_Mode_On_Node): New applicable to
1035 N_Variable_Reference_Marker.
1036 (Set_Save_Invocation_Graph_Of_Body): New routine.
1037 * sinfo.ads: Update the documentation of attributes
1038 Is_Elaboration_Checks_OK_Node, Is_Elaboration_Warnings_OK_Node,
1039 Is_SPARK_Mode_On_Node. Update the flag usage of attributes
1040 Is_Read, Is_Write. Add attribute Save_Invocation_Graph_Of_Body
1041 and update its occurrence in nodes.
1042 (Save_Invocation_Graph_Of_Body): New routine along with pragma
1043 Inline.
1044 (Set_Save_Invocation_Graph_Of_Body): New routine along with
1045 pragma Inline.
1046 * switch-b.adb (Scan_Binder_Switches): Refactor the scanning of
1047 debug switches.
1048 (Scan_Debug_Switches): New routine.
1049 * libgnat/g-dynhta.adb, libgnat/g-dynhta.ads (Contains): New routine.
1050 * libgnat/g-graphs.adb (Associate_Vertices): Update the use of
1051 Component_Vertex_Iterator.
1052 (Contains_Component, Contains_Edge, Contains_Vertex, Has_Next):
1053 Reimplemented.
1054 (Iterate_Component_Vertices): New routine.
1055 (Iterate_Vertices): Removed.
1056 (Next): Update the parameter profile.
1057 (Number_Of_Component_Vertices, Number_Of_Outgoing_Edges): New
1058 routines.
1059 * libgnat/g-graphs.ads: Update the initialization of
1060 No_Component. Add type Component_Vertex_Iterator. Remove type
1061 Vertex_Iterator.
1062 (Has_Next): Add new versions and remove old ones.
1063 (Iterate_Component_Vertices): New routine.
1064 (Iterate_Vertices): Removed.
1065 (Next): Add new versions and remove old ones.
1066 (Number_Of_Component_Vertices, Number_Of_Outgoing_Edges): New
1067 routines.
1068 * libgnat/g-sets.adb (Contains): Reimplemented.
1069 * gcc-interface/Make-lang.in (GNATBIND_OBJS): Add
1070 GNAT.Dynamic_HTables, GNAT.Graphs and Bindo units.
1071 * rtsfind.ads: Remove extra space.
1072
df177848 10732019-07-03 Yannick Moy <moy@adacore.com>
1074
1075 * sem_spark.adb: Add support for locally borrowing and observing
1076 a path.
1077 (Get_Root_Object): Add parameter Through_Traversal to denote
1078 when we are interesting in getting to the traversed parameter.
1079 (Is_Prefix_Or_Almost): New function to support detection of
1080 illegal access to borrowed or observed paths.
1081 (Check_Pragma): Add analysis of assertion pragmas.
1082
f3f142ac 10832019-07-03 Ed Schonberg <schonberg@adacore.com>
1084
1085 * sem_ch13.adb (Build_Predicate_Functions): In a generic context
1086 we do not build the bodies of predicate fuctions, but the
1087 expression in a static predicate must be elaborated to allow
1088 case coverage checking within the generic unit.
1089 (Build_Discrete_Static_Predicate): In a generic context, return
1090 without building function body once the
1091 Static_Discrete_Predicate expression for the type has been
1092 constructed.
1093
99d90c85 10942019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
1095
1096 * bindgen.adb, inline.adb, layout.adb, sem_ch12.adb,
1097 sem_ch13.adb, sem_ch7.adb, styleg.adb: Minor reformatting.
1098
800597f6 10992019-07-03 Bob Duff <duff@adacore.com>
1100
1101 * par-ch3.adb (P_Defining_Identifier): Call
1102 Check_Defining_Identifier_Casing.
1103 * style.ads, styleg.ads, styleg.adb
1104 (Check_Defining_Identifier_Casing): New procedure to check for
1105 mixed-case defining identifiers.
1106 * stylesw.ads, stylesw.adb (Style_Check_Mixed_Case_Decls): New
1107 flag for checking for mixed-case defining identifiers.
1108 * doc/gnat_ugn/building_executable_programs_with_gnat.rst:
1109 Document new feature.
1110 * gnat_ugn.texi: Regenerate.
1111
2c75027a 11122019-07-03 Eric Botcazou <ebotcazou@adacore.com>
1113
1114 * doc/gnat_ugn/building_executable_programs_with_gnat.rst
1115 (Warning message control): Document that -gnatw.z/Z apply to
1116 array types.
1117 * freeze.adb (Freeze_Entity): Give -gnatw.z warning for array
1118 types as well, but not if the specified alignment is the minimum
1119 one.
1120 * gnat_ugn.texi: Regenerate.
1121
08237d0d 11222019-07-03 Bob Duff <duff@adacore.com>
1123
1124 * einfo.ads, exp_util.adb, layout.ads, sinfo.ads: Spell "laid"
1125 correctly.
1126
0396441f 11272019-07-03 Ed Schonberg <schonberg@adacore.com>
1128
1129 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): No error
1130 message on attribute applied to a renaming when the renamed
1131 object is an aggregate (from code reading).
1132 (Check_Aspect_At_End_Of_Declarations): In a generic context
1133 where freeze nodes are not generated, the original expression
1134 for an aspect may need to be analyzed to precent spurious
1135 conformance errors when compared with the expression that is
1136 anakyzed at the end of the current declarative list.
1137
c8406f30 11382019-07-03 Eric Botcazou <ebotcazou@adacore.com>
1139
1140 * layout.adb (Layout_Type): Do not set the component size of an
1141 array with a scalar component if the component type is
1142 overaligned.
1143
c38b32ea 11442019-07-03 Ed Schonberg <schonberg@adacore.com>
1145
1146 * inline.adb (Make_Loop_Labels_Unique): New procedure to modify
1147 the source code of subprograms that are inlined by the
1148 front-end, to prevent accidental duplication between loop labels
1149 in the inlined code and the code surrounding the inlined call.
1150
6d6f134e 11512019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
1152
1153 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update
1154 the section on resolving elaboration circularities to eliminate
1155 certain combinations of switches which together do not produce
1156 the desired effect and confuse users.
1157 * gnat_ugn.texi: Regenerate.
1158
f3e16ef4 11592019-07-03 Arnaud Charlet <charlet@adacore.com>
1160
1161 * bindgen.adb (Gen_Main): Disable generation of reference to
1162 Ada_Main_Program_Name for CCG.
1163 * bindusg.adb (Display): Add -G to the command-line usage for
1164 gnatbind.
1165 * opt.ads (Generate_C_Code): Update comment.
1166 * switch-b.adb (Scan_Binder_Switches): Add handling for -G.
1167
f4a31b16 11682019-07-03 Arnaud Charlet <charlet@adacore.com>
1169
1170 * sem_ch7.adb (Has_Referencer): Do not consider inlined
1171 subprograms when generating C code, which allows us to generate
1172 static inline subprograms.
1173
2f65e9f7 11742019-07-03 Justin Squirek <squirek@adacore.com>
1175
1176 * sem_ch6.adb (Check_Conformance): Add expression checking for
1177 constant modifiers in anonymous access types (in addition to
1178 "non-null" types) so that they are considered "matching" for
1179 subsequent conformance tests.
1180
c336ed70 11812019-07-03 Arnaud Charlet <charlet@adacore.com>
1182
1183 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
1184 Clarify wording on No_Multiple_Elaboration.
1185 * gnat_rm.texi: Regenerate.
1186
78611c86 11872019-07-03 Ed Schonberg <schonberg@adacore.com>
1188
1189 * sem_ch8.adb (Find_Selected_Component): If the prefix is the
1190 current instance of a type or subtype, complete the resolution
1191 of the name by finding the component of the type denoted by the
1192 selector name.
1193
5a87a4d9 11942019-07-03 Eric Botcazou <ebotcazou@adacore.com>
1195
1196 * doc/gnat_rm/interfacing_to_other_languages.rst (Interfacing to C):
1197 Document that boolean types with convention C now map to C99 bool.
1198 * gnat_rm.texi: Regenerate.
1199
371c539c 12002019-07-03 Javier Miranda <miranda@adacore.com>
1201
1202 * exp_attr.adb (Expand_Min_Max_Attribute): Code cleanup:
1203 removing code that it is now never executed in the CCG compiler
1204 (dead code).
1205
89d2d652 12062019-07-02 Iain Sandoe <iain@sandoe.co.uk>
1207
1208 * libgnat/system-darwin-ppc.ads: Set Stack_Check_Probes True for
1209 PPC Darwin.
1210
d21e66fb 12112019-07-01 Ed Schonberg <schonberg@adacore.com>
1212
1213 * sem_ch12.adb (Is_Defaulted): New predicate in
1214 Check_Formal_Package_Intance, to skip the conformance of checks
1215 on parameters of a formal package that are defaulted,
1216
7a42b778 12172019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
1218
1219 * checks.adb, exp_ch9.adb, exp_unst.adb, sem_ch4.adb,
1220 sem_prag.adb, sem_spark.adb: Minor reformatting.
1221
fc8ae496 12222019-07-01 Ed Schonberg <schonberg@adacore.com>
1223
1224 * sem_attr.adb (Analyze_Attribute, case Enum_Rep): Allow prefix
1225 of attribute to be an attribute reference of a discrete type.
1226
9d27ea41 12272019-07-01 Eric Botcazou <ebotcazou@adacore.com>
1228
1229 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Move up
1230 handling of Has_Pragma_Inline_Always and deal with
1231 Has_Pragma_No_Inline.
1232
bcb8dcf3 12332019-07-01 Ed Schonberg <schonberg@adacore.com>
1234
1235 * sem_ch3.adb (Build_Derived_Record_Type): If the parent type is
1236 declared as a subtype of a private type with an inherited
1237 discriminant constraint, its generated full base appears as a
1238 record subtype, so we need to retrieve its oen base type so that
1239 the inherited constraint can be applied to it.
1240
d087b9ca 12412019-07-01 Yannick Moy <moy@adacore.com>
1242
1243 * sem_spark.adb: Completely rework the algorithm for ownership
1244 checking, as the rules in SPARK RM have changed a lot.
1245 * sem_spark.ads: Update comments.
1246
fe48ee0a 12472019-07-01 Dmitriy Anisimkov <anisimko@adacore.com>
1248
1249 * gsocket.h (Has_Sockaddr_Len): Use the offset of sin_family offset in
1250 the sockaddr_in structure to determine the existence of length field
1251 before the sin_family.
1252
b20f7e2c 12532019-07-01 Ed Schonberg <schonberg@adacore.com>
1254
1255 * sem_prag.adb (Analyze_Pragma, case Weak_External): Pragma only
1256 applies to entities with run-time addresses, not to types.
1257
374fdf94 12582019-07-01 Piotr Trojanek <trojanek@adacore.com>
1259
1260 * einfo.adb, sem_ch7.adb, sem_prag.adb, sem_util.adb: Update
1261 references to the SPARK RM after the removal of Rule 7.1.4(5).
1262
bf13a79d 12632019-07-01 Piotr Trojanek <trojanek@adacore.com>
1264
1265 * sysdep.c: Cleanup references to LynuxWorks in docs and
1266 comments.
1267
866fa2d0 12682019-07-01 Ed Schonberg <schonberg@adacore.com>
1269
1270 * checks.adb (Insert_Valid_Check): Do not apply validity check
1271 to variable declared within a protected object that uses the
1272 Lock_Free implementation, to prevent unwarranted constant
1273 folding, because entities within such an object msut be treated
1274 as volatile.
1275
bcb5ab83 12762019-07-01 Eric Botcazou <ebotcazou@adacore.com>
1277
1278 * exp_ch9.adb (Check_Inlining): Deal with Has_Pragma_No_Inline.
1279
2db33bd6 12802019-07-01 Ed Schonberg <schonberg@adacore.com>
1281
1282 * exp_unst.adb (Visit_Node, Check_Static_Type): Improve the
1283 handling of private and incomplete types whose full view is an
1284 access type, to detect additional uplevel references in dynamic
1285 bounds. This is relevant to N_Free_Statement among others that
1286 manipulate types whose full viww may be an access type.
1287
6b4f0b7d 12882019-07-01 Pat Rogers <rogers@adacore.com>
1289
1290 * doc/gnat_rm/representation_clauses_and_pragmas.rst: Correct
1291 size indicated for R as a component of an array.
1292 * gnat_rm.texi: Regenerate.
1293
cdee70d7 12942019-07-01 Justin Squirek <squirek@adacore.com>
1295
1296 * libgnat/s-win32.ads: Add definition for ULONG, modify
1297 OVERLAPPED type, and add appropriate pragmas.
1298
2cf822b7 12992019-07-01 Bob Duff <duff@adacore.com>
1300
1301 * gnat1drv.adb (gnat1drv): Call Write_ALI if the main unit is
1302 ignored-ghost.
1303
0a1ece97 13042019-07-01 Yannick Moy <moy@adacore.com>
1305
1306 * sem_ch4.adb (Operator_Check): Refine error message.
1307
ee4279ef 13082019-07-01 Piotr Trojanek <trojanek@adacore.com>
1309
1310 * libgnat/a-calend.ads: Revert "Global => null" contracts on
1311 non-pure routines.
1312
2c6b4ada 13132019-07-01 Piotr Trojanek <trojanek@adacore.com>
1314
1315 * exp_attr.adb, libgnat/g-graphs.ads: Fix typos in comments:
1316 componant -> component.
1317
175c4526 13182019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
1319
1320 * libgnat/g-graphs.adb: Use type Directed_Graph rather than
1321 Instance in various routines.
1322 * libgnat/g-graphs.ads: Change type Instance to Directed_Graph.
1323 Update various routines that mention the type.
1324
a0d15509 13252019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
1326
1327 * libgnat/g-sets.adb: Use type Membership_Set rathern than
1328 Instance in various routines.
1329 * libgnat/g-sets.ads: Change type Instance to Membership_Set.
1330 Update various routines that mention the type.
1331
205a23a3 13322019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
1333
1334 * libgnat/g-lists.adb: Use type Doubly_Linked_List rather than
1335 Instance in various routines.
1336 * libgnat/g-lists.ads: Change type Instance to
1337 Doubly_Linked_List. Update various routines that mention the
1338 type.
1339
17fdf8c2 13402019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
1341
1342 * libgnat/g-dynhta.adb: Use type Dynamic_Hash_Table rather than
1343 Instance in various routines.
1344 * libgnat/g-dynhta.ads: Change type Instance to
1345 Dynamic_Hash_Table. Update various routines that mention the
1346 type.
1347
216ffc64 13482019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
1349
1350 * exp_attr.adb, exp_ch7.adb, exp_unst.adb, sem_ch3.adb,
1351 sem_util.adb, uintp.adb, uintp.ads: Minor reformatting.
1352
5051fe35 13532019-07-01 Javier Miranda <miranda@adacore.com>
1354
1355 * exp_attr.adb (Expand_Min_Max_Attribute): Disable expansion of
1356 'Min/'Max on integer, enumeration, fixed point and floating
1357 point types since the CCG backend now provides in file
1358 standard.h routines to support it.
1359
830a2a71 13602019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
1361
1362 * impunit.adb: Add GNAT.Graphs to list Non_Imp_File_Names_95.
1363 * Makefile.rtl, gcc-interface/Make-lang.in: Register unit
1364 GNAT.Graphs.
1365 * libgnat/g-dynhta.adb: Various minor cleanups (use Present
1366 rather than direct comparisons).
1367 (Delete): Reimplement to use Delete_Node.
1368 (Delete_Node): New routine.
1369 (Destroy_Bucket): Invoke the provided destructor.
1370 (Present): New routines.
1371 * libgnat/g-dynhta.ads: Add new generic formal Destroy_Value.
1372 Use better names for the components of iterators.
1373 * libgnat/g-graphs.adb, libgnat/g-graphs.ads: New unit.
1374 * libgnat/g-lists.adb: Various minor cleanups (use Present
1375 rather than direct comparisons).
1376 (Delete_Node): Invoke the provided destructor.
1377 (Present): New routine.
1378 * libgnat/g-lists.ads: Add new generic formal Destroy_Element.
1379 Use better names for the components of iterators.
1380 (Present): New routine.
1381 * libgnat/g-sets.adb, libgnat/g-sets.ads (Destroy, Preset,
1382 Reset): New routines.
1383
b0111d94 13842019-07-01 Dmitriy Anisimkov <anisimko@adacore.com>
1385
1386 * libgnat/g-sothco.adb (Get_Address): Fix the case when AF_INET6
1387 is not defined.
1388
7362896b 13892019-07-01 Ed Schonberg <schonberg@adacore.com>
1390
1391 * exp_attr.adb (Expand_Attribute_Reference, case Invalid_Value):
1392 Resolve result of call to Get_Simple_Init_Val, which may be a
1393 conversion of a literal.
1394
0dae8dc2 13952019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
1396
1397 * freeze.adb (Freeze_Expression): Remove the horrible useless
1398 name hiding of N. Insert the freeze nodes generated by the
1399 expression prior to the expression when the nearest enclosing
1400 scope is transient.
1401
487da8ff 14022019-07-01 Pierre-Marie de Rodat <derodat@adacore.com>
1403
1404 * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Fix
1405 formatting issues in the -gnatR section.
1406 * gnat_ugn.texi: Regenerate.
1407
1d79fa18 14082019-06-30 Iain Sandoe <iain@sandoe.co.uk>
1409
1410 * gnatlink.adb (Link_Step): Remove duplicate -static-libgcc switches.
1411 Push -shared-libgcc explicitly, when it is the target default (unless
1412 overidden by the static flag).
1413 When the user has put an instance of shared/static-libgcc do not push
1414 a duplicate of this.
1415
a850edcd 14162019-06-29 Eric Botcazou <ebotcazou@adacore.com>
1417
1418 * gcc-interface/decl.c (gnat_to_gnu_entity): Beep up comment on SAVED,
1419 and tweak comment on the assertion about the scopes of Itypes. Do not
1420 skip the regular processing for Itypes that are E_Record_Subtype with
1421 a Cloned_Subtype. Get the Cloned_Subtype for every E_Record_Subtype
1422 if the type is dummy and hasn't got its own freeze node.
1423 <E_Record_Subtype>: Save again the DECL of the Cloned_Subtype, if any.
1424 <E_Access_Subtype>: Save again the DECL of the equivalent type.
1425 (Gigi_Equivalent_Type) <E_Access_Subtype>: New case.
1426
b1e46fb1 14272019-06-29 Eric Botcazou <ebotcazou@adacore.com>
1428
1429 * gcc-interface/utils.c (unchecked_convert): Tweak comment. Only skip
1430 dereferences when padding to have the same size on both sides. Do it
1431 for destination types with self-referential size too.
1432
07e38949 14332019-06-29 Eric Botcazou <ebotcazou@adacore.com>
1434
1435 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: If the
1436 type requires strict alignment, then set the RM size to the type size.
1437 Rework handling of alignment and sizes of tagged types in ASIS mode.
1438 (validate_size): Rename local variable and remove special handling for
1439 strict-alignment types.
1440 * gcc-interface/utils.c (finish_record_type): Constify local variables
1441 and use properly typed constants.
1442
f4409741 14432019-06-29 Eric Botcazou <ebotcazou@adacore.com>
1444
1445 * gcc-interface/decl.c (gnat_to_gnu_field): Rework error messages for
1446 fields requiring strict alignment, add explicit test on Storage_Unit
1447 for position and size, and mention type alignment for position.
1448
5882c515 14492019-06-29 Eric Botcazou <ebotcazou@adacore.com>
1450
1451 * gcc-interface/trans.c (mark_visited_r): Set TYPE_SIZES_GIMPLIFIED on
1452 the main variant of a type, if any.
1453
d0de0a27 14542019-06-29 Eric Botcazou <ebotcazou@adacore.com>
1455
1456 * gcc-interface/decl.c (set_nonaliased_component_on_array_type): Add
1457 missing guard for the presence of TYPE_CANONICAL.
1458 (set_reverse_storage_order_on_array_type): Likewise.
1459
2074c859 14602019-06-29 Eric Botcazou <ebotcazou@adacore.com>
1461
1462 * gcc-interface/gigi.h (make_packable_type): Remove default value.
1463 (value_factor_p): Tweak prototype.
1464 * gcc-interface/decl.c (gnat_to_gnu_entity): Add comment.
1465 (gnat_to_gnu_component_type): Likewise.
1466 (gnat_to_gnu_field): Likewise. Fetch the position of the field earlier
1467 and simplify the condition under which the type is packed. Declare
1468 local variable is_bitfield. Pass 1 as max_align to make_packable_type
1469 if it is set to true.
1470 (copy_and_substitute_in_layout): Pass 0 to make_packable_type.
1471 * gcc-interface/utils.c (make_packable_array_type): New function.
1472 (make_packable_type): Use it to rewrite the type of array field.
1473 (maybe_pad_type): Pass align parameter to make_packable_type.
1474 (create_field_decl): Minor tweaks.
1475 (value_factor_p): Assert that FACTOR is a power of 2 and replace the
1476 modulo computation by a masking operation.
1477
83c6da22 14782019-06-25 Eric Botcazou <ebotcazou@adacore.com>
1479
1480 * gcc-interface/decl.c (gnat_to_gnu_entity): Remove superfluous test
1481 in previous change.
1482 * gcc-interface/gigi.h (maybe_character_type): Fix formatting.
1483 (maybe_character_value): Likewise.
1484
aaabc7bc 14852019-06-24 Jan Hubicka <jh@suse.cz>
1486
1487 * gcc-interface/decl.c (gnat_to_gnu_entity): Check that
1488 type is array or integer prior checking string flag.
83c6da22 1489 * gcc-interface/gigi.h (maybe_character_type): Likewise.
1490 (maybe_character_value): Likewise.
aaabc7bc 1491
5fe09a56 14922019-06-24 Martin Sebor <msebor@redhat.com>
1493
1494 * gcc-interface/utils.c (handle_nonnull_attribute): Quote attribute
1495 name.
1496
bd9331d6 14972019-06-18 Arnaud Charlet <charlet@adacore.com>
1498
83c6da22 1499 PR ada/80590
bd9331d6 1500 * sem_ch5.adb (Analyze_Loop_Statement): Avoid exception propagation
1501 during normal processing.
1502
8a5a7d1c 15032019-06-17 Arnaud Charlet <charlet@adacore.com>
1504
83c6da22 1505 PR ada/80590
8a5a7d1c 1506 * exp_ch9.adb (Expand_N_Delay_Relative_Statement): Swap the two
1507 conditions to avoid a unnecessary exception propagation in the default
1508 case.
1509
580934f6 15102019-05-28 Eric Botcazou <ebotcazou@adacore.com>
1511
1512 * gcc-interface/utils.c (handle_stack_protect_attribute): Move around.
1513
c8956236 15142019-05-28 Eric Botcazou <ebotcazou@adacore.com>
1515
1516 * doc/gnat_rm/implementation_defined_pragmas.rst (Machine_Attribute):
1517 Document additional optional parameters.
1518 * sem_prag.adb (Analyze_Pragma) <Pragma_Machine_Attribute>: Accept
1519 more than one optional parameter.
1520 * gcc-interface/decl.c (prepend_one_attribute_pragma): Alphabetize
1521 the list of supported pragmas. Simplify the handling of parameters
1522 and add support for more than one optional parameter.
1523 * gcc-interface/utils.c (attr_cold_hot_exclusions): New constant.
1524 (gnat_internal_attribute_table): Add entry for no_icf, noipa, flatten,
1525 used, cold, hot, target and target_clones.
1526 (begin_subprog_body): Do not create the RTL for the subprogram here.
1527 (handle_noicf_attribute): New static function.
1528 (handle_noipa_attribute): Likewise.
1529 (handle_flatten_attribute): Likewise.
1530 (handle_used_attribute): Likewise.
1531 (handle_cold_attribute): Likewise.
1532 (handle_hot_attribute): Likewise.
1533 (handle_target_attribute): Likewise.
1534 (handle_target_clones_attribute): Likewise.
1535
62b762c2 15362019-05-28 Eric Botcazou <ebotcazou@adacore.com>
1537
1538 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Return 0
1539 for 'Size too.
1540 (Identifier_to_gnu): Use the actual subtype for a reference to a
1541 packed array in a return statement.
1542 (Attribute_to_gnu) <Attr_Size>: Do not strip VIEW_CONVERT_EXPRs from
1543 the prefix in every case.
1544
336a61a3 15452019-05-28 Eric Botcazou <ebotcazou@adacore.com>
1546
1547 * gcc-interface/trans.c (gnat_to_gnu): Remove superfluous tests on
1548 Backend_Overflow_Checks_On_Target and rework comments.
1549
983c5b5e 15502019-05-28 Eric Botcazou <ebotcazou@adacore.com>
1551
1552 * gcc-interface/trans.c (walk_nesting_tree): New static function.
1553 (finalize_nrv): Use it to walk the entire nesting tree.
1554
96b4b84e 15552019-05-28 Eric Botcazou <ebotcazou@adacore.com>
1556
1557 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Remove
1558 obsolete test on Is_For_Access_Subtype.
1559
0b74284e 15602019-05-28 Eric Botcazou <ebotcazou@adacore.com>
1561
1562 * gcc-interface/decl.c (components_to_record): Set a name on the type
1563 created for the REP part, if any.
1564 * gcc-interface/utils.c (finish_record_type): Only take the maximum
1565 when merging sizes for a variant part at offset 0.
1566 (merge_sizes): Rename has_rep parameter into max.
1567
689dab9d 15682019-05-28 Eric Botcazou <ebotcazou@adacore.com>
1569
1570 * gcc-interface/utils.c (gnat_internal_attribute_table): Add support
1571 for stack_protect attribute.
1572 (handle_stack_protect_attribute): New static function.
1573
804f7d39 15742019-05-28 Eric Botcazou <ebotcazou@adacore.com>
1575
1576 * gcc-interface/decl.c (intrin_arglists_compatible_p): Do not return
1577 false if the internal builtin uses a variable list.
1578
f07f94cc 15792019-05-27 Eric Botcazou <ebotcazou@adacore.com>
1580
1581 * gcc-interface/trans.c (Call_to_gnu): Do not initialize the temporary
1582 created out of addressability concerns if it's for the _Init parameter
1583 of an initialization procedure.
1584
abfd658b 15852019-05-27 Eric Botcazou <ebotcazou@adacore.com>
1586
1587 * gcc-interface/ada-builtin-types.def: New file.
1588 * gcc-interface/ada-builtins.def: Likewise.
1589 * gcc-interface/ada-tree.h (BUILT_IN_LIKELY): New macro.
1590 (BUILT_IN_UNLIKELY): Likewise.
1591 * gcc-interface/trans.c (independent_iterations_p): Initialize the
1592 auto-vector to 16 elements.
1593 (Call_to_gnu): Remove local variable and change the vector of actual
1594 parameters to an auto-vector. Do not convert actual parameters to
1595 the argument type for front-end built-in functions. Add support for
1596 front-end built-in functions.
1597 (build_noreturn_cond): Use internal instead of built-in function.
1598 * gcc-interface/utils.c (c_builtin_type): Include ada-builtin-types.def
1599 (install_builtin_function_types): Likewise.
1600 (install_builtin_functions): Include ada-builtins.def first.
1601
caab73a2 16022019-05-27 Eric Botcazou <ebotcazou@adacore.com>
1603
1604 * gcc-interface/utils.c (maybe_pad_type): Issue the warning for the
1605 specific case of component types preferably.
1606
f1ca2388 16072019-05-27 Eric Botcazou <ebotcazou@adacore.com>
1608
1609 * gcc-interface/trans.c (Identifier_to_gnu): Minor tweaks.
1610 (gnat_to_gnu): Do not convert the result if it is a reference to an
1611 unconstrained array used as the prefix of an attribute reference that
1612 requires an lvalue.
1613
e3f3573c 16142019-05-27 Eric Botcazou <ebotcazou@adacore.com>
1615
1616 * gcc-interface/trans.c (Gigi_Types_Compatible): New predicate.
1617 (Identifier_to_gnu): Use it to assert that the type of the identifier
1618 and that of its entity are compatible for gigi. Rename a couple of
1619 local variables and separate the processing of the result type.
1620
2306cd17 16212019-05-27 Eric Botcazou <ebotcazou@adacore.com>
1622
1623 * gcc-interface/trans.c (Call_to_gnu): Use the unpadded type when
1624 putting back an intermediate conversion the type of the actuals.
1625
6e4e9378 16262019-05-27 Eric Botcazou <ebotcazou@adacore.com>
1627
1628 * gcc-interface/trans.c (gnat_to_gnu) <Shift operations>: Convert the
1629 count to the unsigned version of its base type before proceeding.
1630
85b9be9b 16312019-05-16 Martin Sebor <msebor@redhat.com>
1632
3d6be0d5 1633 * gcc-interface/trans.c (check_inlining_for_nested_subprog): Quote
1634 reserved names.
85b9be9b 1635
65d973ca 16362019-05-08 Arnaud Charlet <charlet@adacore.com>
1637
1638 * standard.ads.h: New file.
1639
ff628b99 16402019-05-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1641
1642 * gcc-interface/Makefile.in (install-gcc-specs): Use foreach.
1643 Honor DESTDIR.
1644
ebd761d4 16452019-04-29 Michael K. Darling <darlingm@gmail.com>
1646
1647 * gnatvsn.ads: Bump Library_Version to 10.
1648
5f260823 16492019-04-24 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1650 Bernd Edlinger <bernd.edlinger@hotmail.de>
1651 Jakub Jelinek <jakub@redhat.com>
1652
1653 PR target/89093
1654 * raise-gcc.c (TARGET_ATTRIBUTE): Define.
1655 (continue_unwind, personality_body, PERSONALITY_FUNCTION): Add
1656 TARGET_ATTRIBUTE.
1657
d7ca95c0 16582019-04-07 Eric Botcazou <ebotcazou@adacore.com>
1659
1660 * libgnat/i-cexten.ads (CFloat_128): New type.
1661
26b21081 16622019-03-22 Dmitriy Anisimkov <anisimko@adacore.com>
1663
1664 PR ada/89583
1665 * libgnat/g-socket.adb (Bind_Socket, Connect_Socket,
1666 Send_Socket): Fix the computation of structure lengths passed to
1667 low level routines.
1668 (Is_IPv6_Address): Fix the number of expected colons.
1669
2f6d557f 16702019-03-11 Martin Liska <mliska@suse.cz>
1671
d325ee67 1672 * gcc-interface/misc.c (gnat_post_options): Wrap option name in string
1673 format message and fix GNU coding style.
2f6d557f 1674
c1ad6672 16752019-02-08 Eric Botcazou <ebotcazou@adacore.com>
1676
1677 * gcc-interface/trans.c (gnat_to_gnu) <N_Aggregate>: Minor tweak.
1678 * gcc-interface/utils.c (convert): Do not pad when doing an unchecked
1679 conversion here. Use TREE_CONSTANT throughout the function.
1680 (unchecked_convert): Also pad if the source is a CONSTRUCTOR and the
1681 destination is a more aligned array type or a larger aggregate type,
1682 but not between original and packable versions of a type.
1683
62a6ebbd 16842019-02-08 Eric Botcazou <ebotcazou@adacore.com>
1685
1686 * gcc-interface/utils.c (max_size) <tcc_unary>: Be prepared for an
1687 operand with VOID_TYPE.
1688
da383d19 16892019-02-08 Eric Botcazou <ebotcazou@adacore.com>
1690
1691 * gcc-interface/trans.c (elaborate_all_entities): Do not elaborate the
1692 entities of a package renaming another one.
1693
09c123a0 16942019-02-08 Eric Botcazou <ebotcazou@adacore.com>
1695
1696 * gcc-interface/trans.c (Regular_Loop_to_gnu): Replace tests on
1697 individual flag_unswitch_loops and flag_tree_loop_vectorize switches
1698 with test on global optimize switch.
1699 (Raise_Error_to_gnu): Likewise.
1700
a9dd7273 17012019-02-07 Eric Botcazou <ebotcazou@adacore.com>
1702
1703 * libgnarl/s-linux__sparc.ads (ETIMEDOUT): Set to correct value.
1704
4836c4f1 17052019-02-06 Arnaud Charlet <charlet@adacore.com>
1706
1707 * libgnarl/s-linux__x32.ads: Resync list of signals with s-linux.ads
1708
6b56937c 17092019-01-27 Eric Botcazou <ebotcazou@adacore.com>
1710
1711 * repinfo.adb (List_Component_Layout): Remove superfluous space for
1712 zero-sized field.
1713 * gcc-interface/ada-tree.h (TYPE_IS_EXTRA_SUBTYPE_P): New macro.
1714 * gcc-interface/gigi.h (create_extra_subtype): Declare.
1715 * gcc-interface/decl.c (TYPE_ARRAY_SIZE_LIMIT): Likewise.
1716 (update_n_elem): New function.
1717 (gnat_to_gnu_entity): Use create_extra_subtype to create extra subtypes
1718 instead of doing it manually.
1719 <E_Array_Type>: Use update_n_elem to compute the maximum size. Use the
1720 index type instead of base type for the bounds. Set TYPE_ARRAY_MAX_SIZE
1721 of the array to the maximum size.
1722 <E_Array_Subtype>: Create an extra subtype using the index type of the
1723 base array type for self-referential bounds. Use update_n_elem to
1724 compute the maximum size. Set TYPE_ARRAY_MAX_SIZE of the array to the
1725 maximum size.
1726 (gnat_to_gnu_field): Clear DECL_NONADDRESSABLE_P on discriminants.
1727 * gcc-interface/misc.c (gnat_get_alias_set): Return the alias set of
1728 the base type for an extra subtype.
1729 (gnat_type_max_size): Remove obsolete code.
1730 * gcc-interface/trans.c (Attribute_to_gnu): Minor tweak.
1731 (can_be_lower_p): Deal with pathological types.
1732 * gcc-interface/utils.c (create_extra_subtype): New function.
1733 (create_field_decl): Minor tweak.
1734 (max_size) <tcc_reference>: Compute a better value by using the extra
1735 subtypes on the self-referential bounds.
1736 <tcc_binary>: Rewrite. Deal with "negative value" in unsigned types.
1737 <tcc_expression>: Likewise.
1738 * gcc-interface/utils2.c (compare_arrays): Retrieve the original bounds
1739 of the arrays upfront. Swap only if the second length is not constant.
1740 Use comparisons on the original bounds consistently for the null tests.
1741 (build_binary_op): Use TYPE_IS_EXTRA_SUBTYPE_P macro.
1742 (build_allocator): Minor tweak.
1743
ecb2c722 17442019-01-27 Eric Botcazou <ebotcazou@adacore.com>
1745
1746 * gcc-interface/decl.c (array_type_has_nonaliased_component): Return
1747 the same value for every dimension of a multidimensional array type.
1748
10f25579 17492019-01-26 Eric Botcazou <ebotcazou@adacore.com>
1750
1751 * gcc-interface/trans.c (Regular_Loop_to_gnu): Use the SLOC of the
1752 iteration scheme, if present, throughout the translation.
1753
aced6683 17542019-01-26 Eric Botcazou <ebotcazou@adacore.com>
1755
1756 * gcc-interface/trans.c (gnat_to_gnu) <N_Assignment_Statement>: Use
1757 DECL_SIZE_UNIT instead of TYPE_SIZE_UNIT for the size to be assigned
1758 by a call to memset if the LHS is a DECL.
1759
18b4b30e 17602019-01-26 Eric Botcazou <ebotcazou@adacore.com>
1761
1762 * gcc-interface/trans.c (struct loop_info_d): Remove artificial field.
1763 (Loop_Statement_to_gnu): Do not set it.
1764
6dce35b7 17652019-01-26 Eric Botcazou <ebotcazou@adacore.com>
1766
1767 * gcc-interface/trans.c (Iterate_Acc_Clause_Arg): Fix formatting.
1768 (Acc_gnat_to_gnu): Likewise.
1769 (Acc_Data_to_gnu): Likewise.
1770 (Acc_Var_to_gnu): Likewise.
1771 (Acc_Reduc_to_gnu): Likewise.
1772 (Acc_Size_List_to_gnu): Likewise.
1773 (Pragma_to_gnu) <Pragma_Acc_Loop>: Likewise.
1774 <Pragma_Acc_Data>): Likewise.
1775 (find_loop_for): Remove default value for parameters.
1776 * gcc-interface/trans.c (gnat_to_gnu) <N_Op_And>: Merge into...
1777 <N_Op_Eq>): ...this.
1778
f8cd11ee 17792019-01-26 Eric Botcazou <ebotcazou@adacore.com>
1780
1781 * gcc-interface/decl.c (annotate_value) <INTEGER_CST>: Use test on
1782 the sign bit instead of on the sign of the value.
1783 <PLUS_EXPR>: Turn addition of negative constant into subtraction.
1784 <MULT_EXPR>: Add test for degenerate case.
1785 <BIT_AND_EXPR>: Simplify.
1786
9a3c51d9 17872019-01-18 Sebastian Huber <sebastian.huber@embedded-brains.de>
1788
1789 * s-oscons-tmplt.c (AF_INET6): Do not undefine for RTEMS.
1790
07c11f2b 17912019-01-09 Sandra Loosemore <sandra@codesourcery.com>
1792
1793 PR other/16615
07c11f2b 1794 * exp_ch11.adb: Change "can not" to "cannot".
1795 * sem_ch4.adb: Likewise.
1796
f4d3c071 17972019-01-09 Sandra Loosemore <sandra@codesourcery.com>
1798
1799 PR other/16615
f4d3c071 1800 * exp_ch9.adb: Mechanically replace "can not" with "cannot".
1801 * libgnat/s-regpat.ads: Likewise.
1802 * par-ch4.adb: Likewise.
1803 * set_targ.adb: Likewise.
1804 * types.ads: Likewise.
1805
902071d1 18062019-01-08 Justin Squirek <squirek@adacore.com>
1807
1808 Revert:
902071d1 1809 2018-07-31 Justin Squirek <squirek@adacore.com>
1810
76fb0465 1811 * lib-writ.adb (Write_With_Lines): Modfiy the generation
1812 of dependencies within ali files so that source unit
1813 bodies are properly listed even if said bodies are
1814 missing. Perform legacy behavior in GNATprove mode.
1815 * lib-writ.ads: Modify documentation to reflect current
1816 behavior.
902071d1 1817
1818 and:
902071d1 1819 2018-09-26 Justin Squirek <squirek@adacore.com>
1820
76fb0465 1821 * lib-writ.adb, lib-writ.ads (Write_With_Lines): Add
1822 documentation and an extra conditional check for RCI
1823 units so that generated ali files will list the spec
1824 only instead of a body when a body is not found.
902071d1 1825
65a33d4a 18262019-01-04 Eric Botcazou <ebotcazou@adacore.com>
1827
1828 * gnatvsn.ads: Bump copyright year.
1829
3d8932fd 18302019-01-01 Jakub Jelinek <jakub@redhat.com>
8e8f6434 1831
fbd26352 1832 Update copyright years.
1833
277184bc 1834 * gnat_ugn.texi: Bump @copying's copyright year.
1835 * gnat_rm.texi: Likewise.
7dfbd804 1836\f
3d8932fd 1837Copyright (C) 2019 Free Software Foundation, Inc.
7dfbd804 1838
1839Copying and distribution of this file, with or without modification,
1840are permitted in any medium without royalty provided the copyright
1841notice and this notice are preserved.