]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/ada/ChangeLog
[Ada] Fix incorrect stub generation for types in instances
[thirdparty/gcc.git] / gcc / ada / ChangeLog
CommitLineData
29090cc0 12019-08-19 Eric Botcazou <ebotcazou@adacore.com>
2
3 * exp_dist.adb (Is_Generic_Actual_Subtype): New predicate.
4 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
5 Use it instead of Is_Generic_Actual_Type flag to detect subtypes
6 representing generic actual types.
7
f7292123 82019-08-19 Ed Schonberg <schonberg@adacore.com>
9
10 * sem_warn.adb (Check_References, Generic_Body_Formal): When a
11 formal parameter of a generic subprogram is not referenced in
12 the body, place the corresponding warning on the corresponding
13 entity in the specification of the generic body, as is done for
14 non-generic subprograms.
15
a0490886 162019-08-19 Bob Duff <duff@adacore.com>
17
18 * errout.ads (Size_Too_Small_Message): New constant.
19 * errout.adb, freeze.adb, sem_ch13.adb: Use it.
20
52fd9316 212019-08-19 Eric Botcazou <ebotcazou@adacore.com>
22
23 * exp_dist.adb (Build_Package_Stubs): Do not specifically visit
24 the declarations of an N_Subprogram_Instantiation node.
25
dea591de 262019-08-19 Bob Duff <duff@adacore.com>
27
28 * doc/gnat_ugn/gnat_utility_programs.rst: Document missing
29 metrics switches.
30
76c3a40d 312019-08-19 Piotr Trojanek <trojanek@adacore.com>
32
33 * sem_ch12.adb (Get_Unit_Instantiation_Node): Simplify Nkind_In
34 membership test.
35 * sem.adb (Depends_On_Main): Whitespace cleanup; only assign a
36 local variable if needed.
37
a6f3144f 382019-08-19 Claire Dross <dross@adacore.com>
39
40 * sem_spark.ads, sem_spark.adb (Is_Pledge_Function): New
41 parameter of the generic. Function used to decide whether a
42 function is a pledge function.
43 (Check_Not_Borrowed): Disable check inside the second parameter
44 of a pledge function for the path borrowed by the first
45 parameter. Also disable checks for entities inside a Global
46 contract.
47
46895d57 482019-08-19 Joffrey Huguet <huguet@adacore.com>
49
50 * libgnat/a-cfdlli.ads, libgnat/a-cfhama.ads,
51 libgnat/a-cfinve.ads, libgnat/a-cforma.ads,
52 libgnat/a-cofove.ads, libgnat/a-cofuma.ads,
53 libgnat/a-cofuve.ads: Add formal function parameter "=" (L, R :
54 Element_Type) to the generic packages.
55
813b821f 562019-08-19 Eric Botcazou <ebotcazou@adacore.com>
57
58 * opt.ads: Clean up left-overs of earlier implementation in
59 comment:
60
33f602f4 612019-08-19 Ed Schonberg <schonberg@adacore.com>
62
63 * sem_ch3.adb (Derived_Enumeration_Type): Do no freeze anonymous
64 base type if the bounds in the derived type declaration are
65 literals of the type.
66
790cfd31 672019-08-19 Yannick Moy <moy@adacore.com>
68
69 * sem_res.adb (Resolve_Call): Check non-aliasing rules before
70 GNATprove inlining.
71
b9236049 722019-08-19 Eric Botcazou <ebotcazou@adacore.com>
73
74 * inline.adb (Add_Inlined_Body): Do not add pending
75 instantiations.
76 * sem_ch12.adb (Needs_Body_Instantiated): New predicate.
77 (Analyze_Package_Instantiation): Use it to decide whether to add
78 a pending instantiation for the body of the package.
79
219ede74 802019-08-19 Olivier Hainque <hainque@adacore.com>
81
82 * gcc-interface/trans.c (Acc_Loop_to_gnu): Return the openacc
83 BIND_EXPR node we have constructed on purpose. Remove unused
84 variable.
85
46d53adf 862019-08-19 Pierre-Marie de Rodat <derodat@adacore.com>
87
88 * gcc-interface/lang.opt (fdump-scos): Define.
89 * gcc-interface/misc.c (gnat_handle_option): Handle
90 OPT_fdump_scos.
91
734c93fe 922019-08-14 Joffrey Huguet <huguet@adacore.com>
93
94 * libgnat/a-cofuba.ads: Add a Length attribute to type
95 Container. Add a type Array_Base which replaces the previous
96 Elements attribute of Container.
97 (Content_Init): New subprogram. It is used to initialize the
98 Base attribute of Container.
99 * libgnat/a-cofuba.adb (Resize): New subprogram. It is used to
100 resize the underlying array of a container if necessary.
101 (=, <=, Find, Get, Intersection, Length, Num_Overlaps, Set,
102 Union): Update to match changes in type declarations.
103 (Add): Modify body to damp the time and space cost in a specific
104 case.
105 (Content_Init): New subprogram. It is used to initialize the
106 Base attribute of Container.
107 (Remove): Modify body to damp the time and space cost in a
108 specific case.
109
551a164c 1102019-08-14 Bob Duff <duff@adacore.com>
111
112 * sem_ch13.adb (Get_Alignment_Value): Return 1 for Alignment 0,
113 and do not give an error.
114 * doc/gnat_rm/representation_clauses_and_pragmas.rst: Update the
115 corresponding documentation.
116 * gnat_rm.texi: Regenerate.
117
e57467b9 1182019-08-14 Eric Botcazou <ebotcazou@adacore.com>
119
120 * inline.adb (Add_Pending_Instantiation): Fix off-by-one error
121 in the comparison against the maximum number of instantiations.
122
dd3a5ffe 1232019-08-14 Eric Botcazou <ebotcazou@adacore.com>
124
125 * inline.adb (Add_Pending_Instantiation): Use greater-or-equal
126 in the comparison against the maximum number of instantiations.
127
66e0a3d9 1282019-08-14 Ed Schonberg <schonberg@adacore.com>
129
130 * sem_aux.adb (Next_Rep_Item): If a node in the rep chain
131 involves a Ghost aspect it may have been replaced by a null
132 statement; use the original node to find next Rep_Item.
133 * repinfo.adb (List_Entities): Do not list an Ignored
134 Ghost_Entity, for which information may have been deleted.
135
493b094c 1362019-08-14 Bob Duff <duff@adacore.com>
137
138 * sem_prag.ads, sem_prag.adb
139 (Process_Compile_Time_Warning_Or_Error): In parameterless
140 version, improve detection of whether we are in a generic unit
141 to cover the case of an instance within a generic unit.
142 (Process_Compile_Time_Warning_Or_Error): Rename the
143 two-parameter version to be
144 Validate_Compile_Time_Warning_Or_Error, and do not export it.
145 Issue a warning if the condition is not known at compile time.
146 The key point is that the warning must be given only for pragmas
147 deferred to the back end, because the back end discovers
148 additional values that are known at compile time. Previous
149 changes in this ticket have enabled this by deferring to the
150 back end without checking for special cases such as 'Size.
151 (Validate_Compile_Time_Warning_Or_Error): Rename to be
152 Defer_Compile_Time_Warning_Error_To_BE.
153 * warnsw.ads, warnsw.adb (Warn_On_Unknown_Compile_Time_Warning):
154 Add new switches -gnatw_c and -gnatw_C to control the above
155 warning.
156 * doc/gnat_ugn/building_executable_programs_with_gnat.rst:
157 Document new switches.
158 * gnat_ugn.texi: Regenerate.
159
3e9f1302 1602019-08-14 Eric Botcazou <ebotcazou@adacore.com>
161
162 * sem_ch12.adb (Might_Inline_Subp): Rework comment and restrict
163 the shortcut based on Is_Inlined to the back-end inlining case.
164
21c86146 1652019-08-14 Bob Duff <duff@adacore.com>
166
167 * inline.adb (Check_And_Split_Unconstrained_Function): Ignore
168 protected functions to get rid of spurious error. The
169 transformation done by this procedure triggers legality errors
170 in the generated code in this case.
171
46cc931f 1722019-08-14 Bob Duff <duff@adacore.com>
173
174 * sem_prag.adb (Process_Compile_Time_Warning_Or_Error): Defer
175 processing to the back end in all cases where the pragma's
176 condition is not known at compile time during the front end
177 (except in generics), as opposed to detecting 'Size attributes
178 and the like. This ensures that we take advantage of whatever
179 can be compile-time known after running the back end, as opposed
180 to having the front end guess what the back end can do. Remove
181 a little duplicated code at the call site.
182 * gnat1drv.adb (Post_Compilation_Validation_Checks): Unlock the
183 Elists while in Validate_Compile_Time_Warning_Errors, because it
184 does analysis and name resolution, which sometimes involves
185 adding Elists.
186
1cae40c5 1872019-08-14 Eric Botcazou <ebotcazou@adacore.com>
188
189 * einfo.ads (Is_Called): Document new usage on E_Package
190 entities.
191 * einfo.adb (Is_Called): Accept E_Package entities.
192 (Set_Is_Called): Likewise.
193 * exp_ch6.adb (Expand_Call_Helper): Move code dealing with
194 instances for back-end inlining to Add_Inlined_Body.
195 * inline.ads: Remove with clauses for Alloc and Table.
196 (Pending_Instantiations): Move to...
197 * inline.adb: Add with clauses for Alloc, Uintp, Table and
198 GNAT.HTable.
199 (Backend_Instances): New variable.
200 (Pending_Instantiations): ...here.
201 (Called_Pending_Instantiations): New table.
202 (Node_Table_Size): New constant.
203 (Node_Header_Num): New subtype.
204 (Node_Hash): New function.
205 (To_Pending_Instantiations): New hash table.
206 (Add_Inlined_Body): Bail out early for subprograms in the main
207 unit or subunit. Likewise if the Is_Called flag is set. If the
208 subprogram is an instance, invoke Add_Inlined_Instance. Call
209 Set_Is_Called earlier. If the subrogram is within an instance,
210 invoke Add_Inlined_Instance. Also deal with the case where the
211 call itself is within an instance.
212 (Add_Inlined_Instance): New procedure.
213 (Add_Inlined_Subprogram): Remove conditions always fulfilled.
214 (Add_Pending_Instantiation): Move the defence against ludicruous
215 number of instantiations to here. When back-end inlining is
216 enabled, associate an instantiation with its index in table and
217 mark a few selected kinds of instantiations as always needed.
218 (Initialize): Set Backend_Instances to No_Elist.
219 (Instantiate_Body): New procedure doing the work extracted
220 from...
221 (Instantiate_Bodies): ...here. When back-end inlining is
222 enabled, loop over Called_Pending_Instantiations instead of
223 Pending_Instantiations.
224 (Is_Nested): Minor tweak.
225 (List_Inlining_Info): Also list the contents of
226 Backend_Instances.
227 * sem_ch12.adb (Might_Inline_Subp): Return early if Is_Inlined
228 is set and otherwise set it before returning true.
229 (Analyze_Package_Instantiation): Remove the defence against
230 ludicruous number of instantiations. Invoke
231 Remove_Dead_Instance instead of doing the removal manually if
232 there is a guaranteed ABE.
233
00f6ddf1 2342019-08-14 Gary Dismukes <dismukes@adacore.com>
235
236 * exp_ch3.adb (Predef_Spec_Or_Body): For an equality operation
237 of an interface type, create an expression function (that
238 returns False) rather than declaring an abstract function.
239 * freeze.adb (Check_Inherited_Conditions): Set Needs_Wrapper to
240 False unconditionally at the start of the loop creating wrappers
241 for inherited operations.
242
b1c60967 2432019-08-14 Bob Duff <duff@adacore.com>
244
245 * table.adb: Assert that the table is not locked when increasing
246 Last, even if it doesn't cause reallocation. In other words,
247 assert that on operations that MIGHT cause reallocation.
248 * table.ads: Fix comment accordingly.
249
fe417467 2502019-08-14 Arnaud Charlet <charlet@adacore.com>
251
252 * doc/gnat_ugn/gnat_and_program_execution.rst: Remove
253 documentation of gnatelim.
254
bf697151 2552019-08-14 Bob Duff <duff@adacore.com>
256
257 * sem_prag.adb (Validate_Compile_Time_Warning_Error): Attach the
258 warning to the Sloc of the first pragma argument, rather than to
259 the pragma itself. This is to make pragmas processed after the
260 back end use the same Sloc as pragmas processed earlier, in the
261 front end. There's no reason for this discrepancy, and it
262 hinders further work on this ticket.
263
724b81a6 2642019-08-14 Bob Duff <duff@adacore.com>
265
266 * sem.ads (Inside_A_Generic): Remove the ??? comment.
267
ef221ed2 2682019-08-14 Eric Botcazou <ebotcazou@adacore.com>
269
270 * inline.ads (Pending_Descriptor): Delete.
271 * inline.adb (Initialize): Do not initialize it.
272 * sem_ch12.adb (Delay_Descriptors): Delete.
273 (Analyze_Package_Instantiation): Call
274 Set_Delay_Subprogram_Descriptors instead of Delay_Descriptors
275 throughout.
276
42e0489b 2772019-08-14 Bob Duff <duff@adacore.com>
278
279 * exp_aggr.adb (Init_Hidden_Discriminants): Avoid processing the
280 wrong discriminant, which could be of the wrong type.
281
1dd4e4df 2822019-08-14 Eric Botcazou <ebotcazou@adacore.com>
283
284 * sem_ch12.adb (Analyze_Instance_And_Renamings): Do not reset
285 the Is_Generic_Instance flag previously set on the package
286 generated for the instantiation of a generic subprogram.
287
52050469 2882019-08-14 Ed Schonberg <schonberg@adacore.com>
289
290 * exp_ch4.adb (Expand_N_Quantified_Expression): Freeze
291 explicitly the type of the loop parameter.
292
0cca4508 2932019-08-14 Javier Miranda <miranda@adacore.com>
294
295 * sem_util.adb (New_Copy_Tree.Copy_Node_With_Replacement):
296 Update the Chars attribute of identifiers.
297
7bd7174a 2982019-08-14 Yannick Moy <moy@adacore.com>
299
300 * sem_spark.adb, sem_spark.ads (Is_Legal): New function exposed
301 for use in GNATprove, to test legality rules not related to
302 permissions.
303 (Check_Declaration_Legality): Extract the part of
304 Check_Declaration that checks rules not related to permissions.
305 (Check_Declaration): Call the new Check_Declaration_Legality.
306 (Check_Type_Legality): Rename of Check_Type. Introduce
307 parameters to force or not checking, and update a flag detecting
308 illegalities.
309 (Check_Node): Ignore attribute references in statement position.
310
7d2da10f 3112019-08-14 Yannick Moy <moy@adacore.com>
312
313 * sem_spark.adb (Check_Old_Loop_Entry): New procedure to check
314 correct use of Old and Loop_Entry.
315 (Check_Node): Check subprogram contracts.
316 (Check_Pragma): Check Loop_Variant.
317 (Check_Safe_Pointers): Apply checking to library-level
318 subprogram declarations as well, in order to check their
319 contract.
320
a62147e6 3212019-08-14 Yannick Moy <moy@adacore.com>
322
323 * sem_spark.adb (Is_Subpath_Expression): Take into account
324 conversion and qualification.
325
a9bd384f 3262019-08-14 Eric Botcazou <ebotcazou@adacore.com>
327
328 * sem_ch7.adb (Install_Private_Declarations)
329 <Swap_Private_Dependents>: Do not rely solely on the
330 Is_Child_Unit flag on the unit to recurse.
331 (Uninstall_Declarations) <Swap_Private_Dependents>: New
332 function. Use it to recurse on the private dependent entities
333 for child units.
334
e2b5ac32 3352019-08-14 Javier Miranda <miranda@adacore.com>
336
337 * exp_aggr.adb (Is_CCG_Supported_Aggregate): Return False for
338 arrays with bounds not known at compile time.
339
8e2a1f8f 3402019-08-14 Ed Schonberg <schonberg@adacore.com>
341
342 * sem_util.adb (New_Copy_Tree, Visit_Entity): A quantified
343 expression includes the implicit declaration of the loop
344 parameter. When a quantified expression is copied during
345 expansion, for example when building the precondition code from
346 the generated pragma, a new loop parameter must be created for
347 the new tree, to prevent duplicate declarations for the same
348 symbol.
349
f27aa0dc 3502019-08-14 Yannick Moy <moy@adacore.com>
351
352 * sem_disp.adb (Check_Dispatching_Operation): Update assertion
353 for the separate declarations created in GNATprove mode.
354 * sem_disp.ads (Is_Overriding_Subprogram): Update comment.
355 * sem_elab.adb (SPARK_Processor): Fix test for checking of
356 overriding primitives.
357
bd94cd6a 3582019-08-14 Eric Botcazou <ebotcazou@adacore.com>
359
360 * inline.adb (Add_Inlined_Body): Tweak comments.
361 (List_Inlining_Info): Also list information about non-main
362 units.
363
ab791a8d 3642019-08-14 Gary Dismukes <dismukes@adacore.com>
365
366 * sem_ch4.adb (Analyze_Selected_Component): In the case where
367 the prefix is of a concurrent type, and the selected entity
368 matching the selector is the first private declaration of the
369 type (such as the first local variable in a task's body), set
370 Is_Private_Op.
371
8325ffc0 3722019-08-14 Piotr Trojanek <trojanek@adacore.com>
373
374 * einfo.adb (Is_Generic_Actual_Subprogram): Replace repeated
375 calls to Ekind with Ekind_In.
376
d1170f8d 3772019-08-13 Richard Sandiford <richard.sandiford@arm.com>
378
379 PR middle-end/91421
380 * gcc-interface/trans.c (gigi): Call set_decl_buillt_in_function.
381 (Call_to_gnu): Use DECL_FE_FUNCTION_CODE instead of DECL_FUNCTION_CODE.
382
d042fb93 3832019-08-13 Eric Botcazou <ebotcazou@adacore.com>
384
385 * ali.ads (Linker_Option_Record): Remove Original_Pos component.
386 * ali.adb (Scan_ALI): Do not set it.
387
69ddd862 3882019-08-13 Eric Botcazou <ebotcazou@adacore.com>
389
390 * sem_ch3.adb (Build_Derived_Concurrent_Type): Add a couple of
391 local variables and use them. When the derived type fully
392 constrains the parent type, rewrite it as a subtype of an
393 implicit (unconstrained) derived type instead of the other way
394 around.
395 (Copy_And_Build): Deal with concurrent types and use predicates.
396 (Build_Derived_Private_Type): Build the full derivation if
397 needed for concurrent types too.
398 (Build_Derived_Record_Type): Add marker comment.
399 (Complete_Private_Subtype): Use predicates.
400
cfb10d96 4012019-08-13 Ed Schonberg <schonberg@adacore.com>
402
403 * sem_ch3.adb (Check_Generic_Ancestor): New subprogram,
404 aubsidiary to Build_Derived_Record_Type. to enforce the rule
405 that a type extension declared in a generic body cznnot have an
406 ancestor that is a generic formal (RM 3.9.1 (4/2)). The rule
407 applies to all ancestors of the type, including interface
408 progenitors.
409
2fec02ad 4102019-08-13 Eric Botcazou <ebotcazou@adacore.com>
411
412 * sem_ch3.adb (Build_Underlying_Full_View): Delete.
413 (Complete_Private_Subtype): Do not set the full view on the
414 private subtype here. If the full base is itself derived from
415 private, do not re-derive the parent type but instead constrain
416 an existing underlying full view.
417 (Prepare_Private_Subtype_Completion): Do not get to the
418 underlying full view, if any. Set the full view on the private
419 subtype here.
420 (Process_Full_View): Likewise.
421 * sem_ch12.adb (Check_Generic_Actuals): Also set
422 Is_Generic_Actual_Type on the full view if the type of the
423 actual is private.
424 (Restore_Private_Views): Also reset Is_Generic_Actual_Type on
425 the full view if the type of the actual is private.
426 * sem_eval.adb (Subtypes_Statically_Match): Remove bypass for
427 generic actual types.
428
e2cbc305 4292019-08-13 Javier Miranda <miranda@adacore.com>
430
431 * sem_res.adb (Resolve_Selected_Component): When the type of the
432 component is an access to a class-wide type and the type of the
433 context is an access to a tagged type the relevant type is that
434 of the component (since in such case we may need to generate
435 implicit type conversions or dispatching calls).
436
ea791f8e 4372019-08-13 Ed Schonberg <schonberg@adacore.com>
438
439 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Preanalyze
440 expression, rather do a full analysis, to prevent unwanted
441 removal of side effects which mask the intent of the expression.
442
da8cdc91 4432019-08-13 Eric Botcazou <ebotcazou@adacore.com>
444
445 * impunit.adb (Non_Imp_File_Names_95): Add
446 GNAT.Branch_Prediction.
447
b212de5b 4482019-08-13 Eric Botcazou <ebotcazou@adacore.com>
449
450 * exp_ch6.adb: Remove with and use clauses for Sem_Ch12.
451 (Expand_Call_Helper): Swap the back-end inlining case and the
452 special front-end expansion case. In back-end inlining mode, do
453 not invoke Add_Inlined_Body unless the call may be inlined.
454 * inline.ads (Add_Pending_Instantiation): New function moved
455 from...
456 * inline.adb (Add_Inlined_Body): Simplify comment. Turn test on
457 the enclosing unit into assertion.
458 (Add_Pending_Instantiation): New function moved from...
459 * sem_ch12.ads (Add_Pending_Instantiation): ...here.
460 * sem_ch12.adb (Add_Pending_Instantiation): ...here.
461
2cd122d8 4622019-08-13 Eric Botcazou <ebotcazou@adacore.com>
463
464 * sem.adb (Do_Analyze): Recompute Style_Check_Max_Line_Length
465 after restoring Style_Max_Line_Length.
466
f6bd78dd 4672019-08-13 Arnaud Charlet <charlet@adacore.com>
468
469 * sem_ch13.adb (Check_Iterator_Functions): Protect against
470 cascaded errors.
471
bcc2ed52 4722019-08-13 Ed Schonberg <schonberg@adacore.com>
473
474 * sem_ch8.adb (Analyze_Subprogram_Renaming): Do no suppress mode
475 conformance checks on child unit instance that is a compilation
476 unit.
477
e324731f 4782019-08-13 Gary Dismukes <dismukes@adacore.com>
479
480 * exp_dbug.adb (Fully_Qualify_Name): Add full name qualification
481 for the E_Exception case.
482
fa7ccff5 4832019-08-13 Gary Dismukes <dismukes@adacore.com>
484
485 * exp_aggr.adb (Aggr_Size_OK): Compute the aggregate size using
486 universal arithmetic, to avoid situations where the size
487 computation overflows.
488
4571ad41 4892019-08-13 Justin Squirek <squirek@adacore.com>
490
491 * repinfo.adb (List_Scalar_Storage_Order): Modify conditionals
492 for displaying ordering to always be triggered when -gnatR4 is
493 in effect.
494
da558db0 4952019-08-13 Justin Squirek <squirek@adacore.com>
496
497 * aspects.adb, aspects.ads: Register new aspect.
498 * par-prag.adb (Prag): Register new pragma
499 * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing
500 for new aspect similar to Aspect_Max_Entry_Queue_Length.
501 * sem_prag.adb, sem_prag.ads (Analyze_Pragma): Register new
502 pragma and set it to use the same processing as
503 Pragma_Max_Queue_Length.
504 * snames.ads-tmpl: Move definition of
505 Name_Max_Entry_Queue_Length so that it can be processed as a
506 pragma in addition to a restriction and add an entry for the
507 pragma itself.
508
fb48dcd3 5092019-08-13 Yannick Moy <moy@adacore.com>
510
511 * sem_ch4.adb (Analyze_Allocator): Do not insert subtype
512 declaration for allocator inside a spec expression.
513
5bf51e61 5142019-08-13 Yannick Moy <moy@adacore.com>
515
516 * sem_res.adb (Resolve_Call): Do not inline calls inside record
517 types.
518
db3b1a47 5192019-08-13 Eric Botcazou <ebotcazou@adacore.com>
520
521 * sem_ch4.adb (Analyze_One_Call): Remove bypass for type
522 mismatch in nested instantiations.
523 * sem_ch8.adb (Find_Nearer_Entity): New function.
524 (Find_Renamed_Entity): Use it to disambiguate the candidates for
525 the renaming generated for an instantiation when it is
526 ambiguous.
527
175b42e6 5282019-08-13 Eric Botcazou <ebotcazou@adacore.com>
529
530 * gnat1drv.adb (Adjust_Global_Switches): Do not set
531 Back_End_Inlining in ASIS mode either.
532
1e510b63 5332019-08-13 Olivier Hainque <hainque@adacore.com>
534
535 * libgnat/s-win32.ads: Define size_t and fix the MapViewOfFile
536 binding to use it instead of DWORD for the dwNumberOfBytesToMap
537 argument.
538 * libgnat/g-sercom__mingw.adb (Read): State which definition of
539 size_t to fetch in call to Last_Index.
540
bfde37f8 5412019-08-13 Arnaud Charlet <charlet@adacore.com>
542
543 * gcc-interface/Make-lang.in: Remove unused TRACE variable. Pass
544 LN_S to relevant gnatlib targets.
545 * gcc-interface/Makefile.in: Systematically pass LN_S to
546 relevant gnatlib targets.
547
127fec2d 5482019-08-13 Yannick Moy <moy@adacore.com>
549
550 * sem_dim.adb (Analyze_Dimension,
551 Analyze_Dimension_Array_Aggregate, Analyze_Dimension_Call,
552 Analyze_Dimension_Extension_Or_Record_Aggregate): Return
553 immediately when inside an inlined body.
554 * sem_res.adb (Resolve_Call): Remove special checking now done
555 inside Analyze_Dimension_Call.
556
ae328900 5572019-08-13 Justin Squirek <squirek@adacore.com>
558
559 * exp_ch4.adb (Expand_N_Allocator): Add condition to detect
560 library-level object declarations
561
fecd5d5b 5622019-08-13 Eric Botcazou <ebotcazou@adacore.com>
563
564 * doc/gnat_ugn/building_executable_programs_with_gnat.rst
565 (-gnateT): Document Double_Float_Alignment parameter and fix
566 description of Double_Scalar_Alignment parameter.
567 * gnat_ugn.texi: Regenerate.
568
8105dc37 5692019-08-13 Eric Botcazou <ebotcazou@adacore.com>
570
571 * exp_ch6.adb (Expand_Call_Helper): If back-end inlining is
572 enabled, also instantiate the body of a generic unit containing
573 a subprogram subject to aspect/pragma Inline_Always at
574 optimization level zero.
575 * sem_ch12.adb (Might_Inline_Subp): Minor tweak.
576 (Analyze_Package_Instantiation): Do not instantiate the package
577 body because of inlining considerations if the instantiation is
578 done in a generic unit. Move around similar condition involving
579 the main unit. Add test on Back_End_Inlining to processing for
580 front-end inlining.
581
80a305cd 5822019-08-13 Javier Miranda <miranda@adacore.com>
583
584 * exp_disp.adb (Make_Secondary_DT): Handle record type
585 derivations that have interface components located at fixed
586 positions and interface components located at variable offset.
587 The offset of components located at fixed positions is computed
588 using the dummy object (similar to the case where all the
589 interface components are located at fixed positions).
590 (Make_DT): Build the dummy object for all tagged types that
591 implement interface types (that is, build it also for types with
592 variable size components), and use the dummy object to compute
593 the offset of all tag components located at fixed positions when
594 initializing the Interface_Table object.
595
0fabbf2c 5962019-08-13 Justin Squirek <squirek@adacore.com>
597
598 * gnatcmd.adb (GNATCmd): Add constant for new compiler switch
599 --help-ada, and include usage subprogram. Add line to usage help
600 explaining the new flag.
601 (GNATCmd_Usage): Rename from locally declared Usage so as not to
602 confuse with the newly imported version. Add new argument case
603 for --help-ada and add bug report email to implicit display of
604 help without the --help flag so as to unify output between the
605 two cases.
606
9c811f40 6072019-08-13 Dmitriy Anisimkov <anisimko@adacore.com>
608
609 * libgnat/g-comlin.adb (Getopt): Quote unrecognized switch in
610 Invalid_Switch exception message.
611
04c6a988 6122019-08-13 Yannick Moy <moy@adacore.com>
613
614 * sem_util.adb (Traverse_More_Func): Take into account
615 Loop_Actions inside N_Iterated_Component_Association nodes.
616 * sinfo.ads: Document correctly Loop_Actions as a field of nodes
617 of kind N_Iterated_Component_Association.
618
9c3e12d7 6192019-08-13 Claire Dross <dross@adacore.com>
620
621 * libgnat/a-cfinve.adb, libgnat/a-cofove.adb (Find_Index,
622 Reverse_Find_Index): Use bigger type to avoid range check
623 failure at the last loop iteration.
624
a4ea964c 6252019-08-12 Dmitriy Anisimkov <anisimko@adacore.com>
626
627 * libgnat/g-socket.adb (Is_IPv6_Address): Check that no less
628 then 2 colons in IPv6 numeric address.
629
4b422b29 6302019-08-12 Dmitriy Anisimkov <anisimko@adacore.com>
631
632 * libgnat/g-comlin.ads, libgnat/g-comlin.adb (Getopt): Add
633 parameter Quiet. Need to do not output error messages to
634 console. Invalid_Switch exception generation surrounded by an
635 error message.
636
fec0c7f6 6372019-08-12 Ed Schonberg <schonberg@adacore.com>
638
639 * exp_ch6.adb (Expand_Actuals. Add_Call_By_Copy_Code): Add code
640 to generate proper checks when an actual for an in-out or out
641 parameter has a non-null access type. No constraints are
642 applied to an inbound access parameter, but on exit a not-null
643 check must be performed if the type of the actual requires it.
644
41765355 6452019-08-12 Ed Schonberg <schonberg@adacore.com>
646
647 * sem_util.adb (Is_Expaned_Priority_Attribute): Check whether
648 call comes from a rewritten attribute before comparing name with
649 Get_Ceiling run-time subprogram.
650
99b6268d 6512019-08-12 Eric Botcazou <ebotcazou@adacore.com>
652
653 * exp_util.ads (Component_May_Be_Bit_Aligned): Small comment
654 tweaks.
655 (Possible_Bit_Aligned_Component): Likewise.
656 (Type_May_Have_Bit_Aligned_Components): Likewise.
657 * exp_util.adb (Component_May_Be_Bit_Aligned): Likewise.
658 (Possible_Bit_Aligned_Component): Likewise.
659 (Type_May_Have_Bit_Aligned_Components): Likewise.
660
5d2fb1fa 6612019-08-12 Eric Botcazou <ebotcazou@adacore.com>
662
663 * exp_ch4.adb (Expand_N_Op_Eq): Expand the array equality if
664 either operand is a possibly unaligned slice.
665 * exp_ch6.adb (Expand_Simple_Function_Return): Do not generate a
666 copy for a possibly unaligned object if it is represented as a
667 scalar.
668 * exp_util.adb (Is_Possibly_Unaligned_Slice): Do not always
669 return false if the target doesn't have strict alignment.
670
bb0246a6 6712019-08-12 Bob Duff <duff@adacore.com>
672
673 * sem_ch12.adb (Instantiate_Package_Body): Remove suppression of
674 checks in instances of internal units.
675 * sem_ch6.adb (Analyze_Function_Return): Do not generate a
676 constraint check on an extended_return_statement if the subtype
677 of the return object in the statement is identical to the return
678 subtype of the function.
679
f0bbb55a 6802019-08-12 Bob Duff <duff@adacore.com>
681
682 * libgnat/a-cbmutr.adb (Is_Reachable): Declare Idx to be of the
683 base subtype. Clearly it makes no sense to loop "while Idx >=
684 0", if Idx is of a nonnegative subtype.
685
91f3d9d4 6862019-08-12 Bob Duff <duff@adacore.com>
687
688 * libgnat/a-tifiio.adb (Put_Scaled): Prevent AA from being
689 negative, since Field is range 0 .. something.
690
d8f36b1a 6912019-08-12 Bob Duff <duff@adacore.com>
692
693 * doc/gnat_ugn/gnat_utility_programs.rst (gnatmetric, gnatpp,
694 gnatstub): Remove documentation for Ada language version
695 switches, and note that they are no longer needed.
696
6f663d96 6972019-08-12 Gary Dismukes <dismukes@adacore.com>
698
699 * sem_ch5.adb (Prepare_Param_Spec_Loop): Set the parents of the
700 copied low and high bounds in the case where the loop range is
701 given by a discrete_subtype_indication, to prevent hanging (or
702 Assert_Failure) in Insert_Actions.
703
32b3786f 7042019-08-12 Ed Schonberg <schonberg@adacore.com>
705
706 * sem_ch6.adb (heck_Untagged_Equality): Verify that user-defined
707 equality has the same profile as the predefined equality before
708 applying legality rule in RM 4.5.2 (9.8).
709
759d145f 7102019-08-12 Bob Duff <duff@adacore.com>
711
712 * libgnat/a-except.ads: Update obsolete comment, still making
713 clear that this is a variant. Add explicit default for Id
714 component of Exception_Occurrence, because that value is used.
715 Define Null_Occurrence less redundantly.
716 * libgnat/a-einuoc.adb: Minor simplification of code.
717
cee17a56 7182019-08-12 Justin Squirek <squirek@adacore.com>
719
720 * libgnat/a-dhfina.adb, libgnat/a-dhfina.ads (Is_Simple_Name,
721 Is_Root_Directory, Is_Parent_Directory,
722 Is_Current_Directory_Name, Is_Relative_Name, Initial_Directory,
723 Relative_Name, Compose): Add implementation and documentation.
724 * libgnat/a-direct.adb (Containing_Directory): Modify routine to
725 use routines from Ada.Directories.Hierarchical_File_Names and
726 remove incorrect special case for parent directories.
727 (Fetch_Next_Entry): Add check for current directory and parent
728 directory and ignore them under certain circumstances.
729 (Simple_Nmae): Add check for null result from
730 Simple_Name_Internal and raise Name_Error.
731 (Simple_Name_Internal): Add explicit check for root directories,
732 sanitize trailing directory separators, and modify behavior so
733 that current and parent directories are considered valid
734 results.
735 * Makefile.rtl: Add entry to GNATRTL_NONTASKING_OBJS.
736
cc87412b 7372019-08-12 Eric Botcazou <ebotcazou@adacore.com>
738
739 * freeze.adb (Freeze_Entity): Give the same error for an
740 Object_Size clause on a variable-sized type as for a Size
741 clause.
742
a6b48bfe 7432019-08-12 Gary Dismukes <dismukes@adacore.com>
744
745 * sem_prag.adb (Analyze_Pragma, Pragma_Suppress_Initialization):
746 For private types, set the Suppress_Initialization flag on the
747 Full_View of the entity rather than the entity's base type.
748
adb8ac81 7492019-08-12 Yannick Moy <moy@adacore.com>
750
751 * aspects.adb, aspects.ads (Aspect_No_Caching): New aspect.
752 * contracts.adb, contracts.ads (Add_Contract_Item): Add handling
753 of No_Caching.
754 (Analyze_Object_Contract): Add handling of No_Caching.
755 * einfo.adb, einfo.ads
756 (Get_Pragma): Add handling of No_Caching.
757 * doc/gnat_rm/implementation_defined_aspects.rst,
758 doc/gnat_rm/implementation_defined_pragmas.rst: Document new
759 aspect/pragma.
760 * gnat_rm.texi: Regenerate.
761 * par-prag.adb (Prag): New pragma Pragma_No_Caching.
762 * sem_ch13.adb (Analyze_Aspect_Specifications,
763 Check_Aspect_At_Freeze_Point): Add handling of No_Caching.
764 * sem_prag.adb (Analyze_Pragma): Deal with pragma No_Caching.
765 * sem_prag.ads (Analyze_External_Property_In_Decl_Part): Now
766 applies to No_Caching.
767 * sem_util.adb, sem_util.ads (Is_Effectively_Volatile): Add
768 handling of No_Caching.
769 (No_Caching_Enabled): New query function.
770 * snames.ads-tmpl: New names for pragma.
771
f50cb3de 7722019-08-12 Yannick Moy <moy@adacore.com>
773
774 * sem_util.adb, sem_util.ads (Traverse_More_Func,
775 Traverse_More_Proc): Add formal parameter for Itypes traversal.
776
65566aa4 7772019-08-12 Yannick Moy <moy@adacore.com>
778
779 * exp_attr.adb, exp_attr.ads (Expand_Size_Attribute): New
780 procedure to share part of the attribute expansion with
781 GNATprove mode.
782 (Expand_N_Attribute_Reference): Extract part of the
783 Size/Object_Size expansion in the new procedure
784 Expand_Size_Attribute.
785 * exp_spark.adb (Expand_SPARK_N_Attribute_Reference): Expand
786 Size/Object_Size attributes using the new procedure
787 Expand_Size_Attribute.
788
f8ca05f5 7892019-08-12 Yannick Moy <moy@adacore.com>
790
791 * exp_spark.adb (Expand_SPARK_N_Attribute_Reference): Only
792 expand Enum_Rep attribute when its parameter is a literal.
793
0175b8fe 7942019-08-12 Justin Squirek <squirek@adacore.com>
795
796 * sem_eval.adb (Check_Non_Static_Context): Add a condition to
797 determine if a range violation constitues a warning or an error.
798 (Out_Of_Range): Add a condition to determine if a range
799 violation constitues a warning or an error.
800
809a3252 8012019-08-12 Eric Botcazou <ebotcazou@adacore.com>
802
803 * exp_ch4.adb (Real_Range_Check): Do not rewrite the conversion
804 node but its expression instead, after having fetched its
805 current value. Clear the Do_Range_Check flag on entry. Return
806 early for a rewritten float-to-float conversion. Remove
807 redundant local variable. Suppress all checks when inserting
808 the temporary and do not reanalyze the node.
809
86d280c6 8102019-08-12 Eric Botcazou <ebotcazou@adacore.com>
811
812 * sprint.ads: Minor comment tweak.
813
138c6242 8142019-08-12 Eric Botcazou <ebotcazou@adacore.com>
815
816 * checks.adb (Insert_Valid_Check): Do not retrieve the
817 Do_Range_Check flag from the Original_Node but from the
818 Validated_Object. Remove useless bypass for floating-point
819 types.
820
ab16206d 8212019-08-12 Yannick Moy <moy@adacore.com>
822
823 * sem_util.adb, sem_util.ads (Traverse_More_Func,
824 Traverse_More_Proc): New traversal subprograms.
825
1ca535ae 8262019-08-12 Jerome Lambourg <lambourg@adacore.com>
827
828 * libgnarl/s-taprop__vxworks.adb (Abort_Handler): Only call
829 s-tpopsp.Self when actually needed.
830
9f49d9e6 8312019-08-12 Eric Botcazou <ebotcazou@adacore.com>
832
833 * exp_ch4.adb (Discrete_Range_Check): Return if checks are
834 suppressed.
835
a8bcbb37 8362019-08-12 Eric Botcazou <ebotcazou@adacore.com>
837
838 * sem_res.adb: Add with & use clause for Sem_Mech and
839 alphabetize.
840 (Resolve_Actuals): Do not apply a scalar range check for the
841 source of a conversion whose result is passed by reference to a
842 valued procedure.
843
e54cffd1 8442019-08-12 Eric Botcazou <ebotcazou@adacore.com>
845
846 * checks.adb (Insert_Valid_Check): Reset the Do_Range_Check flag
847 on the validated object.
848 * exp_ch6.adb (Add_Call_By_Copy_Code): Reset the Do_Range_Check
849 flag on the actual here, as well as on the Expression if the
850 actual is a N_Type_Conversion node.
851 (Add_Validation_Call_By_Copy_Code): Generate the incoming range
852 check if needed and reset the Do_Range_Check flag on the
853 Expression if the actual is a N_Type_Conversion node.
854 (Expand_Actuals): Do not reset the Do_Range_Check flag here.
855 Generate the incoming range check for In parameters here instead
856 of...
857 (Expand_Call_Helper): ...here. Remove redudant condition.
858 * sem_res.adb (Resolve_Actuals): Use local variable A_Typ and
859 remove obsolete comments.
860 (Resolve_Type_Conversion): Do not force the Do_Range_Check flag
861 on the operand if range checks are suppressed.
862
df1c131a 8632019-08-12 Eric Botcazou <ebotcazou@adacore.com>
864
865 * checks.adb (Activate_Range_Check): Remove redundant argument.
866 (Generate_Range_Check): Likewise.
867 (Apply_Float_Conversion_Check): Reset the Do_Range_Check flag on
868 entry and remove redundant condition.
869
c5c4ce6c 8702019-08-02 Alexandre Oliva <oliva@adacore.com>
87541248 871
872 * libgnat/a-exexpr.adb (Begin_Handler_v1, End_Handler_v1): New.
873 (Claimed_Cleanup): New.
874 (Begin_Handler, End_Handler): Document.
875 * gcc-interface/trans.c (gigi): Switch to exception handler
876 ABI #1.
877 (Exception_Handler_to_gnu_gcc): Save the original cleanup
878 returned by begin handler, pass it to end handler, and use
879 EH_ELSE_EXPR to pass a propagating exception to end handler.
880 (gnat_to_gnu): Leave the exception pointer alone for reraise.
881 (add_cleanup): Handle EH_ELSE_EXPR, require it by itself.
882
dcccb125 8832019-07-23 Ed Schonberg <schonberg@adacore.com>
884
885 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations,
886 Freeze_Entity_Checks): Include Aspect_CPU with other aspects
887 whose expresssion may depend on a discriminant, and thus require
888 that components of the type be made visible.
889
0275bc70 8902019-07-23 Eric Botcazou <ebotcazou@adacore.com>
891
892 * checks.adb (Convert_And_Check_Range): Add Suppress parameter
893 and pass it in the call to Insert_Actions. Rename local
894 variable.
895 (Generate_Range_Check): Minor comment fixes. Pass Range_Check
896 in the first call to Convert_And_Check_Range and All_Checks in
897 the second call.
898 * exp_ch4.adb (Expand_N_Type_Conversion): Reset the
899 Do_Overflow_Check flag in the float-to-float case too if there
900 is also a range check.
901
79ee9e76 9022019-07-23 Eric Botcazou <ebotcazou@adacore.com>
903
904 * checks.adb (Activate_Overflow_Check): Remove redundant
905 argument.
906 * exp_ch4.adb (Discrete_Range_Check): Reset the overflow flag.
907 (Expand_N_Type_Conversion): Do not reset it here.
908
87b5a4e8 9092019-07-23 Eric Botcazou <ebotcazou@adacore.com>
910
911 * repinfo.adb (List_Component_Layout): Pass Decimal to UI_Write.
912 (Write_Val): Likewise.
913
441fbb64 9142019-07-23 Ed Schonberg <schonberg@adacore.com>
915
916 * aspects.ads: New table Operational_Aspect, used to distinguish
917 between aspects that are view-specific, such as those related to
918 iterators, and representation aspects that apply to all views of
919 a type.
920 * aspects.adb (Find_Aspect): If the aspect being sought is
921 operational, do not ecamine the full view of a private type to
922 retrieve it.
923 * sem_ch5.adb (Analyze_Iterator_Specification): Improve error
924 message when the intended domain of iteration does not implement
925 the required iterator aspects.
926
583f62e9 9272019-07-23 Yannick Moy <moy@adacore.com>
928
929 * sem_spark.ads (Is_Local_Context): New function.
930 * sem_spark.adb (Check_Declaration): Issue errors on violations
931 of SPARK RM 3.10(4)
932 (Process_Path): Do not issue error on borrow/observe during
933 elaboration, as these are caught by the new rule.
934
ec154f5b 9352019-07-23 Yannick Moy <moy@adacore.com>
936
937 * exp_ch7.adb (Create_Finalizer): Force finalizer not to be
938 Ghost enabled.
939 * exp_dbug.adb (Get_External_Name): Explain special case of
940 Ghost finalizer.
941
e1598796 9422019-07-22 Eric Botcazou <ebotcazou@adacore.com>
943
944 * repinfo.adb (List_Entities): Also list compiled-generated
945 types present as Etype of objects.
946
da90894a 9472019-07-22 Eric Botcazou <ebotcazou@adacore.com>
948
949 * sinfo.ads: Update the documentation about the
950 Do_Division_Check, Do_Overflow_Check and Do_Range_Check flags.
951
bb8b9752 9522019-07-22 Eric Botcazou <ebotcazou@adacore.com>
953
954 * exp_ch4.adb (Expand_N_Type_Conversion): Beef up comment.
955 (Fixup_Universal_Fixed_Operation): Set the base type instead of
956 the type of the enclosing type conversion on the operation.
957
aeb4eb17 9582019-07-22 Ed Schonberg <schonberg@adacore.com>
959
960 * exp_ch4.adb (Expand_N_In): Do not suggest the use of attribute
961 'Valid as a replacement for a range check on a discrete type
962 when the bounds of the range are given by type conversions,
963 because in such a case there are distinct types involved and the
964 subbested attribute replacement would be misplaced.
965
30cf324b 9662019-07-22 Yannick Moy <moy@adacore.com>
967
968 * sem_spark.adb (Get_Root_Object, Is_Path_Expression,
969 Is_Subpath_Expression): Add parameter Is_Traversal to adapt
970 these functions to the case of paths returned from a traversal
971 function.
972 (Read_Indexes): Handle the case of an if-expression or
973 case-expression.
974 (Check_Statement): Check Emit_Messages only when issuing an
975 error message. This is important as Emit_Messages may store the
976 information that an error was detected.
977
72c474b5 9782019-07-22 Eric Botcazou <ebotcazou@adacore.com>
979
980 * checks.adb (Apply_Type_Conversion_Checks): Do not set
981 Do_Range_Check flag on conversions from fixed-point types
982 either.
983 * exp_attr.adb: Add use and with clause for Expander.
984 (Expand_N_Attribute_Reference) <Fixed_Value, Integer_Value>: Set
985 the Conversion_OK flag and do not generate overflow/range checks
986 manually.
987 * exp_ch4.adb (Expand_N_Qualified_Expression): Remove
988 superfluous clearing of Do_Range_Check flag.
989 (Discrete_Range_Check): New procedure to generate a range check
990 for discrete types.
991 (Real_Range_Check): Remove redundant local variable and adjust.
992 Remove useless shortcut. Clear Do_Range_Check flag on all
993 paths.
994 (Expand_N_Type_Conversion): Remove redundant test on
995 Conversion_OK. Call Discrete_Range_Check to generate range
996 checks on discrete types. Remove obsolete code for
997 float-to-integer conversions. Add code to generate range checks
998 for conversions involving fixed-point types.
999
39cdd055 10002019-07-22 Eric Botcazou <ebotcazou@adacore.com>
1001
1002 * sprint.ads: Fix pasto in comment.
1003
9af8c78a 10042019-07-22 Javier Miranda <miranda@adacore.com>
1005
1006 * sem_res.adb (Resolve_Actuals): Replace code that displaces the
1007 pointer to an allocated object to reference its secondary
1008 dispatch table by a type conversion (which takes care of
1009 handling all cases).
1010
0ff5a502 10112019-07-22 Eric Botcazou <ebotcazou@adacore.com>
1012
1013 * sprint.adb (Sprint_Node_Actual)
1014 <N_Decimal_Fixed_Point_Definition>: Swap a couple of spaces.
1015 (Write_Itype): Minor consistency fixes throughout. Add support
1016 for printing ordinary and decimal fixed-point types and
1017 subtypes.
1018
8c6eab72 10192019-07-22 Eric Botcazou <ebotcazou@adacore.com>
1020
1021 * exp_attr.adb (Expand_Loop_Entry_Attribute): Beef up comment.
1022
76ed386d 10232019-07-22 Ed Schonberg <schonberg@adacore.com>
1024
1025 * libgnat/s-valboo.ads, libgnat/s-valcha.ads,
1026 libgnat/s-valdec.ads, libgnat/s-valenu.ads,
1027 libgnat/s-valint.ads, libgnat/s-vallld.ads,
1028 libgnat/s-vallli.ads, libgnat/s-valllu.ads,
1029 libgnat/s-valrea.ads, libgnat/s-valuns.ads,
1030 libgnat/s-valwch.ads: Change categorization of packages that
1031 implement attribute 'Value from Pure to Preelaborate, to prevent
1032 undesirable optimizations when the evaluation of the attribute
1033 raises Constraint_Error, but subsequent use of the result of
1034 this evsaluation is removed by a subsequent optimization.
1035
e869060d 10362019-07-22 Ed Schonberg <schonberg@adacore.com>
1037
1038 * sem_warn.adb (Check_References): Do not emit s warning on a
1039 referenced entity with no explicit assignment if the type of the
1040 entity has Preelaborable_Initialixation, such as
1041 Exception_Occurrence.
1042
9bf70d94 10432019-07-22 Javier Miranda <miranda@adacore.com>
1044
1045 * exp_ch4.adb (Size_In_Storage_Elements): Improve the expansion
1046 to handle array indexes that are modular type.
1047 (Expand_N_Allocator): For 32-bit targets improve the generation
1048 of the runtime check associated with large arrays supporting
1049 arrays initialized with a qualified expression.
1050 * libgnat/s-imenne.adb (Image_Enumeration_8,
1051 Image_Enumeration_16, Image_Enumeration_32): Define the index of
1052 Index_Table with range Natural'First .. Names'Length since in
1053 the worst case all the literals of the enumeration type would be
1054 single letter literals and the Table built by the frontend would
1055 have as many components as the length of the names string. As a
1056 result of this enhancement, the internal tables declared using
1057 Index_Table have a length closer to the real needs, thus
1058 avoiding the declaration of large arrays on 32-bit CCG targets.
1059
b0da310b 10602019-07-22 Yannick Moy <moy@adacore.com>
1061
1062 * sem_ch3.adb (Constrain_Access): Issue a message about ignored
1063 constraint.
1064
592e600a 10652019-07-22 Eric Botcazou <ebotcazou@adacore.com>
1066
1067 * sem_ch8.adb (End_Use_Type): Reset the In_Use flag on the
1068 class-wide type if the type is tagged.
1069 (Use_One_Type): Add commentary on the handling of the class-wide
1070 type.
1071
c1eeb1c6 10722019-07-22 Eric Botcazou <ebotcazou@adacore.com>
1073
1074 * einfo.ads (Is_For_Access_Subtype): Delete.
1075 (Set_Is_For_Access_Subtype): Likewise.
1076 * einfo.adb (Is_For_Access_Subtype): Likewise.
1077 (Set_Is_For_Access_Subtype): Likewise.
1078 (Write_Entity_Flags): Do not write Is_For_Access_Subtype.
1079 * exp_ch4.adb (Expand_N_Selected_Component): Do not deal with
1080 it.
1081 * exp_spark.adb (Expand_SPARK_N_Selected_Component): Likewise.
1082 * sem_ch4.adb (Analyze_Explicit_Dereference): Likewise.
1083 * sem_ch3.adb (Build_Discriminated_Subtype): Do not build a
1084 special private subtype for access-to-record subtypes.
1085
3eb44c27 10862019-07-22 Eric Botcazou <ebotcazou@adacore.com>
1087
1088 * sem_ch3.adb (Complete_Private_Subtype): Rework the setting of
1089 the Etype of the full view for full base types that cannot
1090 contain any discriminant. Remove code and comment about it in
1091 the main path.
1092
9c6c2b81 10932019-07-22 Ed Schonberg <schonberg@adacore.com>
1094
1095 * sem_ch3.adb (Convert_Bound): Subsidiary of
1096 Floating_Point_Type_Declaration, to handle properly range
1097 specifications with bounds that may include static constants of
1098 a given type rather than real literals.
1099
d5dbc1bb 11002019-07-22 Eric Botcazou <ebotcazou@adacore.com>
1101
1102 * sem_aggr.adb (Rewrite_Bound): Be prepared for discriminals
1103 too.
1104 (Rewrite_Range;): Minor tweak.
1105 (Resolve_Record_Aggregate): For a component with default
1106 initialization whose expression is an array aggregate, also
1107 rewrite the bounds of the component associations, if any.
1108
37f1cae9 11092019-07-22 Gary Dismukes <dismukes@adacore.com>
1110
1111 * exp_ch5.adb (Expand_N_Case_Statement): In the case where a
1112 case statement is rewritten as an equivalent if statement,
1113 inherit the From_Condition_Expression flag from the case
1114 statement.
1115
e6368760 11162019-07-22 Eric Botcazou <ebotcazou@adacore.com>
1117
1118 * sem_ch8.adb (Check_Constrained_Object): Further extend the
1119 special optimization to all limited types.
1120
9b8341e7 11212019-07-22 Eric Botcazou <ebotcazou@adacore.com>
1122
1123 * exp_attr.adb (Expand_N_Attribute_Reference)
1124 <Attribute_Enum_Val>: Set No_Truncation on the
1125 N_Unchecked_Type_Conversion built around the argument passed to
1126 the attribute.
1127
f930ed43 11282019-07-22 Nicolas Roche <roche@adacore.com>
1129
1130 * libgnat/s-valrea.adb (Scan_Real): Ignore non significative
1131 digits to avoid converging to infinity in some cases.
1132
3474a75e 11332019-07-22 Eric Botcazou <ebotcazou@adacore.com>
1134
1135 * libgnat/g-encstr.adb (Encode_Wide_String): Fix oversight.
1136 (Encode_Wide_Wide_String): Likewise.
1137
a7f20f4b 11382019-07-22 Eric Botcazou <ebotcazou@adacore.com>
1139
1140 * sem_warn.adb (Find_Var): Bail out for a function call with an
1141 Out or In/Out parameter.
1142
a51cd2a2 11432019-07-22 Nicolas Roche <roche@adacore.com>
1144
1145 * terminals.c (__gnat_tty_waitpid): Support both blocking and
1146 not blocking mode.
1147 * libgnat/g-exptty.ads (Is_Process_Running): New function.
1148 * libgnat/g-exptty.adb (Close): Don't try to interrupt/terminate
1149 a process if it is already dead.
1150
36167f09 11512019-07-22 Ed Schonberg <schonberg@adacore.com>
1152
c5c4ce6c 1153 * freeze.adb (Freeze_Fixed_Point_Type): When freezing a
36167f09 1154 fixed-point subtype, check whether the parent type declarastion
1155 includes an aspect specification for the 'Small type attribute,
1156 and inherit the specified value.
1157
b5293e2d 11582019-07-22 Javier Miranda <miranda@adacore.com>
1159
1160 * freeze.adb (Freeze_Subprogram): Check that C++ constructors
1161 must have external or link name.
1162
7c48993c 11632019-07-22 Ed Schonberg <schonberg@adacore.com>
1164
1165 * sem_res.adb (Resolve_Selected_Component): If the prefix has a
1166 deferred reference, generate the correct reference now, to
1167 indicate that the previous assignment is used. This prevents
1168 spurious warnings on useless assignments when compiling with all
1169 warnings enabled. when there is a subsequent call in the same
1170 stqtement list, in which the prefix of the selected component is
1171 the actual for an out parameter.
1172
0b87f8cf 11732019-07-22 Eric Botcazou <ebotcazou@adacore.com>
1174
1175 * exp_attr.adb (Expand_Loop_Entry_Attribute): Copy the condition
1176 of a while loop instead of simply relocating it.
1177
0c41e160 11782019-07-18 Arnaud Charlet <charlet@adacore.com>
1179
1180 * Makefile.rtl, expect.c, env.c, aux-io.c, mkdir.c, initialize.c,
1181 cstreams.c, raise.c, tracebak.c, adadecode.c, init.c, raise-gcc.c,
1182 argv.c, adaint.c, adaint.h, ctrl_c.c, sysdep.c, rtinit.c, cio.c,
1183 seh_init.c, exit.c, targext.c: Introduce a "STANDALONE" mode where C
1184 runtime files do not have any dependency on GCC include files.
1185 Remove unnecessary includes.
1186 Remove remaining references to VMS in runtime C file.
1187 * runtime.h: new File.
1188
0e972d45 11892019-07-13 Andreas Schwab <schwab@linux-m68k.org>
1190
1191 * Makefile.rtl: Use g-sercom__linux.adb for all linuxes.
1192
77fe13f0 11932019-07-11 Piotr Trojanek <trojanek@adacore.com>
1194
1195 * lib-writ.adb (Ensure_System_Dependency,
1196 Up_To_Date_ALI_File_Exists, Write_ALI): Replace low-level access
1197 to table with a high-level query.
1198
56903255 11992019-07-11 Piotr Trojanek <trojanek@adacore.com>
1200
1201 * checks.adb: Fix typo in comment.
1202 * sem.adb (Semantics): Avoid repeated calls to
1203 In_Extended_Main_Source_Unit by reusing an already-cached
1204 result.
1205 * sem_util.adb (First_Global): Fix style.
1206
85f6c73a 12072019-07-11 Yannick Moy <moy@adacore.com>
1208
1209 * sem_res.adb (Resolve_Call): Do not perform dimensionality
1210 checking on inlined bodies.
1211
5083f119 12122019-07-11 Yannick Moy <moy@adacore.com>
1213
1214 * debug.adb: Flip meaning of debug switch -gnatdF.
1215
f237e5eb 12162019-07-11 Yannick Moy <moy@adacore.com>
1217
1218 * sem_eval.adb (Is_Same_Value): Add special case for rewritten
1219 Loop_Entry attribute.
1220
1e5359c0 12212019-07-11 Claire Dross <dross@adacore.com>
1222
1223 * gnat1drv.adb: SPARK checking rules for pointer aliasing are
1224 moved to GNATprove backend.
1225 * sem_spark.ads, sem_spark.adb (Sem_SPARK): Is now a generic
1226 unit. Takes as parameters:
1227 - Retysp which is used to query the most underlying type
1228 visible in SPARK. We do not introduce aliasing checks for
1229 types which are not visibly deep.
1230 - Component_Is_Visible_In_SPARK is used to avoid doing pointer
1231 aliasing checks on components which are not visible in SPARK.
1232 - Emit_Messages returns True in the second phase of SPARK
1233 analysis. Error messages for failed aliasing checks are only
1234 output in this case.
1235 Additionally, errors on constructs not supported in SPARK are
1236 removed as duplicates of marking errors. Components are stored
1237 in the permission map using their original component to avoid
1238 inconsistencies between components of different views of the
1239 same type.
1240 (Check_Expression): Handle delta constraints.
1241 (Is_Deep): Exported so that we can check for SPARK restrictions
1242 on deep types inside SPARK semantic checkings.
1243 (Is_Traversal_Function): Exported so that we can check for SPARK
1244 restrictions on traversal functions inside SPARK semantic
1245 checkings.
1246 (Check_Call_Statement, Read_Indexes): Check wether we are
1247 dealing with a subprogram pointer type before querying called
1248 entity.
1249 (Is_Subpath_Expression): Image attribute can appear inside a
1250 path.
1251 (Check_Loop_Statement): Correct order of statements in the loop.
1252 (Check_Node): Ignore raise nodes.
1253 (Check_Statement): Use Last_Non_Pragma to get the object
1254 declaration in an extended return statement.
1255
fb7f0b28 12562019-07-11 Patrick Bernardi <bernardi@adacore.com>
1257
1258 * bindgen.adb (Gen_Main): Do not generate a reference to
1259 Ada_Main_Program_Name when the Minimal_Binder flag is set.
1260 (Gen_Output_File_Ada): Do not output GNAT_Version and
1261 Ada_Main_Program_Name info if Minimal_Binder flag is set.
1262 * bindusg.adb: Add documentation for new -minimal switch.
1263 * gnatbind.adb (Scan_Bind_Arg): Scan -minimal switch.
1264 * opt.ads: Add new global flag Minimal_Binder to indicate if the
1265 binder should not produce global variables.
1266 * doc/gnat_ugn/building_executable_programs_with_gnat.rst:
1267 Update documentation with new binder -minimal switch.
1268 * gnat_ugn.texi: Regenerate.
1269
6e0725a9 12702019-07-11 Eric Botcazou <ebotcazou@adacore.com>
1271
1272 * Makefile.rtl: Add warning note about compilation flags and
1273 capitalize.
1274
263dcfe9 12752019-07-11 Ed Schonberg <schonberg@adacore.com>
1276
1277 * exp_ch9.adb (Expand_N_Protected_Type_Declaaration): New
1278 subsidiary routine Replace_Access_Definition, to handle properly
1279 a protected type PT one of whose private components is of type
1280 access PT.
1281
dc001f3e 12822019-07-11 Dmitriy Anisimkov <anisimko@adacore.com>
1283
1284 * libgnat/g-socket.ads (Level_Type): Add enumerators for
1285 IP_Protocol_For_ICMP, IP_Protocol_For_IGMP,
1286 IP_Protocol_For_RAW_Level.
1287 * libgnat/g-socket.adb (Levels): Handle them.
1288 * s-oscons-tmplt.c: Import socket protocols defined in
1289 netinet/in.h.
1290
3bcff314 12912019-07-11 Claire Dross <dross@adacore.com>
1292
1293 * libgnat/a-cfhama.adb, libgnat/a-cfhase.adb (Free): Do not
1294 reset the Has_Element flag if no element is freed.
1295
8e22ede8 12962019-07-11 Arnaud Charlet <charlet@adacore.com>
1297
1298 * errno.c: Remove obsolete support for MaRTE OS.
1299
180bd06b 13002019-07-11 Ed Schonberg <schonberg@adacore.com>
1301
1302 * exp_ch4.adb (Expand_N_Type_Conversion): If a predicate check
1303 is generated, analyze it with range check suppressed, because
1304 that check has been previously applied.
1305 * exp_ch5.adb (Expand_N_Assignment_Statement): If the RHS is a
1306 type conversion to the type of the LHS, do not apply a predicate
1307 check to the RHS because it will have been generated already
1308 during its expansion.
1309 * exp_ch6.adb (Can_Fold_Predicate_Call): Extend processing to
1310 handle a predicate check on a constant entity whose value is
1311 static.
1312
32859955 13132019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
1314
1315 * bindo.adb: Remove the documentation of switch -d_N because it
1316 is no longer in use.
1317 * bindo-graphs.ads, bindo-graphs.adb (Is_Spec_Before_Body_Edge):
1318 New routine.
1319 * bindo-writers.adb (Write_Dependency_Edge): Add the missing
1320 case of a spec-before-body edge.
1321
0595f8ff 13222019-07-11 Dmitriy Anisimkov <anisimko@adacore.com>
1323
1324 * libgnat/g-socket.ads (Mode_Type): Add a Socket_Raw enumerator.
1325 * libgnat/g-socket.adb (Modes): Handle Socket_Raw.
1326
af7bae25 13272019-07-11 Justin Squirek <squirek@adacore.com>
1328
1329 * exp_ch9.adb (Build_Private_Protected_Declaration): Add
1330 exception for the moving of pragmas to internally generated
1331 specs for pragma Unreferenced.
1332
87259588 13332019-07-11 Bob Duff <duff@adacore.com>
1334
1335 * doc/gnat_ugn/gnat_utility_programs.rst: Fix inconsistent
1336 documentation for gnatmetric.
1337 * gnat_ugn.texi: Regenerate.
1338
2d95f0f8 13392019-07-11 Bob Duff <duff@adacore.com>
1340
1341 * doc/gnat_ugn/gnat_utility_programs.rst: Document gnatpp's
1342 --spaces-only switch.
1343
814e7b6e 13442019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
1345
1346 * sem_util.adb (Null_Status): Assume that an erroneous construct
1347 has an undefined null status.
1348
53904d64 13492019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
1350
1351 * checks.adb, exp_ch6.adb, gnat1drv.adb, sem_aux.adb,
1352 sem_ch2.adb, sem_ch8.adb, sem_res.adb: Minor reformatting.
1353
21dccd5f 13542019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
1355
1356 * sem_ch8.adb (Analyze_Object_Renaming): Obtain the object being
1357 renamed using routine Get_Object_Name which takes care of
1358 various name forms.
1359 (Get_Object_Name): New routine.
1360
3da5e0d4 13612019-07-11 Ed Schonberg <schonberg@adacore.com>
1362
1363 * exp_ch6.adb (Can_Fold_Predicate_Call): New function,
1364 subsidiary of Expand_Call_Helper, to compute statically a
1365 predicate check when the argument is a static integer.
1366
3d95efc8 13672019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
1368
1369 * sem_res.adb (Resolve_Op_Not): Do not rewrite an equality
1370 operator into a function call when the operator is intrinsic.
1371
8c93b71c 13722019-07-11 Thomas Quinot <quinot@adacore.com>
1373
1374 * sem_prag.adb (Analyze_Pragma, case pragma Check): Do not call
1375 Set_SCO_Pragma_Enabled for the dynamic predicate case.
1376
001b1b6a 13772019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
1378
1379 * exp_util.ads, exp_util.adb (Needs_Finalization): Move to
1380 Sem_Util.
1381 * sem_ch9.adb (Analyze_Protected_Definition): Code cleanup. Mark
1382 the protected type as having controlled components when it
1383 contains at least one such component.
1384 * sem_util.ads, sem_util.adb (Needs_Finalization): New
1385 function.
1386
5dc190e5 13872019-07-11 Eric Botcazou <ebotcazou@adacore.com>
1388
1389 * alloc.ads (Rep_JSON_Table_Initial): New constant.
1390 (Rep_JSON_Table_Increment): Likewise.
1391 * debug.adb: Document -gnatd_j switch.
1392 * gcc-interface/Make-lang.in (GNAT_ADA_OBJS): Add
1393 repinfo-input.o.
1394 * gnat1drv.adb: Add with clause for Repinfo.Input.
1395 Add with and use clauses for Sinput.
1396 (Read_JSON_Files_For_Repinfo): New procedure.
1397 (Gnat1drv1): Deal with -gnatd_j switch.
1398 * repinfo-input.ad[sb]: New unit.
1399 * snames.ads-tmpl (Name_Discriminant): New constant.
1400 (Name_Operands): Likewise.
1401
b1118eb8 14022019-07-11 Justin Squirek <squirek@adacore.com>
1403
1404 * checks.adb (Apply_Accessibility_Check): Add check for constant
1405 folded conditions on accessibility checks.
1406
ef0b2206 14072019-07-11 Arnaud Charlet <charlet@adacore.com>
1408
1409 * libgnarl/g-thread.ads, libgnarl/g-thread.adb (Get_Thread):
1410 Update comments. Add new version taking a Task_Id.
1411
12b1c23b 14122019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
1413
1414 * bindo.adb: Update the section of switches and debugging
1415 elaboration issues.
1416 * bindo.ads: Add type Elaboration_Phase.
1417 * bindo-augmentors.adb: Add use clause for
1418 Bindo.Writers.Phase_Writers.
1419 (Augment_Library_Graph): Signal the start and end of the
1420 aubmentation phase.
1421 * bindo-builders.adb: Add with and use clause for Bindo.Writers.
1422 Add use clause for Bindo.Writers.Phase_Writers.
1423 (Build_Invocation_Graph): Signal the start and end of the
1424 invocation graph construction phase.
1425 (Build_Library_Graph): Signal the start and end of the library
1426 graph construction phase.
1427 * bindo-diagnostics.adb: Add use clause for
1428 Bindo.Writers.Phase_Writers.
1429 (Diagnose_Cycle): Signal the start and end of the cycle
1430 diagnostic phase.
1431 * bindo-elaborators.adb: Add use clause for
1432 Bindo.Writers.Phase_Writers.
1433 (Elaborate_Units): Signal the start and end of the unit
1434 elaboration phase.
1435 * bindo-graphs.adb: Add use clause for
1436 Bindo.Writers.Phase_Writers.
1437 (Find_Components): Signal the start and end of the component
1438 discovery phase.
1439 (Find_Cycles): Signal the start and end of the cycle discovery
1440 phase.
1441 * bindo-units.adb: Add with and use clause for Bindo.Writers.
1442 Add use clause for Bindo.Writers.Phase_Writers.
1443 (Collect_Elaborable_Units): Signal the start and end of the unit
1444 collection phase.
1445 * bindo-validators.adb: Add with and use clause for
1446 Bindo.Writers. Add use clause for Bindo.Writers.Phase_Writers.
1447 (Validate_Cycles, Validate_Elaboration_Order,
1448 Validate_Invocation_Graph, Validate_Library_Graph): Signal the
1449 start and end of the libray graph validation phase.
1450 * bindo-writers.ads, bindo-writers.adb: Add new nested package
1451 Phase_Writers.
1452 * debug.adb: Update the documentation of switch d_S.
1453
d7569e04 14542019-07-11 Yannick Moy <moy@adacore.com>
1455
1456 * sem_res.adb (Check_Argument_Order): Special case calls to
1457 operators.
1458
604c5bca 14592019-07-10 Dmitriy Anisimkov <anisimko@adacore.com>
1460
1461 * libgnat/s-ststop.adb: Remove System.Strings.Stream_Ops
1462 dependence on System.Streams.Stream_IO.
1463
ce9565a8 14642019-07-10 Ed Schonberg <schonberg@adacore.com>
1465
1466 * sem_ch2.adb (Analyze_Integer_Literal): Preserve the type of
1467 the literal if prior analysis determined that its type is a
1468 modular integer type.
1469
e97ee616 14702019-07-10 Doug Rupp <rupp@adacore.com>
1471
1472 * init.c: Do not attempt to re-arm guard page on x86_64-vx7(r2).
1473
c0e85bb6 14742019-07-10 Ed Schonberg <schonberg@adacore.com>
1475
1476 * sem_ch8.adb (Check_Constrained_Object): A record that is
1477 limited because of the presence of a limited component is
1478 constrained, and no subtype indiciation needs to be created for
1479 it, just as is the case for declared limited records.
1480
94654315 14812019-07-10 Yannick Moy <moy@adacore.com>
1482
1483 * sem_aux.adb, sem_aux.ads (Is_Protected_Operation): New
1484 function to determine if a subprogram is protected.
1485 * sem_spark.adb (Setup_Protected_Components): New procedure to
1486 add protected components to the environment.
1487 (Check_Callable_Body): Call the new Setup_Protected_Components.
1488 (Check_Package_Spec): Merge local environment with enclosing one
1489 when done.
1490
9ac24568 14912019-07-10 Claire Dross <dross@adacore.com>
1492
1493 * sem_spark.adb (Check_Expression): Allow digits constraints as
1494 input.
1495 (Illegal_Global_Usage): Pass in the entity.
1496 (Is_Subpath_Expression): New function to allow different nodes
1497 as inner parts of a path expression.
1498 (Read_Indexes): Allow concatenation and aggregates with box
1499 expressions. Allow attributes Update and Loop_Entry.
1500 (Check_Expression): Allow richer membership test.
1501 (Check_Node): Ignore bodies of generics.
1502 (Get_Root_Object): Allow concatenation and attributes.
1503
95266217 15042019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
1505
1506 * sem_ch6.adb (Check_Discriminant_Conformance): Use Find_Type to
1507 discover the type of a full view discriminant.
1508
f9d615a1 15092019-07-10 Arnaud Charlet <charlet@adacore.com>
1510
1511 * doc/gnat_ugn/gnat_and_program_execution.rst: Improve gnatmem's
1512 doc for the depth switch.
1513
55d7c660 15142019-07-10 Bob Duff <duff@adacore.com>
1515
1516 * doc/gnat_ugn/gnat_utility_programs.rst: Document gnatpp's
1517 --source-line-breaks switch.
1518
e94f4600 15192019-07-10 Justin Squirek <squirek@adacore.com>
1520
1521 * doc/gnat_rm/implementation_defined_attributes.rst: Add mention
1522 of 'Image attribute with 'Img's entry to mention additional
1523 added 2012 usage of Obj'Image.
1524 * doc/gnat_rm/implementation_defined_pragmas.rst: Correct
1525 mispelling of Async_Writers.
1526 * gnat_rm.texi: Regenerate.
1527 * sem_prag.adb (Analyze_Pragma): Correct mispelling of
1528 Async_Writers.
1529 * sem_util.adb (State_Has_Enabled_Property): Correct mispelling
1530 of Async_Writers.
1531
2bf00b7f 15322019-07-10 Simon Buist <buist@adacore.com>
1533
1534 * sem_util.ads (Child_Prefix): New constant.
1535 * sem_util.adb (Unique_Name): Add a special prefix to child
1536 units that have a nested subprogram or package.
1537
9dda714b 15382019-07-10 Arnaud Charlet <charlet@adacore.com>
1539
1540 * sfn_scan.adb (Scan_SFN_Pragmas): Add pragma Assert.
1541
fd8a528d 15422019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
1543
1544 * sem_ch3.adb (Check_Nonoverridable_Aspects): Correct the
1545 spelling in certain error messages.
1546 (Check_Pragma_Implemented): Correct the spelling in certain
1547 error messages.
1548
97f0aa19 15492019-07-10 Eric Botcazou <ebotcazou@adacore.com>
1550
1551 * Makefile.rtl (GNATRTL_NONTASKING_OBJS): Add g-brapre.
1552 * libgnat/g-brapre.ads: New package specification.
1553 * doc/gnat_rm/the_gnat_library.rst: Document it.
1554 * gnat_rm.texi: Regenerate.
1555
d2506f16 15562019-07-10 Yannick Moy <moy@adacore.com>
1557
1558 * osint-c.adb (Set_File_Name): Always add extension for multiple
1559 units per file mode.
1560
c6db401c 15612019-07-10 Corentin Gay <gay@adacore.com>
1562
1563 * sysdep.c: Put include directive for 'vxWorks.h' before any
1564 other VxWorks headers.
1565
344c2639 15662019-07-10 Eric Botcazou <ebotcazou@adacore.com>
1567
1568 * doc/gnat_rm/implementation_defined_attributes.rst
1569 (Scalar_Storage_Order): Minor tweaks. Add note about debuggers.
1570 * gnat_rm.texi: Regenerate.
1571
8a9900a9 15722019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
1573
1574 * exp_ch4.adb (Expand_N_Case_Expression): Mark the generated
1575 assignments to the temporary result as being OK because the
1576 expansion of case expressions is correct by construction.
1577 (Is_Copy_Type): Update the predicate to match the comment
1578 within.
1579
8c21443b 15802019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
1581
1582 * bindo-graphs.adb, bindo.adb, debug.adb, exp_ch6.adb,
1583 sem_ch10.adb, sem_ch13.adb, sem_ch3.adb, sem_ch4.adb,
1584 sem_ch6.adb, sem_ch7.adb, sem_res.adb, sem_spark.adb,
1585 sem_util.adb, warnsw.ads: Minor reformatting.
1586
2e7929f0 15872019-07-10 Joffrey Huguet <huguet@adacore.com>
1588
1589 * libgnat/a-strbou.ads, libgnat/a-strfix.ads,
1590 libgnat/a-strunb.ads, libgnat/a-strunb__shared.ads: Add global
1591 contracts, contract cases, preconditions and postconditions to
1592 procedures and functions.
1593
87d55fe2 15942019-07-10 Doug Rupp <rupp@adacore.com>
1595
1596 * sysdep.c (__gnat_is_file_not_found_error): Reformulate to also
1597 work for vxworks7r2 SR0610.
1598
82d7e1f4 15992019-07-10 Doug Rupp <rupp@adacore.com>
1600
1601 * env.c (__gnat_environ): Reformulate to also work for
1602 vxworks7r2 SR0610.
1603
7f6066e1 16042019-07-10 Patrick Bernardi <bernardi@adacore.com>
1605
1606 * Makefile.rtl: Handle vxworks7r2 ppc target
1607
6523468f 16082019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
1609
1610 * bindo.adb: Update the section on switches.
1611 * bindo-graphs.adb
1612 (Add_Cycle, Add_Vertex_And_Complement): Remove.
1613 (Create): The graph no longer needs a set of recorded cycles
1614 because the cycles are not rediscovered in permuted forms.
1615 (Cycle_End_Vertices): New routine.
1616 (Destroy): The graph no longer needs a set of recorded cycles
1617 because the cycles are not rediscovered in permuted forms.
1618 (Destroy_Library_Graph_Vertex): Move to the library level.
1619 (Find_All_Cycles_Through_Vertex, Find_All_Cycles_With_Edge):
1620 Remove.
1621 (Find_Cycles_From_Successor, Find_Cycles_From_Vertex,
1622 Find_Cycles_In_Component, Has_Elaborate_All_Edge): New routines.
1623 (Insert_And_Sort): Remove.
1624 (Is_Elaborate_Body_Edge): Use predicate
1625 Is_Vertex_With_Elaborate_Body.
1626 (Is_Recorded_Cycle): Remove.
1627 (Is_Vertex_With_Elaborate_Body): New routine.
1628 (Normalize_And_Add_Cycle): Remove.
1629 (Precedence): Rename to xxx_Precedence, where xxx relates to the
1630 input. These versions better reflect the desired input
1631 precedence.
1632 (Record_Cycle): New routine.
1633 (Remove_Vertex_And_Complement, Set_Is_Recorded_Cycle): Remove.
1634 (Trace_xxx): Update all versions to use debug switch -d_t.
1635 (Trace_Component): New routine.
1636 (Trace_Eol): Removed.
1637 (Trace_Vertex): Do not output the component as this information
1638 is already available when the component is traced.
1639 (Unvisit, Visit): New routine.
1640 * bindo-graphs.ads: Add new instance LGV_Lists. Remove instance
1641 RC_Sets. Update the structure of type Library_Graph_Attributes
1642 to remove the set of recorded cycles.
1643 (Destroy_Library_Graph_Vertex): Move to the library level.
1644 * bindo-writers.adb (Write_Component_Vertices): Output
1645 information about the number of vertices.
1646 * debug.adb: Document the use of binder switch -d_t. Update the
1647 use of binder switch -d_T.
1648
9eaacd61 16492019-07-10 Yannick Moy <moy@adacore.com>
1650
1651 * sem_spark.adb (Get_Root_Object): Replace precondition by error
1652 message.
1653 (Read_Indexes): Replace precondition by error message.
1654 (Check_Callable_Body): Check only traversal function returns an
1655 anonymous access type.
1656 (Check_Expression): Issue error on unexpected expression as
1657 path.
1658 * sem_util.adb (First_Global): Fix access to global on
1659 entry/task.
1660
2ac657bd 16612019-07-10 Javier Miranda <miranda@adacore.com>
1662
1663 * exp_ch6.adb (Is_Class_Wide_Interface_Type): New subprogram.
1664 (Expand_Call_Helper): Handle non-limited views when we check if
1665 any formal is a class-wide interface type.
1666 * exp_disp.adb (Expand_Interface_Actuals): Handle non-limited
1667 views when we look for interface type formals to force "this"
1668 displacement.
1669
d3fb378d 16702019-07-10 Ed Schonberg <schonberg@adacore.com>
1671
1672 * sem_res.adb (Resolve_Equality_Op): Do not replace the resolved
1673 operator by its alias if expander is not active, because the
1674 operand type may not be frozen yet and its inherited operations
1675 have not yet been created.
1676
ab8418a3 16772019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
1678
1679 * bindo-elaborators.adb (Elaborate_Units): Set attribute
1680 Elab_Position of all elaborated units.
1681 (Set_Unit_Elaboration_Positions): New routine.
1682
6e618828 16832019-07-10 Gary Dismukes <dismukes@adacore.com>
1684
1685 * exp_util.adb: Reformatting and a typo fix.
1686
97f6f798 16872019-07-10 Yannick Moy <moy@adacore.com>
1688
1689 * exp_util.adb (Remove_Side_Effects): Prefer renamings for
1690 objects of possible owning type in GNATprove mode.
1691
89c67bd9 16922019-07-09 Ed Schonberg <schonberg@adacore.com>
1693
1694 * sem_ch3.adb (Analyze_Object_Declaration): If the object type
1695 is a composite type that has a dynamic predicate and, the
1696 expression in the declaration is an aggregate, the generated
1697 predicate check must appear after the expanded code for the
1698 aggregate, which will appear after the rewritten object
1699 declarastion.
1700
fb739c45 17012019-07-09 Justin Squirek <squirek@adacore.com>
1702
1703 * sem_eval.adb (Expr_Value_E): Add conditional to correctly
1704 handle constant enumerated character types.
1705
54b39f26 17062019-07-09 Eric Botcazou <ebotcazou@adacore.com>
1707
1708 * libgnarl/s-osinte__mingw.ads (CRITICAL_SECTION): Use proper
1709 type for SpinCount component.
1710
9b57fc30 17112019-07-09 Justin Squirek <squirek@adacore.com>
1712
1713 * exp_ch4.adb (Expand_N_Allocator): Add conditional to detect
1714 the presence of anoymous access type allocators and issue a
1715 warning if the appropriate warning flag is enabled.
1716 * warnsw.ads: Add new warning flag for anonymous allocators
1717 * warnsw.adb (All_Warnings, Restore_Warnings, Save_Warnings,
1718 Set_Underscore_Warning_Switch): Register new flags.
1719 (WA_Warnings): Register new flag as an "all warnings" switch
1720 * usage.adb,
1721 doc/gnat_ugn/building_executable_programs_with_gnat.rst:
1722 Document new warning switches -gnatw_a and -gnatw_A.
1723 * gnat_ugn.texi: Regenerate.
1724
2463fa93 17252019-07-09 Ed Schonberg <schonberg@adacore.com>
1726
1727 * sem_ch4.adb (Diagnose_Call): Improve error recovery when a
1728 local subprogram name hides a possible candidate name declared
1729 in a child package in the context of the current unit.
1730 * sem_ch6.adb (Process_Formals): Protect against malformed
1731 formal types when the parameter type does not denote an entity.
1732
7389bee5 17332019-07-09 Hristian Kirtchev <kirtchev@adacore.com>
1734
1735 * bindo-augmentors.adb (Visit_Elaboration_Root): Do not start a
1736 DFS from an elaboration root whose corresponding unit lacks
1737 elaboration code. This behavior mimics that of the old
1738 elaboration order mechanism.
1739 * bindo-graphs.adb (Find_All_Cycles_Through_Vertex): Move the
1740 vertex tracing within the functional branches of the routine.
1741 This prevents spurious trace output.
1742 (Has_No_Elaboration_Code): New routine.
1743 (Trace_Cycle, Trace_Edge): Update the various Ids to use the
1744 "standard" trace format.
1745 * bindo-graphs.ads (Has_No_Elaboration_Code): New routine.
1746 * bindo-units.ads, bindo-units.adb (Has_No_Elaboration_Code):
1747 New routine.
1748
06d78d4c 17492019-07-09 Piotr Trojanek <trojanek@adacore.com>
1750
1751 * ali.ads, bindo-graphs.adb, bindo-validators.adb, clean.adb,
1752 doc/gnat_ugn/elaboration_order_handling_in_gnat.rst, einfo.ads,
1753 exp_aggr.adb, exp_ch13.adb, exp_ch4.adb, exp_ch5.adb,
1754 exp_ch6.adb, exp_ch7.adb, exp_ch9.adb, exp_pakd.adb,
1755 fname-uf.ads, gnatlink.adb, inline.adb, lib.ads, make.adb,
1756 namet.ads, opt.ads, par-ch4.adb, par-ch6.adb, par-labl.adb,
1757 prep.adb, sem_aggr.adb, sem_ch13.adb, sem_ch4.adb, sem_ch5.adb,
1758 sem_ch6.adb, sem_ch6.ads, sem_ch7.adb, sem_ch8.adb, sem_dim.adb,
1759 sem_disp.adb, sem_prag.adb, sem_res.adb, sem_warn.adb,
1760 sinfo.ads: Replace ". " with ". ". Minor reformatting and typo
1761 corrections.
1762 * gnat_ugn.texi: Generate.
1763
7ed20965 17642019-07-09 Hristian Kirtchev <kirtchev@adacore.com>
1765
1766 * bindo.ads: Move type Precedence_Kind from the private to the
1767 visible part of the unit.
1768 * bindo-augmentors.adb: Remove the use of global data as it is
1769 bad practice.
1770 (Augment_Library_Graph): Update the parameter profile.
1771 (Is_Visited, Set_Is_Visited): Remove.
1772 (Visit_Elaboration_Root, Visit_Elaboration_Roots): Update the
1773 parameter profile and comment on usage.
1774 (Visit_Vertex): Likewise. Also keep track of which invocation
1775 edge activates a task.
1776 * bindo-augmentors.ads (Augment_Library_Graph): Update the
1777 parameter profile and comment on usage.
1778 * bindo-builders.adb (Create_Forced_Edge,
1779 Create_Spec_And_Body_Edge, Create_With_Edge): Update the call to
1780 Add_Edge.
1781 * bindo-diagnostics.adb: Add with end use clauses for Restrict
1782 and Rident.
1783 (Output_Dynamic_Model_Suggestions): Remove.
1784 (Output_Invocation_Related_Suggestions): New routine.
1785 (Output_Suggestions): Output all invocation-related suggestions
1786 together.
1787 * bindo-elaborators.adb: Remove types Comparator_Ptr and
1788 Predicate_Ptr.
1789 (Find_Best_Vertex): Update the parameter profile.
1790 * bindo-graphs.adb (Activates_Task): New routine.
1791 (Add_Body_Before_Spec_Edge): Update the call to
1792 Add_Edge_With_Return.
1793 (Add_Edge): Update the parameter profile and the call to
1794 Add_Edge_With_Return.
1795 (Add_Edge_With_Return): Update the parameter profile and comment
1796 on usage.
1797 (At_Least_One_Edge_Satisfies): New routine.
1798 (Contains_Elaborate_All_Edge): Reimplement.
1799 (Contains_Static_Successor_Edge, Contains_Task_Activation): New
1800 routine.
1801 (Contains_Weak_Static_Successor): Remove.
1802 (Is_Static_Successor_Edge): New routine.
1803 * bindo-graphs.ads: Add types LGE_Predicate_Ptr,
1804 LGV_Comparator_Ptr, and LGV_Predicate_Ptr. Update type
1805 Library_Graph_Edge_Attributes to capture whether an invocation
1806 edge activates a task. Update the value of
1807 No_Library_Graph_Edge_Attributes.
1808 (Activates_Task): Update the parameter profile and comment on
1809 usage.
1810 (Contains_Static_Successor_Edge, Contains_Task_Activation): New
1811 routines.
1812 (Contains_Weak_Static_Successor): Remove.
1813 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst:
1814 Update the documentation to reflect the new task-related advice.
1815 * gnat_ugn.texi: Regenerate.
1816
247527b7 18172019-07-09 Piotr Trojanek <trojanek@adacore.com>
1818
1819 * exp_util.adb (Containing_Package_With_Ext_Axioms): Replace
1820 low-level Ekind test with a high-level wrapper.
1821
1d7a9954 18222019-07-09 Arnaud Charlet <charlet@adacore.com>
1823
1824 * libgnat/s-memory.adb: Disable calls to Abort defer/undefer
1825 when ZCX_By_Default.
1826
7667b40a 18272019-07-09 Javier Miranda <miranda@adacore.com>
1828
1829 * sem_ch13.adb (Rep_Item_Too_Early): Representation clauses are
1830 not allowed for a derivation of a generic type. Extend the
1831 current test to check that none of the parents is a generic
1832 type.
1833
98eb8111 18342019-07-09 Hristian Kirtchev <kirtchev@adacore.com>
1835
1836 * exp_ch9.adb, exp_util.adb, repinfo.adb, sem_ch12.adb,
1837 sem_prag.adb, sem_res.adb, sem_spark.adb, sem_util.adb: Minor
1838 reformatting.
1839
5ffa473a 18402019-07-09 Ed Schonberg <schonberg@adacore.com>
1841
1842 * sem_res.adb (Resolve_Equality_Op): If the node was overloaded,
1843 set properly the entity to which the node has been resolved. The
1844 original entity is the first one found during analysis, and is
1845 not necessarily the resolved one.
1846 (Resolve_Op_Not): If the argument of negation is an overloaded
1847 equality operation, call its resolution directly given that the
1848 context type does not participate in overload resolution.
1849
f7197450 18502019-07-09 Hristian Kirtchev <kirtchev@adacore.com>
1851
1852 * bindo.adb: Remove with and use clauses for Debug. Add with
1853 and use clauses for Opt.
1854 (Find_Elaboration_Order): Enable the v4.0 elaboration order. The
1855 v3.0 mechanism is now available under binder switch -H.
1856 * bindusg.adb (Display): Enable switch -H.
1857 * debug.adb: Free compiler switch -gnatd_G. Free binder switch
1858 -d_N.
1859 * sem_elab.adb: Update the section on switches to remove
1860 -gnatd_G.
1861 (Invocation_Graph_Recording_OK): The invocation graph is now
1862 unconditionally recorded in ALI files.
1863 * switch-b.adb (Scan_Binder_Switches): Scan switch -H.
1864 * doc/gnat_ugn/building_executable_programs_with_gnat.rst:
1865 Update the documentation on compiler switches related to
1866 elaboration. Update the documentation on binder switches to
1867 include switch -H.
1868 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update
1869 the documentation on elaboration order handling in GNAT.
1870 * gnat_ugn.texi: Regenerate.
1871
a2c6c634 18722019-07-09 Eric Botcazou <ebotcazou@adacore.com>
1873
1874 * repinfo.adb (List_Entities): Disregard formals altogether.
1875 (List_Name): Properly escape the double quote in the JSON
1876 output.
1877
3933efcf 18782019-07-09 Javier Miranda <miranda@adacore.com>
1879
1880 * exp_util.adb (Remove_Side_Effects): Preserve the
1881 Do_Range_Check flag.
1882
2166bdef 18832019-07-09 Yannick Moy <moy@adacore.com>
1884
1885 * sinfo.ads: Refine comment for Do_Range_Check.
1886
dbf9a3d7 18872019-07-09 Yannick Moy <moy@adacore.com>
1888
1889 * exp_spark.adb (Expand_SPARK_N_Attribute_Reference): Expand
1890 attribute reference on Enum_Rep.
1891
44e00a56 18922019-07-09 Ed Schonberg <schonberg@adacore.com>
1893
1894 * sem_ch12.adb (Instantiate_Formal_Package): Handle properly the
1895 case where the actual for a formal package in an instance is the
1896 current instance of an enclosing generic package.
1897 (Check_Formal_Packages): If the formal package declaration is
1898 box-initialized or lacks associations altogether, no internal
1899 instance was created to verify conformance, and there is no
1900 validating package to remove from tree.
1901
3e4e7139 19022019-07-09 Yannick Moy <moy@adacore.com>
1903
1904 * freeze.adb (Build_Renamed_Body): Do not set body to inline in
1905 GNATprove mode.
1906
8235b943 19072019-07-09 Yannick Moy <moy@adacore.com>
1908
1909 * exp_util.adb (Expand_Subtype_From_Expr): Still expand the type
1910 of static expressions in GNATprove_Mode.
1911 * sem_ch3.adb (Analyze_Object_Declaration): Remove obsolete
1912 special case for GNATprove_Mode.
1913
cf9af2fa 19142019-07-09 Piotr Trojanek <trojanek@adacore.com>
1915
1916 * doc/gnat_rm/the_gnat_library.rst,
1917 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
1918 erroutc.adb, libgnat/g-comlin.adb, libgnat/g-comlin.ads,
1919 libgnat/g-regexp.ads, libgnat/g-regpat.ads,
1920 libgnat/g-spipat.ads, libgnat/s-os_lib.ads,
1921 libgnat/s-regexp.ads: Reword "wild card" to "wildcard".
1922 * gnat_rm.texi, gnat_ugn.texi: Regenerate.
1923
a080baa9 19242019-07-09 Yannick Moy <moy@adacore.com>
1925
1926 * sem_spark.adb (Check_Expression): Handle correctly implicit
1927 assignments as part of allocators and (extension) aggregates.
1928 (Get_Root_Object): Adapt for new path expressions.
1929 (Is_Path_Expression): Return True for (extension) aggregate.
1930
d9b7ae15 19312019-07-09 Piotr Trojanek <trojanek@adacore.com>
1932
1933 * einfo.ads: Fix a typo.
1934
4c24efa6 19352019-07-09 Ed Schonberg <schonberg@adacore.com>
1936
1937 * sem_util.adb (Scope_Within_Or_Same): Handle properly task
1938 bodies and protected bodies, so that local variables within have
1939 their proper scopes after these constructs have been rewritten
1940 during expansion. This patch resembles but is not identical to
1941 the code in Scope_Within.
1942
6c334e66 19432019-07-09 Arnaud Charlet <charlet@adacore.com>
1944
1945 * gnat1drv.adb (Adjust_Global_Switches): Set
1946 Dynamic_Elaboration_Checks to True in CodePeer mode.
1947
82c20af0 19482019-07-09 Yannick Moy <moy@adacore.com>
1949
1950 * sem_spark.adb (Get_Perm_Or_Tree): Issue an error when
1951 encountering unknown global variable.
1952
a42b8e6a 19532019-07-09 Yannick Moy <moy@adacore.com>
1954
1955 * sem_spark.adb (Check_Expression): Change signature to take an
1956 Extended_Checking_Mode, for handling read permission checking of
1957 sub-expressions in an assignment.
1958 (Check_Parameter_Or_Global): Adapt to new behavior of
1959 Check_Expression for mode Assign.
1960 (Check_Safe_Pointers): Do not analyze generic bodies.
1961 (Check_Assignment): Separate checking of the target of an
1962 assignment.
1963
5fb4f6e3 19642019-07-09 Eric Botcazou <ebotcazou@adacore.com>
1965
1966 * repinfo.ads (JSON format): Adjust.
1967 * repinfo.adb (Need_Blank_Line): Rename to...
1968 (Need_Separator): ...this.
1969 (Blank_Line): Rename to...
1970 (Write_Separator): ...this and add JSON specific handling.
1971 (List_Array_Info): Adjust to above renaming.
1972 (List_Object_Info): Likewise.
1973 (List_Record_Info): Likewise.
1974 (List_Subprogram_Info): Likewise.
1975 (List_Type_Info): Likewise.
1976 (List_Entities): Do not set Need_Blank_Line.
1977 (List_Rep_Info): Set Need_Separator and add JSON specific
1978 handling. Output a single JSON stream in the normal case.
1979
b389ec1e 19802019-07-09 Arnaud Charlet <charlet@adacore.com>
1981
1982 * doc/gnat_ugn/the_gnat_compilation_model.rst: Update doc on
1983 -fdump-ada-spec now that we generate Ada 2012.
1984 * gnat_ugn.texi: Regenerate.
1985
5acb3702 19862019-07-08 Eric Botcazou <ebotcazou@adacore.com>
1987
1988 * repinfo.adb (List_Common_Type_Info): New procedure extracted
1989 from...
1990 (List_Type_Info): ...here. Call it for the common information,
1991 start with a blank line and output the linker section at the
1992 end, if any.
1993 (List_Mechanisms): Rename to...
1994 (List_Subprogram_Info): ...this.
1995 (List_Array_Info): Call List_Common_Type_Info.
1996 (List_Entities): Adjust to above change and renaming.
1997 (List_Record_Info): Call List_Common_Type_Info.
1998
6eb57612 19992019-07-08 Dmitriy Anisimkov <anisimko@adacore.com>
2000
2001 * libgnat/g-sercom.ads
2002 (Serial_Port_Descriptor): New type.
2003 (Serial_Port): Add a comment, make it hold a
2004 Serial_Port_Descriptor.
2005 (To_Ada, To_C): New procedures.
2006 (Port_Data, Port_Data_Access): Remove types.
2007 * libgnat/g-sercom.adb (To_Ada): New stub.
2008 * libgnat/g-sercom__linux.adb, libgnat/g-sercom__mingw.adb:
2009 Update implementations accordingly.
2010 * s-oscons-tmplt.c: Bind Serial_Port_Descriptor to
2011 System.Win32.HANDLE on Windows, and to Interfaces.C.int on
2012 Linux. Add "Interfaces.C." prefix for other basic integer type
2013 bindings.
2014 * xoscons.adb (Output_Info): Remove the "Interfaces.C." prefix
2015 for subtypes generation.
2016
08da2ad9 20172019-07-08 Arnaud Charlet <charlet@adacore.com>
2018
2019 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
2020 Update documentation on No_Exceptions restriction.
2021 * gnat_rm.texi: Regenerate.
2022
89b07420 20232019-07-08 Dmitriy Anisimkov <anisimko@adacore.com>
2024
2025 * libgnat/s-os_lib.adb: Do not call __gnat_kill for Invalid_Pid.
2026
0cc34fed 20272019-07-08 Piotr Trojanek <trojanek@adacore.com>
2028
2029 * sem_util.adb (Enclosing_Package_Or_Subprogram): Do not expect
2030 package and subprogram bodies.
2031
46299a06 20322019-07-08 Bob Duff <duff@adacore.com>
2033
2034 * doc/gnat_ugn/gnat_utility_programs.rst: Remove documentation
2035 of ignored GNATpp switch.
2036
4475d2f0 20372019-07-08 Hristian Kirtchev <kirtchev@adacore.com>
2038
2039 * doc/gnat_rm/implementation_defined_pragmas.rst:
2040 Update the documentation of pragma Initialize_Scalars.
2041 * gnat_rm.texi: Regenerate.
2042
b282b25b 20432019-07-08 Javier Miranda <miranda@adacore.com>
2044
2045 * exp_ch4.adb (Tagged_Membership): Fix regression silently
2046 introduced in r260738 that erroneouslusy causes the evaluation
2047 to True of the membership test when the left operand of the
2048 membership test is a class-wide interface object and the right
2049 operand is a type that implements such interface type.
2050
703ee0e0 20512019-07-08 Hristian Kirtchev <kirtchev@adacore.com>
2052
2053 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
2054 register an address clause when its prefix denotes a generic
2055 formal object.
2056
e6b4414e 20572019-07-08 Hristian Kirtchev <kirtchev@adacore.com>
2058
2059 * bindo-diagnostics.adb (Diagnose_Cycle): Capture the presence
2060 of an Elaborate_All edge before iterating over the edges of the
2061 cycle.
2062 (Output_Elaborate_Body_Transition): Update the parameter profile
2063 and the comment on usage. Add a missing case where the edge is
2064 within the context of an Elaborate_All.
2065 (Output_Transition): Update the call to
2066 Output_Elaborate_Body_Transition.
2067 * bindo-graphs.ads, bindo-graphs.adb
2068 (Contains_Elaborate_All_Edge): New routine.
2069
5a4de65a 20702019-07-08 Piotr Trojanek <trojanek@adacore.com>
2071
2072 * lib-xref-spark_specific.adb (Create_Heap): Set dummy Etype for
2073 the fake __HEAP entity.
2074
42253061 20752019-07-08 Daniel Mercier <mercier@adacore.com>
2076
2077 * gnat1drv.adb: Suppress warnings on memory representation in
2078 CodePeer compiler mode.
2079
a7c8fd7e 20802019-07-08 Nicolas Roche <roche@adacore.com>
2081
2082 * rtinit.c (__gnat_runtime_initialize): Remove dependency on
2083 CommandLineToArgvW.
2084
89c9dd55 20852019-07-08 Doug Rupp <rupp@adacore.com>
2086
2087 * Makefile.rtl: Handle vxworks7r2 in x86_64 and x86 vxworks7.
2088
944903c8 20892019-07-08 Dmitriy Anisimkov <anisimko@adacore.com>
2090
2091 * Makefile.rtl: Use g-sercom__linux.adb for all linuxes.
2092
e51a140c 20932019-07-08 Yannick Moy <moy@adacore.com>
2094
2095 * expander.adb (Expand): Do not reset Analyzed flag always.
2096 * sem_eval.adb (Fold_Ureal): Mark node as analyzed.
2097
f117e449 20982019-07-08 Ed Schonberg <schonberg@adacore.com>
2099
2100 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Do not insert twice
2101 the assignment statement that computes the delay value, to
2102 prevent improper tree sharing when the value is a type
2103 conversion and Float_Overflow checks are enabled.
2104
f5cb3a59 21052019-07-08 Hristian Kirtchev <kirtchev@adacore.com>
2106
2107 * bindo.adb: Update the section on terminology to include new
2108 concepts. Update the section on switches to include new
2109 entries.
2110 * bindo.ads: Add type Precedence_Kind.
2111 * bindo-builders.adb: Add with and use clauses for Debug and
2112 Bindo.Validators. Add use clauses for
2113 Bindo.Validators.Invocation_Graph_Validators and
2114 Bindo.Validators.Library_Graph_Validators.
2115 (Build_Invocation_Graph): Validate the graph immediately after
2116 it was built.
2117 (Build_Library_Graph): Update the parameter profile. The
2118 creation of the graph is now elaboration model-agnostic.
2119 Validate the graph immediately after it was built.
2120 (Create_With_Edge): Create regular with edges for Elaborate and
2121 Elaborate_All edges when the appropriate debug switches are in
2122 effect.
2123 * bindo-builders.ads (Build_Library_Graph): Update the parameter
2124 profile.
2125 * bindo-diagnostics.adb (Diagnose_Cycle): Track the presence of
2126 an Elaborate_All edge throughout the inspection of the cycle's
2127 edges.
2128 (Output_Dynamic_Model_Suggestions): Output the suggestion only
2129 when the cycle contains at least one weak edge where the
2130 successor was statically elaborated.
2131 (Output_Elaborate_Body_Transition, Output_Forced_Transition,
2132 Output_With_Transition): Update the assertions.
2133 * bindo-elaborators.adb: Remove use clauses for
2134 Bindo.Validators.Invocation_Graph_Validators and
2135 Bindo.Validators.Library_Graph_Validators. Remove strings
2136 Add_To_All_Candidates_Msg and Add_To_Comp_Candidates_Msg.
2137 Remove type String_Ptr.
2138 (Add_Vertex, Add_Vertex_If_Elaborable, Create_All_Candidates_Set
2139 Create_Component_Candidates_Set): Remove.
2140 (Create_Component_Vertex_Sets, Create_Vertex_Sets): New routine.
2141 (Elaborate_Component): Update the parameter profile and the
2142 comment on usage. Reimplement the elaboration of a component.
2143 The algorithm will now attempt to elaborate as many vertices
2144 possible. If this is not possible, and a weakly elaborable
2145 vertex is available use unit was compiled using the dynamic
2146 model, the algorithm will elaborate it.
2147 (Elaborate_Library_Graph): Reimplement the elaboration of the
2148 graph. The algorithm will now attempt to elaborate as many
2149 vertices along with their components as possible. If this is not
2150 possible, and a weakly elaborable vertex is available use unit
2151 was compiled using the dynamic model, the algorithm will
2152 elaborate it along with its component.
2153 (Elaborate_Units): Merge with the functionality of
2154 Elaborate_Units_Common.
2155 (Elaborate_Units_Common, Elaborate_Units_Dynamic,
2156 Elaborate_Units_Static): Remove.
2157 (Elaborate_Vertex): Update the parameter profile and the comment
2158 on usage. Reimplemented.
2159 (Find_Best_Candidate): Remove.
2160 (Find_Best_Elaborable_Vertex, Find_Best_Vertex,
2161 Find_Best_Weakly_Elaborable_Vertex, Has_Elaborable_Body,
2162 Insert_Elaborable_Successor, Insert_Vertex): New routines.
2163 (Is_Better_Candidate): Remove.
2164 (Is_Better_Elaborable_Vertex,
2165 Is_Better_Weakly_Elaborable_Vertex,
2166 Is_Suitable_Elaborable_Vertex,
2167 Is_Suitable_Weakly_Elaborable_Vertex): New routines.
2168 (Trace_Candidate_Vertices): Remove.
2169 (Trace_Component): Output the number of strong and weak
2170 predecessors.
2171 (Trace_Unelaborated_Vertices): Remove.
2172 (Trace_Vertex): Output the number of strong and weak
2173 predecessors.
2174 (Trace_Vertices): New routine.
2175 (Update_Successor, Update_Successors): Update the parameter
2176 profile and the comment on usage.
2177 * bindo-graphs.adb: Remove type Precedence_Kind.
2178 (Add_Edge_With_Return): Update the increment of pending
2179 predecessors.
2180 (Add_Vertex): Provide default values for strong and weak
2181 predecessors.
2182 (Complementary_Vertex): Move the initial declaration to the
2183 spec. Update the parameter profile and the comment on usage.
2184 (Contains_Weak_Static_Successor): New routine.
2185 (Create): Update the parameter profile. The creation of the
2186 graph is now elaboration model-agnostic.
2187 (Decrement_Pending_Predecessors): Update the parameter profile
2188 and the comment on usage. Reimplemented.
2189 (Delete_Edge): Update the decrement of pending predecesors.
2190 (Has_Elaborate_Body): Do not treat a vertex as being subject to
2191 Elaborate_Body when a debug switch is in effect.
2192 (Increment_Pending_Predecessors): Update the parameter profile
2193 and the comment on usage. Reimplemented.
2194 (Is_Elaborable_Component): Reimplemented.
2195 (Is_Elaborable_Vertex): Move the initial declaration to the
2196 spec. Reimplemented.
2197 (Is_Elaborate_Body_Pair): New routine.
2198 (Is_Dynamically_Elaborated): Update the parameter profile.
2199 Reimplemented.
2200 (Is_Weakly_Elaborable_Vertex): New routine.
2201 (Pending_Predecessors): Removed.
2202 (Pending_Predecessors_For_Elaboration,
2203 Pending_Strong_Predecessors, Pending_Weak_Predecessors,
2204 Update_Pending_Predecessors): New routines.
2205 (Update_Pending_Predecessors_Of_Components): Update the
2206 increment of pending predecessors.
2207 * bindo-graphs.ads: Update the components of type
2208 Component_Attributes. Update the components of type
2209 Library_Graph_Attributes. Update the components of type
2210 Library_Graph_Vertex_Attributes. Update the initialization of
2211 No_Component_Attributes. Update the initialization of
2212 No_Library_Graph_Vertex_Attributes.
2213 (Complementary_Vertex, Contains_Weak_Static_Successor): New
2214 routines.
2215 (Create): Update the parameter profile and the comment on usage.
2216 (Decrement_Pending_Predecessors, Is_Dynamically_Elaborated):
2217 Update the parameter profile and the comment on usage.
2218 (Is_Elaborate_Body_Pair, Is_Weakly_Elaborable_Vertex): New
2219 routines.
2220 (Pending_Predecessors): Removed.
2221 (Pending_Predecessors_For_Elaboration,
2222 Pending_Strong_Predecessors, Pending_Weak_Predecessors): New
2223 routines.
2224 * bindo-writers.adb (Write_Components): Moved from the spec.
2225 (Write_Component): Output the strong and weak predecessors.
2226 (Write_Library_Graph): Output the components as part of the
2227 graph.
2228 (Write_Library_Graph_Vertex): Output the strong and weak
2229 predecessors.
2230 * bindo-writers.ads (Write_Components): Moved to the body.
2231 * debug.adb: Add and document new GNATbind switches -d_a, -d_b,
2232 -d_e.
2233 * bindo-validators.adb: Minor reformattings.
2234
7b8ca6b2 22352019-07-08 Bob Duff <duff@adacore.com>
2236
2237 * libgnat/g-sercom.ads, libgnat/g-sercom__linux.adb (Data_Rate):
2238 Support additional data rates.
2239
364c746f 22402019-07-08 Olivier Hainque <hainque@adacore.com>
2241
2242 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Don't request
2243 DECL_ARTIFICIAL_P on elab proc declarations.
2244
2dbfbbb2 22452019-07-08 Eric Botcazou <ebotcazou@adacore.com>
2246
2247 * repinfo.adb (List_Record_Info): Declare Incomplete_Layout and
2248 Not_In_Extended_Main local exceptions.
2249 (List_Structural_Record_Layout): For an extension, raise the
2250 former if the parent subtype has not been built and the latter
2251 if it is not declared in the main source unit. Fall back to the
2252 flat layout if either exception has been raised.
2253
3e05bbec 22542019-07-08 Ed Schonberg <schonberg@adacore.com>
2255
2256 * libgnat/a-strfix.adb (Delete): The RM describes the semantics
2257 of Delete as equivalent to that of Replace_String with a null
2258 argument. As a result, deleting a null string that starts past
2259 the end of its argument is a noop and must not raise
2260 Index_Error.
2261
c98aac61 22622019-07-08 Javier Miranda <miranda@adacore.com>
2263
2264 * exp_disp.adb (Register_Primitive): When registering a
2265 primitive in the secondary dispatch table, handle primitive
2266 inherited through several levels of type derivation (required to
2267 properly handle inherited 'null' primitive).
2268
221b67b6 22692019-07-08 Bob Duff <duff@adacore.com>
2270
2271 * doc/gnat_ugn/gnat_utility_programs.rst: Document handling of
2272 preprocessor directives in GNATpp.
2273
aed4e06a 22742019-07-08 Javier Miranda <miranda@adacore.com>
2275
2276 * gnat1drv.adb (Post_Compilation_Validation_Checks:
2277 Validate_Compile_Time_Warning_Errors is now located in sem_prag
2278 (instead of sem_ch13).
2279 * sem_ch13.ads (Validate_Compile_Time_Warning_Error,
2280 Validate_Compile_Time_Warning_Errors): Move to sem_prag.
2281 * sem_ch13.adb
2282 (Compile_Time_Warnings_Errors): Move to sem_prag.
2283 (Initialize): Remove initialization of table
2284 Compile_Time_Warning_Errors.
2285 (Validate_Compile_Time_Warning_Error,
2286 Validate_Compile_Time_Warning_Errors): Move to sem_prag.
2287 * sem_prag.ads (Validate_Compile_Time_Warning_Errors): New
2288 procedure.
2289 * sem_prag.adb (Initialize): Initialize table
2290 Compile_Time_Warning_Errors.
2291
b9bd5934 22922019-07-08 Ed Schonberg <schonberg@adacore.com>
2293
2294 * sem_ch13.adb (Analyze_Aspect_Specifications): For a
2295 pre/postcondition of a generic subprogram declaration, do not
2296 use Relocate_Node on the aspect expression to construct the
2297 corresponding attribute specification, to prevent tree anomalies
2298 when the expression is a call with named actual parameters.
2299
63bb17d8 23002019-07-08 Javier Miranda <miranda@adacore.com>
2301
2302 * sem_attr.adb (Analyze_Attribute [Attribute_Size]): For pragmas
2303 used to report user defined compile time warning or errors
2304 handle 'Size for types with known static RM size.
2305
1979cbfe 23062019-07-08 Justin Squirek <squirek@adacore.com>
2307
2308 * exp_imgv.adb (Build_Enumeration_Image_Tables): Default SSO for
2309 the building of image tables.
2310 (Expand_Image_Attribute): Minor cleanup.
2311
bcb0a375 23122019-07-08 Dmitriy Anisimkov <anisimko@adacore.com>
2313
2314 * libgnat/g-socket.ads, libgnat/g-socket.adb: Improve
2315 documentation.
2316 (Get_Socket_Option, Set_Socket_Option): Remove default value for
2317 the Level formal.
2318
429822c1 23192019-07-08 Ed Schonberg <schonberg@adacore.com>
2320
2321 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): For an
2322 unanalized aspect in a generic context that has not been
2323 analyzed yet, if the aspect applies to a type, place the type on
2324 the scope stack to make its components visible, before checking
2325 conformance with the version of the expression analyzed at the
2326 freeze point.
2327
e1415398 23282019-07-05 Justin Squirek <squirek@adacore.com>
2329
2330 * checks.adb (Apply_Accessibility_Check): Add logic to fetch the
2331 function result accessibility level if one is required within
2332 the generated check.
2333 * exp_ch6.adb (Needs_Result_Accessibility_Level): Modify
2334 controlling elsif block to handle more cases such as anonymous
2335 access results and disable checking for coextensions.
2336
dad9e9f8 23372019-07-05 Ed Schonberg <schonberg@adacore.com>
2338
2339 * sem_ch9.adb (Analyze_Accept_Statement): If this is an illegal
2340 accept statement for an enclosing entry abandon analysis to
2341 prevent scope mismatches and potential infinite loops in
2342 compiler.
2343
627d0751 23442019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
2345
2346 * ali.adb (For_Each_Invocation_Construct,
2347 For_Each_Invocation_Relation): New version.
2348 (Scan_ALI): Initialize field Invocation_Graph_Encoding.
2349 (Set_Invocation_Graph_Encoding): Update the setting of the
2350 invocation graph encoding.
2351 * ali.ads: Move field Invocation_Graph_Encoding from Unit_Record
2352 to ALI_Record because the encoding applies to the whole ALI,
2353 rather than one of the units (spec or body) for which the ALI
2354 file was created.
2355 (For_Each_Invocation_Construct, For_Each_Invocation_Relation):
2356 New version.
2357 * bindo.adb: Update the section on switches. Complete the
2358 section of debugging elaboration order issues.
2359 (Find_Elaboration_Order): Prepare the routine for the switch
2360 from the old to the new elaboration order mechanism.
2361 * bindo-diagnostics.adb (Find_And_Output_Invocation_Paths):
2362 Manage a visited set used by Visit_Vertex.
2363 (Output_All_Cycles_Suggestions,
2364 Output_Dynamic_Model_Suggestions): Clarify the nature of the
2365 suggested switch.
2366 (Output_Elaborate_Body_Transition): Update the diagnostic to
2367 emit a better message.
2368 (Output_Forced_Suggestions, Output_Full_Encoding_Suggestions):
2369 Clarify the nature of the suggested switch.
2370 (Visit_Vertex): Update the parameter profile to add a set of
2371 invokers visited during the transition. This set prevents
2372 infinite exploration of the graph in case the invocations are
2373 recursive.
2374 * bindo-elaborators.adb: Add a use clause for
2375 Bindo.Writers.Dependency_Writers.
2376 (Elaborate_Units_Common): Output the library graph after it has
2377 been augmented with invocation edges. Output just the components
2378 instead of outputting the whole library graph again.
2379 (Elaborate_Units_Dynamic, Elaborate_Units_Static): Output the
2380 dependencies as expressed in the library graph.
2381 * bindo-units.adb (Invocation_Graph_Encoding): Update the
2382 extraction of the invocation graph encoding.
2383 * bindo-writers.adb: Add with and use clauses for Binderr and
2384 Butil.
2385 (palgc, plgc): New debug routine.
2386 (Write_Components): Moved to the spec. Add a header for the
2387 output.
2388 (Write_Dependencies, Write_Dependencies_Of_Vertex,
2389 Write_Dependency_Edge): New routine.
2390 (Write_Elaboration_Order): Update the logic to follow the format
2391 of Binde's order output.
2392 (Write_Library_Graph): Do not output the components every time
2393 the graph is written.
2394 (Write_Unit): Output the invocation graph encoding of the unit.
2395 Output the invocation constructs and relations for the unit
2396 only.
2397 * bindo-writers.ads (Write_Components): Moved from the body.
2398 (Write_Dependencies): New routine.
2399 * bindusg.adb: Prepare the routine for the switch from the old
2400 to the new elaboration order mechanism.
2401 * debug.adb: Binder switch -d_O is now not associated with any
2402 functionality.
2403 * einfo.adb (Is_Elaboration_Target): The attribute applies to
2404 packages, as specified by the comment on the attribute usage.
2405 * opt.ads: Add a global flag which controls the choice between
2406 the new and the legacy elaboration order mechanism.
2407 * sem_elab.adb: Add Package_Target to type Target_Kind.
2408 (Build_Elaborate_Body_Procedure, Build_Elaborate_Procedure,
2409 Build_Elaborate_Spec_Procedure, Check_Elaboration_Scenarios,
2410 Check_SPARK_Model_In_Effect): Use Main_Unit_Entity to obtain the
2411 entity of the main unit.
2412 (Create_Package_Rep): New routine.
2413 (Create_Target_Rep): Add processing for packages.
2414 (Declaration_Placement_Of_Node, Has_Prior_Elaboration): Use
2415 Main_Unit_Entity to obtain the entity of the main
2416 unit.
2417 (Invocation_Graph_Recording_OK): Prepare the routine for the
2418 switch from the old to the new elaboration order mechanism.
2419 (Main_Unit_Entity): New routine.
2420 (Meet_Elaboration_Requirement,
2421 Process_Conditional_ABE_Variable_Reference): Use
2422 Main_Unit_Entity to obtain the entity of the main unit.
2423 (Process_Invocation_Instantiation): New routine.
2424 (Process_Invocation_Scenario): Add processing for
2425 instantiations.
2426 * switch-b.adb (Scan_Binder_Switches): Prepare the routine for
2427 the switch from the old to the new elaboration order mechanism.
2428
30fb27b1 24292019-07-05 Joffrey Huguet <huguet@adacore.com>
2430
2431 * libgnat/a-textio.adb: Add abstract state refinment.
2432 * libgnat/a-textio.ads: Add File_System abstract state. Add
2433 global contracts, contract cases, preconditions and
2434 postconditions to procedures and functions.
2435 (Set_Input, Set_Output, Set_Error, Standard_Input,
2436 Standard_Output, Standard_Error, Current_Input, Current_Output,
2437 Current_Error): Turn SPARK_Mode off.
2438 (Get_Line): Turn SPARK_Mode off on Get_Line functions.
2439 * libgnat/a-tideio.ads, libgnat/a-tienio.ads,
2440 libgnat/a-tifiio.ads, libgnat/a-tiflio.ads,
2441 libgnat/a-tiinio.ads, libgnat/a-timoio.ads: Add global
2442 contracts, contract cases, preconditions and postconditions to
2443 procedures and functions.
2444
ce99fc8a 24452019-07-05 Arnaud Charlet <charlet@adacore.com>
2446
2447 * doc/gnat_ugn/platform_specific_information.rst: Refresh doc on
2448 installing from the command line on Windows. Remove obsolete
2449 part.
2450 * gnat_ugn.texi: Regenerate.
2451
26ea5003 24522019-07-05 Vasiliy Fofanov <fofanov@adacore.com>
2453
2454 * libgnat/a-wichha.ads (Is_Alphanumeric): Replace comment with
2455 the correct one. Also capitalize references to False
2456 throughout.
2457
c9c81835 24582019-07-05 Eric Botcazou <ebotcazou@adacore.com>
2459
2460 * exp_ch4.adb (Expand_N_Indexed_Component): Do not expand actual
2461 parameters of function calls here either.
2462
50948c8a 24632019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
2464
2465 * bindo-units.adb, checks.adb, exp_attr.adb, exp_ch3.adb,
2466 exp_ch4.adb, exp_pakd.adb, lib-writ.adb, libgnat/g-traceb.adb,
2467 libgnat/g-traceb.ads, libgnat/s-stratt.ads, sem_aux.ads,
2468 sem_util.adb: Minor reformatting.
2469
a9fa50ab 24702019-07-05 Ed Schonberg <schonberg@adacore.com>
2471
2472 * sem_ch13.adb (Build_Predicate_Functions): If a subtype that
2473 carries a static predicate aspect is frozen immediately after
2474 its declaration, ensure that the generated function body created
2475 for predicate checking is inserted after the corresponding
2476 subprogram declaration, which is created at the point the
2477 declaration is elaborated.
2478
ee4e1dd7 24792019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
2480
2481 * exp_ch7.adb (Cleanup_Record): Use the underlying type when
2482 checking for components with tasks.
2483
2028580f 24842019-07-05 Arnaud Charlet <charlet@adacore.com>
2485
2486 * libgnarl/s-osinte__linux.ads: Link with -lrt before -lpthread.
2487
ec1e481f 24882019-07-05 Ed Schonberg <schonberg@adacore.com>
2489
2490 * exp_pakd.adb (Expand_Bit_Packed_Element_Set): Add explicit
2491 range checks when the index type of the bit-packed array is an
2492 enumeration type with a non-standard representation,
2493
ae60396a 24942019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
2495
2496 * sem_res.adb (Is_Control_Flow_Statement): Delay statements
2497 contain an expression, which in turn may have side effects and
2498 affect the infinite recursion. As a result, delay statements
2499 should not be treated specially.
2500
d33025f2 25012019-07-05 Arnaud Charlet <charlet@adacore.com>
2502
2503 * libgnarl/s-linux.ads, libgnarl/s-linux__alpha.ads,
2504 libgnarl/s-linux__android.ads, libgnarl/s-linux__hppa.ads,
2505 libgnarl/s-linux__mips.ads, libgnarl/s-linux__riscv.ads,
2506 libgnarl/s-linux__sparc.ads: Fix typos in comments.
2507
51f2c7f9 25082019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
2509
2510 * sem_res.adb (Check_Infinite_Recursion): Reimplemented.
2511 (Enclosing_Declaration_Or_Statement,
2512 Invoked_With_Different_Arguments, Is_Conditional_Statement,
2513 Is_Control_Flow_Statement, Is_Immediately_Within_Body,
2514 Is_Raise_Idiom, Is_Raise_Statement, Is_Sole_Statement,
2515 Preceded_By_Control_Flow_Statement,
2516 Within_Conditional_Statement): New routines.
2517
0e6f6ee1 25182019-07-05 Javier Miranda <miranda@adacore.com>
2519
2520 * exp_ch4.adb (Expand_N_Type_Conversion): Do not apply an
2521 accessibility check when the conversion is an access to
2522 class-wide interface type and it is an actual parameter.
2523 * exp_ch6.adb (Expand_Call_Helper): Add documentation on the
2524 accessibility level of an anonymous allocator defining the value
2525 of an access parameter.
2526 * sem_util.ads, sem_util.adb (Dynamic_Accessibility_Level): Add
2527 support for an anonymous allocator whose type is that of a
2528 stand-alone object of an anonymous access to object type.
2529
f28a3d6c 25302019-07-05 Piotr Trojanek <trojanek@adacore.com>
2531
2532 * einfo.ads, sem_res.adb: Typo fixes in comments.
2533
2d8a0eb3 25342019-07-05 Bob Duff <duff@adacore.com>
2535
2536 * exp_ch6.adb (Is_Build_In_Place_Function): Narrow the check for
2537 Has_Foreign_Convention to the imported case only. If a
2538 build-in-place function is exported, and called from Ada code,
2539 build-in-place protocols should be used.
2540
6eddee84 25412019-07-05 Ed Schonberg <schonberg@adacore.com>
2542
2543 * sem_util.adb (Encloing_Subprogram): If Enclosing_Dynamic_Scope
2544 is a loop, continue climbing the scope stack to find the
2545 enclosing subprogram.
2546 (Gather_Components): Handle properly a choice in a record
2547 aggregate that is given by a subtype with a static predicate.
2548
249e38a7 25492019-07-05 Javier Miranda <miranda@adacore.com>
2550
2551 * debug.adb (-gnatd.K): Leave available this switch.
2552 * contracts.adb (Build_And_Analyze_Contract_Only_Subprograms):
2553 Remove.
2554 * scil_ll.ads, scil_ll.adb (Contract_Only_Body_Flag,
2555 Contract_Only_Body_Nodes, Get_Contract_Only_Body,
2556 Is_Contract_Only_Body, Set_Contract_Only_Body): Remove.
2557
33ae0c9f 25582019-07-05 Pierre-Marie de Rodat <derodat@adacore.com>
2559
2560 * libgnat/a-strunb.ads: Import documentation from the RM
2561
70f9c8aa 25622019-07-05 Pierre-Marie de Rodat <derodat@adacore.com>
2563
2564 * libgnat/a-strfix.ads: Import documentation from the RM
2565
1bc68ac2 25662019-07-05 Yannick Moy <moy@adacore.com>
2567
2568 * adabkend.adb (Scan_Back_End_Switches): Accept -Og and -Ofast
2569 switches.
2570
2500be2f 25712019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
2572
2573 * ali.adb: Relocate types Invocation_Construct_Record,
2574 Invocation_Relation_Record, and Invocation_Signature_Record to
2575 the body of ALI. Relocate tables Invocation_Constructs,
2576 Invocation_Relations, and Invocation_Signatures to the body of
2577 ALI. Remove type Body_Placement_Codes. Add new types
2578 Declaration_Placement_Codes, and
2579 Invocation_Graph_Encoding_Codes. Update the literals of type
2580 Invocation_Graph_Line_Codes.
2581 (Add_Invocation_Construct): Update the parameter profile. Add an
2582 invocation construct built from all attributes provided.
2583 (Add_Invocation_Relation): Update the parameter profile. Add an
2584 invocation relation built from all attributes provided.
2585 (Body_Placement): New routine.
2586 (Body_Placement_Kind_To_Code, Code_To_Body_Placement_Kind):
2587 Removed.
2588 (Code_To_Declaration_Placement_Kind,
2589 Code_To_Invocation_Graph_Encoding_Kind, Column,
2590 Declaration_Placement_Kind_To_Code, Extra,
2591 For_Each_Invocation_Construct, For_Each_Invocation_Relation,
2592 Invocation_Graph_Encoding,
2593 Invocation_Graph_Encoding_Kind_To_Code, Invoker, Kind, Line,
2594 Locations, Name): New routine.
2595 (Scan_Invocation_Construct_Line): Reimplement the scanning
2596 mechanism.
2597 (Scan_Invocation_Graph_Attributes_Line): New routine.
2598 (Scan_Invocation_Graph_Line): Use a case statement to dispatch.
2599 (Scan_Invocation_Relation_Line): Reimplement the scanning
2600 mechanism.
2601 (Scope): New routine.
2602 (Set_Invocation_Graph_Encoding, Signature, Spec_Placement,
2603 Target): New routine.
2604 * ali.ads: Add new type Invocation_Graph_Encoding_Kind. Add
2605 component Invocation_Graph_Encoding to type Unit_Record.
2606 Relocate various types and data structures to the body of ALI.
2607 (Add_Invocation_Construct, Add_Invocation_Relation): Update the
2608 parameter profile.
2609 (Body_Placement): New routine.
2610 (Body_Placement_Kind_To_Code, Code_To_Body_Placement_Kind):
2611 Removed.
2612 (Code_To_Declaration_Placement_Kind,
2613 Code_To_Invocation_Graph_Encoding_Kind, Column,
2614 Declaration_Placement_Kind_To_Code, Extra,
2615 For_Each_Invocation_Construct, For_Each_Invocation_Relation,
2616 Invocation_Graph_Encoding,
2617 Invocation_Graph_Encoding_Kind_To_Code, Invoker, Kind, Line,
2618 Locations, Name, Scope, Set_Invocation_Graph_Encoding,
2619 Signature, Spec_Placement, Target): New routine.
2620 * bindo.adb: Add with clause for Binde. Add with and use
2621 clauses for Debug. Update the documentation. Add new switches.
2622 (Find_Elaboration_Order): Dispatch to the proper elaboration
2623 mechanism.
2624 * bindo-augmentors.adb:
2625 Remove with and use clauses for GNAT and GNAT.Sets. Remove
2626 membership set VS. Update the parameter profiles of most
2627 routines to use better parameter names. Update the
2628 implementation of most routine to use the new parameter names.
2629 Remove various redundant assertions.
2630 * bindo-builders.adb: Use better names for instantiated data
2631 structures. Update all references to these names. Update the
2632 parameter profiles of most routines to use better parameter
2633 names. Update the implementation of most routine to use the new
2634 parameter names.
2635 (Build_Library_Graph): Update the parameter profile. Update the
2636 call to Create.
2637 (Create_Vertex): Reimplemented.
2638 (Declaration_Placement_Vertex): New routine.
2639 * bindo-builders.ads (Build_Library_Graph): Update the parameter
2640 profile and comment on usage.
2641 * bindo-diagnostics.adb: Almost a new unit.
2642 * bindo-diagnostics.ads: Add a use clause for
2643 Bindo.Graphs.Invocation_Graphs. Remove package
2644 Cycle_Diagnostics.
2645 (Diagnose_Circularities): New routine.
2646 * bindo-elaborators.adb: Remove the with and use clauses for
2647 Binderr and GNAT.Sets. Remove the use clause for
2648 Bindo.Diagnostics.Cycle_Diagnostics. Remove membership set VS.
2649 Update the parameter profiles of most routines to use better
2650 parameter names. Update the implementation of most routine to
2651 use the new parameter names. (Elaborate_Units_Common): Update
2652 the parameter profile. Pass an infication to the library graph
2653 builder whether the dynamic model is in effect.
2654 (Elaborate_Units_Dynamic, Elaborate_Units_Static): Use
2655 Diagnose_Circularities to provide diagnostics.
2656 (Update_Successor): Use routine In_Same_Component to determine
2657 whether the predecessor and successor reside in different
2658 components.
2659 * bindo-graphs.adb: Add with and use clauses for Butil, Debug,
2660 Output, and Bindo.Writers. Remove with and use clauses for
2661 GNAT.Lists. Update the parameter profiles of most routines to
2662 use better parameter names. Update the implementation of most
2663 routine to use the new parameter names. Remove various
2664 redundant assertions. Remove doubly linked list EL. Add new
2665 type Precedence_Kind.
2666 (Add_Cycle): New routine.
2667 (Add_Vertex): Update the parameter profile. Update the creation
2668 of vertex attributes.
2669 (Add_Vertex_And_Complement, Body_Vertex, Column,
2670 Complementary_Vertex, Copy_Cycle_Path, Cycle_Kind_Of): New
2671 routines.
2672 (Destroy_Invocation_Graph_Edge, Destroy_Library_Graph_Cycle,
2673 Destroy_Library_Graph_Edge, Extra, File_Name,
2674 Find_All_Cycles_Through_Vertex, Find_All_Cycles_With_Edge,
2675 Find_Cycles, Find_First_Lower_Precedence_Cycle,
2676 Get_LGC_Attributes, Has_Next, Hash_Library_Graph_Cycle,
2677 Hash_Library_Graph_Cycle_Attributes, Highest_Precedence_Cycle,
2678 Highest_Precedence_Edge, In_Same_Component, Insert_And_Sort,
2679 Invocation_Edge_Count, Invocation_Graph_Encoding,
2680 Is_Cycle_Initiating_Edge, Is_Cyclic_Edge,
2681 Is_Cyclic_Elaborate_All_Edge, Is_Cyclic_Elaborate_Body_Edge,
2682 Is_Cyclic_Elaborate_Edge, Is_Cyclic_Forced_Edge,
2683 Is_Cyclic_Invocation_Edge, Is_Cyclic_With_Edge,
2684 Is_Dynamically_Elaborated, Is_Elaborate_All_Edge,
2685 Is_Elaborate_Body_Edge, Is_Elaborate_Edge: New routines.
2686 (Is_Existing_Predecessor_Successor_Relation): Removed.
2687 (Is_Forced_Edge, Is_Invocation_Edge, Is_Recorded_Cycle,
2688 Is_Recorded_Edge, Is_With_Edge, Iterate_Edges_Of_Cycle, Kind,
2689 Length): New routine.
2690 (Lib_Vertex): Removed.
2691 (Line, Links_Vertices_In_Same_Component,
2692 Maximum_Invocation_Edge_Count, Next, Normalize_And_Add_Cycle,
2693 Normalize_Cycle_Path, Number_Of_Cycles, Path, Precedence,
2694 Remove_Vertex_And_Complement, Sequence_Next_Cycle): New routines.
2695 (Sequence_Next_IGE_Id): Renamed to Sequence_Next_Edge.
2696 (Sequence_Next_IGV_Id): Renamed to Sequence_Next_Vertex.
2697 (Sequence_Next_LGE_Id): Renamed to Sequence_Next_Edge.
2698 (Sequence_Next_LGV_Id): Renamed to Sequence_Next_Vertex.
2699 (Set_Is_Existing_Predecessor_Successor_Relation): Removed.
2700 (Set_Is_Recorded_Cycle, Set_Is_Recorded_Edge,
2701 Set_LGC_Attributes, Spec_Vertex, Trace_Cycle, Trace_Edge,
2702 Trace_Eol, Trace_Vertex): New routines.
2703 * bindo-graphs.ads: Add with and use clauses for Types and
2704 GNAT.Lists. Update the parameter profiles of most routines to
2705 use better parameter names. Update the implementation of most
2706 routine to use the new parameter names. Add the new
2707 instantiated data structures IGE_Lists, IGV_Sets, LGC_Lists,
2708 LGE_Lists, LGE_Sets, LGV_Sets, and RC_Sets. Add new type
2709 Library_Graph_Cycle_Id along with an empty and initial value.
2710 Remove component Lib_Vertex and add new components Body_Vertex
2711 and Spec_Vertex to type Invocation_Graph_Vertex_Attributes. Add
2712 new type Library_Graph_Cycle_Kind. Add new iterators
2713 All_Cycle_Iterator and Edges_Of_Cycle_Iterator. Add new type
2714 Library_Graph_Cycle_Attributes. Add new components
2715 Cycle_Attributes, Cycles, and Dynamically_Elaborated to type
2716 Library_Graph_Attributes.
2717 (Body_Vertex, Column, Destroy_Invocation_Graph_Edge,
2718 Destroy_Library_Graph_Cycle_Attributes,
2719 Destroy_Library_Graph_Edge, Extra, File_Name, Find_Cycles,
2720 Has_Elaborate_All_Cycle, Has_Next, Hash_Library_Graph_Cycle,
2721 Hash_Library_Graph_Cycle_Attributes, Highest_Precedence_Cycle,
2722 In_Same_Component, Invocation_Edge_Count,
2723 Invocation_Graph_Encoding, Is_Dynamically_Elaborated,
2724 Is_Elaborate_All_Edge, Is_Elaborate_Body_Edge,
2725 Is_Elaborate_Edge, Is_Forced_Edge, Is_Invocation_Edge,
2726 Is_With_Edge, Iterate_All_Cycles, Iterate_Edges_Of_Cycle, Kind):
2727 New routines.
2728 (Length, Lib_Vertex, (Line, Next, Number_Of_Cycles, Present,
2729 Same_Library_Graph_Cycle_Attributes, Spec_Vertex): New routines.
2730 * bindo-units.adb (File_Name, Invocation_Graph_Encoding): New
2731 routines.
2732 * bindo-units.ads: Add new instantiated data structure
2733 Unit_Sets.
2734 (File_Name, Invocation_Graph_Encoding): New routine.
2735 * bindo-validators.adb: Remove with and use clauses for GNAT and
2736 GNAT.Sets. Remove membership set US. Update the parameter
2737 profiles of most routines to use better parameter names. Update
2738 the implementation of most routine to use the new parameter
2739 names.
2740 (Validate_Cycle, Validate_Cycle_Path, Validate_Cycles,
2741 Validate_Invocation_Graph_Vertex): Remove the validation of
2742 component Lib_Vertex. Add the validation of components
2743 Body_Vertex and Spec_Vertex.
2744 (Write_Error): New routine.
2745 * bindo-validators.ads (Validate_Cycles): New routine.
2746 * bindo-writers.adb: Update the parameter profiles of most
2747 routines to use better parameter names. Update the
2748 implementation of most routine to use the new parameter names.
2749 (Write_Cycle, Write_Cyclic_Edge, Write_Cycles): New routines.
2750 (Write_Invocation_Graph_Vertex): Remove the output of component
2751 Lib_Vertex. Add the output of components Body_Vertex and
2752 Spec_Vertex.
2753 * bindo-writers.ads (Write_Cycles): New routine.
2754 * debug.adb: Use binder switches -d_C and -d_P, add
2755 documentation on their usage.
2756 * gnatbind.adb: Remove with and use clauses for Binde. Delegate
2757 the choice of elaboration mechanism to Bindo.
2758 * lib-writ.adb (Column, Extra, Invoker, Kind, Line, Locations,
2759 Name, Placement, Scope, Signature, Target): Removed.
2760 (Write_Invocation_Graph): Moved at the top level.
2761 (Write_Invocation_Graph_Attributes): New routine.
2762 (Write_Invocation_Relation, Write_Invocation_Signature): Moved
2763 at the top level.
2764 * lib-writ.ads: Add a documentation section on invocation graph
2765 attributes.
2766 * sem_elab.adb (Body_Placement_Of): New routine.
2767 (Declare_Invocation_Construct): Update the call to
2768 Add_Invocation_Construct.
2769 (Declaration_Placement_Of_Node): New routine.
2770 (Get_Invocation_Attributes): Correct the retrieval of the
2771 enclosing subprogram where the postcondition procedure lives.
2772 (Placement_Of, Placement_Of_Node): Removed.
2773 (Record_Invocation_Graph): Record the encoding format used.
2774 (Record_Invocation_Graph_Encoding): New routine.
2775 (Record_Invocation_Relation): Update the call to
2776 Add_Invocation_Relation.
2777 (Spec_Placement_Of): Removed.
2778 * libgnat/g-lists.ads, libgnat/g-lists.adb (Equal): New routine.
2779
164597c5 27802019-07-05 Ed Schonberg <schonberg@adacore.com>
2781
2782 * checks.adb (Apply_Predicate_Check): Except within the
2783 subprogram body that defines the formal, do not apply predicate
2784 check on a formal IN parameter: such a check is redundant and
2785 its expansion can lead to out-of-scope references when it is
2786 originates in a function call in a precondition,
2787
572a4bc5 27882019-07-05 Yannick Moy <moy@adacore.com>
2789
2790 * sem_res.adb (Resolve_Call): Cannot inline in quantified
2791 expressions.
2792 * sem_util.adb, sem_util.ads (In_Quantified_Expression): New
2793 function.
2794
2c3ad474 27952019-07-05 Bob Duff <duff@adacore.com>
2796
2797 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
2798 Fix typo.
2799 * gnat_rm.texi: Regenerate.
2800
2f67af4c 28012019-07-05 Bob Duff <duff@adacore.com>
2802
2803 * exp_attr.adb (Input): Take the No_Stream_Optimizations
2804 restriction into account.
2805
1cb1fd0f 28062019-07-05 Claire Dross <dross@adacore.com>
2807
2808 * libgnat/a-cofove.ads, libgnat/a-cofove.adb: Definite formal
2809 vectors are now always bounded so that they do not need to be
2810 limited anymore.
2811
d2d09f3e 28122019-07-05 Dmitriy Anisimkov <anisimko@adacore.com>
2813
2814 * libgnat/g-traceb.ads, libgnat/g-traceb.adb (Call_Chain): New
2815 function.
2816
c5c4ce6c 28172019-07-04 James Clarke <jrtc27@debian.org>
14e0bfed 2818
2819 * libgnarl/s-osinte__kfreebsd-gnu.ads (clockid_t): Make type
2820 definition public.
2821 (CLOCK_REALTIME): Make value public.
2822
ecd07d3b 28232019-07-04 Javier Miranda <miranda@adacore.com>
2824
2825 * exp_tss.adb (Init_Proc): Adding missing support for access to
2826 subprograms and access to protected subprograms of non-default
2827 C++ constructors.
2828
e0ff1639 28292019-07-04 Eric Botcazou <ebotcazou@adacore.com>
2830
2831 * gnat1drv.adb (Adjust_Global_Switches): Use proper interface to
2832 set the validity settings in CodePeer mode.
2833 * par-load.adb (Load): Remove all code dealing with validity
2834 settings.
2835 * validsw.ads (Validity_Check_Copies): Alphabetize.
2836 * validsw.adb (Reset_Validity_Check_Options): Set all options to
2837 off.
2838 (Save_Validity_Check_Options): Save all options.
2839
40bff3a0 28402019-07-04 Hristian Kirtchev <kirtchev@adacore.com>
2841
2842 * exp_ch3.adb, exp_ch4.adb, exp_ch4.ads, exp_ch5.adb,
2843 exp_ch7.adb, exp_ch9.adb, exp_ch11.adb, exp_unst.adb,
2844 rtsfind.ads, sem_attr.adb, sem_ch10.adb, sem_ch12.adb,
2845 sem_ch13.adb, sem_dim.adb, sem_disp.adb, xref_lib.adb: Minor
2846 reformatting.
2847
0ebaade4 28482019-07-04 Joffrey Huguet <huguet@adacore.com>
2849
2850 * libgnarl/a-taside.ads: Add assertion policy to ignore
2851 preconditions.
2852 (Abort_Task, Is_Terminated, Is_Callable): Add preconditions.
2853
f14a590b 28542019-07-04 Eric Botcazou <ebotcazou@adacore.com>
2855
2856 * doc/gnat_rm/implementation_defined_pragmas.rst: Fix
2857 capitalization and parenthesis glitches.
2858 * gnat_rm.texi: Regenerate.
2859
f5388f99 28602019-07-04 Ed Schonberg <schonberg@adacore.com>
2861
2862 * sem_ch10.adb (Remove_Context_Clauses): Handle properly the
2863 removal of a limited_with_clause which appears in the library
2864 unit oF the main unit, when some other unit in the context has a
2865 regular with_clause on the same unit, to prevent spurious
2866 visibility errors in the subsequent analysis of pending instance
2867 bodies.
2868
c930bc82 28692019-07-04 Hristian Kirtchev <kirtchev@adacore.com>
2870
2871 * sem_elab.adb: Add new type Elaboration_Phase_Status along with
2872 a global to keep track of the elaboration phase status.
2873 Initialize all internal data structures to Nil for services
2874 Elaborated_Units, Internal_Representation, and Scenario_Storage.
2875 (Build_Call_Marker): Do not create a call marker when the
2876 elaboration phase is not active.
2877 (Build_Variable_Reference_Marker): Do not create a call marker
2878 when the elaboration phase is not active.
2879 (Check_Elaboration_Scenarios): Destroy all internal structures
2880 when the elaboration phase does not have to run. Do not execute
2881 when the elaboration phase is not active.
2882 (Elaboration_Phase_Active): New routine.
2883 (Finalize_All_Data_Structures): New routine.
2884 (Initialize): Initialize all internal data structures and signal
2885 that the elaboration phase has started.
2886 (Initialize_All_Data_Structures): New routine.
2887 (Initialize_Elaborated_Units): Initialize all internal data
2888 structures.
2889 (Initialize_Internal_Representation): Initialize all internal
2890 data structures.
2891 (Initialize_Scenario_Storage): Initialize all internal data
2892 structures.
2893 (Kill_Elaboration_Scenario): Do not execute when the elaboration
2894 phase is not active.
2895 (Set_Elaboration_Phase): New routine.
2896 (Update_Elaboration_Scenario): Do not execute when the
2897 elaboration phase is not active.
2898
39dec7f4 28992019-07-04 Gary Dismukes <dismukes@adacore.com>
2900
2901 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The special
2902 treatment of calling Mask_Unfrozen_Types must also be done in
2903 the case of an Ignored_Ghost_Entity, because Expander_Active is
2904 False in that case.
2905
92b004be 29062019-07-04 Yannick Moy <moy@adacore.com>
2907
2908 * sem_prag.adb (Check_Library_Level_Entity): Update for new rule
2909 on SPARK_Mode.
2910
12795e1c 29112019-07-04 Justin Squirek <squirek@adacore.com>
2912
2913 * sem_disp.adb (Check_Controlling_Formals): Obtain the full view
2914 before type comparison.
2915
63fe3141 29162019-07-04 Ed Schonberg <schonberg@adacore.com>
2917
2918 * exp_ch4.ads, exp_ch4.adb (Build_Eq_Call): New visible
2919 subprogram, extracted from Expand_Composite_Equality, to handle
2920 properly the composition of equality for variant record types.
2921 * exp_ch3.adb (MAke_Eq_If): Use Build_Eq_Call for each
2922 component, to handle properly the case of a component with a
2923 user-defined equality. Revert to predefined equality if the
2924 user-defined operation is abstract, to maintain compatibility
2925 with older versions,
2926
17fa952a 29272019-07-04 Justin Squirek <squirek@adacore.com>
2928
2929 * exp_ch3.adb (Build_Initialization_Call): Fixup
2930 *_skip_null_excluding_check argument to handle new default.
2931 (Init_Formals): Make *_skip_null_excluding_check formal default
2932 to False
2933 * exp_ch4.adb (Expand_N_Allocator): Add comment to note heavy
2934 code duplication
2935
cf32543d 29362019-07-04 Bob Duff <duff@adacore.com>
2937
2938 * sem_ch3.adb (Access_Definition): Do not create a master unless
2939 Tasking_Allowed. Otherwise, this fails on restricted runtimes.
2940
eb4dbf20 29412019-07-04 Hristian Kirtchev <kirtchev@adacore.com>
2942
2943 * sem_util.adb (Propagate_DIC_Attributes): Do not propagate the
2944 Default_Initial_Condition attributes to an incomplete type.
2945
25ddc6ba 29462019-07-04 Ed Schonberg <schonberg@adacore.com>
2947
2948 * sem_attr.adb (Check_Array_Type): An array type attribute such
2949 as 'First can be applied to an unconstrained array tyope when
2950 the attribute reference appears within an aspect specification
2951 and the prefix is a current instance, given that the prefix of
2952 the attribute will become a formal of the subprogram that
2953 implements the aspect (typically a predicate check).
2954
74a5962a 29552019-07-04 Piotr Trojanek <trojanek@adacore.com>
2956
2957 * sem_util.adb (Yields_Synchronized_Object): Fix typos in
2958 comments.
2959
c65d33a8 29602019-07-04 Yannick Moy <moy@adacore.com>
2961
2962 * sem_util.adb (Yields_Synchronized_Object): Adapt to new SPARK
2963 rule.
2964
afd77d39 29652019-07-04 Yannick Moy <moy@adacore.com>
2966
2967 * sem_spark.adb (Check_Statement): Only check permission of
2968 object in extended return when it is of a deep type.
2969
2281b807 29702019-07-04 Justin Squirek <squirek@adacore.com>
2971
2972 * sem_ch12.adb (Perform_Appropriate_Analysis): Added for
2973 selecting which type of analysis based on wheither the
2974 instantiation is a generic at the library-level. In which case
2975 expansion during analysis.
2976 (Preanalyze_Actuals): Modify calls to Analyze to use the new
2977 routine.
2978
542b3e26 29792019-07-04 Ed Schonberg <schonberg@adacore.com>
2980
2981 * exp_unst.adb: Handle conditional expressions.
2982
7754aad4 29832019-07-04 Yannick Moy <moy@adacore.com>
2984
2985 * sem_spark.adb (Check_Package_Spec, Check_Package_Body): Only
2986 analyze parts of the code marked in SPARK.
2987
3843c1bd 29882019-07-04 Hristian Kirtchev <kirtchev@adacore.com>
2989
2990 * erroutc.adb, exp_aggr.adb, inline.adb, opt.adb, sem_ch3.adb:
2991 Minor reformatting.
2992
5bc0f990 29932019-07-04 Yannick Moy <moy@adacore.com>
2994
2995 * sem_spark.adb (Explanation, Get_Expl): New functions to get
2996 the explanation for a permission mismatch.
2997 (Perm_Error, Perm_Mismatch, Perm_Error_Loop_Exit): Take
2998 explanation into account for issuing a more precise error
2999 message.
3000 (Set_Perm_Prefixes, Set_Perm_Extensions,
3001 Set_Perm_Extensions_Move): Pass suitable argument for the
3002 explanation node.
3003
11903e68 30042019-07-04 Arnaud Charlet <charlet@adacore.com>
3005
3006 * exp_aggr.adb (In_Place_Assign_OK): Moved to top level and add
3007 support for record aggregates.
3008 (Component_Check): Use Is_CCG_Supported_Aggregate instead of a
3009 similar local predicate.
3010 (Convert_To_Assignments): Take advantage of In_Place_Assign_OK
3011 predicate when possible.
3012 (Is_CCG_Supported_Aggregate): Return False for records with
3013 representation clauses and fix the logic for dealing with nested
3014 aggregates.
3015
b0c19ea3 30162019-07-04 Piotr Trojanek <trojanek@adacore.com>
3017
3018 * opt.adb (Set_Config_Switches): Keep assertions policy as
3019 enabled when analysing internal units in GNATprove mode.
3020
90f2b146 30212019-07-04 Arnaud Charlet <charlet@adacore.com>
3022
3023 * exp_ch4.adb (Expand_Short_Circuit_Operator): Strip
3024 N_Variable_Reference_Marker when checking for the presence of
3025 actions.
3026
39ecad34 30272019-07-04 Arnaud Charlet <charlet@adacore.com>
3028
3029 * exp_aggr.adb (Check_Component): Take into account type
3030 conversions.
3031
c0e899f1 30322019-07-04 Dmitriy Anisimkov <anisimko@adacore.com>
3033
3034 * doc/gnat_ugn/platform_specific_information.rst: Document
3035 Windows socket timeout particularity.
3036 * gnat_ugn.texi: Regenerate.
3037 * gsocket.h: Include versionhelpers.h.
3038 * socket.c (__gnat_minus_500ms): New function.
3039 * libgnat/g-sothco.ads (Minus_500ms_Windows_Timeout): New
3040 imported function.
3041 * libgnat/g-socket.adb (Set_Socket_Option): Refactor to remove
3042 500ms from the requested timeout only on old Windows version.
3043
363b1a8e 30442019-07-04 Thomas Quinot <quinot@adacore.com>
3045
3046 * get_scos.adb: Remove bogus, dead code.
3047
4ae0a9ce 30482019-07-04 Ed Schonberg <schonberg@adacore.com>
3049
3050 * sem_dim.adb (Analyze_Dimension_Array_Aggregate): If the
3051 component is an entity name, its dimensions are those of its
3052 type.
3053
d60fa3c9 30542019-07-03 Bob Duff <duff@adacore.com>
3055
3056 * doc/gnat_ugn/gnat_utility_programs.rst: Document new flags in
3057 GNATpp.
3058
877ad320 30592019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
3060
3061 * binde.adb: Remove with clause for System.OS_Lib.
3062 (Force_Elab_Order): Refactor the majority of the code in Butil.
3063 Use the new forced units iterator to obtain unit names.
3064 * bindo-builders.adb: Add with and use clauses for Binderr,
3065 Butil, Opt, Output, Types, GNAT, and GNAT.Dynamic_HTables. Add
3066 a hash table which maps units to line number in the forced
3067 elaboration order file.
3068 (Add_Unit): New routine.
3069 (Build_Library_Graph): Create forced edges between pairs of
3070 units listed in the forced elaboration order file.
3071 (Create_Forced_Edge, Create_Forced_Edges, Destroy_Line_Number,
3072 Duplicate_Unit_Error, Hash_Unit, Internal_Unit_Info,
3073 Is_Duplicate_Unit, Missing_Unit_Info): New routines.
3074 * bindo-graphs.adb (Is_Internal_Unit, Is_Predefined_Unit):
3075 Refactor some of the behavior to Bindo-Units.
3076 * bindo-graphs.ads: Enable the enumeration literal for forced
3077 edges.
3078 * bindo-units.adb, bindo-units.ads (Is_Internal_Unit,
3079 Is_Predefined_Unit): New routines.
3080 * butil.adb: Add with and use clauses for Opt, GNAT, and
3081 System.OS_Lib. Add with clause for Unchecked_Deallocation.
3082 (Has_Next, Iterate_Forced_Units, Next, Parse_Next_Unit_Name,
3083 Read_Forced_Elab_Order_File): New routines.
3084 * butil.ads: Add with and use clauses for Types. Add new
3085 iterator over the units listed in the forced elaboration order
3086 file.
3087 (Has_Next, Iterate_Forced_Units, Next): New routine.
3088 * namet.adb, namet.ads (Present): New routine.
3089
01e6eb2f 30902019-07-03 Bob Duff <duff@adacore.com>
3091
3092 * sem_ch3.adb (Access_Definition): The code was creating a
3093 master in the case where the designated type is a class-wide
3094 interface type. Create a master in the noninterface case as
3095 well. That is, create a master for all limited class-wide types.
3096
9ad42832 30972019-07-03 Yannick Moy <moy@adacore.com>
3098
3099 * erroutc.adb (Sloc_In_Range): New function to determine whether
3100 the range of a pragma Warnings covers a location, taking
3101 instantiations into account.
3102
f2a8d64e 31032019-07-03 Johannes Kanig <kanig@adacore.com>
3104
3105 * osint.ads, osint.adb (Get_First_Main_File_Name): New routine
3106 to access the first file provided on the command line.
3107
d4f28933 31082019-07-03 Ed Schonberg <schonberg@adacore.com>
3109
3110 * inline.adb (Process_Formals_In_Aspects): New procedure within
3111 Expand_Inlined_Call, to perform a replacement of references to
3112 formals that appear in aspect specifications within the body
3113 being inlined.
3114
23e7fc9b 31152019-07-03 Justin Squirek <squirek@adacore.com>
3116
3117 * sem_ch8.adb (Analyze_Object_Renaming): Add call to search for
3118 the appropriate actual subtype of the object renaming being
3119 analyzed.
3120 (Check_Constrained_Object): Minor cleanup.
3121
f8e6d133 31222019-07-03 Yannick Moy <moy@adacore.com>
3123
3124 * sem_spark.adb (Get_Observed_Or_Borrowed_Expr): New function to
3125 return go through traversal function call.
3126 (Check_Type): Consistently use underlying type.
3127 (Get_Perm): Adapt for case of elaboration code where variables
3128 are not declared in the environment. Remove incorrect handling
3129 of borrow and observe.
3130
d044ba5c 31312019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
3132
3133 * inline.adb (Build_Return_Object_Formal): New routine.
3134 (Can_Split_Unconstrained_Function): Code clean up.
3135 (Copy_Formals,Copy_Return_Object): New routines.
3136 (Split_Unconstrained_Function): Code clean up and refactoring.
3137
8699de72 31382019-07-03 Gary Dismukes <dismukes@adacore.com>
3139
3140 * bindo-augmentors.adb, bindo-augmentors.ads,
3141 bindo-builders.ads, bindo-elaborators.adb, sem_ch12.adb,
3142 sem_ch13.adb, sem_spark.adb, sinfo.ads: Minor editorial
3143 corrections and reformatting.
3144
2ccf6539 31452019-07-03 Bob Duff <duff@adacore.com>
3146
3147 * sem_warn.adb (Check_Infinite_Loop_Warning): Avoid the warning
3148 if an Iterator_Specification is present.
3149
17b5260d 31502019-07-03 Bob Duff <duff@adacore.com>
3151
3152 * doc/gnat_ugn/gnat_utility_programs.rst: Document default
3153 new-line behavior.
3154
5f71d12c 31552019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
3156
3157 * ali.adb: Add with and use clauses for GNAT,
3158 GNAT.Dynamic_HTables, and Snames. Add a map from invocation
3159 signature records to invocation signature ids. Add various
3160 encodings of invocation-related attributes. Sort and update
3161 table Known_ALI_Lines.
3162 (Add_Invocation_Construct, Add_Invocation_Relation,
3163 Body_Placement_Kind_To_Code, Code_To_Body_Placement_Kind,
3164 Code_To_Invocation_Construct_Kind, Code_To_Invocation_Kind,
3165 Code_To_Invocation_Graph_Line_Kind, Destroy, Hash): New
3166 routines.
3167 (Initialize_ALI): Sort the initialization sequence. Add
3168 initialization for all invocation-related tables.
3169 (Invocation_Construct_Kind_To_Code,
3170 Invocation_Graph_Line_Kind_To_Code, Invocation_Kind_To_Code,
3171 Invocation_Signature_Of, Present): New routines.
3172 (Scan_ALI): Add the default values for invocation-related ids.
3173 Scan invocation graph lines.
3174 (Scan_Invocation_Graph_Line): New routine.
3175 * ali.ads: Add with clause for GNAT.Dynamic_Tables. Add types
3176 for invocation constructs, relations, and signatures. Add
3177 tables for invocation constructs, relations, and signatures.
3178 Update Unit_Record to capture invocation-related ids. Relocate
3179 table Unit_Id_Tables and subtypes Unit_Id_Table, Unit_Id_Array
3180 from Binde.
3181 (Add_Invocation_Construct, Add_Invocation_Relation,
3182 Body_Placement_Kind_To_Code, Code_To_Body_Placement_Kind,
3183 Code_To_Invocation_Construct_Kind, Code_To_Invocation_Kind,
3184 Code_To_Invocation_Graph_Line_Kind,
3185 Invocation_Construct_Kind_To_Code,
3186 Invocation_Graph_Line_Kind_To_Code, Invocation_Kind_To_Code,
3187 Invocation_Signature_Of, Present): New routines.
3188 * binde.adb: Add with and use clause for Types. Add use clause
3189 for ALI.Unit_Id_Tables;
3190 * binde.ads: Relocate table Unit_Id_Tables and subtypes
3191 Unit_Id_Table, Unit_Id_Array to ALI.
3192 * bindgen.adb: Remove with and use clause for ALI.
3193 * bindgen.ads: Remove with and use clause for Binde. Add with
3194 and use clause for ALI.
3195 * bindo.adb, bindo.ads, bindo-augmentors.adb,
3196 bindo-augmentors.ads, bindo-builders.adb, bindo-builders.ads,
3197 bindo-diagnostics.adb, bindo-diagnostics.ads,
3198 bindo-elaborators.adb, bindo-elaborators.ads, bindo-graphs.adb,
3199 bindo-graphs.ads, bindo-units.adb, bindo-units.ads,
3200 bindo-validators.adb, bindo-validators.ads, bindo-writers.adb,
3201 bindo-writers.ads: New units.
3202 * debug.adb: Use and describe GNAT debug switches -gnatd_F and
3203 -gnatd_G. Add GNATbind debug switches in the ranges dA .. dZ,
3204 d.a .. d.z, d.A .. d.Z, d.1 .. d.9, d_a .. d_z, d_A .. d_Z, and
3205 d_1 .. d_9. Use and describe GNATbind debug switches -d_A,
3206 -d_I, -d_L, -d_N, -d_O, -d_T, and -d_V.
3207 * exp_util.adb, exp_util.ads (Exceptions_OK): Relocate to
3208 Sem_Util.
3209 * gnatbind.adb: Add with and use clause for Bindo. Use the new
3210 Bindo elaboration order only when -d_N is in effect.
3211 * lib-writ.adb
3212 (Column, Extra, Invoker, Kind, Line, Locations, Name, Placement,
3213 Scope, Signature, Target): New routines.
3214 (Write_ALI): Output all invocation-related data.
3215 (Write_Invocation_Graph): New routine.
3216 * lib-writ.ads: Document the invocation graph ALI line.
3217 * namet.adb, namet.ads (Present): New routines.
3218 * sem_ch8.adb (Find_Direct_Name): Capture the status of
3219 elaboration checks and warnings of an identifier.
3220 (Find_Expanded_Name): Capture the status of elaboration checks
3221 and warnings of an expanded name.
3222 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Ensure
3223 that invocation graph-related data within the body of the main
3224 unit is encoded in the ALI file.
3225 (Analyze_Generic_Subprogram_Declaration): Ensure that invocation
3226 graph-related data within the body of the main unit is encoded
3227 in the ALI file.
3228 (Analyze_Package_Instantiation): Perform minimal decoration of
3229 the instance entity.
3230 (Analyze_Subprogram_Instantiation): Perform minimal decoration
3231 of the instance entity.
3232 * sem_elab.adb: Perform heavy refactoring of all code. The unit
3233 is now split into "services" which specialize in one area of ABE
3234 checks. Add processing in order to capture invocation-graph
3235 related attributes of the main unit, and encode them in the ALI
3236 file. The Processing phase can now operate in multiple modes,
3237 all described by type Processing_Kind. Scenarios and targets
3238 are now distinct at the higher level, and carry their own
3239 representations. This eliminates the need to constantly
3240 recompute their attributes, and offers the various processors a
3241 uniform interface. The various initial states of the Processing
3242 phase are now encoded using type Processing_In_State, and
3243 xxx_State constants.
3244 * sem_elab.ads: Update the literals of type
3245 Enclosing_Level_Kind. Add Inline pragmas on several routines.
3246 * sem_prag.adb (Process_Inline): Ensure that invocation
3247 graph-related data within the body of the main unit is encoded
3248 in the ALI file.
3249 * sem_util.adb (Enclosing_Generic_Body, Enclosing_Generic_Unit):
3250 Code clean up.
3251 (Exceptions_OK): Relocated from Sem_Util.
3252 (Mark_Save_Invocation_Graph_Of_Body): New routine.
3253 * sem_util.ads (Exceptions_OK): Relocated from Sem_Util.
3254 (Mark_Save_Invocation_Graph_Of_Body): New routine.
3255 * sinfo.adb (Is_Elaboration_Checks_OK_Node): Now applicable to
3256 N_Variable_Reference_Marker.
3257 (Is_Elaboration_Warnings_OK_Node): Now applicable to
3258 N_Expanded_Name, N_Identifier, N_Variable_Reference_Marker.
3259 (Is_Read): Use Flag4.
3260 (Is_SPARK_Mode_On_Node): New applicable to
3261 N_Variable_Reference_Marker.
3262 (Is_Write): Use Flag5.
3263 (Save_Invocation_Graph_Of_Body): New routine.
3264 (Set_Is_Elaboration_Checks_OK_Node): Now applicable to
3265 N_Variable_Reference_Marker.
3266 (Set_Is_Elaboration_Warnings_OK_Node): Now applicable to
3267 N_Expanded_Name, N_Identifier, N_Variable_Reference_Marker.
3268 (Set_Is_SPARK_Mode_On_Node): New applicable to
3269 N_Variable_Reference_Marker.
3270 (Set_Save_Invocation_Graph_Of_Body): New routine.
3271 * sinfo.ads: Update the documentation of attributes
3272 Is_Elaboration_Checks_OK_Node, Is_Elaboration_Warnings_OK_Node,
3273 Is_SPARK_Mode_On_Node. Update the flag usage of attributes
3274 Is_Read, Is_Write. Add attribute Save_Invocation_Graph_Of_Body
3275 and update its occurrence in nodes.
3276 (Save_Invocation_Graph_Of_Body): New routine along with pragma
3277 Inline.
3278 (Set_Save_Invocation_Graph_Of_Body): New routine along with
3279 pragma Inline.
3280 * switch-b.adb (Scan_Binder_Switches): Refactor the scanning of
3281 debug switches.
3282 (Scan_Debug_Switches): New routine.
3283 * libgnat/g-dynhta.adb, libgnat/g-dynhta.ads (Contains): New routine.
3284 * libgnat/g-graphs.adb (Associate_Vertices): Update the use of
3285 Component_Vertex_Iterator.
3286 (Contains_Component, Contains_Edge, Contains_Vertex, Has_Next):
3287 Reimplemented.
3288 (Iterate_Component_Vertices): New routine.
3289 (Iterate_Vertices): Removed.
3290 (Next): Update the parameter profile.
3291 (Number_Of_Component_Vertices, Number_Of_Outgoing_Edges): New
3292 routines.
3293 * libgnat/g-graphs.ads: Update the initialization of
3294 No_Component. Add type Component_Vertex_Iterator. Remove type
3295 Vertex_Iterator.
3296 (Has_Next): Add new versions and remove old ones.
3297 (Iterate_Component_Vertices): New routine.
3298 (Iterate_Vertices): Removed.
3299 (Next): Add new versions and remove old ones.
3300 (Number_Of_Component_Vertices, Number_Of_Outgoing_Edges): New
3301 routines.
3302 * libgnat/g-sets.adb (Contains): Reimplemented.
3303 * gcc-interface/Make-lang.in (GNATBIND_OBJS): Add
3304 GNAT.Dynamic_HTables, GNAT.Graphs and Bindo units.
3305 * rtsfind.ads: Remove extra space.
3306
df177848 33072019-07-03 Yannick Moy <moy@adacore.com>
3308
3309 * sem_spark.adb: Add support for locally borrowing and observing
3310 a path.
3311 (Get_Root_Object): Add parameter Through_Traversal to denote
3312 when we are interesting in getting to the traversed parameter.
3313 (Is_Prefix_Or_Almost): New function to support detection of
3314 illegal access to borrowed or observed paths.
3315 (Check_Pragma): Add analysis of assertion pragmas.
3316
f3f142ac 33172019-07-03 Ed Schonberg <schonberg@adacore.com>
3318
3319 * sem_ch13.adb (Build_Predicate_Functions): In a generic context
3320 we do not build the bodies of predicate fuctions, but the
3321 expression in a static predicate must be elaborated to allow
3322 case coverage checking within the generic unit.
3323 (Build_Discrete_Static_Predicate): In a generic context, return
3324 without building function body once the
3325 Static_Discrete_Predicate expression for the type has been
3326 constructed.
3327
99d90c85 33282019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
3329
3330 * bindgen.adb, inline.adb, layout.adb, sem_ch12.adb,
3331 sem_ch13.adb, sem_ch7.adb, styleg.adb: Minor reformatting.
3332
800597f6 33332019-07-03 Bob Duff <duff@adacore.com>
3334
3335 * par-ch3.adb (P_Defining_Identifier): Call
3336 Check_Defining_Identifier_Casing.
3337 * style.ads, styleg.ads, styleg.adb
3338 (Check_Defining_Identifier_Casing): New procedure to check for
3339 mixed-case defining identifiers.
3340 * stylesw.ads, stylesw.adb (Style_Check_Mixed_Case_Decls): New
3341 flag for checking for mixed-case defining identifiers.
3342 * doc/gnat_ugn/building_executable_programs_with_gnat.rst:
3343 Document new feature.
3344 * gnat_ugn.texi: Regenerate.
3345
2c75027a 33462019-07-03 Eric Botcazou <ebotcazou@adacore.com>
3347
3348 * doc/gnat_ugn/building_executable_programs_with_gnat.rst
3349 (Warning message control): Document that -gnatw.z/Z apply to
3350 array types.
3351 * freeze.adb (Freeze_Entity): Give -gnatw.z warning for array
3352 types as well, but not if the specified alignment is the minimum
3353 one.
3354 * gnat_ugn.texi: Regenerate.
3355
08237d0d 33562019-07-03 Bob Duff <duff@adacore.com>
3357
3358 * einfo.ads, exp_util.adb, layout.ads, sinfo.ads: Spell "laid"
3359 correctly.
3360
0396441f 33612019-07-03 Ed Schonberg <schonberg@adacore.com>
3362
3363 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): No error
3364 message on attribute applied to a renaming when the renamed
3365 object is an aggregate (from code reading).
3366 (Check_Aspect_At_End_Of_Declarations): In a generic context
3367 where freeze nodes are not generated, the original expression
3368 for an aspect may need to be analyzed to precent spurious
3369 conformance errors when compared with the expression that is
3370 anakyzed at the end of the current declarative list.
3371
c8406f30 33722019-07-03 Eric Botcazou <ebotcazou@adacore.com>
3373
3374 * layout.adb (Layout_Type): Do not set the component size of an
3375 array with a scalar component if the component type is
3376 overaligned.
3377
c38b32ea 33782019-07-03 Ed Schonberg <schonberg@adacore.com>
3379
c5c4ce6c 3380 * inline.adb (Make_Loop_Labels_Unique): New procedure to modify
c38b32ea 3381 the source code of subprograms that are inlined by the
3382 front-end, to prevent accidental duplication between loop labels
3383 in the inlined code and the code surrounding the inlined call.
3384
6d6f134e 33852019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
3386
3387 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update
3388 the section on resolving elaboration circularities to eliminate
3389 certain combinations of switches which together do not produce
3390 the desired effect and confuse users.
3391 * gnat_ugn.texi: Regenerate.
3392
f3e16ef4 33932019-07-03 Arnaud Charlet <charlet@adacore.com>
3394
3395 * bindgen.adb (Gen_Main): Disable generation of reference to
3396 Ada_Main_Program_Name for CCG.
3397 * bindusg.adb (Display): Add -G to the command-line usage for
3398 gnatbind.
3399 * opt.ads (Generate_C_Code): Update comment.
3400 * switch-b.adb (Scan_Binder_Switches): Add handling for -G.
3401
f4a31b16 34022019-07-03 Arnaud Charlet <charlet@adacore.com>
3403
3404 * sem_ch7.adb (Has_Referencer): Do not consider inlined
3405 subprograms when generating C code, which allows us to generate
3406 static inline subprograms.
3407
2f65e9f7 34082019-07-03 Justin Squirek <squirek@adacore.com>
3409
3410 * sem_ch6.adb (Check_Conformance): Add expression checking for
3411 constant modifiers in anonymous access types (in addition to
3412 "non-null" types) so that they are considered "matching" for
3413 subsequent conformance tests.
3414
c336ed70 34152019-07-03 Arnaud Charlet <charlet@adacore.com>
3416
3417 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
3418 Clarify wording on No_Multiple_Elaboration.
3419 * gnat_rm.texi: Regenerate.
3420
78611c86 34212019-07-03 Ed Schonberg <schonberg@adacore.com>
3422
3423 * sem_ch8.adb (Find_Selected_Component): If the prefix is the
3424 current instance of a type or subtype, complete the resolution
3425 of the name by finding the component of the type denoted by the
3426 selector name.
3427
5a87a4d9 34282019-07-03 Eric Botcazou <ebotcazou@adacore.com>
3429
3430 * doc/gnat_rm/interfacing_to_other_languages.rst (Interfacing to C):
3431 Document that boolean types with convention C now map to C99 bool.
3432 * gnat_rm.texi: Regenerate.
3433
371c539c 34342019-07-03 Javier Miranda <miranda@adacore.com>
3435
3436 * exp_attr.adb (Expand_Min_Max_Attribute): Code cleanup:
3437 removing code that it is now never executed in the CCG compiler
3438 (dead code).
3439
89d2d652 34402019-07-02 Iain Sandoe <iain@sandoe.co.uk>
3441
3442 * libgnat/system-darwin-ppc.ads: Set Stack_Check_Probes True for
3443 PPC Darwin.
3444
d21e66fb 34452019-07-01 Ed Schonberg <schonberg@adacore.com>
3446
3447 * sem_ch12.adb (Is_Defaulted): New predicate in
3448 Check_Formal_Package_Intance, to skip the conformance of checks
3449 on parameters of a formal package that are defaulted,
3450
7a42b778 34512019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
3452
3453 * checks.adb, exp_ch9.adb, exp_unst.adb, sem_ch4.adb,
3454 sem_prag.adb, sem_spark.adb: Minor reformatting.
3455
fc8ae496 34562019-07-01 Ed Schonberg <schonberg@adacore.com>
3457
3458 * sem_attr.adb (Analyze_Attribute, case Enum_Rep): Allow prefix
3459 of attribute to be an attribute reference of a discrete type.
3460
9d27ea41 34612019-07-01 Eric Botcazou <ebotcazou@adacore.com>
3462
3463 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Move up
3464 handling of Has_Pragma_Inline_Always and deal with
3465 Has_Pragma_No_Inline.
3466
bcb8dcf3 34672019-07-01 Ed Schonberg <schonberg@adacore.com>
3468
3469 * sem_ch3.adb (Build_Derived_Record_Type): If the parent type is
3470 declared as a subtype of a private type with an inherited
3471 discriminant constraint, its generated full base appears as a
3472 record subtype, so we need to retrieve its oen base type so that
3473 the inherited constraint can be applied to it.
3474
d087b9ca 34752019-07-01 Yannick Moy <moy@adacore.com>
3476
3477 * sem_spark.adb: Completely rework the algorithm for ownership
3478 checking, as the rules in SPARK RM have changed a lot.
3479 * sem_spark.ads: Update comments.
3480
fe48ee0a 34812019-07-01 Dmitriy Anisimkov <anisimko@adacore.com>
3482
3483 * gsocket.h (Has_Sockaddr_Len): Use the offset of sin_family offset in
3484 the sockaddr_in structure to determine the existence of length field
3485 before the sin_family.
3486
b20f7e2c 34872019-07-01 Ed Schonberg <schonberg@adacore.com>
3488
3489 * sem_prag.adb (Analyze_Pragma, case Weak_External): Pragma only
3490 applies to entities with run-time addresses, not to types.
3491
374fdf94 34922019-07-01 Piotr Trojanek <trojanek@adacore.com>
3493
3494 * einfo.adb, sem_ch7.adb, sem_prag.adb, sem_util.adb: Update
3495 references to the SPARK RM after the removal of Rule 7.1.4(5).
3496
bf13a79d 34972019-07-01 Piotr Trojanek <trojanek@adacore.com>
3498
3499 * sysdep.c: Cleanup references to LynuxWorks in docs and
3500 comments.
3501
866fa2d0 35022019-07-01 Ed Schonberg <schonberg@adacore.com>
3503
3504 * checks.adb (Insert_Valid_Check): Do not apply validity check
3505 to variable declared within a protected object that uses the
3506 Lock_Free implementation, to prevent unwarranted constant
3507 folding, because entities within such an object msut be treated
3508 as volatile.
3509
bcb5ab83 35102019-07-01 Eric Botcazou <ebotcazou@adacore.com>
3511
3512 * exp_ch9.adb (Check_Inlining): Deal with Has_Pragma_No_Inline.
3513
2db33bd6 35142019-07-01 Ed Schonberg <schonberg@adacore.com>
3515
3516 * exp_unst.adb (Visit_Node, Check_Static_Type): Improve the
3517 handling of private and incomplete types whose full view is an
3518 access type, to detect additional uplevel references in dynamic
3519 bounds. This is relevant to N_Free_Statement among others that
3520 manipulate types whose full viww may be an access type.
3521
6b4f0b7d 35222019-07-01 Pat Rogers <rogers@adacore.com>
3523
3524 * doc/gnat_rm/representation_clauses_and_pragmas.rst: Correct
3525 size indicated for R as a component of an array.
3526 * gnat_rm.texi: Regenerate.
3527
cdee70d7 35282019-07-01 Justin Squirek <squirek@adacore.com>
3529
3530 * libgnat/s-win32.ads: Add definition for ULONG, modify
3531 OVERLAPPED type, and add appropriate pragmas.
3532
2cf822b7 35332019-07-01 Bob Duff <duff@adacore.com>
3534
3535 * gnat1drv.adb (gnat1drv): Call Write_ALI if the main unit is
3536 ignored-ghost.
3537
0a1ece97 35382019-07-01 Yannick Moy <moy@adacore.com>
3539
3540 * sem_ch4.adb (Operator_Check): Refine error message.
3541
ee4279ef 35422019-07-01 Piotr Trojanek <trojanek@adacore.com>
3543
3544 * libgnat/a-calend.ads: Revert "Global => null" contracts on
3545 non-pure routines.
3546
2c6b4ada 35472019-07-01 Piotr Trojanek <trojanek@adacore.com>
3548
3549 * exp_attr.adb, libgnat/g-graphs.ads: Fix typos in comments:
3550 componant -> component.
3551
175c4526 35522019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
3553
3554 * libgnat/g-graphs.adb: Use type Directed_Graph rather than
3555 Instance in various routines.
3556 * libgnat/g-graphs.ads: Change type Instance to Directed_Graph.
3557 Update various routines that mention the type.
3558
a0d15509 35592019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
3560
3561 * libgnat/g-sets.adb: Use type Membership_Set rathern than
3562 Instance in various routines.
3563 * libgnat/g-sets.ads: Change type Instance to Membership_Set.
3564 Update various routines that mention the type.
3565
205a23a3 35662019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
3567
3568 * libgnat/g-lists.adb: Use type Doubly_Linked_List rather than
3569 Instance in various routines.
3570 * libgnat/g-lists.ads: Change type Instance to
3571 Doubly_Linked_List. Update various routines that mention the
3572 type.
3573
17fdf8c2 35742019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
3575
3576 * libgnat/g-dynhta.adb: Use type Dynamic_Hash_Table rather than
3577 Instance in various routines.
3578 * libgnat/g-dynhta.ads: Change type Instance to
3579 Dynamic_Hash_Table. Update various routines that mention the
3580 type.
3581
216ffc64 35822019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
3583
3584 * exp_attr.adb, exp_ch7.adb, exp_unst.adb, sem_ch3.adb,
3585 sem_util.adb, uintp.adb, uintp.ads: Minor reformatting.
3586
5051fe35 35872019-07-01 Javier Miranda <miranda@adacore.com>
3588
3589 * exp_attr.adb (Expand_Min_Max_Attribute): Disable expansion of
3590 'Min/'Max on integer, enumeration, fixed point and floating
3591 point types since the CCG backend now provides in file
3592 standard.h routines to support it.
3593
830a2a71 35942019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
3595
3596 * impunit.adb: Add GNAT.Graphs to list Non_Imp_File_Names_95.
3597 * Makefile.rtl, gcc-interface/Make-lang.in: Register unit
3598 GNAT.Graphs.
3599 * libgnat/g-dynhta.adb: Various minor cleanups (use Present
3600 rather than direct comparisons).
3601 (Delete): Reimplement to use Delete_Node.
3602 (Delete_Node): New routine.
3603 (Destroy_Bucket): Invoke the provided destructor.
3604 (Present): New routines.
3605 * libgnat/g-dynhta.ads: Add new generic formal Destroy_Value.
3606 Use better names for the components of iterators.
3607 * libgnat/g-graphs.adb, libgnat/g-graphs.ads: New unit.
3608 * libgnat/g-lists.adb: Various minor cleanups (use Present
3609 rather than direct comparisons).
3610 (Delete_Node): Invoke the provided destructor.
3611 (Present): New routine.
3612 * libgnat/g-lists.ads: Add new generic formal Destroy_Element.
3613 Use better names for the components of iterators.
3614 (Present): New routine.
3615 * libgnat/g-sets.adb, libgnat/g-sets.ads (Destroy, Preset,
3616 Reset): New routines.
3617
b0111d94 36182019-07-01 Dmitriy Anisimkov <anisimko@adacore.com>
3619
3620 * libgnat/g-sothco.adb (Get_Address): Fix the case when AF_INET6
3621 is not defined.
3622
7362896b 36232019-07-01 Ed Schonberg <schonberg@adacore.com>
3624
3625 * exp_attr.adb (Expand_Attribute_Reference, case Invalid_Value):
3626 Resolve result of call to Get_Simple_Init_Val, which may be a
3627 conversion of a literal.
3628
0dae8dc2 36292019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
3630
3631 * freeze.adb (Freeze_Expression): Remove the horrible useless
3632 name hiding of N. Insert the freeze nodes generated by the
3633 expression prior to the expression when the nearest enclosing
3634 scope is transient.
3635
487da8ff 36362019-07-01 Pierre-Marie de Rodat <derodat@adacore.com>
3637
3638 * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Fix
3639 formatting issues in the -gnatR section.
3640 * gnat_ugn.texi: Regenerate.
3641
1d79fa18 36422019-06-30 Iain Sandoe <iain@sandoe.co.uk>
3643
3644 * gnatlink.adb (Link_Step): Remove duplicate -static-libgcc switches.
3645 Push -shared-libgcc explicitly, when it is the target default (unless
3646 overidden by the static flag).
3647 When the user has put an instance of shared/static-libgcc do not push
3648 a duplicate of this.
3649
a850edcd 36502019-06-29 Eric Botcazou <ebotcazou@adacore.com>
3651
3652 * gcc-interface/decl.c (gnat_to_gnu_entity): Beep up comment on SAVED,
3653 and tweak comment on the assertion about the scopes of Itypes. Do not
3654 skip the regular processing for Itypes that are E_Record_Subtype with
3655 a Cloned_Subtype. Get the Cloned_Subtype for every E_Record_Subtype
3656 if the type is dummy and hasn't got its own freeze node.
3657 <E_Record_Subtype>: Save again the DECL of the Cloned_Subtype, if any.
3658 <E_Access_Subtype>: Save again the DECL of the equivalent type.
3659 (Gigi_Equivalent_Type) <E_Access_Subtype>: New case.
3660
b1e46fb1 36612019-06-29 Eric Botcazou <ebotcazou@adacore.com>
3662
3663 * gcc-interface/utils.c (unchecked_convert): Tweak comment. Only skip
3664 dereferences when padding to have the same size on both sides. Do it
3665 for destination types with self-referential size too.
3666
07e38949 36672019-06-29 Eric Botcazou <ebotcazou@adacore.com>
3668
3669 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: If the
3670 type requires strict alignment, then set the RM size to the type size.
3671 Rework handling of alignment and sizes of tagged types in ASIS mode.
3672 (validate_size): Rename local variable and remove special handling for
3673 strict-alignment types.
3674 * gcc-interface/utils.c (finish_record_type): Constify local variables
3675 and use properly typed constants.
3676
f4409741 36772019-06-29 Eric Botcazou <ebotcazou@adacore.com>
3678
3679 * gcc-interface/decl.c (gnat_to_gnu_field): Rework error messages for
3680 fields requiring strict alignment, add explicit test on Storage_Unit
3681 for position and size, and mention type alignment for position.
3682
5882c515 36832019-06-29 Eric Botcazou <ebotcazou@adacore.com>
3684
3685 * gcc-interface/trans.c (mark_visited_r): Set TYPE_SIZES_GIMPLIFIED on
3686 the main variant of a type, if any.
3687
d0de0a27 36882019-06-29 Eric Botcazou <ebotcazou@adacore.com>
3689
3690 * gcc-interface/decl.c (set_nonaliased_component_on_array_type): Add
3691 missing guard for the presence of TYPE_CANONICAL.
3692 (set_reverse_storage_order_on_array_type): Likewise.
3693
2074c859 36942019-06-29 Eric Botcazou <ebotcazou@adacore.com>
3695
3696 * gcc-interface/gigi.h (make_packable_type): Remove default value.
3697 (value_factor_p): Tweak prototype.
3698 * gcc-interface/decl.c (gnat_to_gnu_entity): Add comment.
3699 (gnat_to_gnu_component_type): Likewise.
3700 (gnat_to_gnu_field): Likewise. Fetch the position of the field earlier
3701 and simplify the condition under which the type is packed. Declare
3702 local variable is_bitfield. Pass 1 as max_align to make_packable_type
3703 if it is set to true.
3704 (copy_and_substitute_in_layout): Pass 0 to make_packable_type.
3705 * gcc-interface/utils.c (make_packable_array_type): New function.
3706 (make_packable_type): Use it to rewrite the type of array field.
3707 (maybe_pad_type): Pass align parameter to make_packable_type.
3708 (create_field_decl): Minor tweaks.
3709 (value_factor_p): Assert that FACTOR is a power of 2 and replace the
3710 modulo computation by a masking operation.
3711
83c6da22 37122019-06-25 Eric Botcazou <ebotcazou@adacore.com>
3713
3714 * gcc-interface/decl.c (gnat_to_gnu_entity): Remove superfluous test
3715 in previous change.
3716 * gcc-interface/gigi.h (maybe_character_type): Fix formatting.
3717 (maybe_character_value): Likewise.
3718
aaabc7bc 37192019-06-24 Jan Hubicka <jh@suse.cz>
3720
3721 * gcc-interface/decl.c (gnat_to_gnu_entity): Check that
3722 type is array or integer prior checking string flag.
83c6da22 3723 * gcc-interface/gigi.h (maybe_character_type): Likewise.
3724 (maybe_character_value): Likewise.
aaabc7bc 3725
5fe09a56 37262019-06-24 Martin Sebor <msebor@redhat.com>
3727
3728 * gcc-interface/utils.c (handle_nonnull_attribute): Quote attribute
3729 name.
3730
bd9331d6 37312019-06-18 Arnaud Charlet <charlet@adacore.com>
3732
83c6da22 3733 PR ada/80590
bd9331d6 3734 * sem_ch5.adb (Analyze_Loop_Statement): Avoid exception propagation
3735 during normal processing.
3736
8a5a7d1c 37372019-06-17 Arnaud Charlet <charlet@adacore.com>
3738
83c6da22 3739 PR ada/80590
8a5a7d1c 3740 * exp_ch9.adb (Expand_N_Delay_Relative_Statement): Swap the two
3741 conditions to avoid a unnecessary exception propagation in the default
3742 case.
3743
580934f6 37442019-05-28 Eric Botcazou <ebotcazou@adacore.com>
3745
3746 * gcc-interface/utils.c (handle_stack_protect_attribute): Move around.
3747
c8956236 37482019-05-28 Eric Botcazou <ebotcazou@adacore.com>
3749
3750 * doc/gnat_rm/implementation_defined_pragmas.rst (Machine_Attribute):
3751 Document additional optional parameters.
3752 * sem_prag.adb (Analyze_Pragma) <Pragma_Machine_Attribute>: Accept
3753 more than one optional parameter.
3754 * gcc-interface/decl.c (prepend_one_attribute_pragma): Alphabetize
3755 the list of supported pragmas. Simplify the handling of parameters
3756 and add support for more than one optional parameter.
3757 * gcc-interface/utils.c (attr_cold_hot_exclusions): New constant.
3758 (gnat_internal_attribute_table): Add entry for no_icf, noipa, flatten,
3759 used, cold, hot, target and target_clones.
3760 (begin_subprog_body): Do not create the RTL for the subprogram here.
3761 (handle_noicf_attribute): New static function.
3762 (handle_noipa_attribute): Likewise.
3763 (handle_flatten_attribute): Likewise.
3764 (handle_used_attribute): Likewise.
3765 (handle_cold_attribute): Likewise.
3766 (handle_hot_attribute): Likewise.
3767 (handle_target_attribute): Likewise.
3768 (handle_target_clones_attribute): Likewise.
3769
62b762c2 37702019-05-28 Eric Botcazou <ebotcazou@adacore.com>
3771
3772 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Return 0
3773 for 'Size too.
3774 (Identifier_to_gnu): Use the actual subtype for a reference to a
3775 packed array in a return statement.
3776 (Attribute_to_gnu) <Attr_Size>: Do not strip VIEW_CONVERT_EXPRs from
3777 the prefix in every case.
3778
336a61a3 37792019-05-28 Eric Botcazou <ebotcazou@adacore.com>
3780
3781 * gcc-interface/trans.c (gnat_to_gnu): Remove superfluous tests on
3782 Backend_Overflow_Checks_On_Target and rework comments.
3783
983c5b5e 37842019-05-28 Eric Botcazou <ebotcazou@adacore.com>
3785
3786 * gcc-interface/trans.c (walk_nesting_tree): New static function.
3787 (finalize_nrv): Use it to walk the entire nesting tree.
3788
96b4b84e 37892019-05-28 Eric Botcazou <ebotcazou@adacore.com>
3790
3791 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Remove
3792 obsolete test on Is_For_Access_Subtype.
3793
0b74284e 37942019-05-28 Eric Botcazou <ebotcazou@adacore.com>
3795
3796 * gcc-interface/decl.c (components_to_record): Set a name on the type
3797 created for the REP part, if any.
3798 * gcc-interface/utils.c (finish_record_type): Only take the maximum
3799 when merging sizes for a variant part at offset 0.
3800 (merge_sizes): Rename has_rep parameter into max.
3801
689dab9d 38022019-05-28 Eric Botcazou <ebotcazou@adacore.com>
3803
3804 * gcc-interface/utils.c (gnat_internal_attribute_table): Add support
3805 for stack_protect attribute.
3806 (handle_stack_protect_attribute): New static function.
3807
804f7d39 38082019-05-28 Eric Botcazou <ebotcazou@adacore.com>
3809
3810 * gcc-interface/decl.c (intrin_arglists_compatible_p): Do not return
3811 false if the internal builtin uses a variable list.
3812
f07f94cc 38132019-05-27 Eric Botcazou <ebotcazou@adacore.com>
3814
3815 * gcc-interface/trans.c (Call_to_gnu): Do not initialize the temporary
3816 created out of addressability concerns if it's for the _Init parameter
3817 of an initialization procedure.
3818
abfd658b 38192019-05-27 Eric Botcazou <ebotcazou@adacore.com>
3820
3821 * gcc-interface/ada-builtin-types.def: New file.
3822 * gcc-interface/ada-builtins.def: Likewise.
3823 * gcc-interface/ada-tree.h (BUILT_IN_LIKELY): New macro.
3824 (BUILT_IN_UNLIKELY): Likewise.
3825 * gcc-interface/trans.c (independent_iterations_p): Initialize the
3826 auto-vector to 16 elements.
3827 (Call_to_gnu): Remove local variable and change the vector of actual
3828 parameters to an auto-vector. Do not convert actual parameters to
3829 the argument type for front-end built-in functions. Add support for
3830 front-end built-in functions.
3831 (build_noreturn_cond): Use internal instead of built-in function.
3832 * gcc-interface/utils.c (c_builtin_type): Include ada-builtin-types.def
3833 (install_builtin_function_types): Likewise.
3834 (install_builtin_functions): Include ada-builtins.def first.
3835
caab73a2 38362019-05-27 Eric Botcazou <ebotcazou@adacore.com>
3837
3838 * gcc-interface/utils.c (maybe_pad_type): Issue the warning for the
3839 specific case of component types preferably.
3840
f1ca2388 38412019-05-27 Eric Botcazou <ebotcazou@adacore.com>
3842
3843 * gcc-interface/trans.c (Identifier_to_gnu): Minor tweaks.
3844 (gnat_to_gnu): Do not convert the result if it is a reference to an
3845 unconstrained array used as the prefix of an attribute reference that
3846 requires an lvalue.
3847
e3f3573c 38482019-05-27 Eric Botcazou <ebotcazou@adacore.com>
3849
3850 * gcc-interface/trans.c (Gigi_Types_Compatible): New predicate.
3851 (Identifier_to_gnu): Use it to assert that the type of the identifier
3852 and that of its entity are compatible for gigi. Rename a couple of
3853 local variables and separate the processing of the result type.
3854
2306cd17 38552019-05-27 Eric Botcazou <ebotcazou@adacore.com>
3856
3857 * gcc-interface/trans.c (Call_to_gnu): Use the unpadded type when
3858 putting back an intermediate conversion the type of the actuals.
3859
6e4e9378 38602019-05-27 Eric Botcazou <ebotcazou@adacore.com>
3861
3862 * gcc-interface/trans.c (gnat_to_gnu) <Shift operations>: Convert the
3863 count to the unsigned version of its base type before proceeding.
3864
85b9be9b 38652019-05-16 Martin Sebor <msebor@redhat.com>
3866
3d6be0d5 3867 * gcc-interface/trans.c (check_inlining_for_nested_subprog): Quote
3868 reserved names.
85b9be9b 3869
65d973ca 38702019-05-08 Arnaud Charlet <charlet@adacore.com>
3871
3872 * standard.ads.h: New file.
3873
ff628b99 38742019-05-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3875
3876 * gcc-interface/Makefile.in (install-gcc-specs): Use foreach.
3877 Honor DESTDIR.
3878
ebd761d4 38792019-04-29 Michael K. Darling <darlingm@gmail.com>
3880
3881 * gnatvsn.ads: Bump Library_Version to 10.
3882
5f260823 38832019-04-24 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3884 Bernd Edlinger <bernd.edlinger@hotmail.de>
3885 Jakub Jelinek <jakub@redhat.com>
3886
3887 PR target/89093
3888 * raise-gcc.c (TARGET_ATTRIBUTE): Define.
3889 (continue_unwind, personality_body, PERSONALITY_FUNCTION): Add
3890 TARGET_ATTRIBUTE.
3891
d7ca95c0 38922019-04-07 Eric Botcazou <ebotcazou@adacore.com>
3893
3894 * libgnat/i-cexten.ads (CFloat_128): New type.
3895
26b21081 38962019-03-22 Dmitriy Anisimkov <anisimko@adacore.com>
3897
3898 PR ada/89583
3899 * libgnat/g-socket.adb (Bind_Socket, Connect_Socket,
3900 Send_Socket): Fix the computation of structure lengths passed to
3901 low level routines.
3902 (Is_IPv6_Address): Fix the number of expected colons.
3903
2f6d557f 39042019-03-11 Martin Liska <mliska@suse.cz>
3905
d325ee67 3906 * gcc-interface/misc.c (gnat_post_options): Wrap option name in string
3907 format message and fix GNU coding style.
2f6d557f 3908
c1ad6672 39092019-02-08 Eric Botcazou <ebotcazou@adacore.com>
3910
3911 * gcc-interface/trans.c (gnat_to_gnu) <N_Aggregate>: Minor tweak.
3912 * gcc-interface/utils.c (convert): Do not pad when doing an unchecked
3913 conversion here. Use TREE_CONSTANT throughout the function.
3914 (unchecked_convert): Also pad if the source is a CONSTRUCTOR and the
3915 destination is a more aligned array type or a larger aggregate type,
3916 but not between original and packable versions of a type.
3917
62a6ebbd 39182019-02-08 Eric Botcazou <ebotcazou@adacore.com>
3919
3920 * gcc-interface/utils.c (max_size) <tcc_unary>: Be prepared for an
3921 operand with VOID_TYPE.
3922
da383d19 39232019-02-08 Eric Botcazou <ebotcazou@adacore.com>
3924
3925 * gcc-interface/trans.c (elaborate_all_entities): Do not elaborate the
3926 entities of a package renaming another one.
3927
09c123a0 39282019-02-08 Eric Botcazou <ebotcazou@adacore.com>
3929
3930 * gcc-interface/trans.c (Regular_Loop_to_gnu): Replace tests on
3931 individual flag_unswitch_loops and flag_tree_loop_vectorize switches
3932 with test on global optimize switch.
3933 (Raise_Error_to_gnu): Likewise.
3934
a9dd7273 39352019-02-07 Eric Botcazou <ebotcazou@adacore.com>
3936
3937 * libgnarl/s-linux__sparc.ads (ETIMEDOUT): Set to correct value.
3938
4836c4f1 39392019-02-06 Arnaud Charlet <charlet@adacore.com>
3940
3941 * libgnarl/s-linux__x32.ads: Resync list of signals with s-linux.ads
3942
6b56937c 39432019-01-27 Eric Botcazou <ebotcazou@adacore.com>
3944
3945 * repinfo.adb (List_Component_Layout): Remove superfluous space for
3946 zero-sized field.
3947 * gcc-interface/ada-tree.h (TYPE_IS_EXTRA_SUBTYPE_P): New macro.
3948 * gcc-interface/gigi.h (create_extra_subtype): Declare.
3949 * gcc-interface/decl.c (TYPE_ARRAY_SIZE_LIMIT): Likewise.
3950 (update_n_elem): New function.
3951 (gnat_to_gnu_entity): Use create_extra_subtype to create extra subtypes
3952 instead of doing it manually.
3953 <E_Array_Type>: Use update_n_elem to compute the maximum size. Use the
3954 index type instead of base type for the bounds. Set TYPE_ARRAY_MAX_SIZE
3955 of the array to the maximum size.
3956 <E_Array_Subtype>: Create an extra subtype using the index type of the
3957 base array type for self-referential bounds. Use update_n_elem to
3958 compute the maximum size. Set TYPE_ARRAY_MAX_SIZE of the array to the
3959 maximum size.
3960 (gnat_to_gnu_field): Clear DECL_NONADDRESSABLE_P on discriminants.
3961 * gcc-interface/misc.c (gnat_get_alias_set): Return the alias set of
3962 the base type for an extra subtype.
3963 (gnat_type_max_size): Remove obsolete code.
3964 * gcc-interface/trans.c (Attribute_to_gnu): Minor tweak.
3965 (can_be_lower_p): Deal with pathological types.
3966 * gcc-interface/utils.c (create_extra_subtype): New function.
3967 (create_field_decl): Minor tweak.
3968 (max_size) <tcc_reference>: Compute a better value by using the extra
3969 subtypes on the self-referential bounds.
3970 <tcc_binary>: Rewrite. Deal with "negative value" in unsigned types.
3971 <tcc_expression>: Likewise.
3972 * gcc-interface/utils2.c (compare_arrays): Retrieve the original bounds
3973 of the arrays upfront. Swap only if the second length is not constant.
3974 Use comparisons on the original bounds consistently for the null tests.
3975 (build_binary_op): Use TYPE_IS_EXTRA_SUBTYPE_P macro.
3976 (build_allocator): Minor tweak.
3977
ecb2c722 39782019-01-27 Eric Botcazou <ebotcazou@adacore.com>
3979
3980 * gcc-interface/decl.c (array_type_has_nonaliased_component): Return
3981 the same value for every dimension of a multidimensional array type.
3982
10f25579 39832019-01-26 Eric Botcazou <ebotcazou@adacore.com>
3984
3985 * gcc-interface/trans.c (Regular_Loop_to_gnu): Use the SLOC of the
3986 iteration scheme, if present, throughout the translation.
3987
aced6683 39882019-01-26 Eric Botcazou <ebotcazou@adacore.com>
3989
3990 * gcc-interface/trans.c (gnat_to_gnu) <N_Assignment_Statement>: Use
3991 DECL_SIZE_UNIT instead of TYPE_SIZE_UNIT for the size to be assigned
3992 by a call to memset if the LHS is a DECL.
3993
18b4b30e 39942019-01-26 Eric Botcazou <ebotcazou@adacore.com>
3995
3996 * gcc-interface/trans.c (struct loop_info_d): Remove artificial field.
3997 (Loop_Statement_to_gnu): Do not set it.
3998
6dce35b7 39992019-01-26 Eric Botcazou <ebotcazou@adacore.com>
4000
4001 * gcc-interface/trans.c (Iterate_Acc_Clause_Arg): Fix formatting.
4002 (Acc_gnat_to_gnu): Likewise.
4003 (Acc_Data_to_gnu): Likewise.
4004 (Acc_Var_to_gnu): Likewise.
4005 (Acc_Reduc_to_gnu): Likewise.
4006 (Acc_Size_List_to_gnu): Likewise.
4007 (Pragma_to_gnu) <Pragma_Acc_Loop>: Likewise.
4008 <Pragma_Acc_Data>): Likewise.
4009 (find_loop_for): Remove default value for parameters.
4010 * gcc-interface/trans.c (gnat_to_gnu) <N_Op_And>: Merge into...
4011 <N_Op_Eq>): ...this.
4012
f8cd11ee 40132019-01-26 Eric Botcazou <ebotcazou@adacore.com>
4014
4015 * gcc-interface/decl.c (annotate_value) <INTEGER_CST>: Use test on
4016 the sign bit instead of on the sign of the value.
4017 <PLUS_EXPR>: Turn addition of negative constant into subtraction.
4018 <MULT_EXPR>: Add test for degenerate case.
4019 <BIT_AND_EXPR>: Simplify.
4020
9a3c51d9 40212019-01-18 Sebastian Huber <sebastian.huber@embedded-brains.de>
4022
4023 * s-oscons-tmplt.c (AF_INET6): Do not undefine for RTEMS.
4024
07c11f2b 40252019-01-09 Sandra Loosemore <sandra@codesourcery.com>
4026
4027 PR other/16615
07c11f2b 4028 * exp_ch11.adb: Change "can not" to "cannot".
4029 * sem_ch4.adb: Likewise.
4030
f4d3c071 40312019-01-09 Sandra Loosemore <sandra@codesourcery.com>
4032
4033 PR other/16615
f4d3c071 4034 * exp_ch9.adb: Mechanically replace "can not" with "cannot".
4035 * libgnat/s-regpat.ads: Likewise.
4036 * par-ch4.adb: Likewise.
4037 * set_targ.adb: Likewise.
4038 * types.ads: Likewise.
4039
902071d1 40402019-01-08 Justin Squirek <squirek@adacore.com>
4041
4042 Revert:
902071d1 4043 2018-07-31 Justin Squirek <squirek@adacore.com>
4044
76fb0465 4045 * lib-writ.adb (Write_With_Lines): Modfiy the generation
4046 of dependencies within ali files so that source unit
4047 bodies are properly listed even if said bodies are
4048 missing. Perform legacy behavior in GNATprove mode.
4049 * lib-writ.ads: Modify documentation to reflect current
4050 behavior.
902071d1 4051
4052 and:
902071d1 4053 2018-09-26 Justin Squirek <squirek@adacore.com>
4054
76fb0465 4055 * lib-writ.adb, lib-writ.ads (Write_With_Lines): Add
4056 documentation and an extra conditional check for RCI
4057 units so that generated ali files will list the spec
4058 only instead of a body when a body is not found.
902071d1 4059
65a33d4a 40602019-01-04 Eric Botcazou <ebotcazou@adacore.com>
4061
4062 * gnatvsn.ads: Bump copyright year.
4063
3d8932fd 40642019-01-01 Jakub Jelinek <jakub@redhat.com>
8e8f6434 4065
fbd26352 4066 Update copyright years.
4067
277184bc 4068 * gnat_ugn.texi: Bump @copying's copyright year.
4069 * gnat_rm.texi: Likewise.
7dfbd804 4070\f
3d8932fd 4071Copyright (C) 2019 Free Software Foundation, Inc.
7dfbd804 4072
4073Copying and distribution of this file, with or without modification,
4074are permitted in any medium without royalty provided the copyright
4075notice and this notice are preserved.