]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/ada/ChangeLog
[Ada] Crash on aggregate for limited type in extended return
[thirdparty/gcc.git] / gcc / ada / ChangeLog
CommitLineData
c0e85bb6 12019-07-10 Ed Schonberg <schonberg@adacore.com>
2
3 * sem_ch8.adb (Check_Constrained_Object): A record that is
4 limited because of the presence of a limited component is
5 constrained, and no subtype indiciation needs to be created for
6 it, just as is the case for declared limited records.
7
94654315 82019-07-10 Yannick Moy <moy@adacore.com>
9
10 * sem_aux.adb, sem_aux.ads (Is_Protected_Operation): New
11 function to determine if a subprogram is protected.
12 * sem_spark.adb (Setup_Protected_Components): New procedure to
13 add protected components to the environment.
14 (Check_Callable_Body): Call the new Setup_Protected_Components.
15 (Check_Package_Spec): Merge local environment with enclosing one
16 when done.
17
9ac24568 182019-07-10 Claire Dross <dross@adacore.com>
19
20 * sem_spark.adb (Check_Expression): Allow digits constraints as
21 input.
22 (Illegal_Global_Usage): Pass in the entity.
23 (Is_Subpath_Expression): New function to allow different nodes
24 as inner parts of a path expression.
25 (Read_Indexes): Allow concatenation and aggregates with box
26 expressions. Allow attributes Update and Loop_Entry.
27 (Check_Expression): Allow richer membership test.
28 (Check_Node): Ignore bodies of generics.
29 (Get_Root_Object): Allow concatenation and attributes.
30
95266217 312019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
32
33 * sem_ch6.adb (Check_Discriminant_Conformance): Use Find_Type to
34 discover the type of a full view discriminant.
35
f9d615a1 362019-07-10 Arnaud Charlet <charlet@adacore.com>
37
38 * doc/gnat_ugn/gnat_and_program_execution.rst: Improve gnatmem's
39 doc for the depth switch.
40
55d7c660 412019-07-10 Bob Duff <duff@adacore.com>
42
43 * doc/gnat_ugn/gnat_utility_programs.rst: Document gnatpp's
44 --source-line-breaks switch.
45
e94f4600 462019-07-10 Justin Squirek <squirek@adacore.com>
47
48 * doc/gnat_rm/implementation_defined_attributes.rst: Add mention
49 of 'Image attribute with 'Img's entry to mention additional
50 added 2012 usage of Obj'Image.
51 * doc/gnat_rm/implementation_defined_pragmas.rst: Correct
52 mispelling of Async_Writers.
53 * gnat_rm.texi: Regenerate.
54 * sem_prag.adb (Analyze_Pragma): Correct mispelling of
55 Async_Writers.
56 * sem_util.adb (State_Has_Enabled_Property): Correct mispelling
57 of Async_Writers.
58
2bf00b7f 592019-07-10 Simon Buist <buist@adacore.com>
60
61 * sem_util.ads (Child_Prefix): New constant.
62 * sem_util.adb (Unique_Name): Add a special prefix to child
63 units that have a nested subprogram or package.
64
9dda714b 652019-07-10 Arnaud Charlet <charlet@adacore.com>
66
67 * sfn_scan.adb (Scan_SFN_Pragmas): Add pragma Assert.
68
fd8a528d 692019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
70
71 * sem_ch3.adb (Check_Nonoverridable_Aspects): Correct the
72 spelling in certain error messages.
73 (Check_Pragma_Implemented): Correct the spelling in certain
74 error messages.
75
97f0aa19 762019-07-10 Eric Botcazou <ebotcazou@adacore.com>
77
78 * Makefile.rtl (GNATRTL_NONTASKING_OBJS): Add g-brapre.
79 * libgnat/g-brapre.ads: New package specification.
80 * doc/gnat_rm/the_gnat_library.rst: Document it.
81 * gnat_rm.texi: Regenerate.
82
d2506f16 832019-07-10 Yannick Moy <moy@adacore.com>
84
85 * osint-c.adb (Set_File_Name): Always add extension for multiple
86 units per file mode.
87
c6db401c 882019-07-10 Corentin Gay <gay@adacore.com>
89
90 * sysdep.c: Put include directive for 'vxWorks.h' before any
91 other VxWorks headers.
92
344c2639 932019-07-10 Eric Botcazou <ebotcazou@adacore.com>
94
95 * doc/gnat_rm/implementation_defined_attributes.rst
96 (Scalar_Storage_Order): Minor tweaks. Add note about debuggers.
97 * gnat_rm.texi: Regenerate.
98
8a9900a9 992019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
100
101 * exp_ch4.adb (Expand_N_Case_Expression): Mark the generated
102 assignments to the temporary result as being OK because the
103 expansion of case expressions is correct by construction.
104 (Is_Copy_Type): Update the predicate to match the comment
105 within.
106
8c21443b 1072019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
108
109 * bindo-graphs.adb, bindo.adb, debug.adb, exp_ch6.adb,
110 sem_ch10.adb, sem_ch13.adb, sem_ch3.adb, sem_ch4.adb,
111 sem_ch6.adb, sem_ch7.adb, sem_res.adb, sem_spark.adb,
112 sem_util.adb, warnsw.ads: Minor reformatting.
113
2e7929f0 1142019-07-10 Joffrey Huguet <huguet@adacore.com>
115
116 * libgnat/a-strbou.ads, libgnat/a-strfix.ads,
117 libgnat/a-strunb.ads, libgnat/a-strunb__shared.ads: Add global
118 contracts, contract cases, preconditions and postconditions to
119 procedures and functions.
120
87d55fe2 1212019-07-10 Doug Rupp <rupp@adacore.com>
122
123 * sysdep.c (__gnat_is_file_not_found_error): Reformulate to also
124 work for vxworks7r2 SR0610.
125
82d7e1f4 1262019-07-10 Doug Rupp <rupp@adacore.com>
127
128 * env.c (__gnat_environ): Reformulate to also work for
129 vxworks7r2 SR0610.
130
7f6066e1 1312019-07-10 Patrick Bernardi <bernardi@adacore.com>
132
133 * Makefile.rtl: Handle vxworks7r2 ppc target
134
6523468f 1352019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
136
137 * bindo.adb: Update the section on switches.
138 * bindo-graphs.adb
139 (Add_Cycle, Add_Vertex_And_Complement): Remove.
140 (Create): The graph no longer needs a set of recorded cycles
141 because the cycles are not rediscovered in permuted forms.
142 (Cycle_End_Vertices): New routine.
143 (Destroy): The graph no longer needs a set of recorded cycles
144 because the cycles are not rediscovered in permuted forms.
145 (Destroy_Library_Graph_Vertex): Move to the library level.
146 (Find_All_Cycles_Through_Vertex, Find_All_Cycles_With_Edge):
147 Remove.
148 (Find_Cycles_From_Successor, Find_Cycles_From_Vertex,
149 Find_Cycles_In_Component, Has_Elaborate_All_Edge): New routines.
150 (Insert_And_Sort): Remove.
151 (Is_Elaborate_Body_Edge): Use predicate
152 Is_Vertex_With_Elaborate_Body.
153 (Is_Recorded_Cycle): Remove.
154 (Is_Vertex_With_Elaborate_Body): New routine.
155 (Normalize_And_Add_Cycle): Remove.
156 (Precedence): Rename to xxx_Precedence, where xxx relates to the
157 input. These versions better reflect the desired input
158 precedence.
159 (Record_Cycle): New routine.
160 (Remove_Vertex_And_Complement, Set_Is_Recorded_Cycle): Remove.
161 (Trace_xxx): Update all versions to use debug switch -d_t.
162 (Trace_Component): New routine.
163 (Trace_Eol): Removed.
164 (Trace_Vertex): Do not output the component as this information
165 is already available when the component is traced.
166 (Unvisit, Visit): New routine.
167 * bindo-graphs.ads: Add new instance LGV_Lists. Remove instance
168 RC_Sets. Update the structure of type Library_Graph_Attributes
169 to remove the set of recorded cycles.
170 (Destroy_Library_Graph_Vertex): Move to the library level.
171 * bindo-writers.adb (Write_Component_Vertices): Output
172 information about the number of vertices.
173 * debug.adb: Document the use of binder switch -d_t. Update the
174 use of binder switch -d_T.
175
9eaacd61 1762019-07-10 Yannick Moy <moy@adacore.com>
177
178 * sem_spark.adb (Get_Root_Object): Replace precondition by error
179 message.
180 (Read_Indexes): Replace precondition by error message.
181 (Check_Callable_Body): Check only traversal function returns an
182 anonymous access type.
183 (Check_Expression): Issue error on unexpected expression as
184 path.
185 * sem_util.adb (First_Global): Fix access to global on
186 entry/task.
187
2ac657bd 1882019-07-10 Javier Miranda <miranda@adacore.com>
189
190 * exp_ch6.adb (Is_Class_Wide_Interface_Type): New subprogram.
191 (Expand_Call_Helper): Handle non-limited views when we check if
192 any formal is a class-wide interface type.
193 * exp_disp.adb (Expand_Interface_Actuals): Handle non-limited
194 views when we look for interface type formals to force "this"
195 displacement.
196
d3fb378d 1972019-07-10 Ed Schonberg <schonberg@adacore.com>
198
199 * sem_res.adb (Resolve_Equality_Op): Do not replace the resolved
200 operator by its alias if expander is not active, because the
201 operand type may not be frozen yet and its inherited operations
202 have not yet been created.
203
ab8418a3 2042019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
205
206 * bindo-elaborators.adb (Elaborate_Units): Set attribute
207 Elab_Position of all elaborated units.
208 (Set_Unit_Elaboration_Positions): New routine.
209
6e618828 2102019-07-10 Gary Dismukes <dismukes@adacore.com>
211
212 * exp_util.adb: Reformatting and a typo fix.
213
97f6f798 2142019-07-10 Yannick Moy <moy@adacore.com>
215
216 * exp_util.adb (Remove_Side_Effects): Prefer renamings for
217 objects of possible owning type in GNATprove mode.
218
89c67bd9 2192019-07-09 Ed Schonberg <schonberg@adacore.com>
220
221 * sem_ch3.adb (Analyze_Object_Declaration): If the object type
222 is a composite type that has a dynamic predicate and, the
223 expression in the declaration is an aggregate, the generated
224 predicate check must appear after the expanded code for the
225 aggregate, which will appear after the rewritten object
226 declarastion.
227
fb739c45 2282019-07-09 Justin Squirek <squirek@adacore.com>
229
230 * sem_eval.adb (Expr_Value_E): Add conditional to correctly
231 handle constant enumerated character types.
232
54b39f26 2332019-07-09 Eric Botcazou <ebotcazou@adacore.com>
234
235 * libgnarl/s-osinte__mingw.ads (CRITICAL_SECTION): Use proper
236 type for SpinCount component.
237
9b57fc30 2382019-07-09 Justin Squirek <squirek@adacore.com>
239
240 * exp_ch4.adb (Expand_N_Allocator): Add conditional to detect
241 the presence of anoymous access type allocators and issue a
242 warning if the appropriate warning flag is enabled.
243 * warnsw.ads: Add new warning flag for anonymous allocators
244 * warnsw.adb (All_Warnings, Restore_Warnings, Save_Warnings,
245 Set_Underscore_Warning_Switch): Register new flags.
246 (WA_Warnings): Register new flag as an "all warnings" switch
247 * usage.adb,
248 doc/gnat_ugn/building_executable_programs_with_gnat.rst:
249 Document new warning switches -gnatw_a and -gnatw_A.
250 * gnat_ugn.texi: Regenerate.
251
2463fa93 2522019-07-09 Ed Schonberg <schonberg@adacore.com>
253
254 * sem_ch4.adb (Diagnose_Call): Improve error recovery when a
255 local subprogram name hides a possible candidate name declared
256 in a child package in the context of the current unit.
257 * sem_ch6.adb (Process_Formals): Protect against malformed
258 formal types when the parameter type does not denote an entity.
259
7389bee5 2602019-07-09 Hristian Kirtchev <kirtchev@adacore.com>
261
262 * bindo-augmentors.adb (Visit_Elaboration_Root): Do not start a
263 DFS from an elaboration root whose corresponding unit lacks
264 elaboration code. This behavior mimics that of the old
265 elaboration order mechanism.
266 * bindo-graphs.adb (Find_All_Cycles_Through_Vertex): Move the
267 vertex tracing within the functional branches of the routine.
268 This prevents spurious trace output.
269 (Has_No_Elaboration_Code): New routine.
270 (Trace_Cycle, Trace_Edge): Update the various Ids to use the
271 "standard" trace format.
272 * bindo-graphs.ads (Has_No_Elaboration_Code): New routine.
273 * bindo-units.ads, bindo-units.adb (Has_No_Elaboration_Code):
274 New routine.
275
06d78d4c 2762019-07-09 Piotr Trojanek <trojanek@adacore.com>
277
278 * ali.ads, bindo-graphs.adb, bindo-validators.adb, clean.adb,
279 doc/gnat_ugn/elaboration_order_handling_in_gnat.rst, einfo.ads,
280 exp_aggr.adb, exp_ch13.adb, exp_ch4.adb, exp_ch5.adb,
281 exp_ch6.adb, exp_ch7.adb, exp_ch9.adb, exp_pakd.adb,
282 fname-uf.ads, gnatlink.adb, inline.adb, lib.ads, make.adb,
283 namet.ads, opt.ads, par-ch4.adb, par-ch6.adb, par-labl.adb,
284 prep.adb, sem_aggr.adb, sem_ch13.adb, sem_ch4.adb, sem_ch5.adb,
285 sem_ch6.adb, sem_ch6.ads, sem_ch7.adb, sem_ch8.adb, sem_dim.adb,
286 sem_disp.adb, sem_prag.adb, sem_res.adb, sem_warn.adb,
287 sinfo.ads: Replace ". " with ". ". Minor reformatting and typo
288 corrections.
289 * gnat_ugn.texi: Generate.
290
7ed20965 2912019-07-09 Hristian Kirtchev <kirtchev@adacore.com>
292
293 * bindo.ads: Move type Precedence_Kind from the private to the
294 visible part of the unit.
295 * bindo-augmentors.adb: Remove the use of global data as it is
296 bad practice.
297 (Augment_Library_Graph): Update the parameter profile.
298 (Is_Visited, Set_Is_Visited): Remove.
299 (Visit_Elaboration_Root, Visit_Elaboration_Roots): Update the
300 parameter profile and comment on usage.
301 (Visit_Vertex): Likewise. Also keep track of which invocation
302 edge activates a task.
303 * bindo-augmentors.ads (Augment_Library_Graph): Update the
304 parameter profile and comment on usage.
305 * bindo-builders.adb (Create_Forced_Edge,
306 Create_Spec_And_Body_Edge, Create_With_Edge): Update the call to
307 Add_Edge.
308 * bindo-diagnostics.adb: Add with end use clauses for Restrict
309 and Rident.
310 (Output_Dynamic_Model_Suggestions): Remove.
311 (Output_Invocation_Related_Suggestions): New routine.
312 (Output_Suggestions): Output all invocation-related suggestions
313 together.
314 * bindo-elaborators.adb: Remove types Comparator_Ptr and
315 Predicate_Ptr.
316 (Find_Best_Vertex): Update the parameter profile.
317 * bindo-graphs.adb (Activates_Task): New routine.
318 (Add_Body_Before_Spec_Edge): Update the call to
319 Add_Edge_With_Return.
320 (Add_Edge): Update the parameter profile and the call to
321 Add_Edge_With_Return.
322 (Add_Edge_With_Return): Update the parameter profile and comment
323 on usage.
324 (At_Least_One_Edge_Satisfies): New routine.
325 (Contains_Elaborate_All_Edge): Reimplement.
326 (Contains_Static_Successor_Edge, Contains_Task_Activation): New
327 routine.
328 (Contains_Weak_Static_Successor): Remove.
329 (Is_Static_Successor_Edge): New routine.
330 * bindo-graphs.ads: Add types LGE_Predicate_Ptr,
331 LGV_Comparator_Ptr, and LGV_Predicate_Ptr. Update type
332 Library_Graph_Edge_Attributes to capture whether an invocation
333 edge activates a task. Update the value of
334 No_Library_Graph_Edge_Attributes.
335 (Activates_Task): Update the parameter profile and comment on
336 usage.
337 (Contains_Static_Successor_Edge, Contains_Task_Activation): New
338 routines.
339 (Contains_Weak_Static_Successor): Remove.
340 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst:
341 Update the documentation to reflect the new task-related advice.
342 * gnat_ugn.texi: Regenerate.
343
247527b7 3442019-07-09 Piotr Trojanek <trojanek@adacore.com>
345
346 * exp_util.adb (Containing_Package_With_Ext_Axioms): Replace
347 low-level Ekind test with a high-level wrapper.
348
1d7a9954 3492019-07-09 Arnaud Charlet <charlet@adacore.com>
350
351 * libgnat/s-memory.adb: Disable calls to Abort defer/undefer
352 when ZCX_By_Default.
353
7667b40a 3542019-07-09 Javier Miranda <miranda@adacore.com>
355
356 * sem_ch13.adb (Rep_Item_Too_Early): Representation clauses are
357 not allowed for a derivation of a generic type. Extend the
358 current test to check that none of the parents is a generic
359 type.
360
98eb8111 3612019-07-09 Hristian Kirtchev <kirtchev@adacore.com>
362
363 * exp_ch9.adb, exp_util.adb, repinfo.adb, sem_ch12.adb,
364 sem_prag.adb, sem_res.adb, sem_spark.adb, sem_util.adb: Minor
365 reformatting.
366
5ffa473a 3672019-07-09 Ed Schonberg <schonberg@adacore.com>
368
369 * sem_res.adb (Resolve_Equality_Op): If the node was overloaded,
370 set properly the entity to which the node has been resolved. The
371 original entity is the first one found during analysis, and is
372 not necessarily the resolved one.
373 (Resolve_Op_Not): If the argument of negation is an overloaded
374 equality operation, call its resolution directly given that the
375 context type does not participate in overload resolution.
376
f7197450 3772019-07-09 Hristian Kirtchev <kirtchev@adacore.com>
378
379 * bindo.adb: Remove with and use clauses for Debug. Add with
380 and use clauses for Opt.
381 (Find_Elaboration_Order): Enable the v4.0 elaboration order. The
382 v3.0 mechanism is now available under binder switch -H.
383 * bindusg.adb (Display): Enable switch -H.
384 * debug.adb: Free compiler switch -gnatd_G. Free binder switch
385 -d_N.
386 * sem_elab.adb: Update the section on switches to remove
387 -gnatd_G.
388 (Invocation_Graph_Recording_OK): The invocation graph is now
389 unconditionally recorded in ALI files.
390 * switch-b.adb (Scan_Binder_Switches): Scan switch -H.
391 * doc/gnat_ugn/building_executable_programs_with_gnat.rst:
392 Update the documentation on compiler switches related to
393 elaboration. Update the documentation on binder switches to
394 include switch -H.
395 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update
396 the documentation on elaboration order handling in GNAT.
397 * gnat_ugn.texi: Regenerate.
398
a2c6c634 3992019-07-09 Eric Botcazou <ebotcazou@adacore.com>
400
401 * repinfo.adb (List_Entities): Disregard formals altogether.
402 (List_Name): Properly escape the double quote in the JSON
403 output.
404
3933efcf 4052019-07-09 Javier Miranda <miranda@adacore.com>
406
407 * exp_util.adb (Remove_Side_Effects): Preserve the
408 Do_Range_Check flag.
409
2166bdef 4102019-07-09 Yannick Moy <moy@adacore.com>
411
412 * sinfo.ads: Refine comment for Do_Range_Check.
413
dbf9a3d7 4142019-07-09 Yannick Moy <moy@adacore.com>
415
416 * exp_spark.adb (Expand_SPARK_N_Attribute_Reference): Expand
417 attribute reference on Enum_Rep.
418
44e00a56 4192019-07-09 Ed Schonberg <schonberg@adacore.com>
420
421 * sem_ch12.adb (Instantiate_Formal_Package): Handle properly the
422 case where the actual for a formal package in an instance is the
423 current instance of an enclosing generic package.
424 (Check_Formal_Packages): If the formal package declaration is
425 box-initialized or lacks associations altogether, no internal
426 instance was created to verify conformance, and there is no
427 validating package to remove from tree.
428
3e4e7139 4292019-07-09 Yannick Moy <moy@adacore.com>
430
431 * freeze.adb (Build_Renamed_Body): Do not set body to inline in
432 GNATprove mode.
433
8235b943 4342019-07-09 Yannick Moy <moy@adacore.com>
435
436 * exp_util.adb (Expand_Subtype_From_Expr): Still expand the type
437 of static expressions in GNATprove_Mode.
438 * sem_ch3.adb (Analyze_Object_Declaration): Remove obsolete
439 special case for GNATprove_Mode.
440
cf9af2fa 4412019-07-09 Piotr Trojanek <trojanek@adacore.com>
442
443 * doc/gnat_rm/the_gnat_library.rst,
444 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
445 erroutc.adb, libgnat/g-comlin.adb, libgnat/g-comlin.ads,
446 libgnat/g-regexp.ads, libgnat/g-regpat.ads,
447 libgnat/g-spipat.ads, libgnat/s-os_lib.ads,
448 libgnat/s-regexp.ads: Reword "wild card" to "wildcard".
449 * gnat_rm.texi, gnat_ugn.texi: Regenerate.
450
a080baa9 4512019-07-09 Yannick Moy <moy@adacore.com>
452
453 * sem_spark.adb (Check_Expression): Handle correctly implicit
454 assignments as part of allocators and (extension) aggregates.
455 (Get_Root_Object): Adapt for new path expressions.
456 (Is_Path_Expression): Return True for (extension) aggregate.
457
d9b7ae15 4582019-07-09 Piotr Trojanek <trojanek@adacore.com>
459
460 * einfo.ads: Fix a typo.
461
4c24efa6 4622019-07-09 Ed Schonberg <schonberg@adacore.com>
463
464 * sem_util.adb (Scope_Within_Or_Same): Handle properly task
465 bodies and protected bodies, so that local variables within have
466 their proper scopes after these constructs have been rewritten
467 during expansion. This patch resembles but is not identical to
468 the code in Scope_Within.
469
6c334e66 4702019-07-09 Arnaud Charlet <charlet@adacore.com>
471
472 * gnat1drv.adb (Adjust_Global_Switches): Set
473 Dynamic_Elaboration_Checks to True in CodePeer mode.
474
82c20af0 4752019-07-09 Yannick Moy <moy@adacore.com>
476
477 * sem_spark.adb (Get_Perm_Or_Tree): Issue an error when
478 encountering unknown global variable.
479
a42b8e6a 4802019-07-09 Yannick Moy <moy@adacore.com>
481
482 * sem_spark.adb (Check_Expression): Change signature to take an
483 Extended_Checking_Mode, for handling read permission checking of
484 sub-expressions in an assignment.
485 (Check_Parameter_Or_Global): Adapt to new behavior of
486 Check_Expression for mode Assign.
487 (Check_Safe_Pointers): Do not analyze generic bodies.
488 (Check_Assignment): Separate checking of the target of an
489 assignment.
490
5fb4f6e3 4912019-07-09 Eric Botcazou <ebotcazou@adacore.com>
492
493 * repinfo.ads (JSON format): Adjust.
494 * repinfo.adb (Need_Blank_Line): Rename to...
495 (Need_Separator): ...this.
496 (Blank_Line): Rename to...
497 (Write_Separator): ...this and add JSON specific handling.
498 (List_Array_Info): Adjust to above renaming.
499 (List_Object_Info): Likewise.
500 (List_Record_Info): Likewise.
501 (List_Subprogram_Info): Likewise.
502 (List_Type_Info): Likewise.
503 (List_Entities): Do not set Need_Blank_Line.
504 (List_Rep_Info): Set Need_Separator and add JSON specific
505 handling. Output a single JSON stream in the normal case.
506
b389ec1e 5072019-07-09 Arnaud Charlet <charlet@adacore.com>
508
509 * doc/gnat_ugn/the_gnat_compilation_model.rst: Update doc on
510 -fdump-ada-spec now that we generate Ada 2012.
511 * gnat_ugn.texi: Regenerate.
512
5acb3702 5132019-07-08 Eric Botcazou <ebotcazou@adacore.com>
514
515 * repinfo.adb (List_Common_Type_Info): New procedure extracted
516 from...
517 (List_Type_Info): ...here. Call it for the common information,
518 start with a blank line and output the linker section at the
519 end, if any.
520 (List_Mechanisms): Rename to...
521 (List_Subprogram_Info): ...this.
522 (List_Array_Info): Call List_Common_Type_Info.
523 (List_Entities): Adjust to above change and renaming.
524 (List_Record_Info): Call List_Common_Type_Info.
525
6eb57612 5262019-07-08 Dmitriy Anisimkov <anisimko@adacore.com>
527
528 * libgnat/g-sercom.ads
529 (Serial_Port_Descriptor): New type.
530 (Serial_Port): Add a comment, make it hold a
531 Serial_Port_Descriptor.
532 (To_Ada, To_C): New procedures.
533 (Port_Data, Port_Data_Access): Remove types.
534 * libgnat/g-sercom.adb (To_Ada): New stub.
535 * libgnat/g-sercom__linux.adb, libgnat/g-sercom__mingw.adb:
536 Update implementations accordingly.
537 * s-oscons-tmplt.c: Bind Serial_Port_Descriptor to
538 System.Win32.HANDLE on Windows, and to Interfaces.C.int on
539 Linux. Add "Interfaces.C." prefix for other basic integer type
540 bindings.
541 * xoscons.adb (Output_Info): Remove the "Interfaces.C." prefix
542 for subtypes generation.
543
08da2ad9 5442019-07-08 Arnaud Charlet <charlet@adacore.com>
545
546 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
547 Update documentation on No_Exceptions restriction.
548 * gnat_rm.texi: Regenerate.
549
89b07420 5502019-07-08 Dmitriy Anisimkov <anisimko@adacore.com>
551
552 * libgnat/s-os_lib.adb: Do not call __gnat_kill for Invalid_Pid.
553
0cc34fed 5542019-07-08 Piotr Trojanek <trojanek@adacore.com>
555
556 * sem_util.adb (Enclosing_Package_Or_Subprogram): Do not expect
557 package and subprogram bodies.
558
46299a06 5592019-07-08 Bob Duff <duff@adacore.com>
560
561 * doc/gnat_ugn/gnat_utility_programs.rst: Remove documentation
562 of ignored GNATpp switch.
563
4475d2f0 5642019-07-08 Hristian Kirtchev <kirtchev@adacore.com>
565
566 * doc/gnat_rm/implementation_defined_pragmas.rst:
567 Update the documentation of pragma Initialize_Scalars.
568 * gnat_rm.texi: Regenerate.
569
b282b25b 5702019-07-08 Javier Miranda <miranda@adacore.com>
571
572 * exp_ch4.adb (Tagged_Membership): Fix regression silently
573 introduced in r260738 that erroneouslusy causes the evaluation
574 to True of the membership test when the left operand of the
575 membership test is a class-wide interface object and the right
576 operand is a type that implements such interface type.
577
703ee0e0 5782019-07-08 Hristian Kirtchev <kirtchev@adacore.com>
579
580 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
581 register an address clause when its prefix denotes a generic
582 formal object.
583
e6b4414e 5842019-07-08 Hristian Kirtchev <kirtchev@adacore.com>
585
586 * bindo-diagnostics.adb (Diagnose_Cycle): Capture the presence
587 of an Elaborate_All edge before iterating over the edges of the
588 cycle.
589 (Output_Elaborate_Body_Transition): Update the parameter profile
590 and the comment on usage. Add a missing case where the edge is
591 within the context of an Elaborate_All.
592 (Output_Transition): Update the call to
593 Output_Elaborate_Body_Transition.
594 * bindo-graphs.ads, bindo-graphs.adb
595 (Contains_Elaborate_All_Edge): New routine.
596
5a4de65a 5972019-07-08 Piotr Trojanek <trojanek@adacore.com>
598
599 * lib-xref-spark_specific.adb (Create_Heap): Set dummy Etype for
600 the fake __HEAP entity.
601
42253061 6022019-07-08 Daniel Mercier <mercier@adacore.com>
603
604 * gnat1drv.adb: Suppress warnings on memory representation in
605 CodePeer compiler mode.
606
a7c8fd7e 6072019-07-08 Nicolas Roche <roche@adacore.com>
608
609 * rtinit.c (__gnat_runtime_initialize): Remove dependency on
610 CommandLineToArgvW.
611
89c9dd55 6122019-07-08 Doug Rupp <rupp@adacore.com>
613
614 * Makefile.rtl: Handle vxworks7r2 in x86_64 and x86 vxworks7.
615
944903c8 6162019-07-08 Dmitriy Anisimkov <anisimko@adacore.com>
617
618 * Makefile.rtl: Use g-sercom__linux.adb for all linuxes.
619
e51a140c 6202019-07-08 Yannick Moy <moy@adacore.com>
621
622 * expander.adb (Expand): Do not reset Analyzed flag always.
623 * sem_eval.adb (Fold_Ureal): Mark node as analyzed.
624
f117e449 6252019-07-08 Ed Schonberg <schonberg@adacore.com>
626
627 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Do not insert twice
628 the assignment statement that computes the delay value, to
629 prevent improper tree sharing when the value is a type
630 conversion and Float_Overflow checks are enabled.
631
f5cb3a59 6322019-07-08 Hristian Kirtchev <kirtchev@adacore.com>
633
634 * bindo.adb: Update the section on terminology to include new
635 concepts. Update the section on switches to include new
636 entries.
637 * bindo.ads: Add type Precedence_Kind.
638 * bindo-builders.adb: Add with and use clauses for Debug and
639 Bindo.Validators. Add use clauses for
640 Bindo.Validators.Invocation_Graph_Validators and
641 Bindo.Validators.Library_Graph_Validators.
642 (Build_Invocation_Graph): Validate the graph immediately after
643 it was built.
644 (Build_Library_Graph): Update the parameter profile. The
645 creation of the graph is now elaboration model-agnostic.
646 Validate the graph immediately after it was built.
647 (Create_With_Edge): Create regular with edges for Elaborate and
648 Elaborate_All edges when the appropriate debug switches are in
649 effect.
650 * bindo-builders.ads (Build_Library_Graph): Update the parameter
651 profile.
652 * bindo-diagnostics.adb (Diagnose_Cycle): Track the presence of
653 an Elaborate_All edge throughout the inspection of the cycle's
654 edges.
655 (Output_Dynamic_Model_Suggestions): Output the suggestion only
656 when the cycle contains at least one weak edge where the
657 successor was statically elaborated.
658 (Output_Elaborate_Body_Transition, Output_Forced_Transition,
659 Output_With_Transition): Update the assertions.
660 * bindo-elaborators.adb: Remove use clauses for
661 Bindo.Validators.Invocation_Graph_Validators and
662 Bindo.Validators.Library_Graph_Validators. Remove strings
663 Add_To_All_Candidates_Msg and Add_To_Comp_Candidates_Msg.
664 Remove type String_Ptr.
665 (Add_Vertex, Add_Vertex_If_Elaborable, Create_All_Candidates_Set
666 Create_Component_Candidates_Set): Remove.
667 (Create_Component_Vertex_Sets, Create_Vertex_Sets): New routine.
668 (Elaborate_Component): Update the parameter profile and the
669 comment on usage. Reimplement the elaboration of a component.
670 The algorithm will now attempt to elaborate as many vertices
671 possible. If this is not possible, and a weakly elaborable
672 vertex is available use unit was compiled using the dynamic
673 model, the algorithm will elaborate it.
674 (Elaborate_Library_Graph): Reimplement the elaboration of the
675 graph. The algorithm will now attempt to elaborate as many
676 vertices along with their components as possible. If this is not
677 possible, and a weakly elaborable vertex is available use unit
678 was compiled using the dynamic model, the algorithm will
679 elaborate it along with its component.
680 (Elaborate_Units): Merge with the functionality of
681 Elaborate_Units_Common.
682 (Elaborate_Units_Common, Elaborate_Units_Dynamic,
683 Elaborate_Units_Static): Remove.
684 (Elaborate_Vertex): Update the parameter profile and the comment
685 on usage. Reimplemented.
686 (Find_Best_Candidate): Remove.
687 (Find_Best_Elaborable_Vertex, Find_Best_Vertex,
688 Find_Best_Weakly_Elaborable_Vertex, Has_Elaborable_Body,
689 Insert_Elaborable_Successor, Insert_Vertex): New routines.
690 (Is_Better_Candidate): Remove.
691 (Is_Better_Elaborable_Vertex,
692 Is_Better_Weakly_Elaborable_Vertex,
693 Is_Suitable_Elaborable_Vertex,
694 Is_Suitable_Weakly_Elaborable_Vertex): New routines.
695 (Trace_Candidate_Vertices): Remove.
696 (Trace_Component): Output the number of strong and weak
697 predecessors.
698 (Trace_Unelaborated_Vertices): Remove.
699 (Trace_Vertex): Output the number of strong and weak
700 predecessors.
701 (Trace_Vertices): New routine.
702 (Update_Successor, Update_Successors): Update the parameter
703 profile and the comment on usage.
704 * bindo-graphs.adb: Remove type Precedence_Kind.
705 (Add_Edge_With_Return): Update the increment of pending
706 predecessors.
707 (Add_Vertex): Provide default values for strong and weak
708 predecessors.
709 (Complementary_Vertex): Move the initial declaration to the
710 spec. Update the parameter profile and the comment on usage.
711 (Contains_Weak_Static_Successor): New routine.
712 (Create): Update the parameter profile. The creation of the
713 graph is now elaboration model-agnostic.
714 (Decrement_Pending_Predecessors): Update the parameter profile
715 and the comment on usage. Reimplemented.
716 (Delete_Edge): Update the decrement of pending predecesors.
717 (Has_Elaborate_Body): Do not treat a vertex as being subject to
718 Elaborate_Body when a debug switch is in effect.
719 (Increment_Pending_Predecessors): Update the parameter profile
720 and the comment on usage. Reimplemented.
721 (Is_Elaborable_Component): Reimplemented.
722 (Is_Elaborable_Vertex): Move the initial declaration to the
723 spec. Reimplemented.
724 (Is_Elaborate_Body_Pair): New routine.
725 (Is_Dynamically_Elaborated): Update the parameter profile.
726 Reimplemented.
727 (Is_Weakly_Elaborable_Vertex): New routine.
728 (Pending_Predecessors): Removed.
729 (Pending_Predecessors_For_Elaboration,
730 Pending_Strong_Predecessors, Pending_Weak_Predecessors,
731 Update_Pending_Predecessors): New routines.
732 (Update_Pending_Predecessors_Of_Components): Update the
733 increment of pending predecessors.
734 * bindo-graphs.ads: Update the components of type
735 Component_Attributes. Update the components of type
736 Library_Graph_Attributes. Update the components of type
737 Library_Graph_Vertex_Attributes. Update the initialization of
738 No_Component_Attributes. Update the initialization of
739 No_Library_Graph_Vertex_Attributes.
740 (Complementary_Vertex, Contains_Weak_Static_Successor): New
741 routines.
742 (Create): Update the parameter profile and the comment on usage.
743 (Decrement_Pending_Predecessors, Is_Dynamically_Elaborated):
744 Update the parameter profile and the comment on usage.
745 (Is_Elaborate_Body_Pair, Is_Weakly_Elaborable_Vertex): New
746 routines.
747 (Pending_Predecessors): Removed.
748 (Pending_Predecessors_For_Elaboration,
749 Pending_Strong_Predecessors, Pending_Weak_Predecessors): New
750 routines.
751 * bindo-writers.adb (Write_Components): Moved from the spec.
752 (Write_Component): Output the strong and weak predecessors.
753 (Write_Library_Graph): Output the components as part of the
754 graph.
755 (Write_Library_Graph_Vertex): Output the strong and weak
756 predecessors.
757 * bindo-writers.ads (Write_Components): Moved to the body.
758 * debug.adb: Add and document new GNATbind switches -d_a, -d_b,
759 -d_e.
760 * bindo-validators.adb: Minor reformattings.
761
7b8ca6b2 7622019-07-08 Bob Duff <duff@adacore.com>
763
764 * libgnat/g-sercom.ads, libgnat/g-sercom__linux.adb (Data_Rate):
765 Support additional data rates.
766
364c746f 7672019-07-08 Olivier Hainque <hainque@adacore.com>
768
769 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Don't request
770 DECL_ARTIFICIAL_P on elab proc declarations.
771
2dbfbbb2 7722019-07-08 Eric Botcazou <ebotcazou@adacore.com>
773
774 * repinfo.adb (List_Record_Info): Declare Incomplete_Layout and
775 Not_In_Extended_Main local exceptions.
776 (List_Structural_Record_Layout): For an extension, raise the
777 former if the parent subtype has not been built and the latter
778 if it is not declared in the main source unit. Fall back to the
779 flat layout if either exception has been raised.
780
3e05bbec 7812019-07-08 Ed Schonberg <schonberg@adacore.com>
782
783 * libgnat/a-strfix.adb (Delete): The RM describes the semantics
784 of Delete as equivalent to that of Replace_String with a null
785 argument. As a result, deleting a null string that starts past
786 the end of its argument is a noop and must not raise
787 Index_Error.
788
c98aac61 7892019-07-08 Javier Miranda <miranda@adacore.com>
790
791 * exp_disp.adb (Register_Primitive): When registering a
792 primitive in the secondary dispatch table, handle primitive
793 inherited through several levels of type derivation (required to
794 properly handle inherited 'null' primitive).
795
221b67b6 7962019-07-08 Bob Duff <duff@adacore.com>
797
798 * doc/gnat_ugn/gnat_utility_programs.rst: Document handling of
799 preprocessor directives in GNATpp.
800
aed4e06a 8012019-07-08 Javier Miranda <miranda@adacore.com>
802
803 * gnat1drv.adb (Post_Compilation_Validation_Checks:
804 Validate_Compile_Time_Warning_Errors is now located in sem_prag
805 (instead of sem_ch13).
806 * sem_ch13.ads (Validate_Compile_Time_Warning_Error,
807 Validate_Compile_Time_Warning_Errors): Move to sem_prag.
808 * sem_ch13.adb
809 (Compile_Time_Warnings_Errors): Move to sem_prag.
810 (Initialize): Remove initialization of table
811 Compile_Time_Warning_Errors.
812 (Validate_Compile_Time_Warning_Error,
813 Validate_Compile_Time_Warning_Errors): Move to sem_prag.
814 * sem_prag.ads (Validate_Compile_Time_Warning_Errors): New
815 procedure.
816 * sem_prag.adb (Initialize): Initialize table
817 Compile_Time_Warning_Errors.
818
b9bd5934 8192019-07-08 Ed Schonberg <schonberg@adacore.com>
820
821 * sem_ch13.adb (Analyze_Aspect_Specifications): For a
822 pre/postcondition of a generic subprogram declaration, do not
823 use Relocate_Node on the aspect expression to construct the
824 corresponding attribute specification, to prevent tree anomalies
825 when the expression is a call with named actual parameters.
826
63bb17d8 8272019-07-08 Javier Miranda <miranda@adacore.com>
828
829 * sem_attr.adb (Analyze_Attribute [Attribute_Size]): For pragmas
830 used to report user defined compile time warning or errors
831 handle 'Size for types with known static RM size.
832
1979cbfe 8332019-07-08 Justin Squirek <squirek@adacore.com>
834
835 * exp_imgv.adb (Build_Enumeration_Image_Tables): Default SSO for
836 the building of image tables.
837 (Expand_Image_Attribute): Minor cleanup.
838
bcb0a375 8392019-07-08 Dmitriy Anisimkov <anisimko@adacore.com>
840
841 * libgnat/g-socket.ads, libgnat/g-socket.adb: Improve
842 documentation.
843 (Get_Socket_Option, Set_Socket_Option): Remove default value for
844 the Level formal.
845
429822c1 8462019-07-08 Ed Schonberg <schonberg@adacore.com>
847
848 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): For an
849 unanalized aspect in a generic context that has not been
850 analyzed yet, if the aspect applies to a type, place the type on
851 the scope stack to make its components visible, before checking
852 conformance with the version of the expression analyzed at the
853 freeze point.
854
e1415398 8552019-07-05 Justin Squirek <squirek@adacore.com>
856
857 * checks.adb (Apply_Accessibility_Check): Add logic to fetch the
858 function result accessibility level if one is required within
859 the generated check.
860 * exp_ch6.adb (Needs_Result_Accessibility_Level): Modify
861 controlling elsif block to handle more cases such as anonymous
862 access results and disable checking for coextensions.
863
dad9e9f8 8642019-07-05 Ed Schonberg <schonberg@adacore.com>
865
866 * sem_ch9.adb (Analyze_Accept_Statement): If this is an illegal
867 accept statement for an enclosing entry abandon analysis to
868 prevent scope mismatches and potential infinite loops in
869 compiler.
870
627d0751 8712019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
872
873 * ali.adb (For_Each_Invocation_Construct,
874 For_Each_Invocation_Relation): New version.
875 (Scan_ALI): Initialize field Invocation_Graph_Encoding.
876 (Set_Invocation_Graph_Encoding): Update the setting of the
877 invocation graph encoding.
878 * ali.ads: Move field Invocation_Graph_Encoding from Unit_Record
879 to ALI_Record because the encoding applies to the whole ALI,
880 rather than one of the units (spec or body) for which the ALI
881 file was created.
882 (For_Each_Invocation_Construct, For_Each_Invocation_Relation):
883 New version.
884 * bindo.adb: Update the section on switches. Complete the
885 section of debugging elaboration order issues.
886 (Find_Elaboration_Order): Prepare the routine for the switch
887 from the old to the new elaboration order mechanism.
888 * bindo-diagnostics.adb (Find_And_Output_Invocation_Paths):
889 Manage a visited set used by Visit_Vertex.
890 (Output_All_Cycles_Suggestions,
891 Output_Dynamic_Model_Suggestions): Clarify the nature of the
892 suggested switch.
893 (Output_Elaborate_Body_Transition): Update the diagnostic to
894 emit a better message.
895 (Output_Forced_Suggestions, Output_Full_Encoding_Suggestions):
896 Clarify the nature of the suggested switch.
897 (Visit_Vertex): Update the parameter profile to add a set of
898 invokers visited during the transition. This set prevents
899 infinite exploration of the graph in case the invocations are
900 recursive.
901 * bindo-elaborators.adb: Add a use clause for
902 Bindo.Writers.Dependency_Writers.
903 (Elaborate_Units_Common): Output the library graph after it has
904 been augmented with invocation edges. Output just the components
905 instead of outputting the whole library graph again.
906 (Elaborate_Units_Dynamic, Elaborate_Units_Static): Output the
907 dependencies as expressed in the library graph.
908 * bindo-units.adb (Invocation_Graph_Encoding): Update the
909 extraction of the invocation graph encoding.
910 * bindo-writers.adb: Add with and use clauses for Binderr and
911 Butil.
912 (palgc, plgc): New debug routine.
913 (Write_Components): Moved to the spec. Add a header for the
914 output.
915 (Write_Dependencies, Write_Dependencies_Of_Vertex,
916 Write_Dependency_Edge): New routine.
917 (Write_Elaboration_Order): Update the logic to follow the format
918 of Binde's order output.
919 (Write_Library_Graph): Do not output the components every time
920 the graph is written.
921 (Write_Unit): Output the invocation graph encoding of the unit.
922 Output the invocation constructs and relations for the unit
923 only.
924 * bindo-writers.ads (Write_Components): Moved from the body.
925 (Write_Dependencies): New routine.
926 * bindusg.adb: Prepare the routine for the switch from the old
927 to the new elaboration order mechanism.
928 * debug.adb: Binder switch -d_O is now not associated with any
929 functionality.
930 * einfo.adb (Is_Elaboration_Target): The attribute applies to
931 packages, as specified by the comment on the attribute usage.
932 * opt.ads: Add a global flag which controls the choice between
933 the new and the legacy elaboration order mechanism.
934 * sem_elab.adb: Add Package_Target to type Target_Kind.
935 (Build_Elaborate_Body_Procedure, Build_Elaborate_Procedure,
936 Build_Elaborate_Spec_Procedure, Check_Elaboration_Scenarios,
937 Check_SPARK_Model_In_Effect): Use Main_Unit_Entity to obtain the
938 entity of the main unit.
939 (Create_Package_Rep): New routine.
940 (Create_Target_Rep): Add processing for packages.
941 (Declaration_Placement_Of_Node, Has_Prior_Elaboration): Use
942 Main_Unit_Entity to obtain the entity of the main
943 unit.
944 (Invocation_Graph_Recording_OK): Prepare the routine for the
945 switch from the old to the new elaboration order mechanism.
946 (Main_Unit_Entity): New routine.
947 (Meet_Elaboration_Requirement,
948 Process_Conditional_ABE_Variable_Reference): Use
949 Main_Unit_Entity to obtain the entity of the main unit.
950 (Process_Invocation_Instantiation): New routine.
951 (Process_Invocation_Scenario): Add processing for
952 instantiations.
953 * switch-b.adb (Scan_Binder_Switches): Prepare the routine for
954 the switch from the old to the new elaboration order mechanism.
955
30fb27b1 9562019-07-05 Joffrey Huguet <huguet@adacore.com>
957
958 * libgnat/a-textio.adb: Add abstract state refinment.
959 * libgnat/a-textio.ads: Add File_System abstract state. Add
960 global contracts, contract cases, preconditions and
961 postconditions to procedures and functions.
962 (Set_Input, Set_Output, Set_Error, Standard_Input,
963 Standard_Output, Standard_Error, Current_Input, Current_Output,
964 Current_Error): Turn SPARK_Mode off.
965 (Get_Line): Turn SPARK_Mode off on Get_Line functions.
966 * libgnat/a-tideio.ads, libgnat/a-tienio.ads,
967 libgnat/a-tifiio.ads, libgnat/a-tiflio.ads,
968 libgnat/a-tiinio.ads, libgnat/a-timoio.ads: Add global
969 contracts, contract cases, preconditions and postconditions to
970 procedures and functions.
971
ce99fc8a 9722019-07-05 Arnaud Charlet <charlet@adacore.com>
973
974 * doc/gnat_ugn/platform_specific_information.rst: Refresh doc on
975 installing from the command line on Windows. Remove obsolete
976 part.
977 * gnat_ugn.texi: Regenerate.
978
26ea5003 9792019-07-05 Vasiliy Fofanov <fofanov@adacore.com>
980
981 * libgnat/a-wichha.ads (Is_Alphanumeric): Replace comment with
982 the correct one. Also capitalize references to False
983 throughout.
984
c9c81835 9852019-07-05 Eric Botcazou <ebotcazou@adacore.com>
986
987 * exp_ch4.adb (Expand_N_Indexed_Component): Do not expand actual
988 parameters of function calls here either.
989
50948c8a 9902019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
991
992 * bindo-units.adb, checks.adb, exp_attr.adb, exp_ch3.adb,
993 exp_ch4.adb, exp_pakd.adb, lib-writ.adb, libgnat/g-traceb.adb,
994 libgnat/g-traceb.ads, libgnat/s-stratt.ads, sem_aux.ads,
995 sem_util.adb: Minor reformatting.
996
a9fa50ab 9972019-07-05 Ed Schonberg <schonberg@adacore.com>
998
999 * sem_ch13.adb (Build_Predicate_Functions): If a subtype that
1000 carries a static predicate aspect is frozen immediately after
1001 its declaration, ensure that the generated function body created
1002 for predicate checking is inserted after the corresponding
1003 subprogram declaration, which is created at the point the
1004 declaration is elaborated.
1005
ee4e1dd7 10062019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
1007
1008 * exp_ch7.adb (Cleanup_Record): Use the underlying type when
1009 checking for components with tasks.
1010
2028580f 10112019-07-05 Arnaud Charlet <charlet@adacore.com>
1012
1013 * libgnarl/s-osinte__linux.ads: Link with -lrt before -lpthread.
1014
ec1e481f 10152019-07-05 Ed Schonberg <schonberg@adacore.com>
1016
1017 * exp_pakd.adb (Expand_Bit_Packed_Element_Set): Add explicit
1018 range checks when the index type of the bit-packed array is an
1019 enumeration type with a non-standard representation,
1020
ae60396a 10212019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
1022
1023 * sem_res.adb (Is_Control_Flow_Statement): Delay statements
1024 contain an expression, which in turn may have side effects and
1025 affect the infinite recursion. As a result, delay statements
1026 should not be treated specially.
1027
d33025f2 10282019-07-05 Arnaud Charlet <charlet@adacore.com>
1029
1030 * libgnarl/s-linux.ads, libgnarl/s-linux__alpha.ads,
1031 libgnarl/s-linux__android.ads, libgnarl/s-linux__hppa.ads,
1032 libgnarl/s-linux__mips.ads, libgnarl/s-linux__riscv.ads,
1033 libgnarl/s-linux__sparc.ads: Fix typos in comments.
1034
51f2c7f9 10352019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
1036
1037 * sem_res.adb (Check_Infinite_Recursion): Reimplemented.
1038 (Enclosing_Declaration_Or_Statement,
1039 Invoked_With_Different_Arguments, Is_Conditional_Statement,
1040 Is_Control_Flow_Statement, Is_Immediately_Within_Body,
1041 Is_Raise_Idiom, Is_Raise_Statement, Is_Sole_Statement,
1042 Preceded_By_Control_Flow_Statement,
1043 Within_Conditional_Statement): New routines.
1044
0e6f6ee1 10452019-07-05 Javier Miranda <miranda@adacore.com>
1046
1047 * exp_ch4.adb (Expand_N_Type_Conversion): Do not apply an
1048 accessibility check when the conversion is an access to
1049 class-wide interface type and it is an actual parameter.
1050 * exp_ch6.adb (Expand_Call_Helper): Add documentation on the
1051 accessibility level of an anonymous allocator defining the value
1052 of an access parameter.
1053 * sem_util.ads, sem_util.adb (Dynamic_Accessibility_Level): Add
1054 support for an anonymous allocator whose type is that of a
1055 stand-alone object of an anonymous access to object type.
1056
f28a3d6c 10572019-07-05 Piotr Trojanek <trojanek@adacore.com>
1058
1059 * einfo.ads, sem_res.adb: Typo fixes in comments.
1060
2d8a0eb3 10612019-07-05 Bob Duff <duff@adacore.com>
1062
1063 * exp_ch6.adb (Is_Build_In_Place_Function): Narrow the check for
1064 Has_Foreign_Convention to the imported case only. If a
1065 build-in-place function is exported, and called from Ada code,
1066 build-in-place protocols should be used.
1067
6eddee84 10682019-07-05 Ed Schonberg <schonberg@adacore.com>
1069
1070 * sem_util.adb (Encloing_Subprogram): If Enclosing_Dynamic_Scope
1071 is a loop, continue climbing the scope stack to find the
1072 enclosing subprogram.
1073 (Gather_Components): Handle properly a choice in a record
1074 aggregate that is given by a subtype with a static predicate.
1075
249e38a7 10762019-07-05 Javier Miranda <miranda@adacore.com>
1077
1078 * debug.adb (-gnatd.K): Leave available this switch.
1079 * contracts.adb (Build_And_Analyze_Contract_Only_Subprograms):
1080 Remove.
1081 * scil_ll.ads, scil_ll.adb (Contract_Only_Body_Flag,
1082 Contract_Only_Body_Nodes, Get_Contract_Only_Body,
1083 Is_Contract_Only_Body, Set_Contract_Only_Body): Remove.
1084
33ae0c9f 10852019-07-05 Pierre-Marie de Rodat <derodat@adacore.com>
1086
1087 * libgnat/a-strunb.ads: Import documentation from the RM
1088
70f9c8aa 10892019-07-05 Pierre-Marie de Rodat <derodat@adacore.com>
1090
1091 * libgnat/a-strfix.ads: Import documentation from the RM
1092
1bc68ac2 10932019-07-05 Yannick Moy <moy@adacore.com>
1094
1095 * adabkend.adb (Scan_Back_End_Switches): Accept -Og and -Ofast
1096 switches.
1097
2500be2f 10982019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
1099
1100 * ali.adb: Relocate types Invocation_Construct_Record,
1101 Invocation_Relation_Record, and Invocation_Signature_Record to
1102 the body of ALI. Relocate tables Invocation_Constructs,
1103 Invocation_Relations, and Invocation_Signatures to the body of
1104 ALI. Remove type Body_Placement_Codes. Add new types
1105 Declaration_Placement_Codes, and
1106 Invocation_Graph_Encoding_Codes. Update the literals of type
1107 Invocation_Graph_Line_Codes.
1108 (Add_Invocation_Construct): Update the parameter profile. Add an
1109 invocation construct built from all attributes provided.
1110 (Add_Invocation_Relation): Update the parameter profile. Add an
1111 invocation relation built from all attributes provided.
1112 (Body_Placement): New routine.
1113 (Body_Placement_Kind_To_Code, Code_To_Body_Placement_Kind):
1114 Removed.
1115 (Code_To_Declaration_Placement_Kind,
1116 Code_To_Invocation_Graph_Encoding_Kind, Column,
1117 Declaration_Placement_Kind_To_Code, Extra,
1118 For_Each_Invocation_Construct, For_Each_Invocation_Relation,
1119 Invocation_Graph_Encoding,
1120 Invocation_Graph_Encoding_Kind_To_Code, Invoker, Kind, Line,
1121 Locations, Name): New routine.
1122 (Scan_Invocation_Construct_Line): Reimplement the scanning
1123 mechanism.
1124 (Scan_Invocation_Graph_Attributes_Line): New routine.
1125 (Scan_Invocation_Graph_Line): Use a case statement to dispatch.
1126 (Scan_Invocation_Relation_Line): Reimplement the scanning
1127 mechanism.
1128 (Scope): New routine.
1129 (Set_Invocation_Graph_Encoding, Signature, Spec_Placement,
1130 Target): New routine.
1131 * ali.ads: Add new type Invocation_Graph_Encoding_Kind. Add
1132 component Invocation_Graph_Encoding to type Unit_Record.
1133 Relocate various types and data structures to the body of ALI.
1134 (Add_Invocation_Construct, Add_Invocation_Relation): Update the
1135 parameter profile.
1136 (Body_Placement): New routine.
1137 (Body_Placement_Kind_To_Code, Code_To_Body_Placement_Kind):
1138 Removed.
1139 (Code_To_Declaration_Placement_Kind,
1140 Code_To_Invocation_Graph_Encoding_Kind, Column,
1141 Declaration_Placement_Kind_To_Code, Extra,
1142 For_Each_Invocation_Construct, For_Each_Invocation_Relation,
1143 Invocation_Graph_Encoding,
1144 Invocation_Graph_Encoding_Kind_To_Code, Invoker, Kind, Line,
1145 Locations, Name, Scope, Set_Invocation_Graph_Encoding,
1146 Signature, Spec_Placement, Target): New routine.
1147 * bindo.adb: Add with clause for Binde. Add with and use
1148 clauses for Debug. Update the documentation. Add new switches.
1149 (Find_Elaboration_Order): Dispatch to the proper elaboration
1150 mechanism.
1151 * bindo-augmentors.adb:
1152 Remove with and use clauses for GNAT and GNAT.Sets. Remove
1153 membership set VS. Update the parameter profiles of most
1154 routines to use better parameter names. Update the
1155 implementation of most routine to use the new parameter names.
1156 Remove various redundant assertions.
1157 * bindo-builders.adb: Use better names for instantiated data
1158 structures. Update all references to these names. Update the
1159 parameter profiles of most routines to use better parameter
1160 names. Update the implementation of most routine to use the new
1161 parameter names.
1162 (Build_Library_Graph): Update the parameter profile. Update the
1163 call to Create.
1164 (Create_Vertex): Reimplemented.
1165 (Declaration_Placement_Vertex): New routine.
1166 * bindo-builders.ads (Build_Library_Graph): Update the parameter
1167 profile and comment on usage.
1168 * bindo-diagnostics.adb: Almost a new unit.
1169 * bindo-diagnostics.ads: Add a use clause for
1170 Bindo.Graphs.Invocation_Graphs. Remove package
1171 Cycle_Diagnostics.
1172 (Diagnose_Circularities): New routine.
1173 * bindo-elaborators.adb: Remove the with and use clauses for
1174 Binderr and GNAT.Sets. Remove the use clause for
1175 Bindo.Diagnostics.Cycle_Diagnostics. Remove membership set VS.
1176 Update the parameter profiles of most routines to use better
1177 parameter names. Update the implementation of most routine to
1178 use the new parameter names. (Elaborate_Units_Common): Update
1179 the parameter profile. Pass an infication to the library graph
1180 builder whether the dynamic model is in effect.
1181 (Elaborate_Units_Dynamic, Elaborate_Units_Static): Use
1182 Diagnose_Circularities to provide diagnostics.
1183 (Update_Successor): Use routine In_Same_Component to determine
1184 whether the predecessor and successor reside in different
1185 components.
1186 * bindo-graphs.adb: Add with and use clauses for Butil, Debug,
1187 Output, and Bindo.Writers. Remove with and use clauses for
1188 GNAT.Lists. Update the parameter profiles of most routines to
1189 use better parameter names. Update the implementation of most
1190 routine to use the new parameter names. Remove various
1191 redundant assertions. Remove doubly linked list EL. Add new
1192 type Precedence_Kind.
1193 (Add_Cycle): New routine.
1194 (Add_Vertex): Update the parameter profile. Update the creation
1195 of vertex attributes.
1196 (Add_Vertex_And_Complement, Body_Vertex, Column,
1197 Complementary_Vertex, Copy_Cycle_Path, Cycle_Kind_Of): New
1198 routines.
1199 (Destroy_Invocation_Graph_Edge, Destroy_Library_Graph_Cycle,
1200 Destroy_Library_Graph_Edge, Extra, File_Name,
1201 Find_All_Cycles_Through_Vertex, Find_All_Cycles_With_Edge,
1202 Find_Cycles, Find_First_Lower_Precedence_Cycle,
1203 Get_LGC_Attributes, Has_Next, Hash_Library_Graph_Cycle,
1204 Hash_Library_Graph_Cycle_Attributes, Highest_Precedence_Cycle,
1205 Highest_Precedence_Edge, In_Same_Component, Insert_And_Sort,
1206 Invocation_Edge_Count, Invocation_Graph_Encoding,
1207 Is_Cycle_Initiating_Edge, Is_Cyclic_Edge,
1208 Is_Cyclic_Elaborate_All_Edge, Is_Cyclic_Elaborate_Body_Edge,
1209 Is_Cyclic_Elaborate_Edge, Is_Cyclic_Forced_Edge,
1210 Is_Cyclic_Invocation_Edge, Is_Cyclic_With_Edge,
1211 Is_Dynamically_Elaborated, Is_Elaborate_All_Edge,
1212 Is_Elaborate_Body_Edge, Is_Elaborate_Edge: New routines.
1213 (Is_Existing_Predecessor_Successor_Relation): Removed.
1214 (Is_Forced_Edge, Is_Invocation_Edge, Is_Recorded_Cycle,
1215 Is_Recorded_Edge, Is_With_Edge, Iterate_Edges_Of_Cycle, Kind,
1216 Length): New routine.
1217 (Lib_Vertex): Removed.
1218 (Line, Links_Vertices_In_Same_Component,
1219 Maximum_Invocation_Edge_Count, Next, Normalize_And_Add_Cycle,
1220 Normalize_Cycle_Path, Number_Of_Cycles, Path, Precedence,
1221 Remove_Vertex_And_Complement, Sequence_Next_Cycle): New routines.
1222 (Sequence_Next_IGE_Id): Renamed to Sequence_Next_Edge.
1223 (Sequence_Next_IGV_Id): Renamed to Sequence_Next_Vertex.
1224 (Sequence_Next_LGE_Id): Renamed to Sequence_Next_Edge.
1225 (Sequence_Next_LGV_Id): Renamed to Sequence_Next_Vertex.
1226 (Set_Is_Existing_Predecessor_Successor_Relation): Removed.
1227 (Set_Is_Recorded_Cycle, Set_Is_Recorded_Edge,
1228 Set_LGC_Attributes, Spec_Vertex, Trace_Cycle, Trace_Edge,
1229 Trace_Eol, Trace_Vertex): New routines.
1230 * bindo-graphs.ads: Add with and use clauses for Types and
1231 GNAT.Lists. Update the parameter profiles of most routines to
1232 use better parameter names. Update the implementation of most
1233 routine to use the new parameter names. Add the new
1234 instantiated data structures IGE_Lists, IGV_Sets, LGC_Lists,
1235 LGE_Lists, LGE_Sets, LGV_Sets, and RC_Sets. Add new type
1236 Library_Graph_Cycle_Id along with an empty and initial value.
1237 Remove component Lib_Vertex and add new components Body_Vertex
1238 and Spec_Vertex to type Invocation_Graph_Vertex_Attributes. Add
1239 new type Library_Graph_Cycle_Kind. Add new iterators
1240 All_Cycle_Iterator and Edges_Of_Cycle_Iterator. Add new type
1241 Library_Graph_Cycle_Attributes. Add new components
1242 Cycle_Attributes, Cycles, and Dynamically_Elaborated to type
1243 Library_Graph_Attributes.
1244 (Body_Vertex, Column, Destroy_Invocation_Graph_Edge,
1245 Destroy_Library_Graph_Cycle_Attributes,
1246 Destroy_Library_Graph_Edge, Extra, File_Name, Find_Cycles,
1247 Has_Elaborate_All_Cycle, Has_Next, Hash_Library_Graph_Cycle,
1248 Hash_Library_Graph_Cycle_Attributes, Highest_Precedence_Cycle,
1249 In_Same_Component, Invocation_Edge_Count,
1250 Invocation_Graph_Encoding, Is_Dynamically_Elaborated,
1251 Is_Elaborate_All_Edge, Is_Elaborate_Body_Edge,
1252 Is_Elaborate_Edge, Is_Forced_Edge, Is_Invocation_Edge,
1253 Is_With_Edge, Iterate_All_Cycles, Iterate_Edges_Of_Cycle, Kind):
1254 New routines.
1255 (Length, Lib_Vertex, (Line, Next, Number_Of_Cycles, Present,
1256 Same_Library_Graph_Cycle_Attributes, Spec_Vertex): New routines.
1257 * bindo-units.adb (File_Name, Invocation_Graph_Encoding): New
1258 routines.
1259 * bindo-units.ads: Add new instantiated data structure
1260 Unit_Sets.
1261 (File_Name, Invocation_Graph_Encoding): New routine.
1262 * bindo-validators.adb: Remove with and use clauses for GNAT and
1263 GNAT.Sets. Remove membership set US. Update the parameter
1264 profiles of most routines to use better parameter names. Update
1265 the implementation of most routine to use the new parameter
1266 names.
1267 (Validate_Cycle, Validate_Cycle_Path, Validate_Cycles,
1268 Validate_Invocation_Graph_Vertex): Remove the validation of
1269 component Lib_Vertex. Add the validation of components
1270 Body_Vertex and Spec_Vertex.
1271 (Write_Error): New routine.
1272 * bindo-validators.ads (Validate_Cycles): New routine.
1273 * bindo-writers.adb: Update the parameter profiles of most
1274 routines to use better parameter names. Update the
1275 implementation of most routine to use the new parameter names.
1276 (Write_Cycle, Write_Cyclic_Edge, Write_Cycles): New routines.
1277 (Write_Invocation_Graph_Vertex): Remove the output of component
1278 Lib_Vertex. Add the output of components Body_Vertex and
1279 Spec_Vertex.
1280 * bindo-writers.ads (Write_Cycles): New routine.
1281 * debug.adb: Use binder switches -d_C and -d_P, add
1282 documentation on their usage.
1283 * gnatbind.adb: Remove with and use clauses for Binde. Delegate
1284 the choice of elaboration mechanism to Bindo.
1285 * lib-writ.adb (Column, Extra, Invoker, Kind, Line, Locations,
1286 Name, Placement, Scope, Signature, Target): Removed.
1287 (Write_Invocation_Graph): Moved at the top level.
1288 (Write_Invocation_Graph_Attributes): New routine.
1289 (Write_Invocation_Relation, Write_Invocation_Signature): Moved
1290 at the top level.
1291 * lib-writ.ads: Add a documentation section on invocation graph
1292 attributes.
1293 * sem_elab.adb (Body_Placement_Of): New routine.
1294 (Declare_Invocation_Construct): Update the call to
1295 Add_Invocation_Construct.
1296 (Declaration_Placement_Of_Node): New routine.
1297 (Get_Invocation_Attributes): Correct the retrieval of the
1298 enclosing subprogram where the postcondition procedure lives.
1299 (Placement_Of, Placement_Of_Node): Removed.
1300 (Record_Invocation_Graph): Record the encoding format used.
1301 (Record_Invocation_Graph_Encoding): New routine.
1302 (Record_Invocation_Relation): Update the call to
1303 Add_Invocation_Relation.
1304 (Spec_Placement_Of): Removed.
1305 * libgnat/g-lists.ads, libgnat/g-lists.adb (Equal): New routine.
1306
164597c5 13072019-07-05 Ed Schonberg <schonberg@adacore.com>
1308
1309 * checks.adb (Apply_Predicate_Check): Except within the
1310 subprogram body that defines the formal, do not apply predicate
1311 check on a formal IN parameter: such a check is redundant and
1312 its expansion can lead to out-of-scope references when it is
1313 originates in a function call in a precondition,
1314
572a4bc5 13152019-07-05 Yannick Moy <moy@adacore.com>
1316
1317 * sem_res.adb (Resolve_Call): Cannot inline in quantified
1318 expressions.
1319 * sem_util.adb, sem_util.ads (In_Quantified_Expression): New
1320 function.
1321
2c3ad474 13222019-07-05 Bob Duff <duff@adacore.com>
1323
1324 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
1325 Fix typo.
1326 * gnat_rm.texi: Regenerate.
1327
2f67af4c 13282019-07-05 Bob Duff <duff@adacore.com>
1329
1330 * exp_attr.adb (Input): Take the No_Stream_Optimizations
1331 restriction into account.
1332
1cb1fd0f 13332019-07-05 Claire Dross <dross@adacore.com>
1334
1335 * libgnat/a-cofove.ads, libgnat/a-cofove.adb: Definite formal
1336 vectors are now always bounded so that they do not need to be
1337 limited anymore.
1338
d2d09f3e 13392019-07-05 Dmitriy Anisimkov <anisimko@adacore.com>
1340
1341 * libgnat/g-traceb.ads, libgnat/g-traceb.adb (Call_Chain): New
1342 function.
1343
14e0bfed 13442019-07-04 James Clarke <jrtc27@debian.org>
1345
1346 * libgnarl/s-osinte__kfreebsd-gnu.ads (clockid_t): Make type
1347 definition public.
1348 (CLOCK_REALTIME): Make value public.
1349
ecd07d3b 13502019-07-04 Javier Miranda <miranda@adacore.com>
1351
1352 * exp_tss.adb (Init_Proc): Adding missing support for access to
1353 subprograms and access to protected subprograms of non-default
1354 C++ constructors.
1355
e0ff1639 13562019-07-04 Eric Botcazou <ebotcazou@adacore.com>
1357
1358 * gnat1drv.adb (Adjust_Global_Switches): Use proper interface to
1359 set the validity settings in CodePeer mode.
1360 * par-load.adb (Load): Remove all code dealing with validity
1361 settings.
1362 * validsw.ads (Validity_Check_Copies): Alphabetize.
1363 * validsw.adb (Reset_Validity_Check_Options): Set all options to
1364 off.
1365 (Save_Validity_Check_Options): Save all options.
1366
40bff3a0 13672019-07-04 Hristian Kirtchev <kirtchev@adacore.com>
1368
1369 * exp_ch3.adb, exp_ch4.adb, exp_ch4.ads, exp_ch5.adb,
1370 exp_ch7.adb, exp_ch9.adb, exp_ch11.adb, exp_unst.adb,
1371 rtsfind.ads, sem_attr.adb, sem_ch10.adb, sem_ch12.adb,
1372 sem_ch13.adb, sem_dim.adb, sem_disp.adb, xref_lib.adb: Minor
1373 reformatting.
1374
0ebaade4 13752019-07-04 Joffrey Huguet <huguet@adacore.com>
1376
1377 * libgnarl/a-taside.ads: Add assertion policy to ignore
1378 preconditions.
1379 (Abort_Task, Is_Terminated, Is_Callable): Add preconditions.
1380
f14a590b 13812019-07-04 Eric Botcazou <ebotcazou@adacore.com>
1382
1383 * doc/gnat_rm/implementation_defined_pragmas.rst: Fix
1384 capitalization and parenthesis glitches.
1385 * gnat_rm.texi: Regenerate.
1386
f5388f99 13872019-07-04 Ed Schonberg <schonberg@adacore.com>
1388
1389 * sem_ch10.adb (Remove_Context_Clauses): Handle properly the
1390 removal of a limited_with_clause which appears in the library
1391 unit oF the main unit, when some other unit in the context has a
1392 regular with_clause on the same unit, to prevent spurious
1393 visibility errors in the subsequent analysis of pending instance
1394 bodies.
1395
c930bc82 13962019-07-04 Hristian Kirtchev <kirtchev@adacore.com>
1397
1398 * sem_elab.adb: Add new type Elaboration_Phase_Status along with
1399 a global to keep track of the elaboration phase status.
1400 Initialize all internal data structures to Nil for services
1401 Elaborated_Units, Internal_Representation, and Scenario_Storage.
1402 (Build_Call_Marker): Do not create a call marker when the
1403 elaboration phase is not active.
1404 (Build_Variable_Reference_Marker): Do not create a call marker
1405 when the elaboration phase is not active.
1406 (Check_Elaboration_Scenarios): Destroy all internal structures
1407 when the elaboration phase does not have to run. Do not execute
1408 when the elaboration phase is not active.
1409 (Elaboration_Phase_Active): New routine.
1410 (Finalize_All_Data_Structures): New routine.
1411 (Initialize): Initialize all internal data structures and signal
1412 that the elaboration phase has started.
1413 (Initialize_All_Data_Structures): New routine.
1414 (Initialize_Elaborated_Units): Initialize all internal data
1415 structures.
1416 (Initialize_Internal_Representation): Initialize all internal
1417 data structures.
1418 (Initialize_Scenario_Storage): Initialize all internal data
1419 structures.
1420 (Kill_Elaboration_Scenario): Do not execute when the elaboration
1421 phase is not active.
1422 (Set_Elaboration_Phase): New routine.
1423 (Update_Elaboration_Scenario): Do not execute when the
1424 elaboration phase is not active.
1425
39dec7f4 14262019-07-04 Gary Dismukes <dismukes@adacore.com>
1427
1428 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The special
1429 treatment of calling Mask_Unfrozen_Types must also be done in
1430 the case of an Ignored_Ghost_Entity, because Expander_Active is
1431 False in that case.
1432
92b004be 14332019-07-04 Yannick Moy <moy@adacore.com>
1434
1435 * sem_prag.adb (Check_Library_Level_Entity): Update for new rule
1436 on SPARK_Mode.
1437
12795e1c 14382019-07-04 Justin Squirek <squirek@adacore.com>
1439
1440 * sem_disp.adb (Check_Controlling_Formals): Obtain the full view
1441 before type comparison.
1442
63fe3141 14432019-07-04 Ed Schonberg <schonberg@adacore.com>
1444
1445 * exp_ch4.ads, exp_ch4.adb (Build_Eq_Call): New visible
1446 subprogram, extracted from Expand_Composite_Equality, to handle
1447 properly the composition of equality for variant record types.
1448 * exp_ch3.adb (MAke_Eq_If): Use Build_Eq_Call for each
1449 component, to handle properly the case of a component with a
1450 user-defined equality. Revert to predefined equality if the
1451 user-defined operation is abstract, to maintain compatibility
1452 with older versions,
1453
17fa952a 14542019-07-04 Justin Squirek <squirek@adacore.com>
1455
1456 * exp_ch3.adb (Build_Initialization_Call): Fixup
1457 *_skip_null_excluding_check argument to handle new default.
1458 (Init_Formals): Make *_skip_null_excluding_check formal default
1459 to False
1460 * exp_ch4.adb (Expand_N_Allocator): Add comment to note heavy
1461 code duplication
1462
cf32543d 14632019-07-04 Bob Duff <duff@adacore.com>
1464
1465 * sem_ch3.adb (Access_Definition): Do not create a master unless
1466 Tasking_Allowed. Otherwise, this fails on restricted runtimes.
1467
eb4dbf20 14682019-07-04 Hristian Kirtchev <kirtchev@adacore.com>
1469
1470 * sem_util.adb (Propagate_DIC_Attributes): Do not propagate the
1471 Default_Initial_Condition attributes to an incomplete type.
1472
25ddc6ba 14732019-07-04 Ed Schonberg <schonberg@adacore.com>
1474
1475 * sem_attr.adb (Check_Array_Type): An array type attribute such
1476 as 'First can be applied to an unconstrained array tyope when
1477 the attribute reference appears within an aspect specification
1478 and the prefix is a current instance, given that the prefix of
1479 the attribute will become a formal of the subprogram that
1480 implements the aspect (typically a predicate check).
1481
74a5962a 14822019-07-04 Piotr Trojanek <trojanek@adacore.com>
1483
1484 * sem_util.adb (Yields_Synchronized_Object): Fix typos in
1485 comments.
1486
c65d33a8 14872019-07-04 Yannick Moy <moy@adacore.com>
1488
1489 * sem_util.adb (Yields_Synchronized_Object): Adapt to new SPARK
1490 rule.
1491
afd77d39 14922019-07-04 Yannick Moy <moy@adacore.com>
1493
1494 * sem_spark.adb (Check_Statement): Only check permission of
1495 object in extended return when it is of a deep type.
1496
2281b807 14972019-07-04 Justin Squirek <squirek@adacore.com>
1498
1499 * sem_ch12.adb (Perform_Appropriate_Analysis): Added for
1500 selecting which type of analysis based on wheither the
1501 instantiation is a generic at the library-level. In which case
1502 expansion during analysis.
1503 (Preanalyze_Actuals): Modify calls to Analyze to use the new
1504 routine.
1505
542b3e26 15062019-07-04 Ed Schonberg <schonberg@adacore.com>
1507
1508 * exp_unst.adb: Handle conditional expressions.
1509
7754aad4 15102019-07-04 Yannick Moy <moy@adacore.com>
1511
1512 * sem_spark.adb (Check_Package_Spec, Check_Package_Body): Only
1513 analyze parts of the code marked in SPARK.
1514
3843c1bd 15152019-07-04 Hristian Kirtchev <kirtchev@adacore.com>
1516
1517 * erroutc.adb, exp_aggr.adb, inline.adb, opt.adb, sem_ch3.adb:
1518 Minor reformatting.
1519
5bc0f990 15202019-07-04 Yannick Moy <moy@adacore.com>
1521
1522 * sem_spark.adb (Explanation, Get_Expl): New functions to get
1523 the explanation for a permission mismatch.
1524 (Perm_Error, Perm_Mismatch, Perm_Error_Loop_Exit): Take
1525 explanation into account for issuing a more precise error
1526 message.
1527 (Set_Perm_Prefixes, Set_Perm_Extensions,
1528 Set_Perm_Extensions_Move): Pass suitable argument for the
1529 explanation node.
1530
11903e68 15312019-07-04 Arnaud Charlet <charlet@adacore.com>
1532
1533 * exp_aggr.adb (In_Place_Assign_OK): Moved to top level and add
1534 support for record aggregates.
1535 (Component_Check): Use Is_CCG_Supported_Aggregate instead of a
1536 similar local predicate.
1537 (Convert_To_Assignments): Take advantage of In_Place_Assign_OK
1538 predicate when possible.
1539 (Is_CCG_Supported_Aggregate): Return False for records with
1540 representation clauses and fix the logic for dealing with nested
1541 aggregates.
1542
b0c19ea3 15432019-07-04 Piotr Trojanek <trojanek@adacore.com>
1544
1545 * opt.adb (Set_Config_Switches): Keep assertions policy as
1546 enabled when analysing internal units in GNATprove mode.
1547
90f2b146 15482019-07-04 Arnaud Charlet <charlet@adacore.com>
1549
1550 * exp_ch4.adb (Expand_Short_Circuit_Operator): Strip
1551 N_Variable_Reference_Marker when checking for the presence of
1552 actions.
1553
39ecad34 15542019-07-04 Arnaud Charlet <charlet@adacore.com>
1555
1556 * exp_aggr.adb (Check_Component): Take into account type
1557 conversions.
1558
c0e899f1 15592019-07-04 Dmitriy Anisimkov <anisimko@adacore.com>
1560
1561 * doc/gnat_ugn/platform_specific_information.rst: Document
1562 Windows socket timeout particularity.
1563 * gnat_ugn.texi: Regenerate.
1564 * gsocket.h: Include versionhelpers.h.
1565 * socket.c (__gnat_minus_500ms): New function.
1566 * libgnat/g-sothco.ads (Minus_500ms_Windows_Timeout): New
1567 imported function.
1568 * libgnat/g-socket.adb (Set_Socket_Option): Refactor to remove
1569 500ms from the requested timeout only on old Windows version.
1570
363b1a8e 15712019-07-04 Thomas Quinot <quinot@adacore.com>
1572
1573 * get_scos.adb: Remove bogus, dead code.
1574
4ae0a9ce 15752019-07-04 Ed Schonberg <schonberg@adacore.com>
1576
1577 * sem_dim.adb (Analyze_Dimension_Array_Aggregate): If the
1578 component is an entity name, its dimensions are those of its
1579 type.
1580
d60fa3c9 15812019-07-03 Bob Duff <duff@adacore.com>
1582
1583 * doc/gnat_ugn/gnat_utility_programs.rst: Document new flags in
1584 GNATpp.
1585
877ad320 15862019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
1587
1588 * binde.adb: Remove with clause for System.OS_Lib.
1589 (Force_Elab_Order): Refactor the majority of the code in Butil.
1590 Use the new forced units iterator to obtain unit names.
1591 * bindo-builders.adb: Add with and use clauses for Binderr,
1592 Butil, Opt, Output, Types, GNAT, and GNAT.Dynamic_HTables. Add
1593 a hash table which maps units to line number in the forced
1594 elaboration order file.
1595 (Add_Unit): New routine.
1596 (Build_Library_Graph): Create forced edges between pairs of
1597 units listed in the forced elaboration order file.
1598 (Create_Forced_Edge, Create_Forced_Edges, Destroy_Line_Number,
1599 Duplicate_Unit_Error, Hash_Unit, Internal_Unit_Info,
1600 Is_Duplicate_Unit, Missing_Unit_Info): New routines.
1601 * bindo-graphs.adb (Is_Internal_Unit, Is_Predefined_Unit):
1602 Refactor some of the behavior to Bindo-Units.
1603 * bindo-graphs.ads: Enable the enumeration literal for forced
1604 edges.
1605 * bindo-units.adb, bindo-units.ads (Is_Internal_Unit,
1606 Is_Predefined_Unit): New routines.
1607 * butil.adb: Add with and use clauses for Opt, GNAT, and
1608 System.OS_Lib. Add with clause for Unchecked_Deallocation.
1609 (Has_Next, Iterate_Forced_Units, Next, Parse_Next_Unit_Name,
1610 Read_Forced_Elab_Order_File): New routines.
1611 * butil.ads: Add with and use clauses for Types. Add new
1612 iterator over the units listed in the forced elaboration order
1613 file.
1614 (Has_Next, Iterate_Forced_Units, Next): New routine.
1615 * namet.adb, namet.ads (Present): New routine.
1616
01e6eb2f 16172019-07-03 Bob Duff <duff@adacore.com>
1618
1619 * sem_ch3.adb (Access_Definition): The code was creating a
1620 master in the case where the designated type is a class-wide
1621 interface type. Create a master in the noninterface case as
1622 well. That is, create a master for all limited class-wide types.
1623
9ad42832 16242019-07-03 Yannick Moy <moy@adacore.com>
1625
1626 * erroutc.adb (Sloc_In_Range): New function to determine whether
1627 the range of a pragma Warnings covers a location, taking
1628 instantiations into account.
1629
f2a8d64e 16302019-07-03 Johannes Kanig <kanig@adacore.com>
1631
1632 * osint.ads, osint.adb (Get_First_Main_File_Name): New routine
1633 to access the first file provided on the command line.
1634
d4f28933 16352019-07-03 Ed Schonberg <schonberg@adacore.com>
1636
1637 * inline.adb (Process_Formals_In_Aspects): New procedure within
1638 Expand_Inlined_Call, to perform a replacement of references to
1639 formals that appear in aspect specifications within the body
1640 being inlined.
1641
23e7fc9b 16422019-07-03 Justin Squirek <squirek@adacore.com>
1643
1644 * sem_ch8.adb (Analyze_Object_Renaming): Add call to search for
1645 the appropriate actual subtype of the object renaming being
1646 analyzed.
1647 (Check_Constrained_Object): Minor cleanup.
1648
f8e6d133 16492019-07-03 Yannick Moy <moy@adacore.com>
1650
1651 * sem_spark.adb (Get_Observed_Or_Borrowed_Expr): New function to
1652 return go through traversal function call.
1653 (Check_Type): Consistently use underlying type.
1654 (Get_Perm): Adapt for case of elaboration code where variables
1655 are not declared in the environment. Remove incorrect handling
1656 of borrow and observe.
1657
d044ba5c 16582019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
1659
1660 * inline.adb (Build_Return_Object_Formal): New routine.
1661 (Can_Split_Unconstrained_Function): Code clean up.
1662 (Copy_Formals,Copy_Return_Object): New routines.
1663 (Split_Unconstrained_Function): Code clean up and refactoring.
1664
8699de72 16652019-07-03 Gary Dismukes <dismukes@adacore.com>
1666
1667 * bindo-augmentors.adb, bindo-augmentors.ads,
1668 bindo-builders.ads, bindo-elaborators.adb, sem_ch12.adb,
1669 sem_ch13.adb, sem_spark.adb, sinfo.ads: Minor editorial
1670 corrections and reformatting.
1671
2ccf6539 16722019-07-03 Bob Duff <duff@adacore.com>
1673
1674 * sem_warn.adb (Check_Infinite_Loop_Warning): Avoid the warning
1675 if an Iterator_Specification is present.
1676
17b5260d 16772019-07-03 Bob Duff <duff@adacore.com>
1678
1679 * doc/gnat_ugn/gnat_utility_programs.rst: Document default
1680 new-line behavior.
1681
5f71d12c 16822019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
1683
1684 * ali.adb: Add with and use clauses for GNAT,
1685 GNAT.Dynamic_HTables, and Snames. Add a map from invocation
1686 signature records to invocation signature ids. Add various
1687 encodings of invocation-related attributes. Sort and update
1688 table Known_ALI_Lines.
1689 (Add_Invocation_Construct, Add_Invocation_Relation,
1690 Body_Placement_Kind_To_Code, Code_To_Body_Placement_Kind,
1691 Code_To_Invocation_Construct_Kind, Code_To_Invocation_Kind,
1692 Code_To_Invocation_Graph_Line_Kind, Destroy, Hash): New
1693 routines.
1694 (Initialize_ALI): Sort the initialization sequence. Add
1695 initialization for all invocation-related tables.
1696 (Invocation_Construct_Kind_To_Code,
1697 Invocation_Graph_Line_Kind_To_Code, Invocation_Kind_To_Code,
1698 Invocation_Signature_Of, Present): New routines.
1699 (Scan_ALI): Add the default values for invocation-related ids.
1700 Scan invocation graph lines.
1701 (Scan_Invocation_Graph_Line): New routine.
1702 * ali.ads: Add with clause for GNAT.Dynamic_Tables. Add types
1703 for invocation constructs, relations, and signatures. Add
1704 tables for invocation constructs, relations, and signatures.
1705 Update Unit_Record to capture invocation-related ids. Relocate
1706 table Unit_Id_Tables and subtypes Unit_Id_Table, Unit_Id_Array
1707 from Binde.
1708 (Add_Invocation_Construct, Add_Invocation_Relation,
1709 Body_Placement_Kind_To_Code, Code_To_Body_Placement_Kind,
1710 Code_To_Invocation_Construct_Kind, Code_To_Invocation_Kind,
1711 Code_To_Invocation_Graph_Line_Kind,
1712 Invocation_Construct_Kind_To_Code,
1713 Invocation_Graph_Line_Kind_To_Code, Invocation_Kind_To_Code,
1714 Invocation_Signature_Of, Present): New routines.
1715 * binde.adb: Add with and use clause for Types. Add use clause
1716 for ALI.Unit_Id_Tables;
1717 * binde.ads: Relocate table Unit_Id_Tables and subtypes
1718 Unit_Id_Table, Unit_Id_Array to ALI.
1719 * bindgen.adb: Remove with and use clause for ALI.
1720 * bindgen.ads: Remove with and use clause for Binde. Add with
1721 and use clause for ALI.
1722 * bindo.adb, bindo.ads, bindo-augmentors.adb,
1723 bindo-augmentors.ads, bindo-builders.adb, bindo-builders.ads,
1724 bindo-diagnostics.adb, bindo-diagnostics.ads,
1725 bindo-elaborators.adb, bindo-elaborators.ads, bindo-graphs.adb,
1726 bindo-graphs.ads, bindo-units.adb, bindo-units.ads,
1727 bindo-validators.adb, bindo-validators.ads, bindo-writers.adb,
1728 bindo-writers.ads: New units.
1729 * debug.adb: Use and describe GNAT debug switches -gnatd_F and
1730 -gnatd_G. Add GNATbind debug switches in the ranges dA .. dZ,
1731 d.a .. d.z, d.A .. d.Z, d.1 .. d.9, d_a .. d_z, d_A .. d_Z, and
1732 d_1 .. d_9. Use and describe GNATbind debug switches -d_A,
1733 -d_I, -d_L, -d_N, -d_O, -d_T, and -d_V.
1734 * exp_util.adb, exp_util.ads (Exceptions_OK): Relocate to
1735 Sem_Util.
1736 * gnatbind.adb: Add with and use clause for Bindo. Use the new
1737 Bindo elaboration order only when -d_N is in effect.
1738 * lib-writ.adb
1739 (Column, Extra, Invoker, Kind, Line, Locations, Name, Placement,
1740 Scope, Signature, Target): New routines.
1741 (Write_ALI): Output all invocation-related data.
1742 (Write_Invocation_Graph): New routine.
1743 * lib-writ.ads: Document the invocation graph ALI line.
1744 * namet.adb, namet.ads (Present): New routines.
1745 * sem_ch8.adb (Find_Direct_Name): Capture the status of
1746 elaboration checks and warnings of an identifier.
1747 (Find_Expanded_Name): Capture the status of elaboration checks
1748 and warnings of an expanded name.
1749 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Ensure
1750 that invocation graph-related data within the body of the main
1751 unit is encoded in the ALI file.
1752 (Analyze_Generic_Subprogram_Declaration): Ensure that invocation
1753 graph-related data within the body of the main unit is encoded
1754 in the ALI file.
1755 (Analyze_Package_Instantiation): Perform minimal decoration of
1756 the instance entity.
1757 (Analyze_Subprogram_Instantiation): Perform minimal decoration
1758 of the instance entity.
1759 * sem_elab.adb: Perform heavy refactoring of all code. The unit
1760 is now split into "services" which specialize in one area of ABE
1761 checks. Add processing in order to capture invocation-graph
1762 related attributes of the main unit, and encode them in the ALI
1763 file. The Processing phase can now operate in multiple modes,
1764 all described by type Processing_Kind. Scenarios and targets
1765 are now distinct at the higher level, and carry their own
1766 representations. This eliminates the need to constantly
1767 recompute their attributes, and offers the various processors a
1768 uniform interface. The various initial states of the Processing
1769 phase are now encoded using type Processing_In_State, and
1770 xxx_State constants.
1771 * sem_elab.ads: Update the literals of type
1772 Enclosing_Level_Kind. Add Inline pragmas on several routines.
1773 * sem_prag.adb (Process_Inline): Ensure that invocation
1774 graph-related data within the body of the main unit is encoded
1775 in the ALI file.
1776 * sem_util.adb (Enclosing_Generic_Body, Enclosing_Generic_Unit):
1777 Code clean up.
1778 (Exceptions_OK): Relocated from Sem_Util.
1779 (Mark_Save_Invocation_Graph_Of_Body): New routine.
1780 * sem_util.ads (Exceptions_OK): Relocated from Sem_Util.
1781 (Mark_Save_Invocation_Graph_Of_Body): New routine.
1782 * sinfo.adb (Is_Elaboration_Checks_OK_Node): Now applicable to
1783 N_Variable_Reference_Marker.
1784 (Is_Elaboration_Warnings_OK_Node): Now applicable to
1785 N_Expanded_Name, N_Identifier, N_Variable_Reference_Marker.
1786 (Is_Read): Use Flag4.
1787 (Is_SPARK_Mode_On_Node): New applicable to
1788 N_Variable_Reference_Marker.
1789 (Is_Write): Use Flag5.
1790 (Save_Invocation_Graph_Of_Body): New routine.
1791 (Set_Is_Elaboration_Checks_OK_Node): Now applicable to
1792 N_Variable_Reference_Marker.
1793 (Set_Is_Elaboration_Warnings_OK_Node): Now applicable to
1794 N_Expanded_Name, N_Identifier, N_Variable_Reference_Marker.
1795 (Set_Is_SPARK_Mode_On_Node): New applicable to
1796 N_Variable_Reference_Marker.
1797 (Set_Save_Invocation_Graph_Of_Body): New routine.
1798 * sinfo.ads: Update the documentation of attributes
1799 Is_Elaboration_Checks_OK_Node, Is_Elaboration_Warnings_OK_Node,
1800 Is_SPARK_Mode_On_Node. Update the flag usage of attributes
1801 Is_Read, Is_Write. Add attribute Save_Invocation_Graph_Of_Body
1802 and update its occurrence in nodes.
1803 (Save_Invocation_Graph_Of_Body): New routine along with pragma
1804 Inline.
1805 (Set_Save_Invocation_Graph_Of_Body): New routine along with
1806 pragma Inline.
1807 * switch-b.adb (Scan_Binder_Switches): Refactor the scanning of
1808 debug switches.
1809 (Scan_Debug_Switches): New routine.
1810 * libgnat/g-dynhta.adb, libgnat/g-dynhta.ads (Contains): New routine.
1811 * libgnat/g-graphs.adb (Associate_Vertices): Update the use of
1812 Component_Vertex_Iterator.
1813 (Contains_Component, Contains_Edge, Contains_Vertex, Has_Next):
1814 Reimplemented.
1815 (Iterate_Component_Vertices): New routine.
1816 (Iterate_Vertices): Removed.
1817 (Next): Update the parameter profile.
1818 (Number_Of_Component_Vertices, Number_Of_Outgoing_Edges): New
1819 routines.
1820 * libgnat/g-graphs.ads: Update the initialization of
1821 No_Component. Add type Component_Vertex_Iterator. Remove type
1822 Vertex_Iterator.
1823 (Has_Next): Add new versions and remove old ones.
1824 (Iterate_Component_Vertices): New routine.
1825 (Iterate_Vertices): Removed.
1826 (Next): Add new versions and remove old ones.
1827 (Number_Of_Component_Vertices, Number_Of_Outgoing_Edges): New
1828 routines.
1829 * libgnat/g-sets.adb (Contains): Reimplemented.
1830 * gcc-interface/Make-lang.in (GNATBIND_OBJS): Add
1831 GNAT.Dynamic_HTables, GNAT.Graphs and Bindo units.
1832 * rtsfind.ads: Remove extra space.
1833
df177848 18342019-07-03 Yannick Moy <moy@adacore.com>
1835
1836 * sem_spark.adb: Add support for locally borrowing and observing
1837 a path.
1838 (Get_Root_Object): Add parameter Through_Traversal to denote
1839 when we are interesting in getting to the traversed parameter.
1840 (Is_Prefix_Or_Almost): New function to support detection of
1841 illegal access to borrowed or observed paths.
1842 (Check_Pragma): Add analysis of assertion pragmas.
1843
f3f142ac 18442019-07-03 Ed Schonberg <schonberg@adacore.com>
1845
1846 * sem_ch13.adb (Build_Predicate_Functions): In a generic context
1847 we do not build the bodies of predicate fuctions, but the
1848 expression in a static predicate must be elaborated to allow
1849 case coverage checking within the generic unit.
1850 (Build_Discrete_Static_Predicate): In a generic context, return
1851 without building function body once the
1852 Static_Discrete_Predicate expression for the type has been
1853 constructed.
1854
99d90c85 18552019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
1856
1857 * bindgen.adb, inline.adb, layout.adb, sem_ch12.adb,
1858 sem_ch13.adb, sem_ch7.adb, styleg.adb: Minor reformatting.
1859
800597f6 18602019-07-03 Bob Duff <duff@adacore.com>
1861
1862 * par-ch3.adb (P_Defining_Identifier): Call
1863 Check_Defining_Identifier_Casing.
1864 * style.ads, styleg.ads, styleg.adb
1865 (Check_Defining_Identifier_Casing): New procedure to check for
1866 mixed-case defining identifiers.
1867 * stylesw.ads, stylesw.adb (Style_Check_Mixed_Case_Decls): New
1868 flag for checking for mixed-case defining identifiers.
1869 * doc/gnat_ugn/building_executable_programs_with_gnat.rst:
1870 Document new feature.
1871 * gnat_ugn.texi: Regenerate.
1872
2c75027a 18732019-07-03 Eric Botcazou <ebotcazou@adacore.com>
1874
1875 * doc/gnat_ugn/building_executable_programs_with_gnat.rst
1876 (Warning message control): Document that -gnatw.z/Z apply to
1877 array types.
1878 * freeze.adb (Freeze_Entity): Give -gnatw.z warning for array
1879 types as well, but not if the specified alignment is the minimum
1880 one.
1881 * gnat_ugn.texi: Regenerate.
1882
08237d0d 18832019-07-03 Bob Duff <duff@adacore.com>
1884
1885 * einfo.ads, exp_util.adb, layout.ads, sinfo.ads: Spell "laid"
1886 correctly.
1887
0396441f 18882019-07-03 Ed Schonberg <schonberg@adacore.com>
1889
1890 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): No error
1891 message on attribute applied to a renaming when the renamed
1892 object is an aggregate (from code reading).
1893 (Check_Aspect_At_End_Of_Declarations): In a generic context
1894 where freeze nodes are not generated, the original expression
1895 for an aspect may need to be analyzed to precent spurious
1896 conformance errors when compared with the expression that is
1897 anakyzed at the end of the current declarative list.
1898
c8406f30 18992019-07-03 Eric Botcazou <ebotcazou@adacore.com>
1900
1901 * layout.adb (Layout_Type): Do not set the component size of an
1902 array with a scalar component if the component type is
1903 overaligned.
1904
c38b32ea 19052019-07-03 Ed Schonberg <schonberg@adacore.com>
1906
1907 * inline.adb (Make_Loop_Labels_Unique): New procedure to modify
1908 the source code of subprograms that are inlined by the
1909 front-end, to prevent accidental duplication between loop labels
1910 in the inlined code and the code surrounding the inlined call.
1911
6d6f134e 19122019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
1913
1914 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update
1915 the section on resolving elaboration circularities to eliminate
1916 certain combinations of switches which together do not produce
1917 the desired effect and confuse users.
1918 * gnat_ugn.texi: Regenerate.
1919
f3e16ef4 19202019-07-03 Arnaud Charlet <charlet@adacore.com>
1921
1922 * bindgen.adb (Gen_Main): Disable generation of reference to
1923 Ada_Main_Program_Name for CCG.
1924 * bindusg.adb (Display): Add -G to the command-line usage for
1925 gnatbind.
1926 * opt.ads (Generate_C_Code): Update comment.
1927 * switch-b.adb (Scan_Binder_Switches): Add handling for -G.
1928
f4a31b16 19292019-07-03 Arnaud Charlet <charlet@adacore.com>
1930
1931 * sem_ch7.adb (Has_Referencer): Do not consider inlined
1932 subprograms when generating C code, which allows us to generate
1933 static inline subprograms.
1934
2f65e9f7 19352019-07-03 Justin Squirek <squirek@adacore.com>
1936
1937 * sem_ch6.adb (Check_Conformance): Add expression checking for
1938 constant modifiers in anonymous access types (in addition to
1939 "non-null" types) so that they are considered "matching" for
1940 subsequent conformance tests.
1941
c336ed70 19422019-07-03 Arnaud Charlet <charlet@adacore.com>
1943
1944 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
1945 Clarify wording on No_Multiple_Elaboration.
1946 * gnat_rm.texi: Regenerate.
1947
78611c86 19482019-07-03 Ed Schonberg <schonberg@adacore.com>
1949
1950 * sem_ch8.adb (Find_Selected_Component): If the prefix is the
1951 current instance of a type or subtype, complete the resolution
1952 of the name by finding the component of the type denoted by the
1953 selector name.
1954
5a87a4d9 19552019-07-03 Eric Botcazou <ebotcazou@adacore.com>
1956
1957 * doc/gnat_rm/interfacing_to_other_languages.rst (Interfacing to C):
1958 Document that boolean types with convention C now map to C99 bool.
1959 * gnat_rm.texi: Regenerate.
1960
371c539c 19612019-07-03 Javier Miranda <miranda@adacore.com>
1962
1963 * exp_attr.adb (Expand_Min_Max_Attribute): Code cleanup:
1964 removing code that it is now never executed in the CCG compiler
1965 (dead code).
1966
89d2d652 19672019-07-02 Iain Sandoe <iain@sandoe.co.uk>
1968
1969 * libgnat/system-darwin-ppc.ads: Set Stack_Check_Probes True for
1970 PPC Darwin.
1971
d21e66fb 19722019-07-01 Ed Schonberg <schonberg@adacore.com>
1973
1974 * sem_ch12.adb (Is_Defaulted): New predicate in
1975 Check_Formal_Package_Intance, to skip the conformance of checks
1976 on parameters of a formal package that are defaulted,
1977
7a42b778 19782019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
1979
1980 * checks.adb, exp_ch9.adb, exp_unst.adb, sem_ch4.adb,
1981 sem_prag.adb, sem_spark.adb: Minor reformatting.
1982
fc8ae496 19832019-07-01 Ed Schonberg <schonberg@adacore.com>
1984
1985 * sem_attr.adb (Analyze_Attribute, case Enum_Rep): Allow prefix
1986 of attribute to be an attribute reference of a discrete type.
1987
9d27ea41 19882019-07-01 Eric Botcazou <ebotcazou@adacore.com>
1989
1990 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Move up
1991 handling of Has_Pragma_Inline_Always and deal with
1992 Has_Pragma_No_Inline.
1993
bcb8dcf3 19942019-07-01 Ed Schonberg <schonberg@adacore.com>
1995
1996 * sem_ch3.adb (Build_Derived_Record_Type): If the parent type is
1997 declared as a subtype of a private type with an inherited
1998 discriminant constraint, its generated full base appears as a
1999 record subtype, so we need to retrieve its oen base type so that
2000 the inherited constraint can be applied to it.
2001
d087b9ca 20022019-07-01 Yannick Moy <moy@adacore.com>
2003
2004 * sem_spark.adb: Completely rework the algorithm for ownership
2005 checking, as the rules in SPARK RM have changed a lot.
2006 * sem_spark.ads: Update comments.
2007
fe48ee0a 20082019-07-01 Dmitriy Anisimkov <anisimko@adacore.com>
2009
2010 * gsocket.h (Has_Sockaddr_Len): Use the offset of sin_family offset in
2011 the sockaddr_in structure to determine the existence of length field
2012 before the sin_family.
2013
b20f7e2c 20142019-07-01 Ed Schonberg <schonberg@adacore.com>
2015
2016 * sem_prag.adb (Analyze_Pragma, case Weak_External): Pragma only
2017 applies to entities with run-time addresses, not to types.
2018
374fdf94 20192019-07-01 Piotr Trojanek <trojanek@adacore.com>
2020
2021 * einfo.adb, sem_ch7.adb, sem_prag.adb, sem_util.adb: Update
2022 references to the SPARK RM after the removal of Rule 7.1.4(5).
2023
bf13a79d 20242019-07-01 Piotr Trojanek <trojanek@adacore.com>
2025
2026 * sysdep.c: Cleanup references to LynuxWorks in docs and
2027 comments.
2028
866fa2d0 20292019-07-01 Ed Schonberg <schonberg@adacore.com>
2030
2031 * checks.adb (Insert_Valid_Check): Do not apply validity check
2032 to variable declared within a protected object that uses the
2033 Lock_Free implementation, to prevent unwarranted constant
2034 folding, because entities within such an object msut be treated
2035 as volatile.
2036
bcb5ab83 20372019-07-01 Eric Botcazou <ebotcazou@adacore.com>
2038
2039 * exp_ch9.adb (Check_Inlining): Deal with Has_Pragma_No_Inline.
2040
2db33bd6 20412019-07-01 Ed Schonberg <schonberg@adacore.com>
2042
2043 * exp_unst.adb (Visit_Node, Check_Static_Type): Improve the
2044 handling of private and incomplete types whose full view is an
2045 access type, to detect additional uplevel references in dynamic
2046 bounds. This is relevant to N_Free_Statement among others that
2047 manipulate types whose full viww may be an access type.
2048
6b4f0b7d 20492019-07-01 Pat Rogers <rogers@adacore.com>
2050
2051 * doc/gnat_rm/representation_clauses_and_pragmas.rst: Correct
2052 size indicated for R as a component of an array.
2053 * gnat_rm.texi: Regenerate.
2054
cdee70d7 20552019-07-01 Justin Squirek <squirek@adacore.com>
2056
2057 * libgnat/s-win32.ads: Add definition for ULONG, modify
2058 OVERLAPPED type, and add appropriate pragmas.
2059
2cf822b7 20602019-07-01 Bob Duff <duff@adacore.com>
2061
2062 * gnat1drv.adb (gnat1drv): Call Write_ALI if the main unit is
2063 ignored-ghost.
2064
0a1ece97 20652019-07-01 Yannick Moy <moy@adacore.com>
2066
2067 * sem_ch4.adb (Operator_Check): Refine error message.
2068
ee4279ef 20692019-07-01 Piotr Trojanek <trojanek@adacore.com>
2070
2071 * libgnat/a-calend.ads: Revert "Global => null" contracts on
2072 non-pure routines.
2073
2c6b4ada 20742019-07-01 Piotr Trojanek <trojanek@adacore.com>
2075
2076 * exp_attr.adb, libgnat/g-graphs.ads: Fix typos in comments:
2077 componant -> component.
2078
175c4526 20792019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
2080
2081 * libgnat/g-graphs.adb: Use type Directed_Graph rather than
2082 Instance in various routines.
2083 * libgnat/g-graphs.ads: Change type Instance to Directed_Graph.
2084 Update various routines that mention the type.
2085
a0d15509 20862019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
2087
2088 * libgnat/g-sets.adb: Use type Membership_Set rathern than
2089 Instance in various routines.
2090 * libgnat/g-sets.ads: Change type Instance to Membership_Set.
2091 Update various routines that mention the type.
2092
205a23a3 20932019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
2094
2095 * libgnat/g-lists.adb: Use type Doubly_Linked_List rather than
2096 Instance in various routines.
2097 * libgnat/g-lists.ads: Change type Instance to
2098 Doubly_Linked_List. Update various routines that mention the
2099 type.
2100
17fdf8c2 21012019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
2102
2103 * libgnat/g-dynhta.adb: Use type Dynamic_Hash_Table rather than
2104 Instance in various routines.
2105 * libgnat/g-dynhta.ads: Change type Instance to
2106 Dynamic_Hash_Table. Update various routines that mention the
2107 type.
2108
216ffc64 21092019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
2110
2111 * exp_attr.adb, exp_ch7.adb, exp_unst.adb, sem_ch3.adb,
2112 sem_util.adb, uintp.adb, uintp.ads: Minor reformatting.
2113
5051fe35 21142019-07-01 Javier Miranda <miranda@adacore.com>
2115
2116 * exp_attr.adb (Expand_Min_Max_Attribute): Disable expansion of
2117 'Min/'Max on integer, enumeration, fixed point and floating
2118 point types since the CCG backend now provides in file
2119 standard.h routines to support it.
2120
830a2a71 21212019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
2122
2123 * impunit.adb: Add GNAT.Graphs to list Non_Imp_File_Names_95.
2124 * Makefile.rtl, gcc-interface/Make-lang.in: Register unit
2125 GNAT.Graphs.
2126 * libgnat/g-dynhta.adb: Various minor cleanups (use Present
2127 rather than direct comparisons).
2128 (Delete): Reimplement to use Delete_Node.
2129 (Delete_Node): New routine.
2130 (Destroy_Bucket): Invoke the provided destructor.
2131 (Present): New routines.
2132 * libgnat/g-dynhta.ads: Add new generic formal Destroy_Value.
2133 Use better names for the components of iterators.
2134 * libgnat/g-graphs.adb, libgnat/g-graphs.ads: New unit.
2135 * libgnat/g-lists.adb: Various minor cleanups (use Present
2136 rather than direct comparisons).
2137 (Delete_Node): Invoke the provided destructor.
2138 (Present): New routine.
2139 * libgnat/g-lists.ads: Add new generic formal Destroy_Element.
2140 Use better names for the components of iterators.
2141 (Present): New routine.
2142 * libgnat/g-sets.adb, libgnat/g-sets.ads (Destroy, Preset,
2143 Reset): New routines.
2144
b0111d94 21452019-07-01 Dmitriy Anisimkov <anisimko@adacore.com>
2146
2147 * libgnat/g-sothco.adb (Get_Address): Fix the case when AF_INET6
2148 is not defined.
2149
7362896b 21502019-07-01 Ed Schonberg <schonberg@adacore.com>
2151
2152 * exp_attr.adb (Expand_Attribute_Reference, case Invalid_Value):
2153 Resolve result of call to Get_Simple_Init_Val, which may be a
2154 conversion of a literal.
2155
0dae8dc2 21562019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
2157
2158 * freeze.adb (Freeze_Expression): Remove the horrible useless
2159 name hiding of N. Insert the freeze nodes generated by the
2160 expression prior to the expression when the nearest enclosing
2161 scope is transient.
2162
487da8ff 21632019-07-01 Pierre-Marie de Rodat <derodat@adacore.com>
2164
2165 * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Fix
2166 formatting issues in the -gnatR section.
2167 * gnat_ugn.texi: Regenerate.
2168
1d79fa18 21692019-06-30 Iain Sandoe <iain@sandoe.co.uk>
2170
2171 * gnatlink.adb (Link_Step): Remove duplicate -static-libgcc switches.
2172 Push -shared-libgcc explicitly, when it is the target default (unless
2173 overidden by the static flag).
2174 When the user has put an instance of shared/static-libgcc do not push
2175 a duplicate of this.
2176
a850edcd 21772019-06-29 Eric Botcazou <ebotcazou@adacore.com>
2178
2179 * gcc-interface/decl.c (gnat_to_gnu_entity): Beep up comment on SAVED,
2180 and tweak comment on the assertion about the scopes of Itypes. Do not
2181 skip the regular processing for Itypes that are E_Record_Subtype with
2182 a Cloned_Subtype. Get the Cloned_Subtype for every E_Record_Subtype
2183 if the type is dummy and hasn't got its own freeze node.
2184 <E_Record_Subtype>: Save again the DECL of the Cloned_Subtype, if any.
2185 <E_Access_Subtype>: Save again the DECL of the equivalent type.
2186 (Gigi_Equivalent_Type) <E_Access_Subtype>: New case.
2187
b1e46fb1 21882019-06-29 Eric Botcazou <ebotcazou@adacore.com>
2189
2190 * gcc-interface/utils.c (unchecked_convert): Tweak comment. Only skip
2191 dereferences when padding to have the same size on both sides. Do it
2192 for destination types with self-referential size too.
2193
07e38949 21942019-06-29 Eric Botcazou <ebotcazou@adacore.com>
2195
2196 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: If the
2197 type requires strict alignment, then set the RM size to the type size.
2198 Rework handling of alignment and sizes of tagged types in ASIS mode.
2199 (validate_size): Rename local variable and remove special handling for
2200 strict-alignment types.
2201 * gcc-interface/utils.c (finish_record_type): Constify local variables
2202 and use properly typed constants.
2203
f4409741 22042019-06-29 Eric Botcazou <ebotcazou@adacore.com>
2205
2206 * gcc-interface/decl.c (gnat_to_gnu_field): Rework error messages for
2207 fields requiring strict alignment, add explicit test on Storage_Unit
2208 for position and size, and mention type alignment for position.
2209
5882c515 22102019-06-29 Eric Botcazou <ebotcazou@adacore.com>
2211
2212 * gcc-interface/trans.c (mark_visited_r): Set TYPE_SIZES_GIMPLIFIED on
2213 the main variant of a type, if any.
2214
d0de0a27 22152019-06-29 Eric Botcazou <ebotcazou@adacore.com>
2216
2217 * gcc-interface/decl.c (set_nonaliased_component_on_array_type): Add
2218 missing guard for the presence of TYPE_CANONICAL.
2219 (set_reverse_storage_order_on_array_type): Likewise.
2220
2074c859 22212019-06-29 Eric Botcazou <ebotcazou@adacore.com>
2222
2223 * gcc-interface/gigi.h (make_packable_type): Remove default value.
2224 (value_factor_p): Tweak prototype.
2225 * gcc-interface/decl.c (gnat_to_gnu_entity): Add comment.
2226 (gnat_to_gnu_component_type): Likewise.
2227 (gnat_to_gnu_field): Likewise. Fetch the position of the field earlier
2228 and simplify the condition under which the type is packed. Declare
2229 local variable is_bitfield. Pass 1 as max_align to make_packable_type
2230 if it is set to true.
2231 (copy_and_substitute_in_layout): Pass 0 to make_packable_type.
2232 * gcc-interface/utils.c (make_packable_array_type): New function.
2233 (make_packable_type): Use it to rewrite the type of array field.
2234 (maybe_pad_type): Pass align parameter to make_packable_type.
2235 (create_field_decl): Minor tweaks.
2236 (value_factor_p): Assert that FACTOR is a power of 2 and replace the
2237 modulo computation by a masking operation.
2238
83c6da22 22392019-06-25 Eric Botcazou <ebotcazou@adacore.com>
2240
2241 * gcc-interface/decl.c (gnat_to_gnu_entity): Remove superfluous test
2242 in previous change.
2243 * gcc-interface/gigi.h (maybe_character_type): Fix formatting.
2244 (maybe_character_value): Likewise.
2245
aaabc7bc 22462019-06-24 Jan Hubicka <jh@suse.cz>
2247
2248 * gcc-interface/decl.c (gnat_to_gnu_entity): Check that
2249 type is array or integer prior checking string flag.
83c6da22 2250 * gcc-interface/gigi.h (maybe_character_type): Likewise.
2251 (maybe_character_value): Likewise.
aaabc7bc 2252
5fe09a56 22532019-06-24 Martin Sebor <msebor@redhat.com>
2254
2255 * gcc-interface/utils.c (handle_nonnull_attribute): Quote attribute
2256 name.
2257
bd9331d6 22582019-06-18 Arnaud Charlet <charlet@adacore.com>
2259
83c6da22 2260 PR ada/80590
bd9331d6 2261 * sem_ch5.adb (Analyze_Loop_Statement): Avoid exception propagation
2262 during normal processing.
2263
8a5a7d1c 22642019-06-17 Arnaud Charlet <charlet@adacore.com>
2265
83c6da22 2266 PR ada/80590
8a5a7d1c 2267 * exp_ch9.adb (Expand_N_Delay_Relative_Statement): Swap the two
2268 conditions to avoid a unnecessary exception propagation in the default
2269 case.
2270
580934f6 22712019-05-28 Eric Botcazou <ebotcazou@adacore.com>
2272
2273 * gcc-interface/utils.c (handle_stack_protect_attribute): Move around.
2274
c8956236 22752019-05-28 Eric Botcazou <ebotcazou@adacore.com>
2276
2277 * doc/gnat_rm/implementation_defined_pragmas.rst (Machine_Attribute):
2278 Document additional optional parameters.
2279 * sem_prag.adb (Analyze_Pragma) <Pragma_Machine_Attribute>: Accept
2280 more than one optional parameter.
2281 * gcc-interface/decl.c (prepend_one_attribute_pragma): Alphabetize
2282 the list of supported pragmas. Simplify the handling of parameters
2283 and add support for more than one optional parameter.
2284 * gcc-interface/utils.c (attr_cold_hot_exclusions): New constant.
2285 (gnat_internal_attribute_table): Add entry for no_icf, noipa, flatten,
2286 used, cold, hot, target and target_clones.
2287 (begin_subprog_body): Do not create the RTL for the subprogram here.
2288 (handle_noicf_attribute): New static function.
2289 (handle_noipa_attribute): Likewise.
2290 (handle_flatten_attribute): Likewise.
2291 (handle_used_attribute): Likewise.
2292 (handle_cold_attribute): Likewise.
2293 (handle_hot_attribute): Likewise.
2294 (handle_target_attribute): Likewise.
2295 (handle_target_clones_attribute): Likewise.
2296
62b762c2 22972019-05-28 Eric Botcazou <ebotcazou@adacore.com>
2298
2299 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Return 0
2300 for 'Size too.
2301 (Identifier_to_gnu): Use the actual subtype for a reference to a
2302 packed array in a return statement.
2303 (Attribute_to_gnu) <Attr_Size>: Do not strip VIEW_CONVERT_EXPRs from
2304 the prefix in every case.
2305
336a61a3 23062019-05-28 Eric Botcazou <ebotcazou@adacore.com>
2307
2308 * gcc-interface/trans.c (gnat_to_gnu): Remove superfluous tests on
2309 Backend_Overflow_Checks_On_Target and rework comments.
2310
983c5b5e 23112019-05-28 Eric Botcazou <ebotcazou@adacore.com>
2312
2313 * gcc-interface/trans.c (walk_nesting_tree): New static function.
2314 (finalize_nrv): Use it to walk the entire nesting tree.
2315
96b4b84e 23162019-05-28 Eric Botcazou <ebotcazou@adacore.com>
2317
2318 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Remove
2319 obsolete test on Is_For_Access_Subtype.
2320
0b74284e 23212019-05-28 Eric Botcazou <ebotcazou@adacore.com>
2322
2323 * gcc-interface/decl.c (components_to_record): Set a name on the type
2324 created for the REP part, if any.
2325 * gcc-interface/utils.c (finish_record_type): Only take the maximum
2326 when merging sizes for a variant part at offset 0.
2327 (merge_sizes): Rename has_rep parameter into max.
2328
689dab9d 23292019-05-28 Eric Botcazou <ebotcazou@adacore.com>
2330
2331 * gcc-interface/utils.c (gnat_internal_attribute_table): Add support
2332 for stack_protect attribute.
2333 (handle_stack_protect_attribute): New static function.
2334
804f7d39 23352019-05-28 Eric Botcazou <ebotcazou@adacore.com>
2336
2337 * gcc-interface/decl.c (intrin_arglists_compatible_p): Do not return
2338 false if the internal builtin uses a variable list.
2339
f07f94cc 23402019-05-27 Eric Botcazou <ebotcazou@adacore.com>
2341
2342 * gcc-interface/trans.c (Call_to_gnu): Do not initialize the temporary
2343 created out of addressability concerns if it's for the _Init parameter
2344 of an initialization procedure.
2345
abfd658b 23462019-05-27 Eric Botcazou <ebotcazou@adacore.com>
2347
2348 * gcc-interface/ada-builtin-types.def: New file.
2349 * gcc-interface/ada-builtins.def: Likewise.
2350 * gcc-interface/ada-tree.h (BUILT_IN_LIKELY): New macro.
2351 (BUILT_IN_UNLIKELY): Likewise.
2352 * gcc-interface/trans.c (independent_iterations_p): Initialize the
2353 auto-vector to 16 elements.
2354 (Call_to_gnu): Remove local variable and change the vector of actual
2355 parameters to an auto-vector. Do not convert actual parameters to
2356 the argument type for front-end built-in functions. Add support for
2357 front-end built-in functions.
2358 (build_noreturn_cond): Use internal instead of built-in function.
2359 * gcc-interface/utils.c (c_builtin_type): Include ada-builtin-types.def
2360 (install_builtin_function_types): Likewise.
2361 (install_builtin_functions): Include ada-builtins.def first.
2362
caab73a2 23632019-05-27 Eric Botcazou <ebotcazou@adacore.com>
2364
2365 * gcc-interface/utils.c (maybe_pad_type): Issue the warning for the
2366 specific case of component types preferably.
2367
f1ca2388 23682019-05-27 Eric Botcazou <ebotcazou@adacore.com>
2369
2370 * gcc-interface/trans.c (Identifier_to_gnu): Minor tweaks.
2371 (gnat_to_gnu): Do not convert the result if it is a reference to an
2372 unconstrained array used as the prefix of an attribute reference that
2373 requires an lvalue.
2374
e3f3573c 23752019-05-27 Eric Botcazou <ebotcazou@adacore.com>
2376
2377 * gcc-interface/trans.c (Gigi_Types_Compatible): New predicate.
2378 (Identifier_to_gnu): Use it to assert that the type of the identifier
2379 and that of its entity are compatible for gigi. Rename a couple of
2380 local variables and separate the processing of the result type.
2381
2306cd17 23822019-05-27 Eric Botcazou <ebotcazou@adacore.com>
2383
2384 * gcc-interface/trans.c (Call_to_gnu): Use the unpadded type when
2385 putting back an intermediate conversion the type of the actuals.
2386
6e4e9378 23872019-05-27 Eric Botcazou <ebotcazou@adacore.com>
2388
2389 * gcc-interface/trans.c (gnat_to_gnu) <Shift operations>: Convert the
2390 count to the unsigned version of its base type before proceeding.
2391
85b9be9b 23922019-05-16 Martin Sebor <msebor@redhat.com>
2393
3d6be0d5 2394 * gcc-interface/trans.c (check_inlining_for_nested_subprog): Quote
2395 reserved names.
85b9be9b 2396
65d973ca 23972019-05-08 Arnaud Charlet <charlet@adacore.com>
2398
2399 * standard.ads.h: New file.
2400
ff628b99 24012019-05-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2402
2403 * gcc-interface/Makefile.in (install-gcc-specs): Use foreach.
2404 Honor DESTDIR.
2405
ebd761d4 24062019-04-29 Michael K. Darling <darlingm@gmail.com>
2407
2408 * gnatvsn.ads: Bump Library_Version to 10.
2409
5f260823 24102019-04-24 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2411 Bernd Edlinger <bernd.edlinger@hotmail.de>
2412 Jakub Jelinek <jakub@redhat.com>
2413
2414 PR target/89093
2415 * raise-gcc.c (TARGET_ATTRIBUTE): Define.
2416 (continue_unwind, personality_body, PERSONALITY_FUNCTION): Add
2417 TARGET_ATTRIBUTE.
2418
d7ca95c0 24192019-04-07 Eric Botcazou <ebotcazou@adacore.com>
2420
2421 * libgnat/i-cexten.ads (CFloat_128): New type.
2422
26b21081 24232019-03-22 Dmitriy Anisimkov <anisimko@adacore.com>
2424
2425 PR ada/89583
2426 * libgnat/g-socket.adb (Bind_Socket, Connect_Socket,
2427 Send_Socket): Fix the computation of structure lengths passed to
2428 low level routines.
2429 (Is_IPv6_Address): Fix the number of expected colons.
2430
2f6d557f 24312019-03-11 Martin Liska <mliska@suse.cz>
2432
d325ee67 2433 * gcc-interface/misc.c (gnat_post_options): Wrap option name in string
2434 format message and fix GNU coding style.
2f6d557f 2435
c1ad6672 24362019-02-08 Eric Botcazou <ebotcazou@adacore.com>
2437
2438 * gcc-interface/trans.c (gnat_to_gnu) <N_Aggregate>: Minor tweak.
2439 * gcc-interface/utils.c (convert): Do not pad when doing an unchecked
2440 conversion here. Use TREE_CONSTANT throughout the function.
2441 (unchecked_convert): Also pad if the source is a CONSTRUCTOR and the
2442 destination is a more aligned array type or a larger aggregate type,
2443 but not between original and packable versions of a type.
2444
62a6ebbd 24452019-02-08 Eric Botcazou <ebotcazou@adacore.com>
2446
2447 * gcc-interface/utils.c (max_size) <tcc_unary>: Be prepared for an
2448 operand with VOID_TYPE.
2449
da383d19 24502019-02-08 Eric Botcazou <ebotcazou@adacore.com>
2451
2452 * gcc-interface/trans.c (elaborate_all_entities): Do not elaborate the
2453 entities of a package renaming another one.
2454
09c123a0 24552019-02-08 Eric Botcazou <ebotcazou@adacore.com>
2456
2457 * gcc-interface/trans.c (Regular_Loop_to_gnu): Replace tests on
2458 individual flag_unswitch_loops and flag_tree_loop_vectorize switches
2459 with test on global optimize switch.
2460 (Raise_Error_to_gnu): Likewise.
2461
a9dd7273 24622019-02-07 Eric Botcazou <ebotcazou@adacore.com>
2463
2464 * libgnarl/s-linux__sparc.ads (ETIMEDOUT): Set to correct value.
2465
4836c4f1 24662019-02-06 Arnaud Charlet <charlet@adacore.com>
2467
2468 * libgnarl/s-linux__x32.ads: Resync list of signals with s-linux.ads
2469
6b56937c 24702019-01-27 Eric Botcazou <ebotcazou@adacore.com>
2471
2472 * repinfo.adb (List_Component_Layout): Remove superfluous space for
2473 zero-sized field.
2474 * gcc-interface/ada-tree.h (TYPE_IS_EXTRA_SUBTYPE_P): New macro.
2475 * gcc-interface/gigi.h (create_extra_subtype): Declare.
2476 * gcc-interface/decl.c (TYPE_ARRAY_SIZE_LIMIT): Likewise.
2477 (update_n_elem): New function.
2478 (gnat_to_gnu_entity): Use create_extra_subtype to create extra subtypes
2479 instead of doing it manually.
2480 <E_Array_Type>: Use update_n_elem to compute the maximum size. Use the
2481 index type instead of base type for the bounds. Set TYPE_ARRAY_MAX_SIZE
2482 of the array to the maximum size.
2483 <E_Array_Subtype>: Create an extra subtype using the index type of the
2484 base array type for self-referential bounds. Use update_n_elem to
2485 compute the maximum size. Set TYPE_ARRAY_MAX_SIZE of the array to the
2486 maximum size.
2487 (gnat_to_gnu_field): Clear DECL_NONADDRESSABLE_P on discriminants.
2488 * gcc-interface/misc.c (gnat_get_alias_set): Return the alias set of
2489 the base type for an extra subtype.
2490 (gnat_type_max_size): Remove obsolete code.
2491 * gcc-interface/trans.c (Attribute_to_gnu): Minor tweak.
2492 (can_be_lower_p): Deal with pathological types.
2493 * gcc-interface/utils.c (create_extra_subtype): New function.
2494 (create_field_decl): Minor tweak.
2495 (max_size) <tcc_reference>: Compute a better value by using the extra
2496 subtypes on the self-referential bounds.
2497 <tcc_binary>: Rewrite. Deal with "negative value" in unsigned types.
2498 <tcc_expression>: Likewise.
2499 * gcc-interface/utils2.c (compare_arrays): Retrieve the original bounds
2500 of the arrays upfront. Swap only if the second length is not constant.
2501 Use comparisons on the original bounds consistently for the null tests.
2502 (build_binary_op): Use TYPE_IS_EXTRA_SUBTYPE_P macro.
2503 (build_allocator): Minor tweak.
2504
ecb2c722 25052019-01-27 Eric Botcazou <ebotcazou@adacore.com>
2506
2507 * gcc-interface/decl.c (array_type_has_nonaliased_component): Return
2508 the same value for every dimension of a multidimensional array type.
2509
10f25579 25102019-01-26 Eric Botcazou <ebotcazou@adacore.com>
2511
2512 * gcc-interface/trans.c (Regular_Loop_to_gnu): Use the SLOC of the
2513 iteration scheme, if present, throughout the translation.
2514
aced6683 25152019-01-26 Eric Botcazou <ebotcazou@adacore.com>
2516
2517 * gcc-interface/trans.c (gnat_to_gnu) <N_Assignment_Statement>: Use
2518 DECL_SIZE_UNIT instead of TYPE_SIZE_UNIT for the size to be assigned
2519 by a call to memset if the LHS is a DECL.
2520
18b4b30e 25212019-01-26 Eric Botcazou <ebotcazou@adacore.com>
2522
2523 * gcc-interface/trans.c (struct loop_info_d): Remove artificial field.
2524 (Loop_Statement_to_gnu): Do not set it.
2525
6dce35b7 25262019-01-26 Eric Botcazou <ebotcazou@adacore.com>
2527
2528 * gcc-interface/trans.c (Iterate_Acc_Clause_Arg): Fix formatting.
2529 (Acc_gnat_to_gnu): Likewise.
2530 (Acc_Data_to_gnu): Likewise.
2531 (Acc_Var_to_gnu): Likewise.
2532 (Acc_Reduc_to_gnu): Likewise.
2533 (Acc_Size_List_to_gnu): Likewise.
2534 (Pragma_to_gnu) <Pragma_Acc_Loop>: Likewise.
2535 <Pragma_Acc_Data>): Likewise.
2536 (find_loop_for): Remove default value for parameters.
2537 * gcc-interface/trans.c (gnat_to_gnu) <N_Op_And>: Merge into...
2538 <N_Op_Eq>): ...this.
2539
f8cd11ee 25402019-01-26 Eric Botcazou <ebotcazou@adacore.com>
2541
2542 * gcc-interface/decl.c (annotate_value) <INTEGER_CST>: Use test on
2543 the sign bit instead of on the sign of the value.
2544 <PLUS_EXPR>: Turn addition of negative constant into subtraction.
2545 <MULT_EXPR>: Add test for degenerate case.
2546 <BIT_AND_EXPR>: Simplify.
2547
9a3c51d9 25482019-01-18 Sebastian Huber <sebastian.huber@embedded-brains.de>
2549
2550 * s-oscons-tmplt.c (AF_INET6): Do not undefine for RTEMS.
2551
07c11f2b 25522019-01-09 Sandra Loosemore <sandra@codesourcery.com>
2553
2554 PR other/16615
07c11f2b 2555 * exp_ch11.adb: Change "can not" to "cannot".
2556 * sem_ch4.adb: Likewise.
2557
f4d3c071 25582019-01-09 Sandra Loosemore <sandra@codesourcery.com>
2559
2560 PR other/16615
f4d3c071 2561 * exp_ch9.adb: Mechanically replace "can not" with "cannot".
2562 * libgnat/s-regpat.ads: Likewise.
2563 * par-ch4.adb: Likewise.
2564 * set_targ.adb: Likewise.
2565 * types.ads: Likewise.
2566
902071d1 25672019-01-08 Justin Squirek <squirek@adacore.com>
2568
2569 Revert:
902071d1 2570 2018-07-31 Justin Squirek <squirek@adacore.com>
2571
76fb0465 2572 * lib-writ.adb (Write_With_Lines): Modfiy the generation
2573 of dependencies within ali files so that source unit
2574 bodies are properly listed even if said bodies are
2575 missing. Perform legacy behavior in GNATprove mode.
2576 * lib-writ.ads: Modify documentation to reflect current
2577 behavior.
902071d1 2578
2579 and:
902071d1 2580 2018-09-26 Justin Squirek <squirek@adacore.com>
2581
76fb0465 2582 * lib-writ.adb, lib-writ.ads (Write_With_Lines): Add
2583 documentation and an extra conditional check for RCI
2584 units so that generated ali files will list the spec
2585 only instead of a body when a body is not found.
902071d1 2586
65a33d4a 25872019-01-04 Eric Botcazou <ebotcazou@adacore.com>
2588
2589 * gnatvsn.ads: Bump copyright year.
2590
3d8932fd 25912019-01-01 Jakub Jelinek <jakub@redhat.com>
8e8f6434 2592
fbd26352 2593 Update copyright years.
2594
277184bc 2595 * gnat_ugn.texi: Bump @copying's copyright year.
2596 * gnat_rm.texi: Likewise.
7dfbd804 2597\f
3d8932fd 2598Copyright (C) 2019 Free Software Foundation, Inc.
7dfbd804 2599
2600Copying and distribution of this file, with or without modification,
2601are permitted in any medium without royalty provided the copyright
2602notice and this notice are preserved.