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