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