]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/ada/ChangeLog
[Ada] Defer processing of unknown CTW/E conditions to the back end
[thirdparty/gcc.git] / gcc / ada / ChangeLog
1 2019-08-14 Bob Duff <duff@adacore.com>
2
3 * sem_prag.adb (Process_Compile_Time_Warning_Or_Error): Defer
4 processing to the back end in all cases where the pragma's
5 condition is not known at compile time during the front end
6 (except in generics), as opposed to detecting 'Size attributes
7 and the like. This ensures that we take advantage of whatever
8 can be compile-time known after running the back end, as opposed
9 to having the front end guess what the back end can do. Remove
10 a little duplicated code at the call site.
11 * gnat1drv.adb (Post_Compilation_Validation_Checks): Unlock the
12 Elists while in Validate_Compile_Time_Warning_Errors, because it
13 does analysis and name resolution, which sometimes involves
14 adding Elists.
15
16 2019-08-14 Eric Botcazou <ebotcazou@adacore.com>
17
18 * einfo.ads (Is_Called): Document new usage on E_Package
19 entities.
20 * einfo.adb (Is_Called): Accept E_Package entities.
21 (Set_Is_Called): Likewise.
22 * exp_ch6.adb (Expand_Call_Helper): Move code dealing with
23 instances for back-end inlining to Add_Inlined_Body.
24 * inline.ads: Remove with clauses for Alloc and Table.
25 (Pending_Instantiations): Move to...
26 * inline.adb: Add with clauses for Alloc, Uintp, Table and
27 GNAT.HTable.
28 (Backend_Instances): New variable.
29 (Pending_Instantiations): ...here.
30 (Called_Pending_Instantiations): New table.
31 (Node_Table_Size): New constant.
32 (Node_Header_Num): New subtype.
33 (Node_Hash): New function.
34 (To_Pending_Instantiations): New hash table.
35 (Add_Inlined_Body): Bail out early for subprograms in the main
36 unit or subunit. Likewise if the Is_Called flag is set. If the
37 subprogram is an instance, invoke Add_Inlined_Instance. Call
38 Set_Is_Called earlier. If the subrogram is within an instance,
39 invoke Add_Inlined_Instance. Also deal with the case where the
40 call itself is within an instance.
41 (Add_Inlined_Instance): New procedure.
42 (Add_Inlined_Subprogram): Remove conditions always fulfilled.
43 (Add_Pending_Instantiation): Move the defence against ludicruous
44 number of instantiations to here. When back-end inlining is
45 enabled, associate an instantiation with its index in table and
46 mark a few selected kinds of instantiations as always needed.
47 (Initialize): Set Backend_Instances to No_Elist.
48 (Instantiate_Body): New procedure doing the work extracted
49 from...
50 (Instantiate_Bodies): ...here. When back-end inlining is
51 enabled, loop over Called_Pending_Instantiations instead of
52 Pending_Instantiations.
53 (Is_Nested): Minor tweak.
54 (List_Inlining_Info): Also list the contents of
55 Backend_Instances.
56 * sem_ch12.adb (Might_Inline_Subp): Return early if Is_Inlined
57 is set and otherwise set it before returning true.
58 (Analyze_Package_Instantiation): Remove the defence against
59 ludicruous number of instantiations. Invoke
60 Remove_Dead_Instance instead of doing the removal manually if
61 there is a guaranteed ABE.
62
63 2019-08-14 Gary Dismukes <dismukes@adacore.com>
64
65 * exp_ch3.adb (Predef_Spec_Or_Body): For an equality operation
66 of an interface type, create an expression function (that
67 returns False) rather than declaring an abstract function.
68 * freeze.adb (Check_Inherited_Conditions): Set Needs_Wrapper to
69 False unconditionally at the start of the loop creating wrappers
70 for inherited operations.
71
72 2019-08-14 Bob Duff <duff@adacore.com>
73
74 * table.adb: Assert that the table is not locked when increasing
75 Last, even if it doesn't cause reallocation. In other words,
76 assert that on operations that MIGHT cause reallocation.
77 * table.ads: Fix comment accordingly.
78
79 2019-08-14 Arnaud Charlet <charlet@adacore.com>
80
81 * doc/gnat_ugn/gnat_and_program_execution.rst: Remove
82 documentation of gnatelim.
83
84 2019-08-14 Bob Duff <duff@adacore.com>
85
86 * sem_prag.adb (Validate_Compile_Time_Warning_Error): Attach the
87 warning to the Sloc of the first pragma argument, rather than to
88 the pragma itself. This is to make pragmas processed after the
89 back end use the same Sloc as pragmas processed earlier, in the
90 front end. There's no reason for this discrepancy, and it
91 hinders further work on this ticket.
92
93 2019-08-14 Bob Duff <duff@adacore.com>
94
95 * sem.ads (Inside_A_Generic): Remove the ??? comment.
96
97 2019-08-14 Eric Botcazou <ebotcazou@adacore.com>
98
99 * inline.ads (Pending_Descriptor): Delete.
100 * inline.adb (Initialize): Do not initialize it.
101 * sem_ch12.adb (Delay_Descriptors): Delete.
102 (Analyze_Package_Instantiation): Call
103 Set_Delay_Subprogram_Descriptors instead of Delay_Descriptors
104 throughout.
105
106 2019-08-14 Bob Duff <duff@adacore.com>
107
108 * exp_aggr.adb (Init_Hidden_Discriminants): Avoid processing the
109 wrong discriminant, which could be of the wrong type.
110
111 2019-08-14 Eric Botcazou <ebotcazou@adacore.com>
112
113 * sem_ch12.adb (Analyze_Instance_And_Renamings): Do not reset
114 the Is_Generic_Instance flag previously set on the package
115 generated for the instantiation of a generic subprogram.
116
117 2019-08-14 Ed Schonberg <schonberg@adacore.com>
118
119 * exp_ch4.adb (Expand_N_Quantified_Expression): Freeze
120 explicitly the type of the loop parameter.
121
122 2019-08-14 Javier Miranda <miranda@adacore.com>
123
124 * sem_util.adb (New_Copy_Tree.Copy_Node_With_Replacement):
125 Update the Chars attribute of identifiers.
126
127 2019-08-14 Yannick Moy <moy@adacore.com>
128
129 * sem_spark.adb, sem_spark.ads (Is_Legal): New function exposed
130 for use in GNATprove, to test legality rules not related to
131 permissions.
132 (Check_Declaration_Legality): Extract the part of
133 Check_Declaration that checks rules not related to permissions.
134 (Check_Declaration): Call the new Check_Declaration_Legality.
135 (Check_Type_Legality): Rename of Check_Type. Introduce
136 parameters to force or not checking, and update a flag detecting
137 illegalities.
138 (Check_Node): Ignore attribute references in statement position.
139
140 2019-08-14 Yannick Moy <moy@adacore.com>
141
142 * sem_spark.adb (Check_Old_Loop_Entry): New procedure to check
143 correct use of Old and Loop_Entry.
144 (Check_Node): Check subprogram contracts.
145 (Check_Pragma): Check Loop_Variant.
146 (Check_Safe_Pointers): Apply checking to library-level
147 subprogram declarations as well, in order to check their
148 contract.
149
150 2019-08-14 Yannick Moy <moy@adacore.com>
151
152 * sem_spark.adb (Is_Subpath_Expression): Take into account
153 conversion and qualification.
154
155 2019-08-14 Eric Botcazou <ebotcazou@adacore.com>
156
157 * sem_ch7.adb (Install_Private_Declarations)
158 <Swap_Private_Dependents>: Do not rely solely on the
159 Is_Child_Unit flag on the unit to recurse.
160 (Uninstall_Declarations) <Swap_Private_Dependents>: New
161 function. Use it to recurse on the private dependent entities
162 for child units.
163
164 2019-08-14 Javier Miranda <miranda@adacore.com>
165
166 * exp_aggr.adb (Is_CCG_Supported_Aggregate): Return False for
167 arrays with bounds not known at compile time.
168
169 2019-08-14 Ed Schonberg <schonberg@adacore.com>
170
171 * sem_util.adb (New_Copy_Tree, Visit_Entity): A quantified
172 expression includes the implicit declaration of the loop
173 parameter. When a quantified expression is copied during
174 expansion, for example when building the precondition code from
175 the generated pragma, a new loop parameter must be created for
176 the new tree, to prevent duplicate declarations for the same
177 symbol.
178
179 2019-08-14 Yannick Moy <moy@adacore.com>
180
181 * sem_disp.adb (Check_Dispatching_Operation): Update assertion
182 for the separate declarations created in GNATprove mode.
183 * sem_disp.ads (Is_Overriding_Subprogram): Update comment.
184 * sem_elab.adb (SPARK_Processor): Fix test for checking of
185 overriding primitives.
186
187 2019-08-14 Eric Botcazou <ebotcazou@adacore.com>
188
189 * inline.adb (Add_Inlined_Body): Tweak comments.
190 (List_Inlining_Info): Also list information about non-main
191 units.
192
193 2019-08-14 Gary Dismukes <dismukes@adacore.com>
194
195 * sem_ch4.adb (Analyze_Selected_Component): In the case where
196 the prefix is of a concurrent type, and the selected entity
197 matching the selector is the first private declaration of the
198 type (such as the first local variable in a task's body), set
199 Is_Private_Op.
200
201 2019-08-14 Piotr Trojanek <trojanek@adacore.com>
202
203 * einfo.adb (Is_Generic_Actual_Subprogram): Replace repeated
204 calls to Ekind with Ekind_In.
205
206 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
207
208 PR middle-end/91421
209 * gcc-interface/trans.c (gigi): Call set_decl_buillt_in_function.
210 (Call_to_gnu): Use DECL_FE_FUNCTION_CODE instead of DECL_FUNCTION_CODE.
211
212 2019-08-13 Eric Botcazou <ebotcazou@adacore.com>
213
214 * ali.ads (Linker_Option_Record): Remove Original_Pos component.
215 * ali.adb (Scan_ALI): Do not set it.
216
217 2019-08-13 Eric Botcazou <ebotcazou@adacore.com>
218
219 * sem_ch3.adb (Build_Derived_Concurrent_Type): Add a couple of
220 local variables and use them. When the derived type fully
221 constrains the parent type, rewrite it as a subtype of an
222 implicit (unconstrained) derived type instead of the other way
223 around.
224 (Copy_And_Build): Deal with concurrent types and use predicates.
225 (Build_Derived_Private_Type): Build the full derivation if
226 needed for concurrent types too.
227 (Build_Derived_Record_Type): Add marker comment.
228 (Complete_Private_Subtype): Use predicates.
229
230 2019-08-13 Ed Schonberg <schonberg@adacore.com>
231
232 * sem_ch3.adb (Check_Generic_Ancestor): New subprogram,
233 aubsidiary to Build_Derived_Record_Type. to enforce the rule
234 that a type extension declared in a generic body cznnot have an
235 ancestor that is a generic formal (RM 3.9.1 (4/2)). The rule
236 applies to all ancestors of the type, including interface
237 progenitors.
238
239 2019-08-13 Eric Botcazou <ebotcazou@adacore.com>
240
241 * sem_ch3.adb (Build_Underlying_Full_View): Delete.
242 (Complete_Private_Subtype): Do not set the full view on the
243 private subtype here. If the full base is itself derived from
244 private, do not re-derive the parent type but instead constrain
245 an existing underlying full view.
246 (Prepare_Private_Subtype_Completion): Do not get to the
247 underlying full view, if any. Set the full view on the private
248 subtype here.
249 (Process_Full_View): Likewise.
250 * sem_ch12.adb (Check_Generic_Actuals): Also set
251 Is_Generic_Actual_Type on the full view if the type of the
252 actual is private.
253 (Restore_Private_Views): Also reset Is_Generic_Actual_Type on
254 the full view if the type of the actual is private.
255 * sem_eval.adb (Subtypes_Statically_Match): Remove bypass for
256 generic actual types.
257
258 2019-08-13 Javier Miranda <miranda@adacore.com>
259
260 * sem_res.adb (Resolve_Selected_Component): When the type of the
261 component is an access to a class-wide type and the type of the
262 context is an access to a tagged type the relevant type is that
263 of the component (since in such case we may need to generate
264 implicit type conversions or dispatching calls).
265
266 2019-08-13 Ed Schonberg <schonberg@adacore.com>
267
268 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Preanalyze
269 expression, rather do a full analysis, to prevent unwanted
270 removal of side effects which mask the intent of the expression.
271
272 2019-08-13 Eric Botcazou <ebotcazou@adacore.com>
273
274 * impunit.adb (Non_Imp_File_Names_95): Add
275 GNAT.Branch_Prediction.
276
277 2019-08-13 Eric Botcazou <ebotcazou@adacore.com>
278
279 * exp_ch6.adb: Remove with and use clauses for Sem_Ch12.
280 (Expand_Call_Helper): Swap the back-end inlining case and the
281 special front-end expansion case. In back-end inlining mode, do
282 not invoke Add_Inlined_Body unless the call may be inlined.
283 * inline.ads (Add_Pending_Instantiation): New function moved
284 from...
285 * inline.adb (Add_Inlined_Body): Simplify comment. Turn test on
286 the enclosing unit into assertion.
287 (Add_Pending_Instantiation): New function moved from...
288 * sem_ch12.ads (Add_Pending_Instantiation): ...here.
289 * sem_ch12.adb (Add_Pending_Instantiation): ...here.
290
291 2019-08-13 Eric Botcazou <ebotcazou@adacore.com>
292
293 * sem.adb (Do_Analyze): Recompute Style_Check_Max_Line_Length
294 after restoring Style_Max_Line_Length.
295
296 2019-08-13 Arnaud Charlet <charlet@adacore.com>
297
298 * sem_ch13.adb (Check_Iterator_Functions): Protect against
299 cascaded errors.
300
301 2019-08-13 Ed Schonberg <schonberg@adacore.com>
302
303 * sem_ch8.adb (Analyze_Subprogram_Renaming): Do no suppress mode
304 conformance checks on child unit instance that is a compilation
305 unit.
306
307 2019-08-13 Gary Dismukes <dismukes@adacore.com>
308
309 * exp_dbug.adb (Fully_Qualify_Name): Add full name qualification
310 for the E_Exception case.
311
312 2019-08-13 Gary Dismukes <dismukes@adacore.com>
313
314 * exp_aggr.adb (Aggr_Size_OK): Compute the aggregate size using
315 universal arithmetic, to avoid situations where the size
316 computation overflows.
317
318 2019-08-13 Justin Squirek <squirek@adacore.com>
319
320 * repinfo.adb (List_Scalar_Storage_Order): Modify conditionals
321 for displaying ordering to always be triggered when -gnatR4 is
322 in effect.
323
324 2019-08-13 Justin Squirek <squirek@adacore.com>
325
326 * aspects.adb, aspects.ads: Register new aspect.
327 * par-prag.adb (Prag): Register new pragma
328 * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing
329 for new aspect similar to Aspect_Max_Entry_Queue_Length.
330 * sem_prag.adb, sem_prag.ads (Analyze_Pragma): Register new
331 pragma and set it to use the same processing as
332 Pragma_Max_Queue_Length.
333 * snames.ads-tmpl: Move definition of
334 Name_Max_Entry_Queue_Length so that it can be processed as a
335 pragma in addition to a restriction and add an entry for the
336 pragma itself.
337
338 2019-08-13 Yannick Moy <moy@adacore.com>
339
340 * sem_ch4.adb (Analyze_Allocator): Do not insert subtype
341 declaration for allocator inside a spec expression.
342
343 2019-08-13 Yannick Moy <moy@adacore.com>
344
345 * sem_res.adb (Resolve_Call): Do not inline calls inside record
346 types.
347
348 2019-08-13 Eric Botcazou <ebotcazou@adacore.com>
349
350 * sem_ch4.adb (Analyze_One_Call): Remove bypass for type
351 mismatch in nested instantiations.
352 * sem_ch8.adb (Find_Nearer_Entity): New function.
353 (Find_Renamed_Entity): Use it to disambiguate the candidates for
354 the renaming generated for an instantiation when it is
355 ambiguous.
356
357 2019-08-13 Eric Botcazou <ebotcazou@adacore.com>
358
359 * gnat1drv.adb (Adjust_Global_Switches): Do not set
360 Back_End_Inlining in ASIS mode either.
361
362 2019-08-13 Olivier Hainque <hainque@adacore.com>
363
364 * libgnat/s-win32.ads: Define size_t and fix the MapViewOfFile
365 binding to use it instead of DWORD for the dwNumberOfBytesToMap
366 argument.
367 * libgnat/g-sercom__mingw.adb (Read): State which definition of
368 size_t to fetch in call to Last_Index.
369
370 2019-08-13 Arnaud Charlet <charlet@adacore.com>
371
372 * gcc-interface/Make-lang.in: Remove unused TRACE variable. Pass
373 LN_S to relevant gnatlib targets.
374 * gcc-interface/Makefile.in: Systematically pass LN_S to
375 relevant gnatlib targets.
376
377 2019-08-13 Yannick Moy <moy@adacore.com>
378
379 * sem_dim.adb (Analyze_Dimension,
380 Analyze_Dimension_Array_Aggregate, Analyze_Dimension_Call,
381 Analyze_Dimension_Extension_Or_Record_Aggregate): Return
382 immediately when inside an inlined body.
383 * sem_res.adb (Resolve_Call): Remove special checking now done
384 inside Analyze_Dimension_Call.
385
386 2019-08-13 Justin Squirek <squirek@adacore.com>
387
388 * exp_ch4.adb (Expand_N_Allocator): Add condition to detect
389 library-level object declarations
390
391 2019-08-13 Eric Botcazou <ebotcazou@adacore.com>
392
393 * doc/gnat_ugn/building_executable_programs_with_gnat.rst
394 (-gnateT): Document Double_Float_Alignment parameter and fix
395 description of Double_Scalar_Alignment parameter.
396 * gnat_ugn.texi: Regenerate.
397
398 2019-08-13 Eric Botcazou <ebotcazou@adacore.com>
399
400 * exp_ch6.adb (Expand_Call_Helper): If back-end inlining is
401 enabled, also instantiate the body of a generic unit containing
402 a subprogram subject to aspect/pragma Inline_Always at
403 optimization level zero.
404 * sem_ch12.adb (Might_Inline_Subp): Minor tweak.
405 (Analyze_Package_Instantiation): Do not instantiate the package
406 body because of inlining considerations if the instantiation is
407 done in a generic unit. Move around similar condition involving
408 the main unit. Add test on Back_End_Inlining to processing for
409 front-end inlining.
410
411 2019-08-13 Javier Miranda <miranda@adacore.com>
412
413 * exp_disp.adb (Make_Secondary_DT): Handle record type
414 derivations that have interface components located at fixed
415 positions and interface components located at variable offset.
416 The offset of components located at fixed positions is computed
417 using the dummy object (similar to the case where all the
418 interface components are located at fixed positions).
419 (Make_DT): Build the dummy object for all tagged types that
420 implement interface types (that is, build it also for types with
421 variable size components), and use the dummy object to compute
422 the offset of all tag components located at fixed positions when
423 initializing the Interface_Table object.
424
425 2019-08-13 Justin Squirek <squirek@adacore.com>
426
427 * gnatcmd.adb (GNATCmd): Add constant for new compiler switch
428 --help-ada, and include usage subprogram. Add line to usage help
429 explaining the new flag.
430 (GNATCmd_Usage): Rename from locally declared Usage so as not to
431 confuse with the newly imported version. Add new argument case
432 for --help-ada and add bug report email to implicit display of
433 help without the --help flag so as to unify output between the
434 two cases.
435
436 2019-08-13 Dmitriy Anisimkov <anisimko@adacore.com>
437
438 * libgnat/g-comlin.adb (Getopt): Quote unrecognized switch in
439 Invalid_Switch exception message.
440
441 2019-08-13 Yannick Moy <moy@adacore.com>
442
443 * sem_util.adb (Traverse_More_Func): Take into account
444 Loop_Actions inside N_Iterated_Component_Association nodes.
445 * sinfo.ads: Document correctly Loop_Actions as a field of nodes
446 of kind N_Iterated_Component_Association.
447
448 2019-08-13 Claire Dross <dross@adacore.com>
449
450 * libgnat/a-cfinve.adb, libgnat/a-cofove.adb (Find_Index,
451 Reverse_Find_Index): Use bigger type to avoid range check
452 failure at the last loop iteration.
453
454 2019-08-12 Dmitriy Anisimkov <anisimko@adacore.com>
455
456 * libgnat/g-socket.adb (Is_IPv6_Address): Check that no less
457 then 2 colons in IPv6 numeric address.
458
459 2019-08-12 Dmitriy Anisimkov <anisimko@adacore.com>
460
461 * libgnat/g-comlin.ads, libgnat/g-comlin.adb (Getopt): Add
462 parameter Quiet. Need to do not output error messages to
463 console. Invalid_Switch exception generation surrounded by an
464 error message.
465
466 2019-08-12 Ed Schonberg <schonberg@adacore.com>
467
468 * exp_ch6.adb (Expand_Actuals. Add_Call_By_Copy_Code): Add code
469 to generate proper checks when an actual for an in-out or out
470 parameter has a non-null access type. No constraints are
471 applied to an inbound access parameter, but on exit a not-null
472 check must be performed if the type of the actual requires it.
473
474 2019-08-12 Ed Schonberg <schonberg@adacore.com>
475
476 * sem_util.adb (Is_Expaned_Priority_Attribute): Check whether
477 call comes from a rewritten attribute before comparing name with
478 Get_Ceiling run-time subprogram.
479
480 2019-08-12 Eric Botcazou <ebotcazou@adacore.com>
481
482 * exp_util.ads (Component_May_Be_Bit_Aligned): Small comment
483 tweaks.
484 (Possible_Bit_Aligned_Component): Likewise.
485 (Type_May_Have_Bit_Aligned_Components): Likewise.
486 * exp_util.adb (Component_May_Be_Bit_Aligned): Likewise.
487 (Possible_Bit_Aligned_Component): Likewise.
488 (Type_May_Have_Bit_Aligned_Components): Likewise.
489
490 2019-08-12 Eric Botcazou <ebotcazou@adacore.com>
491
492 * exp_ch4.adb (Expand_N_Op_Eq): Expand the array equality if
493 either operand is a possibly unaligned slice.
494 * exp_ch6.adb (Expand_Simple_Function_Return): Do not generate a
495 copy for a possibly unaligned object if it is represented as a
496 scalar.
497 * exp_util.adb (Is_Possibly_Unaligned_Slice): Do not always
498 return false if the target doesn't have strict alignment.
499
500 2019-08-12 Bob Duff <duff@adacore.com>
501
502 * sem_ch12.adb (Instantiate_Package_Body): Remove suppression of
503 checks in instances of internal units.
504 * sem_ch6.adb (Analyze_Function_Return): Do not generate a
505 constraint check on an extended_return_statement if the subtype
506 of the return object in the statement is identical to the return
507 subtype of the function.
508
509 2019-08-12 Bob Duff <duff@adacore.com>
510
511 * libgnat/a-cbmutr.adb (Is_Reachable): Declare Idx to be of the
512 base subtype. Clearly it makes no sense to loop "while Idx >=
513 0", if Idx is of a nonnegative subtype.
514
515 2019-08-12 Bob Duff <duff@adacore.com>
516
517 * libgnat/a-tifiio.adb (Put_Scaled): Prevent AA from being
518 negative, since Field is range 0 .. something.
519
520 2019-08-12 Bob Duff <duff@adacore.com>
521
522 * doc/gnat_ugn/gnat_utility_programs.rst (gnatmetric, gnatpp,
523 gnatstub): Remove documentation for Ada language version
524 switches, and note that they are no longer needed.
525
526 2019-08-12 Gary Dismukes <dismukes@adacore.com>
527
528 * sem_ch5.adb (Prepare_Param_Spec_Loop): Set the parents of the
529 copied low and high bounds in the case where the loop range is
530 given by a discrete_subtype_indication, to prevent hanging (or
531 Assert_Failure) in Insert_Actions.
532
533 2019-08-12 Ed Schonberg <schonberg@adacore.com>
534
535 * sem_ch6.adb (heck_Untagged_Equality): Verify that user-defined
536 equality has the same profile as the predefined equality before
537 applying legality rule in RM 4.5.2 (9.8).
538
539 2019-08-12 Bob Duff <duff@adacore.com>
540
541 * libgnat/a-except.ads: Update obsolete comment, still making
542 clear that this is a variant. Add explicit default for Id
543 component of Exception_Occurrence, because that value is used.
544 Define Null_Occurrence less redundantly.
545 * libgnat/a-einuoc.adb: Minor simplification of code.
546
547 2019-08-12 Justin Squirek <squirek@adacore.com>
548
549 * libgnat/a-dhfina.adb, libgnat/a-dhfina.ads (Is_Simple_Name,
550 Is_Root_Directory, Is_Parent_Directory,
551 Is_Current_Directory_Name, Is_Relative_Name, Initial_Directory,
552 Relative_Name, Compose): Add implementation and documentation.
553 * libgnat/a-direct.adb (Containing_Directory): Modify routine to
554 use routines from Ada.Directories.Hierarchical_File_Names and
555 remove incorrect special case for parent directories.
556 (Fetch_Next_Entry): Add check for current directory and parent
557 directory and ignore them under certain circumstances.
558 (Simple_Nmae): Add check for null result from
559 Simple_Name_Internal and raise Name_Error.
560 (Simple_Name_Internal): Add explicit check for root directories,
561 sanitize trailing directory separators, and modify behavior so
562 that current and parent directories are considered valid
563 results.
564 * Makefile.rtl: Add entry to GNATRTL_NONTASKING_OBJS.
565
566 2019-08-12 Eric Botcazou <ebotcazou@adacore.com>
567
568 * freeze.adb (Freeze_Entity): Give the same error for an
569 Object_Size clause on a variable-sized type as for a Size
570 clause.
571
572 2019-08-12 Gary Dismukes <dismukes@adacore.com>
573
574 * sem_prag.adb (Analyze_Pragma, Pragma_Suppress_Initialization):
575 For private types, set the Suppress_Initialization flag on the
576 Full_View of the entity rather than the entity's base type.
577
578 2019-08-12 Yannick Moy <moy@adacore.com>
579
580 * aspects.adb, aspects.ads (Aspect_No_Caching): New aspect.
581 * contracts.adb, contracts.ads (Add_Contract_Item): Add handling
582 of No_Caching.
583 (Analyze_Object_Contract): Add handling of No_Caching.
584 * einfo.adb, einfo.ads
585 (Get_Pragma): Add handling of No_Caching.
586 * doc/gnat_rm/implementation_defined_aspects.rst,
587 doc/gnat_rm/implementation_defined_pragmas.rst: Document new
588 aspect/pragma.
589 * gnat_rm.texi: Regenerate.
590 * par-prag.adb (Prag): New pragma Pragma_No_Caching.
591 * sem_ch13.adb (Analyze_Aspect_Specifications,
592 Check_Aspect_At_Freeze_Point): Add handling of No_Caching.
593 * sem_prag.adb (Analyze_Pragma): Deal with pragma No_Caching.
594 * sem_prag.ads (Analyze_External_Property_In_Decl_Part): Now
595 applies to No_Caching.
596 * sem_util.adb, sem_util.ads (Is_Effectively_Volatile): Add
597 handling of No_Caching.
598 (No_Caching_Enabled): New query function.
599 * snames.ads-tmpl: New names for pragma.
600
601 2019-08-12 Yannick Moy <moy@adacore.com>
602
603 * sem_util.adb, sem_util.ads (Traverse_More_Func,
604 Traverse_More_Proc): Add formal parameter for Itypes traversal.
605
606 2019-08-12 Yannick Moy <moy@adacore.com>
607
608 * exp_attr.adb, exp_attr.ads (Expand_Size_Attribute): New
609 procedure to share part of the attribute expansion with
610 GNATprove mode.
611 (Expand_N_Attribute_Reference): Extract part of the
612 Size/Object_Size expansion in the new procedure
613 Expand_Size_Attribute.
614 * exp_spark.adb (Expand_SPARK_N_Attribute_Reference): Expand
615 Size/Object_Size attributes using the new procedure
616 Expand_Size_Attribute.
617
618 2019-08-12 Yannick Moy <moy@adacore.com>
619
620 * exp_spark.adb (Expand_SPARK_N_Attribute_Reference): Only
621 expand Enum_Rep attribute when its parameter is a literal.
622
623 2019-08-12 Justin Squirek <squirek@adacore.com>
624
625 * sem_eval.adb (Check_Non_Static_Context): Add a condition to
626 determine if a range violation constitues a warning or an error.
627 (Out_Of_Range): Add a condition to determine if a range
628 violation constitues a warning or an error.
629
630 2019-08-12 Eric Botcazou <ebotcazou@adacore.com>
631
632 * exp_ch4.adb (Real_Range_Check): Do not rewrite the conversion
633 node but its expression instead, after having fetched its
634 current value. Clear the Do_Range_Check flag on entry. Return
635 early for a rewritten float-to-float conversion. Remove
636 redundant local variable. Suppress all checks when inserting
637 the temporary and do not reanalyze the node.
638
639 2019-08-12 Eric Botcazou <ebotcazou@adacore.com>
640
641 * sprint.ads: Minor comment tweak.
642
643 2019-08-12 Eric Botcazou <ebotcazou@adacore.com>
644
645 * checks.adb (Insert_Valid_Check): Do not retrieve the
646 Do_Range_Check flag from the Original_Node but from the
647 Validated_Object. Remove useless bypass for floating-point
648 types.
649
650 2019-08-12 Yannick Moy <moy@adacore.com>
651
652 * sem_util.adb, sem_util.ads (Traverse_More_Func,
653 Traverse_More_Proc): New traversal subprograms.
654
655 2019-08-12 Jerome Lambourg <lambourg@adacore.com>
656
657 * libgnarl/s-taprop__vxworks.adb (Abort_Handler): Only call
658 s-tpopsp.Self when actually needed.
659
660 2019-08-12 Eric Botcazou <ebotcazou@adacore.com>
661
662 * exp_ch4.adb (Discrete_Range_Check): Return if checks are
663 suppressed.
664
665 2019-08-12 Eric Botcazou <ebotcazou@adacore.com>
666
667 * sem_res.adb: Add with & use clause for Sem_Mech and
668 alphabetize.
669 (Resolve_Actuals): Do not apply a scalar range check for the
670 source of a conversion whose result is passed by reference to a
671 valued procedure.
672
673 2019-08-12 Eric Botcazou <ebotcazou@adacore.com>
674
675 * checks.adb (Insert_Valid_Check): Reset the Do_Range_Check flag
676 on the validated object.
677 * exp_ch6.adb (Add_Call_By_Copy_Code): Reset the Do_Range_Check
678 flag on the actual here, as well as on the Expression if the
679 actual is a N_Type_Conversion node.
680 (Add_Validation_Call_By_Copy_Code): Generate the incoming range
681 check if needed and reset the Do_Range_Check flag on the
682 Expression if the actual is a N_Type_Conversion node.
683 (Expand_Actuals): Do not reset the Do_Range_Check flag here.
684 Generate the incoming range check for In parameters here instead
685 of...
686 (Expand_Call_Helper): ...here. Remove redudant condition.
687 * sem_res.adb (Resolve_Actuals): Use local variable A_Typ and
688 remove obsolete comments.
689 (Resolve_Type_Conversion): Do not force the Do_Range_Check flag
690 on the operand if range checks are suppressed.
691
692 2019-08-12 Eric Botcazou <ebotcazou@adacore.com>
693
694 * checks.adb (Activate_Range_Check): Remove redundant argument.
695 (Generate_Range_Check): Likewise.
696 (Apply_Float_Conversion_Check): Reset the Do_Range_Check flag on
697 entry and remove redundant condition.
698
699 2019-08-02 Alexandre Oliva <oliva@adacore.com>
700
701 * libgnat/a-exexpr.adb (Begin_Handler_v1, End_Handler_v1): New.
702 (Claimed_Cleanup): New.
703 (Begin_Handler, End_Handler): Document.
704 * gcc-interface/trans.c (gigi): Switch to exception handler
705 ABI #1.
706 (Exception_Handler_to_gnu_gcc): Save the original cleanup
707 returned by begin handler, pass it to end handler, and use
708 EH_ELSE_EXPR to pass a propagating exception to end handler.
709 (gnat_to_gnu): Leave the exception pointer alone for reraise.
710 (add_cleanup): Handle EH_ELSE_EXPR, require it by itself.
711
712 2019-07-23 Ed Schonberg <schonberg@adacore.com>
713
714 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations,
715 Freeze_Entity_Checks): Include Aspect_CPU with other aspects
716 whose expresssion may depend on a discriminant, and thus require
717 that components of the type be made visible.
718
719 2019-07-23 Eric Botcazou <ebotcazou@adacore.com>
720
721 * checks.adb (Convert_And_Check_Range): Add Suppress parameter
722 and pass it in the call to Insert_Actions. Rename local
723 variable.
724 (Generate_Range_Check): Minor comment fixes. Pass Range_Check
725 in the first call to Convert_And_Check_Range and All_Checks in
726 the second call.
727 * exp_ch4.adb (Expand_N_Type_Conversion): Reset the
728 Do_Overflow_Check flag in the float-to-float case too if there
729 is also a range check.
730
731 2019-07-23 Eric Botcazou <ebotcazou@adacore.com>
732
733 * checks.adb (Activate_Overflow_Check): Remove redundant
734 argument.
735 * exp_ch4.adb (Discrete_Range_Check): Reset the overflow flag.
736 (Expand_N_Type_Conversion): Do not reset it here.
737
738 2019-07-23 Eric Botcazou <ebotcazou@adacore.com>
739
740 * repinfo.adb (List_Component_Layout): Pass Decimal to UI_Write.
741 (Write_Val): Likewise.
742
743 2019-07-23 Ed Schonberg <schonberg@adacore.com>
744
745 * aspects.ads: New table Operational_Aspect, used to distinguish
746 between aspects that are view-specific, such as those related to
747 iterators, and representation aspects that apply to all views of
748 a type.
749 * aspects.adb (Find_Aspect): If the aspect being sought is
750 operational, do not ecamine the full view of a private type to
751 retrieve it.
752 * sem_ch5.adb (Analyze_Iterator_Specification): Improve error
753 message when the intended domain of iteration does not implement
754 the required iterator aspects.
755
756 2019-07-23 Yannick Moy <moy@adacore.com>
757
758 * sem_spark.ads (Is_Local_Context): New function.
759 * sem_spark.adb (Check_Declaration): Issue errors on violations
760 of SPARK RM 3.10(4)
761 (Process_Path): Do not issue error on borrow/observe during
762 elaboration, as these are caught by the new rule.
763
764 2019-07-23 Yannick Moy <moy@adacore.com>
765
766 * exp_ch7.adb (Create_Finalizer): Force finalizer not to be
767 Ghost enabled.
768 * exp_dbug.adb (Get_External_Name): Explain special case of
769 Ghost finalizer.
770
771 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
772
773 * repinfo.adb (List_Entities): Also list compiled-generated
774 types present as Etype of objects.
775
776 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
777
778 * sinfo.ads: Update the documentation about the
779 Do_Division_Check, Do_Overflow_Check and Do_Range_Check flags.
780
781 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
782
783 * exp_ch4.adb (Expand_N_Type_Conversion): Beef up comment.
784 (Fixup_Universal_Fixed_Operation): Set the base type instead of
785 the type of the enclosing type conversion on the operation.
786
787 2019-07-22 Ed Schonberg <schonberg@adacore.com>
788
789 * exp_ch4.adb (Expand_N_In): Do not suggest the use of attribute
790 'Valid as a replacement for a range check on a discrete type
791 when the bounds of the range are given by type conversions,
792 because in such a case there are distinct types involved and the
793 subbested attribute replacement would be misplaced.
794
795 2019-07-22 Yannick Moy <moy@adacore.com>
796
797 * sem_spark.adb (Get_Root_Object, Is_Path_Expression,
798 Is_Subpath_Expression): Add parameter Is_Traversal to adapt
799 these functions to the case of paths returned from a traversal
800 function.
801 (Read_Indexes): Handle the case of an if-expression or
802 case-expression.
803 (Check_Statement): Check Emit_Messages only when issuing an
804 error message. This is important as Emit_Messages may store the
805 information that an error was detected.
806
807 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
808
809 * checks.adb (Apply_Type_Conversion_Checks): Do not set
810 Do_Range_Check flag on conversions from fixed-point types
811 either.
812 * exp_attr.adb: Add use and with clause for Expander.
813 (Expand_N_Attribute_Reference) <Fixed_Value, Integer_Value>: Set
814 the Conversion_OK flag and do not generate overflow/range checks
815 manually.
816 * exp_ch4.adb (Expand_N_Qualified_Expression): Remove
817 superfluous clearing of Do_Range_Check flag.
818 (Discrete_Range_Check): New procedure to generate a range check
819 for discrete types.
820 (Real_Range_Check): Remove redundant local variable and adjust.
821 Remove useless shortcut. Clear Do_Range_Check flag on all
822 paths.
823 (Expand_N_Type_Conversion): Remove redundant test on
824 Conversion_OK. Call Discrete_Range_Check to generate range
825 checks on discrete types. Remove obsolete code for
826 float-to-integer conversions. Add code to generate range checks
827 for conversions involving fixed-point types.
828
829 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
830
831 * sprint.ads: Fix pasto in comment.
832
833 2019-07-22 Javier Miranda <miranda@adacore.com>
834
835 * sem_res.adb (Resolve_Actuals): Replace code that displaces the
836 pointer to an allocated object to reference its secondary
837 dispatch table by a type conversion (which takes care of
838 handling all cases).
839
840 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
841
842 * sprint.adb (Sprint_Node_Actual)
843 <N_Decimal_Fixed_Point_Definition>: Swap a couple of spaces.
844 (Write_Itype): Minor consistency fixes throughout. Add support
845 for printing ordinary and decimal fixed-point types and
846 subtypes.
847
848 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
849
850 * exp_attr.adb (Expand_Loop_Entry_Attribute): Beef up comment.
851
852 2019-07-22 Ed Schonberg <schonberg@adacore.com>
853
854 * libgnat/s-valboo.ads, libgnat/s-valcha.ads,
855 libgnat/s-valdec.ads, libgnat/s-valenu.ads,
856 libgnat/s-valint.ads, libgnat/s-vallld.ads,
857 libgnat/s-vallli.ads, libgnat/s-valllu.ads,
858 libgnat/s-valrea.ads, libgnat/s-valuns.ads,
859 libgnat/s-valwch.ads: Change categorization of packages that
860 implement attribute 'Value from Pure to Preelaborate, to prevent
861 undesirable optimizations when the evaluation of the attribute
862 raises Constraint_Error, but subsequent use of the result of
863 this evsaluation is removed by a subsequent optimization.
864
865 2019-07-22 Ed Schonberg <schonberg@adacore.com>
866
867 * sem_warn.adb (Check_References): Do not emit s warning on a
868 referenced entity with no explicit assignment if the type of the
869 entity has Preelaborable_Initialixation, such as
870 Exception_Occurrence.
871
872 2019-07-22 Javier Miranda <miranda@adacore.com>
873
874 * exp_ch4.adb (Size_In_Storage_Elements): Improve the expansion
875 to handle array indexes that are modular type.
876 (Expand_N_Allocator): For 32-bit targets improve the generation
877 of the runtime check associated with large arrays supporting
878 arrays initialized with a qualified expression.
879 * libgnat/s-imenne.adb (Image_Enumeration_8,
880 Image_Enumeration_16, Image_Enumeration_32): Define the index of
881 Index_Table with range Natural'First .. Names'Length since in
882 the worst case all the literals of the enumeration type would be
883 single letter literals and the Table built by the frontend would
884 have as many components as the length of the names string. As a
885 result of this enhancement, the internal tables declared using
886 Index_Table have a length closer to the real needs, thus
887 avoiding the declaration of large arrays on 32-bit CCG targets.
888
889 2019-07-22 Yannick Moy <moy@adacore.com>
890
891 * sem_ch3.adb (Constrain_Access): Issue a message about ignored
892 constraint.
893
894 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
895
896 * sem_ch8.adb (End_Use_Type): Reset the In_Use flag on the
897 class-wide type if the type is tagged.
898 (Use_One_Type): Add commentary on the handling of the class-wide
899 type.
900
901 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
902
903 * einfo.ads (Is_For_Access_Subtype): Delete.
904 (Set_Is_For_Access_Subtype): Likewise.
905 * einfo.adb (Is_For_Access_Subtype): Likewise.
906 (Set_Is_For_Access_Subtype): Likewise.
907 (Write_Entity_Flags): Do not write Is_For_Access_Subtype.
908 * exp_ch4.adb (Expand_N_Selected_Component): Do not deal with
909 it.
910 * exp_spark.adb (Expand_SPARK_N_Selected_Component): Likewise.
911 * sem_ch4.adb (Analyze_Explicit_Dereference): Likewise.
912 * sem_ch3.adb (Build_Discriminated_Subtype): Do not build a
913 special private subtype for access-to-record subtypes.
914
915 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
916
917 * sem_ch3.adb (Complete_Private_Subtype): Rework the setting of
918 the Etype of the full view for full base types that cannot
919 contain any discriminant. Remove code and comment about it in
920 the main path.
921
922 2019-07-22 Ed Schonberg <schonberg@adacore.com>
923
924 * sem_ch3.adb (Convert_Bound): Subsidiary of
925 Floating_Point_Type_Declaration, to handle properly range
926 specifications with bounds that may include static constants of
927 a given type rather than real literals.
928
929 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
930
931 * sem_aggr.adb (Rewrite_Bound): Be prepared for discriminals
932 too.
933 (Rewrite_Range;): Minor tweak.
934 (Resolve_Record_Aggregate): For a component with default
935 initialization whose expression is an array aggregate, also
936 rewrite the bounds of the component associations, if any.
937
938 2019-07-22 Gary Dismukes <dismukes@adacore.com>
939
940 * exp_ch5.adb (Expand_N_Case_Statement): In the case where a
941 case statement is rewritten as an equivalent if statement,
942 inherit the From_Condition_Expression flag from the case
943 statement.
944
945 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
946
947 * sem_ch8.adb (Check_Constrained_Object): Further extend the
948 special optimization to all limited types.
949
950 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
951
952 * exp_attr.adb (Expand_N_Attribute_Reference)
953 <Attribute_Enum_Val>: Set No_Truncation on the
954 N_Unchecked_Type_Conversion built around the argument passed to
955 the attribute.
956
957 2019-07-22 Nicolas Roche <roche@adacore.com>
958
959 * libgnat/s-valrea.adb (Scan_Real): Ignore non significative
960 digits to avoid converging to infinity in some cases.
961
962 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
963
964 * libgnat/g-encstr.adb (Encode_Wide_String): Fix oversight.
965 (Encode_Wide_Wide_String): Likewise.
966
967 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
968
969 * sem_warn.adb (Find_Var): Bail out for a function call with an
970 Out or In/Out parameter.
971
972 2019-07-22 Nicolas Roche <roche@adacore.com>
973
974 * terminals.c (__gnat_tty_waitpid): Support both blocking and
975 not blocking mode.
976 * libgnat/g-exptty.ads (Is_Process_Running): New function.
977 * libgnat/g-exptty.adb (Close): Don't try to interrupt/terminate
978 a process if it is already dead.
979
980 2019-07-22 Ed Schonberg <schonberg@adacore.com>
981
982 * freeze.adb (Freeze_Fixed_Point_Type): When freezing a
983 fixed-point subtype, check whether the parent type declarastion
984 includes an aspect specification for the 'Small type attribute,
985 and inherit the specified value.
986
987 2019-07-22 Javier Miranda <miranda@adacore.com>
988
989 * freeze.adb (Freeze_Subprogram): Check that C++ constructors
990 must have external or link name.
991
992 2019-07-22 Ed Schonberg <schonberg@adacore.com>
993
994 * sem_res.adb (Resolve_Selected_Component): If the prefix has a
995 deferred reference, generate the correct reference now, to
996 indicate that the previous assignment is used. This prevents
997 spurious warnings on useless assignments when compiling with all
998 warnings enabled. when there is a subsequent call in the same
999 stqtement list, in which the prefix of the selected component is
1000 the actual for an out parameter.
1001
1002 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
1003
1004 * exp_attr.adb (Expand_Loop_Entry_Attribute): Copy the condition
1005 of a while loop instead of simply relocating it.
1006
1007 2019-07-18 Arnaud Charlet <charlet@adacore.com>
1008
1009 * Makefile.rtl, expect.c, env.c, aux-io.c, mkdir.c, initialize.c,
1010 cstreams.c, raise.c, tracebak.c, adadecode.c, init.c, raise-gcc.c,
1011 argv.c, adaint.c, adaint.h, ctrl_c.c, sysdep.c, rtinit.c, cio.c,
1012 seh_init.c, exit.c, targext.c: Introduce a "STANDALONE" mode where C
1013 runtime files do not have any dependency on GCC include files.
1014 Remove unnecessary includes.
1015 Remove remaining references to VMS in runtime C file.
1016 * runtime.h: new File.
1017
1018 2019-07-13 Andreas Schwab <schwab@linux-m68k.org>
1019
1020 * Makefile.rtl: Use g-sercom__linux.adb for all linuxes.
1021
1022 2019-07-11 Piotr Trojanek <trojanek@adacore.com>
1023
1024 * lib-writ.adb (Ensure_System_Dependency,
1025 Up_To_Date_ALI_File_Exists, Write_ALI): Replace low-level access
1026 to table with a high-level query.
1027
1028 2019-07-11 Piotr Trojanek <trojanek@adacore.com>
1029
1030 * checks.adb: Fix typo in comment.
1031 * sem.adb (Semantics): Avoid repeated calls to
1032 In_Extended_Main_Source_Unit by reusing an already-cached
1033 result.
1034 * sem_util.adb (First_Global): Fix style.
1035
1036 2019-07-11 Yannick Moy <moy@adacore.com>
1037
1038 * sem_res.adb (Resolve_Call): Do not perform dimensionality
1039 checking on inlined bodies.
1040
1041 2019-07-11 Yannick Moy <moy@adacore.com>
1042
1043 * debug.adb: Flip meaning of debug switch -gnatdF.
1044
1045 2019-07-11 Yannick Moy <moy@adacore.com>
1046
1047 * sem_eval.adb (Is_Same_Value): Add special case for rewritten
1048 Loop_Entry attribute.
1049
1050 2019-07-11 Claire Dross <dross@adacore.com>
1051
1052 * gnat1drv.adb: SPARK checking rules for pointer aliasing are
1053 moved to GNATprove backend.
1054 * sem_spark.ads, sem_spark.adb (Sem_SPARK): Is now a generic
1055 unit. Takes as parameters:
1056 - Retysp which is used to query the most underlying type
1057 visible in SPARK. We do not introduce aliasing checks for
1058 types which are not visibly deep.
1059 - Component_Is_Visible_In_SPARK is used to avoid doing pointer
1060 aliasing checks on components which are not visible in SPARK.
1061 - Emit_Messages returns True in the second phase of SPARK
1062 analysis. Error messages for failed aliasing checks are only
1063 output in this case.
1064 Additionally, errors on constructs not supported in SPARK are
1065 removed as duplicates of marking errors. Components are stored
1066 in the permission map using their original component to avoid
1067 inconsistencies between components of different views of the
1068 same type.
1069 (Check_Expression): Handle delta constraints.
1070 (Is_Deep): Exported so that we can check for SPARK restrictions
1071 on deep types inside SPARK semantic checkings.
1072 (Is_Traversal_Function): Exported so that we can check for SPARK
1073 restrictions on traversal functions inside SPARK semantic
1074 checkings.
1075 (Check_Call_Statement, Read_Indexes): Check wether we are
1076 dealing with a subprogram pointer type before querying called
1077 entity.
1078 (Is_Subpath_Expression): Image attribute can appear inside a
1079 path.
1080 (Check_Loop_Statement): Correct order of statements in the loop.
1081 (Check_Node): Ignore raise nodes.
1082 (Check_Statement): Use Last_Non_Pragma to get the object
1083 declaration in an extended return statement.
1084
1085 2019-07-11 Patrick Bernardi <bernardi@adacore.com>
1086
1087 * bindgen.adb (Gen_Main): Do not generate a reference to
1088 Ada_Main_Program_Name when the Minimal_Binder flag is set.
1089 (Gen_Output_File_Ada): Do not output GNAT_Version and
1090 Ada_Main_Program_Name info if Minimal_Binder flag is set.
1091 * bindusg.adb: Add documentation for new -minimal switch.
1092 * gnatbind.adb (Scan_Bind_Arg): Scan -minimal switch.
1093 * opt.ads: Add new global flag Minimal_Binder to indicate if the
1094 binder should not produce global variables.
1095 * doc/gnat_ugn/building_executable_programs_with_gnat.rst:
1096 Update documentation with new binder -minimal switch.
1097 * gnat_ugn.texi: Regenerate.
1098
1099 2019-07-11 Eric Botcazou <ebotcazou@adacore.com>
1100
1101 * Makefile.rtl: Add warning note about compilation flags and
1102 capitalize.
1103
1104 2019-07-11 Ed Schonberg <schonberg@adacore.com>
1105
1106 * exp_ch9.adb (Expand_N_Protected_Type_Declaaration): New
1107 subsidiary routine Replace_Access_Definition, to handle properly
1108 a protected type PT one of whose private components is of type
1109 access PT.
1110
1111 2019-07-11 Dmitriy Anisimkov <anisimko@adacore.com>
1112
1113 * libgnat/g-socket.ads (Level_Type): Add enumerators for
1114 IP_Protocol_For_ICMP, IP_Protocol_For_IGMP,
1115 IP_Protocol_For_RAW_Level.
1116 * libgnat/g-socket.adb (Levels): Handle them.
1117 * s-oscons-tmplt.c: Import socket protocols defined in
1118 netinet/in.h.
1119
1120 2019-07-11 Claire Dross <dross@adacore.com>
1121
1122 * libgnat/a-cfhama.adb, libgnat/a-cfhase.adb (Free): Do not
1123 reset the Has_Element flag if no element is freed.
1124
1125 2019-07-11 Arnaud Charlet <charlet@adacore.com>
1126
1127 * errno.c: Remove obsolete support for MaRTE OS.
1128
1129 2019-07-11 Ed Schonberg <schonberg@adacore.com>
1130
1131 * exp_ch4.adb (Expand_N_Type_Conversion): If a predicate check
1132 is generated, analyze it with range check suppressed, because
1133 that check has been previously applied.
1134 * exp_ch5.adb (Expand_N_Assignment_Statement): If the RHS is a
1135 type conversion to the type of the LHS, do not apply a predicate
1136 check to the RHS because it will have been generated already
1137 during its expansion.
1138 * exp_ch6.adb (Can_Fold_Predicate_Call): Extend processing to
1139 handle a predicate check on a constant entity whose value is
1140 static.
1141
1142 2019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
1143
1144 * bindo.adb: Remove the documentation of switch -d_N because it
1145 is no longer in use.
1146 * bindo-graphs.ads, bindo-graphs.adb (Is_Spec_Before_Body_Edge):
1147 New routine.
1148 * bindo-writers.adb (Write_Dependency_Edge): Add the missing
1149 case of a spec-before-body edge.
1150
1151 2019-07-11 Dmitriy Anisimkov <anisimko@adacore.com>
1152
1153 * libgnat/g-socket.ads (Mode_Type): Add a Socket_Raw enumerator.
1154 * libgnat/g-socket.adb (Modes): Handle Socket_Raw.
1155
1156 2019-07-11 Justin Squirek <squirek@adacore.com>
1157
1158 * exp_ch9.adb (Build_Private_Protected_Declaration): Add
1159 exception for the moving of pragmas to internally generated
1160 specs for pragma Unreferenced.
1161
1162 2019-07-11 Bob Duff <duff@adacore.com>
1163
1164 * doc/gnat_ugn/gnat_utility_programs.rst: Fix inconsistent
1165 documentation for gnatmetric.
1166 * gnat_ugn.texi: Regenerate.
1167
1168 2019-07-11 Bob Duff <duff@adacore.com>
1169
1170 * doc/gnat_ugn/gnat_utility_programs.rst: Document gnatpp's
1171 --spaces-only switch.
1172
1173 2019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
1174
1175 * sem_util.adb (Null_Status): Assume that an erroneous construct
1176 has an undefined null status.
1177
1178 2019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
1179
1180 * checks.adb, exp_ch6.adb, gnat1drv.adb, sem_aux.adb,
1181 sem_ch2.adb, sem_ch8.adb, sem_res.adb: Minor reformatting.
1182
1183 2019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
1184
1185 * sem_ch8.adb (Analyze_Object_Renaming): Obtain the object being
1186 renamed using routine Get_Object_Name which takes care of
1187 various name forms.
1188 (Get_Object_Name): New routine.
1189
1190 2019-07-11 Ed Schonberg <schonberg@adacore.com>
1191
1192 * exp_ch6.adb (Can_Fold_Predicate_Call): New function,
1193 subsidiary of Expand_Call_Helper, to compute statically a
1194 predicate check when the argument is a static integer.
1195
1196 2019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
1197
1198 * sem_res.adb (Resolve_Op_Not): Do not rewrite an equality
1199 operator into a function call when the operator is intrinsic.
1200
1201 2019-07-11 Thomas Quinot <quinot@adacore.com>
1202
1203 * sem_prag.adb (Analyze_Pragma, case pragma Check): Do not call
1204 Set_SCO_Pragma_Enabled for the dynamic predicate case.
1205
1206 2019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
1207
1208 * exp_util.ads, exp_util.adb (Needs_Finalization): Move to
1209 Sem_Util.
1210 * sem_ch9.adb (Analyze_Protected_Definition): Code cleanup. Mark
1211 the protected type as having controlled components when it
1212 contains at least one such component.
1213 * sem_util.ads, sem_util.adb (Needs_Finalization): New
1214 function.
1215
1216 2019-07-11 Eric Botcazou <ebotcazou@adacore.com>
1217
1218 * alloc.ads (Rep_JSON_Table_Initial): New constant.
1219 (Rep_JSON_Table_Increment): Likewise.
1220 * debug.adb: Document -gnatd_j switch.
1221 * gcc-interface/Make-lang.in (GNAT_ADA_OBJS): Add
1222 repinfo-input.o.
1223 * gnat1drv.adb: Add with clause for Repinfo.Input.
1224 Add with and use clauses for Sinput.
1225 (Read_JSON_Files_For_Repinfo): New procedure.
1226 (Gnat1drv1): Deal with -gnatd_j switch.
1227 * repinfo-input.ad[sb]: New unit.
1228 * snames.ads-tmpl (Name_Discriminant): New constant.
1229 (Name_Operands): Likewise.
1230
1231 2019-07-11 Justin Squirek <squirek@adacore.com>
1232
1233 * checks.adb (Apply_Accessibility_Check): Add check for constant
1234 folded conditions on accessibility checks.
1235
1236 2019-07-11 Arnaud Charlet <charlet@adacore.com>
1237
1238 * libgnarl/g-thread.ads, libgnarl/g-thread.adb (Get_Thread):
1239 Update comments. Add new version taking a Task_Id.
1240
1241 2019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
1242
1243 * bindo.adb: Update the section of switches and debugging
1244 elaboration issues.
1245 * bindo.ads: Add type Elaboration_Phase.
1246 * bindo-augmentors.adb: Add use clause for
1247 Bindo.Writers.Phase_Writers.
1248 (Augment_Library_Graph): Signal the start and end of the
1249 aubmentation phase.
1250 * bindo-builders.adb: Add with and use clause for Bindo.Writers.
1251 Add use clause for Bindo.Writers.Phase_Writers.
1252 (Build_Invocation_Graph): Signal the start and end of the
1253 invocation graph construction phase.
1254 (Build_Library_Graph): Signal the start and end of the library
1255 graph construction phase.
1256 * bindo-diagnostics.adb: Add use clause for
1257 Bindo.Writers.Phase_Writers.
1258 (Diagnose_Cycle): Signal the start and end of the cycle
1259 diagnostic phase.
1260 * bindo-elaborators.adb: Add use clause for
1261 Bindo.Writers.Phase_Writers.
1262 (Elaborate_Units): Signal the start and end of the unit
1263 elaboration phase.
1264 * bindo-graphs.adb: Add use clause for
1265 Bindo.Writers.Phase_Writers.
1266 (Find_Components): Signal the start and end of the component
1267 discovery phase.
1268 (Find_Cycles): Signal the start and end of the cycle discovery
1269 phase.
1270 * bindo-units.adb: Add with and use clause for Bindo.Writers.
1271 Add use clause for Bindo.Writers.Phase_Writers.
1272 (Collect_Elaborable_Units): Signal the start and end of the unit
1273 collection phase.
1274 * bindo-validators.adb: Add with and use clause for
1275 Bindo.Writers. Add use clause for Bindo.Writers.Phase_Writers.
1276 (Validate_Cycles, Validate_Elaboration_Order,
1277 Validate_Invocation_Graph, Validate_Library_Graph): Signal the
1278 start and end of the libray graph validation phase.
1279 * bindo-writers.ads, bindo-writers.adb: Add new nested package
1280 Phase_Writers.
1281 * debug.adb: Update the documentation of switch d_S.
1282
1283 2019-07-11 Yannick Moy <moy@adacore.com>
1284
1285 * sem_res.adb (Check_Argument_Order): Special case calls to
1286 operators.
1287
1288 2019-07-10 Dmitriy Anisimkov <anisimko@adacore.com>
1289
1290 * libgnat/s-ststop.adb: Remove System.Strings.Stream_Ops
1291 dependence on System.Streams.Stream_IO.
1292
1293 2019-07-10 Ed Schonberg <schonberg@adacore.com>
1294
1295 * sem_ch2.adb (Analyze_Integer_Literal): Preserve the type of
1296 the literal if prior analysis determined that its type is a
1297 modular integer type.
1298
1299 2019-07-10 Doug Rupp <rupp@adacore.com>
1300
1301 * init.c: Do not attempt to re-arm guard page on x86_64-vx7(r2).
1302
1303 2019-07-10 Ed Schonberg <schonberg@adacore.com>
1304
1305 * sem_ch8.adb (Check_Constrained_Object): A record that is
1306 limited because of the presence of a limited component is
1307 constrained, and no subtype indiciation needs to be created for
1308 it, just as is the case for declared limited records.
1309
1310 2019-07-10 Yannick Moy <moy@adacore.com>
1311
1312 * sem_aux.adb, sem_aux.ads (Is_Protected_Operation): New
1313 function to determine if a subprogram is protected.
1314 * sem_spark.adb (Setup_Protected_Components): New procedure to
1315 add protected components to the environment.
1316 (Check_Callable_Body): Call the new Setup_Protected_Components.
1317 (Check_Package_Spec): Merge local environment with enclosing one
1318 when done.
1319
1320 2019-07-10 Claire Dross <dross@adacore.com>
1321
1322 * sem_spark.adb (Check_Expression): Allow digits constraints as
1323 input.
1324 (Illegal_Global_Usage): Pass in the entity.
1325 (Is_Subpath_Expression): New function to allow different nodes
1326 as inner parts of a path expression.
1327 (Read_Indexes): Allow concatenation and aggregates with box
1328 expressions. Allow attributes Update and Loop_Entry.
1329 (Check_Expression): Allow richer membership test.
1330 (Check_Node): Ignore bodies of generics.
1331 (Get_Root_Object): Allow concatenation and attributes.
1332
1333 2019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
1334
1335 * sem_ch6.adb (Check_Discriminant_Conformance): Use Find_Type to
1336 discover the type of a full view discriminant.
1337
1338 2019-07-10 Arnaud Charlet <charlet@adacore.com>
1339
1340 * doc/gnat_ugn/gnat_and_program_execution.rst: Improve gnatmem's
1341 doc for the depth switch.
1342
1343 2019-07-10 Bob Duff <duff@adacore.com>
1344
1345 * doc/gnat_ugn/gnat_utility_programs.rst: Document gnatpp's
1346 --source-line-breaks switch.
1347
1348 2019-07-10 Justin Squirek <squirek@adacore.com>
1349
1350 * doc/gnat_rm/implementation_defined_attributes.rst: Add mention
1351 of 'Image attribute with 'Img's entry to mention additional
1352 added 2012 usage of Obj'Image.
1353 * doc/gnat_rm/implementation_defined_pragmas.rst: Correct
1354 mispelling of Async_Writers.
1355 * gnat_rm.texi: Regenerate.
1356 * sem_prag.adb (Analyze_Pragma): Correct mispelling of
1357 Async_Writers.
1358 * sem_util.adb (State_Has_Enabled_Property): Correct mispelling
1359 of Async_Writers.
1360
1361 2019-07-10 Simon Buist <buist@adacore.com>
1362
1363 * sem_util.ads (Child_Prefix): New constant.
1364 * sem_util.adb (Unique_Name): Add a special prefix to child
1365 units that have a nested subprogram or package.
1366
1367 2019-07-10 Arnaud Charlet <charlet@adacore.com>
1368
1369 * sfn_scan.adb (Scan_SFN_Pragmas): Add pragma Assert.
1370
1371 2019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
1372
1373 * sem_ch3.adb (Check_Nonoverridable_Aspects): Correct the
1374 spelling in certain error messages.
1375 (Check_Pragma_Implemented): Correct the spelling in certain
1376 error messages.
1377
1378 2019-07-10 Eric Botcazou <ebotcazou@adacore.com>
1379
1380 * Makefile.rtl (GNATRTL_NONTASKING_OBJS): Add g-brapre.
1381 * libgnat/g-brapre.ads: New package specification.
1382 * doc/gnat_rm/the_gnat_library.rst: Document it.
1383 * gnat_rm.texi: Regenerate.
1384
1385 2019-07-10 Yannick Moy <moy@adacore.com>
1386
1387 * osint-c.adb (Set_File_Name): Always add extension for multiple
1388 units per file mode.
1389
1390 2019-07-10 Corentin Gay <gay@adacore.com>
1391
1392 * sysdep.c: Put include directive for 'vxWorks.h' before any
1393 other VxWorks headers.
1394
1395 2019-07-10 Eric Botcazou <ebotcazou@adacore.com>
1396
1397 * doc/gnat_rm/implementation_defined_attributes.rst
1398 (Scalar_Storage_Order): Minor tweaks. Add note about debuggers.
1399 * gnat_rm.texi: Regenerate.
1400
1401 2019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
1402
1403 * exp_ch4.adb (Expand_N_Case_Expression): Mark the generated
1404 assignments to the temporary result as being OK because the
1405 expansion of case expressions is correct by construction.
1406 (Is_Copy_Type): Update the predicate to match the comment
1407 within.
1408
1409 2019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
1410
1411 * bindo-graphs.adb, bindo.adb, debug.adb, exp_ch6.adb,
1412 sem_ch10.adb, sem_ch13.adb, sem_ch3.adb, sem_ch4.adb,
1413 sem_ch6.adb, sem_ch7.adb, sem_res.adb, sem_spark.adb,
1414 sem_util.adb, warnsw.ads: Minor reformatting.
1415
1416 2019-07-10 Joffrey Huguet <huguet@adacore.com>
1417
1418 * libgnat/a-strbou.ads, libgnat/a-strfix.ads,
1419 libgnat/a-strunb.ads, libgnat/a-strunb__shared.ads: Add global
1420 contracts, contract cases, preconditions and postconditions to
1421 procedures and functions.
1422
1423 2019-07-10 Doug Rupp <rupp@adacore.com>
1424
1425 * sysdep.c (__gnat_is_file_not_found_error): Reformulate to also
1426 work for vxworks7r2 SR0610.
1427
1428 2019-07-10 Doug Rupp <rupp@adacore.com>
1429
1430 * env.c (__gnat_environ): Reformulate to also work for
1431 vxworks7r2 SR0610.
1432
1433 2019-07-10 Patrick Bernardi <bernardi@adacore.com>
1434
1435 * Makefile.rtl: Handle vxworks7r2 ppc target
1436
1437 2019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
1438
1439 * bindo.adb: Update the section on switches.
1440 * bindo-graphs.adb
1441 (Add_Cycle, Add_Vertex_And_Complement): Remove.
1442 (Create): The graph no longer needs a set of recorded cycles
1443 because the cycles are not rediscovered in permuted forms.
1444 (Cycle_End_Vertices): New routine.
1445 (Destroy): The graph no longer needs a set of recorded cycles
1446 because the cycles are not rediscovered in permuted forms.
1447 (Destroy_Library_Graph_Vertex): Move to the library level.
1448 (Find_All_Cycles_Through_Vertex, Find_All_Cycles_With_Edge):
1449 Remove.
1450 (Find_Cycles_From_Successor, Find_Cycles_From_Vertex,
1451 Find_Cycles_In_Component, Has_Elaborate_All_Edge): New routines.
1452 (Insert_And_Sort): Remove.
1453 (Is_Elaborate_Body_Edge): Use predicate
1454 Is_Vertex_With_Elaborate_Body.
1455 (Is_Recorded_Cycle): Remove.
1456 (Is_Vertex_With_Elaborate_Body): New routine.
1457 (Normalize_And_Add_Cycle): Remove.
1458 (Precedence): Rename to xxx_Precedence, where xxx relates to the
1459 input. These versions better reflect the desired input
1460 precedence.
1461 (Record_Cycle): New routine.
1462 (Remove_Vertex_And_Complement, Set_Is_Recorded_Cycle): Remove.
1463 (Trace_xxx): Update all versions to use debug switch -d_t.
1464 (Trace_Component): New routine.
1465 (Trace_Eol): Removed.
1466 (Trace_Vertex): Do not output the component as this information
1467 is already available when the component is traced.
1468 (Unvisit, Visit): New routine.
1469 * bindo-graphs.ads: Add new instance LGV_Lists. Remove instance
1470 RC_Sets. Update the structure of type Library_Graph_Attributes
1471 to remove the set of recorded cycles.
1472 (Destroy_Library_Graph_Vertex): Move to the library level.
1473 * bindo-writers.adb (Write_Component_Vertices): Output
1474 information about the number of vertices.
1475 * debug.adb: Document the use of binder switch -d_t. Update the
1476 use of binder switch -d_T.
1477
1478 2019-07-10 Yannick Moy <moy@adacore.com>
1479
1480 * sem_spark.adb (Get_Root_Object): Replace precondition by error
1481 message.
1482 (Read_Indexes): Replace precondition by error message.
1483 (Check_Callable_Body): Check only traversal function returns an
1484 anonymous access type.
1485 (Check_Expression): Issue error on unexpected expression as
1486 path.
1487 * sem_util.adb (First_Global): Fix access to global on
1488 entry/task.
1489
1490 2019-07-10 Javier Miranda <miranda@adacore.com>
1491
1492 * exp_ch6.adb (Is_Class_Wide_Interface_Type): New subprogram.
1493 (Expand_Call_Helper): Handle non-limited views when we check if
1494 any formal is a class-wide interface type.
1495 * exp_disp.adb (Expand_Interface_Actuals): Handle non-limited
1496 views when we look for interface type formals to force "this"
1497 displacement.
1498
1499 2019-07-10 Ed Schonberg <schonberg@adacore.com>
1500
1501 * sem_res.adb (Resolve_Equality_Op): Do not replace the resolved
1502 operator by its alias if expander is not active, because the
1503 operand type may not be frozen yet and its inherited operations
1504 have not yet been created.
1505
1506 2019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
1507
1508 * bindo-elaborators.adb (Elaborate_Units): Set attribute
1509 Elab_Position of all elaborated units.
1510 (Set_Unit_Elaboration_Positions): New routine.
1511
1512 2019-07-10 Gary Dismukes <dismukes@adacore.com>
1513
1514 * exp_util.adb: Reformatting and a typo fix.
1515
1516 2019-07-10 Yannick Moy <moy@adacore.com>
1517
1518 * exp_util.adb (Remove_Side_Effects): Prefer renamings for
1519 objects of possible owning type in GNATprove mode.
1520
1521 2019-07-09 Ed Schonberg <schonberg@adacore.com>
1522
1523 * sem_ch3.adb (Analyze_Object_Declaration): If the object type
1524 is a composite type that has a dynamic predicate and, the
1525 expression in the declaration is an aggregate, the generated
1526 predicate check must appear after the expanded code for the
1527 aggregate, which will appear after the rewritten object
1528 declarastion.
1529
1530 2019-07-09 Justin Squirek <squirek@adacore.com>
1531
1532 * sem_eval.adb (Expr_Value_E): Add conditional to correctly
1533 handle constant enumerated character types.
1534
1535 2019-07-09 Eric Botcazou <ebotcazou@adacore.com>
1536
1537 * libgnarl/s-osinte__mingw.ads (CRITICAL_SECTION): Use proper
1538 type for SpinCount component.
1539
1540 2019-07-09 Justin Squirek <squirek@adacore.com>
1541
1542 * exp_ch4.adb (Expand_N_Allocator): Add conditional to detect
1543 the presence of anoymous access type allocators and issue a
1544 warning if the appropriate warning flag is enabled.
1545 * warnsw.ads: Add new warning flag for anonymous allocators
1546 * warnsw.adb (All_Warnings, Restore_Warnings, Save_Warnings,
1547 Set_Underscore_Warning_Switch): Register new flags.
1548 (WA_Warnings): Register new flag as an "all warnings" switch
1549 * usage.adb,
1550 doc/gnat_ugn/building_executable_programs_with_gnat.rst:
1551 Document new warning switches -gnatw_a and -gnatw_A.
1552 * gnat_ugn.texi: Regenerate.
1553
1554 2019-07-09 Ed Schonberg <schonberg@adacore.com>
1555
1556 * sem_ch4.adb (Diagnose_Call): Improve error recovery when a
1557 local subprogram name hides a possible candidate name declared
1558 in a child package in the context of the current unit.
1559 * sem_ch6.adb (Process_Formals): Protect against malformed
1560 formal types when the parameter type does not denote an entity.
1561
1562 2019-07-09 Hristian Kirtchev <kirtchev@adacore.com>
1563
1564 * bindo-augmentors.adb (Visit_Elaboration_Root): Do not start a
1565 DFS from an elaboration root whose corresponding unit lacks
1566 elaboration code. This behavior mimics that of the old
1567 elaboration order mechanism.
1568 * bindo-graphs.adb (Find_All_Cycles_Through_Vertex): Move the
1569 vertex tracing within the functional branches of the routine.
1570 This prevents spurious trace output.
1571 (Has_No_Elaboration_Code): New routine.
1572 (Trace_Cycle, Trace_Edge): Update the various Ids to use the
1573 "standard" trace format.
1574 * bindo-graphs.ads (Has_No_Elaboration_Code): New routine.
1575 * bindo-units.ads, bindo-units.adb (Has_No_Elaboration_Code):
1576 New routine.
1577
1578 2019-07-09 Piotr Trojanek <trojanek@adacore.com>
1579
1580 * ali.ads, bindo-graphs.adb, bindo-validators.adb, clean.adb,
1581 doc/gnat_ugn/elaboration_order_handling_in_gnat.rst, einfo.ads,
1582 exp_aggr.adb, exp_ch13.adb, exp_ch4.adb, exp_ch5.adb,
1583 exp_ch6.adb, exp_ch7.adb, exp_ch9.adb, exp_pakd.adb,
1584 fname-uf.ads, gnatlink.adb, inline.adb, lib.ads, make.adb,
1585 namet.ads, opt.ads, par-ch4.adb, par-ch6.adb, par-labl.adb,
1586 prep.adb, sem_aggr.adb, sem_ch13.adb, sem_ch4.adb, sem_ch5.adb,
1587 sem_ch6.adb, sem_ch6.ads, sem_ch7.adb, sem_ch8.adb, sem_dim.adb,
1588 sem_disp.adb, sem_prag.adb, sem_res.adb, sem_warn.adb,
1589 sinfo.ads: Replace ". " with ". ". Minor reformatting and typo
1590 corrections.
1591 * gnat_ugn.texi: Generate.
1592
1593 2019-07-09 Hristian Kirtchev <kirtchev@adacore.com>
1594
1595 * bindo.ads: Move type Precedence_Kind from the private to the
1596 visible part of the unit.
1597 * bindo-augmentors.adb: Remove the use of global data as it is
1598 bad practice.
1599 (Augment_Library_Graph): Update the parameter profile.
1600 (Is_Visited, Set_Is_Visited): Remove.
1601 (Visit_Elaboration_Root, Visit_Elaboration_Roots): Update the
1602 parameter profile and comment on usage.
1603 (Visit_Vertex): Likewise. Also keep track of which invocation
1604 edge activates a task.
1605 * bindo-augmentors.ads (Augment_Library_Graph): Update the
1606 parameter profile and comment on usage.
1607 * bindo-builders.adb (Create_Forced_Edge,
1608 Create_Spec_And_Body_Edge, Create_With_Edge): Update the call to
1609 Add_Edge.
1610 * bindo-diagnostics.adb: Add with end use clauses for Restrict
1611 and Rident.
1612 (Output_Dynamic_Model_Suggestions): Remove.
1613 (Output_Invocation_Related_Suggestions): New routine.
1614 (Output_Suggestions): Output all invocation-related suggestions
1615 together.
1616 * bindo-elaborators.adb: Remove types Comparator_Ptr and
1617 Predicate_Ptr.
1618 (Find_Best_Vertex): Update the parameter profile.
1619 * bindo-graphs.adb (Activates_Task): New routine.
1620 (Add_Body_Before_Spec_Edge): Update the call to
1621 Add_Edge_With_Return.
1622 (Add_Edge): Update the parameter profile and the call to
1623 Add_Edge_With_Return.
1624 (Add_Edge_With_Return): Update the parameter profile and comment
1625 on usage.
1626 (At_Least_One_Edge_Satisfies): New routine.
1627 (Contains_Elaborate_All_Edge): Reimplement.
1628 (Contains_Static_Successor_Edge, Contains_Task_Activation): New
1629 routine.
1630 (Contains_Weak_Static_Successor): Remove.
1631 (Is_Static_Successor_Edge): New routine.
1632 * bindo-graphs.ads: Add types LGE_Predicate_Ptr,
1633 LGV_Comparator_Ptr, and LGV_Predicate_Ptr. Update type
1634 Library_Graph_Edge_Attributes to capture whether an invocation
1635 edge activates a task. Update the value of
1636 No_Library_Graph_Edge_Attributes.
1637 (Activates_Task): Update the parameter profile and comment on
1638 usage.
1639 (Contains_Static_Successor_Edge, Contains_Task_Activation): New
1640 routines.
1641 (Contains_Weak_Static_Successor): Remove.
1642 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst:
1643 Update the documentation to reflect the new task-related advice.
1644 * gnat_ugn.texi: Regenerate.
1645
1646 2019-07-09 Piotr Trojanek <trojanek@adacore.com>
1647
1648 * exp_util.adb (Containing_Package_With_Ext_Axioms): Replace
1649 low-level Ekind test with a high-level wrapper.
1650
1651 2019-07-09 Arnaud Charlet <charlet@adacore.com>
1652
1653 * libgnat/s-memory.adb: Disable calls to Abort defer/undefer
1654 when ZCX_By_Default.
1655
1656 2019-07-09 Javier Miranda <miranda@adacore.com>
1657
1658 * sem_ch13.adb (Rep_Item_Too_Early): Representation clauses are
1659 not allowed for a derivation of a generic type. Extend the
1660 current test to check that none of the parents is a generic
1661 type.
1662
1663 2019-07-09 Hristian Kirtchev <kirtchev@adacore.com>
1664
1665 * exp_ch9.adb, exp_util.adb, repinfo.adb, sem_ch12.adb,
1666 sem_prag.adb, sem_res.adb, sem_spark.adb, sem_util.adb: Minor
1667 reformatting.
1668
1669 2019-07-09 Ed Schonberg <schonberg@adacore.com>
1670
1671 * sem_res.adb (Resolve_Equality_Op): If the node was overloaded,
1672 set properly the entity to which the node has been resolved. The
1673 original entity is the first one found during analysis, and is
1674 not necessarily the resolved one.
1675 (Resolve_Op_Not): If the argument of negation is an overloaded
1676 equality operation, call its resolution directly given that the
1677 context type does not participate in overload resolution.
1678
1679 2019-07-09 Hristian Kirtchev <kirtchev@adacore.com>
1680
1681 * bindo.adb: Remove with and use clauses for Debug. Add with
1682 and use clauses for Opt.
1683 (Find_Elaboration_Order): Enable the v4.0 elaboration order. The
1684 v3.0 mechanism is now available under binder switch -H.
1685 * bindusg.adb (Display): Enable switch -H.
1686 * debug.adb: Free compiler switch -gnatd_G. Free binder switch
1687 -d_N.
1688 * sem_elab.adb: Update the section on switches to remove
1689 -gnatd_G.
1690 (Invocation_Graph_Recording_OK): The invocation graph is now
1691 unconditionally recorded in ALI files.
1692 * switch-b.adb (Scan_Binder_Switches): Scan switch -H.
1693 * doc/gnat_ugn/building_executable_programs_with_gnat.rst:
1694 Update the documentation on compiler switches related to
1695 elaboration. Update the documentation on binder switches to
1696 include switch -H.
1697 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update
1698 the documentation on elaboration order handling in GNAT.
1699 * gnat_ugn.texi: Regenerate.
1700
1701 2019-07-09 Eric Botcazou <ebotcazou@adacore.com>
1702
1703 * repinfo.adb (List_Entities): Disregard formals altogether.
1704 (List_Name): Properly escape the double quote in the JSON
1705 output.
1706
1707 2019-07-09 Javier Miranda <miranda@adacore.com>
1708
1709 * exp_util.adb (Remove_Side_Effects): Preserve the
1710 Do_Range_Check flag.
1711
1712 2019-07-09 Yannick Moy <moy@adacore.com>
1713
1714 * sinfo.ads: Refine comment for Do_Range_Check.
1715
1716 2019-07-09 Yannick Moy <moy@adacore.com>
1717
1718 * exp_spark.adb (Expand_SPARK_N_Attribute_Reference): Expand
1719 attribute reference on Enum_Rep.
1720
1721 2019-07-09 Ed Schonberg <schonberg@adacore.com>
1722
1723 * sem_ch12.adb (Instantiate_Formal_Package): Handle properly the
1724 case where the actual for a formal package in an instance is the
1725 current instance of an enclosing generic package.
1726 (Check_Formal_Packages): If the formal package declaration is
1727 box-initialized or lacks associations altogether, no internal
1728 instance was created to verify conformance, and there is no
1729 validating package to remove from tree.
1730
1731 2019-07-09 Yannick Moy <moy@adacore.com>
1732
1733 * freeze.adb (Build_Renamed_Body): Do not set body to inline in
1734 GNATprove mode.
1735
1736 2019-07-09 Yannick Moy <moy@adacore.com>
1737
1738 * exp_util.adb (Expand_Subtype_From_Expr): Still expand the type
1739 of static expressions in GNATprove_Mode.
1740 * sem_ch3.adb (Analyze_Object_Declaration): Remove obsolete
1741 special case for GNATprove_Mode.
1742
1743 2019-07-09 Piotr Trojanek <trojanek@adacore.com>
1744
1745 * doc/gnat_rm/the_gnat_library.rst,
1746 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
1747 erroutc.adb, libgnat/g-comlin.adb, libgnat/g-comlin.ads,
1748 libgnat/g-regexp.ads, libgnat/g-regpat.ads,
1749 libgnat/g-spipat.ads, libgnat/s-os_lib.ads,
1750 libgnat/s-regexp.ads: Reword "wild card" to "wildcard".
1751 * gnat_rm.texi, gnat_ugn.texi: Regenerate.
1752
1753 2019-07-09 Yannick Moy <moy@adacore.com>
1754
1755 * sem_spark.adb (Check_Expression): Handle correctly implicit
1756 assignments as part of allocators and (extension) aggregates.
1757 (Get_Root_Object): Adapt for new path expressions.
1758 (Is_Path_Expression): Return True for (extension) aggregate.
1759
1760 2019-07-09 Piotr Trojanek <trojanek@adacore.com>
1761
1762 * einfo.ads: Fix a typo.
1763
1764 2019-07-09 Ed Schonberg <schonberg@adacore.com>
1765
1766 * sem_util.adb (Scope_Within_Or_Same): Handle properly task
1767 bodies and protected bodies, so that local variables within have
1768 their proper scopes after these constructs have been rewritten
1769 during expansion. This patch resembles but is not identical to
1770 the code in Scope_Within.
1771
1772 2019-07-09 Arnaud Charlet <charlet@adacore.com>
1773
1774 * gnat1drv.adb (Adjust_Global_Switches): Set
1775 Dynamic_Elaboration_Checks to True in CodePeer mode.
1776
1777 2019-07-09 Yannick Moy <moy@adacore.com>
1778
1779 * sem_spark.adb (Get_Perm_Or_Tree): Issue an error when
1780 encountering unknown global variable.
1781
1782 2019-07-09 Yannick Moy <moy@adacore.com>
1783
1784 * sem_spark.adb (Check_Expression): Change signature to take an
1785 Extended_Checking_Mode, for handling read permission checking of
1786 sub-expressions in an assignment.
1787 (Check_Parameter_Or_Global): Adapt to new behavior of
1788 Check_Expression for mode Assign.
1789 (Check_Safe_Pointers): Do not analyze generic bodies.
1790 (Check_Assignment): Separate checking of the target of an
1791 assignment.
1792
1793 2019-07-09 Eric Botcazou <ebotcazou@adacore.com>
1794
1795 * repinfo.ads (JSON format): Adjust.
1796 * repinfo.adb (Need_Blank_Line): Rename to...
1797 (Need_Separator): ...this.
1798 (Blank_Line): Rename to...
1799 (Write_Separator): ...this and add JSON specific handling.
1800 (List_Array_Info): Adjust to above renaming.
1801 (List_Object_Info): Likewise.
1802 (List_Record_Info): Likewise.
1803 (List_Subprogram_Info): Likewise.
1804 (List_Type_Info): Likewise.
1805 (List_Entities): Do not set Need_Blank_Line.
1806 (List_Rep_Info): Set Need_Separator and add JSON specific
1807 handling. Output a single JSON stream in the normal case.
1808
1809 2019-07-09 Arnaud Charlet <charlet@adacore.com>
1810
1811 * doc/gnat_ugn/the_gnat_compilation_model.rst: Update doc on
1812 -fdump-ada-spec now that we generate Ada 2012.
1813 * gnat_ugn.texi: Regenerate.
1814
1815 2019-07-08 Eric Botcazou <ebotcazou@adacore.com>
1816
1817 * repinfo.adb (List_Common_Type_Info): New procedure extracted
1818 from...
1819 (List_Type_Info): ...here. Call it for the common information,
1820 start with a blank line and output the linker section at the
1821 end, if any.
1822 (List_Mechanisms): Rename to...
1823 (List_Subprogram_Info): ...this.
1824 (List_Array_Info): Call List_Common_Type_Info.
1825 (List_Entities): Adjust to above change and renaming.
1826 (List_Record_Info): Call List_Common_Type_Info.
1827
1828 2019-07-08 Dmitriy Anisimkov <anisimko@adacore.com>
1829
1830 * libgnat/g-sercom.ads
1831 (Serial_Port_Descriptor): New type.
1832 (Serial_Port): Add a comment, make it hold a
1833 Serial_Port_Descriptor.
1834 (To_Ada, To_C): New procedures.
1835 (Port_Data, Port_Data_Access): Remove types.
1836 * libgnat/g-sercom.adb (To_Ada): New stub.
1837 * libgnat/g-sercom__linux.adb, libgnat/g-sercom__mingw.adb:
1838 Update implementations accordingly.
1839 * s-oscons-tmplt.c: Bind Serial_Port_Descriptor to
1840 System.Win32.HANDLE on Windows, and to Interfaces.C.int on
1841 Linux. Add "Interfaces.C." prefix for other basic integer type
1842 bindings.
1843 * xoscons.adb (Output_Info): Remove the "Interfaces.C." prefix
1844 for subtypes generation.
1845
1846 2019-07-08 Arnaud Charlet <charlet@adacore.com>
1847
1848 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
1849 Update documentation on No_Exceptions restriction.
1850 * gnat_rm.texi: Regenerate.
1851
1852 2019-07-08 Dmitriy Anisimkov <anisimko@adacore.com>
1853
1854 * libgnat/s-os_lib.adb: Do not call __gnat_kill for Invalid_Pid.
1855
1856 2019-07-08 Piotr Trojanek <trojanek@adacore.com>
1857
1858 * sem_util.adb (Enclosing_Package_Or_Subprogram): Do not expect
1859 package and subprogram bodies.
1860
1861 2019-07-08 Bob Duff <duff@adacore.com>
1862
1863 * doc/gnat_ugn/gnat_utility_programs.rst: Remove documentation
1864 of ignored GNATpp switch.
1865
1866 2019-07-08 Hristian Kirtchev <kirtchev@adacore.com>
1867
1868 * doc/gnat_rm/implementation_defined_pragmas.rst:
1869 Update the documentation of pragma Initialize_Scalars.
1870 * gnat_rm.texi: Regenerate.
1871
1872 2019-07-08 Javier Miranda <miranda@adacore.com>
1873
1874 * exp_ch4.adb (Tagged_Membership): Fix regression silently
1875 introduced in r260738 that erroneouslusy causes the evaluation
1876 to True of the membership test when the left operand of the
1877 membership test is a class-wide interface object and the right
1878 operand is a type that implements such interface type.
1879
1880 2019-07-08 Hristian Kirtchev <kirtchev@adacore.com>
1881
1882 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
1883 register an address clause when its prefix denotes a generic
1884 formal object.
1885
1886 2019-07-08 Hristian Kirtchev <kirtchev@adacore.com>
1887
1888 * bindo-diagnostics.adb (Diagnose_Cycle): Capture the presence
1889 of an Elaborate_All edge before iterating over the edges of the
1890 cycle.
1891 (Output_Elaborate_Body_Transition): Update the parameter profile
1892 and the comment on usage. Add a missing case where the edge is
1893 within the context of an Elaborate_All.
1894 (Output_Transition): Update the call to
1895 Output_Elaborate_Body_Transition.
1896 * bindo-graphs.ads, bindo-graphs.adb
1897 (Contains_Elaborate_All_Edge): New routine.
1898
1899 2019-07-08 Piotr Trojanek <trojanek@adacore.com>
1900
1901 * lib-xref-spark_specific.adb (Create_Heap): Set dummy Etype for
1902 the fake __HEAP entity.
1903
1904 2019-07-08 Daniel Mercier <mercier@adacore.com>
1905
1906 * gnat1drv.adb: Suppress warnings on memory representation in
1907 CodePeer compiler mode.
1908
1909 2019-07-08 Nicolas Roche <roche@adacore.com>
1910
1911 * rtinit.c (__gnat_runtime_initialize): Remove dependency on
1912 CommandLineToArgvW.
1913
1914 2019-07-08 Doug Rupp <rupp@adacore.com>
1915
1916 * Makefile.rtl: Handle vxworks7r2 in x86_64 and x86 vxworks7.
1917
1918 2019-07-08 Dmitriy Anisimkov <anisimko@adacore.com>
1919
1920 * Makefile.rtl: Use g-sercom__linux.adb for all linuxes.
1921
1922 2019-07-08 Yannick Moy <moy@adacore.com>
1923
1924 * expander.adb (Expand): Do not reset Analyzed flag always.
1925 * sem_eval.adb (Fold_Ureal): Mark node as analyzed.
1926
1927 2019-07-08 Ed Schonberg <schonberg@adacore.com>
1928
1929 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Do not insert twice
1930 the assignment statement that computes the delay value, to
1931 prevent improper tree sharing when the value is a type
1932 conversion and Float_Overflow checks are enabled.
1933
1934 2019-07-08 Hristian Kirtchev <kirtchev@adacore.com>
1935
1936 * bindo.adb: Update the section on terminology to include new
1937 concepts. Update the section on switches to include new
1938 entries.
1939 * bindo.ads: Add type Precedence_Kind.
1940 * bindo-builders.adb: Add with and use clauses for Debug and
1941 Bindo.Validators. Add use clauses for
1942 Bindo.Validators.Invocation_Graph_Validators and
1943 Bindo.Validators.Library_Graph_Validators.
1944 (Build_Invocation_Graph): Validate the graph immediately after
1945 it was built.
1946 (Build_Library_Graph): Update the parameter profile. The
1947 creation of the graph is now elaboration model-agnostic.
1948 Validate the graph immediately after it was built.
1949 (Create_With_Edge): Create regular with edges for Elaborate and
1950 Elaborate_All edges when the appropriate debug switches are in
1951 effect.
1952 * bindo-builders.ads (Build_Library_Graph): Update the parameter
1953 profile.
1954 * bindo-diagnostics.adb (Diagnose_Cycle): Track the presence of
1955 an Elaborate_All edge throughout the inspection of the cycle's
1956 edges.
1957 (Output_Dynamic_Model_Suggestions): Output the suggestion only
1958 when the cycle contains at least one weak edge where the
1959 successor was statically elaborated.
1960 (Output_Elaborate_Body_Transition, Output_Forced_Transition,
1961 Output_With_Transition): Update the assertions.
1962 * bindo-elaborators.adb: Remove use clauses for
1963 Bindo.Validators.Invocation_Graph_Validators and
1964 Bindo.Validators.Library_Graph_Validators. Remove strings
1965 Add_To_All_Candidates_Msg and Add_To_Comp_Candidates_Msg.
1966 Remove type String_Ptr.
1967 (Add_Vertex, Add_Vertex_If_Elaborable, Create_All_Candidates_Set
1968 Create_Component_Candidates_Set): Remove.
1969 (Create_Component_Vertex_Sets, Create_Vertex_Sets): New routine.
1970 (Elaborate_Component): Update the parameter profile and the
1971 comment on usage. Reimplement the elaboration of a component.
1972 The algorithm will now attempt to elaborate as many vertices
1973 possible. If this is not possible, and a weakly elaborable
1974 vertex is available use unit was compiled using the dynamic
1975 model, the algorithm will elaborate it.
1976 (Elaborate_Library_Graph): Reimplement the elaboration of the
1977 graph. The algorithm will now attempt to elaborate as many
1978 vertices along with their components as possible. If this is not
1979 possible, and a weakly elaborable vertex is available use unit
1980 was compiled using the dynamic model, the algorithm will
1981 elaborate it along with its component.
1982 (Elaborate_Units): Merge with the functionality of
1983 Elaborate_Units_Common.
1984 (Elaborate_Units_Common, Elaborate_Units_Dynamic,
1985 Elaborate_Units_Static): Remove.
1986 (Elaborate_Vertex): Update the parameter profile and the comment
1987 on usage. Reimplemented.
1988 (Find_Best_Candidate): Remove.
1989 (Find_Best_Elaborable_Vertex, Find_Best_Vertex,
1990 Find_Best_Weakly_Elaborable_Vertex, Has_Elaborable_Body,
1991 Insert_Elaborable_Successor, Insert_Vertex): New routines.
1992 (Is_Better_Candidate): Remove.
1993 (Is_Better_Elaborable_Vertex,
1994 Is_Better_Weakly_Elaborable_Vertex,
1995 Is_Suitable_Elaborable_Vertex,
1996 Is_Suitable_Weakly_Elaborable_Vertex): New routines.
1997 (Trace_Candidate_Vertices): Remove.
1998 (Trace_Component): Output the number of strong and weak
1999 predecessors.
2000 (Trace_Unelaborated_Vertices): Remove.
2001 (Trace_Vertex): Output the number of strong and weak
2002 predecessors.
2003 (Trace_Vertices): New routine.
2004 (Update_Successor, Update_Successors): Update the parameter
2005 profile and the comment on usage.
2006 * bindo-graphs.adb: Remove type Precedence_Kind.
2007 (Add_Edge_With_Return): Update the increment of pending
2008 predecessors.
2009 (Add_Vertex): Provide default values for strong and weak
2010 predecessors.
2011 (Complementary_Vertex): Move the initial declaration to the
2012 spec. Update the parameter profile and the comment on usage.
2013 (Contains_Weak_Static_Successor): New routine.
2014 (Create): Update the parameter profile. The creation of the
2015 graph is now elaboration model-agnostic.
2016 (Decrement_Pending_Predecessors): Update the parameter profile
2017 and the comment on usage. Reimplemented.
2018 (Delete_Edge): Update the decrement of pending predecesors.
2019 (Has_Elaborate_Body): Do not treat a vertex as being subject to
2020 Elaborate_Body when a debug switch is in effect.
2021 (Increment_Pending_Predecessors): Update the parameter profile
2022 and the comment on usage. Reimplemented.
2023 (Is_Elaborable_Component): Reimplemented.
2024 (Is_Elaborable_Vertex): Move the initial declaration to the
2025 spec. Reimplemented.
2026 (Is_Elaborate_Body_Pair): New routine.
2027 (Is_Dynamically_Elaborated): Update the parameter profile.
2028 Reimplemented.
2029 (Is_Weakly_Elaborable_Vertex): New routine.
2030 (Pending_Predecessors): Removed.
2031 (Pending_Predecessors_For_Elaboration,
2032 Pending_Strong_Predecessors, Pending_Weak_Predecessors,
2033 Update_Pending_Predecessors): New routines.
2034 (Update_Pending_Predecessors_Of_Components): Update the
2035 increment of pending predecessors.
2036 * bindo-graphs.ads: Update the components of type
2037 Component_Attributes. Update the components of type
2038 Library_Graph_Attributes. Update the components of type
2039 Library_Graph_Vertex_Attributes. Update the initialization of
2040 No_Component_Attributes. Update the initialization of
2041 No_Library_Graph_Vertex_Attributes.
2042 (Complementary_Vertex, Contains_Weak_Static_Successor): New
2043 routines.
2044 (Create): Update the parameter profile and the comment on usage.
2045 (Decrement_Pending_Predecessors, Is_Dynamically_Elaborated):
2046 Update the parameter profile and the comment on usage.
2047 (Is_Elaborate_Body_Pair, Is_Weakly_Elaborable_Vertex): New
2048 routines.
2049 (Pending_Predecessors): Removed.
2050 (Pending_Predecessors_For_Elaboration,
2051 Pending_Strong_Predecessors, Pending_Weak_Predecessors): New
2052 routines.
2053 * bindo-writers.adb (Write_Components): Moved from the spec.
2054 (Write_Component): Output the strong and weak predecessors.
2055 (Write_Library_Graph): Output the components as part of the
2056 graph.
2057 (Write_Library_Graph_Vertex): Output the strong and weak
2058 predecessors.
2059 * bindo-writers.ads (Write_Components): Moved to the body.
2060 * debug.adb: Add and document new GNATbind switches -d_a, -d_b,
2061 -d_e.
2062 * bindo-validators.adb: Minor reformattings.
2063
2064 2019-07-08 Bob Duff <duff@adacore.com>
2065
2066 * libgnat/g-sercom.ads, libgnat/g-sercom__linux.adb (Data_Rate):
2067 Support additional data rates.
2068
2069 2019-07-08 Olivier Hainque <hainque@adacore.com>
2070
2071 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Don't request
2072 DECL_ARTIFICIAL_P on elab proc declarations.
2073
2074 2019-07-08 Eric Botcazou <ebotcazou@adacore.com>
2075
2076 * repinfo.adb (List_Record_Info): Declare Incomplete_Layout and
2077 Not_In_Extended_Main local exceptions.
2078 (List_Structural_Record_Layout): For an extension, raise the
2079 former if the parent subtype has not been built and the latter
2080 if it is not declared in the main source unit. Fall back to the
2081 flat layout if either exception has been raised.
2082
2083 2019-07-08 Ed Schonberg <schonberg@adacore.com>
2084
2085 * libgnat/a-strfix.adb (Delete): The RM describes the semantics
2086 of Delete as equivalent to that of Replace_String with a null
2087 argument. As a result, deleting a null string that starts past
2088 the end of its argument is a noop and must not raise
2089 Index_Error.
2090
2091 2019-07-08 Javier Miranda <miranda@adacore.com>
2092
2093 * exp_disp.adb (Register_Primitive): When registering a
2094 primitive in the secondary dispatch table, handle primitive
2095 inherited through several levels of type derivation (required to
2096 properly handle inherited 'null' primitive).
2097
2098 2019-07-08 Bob Duff <duff@adacore.com>
2099
2100 * doc/gnat_ugn/gnat_utility_programs.rst: Document handling of
2101 preprocessor directives in GNATpp.
2102
2103 2019-07-08 Javier Miranda <miranda@adacore.com>
2104
2105 * gnat1drv.adb (Post_Compilation_Validation_Checks:
2106 Validate_Compile_Time_Warning_Errors is now located in sem_prag
2107 (instead of sem_ch13).
2108 * sem_ch13.ads (Validate_Compile_Time_Warning_Error,
2109 Validate_Compile_Time_Warning_Errors): Move to sem_prag.
2110 * sem_ch13.adb
2111 (Compile_Time_Warnings_Errors): Move to sem_prag.
2112 (Initialize): Remove initialization of table
2113 Compile_Time_Warning_Errors.
2114 (Validate_Compile_Time_Warning_Error,
2115 Validate_Compile_Time_Warning_Errors): Move to sem_prag.
2116 * sem_prag.ads (Validate_Compile_Time_Warning_Errors): New
2117 procedure.
2118 * sem_prag.adb (Initialize): Initialize table
2119 Compile_Time_Warning_Errors.
2120
2121 2019-07-08 Ed Schonberg <schonberg@adacore.com>
2122
2123 * sem_ch13.adb (Analyze_Aspect_Specifications): For a
2124 pre/postcondition of a generic subprogram declaration, do not
2125 use Relocate_Node on the aspect expression to construct the
2126 corresponding attribute specification, to prevent tree anomalies
2127 when the expression is a call with named actual parameters.
2128
2129 2019-07-08 Javier Miranda <miranda@adacore.com>
2130
2131 * sem_attr.adb (Analyze_Attribute [Attribute_Size]): For pragmas
2132 used to report user defined compile time warning or errors
2133 handle 'Size for types with known static RM size.
2134
2135 2019-07-08 Justin Squirek <squirek@adacore.com>
2136
2137 * exp_imgv.adb (Build_Enumeration_Image_Tables): Default SSO for
2138 the building of image tables.
2139 (Expand_Image_Attribute): Minor cleanup.
2140
2141 2019-07-08 Dmitriy Anisimkov <anisimko@adacore.com>
2142
2143 * libgnat/g-socket.ads, libgnat/g-socket.adb: Improve
2144 documentation.
2145 (Get_Socket_Option, Set_Socket_Option): Remove default value for
2146 the Level formal.
2147
2148 2019-07-08 Ed Schonberg <schonberg@adacore.com>
2149
2150 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): For an
2151 unanalized aspect in a generic context that has not been
2152 analyzed yet, if the aspect applies to a type, place the type on
2153 the scope stack to make its components visible, before checking
2154 conformance with the version of the expression analyzed at the
2155 freeze point.
2156
2157 2019-07-05 Justin Squirek <squirek@adacore.com>
2158
2159 * checks.adb (Apply_Accessibility_Check): Add logic to fetch the
2160 function result accessibility level if one is required within
2161 the generated check.
2162 * exp_ch6.adb (Needs_Result_Accessibility_Level): Modify
2163 controlling elsif block to handle more cases such as anonymous
2164 access results and disable checking for coextensions.
2165
2166 2019-07-05 Ed Schonberg <schonberg@adacore.com>
2167
2168 * sem_ch9.adb (Analyze_Accept_Statement): If this is an illegal
2169 accept statement for an enclosing entry abandon analysis to
2170 prevent scope mismatches and potential infinite loops in
2171 compiler.
2172
2173 2019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
2174
2175 * ali.adb (For_Each_Invocation_Construct,
2176 For_Each_Invocation_Relation): New version.
2177 (Scan_ALI): Initialize field Invocation_Graph_Encoding.
2178 (Set_Invocation_Graph_Encoding): Update the setting of the
2179 invocation graph encoding.
2180 * ali.ads: Move field Invocation_Graph_Encoding from Unit_Record
2181 to ALI_Record because the encoding applies to the whole ALI,
2182 rather than one of the units (spec or body) for which the ALI
2183 file was created.
2184 (For_Each_Invocation_Construct, For_Each_Invocation_Relation):
2185 New version.
2186 * bindo.adb: Update the section on switches. Complete the
2187 section of debugging elaboration order issues.
2188 (Find_Elaboration_Order): Prepare the routine for the switch
2189 from the old to the new elaboration order mechanism.
2190 * bindo-diagnostics.adb (Find_And_Output_Invocation_Paths):
2191 Manage a visited set used by Visit_Vertex.
2192 (Output_All_Cycles_Suggestions,
2193 Output_Dynamic_Model_Suggestions): Clarify the nature of the
2194 suggested switch.
2195 (Output_Elaborate_Body_Transition): Update the diagnostic to
2196 emit a better message.
2197 (Output_Forced_Suggestions, Output_Full_Encoding_Suggestions):
2198 Clarify the nature of the suggested switch.
2199 (Visit_Vertex): Update the parameter profile to add a set of
2200 invokers visited during the transition. This set prevents
2201 infinite exploration of the graph in case the invocations are
2202 recursive.
2203 * bindo-elaborators.adb: Add a use clause for
2204 Bindo.Writers.Dependency_Writers.
2205 (Elaborate_Units_Common): Output the library graph after it has
2206 been augmented with invocation edges. Output just the components
2207 instead of outputting the whole library graph again.
2208 (Elaborate_Units_Dynamic, Elaborate_Units_Static): Output the
2209 dependencies as expressed in the library graph.
2210 * bindo-units.adb (Invocation_Graph_Encoding): Update the
2211 extraction of the invocation graph encoding.
2212 * bindo-writers.adb: Add with and use clauses for Binderr and
2213 Butil.
2214 (palgc, plgc): New debug routine.
2215 (Write_Components): Moved to the spec. Add a header for the
2216 output.
2217 (Write_Dependencies, Write_Dependencies_Of_Vertex,
2218 Write_Dependency_Edge): New routine.
2219 (Write_Elaboration_Order): Update the logic to follow the format
2220 of Binde's order output.
2221 (Write_Library_Graph): Do not output the components every time
2222 the graph is written.
2223 (Write_Unit): Output the invocation graph encoding of the unit.
2224 Output the invocation constructs and relations for the unit
2225 only.
2226 * bindo-writers.ads (Write_Components): Moved from the body.
2227 (Write_Dependencies): New routine.
2228 * bindusg.adb: Prepare the routine for the switch from the old
2229 to the new elaboration order mechanism.
2230 * debug.adb: Binder switch -d_O is now not associated with any
2231 functionality.
2232 * einfo.adb (Is_Elaboration_Target): The attribute applies to
2233 packages, as specified by the comment on the attribute usage.
2234 * opt.ads: Add a global flag which controls the choice between
2235 the new and the legacy elaboration order mechanism.
2236 * sem_elab.adb: Add Package_Target to type Target_Kind.
2237 (Build_Elaborate_Body_Procedure, Build_Elaborate_Procedure,
2238 Build_Elaborate_Spec_Procedure, Check_Elaboration_Scenarios,
2239 Check_SPARK_Model_In_Effect): Use Main_Unit_Entity to obtain the
2240 entity of the main unit.
2241 (Create_Package_Rep): New routine.
2242 (Create_Target_Rep): Add processing for packages.
2243 (Declaration_Placement_Of_Node, Has_Prior_Elaboration): Use
2244 Main_Unit_Entity to obtain the entity of the main
2245 unit.
2246 (Invocation_Graph_Recording_OK): Prepare the routine for the
2247 switch from the old to the new elaboration order mechanism.
2248 (Main_Unit_Entity): New routine.
2249 (Meet_Elaboration_Requirement,
2250 Process_Conditional_ABE_Variable_Reference): Use
2251 Main_Unit_Entity to obtain the entity of the main unit.
2252 (Process_Invocation_Instantiation): New routine.
2253 (Process_Invocation_Scenario): Add processing for
2254 instantiations.
2255 * switch-b.adb (Scan_Binder_Switches): Prepare the routine for
2256 the switch from the old to the new elaboration order mechanism.
2257
2258 2019-07-05 Joffrey Huguet <huguet@adacore.com>
2259
2260 * libgnat/a-textio.adb: Add abstract state refinment.
2261 * libgnat/a-textio.ads: Add File_System abstract state. Add
2262 global contracts, contract cases, preconditions and
2263 postconditions to procedures and functions.
2264 (Set_Input, Set_Output, Set_Error, Standard_Input,
2265 Standard_Output, Standard_Error, Current_Input, Current_Output,
2266 Current_Error): Turn SPARK_Mode off.
2267 (Get_Line): Turn SPARK_Mode off on Get_Line functions.
2268 * libgnat/a-tideio.ads, libgnat/a-tienio.ads,
2269 libgnat/a-tifiio.ads, libgnat/a-tiflio.ads,
2270 libgnat/a-tiinio.ads, libgnat/a-timoio.ads: Add global
2271 contracts, contract cases, preconditions and postconditions to
2272 procedures and functions.
2273
2274 2019-07-05 Arnaud Charlet <charlet@adacore.com>
2275
2276 * doc/gnat_ugn/platform_specific_information.rst: Refresh doc on
2277 installing from the command line on Windows. Remove obsolete
2278 part.
2279 * gnat_ugn.texi: Regenerate.
2280
2281 2019-07-05 Vasiliy Fofanov <fofanov@adacore.com>
2282
2283 * libgnat/a-wichha.ads (Is_Alphanumeric): Replace comment with
2284 the correct one. Also capitalize references to False
2285 throughout.
2286
2287 2019-07-05 Eric Botcazou <ebotcazou@adacore.com>
2288
2289 * exp_ch4.adb (Expand_N_Indexed_Component): Do not expand actual
2290 parameters of function calls here either.
2291
2292 2019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
2293
2294 * bindo-units.adb, checks.adb, exp_attr.adb, exp_ch3.adb,
2295 exp_ch4.adb, exp_pakd.adb, lib-writ.adb, libgnat/g-traceb.adb,
2296 libgnat/g-traceb.ads, libgnat/s-stratt.ads, sem_aux.ads,
2297 sem_util.adb: Minor reformatting.
2298
2299 2019-07-05 Ed Schonberg <schonberg@adacore.com>
2300
2301 * sem_ch13.adb (Build_Predicate_Functions): If a subtype that
2302 carries a static predicate aspect is frozen immediately after
2303 its declaration, ensure that the generated function body created
2304 for predicate checking is inserted after the corresponding
2305 subprogram declaration, which is created at the point the
2306 declaration is elaborated.
2307
2308 2019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
2309
2310 * exp_ch7.adb (Cleanup_Record): Use the underlying type when
2311 checking for components with tasks.
2312
2313 2019-07-05 Arnaud Charlet <charlet@adacore.com>
2314
2315 * libgnarl/s-osinte__linux.ads: Link with -lrt before -lpthread.
2316
2317 2019-07-05 Ed Schonberg <schonberg@adacore.com>
2318
2319 * exp_pakd.adb (Expand_Bit_Packed_Element_Set): Add explicit
2320 range checks when the index type of the bit-packed array is an
2321 enumeration type with a non-standard representation,
2322
2323 2019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
2324
2325 * sem_res.adb (Is_Control_Flow_Statement): Delay statements
2326 contain an expression, which in turn may have side effects and
2327 affect the infinite recursion. As a result, delay statements
2328 should not be treated specially.
2329
2330 2019-07-05 Arnaud Charlet <charlet@adacore.com>
2331
2332 * libgnarl/s-linux.ads, libgnarl/s-linux__alpha.ads,
2333 libgnarl/s-linux__android.ads, libgnarl/s-linux__hppa.ads,
2334 libgnarl/s-linux__mips.ads, libgnarl/s-linux__riscv.ads,
2335 libgnarl/s-linux__sparc.ads: Fix typos in comments.
2336
2337 2019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
2338
2339 * sem_res.adb (Check_Infinite_Recursion): Reimplemented.
2340 (Enclosing_Declaration_Or_Statement,
2341 Invoked_With_Different_Arguments, Is_Conditional_Statement,
2342 Is_Control_Flow_Statement, Is_Immediately_Within_Body,
2343 Is_Raise_Idiom, Is_Raise_Statement, Is_Sole_Statement,
2344 Preceded_By_Control_Flow_Statement,
2345 Within_Conditional_Statement): New routines.
2346
2347 2019-07-05 Javier Miranda <miranda@adacore.com>
2348
2349 * exp_ch4.adb (Expand_N_Type_Conversion): Do not apply an
2350 accessibility check when the conversion is an access to
2351 class-wide interface type and it is an actual parameter.
2352 * exp_ch6.adb (Expand_Call_Helper): Add documentation on the
2353 accessibility level of an anonymous allocator defining the value
2354 of an access parameter.
2355 * sem_util.ads, sem_util.adb (Dynamic_Accessibility_Level): Add
2356 support for an anonymous allocator whose type is that of a
2357 stand-alone object of an anonymous access to object type.
2358
2359 2019-07-05 Piotr Trojanek <trojanek@adacore.com>
2360
2361 * einfo.ads, sem_res.adb: Typo fixes in comments.
2362
2363 2019-07-05 Bob Duff <duff@adacore.com>
2364
2365 * exp_ch6.adb (Is_Build_In_Place_Function): Narrow the check for
2366 Has_Foreign_Convention to the imported case only. If a
2367 build-in-place function is exported, and called from Ada code,
2368 build-in-place protocols should be used.
2369
2370 2019-07-05 Ed Schonberg <schonberg@adacore.com>
2371
2372 * sem_util.adb (Encloing_Subprogram): If Enclosing_Dynamic_Scope
2373 is a loop, continue climbing the scope stack to find the
2374 enclosing subprogram.
2375 (Gather_Components): Handle properly a choice in a record
2376 aggregate that is given by a subtype with a static predicate.
2377
2378 2019-07-05 Javier Miranda <miranda@adacore.com>
2379
2380 * debug.adb (-gnatd.K): Leave available this switch.
2381 * contracts.adb (Build_And_Analyze_Contract_Only_Subprograms):
2382 Remove.
2383 * scil_ll.ads, scil_ll.adb (Contract_Only_Body_Flag,
2384 Contract_Only_Body_Nodes, Get_Contract_Only_Body,
2385 Is_Contract_Only_Body, Set_Contract_Only_Body): Remove.
2386
2387 2019-07-05 Pierre-Marie de Rodat <derodat@adacore.com>
2388
2389 * libgnat/a-strunb.ads: Import documentation from the RM
2390
2391 2019-07-05 Pierre-Marie de Rodat <derodat@adacore.com>
2392
2393 * libgnat/a-strfix.ads: Import documentation from the RM
2394
2395 2019-07-05 Yannick Moy <moy@adacore.com>
2396
2397 * adabkend.adb (Scan_Back_End_Switches): Accept -Og and -Ofast
2398 switches.
2399
2400 2019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
2401
2402 * ali.adb: Relocate types Invocation_Construct_Record,
2403 Invocation_Relation_Record, and Invocation_Signature_Record to
2404 the body of ALI. Relocate tables Invocation_Constructs,
2405 Invocation_Relations, and Invocation_Signatures to the body of
2406 ALI. Remove type Body_Placement_Codes. Add new types
2407 Declaration_Placement_Codes, and
2408 Invocation_Graph_Encoding_Codes. Update the literals of type
2409 Invocation_Graph_Line_Codes.
2410 (Add_Invocation_Construct): Update the parameter profile. Add an
2411 invocation construct built from all attributes provided.
2412 (Add_Invocation_Relation): Update the parameter profile. Add an
2413 invocation relation built from all attributes provided.
2414 (Body_Placement): New routine.
2415 (Body_Placement_Kind_To_Code, Code_To_Body_Placement_Kind):
2416 Removed.
2417 (Code_To_Declaration_Placement_Kind,
2418 Code_To_Invocation_Graph_Encoding_Kind, Column,
2419 Declaration_Placement_Kind_To_Code, Extra,
2420 For_Each_Invocation_Construct, For_Each_Invocation_Relation,
2421 Invocation_Graph_Encoding,
2422 Invocation_Graph_Encoding_Kind_To_Code, Invoker, Kind, Line,
2423 Locations, Name): New routine.
2424 (Scan_Invocation_Construct_Line): Reimplement the scanning
2425 mechanism.
2426 (Scan_Invocation_Graph_Attributes_Line): New routine.
2427 (Scan_Invocation_Graph_Line): Use a case statement to dispatch.
2428 (Scan_Invocation_Relation_Line): Reimplement the scanning
2429 mechanism.
2430 (Scope): New routine.
2431 (Set_Invocation_Graph_Encoding, Signature, Spec_Placement,
2432 Target): New routine.
2433 * ali.ads: Add new type Invocation_Graph_Encoding_Kind. Add
2434 component Invocation_Graph_Encoding to type Unit_Record.
2435 Relocate various types and data structures to the body of ALI.
2436 (Add_Invocation_Construct, Add_Invocation_Relation): Update the
2437 parameter profile.
2438 (Body_Placement): New routine.
2439 (Body_Placement_Kind_To_Code, Code_To_Body_Placement_Kind):
2440 Removed.
2441 (Code_To_Declaration_Placement_Kind,
2442 Code_To_Invocation_Graph_Encoding_Kind, Column,
2443 Declaration_Placement_Kind_To_Code, Extra,
2444 For_Each_Invocation_Construct, For_Each_Invocation_Relation,
2445 Invocation_Graph_Encoding,
2446 Invocation_Graph_Encoding_Kind_To_Code, Invoker, Kind, Line,
2447 Locations, Name, Scope, Set_Invocation_Graph_Encoding,
2448 Signature, Spec_Placement, Target): New routine.
2449 * bindo.adb: Add with clause for Binde. Add with and use
2450 clauses for Debug. Update the documentation. Add new switches.
2451 (Find_Elaboration_Order): Dispatch to the proper elaboration
2452 mechanism.
2453 * bindo-augmentors.adb:
2454 Remove with and use clauses for GNAT and GNAT.Sets. Remove
2455 membership set VS. Update the parameter profiles of most
2456 routines to use better parameter names. Update the
2457 implementation of most routine to use the new parameter names.
2458 Remove various redundant assertions.
2459 * bindo-builders.adb: Use better names for instantiated data
2460 structures. Update all references to these names. Update the
2461 parameter profiles of most routines to use better parameter
2462 names. Update the implementation of most routine to use the new
2463 parameter names.
2464 (Build_Library_Graph): Update the parameter profile. Update the
2465 call to Create.
2466 (Create_Vertex): Reimplemented.
2467 (Declaration_Placement_Vertex): New routine.
2468 * bindo-builders.ads (Build_Library_Graph): Update the parameter
2469 profile and comment on usage.
2470 * bindo-diagnostics.adb: Almost a new unit.
2471 * bindo-diagnostics.ads: Add a use clause for
2472 Bindo.Graphs.Invocation_Graphs. Remove package
2473 Cycle_Diagnostics.
2474 (Diagnose_Circularities): New routine.
2475 * bindo-elaborators.adb: Remove the with and use clauses for
2476 Binderr and GNAT.Sets. Remove the use clause for
2477 Bindo.Diagnostics.Cycle_Diagnostics. Remove membership set VS.
2478 Update the parameter profiles of most routines to use better
2479 parameter names. Update the implementation of most routine to
2480 use the new parameter names. (Elaborate_Units_Common): Update
2481 the parameter profile. Pass an infication to the library graph
2482 builder whether the dynamic model is in effect.
2483 (Elaborate_Units_Dynamic, Elaborate_Units_Static): Use
2484 Diagnose_Circularities to provide diagnostics.
2485 (Update_Successor): Use routine In_Same_Component to determine
2486 whether the predecessor and successor reside in different
2487 components.
2488 * bindo-graphs.adb: Add with and use clauses for Butil, Debug,
2489 Output, and Bindo.Writers. Remove with and use clauses for
2490 GNAT.Lists. Update the parameter profiles of most routines to
2491 use better parameter names. Update the implementation of most
2492 routine to use the new parameter names. Remove various
2493 redundant assertions. Remove doubly linked list EL. Add new
2494 type Precedence_Kind.
2495 (Add_Cycle): New routine.
2496 (Add_Vertex): Update the parameter profile. Update the creation
2497 of vertex attributes.
2498 (Add_Vertex_And_Complement, Body_Vertex, Column,
2499 Complementary_Vertex, Copy_Cycle_Path, Cycle_Kind_Of): New
2500 routines.
2501 (Destroy_Invocation_Graph_Edge, Destroy_Library_Graph_Cycle,
2502 Destroy_Library_Graph_Edge, Extra, File_Name,
2503 Find_All_Cycles_Through_Vertex, Find_All_Cycles_With_Edge,
2504 Find_Cycles, Find_First_Lower_Precedence_Cycle,
2505 Get_LGC_Attributes, Has_Next, Hash_Library_Graph_Cycle,
2506 Hash_Library_Graph_Cycle_Attributes, Highest_Precedence_Cycle,
2507 Highest_Precedence_Edge, In_Same_Component, Insert_And_Sort,
2508 Invocation_Edge_Count, Invocation_Graph_Encoding,
2509 Is_Cycle_Initiating_Edge, Is_Cyclic_Edge,
2510 Is_Cyclic_Elaborate_All_Edge, Is_Cyclic_Elaborate_Body_Edge,
2511 Is_Cyclic_Elaborate_Edge, Is_Cyclic_Forced_Edge,
2512 Is_Cyclic_Invocation_Edge, Is_Cyclic_With_Edge,
2513 Is_Dynamically_Elaborated, Is_Elaborate_All_Edge,
2514 Is_Elaborate_Body_Edge, Is_Elaborate_Edge: New routines.
2515 (Is_Existing_Predecessor_Successor_Relation): Removed.
2516 (Is_Forced_Edge, Is_Invocation_Edge, Is_Recorded_Cycle,
2517 Is_Recorded_Edge, Is_With_Edge, Iterate_Edges_Of_Cycle, Kind,
2518 Length): New routine.
2519 (Lib_Vertex): Removed.
2520 (Line, Links_Vertices_In_Same_Component,
2521 Maximum_Invocation_Edge_Count, Next, Normalize_And_Add_Cycle,
2522 Normalize_Cycle_Path, Number_Of_Cycles, Path, Precedence,
2523 Remove_Vertex_And_Complement, Sequence_Next_Cycle): New routines.
2524 (Sequence_Next_IGE_Id): Renamed to Sequence_Next_Edge.
2525 (Sequence_Next_IGV_Id): Renamed to Sequence_Next_Vertex.
2526 (Sequence_Next_LGE_Id): Renamed to Sequence_Next_Edge.
2527 (Sequence_Next_LGV_Id): Renamed to Sequence_Next_Vertex.
2528 (Set_Is_Existing_Predecessor_Successor_Relation): Removed.
2529 (Set_Is_Recorded_Cycle, Set_Is_Recorded_Edge,
2530 Set_LGC_Attributes, Spec_Vertex, Trace_Cycle, Trace_Edge,
2531 Trace_Eol, Trace_Vertex): New routines.
2532 * bindo-graphs.ads: Add with and use clauses for Types and
2533 GNAT.Lists. Update the parameter profiles of most routines to
2534 use better parameter names. Update the implementation of most
2535 routine to use the new parameter names. Add the new
2536 instantiated data structures IGE_Lists, IGV_Sets, LGC_Lists,
2537 LGE_Lists, LGE_Sets, LGV_Sets, and RC_Sets. Add new type
2538 Library_Graph_Cycle_Id along with an empty and initial value.
2539 Remove component Lib_Vertex and add new components Body_Vertex
2540 and Spec_Vertex to type Invocation_Graph_Vertex_Attributes. Add
2541 new type Library_Graph_Cycle_Kind. Add new iterators
2542 All_Cycle_Iterator and Edges_Of_Cycle_Iterator. Add new type
2543 Library_Graph_Cycle_Attributes. Add new components
2544 Cycle_Attributes, Cycles, and Dynamically_Elaborated to type
2545 Library_Graph_Attributes.
2546 (Body_Vertex, Column, Destroy_Invocation_Graph_Edge,
2547 Destroy_Library_Graph_Cycle_Attributes,
2548 Destroy_Library_Graph_Edge, Extra, File_Name, Find_Cycles,
2549 Has_Elaborate_All_Cycle, Has_Next, Hash_Library_Graph_Cycle,
2550 Hash_Library_Graph_Cycle_Attributes, Highest_Precedence_Cycle,
2551 In_Same_Component, Invocation_Edge_Count,
2552 Invocation_Graph_Encoding, Is_Dynamically_Elaborated,
2553 Is_Elaborate_All_Edge, Is_Elaborate_Body_Edge,
2554 Is_Elaborate_Edge, Is_Forced_Edge, Is_Invocation_Edge,
2555 Is_With_Edge, Iterate_All_Cycles, Iterate_Edges_Of_Cycle, Kind):
2556 New routines.
2557 (Length, Lib_Vertex, (Line, Next, Number_Of_Cycles, Present,
2558 Same_Library_Graph_Cycle_Attributes, Spec_Vertex): New routines.
2559 * bindo-units.adb (File_Name, Invocation_Graph_Encoding): New
2560 routines.
2561 * bindo-units.ads: Add new instantiated data structure
2562 Unit_Sets.
2563 (File_Name, Invocation_Graph_Encoding): New routine.
2564 * bindo-validators.adb: Remove with and use clauses for GNAT and
2565 GNAT.Sets. Remove membership set US. Update the parameter
2566 profiles of most routines to use better parameter names. Update
2567 the implementation of most routine to use the new parameter
2568 names.
2569 (Validate_Cycle, Validate_Cycle_Path, Validate_Cycles,
2570 Validate_Invocation_Graph_Vertex): Remove the validation of
2571 component Lib_Vertex. Add the validation of components
2572 Body_Vertex and Spec_Vertex.
2573 (Write_Error): New routine.
2574 * bindo-validators.ads (Validate_Cycles): New routine.
2575 * bindo-writers.adb: Update the parameter profiles of most
2576 routines to use better parameter names. Update the
2577 implementation of most routine to use the new parameter names.
2578 (Write_Cycle, Write_Cyclic_Edge, Write_Cycles): New routines.
2579 (Write_Invocation_Graph_Vertex): Remove the output of component
2580 Lib_Vertex. Add the output of components Body_Vertex and
2581 Spec_Vertex.
2582 * bindo-writers.ads (Write_Cycles): New routine.
2583 * debug.adb: Use binder switches -d_C and -d_P, add
2584 documentation on their usage.
2585 * gnatbind.adb: Remove with and use clauses for Binde. Delegate
2586 the choice of elaboration mechanism to Bindo.
2587 * lib-writ.adb (Column, Extra, Invoker, Kind, Line, Locations,
2588 Name, Placement, Scope, Signature, Target): Removed.
2589 (Write_Invocation_Graph): Moved at the top level.
2590 (Write_Invocation_Graph_Attributes): New routine.
2591 (Write_Invocation_Relation, Write_Invocation_Signature): Moved
2592 at the top level.
2593 * lib-writ.ads: Add a documentation section on invocation graph
2594 attributes.
2595 * sem_elab.adb (Body_Placement_Of): New routine.
2596 (Declare_Invocation_Construct): Update the call to
2597 Add_Invocation_Construct.
2598 (Declaration_Placement_Of_Node): New routine.
2599 (Get_Invocation_Attributes): Correct the retrieval of the
2600 enclosing subprogram where the postcondition procedure lives.
2601 (Placement_Of, Placement_Of_Node): Removed.
2602 (Record_Invocation_Graph): Record the encoding format used.
2603 (Record_Invocation_Graph_Encoding): New routine.
2604 (Record_Invocation_Relation): Update the call to
2605 Add_Invocation_Relation.
2606 (Spec_Placement_Of): Removed.
2607 * libgnat/g-lists.ads, libgnat/g-lists.adb (Equal): New routine.
2608
2609 2019-07-05 Ed Schonberg <schonberg@adacore.com>
2610
2611 * checks.adb (Apply_Predicate_Check): Except within the
2612 subprogram body that defines the formal, do not apply predicate
2613 check on a formal IN parameter: such a check is redundant and
2614 its expansion can lead to out-of-scope references when it is
2615 originates in a function call in a precondition,
2616
2617 2019-07-05 Yannick Moy <moy@adacore.com>
2618
2619 * sem_res.adb (Resolve_Call): Cannot inline in quantified
2620 expressions.
2621 * sem_util.adb, sem_util.ads (In_Quantified_Expression): New
2622 function.
2623
2624 2019-07-05 Bob Duff <duff@adacore.com>
2625
2626 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
2627 Fix typo.
2628 * gnat_rm.texi: Regenerate.
2629
2630 2019-07-05 Bob Duff <duff@adacore.com>
2631
2632 * exp_attr.adb (Input): Take the No_Stream_Optimizations
2633 restriction into account.
2634
2635 2019-07-05 Claire Dross <dross@adacore.com>
2636
2637 * libgnat/a-cofove.ads, libgnat/a-cofove.adb: Definite formal
2638 vectors are now always bounded so that they do not need to be
2639 limited anymore.
2640
2641 2019-07-05 Dmitriy Anisimkov <anisimko@adacore.com>
2642
2643 * libgnat/g-traceb.ads, libgnat/g-traceb.adb (Call_Chain): New
2644 function.
2645
2646 2019-07-04 James Clarke <jrtc27@debian.org>
2647
2648 * libgnarl/s-osinte__kfreebsd-gnu.ads (clockid_t): Make type
2649 definition public.
2650 (CLOCK_REALTIME): Make value public.
2651
2652 2019-07-04 Javier Miranda <miranda@adacore.com>
2653
2654 * exp_tss.adb (Init_Proc): Adding missing support for access to
2655 subprograms and access to protected subprograms of non-default
2656 C++ constructors.
2657
2658 2019-07-04 Eric Botcazou <ebotcazou@adacore.com>
2659
2660 * gnat1drv.adb (Adjust_Global_Switches): Use proper interface to
2661 set the validity settings in CodePeer mode.
2662 * par-load.adb (Load): Remove all code dealing with validity
2663 settings.
2664 * validsw.ads (Validity_Check_Copies): Alphabetize.
2665 * validsw.adb (Reset_Validity_Check_Options): Set all options to
2666 off.
2667 (Save_Validity_Check_Options): Save all options.
2668
2669 2019-07-04 Hristian Kirtchev <kirtchev@adacore.com>
2670
2671 * exp_ch3.adb, exp_ch4.adb, exp_ch4.ads, exp_ch5.adb,
2672 exp_ch7.adb, exp_ch9.adb, exp_ch11.adb, exp_unst.adb,
2673 rtsfind.ads, sem_attr.adb, sem_ch10.adb, sem_ch12.adb,
2674 sem_ch13.adb, sem_dim.adb, sem_disp.adb, xref_lib.adb: Minor
2675 reformatting.
2676
2677 2019-07-04 Joffrey Huguet <huguet@adacore.com>
2678
2679 * libgnarl/a-taside.ads: Add assertion policy to ignore
2680 preconditions.
2681 (Abort_Task, Is_Terminated, Is_Callable): Add preconditions.
2682
2683 2019-07-04 Eric Botcazou <ebotcazou@adacore.com>
2684
2685 * doc/gnat_rm/implementation_defined_pragmas.rst: Fix
2686 capitalization and parenthesis glitches.
2687 * gnat_rm.texi: Regenerate.
2688
2689 2019-07-04 Ed Schonberg <schonberg@adacore.com>
2690
2691 * sem_ch10.adb (Remove_Context_Clauses): Handle properly the
2692 removal of a limited_with_clause which appears in the library
2693 unit oF the main unit, when some other unit in the context has a
2694 regular with_clause on the same unit, to prevent spurious
2695 visibility errors in the subsequent analysis of pending instance
2696 bodies.
2697
2698 2019-07-04 Hristian Kirtchev <kirtchev@adacore.com>
2699
2700 * sem_elab.adb: Add new type Elaboration_Phase_Status along with
2701 a global to keep track of the elaboration phase status.
2702 Initialize all internal data structures to Nil for services
2703 Elaborated_Units, Internal_Representation, and Scenario_Storage.
2704 (Build_Call_Marker): Do not create a call marker when the
2705 elaboration phase is not active.
2706 (Build_Variable_Reference_Marker): Do not create a call marker
2707 when the elaboration phase is not active.
2708 (Check_Elaboration_Scenarios): Destroy all internal structures
2709 when the elaboration phase does not have to run. Do not execute
2710 when the elaboration phase is not active.
2711 (Elaboration_Phase_Active): New routine.
2712 (Finalize_All_Data_Structures): New routine.
2713 (Initialize): Initialize all internal data structures and signal
2714 that the elaboration phase has started.
2715 (Initialize_All_Data_Structures): New routine.
2716 (Initialize_Elaborated_Units): Initialize all internal data
2717 structures.
2718 (Initialize_Internal_Representation): Initialize all internal
2719 data structures.
2720 (Initialize_Scenario_Storage): Initialize all internal data
2721 structures.
2722 (Kill_Elaboration_Scenario): Do not execute when the elaboration
2723 phase is not active.
2724 (Set_Elaboration_Phase): New routine.
2725 (Update_Elaboration_Scenario): Do not execute when the
2726 elaboration phase is not active.
2727
2728 2019-07-04 Gary Dismukes <dismukes@adacore.com>
2729
2730 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The special
2731 treatment of calling Mask_Unfrozen_Types must also be done in
2732 the case of an Ignored_Ghost_Entity, because Expander_Active is
2733 False in that case.
2734
2735 2019-07-04 Yannick Moy <moy@adacore.com>
2736
2737 * sem_prag.adb (Check_Library_Level_Entity): Update for new rule
2738 on SPARK_Mode.
2739
2740 2019-07-04 Justin Squirek <squirek@adacore.com>
2741
2742 * sem_disp.adb (Check_Controlling_Formals): Obtain the full view
2743 before type comparison.
2744
2745 2019-07-04 Ed Schonberg <schonberg@adacore.com>
2746
2747 * exp_ch4.ads, exp_ch4.adb (Build_Eq_Call): New visible
2748 subprogram, extracted from Expand_Composite_Equality, to handle
2749 properly the composition of equality for variant record types.
2750 * exp_ch3.adb (MAke_Eq_If): Use Build_Eq_Call for each
2751 component, to handle properly the case of a component with a
2752 user-defined equality. Revert to predefined equality if the
2753 user-defined operation is abstract, to maintain compatibility
2754 with older versions,
2755
2756 2019-07-04 Justin Squirek <squirek@adacore.com>
2757
2758 * exp_ch3.adb (Build_Initialization_Call): Fixup
2759 *_skip_null_excluding_check argument to handle new default.
2760 (Init_Formals): Make *_skip_null_excluding_check formal default
2761 to False
2762 * exp_ch4.adb (Expand_N_Allocator): Add comment to note heavy
2763 code duplication
2764
2765 2019-07-04 Bob Duff <duff@adacore.com>
2766
2767 * sem_ch3.adb (Access_Definition): Do not create a master unless
2768 Tasking_Allowed. Otherwise, this fails on restricted runtimes.
2769
2770 2019-07-04 Hristian Kirtchev <kirtchev@adacore.com>
2771
2772 * sem_util.adb (Propagate_DIC_Attributes): Do not propagate the
2773 Default_Initial_Condition attributes to an incomplete type.
2774
2775 2019-07-04 Ed Schonberg <schonberg@adacore.com>
2776
2777 * sem_attr.adb (Check_Array_Type): An array type attribute such
2778 as 'First can be applied to an unconstrained array tyope when
2779 the attribute reference appears within an aspect specification
2780 and the prefix is a current instance, given that the prefix of
2781 the attribute will become a formal of the subprogram that
2782 implements the aspect (typically a predicate check).
2783
2784 2019-07-04 Piotr Trojanek <trojanek@adacore.com>
2785
2786 * sem_util.adb (Yields_Synchronized_Object): Fix typos in
2787 comments.
2788
2789 2019-07-04 Yannick Moy <moy@adacore.com>
2790
2791 * sem_util.adb (Yields_Synchronized_Object): Adapt to new SPARK
2792 rule.
2793
2794 2019-07-04 Yannick Moy <moy@adacore.com>
2795
2796 * sem_spark.adb (Check_Statement): Only check permission of
2797 object in extended return when it is of a deep type.
2798
2799 2019-07-04 Justin Squirek <squirek@adacore.com>
2800
2801 * sem_ch12.adb (Perform_Appropriate_Analysis): Added for
2802 selecting which type of analysis based on wheither the
2803 instantiation is a generic at the library-level. In which case
2804 expansion during analysis.
2805 (Preanalyze_Actuals): Modify calls to Analyze to use the new
2806 routine.
2807
2808 2019-07-04 Ed Schonberg <schonberg@adacore.com>
2809
2810 * exp_unst.adb: Handle conditional expressions.
2811
2812 2019-07-04 Yannick Moy <moy@adacore.com>
2813
2814 * sem_spark.adb (Check_Package_Spec, Check_Package_Body): Only
2815 analyze parts of the code marked in SPARK.
2816
2817 2019-07-04 Hristian Kirtchev <kirtchev@adacore.com>
2818
2819 * erroutc.adb, exp_aggr.adb, inline.adb, opt.adb, sem_ch3.adb:
2820 Minor reformatting.
2821
2822 2019-07-04 Yannick Moy <moy@adacore.com>
2823
2824 * sem_spark.adb (Explanation, Get_Expl): New functions to get
2825 the explanation for a permission mismatch.
2826 (Perm_Error, Perm_Mismatch, Perm_Error_Loop_Exit): Take
2827 explanation into account for issuing a more precise error
2828 message.
2829 (Set_Perm_Prefixes, Set_Perm_Extensions,
2830 Set_Perm_Extensions_Move): Pass suitable argument for the
2831 explanation node.
2832
2833 2019-07-04 Arnaud Charlet <charlet@adacore.com>
2834
2835 * exp_aggr.adb (In_Place_Assign_OK): Moved to top level and add
2836 support for record aggregates.
2837 (Component_Check): Use Is_CCG_Supported_Aggregate instead of a
2838 similar local predicate.
2839 (Convert_To_Assignments): Take advantage of In_Place_Assign_OK
2840 predicate when possible.
2841 (Is_CCG_Supported_Aggregate): Return False for records with
2842 representation clauses and fix the logic for dealing with nested
2843 aggregates.
2844
2845 2019-07-04 Piotr Trojanek <trojanek@adacore.com>
2846
2847 * opt.adb (Set_Config_Switches): Keep assertions policy as
2848 enabled when analysing internal units in GNATprove mode.
2849
2850 2019-07-04 Arnaud Charlet <charlet@adacore.com>
2851
2852 * exp_ch4.adb (Expand_Short_Circuit_Operator): Strip
2853 N_Variable_Reference_Marker when checking for the presence of
2854 actions.
2855
2856 2019-07-04 Arnaud Charlet <charlet@adacore.com>
2857
2858 * exp_aggr.adb (Check_Component): Take into account type
2859 conversions.
2860
2861 2019-07-04 Dmitriy Anisimkov <anisimko@adacore.com>
2862
2863 * doc/gnat_ugn/platform_specific_information.rst: Document
2864 Windows socket timeout particularity.
2865 * gnat_ugn.texi: Regenerate.
2866 * gsocket.h: Include versionhelpers.h.
2867 * socket.c (__gnat_minus_500ms): New function.
2868 * libgnat/g-sothco.ads (Minus_500ms_Windows_Timeout): New
2869 imported function.
2870 * libgnat/g-socket.adb (Set_Socket_Option): Refactor to remove
2871 500ms from the requested timeout only on old Windows version.
2872
2873 2019-07-04 Thomas Quinot <quinot@adacore.com>
2874
2875 * get_scos.adb: Remove bogus, dead code.
2876
2877 2019-07-04 Ed Schonberg <schonberg@adacore.com>
2878
2879 * sem_dim.adb (Analyze_Dimension_Array_Aggregate): If the
2880 component is an entity name, its dimensions are those of its
2881 type.
2882
2883 2019-07-03 Bob Duff <duff@adacore.com>
2884
2885 * doc/gnat_ugn/gnat_utility_programs.rst: Document new flags in
2886 GNATpp.
2887
2888 2019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
2889
2890 * binde.adb: Remove with clause for System.OS_Lib.
2891 (Force_Elab_Order): Refactor the majority of the code in Butil.
2892 Use the new forced units iterator to obtain unit names.
2893 * bindo-builders.adb: Add with and use clauses for Binderr,
2894 Butil, Opt, Output, Types, GNAT, and GNAT.Dynamic_HTables. Add
2895 a hash table which maps units to line number in the forced
2896 elaboration order file.
2897 (Add_Unit): New routine.
2898 (Build_Library_Graph): Create forced edges between pairs of
2899 units listed in the forced elaboration order file.
2900 (Create_Forced_Edge, Create_Forced_Edges, Destroy_Line_Number,
2901 Duplicate_Unit_Error, Hash_Unit, Internal_Unit_Info,
2902 Is_Duplicate_Unit, Missing_Unit_Info): New routines.
2903 * bindo-graphs.adb (Is_Internal_Unit, Is_Predefined_Unit):
2904 Refactor some of the behavior to Bindo-Units.
2905 * bindo-graphs.ads: Enable the enumeration literal for forced
2906 edges.
2907 * bindo-units.adb, bindo-units.ads (Is_Internal_Unit,
2908 Is_Predefined_Unit): New routines.
2909 * butil.adb: Add with and use clauses for Opt, GNAT, and
2910 System.OS_Lib. Add with clause for Unchecked_Deallocation.
2911 (Has_Next, Iterate_Forced_Units, Next, Parse_Next_Unit_Name,
2912 Read_Forced_Elab_Order_File): New routines.
2913 * butil.ads: Add with and use clauses for Types. Add new
2914 iterator over the units listed in the forced elaboration order
2915 file.
2916 (Has_Next, Iterate_Forced_Units, Next): New routine.
2917 * namet.adb, namet.ads (Present): New routine.
2918
2919 2019-07-03 Bob Duff <duff@adacore.com>
2920
2921 * sem_ch3.adb (Access_Definition): The code was creating a
2922 master in the case where the designated type is a class-wide
2923 interface type. Create a master in the noninterface case as
2924 well. That is, create a master for all limited class-wide types.
2925
2926 2019-07-03 Yannick Moy <moy@adacore.com>
2927
2928 * erroutc.adb (Sloc_In_Range): New function to determine whether
2929 the range of a pragma Warnings covers a location, taking
2930 instantiations into account.
2931
2932 2019-07-03 Johannes Kanig <kanig@adacore.com>
2933
2934 * osint.ads, osint.adb (Get_First_Main_File_Name): New routine
2935 to access the first file provided on the command line.
2936
2937 2019-07-03 Ed Schonberg <schonberg@adacore.com>
2938
2939 * inline.adb (Process_Formals_In_Aspects): New procedure within
2940 Expand_Inlined_Call, to perform a replacement of references to
2941 formals that appear in aspect specifications within the body
2942 being inlined.
2943
2944 2019-07-03 Justin Squirek <squirek@adacore.com>
2945
2946 * sem_ch8.adb (Analyze_Object_Renaming): Add call to search for
2947 the appropriate actual subtype of the object renaming being
2948 analyzed.
2949 (Check_Constrained_Object): Minor cleanup.
2950
2951 2019-07-03 Yannick Moy <moy@adacore.com>
2952
2953 * sem_spark.adb (Get_Observed_Or_Borrowed_Expr): New function to
2954 return go through traversal function call.
2955 (Check_Type): Consistently use underlying type.
2956 (Get_Perm): Adapt for case of elaboration code where variables
2957 are not declared in the environment. Remove incorrect handling
2958 of borrow and observe.
2959
2960 2019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
2961
2962 * inline.adb (Build_Return_Object_Formal): New routine.
2963 (Can_Split_Unconstrained_Function): Code clean up.
2964 (Copy_Formals,Copy_Return_Object): New routines.
2965 (Split_Unconstrained_Function): Code clean up and refactoring.
2966
2967 2019-07-03 Gary Dismukes <dismukes@adacore.com>
2968
2969 * bindo-augmentors.adb, bindo-augmentors.ads,
2970 bindo-builders.ads, bindo-elaborators.adb, sem_ch12.adb,
2971 sem_ch13.adb, sem_spark.adb, sinfo.ads: Minor editorial
2972 corrections and reformatting.
2973
2974 2019-07-03 Bob Duff <duff@adacore.com>
2975
2976 * sem_warn.adb (Check_Infinite_Loop_Warning): Avoid the warning
2977 if an Iterator_Specification is present.
2978
2979 2019-07-03 Bob Duff <duff@adacore.com>
2980
2981 * doc/gnat_ugn/gnat_utility_programs.rst: Document default
2982 new-line behavior.
2983
2984 2019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
2985
2986 * ali.adb: Add with and use clauses for GNAT,
2987 GNAT.Dynamic_HTables, and Snames. Add a map from invocation
2988 signature records to invocation signature ids. Add various
2989 encodings of invocation-related attributes. Sort and update
2990 table Known_ALI_Lines.
2991 (Add_Invocation_Construct, Add_Invocation_Relation,
2992 Body_Placement_Kind_To_Code, Code_To_Body_Placement_Kind,
2993 Code_To_Invocation_Construct_Kind, Code_To_Invocation_Kind,
2994 Code_To_Invocation_Graph_Line_Kind, Destroy, Hash): New
2995 routines.
2996 (Initialize_ALI): Sort the initialization sequence. Add
2997 initialization for all invocation-related tables.
2998 (Invocation_Construct_Kind_To_Code,
2999 Invocation_Graph_Line_Kind_To_Code, Invocation_Kind_To_Code,
3000 Invocation_Signature_Of, Present): New routines.
3001 (Scan_ALI): Add the default values for invocation-related ids.
3002 Scan invocation graph lines.
3003 (Scan_Invocation_Graph_Line): New routine.
3004 * ali.ads: Add with clause for GNAT.Dynamic_Tables. Add types
3005 for invocation constructs, relations, and signatures. Add
3006 tables for invocation constructs, relations, and signatures.
3007 Update Unit_Record to capture invocation-related ids. Relocate
3008 table Unit_Id_Tables and subtypes Unit_Id_Table, Unit_Id_Array
3009 from Binde.
3010 (Add_Invocation_Construct, Add_Invocation_Relation,
3011 Body_Placement_Kind_To_Code, Code_To_Body_Placement_Kind,
3012 Code_To_Invocation_Construct_Kind, Code_To_Invocation_Kind,
3013 Code_To_Invocation_Graph_Line_Kind,
3014 Invocation_Construct_Kind_To_Code,
3015 Invocation_Graph_Line_Kind_To_Code, Invocation_Kind_To_Code,
3016 Invocation_Signature_Of, Present): New routines.
3017 * binde.adb: Add with and use clause for Types. Add use clause
3018 for ALI.Unit_Id_Tables;
3019 * binde.ads: Relocate table Unit_Id_Tables and subtypes
3020 Unit_Id_Table, Unit_Id_Array to ALI.
3021 * bindgen.adb: Remove with and use clause for ALI.
3022 * bindgen.ads: Remove with and use clause for Binde. Add with
3023 and use clause for ALI.
3024 * bindo.adb, bindo.ads, bindo-augmentors.adb,
3025 bindo-augmentors.ads, bindo-builders.adb, bindo-builders.ads,
3026 bindo-diagnostics.adb, bindo-diagnostics.ads,
3027 bindo-elaborators.adb, bindo-elaborators.ads, bindo-graphs.adb,
3028 bindo-graphs.ads, bindo-units.adb, bindo-units.ads,
3029 bindo-validators.adb, bindo-validators.ads, bindo-writers.adb,
3030 bindo-writers.ads: New units.
3031 * debug.adb: Use and describe GNAT debug switches -gnatd_F and
3032 -gnatd_G. Add GNATbind debug switches in the ranges dA .. dZ,
3033 d.a .. d.z, d.A .. d.Z, d.1 .. d.9, d_a .. d_z, d_A .. d_Z, and
3034 d_1 .. d_9. Use and describe GNATbind debug switches -d_A,
3035 -d_I, -d_L, -d_N, -d_O, -d_T, and -d_V.
3036 * exp_util.adb, exp_util.ads (Exceptions_OK): Relocate to
3037 Sem_Util.
3038 * gnatbind.adb: Add with and use clause for Bindo. Use the new
3039 Bindo elaboration order only when -d_N is in effect.
3040 * lib-writ.adb
3041 (Column, Extra, Invoker, Kind, Line, Locations, Name, Placement,
3042 Scope, Signature, Target): New routines.
3043 (Write_ALI): Output all invocation-related data.
3044 (Write_Invocation_Graph): New routine.
3045 * lib-writ.ads: Document the invocation graph ALI line.
3046 * namet.adb, namet.ads (Present): New routines.
3047 * sem_ch8.adb (Find_Direct_Name): Capture the status of
3048 elaboration checks and warnings of an identifier.
3049 (Find_Expanded_Name): Capture the status of elaboration checks
3050 and warnings of an expanded name.
3051 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Ensure
3052 that invocation graph-related data within the body of the main
3053 unit is encoded in the ALI file.
3054 (Analyze_Generic_Subprogram_Declaration): Ensure that invocation
3055 graph-related data within the body of the main unit is encoded
3056 in the ALI file.
3057 (Analyze_Package_Instantiation): Perform minimal decoration of
3058 the instance entity.
3059 (Analyze_Subprogram_Instantiation): Perform minimal decoration
3060 of the instance entity.
3061 * sem_elab.adb: Perform heavy refactoring of all code. The unit
3062 is now split into "services" which specialize in one area of ABE
3063 checks. Add processing in order to capture invocation-graph
3064 related attributes of the main unit, and encode them in the ALI
3065 file. The Processing phase can now operate in multiple modes,
3066 all described by type Processing_Kind. Scenarios and targets
3067 are now distinct at the higher level, and carry their own
3068 representations. This eliminates the need to constantly
3069 recompute their attributes, and offers the various processors a
3070 uniform interface. The various initial states of the Processing
3071 phase are now encoded using type Processing_In_State, and
3072 xxx_State constants.
3073 * sem_elab.ads: Update the literals of type
3074 Enclosing_Level_Kind. Add Inline pragmas on several routines.
3075 * sem_prag.adb (Process_Inline): Ensure that invocation
3076 graph-related data within the body of the main unit is encoded
3077 in the ALI file.
3078 * sem_util.adb (Enclosing_Generic_Body, Enclosing_Generic_Unit):
3079 Code clean up.
3080 (Exceptions_OK): Relocated from Sem_Util.
3081 (Mark_Save_Invocation_Graph_Of_Body): New routine.
3082 * sem_util.ads (Exceptions_OK): Relocated from Sem_Util.
3083 (Mark_Save_Invocation_Graph_Of_Body): New routine.
3084 * sinfo.adb (Is_Elaboration_Checks_OK_Node): Now applicable to
3085 N_Variable_Reference_Marker.
3086 (Is_Elaboration_Warnings_OK_Node): Now applicable to
3087 N_Expanded_Name, N_Identifier, N_Variable_Reference_Marker.
3088 (Is_Read): Use Flag4.
3089 (Is_SPARK_Mode_On_Node): New applicable to
3090 N_Variable_Reference_Marker.
3091 (Is_Write): Use Flag5.
3092 (Save_Invocation_Graph_Of_Body): New routine.
3093 (Set_Is_Elaboration_Checks_OK_Node): Now applicable to
3094 N_Variable_Reference_Marker.
3095 (Set_Is_Elaboration_Warnings_OK_Node): Now applicable to
3096 N_Expanded_Name, N_Identifier, N_Variable_Reference_Marker.
3097 (Set_Is_SPARK_Mode_On_Node): New applicable to
3098 N_Variable_Reference_Marker.
3099 (Set_Save_Invocation_Graph_Of_Body): New routine.
3100 * sinfo.ads: Update the documentation of attributes
3101 Is_Elaboration_Checks_OK_Node, Is_Elaboration_Warnings_OK_Node,
3102 Is_SPARK_Mode_On_Node. Update the flag usage of attributes
3103 Is_Read, Is_Write. Add attribute Save_Invocation_Graph_Of_Body
3104 and update its occurrence in nodes.
3105 (Save_Invocation_Graph_Of_Body): New routine along with pragma
3106 Inline.
3107 (Set_Save_Invocation_Graph_Of_Body): New routine along with
3108 pragma Inline.
3109 * switch-b.adb (Scan_Binder_Switches): Refactor the scanning of
3110 debug switches.
3111 (Scan_Debug_Switches): New routine.
3112 * libgnat/g-dynhta.adb, libgnat/g-dynhta.ads (Contains): New routine.
3113 * libgnat/g-graphs.adb (Associate_Vertices): Update the use of
3114 Component_Vertex_Iterator.
3115 (Contains_Component, Contains_Edge, Contains_Vertex, Has_Next):
3116 Reimplemented.
3117 (Iterate_Component_Vertices): New routine.
3118 (Iterate_Vertices): Removed.
3119 (Next): Update the parameter profile.
3120 (Number_Of_Component_Vertices, Number_Of_Outgoing_Edges): New
3121 routines.
3122 * libgnat/g-graphs.ads: Update the initialization of
3123 No_Component. Add type Component_Vertex_Iterator. Remove type
3124 Vertex_Iterator.
3125 (Has_Next): Add new versions and remove old ones.
3126 (Iterate_Component_Vertices): New routine.
3127 (Iterate_Vertices): Removed.
3128 (Next): Add new versions and remove old ones.
3129 (Number_Of_Component_Vertices, Number_Of_Outgoing_Edges): New
3130 routines.
3131 * libgnat/g-sets.adb (Contains): Reimplemented.
3132 * gcc-interface/Make-lang.in (GNATBIND_OBJS): Add
3133 GNAT.Dynamic_HTables, GNAT.Graphs and Bindo units.
3134 * rtsfind.ads: Remove extra space.
3135
3136 2019-07-03 Yannick Moy <moy@adacore.com>
3137
3138 * sem_spark.adb: Add support for locally borrowing and observing
3139 a path.
3140 (Get_Root_Object): Add parameter Through_Traversal to denote
3141 when we are interesting in getting to the traversed parameter.
3142 (Is_Prefix_Or_Almost): New function to support detection of
3143 illegal access to borrowed or observed paths.
3144 (Check_Pragma): Add analysis of assertion pragmas.
3145
3146 2019-07-03 Ed Schonberg <schonberg@adacore.com>
3147
3148 * sem_ch13.adb (Build_Predicate_Functions): In a generic context
3149 we do not build the bodies of predicate fuctions, but the
3150 expression in a static predicate must be elaborated to allow
3151 case coverage checking within the generic unit.
3152 (Build_Discrete_Static_Predicate): In a generic context, return
3153 without building function body once the
3154 Static_Discrete_Predicate expression for the type has been
3155 constructed.
3156
3157 2019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
3158
3159 * bindgen.adb, inline.adb, layout.adb, sem_ch12.adb,
3160 sem_ch13.adb, sem_ch7.adb, styleg.adb: Minor reformatting.
3161
3162 2019-07-03 Bob Duff <duff@adacore.com>
3163
3164 * par-ch3.adb (P_Defining_Identifier): Call
3165 Check_Defining_Identifier_Casing.
3166 * style.ads, styleg.ads, styleg.adb
3167 (Check_Defining_Identifier_Casing): New procedure to check for
3168 mixed-case defining identifiers.
3169 * stylesw.ads, stylesw.adb (Style_Check_Mixed_Case_Decls): New
3170 flag for checking for mixed-case defining identifiers.
3171 * doc/gnat_ugn/building_executable_programs_with_gnat.rst:
3172 Document new feature.
3173 * gnat_ugn.texi: Regenerate.
3174
3175 2019-07-03 Eric Botcazou <ebotcazou@adacore.com>
3176
3177 * doc/gnat_ugn/building_executable_programs_with_gnat.rst
3178 (Warning message control): Document that -gnatw.z/Z apply to
3179 array types.
3180 * freeze.adb (Freeze_Entity): Give -gnatw.z warning for array
3181 types as well, but not if the specified alignment is the minimum
3182 one.
3183 * gnat_ugn.texi: Regenerate.
3184
3185 2019-07-03 Bob Duff <duff@adacore.com>
3186
3187 * einfo.ads, exp_util.adb, layout.ads, sinfo.ads: Spell "laid"
3188 correctly.
3189
3190 2019-07-03 Ed Schonberg <schonberg@adacore.com>
3191
3192 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): No error
3193 message on attribute applied to a renaming when the renamed
3194 object is an aggregate (from code reading).
3195 (Check_Aspect_At_End_Of_Declarations): In a generic context
3196 where freeze nodes are not generated, the original expression
3197 for an aspect may need to be analyzed to precent spurious
3198 conformance errors when compared with the expression that is
3199 anakyzed at the end of the current declarative list.
3200
3201 2019-07-03 Eric Botcazou <ebotcazou@adacore.com>
3202
3203 * layout.adb (Layout_Type): Do not set the component size of an
3204 array with a scalar component if the component type is
3205 overaligned.
3206
3207 2019-07-03 Ed Schonberg <schonberg@adacore.com>
3208
3209 * inline.adb (Make_Loop_Labels_Unique): New procedure to modify
3210 the source code of subprograms that are inlined by the
3211 front-end, to prevent accidental duplication between loop labels
3212 in the inlined code and the code surrounding the inlined call.
3213
3214 2019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
3215
3216 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update
3217 the section on resolving elaboration circularities to eliminate
3218 certain combinations of switches which together do not produce
3219 the desired effect and confuse users.
3220 * gnat_ugn.texi: Regenerate.
3221
3222 2019-07-03 Arnaud Charlet <charlet@adacore.com>
3223
3224 * bindgen.adb (Gen_Main): Disable generation of reference to
3225 Ada_Main_Program_Name for CCG.
3226 * bindusg.adb (Display): Add -G to the command-line usage for
3227 gnatbind.
3228 * opt.ads (Generate_C_Code): Update comment.
3229 * switch-b.adb (Scan_Binder_Switches): Add handling for -G.
3230
3231 2019-07-03 Arnaud Charlet <charlet@adacore.com>
3232
3233 * sem_ch7.adb (Has_Referencer): Do not consider inlined
3234 subprograms when generating C code, which allows us to generate
3235 static inline subprograms.
3236
3237 2019-07-03 Justin Squirek <squirek@adacore.com>
3238
3239 * sem_ch6.adb (Check_Conformance): Add expression checking for
3240 constant modifiers in anonymous access types (in addition to
3241 "non-null" types) so that they are considered "matching" for
3242 subsequent conformance tests.
3243
3244 2019-07-03 Arnaud Charlet <charlet@adacore.com>
3245
3246 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
3247 Clarify wording on No_Multiple_Elaboration.
3248 * gnat_rm.texi: Regenerate.
3249
3250 2019-07-03 Ed Schonberg <schonberg@adacore.com>
3251
3252 * sem_ch8.adb (Find_Selected_Component): If the prefix is the
3253 current instance of a type or subtype, complete the resolution
3254 of the name by finding the component of the type denoted by the
3255 selector name.
3256
3257 2019-07-03 Eric Botcazou <ebotcazou@adacore.com>
3258
3259 * doc/gnat_rm/interfacing_to_other_languages.rst (Interfacing to C):
3260 Document that boolean types with convention C now map to C99 bool.
3261 * gnat_rm.texi: Regenerate.
3262
3263 2019-07-03 Javier Miranda <miranda@adacore.com>
3264
3265 * exp_attr.adb (Expand_Min_Max_Attribute): Code cleanup:
3266 removing code that it is now never executed in the CCG compiler
3267 (dead code).
3268
3269 2019-07-02 Iain Sandoe <iain@sandoe.co.uk>
3270
3271 * libgnat/system-darwin-ppc.ads: Set Stack_Check_Probes True for
3272 PPC Darwin.
3273
3274 2019-07-01 Ed Schonberg <schonberg@adacore.com>
3275
3276 * sem_ch12.adb (Is_Defaulted): New predicate in
3277 Check_Formal_Package_Intance, to skip the conformance of checks
3278 on parameters of a formal package that are defaulted,
3279
3280 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
3281
3282 * checks.adb, exp_ch9.adb, exp_unst.adb, sem_ch4.adb,
3283 sem_prag.adb, sem_spark.adb: Minor reformatting.
3284
3285 2019-07-01 Ed Schonberg <schonberg@adacore.com>
3286
3287 * sem_attr.adb (Analyze_Attribute, case Enum_Rep): Allow prefix
3288 of attribute to be an attribute reference of a discrete type.
3289
3290 2019-07-01 Eric Botcazou <ebotcazou@adacore.com>
3291
3292 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Move up
3293 handling of Has_Pragma_Inline_Always and deal with
3294 Has_Pragma_No_Inline.
3295
3296 2019-07-01 Ed Schonberg <schonberg@adacore.com>
3297
3298 * sem_ch3.adb (Build_Derived_Record_Type): If the parent type is
3299 declared as a subtype of a private type with an inherited
3300 discriminant constraint, its generated full base appears as a
3301 record subtype, so we need to retrieve its oen base type so that
3302 the inherited constraint can be applied to it.
3303
3304 2019-07-01 Yannick Moy <moy@adacore.com>
3305
3306 * sem_spark.adb: Completely rework the algorithm for ownership
3307 checking, as the rules in SPARK RM have changed a lot.
3308 * sem_spark.ads: Update comments.
3309
3310 2019-07-01 Dmitriy Anisimkov <anisimko@adacore.com>
3311
3312 * gsocket.h (Has_Sockaddr_Len): Use the offset of sin_family offset in
3313 the sockaddr_in structure to determine the existence of length field
3314 before the sin_family.
3315
3316 2019-07-01 Ed Schonberg <schonberg@adacore.com>
3317
3318 * sem_prag.adb (Analyze_Pragma, case Weak_External): Pragma only
3319 applies to entities with run-time addresses, not to types.
3320
3321 2019-07-01 Piotr Trojanek <trojanek@adacore.com>
3322
3323 * einfo.adb, sem_ch7.adb, sem_prag.adb, sem_util.adb: Update
3324 references to the SPARK RM after the removal of Rule 7.1.4(5).
3325
3326 2019-07-01 Piotr Trojanek <trojanek@adacore.com>
3327
3328 * sysdep.c: Cleanup references to LynuxWorks in docs and
3329 comments.
3330
3331 2019-07-01 Ed Schonberg <schonberg@adacore.com>
3332
3333 * checks.adb (Insert_Valid_Check): Do not apply validity check
3334 to variable declared within a protected object that uses the
3335 Lock_Free implementation, to prevent unwarranted constant
3336 folding, because entities within such an object msut be treated
3337 as volatile.
3338
3339 2019-07-01 Eric Botcazou <ebotcazou@adacore.com>
3340
3341 * exp_ch9.adb (Check_Inlining): Deal with Has_Pragma_No_Inline.
3342
3343 2019-07-01 Ed Schonberg <schonberg@adacore.com>
3344
3345 * exp_unst.adb (Visit_Node, Check_Static_Type): Improve the
3346 handling of private and incomplete types whose full view is an
3347 access type, to detect additional uplevel references in dynamic
3348 bounds. This is relevant to N_Free_Statement among others that
3349 manipulate types whose full viww may be an access type.
3350
3351 2019-07-01 Pat Rogers <rogers@adacore.com>
3352
3353 * doc/gnat_rm/representation_clauses_and_pragmas.rst: Correct
3354 size indicated for R as a component of an array.
3355 * gnat_rm.texi: Regenerate.
3356
3357 2019-07-01 Justin Squirek <squirek@adacore.com>
3358
3359 * libgnat/s-win32.ads: Add definition for ULONG, modify
3360 OVERLAPPED type, and add appropriate pragmas.
3361
3362 2019-07-01 Bob Duff <duff@adacore.com>
3363
3364 * gnat1drv.adb (gnat1drv): Call Write_ALI if the main unit is
3365 ignored-ghost.
3366
3367 2019-07-01 Yannick Moy <moy@adacore.com>
3368
3369 * sem_ch4.adb (Operator_Check): Refine error message.
3370
3371 2019-07-01 Piotr Trojanek <trojanek@adacore.com>
3372
3373 * libgnat/a-calend.ads: Revert "Global => null" contracts on
3374 non-pure routines.
3375
3376 2019-07-01 Piotr Trojanek <trojanek@adacore.com>
3377
3378 * exp_attr.adb, libgnat/g-graphs.ads: Fix typos in comments:
3379 componant -> component.
3380
3381 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
3382
3383 * libgnat/g-graphs.adb: Use type Directed_Graph rather than
3384 Instance in various routines.
3385 * libgnat/g-graphs.ads: Change type Instance to Directed_Graph.
3386 Update various routines that mention the type.
3387
3388 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
3389
3390 * libgnat/g-sets.adb: Use type Membership_Set rathern than
3391 Instance in various routines.
3392 * libgnat/g-sets.ads: Change type Instance to Membership_Set.
3393 Update various routines that mention the type.
3394
3395 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
3396
3397 * libgnat/g-lists.adb: Use type Doubly_Linked_List rather than
3398 Instance in various routines.
3399 * libgnat/g-lists.ads: Change type Instance to
3400 Doubly_Linked_List. Update various routines that mention the
3401 type.
3402
3403 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
3404
3405 * libgnat/g-dynhta.adb: Use type Dynamic_Hash_Table rather than
3406 Instance in various routines.
3407 * libgnat/g-dynhta.ads: Change type Instance to
3408 Dynamic_Hash_Table. Update various routines that mention the
3409 type.
3410
3411 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
3412
3413 * exp_attr.adb, exp_ch7.adb, exp_unst.adb, sem_ch3.adb,
3414 sem_util.adb, uintp.adb, uintp.ads: Minor reformatting.
3415
3416 2019-07-01 Javier Miranda <miranda@adacore.com>
3417
3418 * exp_attr.adb (Expand_Min_Max_Attribute): Disable expansion of
3419 'Min/'Max on integer, enumeration, fixed point and floating
3420 point types since the CCG backend now provides in file
3421 standard.h routines to support it.
3422
3423 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
3424
3425 * impunit.adb: Add GNAT.Graphs to list Non_Imp_File_Names_95.
3426 * Makefile.rtl, gcc-interface/Make-lang.in: Register unit
3427 GNAT.Graphs.
3428 * libgnat/g-dynhta.adb: Various minor cleanups (use Present
3429 rather than direct comparisons).
3430 (Delete): Reimplement to use Delete_Node.
3431 (Delete_Node): New routine.
3432 (Destroy_Bucket): Invoke the provided destructor.
3433 (Present): New routines.
3434 * libgnat/g-dynhta.ads: Add new generic formal Destroy_Value.
3435 Use better names for the components of iterators.
3436 * libgnat/g-graphs.adb, libgnat/g-graphs.ads: New unit.
3437 * libgnat/g-lists.adb: Various minor cleanups (use Present
3438 rather than direct comparisons).
3439 (Delete_Node): Invoke the provided destructor.
3440 (Present): New routine.
3441 * libgnat/g-lists.ads: Add new generic formal Destroy_Element.
3442 Use better names for the components of iterators.
3443 (Present): New routine.
3444 * libgnat/g-sets.adb, libgnat/g-sets.ads (Destroy, Preset,
3445 Reset): New routines.
3446
3447 2019-07-01 Dmitriy Anisimkov <anisimko@adacore.com>
3448
3449 * libgnat/g-sothco.adb (Get_Address): Fix the case when AF_INET6
3450 is not defined.
3451
3452 2019-07-01 Ed Schonberg <schonberg@adacore.com>
3453
3454 * exp_attr.adb (Expand_Attribute_Reference, case Invalid_Value):
3455 Resolve result of call to Get_Simple_Init_Val, which may be a
3456 conversion of a literal.
3457
3458 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
3459
3460 * freeze.adb (Freeze_Expression): Remove the horrible useless
3461 name hiding of N. Insert the freeze nodes generated by the
3462 expression prior to the expression when the nearest enclosing
3463 scope is transient.
3464
3465 2019-07-01 Pierre-Marie de Rodat <derodat@adacore.com>
3466
3467 * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Fix
3468 formatting issues in the -gnatR section.
3469 * gnat_ugn.texi: Regenerate.
3470
3471 2019-06-30 Iain Sandoe <iain@sandoe.co.uk>
3472
3473 * gnatlink.adb (Link_Step): Remove duplicate -static-libgcc switches.
3474 Push -shared-libgcc explicitly, when it is the target default (unless
3475 overidden by the static flag).
3476 When the user has put an instance of shared/static-libgcc do not push
3477 a duplicate of this.
3478
3479 2019-06-29 Eric Botcazou <ebotcazou@adacore.com>
3480
3481 * gcc-interface/decl.c (gnat_to_gnu_entity): Beep up comment on SAVED,
3482 and tweak comment on the assertion about the scopes of Itypes. Do not
3483 skip the regular processing for Itypes that are E_Record_Subtype with
3484 a Cloned_Subtype. Get the Cloned_Subtype for every E_Record_Subtype
3485 if the type is dummy and hasn't got its own freeze node.
3486 <E_Record_Subtype>: Save again the DECL of the Cloned_Subtype, if any.
3487 <E_Access_Subtype>: Save again the DECL of the equivalent type.
3488 (Gigi_Equivalent_Type) <E_Access_Subtype>: New case.
3489
3490 2019-06-29 Eric Botcazou <ebotcazou@adacore.com>
3491
3492 * gcc-interface/utils.c (unchecked_convert): Tweak comment. Only skip
3493 dereferences when padding to have the same size on both sides. Do it
3494 for destination types with self-referential size too.
3495
3496 2019-06-29 Eric Botcazou <ebotcazou@adacore.com>
3497
3498 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: If the
3499 type requires strict alignment, then set the RM size to the type size.
3500 Rework handling of alignment and sizes of tagged types in ASIS mode.
3501 (validate_size): Rename local variable and remove special handling for
3502 strict-alignment types.
3503 * gcc-interface/utils.c (finish_record_type): Constify local variables
3504 and use properly typed constants.
3505
3506 2019-06-29 Eric Botcazou <ebotcazou@adacore.com>
3507
3508 * gcc-interface/decl.c (gnat_to_gnu_field): Rework error messages for
3509 fields requiring strict alignment, add explicit test on Storage_Unit
3510 for position and size, and mention type alignment for position.
3511
3512 2019-06-29 Eric Botcazou <ebotcazou@adacore.com>
3513
3514 * gcc-interface/trans.c (mark_visited_r): Set TYPE_SIZES_GIMPLIFIED on
3515 the main variant of a type, if any.
3516
3517 2019-06-29 Eric Botcazou <ebotcazou@adacore.com>
3518
3519 * gcc-interface/decl.c (set_nonaliased_component_on_array_type): Add
3520 missing guard for the presence of TYPE_CANONICAL.
3521 (set_reverse_storage_order_on_array_type): Likewise.
3522
3523 2019-06-29 Eric Botcazou <ebotcazou@adacore.com>
3524
3525 * gcc-interface/gigi.h (make_packable_type): Remove default value.
3526 (value_factor_p): Tweak prototype.
3527 * gcc-interface/decl.c (gnat_to_gnu_entity): Add comment.
3528 (gnat_to_gnu_component_type): Likewise.
3529 (gnat_to_gnu_field): Likewise. Fetch the position of the field earlier
3530 and simplify the condition under which the type is packed. Declare
3531 local variable is_bitfield. Pass 1 as max_align to make_packable_type
3532 if it is set to true.
3533 (copy_and_substitute_in_layout): Pass 0 to make_packable_type.
3534 * gcc-interface/utils.c (make_packable_array_type): New function.
3535 (make_packable_type): Use it to rewrite the type of array field.
3536 (maybe_pad_type): Pass align parameter to make_packable_type.
3537 (create_field_decl): Minor tweaks.
3538 (value_factor_p): Assert that FACTOR is a power of 2 and replace the
3539 modulo computation by a masking operation.
3540
3541 2019-06-25 Eric Botcazou <ebotcazou@adacore.com>
3542
3543 * gcc-interface/decl.c (gnat_to_gnu_entity): Remove superfluous test
3544 in previous change.
3545 * gcc-interface/gigi.h (maybe_character_type): Fix formatting.
3546 (maybe_character_value): Likewise.
3547
3548 2019-06-24 Jan Hubicka <jh@suse.cz>
3549
3550 * gcc-interface/decl.c (gnat_to_gnu_entity): Check that
3551 type is array or integer prior checking string flag.
3552 * gcc-interface/gigi.h (maybe_character_type): Likewise.
3553 (maybe_character_value): Likewise.
3554
3555 2019-06-24 Martin Sebor <msebor@redhat.com>
3556
3557 * gcc-interface/utils.c (handle_nonnull_attribute): Quote attribute
3558 name.
3559
3560 2019-06-18 Arnaud Charlet <charlet@adacore.com>
3561
3562 PR ada/80590
3563 * sem_ch5.adb (Analyze_Loop_Statement): Avoid exception propagation
3564 during normal processing.
3565
3566 2019-06-17 Arnaud Charlet <charlet@adacore.com>
3567
3568 PR ada/80590
3569 * exp_ch9.adb (Expand_N_Delay_Relative_Statement): Swap the two
3570 conditions to avoid a unnecessary exception propagation in the default
3571 case.
3572
3573 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
3574
3575 * gcc-interface/utils.c (handle_stack_protect_attribute): Move around.
3576
3577 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
3578
3579 * doc/gnat_rm/implementation_defined_pragmas.rst (Machine_Attribute):
3580 Document additional optional parameters.
3581 * sem_prag.adb (Analyze_Pragma) <Pragma_Machine_Attribute>: Accept
3582 more than one optional parameter.
3583 * gcc-interface/decl.c (prepend_one_attribute_pragma): Alphabetize
3584 the list of supported pragmas. Simplify the handling of parameters
3585 and add support for more than one optional parameter.
3586 * gcc-interface/utils.c (attr_cold_hot_exclusions): New constant.
3587 (gnat_internal_attribute_table): Add entry for no_icf, noipa, flatten,
3588 used, cold, hot, target and target_clones.
3589 (begin_subprog_body): Do not create the RTL for the subprogram here.
3590 (handle_noicf_attribute): New static function.
3591 (handle_noipa_attribute): Likewise.
3592 (handle_flatten_attribute): Likewise.
3593 (handle_used_attribute): Likewise.
3594 (handle_cold_attribute): Likewise.
3595 (handle_hot_attribute): Likewise.
3596 (handle_target_attribute): Likewise.
3597 (handle_target_clones_attribute): Likewise.
3598
3599 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
3600
3601 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Return 0
3602 for 'Size too.
3603 (Identifier_to_gnu): Use the actual subtype for a reference to a
3604 packed array in a return statement.
3605 (Attribute_to_gnu) <Attr_Size>: Do not strip VIEW_CONVERT_EXPRs from
3606 the prefix in every case.
3607
3608 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
3609
3610 * gcc-interface/trans.c (gnat_to_gnu): Remove superfluous tests on
3611 Backend_Overflow_Checks_On_Target and rework comments.
3612
3613 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
3614
3615 * gcc-interface/trans.c (walk_nesting_tree): New static function.
3616 (finalize_nrv): Use it to walk the entire nesting tree.
3617
3618 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
3619
3620 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Remove
3621 obsolete test on Is_For_Access_Subtype.
3622
3623 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
3624
3625 * gcc-interface/decl.c (components_to_record): Set a name on the type
3626 created for the REP part, if any.
3627 * gcc-interface/utils.c (finish_record_type): Only take the maximum
3628 when merging sizes for a variant part at offset 0.
3629 (merge_sizes): Rename has_rep parameter into max.
3630
3631 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
3632
3633 * gcc-interface/utils.c (gnat_internal_attribute_table): Add support
3634 for stack_protect attribute.
3635 (handle_stack_protect_attribute): New static function.
3636
3637 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
3638
3639 * gcc-interface/decl.c (intrin_arglists_compatible_p): Do not return
3640 false if the internal builtin uses a variable list.
3641
3642 2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
3643
3644 * gcc-interface/trans.c (Call_to_gnu): Do not initialize the temporary
3645 created out of addressability concerns if it's for the _Init parameter
3646 of an initialization procedure.
3647
3648 2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
3649
3650 * gcc-interface/ada-builtin-types.def: New file.
3651 * gcc-interface/ada-builtins.def: Likewise.
3652 * gcc-interface/ada-tree.h (BUILT_IN_LIKELY): New macro.
3653 (BUILT_IN_UNLIKELY): Likewise.
3654 * gcc-interface/trans.c (independent_iterations_p): Initialize the
3655 auto-vector to 16 elements.
3656 (Call_to_gnu): Remove local variable and change the vector of actual
3657 parameters to an auto-vector. Do not convert actual parameters to
3658 the argument type for front-end built-in functions. Add support for
3659 front-end built-in functions.
3660 (build_noreturn_cond): Use internal instead of built-in function.
3661 * gcc-interface/utils.c (c_builtin_type): Include ada-builtin-types.def
3662 (install_builtin_function_types): Likewise.
3663 (install_builtin_functions): Include ada-builtins.def first.
3664
3665 2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
3666
3667 * gcc-interface/utils.c (maybe_pad_type): Issue the warning for the
3668 specific case of component types preferably.
3669
3670 2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
3671
3672 * gcc-interface/trans.c (Identifier_to_gnu): Minor tweaks.
3673 (gnat_to_gnu): Do not convert the result if it is a reference to an
3674 unconstrained array used as the prefix of an attribute reference that
3675 requires an lvalue.
3676
3677 2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
3678
3679 * gcc-interface/trans.c (Gigi_Types_Compatible): New predicate.
3680 (Identifier_to_gnu): Use it to assert that the type of the identifier
3681 and that of its entity are compatible for gigi. Rename a couple of
3682 local variables and separate the processing of the result type.
3683
3684 2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
3685
3686 * gcc-interface/trans.c (Call_to_gnu): Use the unpadded type when
3687 putting back an intermediate conversion the type of the actuals.
3688
3689 2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
3690
3691 * gcc-interface/trans.c (gnat_to_gnu) <Shift operations>: Convert the
3692 count to the unsigned version of its base type before proceeding.
3693
3694 2019-05-16 Martin Sebor <msebor@redhat.com>
3695
3696 * gcc-interface/trans.c (check_inlining_for_nested_subprog): Quote
3697 reserved names.
3698
3699 2019-05-08 Arnaud Charlet <charlet@adacore.com>
3700
3701 * standard.ads.h: New file.
3702
3703 2019-05-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3704
3705 * gcc-interface/Makefile.in (install-gcc-specs): Use foreach.
3706 Honor DESTDIR.
3707
3708 2019-04-29 Michael K. Darling <darlingm@gmail.com>
3709
3710 * gnatvsn.ads: Bump Library_Version to 10.
3711
3712 2019-04-24 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3713 Bernd Edlinger <bernd.edlinger@hotmail.de>
3714 Jakub Jelinek <jakub@redhat.com>
3715
3716 PR target/89093
3717 * raise-gcc.c (TARGET_ATTRIBUTE): Define.
3718 (continue_unwind, personality_body, PERSONALITY_FUNCTION): Add
3719 TARGET_ATTRIBUTE.
3720
3721 2019-04-07 Eric Botcazou <ebotcazou@adacore.com>
3722
3723 * libgnat/i-cexten.ads (CFloat_128): New type.
3724
3725 2019-03-22 Dmitriy Anisimkov <anisimko@adacore.com>
3726
3727 PR ada/89583
3728 * libgnat/g-socket.adb (Bind_Socket, Connect_Socket,
3729 Send_Socket): Fix the computation of structure lengths passed to
3730 low level routines.
3731 (Is_IPv6_Address): Fix the number of expected colons.
3732
3733 2019-03-11 Martin Liska <mliska@suse.cz>
3734
3735 * gcc-interface/misc.c (gnat_post_options): Wrap option name in string
3736 format message and fix GNU coding style.
3737
3738 2019-02-08 Eric Botcazou <ebotcazou@adacore.com>
3739
3740 * gcc-interface/trans.c (gnat_to_gnu) <N_Aggregate>: Minor tweak.
3741 * gcc-interface/utils.c (convert): Do not pad when doing an unchecked
3742 conversion here. Use TREE_CONSTANT throughout the function.
3743 (unchecked_convert): Also pad if the source is a CONSTRUCTOR and the
3744 destination is a more aligned array type or a larger aggregate type,
3745 but not between original and packable versions of a type.
3746
3747 2019-02-08 Eric Botcazou <ebotcazou@adacore.com>
3748
3749 * gcc-interface/utils.c (max_size) <tcc_unary>: Be prepared for an
3750 operand with VOID_TYPE.
3751
3752 2019-02-08 Eric Botcazou <ebotcazou@adacore.com>
3753
3754 * gcc-interface/trans.c (elaborate_all_entities): Do not elaborate the
3755 entities of a package renaming another one.
3756
3757 2019-02-08 Eric Botcazou <ebotcazou@adacore.com>
3758
3759 * gcc-interface/trans.c (Regular_Loop_to_gnu): Replace tests on
3760 individual flag_unswitch_loops and flag_tree_loop_vectorize switches
3761 with test on global optimize switch.
3762 (Raise_Error_to_gnu): Likewise.
3763
3764 2019-02-07 Eric Botcazou <ebotcazou@adacore.com>
3765
3766 * libgnarl/s-linux__sparc.ads (ETIMEDOUT): Set to correct value.
3767
3768 2019-02-06 Arnaud Charlet <charlet@adacore.com>
3769
3770 * libgnarl/s-linux__x32.ads: Resync list of signals with s-linux.ads
3771
3772 2019-01-27 Eric Botcazou <ebotcazou@adacore.com>
3773
3774 * repinfo.adb (List_Component_Layout): Remove superfluous space for
3775 zero-sized field.
3776 * gcc-interface/ada-tree.h (TYPE_IS_EXTRA_SUBTYPE_P): New macro.
3777 * gcc-interface/gigi.h (create_extra_subtype): Declare.
3778 * gcc-interface/decl.c (TYPE_ARRAY_SIZE_LIMIT): Likewise.
3779 (update_n_elem): New function.
3780 (gnat_to_gnu_entity): Use create_extra_subtype to create extra subtypes
3781 instead of doing it manually.
3782 <E_Array_Type>: Use update_n_elem to compute the maximum size. Use the
3783 index type instead of base type for the bounds. Set TYPE_ARRAY_MAX_SIZE
3784 of the array to the maximum size.
3785 <E_Array_Subtype>: Create an extra subtype using the index type of the
3786 base array type for self-referential bounds. Use update_n_elem to
3787 compute the maximum size. Set TYPE_ARRAY_MAX_SIZE of the array to the
3788 maximum size.
3789 (gnat_to_gnu_field): Clear DECL_NONADDRESSABLE_P on discriminants.
3790 * gcc-interface/misc.c (gnat_get_alias_set): Return the alias set of
3791 the base type for an extra subtype.
3792 (gnat_type_max_size): Remove obsolete code.
3793 * gcc-interface/trans.c (Attribute_to_gnu): Minor tweak.
3794 (can_be_lower_p): Deal with pathological types.
3795 * gcc-interface/utils.c (create_extra_subtype): New function.
3796 (create_field_decl): Minor tweak.
3797 (max_size) <tcc_reference>: Compute a better value by using the extra
3798 subtypes on the self-referential bounds.
3799 <tcc_binary>: Rewrite. Deal with "negative value" in unsigned types.
3800 <tcc_expression>: Likewise.
3801 * gcc-interface/utils2.c (compare_arrays): Retrieve the original bounds
3802 of the arrays upfront. Swap only if the second length is not constant.
3803 Use comparisons on the original bounds consistently for the null tests.
3804 (build_binary_op): Use TYPE_IS_EXTRA_SUBTYPE_P macro.
3805 (build_allocator): Minor tweak.
3806
3807 2019-01-27 Eric Botcazou <ebotcazou@adacore.com>
3808
3809 * gcc-interface/decl.c (array_type_has_nonaliased_component): Return
3810 the same value for every dimension of a multidimensional array type.
3811
3812 2019-01-26 Eric Botcazou <ebotcazou@adacore.com>
3813
3814 * gcc-interface/trans.c (Regular_Loop_to_gnu): Use the SLOC of the
3815 iteration scheme, if present, throughout the translation.
3816
3817 2019-01-26 Eric Botcazou <ebotcazou@adacore.com>
3818
3819 * gcc-interface/trans.c (gnat_to_gnu) <N_Assignment_Statement>: Use
3820 DECL_SIZE_UNIT instead of TYPE_SIZE_UNIT for the size to be assigned
3821 by a call to memset if the LHS is a DECL.
3822
3823 2019-01-26 Eric Botcazou <ebotcazou@adacore.com>
3824
3825 * gcc-interface/trans.c (struct loop_info_d): Remove artificial field.
3826 (Loop_Statement_to_gnu): Do not set it.
3827
3828 2019-01-26 Eric Botcazou <ebotcazou@adacore.com>
3829
3830 * gcc-interface/trans.c (Iterate_Acc_Clause_Arg): Fix formatting.
3831 (Acc_gnat_to_gnu): Likewise.
3832 (Acc_Data_to_gnu): Likewise.
3833 (Acc_Var_to_gnu): Likewise.
3834 (Acc_Reduc_to_gnu): Likewise.
3835 (Acc_Size_List_to_gnu): Likewise.
3836 (Pragma_to_gnu) <Pragma_Acc_Loop>: Likewise.
3837 <Pragma_Acc_Data>): Likewise.
3838 (find_loop_for): Remove default value for parameters.
3839 * gcc-interface/trans.c (gnat_to_gnu) <N_Op_And>: Merge into...
3840 <N_Op_Eq>): ...this.
3841
3842 2019-01-26 Eric Botcazou <ebotcazou@adacore.com>
3843
3844 * gcc-interface/decl.c (annotate_value) <INTEGER_CST>: Use test on
3845 the sign bit instead of on the sign of the value.
3846 <PLUS_EXPR>: Turn addition of negative constant into subtraction.
3847 <MULT_EXPR>: Add test for degenerate case.
3848 <BIT_AND_EXPR>: Simplify.
3849
3850 2019-01-18 Sebastian Huber <sebastian.huber@embedded-brains.de>
3851
3852 * s-oscons-tmplt.c (AF_INET6): Do not undefine for RTEMS.
3853
3854 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
3855
3856 PR other/16615
3857 * exp_ch11.adb: Change "can not" to "cannot".
3858 * sem_ch4.adb: Likewise.
3859
3860 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
3861
3862 PR other/16615
3863 * exp_ch9.adb: Mechanically replace "can not" with "cannot".
3864 * libgnat/s-regpat.ads: Likewise.
3865 * par-ch4.adb: Likewise.
3866 * set_targ.adb: Likewise.
3867 * types.ads: Likewise.
3868
3869 2019-01-08 Justin Squirek <squirek@adacore.com>
3870
3871 Revert:
3872 2018-07-31 Justin Squirek <squirek@adacore.com>
3873
3874 * lib-writ.adb (Write_With_Lines): Modfiy the generation
3875 of dependencies within ali files so that source unit
3876 bodies are properly listed even if said bodies are
3877 missing. Perform legacy behavior in GNATprove mode.
3878 * lib-writ.ads: Modify documentation to reflect current
3879 behavior.
3880
3881 and:
3882 2018-09-26 Justin Squirek <squirek@adacore.com>
3883
3884 * lib-writ.adb, lib-writ.ads (Write_With_Lines): Add
3885 documentation and an extra conditional check for RCI
3886 units so that generated ali files will list the spec
3887 only instead of a body when a body is not found.
3888
3889 2019-01-04 Eric Botcazou <ebotcazou@adacore.com>
3890
3891 * gnatvsn.ads: Bump copyright year.
3892
3893 2019-01-01 Jakub Jelinek <jakub@redhat.com>
3894
3895 Update copyright years.
3896
3897 * gnat_ugn.texi: Bump @copying's copyright year.
3898 * gnat_rm.texi: Likewise.
3899 \f
3900 Copyright (C) 2019 Free Software Foundation, Inc.
3901
3902 Copying and distribution of this file, with or without modification,
3903 are permitted in any medium without royalty provided the copyright
3904 notice and this notice are preserved.