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