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