]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/ada/ChangeLog
[Ada] Sprint: fix pasto in comment
[thirdparty/gcc.git] / gcc / ada / ChangeLog
CommitLineData
39cdd055 12019-07-22 Eric Botcazou <ebotcazou@adacore.com>
2
3 * sprint.ads: Fix pasto in comment.
4
9af8c78a 52019-07-22 Javier Miranda <miranda@adacore.com>
6
7 * sem_res.adb (Resolve_Actuals): Replace code that displaces the
8 pointer to an allocated object to reference its secondary
9 dispatch table by a type conversion (which takes care of
10 handling all cases).
11
0ff5a502 122019-07-22 Eric Botcazou <ebotcazou@adacore.com>
13
14 * sprint.adb (Sprint_Node_Actual)
15 <N_Decimal_Fixed_Point_Definition>: Swap a couple of spaces.
16 (Write_Itype): Minor consistency fixes throughout. Add support
17 for printing ordinary and decimal fixed-point types and
18 subtypes.
19
8c6eab72 202019-07-22 Eric Botcazou <ebotcazou@adacore.com>
21
22 * exp_attr.adb (Expand_Loop_Entry_Attribute): Beef up comment.
23
76ed386d 242019-07-22 Ed Schonberg <schonberg@adacore.com>
25
26 * libgnat/s-valboo.ads, libgnat/s-valcha.ads,
27 libgnat/s-valdec.ads, libgnat/s-valenu.ads,
28 libgnat/s-valint.ads, libgnat/s-vallld.ads,
29 libgnat/s-vallli.ads, libgnat/s-valllu.ads,
30 libgnat/s-valrea.ads, libgnat/s-valuns.ads,
31 libgnat/s-valwch.ads: Change categorization of packages that
32 implement attribute 'Value from Pure to Preelaborate, to prevent
33 undesirable optimizations when the evaluation of the attribute
34 raises Constraint_Error, but subsequent use of the result of
35 this evsaluation is removed by a subsequent optimization.
36
e869060d 372019-07-22 Ed Schonberg <schonberg@adacore.com>
38
39 * sem_warn.adb (Check_References): Do not emit s warning on a
40 referenced entity with no explicit assignment if the type of the
41 entity has Preelaborable_Initialixation, such as
42 Exception_Occurrence.
43
9bf70d94 442019-07-22 Javier Miranda <miranda@adacore.com>
45
46 * exp_ch4.adb (Size_In_Storage_Elements): Improve the expansion
47 to handle array indexes that are modular type.
48 (Expand_N_Allocator): For 32-bit targets improve the generation
49 of the runtime check associated with large arrays supporting
50 arrays initialized with a qualified expression.
51 * libgnat/s-imenne.adb (Image_Enumeration_8,
52 Image_Enumeration_16, Image_Enumeration_32): Define the index of
53 Index_Table with range Natural'First .. Names'Length since in
54 the worst case all the literals of the enumeration type would be
55 single letter literals and the Table built by the frontend would
56 have as many components as the length of the names string. As a
57 result of this enhancement, the internal tables declared using
58 Index_Table have a length closer to the real needs, thus
59 avoiding the declaration of large arrays on 32-bit CCG targets.
60
b0da310b 612019-07-22 Yannick Moy <moy@adacore.com>
62
63 * sem_ch3.adb (Constrain_Access): Issue a message about ignored
64 constraint.
65
592e600a 662019-07-22 Eric Botcazou <ebotcazou@adacore.com>
67
68 * sem_ch8.adb (End_Use_Type): Reset the In_Use flag on the
69 class-wide type if the type is tagged.
70 (Use_One_Type): Add commentary on the handling of the class-wide
71 type.
72
c1eeb1c6 732019-07-22 Eric Botcazou <ebotcazou@adacore.com>
74
75 * einfo.ads (Is_For_Access_Subtype): Delete.
76 (Set_Is_For_Access_Subtype): Likewise.
77 * einfo.adb (Is_For_Access_Subtype): Likewise.
78 (Set_Is_For_Access_Subtype): Likewise.
79 (Write_Entity_Flags): Do not write Is_For_Access_Subtype.
80 * exp_ch4.adb (Expand_N_Selected_Component): Do not deal with
81 it.
82 * exp_spark.adb (Expand_SPARK_N_Selected_Component): Likewise.
83 * sem_ch4.adb (Analyze_Explicit_Dereference): Likewise.
84 * sem_ch3.adb (Build_Discriminated_Subtype): Do not build a
85 special private subtype for access-to-record subtypes.
86
3eb44c27 872019-07-22 Eric Botcazou <ebotcazou@adacore.com>
88
89 * sem_ch3.adb (Complete_Private_Subtype): Rework the setting of
90 the Etype of the full view for full base types that cannot
91 contain any discriminant. Remove code and comment about it in
92 the main path.
93
9c6c2b81 942019-07-22 Ed Schonberg <schonberg@adacore.com>
95
96 * sem_ch3.adb (Convert_Bound): Subsidiary of
97 Floating_Point_Type_Declaration, to handle properly range
98 specifications with bounds that may include static constants of
99 a given type rather than real literals.
100
d5dbc1bb 1012019-07-22 Eric Botcazou <ebotcazou@adacore.com>
102
103 * sem_aggr.adb (Rewrite_Bound): Be prepared for discriminals
104 too.
105 (Rewrite_Range;): Minor tweak.
106 (Resolve_Record_Aggregate): For a component with default
107 initialization whose expression is an array aggregate, also
108 rewrite the bounds of the component associations, if any.
109
37f1cae9 1102019-07-22 Gary Dismukes <dismukes@adacore.com>
111
112 * exp_ch5.adb (Expand_N_Case_Statement): In the case where a
113 case statement is rewritten as an equivalent if statement,
114 inherit the From_Condition_Expression flag from the case
115 statement.
116
e6368760 1172019-07-22 Eric Botcazou <ebotcazou@adacore.com>
118
119 * sem_ch8.adb (Check_Constrained_Object): Further extend the
120 special optimization to all limited types.
121
9b8341e7 1222019-07-22 Eric Botcazou <ebotcazou@adacore.com>
123
124 * exp_attr.adb (Expand_N_Attribute_Reference)
125 <Attribute_Enum_Val>: Set No_Truncation on the
126 N_Unchecked_Type_Conversion built around the argument passed to
127 the attribute.
128
f930ed43 1292019-07-22 Nicolas Roche <roche@adacore.com>
130
131 * libgnat/s-valrea.adb (Scan_Real): Ignore non significative
132 digits to avoid converging to infinity in some cases.
133
3474a75e 1342019-07-22 Eric Botcazou <ebotcazou@adacore.com>
135
136 * libgnat/g-encstr.adb (Encode_Wide_String): Fix oversight.
137 (Encode_Wide_Wide_String): Likewise.
138
a7f20f4b 1392019-07-22 Eric Botcazou <ebotcazou@adacore.com>
140
141 * sem_warn.adb (Find_Var): Bail out for a function call with an
142 Out or In/Out parameter.
143
a51cd2a2 1442019-07-22 Nicolas Roche <roche@adacore.com>
145
146 * terminals.c (__gnat_tty_waitpid): Support both blocking and
147 not blocking mode.
148 * libgnat/g-exptty.ads (Is_Process_Running): New function.
149 * libgnat/g-exptty.adb (Close): Don't try to interrupt/terminate
150 a process if it is already dead.
151
36167f09 1522019-07-22 Ed Schonberg <schonberg@adacore.com>
153
154 * freeze.adb (Freeze_Fixed_Point_Type): When freezing a
155 fixed-point subtype, check whether the parent type declarastion
156 includes an aspect specification for the 'Small type attribute,
157 and inherit the specified value.
158
b5293e2d 1592019-07-22 Javier Miranda <miranda@adacore.com>
160
161 * freeze.adb (Freeze_Subprogram): Check that C++ constructors
162 must have external or link name.
163
7c48993c 1642019-07-22 Ed Schonberg <schonberg@adacore.com>
165
166 * sem_res.adb (Resolve_Selected_Component): If the prefix has a
167 deferred reference, generate the correct reference now, to
168 indicate that the previous assignment is used. This prevents
169 spurious warnings on useless assignments when compiling with all
170 warnings enabled. when there is a subsequent call in the same
171 stqtement list, in which the prefix of the selected component is
172 the actual for an out parameter.
173
0b87f8cf 1742019-07-22 Eric Botcazou <ebotcazou@adacore.com>
175
176 * exp_attr.adb (Expand_Loop_Entry_Attribute): Copy the condition
177 of a while loop instead of simply relocating it.
178
0c41e160 1792019-07-18 Arnaud Charlet <charlet@adacore.com>
180
181 * Makefile.rtl, expect.c, env.c, aux-io.c, mkdir.c, initialize.c,
182 cstreams.c, raise.c, tracebak.c, adadecode.c, init.c, raise-gcc.c,
183 argv.c, adaint.c, adaint.h, ctrl_c.c, sysdep.c, rtinit.c, cio.c,
184 seh_init.c, exit.c, targext.c: Introduce a "STANDALONE" mode where C
185 runtime files do not have any dependency on GCC include files.
186 Remove unnecessary includes.
187 Remove remaining references to VMS in runtime C file.
188 * runtime.h: new File.
189
0e972d45 1902019-07-13 Andreas Schwab <schwab@linux-m68k.org>
191
192 * Makefile.rtl: Use g-sercom__linux.adb for all linuxes.
193
77fe13f0 1942019-07-11 Piotr Trojanek <trojanek@adacore.com>
195
196 * lib-writ.adb (Ensure_System_Dependency,
197 Up_To_Date_ALI_File_Exists, Write_ALI): Replace low-level access
198 to table with a high-level query.
199
56903255 2002019-07-11 Piotr Trojanek <trojanek@adacore.com>
201
202 * checks.adb: Fix typo in comment.
203 * sem.adb (Semantics): Avoid repeated calls to
204 In_Extended_Main_Source_Unit by reusing an already-cached
205 result.
206 * sem_util.adb (First_Global): Fix style.
207
85f6c73a 2082019-07-11 Yannick Moy <moy@adacore.com>
209
210 * sem_res.adb (Resolve_Call): Do not perform dimensionality
211 checking on inlined bodies.
212
5083f119 2132019-07-11 Yannick Moy <moy@adacore.com>
214
215 * debug.adb: Flip meaning of debug switch -gnatdF.
216
f237e5eb 2172019-07-11 Yannick Moy <moy@adacore.com>
218
219 * sem_eval.adb (Is_Same_Value): Add special case for rewritten
220 Loop_Entry attribute.
221
1e5359c0 2222019-07-11 Claire Dross <dross@adacore.com>
223
224 * gnat1drv.adb: SPARK checking rules for pointer aliasing are
225 moved to GNATprove backend.
226 * sem_spark.ads, sem_spark.adb (Sem_SPARK): Is now a generic
227 unit. Takes as parameters:
228 - Retysp which is used to query the most underlying type
229 visible in SPARK. We do not introduce aliasing checks for
230 types which are not visibly deep.
231 - Component_Is_Visible_In_SPARK is used to avoid doing pointer
232 aliasing checks on components which are not visible in SPARK.
233 - Emit_Messages returns True in the second phase of SPARK
234 analysis. Error messages for failed aliasing checks are only
235 output in this case.
236 Additionally, errors on constructs not supported in SPARK are
237 removed as duplicates of marking errors. Components are stored
238 in the permission map using their original component to avoid
239 inconsistencies between components of different views of the
240 same type.
241 (Check_Expression): Handle delta constraints.
242 (Is_Deep): Exported so that we can check for SPARK restrictions
243 on deep types inside SPARK semantic checkings.
244 (Is_Traversal_Function): Exported so that we can check for SPARK
245 restrictions on traversal functions inside SPARK semantic
246 checkings.
247 (Check_Call_Statement, Read_Indexes): Check wether we are
248 dealing with a subprogram pointer type before querying called
249 entity.
250 (Is_Subpath_Expression): Image attribute can appear inside a
251 path.
252 (Check_Loop_Statement): Correct order of statements in the loop.
253 (Check_Node): Ignore raise nodes.
254 (Check_Statement): Use Last_Non_Pragma to get the object
255 declaration in an extended return statement.
256
fb7f0b28 2572019-07-11 Patrick Bernardi <bernardi@adacore.com>
258
259 * bindgen.adb (Gen_Main): Do not generate a reference to
260 Ada_Main_Program_Name when the Minimal_Binder flag is set.
261 (Gen_Output_File_Ada): Do not output GNAT_Version and
262 Ada_Main_Program_Name info if Minimal_Binder flag is set.
263 * bindusg.adb: Add documentation for new -minimal switch.
264 * gnatbind.adb (Scan_Bind_Arg): Scan -minimal switch.
265 * opt.ads: Add new global flag Minimal_Binder to indicate if the
266 binder should not produce global variables.
267 * doc/gnat_ugn/building_executable_programs_with_gnat.rst:
268 Update documentation with new binder -minimal switch.
269 * gnat_ugn.texi: Regenerate.
270
6e0725a9 2712019-07-11 Eric Botcazou <ebotcazou@adacore.com>
272
273 * Makefile.rtl: Add warning note about compilation flags and
274 capitalize.
275
263dcfe9 2762019-07-11 Ed Schonberg <schonberg@adacore.com>
277
278 * exp_ch9.adb (Expand_N_Protected_Type_Declaaration): New
279 subsidiary routine Replace_Access_Definition, to handle properly
280 a protected type PT one of whose private components is of type
281 access PT.
282
dc001f3e 2832019-07-11 Dmitriy Anisimkov <anisimko@adacore.com>
284
285 * libgnat/g-socket.ads (Level_Type): Add enumerators for
286 IP_Protocol_For_ICMP, IP_Protocol_For_IGMP,
287 IP_Protocol_For_RAW_Level.
288 * libgnat/g-socket.adb (Levels): Handle them.
289 * s-oscons-tmplt.c: Import socket protocols defined in
290 netinet/in.h.
291
3bcff314 2922019-07-11 Claire Dross <dross@adacore.com>
293
294 * libgnat/a-cfhama.adb, libgnat/a-cfhase.adb (Free): Do not
295 reset the Has_Element flag if no element is freed.
296
8e22ede8 2972019-07-11 Arnaud Charlet <charlet@adacore.com>
298
299 * errno.c: Remove obsolete support for MaRTE OS.
300
180bd06b 3012019-07-11 Ed Schonberg <schonberg@adacore.com>
302
303 * exp_ch4.adb (Expand_N_Type_Conversion): If a predicate check
304 is generated, analyze it with range check suppressed, because
305 that check has been previously applied.
306 * exp_ch5.adb (Expand_N_Assignment_Statement): If the RHS is a
307 type conversion to the type of the LHS, do not apply a predicate
308 check to the RHS because it will have been generated already
309 during its expansion.
310 * exp_ch6.adb (Can_Fold_Predicate_Call): Extend processing to
311 handle a predicate check on a constant entity whose value is
312 static.
313
32859955 3142019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
315
316 * bindo.adb: Remove the documentation of switch -d_N because it
317 is no longer in use.
318 * bindo-graphs.ads, bindo-graphs.adb (Is_Spec_Before_Body_Edge):
319 New routine.
320 * bindo-writers.adb (Write_Dependency_Edge): Add the missing
321 case of a spec-before-body edge.
322
0595f8ff 3232019-07-11 Dmitriy Anisimkov <anisimko@adacore.com>
324
325 * libgnat/g-socket.ads (Mode_Type): Add a Socket_Raw enumerator.
326 * libgnat/g-socket.adb (Modes): Handle Socket_Raw.
327
af7bae25 3282019-07-11 Justin Squirek <squirek@adacore.com>
329
330 * exp_ch9.adb (Build_Private_Protected_Declaration): Add
331 exception for the moving of pragmas to internally generated
332 specs for pragma Unreferenced.
333
87259588 3342019-07-11 Bob Duff <duff@adacore.com>
335
336 * doc/gnat_ugn/gnat_utility_programs.rst: Fix inconsistent
337 documentation for gnatmetric.
338 * gnat_ugn.texi: Regenerate.
339
2d95f0f8 3402019-07-11 Bob Duff <duff@adacore.com>
341
342 * doc/gnat_ugn/gnat_utility_programs.rst: Document gnatpp's
343 --spaces-only switch.
344
814e7b6e 3452019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
346
347 * sem_util.adb (Null_Status): Assume that an erroneous construct
348 has an undefined null status.
349
53904d64 3502019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
351
352 * checks.adb, exp_ch6.adb, gnat1drv.adb, sem_aux.adb,
353 sem_ch2.adb, sem_ch8.adb, sem_res.adb: Minor reformatting.
354
21dccd5f 3552019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
356
357 * sem_ch8.adb (Analyze_Object_Renaming): Obtain the object being
358 renamed using routine Get_Object_Name which takes care of
359 various name forms.
360 (Get_Object_Name): New routine.
361
3da5e0d4 3622019-07-11 Ed Schonberg <schonberg@adacore.com>
363
364 * exp_ch6.adb (Can_Fold_Predicate_Call): New function,
365 subsidiary of Expand_Call_Helper, to compute statically a
366 predicate check when the argument is a static integer.
367
3d95efc8 3682019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
369
370 * sem_res.adb (Resolve_Op_Not): Do not rewrite an equality
371 operator into a function call when the operator is intrinsic.
372
8c93b71c 3732019-07-11 Thomas Quinot <quinot@adacore.com>
374
375 * sem_prag.adb (Analyze_Pragma, case pragma Check): Do not call
376 Set_SCO_Pragma_Enabled for the dynamic predicate case.
377
001b1b6a 3782019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
379
380 * exp_util.ads, exp_util.adb (Needs_Finalization): Move to
381 Sem_Util.
382 * sem_ch9.adb (Analyze_Protected_Definition): Code cleanup. Mark
383 the protected type as having controlled components when it
384 contains at least one such component.
385 * sem_util.ads, sem_util.adb (Needs_Finalization): New
386 function.
387
5dc190e5 3882019-07-11 Eric Botcazou <ebotcazou@adacore.com>
389
390 * alloc.ads (Rep_JSON_Table_Initial): New constant.
391 (Rep_JSON_Table_Increment): Likewise.
392 * debug.adb: Document -gnatd_j switch.
393 * gcc-interface/Make-lang.in (GNAT_ADA_OBJS): Add
394 repinfo-input.o.
395 * gnat1drv.adb: Add with clause for Repinfo.Input.
396 Add with and use clauses for Sinput.
397 (Read_JSON_Files_For_Repinfo): New procedure.
398 (Gnat1drv1): Deal with -gnatd_j switch.
399 * repinfo-input.ad[sb]: New unit.
400 * snames.ads-tmpl (Name_Discriminant): New constant.
401 (Name_Operands): Likewise.
402
b1118eb8 4032019-07-11 Justin Squirek <squirek@adacore.com>
404
405 * checks.adb (Apply_Accessibility_Check): Add check for constant
406 folded conditions on accessibility checks.
407
ef0b2206 4082019-07-11 Arnaud Charlet <charlet@adacore.com>
409
410 * libgnarl/g-thread.ads, libgnarl/g-thread.adb (Get_Thread):
411 Update comments. Add new version taking a Task_Id.
412
12b1c23b 4132019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
414
415 * bindo.adb: Update the section of switches and debugging
416 elaboration issues.
417 * bindo.ads: Add type Elaboration_Phase.
418 * bindo-augmentors.adb: Add use clause for
419 Bindo.Writers.Phase_Writers.
420 (Augment_Library_Graph): Signal the start and end of the
421 aubmentation phase.
422 * bindo-builders.adb: Add with and use clause for Bindo.Writers.
423 Add use clause for Bindo.Writers.Phase_Writers.
424 (Build_Invocation_Graph): Signal the start and end of the
425 invocation graph construction phase.
426 (Build_Library_Graph): Signal the start and end of the library
427 graph construction phase.
428 * bindo-diagnostics.adb: Add use clause for
429 Bindo.Writers.Phase_Writers.
430 (Diagnose_Cycle): Signal the start and end of the cycle
431 diagnostic phase.
432 * bindo-elaborators.adb: Add use clause for
433 Bindo.Writers.Phase_Writers.
434 (Elaborate_Units): Signal the start and end of the unit
435 elaboration phase.
436 * bindo-graphs.adb: Add use clause for
437 Bindo.Writers.Phase_Writers.
438 (Find_Components): Signal the start and end of the component
439 discovery phase.
440 (Find_Cycles): Signal the start and end of the cycle discovery
441 phase.
442 * bindo-units.adb: Add with and use clause for Bindo.Writers.
443 Add use clause for Bindo.Writers.Phase_Writers.
444 (Collect_Elaborable_Units): Signal the start and end of the unit
445 collection phase.
446 * bindo-validators.adb: Add with and use clause for
447 Bindo.Writers. Add use clause for Bindo.Writers.Phase_Writers.
448 (Validate_Cycles, Validate_Elaboration_Order,
449 Validate_Invocation_Graph, Validate_Library_Graph): Signal the
450 start and end of the libray graph validation phase.
451 * bindo-writers.ads, bindo-writers.adb: Add new nested package
452 Phase_Writers.
453 * debug.adb: Update the documentation of switch d_S.
454
d7569e04 4552019-07-11 Yannick Moy <moy@adacore.com>
456
457 * sem_res.adb (Check_Argument_Order): Special case calls to
458 operators.
459
604c5bca 4602019-07-10 Dmitriy Anisimkov <anisimko@adacore.com>
461
462 * libgnat/s-ststop.adb: Remove System.Strings.Stream_Ops
463 dependence on System.Streams.Stream_IO.
464
ce9565a8 4652019-07-10 Ed Schonberg <schonberg@adacore.com>
466
467 * sem_ch2.adb (Analyze_Integer_Literal): Preserve the type of
468 the literal if prior analysis determined that its type is a
469 modular integer type.
470
e97ee616 4712019-07-10 Doug Rupp <rupp@adacore.com>
472
473 * init.c: Do not attempt to re-arm guard page on x86_64-vx7(r2).
474
c0e85bb6 4752019-07-10 Ed Schonberg <schonberg@adacore.com>
476
477 * sem_ch8.adb (Check_Constrained_Object): A record that is
478 limited because of the presence of a limited component is
479 constrained, and no subtype indiciation needs to be created for
480 it, just as is the case for declared limited records.
481
94654315 4822019-07-10 Yannick Moy <moy@adacore.com>
483
484 * sem_aux.adb, sem_aux.ads (Is_Protected_Operation): New
485 function to determine if a subprogram is protected.
486 * sem_spark.adb (Setup_Protected_Components): New procedure to
487 add protected components to the environment.
488 (Check_Callable_Body): Call the new Setup_Protected_Components.
489 (Check_Package_Spec): Merge local environment with enclosing one
490 when done.
491
9ac24568 4922019-07-10 Claire Dross <dross@adacore.com>
493
494 * sem_spark.adb (Check_Expression): Allow digits constraints as
495 input.
496 (Illegal_Global_Usage): Pass in the entity.
497 (Is_Subpath_Expression): New function to allow different nodes
498 as inner parts of a path expression.
499 (Read_Indexes): Allow concatenation and aggregates with box
500 expressions. Allow attributes Update and Loop_Entry.
501 (Check_Expression): Allow richer membership test.
502 (Check_Node): Ignore bodies of generics.
503 (Get_Root_Object): Allow concatenation and attributes.
504
95266217 5052019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
506
507 * sem_ch6.adb (Check_Discriminant_Conformance): Use Find_Type to
508 discover the type of a full view discriminant.
509
f9d615a1 5102019-07-10 Arnaud Charlet <charlet@adacore.com>
511
512 * doc/gnat_ugn/gnat_and_program_execution.rst: Improve gnatmem's
513 doc for the depth switch.
514
55d7c660 5152019-07-10 Bob Duff <duff@adacore.com>
516
517 * doc/gnat_ugn/gnat_utility_programs.rst: Document gnatpp's
518 --source-line-breaks switch.
519
e94f4600 5202019-07-10 Justin Squirek <squirek@adacore.com>
521
522 * doc/gnat_rm/implementation_defined_attributes.rst: Add mention
523 of 'Image attribute with 'Img's entry to mention additional
524 added 2012 usage of Obj'Image.
525 * doc/gnat_rm/implementation_defined_pragmas.rst: Correct
526 mispelling of Async_Writers.
527 * gnat_rm.texi: Regenerate.
528 * sem_prag.adb (Analyze_Pragma): Correct mispelling of
529 Async_Writers.
530 * sem_util.adb (State_Has_Enabled_Property): Correct mispelling
531 of Async_Writers.
532
2bf00b7f 5332019-07-10 Simon Buist <buist@adacore.com>
534
535 * sem_util.ads (Child_Prefix): New constant.
536 * sem_util.adb (Unique_Name): Add a special prefix to child
537 units that have a nested subprogram or package.
538
9dda714b 5392019-07-10 Arnaud Charlet <charlet@adacore.com>
540
541 * sfn_scan.adb (Scan_SFN_Pragmas): Add pragma Assert.
542
fd8a528d 5432019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
544
545 * sem_ch3.adb (Check_Nonoverridable_Aspects): Correct the
546 spelling in certain error messages.
547 (Check_Pragma_Implemented): Correct the spelling in certain
548 error messages.
549
97f0aa19 5502019-07-10 Eric Botcazou <ebotcazou@adacore.com>
551
552 * Makefile.rtl (GNATRTL_NONTASKING_OBJS): Add g-brapre.
553 * libgnat/g-brapre.ads: New package specification.
554 * doc/gnat_rm/the_gnat_library.rst: Document it.
555 * gnat_rm.texi: Regenerate.
556
d2506f16 5572019-07-10 Yannick Moy <moy@adacore.com>
558
559 * osint-c.adb (Set_File_Name): Always add extension for multiple
560 units per file mode.
561
c6db401c 5622019-07-10 Corentin Gay <gay@adacore.com>
563
564 * sysdep.c: Put include directive for 'vxWorks.h' before any
565 other VxWorks headers.
566
344c2639 5672019-07-10 Eric Botcazou <ebotcazou@adacore.com>
568
569 * doc/gnat_rm/implementation_defined_attributes.rst
570 (Scalar_Storage_Order): Minor tweaks. Add note about debuggers.
571 * gnat_rm.texi: Regenerate.
572
8a9900a9 5732019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
574
575 * exp_ch4.adb (Expand_N_Case_Expression): Mark the generated
576 assignments to the temporary result as being OK because the
577 expansion of case expressions is correct by construction.
578 (Is_Copy_Type): Update the predicate to match the comment
579 within.
580
8c21443b 5812019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
582
583 * bindo-graphs.adb, bindo.adb, debug.adb, exp_ch6.adb,
584 sem_ch10.adb, sem_ch13.adb, sem_ch3.adb, sem_ch4.adb,
585 sem_ch6.adb, sem_ch7.adb, sem_res.adb, sem_spark.adb,
586 sem_util.adb, warnsw.ads: Minor reformatting.
587
2e7929f0 5882019-07-10 Joffrey Huguet <huguet@adacore.com>
589
590 * libgnat/a-strbou.ads, libgnat/a-strfix.ads,
591 libgnat/a-strunb.ads, libgnat/a-strunb__shared.ads: Add global
592 contracts, contract cases, preconditions and postconditions to
593 procedures and functions.
594
87d55fe2 5952019-07-10 Doug Rupp <rupp@adacore.com>
596
597 * sysdep.c (__gnat_is_file_not_found_error): Reformulate to also
598 work for vxworks7r2 SR0610.
599
82d7e1f4 6002019-07-10 Doug Rupp <rupp@adacore.com>
601
602 * env.c (__gnat_environ): Reformulate to also work for
603 vxworks7r2 SR0610.
604
7f6066e1 6052019-07-10 Patrick Bernardi <bernardi@adacore.com>
606
607 * Makefile.rtl: Handle vxworks7r2 ppc target
608
6523468f 6092019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
610
611 * bindo.adb: Update the section on switches.
612 * bindo-graphs.adb
613 (Add_Cycle, Add_Vertex_And_Complement): Remove.
614 (Create): The graph no longer needs a set of recorded cycles
615 because the cycles are not rediscovered in permuted forms.
616 (Cycle_End_Vertices): New routine.
617 (Destroy): The graph no longer needs a set of recorded cycles
618 because the cycles are not rediscovered in permuted forms.
619 (Destroy_Library_Graph_Vertex): Move to the library level.
620 (Find_All_Cycles_Through_Vertex, Find_All_Cycles_With_Edge):
621 Remove.
622 (Find_Cycles_From_Successor, Find_Cycles_From_Vertex,
623 Find_Cycles_In_Component, Has_Elaborate_All_Edge): New routines.
624 (Insert_And_Sort): Remove.
625 (Is_Elaborate_Body_Edge): Use predicate
626 Is_Vertex_With_Elaborate_Body.
627 (Is_Recorded_Cycle): Remove.
628 (Is_Vertex_With_Elaborate_Body): New routine.
629 (Normalize_And_Add_Cycle): Remove.
630 (Precedence): Rename to xxx_Precedence, where xxx relates to the
631 input. These versions better reflect the desired input
632 precedence.
633 (Record_Cycle): New routine.
634 (Remove_Vertex_And_Complement, Set_Is_Recorded_Cycle): Remove.
635 (Trace_xxx): Update all versions to use debug switch -d_t.
636 (Trace_Component): New routine.
637 (Trace_Eol): Removed.
638 (Trace_Vertex): Do not output the component as this information
639 is already available when the component is traced.
640 (Unvisit, Visit): New routine.
641 * bindo-graphs.ads: Add new instance LGV_Lists. Remove instance
642 RC_Sets. Update the structure of type Library_Graph_Attributes
643 to remove the set of recorded cycles.
644 (Destroy_Library_Graph_Vertex): Move to the library level.
645 * bindo-writers.adb (Write_Component_Vertices): Output
646 information about the number of vertices.
647 * debug.adb: Document the use of binder switch -d_t. Update the
648 use of binder switch -d_T.
649
9eaacd61 6502019-07-10 Yannick Moy <moy@adacore.com>
651
652 * sem_spark.adb (Get_Root_Object): Replace precondition by error
653 message.
654 (Read_Indexes): Replace precondition by error message.
655 (Check_Callable_Body): Check only traversal function returns an
656 anonymous access type.
657 (Check_Expression): Issue error on unexpected expression as
658 path.
659 * sem_util.adb (First_Global): Fix access to global on
660 entry/task.
661
2ac657bd 6622019-07-10 Javier Miranda <miranda@adacore.com>
663
664 * exp_ch6.adb (Is_Class_Wide_Interface_Type): New subprogram.
665 (Expand_Call_Helper): Handle non-limited views when we check if
666 any formal is a class-wide interface type.
667 * exp_disp.adb (Expand_Interface_Actuals): Handle non-limited
668 views when we look for interface type formals to force "this"
669 displacement.
670
d3fb378d 6712019-07-10 Ed Schonberg <schonberg@adacore.com>
672
673 * sem_res.adb (Resolve_Equality_Op): Do not replace the resolved
674 operator by its alias if expander is not active, because the
675 operand type may not be frozen yet and its inherited operations
676 have not yet been created.
677
ab8418a3 6782019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
679
680 * bindo-elaborators.adb (Elaborate_Units): Set attribute
681 Elab_Position of all elaborated units.
682 (Set_Unit_Elaboration_Positions): New routine.
683
6e618828 6842019-07-10 Gary Dismukes <dismukes@adacore.com>
685
686 * exp_util.adb: Reformatting and a typo fix.
687
97f6f798 6882019-07-10 Yannick Moy <moy@adacore.com>
689
690 * exp_util.adb (Remove_Side_Effects): Prefer renamings for
691 objects of possible owning type in GNATprove mode.
692
89c67bd9 6932019-07-09 Ed Schonberg <schonberg@adacore.com>
694
695 * sem_ch3.adb (Analyze_Object_Declaration): If the object type
696 is a composite type that has a dynamic predicate and, the
697 expression in the declaration is an aggregate, the generated
698 predicate check must appear after the expanded code for the
699 aggregate, which will appear after the rewritten object
700 declarastion.
701
fb739c45 7022019-07-09 Justin Squirek <squirek@adacore.com>
703
704 * sem_eval.adb (Expr_Value_E): Add conditional to correctly
705 handle constant enumerated character types.
706
54b39f26 7072019-07-09 Eric Botcazou <ebotcazou@adacore.com>
708
709 * libgnarl/s-osinte__mingw.ads (CRITICAL_SECTION): Use proper
710 type for SpinCount component.
711
9b57fc30 7122019-07-09 Justin Squirek <squirek@adacore.com>
713
714 * exp_ch4.adb (Expand_N_Allocator): Add conditional to detect
715 the presence of anoymous access type allocators and issue a
716 warning if the appropriate warning flag is enabled.
717 * warnsw.ads: Add new warning flag for anonymous allocators
718 * warnsw.adb (All_Warnings, Restore_Warnings, Save_Warnings,
719 Set_Underscore_Warning_Switch): Register new flags.
720 (WA_Warnings): Register new flag as an "all warnings" switch
721 * usage.adb,
722 doc/gnat_ugn/building_executable_programs_with_gnat.rst:
723 Document new warning switches -gnatw_a and -gnatw_A.
724 * gnat_ugn.texi: Regenerate.
725
2463fa93 7262019-07-09 Ed Schonberg <schonberg@adacore.com>
727
728 * sem_ch4.adb (Diagnose_Call): Improve error recovery when a
729 local subprogram name hides a possible candidate name declared
730 in a child package in the context of the current unit.
731 * sem_ch6.adb (Process_Formals): Protect against malformed
732 formal types when the parameter type does not denote an entity.
733
7389bee5 7342019-07-09 Hristian Kirtchev <kirtchev@adacore.com>
735
736 * bindo-augmentors.adb (Visit_Elaboration_Root): Do not start a
737 DFS from an elaboration root whose corresponding unit lacks
738 elaboration code. This behavior mimics that of the old
739 elaboration order mechanism.
740 * bindo-graphs.adb (Find_All_Cycles_Through_Vertex): Move the
741 vertex tracing within the functional branches of the routine.
742 This prevents spurious trace output.
743 (Has_No_Elaboration_Code): New routine.
744 (Trace_Cycle, Trace_Edge): Update the various Ids to use the
745 "standard" trace format.
746 * bindo-graphs.ads (Has_No_Elaboration_Code): New routine.
747 * bindo-units.ads, bindo-units.adb (Has_No_Elaboration_Code):
748 New routine.
749
06d78d4c 7502019-07-09 Piotr Trojanek <trojanek@adacore.com>
751
752 * ali.ads, bindo-graphs.adb, bindo-validators.adb, clean.adb,
753 doc/gnat_ugn/elaboration_order_handling_in_gnat.rst, einfo.ads,
754 exp_aggr.adb, exp_ch13.adb, exp_ch4.adb, exp_ch5.adb,
755 exp_ch6.adb, exp_ch7.adb, exp_ch9.adb, exp_pakd.adb,
756 fname-uf.ads, gnatlink.adb, inline.adb, lib.ads, make.adb,
757 namet.ads, opt.ads, par-ch4.adb, par-ch6.adb, par-labl.adb,
758 prep.adb, sem_aggr.adb, sem_ch13.adb, sem_ch4.adb, sem_ch5.adb,
759 sem_ch6.adb, sem_ch6.ads, sem_ch7.adb, sem_ch8.adb, sem_dim.adb,
760 sem_disp.adb, sem_prag.adb, sem_res.adb, sem_warn.adb,
761 sinfo.ads: Replace ". " with ". ". Minor reformatting and typo
762 corrections.
763 * gnat_ugn.texi: Generate.
764
7ed20965 7652019-07-09 Hristian Kirtchev <kirtchev@adacore.com>
766
767 * bindo.ads: Move type Precedence_Kind from the private to the
768 visible part of the unit.
769 * bindo-augmentors.adb: Remove the use of global data as it is
770 bad practice.
771 (Augment_Library_Graph): Update the parameter profile.
772 (Is_Visited, Set_Is_Visited): Remove.
773 (Visit_Elaboration_Root, Visit_Elaboration_Roots): Update the
774 parameter profile and comment on usage.
775 (Visit_Vertex): Likewise. Also keep track of which invocation
776 edge activates a task.
777 * bindo-augmentors.ads (Augment_Library_Graph): Update the
778 parameter profile and comment on usage.
779 * bindo-builders.adb (Create_Forced_Edge,
780 Create_Spec_And_Body_Edge, Create_With_Edge): Update the call to
781 Add_Edge.
782 * bindo-diagnostics.adb: Add with end use clauses for Restrict
783 and Rident.
784 (Output_Dynamic_Model_Suggestions): Remove.
785 (Output_Invocation_Related_Suggestions): New routine.
786 (Output_Suggestions): Output all invocation-related suggestions
787 together.
788 * bindo-elaborators.adb: Remove types Comparator_Ptr and
789 Predicate_Ptr.
790 (Find_Best_Vertex): Update the parameter profile.
791 * bindo-graphs.adb (Activates_Task): New routine.
792 (Add_Body_Before_Spec_Edge): Update the call to
793 Add_Edge_With_Return.
794 (Add_Edge): Update the parameter profile and the call to
795 Add_Edge_With_Return.
796 (Add_Edge_With_Return): Update the parameter profile and comment
797 on usage.
798 (At_Least_One_Edge_Satisfies): New routine.
799 (Contains_Elaborate_All_Edge): Reimplement.
800 (Contains_Static_Successor_Edge, Contains_Task_Activation): New
801 routine.
802 (Contains_Weak_Static_Successor): Remove.
803 (Is_Static_Successor_Edge): New routine.
804 * bindo-graphs.ads: Add types LGE_Predicate_Ptr,
805 LGV_Comparator_Ptr, and LGV_Predicate_Ptr. Update type
806 Library_Graph_Edge_Attributes to capture whether an invocation
807 edge activates a task. Update the value of
808 No_Library_Graph_Edge_Attributes.
809 (Activates_Task): Update the parameter profile and comment on
810 usage.
811 (Contains_Static_Successor_Edge, Contains_Task_Activation): New
812 routines.
813 (Contains_Weak_Static_Successor): Remove.
814 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst:
815 Update the documentation to reflect the new task-related advice.
816 * gnat_ugn.texi: Regenerate.
817
247527b7 8182019-07-09 Piotr Trojanek <trojanek@adacore.com>
819
820 * exp_util.adb (Containing_Package_With_Ext_Axioms): Replace
821 low-level Ekind test with a high-level wrapper.
822
1d7a9954 8232019-07-09 Arnaud Charlet <charlet@adacore.com>
824
825 * libgnat/s-memory.adb: Disable calls to Abort defer/undefer
826 when ZCX_By_Default.
827
7667b40a 8282019-07-09 Javier Miranda <miranda@adacore.com>
829
830 * sem_ch13.adb (Rep_Item_Too_Early): Representation clauses are
831 not allowed for a derivation of a generic type. Extend the
832 current test to check that none of the parents is a generic
833 type.
834
98eb8111 8352019-07-09 Hristian Kirtchev <kirtchev@adacore.com>
836
837 * exp_ch9.adb, exp_util.adb, repinfo.adb, sem_ch12.adb,
838 sem_prag.adb, sem_res.adb, sem_spark.adb, sem_util.adb: Minor
839 reformatting.
840
5ffa473a 8412019-07-09 Ed Schonberg <schonberg@adacore.com>
842
843 * sem_res.adb (Resolve_Equality_Op): If the node was overloaded,
844 set properly the entity to which the node has been resolved. The
845 original entity is the first one found during analysis, and is
846 not necessarily the resolved one.
847 (Resolve_Op_Not): If the argument of negation is an overloaded
848 equality operation, call its resolution directly given that the
849 context type does not participate in overload resolution.
850
f7197450 8512019-07-09 Hristian Kirtchev <kirtchev@adacore.com>
852
853 * bindo.adb: Remove with and use clauses for Debug. Add with
854 and use clauses for Opt.
855 (Find_Elaboration_Order): Enable the v4.0 elaboration order. The
856 v3.0 mechanism is now available under binder switch -H.
857 * bindusg.adb (Display): Enable switch -H.
858 * debug.adb: Free compiler switch -gnatd_G. Free binder switch
859 -d_N.
860 * sem_elab.adb: Update the section on switches to remove
861 -gnatd_G.
862 (Invocation_Graph_Recording_OK): The invocation graph is now
863 unconditionally recorded in ALI files.
864 * switch-b.adb (Scan_Binder_Switches): Scan switch -H.
865 * doc/gnat_ugn/building_executable_programs_with_gnat.rst:
866 Update the documentation on compiler switches related to
867 elaboration. Update the documentation on binder switches to
868 include switch -H.
869 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update
870 the documentation on elaboration order handling in GNAT.
871 * gnat_ugn.texi: Regenerate.
872
a2c6c634 8732019-07-09 Eric Botcazou <ebotcazou@adacore.com>
874
875 * repinfo.adb (List_Entities): Disregard formals altogether.
876 (List_Name): Properly escape the double quote in the JSON
877 output.
878
3933efcf 8792019-07-09 Javier Miranda <miranda@adacore.com>
880
881 * exp_util.adb (Remove_Side_Effects): Preserve the
882 Do_Range_Check flag.
883
2166bdef 8842019-07-09 Yannick Moy <moy@adacore.com>
885
886 * sinfo.ads: Refine comment for Do_Range_Check.
887
dbf9a3d7 8882019-07-09 Yannick Moy <moy@adacore.com>
889
890 * exp_spark.adb (Expand_SPARK_N_Attribute_Reference): Expand
891 attribute reference on Enum_Rep.
892
44e00a56 8932019-07-09 Ed Schonberg <schonberg@adacore.com>
894
895 * sem_ch12.adb (Instantiate_Formal_Package): Handle properly the
896 case where the actual for a formal package in an instance is the
897 current instance of an enclosing generic package.
898 (Check_Formal_Packages): If the formal package declaration is
899 box-initialized or lacks associations altogether, no internal
900 instance was created to verify conformance, and there is no
901 validating package to remove from tree.
902
3e4e7139 9032019-07-09 Yannick Moy <moy@adacore.com>
904
905 * freeze.adb (Build_Renamed_Body): Do not set body to inline in
906 GNATprove mode.
907
8235b943 9082019-07-09 Yannick Moy <moy@adacore.com>
909
910 * exp_util.adb (Expand_Subtype_From_Expr): Still expand the type
911 of static expressions in GNATprove_Mode.
912 * sem_ch3.adb (Analyze_Object_Declaration): Remove obsolete
913 special case for GNATprove_Mode.
914
cf9af2fa 9152019-07-09 Piotr Trojanek <trojanek@adacore.com>
916
917 * doc/gnat_rm/the_gnat_library.rst,
918 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
919 erroutc.adb, libgnat/g-comlin.adb, libgnat/g-comlin.ads,
920 libgnat/g-regexp.ads, libgnat/g-regpat.ads,
921 libgnat/g-spipat.ads, libgnat/s-os_lib.ads,
922 libgnat/s-regexp.ads: Reword "wild card" to "wildcard".
923 * gnat_rm.texi, gnat_ugn.texi: Regenerate.
924
a080baa9 9252019-07-09 Yannick Moy <moy@adacore.com>
926
927 * sem_spark.adb (Check_Expression): Handle correctly implicit
928 assignments as part of allocators and (extension) aggregates.
929 (Get_Root_Object): Adapt for new path expressions.
930 (Is_Path_Expression): Return True for (extension) aggregate.
931
d9b7ae15 9322019-07-09 Piotr Trojanek <trojanek@adacore.com>
933
934 * einfo.ads: Fix a typo.
935
4c24efa6 9362019-07-09 Ed Schonberg <schonberg@adacore.com>
937
938 * sem_util.adb (Scope_Within_Or_Same): Handle properly task
939 bodies and protected bodies, so that local variables within have
940 their proper scopes after these constructs have been rewritten
941 during expansion. This patch resembles but is not identical to
942 the code in Scope_Within.
943
6c334e66 9442019-07-09 Arnaud Charlet <charlet@adacore.com>
945
946 * gnat1drv.adb (Adjust_Global_Switches): Set
947 Dynamic_Elaboration_Checks to True in CodePeer mode.
948
82c20af0 9492019-07-09 Yannick Moy <moy@adacore.com>
950
951 * sem_spark.adb (Get_Perm_Or_Tree): Issue an error when
952 encountering unknown global variable.
953
a42b8e6a 9542019-07-09 Yannick Moy <moy@adacore.com>
955
956 * sem_spark.adb (Check_Expression): Change signature to take an
957 Extended_Checking_Mode, for handling read permission checking of
958 sub-expressions in an assignment.
959 (Check_Parameter_Or_Global): Adapt to new behavior of
960 Check_Expression for mode Assign.
961 (Check_Safe_Pointers): Do not analyze generic bodies.
962 (Check_Assignment): Separate checking of the target of an
963 assignment.
964
5fb4f6e3 9652019-07-09 Eric Botcazou <ebotcazou@adacore.com>
966
967 * repinfo.ads (JSON format): Adjust.
968 * repinfo.adb (Need_Blank_Line): Rename to...
969 (Need_Separator): ...this.
970 (Blank_Line): Rename to...
971 (Write_Separator): ...this and add JSON specific handling.
972 (List_Array_Info): Adjust to above renaming.
973 (List_Object_Info): Likewise.
974 (List_Record_Info): Likewise.
975 (List_Subprogram_Info): Likewise.
976 (List_Type_Info): Likewise.
977 (List_Entities): Do not set Need_Blank_Line.
978 (List_Rep_Info): Set Need_Separator and add JSON specific
979 handling. Output a single JSON stream in the normal case.
980
b389ec1e 9812019-07-09 Arnaud Charlet <charlet@adacore.com>
982
983 * doc/gnat_ugn/the_gnat_compilation_model.rst: Update doc on
984 -fdump-ada-spec now that we generate Ada 2012.
985 * gnat_ugn.texi: Regenerate.
986
5acb3702 9872019-07-08 Eric Botcazou <ebotcazou@adacore.com>
988
989 * repinfo.adb (List_Common_Type_Info): New procedure extracted
990 from...
991 (List_Type_Info): ...here. Call it for the common information,
992 start with a blank line and output the linker section at the
993 end, if any.
994 (List_Mechanisms): Rename to...
995 (List_Subprogram_Info): ...this.
996 (List_Array_Info): Call List_Common_Type_Info.
997 (List_Entities): Adjust to above change and renaming.
998 (List_Record_Info): Call List_Common_Type_Info.
999
6eb57612 10002019-07-08 Dmitriy Anisimkov <anisimko@adacore.com>
1001
1002 * libgnat/g-sercom.ads
1003 (Serial_Port_Descriptor): New type.
1004 (Serial_Port): Add a comment, make it hold a
1005 Serial_Port_Descriptor.
1006 (To_Ada, To_C): New procedures.
1007 (Port_Data, Port_Data_Access): Remove types.
1008 * libgnat/g-sercom.adb (To_Ada): New stub.
1009 * libgnat/g-sercom__linux.adb, libgnat/g-sercom__mingw.adb:
1010 Update implementations accordingly.
1011 * s-oscons-tmplt.c: Bind Serial_Port_Descriptor to
1012 System.Win32.HANDLE on Windows, and to Interfaces.C.int on
1013 Linux. Add "Interfaces.C." prefix for other basic integer type
1014 bindings.
1015 * xoscons.adb (Output_Info): Remove the "Interfaces.C." prefix
1016 for subtypes generation.
1017
08da2ad9 10182019-07-08 Arnaud Charlet <charlet@adacore.com>
1019
1020 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
1021 Update documentation on No_Exceptions restriction.
1022 * gnat_rm.texi: Regenerate.
1023
89b07420 10242019-07-08 Dmitriy Anisimkov <anisimko@adacore.com>
1025
1026 * libgnat/s-os_lib.adb: Do not call __gnat_kill for Invalid_Pid.
1027
0cc34fed 10282019-07-08 Piotr Trojanek <trojanek@adacore.com>
1029
1030 * sem_util.adb (Enclosing_Package_Or_Subprogram): Do not expect
1031 package and subprogram bodies.
1032
46299a06 10332019-07-08 Bob Duff <duff@adacore.com>
1034
1035 * doc/gnat_ugn/gnat_utility_programs.rst: Remove documentation
1036 of ignored GNATpp switch.
1037
4475d2f0 10382019-07-08 Hristian Kirtchev <kirtchev@adacore.com>
1039
1040 * doc/gnat_rm/implementation_defined_pragmas.rst:
1041 Update the documentation of pragma Initialize_Scalars.
1042 * gnat_rm.texi: Regenerate.
1043
b282b25b 10442019-07-08 Javier Miranda <miranda@adacore.com>
1045
1046 * exp_ch4.adb (Tagged_Membership): Fix regression silently
1047 introduced in r260738 that erroneouslusy causes the evaluation
1048 to True of the membership test when the left operand of the
1049 membership test is a class-wide interface object and the right
1050 operand is a type that implements such interface type.
1051
703ee0e0 10522019-07-08 Hristian Kirtchev <kirtchev@adacore.com>
1053
1054 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
1055 register an address clause when its prefix denotes a generic
1056 formal object.
1057
e6b4414e 10582019-07-08 Hristian Kirtchev <kirtchev@adacore.com>
1059
1060 * bindo-diagnostics.adb (Diagnose_Cycle): Capture the presence
1061 of an Elaborate_All edge before iterating over the edges of the
1062 cycle.
1063 (Output_Elaborate_Body_Transition): Update the parameter profile
1064 and the comment on usage. Add a missing case where the edge is
1065 within the context of an Elaborate_All.
1066 (Output_Transition): Update the call to
1067 Output_Elaborate_Body_Transition.
1068 * bindo-graphs.ads, bindo-graphs.adb
1069 (Contains_Elaborate_All_Edge): New routine.
1070
5a4de65a 10712019-07-08 Piotr Trojanek <trojanek@adacore.com>
1072
1073 * lib-xref-spark_specific.adb (Create_Heap): Set dummy Etype for
1074 the fake __HEAP entity.
1075
42253061 10762019-07-08 Daniel Mercier <mercier@adacore.com>
1077
1078 * gnat1drv.adb: Suppress warnings on memory representation in
1079 CodePeer compiler mode.
1080
a7c8fd7e 10812019-07-08 Nicolas Roche <roche@adacore.com>
1082
1083 * rtinit.c (__gnat_runtime_initialize): Remove dependency on
1084 CommandLineToArgvW.
1085
89c9dd55 10862019-07-08 Doug Rupp <rupp@adacore.com>
1087
1088 * Makefile.rtl: Handle vxworks7r2 in x86_64 and x86 vxworks7.
1089
944903c8 10902019-07-08 Dmitriy Anisimkov <anisimko@adacore.com>
1091
1092 * Makefile.rtl: Use g-sercom__linux.adb for all linuxes.
1093
e51a140c 10942019-07-08 Yannick Moy <moy@adacore.com>
1095
1096 * expander.adb (Expand): Do not reset Analyzed flag always.
1097 * sem_eval.adb (Fold_Ureal): Mark node as analyzed.
1098
f117e449 10992019-07-08 Ed Schonberg <schonberg@adacore.com>
1100
1101 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Do not insert twice
1102 the assignment statement that computes the delay value, to
1103 prevent improper tree sharing when the value is a type
1104 conversion and Float_Overflow checks are enabled.
1105
f5cb3a59 11062019-07-08 Hristian Kirtchev <kirtchev@adacore.com>
1107
1108 * bindo.adb: Update the section on terminology to include new
1109 concepts. Update the section on switches to include new
1110 entries.
1111 * bindo.ads: Add type Precedence_Kind.
1112 * bindo-builders.adb: Add with and use clauses for Debug and
1113 Bindo.Validators. Add use clauses for
1114 Bindo.Validators.Invocation_Graph_Validators and
1115 Bindo.Validators.Library_Graph_Validators.
1116 (Build_Invocation_Graph): Validate the graph immediately after
1117 it was built.
1118 (Build_Library_Graph): Update the parameter profile. The
1119 creation of the graph is now elaboration model-agnostic.
1120 Validate the graph immediately after it was built.
1121 (Create_With_Edge): Create regular with edges for Elaborate and
1122 Elaborate_All edges when the appropriate debug switches are in
1123 effect.
1124 * bindo-builders.ads (Build_Library_Graph): Update the parameter
1125 profile.
1126 * bindo-diagnostics.adb (Diagnose_Cycle): Track the presence of
1127 an Elaborate_All edge throughout the inspection of the cycle's
1128 edges.
1129 (Output_Dynamic_Model_Suggestions): Output the suggestion only
1130 when the cycle contains at least one weak edge where the
1131 successor was statically elaborated.
1132 (Output_Elaborate_Body_Transition, Output_Forced_Transition,
1133 Output_With_Transition): Update the assertions.
1134 * bindo-elaborators.adb: Remove use clauses for
1135 Bindo.Validators.Invocation_Graph_Validators and
1136 Bindo.Validators.Library_Graph_Validators. Remove strings
1137 Add_To_All_Candidates_Msg and Add_To_Comp_Candidates_Msg.
1138 Remove type String_Ptr.
1139 (Add_Vertex, Add_Vertex_If_Elaborable, Create_All_Candidates_Set
1140 Create_Component_Candidates_Set): Remove.
1141 (Create_Component_Vertex_Sets, Create_Vertex_Sets): New routine.
1142 (Elaborate_Component): Update the parameter profile and the
1143 comment on usage. Reimplement the elaboration of a component.
1144 The algorithm will now attempt to elaborate as many vertices
1145 possible. If this is not possible, and a weakly elaborable
1146 vertex is available use unit was compiled using the dynamic
1147 model, the algorithm will elaborate it.
1148 (Elaborate_Library_Graph): Reimplement the elaboration of the
1149 graph. The algorithm will now attempt to elaborate as many
1150 vertices along with their components as possible. If this is not
1151 possible, and a weakly elaborable vertex is available use unit
1152 was compiled using the dynamic model, the algorithm will
1153 elaborate it along with its component.
1154 (Elaborate_Units): Merge with the functionality of
1155 Elaborate_Units_Common.
1156 (Elaborate_Units_Common, Elaborate_Units_Dynamic,
1157 Elaborate_Units_Static): Remove.
1158 (Elaborate_Vertex): Update the parameter profile and the comment
1159 on usage. Reimplemented.
1160 (Find_Best_Candidate): Remove.
1161 (Find_Best_Elaborable_Vertex, Find_Best_Vertex,
1162 Find_Best_Weakly_Elaborable_Vertex, Has_Elaborable_Body,
1163 Insert_Elaborable_Successor, Insert_Vertex): New routines.
1164 (Is_Better_Candidate): Remove.
1165 (Is_Better_Elaborable_Vertex,
1166 Is_Better_Weakly_Elaborable_Vertex,
1167 Is_Suitable_Elaborable_Vertex,
1168 Is_Suitable_Weakly_Elaborable_Vertex): New routines.
1169 (Trace_Candidate_Vertices): Remove.
1170 (Trace_Component): Output the number of strong and weak
1171 predecessors.
1172 (Trace_Unelaborated_Vertices): Remove.
1173 (Trace_Vertex): Output the number of strong and weak
1174 predecessors.
1175 (Trace_Vertices): New routine.
1176 (Update_Successor, Update_Successors): Update the parameter
1177 profile and the comment on usage.
1178 * bindo-graphs.adb: Remove type Precedence_Kind.
1179 (Add_Edge_With_Return): Update the increment of pending
1180 predecessors.
1181 (Add_Vertex): Provide default values for strong and weak
1182 predecessors.
1183 (Complementary_Vertex): Move the initial declaration to the
1184 spec. Update the parameter profile and the comment on usage.
1185 (Contains_Weak_Static_Successor): New routine.
1186 (Create): Update the parameter profile. The creation of the
1187 graph is now elaboration model-agnostic.
1188 (Decrement_Pending_Predecessors): Update the parameter profile
1189 and the comment on usage. Reimplemented.
1190 (Delete_Edge): Update the decrement of pending predecesors.
1191 (Has_Elaborate_Body): Do not treat a vertex as being subject to
1192 Elaborate_Body when a debug switch is in effect.
1193 (Increment_Pending_Predecessors): Update the parameter profile
1194 and the comment on usage. Reimplemented.
1195 (Is_Elaborable_Component): Reimplemented.
1196 (Is_Elaborable_Vertex): Move the initial declaration to the
1197 spec. Reimplemented.
1198 (Is_Elaborate_Body_Pair): New routine.
1199 (Is_Dynamically_Elaborated): Update the parameter profile.
1200 Reimplemented.
1201 (Is_Weakly_Elaborable_Vertex): New routine.
1202 (Pending_Predecessors): Removed.
1203 (Pending_Predecessors_For_Elaboration,
1204 Pending_Strong_Predecessors, Pending_Weak_Predecessors,
1205 Update_Pending_Predecessors): New routines.
1206 (Update_Pending_Predecessors_Of_Components): Update the
1207 increment of pending predecessors.
1208 * bindo-graphs.ads: Update the components of type
1209 Component_Attributes. Update the components of type
1210 Library_Graph_Attributes. Update the components of type
1211 Library_Graph_Vertex_Attributes. Update the initialization of
1212 No_Component_Attributes. Update the initialization of
1213 No_Library_Graph_Vertex_Attributes.
1214 (Complementary_Vertex, Contains_Weak_Static_Successor): New
1215 routines.
1216 (Create): Update the parameter profile and the comment on usage.
1217 (Decrement_Pending_Predecessors, Is_Dynamically_Elaborated):
1218 Update the parameter profile and the comment on usage.
1219 (Is_Elaborate_Body_Pair, Is_Weakly_Elaborable_Vertex): New
1220 routines.
1221 (Pending_Predecessors): Removed.
1222 (Pending_Predecessors_For_Elaboration,
1223 Pending_Strong_Predecessors, Pending_Weak_Predecessors): New
1224 routines.
1225 * bindo-writers.adb (Write_Components): Moved from the spec.
1226 (Write_Component): Output the strong and weak predecessors.
1227 (Write_Library_Graph): Output the components as part of the
1228 graph.
1229 (Write_Library_Graph_Vertex): Output the strong and weak
1230 predecessors.
1231 * bindo-writers.ads (Write_Components): Moved to the body.
1232 * debug.adb: Add and document new GNATbind switches -d_a, -d_b,
1233 -d_e.
1234 * bindo-validators.adb: Minor reformattings.
1235
7b8ca6b2 12362019-07-08 Bob Duff <duff@adacore.com>
1237
1238 * libgnat/g-sercom.ads, libgnat/g-sercom__linux.adb (Data_Rate):
1239 Support additional data rates.
1240
364c746f 12412019-07-08 Olivier Hainque <hainque@adacore.com>
1242
1243 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Don't request
1244 DECL_ARTIFICIAL_P on elab proc declarations.
1245
2dbfbbb2 12462019-07-08 Eric Botcazou <ebotcazou@adacore.com>
1247
1248 * repinfo.adb (List_Record_Info): Declare Incomplete_Layout and
1249 Not_In_Extended_Main local exceptions.
1250 (List_Structural_Record_Layout): For an extension, raise the
1251 former if the parent subtype has not been built and the latter
1252 if it is not declared in the main source unit. Fall back to the
1253 flat layout if either exception has been raised.
1254
3e05bbec 12552019-07-08 Ed Schonberg <schonberg@adacore.com>
1256
1257 * libgnat/a-strfix.adb (Delete): The RM describes the semantics
1258 of Delete as equivalent to that of Replace_String with a null
1259 argument. As a result, deleting a null string that starts past
1260 the end of its argument is a noop and must not raise
1261 Index_Error.
1262
c98aac61 12632019-07-08 Javier Miranda <miranda@adacore.com>
1264
1265 * exp_disp.adb (Register_Primitive): When registering a
1266 primitive in the secondary dispatch table, handle primitive
1267 inherited through several levels of type derivation (required to
1268 properly handle inherited 'null' primitive).
1269
221b67b6 12702019-07-08 Bob Duff <duff@adacore.com>
1271
1272 * doc/gnat_ugn/gnat_utility_programs.rst: Document handling of
1273 preprocessor directives in GNATpp.
1274
aed4e06a 12752019-07-08 Javier Miranda <miranda@adacore.com>
1276
1277 * gnat1drv.adb (Post_Compilation_Validation_Checks:
1278 Validate_Compile_Time_Warning_Errors is now located in sem_prag
1279 (instead of sem_ch13).
1280 * sem_ch13.ads (Validate_Compile_Time_Warning_Error,
1281 Validate_Compile_Time_Warning_Errors): Move to sem_prag.
1282 * sem_ch13.adb
1283 (Compile_Time_Warnings_Errors): Move to sem_prag.
1284 (Initialize): Remove initialization of table
1285 Compile_Time_Warning_Errors.
1286 (Validate_Compile_Time_Warning_Error,
1287 Validate_Compile_Time_Warning_Errors): Move to sem_prag.
1288 * sem_prag.ads (Validate_Compile_Time_Warning_Errors): New
1289 procedure.
1290 * sem_prag.adb (Initialize): Initialize table
1291 Compile_Time_Warning_Errors.
1292
b9bd5934 12932019-07-08 Ed Schonberg <schonberg@adacore.com>
1294
1295 * sem_ch13.adb (Analyze_Aspect_Specifications): For a
1296 pre/postcondition of a generic subprogram declaration, do not
1297 use Relocate_Node on the aspect expression to construct the
1298 corresponding attribute specification, to prevent tree anomalies
1299 when the expression is a call with named actual parameters.
1300
63bb17d8 13012019-07-08 Javier Miranda <miranda@adacore.com>
1302
1303 * sem_attr.adb (Analyze_Attribute [Attribute_Size]): For pragmas
1304 used to report user defined compile time warning or errors
1305 handle 'Size for types with known static RM size.
1306
1979cbfe 13072019-07-08 Justin Squirek <squirek@adacore.com>
1308
1309 * exp_imgv.adb (Build_Enumeration_Image_Tables): Default SSO for
1310 the building of image tables.
1311 (Expand_Image_Attribute): Minor cleanup.
1312
bcb0a375 13132019-07-08 Dmitriy Anisimkov <anisimko@adacore.com>
1314
1315 * libgnat/g-socket.ads, libgnat/g-socket.adb: Improve
1316 documentation.
1317 (Get_Socket_Option, Set_Socket_Option): Remove default value for
1318 the Level formal.
1319
429822c1 13202019-07-08 Ed Schonberg <schonberg@adacore.com>
1321
1322 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): For an
1323 unanalized aspect in a generic context that has not been
1324 analyzed yet, if the aspect applies to a type, place the type on
1325 the scope stack to make its components visible, before checking
1326 conformance with the version of the expression analyzed at the
1327 freeze point.
1328
e1415398 13292019-07-05 Justin Squirek <squirek@adacore.com>
1330
1331 * checks.adb (Apply_Accessibility_Check): Add logic to fetch the
1332 function result accessibility level if one is required within
1333 the generated check.
1334 * exp_ch6.adb (Needs_Result_Accessibility_Level): Modify
1335 controlling elsif block to handle more cases such as anonymous
1336 access results and disable checking for coextensions.
1337
dad9e9f8 13382019-07-05 Ed Schonberg <schonberg@adacore.com>
1339
1340 * sem_ch9.adb (Analyze_Accept_Statement): If this is an illegal
1341 accept statement for an enclosing entry abandon analysis to
1342 prevent scope mismatches and potential infinite loops in
1343 compiler.
1344
627d0751 13452019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
1346
1347 * ali.adb (For_Each_Invocation_Construct,
1348 For_Each_Invocation_Relation): New version.
1349 (Scan_ALI): Initialize field Invocation_Graph_Encoding.
1350 (Set_Invocation_Graph_Encoding): Update the setting of the
1351 invocation graph encoding.
1352 * ali.ads: Move field Invocation_Graph_Encoding from Unit_Record
1353 to ALI_Record because the encoding applies to the whole ALI,
1354 rather than one of the units (spec or body) for which the ALI
1355 file was created.
1356 (For_Each_Invocation_Construct, For_Each_Invocation_Relation):
1357 New version.
1358 * bindo.adb: Update the section on switches. Complete the
1359 section of debugging elaboration order issues.
1360 (Find_Elaboration_Order): Prepare the routine for the switch
1361 from the old to the new elaboration order mechanism.
1362 * bindo-diagnostics.adb (Find_And_Output_Invocation_Paths):
1363 Manage a visited set used by Visit_Vertex.
1364 (Output_All_Cycles_Suggestions,
1365 Output_Dynamic_Model_Suggestions): Clarify the nature of the
1366 suggested switch.
1367 (Output_Elaborate_Body_Transition): Update the diagnostic to
1368 emit a better message.
1369 (Output_Forced_Suggestions, Output_Full_Encoding_Suggestions):
1370 Clarify the nature of the suggested switch.
1371 (Visit_Vertex): Update the parameter profile to add a set of
1372 invokers visited during the transition. This set prevents
1373 infinite exploration of the graph in case the invocations are
1374 recursive.
1375 * bindo-elaborators.adb: Add a use clause for
1376 Bindo.Writers.Dependency_Writers.
1377 (Elaborate_Units_Common): Output the library graph after it has
1378 been augmented with invocation edges. Output just the components
1379 instead of outputting the whole library graph again.
1380 (Elaborate_Units_Dynamic, Elaborate_Units_Static): Output the
1381 dependencies as expressed in the library graph.
1382 * bindo-units.adb (Invocation_Graph_Encoding): Update the
1383 extraction of the invocation graph encoding.
1384 * bindo-writers.adb: Add with and use clauses for Binderr and
1385 Butil.
1386 (palgc, plgc): New debug routine.
1387 (Write_Components): Moved to the spec. Add a header for the
1388 output.
1389 (Write_Dependencies, Write_Dependencies_Of_Vertex,
1390 Write_Dependency_Edge): New routine.
1391 (Write_Elaboration_Order): Update the logic to follow the format
1392 of Binde's order output.
1393 (Write_Library_Graph): Do not output the components every time
1394 the graph is written.
1395 (Write_Unit): Output the invocation graph encoding of the unit.
1396 Output the invocation constructs and relations for the unit
1397 only.
1398 * bindo-writers.ads (Write_Components): Moved from the body.
1399 (Write_Dependencies): New routine.
1400 * bindusg.adb: Prepare the routine for the switch from the old
1401 to the new elaboration order mechanism.
1402 * debug.adb: Binder switch -d_O is now not associated with any
1403 functionality.
1404 * einfo.adb (Is_Elaboration_Target): The attribute applies to
1405 packages, as specified by the comment on the attribute usage.
1406 * opt.ads: Add a global flag which controls the choice between
1407 the new and the legacy elaboration order mechanism.
1408 * sem_elab.adb: Add Package_Target to type Target_Kind.
1409 (Build_Elaborate_Body_Procedure, Build_Elaborate_Procedure,
1410 Build_Elaborate_Spec_Procedure, Check_Elaboration_Scenarios,
1411 Check_SPARK_Model_In_Effect): Use Main_Unit_Entity to obtain the
1412 entity of the main unit.
1413 (Create_Package_Rep): New routine.
1414 (Create_Target_Rep): Add processing for packages.
1415 (Declaration_Placement_Of_Node, Has_Prior_Elaboration): Use
1416 Main_Unit_Entity to obtain the entity of the main
1417 unit.
1418 (Invocation_Graph_Recording_OK): Prepare the routine for the
1419 switch from the old to the new elaboration order mechanism.
1420 (Main_Unit_Entity): New routine.
1421 (Meet_Elaboration_Requirement,
1422 Process_Conditional_ABE_Variable_Reference): Use
1423 Main_Unit_Entity to obtain the entity of the main unit.
1424 (Process_Invocation_Instantiation): New routine.
1425 (Process_Invocation_Scenario): Add processing for
1426 instantiations.
1427 * switch-b.adb (Scan_Binder_Switches): Prepare the routine for
1428 the switch from the old to the new elaboration order mechanism.
1429
30fb27b1 14302019-07-05 Joffrey Huguet <huguet@adacore.com>
1431
1432 * libgnat/a-textio.adb: Add abstract state refinment.
1433 * libgnat/a-textio.ads: Add File_System abstract state. Add
1434 global contracts, contract cases, preconditions and
1435 postconditions to procedures and functions.
1436 (Set_Input, Set_Output, Set_Error, Standard_Input,
1437 Standard_Output, Standard_Error, Current_Input, Current_Output,
1438 Current_Error): Turn SPARK_Mode off.
1439 (Get_Line): Turn SPARK_Mode off on Get_Line functions.
1440 * libgnat/a-tideio.ads, libgnat/a-tienio.ads,
1441 libgnat/a-tifiio.ads, libgnat/a-tiflio.ads,
1442 libgnat/a-tiinio.ads, libgnat/a-timoio.ads: Add global
1443 contracts, contract cases, preconditions and postconditions to
1444 procedures and functions.
1445
ce99fc8a 14462019-07-05 Arnaud Charlet <charlet@adacore.com>
1447
1448 * doc/gnat_ugn/platform_specific_information.rst: Refresh doc on
1449 installing from the command line on Windows. Remove obsolete
1450 part.
1451 * gnat_ugn.texi: Regenerate.
1452
26ea5003 14532019-07-05 Vasiliy Fofanov <fofanov@adacore.com>
1454
1455 * libgnat/a-wichha.ads (Is_Alphanumeric): Replace comment with
1456 the correct one. Also capitalize references to False
1457 throughout.
1458
c9c81835 14592019-07-05 Eric Botcazou <ebotcazou@adacore.com>
1460
1461 * exp_ch4.adb (Expand_N_Indexed_Component): Do not expand actual
1462 parameters of function calls here either.
1463
50948c8a 14642019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
1465
1466 * bindo-units.adb, checks.adb, exp_attr.adb, exp_ch3.adb,
1467 exp_ch4.adb, exp_pakd.adb, lib-writ.adb, libgnat/g-traceb.adb,
1468 libgnat/g-traceb.ads, libgnat/s-stratt.ads, sem_aux.ads,
1469 sem_util.adb: Minor reformatting.
1470
a9fa50ab 14712019-07-05 Ed Schonberg <schonberg@adacore.com>
1472
1473 * sem_ch13.adb (Build_Predicate_Functions): If a subtype that
1474 carries a static predicate aspect is frozen immediately after
1475 its declaration, ensure that the generated function body created
1476 for predicate checking is inserted after the corresponding
1477 subprogram declaration, which is created at the point the
1478 declaration is elaborated.
1479
ee4e1dd7 14802019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
1481
1482 * exp_ch7.adb (Cleanup_Record): Use the underlying type when
1483 checking for components with tasks.
1484
2028580f 14852019-07-05 Arnaud Charlet <charlet@adacore.com>
1486
1487 * libgnarl/s-osinte__linux.ads: Link with -lrt before -lpthread.
1488
ec1e481f 14892019-07-05 Ed Schonberg <schonberg@adacore.com>
1490
1491 * exp_pakd.adb (Expand_Bit_Packed_Element_Set): Add explicit
1492 range checks when the index type of the bit-packed array is an
1493 enumeration type with a non-standard representation,
1494
ae60396a 14952019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
1496
1497 * sem_res.adb (Is_Control_Flow_Statement): Delay statements
1498 contain an expression, which in turn may have side effects and
1499 affect the infinite recursion. As a result, delay statements
1500 should not be treated specially.
1501
d33025f2 15022019-07-05 Arnaud Charlet <charlet@adacore.com>
1503
1504 * libgnarl/s-linux.ads, libgnarl/s-linux__alpha.ads,
1505 libgnarl/s-linux__android.ads, libgnarl/s-linux__hppa.ads,
1506 libgnarl/s-linux__mips.ads, libgnarl/s-linux__riscv.ads,
1507 libgnarl/s-linux__sparc.ads: Fix typos in comments.
1508
51f2c7f9 15092019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
1510
1511 * sem_res.adb (Check_Infinite_Recursion): Reimplemented.
1512 (Enclosing_Declaration_Or_Statement,
1513 Invoked_With_Different_Arguments, Is_Conditional_Statement,
1514 Is_Control_Flow_Statement, Is_Immediately_Within_Body,
1515 Is_Raise_Idiom, Is_Raise_Statement, Is_Sole_Statement,
1516 Preceded_By_Control_Flow_Statement,
1517 Within_Conditional_Statement): New routines.
1518
0e6f6ee1 15192019-07-05 Javier Miranda <miranda@adacore.com>
1520
1521 * exp_ch4.adb (Expand_N_Type_Conversion): Do not apply an
1522 accessibility check when the conversion is an access to
1523 class-wide interface type and it is an actual parameter.
1524 * exp_ch6.adb (Expand_Call_Helper): Add documentation on the
1525 accessibility level of an anonymous allocator defining the value
1526 of an access parameter.
1527 * sem_util.ads, sem_util.adb (Dynamic_Accessibility_Level): Add
1528 support for an anonymous allocator whose type is that of a
1529 stand-alone object of an anonymous access to object type.
1530
f28a3d6c 15312019-07-05 Piotr Trojanek <trojanek@adacore.com>
1532
1533 * einfo.ads, sem_res.adb: Typo fixes in comments.
1534
2d8a0eb3 15352019-07-05 Bob Duff <duff@adacore.com>
1536
1537 * exp_ch6.adb (Is_Build_In_Place_Function): Narrow the check for
1538 Has_Foreign_Convention to the imported case only. If a
1539 build-in-place function is exported, and called from Ada code,
1540 build-in-place protocols should be used.
1541
6eddee84 15422019-07-05 Ed Schonberg <schonberg@adacore.com>
1543
1544 * sem_util.adb (Encloing_Subprogram): If Enclosing_Dynamic_Scope
1545 is a loop, continue climbing the scope stack to find the
1546 enclosing subprogram.
1547 (Gather_Components): Handle properly a choice in a record
1548 aggregate that is given by a subtype with a static predicate.
1549
249e38a7 15502019-07-05 Javier Miranda <miranda@adacore.com>
1551
1552 * debug.adb (-gnatd.K): Leave available this switch.
1553 * contracts.adb (Build_And_Analyze_Contract_Only_Subprograms):
1554 Remove.
1555 * scil_ll.ads, scil_ll.adb (Contract_Only_Body_Flag,
1556 Contract_Only_Body_Nodes, Get_Contract_Only_Body,
1557 Is_Contract_Only_Body, Set_Contract_Only_Body): Remove.
1558
33ae0c9f 15592019-07-05 Pierre-Marie de Rodat <derodat@adacore.com>
1560
1561 * libgnat/a-strunb.ads: Import documentation from the RM
1562
70f9c8aa 15632019-07-05 Pierre-Marie de Rodat <derodat@adacore.com>
1564
1565 * libgnat/a-strfix.ads: Import documentation from the RM
1566
1bc68ac2 15672019-07-05 Yannick Moy <moy@adacore.com>
1568
1569 * adabkend.adb (Scan_Back_End_Switches): Accept -Og and -Ofast
1570 switches.
1571
2500be2f 15722019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
1573
1574 * ali.adb: Relocate types Invocation_Construct_Record,
1575 Invocation_Relation_Record, and Invocation_Signature_Record to
1576 the body of ALI. Relocate tables Invocation_Constructs,
1577 Invocation_Relations, and Invocation_Signatures to the body of
1578 ALI. Remove type Body_Placement_Codes. Add new types
1579 Declaration_Placement_Codes, and
1580 Invocation_Graph_Encoding_Codes. Update the literals of type
1581 Invocation_Graph_Line_Codes.
1582 (Add_Invocation_Construct): Update the parameter profile. Add an
1583 invocation construct built from all attributes provided.
1584 (Add_Invocation_Relation): Update the parameter profile. Add an
1585 invocation relation built from all attributes provided.
1586 (Body_Placement): New routine.
1587 (Body_Placement_Kind_To_Code, Code_To_Body_Placement_Kind):
1588 Removed.
1589 (Code_To_Declaration_Placement_Kind,
1590 Code_To_Invocation_Graph_Encoding_Kind, Column,
1591 Declaration_Placement_Kind_To_Code, Extra,
1592 For_Each_Invocation_Construct, For_Each_Invocation_Relation,
1593 Invocation_Graph_Encoding,
1594 Invocation_Graph_Encoding_Kind_To_Code, Invoker, Kind, Line,
1595 Locations, Name): New routine.
1596 (Scan_Invocation_Construct_Line): Reimplement the scanning
1597 mechanism.
1598 (Scan_Invocation_Graph_Attributes_Line): New routine.
1599 (Scan_Invocation_Graph_Line): Use a case statement to dispatch.
1600 (Scan_Invocation_Relation_Line): Reimplement the scanning
1601 mechanism.
1602 (Scope): New routine.
1603 (Set_Invocation_Graph_Encoding, Signature, Spec_Placement,
1604 Target): New routine.
1605 * ali.ads: Add new type Invocation_Graph_Encoding_Kind. Add
1606 component Invocation_Graph_Encoding to type Unit_Record.
1607 Relocate various types and data structures to the body of ALI.
1608 (Add_Invocation_Construct, Add_Invocation_Relation): Update the
1609 parameter profile.
1610 (Body_Placement): New routine.
1611 (Body_Placement_Kind_To_Code, Code_To_Body_Placement_Kind):
1612 Removed.
1613 (Code_To_Declaration_Placement_Kind,
1614 Code_To_Invocation_Graph_Encoding_Kind, Column,
1615 Declaration_Placement_Kind_To_Code, Extra,
1616 For_Each_Invocation_Construct, For_Each_Invocation_Relation,
1617 Invocation_Graph_Encoding,
1618 Invocation_Graph_Encoding_Kind_To_Code, Invoker, Kind, Line,
1619 Locations, Name, Scope, Set_Invocation_Graph_Encoding,
1620 Signature, Spec_Placement, Target): New routine.
1621 * bindo.adb: Add with clause for Binde. Add with and use
1622 clauses for Debug. Update the documentation. Add new switches.
1623 (Find_Elaboration_Order): Dispatch to the proper elaboration
1624 mechanism.
1625 * bindo-augmentors.adb:
1626 Remove with and use clauses for GNAT and GNAT.Sets. Remove
1627 membership set VS. Update the parameter profiles of most
1628 routines to use better parameter names. Update the
1629 implementation of most routine to use the new parameter names.
1630 Remove various redundant assertions.
1631 * bindo-builders.adb: Use better names for instantiated data
1632 structures. Update all references to these names. Update the
1633 parameter profiles of most routines to use better parameter
1634 names. Update the implementation of most routine to use the new
1635 parameter names.
1636 (Build_Library_Graph): Update the parameter profile. Update the
1637 call to Create.
1638 (Create_Vertex): Reimplemented.
1639 (Declaration_Placement_Vertex): New routine.
1640 * bindo-builders.ads (Build_Library_Graph): Update the parameter
1641 profile and comment on usage.
1642 * bindo-diagnostics.adb: Almost a new unit.
1643 * bindo-diagnostics.ads: Add a use clause for
1644 Bindo.Graphs.Invocation_Graphs. Remove package
1645 Cycle_Diagnostics.
1646 (Diagnose_Circularities): New routine.
1647 * bindo-elaborators.adb: Remove the with and use clauses for
1648 Binderr and GNAT.Sets. Remove the use clause for
1649 Bindo.Diagnostics.Cycle_Diagnostics. Remove membership set VS.
1650 Update the parameter profiles of most routines to use better
1651 parameter names. Update the implementation of most routine to
1652 use the new parameter names. (Elaborate_Units_Common): Update
1653 the parameter profile. Pass an infication to the library graph
1654 builder whether the dynamic model is in effect.
1655 (Elaborate_Units_Dynamic, Elaborate_Units_Static): Use
1656 Diagnose_Circularities to provide diagnostics.
1657 (Update_Successor): Use routine In_Same_Component to determine
1658 whether the predecessor and successor reside in different
1659 components.
1660 * bindo-graphs.adb: Add with and use clauses for Butil, Debug,
1661 Output, and Bindo.Writers. Remove with and use clauses for
1662 GNAT.Lists. Update the parameter profiles of most routines to
1663 use better parameter names. Update the implementation of most
1664 routine to use the new parameter names. Remove various
1665 redundant assertions. Remove doubly linked list EL. Add new
1666 type Precedence_Kind.
1667 (Add_Cycle): New routine.
1668 (Add_Vertex): Update the parameter profile. Update the creation
1669 of vertex attributes.
1670 (Add_Vertex_And_Complement, Body_Vertex, Column,
1671 Complementary_Vertex, Copy_Cycle_Path, Cycle_Kind_Of): New
1672 routines.
1673 (Destroy_Invocation_Graph_Edge, Destroy_Library_Graph_Cycle,
1674 Destroy_Library_Graph_Edge, Extra, File_Name,
1675 Find_All_Cycles_Through_Vertex, Find_All_Cycles_With_Edge,
1676 Find_Cycles, Find_First_Lower_Precedence_Cycle,
1677 Get_LGC_Attributes, Has_Next, Hash_Library_Graph_Cycle,
1678 Hash_Library_Graph_Cycle_Attributes, Highest_Precedence_Cycle,
1679 Highest_Precedence_Edge, In_Same_Component, Insert_And_Sort,
1680 Invocation_Edge_Count, Invocation_Graph_Encoding,
1681 Is_Cycle_Initiating_Edge, Is_Cyclic_Edge,
1682 Is_Cyclic_Elaborate_All_Edge, Is_Cyclic_Elaborate_Body_Edge,
1683 Is_Cyclic_Elaborate_Edge, Is_Cyclic_Forced_Edge,
1684 Is_Cyclic_Invocation_Edge, Is_Cyclic_With_Edge,
1685 Is_Dynamically_Elaborated, Is_Elaborate_All_Edge,
1686 Is_Elaborate_Body_Edge, Is_Elaborate_Edge: New routines.
1687 (Is_Existing_Predecessor_Successor_Relation): Removed.
1688 (Is_Forced_Edge, Is_Invocation_Edge, Is_Recorded_Cycle,
1689 Is_Recorded_Edge, Is_With_Edge, Iterate_Edges_Of_Cycle, Kind,
1690 Length): New routine.
1691 (Lib_Vertex): Removed.
1692 (Line, Links_Vertices_In_Same_Component,
1693 Maximum_Invocation_Edge_Count, Next, Normalize_And_Add_Cycle,
1694 Normalize_Cycle_Path, Number_Of_Cycles, Path, Precedence,
1695 Remove_Vertex_And_Complement, Sequence_Next_Cycle): New routines.
1696 (Sequence_Next_IGE_Id): Renamed to Sequence_Next_Edge.
1697 (Sequence_Next_IGV_Id): Renamed to Sequence_Next_Vertex.
1698 (Sequence_Next_LGE_Id): Renamed to Sequence_Next_Edge.
1699 (Sequence_Next_LGV_Id): Renamed to Sequence_Next_Vertex.
1700 (Set_Is_Existing_Predecessor_Successor_Relation): Removed.
1701 (Set_Is_Recorded_Cycle, Set_Is_Recorded_Edge,
1702 Set_LGC_Attributes, Spec_Vertex, Trace_Cycle, Trace_Edge,
1703 Trace_Eol, Trace_Vertex): New routines.
1704 * bindo-graphs.ads: Add with and use clauses for Types and
1705 GNAT.Lists. Update the parameter profiles of most routines to
1706 use better parameter names. Update the implementation of most
1707 routine to use the new parameter names. Add the new
1708 instantiated data structures IGE_Lists, IGV_Sets, LGC_Lists,
1709 LGE_Lists, LGE_Sets, LGV_Sets, and RC_Sets. Add new type
1710 Library_Graph_Cycle_Id along with an empty and initial value.
1711 Remove component Lib_Vertex and add new components Body_Vertex
1712 and Spec_Vertex to type Invocation_Graph_Vertex_Attributes. Add
1713 new type Library_Graph_Cycle_Kind. Add new iterators
1714 All_Cycle_Iterator and Edges_Of_Cycle_Iterator. Add new type
1715 Library_Graph_Cycle_Attributes. Add new components
1716 Cycle_Attributes, Cycles, and Dynamically_Elaborated to type
1717 Library_Graph_Attributes.
1718 (Body_Vertex, Column, Destroy_Invocation_Graph_Edge,
1719 Destroy_Library_Graph_Cycle_Attributes,
1720 Destroy_Library_Graph_Edge, Extra, File_Name, Find_Cycles,
1721 Has_Elaborate_All_Cycle, Has_Next, Hash_Library_Graph_Cycle,
1722 Hash_Library_Graph_Cycle_Attributes, Highest_Precedence_Cycle,
1723 In_Same_Component, Invocation_Edge_Count,
1724 Invocation_Graph_Encoding, Is_Dynamically_Elaborated,
1725 Is_Elaborate_All_Edge, Is_Elaborate_Body_Edge,
1726 Is_Elaborate_Edge, Is_Forced_Edge, Is_Invocation_Edge,
1727 Is_With_Edge, Iterate_All_Cycles, Iterate_Edges_Of_Cycle, Kind):
1728 New routines.
1729 (Length, Lib_Vertex, (Line, Next, Number_Of_Cycles, Present,
1730 Same_Library_Graph_Cycle_Attributes, Spec_Vertex): New routines.
1731 * bindo-units.adb (File_Name, Invocation_Graph_Encoding): New
1732 routines.
1733 * bindo-units.ads: Add new instantiated data structure
1734 Unit_Sets.
1735 (File_Name, Invocation_Graph_Encoding): New routine.
1736 * bindo-validators.adb: Remove with and use clauses for GNAT and
1737 GNAT.Sets. Remove membership set US. Update the parameter
1738 profiles of most routines to use better parameter names. Update
1739 the implementation of most routine to use the new parameter
1740 names.
1741 (Validate_Cycle, Validate_Cycle_Path, Validate_Cycles,
1742 Validate_Invocation_Graph_Vertex): Remove the validation of
1743 component Lib_Vertex. Add the validation of components
1744 Body_Vertex and Spec_Vertex.
1745 (Write_Error): New routine.
1746 * bindo-validators.ads (Validate_Cycles): New routine.
1747 * bindo-writers.adb: Update the parameter profiles of most
1748 routines to use better parameter names. Update the
1749 implementation of most routine to use the new parameter names.
1750 (Write_Cycle, Write_Cyclic_Edge, Write_Cycles): New routines.
1751 (Write_Invocation_Graph_Vertex): Remove the output of component
1752 Lib_Vertex. Add the output of components Body_Vertex and
1753 Spec_Vertex.
1754 * bindo-writers.ads (Write_Cycles): New routine.
1755 * debug.adb: Use binder switches -d_C and -d_P, add
1756 documentation on their usage.
1757 * gnatbind.adb: Remove with and use clauses for Binde. Delegate
1758 the choice of elaboration mechanism to Bindo.
1759 * lib-writ.adb (Column, Extra, Invoker, Kind, Line, Locations,
1760 Name, Placement, Scope, Signature, Target): Removed.
1761 (Write_Invocation_Graph): Moved at the top level.
1762 (Write_Invocation_Graph_Attributes): New routine.
1763 (Write_Invocation_Relation, Write_Invocation_Signature): Moved
1764 at the top level.
1765 * lib-writ.ads: Add a documentation section on invocation graph
1766 attributes.
1767 * sem_elab.adb (Body_Placement_Of): New routine.
1768 (Declare_Invocation_Construct): Update the call to
1769 Add_Invocation_Construct.
1770 (Declaration_Placement_Of_Node): New routine.
1771 (Get_Invocation_Attributes): Correct the retrieval of the
1772 enclosing subprogram where the postcondition procedure lives.
1773 (Placement_Of, Placement_Of_Node): Removed.
1774 (Record_Invocation_Graph): Record the encoding format used.
1775 (Record_Invocation_Graph_Encoding): New routine.
1776 (Record_Invocation_Relation): Update the call to
1777 Add_Invocation_Relation.
1778 (Spec_Placement_Of): Removed.
1779 * libgnat/g-lists.ads, libgnat/g-lists.adb (Equal): New routine.
1780
164597c5 17812019-07-05 Ed Schonberg <schonberg@adacore.com>
1782
1783 * checks.adb (Apply_Predicate_Check): Except within the
1784 subprogram body that defines the formal, do not apply predicate
1785 check on a formal IN parameter: such a check is redundant and
1786 its expansion can lead to out-of-scope references when it is
1787 originates in a function call in a precondition,
1788
572a4bc5 17892019-07-05 Yannick Moy <moy@adacore.com>
1790
1791 * sem_res.adb (Resolve_Call): Cannot inline in quantified
1792 expressions.
1793 * sem_util.adb, sem_util.ads (In_Quantified_Expression): New
1794 function.
1795
2c3ad474 17962019-07-05 Bob Duff <duff@adacore.com>
1797
1798 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
1799 Fix typo.
1800 * gnat_rm.texi: Regenerate.
1801
2f67af4c 18022019-07-05 Bob Duff <duff@adacore.com>
1803
1804 * exp_attr.adb (Input): Take the No_Stream_Optimizations
1805 restriction into account.
1806
1cb1fd0f 18072019-07-05 Claire Dross <dross@adacore.com>
1808
1809 * libgnat/a-cofove.ads, libgnat/a-cofove.adb: Definite formal
1810 vectors are now always bounded so that they do not need to be
1811 limited anymore.
1812
d2d09f3e 18132019-07-05 Dmitriy Anisimkov <anisimko@adacore.com>
1814
1815 * libgnat/g-traceb.ads, libgnat/g-traceb.adb (Call_Chain): New
1816 function.
1817
14e0bfed 18182019-07-04 James Clarke <jrtc27@debian.org>
1819
1820 * libgnarl/s-osinte__kfreebsd-gnu.ads (clockid_t): Make type
1821 definition public.
1822 (CLOCK_REALTIME): Make value public.
1823
ecd07d3b 18242019-07-04 Javier Miranda <miranda@adacore.com>
1825
1826 * exp_tss.adb (Init_Proc): Adding missing support for access to
1827 subprograms and access to protected subprograms of non-default
1828 C++ constructors.
1829
e0ff1639 18302019-07-04 Eric Botcazou <ebotcazou@adacore.com>
1831
1832 * gnat1drv.adb (Adjust_Global_Switches): Use proper interface to
1833 set the validity settings in CodePeer mode.
1834 * par-load.adb (Load): Remove all code dealing with validity
1835 settings.
1836 * validsw.ads (Validity_Check_Copies): Alphabetize.
1837 * validsw.adb (Reset_Validity_Check_Options): Set all options to
1838 off.
1839 (Save_Validity_Check_Options): Save all options.
1840
40bff3a0 18412019-07-04 Hristian Kirtchev <kirtchev@adacore.com>
1842
1843 * exp_ch3.adb, exp_ch4.adb, exp_ch4.ads, exp_ch5.adb,
1844 exp_ch7.adb, exp_ch9.adb, exp_ch11.adb, exp_unst.adb,
1845 rtsfind.ads, sem_attr.adb, sem_ch10.adb, sem_ch12.adb,
1846 sem_ch13.adb, sem_dim.adb, sem_disp.adb, xref_lib.adb: Minor
1847 reformatting.
1848
0ebaade4 18492019-07-04 Joffrey Huguet <huguet@adacore.com>
1850
1851 * libgnarl/a-taside.ads: Add assertion policy to ignore
1852 preconditions.
1853 (Abort_Task, Is_Terminated, Is_Callable): Add preconditions.
1854
f14a590b 18552019-07-04 Eric Botcazou <ebotcazou@adacore.com>
1856
1857 * doc/gnat_rm/implementation_defined_pragmas.rst: Fix
1858 capitalization and parenthesis glitches.
1859 * gnat_rm.texi: Regenerate.
1860
f5388f99 18612019-07-04 Ed Schonberg <schonberg@adacore.com>
1862
1863 * sem_ch10.adb (Remove_Context_Clauses): Handle properly the
1864 removal of a limited_with_clause which appears in the library
1865 unit oF the main unit, when some other unit in the context has a
1866 regular with_clause on the same unit, to prevent spurious
1867 visibility errors in the subsequent analysis of pending instance
1868 bodies.
1869
c930bc82 18702019-07-04 Hristian Kirtchev <kirtchev@adacore.com>
1871
1872 * sem_elab.adb: Add new type Elaboration_Phase_Status along with
1873 a global to keep track of the elaboration phase status.
1874 Initialize all internal data structures to Nil for services
1875 Elaborated_Units, Internal_Representation, and Scenario_Storage.
1876 (Build_Call_Marker): Do not create a call marker when the
1877 elaboration phase is not active.
1878 (Build_Variable_Reference_Marker): Do not create a call marker
1879 when the elaboration phase is not active.
1880 (Check_Elaboration_Scenarios): Destroy all internal structures
1881 when the elaboration phase does not have to run. Do not execute
1882 when the elaboration phase is not active.
1883 (Elaboration_Phase_Active): New routine.
1884 (Finalize_All_Data_Structures): New routine.
1885 (Initialize): Initialize all internal data structures and signal
1886 that the elaboration phase has started.
1887 (Initialize_All_Data_Structures): New routine.
1888 (Initialize_Elaborated_Units): Initialize all internal data
1889 structures.
1890 (Initialize_Internal_Representation): Initialize all internal
1891 data structures.
1892 (Initialize_Scenario_Storage): Initialize all internal data
1893 structures.
1894 (Kill_Elaboration_Scenario): Do not execute when the elaboration
1895 phase is not active.
1896 (Set_Elaboration_Phase): New routine.
1897 (Update_Elaboration_Scenario): Do not execute when the
1898 elaboration phase is not active.
1899
39dec7f4 19002019-07-04 Gary Dismukes <dismukes@adacore.com>
1901
1902 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The special
1903 treatment of calling Mask_Unfrozen_Types must also be done in
1904 the case of an Ignored_Ghost_Entity, because Expander_Active is
1905 False in that case.
1906
92b004be 19072019-07-04 Yannick Moy <moy@adacore.com>
1908
1909 * sem_prag.adb (Check_Library_Level_Entity): Update for new rule
1910 on SPARK_Mode.
1911
12795e1c 19122019-07-04 Justin Squirek <squirek@adacore.com>
1913
1914 * sem_disp.adb (Check_Controlling_Formals): Obtain the full view
1915 before type comparison.
1916
63fe3141 19172019-07-04 Ed Schonberg <schonberg@adacore.com>
1918
1919 * exp_ch4.ads, exp_ch4.adb (Build_Eq_Call): New visible
1920 subprogram, extracted from Expand_Composite_Equality, to handle
1921 properly the composition of equality for variant record types.
1922 * exp_ch3.adb (MAke_Eq_If): Use Build_Eq_Call for each
1923 component, to handle properly the case of a component with a
1924 user-defined equality. Revert to predefined equality if the
1925 user-defined operation is abstract, to maintain compatibility
1926 with older versions,
1927
17fa952a 19282019-07-04 Justin Squirek <squirek@adacore.com>
1929
1930 * exp_ch3.adb (Build_Initialization_Call): Fixup
1931 *_skip_null_excluding_check argument to handle new default.
1932 (Init_Formals): Make *_skip_null_excluding_check formal default
1933 to False
1934 * exp_ch4.adb (Expand_N_Allocator): Add comment to note heavy
1935 code duplication
1936
cf32543d 19372019-07-04 Bob Duff <duff@adacore.com>
1938
1939 * sem_ch3.adb (Access_Definition): Do not create a master unless
1940 Tasking_Allowed. Otherwise, this fails on restricted runtimes.
1941
eb4dbf20 19422019-07-04 Hristian Kirtchev <kirtchev@adacore.com>
1943
1944 * sem_util.adb (Propagate_DIC_Attributes): Do not propagate the
1945 Default_Initial_Condition attributes to an incomplete type.
1946
25ddc6ba 19472019-07-04 Ed Schonberg <schonberg@adacore.com>
1948
1949 * sem_attr.adb (Check_Array_Type): An array type attribute such
1950 as 'First can be applied to an unconstrained array tyope when
1951 the attribute reference appears within an aspect specification
1952 and the prefix is a current instance, given that the prefix of
1953 the attribute will become a formal of the subprogram that
1954 implements the aspect (typically a predicate check).
1955
74a5962a 19562019-07-04 Piotr Trojanek <trojanek@adacore.com>
1957
1958 * sem_util.adb (Yields_Synchronized_Object): Fix typos in
1959 comments.
1960
c65d33a8 19612019-07-04 Yannick Moy <moy@adacore.com>
1962
1963 * sem_util.adb (Yields_Synchronized_Object): Adapt to new SPARK
1964 rule.
1965
afd77d39 19662019-07-04 Yannick Moy <moy@adacore.com>
1967
1968 * sem_spark.adb (Check_Statement): Only check permission of
1969 object in extended return when it is of a deep type.
1970
2281b807 19712019-07-04 Justin Squirek <squirek@adacore.com>
1972
1973 * sem_ch12.adb (Perform_Appropriate_Analysis): Added for
1974 selecting which type of analysis based on wheither the
1975 instantiation is a generic at the library-level. In which case
1976 expansion during analysis.
1977 (Preanalyze_Actuals): Modify calls to Analyze to use the new
1978 routine.
1979
542b3e26 19802019-07-04 Ed Schonberg <schonberg@adacore.com>
1981
1982 * exp_unst.adb: Handle conditional expressions.
1983
7754aad4 19842019-07-04 Yannick Moy <moy@adacore.com>
1985
1986 * sem_spark.adb (Check_Package_Spec, Check_Package_Body): Only
1987 analyze parts of the code marked in SPARK.
1988
3843c1bd 19892019-07-04 Hristian Kirtchev <kirtchev@adacore.com>
1990
1991 * erroutc.adb, exp_aggr.adb, inline.adb, opt.adb, sem_ch3.adb:
1992 Minor reformatting.
1993
5bc0f990 19942019-07-04 Yannick Moy <moy@adacore.com>
1995
1996 * sem_spark.adb (Explanation, Get_Expl): New functions to get
1997 the explanation for a permission mismatch.
1998 (Perm_Error, Perm_Mismatch, Perm_Error_Loop_Exit): Take
1999 explanation into account for issuing a more precise error
2000 message.
2001 (Set_Perm_Prefixes, Set_Perm_Extensions,
2002 Set_Perm_Extensions_Move): Pass suitable argument for the
2003 explanation node.
2004
11903e68 20052019-07-04 Arnaud Charlet <charlet@adacore.com>
2006
2007 * exp_aggr.adb (In_Place_Assign_OK): Moved to top level and add
2008 support for record aggregates.
2009 (Component_Check): Use Is_CCG_Supported_Aggregate instead of a
2010 similar local predicate.
2011 (Convert_To_Assignments): Take advantage of In_Place_Assign_OK
2012 predicate when possible.
2013 (Is_CCG_Supported_Aggregate): Return False for records with
2014 representation clauses and fix the logic for dealing with nested
2015 aggregates.
2016
b0c19ea3 20172019-07-04 Piotr Trojanek <trojanek@adacore.com>
2018
2019 * opt.adb (Set_Config_Switches): Keep assertions policy as
2020 enabled when analysing internal units in GNATprove mode.
2021
90f2b146 20222019-07-04 Arnaud Charlet <charlet@adacore.com>
2023
2024 * exp_ch4.adb (Expand_Short_Circuit_Operator): Strip
2025 N_Variable_Reference_Marker when checking for the presence of
2026 actions.
2027
39ecad34 20282019-07-04 Arnaud Charlet <charlet@adacore.com>
2029
2030 * exp_aggr.adb (Check_Component): Take into account type
2031 conversions.
2032
c0e899f1 20332019-07-04 Dmitriy Anisimkov <anisimko@adacore.com>
2034
2035 * doc/gnat_ugn/platform_specific_information.rst: Document
2036 Windows socket timeout particularity.
2037 * gnat_ugn.texi: Regenerate.
2038 * gsocket.h: Include versionhelpers.h.
2039 * socket.c (__gnat_minus_500ms): New function.
2040 * libgnat/g-sothco.ads (Minus_500ms_Windows_Timeout): New
2041 imported function.
2042 * libgnat/g-socket.adb (Set_Socket_Option): Refactor to remove
2043 500ms from the requested timeout only on old Windows version.
2044
363b1a8e 20452019-07-04 Thomas Quinot <quinot@adacore.com>
2046
2047 * get_scos.adb: Remove bogus, dead code.
2048
4ae0a9ce 20492019-07-04 Ed Schonberg <schonberg@adacore.com>
2050
2051 * sem_dim.adb (Analyze_Dimension_Array_Aggregate): If the
2052 component is an entity name, its dimensions are those of its
2053 type.
2054
d60fa3c9 20552019-07-03 Bob Duff <duff@adacore.com>
2056
2057 * doc/gnat_ugn/gnat_utility_programs.rst: Document new flags in
2058 GNATpp.
2059
877ad320 20602019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
2061
2062 * binde.adb: Remove with clause for System.OS_Lib.
2063 (Force_Elab_Order): Refactor the majority of the code in Butil.
2064 Use the new forced units iterator to obtain unit names.
2065 * bindo-builders.adb: Add with and use clauses for Binderr,
2066 Butil, Opt, Output, Types, GNAT, and GNAT.Dynamic_HTables. Add
2067 a hash table which maps units to line number in the forced
2068 elaboration order file.
2069 (Add_Unit): New routine.
2070 (Build_Library_Graph): Create forced edges between pairs of
2071 units listed in the forced elaboration order file.
2072 (Create_Forced_Edge, Create_Forced_Edges, Destroy_Line_Number,
2073 Duplicate_Unit_Error, Hash_Unit, Internal_Unit_Info,
2074 Is_Duplicate_Unit, Missing_Unit_Info): New routines.
2075 * bindo-graphs.adb (Is_Internal_Unit, Is_Predefined_Unit):
2076 Refactor some of the behavior to Bindo-Units.
2077 * bindo-graphs.ads: Enable the enumeration literal for forced
2078 edges.
2079 * bindo-units.adb, bindo-units.ads (Is_Internal_Unit,
2080 Is_Predefined_Unit): New routines.
2081 * butil.adb: Add with and use clauses for Opt, GNAT, and
2082 System.OS_Lib. Add with clause for Unchecked_Deallocation.
2083 (Has_Next, Iterate_Forced_Units, Next, Parse_Next_Unit_Name,
2084 Read_Forced_Elab_Order_File): New routines.
2085 * butil.ads: Add with and use clauses for Types. Add new
2086 iterator over the units listed in the forced elaboration order
2087 file.
2088 (Has_Next, Iterate_Forced_Units, Next): New routine.
2089 * namet.adb, namet.ads (Present): New routine.
2090
01e6eb2f 20912019-07-03 Bob Duff <duff@adacore.com>
2092
2093 * sem_ch3.adb (Access_Definition): The code was creating a
2094 master in the case where the designated type is a class-wide
2095 interface type. Create a master in the noninterface case as
2096 well. That is, create a master for all limited class-wide types.
2097
9ad42832 20982019-07-03 Yannick Moy <moy@adacore.com>
2099
2100 * erroutc.adb (Sloc_In_Range): New function to determine whether
2101 the range of a pragma Warnings covers a location, taking
2102 instantiations into account.
2103
f2a8d64e 21042019-07-03 Johannes Kanig <kanig@adacore.com>
2105
2106 * osint.ads, osint.adb (Get_First_Main_File_Name): New routine
2107 to access the first file provided on the command line.
2108
d4f28933 21092019-07-03 Ed Schonberg <schonberg@adacore.com>
2110
2111 * inline.adb (Process_Formals_In_Aspects): New procedure within
2112 Expand_Inlined_Call, to perform a replacement of references to
2113 formals that appear in aspect specifications within the body
2114 being inlined.
2115
23e7fc9b 21162019-07-03 Justin Squirek <squirek@adacore.com>
2117
2118 * sem_ch8.adb (Analyze_Object_Renaming): Add call to search for
2119 the appropriate actual subtype of the object renaming being
2120 analyzed.
2121 (Check_Constrained_Object): Minor cleanup.
2122
f8e6d133 21232019-07-03 Yannick Moy <moy@adacore.com>
2124
2125 * sem_spark.adb (Get_Observed_Or_Borrowed_Expr): New function to
2126 return go through traversal function call.
2127 (Check_Type): Consistently use underlying type.
2128 (Get_Perm): Adapt for case of elaboration code where variables
2129 are not declared in the environment. Remove incorrect handling
2130 of borrow and observe.
2131
d044ba5c 21322019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
2133
2134 * inline.adb (Build_Return_Object_Formal): New routine.
2135 (Can_Split_Unconstrained_Function): Code clean up.
2136 (Copy_Formals,Copy_Return_Object): New routines.
2137 (Split_Unconstrained_Function): Code clean up and refactoring.
2138
8699de72 21392019-07-03 Gary Dismukes <dismukes@adacore.com>
2140
2141 * bindo-augmentors.adb, bindo-augmentors.ads,
2142 bindo-builders.ads, bindo-elaborators.adb, sem_ch12.adb,
2143 sem_ch13.adb, sem_spark.adb, sinfo.ads: Minor editorial
2144 corrections and reformatting.
2145
2ccf6539 21462019-07-03 Bob Duff <duff@adacore.com>
2147
2148 * sem_warn.adb (Check_Infinite_Loop_Warning): Avoid the warning
2149 if an Iterator_Specification is present.
2150
17b5260d 21512019-07-03 Bob Duff <duff@adacore.com>
2152
2153 * doc/gnat_ugn/gnat_utility_programs.rst: Document default
2154 new-line behavior.
2155
5f71d12c 21562019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
2157
2158 * ali.adb: Add with and use clauses for GNAT,
2159 GNAT.Dynamic_HTables, and Snames. Add a map from invocation
2160 signature records to invocation signature ids. Add various
2161 encodings of invocation-related attributes. Sort and update
2162 table Known_ALI_Lines.
2163 (Add_Invocation_Construct, Add_Invocation_Relation,
2164 Body_Placement_Kind_To_Code, Code_To_Body_Placement_Kind,
2165 Code_To_Invocation_Construct_Kind, Code_To_Invocation_Kind,
2166 Code_To_Invocation_Graph_Line_Kind, Destroy, Hash): New
2167 routines.
2168 (Initialize_ALI): Sort the initialization sequence. Add
2169 initialization for all invocation-related tables.
2170 (Invocation_Construct_Kind_To_Code,
2171 Invocation_Graph_Line_Kind_To_Code, Invocation_Kind_To_Code,
2172 Invocation_Signature_Of, Present): New routines.
2173 (Scan_ALI): Add the default values for invocation-related ids.
2174 Scan invocation graph lines.
2175 (Scan_Invocation_Graph_Line): New routine.
2176 * ali.ads: Add with clause for GNAT.Dynamic_Tables. Add types
2177 for invocation constructs, relations, and signatures. Add
2178 tables for invocation constructs, relations, and signatures.
2179 Update Unit_Record to capture invocation-related ids. Relocate
2180 table Unit_Id_Tables and subtypes Unit_Id_Table, Unit_Id_Array
2181 from Binde.
2182 (Add_Invocation_Construct, Add_Invocation_Relation,
2183 Body_Placement_Kind_To_Code, Code_To_Body_Placement_Kind,
2184 Code_To_Invocation_Construct_Kind, Code_To_Invocation_Kind,
2185 Code_To_Invocation_Graph_Line_Kind,
2186 Invocation_Construct_Kind_To_Code,
2187 Invocation_Graph_Line_Kind_To_Code, Invocation_Kind_To_Code,
2188 Invocation_Signature_Of, Present): New routines.
2189 * binde.adb: Add with and use clause for Types. Add use clause
2190 for ALI.Unit_Id_Tables;
2191 * binde.ads: Relocate table Unit_Id_Tables and subtypes
2192 Unit_Id_Table, Unit_Id_Array to ALI.
2193 * bindgen.adb: Remove with and use clause for ALI.
2194 * bindgen.ads: Remove with and use clause for Binde. Add with
2195 and use clause for ALI.
2196 * bindo.adb, bindo.ads, bindo-augmentors.adb,
2197 bindo-augmentors.ads, bindo-builders.adb, bindo-builders.ads,
2198 bindo-diagnostics.adb, bindo-diagnostics.ads,
2199 bindo-elaborators.adb, bindo-elaborators.ads, bindo-graphs.adb,
2200 bindo-graphs.ads, bindo-units.adb, bindo-units.ads,
2201 bindo-validators.adb, bindo-validators.ads, bindo-writers.adb,
2202 bindo-writers.ads: New units.
2203 * debug.adb: Use and describe GNAT debug switches -gnatd_F and
2204 -gnatd_G. Add GNATbind debug switches in the ranges dA .. dZ,
2205 d.a .. d.z, d.A .. d.Z, d.1 .. d.9, d_a .. d_z, d_A .. d_Z, and
2206 d_1 .. d_9. Use and describe GNATbind debug switches -d_A,
2207 -d_I, -d_L, -d_N, -d_O, -d_T, and -d_V.
2208 * exp_util.adb, exp_util.ads (Exceptions_OK): Relocate to
2209 Sem_Util.
2210 * gnatbind.adb: Add with and use clause for Bindo. Use the new
2211 Bindo elaboration order only when -d_N is in effect.
2212 * lib-writ.adb
2213 (Column, Extra, Invoker, Kind, Line, Locations, Name, Placement,
2214 Scope, Signature, Target): New routines.
2215 (Write_ALI): Output all invocation-related data.
2216 (Write_Invocation_Graph): New routine.
2217 * lib-writ.ads: Document the invocation graph ALI line.
2218 * namet.adb, namet.ads (Present): New routines.
2219 * sem_ch8.adb (Find_Direct_Name): Capture the status of
2220 elaboration checks and warnings of an identifier.
2221 (Find_Expanded_Name): Capture the status of elaboration checks
2222 and warnings of an expanded name.
2223 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Ensure
2224 that invocation graph-related data within the body of the main
2225 unit is encoded in the ALI file.
2226 (Analyze_Generic_Subprogram_Declaration): Ensure that invocation
2227 graph-related data within the body of the main unit is encoded
2228 in the ALI file.
2229 (Analyze_Package_Instantiation): Perform minimal decoration of
2230 the instance entity.
2231 (Analyze_Subprogram_Instantiation): Perform minimal decoration
2232 of the instance entity.
2233 * sem_elab.adb: Perform heavy refactoring of all code. The unit
2234 is now split into "services" which specialize in one area of ABE
2235 checks. Add processing in order to capture invocation-graph
2236 related attributes of the main unit, and encode them in the ALI
2237 file. The Processing phase can now operate in multiple modes,
2238 all described by type Processing_Kind. Scenarios and targets
2239 are now distinct at the higher level, and carry their own
2240 representations. This eliminates the need to constantly
2241 recompute their attributes, and offers the various processors a
2242 uniform interface. The various initial states of the Processing
2243 phase are now encoded using type Processing_In_State, and
2244 xxx_State constants.
2245 * sem_elab.ads: Update the literals of type
2246 Enclosing_Level_Kind. Add Inline pragmas on several routines.
2247 * sem_prag.adb (Process_Inline): Ensure that invocation
2248 graph-related data within the body of the main unit is encoded
2249 in the ALI file.
2250 * sem_util.adb (Enclosing_Generic_Body, Enclosing_Generic_Unit):
2251 Code clean up.
2252 (Exceptions_OK): Relocated from Sem_Util.
2253 (Mark_Save_Invocation_Graph_Of_Body): New routine.
2254 * sem_util.ads (Exceptions_OK): Relocated from Sem_Util.
2255 (Mark_Save_Invocation_Graph_Of_Body): New routine.
2256 * sinfo.adb (Is_Elaboration_Checks_OK_Node): Now applicable to
2257 N_Variable_Reference_Marker.
2258 (Is_Elaboration_Warnings_OK_Node): Now applicable to
2259 N_Expanded_Name, N_Identifier, N_Variable_Reference_Marker.
2260 (Is_Read): Use Flag4.
2261 (Is_SPARK_Mode_On_Node): New applicable to
2262 N_Variable_Reference_Marker.
2263 (Is_Write): Use Flag5.
2264 (Save_Invocation_Graph_Of_Body): New routine.
2265 (Set_Is_Elaboration_Checks_OK_Node): Now applicable to
2266 N_Variable_Reference_Marker.
2267 (Set_Is_Elaboration_Warnings_OK_Node): Now applicable to
2268 N_Expanded_Name, N_Identifier, N_Variable_Reference_Marker.
2269 (Set_Is_SPARK_Mode_On_Node): New applicable to
2270 N_Variable_Reference_Marker.
2271 (Set_Save_Invocation_Graph_Of_Body): New routine.
2272 * sinfo.ads: Update the documentation of attributes
2273 Is_Elaboration_Checks_OK_Node, Is_Elaboration_Warnings_OK_Node,
2274 Is_SPARK_Mode_On_Node. Update the flag usage of attributes
2275 Is_Read, Is_Write. Add attribute Save_Invocation_Graph_Of_Body
2276 and update its occurrence in nodes.
2277 (Save_Invocation_Graph_Of_Body): New routine along with pragma
2278 Inline.
2279 (Set_Save_Invocation_Graph_Of_Body): New routine along with
2280 pragma Inline.
2281 * switch-b.adb (Scan_Binder_Switches): Refactor the scanning of
2282 debug switches.
2283 (Scan_Debug_Switches): New routine.
2284 * libgnat/g-dynhta.adb, libgnat/g-dynhta.ads (Contains): New routine.
2285 * libgnat/g-graphs.adb (Associate_Vertices): Update the use of
2286 Component_Vertex_Iterator.
2287 (Contains_Component, Contains_Edge, Contains_Vertex, Has_Next):
2288 Reimplemented.
2289 (Iterate_Component_Vertices): New routine.
2290 (Iterate_Vertices): Removed.
2291 (Next): Update the parameter profile.
2292 (Number_Of_Component_Vertices, Number_Of_Outgoing_Edges): New
2293 routines.
2294 * libgnat/g-graphs.ads: Update the initialization of
2295 No_Component. Add type Component_Vertex_Iterator. Remove type
2296 Vertex_Iterator.
2297 (Has_Next): Add new versions and remove old ones.
2298 (Iterate_Component_Vertices): New routine.
2299 (Iterate_Vertices): Removed.
2300 (Next): Add new versions and remove old ones.
2301 (Number_Of_Component_Vertices, Number_Of_Outgoing_Edges): New
2302 routines.
2303 * libgnat/g-sets.adb (Contains): Reimplemented.
2304 * gcc-interface/Make-lang.in (GNATBIND_OBJS): Add
2305 GNAT.Dynamic_HTables, GNAT.Graphs and Bindo units.
2306 * rtsfind.ads: Remove extra space.
2307
df177848 23082019-07-03 Yannick Moy <moy@adacore.com>
2309
2310 * sem_spark.adb: Add support for locally borrowing and observing
2311 a path.
2312 (Get_Root_Object): Add parameter Through_Traversal to denote
2313 when we are interesting in getting to the traversed parameter.
2314 (Is_Prefix_Or_Almost): New function to support detection of
2315 illegal access to borrowed or observed paths.
2316 (Check_Pragma): Add analysis of assertion pragmas.
2317
f3f142ac 23182019-07-03 Ed Schonberg <schonberg@adacore.com>
2319
2320 * sem_ch13.adb (Build_Predicate_Functions): In a generic context
2321 we do not build the bodies of predicate fuctions, but the
2322 expression in a static predicate must be elaborated to allow
2323 case coverage checking within the generic unit.
2324 (Build_Discrete_Static_Predicate): In a generic context, return
2325 without building function body once the
2326 Static_Discrete_Predicate expression for the type has been
2327 constructed.
2328
99d90c85 23292019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
2330
2331 * bindgen.adb, inline.adb, layout.adb, sem_ch12.adb,
2332 sem_ch13.adb, sem_ch7.adb, styleg.adb: Minor reformatting.
2333
800597f6 23342019-07-03 Bob Duff <duff@adacore.com>
2335
2336 * par-ch3.adb (P_Defining_Identifier): Call
2337 Check_Defining_Identifier_Casing.
2338 * style.ads, styleg.ads, styleg.adb
2339 (Check_Defining_Identifier_Casing): New procedure to check for
2340 mixed-case defining identifiers.
2341 * stylesw.ads, stylesw.adb (Style_Check_Mixed_Case_Decls): New
2342 flag for checking for mixed-case defining identifiers.
2343 * doc/gnat_ugn/building_executable_programs_with_gnat.rst:
2344 Document new feature.
2345 * gnat_ugn.texi: Regenerate.
2346
2c75027a 23472019-07-03 Eric Botcazou <ebotcazou@adacore.com>
2348
2349 * doc/gnat_ugn/building_executable_programs_with_gnat.rst
2350 (Warning message control): Document that -gnatw.z/Z apply to
2351 array types.
2352 * freeze.adb (Freeze_Entity): Give -gnatw.z warning for array
2353 types as well, but not if the specified alignment is the minimum
2354 one.
2355 * gnat_ugn.texi: Regenerate.
2356
08237d0d 23572019-07-03 Bob Duff <duff@adacore.com>
2358
2359 * einfo.ads, exp_util.adb, layout.ads, sinfo.ads: Spell "laid"
2360 correctly.
2361
0396441f 23622019-07-03 Ed Schonberg <schonberg@adacore.com>
2363
2364 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): No error
2365 message on attribute applied to a renaming when the renamed
2366 object is an aggregate (from code reading).
2367 (Check_Aspect_At_End_Of_Declarations): In a generic context
2368 where freeze nodes are not generated, the original expression
2369 for an aspect may need to be analyzed to precent spurious
2370 conformance errors when compared with the expression that is
2371 anakyzed at the end of the current declarative list.
2372
c8406f30 23732019-07-03 Eric Botcazou <ebotcazou@adacore.com>
2374
2375 * layout.adb (Layout_Type): Do not set the component size of an
2376 array with a scalar component if the component type is
2377 overaligned.
2378
c38b32ea 23792019-07-03 Ed Schonberg <schonberg@adacore.com>
2380
2381 * inline.adb (Make_Loop_Labels_Unique): New procedure to modify
2382 the source code of subprograms that are inlined by the
2383 front-end, to prevent accidental duplication between loop labels
2384 in the inlined code and the code surrounding the inlined call.
2385
6d6f134e 23862019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
2387
2388 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update
2389 the section on resolving elaboration circularities to eliminate
2390 certain combinations of switches which together do not produce
2391 the desired effect and confuse users.
2392 * gnat_ugn.texi: Regenerate.
2393
f3e16ef4 23942019-07-03 Arnaud Charlet <charlet@adacore.com>
2395
2396 * bindgen.adb (Gen_Main): Disable generation of reference to
2397 Ada_Main_Program_Name for CCG.
2398 * bindusg.adb (Display): Add -G to the command-line usage for
2399 gnatbind.
2400 * opt.ads (Generate_C_Code): Update comment.
2401 * switch-b.adb (Scan_Binder_Switches): Add handling for -G.
2402
f4a31b16 24032019-07-03 Arnaud Charlet <charlet@adacore.com>
2404
2405 * sem_ch7.adb (Has_Referencer): Do not consider inlined
2406 subprograms when generating C code, which allows us to generate
2407 static inline subprograms.
2408
2f65e9f7 24092019-07-03 Justin Squirek <squirek@adacore.com>
2410
2411 * sem_ch6.adb (Check_Conformance): Add expression checking for
2412 constant modifiers in anonymous access types (in addition to
2413 "non-null" types) so that they are considered "matching" for
2414 subsequent conformance tests.
2415
c336ed70 24162019-07-03 Arnaud Charlet <charlet@adacore.com>
2417
2418 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
2419 Clarify wording on No_Multiple_Elaboration.
2420 * gnat_rm.texi: Regenerate.
2421
78611c86 24222019-07-03 Ed Schonberg <schonberg@adacore.com>
2423
2424 * sem_ch8.adb (Find_Selected_Component): If the prefix is the
2425 current instance of a type or subtype, complete the resolution
2426 of the name by finding the component of the type denoted by the
2427 selector name.
2428
5a87a4d9 24292019-07-03 Eric Botcazou <ebotcazou@adacore.com>
2430
2431 * doc/gnat_rm/interfacing_to_other_languages.rst (Interfacing to C):
2432 Document that boolean types with convention C now map to C99 bool.
2433 * gnat_rm.texi: Regenerate.
2434
371c539c 24352019-07-03 Javier Miranda <miranda@adacore.com>
2436
2437 * exp_attr.adb (Expand_Min_Max_Attribute): Code cleanup:
2438 removing code that it is now never executed in the CCG compiler
2439 (dead code).
2440
89d2d652 24412019-07-02 Iain Sandoe <iain@sandoe.co.uk>
2442
2443 * libgnat/system-darwin-ppc.ads: Set Stack_Check_Probes True for
2444 PPC Darwin.
2445
d21e66fb 24462019-07-01 Ed Schonberg <schonberg@adacore.com>
2447
2448 * sem_ch12.adb (Is_Defaulted): New predicate in
2449 Check_Formal_Package_Intance, to skip the conformance of checks
2450 on parameters of a formal package that are defaulted,
2451
7a42b778 24522019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
2453
2454 * checks.adb, exp_ch9.adb, exp_unst.adb, sem_ch4.adb,
2455 sem_prag.adb, sem_spark.adb: Minor reformatting.
2456
fc8ae496 24572019-07-01 Ed Schonberg <schonberg@adacore.com>
2458
2459 * sem_attr.adb (Analyze_Attribute, case Enum_Rep): Allow prefix
2460 of attribute to be an attribute reference of a discrete type.
2461
9d27ea41 24622019-07-01 Eric Botcazou <ebotcazou@adacore.com>
2463
2464 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Move up
2465 handling of Has_Pragma_Inline_Always and deal with
2466 Has_Pragma_No_Inline.
2467
bcb8dcf3 24682019-07-01 Ed Schonberg <schonberg@adacore.com>
2469
2470 * sem_ch3.adb (Build_Derived_Record_Type): If the parent type is
2471 declared as a subtype of a private type with an inherited
2472 discriminant constraint, its generated full base appears as a
2473 record subtype, so we need to retrieve its oen base type so that
2474 the inherited constraint can be applied to it.
2475
d087b9ca 24762019-07-01 Yannick Moy <moy@adacore.com>
2477
2478 * sem_spark.adb: Completely rework the algorithm for ownership
2479 checking, as the rules in SPARK RM have changed a lot.
2480 * sem_spark.ads: Update comments.
2481
fe48ee0a 24822019-07-01 Dmitriy Anisimkov <anisimko@adacore.com>
2483
2484 * gsocket.h (Has_Sockaddr_Len): Use the offset of sin_family offset in
2485 the sockaddr_in structure to determine the existence of length field
2486 before the sin_family.
2487
b20f7e2c 24882019-07-01 Ed Schonberg <schonberg@adacore.com>
2489
2490 * sem_prag.adb (Analyze_Pragma, case Weak_External): Pragma only
2491 applies to entities with run-time addresses, not to types.
2492
374fdf94 24932019-07-01 Piotr Trojanek <trojanek@adacore.com>
2494
2495 * einfo.adb, sem_ch7.adb, sem_prag.adb, sem_util.adb: Update
2496 references to the SPARK RM after the removal of Rule 7.1.4(5).
2497
bf13a79d 24982019-07-01 Piotr Trojanek <trojanek@adacore.com>
2499
2500 * sysdep.c: Cleanup references to LynuxWorks in docs and
2501 comments.
2502
866fa2d0 25032019-07-01 Ed Schonberg <schonberg@adacore.com>
2504
2505 * checks.adb (Insert_Valid_Check): Do not apply validity check
2506 to variable declared within a protected object that uses the
2507 Lock_Free implementation, to prevent unwarranted constant
2508 folding, because entities within such an object msut be treated
2509 as volatile.
2510
bcb5ab83 25112019-07-01 Eric Botcazou <ebotcazou@adacore.com>
2512
2513 * exp_ch9.adb (Check_Inlining): Deal with Has_Pragma_No_Inline.
2514
2db33bd6 25152019-07-01 Ed Schonberg <schonberg@adacore.com>
2516
2517 * exp_unst.adb (Visit_Node, Check_Static_Type): Improve the
2518 handling of private and incomplete types whose full view is an
2519 access type, to detect additional uplevel references in dynamic
2520 bounds. This is relevant to N_Free_Statement among others that
2521 manipulate types whose full viww may be an access type.
2522
6b4f0b7d 25232019-07-01 Pat Rogers <rogers@adacore.com>
2524
2525 * doc/gnat_rm/representation_clauses_and_pragmas.rst: Correct
2526 size indicated for R as a component of an array.
2527 * gnat_rm.texi: Regenerate.
2528
cdee70d7 25292019-07-01 Justin Squirek <squirek@adacore.com>
2530
2531 * libgnat/s-win32.ads: Add definition for ULONG, modify
2532 OVERLAPPED type, and add appropriate pragmas.
2533
2cf822b7 25342019-07-01 Bob Duff <duff@adacore.com>
2535
2536 * gnat1drv.adb (gnat1drv): Call Write_ALI if the main unit is
2537 ignored-ghost.
2538
0a1ece97 25392019-07-01 Yannick Moy <moy@adacore.com>
2540
2541 * sem_ch4.adb (Operator_Check): Refine error message.
2542
ee4279ef 25432019-07-01 Piotr Trojanek <trojanek@adacore.com>
2544
2545 * libgnat/a-calend.ads: Revert "Global => null" contracts on
2546 non-pure routines.
2547
2c6b4ada 25482019-07-01 Piotr Trojanek <trojanek@adacore.com>
2549
2550 * exp_attr.adb, libgnat/g-graphs.ads: Fix typos in comments:
2551 componant -> component.
2552
175c4526 25532019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
2554
2555 * libgnat/g-graphs.adb: Use type Directed_Graph rather than
2556 Instance in various routines.
2557 * libgnat/g-graphs.ads: Change type Instance to Directed_Graph.
2558 Update various routines that mention the type.
2559
a0d15509 25602019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
2561
2562 * libgnat/g-sets.adb: Use type Membership_Set rathern than
2563 Instance in various routines.
2564 * libgnat/g-sets.ads: Change type Instance to Membership_Set.
2565 Update various routines that mention the type.
2566
205a23a3 25672019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
2568
2569 * libgnat/g-lists.adb: Use type Doubly_Linked_List rather than
2570 Instance in various routines.
2571 * libgnat/g-lists.ads: Change type Instance to
2572 Doubly_Linked_List. Update various routines that mention the
2573 type.
2574
17fdf8c2 25752019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
2576
2577 * libgnat/g-dynhta.adb: Use type Dynamic_Hash_Table rather than
2578 Instance in various routines.
2579 * libgnat/g-dynhta.ads: Change type Instance to
2580 Dynamic_Hash_Table. Update various routines that mention the
2581 type.
2582
216ffc64 25832019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
2584
2585 * exp_attr.adb, exp_ch7.adb, exp_unst.adb, sem_ch3.adb,
2586 sem_util.adb, uintp.adb, uintp.ads: Minor reformatting.
2587
5051fe35 25882019-07-01 Javier Miranda <miranda@adacore.com>
2589
2590 * exp_attr.adb (Expand_Min_Max_Attribute): Disable expansion of
2591 'Min/'Max on integer, enumeration, fixed point and floating
2592 point types since the CCG backend now provides in file
2593 standard.h routines to support it.
2594
830a2a71 25952019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
2596
2597 * impunit.adb: Add GNAT.Graphs to list Non_Imp_File_Names_95.
2598 * Makefile.rtl, gcc-interface/Make-lang.in: Register unit
2599 GNAT.Graphs.
2600 * libgnat/g-dynhta.adb: Various minor cleanups (use Present
2601 rather than direct comparisons).
2602 (Delete): Reimplement to use Delete_Node.
2603 (Delete_Node): New routine.
2604 (Destroy_Bucket): Invoke the provided destructor.
2605 (Present): New routines.
2606 * libgnat/g-dynhta.ads: Add new generic formal Destroy_Value.
2607 Use better names for the components of iterators.
2608 * libgnat/g-graphs.adb, libgnat/g-graphs.ads: New unit.
2609 * libgnat/g-lists.adb: Various minor cleanups (use Present
2610 rather than direct comparisons).
2611 (Delete_Node): Invoke the provided destructor.
2612 (Present): New routine.
2613 * libgnat/g-lists.ads: Add new generic formal Destroy_Element.
2614 Use better names for the components of iterators.
2615 (Present): New routine.
2616 * libgnat/g-sets.adb, libgnat/g-sets.ads (Destroy, Preset,
2617 Reset): New routines.
2618
b0111d94 26192019-07-01 Dmitriy Anisimkov <anisimko@adacore.com>
2620
2621 * libgnat/g-sothco.adb (Get_Address): Fix the case when AF_INET6
2622 is not defined.
2623
7362896b 26242019-07-01 Ed Schonberg <schonberg@adacore.com>
2625
2626 * exp_attr.adb (Expand_Attribute_Reference, case Invalid_Value):
2627 Resolve result of call to Get_Simple_Init_Val, which may be a
2628 conversion of a literal.
2629
0dae8dc2 26302019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
2631
2632 * freeze.adb (Freeze_Expression): Remove the horrible useless
2633 name hiding of N. Insert the freeze nodes generated by the
2634 expression prior to the expression when the nearest enclosing
2635 scope is transient.
2636
487da8ff 26372019-07-01 Pierre-Marie de Rodat <derodat@adacore.com>
2638
2639 * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Fix
2640 formatting issues in the -gnatR section.
2641 * gnat_ugn.texi: Regenerate.
2642
1d79fa18 26432019-06-30 Iain Sandoe <iain@sandoe.co.uk>
2644
2645 * gnatlink.adb (Link_Step): Remove duplicate -static-libgcc switches.
2646 Push -shared-libgcc explicitly, when it is the target default (unless
2647 overidden by the static flag).
2648 When the user has put an instance of shared/static-libgcc do not push
2649 a duplicate of this.
2650
a850edcd 26512019-06-29 Eric Botcazou <ebotcazou@adacore.com>
2652
2653 * gcc-interface/decl.c (gnat_to_gnu_entity): Beep up comment on SAVED,
2654 and tweak comment on the assertion about the scopes of Itypes. Do not
2655 skip the regular processing for Itypes that are E_Record_Subtype with
2656 a Cloned_Subtype. Get the Cloned_Subtype for every E_Record_Subtype
2657 if the type is dummy and hasn't got its own freeze node.
2658 <E_Record_Subtype>: Save again the DECL of the Cloned_Subtype, if any.
2659 <E_Access_Subtype>: Save again the DECL of the equivalent type.
2660 (Gigi_Equivalent_Type) <E_Access_Subtype>: New case.
2661
b1e46fb1 26622019-06-29 Eric Botcazou <ebotcazou@adacore.com>
2663
2664 * gcc-interface/utils.c (unchecked_convert): Tweak comment. Only skip
2665 dereferences when padding to have the same size on both sides. Do it
2666 for destination types with self-referential size too.
2667
07e38949 26682019-06-29 Eric Botcazou <ebotcazou@adacore.com>
2669
2670 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: If the
2671 type requires strict alignment, then set the RM size to the type size.
2672 Rework handling of alignment and sizes of tagged types in ASIS mode.
2673 (validate_size): Rename local variable and remove special handling for
2674 strict-alignment types.
2675 * gcc-interface/utils.c (finish_record_type): Constify local variables
2676 and use properly typed constants.
2677
f4409741 26782019-06-29 Eric Botcazou <ebotcazou@adacore.com>
2679
2680 * gcc-interface/decl.c (gnat_to_gnu_field): Rework error messages for
2681 fields requiring strict alignment, add explicit test on Storage_Unit
2682 for position and size, and mention type alignment for position.
2683
5882c515 26842019-06-29 Eric Botcazou <ebotcazou@adacore.com>
2685
2686 * gcc-interface/trans.c (mark_visited_r): Set TYPE_SIZES_GIMPLIFIED on
2687 the main variant of a type, if any.
2688
d0de0a27 26892019-06-29 Eric Botcazou <ebotcazou@adacore.com>
2690
2691 * gcc-interface/decl.c (set_nonaliased_component_on_array_type): Add
2692 missing guard for the presence of TYPE_CANONICAL.
2693 (set_reverse_storage_order_on_array_type): Likewise.
2694
2074c859 26952019-06-29 Eric Botcazou <ebotcazou@adacore.com>
2696
2697 * gcc-interface/gigi.h (make_packable_type): Remove default value.
2698 (value_factor_p): Tweak prototype.
2699 * gcc-interface/decl.c (gnat_to_gnu_entity): Add comment.
2700 (gnat_to_gnu_component_type): Likewise.
2701 (gnat_to_gnu_field): Likewise. Fetch the position of the field earlier
2702 and simplify the condition under which the type is packed. Declare
2703 local variable is_bitfield. Pass 1 as max_align to make_packable_type
2704 if it is set to true.
2705 (copy_and_substitute_in_layout): Pass 0 to make_packable_type.
2706 * gcc-interface/utils.c (make_packable_array_type): New function.
2707 (make_packable_type): Use it to rewrite the type of array field.
2708 (maybe_pad_type): Pass align parameter to make_packable_type.
2709 (create_field_decl): Minor tweaks.
2710 (value_factor_p): Assert that FACTOR is a power of 2 and replace the
2711 modulo computation by a masking operation.
2712
83c6da22 27132019-06-25 Eric Botcazou <ebotcazou@adacore.com>
2714
2715 * gcc-interface/decl.c (gnat_to_gnu_entity): Remove superfluous test
2716 in previous change.
2717 * gcc-interface/gigi.h (maybe_character_type): Fix formatting.
2718 (maybe_character_value): Likewise.
2719
aaabc7bc 27202019-06-24 Jan Hubicka <jh@suse.cz>
2721
2722 * gcc-interface/decl.c (gnat_to_gnu_entity): Check that
2723 type is array or integer prior checking string flag.
83c6da22 2724 * gcc-interface/gigi.h (maybe_character_type): Likewise.
2725 (maybe_character_value): Likewise.
aaabc7bc 2726
5fe09a56 27272019-06-24 Martin Sebor <msebor@redhat.com>
2728
2729 * gcc-interface/utils.c (handle_nonnull_attribute): Quote attribute
2730 name.
2731
bd9331d6 27322019-06-18 Arnaud Charlet <charlet@adacore.com>
2733
83c6da22 2734 PR ada/80590
bd9331d6 2735 * sem_ch5.adb (Analyze_Loop_Statement): Avoid exception propagation
2736 during normal processing.
2737
8a5a7d1c 27382019-06-17 Arnaud Charlet <charlet@adacore.com>
2739
83c6da22 2740 PR ada/80590
8a5a7d1c 2741 * exp_ch9.adb (Expand_N_Delay_Relative_Statement): Swap the two
2742 conditions to avoid a unnecessary exception propagation in the default
2743 case.
2744
580934f6 27452019-05-28 Eric Botcazou <ebotcazou@adacore.com>
2746
2747 * gcc-interface/utils.c (handle_stack_protect_attribute): Move around.
2748
c8956236 27492019-05-28 Eric Botcazou <ebotcazou@adacore.com>
2750
2751 * doc/gnat_rm/implementation_defined_pragmas.rst (Machine_Attribute):
2752 Document additional optional parameters.
2753 * sem_prag.adb (Analyze_Pragma) <Pragma_Machine_Attribute>: Accept
2754 more than one optional parameter.
2755 * gcc-interface/decl.c (prepend_one_attribute_pragma): Alphabetize
2756 the list of supported pragmas. Simplify the handling of parameters
2757 and add support for more than one optional parameter.
2758 * gcc-interface/utils.c (attr_cold_hot_exclusions): New constant.
2759 (gnat_internal_attribute_table): Add entry for no_icf, noipa, flatten,
2760 used, cold, hot, target and target_clones.
2761 (begin_subprog_body): Do not create the RTL for the subprogram here.
2762 (handle_noicf_attribute): New static function.
2763 (handle_noipa_attribute): Likewise.
2764 (handle_flatten_attribute): Likewise.
2765 (handle_used_attribute): Likewise.
2766 (handle_cold_attribute): Likewise.
2767 (handle_hot_attribute): Likewise.
2768 (handle_target_attribute): Likewise.
2769 (handle_target_clones_attribute): Likewise.
2770
62b762c2 27712019-05-28 Eric Botcazou <ebotcazou@adacore.com>
2772
2773 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Return 0
2774 for 'Size too.
2775 (Identifier_to_gnu): Use the actual subtype for a reference to a
2776 packed array in a return statement.
2777 (Attribute_to_gnu) <Attr_Size>: Do not strip VIEW_CONVERT_EXPRs from
2778 the prefix in every case.
2779
336a61a3 27802019-05-28 Eric Botcazou <ebotcazou@adacore.com>
2781
2782 * gcc-interface/trans.c (gnat_to_gnu): Remove superfluous tests on
2783 Backend_Overflow_Checks_On_Target and rework comments.
2784
983c5b5e 27852019-05-28 Eric Botcazou <ebotcazou@adacore.com>
2786
2787 * gcc-interface/trans.c (walk_nesting_tree): New static function.
2788 (finalize_nrv): Use it to walk the entire nesting tree.
2789
96b4b84e 27902019-05-28 Eric Botcazou <ebotcazou@adacore.com>
2791
2792 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Remove
2793 obsolete test on Is_For_Access_Subtype.
2794
0b74284e 27952019-05-28 Eric Botcazou <ebotcazou@adacore.com>
2796
2797 * gcc-interface/decl.c (components_to_record): Set a name on the type
2798 created for the REP part, if any.
2799 * gcc-interface/utils.c (finish_record_type): Only take the maximum
2800 when merging sizes for a variant part at offset 0.
2801 (merge_sizes): Rename has_rep parameter into max.
2802
689dab9d 28032019-05-28 Eric Botcazou <ebotcazou@adacore.com>
2804
2805 * gcc-interface/utils.c (gnat_internal_attribute_table): Add support
2806 for stack_protect attribute.
2807 (handle_stack_protect_attribute): New static function.
2808
804f7d39 28092019-05-28 Eric Botcazou <ebotcazou@adacore.com>
2810
2811 * gcc-interface/decl.c (intrin_arglists_compatible_p): Do not return
2812 false if the internal builtin uses a variable list.
2813
f07f94cc 28142019-05-27 Eric Botcazou <ebotcazou@adacore.com>
2815
2816 * gcc-interface/trans.c (Call_to_gnu): Do not initialize the temporary
2817 created out of addressability concerns if it's for the _Init parameter
2818 of an initialization procedure.
2819
abfd658b 28202019-05-27 Eric Botcazou <ebotcazou@adacore.com>
2821
2822 * gcc-interface/ada-builtin-types.def: New file.
2823 * gcc-interface/ada-builtins.def: Likewise.
2824 * gcc-interface/ada-tree.h (BUILT_IN_LIKELY): New macro.
2825 (BUILT_IN_UNLIKELY): Likewise.
2826 * gcc-interface/trans.c (independent_iterations_p): Initialize the
2827 auto-vector to 16 elements.
2828 (Call_to_gnu): Remove local variable and change the vector of actual
2829 parameters to an auto-vector. Do not convert actual parameters to
2830 the argument type for front-end built-in functions. Add support for
2831 front-end built-in functions.
2832 (build_noreturn_cond): Use internal instead of built-in function.
2833 * gcc-interface/utils.c (c_builtin_type): Include ada-builtin-types.def
2834 (install_builtin_function_types): Likewise.
2835 (install_builtin_functions): Include ada-builtins.def first.
2836
caab73a2 28372019-05-27 Eric Botcazou <ebotcazou@adacore.com>
2838
2839 * gcc-interface/utils.c (maybe_pad_type): Issue the warning for the
2840 specific case of component types preferably.
2841
f1ca2388 28422019-05-27 Eric Botcazou <ebotcazou@adacore.com>
2843
2844 * gcc-interface/trans.c (Identifier_to_gnu): Minor tweaks.
2845 (gnat_to_gnu): Do not convert the result if it is a reference to an
2846 unconstrained array used as the prefix of an attribute reference that
2847 requires an lvalue.
2848
e3f3573c 28492019-05-27 Eric Botcazou <ebotcazou@adacore.com>
2850
2851 * gcc-interface/trans.c (Gigi_Types_Compatible): New predicate.
2852 (Identifier_to_gnu): Use it to assert that the type of the identifier
2853 and that of its entity are compatible for gigi. Rename a couple of
2854 local variables and separate the processing of the result type.
2855
2306cd17 28562019-05-27 Eric Botcazou <ebotcazou@adacore.com>
2857
2858 * gcc-interface/trans.c (Call_to_gnu): Use the unpadded type when
2859 putting back an intermediate conversion the type of the actuals.
2860
6e4e9378 28612019-05-27 Eric Botcazou <ebotcazou@adacore.com>
2862
2863 * gcc-interface/trans.c (gnat_to_gnu) <Shift operations>: Convert the
2864 count to the unsigned version of its base type before proceeding.
2865
85b9be9b 28662019-05-16 Martin Sebor <msebor@redhat.com>
2867
3d6be0d5 2868 * gcc-interface/trans.c (check_inlining_for_nested_subprog): Quote
2869 reserved names.
85b9be9b 2870
65d973ca 28712019-05-08 Arnaud Charlet <charlet@adacore.com>
2872
2873 * standard.ads.h: New file.
2874
ff628b99 28752019-05-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2876
2877 * gcc-interface/Makefile.in (install-gcc-specs): Use foreach.
2878 Honor DESTDIR.
2879
ebd761d4 28802019-04-29 Michael K. Darling <darlingm@gmail.com>
2881
2882 * gnatvsn.ads: Bump Library_Version to 10.
2883
5f260823 28842019-04-24 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2885 Bernd Edlinger <bernd.edlinger@hotmail.de>
2886 Jakub Jelinek <jakub@redhat.com>
2887
2888 PR target/89093
2889 * raise-gcc.c (TARGET_ATTRIBUTE): Define.
2890 (continue_unwind, personality_body, PERSONALITY_FUNCTION): Add
2891 TARGET_ATTRIBUTE.
2892
d7ca95c0 28932019-04-07 Eric Botcazou <ebotcazou@adacore.com>
2894
2895 * libgnat/i-cexten.ads (CFloat_128): New type.
2896
26b21081 28972019-03-22 Dmitriy Anisimkov <anisimko@adacore.com>
2898
2899 PR ada/89583
2900 * libgnat/g-socket.adb (Bind_Socket, Connect_Socket,
2901 Send_Socket): Fix the computation of structure lengths passed to
2902 low level routines.
2903 (Is_IPv6_Address): Fix the number of expected colons.
2904
2f6d557f 29052019-03-11 Martin Liska <mliska@suse.cz>
2906
d325ee67 2907 * gcc-interface/misc.c (gnat_post_options): Wrap option name in string
2908 format message and fix GNU coding style.
2f6d557f 2909
c1ad6672 29102019-02-08 Eric Botcazou <ebotcazou@adacore.com>
2911
2912 * gcc-interface/trans.c (gnat_to_gnu) <N_Aggregate>: Minor tweak.
2913 * gcc-interface/utils.c (convert): Do not pad when doing an unchecked
2914 conversion here. Use TREE_CONSTANT throughout the function.
2915 (unchecked_convert): Also pad if the source is a CONSTRUCTOR and the
2916 destination is a more aligned array type or a larger aggregate type,
2917 but not between original and packable versions of a type.
2918
62a6ebbd 29192019-02-08 Eric Botcazou <ebotcazou@adacore.com>
2920
2921 * gcc-interface/utils.c (max_size) <tcc_unary>: Be prepared for an
2922 operand with VOID_TYPE.
2923
da383d19 29242019-02-08 Eric Botcazou <ebotcazou@adacore.com>
2925
2926 * gcc-interface/trans.c (elaborate_all_entities): Do not elaborate the
2927 entities of a package renaming another one.
2928
09c123a0 29292019-02-08 Eric Botcazou <ebotcazou@adacore.com>
2930
2931 * gcc-interface/trans.c (Regular_Loop_to_gnu): Replace tests on
2932 individual flag_unswitch_loops and flag_tree_loop_vectorize switches
2933 with test on global optimize switch.
2934 (Raise_Error_to_gnu): Likewise.
2935
a9dd7273 29362019-02-07 Eric Botcazou <ebotcazou@adacore.com>
2937
2938 * libgnarl/s-linux__sparc.ads (ETIMEDOUT): Set to correct value.
2939
4836c4f1 29402019-02-06 Arnaud Charlet <charlet@adacore.com>
2941
2942 * libgnarl/s-linux__x32.ads: Resync list of signals with s-linux.ads
2943
6b56937c 29442019-01-27 Eric Botcazou <ebotcazou@adacore.com>
2945
2946 * repinfo.adb (List_Component_Layout): Remove superfluous space for
2947 zero-sized field.
2948 * gcc-interface/ada-tree.h (TYPE_IS_EXTRA_SUBTYPE_P): New macro.
2949 * gcc-interface/gigi.h (create_extra_subtype): Declare.
2950 * gcc-interface/decl.c (TYPE_ARRAY_SIZE_LIMIT): Likewise.
2951 (update_n_elem): New function.
2952 (gnat_to_gnu_entity): Use create_extra_subtype to create extra subtypes
2953 instead of doing it manually.
2954 <E_Array_Type>: Use update_n_elem to compute the maximum size. Use the
2955 index type instead of base type for the bounds. Set TYPE_ARRAY_MAX_SIZE
2956 of the array to the maximum size.
2957 <E_Array_Subtype>: Create an extra subtype using the index type of the
2958 base array type for self-referential bounds. Use update_n_elem to
2959 compute the maximum size. Set TYPE_ARRAY_MAX_SIZE of the array to the
2960 maximum size.
2961 (gnat_to_gnu_field): Clear DECL_NONADDRESSABLE_P on discriminants.
2962 * gcc-interface/misc.c (gnat_get_alias_set): Return the alias set of
2963 the base type for an extra subtype.
2964 (gnat_type_max_size): Remove obsolete code.
2965 * gcc-interface/trans.c (Attribute_to_gnu): Minor tweak.
2966 (can_be_lower_p): Deal with pathological types.
2967 * gcc-interface/utils.c (create_extra_subtype): New function.
2968 (create_field_decl): Minor tweak.
2969 (max_size) <tcc_reference>: Compute a better value by using the extra
2970 subtypes on the self-referential bounds.
2971 <tcc_binary>: Rewrite. Deal with "negative value" in unsigned types.
2972 <tcc_expression>: Likewise.
2973 * gcc-interface/utils2.c (compare_arrays): Retrieve the original bounds
2974 of the arrays upfront. Swap only if the second length is not constant.
2975 Use comparisons on the original bounds consistently for the null tests.
2976 (build_binary_op): Use TYPE_IS_EXTRA_SUBTYPE_P macro.
2977 (build_allocator): Minor tweak.
2978
ecb2c722 29792019-01-27 Eric Botcazou <ebotcazou@adacore.com>
2980
2981 * gcc-interface/decl.c (array_type_has_nonaliased_component): Return
2982 the same value for every dimension of a multidimensional array type.
2983
10f25579 29842019-01-26 Eric Botcazou <ebotcazou@adacore.com>
2985
2986 * gcc-interface/trans.c (Regular_Loop_to_gnu): Use the SLOC of the
2987 iteration scheme, if present, throughout the translation.
2988
aced6683 29892019-01-26 Eric Botcazou <ebotcazou@adacore.com>
2990
2991 * gcc-interface/trans.c (gnat_to_gnu) <N_Assignment_Statement>: Use
2992 DECL_SIZE_UNIT instead of TYPE_SIZE_UNIT for the size to be assigned
2993 by a call to memset if the LHS is a DECL.
2994
18b4b30e 29952019-01-26 Eric Botcazou <ebotcazou@adacore.com>
2996
2997 * gcc-interface/trans.c (struct loop_info_d): Remove artificial field.
2998 (Loop_Statement_to_gnu): Do not set it.
2999
6dce35b7 30002019-01-26 Eric Botcazou <ebotcazou@adacore.com>
3001
3002 * gcc-interface/trans.c (Iterate_Acc_Clause_Arg): Fix formatting.
3003 (Acc_gnat_to_gnu): Likewise.
3004 (Acc_Data_to_gnu): Likewise.
3005 (Acc_Var_to_gnu): Likewise.
3006 (Acc_Reduc_to_gnu): Likewise.
3007 (Acc_Size_List_to_gnu): Likewise.
3008 (Pragma_to_gnu) <Pragma_Acc_Loop>: Likewise.
3009 <Pragma_Acc_Data>): Likewise.
3010 (find_loop_for): Remove default value for parameters.
3011 * gcc-interface/trans.c (gnat_to_gnu) <N_Op_And>: Merge into...
3012 <N_Op_Eq>): ...this.
3013
f8cd11ee 30142019-01-26 Eric Botcazou <ebotcazou@adacore.com>
3015
3016 * gcc-interface/decl.c (annotate_value) <INTEGER_CST>: Use test on
3017 the sign bit instead of on the sign of the value.
3018 <PLUS_EXPR>: Turn addition of negative constant into subtraction.
3019 <MULT_EXPR>: Add test for degenerate case.
3020 <BIT_AND_EXPR>: Simplify.
3021
9a3c51d9 30222019-01-18 Sebastian Huber <sebastian.huber@embedded-brains.de>
3023
3024 * s-oscons-tmplt.c (AF_INET6): Do not undefine for RTEMS.
3025
07c11f2b 30262019-01-09 Sandra Loosemore <sandra@codesourcery.com>
3027
3028 PR other/16615
07c11f2b 3029 * exp_ch11.adb: Change "can not" to "cannot".
3030 * sem_ch4.adb: Likewise.
3031
f4d3c071 30322019-01-09 Sandra Loosemore <sandra@codesourcery.com>
3033
3034 PR other/16615
f4d3c071 3035 * exp_ch9.adb: Mechanically replace "can not" with "cannot".
3036 * libgnat/s-regpat.ads: Likewise.
3037 * par-ch4.adb: Likewise.
3038 * set_targ.adb: Likewise.
3039 * types.ads: Likewise.
3040
902071d1 30412019-01-08 Justin Squirek <squirek@adacore.com>
3042
3043 Revert:
902071d1 3044 2018-07-31 Justin Squirek <squirek@adacore.com>
3045
76fb0465 3046 * lib-writ.adb (Write_With_Lines): Modfiy the generation
3047 of dependencies within ali files so that source unit
3048 bodies are properly listed even if said bodies are
3049 missing. Perform legacy behavior in GNATprove mode.
3050 * lib-writ.ads: Modify documentation to reflect current
3051 behavior.
902071d1 3052
3053 and:
902071d1 3054 2018-09-26 Justin Squirek <squirek@adacore.com>
3055
76fb0465 3056 * lib-writ.adb, lib-writ.ads (Write_With_Lines): Add
3057 documentation and an extra conditional check for RCI
3058 units so that generated ali files will list the spec
3059 only instead of a body when a body is not found.
902071d1 3060
65a33d4a 30612019-01-04 Eric Botcazou <ebotcazou@adacore.com>
3062
3063 * gnatvsn.ads: Bump copyright year.
3064
3d8932fd 30652019-01-01 Jakub Jelinek <jakub@redhat.com>
8e8f6434 3066
fbd26352 3067 Update copyright years.
3068
277184bc 3069 * gnat_ugn.texi: Bump @copying's copyright year.
3070 * gnat_rm.texi: Likewise.
7dfbd804 3071\f
3d8932fd 3072Copyright (C) 2019 Free Software Foundation, Inc.
7dfbd804 3073
3074Copying and distribution of this file, with or without modification,
3075are permitted in any medium without royalty provided the copyright
3076notice and this notice are preserved.