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