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