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