[Ada] Fix internal error on inlined subprogram instance
[gcc.git] / gcc / ada / ChangeLog
1 2019-08-14 Eric Botcazou <ebotcazou@adacore.com>
2
3 * sem_ch12.adb (Analyze_Instance_And_Renamings): Do not reset
4 the Is_Generic_Instance flag previously set on the package
5 generated for the instantiation of a generic subprogram.
6
7 2019-08-14 Ed Schonberg <schonberg@adacore.com>
8
9 * exp_ch4.adb (Expand_N_Quantified_Expression): Freeze
10 explicitly the type of the loop parameter.
11
12 2019-08-14 Javier Miranda <miranda@adacore.com>
13
14 * sem_util.adb (New_Copy_Tree.Copy_Node_With_Replacement):
15 Update the Chars attribute of identifiers.
16
17 2019-08-14 Yannick Moy <moy@adacore.com>
18
19 * sem_spark.adb, sem_spark.ads (Is_Legal): New function exposed
20 for use in GNATprove, to test legality rules not related to
21 permissions.
22 (Check_Declaration_Legality): Extract the part of
23 Check_Declaration that checks rules not related to permissions.
24 (Check_Declaration): Call the new Check_Declaration_Legality.
25 (Check_Type_Legality): Rename of Check_Type. Introduce
26 parameters to force or not checking, and update a flag detecting
27 illegalities.
28 (Check_Node): Ignore attribute references in statement position.
29
30 2019-08-14 Yannick Moy <moy@adacore.com>
31
32 * sem_spark.adb (Check_Old_Loop_Entry): New procedure to check
33 correct use of Old and Loop_Entry.
34 (Check_Node): Check subprogram contracts.
35 (Check_Pragma): Check Loop_Variant.
36 (Check_Safe_Pointers): Apply checking to library-level
37 subprogram declarations as well, in order to check their
38 contract.
39
40 2019-08-14 Yannick Moy <moy@adacore.com>
41
42 * sem_spark.adb (Is_Subpath_Expression): Take into account
43 conversion and qualification.
44
45 2019-08-14 Eric Botcazou <ebotcazou@adacore.com>
46
47 * sem_ch7.adb (Install_Private_Declarations)
48 <Swap_Private_Dependents>: Do not rely solely on the
49 Is_Child_Unit flag on the unit to recurse.
50 (Uninstall_Declarations) <Swap_Private_Dependents>: New
51 function. Use it to recurse on the private dependent entities
52 for child units.
53
54 2019-08-14 Javier Miranda <miranda@adacore.com>
55
56 * exp_aggr.adb (Is_CCG_Supported_Aggregate): Return False for
57 arrays with bounds not known at compile time.
58
59 2019-08-14 Ed Schonberg <schonberg@adacore.com>
60
61 * sem_util.adb (New_Copy_Tree, Visit_Entity): A quantified
62 expression includes the implicit declaration of the loop
63 parameter. When a quantified expression is copied during
64 expansion, for example when building the precondition code from
65 the generated pragma, a new loop parameter must be created for
66 the new tree, to prevent duplicate declarations for the same
67 symbol.
68
69 2019-08-14 Yannick Moy <moy@adacore.com>
70
71 * sem_disp.adb (Check_Dispatching_Operation): Update assertion
72 for the separate declarations created in GNATprove mode.
73 * sem_disp.ads (Is_Overriding_Subprogram): Update comment.
74 * sem_elab.adb (SPARK_Processor): Fix test for checking of
75 overriding primitives.
76
77 2019-08-14 Eric Botcazou <ebotcazou@adacore.com>
78
79 * inline.adb (Add_Inlined_Body): Tweak comments.
80 (List_Inlining_Info): Also list information about non-main
81 units.
82
83 2019-08-14 Gary Dismukes <dismukes@adacore.com>
84
85 * sem_ch4.adb (Analyze_Selected_Component): In the case where
86 the prefix is of a concurrent type, and the selected entity
87 matching the selector is the first private declaration of the
88 type (such as the first local variable in a task's body), set
89 Is_Private_Op.
90
91 2019-08-14 Piotr Trojanek <trojanek@adacore.com>
92
93 * einfo.adb (Is_Generic_Actual_Subprogram): Replace repeated
94 calls to Ekind with Ekind_In.
95
96 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
97
98 PR middle-end/91421
99 * gcc-interface/trans.c (gigi): Call set_decl_buillt_in_function.
100 (Call_to_gnu): Use DECL_FE_FUNCTION_CODE instead of DECL_FUNCTION_CODE.
101
102 2019-08-13 Eric Botcazou <ebotcazou@adacore.com>
103
104 * ali.ads (Linker_Option_Record): Remove Original_Pos component.
105 * ali.adb (Scan_ALI): Do not set it.
106
107 2019-08-13 Eric Botcazou <ebotcazou@adacore.com>
108
109 * sem_ch3.adb (Build_Derived_Concurrent_Type): Add a couple of
110 local variables and use them. When the derived type fully
111 constrains the parent type, rewrite it as a subtype of an
112 implicit (unconstrained) derived type instead of the other way
113 around.
114 (Copy_And_Build): Deal with concurrent types and use predicates.
115 (Build_Derived_Private_Type): Build the full derivation if
116 needed for concurrent types too.
117 (Build_Derived_Record_Type): Add marker comment.
118 (Complete_Private_Subtype): Use predicates.
119
120 2019-08-13 Ed Schonberg <schonberg@adacore.com>
121
122 * sem_ch3.adb (Check_Generic_Ancestor): New subprogram,
123 aubsidiary to Build_Derived_Record_Type. to enforce the rule
124 that a type extension declared in a generic body cznnot have an
125 ancestor that is a generic formal (RM 3.9.1 (4/2)). The rule
126 applies to all ancestors of the type, including interface
127 progenitors.
128
129 2019-08-13 Eric Botcazou <ebotcazou@adacore.com>
130
131 * sem_ch3.adb (Build_Underlying_Full_View): Delete.
132 (Complete_Private_Subtype): Do not set the full view on the
133 private subtype here. If the full base is itself derived from
134 private, do not re-derive the parent type but instead constrain
135 an existing underlying full view.
136 (Prepare_Private_Subtype_Completion): Do not get to the
137 underlying full view, if any. Set the full view on the private
138 subtype here.
139 (Process_Full_View): Likewise.
140 * sem_ch12.adb (Check_Generic_Actuals): Also set
141 Is_Generic_Actual_Type on the full view if the type of the
142 actual is private.
143 (Restore_Private_Views): Also reset Is_Generic_Actual_Type on
144 the full view if the type of the actual is private.
145 * sem_eval.adb (Subtypes_Statically_Match): Remove bypass for
146 generic actual types.
147
148 2019-08-13 Javier Miranda <miranda@adacore.com>
149
150 * sem_res.adb (Resolve_Selected_Component): When the type of the
151 component is an access to a class-wide type and the type of the
152 context is an access to a tagged type the relevant type is that
153 of the component (since in such case we may need to generate
154 implicit type conversions or dispatching calls).
155
156 2019-08-13 Ed Schonberg <schonberg@adacore.com>
157
158 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Preanalyze
159 expression, rather do a full analysis, to prevent unwanted
160 removal of side effects which mask the intent of the expression.
161
162 2019-08-13 Eric Botcazou <ebotcazou@adacore.com>
163
164 * impunit.adb (Non_Imp_File_Names_95): Add
165 GNAT.Branch_Prediction.
166
167 2019-08-13 Eric Botcazou <ebotcazou@adacore.com>
168
169 * exp_ch6.adb: Remove with and use clauses for Sem_Ch12.
170 (Expand_Call_Helper): Swap the back-end inlining case and the
171 special front-end expansion case. In back-end inlining mode, do
172 not invoke Add_Inlined_Body unless the call may be inlined.
173 * inline.ads (Add_Pending_Instantiation): New function moved
174 from...
175 * inline.adb (Add_Inlined_Body): Simplify comment. Turn test on
176 the enclosing unit into assertion.
177 (Add_Pending_Instantiation): New function moved from...
178 * sem_ch12.ads (Add_Pending_Instantiation): ...here.
179 * sem_ch12.adb (Add_Pending_Instantiation): ...here.
180
181 2019-08-13 Eric Botcazou <ebotcazou@adacore.com>
182
183 * sem.adb (Do_Analyze): Recompute Style_Check_Max_Line_Length
184 after restoring Style_Max_Line_Length.
185
186 2019-08-13 Arnaud Charlet <charlet@adacore.com>
187
188 * sem_ch13.adb (Check_Iterator_Functions): Protect against
189 cascaded errors.
190
191 2019-08-13 Ed Schonberg <schonberg@adacore.com>
192
193 * sem_ch8.adb (Analyze_Subprogram_Renaming): Do no suppress mode
194 conformance checks on child unit instance that is a compilation
195 unit.
196
197 2019-08-13 Gary Dismukes <dismukes@adacore.com>
198
199 * exp_dbug.adb (Fully_Qualify_Name): Add full name qualification
200 for the E_Exception case.
201
202 2019-08-13 Gary Dismukes <dismukes@adacore.com>
203
204 * exp_aggr.adb (Aggr_Size_OK): Compute the aggregate size using
205 universal arithmetic, to avoid situations where the size
206 computation overflows.
207
208 2019-08-13 Justin Squirek <squirek@adacore.com>
209
210 * repinfo.adb (List_Scalar_Storage_Order): Modify conditionals
211 for displaying ordering to always be triggered when -gnatR4 is
212 in effect.
213
214 2019-08-13 Justin Squirek <squirek@adacore.com>
215
216 * aspects.adb, aspects.ads: Register new aspect.
217 * par-prag.adb (Prag): Register new pragma
218 * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing
219 for new aspect similar to Aspect_Max_Entry_Queue_Length.
220 * sem_prag.adb, sem_prag.ads (Analyze_Pragma): Register new
221 pragma and set it to use the same processing as
222 Pragma_Max_Queue_Length.
223 * snames.ads-tmpl: Move definition of
224 Name_Max_Entry_Queue_Length so that it can be processed as a
225 pragma in addition to a restriction and add an entry for the
226 pragma itself.
227
228 2019-08-13 Yannick Moy <moy@adacore.com>
229
230 * sem_ch4.adb (Analyze_Allocator): Do not insert subtype
231 declaration for allocator inside a spec expression.
232
233 2019-08-13 Yannick Moy <moy@adacore.com>
234
235 * sem_res.adb (Resolve_Call): Do not inline calls inside record
236 types.
237
238 2019-08-13 Eric Botcazou <ebotcazou@adacore.com>
239
240 * sem_ch4.adb (Analyze_One_Call): Remove bypass for type
241 mismatch in nested instantiations.
242 * sem_ch8.adb (Find_Nearer_Entity): New function.
243 (Find_Renamed_Entity): Use it to disambiguate the candidates for
244 the renaming generated for an instantiation when it is
245 ambiguous.
246
247 2019-08-13 Eric Botcazou <ebotcazou@adacore.com>
248
249 * gnat1drv.adb (Adjust_Global_Switches): Do not set
250 Back_End_Inlining in ASIS mode either.
251
252 2019-08-13 Olivier Hainque <hainque@adacore.com>
253
254 * libgnat/s-win32.ads: Define size_t and fix the MapViewOfFile
255 binding to use it instead of DWORD for the dwNumberOfBytesToMap
256 argument.
257 * libgnat/g-sercom__mingw.adb (Read): State which definition of
258 size_t to fetch in call to Last_Index.
259
260 2019-08-13 Arnaud Charlet <charlet@adacore.com>
261
262 * gcc-interface/Make-lang.in: Remove unused TRACE variable. Pass
263 LN_S to relevant gnatlib targets.
264 * gcc-interface/Makefile.in: Systematically pass LN_S to
265 relevant gnatlib targets.
266
267 2019-08-13 Yannick Moy <moy@adacore.com>
268
269 * sem_dim.adb (Analyze_Dimension,
270 Analyze_Dimension_Array_Aggregate, Analyze_Dimension_Call,
271 Analyze_Dimension_Extension_Or_Record_Aggregate): Return
272 immediately when inside an inlined body.
273 * sem_res.adb (Resolve_Call): Remove special checking now done
274 inside Analyze_Dimension_Call.
275
276 2019-08-13 Justin Squirek <squirek@adacore.com>
277
278 * exp_ch4.adb (Expand_N_Allocator): Add condition to detect
279 library-level object declarations
280
281 2019-08-13 Eric Botcazou <ebotcazou@adacore.com>
282
283 * doc/gnat_ugn/building_executable_programs_with_gnat.rst
284 (-gnateT): Document Double_Float_Alignment parameter and fix
285 description of Double_Scalar_Alignment parameter.
286 * gnat_ugn.texi: Regenerate.
287
288 2019-08-13 Eric Botcazou <ebotcazou@adacore.com>
289
290 * exp_ch6.adb (Expand_Call_Helper): If back-end inlining is
291 enabled, also instantiate the body of a generic unit containing
292 a subprogram subject to aspect/pragma Inline_Always at
293 optimization level zero.
294 * sem_ch12.adb (Might_Inline_Subp): Minor tweak.
295 (Analyze_Package_Instantiation): Do not instantiate the package
296 body because of inlining considerations if the instantiation is
297 done in a generic unit. Move around similar condition involving
298 the main unit. Add test on Back_End_Inlining to processing for
299 front-end inlining.
300
301 2019-08-13 Javier Miranda <miranda@adacore.com>
302
303 * exp_disp.adb (Make_Secondary_DT): Handle record type
304 derivations that have interface components located at fixed
305 positions and interface components located at variable offset.
306 The offset of components located at fixed positions is computed
307 using the dummy object (similar to the case where all the
308 interface components are located at fixed positions).
309 (Make_DT): Build the dummy object for all tagged types that
310 implement interface types (that is, build it also for types with
311 variable size components), and use the dummy object to compute
312 the offset of all tag components located at fixed positions when
313 initializing the Interface_Table object.
314
315 2019-08-13 Justin Squirek <squirek@adacore.com>
316
317 * gnatcmd.adb (GNATCmd): Add constant for new compiler switch
318 --help-ada, and include usage subprogram. Add line to usage help
319 explaining the new flag.
320 (GNATCmd_Usage): Rename from locally declared Usage so as not to
321 confuse with the newly imported version. Add new argument case
322 for --help-ada and add bug report email to implicit display of
323 help without the --help flag so as to unify output between the
324 two cases.
325
326 2019-08-13 Dmitriy Anisimkov <anisimko@adacore.com>
327
328 * libgnat/g-comlin.adb (Getopt): Quote unrecognized switch in
329 Invalid_Switch exception message.
330
331 2019-08-13 Yannick Moy <moy@adacore.com>
332
333 * sem_util.adb (Traverse_More_Func): Take into account
334 Loop_Actions inside N_Iterated_Component_Association nodes.
335 * sinfo.ads: Document correctly Loop_Actions as a field of nodes
336 of kind N_Iterated_Component_Association.
337
338 2019-08-13 Claire Dross <dross@adacore.com>
339
340 * libgnat/a-cfinve.adb, libgnat/a-cofove.adb (Find_Index,
341 Reverse_Find_Index): Use bigger type to avoid range check
342 failure at the last loop iteration.
343
344 2019-08-12 Dmitriy Anisimkov <anisimko@adacore.com>
345
346 * libgnat/g-socket.adb (Is_IPv6_Address): Check that no less
347 then 2 colons in IPv6 numeric address.
348
349 2019-08-12 Dmitriy Anisimkov <anisimko@adacore.com>
350
351 * libgnat/g-comlin.ads, libgnat/g-comlin.adb (Getopt): Add
352 parameter Quiet. Need to do not output error messages to
353 console. Invalid_Switch exception generation surrounded by an
354 error message.
355
356 2019-08-12 Ed Schonberg <schonberg@adacore.com>
357
358 * exp_ch6.adb (Expand_Actuals. Add_Call_By_Copy_Code): Add code
359 to generate proper checks when an actual for an in-out or out
360 parameter has a non-null access type. No constraints are
361 applied to an inbound access parameter, but on exit a not-null
362 check must be performed if the type of the actual requires it.
363
364 2019-08-12 Ed Schonberg <schonberg@adacore.com>
365
366 * sem_util.adb (Is_Expaned_Priority_Attribute): Check whether
367 call comes from a rewritten attribute before comparing name with
368 Get_Ceiling run-time subprogram.
369
370 2019-08-12 Eric Botcazou <ebotcazou@adacore.com>
371
372 * exp_util.ads (Component_May_Be_Bit_Aligned): Small comment
373 tweaks.
374 (Possible_Bit_Aligned_Component): Likewise.
375 (Type_May_Have_Bit_Aligned_Components): Likewise.
376 * exp_util.adb (Component_May_Be_Bit_Aligned): Likewise.
377 (Possible_Bit_Aligned_Component): Likewise.
378 (Type_May_Have_Bit_Aligned_Components): Likewise.
379
380 2019-08-12 Eric Botcazou <ebotcazou@adacore.com>
381
382 * exp_ch4.adb (Expand_N_Op_Eq): Expand the array equality if
383 either operand is a possibly unaligned slice.
384 * exp_ch6.adb (Expand_Simple_Function_Return): Do not generate a
385 copy for a possibly unaligned object if it is represented as a
386 scalar.
387 * exp_util.adb (Is_Possibly_Unaligned_Slice): Do not always
388 return false if the target doesn't have strict alignment.
389
390 2019-08-12 Bob Duff <duff@adacore.com>
391
392 * sem_ch12.adb (Instantiate_Package_Body): Remove suppression of
393 checks in instances of internal units.
394 * sem_ch6.adb (Analyze_Function_Return): Do not generate a
395 constraint check on an extended_return_statement if the subtype
396 of the return object in the statement is identical to the return
397 subtype of the function.
398
399 2019-08-12 Bob Duff <duff@adacore.com>
400
401 * libgnat/a-cbmutr.adb (Is_Reachable): Declare Idx to be of the
402 base subtype. Clearly it makes no sense to loop "while Idx >=
403 0", if Idx is of a nonnegative subtype.
404
405 2019-08-12 Bob Duff <duff@adacore.com>
406
407 * libgnat/a-tifiio.adb (Put_Scaled): Prevent AA from being
408 negative, since Field is range 0 .. something.
409
410 2019-08-12 Bob Duff <duff@adacore.com>
411
412 * doc/gnat_ugn/gnat_utility_programs.rst (gnatmetric, gnatpp,
413 gnatstub): Remove documentation for Ada language version
414 switches, and note that they are no longer needed.
415
416 2019-08-12 Gary Dismukes <dismukes@adacore.com>
417
418 * sem_ch5.adb (Prepare_Param_Spec_Loop): Set the parents of the
419 copied low and high bounds in the case where the loop range is
420 given by a discrete_subtype_indication, to prevent hanging (or
421 Assert_Failure) in Insert_Actions.
422
423 2019-08-12 Ed Schonberg <schonberg@adacore.com>
424
425 * sem_ch6.adb (heck_Untagged_Equality): Verify that user-defined
426 equality has the same profile as the predefined equality before
427 applying legality rule in RM 4.5.2 (9.8).
428
429 2019-08-12 Bob Duff <duff@adacore.com>
430
431 * libgnat/a-except.ads: Update obsolete comment, still making
432 clear that this is a variant. Add explicit default for Id
433 component of Exception_Occurrence, because that value is used.
434 Define Null_Occurrence less redundantly.
435 * libgnat/a-einuoc.adb: Minor simplification of code.
436
437 2019-08-12 Justin Squirek <squirek@adacore.com>
438
439 * libgnat/a-dhfina.adb, libgnat/a-dhfina.ads (Is_Simple_Name,
440 Is_Root_Directory, Is_Parent_Directory,
441 Is_Current_Directory_Name, Is_Relative_Name, Initial_Directory,
442 Relative_Name, Compose): Add implementation and documentation.
443 * libgnat/a-direct.adb (Containing_Directory): Modify routine to
444 use routines from Ada.Directories.Hierarchical_File_Names and
445 remove incorrect special case for parent directories.
446 (Fetch_Next_Entry): Add check for current directory and parent
447 directory and ignore them under certain circumstances.
448 (Simple_Nmae): Add check for null result from
449 Simple_Name_Internal and raise Name_Error.
450 (Simple_Name_Internal): Add explicit check for root directories,
451 sanitize trailing directory separators, and modify behavior so
452 that current and parent directories are considered valid
453 results.
454 * Makefile.rtl: Add entry to GNATRTL_NONTASKING_OBJS.
455
456 2019-08-12 Eric Botcazou <ebotcazou@adacore.com>
457
458 * freeze.adb (Freeze_Entity): Give the same error for an
459 Object_Size clause on a variable-sized type as for a Size
460 clause.
461
462 2019-08-12 Gary Dismukes <dismukes@adacore.com>
463
464 * sem_prag.adb (Analyze_Pragma, Pragma_Suppress_Initialization):
465 For private types, set the Suppress_Initialization flag on the
466 Full_View of the entity rather than the entity's base type.
467
468 2019-08-12 Yannick Moy <moy@adacore.com>
469
470 * aspects.adb, aspects.ads (Aspect_No_Caching): New aspect.
471 * contracts.adb, contracts.ads (Add_Contract_Item): Add handling
472 of No_Caching.
473 (Analyze_Object_Contract): Add handling of No_Caching.
474 * einfo.adb, einfo.ads
475 (Get_Pragma): Add handling of No_Caching.
476 * doc/gnat_rm/implementation_defined_aspects.rst,
477 doc/gnat_rm/implementation_defined_pragmas.rst: Document new
478 aspect/pragma.
479 * gnat_rm.texi: Regenerate.
480 * par-prag.adb (Prag): New pragma Pragma_No_Caching.
481 * sem_ch13.adb (Analyze_Aspect_Specifications,
482 Check_Aspect_At_Freeze_Point): Add handling of No_Caching.
483 * sem_prag.adb (Analyze_Pragma): Deal with pragma No_Caching.
484 * sem_prag.ads (Analyze_External_Property_In_Decl_Part): Now
485 applies to No_Caching.
486 * sem_util.adb, sem_util.ads (Is_Effectively_Volatile): Add
487 handling of No_Caching.
488 (No_Caching_Enabled): New query function.
489 * snames.ads-tmpl: New names for pragma.
490
491 2019-08-12 Yannick Moy <moy@adacore.com>
492
493 * sem_util.adb, sem_util.ads (Traverse_More_Func,
494 Traverse_More_Proc): Add formal parameter for Itypes traversal.
495
496 2019-08-12 Yannick Moy <moy@adacore.com>
497
498 * exp_attr.adb, exp_attr.ads (Expand_Size_Attribute): New
499 procedure to share part of the attribute expansion with
500 GNATprove mode.
501 (Expand_N_Attribute_Reference): Extract part of the
502 Size/Object_Size expansion in the new procedure
503 Expand_Size_Attribute.
504 * exp_spark.adb (Expand_SPARK_N_Attribute_Reference): Expand
505 Size/Object_Size attributes using the new procedure
506 Expand_Size_Attribute.
507
508 2019-08-12 Yannick Moy <moy@adacore.com>
509
510 * exp_spark.adb (Expand_SPARK_N_Attribute_Reference): Only
511 expand Enum_Rep attribute when its parameter is a literal.
512
513 2019-08-12 Justin Squirek <squirek@adacore.com>
514
515 * sem_eval.adb (Check_Non_Static_Context): Add a condition to
516 determine if a range violation constitues a warning or an error.
517 (Out_Of_Range): Add a condition to determine if a range
518 violation constitues a warning or an error.
519
520 2019-08-12 Eric Botcazou <ebotcazou@adacore.com>
521
522 * exp_ch4.adb (Real_Range_Check): Do not rewrite the conversion
523 node but its expression instead, after having fetched its
524 current value. Clear the Do_Range_Check flag on entry. Return
525 early for a rewritten float-to-float conversion. Remove
526 redundant local variable. Suppress all checks when inserting
527 the temporary and do not reanalyze the node.
528
529 2019-08-12 Eric Botcazou <ebotcazou@adacore.com>
530
531 * sprint.ads: Minor comment tweak.
532
533 2019-08-12 Eric Botcazou <ebotcazou@adacore.com>
534
535 * checks.adb (Insert_Valid_Check): Do not retrieve the
536 Do_Range_Check flag from the Original_Node but from the
537 Validated_Object. Remove useless bypass for floating-point
538 types.
539
540 2019-08-12 Yannick Moy <moy@adacore.com>
541
542 * sem_util.adb, sem_util.ads (Traverse_More_Func,
543 Traverse_More_Proc): New traversal subprograms.
544
545 2019-08-12 Jerome Lambourg <lambourg@adacore.com>
546
547 * libgnarl/s-taprop__vxworks.adb (Abort_Handler): Only call
548 s-tpopsp.Self when actually needed.
549
550 2019-08-12 Eric Botcazou <ebotcazou@adacore.com>
551
552 * exp_ch4.adb (Discrete_Range_Check): Return if checks are
553 suppressed.
554
555 2019-08-12 Eric Botcazou <ebotcazou@adacore.com>
556
557 * sem_res.adb: Add with & use clause for Sem_Mech and
558 alphabetize.
559 (Resolve_Actuals): Do not apply a scalar range check for the
560 source of a conversion whose result is passed by reference to a
561 valued procedure.
562
563 2019-08-12 Eric Botcazou <ebotcazou@adacore.com>
564
565 * checks.adb (Insert_Valid_Check): Reset the Do_Range_Check flag
566 on the validated object.
567 * exp_ch6.adb (Add_Call_By_Copy_Code): Reset the Do_Range_Check
568 flag on the actual here, as well as on the Expression if the
569 actual is a N_Type_Conversion node.
570 (Add_Validation_Call_By_Copy_Code): Generate the incoming range
571 check if needed and reset the Do_Range_Check flag on the
572 Expression if the actual is a N_Type_Conversion node.
573 (Expand_Actuals): Do not reset the Do_Range_Check flag here.
574 Generate the incoming range check for In parameters here instead
575 of...
576 (Expand_Call_Helper): ...here. Remove redudant condition.
577 * sem_res.adb (Resolve_Actuals): Use local variable A_Typ and
578 remove obsolete comments.
579 (Resolve_Type_Conversion): Do not force the Do_Range_Check flag
580 on the operand if range checks are suppressed.
581
582 2019-08-12 Eric Botcazou <ebotcazou@adacore.com>
583
584 * checks.adb (Activate_Range_Check): Remove redundant argument.
585 (Generate_Range_Check): Likewise.
586 (Apply_Float_Conversion_Check): Reset the Do_Range_Check flag on
587 entry and remove redundant condition.
588
589 2019-08-02 Alexandre Oliva <oliva@adacore.com>
590
591 * libgnat/a-exexpr.adb (Begin_Handler_v1, End_Handler_v1): New.
592 (Claimed_Cleanup): New.
593 (Begin_Handler, End_Handler): Document.
594 * gcc-interface/trans.c (gigi): Switch to exception handler
595 ABI #1.
596 (Exception_Handler_to_gnu_gcc): Save the original cleanup
597 returned by begin handler, pass it to end handler, and use
598 EH_ELSE_EXPR to pass a propagating exception to end handler.
599 (gnat_to_gnu): Leave the exception pointer alone for reraise.
600 (add_cleanup): Handle EH_ELSE_EXPR, require it by itself.
601
602 2019-07-23 Ed Schonberg <schonberg@adacore.com>
603
604 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations,
605 Freeze_Entity_Checks): Include Aspect_CPU with other aspects
606 whose expresssion may depend on a discriminant, and thus require
607 that components of the type be made visible.
608
609 2019-07-23 Eric Botcazou <ebotcazou@adacore.com>
610
611 * checks.adb (Convert_And_Check_Range): Add Suppress parameter
612 and pass it in the call to Insert_Actions. Rename local
613 variable.
614 (Generate_Range_Check): Minor comment fixes. Pass Range_Check
615 in the first call to Convert_And_Check_Range and All_Checks in
616 the second call.
617 * exp_ch4.adb (Expand_N_Type_Conversion): Reset the
618 Do_Overflow_Check flag in the float-to-float case too if there
619 is also a range check.
620
621 2019-07-23 Eric Botcazou <ebotcazou@adacore.com>
622
623 * checks.adb (Activate_Overflow_Check): Remove redundant
624 argument.
625 * exp_ch4.adb (Discrete_Range_Check): Reset the overflow flag.
626 (Expand_N_Type_Conversion): Do not reset it here.
627
628 2019-07-23 Eric Botcazou <ebotcazou@adacore.com>
629
630 * repinfo.adb (List_Component_Layout): Pass Decimal to UI_Write.
631 (Write_Val): Likewise.
632
633 2019-07-23 Ed Schonberg <schonberg@adacore.com>
634
635 * aspects.ads: New table Operational_Aspect, used to distinguish
636 between aspects that are view-specific, such as those related to
637 iterators, and representation aspects that apply to all views of
638 a type.
639 * aspects.adb (Find_Aspect): If the aspect being sought is
640 operational, do not ecamine the full view of a private type to
641 retrieve it.
642 * sem_ch5.adb (Analyze_Iterator_Specification): Improve error
643 message when the intended domain of iteration does not implement
644 the required iterator aspects.
645
646 2019-07-23 Yannick Moy <moy@adacore.com>
647
648 * sem_spark.ads (Is_Local_Context): New function.
649 * sem_spark.adb (Check_Declaration): Issue errors on violations
650 of SPARK RM 3.10(4)
651 (Process_Path): Do not issue error on borrow/observe during
652 elaboration, as these are caught by the new rule.
653
654 2019-07-23 Yannick Moy <moy@adacore.com>
655
656 * exp_ch7.adb (Create_Finalizer): Force finalizer not to be
657 Ghost enabled.
658 * exp_dbug.adb (Get_External_Name): Explain special case of
659 Ghost finalizer.
660
661 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
662
663 * repinfo.adb (List_Entities): Also list compiled-generated
664 types present as Etype of objects.
665
666 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
667
668 * sinfo.ads: Update the documentation about the
669 Do_Division_Check, Do_Overflow_Check and Do_Range_Check flags.
670
671 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
672
673 * exp_ch4.adb (Expand_N_Type_Conversion): Beef up comment.
674 (Fixup_Universal_Fixed_Operation): Set the base type instead of
675 the type of the enclosing type conversion on the operation.
676
677 2019-07-22 Ed Schonberg <schonberg@adacore.com>
678
679 * exp_ch4.adb (Expand_N_In): Do not suggest the use of attribute
680 'Valid as a replacement for a range check on a discrete type
681 when the bounds of the range are given by type conversions,
682 because in such a case there are distinct types involved and the
683 subbested attribute replacement would be misplaced.
684
685 2019-07-22 Yannick Moy <moy@adacore.com>
686
687 * sem_spark.adb (Get_Root_Object, Is_Path_Expression,
688 Is_Subpath_Expression): Add parameter Is_Traversal to adapt
689 these functions to the case of paths returned from a traversal
690 function.
691 (Read_Indexes): Handle the case of an if-expression or
692 case-expression.
693 (Check_Statement): Check Emit_Messages only when issuing an
694 error message. This is important as Emit_Messages may store the
695 information that an error was detected.
696
697 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
698
699 * checks.adb (Apply_Type_Conversion_Checks): Do not set
700 Do_Range_Check flag on conversions from fixed-point types
701 either.
702 * exp_attr.adb: Add use and with clause for Expander.
703 (Expand_N_Attribute_Reference) <Fixed_Value, Integer_Value>: Set
704 the Conversion_OK flag and do not generate overflow/range checks
705 manually.
706 * exp_ch4.adb (Expand_N_Qualified_Expression): Remove
707 superfluous clearing of Do_Range_Check flag.
708 (Discrete_Range_Check): New procedure to generate a range check
709 for discrete types.
710 (Real_Range_Check): Remove redundant local variable and adjust.
711 Remove useless shortcut. Clear Do_Range_Check flag on all
712 paths.
713 (Expand_N_Type_Conversion): Remove redundant test on
714 Conversion_OK. Call Discrete_Range_Check to generate range
715 checks on discrete types. Remove obsolete code for
716 float-to-integer conversions. Add code to generate range checks
717 for conversions involving fixed-point types.
718
719 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
720
721 * sprint.ads: Fix pasto in comment.
722
723 2019-07-22 Javier Miranda <miranda@adacore.com>
724
725 * sem_res.adb (Resolve_Actuals): Replace code that displaces the
726 pointer to an allocated object to reference its secondary
727 dispatch table by a type conversion (which takes care of
728 handling all cases).
729
730 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
731
732 * sprint.adb (Sprint_Node_Actual)
733 <N_Decimal_Fixed_Point_Definition>: Swap a couple of spaces.
734 (Write_Itype): Minor consistency fixes throughout. Add support
735 for printing ordinary and decimal fixed-point types and
736 subtypes.
737
738 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
739
740 * exp_attr.adb (Expand_Loop_Entry_Attribute): Beef up comment.
741
742 2019-07-22 Ed Schonberg <schonberg@adacore.com>
743
744 * libgnat/s-valboo.ads, libgnat/s-valcha.ads,
745 libgnat/s-valdec.ads, libgnat/s-valenu.ads,
746 libgnat/s-valint.ads, libgnat/s-vallld.ads,
747 libgnat/s-vallli.ads, libgnat/s-valllu.ads,
748 libgnat/s-valrea.ads, libgnat/s-valuns.ads,
749 libgnat/s-valwch.ads: Change categorization of packages that
750 implement attribute 'Value from Pure to Preelaborate, to prevent
751 undesirable optimizations when the evaluation of the attribute
752 raises Constraint_Error, but subsequent use of the result of
753 this evsaluation is removed by a subsequent optimization.
754
755 2019-07-22 Ed Schonberg <schonberg@adacore.com>
756
757 * sem_warn.adb (Check_References): Do not emit s warning on a
758 referenced entity with no explicit assignment if the type of the
759 entity has Preelaborable_Initialixation, such as
760 Exception_Occurrence.
761
762 2019-07-22 Javier Miranda <miranda@adacore.com>
763
764 * exp_ch4.adb (Size_In_Storage_Elements): Improve the expansion
765 to handle array indexes that are modular type.
766 (Expand_N_Allocator): For 32-bit targets improve the generation
767 of the runtime check associated with large arrays supporting
768 arrays initialized with a qualified expression.
769 * libgnat/s-imenne.adb (Image_Enumeration_8,
770 Image_Enumeration_16, Image_Enumeration_32): Define the index of
771 Index_Table with range Natural'First .. Names'Length since in
772 the worst case all the literals of the enumeration type would be
773 single letter literals and the Table built by the frontend would
774 have as many components as the length of the names string. As a
775 result of this enhancement, the internal tables declared using
776 Index_Table have a length closer to the real needs, thus
777 avoiding the declaration of large arrays on 32-bit CCG targets.
778
779 2019-07-22 Yannick Moy <moy@adacore.com>
780
781 * sem_ch3.adb (Constrain_Access): Issue a message about ignored
782 constraint.
783
784 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
785
786 * sem_ch8.adb (End_Use_Type): Reset the In_Use flag on the
787 class-wide type if the type is tagged.
788 (Use_One_Type): Add commentary on the handling of the class-wide
789 type.
790
791 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
792
793 * einfo.ads (Is_For_Access_Subtype): Delete.
794 (Set_Is_For_Access_Subtype): Likewise.
795 * einfo.adb (Is_For_Access_Subtype): Likewise.
796 (Set_Is_For_Access_Subtype): Likewise.
797 (Write_Entity_Flags): Do not write Is_For_Access_Subtype.
798 * exp_ch4.adb (Expand_N_Selected_Component): Do not deal with
799 it.
800 * exp_spark.adb (Expand_SPARK_N_Selected_Component): Likewise.
801 * sem_ch4.adb (Analyze_Explicit_Dereference): Likewise.
802 * sem_ch3.adb (Build_Discriminated_Subtype): Do not build a
803 special private subtype for access-to-record subtypes.
804
805 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
806
807 * sem_ch3.adb (Complete_Private_Subtype): Rework the setting of
808 the Etype of the full view for full base types that cannot
809 contain any discriminant. Remove code and comment about it in
810 the main path.
811
812 2019-07-22 Ed Schonberg <schonberg@adacore.com>
813
814 * sem_ch3.adb (Convert_Bound): Subsidiary of
815 Floating_Point_Type_Declaration, to handle properly range
816 specifications with bounds that may include static constants of
817 a given type rather than real literals.
818
819 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
820
821 * sem_aggr.adb (Rewrite_Bound): Be prepared for discriminals
822 too.
823 (Rewrite_Range;): Minor tweak.
824 (Resolve_Record_Aggregate): For a component with default
825 initialization whose expression is an array aggregate, also
826 rewrite the bounds of the component associations, if any.
827
828 2019-07-22 Gary Dismukes <dismukes@adacore.com>
829
830 * exp_ch5.adb (Expand_N_Case_Statement): In the case where a
831 case statement is rewritten as an equivalent if statement,
832 inherit the From_Condition_Expression flag from the case
833 statement.
834
835 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
836
837 * sem_ch8.adb (Check_Constrained_Object): Further extend the
838 special optimization to all limited types.
839
840 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
841
842 * exp_attr.adb (Expand_N_Attribute_Reference)
843 <Attribute_Enum_Val>: Set No_Truncation on the
844 N_Unchecked_Type_Conversion built around the argument passed to
845 the attribute.
846
847 2019-07-22 Nicolas Roche <roche@adacore.com>
848
849 * libgnat/s-valrea.adb (Scan_Real): Ignore non significative
850 digits to avoid converging to infinity in some cases.
851
852 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
853
854 * libgnat/g-encstr.adb (Encode_Wide_String): Fix oversight.
855 (Encode_Wide_Wide_String): Likewise.
856
857 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
858
859 * sem_warn.adb (Find_Var): Bail out for a function call with an
860 Out or In/Out parameter.
861
862 2019-07-22 Nicolas Roche <roche@adacore.com>
863
864 * terminals.c (__gnat_tty_waitpid): Support both blocking and
865 not blocking mode.
866 * libgnat/g-exptty.ads (Is_Process_Running): New function.
867 * libgnat/g-exptty.adb (Close): Don't try to interrupt/terminate
868 a process if it is already dead.
869
870 2019-07-22 Ed Schonberg <schonberg@adacore.com>
871
872 * freeze.adb (Freeze_Fixed_Point_Type): When freezing a
873 fixed-point subtype, check whether the parent type declarastion
874 includes an aspect specification for the 'Small type attribute,
875 and inherit the specified value.
876
877 2019-07-22 Javier Miranda <miranda@adacore.com>
878
879 * freeze.adb (Freeze_Subprogram): Check that C++ constructors
880 must have external or link name.
881
882 2019-07-22 Ed Schonberg <schonberg@adacore.com>
883
884 * sem_res.adb (Resolve_Selected_Component): If the prefix has a
885 deferred reference, generate the correct reference now, to
886 indicate that the previous assignment is used. This prevents
887 spurious warnings on useless assignments when compiling with all
888 warnings enabled. when there is a subsequent call in the same
889 stqtement list, in which the prefix of the selected component is
890 the actual for an out parameter.
891
892 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
893
894 * exp_attr.adb (Expand_Loop_Entry_Attribute): Copy the condition
895 of a while loop instead of simply relocating it.
896
897 2019-07-18 Arnaud Charlet <charlet@adacore.com>
898
899 * Makefile.rtl, expect.c, env.c, aux-io.c, mkdir.c, initialize.c,
900 cstreams.c, raise.c, tracebak.c, adadecode.c, init.c, raise-gcc.c,
901 argv.c, adaint.c, adaint.h, ctrl_c.c, sysdep.c, rtinit.c, cio.c,
902 seh_init.c, exit.c, targext.c: Introduce a "STANDALONE" mode where C
903 runtime files do not have any dependency on GCC include files.
904 Remove unnecessary includes.
905 Remove remaining references to VMS in runtime C file.
906 * runtime.h: new File.
907
908 2019-07-13 Andreas Schwab <schwab@linux-m68k.org>
909
910 * Makefile.rtl: Use g-sercom__linux.adb for all linuxes.
911
912 2019-07-11 Piotr Trojanek <trojanek@adacore.com>
913
914 * lib-writ.adb (Ensure_System_Dependency,
915 Up_To_Date_ALI_File_Exists, Write_ALI): Replace low-level access
916 to table with a high-level query.
917
918 2019-07-11 Piotr Trojanek <trojanek@adacore.com>
919
920 * checks.adb: Fix typo in comment.
921 * sem.adb (Semantics): Avoid repeated calls to
922 In_Extended_Main_Source_Unit by reusing an already-cached
923 result.
924 * sem_util.adb (First_Global): Fix style.
925
926 2019-07-11 Yannick Moy <moy@adacore.com>
927
928 * sem_res.adb (Resolve_Call): Do not perform dimensionality
929 checking on inlined bodies.
930
931 2019-07-11 Yannick Moy <moy@adacore.com>
932
933 * debug.adb: Flip meaning of debug switch -gnatdF.
934
935 2019-07-11 Yannick Moy <moy@adacore.com>
936
937 * sem_eval.adb (Is_Same_Value): Add special case for rewritten
938 Loop_Entry attribute.
939
940 2019-07-11 Claire Dross <dross@adacore.com>
941
942 * gnat1drv.adb: SPARK checking rules for pointer aliasing are
943 moved to GNATprove backend.
944 * sem_spark.ads, sem_spark.adb (Sem_SPARK): Is now a generic
945 unit. Takes as parameters:
946 - Retysp which is used to query the most underlying type
947 visible in SPARK. We do not introduce aliasing checks for
948 types which are not visibly deep.
949 - Component_Is_Visible_In_SPARK is used to avoid doing pointer
950 aliasing checks on components which are not visible in SPARK.
951 - Emit_Messages returns True in the second phase of SPARK
952 analysis. Error messages for failed aliasing checks are only
953 output in this case.
954 Additionally, errors on constructs not supported in SPARK are
955 removed as duplicates of marking errors. Components are stored
956 in the permission map using their original component to avoid
957 inconsistencies between components of different views of the
958 same type.
959 (Check_Expression): Handle delta constraints.
960 (Is_Deep): Exported so that we can check for SPARK restrictions
961 on deep types inside SPARK semantic checkings.
962 (Is_Traversal_Function): Exported so that we can check for SPARK
963 restrictions on traversal functions inside SPARK semantic
964 checkings.
965 (Check_Call_Statement, Read_Indexes): Check wether we are
966 dealing with a subprogram pointer type before querying called
967 entity.
968 (Is_Subpath_Expression): Image attribute can appear inside a
969 path.
970 (Check_Loop_Statement): Correct order of statements in the loop.
971 (Check_Node): Ignore raise nodes.
972 (Check_Statement): Use Last_Non_Pragma to get the object
973 declaration in an extended return statement.
974
975 2019-07-11 Patrick Bernardi <bernardi@adacore.com>
976
977 * bindgen.adb (Gen_Main): Do not generate a reference to
978 Ada_Main_Program_Name when the Minimal_Binder flag is set.
979 (Gen_Output_File_Ada): Do not output GNAT_Version and
980 Ada_Main_Program_Name info if Minimal_Binder flag is set.
981 * bindusg.adb: Add documentation for new -minimal switch.
982 * gnatbind.adb (Scan_Bind_Arg): Scan -minimal switch.
983 * opt.ads: Add new global flag Minimal_Binder to indicate if the
984 binder should not produce global variables.
985 * doc/gnat_ugn/building_executable_programs_with_gnat.rst:
986 Update documentation with new binder -minimal switch.
987 * gnat_ugn.texi: Regenerate.
988
989 2019-07-11 Eric Botcazou <ebotcazou@adacore.com>
990
991 * Makefile.rtl: Add warning note about compilation flags and
992 capitalize.
993
994 2019-07-11 Ed Schonberg <schonberg@adacore.com>
995
996 * exp_ch9.adb (Expand_N_Protected_Type_Declaaration): New
997 subsidiary routine Replace_Access_Definition, to handle properly
998 a protected type PT one of whose private components is of type
999 access PT.
1000
1001 2019-07-11 Dmitriy Anisimkov <anisimko@adacore.com>
1002
1003 * libgnat/g-socket.ads (Level_Type): Add enumerators for
1004 IP_Protocol_For_ICMP, IP_Protocol_For_IGMP,
1005 IP_Protocol_For_RAW_Level.
1006 * libgnat/g-socket.adb (Levels): Handle them.
1007 * s-oscons-tmplt.c: Import socket protocols defined in
1008 netinet/in.h.
1009
1010 2019-07-11 Claire Dross <dross@adacore.com>
1011
1012 * libgnat/a-cfhama.adb, libgnat/a-cfhase.adb (Free): Do not
1013 reset the Has_Element flag if no element is freed.
1014
1015 2019-07-11 Arnaud Charlet <charlet@adacore.com>
1016
1017 * errno.c: Remove obsolete support for MaRTE OS.
1018
1019 2019-07-11 Ed Schonberg <schonberg@adacore.com>
1020
1021 * exp_ch4.adb (Expand_N_Type_Conversion): If a predicate check
1022 is generated, analyze it with range check suppressed, because
1023 that check has been previously applied.
1024 * exp_ch5.adb (Expand_N_Assignment_Statement): If the RHS is a
1025 type conversion to the type of the LHS, do not apply a predicate
1026 check to the RHS because it will have been generated already
1027 during its expansion.
1028 * exp_ch6.adb (Can_Fold_Predicate_Call): Extend processing to
1029 handle a predicate check on a constant entity whose value is
1030 static.
1031
1032 2019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
1033
1034 * bindo.adb: Remove the documentation of switch -d_N because it
1035 is no longer in use.
1036 * bindo-graphs.ads, bindo-graphs.adb (Is_Spec_Before_Body_Edge):
1037 New routine.
1038 * bindo-writers.adb (Write_Dependency_Edge): Add the missing
1039 case of a spec-before-body edge.
1040
1041 2019-07-11 Dmitriy Anisimkov <anisimko@adacore.com>
1042
1043 * libgnat/g-socket.ads (Mode_Type): Add a Socket_Raw enumerator.
1044 * libgnat/g-socket.adb (Modes): Handle Socket_Raw.
1045
1046 2019-07-11 Justin Squirek <squirek@adacore.com>
1047
1048 * exp_ch9.adb (Build_Private_Protected_Declaration): Add
1049 exception for the moving of pragmas to internally generated
1050 specs for pragma Unreferenced.
1051
1052 2019-07-11 Bob Duff <duff@adacore.com>
1053
1054 * doc/gnat_ugn/gnat_utility_programs.rst: Fix inconsistent
1055 documentation for gnatmetric.
1056 * gnat_ugn.texi: Regenerate.
1057
1058 2019-07-11 Bob Duff <duff@adacore.com>
1059
1060 * doc/gnat_ugn/gnat_utility_programs.rst: Document gnatpp's
1061 --spaces-only switch.
1062
1063 2019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
1064
1065 * sem_util.adb (Null_Status): Assume that an erroneous construct
1066 has an undefined null status.
1067
1068 2019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
1069
1070 * checks.adb, exp_ch6.adb, gnat1drv.adb, sem_aux.adb,
1071 sem_ch2.adb, sem_ch8.adb, sem_res.adb: Minor reformatting.
1072
1073 2019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
1074
1075 * sem_ch8.adb (Analyze_Object_Renaming): Obtain the object being
1076 renamed using routine Get_Object_Name which takes care of
1077 various name forms.
1078 (Get_Object_Name): New routine.
1079
1080 2019-07-11 Ed Schonberg <schonberg@adacore.com>
1081
1082 * exp_ch6.adb (Can_Fold_Predicate_Call): New function,
1083 subsidiary of Expand_Call_Helper, to compute statically a
1084 predicate check when the argument is a static integer.
1085
1086 2019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
1087
1088 * sem_res.adb (Resolve_Op_Not): Do not rewrite an equality
1089 operator into a function call when the operator is intrinsic.
1090
1091 2019-07-11 Thomas Quinot <quinot@adacore.com>
1092
1093 * sem_prag.adb (Analyze_Pragma, case pragma Check): Do not call
1094 Set_SCO_Pragma_Enabled for the dynamic predicate case.
1095
1096 2019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
1097
1098 * exp_util.ads, exp_util.adb (Needs_Finalization): Move to
1099 Sem_Util.
1100 * sem_ch9.adb (Analyze_Protected_Definition): Code cleanup. Mark
1101 the protected type as having controlled components when it
1102 contains at least one such component.
1103 * sem_util.ads, sem_util.adb (Needs_Finalization): New
1104 function.
1105
1106 2019-07-11 Eric Botcazou <ebotcazou@adacore.com>
1107
1108 * alloc.ads (Rep_JSON_Table_Initial): New constant.
1109 (Rep_JSON_Table_Increment): Likewise.
1110 * debug.adb: Document -gnatd_j switch.
1111 * gcc-interface/Make-lang.in (GNAT_ADA_OBJS): Add
1112 repinfo-input.o.
1113 * gnat1drv.adb: Add with clause for Repinfo.Input.
1114 Add with and use clauses for Sinput.
1115 (Read_JSON_Files_For_Repinfo): New procedure.
1116 (Gnat1drv1): Deal with -gnatd_j switch.
1117 * repinfo-input.ad[sb]: New unit.
1118 * snames.ads-tmpl (Name_Discriminant): New constant.
1119 (Name_Operands): Likewise.
1120
1121 2019-07-11 Justin Squirek <squirek@adacore.com>
1122
1123 * checks.adb (Apply_Accessibility_Check): Add check for constant
1124 folded conditions on accessibility checks.
1125
1126 2019-07-11 Arnaud Charlet <charlet@adacore.com>
1127
1128 * libgnarl/g-thread.ads, libgnarl/g-thread.adb (Get_Thread):
1129 Update comments. Add new version taking a Task_Id.
1130
1131 2019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
1132
1133 * bindo.adb: Update the section of switches and debugging
1134 elaboration issues.
1135 * bindo.ads: Add type Elaboration_Phase.
1136 * bindo-augmentors.adb: Add use clause for
1137 Bindo.Writers.Phase_Writers.
1138 (Augment_Library_Graph): Signal the start and end of the
1139 aubmentation phase.
1140 * bindo-builders.adb: Add with and use clause for Bindo.Writers.
1141 Add use clause for Bindo.Writers.Phase_Writers.
1142 (Build_Invocation_Graph): Signal the start and end of the
1143 invocation graph construction phase.
1144 (Build_Library_Graph): Signal the start and end of the library
1145 graph construction phase.
1146 * bindo-diagnostics.adb: Add use clause for
1147 Bindo.Writers.Phase_Writers.
1148 (Diagnose_Cycle): Signal the start and end of the cycle
1149 diagnostic phase.
1150 * bindo-elaborators.adb: Add use clause for
1151 Bindo.Writers.Phase_Writers.
1152 (Elaborate_Units): Signal the start and end of the unit
1153 elaboration phase.
1154 * bindo-graphs.adb: Add use clause for
1155 Bindo.Writers.Phase_Writers.
1156 (Find_Components): Signal the start and end of the component
1157 discovery phase.
1158 (Find_Cycles): Signal the start and end of the cycle discovery
1159 phase.
1160 * bindo-units.adb: Add with and use clause for Bindo.Writers.
1161 Add use clause for Bindo.Writers.Phase_Writers.
1162 (Collect_Elaborable_Units): Signal the start and end of the unit
1163 collection phase.
1164 * bindo-validators.adb: Add with and use clause for
1165 Bindo.Writers. Add use clause for Bindo.Writers.Phase_Writers.
1166 (Validate_Cycles, Validate_Elaboration_Order,
1167 Validate_Invocation_Graph, Validate_Library_Graph): Signal the
1168 start and end of the libray graph validation phase.
1169 * bindo-writers.ads, bindo-writers.adb: Add new nested package
1170 Phase_Writers.
1171 * debug.adb: Update the documentation of switch d_S.
1172
1173 2019-07-11 Yannick Moy <moy@adacore.com>
1174
1175 * sem_res.adb (Check_Argument_Order): Special case calls to
1176 operators.
1177
1178 2019-07-10 Dmitriy Anisimkov <anisimko@adacore.com>
1179
1180 * libgnat/s-ststop.adb: Remove System.Strings.Stream_Ops
1181 dependence on System.Streams.Stream_IO.
1182
1183 2019-07-10 Ed Schonberg <schonberg@adacore.com>
1184
1185 * sem_ch2.adb (Analyze_Integer_Literal): Preserve the type of
1186 the literal if prior analysis determined that its type is a
1187 modular integer type.
1188
1189 2019-07-10 Doug Rupp <rupp@adacore.com>
1190
1191 * init.c: Do not attempt to re-arm guard page on x86_64-vx7(r2).
1192
1193 2019-07-10 Ed Schonberg <schonberg@adacore.com>
1194
1195 * sem_ch8.adb (Check_Constrained_Object): A record that is
1196 limited because of the presence of a limited component is
1197 constrained, and no subtype indiciation needs to be created for
1198 it, just as is the case for declared limited records.
1199
1200 2019-07-10 Yannick Moy <moy@adacore.com>
1201
1202 * sem_aux.adb, sem_aux.ads (Is_Protected_Operation): New
1203 function to determine if a subprogram is protected.
1204 * sem_spark.adb (Setup_Protected_Components): New procedure to
1205 add protected components to the environment.
1206 (Check_Callable_Body): Call the new Setup_Protected_Components.
1207 (Check_Package_Spec): Merge local environment with enclosing one
1208 when done.
1209
1210 2019-07-10 Claire Dross <dross@adacore.com>
1211
1212 * sem_spark.adb (Check_Expression): Allow digits constraints as
1213 input.
1214 (Illegal_Global_Usage): Pass in the entity.
1215 (Is_Subpath_Expression): New function to allow different nodes
1216 as inner parts of a path expression.
1217 (Read_Indexes): Allow concatenation and aggregates with box
1218 expressions. Allow attributes Update and Loop_Entry.
1219 (Check_Expression): Allow richer membership test.
1220 (Check_Node): Ignore bodies of generics.
1221 (Get_Root_Object): Allow concatenation and attributes.
1222
1223 2019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
1224
1225 * sem_ch6.adb (Check_Discriminant_Conformance): Use Find_Type to
1226 discover the type of a full view discriminant.
1227
1228 2019-07-10 Arnaud Charlet <charlet@adacore.com>
1229
1230 * doc/gnat_ugn/gnat_and_program_execution.rst: Improve gnatmem's
1231 doc for the depth switch.
1232
1233 2019-07-10 Bob Duff <duff@adacore.com>
1234
1235 * doc/gnat_ugn/gnat_utility_programs.rst: Document gnatpp's
1236 --source-line-breaks switch.
1237
1238 2019-07-10 Justin Squirek <squirek@adacore.com>
1239
1240 * doc/gnat_rm/implementation_defined_attributes.rst: Add mention
1241 of 'Image attribute with 'Img's entry to mention additional
1242 added 2012 usage of Obj'Image.
1243 * doc/gnat_rm/implementation_defined_pragmas.rst: Correct
1244 mispelling of Async_Writers.
1245 * gnat_rm.texi: Regenerate.
1246 * sem_prag.adb (Analyze_Pragma): Correct mispelling of
1247 Async_Writers.
1248 * sem_util.adb (State_Has_Enabled_Property): Correct mispelling
1249 of Async_Writers.
1250
1251 2019-07-10 Simon Buist <buist@adacore.com>
1252
1253 * sem_util.ads (Child_Prefix): New constant.
1254 * sem_util.adb (Unique_Name): Add a special prefix to child
1255 units that have a nested subprogram or package.
1256
1257 2019-07-10 Arnaud Charlet <charlet@adacore.com>
1258
1259 * sfn_scan.adb (Scan_SFN_Pragmas): Add pragma Assert.
1260
1261 2019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
1262
1263 * sem_ch3.adb (Check_Nonoverridable_Aspects): Correct the
1264 spelling in certain error messages.
1265 (Check_Pragma_Implemented): Correct the spelling in certain
1266 error messages.
1267
1268 2019-07-10 Eric Botcazou <ebotcazou@adacore.com>
1269
1270 * Makefile.rtl (GNATRTL_NONTASKING_OBJS): Add g-brapre.
1271 * libgnat/g-brapre.ads: New package specification.
1272 * doc/gnat_rm/the_gnat_library.rst: Document it.
1273 * gnat_rm.texi: Regenerate.
1274
1275 2019-07-10 Yannick Moy <moy@adacore.com>
1276
1277 * osint-c.adb (Set_File_Name): Always add extension for multiple
1278 units per file mode.
1279
1280 2019-07-10 Corentin Gay <gay@adacore.com>
1281
1282 * sysdep.c: Put include directive for 'vxWorks.h' before any
1283 other VxWorks headers.
1284
1285 2019-07-10 Eric Botcazou <ebotcazou@adacore.com>
1286
1287 * doc/gnat_rm/implementation_defined_attributes.rst
1288 (Scalar_Storage_Order): Minor tweaks. Add note about debuggers.
1289 * gnat_rm.texi: Regenerate.
1290
1291 2019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
1292
1293 * exp_ch4.adb (Expand_N_Case_Expression): Mark the generated
1294 assignments to the temporary result as being OK because the
1295 expansion of case expressions is correct by construction.
1296 (Is_Copy_Type): Update the predicate to match the comment
1297 within.
1298
1299 2019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
1300
1301 * bindo-graphs.adb, bindo.adb, debug.adb, exp_ch6.adb,
1302 sem_ch10.adb, sem_ch13.adb, sem_ch3.adb, sem_ch4.adb,
1303 sem_ch6.adb, sem_ch7.adb, sem_res.adb, sem_spark.adb,
1304 sem_util.adb, warnsw.ads: Minor reformatting.
1305
1306 2019-07-10 Joffrey Huguet <huguet@adacore.com>
1307
1308 * libgnat/a-strbou.ads, libgnat/a-strfix.ads,
1309 libgnat/a-strunb.ads, libgnat/a-strunb__shared.ads: Add global
1310 contracts, contract cases, preconditions and postconditions to
1311 procedures and functions.
1312
1313 2019-07-10 Doug Rupp <rupp@adacore.com>
1314
1315 * sysdep.c (__gnat_is_file_not_found_error): Reformulate to also
1316 work for vxworks7r2 SR0610.
1317
1318 2019-07-10 Doug Rupp <rupp@adacore.com>
1319
1320 * env.c (__gnat_environ): Reformulate to also work for
1321 vxworks7r2 SR0610.
1322
1323 2019-07-10 Patrick Bernardi <bernardi@adacore.com>
1324
1325 * Makefile.rtl: Handle vxworks7r2 ppc target
1326
1327 2019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
1328
1329 * bindo.adb: Update the section on switches.
1330 * bindo-graphs.adb
1331 (Add_Cycle, Add_Vertex_And_Complement): Remove.
1332 (Create): The graph no longer needs a set of recorded cycles
1333 because the cycles are not rediscovered in permuted forms.
1334 (Cycle_End_Vertices): New routine.
1335 (Destroy): The graph no longer needs a set of recorded cycles
1336 because the cycles are not rediscovered in permuted forms.
1337 (Destroy_Library_Graph_Vertex): Move to the library level.
1338 (Find_All_Cycles_Through_Vertex, Find_All_Cycles_With_Edge):
1339 Remove.
1340 (Find_Cycles_From_Successor, Find_Cycles_From_Vertex,
1341 Find_Cycles_In_Component, Has_Elaborate_All_Edge): New routines.
1342 (Insert_And_Sort): Remove.
1343 (Is_Elaborate_Body_Edge): Use predicate
1344 Is_Vertex_With_Elaborate_Body.
1345 (Is_Recorded_Cycle): Remove.
1346 (Is_Vertex_With_Elaborate_Body): New routine.
1347 (Normalize_And_Add_Cycle): Remove.
1348 (Precedence): Rename to xxx_Precedence, where xxx relates to the
1349 input. These versions better reflect the desired input
1350 precedence.
1351 (Record_Cycle): New routine.
1352 (Remove_Vertex_And_Complement, Set_Is_Recorded_Cycle): Remove.
1353 (Trace_xxx): Update all versions to use debug switch -d_t.
1354 (Trace_Component): New routine.
1355 (Trace_Eol): Removed.
1356 (Trace_Vertex): Do not output the component as this information
1357 is already available when the component is traced.
1358 (Unvisit, Visit): New routine.
1359 * bindo-graphs.ads: Add new instance LGV_Lists. Remove instance
1360 RC_Sets. Update the structure of type Library_Graph_Attributes
1361 to remove the set of recorded cycles.
1362 (Destroy_Library_Graph_Vertex): Move to the library level.
1363 * bindo-writers.adb (Write_Component_Vertices): Output
1364 information about the number of vertices.
1365 * debug.adb: Document the use of binder switch -d_t. Update the
1366 use of binder switch -d_T.
1367
1368 2019-07-10 Yannick Moy <moy@adacore.com>
1369
1370 * sem_spark.adb (Get_Root_Object): Replace precondition by error
1371 message.
1372 (Read_Indexes): Replace precondition by error message.
1373 (Check_Callable_Body): Check only traversal function returns an
1374 anonymous access type.
1375 (Check_Expression): Issue error on unexpected expression as
1376 path.
1377 * sem_util.adb (First_Global): Fix access to global on
1378 entry/task.
1379
1380 2019-07-10 Javier Miranda <miranda@adacore.com>
1381
1382 * exp_ch6.adb (Is_Class_Wide_Interface_Type): New subprogram.
1383 (Expand_Call_Helper): Handle non-limited views when we check if
1384 any formal is a class-wide interface type.
1385 * exp_disp.adb (Expand_Interface_Actuals): Handle non-limited
1386 views when we look for interface type formals to force "this"
1387 displacement.
1388
1389 2019-07-10 Ed Schonberg <schonberg@adacore.com>
1390
1391 * sem_res.adb (Resolve_Equality_Op): Do not replace the resolved
1392 operator by its alias if expander is not active, because the
1393 operand type may not be frozen yet and its inherited operations
1394 have not yet been created.
1395
1396 2019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
1397
1398 * bindo-elaborators.adb (Elaborate_Units): Set attribute
1399 Elab_Position of all elaborated units.
1400 (Set_Unit_Elaboration_Positions): New routine.
1401
1402 2019-07-10 Gary Dismukes <dismukes@adacore.com>
1403
1404 * exp_util.adb: Reformatting and a typo fix.
1405
1406 2019-07-10 Yannick Moy <moy@adacore.com>
1407
1408 * exp_util.adb (Remove_Side_Effects): Prefer renamings for
1409 objects of possible owning type in GNATprove mode.
1410
1411 2019-07-09 Ed Schonberg <schonberg@adacore.com>
1412
1413 * sem_ch3.adb (Analyze_Object_Declaration): If the object type
1414 is a composite type that has a dynamic predicate and, the
1415 expression in the declaration is an aggregate, the generated
1416 predicate check must appear after the expanded code for the
1417 aggregate, which will appear after the rewritten object
1418 declarastion.
1419
1420 2019-07-09 Justin Squirek <squirek@adacore.com>
1421
1422 * sem_eval.adb (Expr_Value_E): Add conditional to correctly
1423 handle constant enumerated character types.
1424
1425 2019-07-09 Eric Botcazou <ebotcazou@adacore.com>
1426
1427 * libgnarl/s-osinte__mingw.ads (CRITICAL_SECTION): Use proper
1428 type for SpinCount component.
1429
1430 2019-07-09 Justin Squirek <squirek@adacore.com>
1431
1432 * exp_ch4.adb (Expand_N_Allocator): Add conditional to detect
1433 the presence of anoymous access type allocators and issue a
1434 warning if the appropriate warning flag is enabled.
1435 * warnsw.ads: Add new warning flag for anonymous allocators
1436 * warnsw.adb (All_Warnings, Restore_Warnings, Save_Warnings,
1437 Set_Underscore_Warning_Switch): Register new flags.
1438 (WA_Warnings): Register new flag as an "all warnings" switch
1439 * usage.adb,
1440 doc/gnat_ugn/building_executable_programs_with_gnat.rst:
1441 Document new warning switches -gnatw_a and -gnatw_A.
1442 * gnat_ugn.texi: Regenerate.
1443
1444 2019-07-09 Ed Schonberg <schonberg@adacore.com>
1445
1446 * sem_ch4.adb (Diagnose_Call): Improve error recovery when a
1447 local subprogram name hides a possible candidate name declared
1448 in a child package in the context of the current unit.
1449 * sem_ch6.adb (Process_Formals): Protect against malformed
1450 formal types when the parameter type does not denote an entity.
1451
1452 2019-07-09 Hristian Kirtchev <kirtchev@adacore.com>
1453
1454 * bindo-augmentors.adb (Visit_Elaboration_Root): Do not start a
1455 DFS from an elaboration root whose corresponding unit lacks
1456 elaboration code. This behavior mimics that of the old
1457 elaboration order mechanism.
1458 * bindo-graphs.adb (Find_All_Cycles_Through_Vertex): Move the
1459 vertex tracing within the functional branches of the routine.
1460 This prevents spurious trace output.
1461 (Has_No_Elaboration_Code): New routine.
1462 (Trace_Cycle, Trace_Edge): Update the various Ids to use the
1463 "standard" trace format.
1464 * bindo-graphs.ads (Has_No_Elaboration_Code): New routine.
1465 * bindo-units.ads, bindo-units.adb (Has_No_Elaboration_Code):
1466 New routine.
1467
1468 2019-07-09 Piotr Trojanek <trojanek@adacore.com>
1469
1470 * ali.ads, bindo-graphs.adb, bindo-validators.adb, clean.adb,
1471 doc/gnat_ugn/elaboration_order_handling_in_gnat.rst, einfo.ads,
1472 exp_aggr.adb, exp_ch13.adb, exp_ch4.adb, exp_ch5.adb,
1473 exp_ch6.adb, exp_ch7.adb, exp_ch9.adb, exp_pakd.adb,
1474 fname-uf.ads, gnatlink.adb, inline.adb, lib.ads, make.adb,
1475 namet.ads, opt.ads, par-ch4.adb, par-ch6.adb, par-labl.adb,
1476 prep.adb, sem_aggr.adb, sem_ch13.adb, sem_ch4.adb, sem_ch5.adb,
1477 sem_ch6.adb, sem_ch6.ads, sem_ch7.adb, sem_ch8.adb, sem_dim.adb,
1478 sem_disp.adb, sem_prag.adb, sem_res.adb, sem_warn.adb,
1479 sinfo.ads: Replace ". " with ". ". Minor reformatting and typo
1480 corrections.
1481 * gnat_ugn.texi: Generate.
1482
1483 2019-07-09 Hristian Kirtchev <kirtchev@adacore.com>
1484
1485 * bindo.ads: Move type Precedence_Kind from the private to the
1486 visible part of the unit.
1487 * bindo-augmentors.adb: Remove the use of global data as it is
1488 bad practice.
1489 (Augment_Library_Graph): Update the parameter profile.
1490 (Is_Visited, Set_Is_Visited): Remove.
1491 (Visit_Elaboration_Root, Visit_Elaboration_Roots): Update the
1492 parameter profile and comment on usage.
1493 (Visit_Vertex): Likewise. Also keep track of which invocation
1494 edge activates a task.
1495 * bindo-augmentors.ads (Augment_Library_Graph): Update the
1496 parameter profile and comment on usage.
1497 * bindo-builders.adb (Create_Forced_Edge,
1498 Create_Spec_And_Body_Edge, Create_With_Edge): Update the call to
1499 Add_Edge.
1500 * bindo-diagnostics.adb: Add with end use clauses for Restrict
1501 and Rident.
1502 (Output_Dynamic_Model_Suggestions): Remove.
1503 (Output_Invocation_Related_Suggestions): New routine.
1504 (Output_Suggestions): Output all invocation-related suggestions
1505 together.
1506 * bindo-elaborators.adb: Remove types Comparator_Ptr and
1507 Predicate_Ptr.
1508 (Find_Best_Vertex): Update the parameter profile.
1509 * bindo-graphs.adb (Activates_Task): New routine.
1510 (Add_Body_Before_Spec_Edge): Update the call to
1511 Add_Edge_With_Return.
1512 (Add_Edge): Update the parameter profile and the call to
1513 Add_Edge_With_Return.
1514 (Add_Edge_With_Return): Update the parameter profile and comment
1515 on usage.
1516 (At_Least_One_Edge_Satisfies): New routine.
1517 (Contains_Elaborate_All_Edge): Reimplement.
1518 (Contains_Static_Successor_Edge, Contains_Task_Activation): New
1519 routine.
1520 (Contains_Weak_Static_Successor): Remove.
1521 (Is_Static_Successor_Edge): New routine.
1522 * bindo-graphs.ads: Add types LGE_Predicate_Ptr,
1523 LGV_Comparator_Ptr, and LGV_Predicate_Ptr. Update type
1524 Library_Graph_Edge_Attributes to capture whether an invocation
1525 edge activates a task. Update the value of
1526 No_Library_Graph_Edge_Attributes.
1527 (Activates_Task): Update the parameter profile and comment on
1528 usage.
1529 (Contains_Static_Successor_Edge, Contains_Task_Activation): New
1530 routines.
1531 (Contains_Weak_Static_Successor): Remove.
1532 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst:
1533 Update the documentation to reflect the new task-related advice.
1534 * gnat_ugn.texi: Regenerate.
1535
1536 2019-07-09 Piotr Trojanek <trojanek@adacore.com>
1537
1538 * exp_util.adb (Containing_Package_With_Ext_Axioms): Replace
1539 low-level Ekind test with a high-level wrapper.
1540
1541 2019-07-09 Arnaud Charlet <charlet@adacore.com>
1542
1543 * libgnat/s-memory.adb: Disable calls to Abort defer/undefer
1544 when ZCX_By_Default.
1545
1546 2019-07-09 Javier Miranda <miranda@adacore.com>
1547
1548 * sem_ch13.adb (Rep_Item_Too_Early): Representation clauses are
1549 not allowed for a derivation of a generic type. Extend the
1550 current test to check that none of the parents is a generic
1551 type.
1552
1553 2019-07-09 Hristian Kirtchev <kirtchev@adacore.com>
1554
1555 * exp_ch9.adb, exp_util.adb, repinfo.adb, sem_ch12.adb,
1556 sem_prag.adb, sem_res.adb, sem_spark.adb, sem_util.adb: Minor
1557 reformatting.
1558
1559 2019-07-09 Ed Schonberg <schonberg@adacore.com>
1560
1561 * sem_res.adb (Resolve_Equality_Op): If the node was overloaded,
1562 set properly the entity to which the node has been resolved. The
1563 original entity is the first one found during analysis, and is
1564 not necessarily the resolved one.
1565 (Resolve_Op_Not): If the argument of negation is an overloaded
1566 equality operation, call its resolution directly given that the
1567 context type does not participate in overload resolution.
1568
1569 2019-07-09 Hristian Kirtchev <kirtchev@adacore.com>
1570
1571 * bindo.adb: Remove with and use clauses for Debug. Add with
1572 and use clauses for Opt.
1573 (Find_Elaboration_Order): Enable the v4.0 elaboration order. The
1574 v3.0 mechanism is now available under binder switch -H.
1575 * bindusg.adb (Display): Enable switch -H.
1576 * debug.adb: Free compiler switch -gnatd_G. Free binder switch
1577 -d_N.
1578 * sem_elab.adb: Update the section on switches to remove
1579 -gnatd_G.
1580 (Invocation_Graph_Recording_OK): The invocation graph is now
1581 unconditionally recorded in ALI files.
1582 * switch-b.adb (Scan_Binder_Switches): Scan switch -H.
1583 * doc/gnat_ugn/building_executable_programs_with_gnat.rst:
1584 Update the documentation on compiler switches related to
1585 elaboration. Update the documentation on binder switches to
1586 include switch -H.
1587 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update
1588 the documentation on elaboration order handling in GNAT.
1589 * gnat_ugn.texi: Regenerate.
1590
1591 2019-07-09 Eric Botcazou <ebotcazou@adacore.com>
1592
1593 * repinfo.adb (List_Entities): Disregard formals altogether.
1594 (List_Name): Properly escape the double quote in the JSON
1595 output.
1596
1597 2019-07-09 Javier Miranda <miranda@adacore.com>
1598
1599 * exp_util.adb (Remove_Side_Effects): Preserve the
1600 Do_Range_Check flag.
1601
1602 2019-07-09 Yannick Moy <moy@adacore.com>
1603
1604 * sinfo.ads: Refine comment for Do_Range_Check.
1605
1606 2019-07-09 Yannick Moy <moy@adacore.com>
1607
1608 * exp_spark.adb (Expand_SPARK_N_Attribute_Reference): Expand
1609 attribute reference on Enum_Rep.
1610
1611 2019-07-09 Ed Schonberg <schonberg@adacore.com>
1612
1613 * sem_ch12.adb (Instantiate_Formal_Package): Handle properly the
1614 case where the actual for a formal package in an instance is the
1615 current instance of an enclosing generic package.
1616 (Check_Formal_Packages): If the formal package declaration is
1617 box-initialized or lacks associations altogether, no internal
1618 instance was created to verify conformance, and there is no
1619 validating package to remove from tree.
1620
1621 2019-07-09 Yannick Moy <moy@adacore.com>
1622
1623 * freeze.adb (Build_Renamed_Body): Do not set body to inline in
1624 GNATprove mode.
1625
1626 2019-07-09 Yannick Moy <moy@adacore.com>
1627
1628 * exp_util.adb (Expand_Subtype_From_Expr): Still expand the type
1629 of static expressions in GNATprove_Mode.
1630 * sem_ch3.adb (Analyze_Object_Declaration): Remove obsolete
1631 special case for GNATprove_Mode.
1632
1633 2019-07-09 Piotr Trojanek <trojanek@adacore.com>
1634
1635 * doc/gnat_rm/the_gnat_library.rst,
1636 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
1637 erroutc.adb, libgnat/g-comlin.adb, libgnat/g-comlin.ads,
1638 libgnat/g-regexp.ads, libgnat/g-regpat.ads,
1639 libgnat/g-spipat.ads, libgnat/s-os_lib.ads,
1640 libgnat/s-regexp.ads: Reword "wild card" to "wildcard".
1641 * gnat_rm.texi, gnat_ugn.texi: Regenerate.
1642
1643 2019-07-09 Yannick Moy <moy@adacore.com>
1644
1645 * sem_spark.adb (Check_Expression): Handle correctly implicit
1646 assignments as part of allocators and (extension) aggregates.
1647 (Get_Root_Object): Adapt for new path expressions.
1648 (Is_Path_Expression): Return True for (extension) aggregate.
1649
1650 2019-07-09 Piotr Trojanek <trojanek@adacore.com>
1651
1652 * einfo.ads: Fix a typo.
1653
1654 2019-07-09 Ed Schonberg <schonberg@adacore.com>
1655
1656 * sem_util.adb (Scope_Within_Or_Same): Handle properly task
1657 bodies and protected bodies, so that local variables within have
1658 their proper scopes after these constructs have been rewritten
1659 during expansion. This patch resembles but is not identical to
1660 the code in Scope_Within.
1661
1662 2019-07-09 Arnaud Charlet <charlet@adacore.com>
1663
1664 * gnat1drv.adb (Adjust_Global_Switches): Set
1665 Dynamic_Elaboration_Checks to True in CodePeer mode.
1666
1667 2019-07-09 Yannick Moy <moy@adacore.com>
1668
1669 * sem_spark.adb (Get_Perm_Or_Tree): Issue an error when
1670 encountering unknown global variable.
1671
1672 2019-07-09 Yannick Moy <moy@adacore.com>
1673
1674 * sem_spark.adb (Check_Expression): Change signature to take an
1675 Extended_Checking_Mode, for handling read permission checking of
1676 sub-expressions in an assignment.
1677 (Check_Parameter_Or_Global): Adapt to new behavior of
1678 Check_Expression for mode Assign.
1679 (Check_Safe_Pointers): Do not analyze generic bodies.
1680 (Check_Assignment): Separate checking of the target of an
1681 assignment.
1682
1683 2019-07-09 Eric Botcazou <ebotcazou@adacore.com>
1684
1685 * repinfo.ads (JSON format): Adjust.
1686 * repinfo.adb (Need_Blank_Line): Rename to...
1687 (Need_Separator): ...this.
1688 (Blank_Line): Rename to...
1689 (Write_Separator): ...this and add JSON specific handling.
1690 (List_Array_Info): Adjust to above renaming.
1691 (List_Object_Info): Likewise.
1692 (List_Record_Info): Likewise.
1693 (List_Subprogram_Info): Likewise.
1694 (List_Type_Info): Likewise.
1695 (List_Entities): Do not set Need_Blank_Line.
1696 (List_Rep_Info): Set Need_Separator and add JSON specific
1697 handling. Output a single JSON stream in the normal case.
1698
1699 2019-07-09 Arnaud Charlet <charlet@adacore.com>
1700
1701 * doc/gnat_ugn/the_gnat_compilation_model.rst: Update doc on
1702 -fdump-ada-spec now that we generate Ada 2012.
1703 * gnat_ugn.texi: Regenerate.
1704
1705 2019-07-08 Eric Botcazou <ebotcazou@adacore.com>
1706
1707 * repinfo.adb (List_Common_Type_Info): New procedure extracted
1708 from...
1709 (List_Type_Info): ...here. Call it for the common information,
1710 start with a blank line and output the linker section at the
1711 end, if any.
1712 (List_Mechanisms): Rename to...
1713 (List_Subprogram_Info): ...this.
1714 (List_Array_Info): Call List_Common_Type_Info.
1715 (List_Entities): Adjust to above change and renaming.
1716 (List_Record_Info): Call List_Common_Type_Info.
1717
1718 2019-07-08 Dmitriy Anisimkov <anisimko@adacore.com>
1719
1720 * libgnat/g-sercom.ads
1721 (Serial_Port_Descriptor): New type.
1722 (Serial_Port): Add a comment, make it hold a
1723 Serial_Port_Descriptor.
1724 (To_Ada, To_C): New procedures.
1725 (Port_Data, Port_Data_Access): Remove types.
1726 * libgnat/g-sercom.adb (To_Ada): New stub.
1727 * libgnat/g-sercom__linux.adb, libgnat/g-sercom__mingw.adb:
1728 Update implementations accordingly.
1729 * s-oscons-tmplt.c: Bind Serial_Port_Descriptor to
1730 System.Win32.HANDLE on Windows, and to Interfaces.C.int on
1731 Linux. Add "Interfaces.C." prefix for other basic integer type
1732 bindings.
1733 * xoscons.adb (Output_Info): Remove the "Interfaces.C." prefix
1734 for subtypes generation.
1735
1736 2019-07-08 Arnaud Charlet <charlet@adacore.com>
1737
1738 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
1739 Update documentation on No_Exceptions restriction.
1740 * gnat_rm.texi: Regenerate.
1741
1742 2019-07-08 Dmitriy Anisimkov <anisimko@adacore.com>
1743
1744 * libgnat/s-os_lib.adb: Do not call __gnat_kill for Invalid_Pid.
1745
1746 2019-07-08 Piotr Trojanek <trojanek@adacore.com>
1747
1748 * sem_util.adb (Enclosing_Package_Or_Subprogram): Do not expect
1749 package and subprogram bodies.
1750
1751 2019-07-08 Bob Duff <duff@adacore.com>
1752
1753 * doc/gnat_ugn/gnat_utility_programs.rst: Remove documentation
1754 of ignored GNATpp switch.
1755
1756 2019-07-08 Hristian Kirtchev <kirtchev@adacore.com>
1757
1758 * doc/gnat_rm/implementation_defined_pragmas.rst:
1759 Update the documentation of pragma Initialize_Scalars.
1760 * gnat_rm.texi: Regenerate.
1761
1762 2019-07-08 Javier Miranda <miranda@adacore.com>
1763
1764 * exp_ch4.adb (Tagged_Membership): Fix regression silently
1765 introduced in r260738 that erroneouslusy causes the evaluation
1766 to True of the membership test when the left operand of the
1767 membership test is a class-wide interface object and the right
1768 operand is a type that implements such interface type.
1769
1770 2019-07-08 Hristian Kirtchev <kirtchev@adacore.com>
1771
1772 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
1773 register an address clause when its prefix denotes a generic
1774 formal object.
1775
1776 2019-07-08 Hristian Kirtchev <kirtchev@adacore.com>
1777
1778 * bindo-diagnostics.adb (Diagnose_Cycle): Capture the presence
1779 of an Elaborate_All edge before iterating over the edges of the
1780 cycle.
1781 (Output_Elaborate_Body_Transition): Update the parameter profile
1782 and the comment on usage. Add a missing case where the edge is
1783 within the context of an Elaborate_All.
1784 (Output_Transition): Update the call to
1785 Output_Elaborate_Body_Transition.
1786 * bindo-graphs.ads, bindo-graphs.adb
1787 (Contains_Elaborate_All_Edge): New routine.
1788
1789 2019-07-08 Piotr Trojanek <trojanek@adacore.com>
1790
1791 * lib-xref-spark_specific.adb (Create_Heap): Set dummy Etype for
1792 the fake __HEAP entity.
1793
1794 2019-07-08 Daniel Mercier <mercier@adacore.com>
1795
1796 * gnat1drv.adb: Suppress warnings on memory representation in
1797 CodePeer compiler mode.
1798
1799 2019-07-08 Nicolas Roche <roche@adacore.com>
1800
1801 * rtinit.c (__gnat_runtime_initialize): Remove dependency on
1802 CommandLineToArgvW.
1803
1804 2019-07-08 Doug Rupp <rupp@adacore.com>
1805
1806 * Makefile.rtl: Handle vxworks7r2 in x86_64 and x86 vxworks7.
1807
1808 2019-07-08 Dmitriy Anisimkov <anisimko@adacore.com>
1809
1810 * Makefile.rtl: Use g-sercom__linux.adb for all linuxes.
1811
1812 2019-07-08 Yannick Moy <moy@adacore.com>
1813
1814 * expander.adb (Expand): Do not reset Analyzed flag always.
1815 * sem_eval.adb (Fold_Ureal): Mark node as analyzed.
1816
1817 2019-07-08 Ed Schonberg <schonberg@adacore.com>
1818
1819 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Do not insert twice
1820 the assignment statement that computes the delay value, to
1821 prevent improper tree sharing when the value is a type
1822 conversion and Float_Overflow checks are enabled.
1823
1824 2019-07-08 Hristian Kirtchev <kirtchev@adacore.com>
1825
1826 * bindo.adb: Update the section on terminology to include new
1827 concepts. Update the section on switches to include new
1828 entries.
1829 * bindo.ads: Add type Precedence_Kind.
1830 * bindo-builders.adb: Add with and use clauses for Debug and
1831 Bindo.Validators. Add use clauses for
1832 Bindo.Validators.Invocation_Graph_Validators and
1833 Bindo.Validators.Library_Graph_Validators.
1834 (Build_Invocation_Graph): Validate the graph immediately after
1835 it was built.
1836 (Build_Library_Graph): Update the parameter profile. The
1837 creation of the graph is now elaboration model-agnostic.
1838 Validate the graph immediately after it was built.
1839 (Create_With_Edge): Create regular with edges for Elaborate and
1840 Elaborate_All edges when the appropriate debug switches are in
1841 effect.
1842 * bindo-builders.ads (Build_Library_Graph): Update the parameter
1843 profile.
1844 * bindo-diagnostics.adb (Diagnose_Cycle): Track the presence of
1845 an Elaborate_All edge throughout the inspection of the cycle's
1846 edges.
1847 (Output_Dynamic_Model_Suggestions): Output the suggestion only
1848 when the cycle contains at least one weak edge where the
1849 successor was statically elaborated.
1850 (Output_Elaborate_Body_Transition, Output_Forced_Transition,
1851 Output_With_Transition): Update the assertions.
1852 * bindo-elaborators.adb: Remove use clauses for
1853 Bindo.Validators.Invocation_Graph_Validators and
1854 Bindo.Validators.Library_Graph_Validators. Remove strings
1855 Add_To_All_Candidates_Msg and Add_To_Comp_Candidates_Msg.
1856 Remove type String_Ptr.
1857 (Add_Vertex, Add_Vertex_If_Elaborable, Create_All_Candidates_Set
1858 Create_Component_Candidates_Set): Remove.
1859 (Create_Component_Vertex_Sets, Create_Vertex_Sets): New routine.
1860 (Elaborate_Component): Update the parameter profile and the
1861 comment on usage. Reimplement the elaboration of a component.
1862 The algorithm will now attempt to elaborate as many vertices
1863 possible. If this is not possible, and a weakly elaborable
1864 vertex is available use unit was compiled using the dynamic
1865 model, the algorithm will elaborate it.
1866 (Elaborate_Library_Graph): Reimplement the elaboration of the
1867 graph. The algorithm will now attempt to elaborate as many
1868 vertices along with their components as possible. If this is not
1869 possible, and a weakly elaborable vertex is available use unit
1870 was compiled using the dynamic model, the algorithm will
1871 elaborate it along with its component.
1872 (Elaborate_Units): Merge with the functionality of
1873 Elaborate_Units_Common.
1874 (Elaborate_Units_Common, Elaborate_Units_Dynamic,
1875 Elaborate_Units_Static): Remove.
1876 (Elaborate_Vertex): Update the parameter profile and the comment
1877 on usage. Reimplemented.
1878 (Find_Best_Candidate): Remove.
1879 (Find_Best_Elaborable_Vertex, Find_Best_Vertex,
1880 Find_Best_Weakly_Elaborable_Vertex, Has_Elaborable_Body,
1881 Insert_Elaborable_Successor, Insert_Vertex): New routines.
1882 (Is_Better_Candidate): Remove.
1883 (Is_Better_Elaborable_Vertex,
1884 Is_Better_Weakly_Elaborable_Vertex,
1885 Is_Suitable_Elaborable_Vertex,
1886 Is_Suitable_Weakly_Elaborable_Vertex): New routines.
1887 (Trace_Candidate_Vertices): Remove.
1888 (Trace_Component): Output the number of strong and weak
1889 predecessors.
1890 (Trace_Unelaborated_Vertices): Remove.
1891 (Trace_Vertex): Output the number of strong and weak
1892 predecessors.
1893 (Trace_Vertices): New routine.
1894 (Update_Successor, Update_Successors): Update the parameter
1895 profile and the comment on usage.
1896 * bindo-graphs.adb: Remove type Precedence_Kind.
1897 (Add_Edge_With_Return): Update the increment of pending
1898 predecessors.
1899 (Add_Vertex): Provide default values for strong and weak
1900 predecessors.
1901 (Complementary_Vertex): Move the initial declaration to the
1902 spec. Update the parameter profile and the comment on usage.
1903 (Contains_Weak_Static_Successor): New routine.
1904 (Create): Update the parameter profile. The creation of the
1905 graph is now elaboration model-agnostic.
1906 (Decrement_Pending_Predecessors): Update the parameter profile
1907 and the comment on usage. Reimplemented.
1908 (Delete_Edge): Update the decrement of pending predecesors.
1909 (Has_Elaborate_Body): Do not treat a vertex as being subject to
1910 Elaborate_Body when a debug switch is in effect.
1911 (Increment_Pending_Predecessors): Update the parameter profile
1912 and the comment on usage. Reimplemented.
1913 (Is_Elaborable_Component): Reimplemented.
1914 (Is_Elaborable_Vertex): Move the initial declaration to the
1915 spec. Reimplemented.
1916 (Is_Elaborate_Body_Pair): New routine.
1917 (Is_Dynamically_Elaborated): Update the parameter profile.
1918 Reimplemented.
1919 (Is_Weakly_Elaborable_Vertex): New routine.
1920 (Pending_Predecessors): Removed.
1921 (Pending_Predecessors_For_Elaboration,
1922 Pending_Strong_Predecessors, Pending_Weak_Predecessors,
1923 Update_Pending_Predecessors): New routines.
1924 (Update_Pending_Predecessors_Of_Components): Update the
1925 increment of pending predecessors.
1926 * bindo-graphs.ads: Update the components of type
1927 Component_Attributes. Update the components of type
1928 Library_Graph_Attributes. Update the components of type
1929 Library_Graph_Vertex_Attributes. Update the initialization of
1930 No_Component_Attributes. Update the initialization of
1931 No_Library_Graph_Vertex_Attributes.
1932 (Complementary_Vertex, Contains_Weak_Static_Successor): New
1933 routines.
1934 (Create): Update the parameter profile and the comment on usage.
1935 (Decrement_Pending_Predecessors, Is_Dynamically_Elaborated):
1936 Update the parameter profile and the comment on usage.
1937 (Is_Elaborate_Body_Pair, Is_Weakly_Elaborable_Vertex): New
1938 routines.
1939 (Pending_Predecessors): Removed.
1940 (Pending_Predecessors_For_Elaboration,
1941 Pending_Strong_Predecessors, Pending_Weak_Predecessors): New
1942 routines.
1943 * bindo-writers.adb (Write_Components): Moved from the spec.
1944 (Write_Component): Output the strong and weak predecessors.
1945 (Write_Library_Graph): Output the components as part of the
1946 graph.
1947 (Write_Library_Graph_Vertex): Output the strong and weak
1948 predecessors.
1949 * bindo-writers.ads (Write_Components): Moved to the body.
1950 * debug.adb: Add and document new GNATbind switches -d_a, -d_b,
1951 -d_e.
1952 * bindo-validators.adb: Minor reformattings.
1953
1954 2019-07-08 Bob Duff <duff@adacore.com>
1955
1956 * libgnat/g-sercom.ads, libgnat/g-sercom__linux.adb (Data_Rate):
1957 Support additional data rates.
1958
1959 2019-07-08 Olivier Hainque <hainque@adacore.com>
1960
1961 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Don't request
1962 DECL_ARTIFICIAL_P on elab proc declarations.
1963
1964 2019-07-08 Eric Botcazou <ebotcazou@adacore.com>
1965
1966 * repinfo.adb (List_Record_Info): Declare Incomplete_Layout and
1967 Not_In_Extended_Main local exceptions.
1968 (List_Structural_Record_Layout): For an extension, raise the
1969 former if the parent subtype has not been built and the latter
1970 if it is not declared in the main source unit. Fall back to the
1971 flat layout if either exception has been raised.
1972
1973 2019-07-08 Ed Schonberg <schonberg@adacore.com>
1974
1975 * libgnat/a-strfix.adb (Delete): The RM describes the semantics
1976 of Delete as equivalent to that of Replace_String with a null
1977 argument. As a result, deleting a null string that starts past
1978 the end of its argument is a noop and must not raise
1979 Index_Error.
1980
1981 2019-07-08 Javier Miranda <miranda@adacore.com>
1982
1983 * exp_disp.adb (Register_Primitive): When registering a
1984 primitive in the secondary dispatch table, handle primitive
1985 inherited through several levels of type derivation (required to
1986 properly handle inherited 'null' primitive).
1987
1988 2019-07-08 Bob Duff <duff@adacore.com>
1989
1990 * doc/gnat_ugn/gnat_utility_programs.rst: Document handling of
1991 preprocessor directives in GNATpp.
1992
1993 2019-07-08 Javier Miranda <miranda@adacore.com>
1994
1995 * gnat1drv.adb (Post_Compilation_Validation_Checks:
1996 Validate_Compile_Time_Warning_Errors is now located in sem_prag
1997 (instead of sem_ch13).
1998 * sem_ch13.ads (Validate_Compile_Time_Warning_Error,
1999 Validate_Compile_Time_Warning_Errors): Move to sem_prag.
2000 * sem_ch13.adb
2001 (Compile_Time_Warnings_Errors): Move to sem_prag.
2002 (Initialize): Remove initialization of table
2003 Compile_Time_Warning_Errors.
2004 (Validate_Compile_Time_Warning_Error,
2005 Validate_Compile_Time_Warning_Errors): Move to sem_prag.
2006 * sem_prag.ads (Validate_Compile_Time_Warning_Errors): New
2007 procedure.
2008 * sem_prag.adb (Initialize): Initialize table
2009 Compile_Time_Warning_Errors.
2010
2011 2019-07-08 Ed Schonberg <schonberg@adacore.com>
2012
2013 * sem_ch13.adb (Analyze_Aspect_Specifications): For a
2014 pre/postcondition of a generic subprogram declaration, do not
2015 use Relocate_Node on the aspect expression to construct the
2016 corresponding attribute specification, to prevent tree anomalies
2017 when the expression is a call with named actual parameters.
2018
2019 2019-07-08 Javier Miranda <miranda@adacore.com>
2020
2021 * sem_attr.adb (Analyze_Attribute [Attribute_Size]): For pragmas
2022 used to report user defined compile time warning or errors
2023 handle 'Size for types with known static RM size.
2024
2025 2019-07-08 Justin Squirek <squirek@adacore.com>
2026
2027 * exp_imgv.adb (Build_Enumeration_Image_Tables): Default SSO for
2028 the building of image tables.
2029 (Expand_Image_Attribute): Minor cleanup.
2030
2031 2019-07-08 Dmitriy Anisimkov <anisimko@adacore.com>
2032
2033 * libgnat/g-socket.ads, libgnat/g-socket.adb: Improve
2034 documentation.
2035 (Get_Socket_Option, Set_Socket_Option): Remove default value for
2036 the Level formal.
2037
2038 2019-07-08 Ed Schonberg <schonberg@adacore.com>
2039
2040 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): For an
2041 unanalized aspect in a generic context that has not been
2042 analyzed yet, if the aspect applies to a type, place the type on
2043 the scope stack to make its components visible, before checking
2044 conformance with the version of the expression analyzed at the
2045 freeze point.
2046
2047 2019-07-05 Justin Squirek <squirek@adacore.com>
2048
2049 * checks.adb (Apply_Accessibility_Check): Add logic to fetch the
2050 function result accessibility level if one is required within
2051 the generated check.
2052 * exp_ch6.adb (Needs_Result_Accessibility_Level): Modify
2053 controlling elsif block to handle more cases such as anonymous
2054 access results and disable checking for coextensions.
2055
2056 2019-07-05 Ed Schonberg <schonberg@adacore.com>
2057
2058 * sem_ch9.adb (Analyze_Accept_Statement): If this is an illegal
2059 accept statement for an enclosing entry abandon analysis to
2060 prevent scope mismatches and potential infinite loops in
2061 compiler.
2062
2063 2019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
2064
2065 * ali.adb (For_Each_Invocation_Construct,
2066 For_Each_Invocation_Relation): New version.
2067 (Scan_ALI): Initialize field Invocation_Graph_Encoding.
2068 (Set_Invocation_Graph_Encoding): Update the setting of the
2069 invocation graph encoding.
2070 * ali.ads: Move field Invocation_Graph_Encoding from Unit_Record
2071 to ALI_Record because the encoding applies to the whole ALI,
2072 rather than one of the units (spec or body) for which the ALI
2073 file was created.
2074 (For_Each_Invocation_Construct, For_Each_Invocation_Relation):
2075 New version.
2076 * bindo.adb: Update the section on switches. Complete the
2077 section of debugging elaboration order issues.
2078 (Find_Elaboration_Order): Prepare the routine for the switch
2079 from the old to the new elaboration order mechanism.
2080 * bindo-diagnostics.adb (Find_And_Output_Invocation_Paths):
2081 Manage a visited set used by Visit_Vertex.
2082 (Output_All_Cycles_Suggestions,
2083 Output_Dynamic_Model_Suggestions): Clarify the nature of the
2084 suggested switch.
2085 (Output_Elaborate_Body_Transition): Update the diagnostic to
2086 emit a better message.
2087 (Output_Forced_Suggestions, Output_Full_Encoding_Suggestions):
2088 Clarify the nature of the suggested switch.
2089 (Visit_Vertex): Update the parameter profile to add a set of
2090 invokers visited during the transition. This set prevents
2091 infinite exploration of the graph in case the invocations are
2092 recursive.
2093 * bindo-elaborators.adb: Add a use clause for
2094 Bindo.Writers.Dependency_Writers.
2095 (Elaborate_Units_Common): Output the library graph after it has
2096 been augmented with invocation edges. Output just the components
2097 instead of outputting the whole library graph again.
2098 (Elaborate_Units_Dynamic, Elaborate_Units_Static): Output the
2099 dependencies as expressed in the library graph.
2100 * bindo-units.adb (Invocation_Graph_Encoding): Update the
2101 extraction of the invocation graph encoding.
2102 * bindo-writers.adb: Add with and use clauses for Binderr and
2103 Butil.
2104 (palgc, plgc): New debug routine.
2105 (Write_Components): Moved to the spec. Add a header for the
2106 output.
2107 (Write_Dependencies, Write_Dependencies_Of_Vertex,
2108 Write_Dependency_Edge): New routine.
2109 (Write_Elaboration_Order): Update the logic to follow the format
2110 of Binde's order output.
2111 (Write_Library_Graph): Do not output the components every time
2112 the graph is written.
2113 (Write_Unit): Output the invocation graph encoding of the unit.
2114 Output the invocation constructs and relations for the unit
2115 only.
2116 * bindo-writers.ads (Write_Components): Moved from the body.
2117 (Write_Dependencies): New routine.
2118 * bindusg.adb: Prepare the routine for the switch from the old
2119 to the new elaboration order mechanism.
2120 * debug.adb: Binder switch -d_O is now not associated with any
2121 functionality.
2122 * einfo.adb (Is_Elaboration_Target): The attribute applies to
2123 packages, as specified by the comment on the attribute usage.
2124 * opt.ads: Add a global flag which controls the choice between
2125 the new and the legacy elaboration order mechanism.
2126 * sem_elab.adb: Add Package_Target to type Target_Kind.
2127 (Build_Elaborate_Body_Procedure, Build_Elaborate_Procedure,
2128 Build_Elaborate_Spec_Procedure, Check_Elaboration_Scenarios,
2129 Check_SPARK_Model_In_Effect): Use Main_Unit_Entity to obtain the
2130 entity of the main unit.
2131 (Create_Package_Rep): New routine.
2132 (Create_Target_Rep): Add processing for packages.
2133 (Declaration_Placement_Of_Node, Has_Prior_Elaboration): Use
2134 Main_Unit_Entity to obtain the entity of the main
2135 unit.
2136 (Invocation_Graph_Recording_OK): Prepare the routine for the
2137 switch from the old to the new elaboration order mechanism.
2138 (Main_Unit_Entity): New routine.
2139 (Meet_Elaboration_Requirement,
2140 Process_Conditional_ABE_Variable_Reference): Use
2141 Main_Unit_Entity to obtain the entity of the main unit.
2142 (Process_Invocation_Instantiation): New routine.
2143 (Process_Invocation_Scenario): Add processing for
2144 instantiations.
2145 * switch-b.adb (Scan_Binder_Switches): Prepare the routine for
2146 the switch from the old to the new elaboration order mechanism.
2147
2148 2019-07-05 Joffrey Huguet <huguet@adacore.com>
2149
2150 * libgnat/a-textio.adb: Add abstract state refinment.
2151 * libgnat/a-textio.ads: Add File_System abstract state. Add
2152 global contracts, contract cases, preconditions and
2153 postconditions to procedures and functions.
2154 (Set_Input, Set_Output, Set_Error, Standard_Input,
2155 Standard_Output, Standard_Error, Current_Input, Current_Output,
2156 Current_Error): Turn SPARK_Mode off.
2157 (Get_Line): Turn SPARK_Mode off on Get_Line functions.
2158 * libgnat/a-tideio.ads, libgnat/a-tienio.ads,
2159 libgnat/a-tifiio.ads, libgnat/a-tiflio.ads,
2160 libgnat/a-tiinio.ads, libgnat/a-timoio.ads: Add global
2161 contracts, contract cases, preconditions and postconditions to
2162 procedures and functions.
2163
2164 2019-07-05 Arnaud Charlet <charlet@adacore.com>
2165
2166 * doc/gnat_ugn/platform_specific_information.rst: Refresh doc on
2167 installing from the command line on Windows. Remove obsolete
2168 part.
2169 * gnat_ugn.texi: Regenerate.
2170
2171 2019-07-05 Vasiliy Fofanov <fofanov@adacore.com>
2172
2173 * libgnat/a-wichha.ads (Is_Alphanumeric): Replace comment with
2174 the correct one. Also capitalize references to False
2175 throughout.
2176
2177 2019-07-05 Eric Botcazou <ebotcazou@adacore.com>
2178
2179 * exp_ch4.adb (Expand_N_Indexed_Component): Do not expand actual
2180 parameters of function calls here either.
2181
2182 2019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
2183
2184 * bindo-units.adb, checks.adb, exp_attr.adb, exp_ch3.adb,
2185 exp_ch4.adb, exp_pakd.adb, lib-writ.adb, libgnat/g-traceb.adb,
2186 libgnat/g-traceb.ads, libgnat/s-stratt.ads, sem_aux.ads,
2187 sem_util.adb: Minor reformatting.
2188
2189 2019-07-05 Ed Schonberg <schonberg@adacore.com>
2190
2191 * sem_ch13.adb (Build_Predicate_Functions): If a subtype that
2192 carries a static predicate aspect is frozen immediately after
2193 its declaration, ensure that the generated function body created
2194 for predicate checking is inserted after the corresponding
2195 subprogram declaration, which is created at the point the
2196 declaration is elaborated.
2197
2198 2019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
2199
2200 * exp_ch7.adb (Cleanup_Record): Use the underlying type when
2201 checking for components with tasks.
2202
2203 2019-07-05 Arnaud Charlet <charlet@adacore.com>
2204
2205 * libgnarl/s-osinte__linux.ads: Link with -lrt before -lpthread.
2206
2207 2019-07-05 Ed Schonberg <schonberg@adacore.com>
2208
2209 * exp_pakd.adb (Expand_Bit_Packed_Element_Set): Add explicit
2210 range checks when the index type of the bit-packed array is an
2211 enumeration type with a non-standard representation,
2212
2213 2019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
2214
2215 * sem_res.adb (Is_Control_Flow_Statement): Delay statements
2216 contain an expression, which in turn may have side effects and
2217 affect the infinite recursion. As a result, delay statements
2218 should not be treated specially.
2219
2220 2019-07-05 Arnaud Charlet <charlet@adacore.com>
2221
2222 * libgnarl/s-linux.ads, libgnarl/s-linux__alpha.ads,
2223 libgnarl/s-linux__android.ads, libgnarl/s-linux__hppa.ads,
2224 libgnarl/s-linux__mips.ads, libgnarl/s-linux__riscv.ads,
2225 libgnarl/s-linux__sparc.ads: Fix typos in comments.
2226
2227 2019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
2228
2229 * sem_res.adb (Check_Infinite_Recursion): Reimplemented.
2230 (Enclosing_Declaration_Or_Statement,
2231 Invoked_With_Different_Arguments, Is_Conditional_Statement,
2232 Is_Control_Flow_Statement, Is_Immediately_Within_Body,
2233 Is_Raise_Idiom, Is_Raise_Statement, Is_Sole_Statement,
2234 Preceded_By_Control_Flow_Statement,
2235 Within_Conditional_Statement): New routines.
2236
2237 2019-07-05 Javier Miranda <miranda@adacore.com>
2238
2239 * exp_ch4.adb (Expand_N_Type_Conversion): Do not apply an
2240 accessibility check when the conversion is an access to
2241 class-wide interface type and it is an actual parameter.
2242 * exp_ch6.adb (Expand_Call_Helper): Add documentation on the
2243 accessibility level of an anonymous allocator defining the value
2244 of an access parameter.
2245 * sem_util.ads, sem_util.adb (Dynamic_Accessibility_Level): Add
2246 support for an anonymous allocator whose type is that of a
2247 stand-alone object of an anonymous access to object type.
2248
2249 2019-07-05 Piotr Trojanek <trojanek@adacore.com>
2250
2251 * einfo.ads, sem_res.adb: Typo fixes in comments.
2252
2253 2019-07-05 Bob Duff <duff@adacore.com>
2254
2255 * exp_ch6.adb (Is_Build_In_Place_Function): Narrow the check for
2256 Has_Foreign_Convention to the imported case only. If a
2257 build-in-place function is exported, and called from Ada code,
2258 build-in-place protocols should be used.
2259
2260 2019-07-05 Ed Schonberg <schonberg@adacore.com>
2261
2262 * sem_util.adb (Encloing_Subprogram): If Enclosing_Dynamic_Scope
2263 is a loop, continue climbing the scope stack to find the
2264 enclosing subprogram.
2265 (Gather_Components): Handle properly a choice in a record
2266 aggregate that is given by a subtype with a static predicate.
2267
2268 2019-07-05 Javier Miranda <miranda@adacore.com>
2269
2270 * debug.adb (-gnatd.K): Leave available this switch.
2271 * contracts.adb (Build_And_Analyze_Contract_Only_Subprograms):
2272 Remove.
2273 * scil_ll.ads, scil_ll.adb (Contract_Only_Body_Flag,
2274 Contract_Only_Body_Nodes, Get_Contract_Only_Body,
2275 Is_Contract_Only_Body, Set_Contract_Only_Body): Remove.
2276
2277 2019-07-05 Pierre-Marie de Rodat <derodat@adacore.com>
2278
2279 * libgnat/a-strunb.ads: Import documentation from the RM
2280
2281 2019-07-05 Pierre-Marie de Rodat <derodat@adacore.com>
2282
2283 * libgnat/a-strfix.ads: Import documentation from the RM
2284
2285 2019-07-05 Yannick Moy <moy@adacore.com>
2286
2287 * adabkend.adb (Scan_Back_End_Switches): Accept -Og and -Ofast
2288 switches.
2289
2290 2019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
2291
2292 * ali.adb: Relocate types Invocation_Construct_Record,
2293 Invocation_Relation_Record, and Invocation_Signature_Record to
2294 the body of ALI. Relocate tables Invocation_Constructs,
2295 Invocation_Relations, and Invocation_Signatures to the body of
2296 ALI. Remove type Body_Placement_Codes. Add new types
2297 Declaration_Placement_Codes, and
2298 Invocation_Graph_Encoding_Codes. Update the literals of type
2299 Invocation_Graph_Line_Codes.
2300 (Add_Invocation_Construct): Update the parameter profile. Add an
2301 invocation construct built from all attributes provided.
2302 (Add_Invocation_Relation): Update the parameter profile. Add an
2303 invocation relation built from all attributes provided.
2304 (Body_Placement): New routine.
2305 (Body_Placement_Kind_To_Code, Code_To_Body_Placement_Kind):
2306 Removed.
2307 (Code_To_Declaration_Placement_Kind,
2308 Code_To_Invocation_Graph_Encoding_Kind, Column,
2309 Declaration_Placement_Kind_To_Code, Extra,
2310 For_Each_Invocation_Construct, For_Each_Invocation_Relation,
2311 Invocation_Graph_Encoding,
2312 Invocation_Graph_Encoding_Kind_To_Code, Invoker, Kind, Line,
2313 Locations, Name): New routine.
2314 (Scan_Invocation_Construct_Line): Reimplement the scanning
2315 mechanism.
2316 (Scan_Invocation_Graph_Attributes_Line): New routine.
2317 (Scan_Invocation_Graph_Line): Use a case statement to dispatch.
2318 (Scan_Invocation_Relation_Line): Reimplement the scanning
2319 mechanism.
2320 (Scope): New routine.
2321 (Set_Invocation_Graph_Encoding, Signature, Spec_Placement,
2322 Target): New routine.
2323 * ali.ads: Add new type Invocation_Graph_Encoding_Kind. Add
2324 component Invocation_Graph_Encoding to type Unit_Record.
2325 Relocate various types and data structures to the body of ALI.
2326 (Add_Invocation_Construct, Add_Invocation_Relation): Update the
2327 parameter profile.
2328 (Body_Placement): New routine.
2329 (Body_Placement_Kind_To_Code, Code_To_Body_Placement_Kind):
2330 Removed.
2331 (Code_To_Declaration_Placement_Kind,
2332 Code_To_Invocation_Graph_Encoding_Kind, Column,
2333 Declaration_Placement_Kind_To_Code, Extra,
2334 For_Each_Invocation_Construct, For_Each_Invocation_Relation,
2335 Invocation_Graph_Encoding,
2336 Invocation_Graph_Encoding_Kind_To_Code, Invoker, Kind, Line,
2337 Locations, Name, Scope, Set_Invocation_Graph_Encoding,
2338 Signature, Spec_Placement, Target): New routine.
2339 * bindo.adb: Add with clause for Binde. Add with and use
2340 clauses for Debug. Update the documentation. Add new switches.
2341 (Find_Elaboration_Order): Dispatch to the proper elaboration
2342 mechanism.
2343 * bindo-augmentors.adb:
2344 Remove with and use clauses for GNAT and GNAT.Sets. Remove
2345 membership set VS. Update the parameter profiles of most
2346 routines to use better parameter names. Update the
2347 implementation of most routine to use the new parameter names.
2348 Remove various redundant assertions.
2349 * bindo-builders.adb: Use better names for instantiated data
2350 structures. Update all references to these names. Update the
2351 parameter profiles of most routines to use better parameter
2352 names. Update the implementation of most routine to use the new
2353 parameter names.
2354 (Build_Library_Graph): Update the parameter profile. Update the
2355 call to Create.
2356 (Create_Vertex): Reimplemented.
2357 (Declaration_Placement_Vertex): New routine.
2358 * bindo-builders.ads (Build_Library_Graph): Update the parameter
2359 profile and comment on usage.
2360 * bindo-diagnostics.adb: Almost a new unit.
2361 * bindo-diagnostics.ads: Add a use clause for
2362 Bindo.Graphs.Invocation_Graphs. Remove package
2363 Cycle_Diagnostics.
2364 (Diagnose_Circularities): New routine.
2365 * bindo-elaborators.adb: Remove the with and use clauses for
2366 Binderr and GNAT.Sets. Remove the use clause for
2367 Bindo.Diagnostics.Cycle_Diagnostics. Remove membership set VS.
2368 Update the parameter profiles of most routines to use better
2369 parameter names. Update the implementation of most routine to
2370 use the new parameter names. (Elaborate_Units_Common): Update
2371 the parameter profile. Pass an infication to the library graph
2372 builder whether the dynamic model is in effect.
2373 (Elaborate_Units_Dynamic, Elaborate_Units_Static): Use
2374 Diagnose_Circularities to provide diagnostics.
2375 (Update_Successor): Use routine In_Same_Component to determine
2376 whether the predecessor and successor reside in different
2377 components.
2378 * bindo-graphs.adb: Add with and use clauses for Butil, Debug,
2379 Output, and Bindo.Writers. Remove with and use clauses for
2380 GNAT.Lists. Update the parameter profiles of most routines to
2381 use better parameter names. Update the implementation of most
2382 routine to use the new parameter names. Remove various
2383 redundant assertions. Remove doubly linked list EL. Add new
2384 type Precedence_Kind.
2385 (Add_Cycle): New routine.
2386 (Add_Vertex): Update the parameter profile. Update the creation
2387 of vertex attributes.
2388 (Add_Vertex_And_Complement, Body_Vertex, Column,
2389 Complementary_Vertex, Copy_Cycle_Path, Cycle_Kind_Of): New
2390 routines.
2391 (Destroy_Invocation_Graph_Edge, Destroy_Library_Graph_Cycle,
2392 Destroy_Library_Graph_Edge, Extra, File_Name,
2393 Find_All_Cycles_Through_Vertex, Find_All_Cycles_With_Edge,
2394 Find_Cycles, Find_First_Lower_Precedence_Cycle,
2395 Get_LGC_Attributes, Has_Next, Hash_Library_Graph_Cycle,
2396 Hash_Library_Graph_Cycle_Attributes, Highest_Precedence_Cycle,
2397 Highest_Precedence_Edge, In_Same_Component, Insert_And_Sort,
2398 Invocation_Edge_Count, Invocation_Graph_Encoding,
2399 Is_Cycle_Initiating_Edge, Is_Cyclic_Edge,
2400 Is_Cyclic_Elaborate_All_Edge, Is_Cyclic_Elaborate_Body_Edge,
2401 Is_Cyclic_Elaborate_Edge, Is_Cyclic_Forced_Edge,
2402 Is_Cyclic_Invocation_Edge, Is_Cyclic_With_Edge,
2403 Is_Dynamically_Elaborated, Is_Elaborate_All_Edge,
2404 Is_Elaborate_Body_Edge, Is_Elaborate_Edge: New routines.
2405 (Is_Existing_Predecessor_Successor_Relation): Removed.
2406 (Is_Forced_Edge, Is_Invocation_Edge, Is_Recorded_Cycle,
2407 Is_Recorded_Edge, Is_With_Edge, Iterate_Edges_Of_Cycle, Kind,
2408 Length): New routine.
2409 (Lib_Vertex): Removed.
2410 (Line, Links_Vertices_In_Same_Component,
2411 Maximum_Invocation_Edge_Count, Next, Normalize_And_Add_Cycle,
2412 Normalize_Cycle_Path, Number_Of_Cycles, Path, Precedence,
2413 Remove_Vertex_And_Complement, Sequence_Next_Cycle): New routines.
2414 (Sequence_Next_IGE_Id): Renamed to Sequence_Next_Edge.
2415 (Sequence_Next_IGV_Id): Renamed to Sequence_Next_Vertex.
2416 (Sequence_Next_LGE_Id): Renamed to Sequence_Next_Edge.
2417 (Sequence_Next_LGV_Id): Renamed to Sequence_Next_Vertex.
2418 (Set_Is_Existing_Predecessor_Successor_Relation): Removed.
2419 (Set_Is_Recorded_Cycle, Set_Is_Recorded_Edge,
2420 Set_LGC_Attributes, Spec_Vertex, Trace_Cycle, Trace_Edge,
2421 Trace_Eol, Trace_Vertex): New routines.
2422 * bindo-graphs.ads: Add with and use clauses for Types and
2423 GNAT.Lists. Update the parameter profiles of most routines to
2424 use better parameter names. Update the implementation of most
2425 routine to use the new parameter names. Add the new
2426 instantiated data structures IGE_Lists, IGV_Sets, LGC_Lists,
2427 LGE_Lists, LGE_Sets, LGV_Sets, and RC_Sets. Add new type
2428 Library_Graph_Cycle_Id along with an empty and initial value.
2429 Remove component Lib_Vertex and add new components Body_Vertex
2430 and Spec_Vertex to type Invocation_Graph_Vertex_Attributes. Add
2431 new type Library_Graph_Cycle_Kind. Add new iterators
2432 All_Cycle_Iterator and Edges_Of_Cycle_Iterator. Add new type
2433 Library_Graph_Cycle_Attributes. Add new components
2434 Cycle_Attributes, Cycles, and Dynamically_Elaborated to type
2435 Library_Graph_Attributes.
2436 (Body_Vertex, Column, Destroy_Invocation_Graph_Edge,
2437 Destroy_Library_Graph_Cycle_Attributes,
2438 Destroy_Library_Graph_Edge, Extra, File_Name, Find_Cycles,
2439 Has_Elaborate_All_Cycle, Has_Next, Hash_Library_Graph_Cycle,
2440 Hash_Library_Graph_Cycle_Attributes, Highest_Precedence_Cycle,
2441 In_Same_Component, Invocation_Edge_Count,
2442 Invocation_Graph_Encoding, Is_Dynamically_Elaborated,
2443 Is_Elaborate_All_Edge, Is_Elaborate_Body_Edge,
2444 Is_Elaborate_Edge, Is_Forced_Edge, Is_Invocation_Edge,
2445 Is_With_Edge, Iterate_All_Cycles, Iterate_Edges_Of_Cycle, Kind):
2446 New routines.
2447 (Length, Lib_Vertex, (Line, Next, Number_Of_Cycles, Present,
2448 Same_Library_Graph_Cycle_Attributes, Spec_Vertex): New routines.
2449 * bindo-units.adb (File_Name, Invocation_Graph_Encoding): New
2450 routines.
2451 * bindo-units.ads: Add new instantiated data structure
2452 Unit_Sets.
2453 (File_Name, Invocation_Graph_Encoding): New routine.
2454 * bindo-validators.adb: Remove with and use clauses for GNAT and
2455 GNAT.Sets. Remove membership set US. Update the parameter
2456 profiles of most routines to use better parameter names. Update
2457 the implementation of most routine to use the new parameter
2458 names.
2459 (Validate_Cycle, Validate_Cycle_Path, Validate_Cycles,
2460 Validate_Invocation_Graph_Vertex): Remove the validation of
2461 component Lib_Vertex. Add the validation of components
2462 Body_Vertex and Spec_Vertex.
2463 (Write_Error): New routine.
2464 * bindo-validators.ads (Validate_Cycles): New routine.
2465 * bindo-writers.adb: Update the parameter profiles of most
2466 routines to use better parameter names. Update the
2467 implementation of most routine to use the new parameter names.
2468 (Write_Cycle, Write_Cyclic_Edge, Write_Cycles): New routines.
2469 (Write_Invocation_Graph_Vertex): Remove the output of component
2470 Lib_Vertex. Add the output of components Body_Vertex and
2471 Spec_Vertex.
2472 * bindo-writers.ads (Write_Cycles): New routine.
2473 * debug.adb: Use binder switches -d_C and -d_P, add
2474 documentation on their usage.
2475 * gnatbind.adb: Remove with and use clauses for Binde. Delegate
2476 the choice of elaboration mechanism to Bindo.
2477 * lib-writ.adb (Column, Extra, Invoker, Kind, Line, Locations,
2478 Name, Placement, Scope, Signature, Target): Removed.
2479 (Write_Invocation_Graph): Moved at the top level.
2480 (Write_Invocation_Graph_Attributes): New routine.
2481 (Write_Invocation_Relation, Write_Invocation_Signature): Moved
2482 at the top level.
2483 * lib-writ.ads: Add a documentation section on invocation graph
2484 attributes.
2485 * sem_elab.adb (Body_Placement_Of): New routine.
2486 (Declare_Invocation_Construct): Update the call to
2487 Add_Invocation_Construct.
2488 (Declaration_Placement_Of_Node): New routine.
2489 (Get_Invocation_Attributes): Correct the retrieval of the
2490 enclosing subprogram where the postcondition procedure lives.
2491 (Placement_Of, Placement_Of_Node): Removed.
2492 (Record_Invocation_Graph): Record the encoding format used.
2493 (Record_Invocation_Graph_Encoding): New routine.
2494 (Record_Invocation_Relation): Update the call to
2495 Add_Invocation_Relation.
2496 (Spec_Placement_Of): Removed.
2497 * libgnat/g-lists.ads, libgnat/g-lists.adb (Equal): New routine.
2498
2499 2019-07-05 Ed Schonberg <schonberg@adacore.com>
2500
2501 * checks.adb (Apply_Predicate_Check): Except within the
2502 subprogram body that defines the formal, do not apply predicate
2503 check on a formal IN parameter: such a check is redundant and
2504 its expansion can lead to out-of-scope references when it is
2505 originates in a function call in a precondition,
2506
2507 2019-07-05 Yannick Moy <moy@adacore.com>
2508
2509 * sem_res.adb (Resolve_Call): Cannot inline in quantified
2510 expressions.
2511 * sem_util.adb, sem_util.ads (In_Quantified_Expression): New
2512 function.
2513
2514 2019-07-05 Bob Duff <duff@adacore.com>
2515
2516 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
2517 Fix typo.
2518 * gnat_rm.texi: Regenerate.
2519
2520 2019-07-05 Bob Duff <duff@adacore.com>
2521
2522 * exp_attr.adb (Input): Take the No_Stream_Optimizations
2523 restriction into account.
2524
2525 2019-07-05 Claire Dross <dross@adacore.com>
2526
2527 * libgnat/a-cofove.ads, libgnat/a-cofove.adb: Definite formal
2528 vectors are now always bounded so that they do not need to be
2529 limited anymore.
2530
2531 2019-07-05 Dmitriy Anisimkov <anisimko@adacore.com>
2532
2533 * libgnat/g-traceb.ads, libgnat/g-traceb.adb (Call_Chain): New
2534 function.
2535
2536 2019-07-04 James Clarke <jrtc27@debian.org>
2537
2538 * libgnarl/s-osinte__kfreebsd-gnu.ads (clockid_t): Make type
2539 definition public.
2540 (CLOCK_REALTIME): Make value public.
2541
2542 2019-07-04 Javier Miranda <miranda@adacore.com>
2543
2544 * exp_tss.adb (Init_Proc): Adding missing support for access to
2545 subprograms and access to protected subprograms of non-default
2546 C++ constructors.
2547
2548 2019-07-04 Eric Botcazou <ebotcazou@adacore.com>
2549
2550 * gnat1drv.adb (Adjust_Global_Switches): Use proper interface to
2551 set the validity settings in CodePeer mode.
2552 * par-load.adb (Load): Remove all code dealing with validity
2553 settings.
2554 * validsw.ads (Validity_Check_Copies): Alphabetize.
2555 * validsw.adb (Reset_Validity_Check_Options): Set all options to
2556 off.
2557 (Save_Validity_Check_Options): Save all options.
2558
2559 2019-07-04 Hristian Kirtchev <kirtchev@adacore.com>
2560
2561 * exp_ch3.adb, exp_ch4.adb, exp_ch4.ads, exp_ch5.adb,
2562 exp_ch7.adb, exp_ch9.adb, exp_ch11.adb, exp_unst.adb,
2563 rtsfind.ads, sem_attr.adb, sem_ch10.adb, sem_ch12.adb,
2564 sem_ch13.adb, sem_dim.adb, sem_disp.adb, xref_lib.adb: Minor
2565 reformatting.
2566
2567 2019-07-04 Joffrey Huguet <huguet@adacore.com>
2568
2569 * libgnarl/a-taside.ads: Add assertion policy to ignore
2570 preconditions.
2571 (Abort_Task, Is_Terminated, Is_Callable): Add preconditions.
2572
2573 2019-07-04 Eric Botcazou <ebotcazou@adacore.com>
2574
2575 * doc/gnat_rm/implementation_defined_pragmas.rst: Fix
2576 capitalization and parenthesis glitches.
2577 * gnat_rm.texi: Regenerate.
2578
2579 2019-07-04 Ed Schonberg <schonberg@adacore.com>
2580
2581 * sem_ch10.adb (Remove_Context_Clauses): Handle properly the
2582 removal of a limited_with_clause which appears in the library
2583 unit oF the main unit, when some other unit in the context has a
2584 regular with_clause on the same unit, to prevent spurious
2585 visibility errors in the subsequent analysis of pending instance
2586 bodies.
2587
2588 2019-07-04 Hristian Kirtchev <kirtchev@adacore.com>
2589
2590 * sem_elab.adb: Add new type Elaboration_Phase_Status along with
2591 a global to keep track of the elaboration phase status.
2592 Initialize all internal data structures to Nil for services
2593 Elaborated_Units, Internal_Representation, and Scenario_Storage.
2594 (Build_Call_Marker): Do not create a call marker when the
2595 elaboration phase is not active.
2596 (Build_Variable_Reference_Marker): Do not create a call marker
2597 when the elaboration phase is not active.
2598 (Check_Elaboration_Scenarios): Destroy all internal structures
2599 when the elaboration phase does not have to run. Do not execute
2600 when the elaboration phase is not active.
2601 (Elaboration_Phase_Active): New routine.
2602 (Finalize_All_Data_Structures): New routine.
2603 (Initialize): Initialize all internal data structures and signal
2604 that the elaboration phase has started.
2605 (Initialize_All_Data_Structures): New routine.
2606 (Initialize_Elaborated_Units): Initialize all internal data
2607 structures.
2608 (Initialize_Internal_Representation): Initialize all internal
2609 data structures.
2610 (Initialize_Scenario_Storage): Initialize all internal data
2611 structures.
2612 (Kill_Elaboration_Scenario): Do not execute when the elaboration
2613 phase is not active.
2614 (Set_Elaboration_Phase): New routine.
2615 (Update_Elaboration_Scenario): Do not execute when the
2616 elaboration phase is not active.
2617
2618 2019-07-04 Gary Dismukes <dismukes@adacore.com>
2619
2620 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The special
2621 treatment of calling Mask_Unfrozen_Types must also be done in
2622 the case of an Ignored_Ghost_Entity, because Expander_Active is
2623 False in that case.
2624
2625 2019-07-04 Yannick Moy <moy@adacore.com>
2626
2627 * sem_prag.adb (Check_Library_Level_Entity): Update for new rule
2628 on SPARK_Mode.
2629
2630 2019-07-04 Justin Squirek <squirek@adacore.com>
2631
2632 * sem_disp.adb (Check_Controlling_Formals): Obtain the full view
2633 before type comparison.
2634
2635 2019-07-04 Ed Schonberg <schonberg@adacore.com>
2636
2637 * exp_ch4.ads, exp_ch4.adb (Build_Eq_Call): New visible
2638 subprogram, extracted from Expand_Composite_Equality, to handle
2639 properly the composition of equality for variant record types.
2640 * exp_ch3.adb (MAke_Eq_If): Use Build_Eq_Call for each
2641 component, to handle properly the case of a component with a
2642 user-defined equality. Revert to predefined equality if the
2643 user-defined operation is abstract, to maintain compatibility
2644 with older versions,
2645
2646 2019-07-04 Justin Squirek <squirek@adacore.com>
2647
2648 * exp_ch3.adb (Build_Initialization_Call): Fixup
2649 *_skip_null_excluding_check argument to handle new default.
2650 (Init_Formals): Make *_skip_null_excluding_check formal default
2651 to False
2652 * exp_ch4.adb (Expand_N_Allocator): Add comment to note heavy
2653 code duplication
2654
2655 2019-07-04 Bob Duff <duff@adacore.com>
2656
2657 * sem_ch3.adb (Access_Definition): Do not create a master unless
2658 Tasking_Allowed. Otherwise, this fails on restricted runtimes.
2659
2660 2019-07-04 Hristian Kirtchev <kirtchev@adacore.com>
2661
2662 * sem_util.adb (Propagate_DIC_Attributes): Do not propagate the
2663 Default_Initial_Condition attributes to an incomplete type.
2664
2665 2019-07-04 Ed Schonberg <schonberg@adacore.com>
2666
2667 * sem_attr.adb (Check_Array_Type): An array type attribute such
2668 as 'First can be applied to an unconstrained array tyope when
2669 the attribute reference appears within an aspect specification
2670 and the prefix is a current instance, given that the prefix of
2671 the attribute will become a formal of the subprogram that
2672 implements the aspect (typically a predicate check).
2673
2674 2019-07-04 Piotr Trojanek <trojanek@adacore.com>
2675
2676 * sem_util.adb (Yields_Synchronized_Object): Fix typos in
2677 comments.
2678
2679 2019-07-04 Yannick Moy <moy@adacore.com>
2680
2681 * sem_util.adb (Yields_Synchronized_Object): Adapt to new SPARK
2682 rule.
2683
2684 2019-07-04 Yannick Moy <moy@adacore.com>
2685
2686 * sem_spark.adb (Check_Statement): Only check permission of
2687 object in extended return when it is of a deep type.
2688
2689 2019-07-04 Justin Squirek <squirek@adacore.com>
2690
2691 * sem_ch12.adb (Perform_Appropriate_Analysis): Added for
2692 selecting which type of analysis based on wheither the
2693 instantiation is a generic at the library-level. In which case
2694 expansion during analysis.
2695 (Preanalyze_Actuals): Modify calls to Analyze to use the new
2696 routine.
2697
2698 2019-07-04 Ed Schonberg <schonberg@adacore.com>
2699
2700 * exp_unst.adb: Handle conditional expressions.
2701
2702 2019-07-04 Yannick Moy <moy@adacore.com>
2703
2704 * sem_spark.adb (Check_Package_Spec, Check_Package_Body): Only
2705 analyze parts of the code marked in SPARK.
2706
2707 2019-07-04 Hristian Kirtchev <kirtchev@adacore.com>
2708
2709 * erroutc.adb, exp_aggr.adb, inline.adb, opt.adb, sem_ch3.adb:
2710 Minor reformatting.
2711
2712 2019-07-04 Yannick Moy <moy@adacore.com>
2713
2714 * sem_spark.adb (Explanation, Get_Expl): New functions to get
2715 the explanation for a permission mismatch.
2716 (Perm_Error, Perm_Mismatch, Perm_Error_Loop_Exit): Take
2717 explanation into account for issuing a more precise error
2718 message.
2719 (Set_Perm_Prefixes, Set_Perm_Extensions,
2720 Set_Perm_Extensions_Move): Pass suitable argument for the
2721 explanation node.
2722
2723 2019-07-04 Arnaud Charlet <charlet@adacore.com>
2724
2725 * exp_aggr.adb (In_Place_Assign_OK): Moved to top level and add
2726 support for record aggregates.
2727 (Component_Check): Use Is_CCG_Supported_Aggregate instead of a
2728 similar local predicate.
2729 (Convert_To_Assignments): Take advantage of In_Place_Assign_OK
2730 predicate when possible.
2731 (Is_CCG_Supported_Aggregate): Return False for records with
2732 representation clauses and fix the logic for dealing with nested
2733 aggregates.
2734
2735 2019-07-04 Piotr Trojanek <trojanek@adacore.com>
2736
2737 * opt.adb (Set_Config_Switches): Keep assertions policy as
2738 enabled when analysing internal units in GNATprove mode.
2739
2740 2019-07-04 Arnaud Charlet <charlet@adacore.com>
2741
2742 * exp_ch4.adb (Expand_Short_Circuit_Operator): Strip
2743 N_Variable_Reference_Marker when checking for the presence of
2744 actions.
2745
2746 2019-07-04 Arnaud Charlet <charlet@adacore.com>
2747
2748 * exp_aggr.adb (Check_Component): Take into account type
2749 conversions.
2750
2751 2019-07-04 Dmitriy Anisimkov <anisimko@adacore.com>
2752
2753 * doc/gnat_ugn/platform_specific_information.rst: Document
2754 Windows socket timeout particularity.
2755 * gnat_ugn.texi: Regenerate.
2756 * gsocket.h: Include versionhelpers.h.
2757 * socket.c (__gnat_minus_500ms): New function.
2758 * libgnat/g-sothco.ads (Minus_500ms_Windows_Timeout): New
2759 imported function.
2760 * libgnat/g-socket.adb (Set_Socket_Option): Refactor to remove
2761 500ms from the requested timeout only on old Windows version.
2762
2763 2019-07-04 Thomas Quinot <quinot@adacore.com>
2764
2765 * get_scos.adb: Remove bogus, dead code.
2766
2767 2019-07-04 Ed Schonberg <schonberg@adacore.com>
2768
2769 * sem_dim.adb (Analyze_Dimension_Array_Aggregate): If the
2770 component is an entity name, its dimensions are those of its
2771 type.
2772
2773 2019-07-03 Bob Duff <duff@adacore.com>
2774
2775 * doc/gnat_ugn/gnat_utility_programs.rst: Document new flags in
2776 GNATpp.
2777
2778 2019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
2779
2780 * binde.adb: Remove with clause for System.OS_Lib.
2781 (Force_Elab_Order): Refactor the majority of the code in Butil.
2782 Use the new forced units iterator to obtain unit names.
2783 * bindo-builders.adb: Add with and use clauses for Binderr,
2784 Butil, Opt, Output, Types, GNAT, and GNAT.Dynamic_HTables. Add
2785 a hash table which maps units to line number in the forced
2786 elaboration order file.
2787 (Add_Unit): New routine.
2788 (Build_Library_Graph): Create forced edges between pairs of
2789 units listed in the forced elaboration order file.
2790 (Create_Forced_Edge, Create_Forced_Edges, Destroy_Line_Number,
2791 Duplicate_Unit_Error, Hash_Unit, Internal_Unit_Info,
2792 Is_Duplicate_Unit, Missing_Unit_Info): New routines.
2793 * bindo-graphs.adb (Is_Internal_Unit, Is_Predefined_Unit):
2794 Refactor some of the behavior to Bindo-Units.
2795 * bindo-graphs.ads: Enable the enumeration literal for forced
2796 edges.
2797 * bindo-units.adb, bindo-units.ads (Is_Internal_Unit,
2798 Is_Predefined_Unit): New routines.
2799 * butil.adb: Add with and use clauses for Opt, GNAT, and
2800 System.OS_Lib. Add with clause for Unchecked_Deallocation.
2801 (Has_Next, Iterate_Forced_Units, Next, Parse_Next_Unit_Name,
2802 Read_Forced_Elab_Order_File): New routines.
2803 * butil.ads: Add with and use clauses for Types. Add new
2804 iterator over the units listed in the forced elaboration order
2805 file.
2806 (Has_Next, Iterate_Forced_Units, Next): New routine.
2807 * namet.adb, namet.ads (Present): New routine.
2808
2809 2019-07-03 Bob Duff <duff@adacore.com>
2810
2811 * sem_ch3.adb (Access_Definition): The code was creating a
2812 master in the case where the designated type is a class-wide
2813 interface type. Create a master in the noninterface case as
2814 well. That is, create a master for all limited class-wide types.
2815
2816 2019-07-03 Yannick Moy <moy@adacore.com>
2817
2818 * erroutc.adb (Sloc_In_Range): New function to determine whether
2819 the range of a pragma Warnings covers a location, taking
2820 instantiations into account.
2821
2822 2019-07-03 Johannes Kanig <kanig@adacore.com>
2823
2824 * osint.ads, osint.adb (Get_First_Main_File_Name): New routine
2825 to access the first file provided on the command line.
2826
2827 2019-07-03 Ed Schonberg <schonberg@adacore.com>
2828
2829 * inline.adb (Process_Formals_In_Aspects): New procedure within
2830 Expand_Inlined_Call, to perform a replacement of references to
2831 formals that appear in aspect specifications within the body
2832 being inlined.
2833
2834 2019-07-03 Justin Squirek <squirek@adacore.com>
2835
2836 * sem_ch8.adb (Analyze_Object_Renaming): Add call to search for
2837 the appropriate actual subtype of the object renaming being
2838 analyzed.
2839 (Check_Constrained_Object): Minor cleanup.
2840
2841 2019-07-03 Yannick Moy <moy@adacore.com>
2842
2843 * sem_spark.adb (Get_Observed_Or_Borrowed_Expr): New function to
2844 return go through traversal function call.
2845 (Check_Type): Consistently use underlying type.
2846 (Get_Perm): Adapt for case of elaboration code where variables
2847 are not declared in the environment. Remove incorrect handling
2848 of borrow and observe.
2849
2850 2019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
2851
2852 * inline.adb (Build_Return_Object_Formal): New routine.
2853 (Can_Split_Unconstrained_Function): Code clean up.
2854 (Copy_Formals,Copy_Return_Object): New routines.
2855 (Split_Unconstrained_Function): Code clean up and refactoring.
2856
2857 2019-07-03 Gary Dismukes <dismukes@adacore.com>
2858
2859 * bindo-augmentors.adb, bindo-augmentors.ads,
2860 bindo-builders.ads, bindo-elaborators.adb, sem_ch12.adb,
2861 sem_ch13.adb, sem_spark.adb, sinfo.ads: Minor editorial
2862 corrections and reformatting.
2863
2864 2019-07-03 Bob Duff <duff@adacore.com>
2865
2866 * sem_warn.adb (Check_Infinite_Loop_Warning): Avoid the warning
2867 if an Iterator_Specification is present.
2868
2869 2019-07-03 Bob Duff <duff@adacore.com>
2870
2871 * doc/gnat_ugn/gnat_utility_programs.rst: Document default
2872 new-line behavior.
2873
2874 2019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
2875
2876 * ali.adb: Add with and use clauses for GNAT,
2877 GNAT.Dynamic_HTables, and Snames. Add a map from invocation
2878 signature records to invocation signature ids. Add various
2879 encodings of invocation-related attributes. Sort and update
2880 table Known_ALI_Lines.
2881 (Add_Invocation_Construct, Add_Invocation_Relation,
2882 Body_Placement_Kind_To_Code, Code_To_Body_Placement_Kind,
2883 Code_To_Invocation_Construct_Kind, Code_To_Invocation_Kind,
2884 Code_To_Invocation_Graph_Line_Kind, Destroy, Hash): New
2885 routines.
2886 (Initialize_ALI): Sort the initialization sequence. Add
2887 initialization for all invocation-related tables.
2888 (Invocation_Construct_Kind_To_Code,
2889 Invocation_Graph_Line_Kind_To_Code, Invocation_Kind_To_Code,
2890 Invocation_Signature_Of, Present): New routines.
2891 (Scan_ALI): Add the default values for invocation-related ids.
2892 Scan invocation graph lines.
2893 (Scan_Invocation_Graph_Line): New routine.
2894 * ali.ads: Add with clause for GNAT.Dynamic_Tables. Add types
2895 for invocation constructs, relations, and signatures. Add
2896 tables for invocation constructs, relations, and signatures.
2897 Update Unit_Record to capture invocation-related ids. Relocate
2898 table Unit_Id_Tables and subtypes Unit_Id_Table, Unit_Id_Array
2899 from Binde.
2900 (Add_Invocation_Construct, Add_Invocation_Relation,
2901 Body_Placement_Kind_To_Code, Code_To_Body_Placement_Kind,
2902 Code_To_Invocation_Construct_Kind, Code_To_Invocation_Kind,
2903 Code_To_Invocation_Graph_Line_Kind,
2904 Invocation_Construct_Kind_To_Code,
2905 Invocation_Graph_Line_Kind_To_Code, Invocation_Kind_To_Code,
2906 Invocation_Signature_Of, Present): New routines.
2907 * binde.adb: Add with and use clause for Types. Add use clause
2908 for ALI.Unit_Id_Tables;
2909 * binde.ads: Relocate table Unit_Id_Tables and subtypes
2910 Unit_Id_Table, Unit_Id_Array to ALI.
2911 * bindgen.adb: Remove with and use clause for ALI.
2912 * bindgen.ads: Remove with and use clause for Binde. Add with
2913 and use clause for ALI.
2914 * bindo.adb, bindo.ads, bindo-augmentors.adb,
2915 bindo-augmentors.ads, bindo-builders.adb, bindo-builders.ads,
2916 bindo-diagnostics.adb, bindo-diagnostics.ads,
2917 bindo-elaborators.adb, bindo-elaborators.ads, bindo-graphs.adb,
2918 bindo-graphs.ads, bindo-units.adb, bindo-units.ads,
2919 bindo-validators.adb, bindo-validators.ads, bindo-writers.adb,
2920 bindo-writers.ads: New units.
2921 * debug.adb: Use and describe GNAT debug switches -gnatd_F and
2922 -gnatd_G. Add GNATbind debug switches in the ranges dA .. dZ,
2923 d.a .. d.z, d.A .. d.Z, d.1 .. d.9, d_a .. d_z, d_A .. d_Z, and
2924 d_1 .. d_9. Use and describe GNATbind debug switches -d_A,
2925 -d_I, -d_L, -d_N, -d_O, -d_T, and -d_V.
2926 * exp_util.adb, exp_util.ads (Exceptions_OK): Relocate to
2927 Sem_Util.
2928 * gnatbind.adb: Add with and use clause for Bindo. Use the new
2929 Bindo elaboration order only when -d_N is in effect.
2930 * lib-writ.adb
2931 (Column, Extra, Invoker, Kind, Line, Locations, Name, Placement,
2932 Scope, Signature, Target): New routines.
2933 (Write_ALI): Output all invocation-related data.
2934 (Write_Invocation_Graph): New routine.
2935 * lib-writ.ads: Document the invocation graph ALI line.
2936 * namet.adb, namet.ads (Present): New routines.
2937 * sem_ch8.adb (Find_Direct_Name): Capture the status of
2938 elaboration checks and warnings of an identifier.
2939 (Find_Expanded_Name): Capture the status of elaboration checks
2940 and warnings of an expanded name.
2941 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Ensure
2942 that invocation graph-related data within the body of the main
2943 unit is encoded in the ALI file.
2944 (Analyze_Generic_Subprogram_Declaration): Ensure that invocation
2945 graph-related data within the body of the main unit is encoded
2946 in the ALI file.
2947 (Analyze_Package_Instantiation): Perform minimal decoration of
2948 the instance entity.
2949 (Analyze_Subprogram_Instantiation): Perform minimal decoration
2950 of the instance entity.
2951 * sem_elab.adb: Perform heavy refactoring of all code. The unit
2952 is now split into "services" which specialize in one area of ABE
2953 checks. Add processing in order to capture invocation-graph
2954 related attributes of the main unit, and encode them in the ALI
2955 file. The Processing phase can now operate in multiple modes,
2956 all described by type Processing_Kind. Scenarios and targets
2957 are now distinct at the higher level, and carry their own
2958 representations. This eliminates the need to constantly
2959 recompute their attributes, and offers the various processors a
2960 uniform interface. The various initial states of the Processing
2961 phase are now encoded using type Processing_In_State, and
2962 xxx_State constants.
2963 * sem_elab.ads: Update the literals of type
2964 Enclosing_Level_Kind. Add Inline pragmas on several routines.
2965 * sem_prag.adb (Process_Inline): Ensure that invocation
2966 graph-related data within the body of the main unit is encoded
2967 in the ALI file.
2968 * sem_util.adb (Enclosing_Generic_Body, Enclosing_Generic_Unit):
2969 Code clean up.
2970 (Exceptions_OK): Relocated from Sem_Util.
2971 (Mark_Save_Invocation_Graph_Of_Body): New routine.
2972 * sem_util.ads (Exceptions_OK): Relocated from Sem_Util.
2973 (Mark_Save_Invocation_Graph_Of_Body): New routine.
2974 * sinfo.adb (Is_Elaboration_Checks_OK_Node): Now applicable to
2975 N_Variable_Reference_Marker.
2976 (Is_Elaboration_Warnings_OK_Node): Now applicable to
2977 N_Expanded_Name, N_Identifier, N_Variable_Reference_Marker.
2978 (Is_Read): Use Flag4.
2979 (Is_SPARK_Mode_On_Node): New applicable to
2980 N_Variable_Reference_Marker.
2981 (Is_Write): Use Flag5.
2982 (Save_Invocation_Graph_Of_Body): New routine.
2983 (Set_Is_Elaboration_Checks_OK_Node): Now applicable to
2984 N_Variable_Reference_Marker.
2985 (Set_Is_Elaboration_Warnings_OK_Node): Now applicable to
2986 N_Expanded_Name, N_Identifier, N_Variable_Reference_Marker.
2987 (Set_Is_SPARK_Mode_On_Node): New applicable to
2988 N_Variable_Reference_Marker.
2989 (Set_Save_Invocation_Graph_Of_Body): New routine.
2990 * sinfo.ads: Update the documentation of attributes
2991 Is_Elaboration_Checks_OK_Node, Is_Elaboration_Warnings_OK_Node,
2992 Is_SPARK_Mode_On_Node. Update the flag usage of attributes
2993 Is_Read, Is_Write. Add attribute Save_Invocation_Graph_Of_Body
2994 and update its occurrence in nodes.
2995 (Save_Invocation_Graph_Of_Body): New routine along with pragma
2996 Inline.
2997 (Set_Save_Invocation_Graph_Of_Body): New routine along with
2998 pragma Inline.
2999 * switch-b.adb (Scan_Binder_Switches): Refactor the scanning of
3000 debug switches.
3001 (Scan_Debug_Switches): New routine.
3002 * libgnat/g-dynhta.adb, libgnat/g-dynhta.ads (Contains): New routine.
3003 * libgnat/g-graphs.adb (Associate_Vertices): Update the use of
3004 Component_Vertex_Iterator.
3005 (Contains_Component, Contains_Edge, Contains_Vertex, Has_Next):
3006 Reimplemented.
3007 (Iterate_Component_Vertices): New routine.
3008 (Iterate_Vertices): Removed.
3009 (Next): Update the parameter profile.
3010 (Number_Of_Component_Vertices, Number_Of_Outgoing_Edges): New
3011 routines.
3012 * libgnat/g-graphs.ads: Update the initialization of
3013 No_Component. Add type Component_Vertex_Iterator. Remove type
3014 Vertex_Iterator.
3015 (Has_Next): Add new versions and remove old ones.
3016 (Iterate_Component_Vertices): New routine.
3017 (Iterate_Vertices): Removed.
3018 (Next): Add new versions and remove old ones.
3019 (Number_Of_Component_Vertices, Number_Of_Outgoing_Edges): New
3020 routines.
3021 * libgnat/g-sets.adb (Contains): Reimplemented.
3022 * gcc-interface/Make-lang.in (GNATBIND_OBJS): Add
3023 GNAT.Dynamic_HTables, GNAT.Graphs and Bindo units.
3024 * rtsfind.ads: Remove extra space.
3025
3026 2019-07-03 Yannick Moy <moy@adacore.com>
3027
3028 * sem_spark.adb: Add support for locally borrowing and observing
3029 a path.
3030 (Get_Root_Object): Add parameter Through_Traversal to denote
3031 when we are interesting in getting to the traversed parameter.
3032 (Is_Prefix_Or_Almost): New function to support detection of
3033 illegal access to borrowed or observed paths.
3034 (Check_Pragma): Add analysis of assertion pragmas.
3035
3036 2019-07-03 Ed Schonberg <schonberg@adacore.com>
3037
3038 * sem_ch13.adb (Build_Predicate_Functions): In a generic context
3039 we do not build the bodies of predicate fuctions, but the
3040 expression in a static predicate must be elaborated to allow
3041 case coverage checking within the generic unit.
3042 (Build_Discrete_Static_Predicate): In a generic context, return
3043 without building function body once the
3044 Static_Discrete_Predicate expression for the type has been
3045 constructed.
3046
3047 2019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
3048
3049 * bindgen.adb, inline.adb, layout.adb, sem_ch12.adb,
3050 sem_ch13.adb, sem_ch7.adb, styleg.adb: Minor reformatting.
3051
3052 2019-07-03 Bob Duff <duff@adacore.com>
3053
3054 * par-ch3.adb (P_Defining_Identifier): Call
3055 Check_Defining_Identifier_Casing.
3056 * style.ads, styleg.ads, styleg.adb
3057 (Check_Defining_Identifier_Casing): New procedure to check for
3058 mixed-case defining identifiers.
3059 * stylesw.ads, stylesw.adb (Style_Check_Mixed_Case_Decls): New
3060 flag for checking for mixed-case defining identifiers.
3061 * doc/gnat_ugn/building_executable_programs_with_gnat.rst:
3062 Document new feature.
3063 * gnat_ugn.texi: Regenerate.
3064
3065 2019-07-03 Eric Botcazou <ebotcazou@adacore.com>
3066
3067 * doc/gnat_ugn/building_executable_programs_with_gnat.rst
3068 (Warning message control): Document that -gnatw.z/Z apply to
3069 array types.
3070 * freeze.adb (Freeze_Entity): Give -gnatw.z warning for array
3071 types as well, but not if the specified alignment is the minimum
3072 one.
3073 * gnat_ugn.texi: Regenerate.
3074
3075 2019-07-03 Bob Duff <duff@adacore.com>
3076
3077 * einfo.ads, exp_util.adb, layout.ads, sinfo.ads: Spell "laid"
3078 correctly.
3079
3080 2019-07-03 Ed Schonberg <schonberg@adacore.com>
3081
3082 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): No error
3083 message on attribute applied to a renaming when the renamed
3084 object is an aggregate (from code reading).
3085 (Check_Aspect_At_End_Of_Declarations): In a generic context
3086 where freeze nodes are not generated, the original expression
3087 for an aspect may need to be analyzed to precent spurious
3088 conformance errors when compared with the expression that is
3089 anakyzed at the end of the current declarative list.
3090
3091 2019-07-03 Eric Botcazou <ebotcazou@adacore.com>
3092
3093 * layout.adb (Layout_Type): Do not set the component size of an
3094 array with a scalar component if the component type is
3095 overaligned.
3096
3097 2019-07-03 Ed Schonberg <schonberg@adacore.com>
3098
3099 * inline.adb (Make_Loop_Labels_Unique): New procedure to modify
3100 the source code of subprograms that are inlined by the
3101 front-end, to prevent accidental duplication between loop labels
3102 in the inlined code and the code surrounding the inlined call.
3103
3104 2019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
3105
3106 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update
3107 the section on resolving elaboration circularities to eliminate
3108 certain combinations of switches which together do not produce
3109 the desired effect and confuse users.
3110 * gnat_ugn.texi: Regenerate.
3111
3112 2019-07-03 Arnaud Charlet <charlet@adacore.com>
3113
3114 * bindgen.adb (Gen_Main): Disable generation of reference to
3115 Ada_Main_Program_Name for CCG.
3116 * bindusg.adb (Display): Add -G to the command-line usage for
3117 gnatbind.
3118 * opt.ads (Generate_C_Code): Update comment.
3119 * switch-b.adb (Scan_Binder_Switches): Add handling for -G.
3120
3121 2019-07-03 Arnaud Charlet <charlet@adacore.com>
3122
3123 * sem_ch7.adb (Has_Referencer): Do not consider inlined
3124 subprograms when generating C code, which allows us to generate
3125 static inline subprograms.
3126
3127 2019-07-03 Justin Squirek <squirek@adacore.com>
3128
3129 * sem_ch6.adb (Check_Conformance): Add expression checking for
3130 constant modifiers in anonymous access types (in addition to
3131 "non-null" types) so that they are considered "matching" for
3132 subsequent conformance tests.
3133
3134 2019-07-03 Arnaud Charlet <charlet@adacore.com>
3135
3136 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
3137 Clarify wording on No_Multiple_Elaboration.
3138 * gnat_rm.texi: Regenerate.
3139
3140 2019-07-03 Ed Schonberg <schonberg@adacore.com>
3141
3142 * sem_ch8.adb (Find_Selected_Component): If the prefix is the
3143 current instance of a type or subtype, complete the resolution
3144 of the name by finding the component of the type denoted by the
3145 selector name.
3146
3147 2019-07-03 Eric Botcazou <ebotcazou@adacore.com>
3148
3149 * doc/gnat_rm/interfacing_to_other_languages.rst (Interfacing to C):
3150 Document that boolean types with convention C now map to C99 bool.
3151 * gnat_rm.texi: Regenerate.
3152
3153 2019-07-03 Javier Miranda <miranda@adacore.com>
3154
3155 * exp_attr.adb (Expand_Min_Max_Attribute): Code cleanup:
3156 removing code that it is now never executed in the CCG compiler
3157 (dead code).
3158
3159 2019-07-02 Iain Sandoe <iain@sandoe.co.uk>
3160
3161 * libgnat/system-darwin-ppc.ads: Set Stack_Check_Probes True for
3162 PPC Darwin.
3163
3164 2019-07-01 Ed Schonberg <schonberg@adacore.com>
3165
3166 * sem_ch12.adb (Is_Defaulted): New predicate in
3167 Check_Formal_Package_Intance, to skip the conformance of checks
3168 on parameters of a formal package that are defaulted,
3169
3170 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
3171
3172 * checks.adb, exp_ch9.adb, exp_unst.adb, sem_ch4.adb,
3173 sem_prag.adb, sem_spark.adb: Minor reformatting.
3174
3175 2019-07-01 Ed Schonberg <schonberg@adacore.com>
3176
3177 * sem_attr.adb (Analyze_Attribute, case Enum_Rep): Allow prefix
3178 of attribute to be an attribute reference of a discrete type.
3179
3180 2019-07-01 Eric Botcazou <ebotcazou@adacore.com>
3181
3182 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Move up
3183 handling of Has_Pragma_Inline_Always and deal with
3184 Has_Pragma_No_Inline.
3185
3186 2019-07-01 Ed Schonberg <schonberg@adacore.com>
3187
3188 * sem_ch3.adb (Build_Derived_Record_Type): If the parent type is
3189 declared as a subtype of a private type with an inherited
3190 discriminant constraint, its generated full base appears as a
3191 record subtype, so we need to retrieve its oen base type so that
3192 the inherited constraint can be applied to it.
3193
3194 2019-07-01 Yannick Moy <moy@adacore.com>
3195
3196 * sem_spark.adb: Completely rework the algorithm for ownership
3197 checking, as the rules in SPARK RM have changed a lot.
3198 * sem_spark.ads: Update comments.
3199
3200 2019-07-01 Dmitriy Anisimkov <anisimko@adacore.com>
3201
3202 * gsocket.h (Has_Sockaddr_Len): Use the offset of sin_family offset in
3203 the sockaddr_in structure to determine the existence of length field
3204 before the sin_family.
3205
3206 2019-07-01 Ed Schonberg <schonberg@adacore.com>
3207
3208 * sem_prag.adb (Analyze_Pragma, case Weak_External): Pragma only
3209 applies to entities with run-time addresses, not to types.
3210
3211 2019-07-01 Piotr Trojanek <trojanek@adacore.com>
3212
3213 * einfo.adb, sem_ch7.adb, sem_prag.adb, sem_util.adb: Update
3214 references to the SPARK RM after the removal of Rule 7.1.4(5).
3215
3216 2019-07-01 Piotr Trojanek <trojanek@adacore.com>
3217
3218 * sysdep.c: Cleanup references to LynuxWorks in docs and
3219 comments.
3220
3221 2019-07-01 Ed Schonberg <schonberg@adacore.com>
3222
3223 * checks.adb (Insert_Valid_Check): Do not apply validity check
3224 to variable declared within a protected object that uses the
3225 Lock_Free implementation, to prevent unwarranted constant
3226 folding, because entities within such an object msut be treated
3227 as volatile.
3228
3229 2019-07-01 Eric Botcazou <ebotcazou@adacore.com>
3230
3231 * exp_ch9.adb (Check_Inlining): Deal with Has_Pragma_No_Inline.
3232
3233 2019-07-01 Ed Schonberg <schonberg@adacore.com>
3234
3235 * exp_unst.adb (Visit_Node, Check_Static_Type): Improve the
3236 handling of private and incomplete types whose full view is an
3237 access type, to detect additional uplevel references in dynamic
3238 bounds. This is relevant to N_Free_Statement among others that
3239 manipulate types whose full viww may be an access type.
3240
3241 2019-07-01 Pat Rogers <rogers@adacore.com>
3242
3243 * doc/gnat_rm/representation_clauses_and_pragmas.rst: Correct
3244 size indicated for R as a component of an array.
3245 * gnat_rm.texi: Regenerate.
3246
3247 2019-07-01 Justin Squirek <squirek@adacore.com>
3248
3249 * libgnat/s-win32.ads: Add definition for ULONG, modify
3250 OVERLAPPED type, and add appropriate pragmas.
3251
3252 2019-07-01 Bob Duff <duff@adacore.com>
3253
3254 * gnat1drv.adb (gnat1drv): Call Write_ALI if the main unit is
3255 ignored-ghost.
3256
3257 2019-07-01 Yannick Moy <moy@adacore.com>
3258
3259 * sem_ch4.adb (Operator_Check): Refine error message.
3260
3261 2019-07-01 Piotr Trojanek <trojanek@adacore.com>
3262
3263 * libgnat/a-calend.ads: Revert "Global => null" contracts on
3264 non-pure routines.
3265
3266 2019-07-01 Piotr Trojanek <trojanek@adacore.com>
3267
3268 * exp_attr.adb, libgnat/g-graphs.ads: Fix typos in comments:
3269 componant -> component.
3270
3271 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
3272
3273 * libgnat/g-graphs.adb: Use type Directed_Graph rather than
3274 Instance in various routines.
3275 * libgnat/g-graphs.ads: Change type Instance to Directed_Graph.
3276 Update various routines that mention the type.
3277
3278 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
3279
3280 * libgnat/g-sets.adb: Use type Membership_Set rathern than
3281 Instance in various routines.
3282 * libgnat/g-sets.ads: Change type Instance to Membership_Set.
3283 Update various routines that mention the type.
3284
3285 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
3286
3287 * libgnat/g-lists.adb: Use type Doubly_Linked_List rather than
3288 Instance in various routines.
3289 * libgnat/g-lists.ads: Change type Instance to
3290 Doubly_Linked_List. Update various routines that mention the
3291 type.
3292
3293 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
3294
3295 * libgnat/g-dynhta.adb: Use type Dynamic_Hash_Table rather than
3296 Instance in various routines.
3297 * libgnat/g-dynhta.ads: Change type Instance to
3298 Dynamic_Hash_Table. Update various routines that mention the
3299 type.
3300
3301 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
3302
3303 * exp_attr.adb, exp_ch7.adb, exp_unst.adb, sem_ch3.adb,
3304 sem_util.adb, uintp.adb, uintp.ads: Minor reformatting.
3305
3306 2019-07-01 Javier Miranda <miranda@adacore.com>
3307
3308 * exp_attr.adb (Expand_Min_Max_Attribute): Disable expansion of
3309 'Min/'Max on integer, enumeration, fixed point and floating
3310 point types since the CCG backend now provides in file
3311 standard.h routines to support it.
3312
3313 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
3314
3315 * impunit.adb: Add GNAT.Graphs to list Non_Imp_File_Names_95.
3316 * Makefile.rtl, gcc-interface/Make-lang.in: Register unit
3317 GNAT.Graphs.
3318 * libgnat/g-dynhta.adb: Various minor cleanups (use Present
3319 rather than direct comparisons).
3320 (Delete): Reimplement to use Delete_Node.
3321 (Delete_Node): New routine.
3322 (Destroy_Bucket): Invoke the provided destructor.
3323 (Present): New routines.
3324 * libgnat/g-dynhta.ads: Add new generic formal Destroy_Value.
3325 Use better names for the components of iterators.
3326 * libgnat/g-graphs.adb, libgnat/g-graphs.ads: New unit.
3327 * libgnat/g-lists.adb: Various minor cleanups (use Present
3328 rather than direct comparisons).
3329 (Delete_Node): Invoke the provided destructor.
3330 (Present): New routine.
3331 * libgnat/g-lists.ads: Add new generic formal Destroy_Element.
3332 Use better names for the components of iterators.
3333 (Present): New routine.
3334 * libgnat/g-sets.adb, libgnat/g-sets.ads (Destroy, Preset,
3335 Reset): New routines.
3336
3337 2019-07-01 Dmitriy Anisimkov <anisimko@adacore.com>
3338
3339 * libgnat/g-sothco.adb (Get_Address): Fix the case when AF_INET6
3340 is not defined.
3341
3342 2019-07-01 Ed Schonberg <schonberg@adacore.com>
3343
3344 * exp_attr.adb (Expand_Attribute_Reference, case Invalid_Value):
3345 Resolve result of call to Get_Simple_Init_Val, which may be a
3346 conversion of a literal.
3347
3348 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
3349
3350 * freeze.adb (Freeze_Expression): Remove the horrible useless
3351 name hiding of N. Insert the freeze nodes generated by the
3352 expression prior to the expression when the nearest enclosing
3353 scope is transient.
3354
3355 2019-07-01 Pierre-Marie de Rodat <derodat@adacore.com>
3356
3357 * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Fix
3358 formatting issues in the -gnatR section.
3359 * gnat_ugn.texi: Regenerate.
3360
3361 2019-06-30 Iain Sandoe <iain@sandoe.co.uk>
3362
3363 * gnatlink.adb (Link_Step): Remove duplicate -static-libgcc switches.
3364 Push -shared-libgcc explicitly, when it is the target default (unless
3365 overidden by the static flag).
3366 When the user has put an instance of shared/static-libgcc do not push
3367 a duplicate of this.
3368
3369 2019-06-29 Eric Botcazou <ebotcazou@adacore.com>
3370
3371 * gcc-interface/decl.c (gnat_to_gnu_entity): Beep up comment on SAVED,
3372 and tweak comment on the assertion about the scopes of Itypes. Do not
3373 skip the regular processing for Itypes that are E_Record_Subtype with
3374 a Cloned_Subtype. Get the Cloned_Subtype for every E_Record_Subtype
3375 if the type is dummy and hasn't got its own freeze node.
3376 <E_Record_Subtype>: Save again the DECL of the Cloned_Subtype, if any.
3377 <E_Access_Subtype>: Save again the DECL of the equivalent type.
3378 (Gigi_Equivalent_Type) <E_Access_Subtype>: New case.
3379
3380 2019-06-29 Eric Botcazou <ebotcazou@adacore.com>
3381
3382 * gcc-interface/utils.c (unchecked_convert): Tweak comment. Only skip
3383 dereferences when padding to have the same size on both sides. Do it
3384 for destination types with self-referential size too.
3385
3386 2019-06-29 Eric Botcazou <ebotcazou@adacore.com>
3387
3388 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: If the
3389 type requires strict alignment, then set the RM size to the type size.
3390 Rework handling of alignment and sizes of tagged types in ASIS mode.
3391 (validate_size): Rename local variable and remove special handling for
3392 strict-alignment types.
3393 * gcc-interface/utils.c (finish_record_type): Constify local variables
3394 and use properly typed constants.
3395
3396 2019-06-29 Eric Botcazou <ebotcazou@adacore.com>
3397
3398 * gcc-interface/decl.c (gnat_to_gnu_field): Rework error messages for
3399 fields requiring strict alignment, add explicit test on Storage_Unit
3400 for position and size, and mention type alignment for position.
3401
3402 2019-06-29 Eric Botcazou <ebotcazou@adacore.com>
3403
3404 * gcc-interface/trans.c (mark_visited_r): Set TYPE_SIZES_GIMPLIFIED on
3405 the main variant of a type, if any.
3406
3407 2019-06-29 Eric Botcazou <ebotcazou@adacore.com>
3408
3409 * gcc-interface/decl.c (set_nonaliased_component_on_array_type): Add
3410 missing guard for the presence of TYPE_CANONICAL.
3411 (set_reverse_storage_order_on_array_type): Likewise.
3412
3413 2019-06-29 Eric Botcazou <ebotcazou@adacore.com>
3414
3415 * gcc-interface/gigi.h (make_packable_type): Remove default value.
3416 (value_factor_p): Tweak prototype.
3417 * gcc-interface/decl.c (gnat_to_gnu_entity): Add comment.
3418 (gnat_to_gnu_component_type): Likewise.
3419 (gnat_to_gnu_field): Likewise. Fetch the position of the field earlier
3420 and simplify the condition under which the type is packed. Declare
3421 local variable is_bitfield. Pass 1 as max_align to make_packable_type
3422 if it is set to true.
3423 (copy_and_substitute_in_layout): Pass 0 to make_packable_type.
3424 * gcc-interface/utils.c (make_packable_array_type): New function.
3425 (make_packable_type): Use it to rewrite the type of array field.
3426 (maybe_pad_type): Pass align parameter to make_packable_type.
3427 (create_field_decl): Minor tweaks.
3428 (value_factor_p): Assert that FACTOR is a power of 2 and replace the
3429 modulo computation by a masking operation.
3430
3431 2019-06-25 Eric Botcazou <ebotcazou@adacore.com>
3432
3433 * gcc-interface/decl.c (gnat_to_gnu_entity): Remove superfluous test
3434 in previous change.
3435 * gcc-interface/gigi.h (maybe_character_type): Fix formatting.
3436 (maybe_character_value): Likewise.
3437
3438 2019-06-24 Jan Hubicka <jh@suse.cz>
3439
3440 * gcc-interface/decl.c (gnat_to_gnu_entity): Check that
3441 type is array or integer prior checking string flag.
3442 * gcc-interface/gigi.h (maybe_character_type): Likewise.
3443 (maybe_character_value): Likewise.
3444
3445 2019-06-24 Martin Sebor <msebor@redhat.com>
3446
3447 * gcc-interface/utils.c (handle_nonnull_attribute): Quote attribute
3448 name.
3449
3450 2019-06-18 Arnaud Charlet <charlet@adacore.com>
3451
3452 PR ada/80590
3453 * sem_ch5.adb (Analyze_Loop_Statement): Avoid exception propagation
3454 during normal processing.
3455
3456 2019-06-17 Arnaud Charlet <charlet@adacore.com>
3457
3458 PR ada/80590
3459 * exp_ch9.adb (Expand_N_Delay_Relative_Statement): Swap the two
3460 conditions to avoid a unnecessary exception propagation in the default
3461 case.
3462
3463 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
3464
3465 * gcc-interface/utils.c (handle_stack_protect_attribute): Move around.
3466
3467 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
3468
3469 * doc/gnat_rm/implementation_defined_pragmas.rst (Machine_Attribute):
3470 Document additional optional parameters.
3471 * sem_prag.adb (Analyze_Pragma) <Pragma_Machine_Attribute>: Accept
3472 more than one optional parameter.
3473 * gcc-interface/decl.c (prepend_one_attribute_pragma): Alphabetize
3474 the list of supported pragmas. Simplify the handling of parameters
3475 and add support for more than one optional parameter.
3476 * gcc-interface/utils.c (attr_cold_hot_exclusions): New constant.
3477 (gnat_internal_attribute_table): Add entry for no_icf, noipa, flatten,
3478 used, cold, hot, target and target_clones.
3479 (begin_subprog_body): Do not create the RTL for the subprogram here.
3480 (handle_noicf_attribute): New static function.
3481 (handle_noipa_attribute): Likewise.
3482 (handle_flatten_attribute): Likewise.
3483 (handle_used_attribute): Likewise.
3484 (handle_cold_attribute): Likewise.
3485 (handle_hot_attribute): Likewise.
3486 (handle_target_attribute): Likewise.
3487 (handle_target_clones_attribute): Likewise.
3488
3489 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
3490
3491 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Return 0
3492 for 'Size too.
3493 (Identifier_to_gnu): Use the actual subtype for a reference to a
3494 packed array in a return statement.
3495 (Attribute_to_gnu) <Attr_Size>: Do not strip VIEW_CONVERT_EXPRs from
3496 the prefix in every case.
3497
3498 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
3499
3500 * gcc-interface/trans.c (gnat_to_gnu): Remove superfluous tests on
3501 Backend_Overflow_Checks_On_Target and rework comments.
3502
3503 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
3504
3505 * gcc-interface/trans.c (walk_nesting_tree): New static function.
3506 (finalize_nrv): Use it to walk the entire nesting tree.
3507
3508 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
3509
3510 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Remove
3511 obsolete test on Is_For_Access_Subtype.
3512
3513 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
3514
3515 * gcc-interface/decl.c (components_to_record): Set a name on the type
3516 created for the REP part, if any.
3517 * gcc-interface/utils.c (finish_record_type): Only take the maximum
3518 when merging sizes for a variant part at offset 0.
3519 (merge_sizes): Rename has_rep parameter into max.
3520
3521 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
3522
3523 * gcc-interface/utils.c (gnat_internal_attribute_table): Add support
3524 for stack_protect attribute.
3525 (handle_stack_protect_attribute): New static function.
3526
3527 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
3528
3529 * gcc-interface/decl.c (intrin_arglists_compatible_p): Do not return
3530 false if the internal builtin uses a variable list.
3531
3532 2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
3533
3534 * gcc-interface/trans.c (Call_to_gnu): Do not initialize the temporary
3535 created out of addressability concerns if it's for the _Init parameter
3536 of an initialization procedure.
3537
3538 2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
3539
3540 * gcc-interface/ada-builtin-types.def: New file.
3541 * gcc-interface/ada-builtins.def: Likewise.
3542 * gcc-interface/ada-tree.h (BUILT_IN_LIKELY): New macro.
3543 (BUILT_IN_UNLIKELY): Likewise.
3544 * gcc-interface/trans.c (independent_iterations_p): Initialize the
3545 auto-vector to 16 elements.
3546 (Call_to_gnu): Remove local variable and change the vector of actual
3547 parameters to an auto-vector. Do not convert actual parameters to
3548 the argument type for front-end built-in functions. Add support for
3549 front-end built-in functions.
3550 (build_noreturn_cond): Use internal instead of built-in function.
3551 * gcc-interface/utils.c (c_builtin_type): Include ada-builtin-types.def
3552 (install_builtin_function_types): Likewise.
3553 (install_builtin_functions): Include ada-builtins.def first.
3554
3555 2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
3556
3557 * gcc-interface/utils.c (maybe_pad_type): Issue the warning for the
3558 specific case of component types preferably.
3559
3560 2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
3561
3562 * gcc-interface/trans.c (Identifier_to_gnu): Minor tweaks.
3563 (gnat_to_gnu): Do not convert the result if it is a reference to an
3564 unconstrained array used as the prefix of an attribute reference that
3565 requires an lvalue.
3566
3567 2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
3568
3569 * gcc-interface/trans.c (Gigi_Types_Compatible): New predicate.
3570 (Identifier_to_gnu): Use it to assert that the type of the identifier
3571 and that of its entity are compatible for gigi. Rename a couple of
3572 local variables and separate the processing of the result type.
3573
3574 2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
3575
3576 * gcc-interface/trans.c (Call_to_gnu): Use the unpadded type when
3577 putting back an intermediate conversion the type of the actuals.
3578
3579 2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
3580
3581 * gcc-interface/trans.c (gnat_to_gnu) <Shift operations>: Convert the
3582 count to the unsigned version of its base type before proceeding.
3583
3584 2019-05-16 Martin Sebor <msebor@redhat.com>
3585
3586 * gcc-interface/trans.c (check_inlining_for_nested_subprog): Quote
3587 reserved names.
3588
3589 2019-05-08 Arnaud Charlet <charlet@adacore.com>
3590
3591 * standard.ads.h: New file.
3592
3593 2019-05-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3594
3595 * gcc-interface/Makefile.in (install-gcc-specs): Use foreach.
3596 Honor DESTDIR.
3597
3598 2019-04-29 Michael K. Darling <darlingm@gmail.com>
3599
3600 * gnatvsn.ads: Bump Library_Version to 10.
3601
3602 2019-04-24 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3603 Bernd Edlinger <bernd.edlinger@hotmail.de>
3604 Jakub Jelinek <jakub@redhat.com>
3605
3606 PR target/89093
3607 * raise-gcc.c (TARGET_ATTRIBUTE): Define.
3608 (continue_unwind, personality_body, PERSONALITY_FUNCTION): Add
3609 TARGET_ATTRIBUTE.
3610
3611 2019-04-07 Eric Botcazou <ebotcazou@adacore.com>
3612
3613 * libgnat/i-cexten.ads (CFloat_128): New type.
3614
3615 2019-03-22 Dmitriy Anisimkov <anisimko@adacore.com>
3616
3617 PR ada/89583
3618 * libgnat/g-socket.adb (Bind_Socket, Connect_Socket,
3619 Send_Socket): Fix the computation of structure lengths passed to
3620 low level routines.
3621 (Is_IPv6_Address): Fix the number of expected colons.
3622
3623 2019-03-11 Martin Liska <mliska@suse.cz>
3624
3625 * gcc-interface/misc.c (gnat_post_options): Wrap option name in string
3626 format message and fix GNU coding style.
3627
3628 2019-02-08 Eric Botcazou <ebotcazou@adacore.com>
3629
3630 * gcc-interface/trans.c (gnat_to_gnu) <N_Aggregate>: Minor tweak.
3631 * gcc-interface/utils.c (convert): Do not pad when doing an unchecked
3632 conversion here. Use TREE_CONSTANT throughout the function.
3633 (unchecked_convert): Also pad if the source is a CONSTRUCTOR and the
3634 destination is a more aligned array type or a larger aggregate type,
3635 but not between original and packable versions of a type.
3636
3637 2019-02-08 Eric Botcazou <ebotcazou@adacore.com>
3638
3639 * gcc-interface/utils.c (max_size) <tcc_unary>: Be prepared for an
3640 operand with VOID_TYPE.
3641
3642 2019-02-08 Eric Botcazou <ebotcazou@adacore.com>
3643
3644 * gcc-interface/trans.c (elaborate_all_entities): Do not elaborate the
3645 entities of a package renaming another one.
3646
3647 2019-02-08 Eric Botcazou <ebotcazou@adacore.com>
3648
3649 * gcc-interface/trans.c (Regular_Loop_to_gnu): Replace tests on
3650 individual flag_unswitch_loops and flag_tree_loop_vectorize switches
3651 with test on global optimize switch.
3652 (Raise_Error_to_gnu): Likewise.
3653
3654 2019-02-07 Eric Botcazou <ebotcazou@adacore.com>
3655
3656 * libgnarl/s-linux__sparc.ads (ETIMEDOUT): Set to correct value.
3657
3658 2019-02-06 Arnaud Charlet <charlet@adacore.com>
3659
3660 * libgnarl/s-linux__x32.ads: Resync list of signals with s-linux.ads
3661
3662 2019-01-27 Eric Botcazou <ebotcazou@adacore.com>
3663
3664 * repinfo.adb (List_Component_Layout): Remove superfluous space for
3665 zero-sized field.
3666 * gcc-interface/ada-tree.h (TYPE_IS_EXTRA_SUBTYPE_P): New macro.
3667 * gcc-interface/gigi.h (create_extra_subtype): Declare.
3668 * gcc-interface/decl.c (TYPE_ARRAY_SIZE_LIMIT): Likewise.
3669 (update_n_elem): New function.
3670 (gnat_to_gnu_entity): Use create_extra_subtype to create extra subtypes
3671 instead of doing it manually.
3672 <E_Array_Type>: Use update_n_elem to compute the maximum size. Use the
3673 index type instead of base type for the bounds. Set TYPE_ARRAY_MAX_SIZE
3674 of the array to the maximum size.
3675 <E_Array_Subtype>: Create an extra subtype using the index type of the
3676 base array type for self-referential bounds. Use update_n_elem to
3677 compute the maximum size. Set TYPE_ARRAY_MAX_SIZE of the array to the
3678 maximum size.
3679 (gnat_to_gnu_field): Clear DECL_NONADDRESSABLE_P on discriminants.
3680 * gcc-interface/misc.c (gnat_get_alias_set): Return the alias set of
3681 the base type for an extra subtype.
3682 (gnat_type_max_size): Remove obsolete code.
3683 * gcc-interface/trans.c (Attribute_to_gnu): Minor tweak.
3684 (can_be_lower_p): Deal with pathological types.
3685 * gcc-interface/utils.c (create_extra_subtype): New function.
3686 (create_field_decl): Minor tweak.
3687 (max_size) <tcc_reference>: Compute a better value by using the extra
3688 subtypes on the self-referential bounds.
3689 <tcc_binary>: Rewrite. Deal with "negative value" in unsigned types.
3690 <tcc_expression>: Likewise.
3691 * gcc-interface/utils2.c (compare_arrays): Retrieve the original bounds
3692 of the arrays upfront. Swap only if the second length is not constant.
3693 Use comparisons on the original bounds consistently for the null tests.
3694 (build_binary_op): Use TYPE_IS_EXTRA_SUBTYPE_P macro.
3695 (build_allocator): Minor tweak.
3696
3697 2019-01-27 Eric Botcazou <ebotcazou@adacore.com>
3698
3699 * gcc-interface/decl.c (array_type_has_nonaliased_component): Return
3700 the same value for every dimension of a multidimensional array type.
3701
3702 2019-01-26 Eric Botcazou <ebotcazou@adacore.com>
3703
3704 * gcc-interface/trans.c (Regular_Loop_to_gnu): Use the SLOC of the
3705 iteration scheme, if present, throughout the translation.
3706
3707 2019-01-26 Eric Botcazou <ebotcazou@adacore.com>
3708
3709 * gcc-interface/trans.c (gnat_to_gnu) <N_Assignment_Statement>: Use
3710 DECL_SIZE_UNIT instead of TYPE_SIZE_UNIT for the size to be assigned
3711 by a call to memset if the LHS is a DECL.
3712
3713 2019-01-26 Eric Botcazou <ebotcazou@adacore.com>
3714
3715 * gcc-interface/trans.c (struct loop_info_d): Remove artificial field.
3716 (Loop_Statement_to_gnu): Do not set it.
3717
3718 2019-01-26 Eric Botcazou <ebotcazou@adacore.com>
3719
3720 * gcc-interface/trans.c (Iterate_Acc_Clause_Arg): Fix formatting.
3721 (Acc_gnat_to_gnu): Likewise.
3722 (Acc_Data_to_gnu): Likewise.
3723 (Acc_Var_to_gnu): Likewise.
3724 (Acc_Reduc_to_gnu): Likewise.
3725 (Acc_Size_List_to_gnu): Likewise.
3726 (Pragma_to_gnu) <Pragma_Acc_Loop>: Likewise.
3727 <Pragma_Acc_Data>): Likewise.
3728 (find_loop_for): Remove default value for parameters.
3729 * gcc-interface/trans.c (gnat_to_gnu) <N_Op_And>: Merge into...
3730 <N_Op_Eq>): ...this.
3731
3732 2019-01-26 Eric Botcazou <ebotcazou@adacore.com>
3733
3734 * gcc-interface/decl.c (annotate_value) <INTEGER_CST>: Use test on
3735 the sign bit instead of on the sign of the value.
3736 <PLUS_EXPR>: Turn addition of negative constant into subtraction.
3737 <MULT_EXPR>: Add test for degenerate case.
3738 <BIT_AND_EXPR>: Simplify.
3739
3740 2019-01-18 Sebastian Huber <sebastian.huber@embedded-brains.de>
3741
3742 * s-oscons-tmplt.c (AF_INET6): Do not undefine for RTEMS.
3743
3744 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
3745
3746 PR other/16615
3747 * exp_ch11.adb: Change "can not" to "cannot".
3748 * sem_ch4.adb: Likewise.
3749
3750 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
3751
3752 PR other/16615
3753 * exp_ch9.adb: Mechanically replace "can not" with "cannot".
3754 * libgnat/s-regpat.ads: Likewise.
3755 * par-ch4.adb: Likewise.
3756 * set_targ.adb: Likewise.
3757 * types.ads: Likewise.
3758
3759 2019-01-08 Justin Squirek <squirek@adacore.com>
3760
3761 Revert:
3762 2018-07-31 Justin Squirek <squirek@adacore.com>
3763
3764 * lib-writ.adb (Write_With_Lines): Modfiy the generation
3765 of dependencies within ali files so that source unit
3766 bodies are properly listed even if said bodies are
3767 missing. Perform legacy behavior in GNATprove mode.
3768 * lib-writ.ads: Modify documentation to reflect current
3769 behavior.
3770
3771 and:
3772 2018-09-26 Justin Squirek <squirek@adacore.com>
3773
3774 * lib-writ.adb, lib-writ.ads (Write_With_Lines): Add
3775 documentation and an extra conditional check for RCI
3776 units so that generated ali files will list the spec
3777 only instead of a body when a body is not found.
3778
3779 2019-01-04 Eric Botcazou <ebotcazou@adacore.com>
3780
3781 * gnatvsn.ads: Bump copyright year.
3782
3783 2019-01-01 Jakub Jelinek <jakub@redhat.com>
3784
3785 Update copyright years.
3786
3787 * gnat_ugn.texi: Bump @copying's copyright year.
3788 * gnat_rm.texi: Likewise.
3789 \f
3790 Copyright (C) 2019 Free Software Foundation, Inc.
3791
3792 Copying and distribution of this file, with or without modification,
3793 are permitted in any medium without royalty provided the copyright
3794 notice and this notice are preserved.