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