1 2019-12-13 Ed Schonberg <schonberg@adacore.com>
3 * sem_ch7.adb (Analyze_Package_Body_Helper): Do not call
4 Declare_Inherited_Private_Subprograms on s child body: the
5 required operations have already been created when analyzing the
6 corresponding package declaration. This prevents a redeclaration
7 of inehrited operation, and a crash when inserting the new
8 operation in the current scope.
10 2019-12-13 Yannick Moy <moy@adacore.com>
12 * sem_prag.adb (Analyze_Depends_In_Decl_Part,
13 Analyze_Global_In_Decl_Part,
14 Analyze_Refined_Depends_In_Decl_Part,
15 Analyze_Refined_Global_In_Decl_Part, Check_Missing_Part_Of):
16 Skip redundant checking involving visibility inside
19 2019-12-13 Yannick Moy <moy@adacore.com>
21 * sem_res.adb (Resolve_Call): Prevent inlining inside while loop
23 * sem_util.adb, sem_util.ads (In_While_Loop_Condition): New
26 2019-12-13 Bob Duff <duff@adacore.com>
28 * impunit.ads: Add Ada_202X_Unit.
29 * impunit.adb: Add a table Non_Imp_File_Names_2X analogous to
30 the other tables. Add code to search this table.
31 * opt.ads: Add Warn_On_Ada_202X_Compatibility flag, currently
33 * sem_ch10.adb (Analyze_With_Clause): Give a warning if an Ada
34 2020 unit is with-ed when Ada_Version < Ada_2020. Change 'if'
35 to 'case': Full coverage rules rule.
37 2019-12-13 Bob Duff <duff@adacore.com>
39 * rtsfind.ads: Minor comment fix.
41 2019-12-13 Gary Dismukes <dismukes@adacore.com>
43 * sem_util.adb (Scope_Within): For the case of checking for a
44 task type procedure, check the Implementation_Base_Type of Curr.
45 (Scope_Within_Or_Same): For the case of checking for a task type
46 procedure, check the Implementation_Base_Type of Curr.
48 2019-12-13 Arnaud Charlet <charlet@adacore.com>
50 * impunit.adb (Non_Imp_File_Names_12): Add
51 Ada.Containers.Vectors.Generic_Parallel_Sorting.
53 2019-12-13 Justin Squirek <squirek@adacore.com>
55 * sem_res.adb (Resolve_Allocator): Add calls to
56 Check_Cond_Expr_Accessibility when a conditional expression is
58 (Check_Allocator_Discrim_Accessibility_Exprs): Created to
59 recursively traverse a potentially compound conditional
60 expression and perform accessibility checks for each
62 * sem_util.adb (Dynamic_Accessibility_Level): Avoid use of
63 original node of the expression in question so we can handle
64 dynamic accessibility in the limited case of a constant folded
65 conditional expression.
67 2019-12-13 Steve Baird <baird@adacore.com>
69 * exp_ch4.adb (Expand_N_Op_Eq.Is_Equality): Move this function
70 from within Expand_N_Op_Eq.Find_Equality out to immediately
71 within Expand_N_Op_Eq in order to give it greater visibility.
72 Add a new Typ parameter (defaulted to Empty) which, if
73 non-empty, means the function will return False in the case of
74 an equality op for some other type.
75 * (Expand_N_Op_Eq.User_Defined_Primitive_Equality_Op): A new
76 function. Given an untagged record type, finds the corresponding
77 user-defined primitive equality op (if any). May return Empty.
79 * (Expand_N_Op): For Ada2012 or later, check for presence of a
80 user-defined primitive equality op before falling back on the
81 usual predefined component-by-component comparison. If found,
82 then call the user-defined op instead.
84 2019-12-13 Justin Squirek <squirek@adacore.com>
86 * sem_ch6.adb (Check_Overriding_Indicator): Modify condition to
87 take into account the modification of the Is_Hidden flag within
89 (Verify_Overriding_Indicator): Add an exception for controlled
90 primitives within an instance.
92 2019-12-13 Ed Schonberg <schonberg@adacore.com>
94 * sinfo.ads, sinfo.adb (Aspect_On_Partial_View,
95 Set_Aspect_On_Partial_View): New flag for use by SPARK, to
96 indicate whether an aspect that appears on a type declaration
97 applies to the partial view of that type.
98 * sem_ch13.adb (Analyze_Aspect_Specification): Set new flag
101 2019-12-12 Ed Schonberg <schonberg@adacore.com>
103 * sem_ch13.adb (Same_Reprewentation): if the actual in a call is
104 a generic actual type, use its bsae type to determine whether a
105 change of representastion may be necessary for proper parameter
108 2019-12-12 Ed Schonberg <schonberg@adacore.com>
110 * sem_type.adb (Find_Unique_Type): A call to the universal
111 access equality operator requires one operand to be a universal
112 access, and the other to be an access type. There is no
113 requirement, as previously implied by this routine, that
114 pool-specific access types were illegal in this context.
116 2019-12-12 Steve Baird <baird@adacore.com>
119 (New_Overloaded_Entity.Check_Conforming_Paramters): Add new
120 Conformance_Type parameter. With the value of
121 Subtype_Conformant, the behavior of Check_Conforming_Parameters
122 is unchanged. The call in Matching_Entry_Or_Subprogram to
123 instead passes in Type_Conformant. This corresponds to the use
124 of "type conformant" in Ada RM 9.4(11.4/3).
125 (New_Overloaded_Entity.Has_Matching_Entry_Or_Subprogram): Add
126 new Normalized_First_Parameter_Type function to help in ignoring
127 the distinction between protected and access-to-protected first
128 parameters when checking prefixed-view profile matching. Replace
129 computations of the type of the first parameter with calls to
130 this function as appropriate.
132 2019-12-12 Ed Schonberg <schonberg@adacore.com>
134 * sem_ch5.adb: (Analyze_Iterator_Specification): If the
135 iteration is over a slice, complete the resolution of its
136 bounds, which may be aebitrary expressions. The previous
137 pre-analysis may have created itypes for the slice but has not
138 performed the expansion that for example may introduce actions
139 that specify explicit dereferences and run-time checks.
141 2019-12-12 Ed Schonberg <schonberg@adacore.com>
143 * sem_ch8.adb: Improve error message for dispatching subprogram
146 2019-12-12 Gary Dismukes <dismukes@adacore.com>
148 * exp_ch9.adb (Build_Protected_Entry): Set the Scope of the new
149 block to be the entity of the procedure created for the entry.
151 2019-12-12 Steve Baird <baird@adacore.com>
153 * sem_ch10.adb (Install_With_Clause): Check for the case of a
154 circular dependency involving a predefined (or GNAT-defined)
155 unit and handle that case by generating an appropropriate error
158 2019-12-12 Gary Dismukes <dismukes@adacore.com>
160 * sem_ch4.adb, sem_res.adb: Minor reformatting.
162 2019-12-12 Justin Squirek <squirek@adacore.com>
164 * sem_ch4.adb (Analyze_One_Call): Add condition to check for
165 incorrectly resolved hidden controlled primitives.
167 2019-12-12 Ed Schonberg <schonberg@adacore.com>
169 * sem_res.adb: Fix processing of standard predefined operators.
171 2019-12-12 Piotr Trojanek <trojanek@adacore.com>
173 * libgnarl/a-dispat.ads (Yield): Update Global contract.
175 2019-12-12 Piotr Trojanek <trojanek@adacore.com>
177 * libgnat/g-altive.ads: Fix typo in comment.
178 * bindo-graphs.adb: Fix repeated words in comment.
179 * exp_ch4.adb: Likewise.
180 * exp_ch5.adb: Likewise.
181 * exp_ch7.adb: Likewise.
182 * exp_pakd.adb: Likewise.
183 * exp_unst.adb: Likewise.
184 * exp_util.adb: Likewise.
185 * freeze.adb: Likewise.
186 * inline.adb: Likewise.
187 * layout.adb: Likewise.
188 * sem_ch12.adb: Likewise.
189 * sem_ch13.adb: Likewise.
190 * sem_ch4.adb: Likewise.
191 * sem_ch9.adb: Likewise.
192 * sem_elab.adb: Likewise.
193 * doc/gnat_ugn/gnat_and_program_execution.rst: Fix repeated
194 words in user documentation.
195 * gnat_ugn.texi: Regenerate.
197 2019-12-12 Eric Botcazou <ebotcazou@adacore.com>
199 * exp_attr.adb (Expand_Size_Attribute): Look directly at the
200 prefix to detect the bit-packed slices. Apply the checks last
201 in case the attribute needs to be processed by the back-end.
202 * exp_ch4.adb (Expand_N_Slice): Do not create a temporary for
203 a prefix of the Size attribute.
205 2019-12-12 Steve Baird <baird@adacore.com>
208 (Instantiate_Type.Validate_Derived_Type_Instance): Implement the
209 legality check of AI12-0036
211 2019-12-12 Ed Schonberg <schonberg@adacore.com>
213 * sem_ch10.adb (Analyze_Subunit): Fix spurious visibility error
214 on subunit with optimization.
216 2019-12-12 Arnaud Charlet <charlet@adacore.com>
218 * raise-gcc.c (__gnat_personality_v0): Define for SEH.
220 2019-12-12 Gary Dismukes <dismukes@adacore.com>
222 * exp_ch9.adb (Build_Protected_Entry): Analyze the block created
223 to hold the declarations and statements of the protected entry
224 body right after it's created, and then call Reset_Scopes_To on
225 that block to reset the Scope of nested entities to the block
227 (Reset_Scope): Add handling for N_Freeze_Entity nodes, calling
228 Reset_Scopes recursively on the Actions of such nodes. Also, for
229 subprogram bodies that are encountered that might not have a
230 separate declaration (such as type init procedures), reset the
231 Scope of the subprogram's entity.
233 2019-12-12 Justin Squirek <squirek@adacore.com>
235 * sem_attr.adb (Analyze_Attribute): Add error message for
236 invalid usage of Attribute_Result.
238 2019-12-12 Bob Duff <duff@adacore.com>
240 * sem_attr.adb (Eval_Attribute): Never mark T'Descriptor_Size as
241 static, even if T is a static subtype, because otherwise we will
242 request the value of the attribute, which will crash because we
243 have not evaluated it.
245 2019-12-12 Ed Schonberg <schonberg@adacore.com>
247 * exp_ch5.adb (Expand_N_Assognment_Statement): Extend the
248 processing involving private types with unknown discriminants to
249 handle the case where the full view of the type is an
250 unconstrained array type.
252 2019-12-12 Bob Duff <duff@adacore.com>
254 * sem_ch4.adb (Transform_Object_Operation): Deal properly with
255 prefix notation in instances.
257 2019-12-12 Claire Dross <dross@adacore.com>
259 * libgnat/a-cofove.adb, libgnat/a-cfinve.adb (Find_Index): Use
260 Extended_Index for call to Last.
262 2019-12-12 Gary Dismukes <dismukes@adacore.com>
264 * sem_ch3.adb, sem_util.adb: Minor reformatting.
266 2019-12-12 Bob Duff <duff@adacore.com>
268 * doc/gnat_ugn/gnat_utility_programs.rst: Update gnatmetric
269 documentation for average lengths
271 2019-12-12 Ed Schonberg <schonberg@adacore.com>
273 * sem_ch3.adb (Constrain_Access): Remove obsolete comments and
274 warning concerning component types of an access type whose
275 designated type is a constrained record type. (Such constraints
276 were previously ignored). Set scope of itype for component to
277 the scope of the enclosing record.
278 * sem_ch4.adb: Remove call to Set_Ekind.
279 * sem_util.adb (Build_Actual_Subtype_Of_Component): Handle
280 components whose type is an access to a constrained
281 discriminant, where the constraints may be given by the
282 discriminants of the enclosing type. New subprogram
283 Build_Access_Record_Constraint.
285 2019-12-12 Justin Squirek <squirek@adacore.com>
287 * exp_ch6.adb (Expand_Call_Helper): Added null case for
288 'Loop_Entry, 'Old, and 'Result when calculating whether to
289 create extra accessibility parameters.
290 * sem_util.adb (Dynamic_Accessibility_Level): Added null case
291 for 'Loop_Entry, 'Old, and 'Result when calculating
292 accessibility level based on access-valued attributes. Also
293 added special handling for uses of 'Loop_Entry when used in its
294 indexed component form.
296 2019-12-12 Arnaud Charlet <charlet@adacore.com>
298 * raise-gcc.c: Remove references to VMS
300 2019-12-12 Eric Botcazou <ebotcazou@adacore.com>
302 * atree.ads, comperr.ads, debug.ads, einfo.ads, elists.ads,
303 err_vars.ads, errout.ads, exp_ch11.ads, exp_code.ads,
304 exp_dbug.ads, exp_tss.ads, exp_util.ads, lib.ads, namet.ads,
305 nlists.ads, opt.ads, repinfo.ads, restrict.ads, scos.ads,
306 sem_aggr.ads, sem_aux.ads, sem_eval.ads, sem_util.ads,
307 sinfo.ads, sinput.ads, stringt.ads, targparm.ads, types.ads,
308 urealp.ads warnsw.ads: Add WARNING line(s) in commentary.
309 * atree.h, elists.h, namet.h, nlists.h, repinfo.h, scos.h,
310 stringt.h, types.h, uintp.h, urealp.h: Tidy up.
311 * fe.h: Likewise. Document WARNING mark.
313 2019-12-12 Dmitriy Anisimkov <anisimko@adacore.com>
315 * libgnat/g-comlin.ads (Get_Argument): New routine similar to
316 original Get_Argument but with one more out parameter
318 (Get_Arguments): Comment improved.
319 * libgnat/g-comlin.adb (Get_Argument): Implementation taken from
320 original Get_Argument and improved.
321 (Get_Argument): Calls new routine Get_Argument with additional
324 2019-12-03 Eric Botcazou <ebotcazou@adacore.com>
326 * gcc-interface/utils.c (potential_alignment_gap): Delete.
327 (rest_of_record_type_compilation): Do not call above function. Use
328 the alignment of the field instead of that of its type, if need be.
329 When the original field has variable size, always lower the alignment
330 of the pointer type. Reset the bit-field status of the new field if
331 it does not encode a bit-field.
333 2019-12-03 Eric Botcazou <ebotcazou@adacore.com>
335 * gcc-interface/utils.c (fold_convert_size): New function.
336 (fold_bit_position): Invoke it to do further folding.
338 2019-12-03 Eric Botcazou <ebotcazou@adacore.com>
340 * gcc-interface/decl.c (gnat_to_gnu_subprog_type): With the Copy-In/
341 Copy-Out mechanism, do not promote the mode of the return type to an
342 integral mode if it contains a field on a non-integral type and even
343 demote it for 64-bit targets.
345 2019-11-25 Eric Botcazou <ebotcazou@adacore.com>
348 * gcc-interface/trans.c (gnat_to_gnu) <N_Attribute_Definition_Clause>:
349 Use a temporary instead of clobbering the result with a freeze node.
351 2019-11-25 Eric Botcazou <ebotcazou@adacore.com>
354 * expect.c (__gnat_expect_poll [VMS, HPUX]): Fix typo.
356 2019-11-06 Eric Botcazou <ebotcazou@adacore.com>
357 Alexandre Oliva <oliva@adacore.com>
359 * gcc-interface/misc.c (callgraph_info_file): Delete.
361 2019-10-27 Jakub Jelinek <jakub@redhat.com>
363 * locales.c (iso_3166): Add missing comma after "United-States".
365 2019-10-15 Arnaud Charlet <charlet@adacore.com>
367 * Makefile.rtl (a-except.o): Put -O1 earlier so that it can be
368 overriden if needed by other variables.
370 2019-10-12 Eric Botcazou <ebotcazou@adacore.com>
373 * sem_ch8.adb (Chain_Use_Clause): Remove second argument in calls
375 * sem_elab.adb (Find_Unit_Entity): Likewise. Deal with N_Subunit
376 here in lieu of in Defining_Entity.
377 * sem_util.ads (Defining_Entity): Remove 2nd and 3th parameters.
378 * sem_util.adb (Defining_Entity): Remove 2nd and 3th parameters,
379 and adjust accordingly. Deal with N_Compilation_Unit.
381 2019-10-11 Eric Botcazou <ebotcazou@adacore.com>
383 * gcc-interface/decl.c (elaborate_reference_1): Specifically deal with
384 pointer displacement.
386 * gcc-interface/decl.c (components_to_record): Use proper name.
388 * gcc-interface/trans.c (Sloc_to_locus): Use standard types.
390 2019-10-11 Eric Botcazou <ebotcazou@adacore.com>
392 * gcc-interface/decl.c (gnat_to_gnu_field): Adjust again the packing
393 for a field without strict alignment and with an oversized clause.
395 2019-10-11 Eric Botcazou <ebotcazou@adacore.com>
397 * gcc-interface/decl.c (annotate_value) <INTEGER_CST>: Really test the
398 sign of the value when deciding to build a NEGATE_EXPR.
399 <PLUS_EXPR>: Remove redundant line.
400 <BIT_AND_EXPR>: Do the negation here.
402 2019-10-11 Eric Botcazou <ebotcazou@adacore.com>
404 * gcc-interface/decl.c (Gigi_Equivalent_Type) <E_Array_Subtype>: New
405 case. Return the base type if the subtype is not constrained.
407 2019-10-11 Eric Botcazou <ebotcazou@adacore.com>
409 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Named_{Integer|Real}>:
410 New case to deal with the definition of named numbers.
411 <E_Variable>: Minor tweaks. Set DECL_IGNORED_P on the CONST_DECL
412 if a corresponding variable is built.
413 * gcc-interface/trans.c (gnat_to_gnu) <N_Integer_Literal>: Return
414 error_mark_node instead of aborting on overflow for named numbers.
415 <N_Number_Declaration>: Reuse the <N_Object_Declaration> case and
416 deal with error_mark_node specifically.
417 * gcc-interface/utils.c (create_var_decl): Do not set DECL_IGNORED_P
419 (gnat_write_global_declarations): Output global constants.
421 2019-10-10 Gary Dismukes <dismukes@adacore.com>
423 * exp_ch7.adb (Check_Unnesting_In_Decls_Or_Stmts): When
424 encountering a loop at the top level of a package declaration
425 list (that is, within the declarations of a package spec or
426 body) that has nested subprograms, call Unnest_Loop to create a
427 new library-level procedure that will contain the loop, to allow
428 for proper handling of up-level references from within nested
429 subprograms, such as to loop parameters.
430 (Unnest_Loop): New procedure that takes a loop statement and
431 creates a new procedure body to enclose the loop statement,
432 along with generating a call to the procedure.
434 2019-10-10 Arnaud Charlet <charlet@adacore.com>
436 * freeze.adb (Freeze_Subprogram): Ensure constructor is a C++
439 2019-10-10 Gary Dismukes <dismukes@adacore.com>
441 * libgnat/a-ststio.ads (File_Type): Apply pragma
442 Preelaborable_Initialization to the type.
444 2019-10-10 Yannick Moy <moy@adacore.com>
446 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do not peek
447 under private types whose completion is SPARK_Mode Off.
449 2019-10-10 Gary Dismukes <dismukes@adacore.com>
451 * exp_ch4.adb, sem_cat.adb, sem_ch12.adb, sem_ch3.adb,
452 sem_ch6.adb, sem_prag.adb, sem_util.adb, sem_util.ads: Minor
455 2019-10-10 Ed Schonberg <schonberg@adacore.com>
457 * sem_warn.adb (Warn_On_Useless_Assignment): Do not warn if the
458 second assignment is at the same source position as the first.
460 2019-10-10 Gary Dismukes <dismukes@adacore.com>
462 * sem_util.adb (Enclosing_Subprogram): Handle the case of
463 E_Entry_Family, returning the entry family's associated
464 Protected_Body_Subprogram (as was already done for E_Entry).
465 * exp_ch9.adb (Expand_N_Accept_Statement): Call Reset_Scopes_To
466 on the block created for an accept statement to reset the scopes
467 of any local entities to the block scope.
469 2019-10-10 Ed Schonberg <schonberg@adacore.com>
471 * sem_ch12.adb (Analyze_Formal_Package_Declaration): Propagate
472 an aspect specification for Abstract_State from generic package
473 to formal package, so that it is available when analyzing the
476 2019-10-10 Eric Botcazou <ebotcazou@adacore.com>
478 * sem_ch6.adb (Set_Actual_Subtypes): Put the freeze node of the
479 actual subtype after its declaration when the type of the formal
482 2019-10-10 Eric Botcazou <ebotcazou@adacore.com>
484 * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order): Do not use
485 the Esize of the component to compute its layout, but only the
486 Component_Clause. Do not issue a warning for the _Tag
487 component. Also set the Esize of the component at the end of
489 (Analyze_Record_Representation_Clause): Remove Hbit local
490 variable. Lay out the Original_Record_Component only if it's
491 distinct from the component.
492 (Check_Record_Representation_Clause): Fix off-by-one bug for the
493 Last_Bit of the artificial clause built for the _Tag component.
495 2019-10-10 Bob Duff <duff@adacore.com>
497 * treepr.ads, treepr.adb (ppar): New procedure.
499 2019-10-10 Bob Duff <duff@adacore.com>
501 * sem_aggr.adb (Resolve_Aggregate): Add missing cases in the
502 Others_Allowed => True case -- N_Case_Expression_Alternative and
503 N_If_Expression. Use Nkind_In.
504 * atree.adb, atree.ads, sinfo.adb, sinfo.ads (Nkind_In): New
505 16-parameter version.
507 2019-10-10 Ed Schonberg <schonberg@adacore.com>
509 * sem_aggr.adb (Resolve_Array_Aggregate): Set properly the
510 Predicated_Parent link of an itype created for an aggregate, so
511 that the predicate_function of the parent can support proofs on
512 the object that it initializes.
514 2019-10-10 Eric Botcazou <ebotcazou@adacore.com>
516 * sem_ch3.adb (Analyze_Number_Declaration): Set
517 Debug_Info_Needed in the case where the expression is an integer
520 2019-10-10 Yannick Moy <moy@adacore.com>
522 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Add subprograms
523 with deep parameter or result type as not candidates for
526 2019-10-10 Vadim Godunko <godunko@adacore.com>
528 * libgnat/g-exptty.ads (TTY_Process_Descriptor): Set default
531 2019-10-10 Bob Duff <duff@adacore.com>
533 * sem_prag.adb (Defer_Compile_Time_Warning_Error_To_BE): In
534 addition to saving the pragma for further processing, copy the
535 pragma into the main unit if necessary.
537 2019-10-10 Bob Duff <duff@adacore.com>
539 * einfo.ads, einfo.adb (Invariants_Ignored): New flag on types.
540 This leaves just one unused flag.
541 * sem_prag.adb (Invariant): Set the flag if appropriate.
542 * exp_util.adb (Make_Invariant_Call): Check the flag.
544 2019-10-10 Arnaud Charlet <charlet@adacore.com>
546 * gnat1drv.adb (Gnat1drv): Skip code generation when handling an
547 incomplete unit with -gnatceg.
549 2019-10-10 Gary Dismukes <dismukes@adacore.com>
551 * exp_ch7.adb (Check_Unnesting_Elaboration_Code): Various
553 (Set_Elab_Proc): New procedure to create the defining identifier
554 for a procedure created to encapsulate top-level blocks
555 occurring as a part of library package elaboration.
556 (First_Local_Scope): Function replaced by
557 Reset_Scopes_To_Elab_Proc.
558 (Reset_Scopes_To_Elab_Proc): New recursive procedure based on
559 First_Local_Scope, which it replaces, that is called to traverse
560 the statements of a library package body to locate top-level
561 blocks and determine whether they contain nested subprograms
562 that might address library-level objects of the package. Such
563 blocks (and loops) and certain top-level subprograms within the
564 statements will have their Scope reset here to match an
565 encapsulating procedure created by
566 Check_Unnesting_Elaboration_Code that will contain the
568 (Check_Unnesting_In_Decls_Or_Stmts): Code for handling blocks
569 factored out into Unnest_Block. Add handling for package
570 declarations and bodies, making recursive calls for
571 visible/private declarations, body declarations, statements, and
572 exception handlers. Also remove test for Is_Compilation_Unit:
573 caller tests for Is_Library_Level_Entity instead. Also, this
574 proc's name was changed from Check_Unnesting_In_Declarations.
575 (Check_Unnesting_In_Handlers): New procedure to traverse a
576 sequence of exception handlers, calling
577 Check_Unnesting_In_Decls_Or_Stmts on the statements of each
579 (Expand_N_Package_Body): Call Check_Unnesting_* routines only
580 when Unnest_Subprogram_Mode is set and the current scope is a
581 library-level entity (which includes packages and instantiations
582 nested directly within a library unit).
583 (Expand_N_Package_Declaration): Call Check_Unnesting_* routines
584 only when Unnest_Subprogram_Mode is set and the current scope is
585 a library-level entity (which includes packages and
586 instantiations nested directly within a library unit).
587 (Unnest_Block): New procedure factored out of
588 Check_Unnesting_In_Decls_Or_Stmts, for creating a new procedure
589 to replace a block statement and resetting the Scope fields of
590 the block's top-level entities.
592 2019-10-10 Anthony Leonardo Gracio <leonardo@adacore.com>
594 * doc/gnat_ugn/about_this_guide.rst,
595 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
596 doc/gnat_ugn/getting_started_with_gnat.rst,
597 doc/gnat_ugn/gnat_and_program_execution.rst, errout.ads,
598 exp_ch3.adb, gnatls.adb, impunit.adb, lib-writ.ads, opt.ads,
599 sem_ch7.adb, sem_prag.adb, sem_res.adb, sem_warn.adb,
600 terminals.c: Replace GPS by GNAT Studio.
601 * gnat_ugn.texi: Regenerate.
603 2019-10-10 Ed Schonberg <schonberg@adacore.com>
605 * exp_ch6.adb (Expand_Simple_Function_Return_Statement): If the
606 function to which the return statement applies is an
607 Ignored_Ghost_Function, do not indicate that it uses the
608 secondary stack when the return type is unconstrained.
610 2019-10-10 Bob Duff <duff@adacore.com>
612 * libgnat/a-cbdlli.adb, libgnat/a-cbhama.adb,
613 libgnat/a-cbhase.adb, libgnat/a-cbmutr.adb,
614 libgnat/a-cborma.adb, libgnat/a-cborse.adb,
615 libgnat/a-cdlili.adb, libgnat/a-cidlli.adb,
616 libgnat/a-cihama.adb, libgnat/a-cihase.adb,
617 libgnat/a-cimutr.adb, libgnat/a-ciorma.adb,
618 libgnat/a-ciorse.adb, libgnat/a-cobove.adb,
619 libgnat/a-cohama.adb, libgnat/a-cohase.adb,
620 libgnat/a-coinve.adb, libgnat/a-comutr.adb,
621 libgnat/a-conhel.adb, libgnat/a-convec.adb,
622 libgnat/a-coorma.adb, libgnat/a-coorse.adb (Reference,
623 Constant_Reference): Use Busy instead of Lock, so we forbid
624 tampering with cursors, rather than tampering with elements.
626 2019-10-10 Ed Schonberg <schonberg@adacore.com>
628 * sem_cat.adb (Set_Categorization_From_Pragma): Do not modify
629 any visibility settings if there are no compilation_unit pragmas
630 following the package declaration. Add comments for future
633 2019-10-10 Patrick Bernardi <bernardi@adacore.com>
635 * bindgen.adb (System_Secondary_Stack_Package_In_Closure):
636 Renamed flag System_Secondary_Stack_Used to be clearer of what
638 (Gen_Adainit): Refactor secondary stack related code to make it
640 * rtsfind.adb (Load_RTU): Don't set Sec_Stack_Used flag here
641 (RTE): Set Sec_Stack_Used if the System.Secondary_Stack is
642 referenced, but not if we're ignoring ghost code.
644 2019-10-10 Piotr Trojanek <trojanek@adacore.com>
646 * sem_prag.adb (Analyze_Global_In_Decl_Part): Simplify previous
647 test, just like in a recent commit we simplified a similar test
648 for Depends contract.
650 2019-10-04 Joseph Myers <joseph@codesourcery.com>
652 * gcc-interface/utils.c (flag_isoc2x): New variable.
654 2019-10-01 Maciej W. Rozycki <macro@wdc.com>
656 * gcc-interface/Makefile.in (ADA_RTL_DSO_DIR): New variable.
657 (install-gnatlib): Use it in place of ADA_RTL_OBJ_DIR for shared
658 library installation.
660 2019-10-01 Maciej W. Rozycki <macro@wdc.com>
662 * gcc-interface/Make-lang.in (ada.install-common): Split into...
663 (gnat-install-tools, gnat-install-lib): ... these.
665 2019-09-26 Alexandre Oliva <oliva@adacore.com>
667 * gcc-interface/decl.c (components_to_record): Set
668 DECL_SIZE_UNIT for zero-sized fields.
670 2019-09-26 Arnaud Charlet <charlet@adacore.com>
672 * osint.adb (OS_Time_To_GNAT_Time): Remove dependency on To_C/To_Ada
674 2019-09-23 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
676 * libgnarl/s-osinte__solaris.ads (sysconf): Declare.
677 (SC_NPROCESSORS_ONLN): Define.
678 * libgnarl/s-tasinf__solaris.ads (Number_Of_Processors): Declare.
679 * libgnarl/s-tasinf__solaris.adb (N_CPU): New variable.
680 (Number_Of_Processors): New function.
682 2019-09-23 Eric Botcazou <ebotcazou@adacore.com>
684 * gcc-interface/trans.c (Regular_Loop_to_gnu): Do not rotate the loop
686 (build_return_expr): Do not perform NRV if -Og is enabled.
687 (Subprogram_Body_to_gnu): Likewise.
688 (gnat_to_gnu) <N_Simple_Return_Statement>: Likewise.
689 (Handled_Sequence_Of_Statements_to_gnu): Do not inline finalizers if
691 * gcc-interface/utils.c (convert_to_index_type): Return early if -Og
694 2019-09-23 Eric Botcazou <ebotcazou@adacore.com>
696 * gcc-interface/trans.c (gnat_compile_time_expr_list): New variable.
697 (Pragma_to_gnu): Rename local variable. Save the (first) expression
698 of pragma Compile_Time_{Error|Warning} for later processing.
699 (Compilation_Unit_to_gnu): Process the expressions saved above.
701 2019-09-23 Eric Botcazou <ebotcazou@adacore.com>
703 * gcc-interface/trans.c (Attribute_to_gnu): Test Can_Use_Internal_Rep
704 on the underlying type of the node.
705 (Call_to_gnu): Likewise with the type of the prefix.
707 2019-09-23 Eric Botcazou <ebotcazou@adacore.com>
709 * gcc-interface/decl.c (components_to_record): Do not reorder fields
710 in packed record types if they contain fixed-size fields that cannot
711 be laid out in a packed manner.
713 2019-09-19 Tom Tromey <tromey@adacore.com>
715 * gcc-interface/misc.c (gnat_get_type_bias): Return the bias
716 when -fgnat-encodings=gdb.
718 2019-09-19 Steve Baird <baird@adacore.com>
720 * sem_prag.adb (Preferred_String_Type): A new function. Given an
721 expression, determines whether the preference rules defined for
722 the third-and-later arguments of pragma Annotate suffice to
723 determine the type of the expression. If so, then the preferred
724 type is returned; if not then Empty is returned. Handles
726 (Analyze_Pragma): Replace previous code, which dealt only with
727 string literals, with calls to the new Preferred_String_Type
728 function, which also handles concatenations.
729 * doc/gnat_rm/implementation_defined_pragmas.rst: Update
730 documentation for pragma Annotate.
731 * gnat_rm.texi: Regenerate.
733 2019-09-19 Eric Botcazou <ebotcazou@adacore.com>
735 * exp_util.adb (Is_Possibly_Unaligned_Slice): Do not return true
736 on pure alignment considerations if the target does not require
737 the strict alignment of memory accesses.
739 2019-09-19 Eric Botcazou <ebotcazou@adacore.com>
741 * sem_ch12.adb (Check_Private_View): Add a comment to indicate
744 2019-09-19 Eric Botcazou <ebotcazou@adacore.com>
746 * exp_aggr.adb (Has_Mutable_Components): Look at the underlying
747 type of components to find out whether they are mutable.
749 2019-09-19 Eric Botcazou <ebotcazou@adacore.com>
751 * sem_ch12.adb (Instantiate_Package_Body): Check that the body
752 has not already been instantiated when the body of the parent
755 2019-09-19 Eric Botcazou <ebotcazou@adacore.com>
757 * sem_util.adb (In_Instance): Test whether the current unit has
758 been analyzed instead of being on the scope stack to detect the
759 case of actuals of an instantiation of a generic child unit done
760 as a compilation unit.
762 2019-09-19 Dmitriy Anisimkov <anisimko@adacore.com>
764 * libgnat/g-socket.ads, libgnat/g-socket.adb
765 (Create_Socket_Pair): New routine.
766 * libgnat/g-socthi.ads (OS_Has_Socketpair): Boolean constant.
767 (C_Socketpair): New imported routine.
768 * libgnat/g-socthi__mingw.ads, libgnat/g-socthi__vxworks.ads
769 (Default_Socket_Pair_Family): New constant.
770 (C_Socketpair): New routine.
771 * libgnat/g-socthi__mingw.adb, libgnat/g-socthi__vxworks.adb
772 (C_Socketpair): Is separated in anouther file.
773 * libgnat/g-sthcso.adb (C_Socketpair): Non UNIX implementation.
774 * libgnat/g-stsifd__sockets.adb: Reuse C_Socketpair.
776 2019-09-19 Yannick Moy <moy@adacore.com>
778 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Simplify previous
781 2019-09-19 Ed Schonberg <schonberg@adacore.com>
783 * sem_ch7.adb (Install_Parent_Private_Declarations): If a
784 generic child unit is instantiated within a sibling child unit,
785 the analysis of its private part requires that the private part
786 of the ancestor be available, as is done when the context
787 includes an instance of the ancestor.
789 2019-09-19 Yannick Moy <moy@adacore.com>
791 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Add special
792 case for traversal functions.
794 2019-09-19 Yannick Moy <moy@adacore.com>
796 * sem_prag.adb (Analyze_Global_In_Decl_Part): Do not issue an
797 error when a constant of an access type is used as output in a
799 (Analyze_Depends_In_Decl_Part): Do not issue an error when a
800 constant of an access type is used as output in a Depends
803 2019-09-19 Arnaud Charlet <charlet@adacore.com>
805 * exp_attr.adb: Remove obsolete comment.
807 2019-09-19 Eric Botcazou <ebotcazou@adacore.com>
809 * sem_ch3.adb (Build_Derived_Access_Type): If this is an access-
810 to-subprogram type, copy Can_Use_Internal_Rep from the parent.
812 2019-09-19 Yannick Moy <moy@adacore.com>
814 * gcc-interface/Make-lang.in: Remove references to sem_spark.
815 * sem_spark.adb, sem_spark.ads: Remove unit.
817 2019-09-19 Eric Botcazou <ebotcazou@adacore.com>
819 * exp_attr.adb (Is_Inline_Floating_Point_Attribute): Treat
820 Machine_Rounding as an alias for Rounding.
821 * sem_res.adb (Simplify_Type_Conversion): Likewise.
823 2019-09-19 Gary Dismukes <dismukes@adacore.com>
825 * exp_unst.adb (Unnest_Subprogram): Bypass the transformation of
826 up-level references unless Opt.Generate_C_Code is enabled.
828 2019-09-19 Eric Botcazou <ebotcazou@adacore.com>
830 * exp_ch4.adb (Expand_Array_Equality): If optimization is
831 enabled, generate a simple conjunction of comparisons for the
832 specific case of constrained 1-dimensional 2-element arrays.
835 2019-09-19 Piotr Trojanek <trojanek@adacore.com>
837 * exp_dbug.ads, exp_dbug.adb (Get_Homonym_Number): Remove.
838 (Append_Homonym_Number): Use Homonym_Number instead of
840 * exp_util.ads, exp_util.adb (Homonym_Number): Mirror style of
841 the removed Get_Homonym_Number routine, i.e. initialize local
842 objects at declaration and refine the type of result.
843 * sem_util.adb (Add_Homonym_Suffix): Use Homonym_Number instead
844 of Get_Homonym_Number.
846 2019-09-19 Ed Schonberg <schonberg@adacore.com>
848 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Simplify
849 handling of expressions in predicates when the context is a
852 2019-09-19 Bob Duff <duff@adacore.com>
854 * sem_attr.adb (Resolve_Attribute): Make sure the secondary
855 stack is properly managed in the case of a 'Range attribute in a
858 2019-09-19 Raphael Amiard <amiard@adacore.com>
860 * libgnat/a-cfhase.ads (Set): Add comments to public primitives.
862 2019-09-19 Raphael Amiard <amiard@adacore.com>
864 * libgnat/a-cbhama.ads, libgnat/a-cbhase.ads,
865 libgnat/a-chtgop.ads (Clear): Refine comments
867 2019-09-19 Eric Botcazou <ebotcazou@adacore.com>
869 * sem_ch12.adb (Restore_Private_Views): Comment out new code
870 that clear the Is_Generic_Actual_Type also on the full view.
872 2019-09-19 Bob Duff <duff@adacore.com>
874 * exp_ch3.adb (Rewrite_As_Renaming): Return False if there are
875 any aspect specifications, because otherwise Insert_Actions
878 2019-09-19 Eric Botcazou <ebotcazou@adacore.com>
880 * exp_ch6.adb (Add_Simple_Call_By_Copy_Code): Add
881 Bit_Packed_Array parameter and documet it. Always insert a copy
883 (Expand_Actuals): Adjust the calls to
884 Add_Simple_Call_By_Copy_Code.
886 2019-09-19 Bob Duff <duff@adacore.com>
888 * xref_lib.adb (Get_Symbol_Name): If we reach EOF in the first
889 loop without finding the symbol, return "???". Otherwise, it's
891 (Parse_EOL): Assert that we're not already at EOF. Remove
892 processing of LF/CR -- there are no operating systems that use
895 2019-09-19 Eric Botcazou <ebotcazou@adacore.com>
897 * exp_ch6.adb (Is_Legal_Copy): Also return false for an aliased
898 formal and a formal passed by reference in convention Ada. Add
899 missing guard to the existing test on Is_Valued_Procedure.
901 2019-09-19 Bob Duff <duff@adacore.com>
903 * rtsfind.ads (RTE_Available): Improve comment.
905 2019-09-18 Bob Duff <duff@adacore.com>
907 * exp_ch5.adb (Expand_Assign_Array_Loop_Or_Bitfield): Move call
908 to RTE_Available later, so it doesn't disturb the elab order.
909 The RE_Copy_Bitfield entity is defined in package
910 System.Bitfields which has a dependency on package
911 System.Bitfield_Utils, which has it its spec:
912 pragma Elaborate_Body;
913 The query on RTE_Available forces loading and analyzing
914 System.Bitfields and all its withed units.
916 2019-09-18 Eric Botcazou <ebotcazou@adacore.com>
918 * checks.ads (Alignment_Warnings_Record): Add P component.
919 * checks.adb (Apply_Address_Clause_Check): Be prepared to kill
920 the warning also if the clause is of the form X'Address.
921 (Validate_Alignment_Check_Warning): Kill the warning if the
922 clause is of the form X'Address and the alignment of X is
925 2019-09-18 Ed Schonberg <schonberg@adacore.com>
927 * sem_res.adb (Set_Mixed_Node_Expression): If a conditional
928 expression has universal_real alternaitves and the context is
929 Universal_Fixed, as when it is an operand in a fixed-point
930 multiplication or division, resolve the expression with a
931 visible fixed-point type, which must be unique.
933 2019-09-18 Ed Schonberg <schonberg@adacore.com>
935 * sem_ch3.adb (Constrain_Component_Type): For a discriminated
936 type, handle the case of a constraint given by a conversion of a
937 discriminant of the enclosing type. Necessary when compiling a
938 discriminated task for a restricted run-time, when the generated
939 Secondary_Stack component may be set by means of an aspect on
942 2019-09-18 Ed Schonberg <schonberg@adacore.com>
944 * exp_aggr.adb (Expand_Record_Aggregate, Rewrite_Discriminant):
945 After rewriting a reference to an outer discriminant as a
946 selected component of the enclosing object, analyze the selected
947 component to ensure that the entity of the selector name is
948 properly set. This is necessary when the aggregate appears
949 within an expression that may have been analyzed already.
951 2019-09-18 Justin Squirek <squirek@adacore.com>
953 * sem_ch8.adb (Use_One_Type): Add guard to prevent warning on a
954 reundant use package clause where there is no previous
955 use_clause in the chain.
957 2019-09-18 Justin Squirek <squirek@adacore.com>
959 * exp_ch4.adb (Expand_N_Type_Conversion): Add calculation of an
960 alternative operand for the purposes of generating accessibility
963 2019-09-18 Eric Botcazou <ebotcazou@adacore.com>
965 * exp_aggr.adb (Build_Array_Aggr_Code): In STEP 1 (c), duplicate
966 the expression and reset the Loop_Actions for each loop
967 generated for an others choice.
969 2019-09-18 Justin Squirek <squirek@adacore.com>
971 * einfo.adb, einfo.ads (Minimum_Accessibility): Added new field.
972 (Set_Minimum_Accessibility): Added to set new field.
973 (Minimum_Accessibility): Added to fetch new field.
974 * exp_ch6.adb (Expand_Subprogram_Call): Modify calls to fetch
975 accessibility levels to the new subprogram Get_Accessibility
976 which handles cases where minimum accessibility might be needed.
977 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Add section to
978 generate a Minimum_Accessibility object within relevant
980 * sem_util.adb, sem_util.ads (Dynamic_Accessibility_Level):
981 Additional documentation added and modify section to use new
982 function Get_Accessibility.
983 (Get_Accessibility): Added to centralize processing of
984 accessibility levels.
986 2019-09-18 Steve Baird <baird@adacore.com>
988 * sem_util.ads (Interval_Lists): A new visible package. This
989 package is visible because it is also intended for eventual use
990 in Sem_Eval.Subtypes_Statically_Compatible when that function is
991 someday upgraded to handle static predicates correctly. This
992 new package doesn't really need to be visible for now, but it
993 still seems like a good idea.
994 * sem_util.adb (Gather_Components): Implement AI12-0086 via the
995 following strategy. The existing code knows how to take a static
996 discriminant value and identify the corresponding variant; in
997 the newly-permitted case of a non-static value of a static
998 subtype, we arbitrarily select a value of the subtype and find
999 the corresponding variant using the existing code. Subsequently,
1000 we check that every other value of the discriminant's subtype
1001 corresponds to the same variant; this is done using the newly
1002 introduced Interval_Lists package.
1003 (Interval_Lists): Provide a body for the new package.
1005 2019-09-18 Javier Miranda <miranda@adacore.com>
1007 * exp_ch4.adb (Expand_N_Op_Eq): The frontend assumes that we can
1008 do a bit-for-bit comparison of two access to protected
1009 subprogram pointers. However, there are two reasons why we may
1010 not be able to do that: (1) there may be padding bits for
1011 alignment before the access to subprogram, and (2) the access to
1012 subprogram itself may not be compared bit-for- bit because the
1013 activation record part is undefined: two pointers are equal iff
1014 the subprogram addresses are equal. This patch fixes it by
1015 forcing a field-by-field comparison.
1016 * bindgen.adb (Gen_Adainit): The type No_Param_Proc is defined
1017 in the library as having Favor_Top_Level, but when we create an
1018 object of that type in the binder file we don't have that
1019 pragma, so the types are different. This patch fixes this issue.
1020 * libgnarl/s-interr.adb, libgnarl/s-interr__hwint.adb,
1021 libgnarl/s-interr__sigaction.adb, libgnarl/s-interr__vxworks.adb
1022 (Is_Registered): This routine erroneously assumes that the
1023 access to protected subprogram is two addresses. We need to
1024 create the same record that the compiler makes to ensure that
1025 any padding is the same. Then we have to look at just the first
1026 word of the access to subprogram. This patch fixes this issue.
1028 2019-09-18 Bob Duff <duff@adacore.com>
1030 * exp_ch5.adb (Expand_Assign_Array_Loop_Or_Bitfield): The call
1031 to Copy_Bitfield is now enabled.
1032 (Expand_Assign_Array_Bitfield): Multiply 'Length times
1033 'Component_Size "by hand" instead of using 'Size.
1035 2019-09-18 Vasiliy Fofanov <fofanov@adacore.com>
1037 * doc/gnat_rm/implementation_defined_pragmas.rst: Fix minor
1040 2019-09-18 Javier Miranda <miranda@adacore.com>
1042 * exp_disp.adb (Make_DT, Make_Secondary_DT): Remove generation
1043 of alignment representation clause for the following tables:
1044 Predef_Prims, Iface_DT, TSD, ITable, DT.
1046 2019-09-18 Steve Baird <baird@adacore.com>
1048 * sem_eval.adb (Expr_Value): Do not fail "the type of a null
1049 literal must be an access type" assertion if errors have already
1050 been posted on the given node.
1052 2019-09-18 Piotr Trojanek <trojanek@adacore.com>
1054 * exp_dbug.ads, exp_dbug.adb (Get_Homonym_Number): Refine type
1056 * sem_util.adb (Add_Homonym_Suffix): Refine type of a local
1059 2019-09-18 Yannick Moy <moy@adacore.com>
1061 * exp_dbug.adb (Append_Homonym_Number): Use new function
1063 (Get_Homonym_Number): New function to return the homonym number.
1064 (Qualify_Entity_Name): Remove special case for GNATprove.
1065 * exp_dbug.ads (Get_Homonym_Number): Make the new function
1066 public for use in GNATprove.
1067 * frontend.adb (Frontend): Do not qualify names in GNATprove
1069 * sem_util.adb (Unique_Name): Append homonym suffix where needed
1070 for entities which have local homonyms in the same scope.
1072 2019-09-18 Nicolas Roche <roche@adacore.com>
1074 * libgnat/s-valrea.adb (Scan_Integral_Digits): New procedure.
1075 (Scan_Decimal_Digits): New procedure.
1076 (As_Digit): New function.
1077 (Scan_Real): Use Scan_Integral_Digits and Scan_Decimal_Digits.
1079 2019-09-18 Claire Dross <dross@adacore.com>
1081 * exp_attr.adb (Expand_N_Attribute_Reference): Call routine from
1082 Exp_Util to know the value of the Constrained attribute in the
1084 * exp_spark.adb (Expand_SPARK_N_Attribute_Reference): Make
1085 implicit dereferences inside the Constrained attribute explicit.
1086 * exp_util.ads, exp_util.adb
1087 (Attribute_Constrained_Static_Value): New routine to compute the
1088 value of a statically known reference to the Constrained
1091 2019-09-18 Vadim Godunko <godunko@adacore.com>
1093 * libgnat/g-expect.adb (Expect_Internal): Don't include invalid
1094 file descriptors into the set of file descriptors for Poll.
1095 Raise Process_Died exception when computed set of file
1096 descriptors to monitor is empty.
1098 2019-09-18 Frederic Konrad <konrad@adacore.com>
1100 * adaint.c: Include dosFsLib.h and vwModNum.h for VxWorks 6.
1101 (__gnat_rename): Map S_dosFsLib_FILE_NOT_FOUND to ENOENT.
1103 2019-09-18 Steve Baird <baird@adacore.com>
1105 * freeze.adb (Freeze_Object_Declaration): Do not call
1106 Check_Large_Modular_Array when the object declaration being
1107 frozen is an ignored ghost entity.
1109 2019-09-18 Tom Tromey <tromey@adacore.com>
1111 * make.adb (Initialize): Fix typo.
1113 2019-09-18 Olivier Hainque <hainque@adacore.com>
1115 * libgnat/s-win32.ads (DWORD_PTR): New type, pointer size
1117 (SYSTEM_INFO): Use it for dwActiveProcessorMask.
1119 2019-09-18 Arnaud Charlet <charlet@adacore.com>
1121 * doc/gnat_rm/implementation_defined_pragmas.rst: Improve doc on
1123 * gnat_rm.texi: Regenerate.
1125 2019-09-18 Arnaud Charlet <charlet@adacore.com>
1127 * doc/gnat_rm/implementation_defined_characteristics.rst,
1128 doc/gnat_rm/implementation_defined_pragmas.rst,
1129 doc/gnat_rm/implementation_of_specific_ada_features.rst: Remove
1130 remaining references to VMS support
1131 * gnat_rm.texi: Regenerate.
1133 2019-09-18 Arnaud Charlet <charlet@adacore.com>
1135 * libgnat/s-stausa.adb: Fix a typo
1137 2019-09-18 Bob Duff <duff@adacore.com>
1139 * libgnat/a-cbhama.adb, libgnat/a-cbhase.adb,
1140 libgnat/a-cbmutr.adb, libgnat/a-cborma.adb,
1141 libgnat/a-cborse.adb, libgnat/a-cobove.adb (Copy): Avoid reading
1142 the uninitialized variable C in the Checks = False case. Change
1143 variable to be a constant.
1145 2019-09-18 Claire Dross <dross@adacore.com>
1147 * libgnat/a-cofuma.adb (Remove, Elements_Equal_Except,
1148 Keys_Included, Keys_Included_Except): Rename loop indexes and
1149 global constants from I to J.
1151 2019-09-18 Arnaud Charlet <charlet@adacore.com>
1153 * exp_unst.adb (Unnest_Subprograms): Refine previous change.
1155 2019-09-17 Claire Dross <dross@adacore.com>
1157 * libgnat/a-cofuma.ads, libgnat/a-cofuma.adb (Remove): New
1158 function which returns a copy of the input container without a
1161 2019-09-17 Yannick Moy <moy@adacore.com>
1163 * libgnat/s-arit64.adb (Double_Divide): Correctly handle the
1164 special case when rounding.
1166 2019-09-17 Javier Miranda <miranda@adacore.com>
1168 * sem_ch3.adb (Complete_Private_Subtype): Propagate attributes
1169 Has_Attributes and Predicate_Function to the cloned subtype.
1171 2019-09-17 Eric Botcazou <ebotcazou@adacore.com>
1173 * sem.adb (Do_Analyze): Save Style_Check_Max_Line_Length on
1174 entry and restore it on exit instead of recomputing it.
1176 2019-09-17 Tom Tromey <tromey@adacore.com>
1178 * exp_dbug.ads: Update character type comment.
1180 2019-09-17 Yannick Moy <moy@adacore.com>
1182 * libgnat/s-arit64.adb (Double_Divide): Simplify needlessly
1183 complex computation. Fix comments.
1184 (Scaled_Divide): Fix comments. Explain why implementation does
1185 not suffer from bugs in Algorithm D from 2nd Edition of TAOCP.
1187 2019-09-17 Yannick Moy <moy@adacore.com>
1189 * libgnat/s-arit64.adb (Scaled_Divide): Add protection against
1190 undesirable wrap-around.
1192 2019-09-17 Yannick Moy <moy@adacore.com>
1194 * libgnat/s-arit64.adb (Double_Divide): Fix two possible
1197 2019-09-17 Dmitriy Anisimkov <anisimko@adacore.com>
1199 * make_util.ads (On_Windows): Move...
1200 * osint.ads (On_Windows): There.
1201 * osint.adb (OS_Time_To_GNAT_Time): If odd incremented on
1202 Windows before conversion to Time_Stamp_Type.
1204 2019-09-17 Yannick Moy <moy@adacore.com>
1206 * sem_spark.adb (Check_Declaration): Do not check the assignment
1207 from an illegal declaration.
1209 2019-09-17 Bob Duff <duff@adacore.com>
1211 * doc/gnat_ugn/gnat_and_program_execution.rst: Clarify
1213 * gnat_ugn.texi: Regenerate.
1214 * libgnat/s-stausa.ads: Clarify comments.
1216 2019-09-17 Steve Baird <baird@adacore.com>
1218 * sem_util.adb (Wrong_Type): In deciding to suppress a message,
1219 it is not enough for In_Instance to be True; in addition,
1220 In_Generic_Actual (Expr) must be False.
1221 * sem_type.adb (In_Generic_Actual): Fix bug where traversal of
1222 parents skips every other node.
1224 2019-09-17 Claire Dross <dross@adacore.com>
1226 * sem_spark.adb (Get_Observed_Or_Borrowed_Expr): If the
1227 definition of a local borrower contains calls to traversal
1228 functions, the borrowed expression is the first parameter of the
1229 first traversal function call in the definition.
1231 2019-09-17 Ed Falis <falis@adacore.com>
1233 * doc/gnat_rm/implementation_defined_pragmas.rst: Remove
1235 * gnat_rm.texi, gnat_ugn.texi: Regenerate.
1237 2019-09-17 Vadim Godunko <godunko@adacore.com>
1239 * libgnat/g-exptty.ads (Close_Input): New subprogram.
1240 * libgnat/g-exptty.adb (Close_Input): New subprogram.
1241 (Close): Move close of TTY to Close_Input.
1242 * terminals.c (__gnat_close_tty): Set file descriptors to
1243 invalid value after close.
1245 2019-09-17 Vadim Godunko <godunko@adacore.com>
1247 * libgnat/g-expect.adb (Expect_Internal): Try to call 'poll' few
1250 2019-09-17 Vadim Godunko <godunko@adacore.com>
1252 * libgnat/g-expect.ads, libgnat/g-expect.adb (Close_Input): New
1254 (Get_Command_Output): Call Close_Input to close input stream.
1255 (Expect_Internal): Likewise.
1257 * libgnat/g-exptty.adb (Close): Likewise.
1259 2019-09-17 Piotr Trojanek <trojanek@adacore.com>
1261 * sem_util.ads, sem_util.adb (Is_Attribute_Old): New utility
1264 2019-09-17 Yannick Moy <moy@adacore.com>
1266 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Add handling
1267 for dispatching operations.
1269 2019-09-17 Ed Schonberg <schonberg@adacore.com>
1271 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): In a
1272 generic context, for a Predicate aspect, use
1273 Preanalyze_Spec_Expression to verify conformance.
1275 2019-09-17 Javier Miranda <miranda@adacore.com>
1277 * sem_ch3.adb (Constrain_Corresponding_Record): Propagate
1278 attribute Is_Tagged_Type.
1280 2019-09-17 Javier Miranda <miranda@adacore.com>
1282 * exp_ch3.adb (Build_Record_Init_Proc): Do not generate code to
1283 adjust the tag component when the record is initialized with a
1285 * sem_aggr.adb (Valid_Limited_Ancestor): Return True for
1286 N_Raise_Expression nodes.
1287 (Valid_Ancestor_Type): Return True for raise expressions.
1288 * sem_ch3.adb (Analyze_Component_Declaration): Do not report an
1289 error when a component is initialized with a raise expression.
1290 * sem_ch4.adb (Analyze_Qualified_Expression): Do not report an
1291 error when the aggregate has a raise expression.
1293 2019-09-17 Piotr Trojanek <trojanek@adacore.com>
1295 * ali.ads: Fix casing in comment.
1296 * ali-util.ads, ali-util.adb (Read_Withed_ALIs): Remove
1297 Ignore_Errors parameter; it was only set to non-default value of
1298 True when running in GNATprove_Mode and wrongly reset to False
1299 when calling this routine recursively. Now in GNATprove mode we
1300 want it to be always True, so in fact it is equivalent to
1301 GNATProve_Mode flag itself (which was already used in this
1304 2019-09-17 Arnaud Charlet <charlet@adacore.com>
1306 * adaint.c (_REENTRANT, _THREAD_SAFE): Only define if needed.
1308 2019-09-17 Arnaud Charlet <charlet@adacore.com>
1310 * libgnat/s-bitfie.ads (Val_Bits, Val_Bytes): Define from
1311 Long_Long_Integer'Size.
1313 2019-09-17 Javier Miranda <miranda@adacore.com>
1315 * exp_ch6.ads (Needs_BIP_Task_Actuals): New subprogram.
1316 * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call): Code
1318 (Check_Number_Of_Actuals): New subprogram.
1319 (Make_Build_In_Place_Call_In_Allocator): Adding assertion.
1320 (Make_Build_In_Place_Call_In_Anonymous_Context): Adding
1322 (Make_Build_In_Place_Call_In_Assignment): Adding assertion.
1323 (Make_Build_In_Place_Call_In_Object_Declaration): Code cleanup
1324 plus assertion addition.
1325 (Needs_BIP_Task_Actuals): New subprogram.
1326 * sem_ch6.adb (Create_Extra_Formals): Rely on
1327 Needs_BIP_Task_Actuals() to check if the master of the tasks to
1328 be created, and the caller's activation chain formals are
1331 2019-09-17 Bob Duff <duff@adacore.com>
1333 * libgnat/s-bituti.adb (Get_Val_2, Set_Val_2): Use new routines
1334 for getting and setting a Val_2, avoiding touching the second
1335 half when that half might not exist.
1336 * exp_ch5.adb (Expand_Assign_Array_Loop_Or_Bitfield): Correct
1337 tests for potential volatile or independent components. In
1338 particular, do not call Prefix unless we know it's a slice.
1340 2019-09-17 Dmitriy Anisimkov <anisimko@adacore.com>
1342 * gsocket.h: Include sys/un.h.
1343 * s-oscons-tmplt.c (AF_UNIX): New constant generation.
1344 (SIZEOF_sockaddr_un): Idem.
1345 * libgnat/g-socket.ads (Family_Type): New value Family_Unix
1347 (Family_Inet_4_6): New subtype only for network families.
1348 (Sock_Addr_Type): Add Unbounded_String field for Family_Unix
1350 (Unix_Socket_Address): Create Sock_Addr_Type from socket
1352 (Network_Socket_Address): Create Sock_Addr_Type from
1353 Inet_Addr_Type and Port_Type parameters.
1354 * libgnat/g-socket.adb: Support local unix address in socket
1356 (Get_Address_Info): Disable warning about Result may be
1357 referenced before it has a value. Remove duplicated code to exit
1358 from Look_For_Supported.
1359 * libgnat/g-sothco.ads (Unix_Name_Length): New constant defining
1360 maximum number of characters in local socket address path.
1361 (Sockaddr): Add variant for Family_Unix address family. Move
1362 Sin_Port and Sin_Family to Family_Inet section. Add Sin6_Port
1363 and Sin6_Family to Family_Inet6 section.
1364 (Set_Address): Add out parameter Length to return valuable
1365 Sockaddr data length.
1366 (Get_Address): Add input parameter Length to set valuable
1367 Sockaddr data length.
1368 * libgnat/g-sothco.adb: Support local unix address in socket
1371 2019-09-17 Eric Botcazou <ebotcazou@adacore.com>
1373 * exp_attr.adb (Expand_Size_Attribute): Chain the special cases
1374 on the back-end path and rewrite the attribute appled to slices
1375 of bit-packed arrays into the product of the Length and the
1376 Compoent_Size attributes of the slices.
1377 * exp_ch5.adb (Expand_Assign_Array_Bitfield): Use Size attribute
1378 directly to compute the bitfield's size.
1380 2019-09-17 Bob Duff <duff@adacore.com>
1382 * exp_ch5.adb (Expand_Assign_Array_Loop_Or_Bitfield): Add tests
1383 for potential volatile or independent components.
1384 * libgnat/s-bituti.adb (Copy_Small_Bitfield,
1385 Copy_Large_Bitfield): Move declarations to more appropriate
1388 2019-09-13 Maciej W. Rozycki <macro@wdc.com>
1390 * make.adb (Scan_Make_Arg): Also accept `--sysroot=' for the
1391 compiler and the linker.
1393 2019-08-30 Eric Botcazou <ebotcazou@adacore.com>
1395 * gcc-interface/decl.c (maybe_saturate_size): New function.
1396 (gnat_to_gnu_entity): Invoke it on the Esize of types before sending
1397 it for back-annotations.
1398 * gcc-interface/trans.c: Fix typo.
1400 2019-08-30 Eric Botcazou <ebotcazou@adacore.com>
1402 * gcc-interface/ada-tree.h (DECL_FORCED_BY_REF_P): New macro.
1403 * gcc-interface/decl.c (gnat_to_gnu_param): Set it on parameters
1404 whose mechanism was forced to by-reference.
1405 * gcc-interface/trans.c (Call_to_gnu): Do not issue a warning about a
1406 misaligned actual parameter if it is based on a CONSTRUCTOR. Remove
1407 obsolete warning for users of Starlet. Issue a warning if a temporary
1408 is make around the call for a parameter with DECL_FORCED_BY_REF_P set.
1409 (addressable_p): Return true for REAL_CST and ADDR_EXPR.
1411 2019-08-30 Eric Botcazou <ebotcazou@adacore.com>
1413 * gcc-interface/trans.c (gnat_to_gnu): Do not set the location on an
1414 expression used for a tag.
1416 2019-08-30 Eric Botcazou <ebotcazou@adacore.com>
1418 * gcc-interface/gigi.h (aggregate_type_contains_array_p): Declare.
1419 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: For an
1420 extension, test Has_Record_Rep_Clause instead of Has_Specified_Layout.
1421 (adjust_packed): Return 0 if the type of the field is an aggregate
1422 type that contains (or is) a self-referential array.
1423 (type_has_variable_size): Delete.
1424 * gcc-interface/utils.c (inish_record_type): Constify a variable.
1425 (aggregate_type_contains_array_p): Add parameter SELF_REFERENTIAL.
1426 <RECORD_TYPE>: Pass it in the recursive call.
1427 <ARRAY_TYPE>: If it is true, return true only if the array type is
1429 (create_field_decl): Streamline the setting of the alignment on the
1430 field. Pass false to aggregate_type_contains_array_p.
1432 2019-08-30 Eric Botcazou <ebotcazou@adacore.com>
1434 * gcc-interface/trans.c (lvalue_required_p) <N_Slice>: Adjust GNU_TYPE
1435 in the recursive call.
1436 <N_Selected_Component>: Likewise.
1438 2019-08-30 Eric Botcazou <ebotcazou@adacore.com>
1440 * gcc-interface/utils.c (build_template): Deal with parameters
1441 passed by pointer to component of multi-dimensional arrays.
1443 2019-08-30 Eric Botcazou <ebotcazou@adacore.com>
1445 * gcc-interface/decl.c (annotate_value) <CALL_EXPR>: Inline the call
1446 also if List_Representation_Info is greater than 3.
1448 2019-08-30 Eric Botcazou <ebotcazou@adacore.com>
1450 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Size>: Add assertion.
1452 2019-08-30 Eric Botcazou <ebotcazou@adacore.com>
1454 * gcc-interface/gigi.h (gigi_checking_assert): New macro.
1455 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Modular_Integer_Type>:
1456 Remove redundant test and adjust comments. Minor tweaks.
1457 * gcc-interface/trans.c (Call_to_gnu): Do not generate range checks,
1458 instead assert that the Do_Range_Check flag is not set. Adjust call
1459 to convert_with_check.
1460 (gnat_to_gnu): Likewise.
1461 (assoc_to_constructor): Likewise.
1462 (pos_to_constructor): Likewise. Remove GNAT_COMPONENT_TYPE parameter.
1463 (emit_range_check): Delete.
1464 (convert_with_check): Remove RANGE_P parameter and adjust. Do a single
1465 overflow check for modular types.
1467 2019-08-23 Jakub Jelinek <jakub@redhat.com>
1470 * gcc-interface/misc.c (gnat_post_options): Set flag_excess_precision
1471 instead of flag_excess_precision_cmdline.
1473 2019-08-21 Vadim Godunko <godunko@adacore.com>
1475 * libgnat/g-expect.adb (Expect_Internal): Attempt to read
1476 several times when 'read' returns non-positive.
1478 2019-08-21 Piotr Trojanek <trojanek@adacore.com>
1480 * einfo.adb (Is_Discriminal): Remove extra parens.
1481 (Is_Constant_Object): Simplify by reusing Ekind_In.
1482 (Is_Prival): Remove extra parens.
1483 * checks.adb, exp_ch4.adb, sem_ch3.adb, sem_spark.adb: Minor
1486 2019-08-21 Claire Dross <dross@adacore.com>
1488 * libgnat/a-cofove.ads (Vector): Add an Iterable aspect to allow
1490 (Iter_First, Iter_Next): Primitives used for iteration.
1492 2019-08-21 Yannick Moy <moy@adacore.com>
1494 * sem_ch3.adb (Analyze_Subtype_Declaration): Inherit RM_Size
1495 field for formal type parameters in generic instantiations.
1497 2019-08-21 Yannick Moy <moy@adacore.com>
1499 * sem_spark.adb: Update references to the SPARK RM.
1501 2019-08-21 Eric Botcazou <ebotcazou@adacore.com>
1503 * repinfo.adb (List_Array_Info): In -gnatR4 mode, set the
1504 relevant flag on the component type here instead of...
1505 (List_Object_Info): Likewise for the object type.
1506 (List_Entities): ...here. In -gnatR4 mode, recurse into
1507 entities local to a record type.
1508 (List_Component_Layout): In -gnatR4 mode, mark the type as
1511 2019-08-21 Bob Duff <duff@adacore.com>
1513 * Makefile.rtl (GNATRTL_NONTASKING_OBJS): Add s-bitutil.o and
1515 * exp_ch5.adb (Expand_Assign_Array_Bitfield): New function to
1516 generate a call to Copy_Bitfield. This is disabled for now.
1517 (Expand_Assign_Array_Loop_Or_Bitfield): New function to decide
1518 whether to call Expand_Assign_Array_Bitfield.
1519 (Expand_Assign_Array): Call Expand_Assign_Array_Loop_Or_Bitfield
1520 instead of Expand_Assign_Array_Loop.
1521 * libgnat/s-bitfie.ads, libgnat/s-bituti.adb,
1522 libgnat/s-bituti.ads: New units.
1523 * rtsfind.ads: Add enum literals for accessing Copy_Bitfield.
1525 2019-08-21 Piotr Trojanek <trojanek@adacore.com>
1527 * bindo-graphs.ads (Iterate_Edges_To_Successors): Fix typo in
1529 * bindo-graphs.adb (Delete_Edge): Fix layout in parameter list.
1531 2019-08-21 Gary Dismukes <dismukes@adacore.com>
1533 * exp_ch3.adb (Build_Master): Suppress call to
1534 Build_Class_Wide_Master in the case where the
1535 access-to-limited-class-wide type was created for a component in
1536 an entry's formal parameter
1537 block (Is_Parameter_Block_Component_Type), to prevent a master
1538 from being created for such access types generated by the front
1539 end in a task spec for entry formals in a parameter block. Add
1540 a ??? about whether this suppression should be done more
1541 generally (such as by using Comes_From_Source).
1543 2019-08-21 Eric Botcazou <ebotcazou@adacore.com>
1545 * exp_ch6.adb (Expand_N_Extended_Return_Statement): In the case
1546 of a built-in-place function that doesn't need a BIP_Alloc_Form
1547 parameter but returns unconstrained, build the return
1548 consistently using the function's result subtype. Remove bypass
1549 added in previous change.
1551 2019-08-21 Piotr Trojanek <trojanek@adacore.com>
1553 * sem_prag.adb (Max_Entry_Queue_Length): Do not substitute
1554 expression of the pragma argument with its value during
1556 * sem_util.adb (Get_Max_Queue_Length): Compute value of the
1557 pragma argument when needed.
1559 2019-08-21 Yannick Moy <moy@adacore.com>
1561 * checks.adb (Install_Null_Excluding_Check): Do not install
1562 check in GNATprove mode.
1564 2019-08-21 Yannick Moy <moy@adacore.com>
1566 * sem_spark.adb (Process_Path): Do nothing on address of
1569 2019-08-21 Eric Botcazou <ebotcazou@adacore.com>
1571 * exp_util.adb (Finalize_Address): Deal consistently with
1572 subtypes of private protected types.
1574 2019-08-21 Piotr Trojanek <trojanek@adacore.com>
1576 * exp_util.adb (Corresponding_Runtime_Package): Use high-level
1578 * sem_ch8.adb (Analyze_Renamed_Entry): Likewise.
1579 * sem_ch9.adb (Analyze_Requeue): Likewise.
1581 2019-08-21 Javier Miranda <miranda@adacore.com>
1583 * sem_util.adb (Update_Named_Associations): Update
1584 First_Named_Actual when the subprogram call has a single named
1587 2019-08-21 Joel Brobecker <brobecker@adacore.com>
1589 * doc/Makefile (mk_empty_dirs): New (PHONY) rule.
1590 (%.html, %.pdf, %.txt, %.info, %.texinfo): Add dependencies on
1593 2019-08-21 Justin Squirek <squirek@adacore.com>
1595 * doc/gnat_rm/implementation_defined_pragmas.rst: Modify
1596 documentation to reflect expected behavior.
1597 * gnat_rm.texi: Regenerate.
1598 * sem_prag.adb (Analyze_Pragma): Modify handling of pragma
1599 Max_Entry_Queue_Length to not reject integer values of negative
1601 * sem_util.adb (Get_Max_Queue_Length): Add processing for values
1602 of negative one to fit within the current scheme.
1604 2019-08-20 Arnaud Charlet <charlet@adacore.com>
1606 * exp_unst.adb (Unnest_Subprograms, Unnest_Subprogram): Take
1607 inlining (-gnatn) into account.
1609 2019-08-20 Ed Schonberg <schonberg@adacore.com>
1611 * exp_ch13.adb (Expand_N_Attribute_Definition_Clause, case
1612 Storage_Size): If the expression for Storage_Size is not static
1613 it may depend on characterstics of another type that may bot be
1614 frozen yet, so the elaboration of the expression for the aspect
1615 must be attached directly to the freeze actions of the type to
1618 2019-08-20 Piotr Trojanek <trojanek@adacore.com>
1620 * exp_util.adb (Build_DIC_Procedure_Declaration): Set the last
1621 entity of the generated Default_Initial_Condition procedure in
1622 order to construct a proper entity chain.
1624 2019-08-20 Yannick Moy <moy@adacore.com>
1626 * exp_spark.adb (Expand_SPARK_N_Slice_Or_Indexed_Component):
1627 Renaming of function to apply to slices as well.
1628 (Expand_SPARK): Expand prefix of slices of access type.
1630 2019-08-20 Bob Duff <duff@adacore.com>
1632 * exp_aggr.adb (Expand_Array_Aggregate): Use build-in-place in
1633 the nonlimited case in STEP 4. This improves the efficiency of
1634 things like (1 .. 1000 => <>). We still generate some code for
1635 that, unfortunately, but it is much improved.
1636 (Aggr_Assignment_OK_For_Backend): Return false if <> components
1639 2019-08-20 Bob Duff <duff@adacore.com>
1641 * exp_ch6.adb (Needs_BIP_Alloc_Form): Call
1642 Requires_Transient_Scope rather than checking constrainedness
1643 and so forth. We have previously improved
1644 Requires_Transient_Scope to return False in various cases,
1645 notably a limited record with an access discriminant. This
1646 change takes advantage of that to avoid using the secondary
1647 stack for functions returning such types.
1648 (Make_Build_In_Place_Call_In_Allocator): Be consistent by
1649 calling Needs_BIP_Alloc_Form rather than Is_Constrained and so
1651 * sem_ch4.adb (Analyze_Allocator): The above change causes the
1652 compiler to generate code that is not legal Ada, in particular
1653 an uninitialized allocator for indefinite subtype. This is
1654 harmless, so we suppress the error message in this case.
1656 2019-08-20 Gary Dismukes <dismukes@adacore.com>
1658 * ali.adb, ali.ads, aspects.adb, checks.ads, checks.adb,
1659 doc/gnat_rm/implementation_defined_pragmas.rst,
1660 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
1661 einfo.ads, exp_aggr.adb, exp_ch11.adb, exp_ch3.ads, exp_ch4.adb,
1662 exp_disp.adb, inline.adb, libgnat/a-locale.ads,
1663 libgnat/s-soflin.ads, par_sco.adb, repinfo.adb, sem_ch5.adb,
1664 sem_disp.adb, sem_elab.adb, sem_eval.adb, sem_spark.adb,
1665 sem_spark.ads, sinfo.ads: Minor reformattings, typo fixes and
1668 2019-08-20 Dmitriy Anisimkov <anisimko@adacore.com>
1670 * adaint.c (__gnat_to_gm_time): On _WIN32, don't round time up
1673 2019-08-20 Ed Schonberg <schonberg@adacore.com>
1675 * sem_ch3.adb (Analyze_Object_Declaration): If actual type is
1676 private and distinct from nominal type in declaration, propagate
1677 flags Is_Constr_Subt_For_U_Nominal and _UN_Aliased to full view
1680 2019-08-20 Ed Schonberg <schonberg@adacore.com>
1682 * exp_attr.adb (Expand_Loop_Entry_Attribute): When expanding a
1683 loop entry attribute for a while_loop we construct a function
1684 that incorporates the expanded condition of the loop. The itypes
1685 that may be generated in that expansion must carry the scope of
1686 the constructed function for proper handling in gigi.
1688 2019-08-20 Ed Schonberg <schonberg@adacore.com>
1690 * exp_disp.adb (Build_Class_Wide_Check, Replace_Formals): When a
1691 dispatching call tp a subprogram with a class-wide precondition
1692 occurrs in the same declarative part as the ancestor subprogram
1693 being called, the`expression for the precondition has not been
1694 analyzed yet. Such a call may appear, e.g. in an expression
1695 function. In that case, the replacement of formals by actuals in
1696 the call cannot use the formal entities of the subprogram being
1697 called, and the occurrence of the formals in the expression must
1698 be located by name (Chars fields) as would be done at a later
1699 freeze point, when the expression is resolved in the context of
1700 the subprogram itself.
1702 2019-08-20 Bob Duff <duff@adacore.com>
1704 * sem_prag.adb (Persistent_BSS): If an initialization is present
1705 because of Initialize_Scalars or Normalize_Scalars, generate an
1706 implicit pragma Suppress_Initialization to remove that, because
1707 initialization is not allowed for these variables. Other
1708 initializations remain illegal.
1710 2019-08-20 Gary Dismukes <dismukes@adacore.com>
1712 * sem_ch3.adb (OK_For_Limited_Init_In_05): In the case of type
1713 conversions, apply the recursive call to the Original_Node of
1714 the expression Exp rather than the Expression of the
1715 Original_Node, in the case where Exp has been rewritten;
1716 otherwise, when Original_Node is the same as Exp, apply the
1717 recursive call to the Expression.
1718 (Check_Initialization): Revise condition for special check on
1719 type conversions of limited function calls to test Original_Node
1720 (avoiding spurious errors on expanded unchecked conversions
1721 applied to build-in-place dispatching calls).
1723 2019-08-20 Patrick Bernardi <bernardi@adacore.com>
1725 * exp_aggr.adb (Expand_Record_Aggregate): Always convert a
1726 record Aggregate to assignment statements if the option
1727 Aggregate_Individually_Assign is set.
1728 * opt.ads (Aggregate_Individually_Assign): New option.
1729 * par-prag.adb (Prag): Add Pragma_Aggregate_Individually_Assign.
1730 * sem_prag.adb (Analyze_Pragma): Likewise.
1731 * snames.ads-tmpl: Add Pragma_Aggregate_Individually_Assign and
1732 Name_Aggregate_Individually_Assign.
1733 * doc/gnat_rm/implementation_defined_pragmas.rst: Document
1734 pragma Aggregate_Individually_Assign.
1735 * gnat_rm.texi: Regenerate.
1737 2019-08-20 Bob Duff <duff@adacore.com>
1739 * par-ch4.adb: Minor wording change in error messages.
1740 * sem_aggr.adb (Resolve_Delta_Aggregate): Emit an error for Ada
1741 versions prior to Ada 2020.
1743 2019-08-20 Bob Duff <duff@adacore.com>
1745 * freeze.adb (Is_Atomic_VFA_Aggregate): Make the temp for
1746 initialization of the atomic variable be constant. This is
1747 cleaner, and might improve efficiency.
1749 2019-08-20 Eric Botcazou <ebotcazou@adacore.com>
1751 * repinfo.adb (List_Record_Info): In -gnatR4 mode, set the
1752 relevant flag on the implicit base type of a record subtype.
1754 2019-08-20 Bob Duff <duff@adacore.com>
1756 * sem_eval.adb (Expr_Value): Implement the case of an unchecked
1757 conversion of a static expression.
1759 2019-08-20 Bob Duff <duff@adacore.com>
1761 * sem_ch13.adb (Is_Null_Array): New function, used to detect the
1762 null array case; used to warn about uncheckedly converting to a
1763 zero-sized array. It is unfortunate that we can't just check
1764 the size, and warn on all cases of converting from a
1765 nonzero-sized type to a zero-sized one. That's because "0" means
1766 two different things: "size is zero" and "size is unknown".
1767 Until we fix that design flaw, we need this more targeted fix.
1769 2019-08-20 Bob Duff <duff@adacore.com>
1771 * libgnat/a-cborma.adb, libgnat/a-cborse.adb (Clear): Repeatedly
1772 call Delete. This avoids clearing the free list, which
1773 substantially speeds up future Delete operations.
1775 2019-08-20 Bob Duff <duff@adacore.com>
1777 * sem_ch13.adb (Component_Order_Check): New procedure to check
1778 for out-of-order clauses.
1779 * warnsw.ads, warnsw.adb: New -gnatw_r switch.
1780 * doc/gnat_ugn/building_executable_programs_with_gnat.rst:
1781 Document new switch.
1782 * gnat_ugn.texi: Regenerate.
1784 2019-08-20 Bob Duff <duff@adacore.com>
1786 * sem_ch13.adb (Object_Size): Give an error for zero. It really
1787 rubs me the wrong way that we don't honor "for T'Object_Size use
1788 0;", but it's not important enough to fix. In any case, if we're
1789 not going to obey the clause, we should give an error.
1791 2019-08-20 Bob Duff <duff@adacore.com>
1793 * errout.adb (Error_Msg_Internal): Set Warn_Err in case of
1795 * erroutc.adb (Output_Msg_Text): Do Warnings_Treated_As_Errors
1796 processing and [warning-as-error] modification for style
1797 messages. Clean up code, simplify, remove unnecessary block
1798 statement, add renaming of table entry.
1799 * erroutc.ads (Warning_Treated_As_Error): Fix comment: no such
1800 thing as Set_Warning_As_Error.
1801 * opt.ads: Clean up comments and move related declarations near
1803 * par-prag.adb: Process Warning_As_Error. This is necessary
1804 because many style warning happen during parsing.
1805 * sem_prag.adb: Use new Acquire_Warning_Match_String.
1806 * sem_util.ads, sem_util.adb (Acquire_Warning_Match_String): New
1807 function shared by par-prag.adb and sem_prag.adb. Replaces the
1808 procedure in sem_prag.adb. Avoid use of global variables.
1809 * stringt.ads, stringt.adb (To_String): New function to convert
1810 String_Id to String.
1811 * doc/gnat_rm/implementation_defined_pragmas.rst: Document the
1813 * gnat_rm.texi: Regenerate.
1815 2019-08-20 Eric Botcazou <ebotcazou@adacore.com>
1817 * lib.ads: Add with clause for GNAT.HTable.
1818 Add pragma Inline for Is_Loaded and alphabetize the list.
1819 (Unit_Name_Table_Size): New constant.
1820 (Unit_Name_Header_Num): New subtype.
1821 (Unit_Name_Hash): New function declaration.
1822 (Unit_Names): New simple hash table.
1823 (Init_Unit_Name): New procedure declaration.
1824 * lib.adb (Set_Unit_Name): Unregister the old name in the table,
1825 if any, and then register the new name.
1826 (Init_Unit_Name): New procedure.
1827 (Is_Loaded): Reimplement using a lookup in the names table.
1828 (Remove_Unit): Unregister the name.
1829 (Unit_Name_Hash): New function.
1830 * lib-load.adb (Create_Dummy_Package_Unit): Call Init_Unit_Name.
1831 (Load_Unit): Use a lookup in the names table to find out whether
1832 the unit has already been loaded. Call Init_Unit_Name and then
1833 Remove_Unit if the loading has failed.
1834 (Make_Child_Decl_Unit): Call Init_Unit_Name.
1835 (Make_Instance_Unit): Likewise.
1836 * lib-writ.adb (Ensure_System_Dependency): Likewise.
1838 2019-08-20 Bob Duff <duff@adacore.com>
1840 * sem_ch13.adb (Record_Hole_Check): Initialize After_Last.
1842 2019-08-20 Piotr Trojanek <trojanek@adacore.com>
1844 * impunit.adb (Get_Kind_Of_Unit): Revert change for adapting
1845 this routine for gnatprove.
1847 2019-08-20 Arnaud Charlet <charlet@adacore.com>
1849 * doc/gnat_rm/implementation_defined_pragmas.rst: Document
1850 requirements for Pragma Lock_Free.
1851 * gnat_rm.texi: Regenerate.
1853 2019-08-20 Philippe Gil <gil@adacore.com>
1855 * bindgen.adb (Gen_Main): Set gnat_argc/gnat_argv to argc/argv
1856 only when still uninitialized.
1858 2019-08-20 Bob Duff <duff@adacore.com>
1860 * libgnat/g-comlin.ads (Exit_From_Command_Line): Fix
1861 documentation for GNAT.Command_Line.
1863 2019-08-20 Pierre-Marie de Rodat <derodat@adacore.com>
1866 * gcc-interface/lang.opt (-fdump-scos): Add missing dot at the
1867 end of the documentation.
1869 2019-08-20 Richard Sandiford <richard.sandiford@arm.com>
1871 * gcc-interface/misc.c (default_pass_by_ref): Update call to
1874 2019-08-19 Bob Duff <duff@adacore.com>
1876 * doc/gnat_rm/implementation_advice.rst: Fix documentation for
1877 stream oriented attributes.
1878 * gnat_rm.texi: Regenerate.
1880 2019-08-19 Gary Dismukes <dismukes@adacore.com>
1882 * einfo.ads (E_Function, E_Procedure): Update comments to
1883 reflect that Renamed_Entity is also used for nongeneric
1886 2019-08-19 Eric Botcazou <ebotcazou@adacore.com>
1888 * sem_prag.adb (Is_Before_First_Decl): Deal with rewritten
1891 2019-08-19 Bob Duff <duff@adacore.com>
1893 * sem_warn.adb (Warn_On_Unreferenced_Entity): Suppress warning
1894 on formal parameters of dispatching operations.
1896 2019-08-19 Ed Schonberg <schonberg@adacore.com>
1898 * sem_res.adb (Resolve_Call): A call to an expression function
1899 freezes when expander is active, unless the call appears within
1900 the body of another expression function,
1902 2019-08-19 Dmitriy Anisimkov <anisimko@adacore.com>
1904 * libgnat/s-os_lib.ads, libgnat/s-os_lib.adb (To_Ada, To_C): New
1907 2019-08-19 Bob Duff <duff@adacore.com>
1909 * exp_attr.adb (Attribute_Valid): Correct the handling of
1910 private types where the full type is modular. System.Address is
1911 an example. Otherwise, we convert uncheckedly to a signed type,
1912 so we get an incorrect range 0 .. -1, for which all values will
1913 fail. The 'Valid attribute is illegal for such types, but we
1914 generate such illegal attribute_references for 'Valid_Scalars,
1915 and we generate 'Valid_Scalars when the -gnateV switch is used.
1916 Rename Btyp --> PBtyp to avoid hiding the outer Btyp, which was
1918 * libgnat/a-except.adb: Set the Exception_Raised component.
1919 Otherwise, we have incorrect reads of invalid data.
1921 2019-08-19 Pierre-Marie de Rodat <derodat@adacore.com>
1923 * libgnat/a-cgaaso.ads, libgnat/a-cgarso.ads,
1924 libgnat/a-cogeso.ads, libgnat/a-contai.ads,
1925 libgnat/a-locale.ads: Import documentation from the RM.
1927 2019-08-19 Jerome Guitton <guitton@adacore.com>
1929 * Makefile.rtl (system.o): New target to add generation of
1931 * gcc-interface/Makefile.in (install-gnatlib): Install
1932 ada_target_properties.
1934 2019-08-19 Eric Botcazou <ebotcazou@adacore.com>
1936 * inline.adb (Add_Inlined_Body): Do not special-case instances
1937 that are compilation units.
1938 (Add_Pending_Instantiation): Likewise.
1939 (Instantiate_Body): Skip instantiations that are compilation
1940 units and have already been performed.
1941 * sem_ch12.adb (Needs_Body_Instantiated): Do not special-case
1942 instances that are compilation units.
1943 (Load_Parent_Of_Generic): Be prepared for parent that is a
1944 compilation unit but whose instantiation node has not been
1947 2019-08-19 Eric Botcazou <ebotcazou@adacore.com>
1949 * inline.adb (Initialize, Lock): Deal with
1950 Called_Pending_Instantiations.
1952 2019-08-19 Ed Schonberg <schonberg@adacore.com>
1954 * sem_ch6.adb (Check_Synchronized_Overriding): Complete
1955 predicate that applies legality check in 9.4 (11.9/2): if an
1956 inherited subprogram is implemented by a protected procedure or
1957 entry, its first paarameter must be out, in_out or
1960 2019-08-19 Javier Miranda <miranda@adacore.com>
1963 * exp_atag.ads, exp_atag.adb (Build_Inherit_Predefined_Prims):
1964 Adding formal to specify how many predefined primitives are
1965 inherited from the parent type.
1966 * exp_disp.adb (Number_Of_Predefined_Prims): New subprogram.
1967 (Make_Secondary_DT): Compute the number of predefined primitives
1968 of all tagged types (including tagged types not defined at
1969 library level). Previously we unconditionally relied on the
1970 Max_Predef_Prims constant value when building the dispatch
1971 tables of tagged types not defined at library level (thus
1972 consuming more memory for their dispatch tables than required).
1973 (Make_DT): Compute the number of predefined primitives that must
1974 be inherited from their parent type when building the dispatch
1975 tables of tagged types not defined at library level. Previously
1976 we unconditionally relied on the Max_Predef_Prims constant value
1977 when building the dispatch tables of tagged types not defined at
1978 library level (thus copying more data than required from the
1981 2019-08-19 Bob Duff <duff@adacore.com>
1983 * sem_ch13.adb (Record_Hole_Check): Procedure to check for holes
1984 that incudes processing type extensions. A type extension is
1985 processed by first calling Record_Hole_Check recursively on the
1986 parent type to compute the bit number after the last component
1989 2019-08-19 Gary Dismukes <dismukes@adacore.com>
1991 * checks.adb (Length_Mismatch_Info_Message): New function in
1992 Selected_Length_Checks to return a message indicating the
1993 element counts for the mismatched lengths for a failed
1994 compile-time length check.
1995 (Plural_Or_Singular_Ending): Support function in
1996 Length_Mismatch_Info_Message to return either "" or "s", for
1997 concatenating to the end of words.
1998 (Selected_Length_Checks): Pass the result of
1999 Length_Mismatch_Info_Message as an extra warning message to
2000 Compile_Time_Constraint_Error to indicate the mismatched lengths
2001 for a failed compile-time length check.
2002 * sem_util.ads (Compile_Time_Constraint_Error): Add an optional
2003 message formal (Extra_Msg), defaulted to the empty string.
2004 * sem_util.adb (Compile_Time_Constraint_Error): Output an extra
2005 message following the main warning message (when Extra_Msg is
2006 not the empty string).
2008 2019-08-19 Patrick Bernardi <bernardi@adacore.com>
2010 * socket.c: Removed the redefinition of getaddrinfo, getnameinfo
2011 and freeaddrinfo to internal VxWorks kernel calls because they
2012 are, well, internal kernel calls and cannot be called from RTPs.
2013 VxWorks provides the necessary components to call these routines
2016 2019-08-19 Eric Botcazou <ebotcazou@adacore.com>
2018 * exp_dist.adb (Is_Generic_Actual_Subtype): New predicate.
2019 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
2020 Use it instead of Is_Generic_Actual_Type flag to detect subtypes
2021 representing generic actual types.
2023 2019-08-19 Ed Schonberg <schonberg@adacore.com>
2025 * sem_warn.adb (Check_References, Generic_Body_Formal): When a
2026 formal parameter of a generic subprogram is not referenced in
2027 the body, place the corresponding warning on the corresponding
2028 entity in the specification of the generic body, as is done for
2029 non-generic subprograms.
2031 2019-08-19 Bob Duff <duff@adacore.com>
2033 * errout.ads (Size_Too_Small_Message): New constant.
2034 * errout.adb, freeze.adb, sem_ch13.adb: Use it.
2036 2019-08-19 Eric Botcazou <ebotcazou@adacore.com>
2038 * exp_dist.adb (Build_Package_Stubs): Do not specifically visit
2039 the declarations of an N_Subprogram_Instantiation node.
2041 2019-08-19 Bob Duff <duff@adacore.com>
2043 * doc/gnat_ugn/gnat_utility_programs.rst: Document missing
2046 2019-08-19 Piotr Trojanek <trojanek@adacore.com>
2048 * sem_ch12.adb (Get_Unit_Instantiation_Node): Simplify Nkind_In
2050 * sem.adb (Depends_On_Main): Whitespace cleanup; only assign a
2051 local variable if needed.
2053 2019-08-19 Claire Dross <dross@adacore.com>
2055 * sem_spark.ads, sem_spark.adb (Is_Pledge_Function): New
2056 parameter of the generic. Function used to decide whether a
2057 function is a pledge function.
2058 (Check_Not_Borrowed): Disable check inside the second parameter
2059 of a pledge function for the path borrowed by the first
2060 parameter. Also disable checks for entities inside a Global
2063 2019-08-19 Joffrey Huguet <huguet@adacore.com>
2065 * libgnat/a-cfdlli.ads, libgnat/a-cfhama.ads,
2066 libgnat/a-cfinve.ads, libgnat/a-cforma.ads,
2067 libgnat/a-cofove.ads, libgnat/a-cofuma.ads,
2068 libgnat/a-cofuve.ads: Add formal function parameter "=" (L, R :
2069 Element_Type) to the generic packages.
2071 2019-08-19 Eric Botcazou <ebotcazou@adacore.com>
2073 * opt.ads: Clean up left-overs of earlier implementation in
2076 2019-08-19 Ed Schonberg <schonberg@adacore.com>
2078 * sem_ch3.adb (Derived_Enumeration_Type): Do no freeze anonymous
2079 base type if the bounds in the derived type declaration are
2080 literals of the type.
2082 2019-08-19 Yannick Moy <moy@adacore.com>
2084 * sem_res.adb (Resolve_Call): Check non-aliasing rules before
2087 2019-08-19 Eric Botcazou <ebotcazou@adacore.com>
2089 * inline.adb (Add_Inlined_Body): Do not add pending
2091 * sem_ch12.adb (Needs_Body_Instantiated): New predicate.
2092 (Analyze_Package_Instantiation): Use it to decide whether to add
2093 a pending instantiation for the body of the package.
2095 2019-08-19 Olivier Hainque <hainque@adacore.com>
2097 * gcc-interface/trans.c (Acc_Loop_to_gnu): Return the openacc
2098 BIND_EXPR node we have constructed on purpose. Remove unused
2101 2019-08-19 Pierre-Marie de Rodat <derodat@adacore.com>
2103 * gcc-interface/lang.opt (fdump-scos): Define.
2104 * gcc-interface/misc.c (gnat_handle_option): Handle
2107 2019-08-14 Joffrey Huguet <huguet@adacore.com>
2109 * libgnat/a-cofuba.ads: Add a Length attribute to type
2110 Container. Add a type Array_Base which replaces the previous
2111 Elements attribute of Container.
2112 (Content_Init): New subprogram. It is used to initialize the
2113 Base attribute of Container.
2114 * libgnat/a-cofuba.adb (Resize): New subprogram. It is used to
2115 resize the underlying array of a container if necessary.
2116 (=, <=, Find, Get, Intersection, Length, Num_Overlaps, Set,
2117 Union): Update to match changes in type declarations.
2118 (Add): Modify body to damp the time and space cost in a specific
2120 (Content_Init): New subprogram. It is used to initialize the
2121 Base attribute of Container.
2122 (Remove): Modify body to damp the time and space cost in a
2125 2019-08-14 Bob Duff <duff@adacore.com>
2127 * sem_ch13.adb (Get_Alignment_Value): Return 1 for Alignment 0,
2128 and do not give an error.
2129 * doc/gnat_rm/representation_clauses_and_pragmas.rst: Update the
2130 corresponding documentation.
2131 * gnat_rm.texi: Regenerate.
2133 2019-08-14 Eric Botcazou <ebotcazou@adacore.com>
2135 * inline.adb (Add_Pending_Instantiation): Fix off-by-one error
2136 in the comparison against the maximum number of instantiations.
2138 2019-08-14 Eric Botcazou <ebotcazou@adacore.com>
2140 * inline.adb (Add_Pending_Instantiation): Use greater-or-equal
2141 in the comparison against the maximum number of instantiations.
2143 2019-08-14 Ed Schonberg <schonberg@adacore.com>
2145 * sem_aux.adb (Next_Rep_Item): If a node in the rep chain
2146 involves a Ghost aspect it may have been replaced by a null
2147 statement; use the original node to find next Rep_Item.
2148 * repinfo.adb (List_Entities): Do not list an Ignored
2149 Ghost_Entity, for which information may have been deleted.
2151 2019-08-14 Bob Duff <duff@adacore.com>
2153 * sem_prag.ads, sem_prag.adb
2154 (Process_Compile_Time_Warning_Or_Error): In parameterless
2155 version, improve detection of whether we are in a generic unit
2156 to cover the case of an instance within a generic unit.
2157 (Process_Compile_Time_Warning_Or_Error): Rename the
2158 two-parameter version to be
2159 Validate_Compile_Time_Warning_Or_Error, and do not export it.
2160 Issue a warning if the condition is not known at compile time.
2161 The key point is that the warning must be given only for pragmas
2162 deferred to the back end, because the back end discovers
2163 additional values that are known at compile time. Previous
2164 changes in this ticket have enabled this by deferring to the
2165 back end without checking for special cases such as 'Size.
2166 (Validate_Compile_Time_Warning_Or_Error): Rename to be
2167 Defer_Compile_Time_Warning_Error_To_BE.
2168 * warnsw.ads, warnsw.adb (Warn_On_Unknown_Compile_Time_Warning):
2169 Add new switches -gnatw_c and -gnatw_C to control the above
2171 * doc/gnat_ugn/building_executable_programs_with_gnat.rst:
2172 Document new switches.
2173 * gnat_ugn.texi: Regenerate.
2175 2019-08-14 Eric Botcazou <ebotcazou@adacore.com>
2177 * sem_ch12.adb (Might_Inline_Subp): Rework comment and restrict
2178 the shortcut based on Is_Inlined to the back-end inlining case.
2180 2019-08-14 Bob Duff <duff@adacore.com>
2182 * inline.adb (Check_And_Split_Unconstrained_Function): Ignore
2183 protected functions to get rid of spurious error. The
2184 transformation done by this procedure triggers legality errors
2185 in the generated code in this case.
2187 2019-08-14 Bob Duff <duff@adacore.com>
2189 * sem_prag.adb (Process_Compile_Time_Warning_Or_Error): Defer
2190 processing to the back end in all cases where the pragma's
2191 condition is not known at compile time during the front end
2192 (except in generics), as opposed to detecting 'Size attributes
2193 and the like. This ensures that we take advantage of whatever
2194 can be compile-time known after running the back end, as opposed
2195 to having the front end guess what the back end can do. Remove
2196 a little duplicated code at the call site.
2197 * gnat1drv.adb (Post_Compilation_Validation_Checks): Unlock the
2198 Elists while in Validate_Compile_Time_Warning_Errors, because it
2199 does analysis and name resolution, which sometimes involves
2202 2019-08-14 Eric Botcazou <ebotcazou@adacore.com>
2204 * einfo.ads (Is_Called): Document new usage on E_Package
2206 * einfo.adb (Is_Called): Accept E_Package entities.
2207 (Set_Is_Called): Likewise.
2208 * exp_ch6.adb (Expand_Call_Helper): Move code dealing with
2209 instances for back-end inlining to Add_Inlined_Body.
2210 * inline.ads: Remove with clauses for Alloc and Table.
2211 (Pending_Instantiations): Move to...
2212 * inline.adb: Add with clauses for Alloc, Uintp, Table and
2214 (Backend_Instances): New variable.
2215 (Pending_Instantiations): ...here.
2216 (Called_Pending_Instantiations): New table.
2217 (Node_Table_Size): New constant.
2218 (Node_Header_Num): New subtype.
2219 (Node_Hash): New function.
2220 (To_Pending_Instantiations): New hash table.
2221 (Add_Inlined_Body): Bail out early for subprograms in the main
2222 unit or subunit. Likewise if the Is_Called flag is set. If the
2223 subprogram is an instance, invoke Add_Inlined_Instance. Call
2224 Set_Is_Called earlier. If the subrogram is within an instance,
2225 invoke Add_Inlined_Instance. Also deal with the case where the
2226 call itself is within an instance.
2227 (Add_Inlined_Instance): New procedure.
2228 (Add_Inlined_Subprogram): Remove conditions always fulfilled.
2229 (Add_Pending_Instantiation): Move the defence against ludicruous
2230 number of instantiations to here. When back-end inlining is
2231 enabled, associate an instantiation with its index in table and
2232 mark a few selected kinds of instantiations as always needed.
2233 (Initialize): Set Backend_Instances to No_Elist.
2234 (Instantiate_Body): New procedure doing the work extracted
2236 (Instantiate_Bodies): ...here. When back-end inlining is
2237 enabled, loop over Called_Pending_Instantiations instead of
2238 Pending_Instantiations.
2239 (Is_Nested): Minor tweak.
2240 (List_Inlining_Info): Also list the contents of
2242 * sem_ch12.adb (Might_Inline_Subp): Return early if Is_Inlined
2243 is set and otherwise set it before returning true.
2244 (Analyze_Package_Instantiation): Remove the defence against
2245 ludicruous number of instantiations. Invoke
2246 Remove_Dead_Instance instead of doing the removal manually if
2247 there is a guaranteed ABE.
2249 2019-08-14 Gary Dismukes <dismukes@adacore.com>
2251 * exp_ch3.adb (Predef_Spec_Or_Body): For an equality operation
2252 of an interface type, create an expression function (that
2253 returns False) rather than declaring an abstract function.
2254 * freeze.adb (Check_Inherited_Conditions): Set Needs_Wrapper to
2255 False unconditionally at the start of the loop creating wrappers
2256 for inherited operations.
2258 2019-08-14 Bob Duff <duff@adacore.com>
2260 * table.adb: Assert that the table is not locked when increasing
2261 Last, even if it doesn't cause reallocation. In other words,
2262 assert that on operations that MIGHT cause reallocation.
2263 * table.ads: Fix comment accordingly.
2265 2019-08-14 Arnaud Charlet <charlet@adacore.com>
2267 * doc/gnat_ugn/gnat_and_program_execution.rst: Remove
2268 documentation of gnatelim.
2270 2019-08-14 Bob Duff <duff@adacore.com>
2272 * sem_prag.adb (Validate_Compile_Time_Warning_Error): Attach the
2273 warning to the Sloc of the first pragma argument, rather than to
2274 the pragma itself. This is to make pragmas processed after the
2275 back end use the same Sloc as pragmas processed earlier, in the
2276 front end. There's no reason for this discrepancy, and it
2277 hinders further work on this ticket.
2279 2019-08-14 Bob Duff <duff@adacore.com>
2281 * sem.ads (Inside_A_Generic): Remove the ??? comment.
2283 2019-08-14 Eric Botcazou <ebotcazou@adacore.com>
2285 * inline.ads (Pending_Descriptor): Delete.
2286 * inline.adb (Initialize): Do not initialize it.
2287 * sem_ch12.adb (Delay_Descriptors): Delete.
2288 (Analyze_Package_Instantiation): Call
2289 Set_Delay_Subprogram_Descriptors instead of Delay_Descriptors
2292 2019-08-14 Bob Duff <duff@adacore.com>
2294 * exp_aggr.adb (Init_Hidden_Discriminants): Avoid processing the
2295 wrong discriminant, which could be of the wrong type.
2297 2019-08-14 Eric Botcazou <ebotcazou@adacore.com>
2299 * sem_ch12.adb (Analyze_Instance_And_Renamings): Do not reset
2300 the Is_Generic_Instance flag previously set on the package
2301 generated for the instantiation of a generic subprogram.
2303 2019-08-14 Ed Schonberg <schonberg@adacore.com>
2305 * exp_ch4.adb (Expand_N_Quantified_Expression): Freeze
2306 explicitly the type of the loop parameter.
2308 2019-08-14 Javier Miranda <miranda@adacore.com>
2310 * sem_util.adb (New_Copy_Tree.Copy_Node_With_Replacement):
2311 Update the Chars attribute of identifiers.
2313 2019-08-14 Yannick Moy <moy@adacore.com>
2315 * sem_spark.adb, sem_spark.ads (Is_Legal): New function exposed
2316 for use in GNATprove, to test legality rules not related to
2318 (Check_Declaration_Legality): Extract the part of
2319 Check_Declaration that checks rules not related to permissions.
2320 (Check_Declaration): Call the new Check_Declaration_Legality.
2321 (Check_Type_Legality): Rename of Check_Type. Introduce
2322 parameters to force or not checking, and update a flag detecting
2324 (Check_Node): Ignore attribute references in statement position.
2326 2019-08-14 Yannick Moy <moy@adacore.com>
2328 * sem_spark.adb (Check_Old_Loop_Entry): New procedure to check
2329 correct use of Old and Loop_Entry.
2330 (Check_Node): Check subprogram contracts.
2331 (Check_Pragma): Check Loop_Variant.
2332 (Check_Safe_Pointers): Apply checking to library-level
2333 subprogram declarations as well, in order to check their
2336 2019-08-14 Yannick Moy <moy@adacore.com>
2338 * sem_spark.adb (Is_Subpath_Expression): Take into account
2339 conversion and qualification.
2341 2019-08-14 Eric Botcazou <ebotcazou@adacore.com>
2343 * sem_ch7.adb (Install_Private_Declarations)
2344 <Swap_Private_Dependents>: Do not rely solely on the
2345 Is_Child_Unit flag on the unit to recurse.
2346 (Uninstall_Declarations) <Swap_Private_Dependents>: New
2347 function. Use it to recurse on the private dependent entities
2350 2019-08-14 Javier Miranda <miranda@adacore.com>
2352 * exp_aggr.adb (Is_CCG_Supported_Aggregate): Return False for
2353 arrays with bounds not known at compile time.
2355 2019-08-14 Ed Schonberg <schonberg@adacore.com>
2357 * sem_util.adb (New_Copy_Tree, Visit_Entity): A quantified
2358 expression includes the implicit declaration of the loop
2359 parameter. When a quantified expression is copied during
2360 expansion, for example when building the precondition code from
2361 the generated pragma, a new loop parameter must be created for
2362 the new tree, to prevent duplicate declarations for the same
2365 2019-08-14 Yannick Moy <moy@adacore.com>
2367 * sem_disp.adb (Check_Dispatching_Operation): Update assertion
2368 for the separate declarations created in GNATprove mode.
2369 * sem_disp.ads (Is_Overriding_Subprogram): Update comment.
2370 * sem_elab.adb (SPARK_Processor): Fix test for checking of
2371 overriding primitives.
2373 2019-08-14 Eric Botcazou <ebotcazou@adacore.com>
2375 * inline.adb (Add_Inlined_Body): Tweak comments.
2376 (List_Inlining_Info): Also list information about non-main
2379 2019-08-14 Gary Dismukes <dismukes@adacore.com>
2381 * sem_ch4.adb (Analyze_Selected_Component): In the case where
2382 the prefix is of a concurrent type, and the selected entity
2383 matching the selector is the first private declaration of the
2384 type (such as the first local variable in a task's body), set
2387 2019-08-14 Piotr Trojanek <trojanek@adacore.com>
2389 * einfo.adb (Is_Generic_Actual_Subprogram): Replace repeated
2390 calls to Ekind with Ekind_In.
2392 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
2395 * gcc-interface/trans.c (gigi): Call set_decl_buillt_in_function.
2396 (Call_to_gnu): Use DECL_FE_FUNCTION_CODE instead of DECL_FUNCTION_CODE.
2398 2019-08-13 Eric Botcazou <ebotcazou@adacore.com>
2400 * ali.ads (Linker_Option_Record): Remove Original_Pos component.
2401 * ali.adb (Scan_ALI): Do not set it.
2403 2019-08-13 Eric Botcazou <ebotcazou@adacore.com>
2405 * sem_ch3.adb (Build_Derived_Concurrent_Type): Add a couple of
2406 local variables and use them. When the derived type fully
2407 constrains the parent type, rewrite it as a subtype of an
2408 implicit (unconstrained) derived type instead of the other way
2410 (Copy_And_Build): Deal with concurrent types and use predicates.
2411 (Build_Derived_Private_Type): Build the full derivation if
2412 needed for concurrent types too.
2413 (Build_Derived_Record_Type): Add marker comment.
2414 (Complete_Private_Subtype): Use predicates.
2416 2019-08-13 Ed Schonberg <schonberg@adacore.com>
2418 * sem_ch3.adb (Check_Generic_Ancestor): New subprogram,
2419 aubsidiary to Build_Derived_Record_Type. to enforce the rule
2420 that a type extension declared in a generic body cznnot have an
2421 ancestor that is a generic formal (RM 3.9.1 (4/2)). The rule
2422 applies to all ancestors of the type, including interface
2425 2019-08-13 Eric Botcazou <ebotcazou@adacore.com>
2427 * sem_ch3.adb (Build_Underlying_Full_View): Delete.
2428 (Complete_Private_Subtype): Do not set the full view on the
2429 private subtype here. If the full base is itself derived from
2430 private, do not re-derive the parent type but instead constrain
2431 an existing underlying full view.
2432 (Prepare_Private_Subtype_Completion): Do not get to the
2433 underlying full view, if any. Set the full view on the private
2435 (Process_Full_View): Likewise.
2436 * sem_ch12.adb (Check_Generic_Actuals): Also set
2437 Is_Generic_Actual_Type on the full view if the type of the
2439 (Restore_Private_Views): Also reset Is_Generic_Actual_Type on
2440 the full view if the type of the actual is private.
2441 * sem_eval.adb (Subtypes_Statically_Match): Remove bypass for
2442 generic actual types.
2444 2019-08-13 Javier Miranda <miranda@adacore.com>
2446 * sem_res.adb (Resolve_Selected_Component): When the type of the
2447 component is an access to a class-wide type and the type of the
2448 context is an access to a tagged type the relevant type is that
2449 of the component (since in such case we may need to generate
2450 implicit type conversions or dispatching calls).
2452 2019-08-13 Ed Schonberg <schonberg@adacore.com>
2454 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Preanalyze
2455 expression, rather do a full analysis, to prevent unwanted
2456 removal of side effects which mask the intent of the expression.
2458 2019-08-13 Eric Botcazou <ebotcazou@adacore.com>
2460 * impunit.adb (Non_Imp_File_Names_95): Add
2461 GNAT.Branch_Prediction.
2463 2019-08-13 Eric Botcazou <ebotcazou@adacore.com>
2465 * exp_ch6.adb: Remove with and use clauses for Sem_Ch12.
2466 (Expand_Call_Helper): Swap the back-end inlining case and the
2467 special front-end expansion case. In back-end inlining mode, do
2468 not invoke Add_Inlined_Body unless the call may be inlined.
2469 * inline.ads (Add_Pending_Instantiation): New function moved
2471 * inline.adb (Add_Inlined_Body): Simplify comment. Turn test on
2472 the enclosing unit into assertion.
2473 (Add_Pending_Instantiation): New function moved from...
2474 * sem_ch12.ads (Add_Pending_Instantiation): ...here.
2475 * sem_ch12.adb (Add_Pending_Instantiation): ...here.
2477 2019-08-13 Eric Botcazou <ebotcazou@adacore.com>
2479 * sem.adb (Do_Analyze): Recompute Style_Check_Max_Line_Length
2480 after restoring Style_Max_Line_Length.
2482 2019-08-13 Arnaud Charlet <charlet@adacore.com>
2484 * sem_ch13.adb (Check_Iterator_Functions): Protect against
2487 2019-08-13 Ed Schonberg <schonberg@adacore.com>
2489 * sem_ch8.adb (Analyze_Subprogram_Renaming): Do no suppress mode
2490 conformance checks on child unit instance that is a compilation
2493 2019-08-13 Gary Dismukes <dismukes@adacore.com>
2495 * exp_dbug.adb (Fully_Qualify_Name): Add full name qualification
2496 for the E_Exception case.
2498 2019-08-13 Gary Dismukes <dismukes@adacore.com>
2500 * exp_aggr.adb (Aggr_Size_OK): Compute the aggregate size using
2501 universal arithmetic, to avoid situations where the size
2502 computation overflows.
2504 2019-08-13 Justin Squirek <squirek@adacore.com>
2506 * repinfo.adb (List_Scalar_Storage_Order): Modify conditionals
2507 for displaying ordering to always be triggered when -gnatR4 is
2510 2019-08-13 Justin Squirek <squirek@adacore.com>
2512 * aspects.adb, aspects.ads: Register new aspect.
2513 * par-prag.adb (Prag): Register new pragma
2514 * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing
2515 for new aspect similar to Aspect_Max_Entry_Queue_Length.
2516 * sem_prag.adb, sem_prag.ads (Analyze_Pragma): Register new
2517 pragma and set it to use the same processing as
2518 Pragma_Max_Queue_Length.
2519 * snames.ads-tmpl: Move definition of
2520 Name_Max_Entry_Queue_Length so that it can be processed as a
2521 pragma in addition to a restriction and add an entry for the
2524 2019-08-13 Yannick Moy <moy@adacore.com>
2526 * sem_ch4.adb (Analyze_Allocator): Do not insert subtype
2527 declaration for allocator inside a spec expression.
2529 2019-08-13 Yannick Moy <moy@adacore.com>
2531 * sem_res.adb (Resolve_Call): Do not inline calls inside record
2534 2019-08-13 Eric Botcazou <ebotcazou@adacore.com>
2536 * sem_ch4.adb (Analyze_One_Call): Remove bypass for type
2537 mismatch in nested instantiations.
2538 * sem_ch8.adb (Find_Nearer_Entity): New function.
2539 (Find_Renamed_Entity): Use it to disambiguate the candidates for
2540 the renaming generated for an instantiation when it is
2543 2019-08-13 Eric Botcazou <ebotcazou@adacore.com>
2545 * gnat1drv.adb (Adjust_Global_Switches): Do not set
2546 Back_End_Inlining in ASIS mode either.
2548 2019-08-13 Olivier Hainque <hainque@adacore.com>
2550 * libgnat/s-win32.ads: Define size_t and fix the MapViewOfFile
2551 binding to use it instead of DWORD for the dwNumberOfBytesToMap
2553 * libgnat/g-sercom__mingw.adb (Read): State which definition of
2554 size_t to fetch in call to Last_Index.
2556 2019-08-13 Arnaud Charlet <charlet@adacore.com>
2558 * gcc-interface/Make-lang.in: Remove unused TRACE variable. Pass
2559 LN_S to relevant gnatlib targets.
2560 * gcc-interface/Makefile.in: Systematically pass LN_S to
2561 relevant gnatlib targets.
2563 2019-08-13 Yannick Moy <moy@adacore.com>
2565 * sem_dim.adb (Analyze_Dimension,
2566 Analyze_Dimension_Array_Aggregate, Analyze_Dimension_Call,
2567 Analyze_Dimension_Extension_Or_Record_Aggregate): Return
2568 immediately when inside an inlined body.
2569 * sem_res.adb (Resolve_Call): Remove special checking now done
2570 inside Analyze_Dimension_Call.
2572 2019-08-13 Justin Squirek <squirek@adacore.com>
2574 * exp_ch4.adb (Expand_N_Allocator): Add condition to detect
2575 library-level object declarations
2577 2019-08-13 Eric Botcazou <ebotcazou@adacore.com>
2579 * doc/gnat_ugn/building_executable_programs_with_gnat.rst
2580 (-gnateT): Document Double_Float_Alignment parameter and fix
2581 description of Double_Scalar_Alignment parameter.
2582 * gnat_ugn.texi: Regenerate.
2584 2019-08-13 Eric Botcazou <ebotcazou@adacore.com>
2586 * exp_ch6.adb (Expand_Call_Helper): If back-end inlining is
2587 enabled, also instantiate the body of a generic unit containing
2588 a subprogram subject to aspect/pragma Inline_Always at
2589 optimization level zero.
2590 * sem_ch12.adb (Might_Inline_Subp): Minor tweak.
2591 (Analyze_Package_Instantiation): Do not instantiate the package
2592 body because of inlining considerations if the instantiation is
2593 done in a generic unit. Move around similar condition involving
2594 the main unit. Add test on Back_End_Inlining to processing for
2597 2019-08-13 Javier Miranda <miranda@adacore.com>
2599 * exp_disp.adb (Make_Secondary_DT): Handle record type
2600 derivations that have interface components located at fixed
2601 positions and interface components located at variable offset.
2602 The offset of components located at fixed positions is computed
2603 using the dummy object (similar to the case where all the
2604 interface components are located at fixed positions).
2605 (Make_DT): Build the dummy object for all tagged types that
2606 implement interface types (that is, build it also for types with
2607 variable size components), and use the dummy object to compute
2608 the offset of all tag components located at fixed positions when
2609 initializing the Interface_Table object.
2611 2019-08-13 Justin Squirek <squirek@adacore.com>
2613 * gnatcmd.adb (GNATCmd): Add constant for new compiler switch
2614 --help-ada, and include usage subprogram. Add line to usage help
2615 explaining the new flag.
2616 (GNATCmd_Usage): Rename from locally declared Usage so as not to
2617 confuse with the newly imported version. Add new argument case
2618 for --help-ada and add bug report email to implicit display of
2619 help without the --help flag so as to unify output between the
2622 2019-08-13 Dmitriy Anisimkov <anisimko@adacore.com>
2624 * libgnat/g-comlin.adb (Getopt): Quote unrecognized switch in
2625 Invalid_Switch exception message.
2627 2019-08-13 Yannick Moy <moy@adacore.com>
2629 * sem_util.adb (Traverse_More_Func): Take into account
2630 Loop_Actions inside N_Iterated_Component_Association nodes.
2631 * sinfo.ads: Document correctly Loop_Actions as a field of nodes
2632 of kind N_Iterated_Component_Association.
2634 2019-08-13 Claire Dross <dross@adacore.com>
2636 * libgnat/a-cfinve.adb, libgnat/a-cofove.adb (Find_Index,
2637 Reverse_Find_Index): Use bigger type to avoid range check
2638 failure at the last loop iteration.
2640 2019-08-12 Dmitriy Anisimkov <anisimko@adacore.com>
2642 * libgnat/g-socket.adb (Is_IPv6_Address): Check that no less
2643 then 2 colons in IPv6 numeric address.
2645 2019-08-12 Dmitriy Anisimkov <anisimko@adacore.com>
2647 * libgnat/g-comlin.ads, libgnat/g-comlin.adb (Getopt): Add
2648 parameter Quiet. Need to do not output error messages to
2649 console. Invalid_Switch exception generation surrounded by an
2652 2019-08-12 Ed Schonberg <schonberg@adacore.com>
2654 * exp_ch6.adb (Expand_Actuals. Add_Call_By_Copy_Code): Add code
2655 to generate proper checks when an actual for an in-out or out
2656 parameter has a non-null access type. No constraints are
2657 applied to an inbound access parameter, but on exit a not-null
2658 check must be performed if the type of the actual requires it.
2660 2019-08-12 Ed Schonberg <schonberg@adacore.com>
2662 * sem_util.adb (Is_Expaned_Priority_Attribute): Check whether
2663 call comes from a rewritten attribute before comparing name with
2664 Get_Ceiling run-time subprogram.
2666 2019-08-12 Eric Botcazou <ebotcazou@adacore.com>
2668 * exp_util.ads (Component_May_Be_Bit_Aligned): Small comment
2670 (Possible_Bit_Aligned_Component): Likewise.
2671 (Type_May_Have_Bit_Aligned_Components): Likewise.
2672 * exp_util.adb (Component_May_Be_Bit_Aligned): Likewise.
2673 (Possible_Bit_Aligned_Component): Likewise.
2674 (Type_May_Have_Bit_Aligned_Components): Likewise.
2676 2019-08-12 Eric Botcazou <ebotcazou@adacore.com>
2678 * exp_ch4.adb (Expand_N_Op_Eq): Expand the array equality if
2679 either operand is a possibly unaligned slice.
2680 * exp_ch6.adb (Expand_Simple_Function_Return): Do not generate a
2681 copy for a possibly unaligned object if it is represented as a
2683 * exp_util.adb (Is_Possibly_Unaligned_Slice): Do not always
2684 return false if the target doesn't have strict alignment.
2686 2019-08-12 Bob Duff <duff@adacore.com>
2688 * sem_ch12.adb (Instantiate_Package_Body): Remove suppression of
2689 checks in instances of internal units.
2690 * sem_ch6.adb (Analyze_Function_Return): Do not generate a
2691 constraint check on an extended_return_statement if the subtype
2692 of the return object in the statement is identical to the return
2693 subtype of the function.
2695 2019-08-12 Bob Duff <duff@adacore.com>
2697 * libgnat/a-cbmutr.adb (Is_Reachable): Declare Idx to be of the
2698 base subtype. Clearly it makes no sense to loop "while Idx >=
2699 0", if Idx is of a nonnegative subtype.
2701 2019-08-12 Bob Duff <duff@adacore.com>
2703 * libgnat/a-tifiio.adb (Put_Scaled): Prevent AA from being
2704 negative, since Field is range 0 .. something.
2706 2019-08-12 Bob Duff <duff@adacore.com>
2708 * doc/gnat_ugn/gnat_utility_programs.rst (gnatmetric, gnatpp,
2709 gnatstub): Remove documentation for Ada language version
2710 switches, and note that they are no longer needed.
2712 2019-08-12 Gary Dismukes <dismukes@adacore.com>
2714 * sem_ch5.adb (Prepare_Param_Spec_Loop): Set the parents of the
2715 copied low and high bounds in the case where the loop range is
2716 given by a discrete_subtype_indication, to prevent hanging (or
2717 Assert_Failure) in Insert_Actions.
2719 2019-08-12 Ed Schonberg <schonberg@adacore.com>
2721 * sem_ch6.adb (heck_Untagged_Equality): Verify that user-defined
2722 equality has the same profile as the predefined equality before
2723 applying legality rule in RM 4.5.2 (9.8).
2725 2019-08-12 Bob Duff <duff@adacore.com>
2727 * libgnat/a-except.ads: Update obsolete comment, still making
2728 clear that this is a variant. Add explicit default for Id
2729 component of Exception_Occurrence, because that value is used.
2730 Define Null_Occurrence less redundantly.
2731 * libgnat/a-einuoc.adb: Minor simplification of code.
2733 2019-08-12 Justin Squirek <squirek@adacore.com>
2735 * libgnat/a-dhfina.adb, libgnat/a-dhfina.ads (Is_Simple_Name,
2736 Is_Root_Directory, Is_Parent_Directory,
2737 Is_Current_Directory_Name, Is_Relative_Name, Initial_Directory,
2738 Relative_Name, Compose): Add implementation and documentation.
2739 * libgnat/a-direct.adb (Containing_Directory): Modify routine to
2740 use routines from Ada.Directories.Hierarchical_File_Names and
2741 remove incorrect special case for parent directories.
2742 (Fetch_Next_Entry): Add check for current directory and parent
2743 directory and ignore them under certain circumstances.
2744 (Simple_Nmae): Add check for null result from
2745 Simple_Name_Internal and raise Name_Error.
2746 (Simple_Name_Internal): Add explicit check for root directories,
2747 sanitize trailing directory separators, and modify behavior so
2748 that current and parent directories are considered valid
2750 * Makefile.rtl: Add entry to GNATRTL_NONTASKING_OBJS.
2752 2019-08-12 Eric Botcazou <ebotcazou@adacore.com>
2754 * freeze.adb (Freeze_Entity): Give the same error for an
2755 Object_Size clause on a variable-sized type as for a Size
2758 2019-08-12 Gary Dismukes <dismukes@adacore.com>
2760 * sem_prag.adb (Analyze_Pragma, Pragma_Suppress_Initialization):
2761 For private types, set the Suppress_Initialization flag on the
2762 Full_View of the entity rather than the entity's base type.
2764 2019-08-12 Yannick Moy <moy@adacore.com>
2766 * aspects.adb, aspects.ads (Aspect_No_Caching): New aspect.
2767 * contracts.adb, contracts.ads (Add_Contract_Item): Add handling
2769 (Analyze_Object_Contract): Add handling of No_Caching.
2770 * einfo.adb, einfo.ads
2771 (Get_Pragma): Add handling of No_Caching.
2772 * doc/gnat_rm/implementation_defined_aspects.rst,
2773 doc/gnat_rm/implementation_defined_pragmas.rst: Document new
2775 * gnat_rm.texi: Regenerate.
2776 * par-prag.adb (Prag): New pragma Pragma_No_Caching.
2777 * sem_ch13.adb (Analyze_Aspect_Specifications,
2778 Check_Aspect_At_Freeze_Point): Add handling of No_Caching.
2779 * sem_prag.adb (Analyze_Pragma): Deal with pragma No_Caching.
2780 * sem_prag.ads (Analyze_External_Property_In_Decl_Part): Now
2781 applies to No_Caching.
2782 * sem_util.adb, sem_util.ads (Is_Effectively_Volatile): Add
2783 handling of No_Caching.
2784 (No_Caching_Enabled): New query function.
2785 * snames.ads-tmpl: New names for pragma.
2787 2019-08-12 Yannick Moy <moy@adacore.com>
2789 * sem_util.adb, sem_util.ads (Traverse_More_Func,
2790 Traverse_More_Proc): Add formal parameter for Itypes traversal.
2792 2019-08-12 Yannick Moy <moy@adacore.com>
2794 * exp_attr.adb, exp_attr.ads (Expand_Size_Attribute): New
2795 procedure to share part of the attribute expansion with
2797 (Expand_N_Attribute_Reference): Extract part of the
2798 Size/Object_Size expansion in the new procedure
2799 Expand_Size_Attribute.
2800 * exp_spark.adb (Expand_SPARK_N_Attribute_Reference): Expand
2801 Size/Object_Size attributes using the new procedure
2802 Expand_Size_Attribute.
2804 2019-08-12 Yannick Moy <moy@adacore.com>
2806 * exp_spark.adb (Expand_SPARK_N_Attribute_Reference): Only
2807 expand Enum_Rep attribute when its parameter is a literal.
2809 2019-08-12 Justin Squirek <squirek@adacore.com>
2811 * sem_eval.adb (Check_Non_Static_Context): Add a condition to
2812 determine if a range violation constitues a warning or an error.
2813 (Out_Of_Range): Add a condition to determine if a range
2814 violation constitues a warning or an error.
2816 2019-08-12 Eric Botcazou <ebotcazou@adacore.com>
2818 * exp_ch4.adb (Real_Range_Check): Do not rewrite the conversion
2819 node but its expression instead, after having fetched its
2820 current value. Clear the Do_Range_Check flag on entry. Return
2821 early for a rewritten float-to-float conversion. Remove
2822 redundant local variable. Suppress all checks when inserting
2823 the temporary and do not reanalyze the node.
2825 2019-08-12 Eric Botcazou <ebotcazou@adacore.com>
2827 * sprint.ads: Minor comment tweak.
2829 2019-08-12 Eric Botcazou <ebotcazou@adacore.com>
2831 * checks.adb (Insert_Valid_Check): Do not retrieve the
2832 Do_Range_Check flag from the Original_Node but from the
2833 Validated_Object. Remove useless bypass for floating-point
2836 2019-08-12 Yannick Moy <moy@adacore.com>
2838 * sem_util.adb, sem_util.ads (Traverse_More_Func,
2839 Traverse_More_Proc): New traversal subprograms.
2841 2019-08-12 Jerome Lambourg <lambourg@adacore.com>
2843 * libgnarl/s-taprop__vxworks.adb (Abort_Handler): Only call
2844 s-tpopsp.Self when actually needed.
2846 2019-08-12 Eric Botcazou <ebotcazou@adacore.com>
2848 * exp_ch4.adb (Discrete_Range_Check): Return if checks are
2851 2019-08-12 Eric Botcazou <ebotcazou@adacore.com>
2853 * sem_res.adb: Add with & use clause for Sem_Mech and
2855 (Resolve_Actuals): Do not apply a scalar range check for the
2856 source of a conversion whose result is passed by reference to a
2859 2019-08-12 Eric Botcazou <ebotcazou@adacore.com>
2861 * checks.adb (Insert_Valid_Check): Reset the Do_Range_Check flag
2862 on the validated object.
2863 * exp_ch6.adb (Add_Call_By_Copy_Code): Reset the Do_Range_Check
2864 flag on the actual here, as well as on the Expression if the
2865 actual is a N_Type_Conversion node.
2866 (Add_Validation_Call_By_Copy_Code): Generate the incoming range
2867 check if needed and reset the Do_Range_Check flag on the
2868 Expression if the actual is a N_Type_Conversion node.
2869 (Expand_Actuals): Do not reset the Do_Range_Check flag here.
2870 Generate the incoming range check for In parameters here instead
2872 (Expand_Call_Helper): ...here. Remove redudant condition.
2873 * sem_res.adb (Resolve_Actuals): Use local variable A_Typ and
2874 remove obsolete comments.
2875 (Resolve_Type_Conversion): Do not force the Do_Range_Check flag
2876 on the operand if range checks are suppressed.
2878 2019-08-12 Eric Botcazou <ebotcazou@adacore.com>
2880 * checks.adb (Activate_Range_Check): Remove redundant argument.
2881 (Generate_Range_Check): Likewise.
2882 (Apply_Float_Conversion_Check): Reset the Do_Range_Check flag on
2883 entry and remove redundant condition.
2885 2019-08-02 Alexandre Oliva <oliva@adacore.com>
2887 * libgnat/a-exexpr.adb (Begin_Handler_v1, End_Handler_v1): New.
2888 (Claimed_Cleanup): New.
2889 (Begin_Handler, End_Handler): Document.
2890 * gcc-interface/trans.c (gigi): Switch to exception handler
2892 (Exception_Handler_to_gnu_gcc): Save the original cleanup
2893 returned by begin handler, pass it to end handler, and use
2894 EH_ELSE_EXPR to pass a propagating exception to end handler.
2895 (gnat_to_gnu): Leave the exception pointer alone for reraise.
2896 (add_cleanup): Handle EH_ELSE_EXPR, require it by itself.
2898 2019-07-23 Ed Schonberg <schonberg@adacore.com>
2900 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations,
2901 Freeze_Entity_Checks): Include Aspect_CPU with other aspects
2902 whose expresssion may depend on a discriminant, and thus require
2903 that components of the type be made visible.
2905 2019-07-23 Eric Botcazou <ebotcazou@adacore.com>
2907 * checks.adb (Convert_And_Check_Range): Add Suppress parameter
2908 and pass it in the call to Insert_Actions. Rename local
2910 (Generate_Range_Check): Minor comment fixes. Pass Range_Check
2911 in the first call to Convert_And_Check_Range and All_Checks in
2913 * exp_ch4.adb (Expand_N_Type_Conversion): Reset the
2914 Do_Overflow_Check flag in the float-to-float case too if there
2915 is also a range check.
2917 2019-07-23 Eric Botcazou <ebotcazou@adacore.com>
2919 * checks.adb (Activate_Overflow_Check): Remove redundant
2921 * exp_ch4.adb (Discrete_Range_Check): Reset the overflow flag.
2922 (Expand_N_Type_Conversion): Do not reset it here.
2924 2019-07-23 Eric Botcazou <ebotcazou@adacore.com>
2926 * repinfo.adb (List_Component_Layout): Pass Decimal to UI_Write.
2927 (Write_Val): Likewise.
2929 2019-07-23 Ed Schonberg <schonberg@adacore.com>
2931 * aspects.ads: New table Operational_Aspect, used to distinguish
2932 between aspects that are view-specific, such as those related to
2933 iterators, and representation aspects that apply to all views of
2935 * aspects.adb (Find_Aspect): If the aspect being sought is
2936 operational, do not ecamine the full view of a private type to
2938 * sem_ch5.adb (Analyze_Iterator_Specification): Improve error
2939 message when the intended domain of iteration does not implement
2940 the required iterator aspects.
2942 2019-07-23 Yannick Moy <moy@adacore.com>
2944 * sem_spark.ads (Is_Local_Context): New function.
2945 * sem_spark.adb (Check_Declaration): Issue errors on violations
2947 (Process_Path): Do not issue error on borrow/observe during
2948 elaboration, as these are caught by the new rule.
2950 2019-07-23 Yannick Moy <moy@adacore.com>
2952 * exp_ch7.adb (Create_Finalizer): Force finalizer not to be
2954 * exp_dbug.adb (Get_External_Name): Explain special case of
2957 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
2959 * repinfo.adb (List_Entities): Also list compiled-generated
2960 types present as Etype of objects.
2962 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
2964 * sinfo.ads: Update the documentation about the
2965 Do_Division_Check, Do_Overflow_Check and Do_Range_Check flags.
2967 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
2969 * exp_ch4.adb (Expand_N_Type_Conversion): Beef up comment.
2970 (Fixup_Universal_Fixed_Operation): Set the base type instead of
2971 the type of the enclosing type conversion on the operation.
2973 2019-07-22 Ed Schonberg <schonberg@adacore.com>
2975 * exp_ch4.adb (Expand_N_In): Do not suggest the use of attribute
2976 'Valid as a replacement for a range check on a discrete type
2977 when the bounds of the range are given by type conversions,
2978 because in such a case there are distinct types involved and the
2979 subbested attribute replacement would be misplaced.
2981 2019-07-22 Yannick Moy <moy@adacore.com>
2983 * sem_spark.adb (Get_Root_Object, Is_Path_Expression,
2984 Is_Subpath_Expression): Add parameter Is_Traversal to adapt
2985 these functions to the case of paths returned from a traversal
2987 (Read_Indexes): Handle the case of an if-expression or
2989 (Check_Statement): Check Emit_Messages only when issuing an
2990 error message. This is important as Emit_Messages may store the
2991 information that an error was detected.
2993 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
2995 * checks.adb (Apply_Type_Conversion_Checks): Do not set
2996 Do_Range_Check flag on conversions from fixed-point types
2998 * exp_attr.adb: Add use and with clause for Expander.
2999 (Expand_N_Attribute_Reference) <Fixed_Value, Integer_Value>: Set
3000 the Conversion_OK flag and do not generate overflow/range checks
3002 * exp_ch4.adb (Expand_N_Qualified_Expression): Remove
3003 superfluous clearing of Do_Range_Check flag.
3004 (Discrete_Range_Check): New procedure to generate a range check
3006 (Real_Range_Check): Remove redundant local variable and adjust.
3007 Remove useless shortcut. Clear Do_Range_Check flag on all
3009 (Expand_N_Type_Conversion): Remove redundant test on
3010 Conversion_OK. Call Discrete_Range_Check to generate range
3011 checks on discrete types. Remove obsolete code for
3012 float-to-integer conversions. Add code to generate range checks
3013 for conversions involving fixed-point types.
3015 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
3017 * sprint.ads: Fix pasto in comment.
3019 2019-07-22 Javier Miranda <miranda@adacore.com>
3021 * sem_res.adb (Resolve_Actuals): Replace code that displaces the
3022 pointer to an allocated object to reference its secondary
3023 dispatch table by a type conversion (which takes care of
3024 handling all cases).
3026 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
3028 * sprint.adb (Sprint_Node_Actual)
3029 <N_Decimal_Fixed_Point_Definition>: Swap a couple of spaces.
3030 (Write_Itype): Minor consistency fixes throughout. Add support
3031 for printing ordinary and decimal fixed-point types and
3034 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
3036 * exp_attr.adb (Expand_Loop_Entry_Attribute): Beef up comment.
3038 2019-07-22 Ed Schonberg <schonberg@adacore.com>
3040 * libgnat/s-valboo.ads, libgnat/s-valcha.ads,
3041 libgnat/s-valdec.ads, libgnat/s-valenu.ads,
3042 libgnat/s-valint.ads, libgnat/s-vallld.ads,
3043 libgnat/s-vallli.ads, libgnat/s-valllu.ads,
3044 libgnat/s-valrea.ads, libgnat/s-valuns.ads,
3045 libgnat/s-valwch.ads: Change categorization of packages that
3046 implement attribute 'Value from Pure to Preelaborate, to prevent
3047 undesirable optimizations when the evaluation of the attribute
3048 raises Constraint_Error, but subsequent use of the result of
3049 this evsaluation is removed by a subsequent optimization.
3051 2019-07-22 Ed Schonberg <schonberg@adacore.com>
3053 * sem_warn.adb (Check_References): Do not emit s warning on a
3054 referenced entity with no explicit assignment if the type of the
3055 entity has Preelaborable_Initialixation, such as
3056 Exception_Occurrence.
3058 2019-07-22 Javier Miranda <miranda@adacore.com>
3060 * exp_ch4.adb (Size_In_Storage_Elements): Improve the expansion
3061 to handle array indexes that are modular type.
3062 (Expand_N_Allocator): For 32-bit targets improve the generation
3063 of the runtime check associated with large arrays supporting
3064 arrays initialized with a qualified expression.
3065 * libgnat/s-imenne.adb (Image_Enumeration_8,
3066 Image_Enumeration_16, Image_Enumeration_32): Define the index of
3067 Index_Table with range Natural'First .. Names'Length since in
3068 the worst case all the literals of the enumeration type would be
3069 single letter literals and the Table built by the frontend would
3070 have as many components as the length of the names string. As a
3071 result of this enhancement, the internal tables declared using
3072 Index_Table have a length closer to the real needs, thus
3073 avoiding the declaration of large arrays on 32-bit CCG targets.
3075 2019-07-22 Yannick Moy <moy@adacore.com>
3077 * sem_ch3.adb (Constrain_Access): Issue a message about ignored
3080 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
3082 * sem_ch8.adb (End_Use_Type): Reset the In_Use flag on the
3083 class-wide type if the type is tagged.
3084 (Use_One_Type): Add commentary on the handling of the class-wide
3087 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
3089 * einfo.ads (Is_For_Access_Subtype): Delete.
3090 (Set_Is_For_Access_Subtype): Likewise.
3091 * einfo.adb (Is_For_Access_Subtype): Likewise.
3092 (Set_Is_For_Access_Subtype): Likewise.
3093 (Write_Entity_Flags): Do not write Is_For_Access_Subtype.
3094 * exp_ch4.adb (Expand_N_Selected_Component): Do not deal with
3096 * exp_spark.adb (Expand_SPARK_N_Selected_Component): Likewise.
3097 * sem_ch4.adb (Analyze_Explicit_Dereference): Likewise.
3098 * sem_ch3.adb (Build_Discriminated_Subtype): Do not build a
3099 special private subtype for access-to-record subtypes.
3101 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
3103 * sem_ch3.adb (Complete_Private_Subtype): Rework the setting of
3104 the Etype of the full view for full base types that cannot
3105 contain any discriminant. Remove code and comment about it in
3108 2019-07-22 Ed Schonberg <schonberg@adacore.com>
3110 * sem_ch3.adb (Convert_Bound): Subsidiary of
3111 Floating_Point_Type_Declaration, to handle properly range
3112 specifications with bounds that may include static constants of
3113 a given type rather than real literals.
3115 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
3117 * sem_aggr.adb (Rewrite_Bound): Be prepared for discriminals
3119 (Rewrite_Range;): Minor tweak.
3120 (Resolve_Record_Aggregate): For a component with default
3121 initialization whose expression is an array aggregate, also
3122 rewrite the bounds of the component associations, if any.
3124 2019-07-22 Gary Dismukes <dismukes@adacore.com>
3126 * exp_ch5.adb (Expand_N_Case_Statement): In the case where a
3127 case statement is rewritten as an equivalent if statement,
3128 inherit the From_Condition_Expression flag from the case
3131 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
3133 * sem_ch8.adb (Check_Constrained_Object): Further extend the
3134 special optimization to all limited types.
3136 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
3138 * exp_attr.adb (Expand_N_Attribute_Reference)
3139 <Attribute_Enum_Val>: Set No_Truncation on the
3140 N_Unchecked_Type_Conversion built around the argument passed to
3143 2019-07-22 Nicolas Roche <roche@adacore.com>
3145 * libgnat/s-valrea.adb (Scan_Real): Ignore non significative
3146 digits to avoid converging to infinity in some cases.
3148 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
3150 * libgnat/g-encstr.adb (Encode_Wide_String): Fix oversight.
3151 (Encode_Wide_Wide_String): Likewise.
3153 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
3155 * sem_warn.adb (Find_Var): Bail out for a function call with an
3156 Out or In/Out parameter.
3158 2019-07-22 Nicolas Roche <roche@adacore.com>
3160 * terminals.c (__gnat_tty_waitpid): Support both blocking and
3162 * libgnat/g-exptty.ads (Is_Process_Running): New function.
3163 * libgnat/g-exptty.adb (Close): Don't try to interrupt/terminate
3164 a process if it is already dead.
3166 2019-07-22 Ed Schonberg <schonberg@adacore.com>
3168 * freeze.adb (Freeze_Fixed_Point_Type): When freezing a
3169 fixed-point subtype, check whether the parent type declarastion
3170 includes an aspect specification for the 'Small type attribute,
3171 and inherit the specified value.
3173 2019-07-22 Javier Miranda <miranda@adacore.com>
3175 * freeze.adb (Freeze_Subprogram): Check that C++ constructors
3176 must have external or link name.
3178 2019-07-22 Ed Schonberg <schonberg@adacore.com>
3180 * sem_res.adb (Resolve_Selected_Component): If the prefix has a
3181 deferred reference, generate the correct reference now, to
3182 indicate that the previous assignment is used. This prevents
3183 spurious warnings on useless assignments when compiling with all
3184 warnings enabled. when there is a subsequent call in the same
3185 stqtement list, in which the prefix of the selected component is
3186 the actual for an out parameter.
3188 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
3190 * exp_attr.adb (Expand_Loop_Entry_Attribute): Copy the condition
3191 of a while loop instead of simply relocating it.
3193 2019-07-18 Arnaud Charlet <charlet@adacore.com>
3195 * Makefile.rtl, expect.c, env.c, aux-io.c, mkdir.c, initialize.c,
3196 cstreams.c, raise.c, tracebak.c, adadecode.c, init.c, raise-gcc.c,
3197 argv.c, adaint.c, adaint.h, ctrl_c.c, sysdep.c, rtinit.c, cio.c,
3198 seh_init.c, exit.c, targext.c: Introduce a "STANDALONE" mode where C
3199 runtime files do not have any dependency on GCC include files.
3200 Remove unnecessary includes.
3201 Remove remaining references to VMS in runtime C file.
3202 * runtime.h: new File.
3204 2019-07-13 Andreas Schwab <schwab@linux-m68k.org>
3206 * Makefile.rtl: Use g-sercom__linux.adb for all linuxes.
3208 2019-07-11 Piotr Trojanek <trojanek@adacore.com>
3210 * lib-writ.adb (Ensure_System_Dependency,
3211 Up_To_Date_ALI_File_Exists, Write_ALI): Replace low-level access
3212 to table with a high-level query.
3214 2019-07-11 Piotr Trojanek <trojanek@adacore.com>
3216 * checks.adb: Fix typo in comment.
3217 * sem.adb (Semantics): Avoid repeated calls to
3218 In_Extended_Main_Source_Unit by reusing an already-cached
3220 * sem_util.adb (First_Global): Fix style.
3222 2019-07-11 Yannick Moy <moy@adacore.com>
3224 * sem_res.adb (Resolve_Call): Do not perform dimensionality
3225 checking on inlined bodies.
3227 2019-07-11 Yannick Moy <moy@adacore.com>
3229 * debug.adb: Flip meaning of debug switch -gnatdF.
3231 2019-07-11 Yannick Moy <moy@adacore.com>
3233 * sem_eval.adb (Is_Same_Value): Add special case for rewritten
3234 Loop_Entry attribute.
3236 2019-07-11 Claire Dross <dross@adacore.com>
3238 * gnat1drv.adb: SPARK checking rules for pointer aliasing are
3239 moved to GNATprove backend.
3240 * sem_spark.ads, sem_spark.adb (Sem_SPARK): Is now a generic
3241 unit. Takes as parameters:
3242 - Retysp which is used to query the most underlying type
3243 visible in SPARK. We do not introduce aliasing checks for
3244 types which are not visibly deep.
3245 - Component_Is_Visible_In_SPARK is used to avoid doing pointer
3246 aliasing checks on components which are not visible in SPARK.
3247 - Emit_Messages returns True in the second phase of SPARK
3248 analysis. Error messages for failed aliasing checks are only
3249 output in this case.
3250 Additionally, errors on constructs not supported in SPARK are
3251 removed as duplicates of marking errors. Components are stored
3252 in the permission map using their original component to avoid
3253 inconsistencies between components of different views of the
3255 (Check_Expression): Handle delta constraints.
3256 (Is_Deep): Exported so that we can check for SPARK restrictions
3257 on deep types inside SPARK semantic checkings.
3258 (Is_Traversal_Function): Exported so that we can check for SPARK
3259 restrictions on traversal functions inside SPARK semantic
3261 (Check_Call_Statement, Read_Indexes): Check wether we are
3262 dealing with a subprogram pointer type before querying called
3264 (Is_Subpath_Expression): Image attribute can appear inside a
3266 (Check_Loop_Statement): Correct order of statements in the loop.
3267 (Check_Node): Ignore raise nodes.
3268 (Check_Statement): Use Last_Non_Pragma to get the object
3269 declaration in an extended return statement.
3271 2019-07-11 Patrick Bernardi <bernardi@adacore.com>
3273 * bindgen.adb (Gen_Main): Do not generate a reference to
3274 Ada_Main_Program_Name when the Minimal_Binder flag is set.
3275 (Gen_Output_File_Ada): Do not output GNAT_Version and
3276 Ada_Main_Program_Name info if Minimal_Binder flag is set.
3277 * bindusg.adb: Add documentation for new -minimal switch.
3278 * gnatbind.adb (Scan_Bind_Arg): Scan -minimal switch.
3279 * opt.ads: Add new global flag Minimal_Binder to indicate if the
3280 binder should not produce global variables.
3281 * doc/gnat_ugn/building_executable_programs_with_gnat.rst:
3282 Update documentation with new binder -minimal switch.
3283 * gnat_ugn.texi: Regenerate.
3285 2019-07-11 Eric Botcazou <ebotcazou@adacore.com>
3287 * Makefile.rtl: Add warning note about compilation flags and
3290 2019-07-11 Ed Schonberg <schonberg@adacore.com>
3292 * exp_ch9.adb (Expand_N_Protected_Type_Declaaration): New
3293 subsidiary routine Replace_Access_Definition, to handle properly
3294 a protected type PT one of whose private components is of type
3297 2019-07-11 Dmitriy Anisimkov <anisimko@adacore.com>
3299 * libgnat/g-socket.ads (Level_Type): Add enumerators for
3300 IP_Protocol_For_ICMP, IP_Protocol_For_IGMP,
3301 IP_Protocol_For_RAW_Level.
3302 * libgnat/g-socket.adb (Levels): Handle them.
3303 * s-oscons-tmplt.c: Import socket protocols defined in
3306 2019-07-11 Claire Dross <dross@adacore.com>
3308 * libgnat/a-cfhama.adb, libgnat/a-cfhase.adb (Free): Do not
3309 reset the Has_Element flag if no element is freed.
3311 2019-07-11 Arnaud Charlet <charlet@adacore.com>
3313 * errno.c: Remove obsolete support for MaRTE OS.
3315 2019-07-11 Ed Schonberg <schonberg@adacore.com>
3317 * exp_ch4.adb (Expand_N_Type_Conversion): If a predicate check
3318 is generated, analyze it with range check suppressed, because
3319 that check has been previously applied.
3320 * exp_ch5.adb (Expand_N_Assignment_Statement): If the RHS is a
3321 type conversion to the type of the LHS, do not apply a predicate
3322 check to the RHS because it will have been generated already
3323 during its expansion.
3324 * exp_ch6.adb (Can_Fold_Predicate_Call): Extend processing to
3325 handle a predicate check on a constant entity whose value is
3328 2019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
3330 * bindo.adb: Remove the documentation of switch -d_N because it
3331 is no longer in use.
3332 * bindo-graphs.ads, bindo-graphs.adb (Is_Spec_Before_Body_Edge):
3334 * bindo-writers.adb (Write_Dependency_Edge): Add the missing
3335 case of a spec-before-body edge.
3337 2019-07-11 Dmitriy Anisimkov <anisimko@adacore.com>
3339 * libgnat/g-socket.ads (Mode_Type): Add a Socket_Raw enumerator.
3340 * libgnat/g-socket.adb (Modes): Handle Socket_Raw.
3342 2019-07-11 Justin Squirek <squirek@adacore.com>
3344 * exp_ch9.adb (Build_Private_Protected_Declaration): Add
3345 exception for the moving of pragmas to internally generated
3346 specs for pragma Unreferenced.
3348 2019-07-11 Bob Duff <duff@adacore.com>
3350 * doc/gnat_ugn/gnat_utility_programs.rst: Fix inconsistent
3351 documentation for gnatmetric.
3352 * gnat_ugn.texi: Regenerate.
3354 2019-07-11 Bob Duff <duff@adacore.com>
3356 * doc/gnat_ugn/gnat_utility_programs.rst: Document gnatpp's
3357 --spaces-only switch.
3359 2019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
3361 * sem_util.adb (Null_Status): Assume that an erroneous construct
3362 has an undefined null status.
3364 2019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
3366 * checks.adb, exp_ch6.adb, gnat1drv.adb, sem_aux.adb,
3367 sem_ch2.adb, sem_ch8.adb, sem_res.adb: Minor reformatting.
3369 2019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
3371 * sem_ch8.adb (Analyze_Object_Renaming): Obtain the object being
3372 renamed using routine Get_Object_Name which takes care of
3374 (Get_Object_Name): New routine.
3376 2019-07-11 Ed Schonberg <schonberg@adacore.com>
3378 * exp_ch6.adb (Can_Fold_Predicate_Call): New function,
3379 subsidiary of Expand_Call_Helper, to compute statically a
3380 predicate check when the argument is a static integer.
3382 2019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
3384 * sem_res.adb (Resolve_Op_Not): Do not rewrite an equality
3385 operator into a function call when the operator is intrinsic.
3387 2019-07-11 Thomas Quinot <quinot@adacore.com>
3389 * sem_prag.adb (Analyze_Pragma, case pragma Check): Do not call
3390 Set_SCO_Pragma_Enabled for the dynamic predicate case.
3392 2019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
3394 * exp_util.ads, exp_util.adb (Needs_Finalization): Move to
3396 * sem_ch9.adb (Analyze_Protected_Definition): Code cleanup. Mark
3397 the protected type as having controlled components when it
3398 contains at least one such component.
3399 * sem_util.ads, sem_util.adb (Needs_Finalization): New
3402 2019-07-11 Eric Botcazou <ebotcazou@adacore.com>
3404 * alloc.ads (Rep_JSON_Table_Initial): New constant.
3405 (Rep_JSON_Table_Increment): Likewise.
3406 * debug.adb: Document -gnatd_j switch.
3407 * gcc-interface/Make-lang.in (GNAT_ADA_OBJS): Add
3409 * gnat1drv.adb: Add with clause for Repinfo.Input.
3410 Add with and use clauses for Sinput.
3411 (Read_JSON_Files_For_Repinfo): New procedure.
3412 (Gnat1drv1): Deal with -gnatd_j switch.
3413 * repinfo-input.ad[sb]: New unit.
3414 * snames.ads-tmpl (Name_Discriminant): New constant.
3415 (Name_Operands): Likewise.
3417 2019-07-11 Justin Squirek <squirek@adacore.com>
3419 * checks.adb (Apply_Accessibility_Check): Add check for constant
3420 folded conditions on accessibility checks.
3422 2019-07-11 Arnaud Charlet <charlet@adacore.com>
3424 * libgnarl/g-thread.ads, libgnarl/g-thread.adb (Get_Thread):
3425 Update comments. Add new version taking a Task_Id.
3427 2019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
3429 * bindo.adb: Update the section of switches and debugging
3431 * bindo.ads: Add type Elaboration_Phase.
3432 * bindo-augmentors.adb: Add use clause for
3433 Bindo.Writers.Phase_Writers.
3434 (Augment_Library_Graph): Signal the start and end of the
3436 * bindo-builders.adb: Add with and use clause for Bindo.Writers.
3437 Add use clause for Bindo.Writers.Phase_Writers.
3438 (Build_Invocation_Graph): Signal the start and end of the
3439 invocation graph construction phase.
3440 (Build_Library_Graph): Signal the start and end of the library
3441 graph construction phase.
3442 * bindo-diagnostics.adb: Add use clause for
3443 Bindo.Writers.Phase_Writers.
3444 (Diagnose_Cycle): Signal the start and end of the cycle
3446 * bindo-elaborators.adb: Add use clause for
3447 Bindo.Writers.Phase_Writers.
3448 (Elaborate_Units): Signal the start and end of the unit
3450 * bindo-graphs.adb: Add use clause for
3451 Bindo.Writers.Phase_Writers.
3452 (Find_Components): Signal the start and end of the component
3454 (Find_Cycles): Signal the start and end of the cycle discovery
3456 * bindo-units.adb: Add with and use clause for Bindo.Writers.
3457 Add use clause for Bindo.Writers.Phase_Writers.
3458 (Collect_Elaborable_Units): Signal the start and end of the unit
3460 * bindo-validators.adb: Add with and use clause for
3461 Bindo.Writers. Add use clause for Bindo.Writers.Phase_Writers.
3462 (Validate_Cycles, Validate_Elaboration_Order,
3463 Validate_Invocation_Graph, Validate_Library_Graph): Signal the
3464 start and end of the libray graph validation phase.
3465 * bindo-writers.ads, bindo-writers.adb: Add new nested package
3467 * debug.adb: Update the documentation of switch d_S.
3469 2019-07-11 Yannick Moy <moy@adacore.com>
3471 * sem_res.adb (Check_Argument_Order): Special case calls to
3474 2019-07-10 Dmitriy Anisimkov <anisimko@adacore.com>
3476 * libgnat/s-ststop.adb: Remove System.Strings.Stream_Ops
3477 dependence on System.Streams.Stream_IO.
3479 2019-07-10 Ed Schonberg <schonberg@adacore.com>
3481 * sem_ch2.adb (Analyze_Integer_Literal): Preserve the type of
3482 the literal if prior analysis determined that its type is a
3483 modular integer type.
3485 2019-07-10 Doug Rupp <rupp@adacore.com>
3487 * init.c: Do not attempt to re-arm guard page on x86_64-vx7(r2).
3489 2019-07-10 Ed Schonberg <schonberg@adacore.com>
3491 * sem_ch8.adb (Check_Constrained_Object): A record that is
3492 limited because of the presence of a limited component is
3493 constrained, and no subtype indiciation needs to be created for
3494 it, just as is the case for declared limited records.
3496 2019-07-10 Yannick Moy <moy@adacore.com>
3498 * sem_aux.adb, sem_aux.ads (Is_Protected_Operation): New
3499 function to determine if a subprogram is protected.
3500 * sem_spark.adb (Setup_Protected_Components): New procedure to
3501 add protected components to the environment.
3502 (Check_Callable_Body): Call the new Setup_Protected_Components.
3503 (Check_Package_Spec): Merge local environment with enclosing one
3506 2019-07-10 Claire Dross <dross@adacore.com>
3508 * sem_spark.adb (Check_Expression): Allow digits constraints as
3510 (Illegal_Global_Usage): Pass in the entity.
3511 (Is_Subpath_Expression): New function to allow different nodes
3512 as inner parts of a path expression.
3513 (Read_Indexes): Allow concatenation and aggregates with box
3514 expressions. Allow attributes Update and Loop_Entry.
3515 (Check_Expression): Allow richer membership test.
3516 (Check_Node): Ignore bodies of generics.
3517 (Get_Root_Object): Allow concatenation and attributes.
3519 2019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
3521 * sem_ch6.adb (Check_Discriminant_Conformance): Use Find_Type to
3522 discover the type of a full view discriminant.
3524 2019-07-10 Arnaud Charlet <charlet@adacore.com>
3526 * doc/gnat_ugn/gnat_and_program_execution.rst: Improve gnatmem's
3527 doc for the depth switch.
3529 2019-07-10 Bob Duff <duff@adacore.com>
3531 * doc/gnat_ugn/gnat_utility_programs.rst: Document gnatpp's
3532 --source-line-breaks switch.
3534 2019-07-10 Justin Squirek <squirek@adacore.com>
3536 * doc/gnat_rm/implementation_defined_attributes.rst: Add mention
3537 of 'Image attribute with 'Img's entry to mention additional
3538 added 2012 usage of Obj'Image.
3539 * doc/gnat_rm/implementation_defined_pragmas.rst: Correct
3540 mispelling of Async_Writers.
3541 * gnat_rm.texi: Regenerate.
3542 * sem_prag.adb (Analyze_Pragma): Correct mispelling of
3544 * sem_util.adb (State_Has_Enabled_Property): Correct mispelling
3547 2019-07-10 Simon Buist <buist@adacore.com>
3549 * sem_util.ads (Child_Prefix): New constant.
3550 * sem_util.adb (Unique_Name): Add a special prefix to child
3551 units that have a nested subprogram or package.
3553 2019-07-10 Arnaud Charlet <charlet@adacore.com>
3555 * sfn_scan.adb (Scan_SFN_Pragmas): Add pragma Assert.
3557 2019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
3559 * sem_ch3.adb (Check_Nonoverridable_Aspects): Correct the
3560 spelling in certain error messages.
3561 (Check_Pragma_Implemented): Correct the spelling in certain
3564 2019-07-10 Eric Botcazou <ebotcazou@adacore.com>
3566 * Makefile.rtl (GNATRTL_NONTASKING_OBJS): Add g-brapre.
3567 * libgnat/g-brapre.ads: New package specification.
3568 * doc/gnat_rm/the_gnat_library.rst: Document it.
3569 * gnat_rm.texi: Regenerate.
3571 2019-07-10 Yannick Moy <moy@adacore.com>
3573 * osint-c.adb (Set_File_Name): Always add extension for multiple
3574 units per file mode.
3576 2019-07-10 Corentin Gay <gay@adacore.com>
3578 * sysdep.c: Put include directive for 'vxWorks.h' before any
3579 other VxWorks headers.
3581 2019-07-10 Eric Botcazou <ebotcazou@adacore.com>
3583 * doc/gnat_rm/implementation_defined_attributes.rst
3584 (Scalar_Storage_Order): Minor tweaks. Add note about debuggers.
3585 * gnat_rm.texi: Regenerate.
3587 2019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
3589 * exp_ch4.adb (Expand_N_Case_Expression): Mark the generated
3590 assignments to the temporary result as being OK because the
3591 expansion of case expressions is correct by construction.
3592 (Is_Copy_Type): Update the predicate to match the comment
3595 2019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
3597 * bindo-graphs.adb, bindo.adb, debug.adb, exp_ch6.adb,
3598 sem_ch10.adb, sem_ch13.adb, sem_ch3.adb, sem_ch4.adb,
3599 sem_ch6.adb, sem_ch7.adb, sem_res.adb, sem_spark.adb,
3600 sem_util.adb, warnsw.ads: Minor reformatting.
3602 2019-07-10 Joffrey Huguet <huguet@adacore.com>
3604 * libgnat/a-strbou.ads, libgnat/a-strfix.ads,
3605 libgnat/a-strunb.ads, libgnat/a-strunb__shared.ads: Add global
3606 contracts, contract cases, preconditions and postconditions to
3607 procedures and functions.
3609 2019-07-10 Doug Rupp <rupp@adacore.com>
3611 * sysdep.c (__gnat_is_file_not_found_error): Reformulate to also
3612 work for vxworks7r2 SR0610.
3614 2019-07-10 Doug Rupp <rupp@adacore.com>
3616 * env.c (__gnat_environ): Reformulate to also work for
3619 2019-07-10 Patrick Bernardi <bernardi@adacore.com>
3621 * Makefile.rtl: Handle vxworks7r2 ppc target
3623 2019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
3625 * bindo.adb: Update the section on switches.
3627 (Add_Cycle, Add_Vertex_And_Complement): Remove.
3628 (Create): The graph no longer needs a set of recorded cycles
3629 because the cycles are not rediscovered in permuted forms.
3630 (Cycle_End_Vertices): New routine.
3631 (Destroy): The graph no longer needs a set of recorded cycles
3632 because the cycles are not rediscovered in permuted forms.
3633 (Destroy_Library_Graph_Vertex): Move to the library level.
3634 (Find_All_Cycles_Through_Vertex, Find_All_Cycles_With_Edge):
3636 (Find_Cycles_From_Successor, Find_Cycles_From_Vertex,
3637 Find_Cycles_In_Component, Has_Elaborate_All_Edge): New routines.
3638 (Insert_And_Sort): Remove.
3639 (Is_Elaborate_Body_Edge): Use predicate
3640 Is_Vertex_With_Elaborate_Body.
3641 (Is_Recorded_Cycle): Remove.
3642 (Is_Vertex_With_Elaborate_Body): New routine.
3643 (Normalize_And_Add_Cycle): Remove.
3644 (Precedence): Rename to xxx_Precedence, where xxx relates to the
3645 input. These versions better reflect the desired input
3647 (Record_Cycle): New routine.
3648 (Remove_Vertex_And_Complement, Set_Is_Recorded_Cycle): Remove.
3649 (Trace_xxx): Update all versions to use debug switch -d_t.
3650 (Trace_Component): New routine.
3651 (Trace_Eol): Removed.
3652 (Trace_Vertex): Do not output the component as this information
3653 is already available when the component is traced.
3654 (Unvisit, Visit): New routine.
3655 * bindo-graphs.ads: Add new instance LGV_Lists. Remove instance
3656 RC_Sets. Update the structure of type Library_Graph_Attributes
3657 to remove the set of recorded cycles.
3658 (Destroy_Library_Graph_Vertex): Move to the library level.
3659 * bindo-writers.adb (Write_Component_Vertices): Output
3660 information about the number of vertices.
3661 * debug.adb: Document the use of binder switch -d_t. Update the
3662 use of binder switch -d_T.
3664 2019-07-10 Yannick Moy <moy@adacore.com>
3666 * sem_spark.adb (Get_Root_Object): Replace precondition by error
3668 (Read_Indexes): Replace precondition by error message.
3669 (Check_Callable_Body): Check only traversal function returns an
3670 anonymous access type.
3671 (Check_Expression): Issue error on unexpected expression as
3673 * sem_util.adb (First_Global): Fix access to global on
3676 2019-07-10 Javier Miranda <miranda@adacore.com>
3678 * exp_ch6.adb (Is_Class_Wide_Interface_Type): New subprogram.
3679 (Expand_Call_Helper): Handle non-limited views when we check if
3680 any formal is a class-wide interface type.
3681 * exp_disp.adb (Expand_Interface_Actuals): Handle non-limited
3682 views when we look for interface type formals to force "this"
3685 2019-07-10 Ed Schonberg <schonberg@adacore.com>
3687 * sem_res.adb (Resolve_Equality_Op): Do not replace the resolved
3688 operator by its alias if expander is not active, because the
3689 operand type may not be frozen yet and its inherited operations
3690 have not yet been created.
3692 2019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
3694 * bindo-elaborators.adb (Elaborate_Units): Set attribute
3695 Elab_Position of all elaborated units.
3696 (Set_Unit_Elaboration_Positions): New routine.
3698 2019-07-10 Gary Dismukes <dismukes@adacore.com>
3700 * exp_util.adb: Reformatting and a typo fix.
3702 2019-07-10 Yannick Moy <moy@adacore.com>
3704 * exp_util.adb (Remove_Side_Effects): Prefer renamings for
3705 objects of possible owning type in GNATprove mode.
3707 2019-07-09 Ed Schonberg <schonberg@adacore.com>
3709 * sem_ch3.adb (Analyze_Object_Declaration): If the object type
3710 is a composite type that has a dynamic predicate and, the
3711 expression in the declaration is an aggregate, the generated
3712 predicate check must appear after the expanded code for the
3713 aggregate, which will appear after the rewritten object
3716 2019-07-09 Justin Squirek <squirek@adacore.com>
3718 * sem_eval.adb (Expr_Value_E): Add conditional to correctly
3719 handle constant enumerated character types.
3721 2019-07-09 Eric Botcazou <ebotcazou@adacore.com>
3723 * libgnarl/s-osinte__mingw.ads (CRITICAL_SECTION): Use proper
3724 type for SpinCount component.
3726 2019-07-09 Justin Squirek <squirek@adacore.com>
3728 * exp_ch4.adb (Expand_N_Allocator): Add conditional to detect
3729 the presence of anoymous access type allocators and issue a
3730 warning if the appropriate warning flag is enabled.
3731 * warnsw.ads: Add new warning flag for anonymous allocators
3732 * warnsw.adb (All_Warnings, Restore_Warnings, Save_Warnings,
3733 Set_Underscore_Warning_Switch): Register new flags.
3734 (WA_Warnings): Register new flag as an "all warnings" switch
3736 doc/gnat_ugn/building_executable_programs_with_gnat.rst:
3737 Document new warning switches -gnatw_a and -gnatw_A.
3738 * gnat_ugn.texi: Regenerate.
3740 2019-07-09 Ed Schonberg <schonberg@adacore.com>
3742 * sem_ch4.adb (Diagnose_Call): Improve error recovery when a
3743 local subprogram name hides a possible candidate name declared
3744 in a child package in the context of the current unit.
3745 * sem_ch6.adb (Process_Formals): Protect against malformed
3746 formal types when the parameter type does not denote an entity.
3748 2019-07-09 Hristian Kirtchev <kirtchev@adacore.com>
3750 * bindo-augmentors.adb (Visit_Elaboration_Root): Do not start a
3751 DFS from an elaboration root whose corresponding unit lacks
3752 elaboration code. This behavior mimics that of the old
3753 elaboration order mechanism.
3754 * bindo-graphs.adb (Find_All_Cycles_Through_Vertex): Move the
3755 vertex tracing within the functional branches of the routine.
3756 This prevents spurious trace output.
3757 (Has_No_Elaboration_Code): New routine.
3758 (Trace_Cycle, Trace_Edge): Update the various Ids to use the
3759 "standard" trace format.
3760 * bindo-graphs.ads (Has_No_Elaboration_Code): New routine.
3761 * bindo-units.ads, bindo-units.adb (Has_No_Elaboration_Code):
3764 2019-07-09 Piotr Trojanek <trojanek@adacore.com>
3766 * ali.ads, bindo-graphs.adb, bindo-validators.adb, clean.adb,
3767 doc/gnat_ugn/elaboration_order_handling_in_gnat.rst, einfo.ads,
3768 exp_aggr.adb, exp_ch13.adb, exp_ch4.adb, exp_ch5.adb,
3769 exp_ch6.adb, exp_ch7.adb, exp_ch9.adb, exp_pakd.adb,
3770 fname-uf.ads, gnatlink.adb, inline.adb, lib.ads, make.adb,
3771 namet.ads, opt.ads, par-ch4.adb, par-ch6.adb, par-labl.adb,
3772 prep.adb, sem_aggr.adb, sem_ch13.adb, sem_ch4.adb, sem_ch5.adb,
3773 sem_ch6.adb, sem_ch6.ads, sem_ch7.adb, sem_ch8.adb, sem_dim.adb,
3774 sem_disp.adb, sem_prag.adb, sem_res.adb, sem_warn.adb,
3775 sinfo.ads: Replace ". " with ". ". Minor reformatting and typo
3777 * gnat_ugn.texi: Generate.
3779 2019-07-09 Hristian Kirtchev <kirtchev@adacore.com>
3781 * bindo.ads: Move type Precedence_Kind from the private to the
3782 visible part of the unit.
3783 * bindo-augmentors.adb: Remove the use of global data as it is
3785 (Augment_Library_Graph): Update the parameter profile.
3786 (Is_Visited, Set_Is_Visited): Remove.
3787 (Visit_Elaboration_Root, Visit_Elaboration_Roots): Update the
3788 parameter profile and comment on usage.
3789 (Visit_Vertex): Likewise. Also keep track of which invocation
3790 edge activates a task.
3791 * bindo-augmentors.ads (Augment_Library_Graph): Update the
3792 parameter profile and comment on usage.
3793 * bindo-builders.adb (Create_Forced_Edge,
3794 Create_Spec_And_Body_Edge, Create_With_Edge): Update the call to
3796 * bindo-diagnostics.adb: Add with end use clauses for Restrict
3798 (Output_Dynamic_Model_Suggestions): Remove.
3799 (Output_Invocation_Related_Suggestions): New routine.
3800 (Output_Suggestions): Output all invocation-related suggestions
3802 * bindo-elaborators.adb: Remove types Comparator_Ptr and
3804 (Find_Best_Vertex): Update the parameter profile.
3805 * bindo-graphs.adb (Activates_Task): New routine.
3806 (Add_Body_Before_Spec_Edge): Update the call to
3807 Add_Edge_With_Return.
3808 (Add_Edge): Update the parameter profile and the call to
3809 Add_Edge_With_Return.
3810 (Add_Edge_With_Return): Update the parameter profile and comment
3812 (At_Least_One_Edge_Satisfies): New routine.
3813 (Contains_Elaborate_All_Edge): Reimplement.
3814 (Contains_Static_Successor_Edge, Contains_Task_Activation): New
3816 (Contains_Weak_Static_Successor): Remove.
3817 (Is_Static_Successor_Edge): New routine.
3818 * bindo-graphs.ads: Add types LGE_Predicate_Ptr,
3819 LGV_Comparator_Ptr, and LGV_Predicate_Ptr. Update type
3820 Library_Graph_Edge_Attributes to capture whether an invocation
3821 edge activates a task. Update the value of
3822 No_Library_Graph_Edge_Attributes.
3823 (Activates_Task): Update the parameter profile and comment on
3825 (Contains_Static_Successor_Edge, Contains_Task_Activation): New
3827 (Contains_Weak_Static_Successor): Remove.
3828 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst:
3829 Update the documentation to reflect the new task-related advice.
3830 * gnat_ugn.texi: Regenerate.
3832 2019-07-09 Piotr Trojanek <trojanek@adacore.com>
3834 * exp_util.adb (Containing_Package_With_Ext_Axioms): Replace
3835 low-level Ekind test with a high-level wrapper.
3837 2019-07-09 Arnaud Charlet <charlet@adacore.com>
3839 * libgnat/s-memory.adb: Disable calls to Abort defer/undefer
3840 when ZCX_By_Default.
3842 2019-07-09 Javier Miranda <miranda@adacore.com>
3844 * sem_ch13.adb (Rep_Item_Too_Early): Representation clauses are
3845 not allowed for a derivation of a generic type. Extend the
3846 current test to check that none of the parents is a generic
3849 2019-07-09 Hristian Kirtchev <kirtchev@adacore.com>
3851 * exp_ch9.adb, exp_util.adb, repinfo.adb, sem_ch12.adb,
3852 sem_prag.adb, sem_res.adb, sem_spark.adb, sem_util.adb: Minor
3855 2019-07-09 Ed Schonberg <schonberg@adacore.com>
3857 * sem_res.adb (Resolve_Equality_Op): If the node was overloaded,
3858 set properly the entity to which the node has been resolved. The
3859 original entity is the first one found during analysis, and is
3860 not necessarily the resolved one.
3861 (Resolve_Op_Not): If the argument of negation is an overloaded
3862 equality operation, call its resolution directly given that the
3863 context type does not participate in overload resolution.
3865 2019-07-09 Hristian Kirtchev <kirtchev@adacore.com>
3867 * bindo.adb: Remove with and use clauses for Debug. Add with
3868 and use clauses for Opt.
3869 (Find_Elaboration_Order): Enable the v4.0 elaboration order. The
3870 v3.0 mechanism is now available under binder switch -H.
3871 * bindusg.adb (Display): Enable switch -H.
3872 * debug.adb: Free compiler switch -gnatd_G. Free binder switch
3874 * sem_elab.adb: Update the section on switches to remove
3876 (Invocation_Graph_Recording_OK): The invocation graph is now
3877 unconditionally recorded in ALI files.
3878 * switch-b.adb (Scan_Binder_Switches): Scan switch -H.
3879 * doc/gnat_ugn/building_executable_programs_with_gnat.rst:
3880 Update the documentation on compiler switches related to
3881 elaboration. Update the documentation on binder switches to
3883 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update
3884 the documentation on elaboration order handling in GNAT.
3885 * gnat_ugn.texi: Regenerate.
3887 2019-07-09 Eric Botcazou <ebotcazou@adacore.com>
3889 * repinfo.adb (List_Entities): Disregard formals altogether.
3890 (List_Name): Properly escape the double quote in the JSON
3893 2019-07-09 Javier Miranda <miranda@adacore.com>
3895 * exp_util.adb (Remove_Side_Effects): Preserve the
3896 Do_Range_Check flag.
3898 2019-07-09 Yannick Moy <moy@adacore.com>
3900 * sinfo.ads: Refine comment for Do_Range_Check.
3902 2019-07-09 Yannick Moy <moy@adacore.com>
3904 * exp_spark.adb (Expand_SPARK_N_Attribute_Reference): Expand
3905 attribute reference on Enum_Rep.
3907 2019-07-09 Ed Schonberg <schonberg@adacore.com>
3909 * sem_ch12.adb (Instantiate_Formal_Package): Handle properly the
3910 case where the actual for a formal package in an instance is the
3911 current instance of an enclosing generic package.
3912 (Check_Formal_Packages): If the formal package declaration is
3913 box-initialized or lacks associations altogether, no internal
3914 instance was created to verify conformance, and there is no
3915 validating package to remove from tree.
3917 2019-07-09 Yannick Moy <moy@adacore.com>
3919 * freeze.adb (Build_Renamed_Body): Do not set body to inline in
3922 2019-07-09 Yannick Moy <moy@adacore.com>
3924 * exp_util.adb (Expand_Subtype_From_Expr): Still expand the type
3925 of static expressions in GNATprove_Mode.
3926 * sem_ch3.adb (Analyze_Object_Declaration): Remove obsolete
3927 special case for GNATprove_Mode.
3929 2019-07-09 Piotr Trojanek <trojanek@adacore.com>
3931 * doc/gnat_rm/the_gnat_library.rst,
3932 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
3933 erroutc.adb, libgnat/g-comlin.adb, libgnat/g-comlin.ads,
3934 libgnat/g-regexp.ads, libgnat/g-regpat.ads,
3935 libgnat/g-spipat.ads, libgnat/s-os_lib.ads,
3936 libgnat/s-regexp.ads: Reword "wild card" to "wildcard".
3937 * gnat_rm.texi, gnat_ugn.texi: Regenerate.
3939 2019-07-09 Yannick Moy <moy@adacore.com>
3941 * sem_spark.adb (Check_Expression): Handle correctly implicit
3942 assignments as part of allocators and (extension) aggregates.
3943 (Get_Root_Object): Adapt for new path expressions.
3944 (Is_Path_Expression): Return True for (extension) aggregate.
3946 2019-07-09 Piotr Trojanek <trojanek@adacore.com>
3948 * einfo.ads: Fix a typo.
3950 2019-07-09 Ed Schonberg <schonberg@adacore.com>
3952 * sem_util.adb (Scope_Within_Or_Same): Handle properly task
3953 bodies and protected bodies, so that local variables within have
3954 their proper scopes after these constructs have been rewritten
3955 during expansion. This patch resembles but is not identical to
3956 the code in Scope_Within.
3958 2019-07-09 Arnaud Charlet <charlet@adacore.com>
3960 * gnat1drv.adb (Adjust_Global_Switches): Set
3961 Dynamic_Elaboration_Checks to True in CodePeer mode.
3963 2019-07-09 Yannick Moy <moy@adacore.com>
3965 * sem_spark.adb (Get_Perm_Or_Tree): Issue an error when
3966 encountering unknown global variable.
3968 2019-07-09 Yannick Moy <moy@adacore.com>
3970 * sem_spark.adb (Check_Expression): Change signature to take an
3971 Extended_Checking_Mode, for handling read permission checking of
3972 sub-expressions in an assignment.
3973 (Check_Parameter_Or_Global): Adapt to new behavior of
3974 Check_Expression for mode Assign.
3975 (Check_Safe_Pointers): Do not analyze generic bodies.
3976 (Check_Assignment): Separate checking of the target of an
3979 2019-07-09 Eric Botcazou <ebotcazou@adacore.com>
3981 * repinfo.ads (JSON format): Adjust.
3982 * repinfo.adb (Need_Blank_Line): Rename to...
3983 (Need_Separator): ...this.
3984 (Blank_Line): Rename to...
3985 (Write_Separator): ...this and add JSON specific handling.
3986 (List_Array_Info): Adjust to above renaming.
3987 (List_Object_Info): Likewise.
3988 (List_Record_Info): Likewise.
3989 (List_Subprogram_Info): Likewise.
3990 (List_Type_Info): Likewise.
3991 (List_Entities): Do not set Need_Blank_Line.
3992 (List_Rep_Info): Set Need_Separator and add JSON specific
3993 handling. Output a single JSON stream in the normal case.
3995 2019-07-09 Arnaud Charlet <charlet@adacore.com>
3997 * doc/gnat_ugn/the_gnat_compilation_model.rst: Update doc on
3998 -fdump-ada-spec now that we generate Ada 2012.
3999 * gnat_ugn.texi: Regenerate.
4001 2019-07-08 Eric Botcazou <ebotcazou@adacore.com>
4003 * repinfo.adb (List_Common_Type_Info): New procedure extracted
4005 (List_Type_Info): ...here. Call it for the common information,
4006 start with a blank line and output the linker section at the
4008 (List_Mechanisms): Rename to...
4009 (List_Subprogram_Info): ...this.
4010 (List_Array_Info): Call List_Common_Type_Info.
4011 (List_Entities): Adjust to above change and renaming.
4012 (List_Record_Info): Call List_Common_Type_Info.
4014 2019-07-08 Dmitriy Anisimkov <anisimko@adacore.com>
4016 * libgnat/g-sercom.ads
4017 (Serial_Port_Descriptor): New type.
4018 (Serial_Port): Add a comment, make it hold a
4019 Serial_Port_Descriptor.
4020 (To_Ada, To_C): New procedures.
4021 (Port_Data, Port_Data_Access): Remove types.
4022 * libgnat/g-sercom.adb (To_Ada): New stub.
4023 * libgnat/g-sercom__linux.adb, libgnat/g-sercom__mingw.adb:
4024 Update implementations accordingly.
4025 * s-oscons-tmplt.c: Bind Serial_Port_Descriptor to
4026 System.Win32.HANDLE on Windows, and to Interfaces.C.int on
4027 Linux. Add "Interfaces.C." prefix for other basic integer type
4029 * xoscons.adb (Output_Info): Remove the "Interfaces.C." prefix
4030 for subtypes generation.
4032 2019-07-08 Arnaud Charlet <charlet@adacore.com>
4034 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
4035 Update documentation on No_Exceptions restriction.
4036 * gnat_rm.texi: Regenerate.
4038 2019-07-08 Dmitriy Anisimkov <anisimko@adacore.com>
4040 * libgnat/s-os_lib.adb: Do not call __gnat_kill for Invalid_Pid.
4042 2019-07-08 Piotr Trojanek <trojanek@adacore.com>
4044 * sem_util.adb (Enclosing_Package_Or_Subprogram): Do not expect
4045 package and subprogram bodies.
4047 2019-07-08 Bob Duff <duff@adacore.com>
4049 * doc/gnat_ugn/gnat_utility_programs.rst: Remove documentation
4050 of ignored GNATpp switch.
4052 2019-07-08 Hristian Kirtchev <kirtchev@adacore.com>
4054 * doc/gnat_rm/implementation_defined_pragmas.rst:
4055 Update the documentation of pragma Initialize_Scalars.
4056 * gnat_rm.texi: Regenerate.
4058 2019-07-08 Javier Miranda <miranda@adacore.com>
4060 * exp_ch4.adb (Tagged_Membership): Fix regression silently
4061 introduced in r260738 that erroneouslusy causes the evaluation
4062 to True of the membership test when the left operand of the
4063 membership test is a class-wide interface object and the right
4064 operand is a type that implements such interface type.
4066 2019-07-08 Hristian Kirtchev <kirtchev@adacore.com>
4068 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
4069 register an address clause when its prefix denotes a generic
4072 2019-07-08 Hristian Kirtchev <kirtchev@adacore.com>
4074 * bindo-diagnostics.adb (Diagnose_Cycle): Capture the presence
4075 of an Elaborate_All edge before iterating over the edges of the
4077 (Output_Elaborate_Body_Transition): Update the parameter profile
4078 and the comment on usage. Add a missing case where the edge is
4079 within the context of an Elaborate_All.
4080 (Output_Transition): Update the call to
4081 Output_Elaborate_Body_Transition.
4082 * bindo-graphs.ads, bindo-graphs.adb
4083 (Contains_Elaborate_All_Edge): New routine.
4085 2019-07-08 Piotr Trojanek <trojanek@adacore.com>
4087 * lib-xref-spark_specific.adb (Create_Heap): Set dummy Etype for
4088 the fake __HEAP entity.
4090 2019-07-08 Daniel Mercier <mercier@adacore.com>
4092 * gnat1drv.adb: Suppress warnings on memory representation in
4093 CodePeer compiler mode.
4095 2019-07-08 Nicolas Roche <roche@adacore.com>
4097 * rtinit.c (__gnat_runtime_initialize): Remove dependency on
4100 2019-07-08 Doug Rupp <rupp@adacore.com>
4102 * Makefile.rtl: Handle vxworks7r2 in x86_64 and x86 vxworks7.
4104 2019-07-08 Dmitriy Anisimkov <anisimko@adacore.com>
4106 * Makefile.rtl: Use g-sercom__linux.adb for all linuxes.
4108 2019-07-08 Yannick Moy <moy@adacore.com>
4110 * expander.adb (Expand): Do not reset Analyzed flag always.
4111 * sem_eval.adb (Fold_Ureal): Mark node as analyzed.
4113 2019-07-08 Ed Schonberg <schonberg@adacore.com>
4115 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Do not insert twice
4116 the assignment statement that computes the delay value, to
4117 prevent improper tree sharing when the value is a type
4118 conversion and Float_Overflow checks are enabled.
4120 2019-07-08 Hristian Kirtchev <kirtchev@adacore.com>
4122 * bindo.adb: Update the section on terminology to include new
4123 concepts. Update the section on switches to include new
4125 * bindo.ads: Add type Precedence_Kind.
4126 * bindo-builders.adb: Add with and use clauses for Debug and
4127 Bindo.Validators. Add use clauses for
4128 Bindo.Validators.Invocation_Graph_Validators and
4129 Bindo.Validators.Library_Graph_Validators.
4130 (Build_Invocation_Graph): Validate the graph immediately after
4132 (Build_Library_Graph): Update the parameter profile. The
4133 creation of the graph is now elaboration model-agnostic.
4134 Validate the graph immediately after it was built.
4135 (Create_With_Edge): Create regular with edges for Elaborate and
4136 Elaborate_All edges when the appropriate debug switches are in
4138 * bindo-builders.ads (Build_Library_Graph): Update the parameter
4140 * bindo-diagnostics.adb (Diagnose_Cycle): Track the presence of
4141 an Elaborate_All edge throughout the inspection of the cycle's
4143 (Output_Dynamic_Model_Suggestions): Output the suggestion only
4144 when the cycle contains at least one weak edge where the
4145 successor was statically elaborated.
4146 (Output_Elaborate_Body_Transition, Output_Forced_Transition,
4147 Output_With_Transition): Update the assertions.
4148 * bindo-elaborators.adb: Remove use clauses for
4149 Bindo.Validators.Invocation_Graph_Validators and
4150 Bindo.Validators.Library_Graph_Validators. Remove strings
4151 Add_To_All_Candidates_Msg and Add_To_Comp_Candidates_Msg.
4152 Remove type String_Ptr.
4153 (Add_Vertex, Add_Vertex_If_Elaborable, Create_All_Candidates_Set
4154 Create_Component_Candidates_Set): Remove.
4155 (Create_Component_Vertex_Sets, Create_Vertex_Sets): New routine.
4156 (Elaborate_Component): Update the parameter profile and the
4157 comment on usage. Reimplement the elaboration of a component.
4158 The algorithm will now attempt to elaborate as many vertices
4159 possible. If this is not possible, and a weakly elaborable
4160 vertex is available use unit was compiled using the dynamic
4161 model, the algorithm will elaborate it.
4162 (Elaborate_Library_Graph): Reimplement the elaboration of the
4163 graph. The algorithm will now attempt to elaborate as many
4164 vertices along with their components as possible. If this is not
4165 possible, and a weakly elaborable vertex is available use unit
4166 was compiled using the dynamic model, the algorithm will
4167 elaborate it along with its component.
4168 (Elaborate_Units): Merge with the functionality of
4169 Elaborate_Units_Common.
4170 (Elaborate_Units_Common, Elaborate_Units_Dynamic,
4171 Elaborate_Units_Static): Remove.
4172 (Elaborate_Vertex): Update the parameter profile and the comment
4173 on usage. Reimplemented.
4174 (Find_Best_Candidate): Remove.
4175 (Find_Best_Elaborable_Vertex, Find_Best_Vertex,
4176 Find_Best_Weakly_Elaborable_Vertex, Has_Elaborable_Body,
4177 Insert_Elaborable_Successor, Insert_Vertex): New routines.
4178 (Is_Better_Candidate): Remove.
4179 (Is_Better_Elaborable_Vertex,
4180 Is_Better_Weakly_Elaborable_Vertex,
4181 Is_Suitable_Elaborable_Vertex,
4182 Is_Suitable_Weakly_Elaborable_Vertex): New routines.
4183 (Trace_Candidate_Vertices): Remove.
4184 (Trace_Component): Output the number of strong and weak
4186 (Trace_Unelaborated_Vertices): Remove.
4187 (Trace_Vertex): Output the number of strong and weak
4189 (Trace_Vertices): New routine.
4190 (Update_Successor, Update_Successors): Update the parameter
4191 profile and the comment on usage.
4192 * bindo-graphs.adb: Remove type Precedence_Kind.
4193 (Add_Edge_With_Return): Update the increment of pending
4195 (Add_Vertex): Provide default values for strong and weak
4197 (Complementary_Vertex): Move the initial declaration to the
4198 spec. Update the parameter profile and the comment on usage.
4199 (Contains_Weak_Static_Successor): New routine.
4200 (Create): Update the parameter profile. The creation of the
4201 graph is now elaboration model-agnostic.
4202 (Decrement_Pending_Predecessors): Update the parameter profile
4203 and the comment on usage. Reimplemented.
4204 (Delete_Edge): Update the decrement of pending predecesors.
4205 (Has_Elaborate_Body): Do not treat a vertex as being subject to
4206 Elaborate_Body when a debug switch is in effect.
4207 (Increment_Pending_Predecessors): Update the parameter profile
4208 and the comment on usage. Reimplemented.
4209 (Is_Elaborable_Component): Reimplemented.
4210 (Is_Elaborable_Vertex): Move the initial declaration to the
4211 spec. Reimplemented.
4212 (Is_Elaborate_Body_Pair): New routine.
4213 (Is_Dynamically_Elaborated): Update the parameter profile.
4215 (Is_Weakly_Elaborable_Vertex): New routine.
4216 (Pending_Predecessors): Removed.
4217 (Pending_Predecessors_For_Elaboration,
4218 Pending_Strong_Predecessors, Pending_Weak_Predecessors,
4219 Update_Pending_Predecessors): New routines.
4220 (Update_Pending_Predecessors_Of_Components): Update the
4221 increment of pending predecessors.
4222 * bindo-graphs.ads: Update the components of type
4223 Component_Attributes. Update the components of type
4224 Library_Graph_Attributes. Update the components of type
4225 Library_Graph_Vertex_Attributes. Update the initialization of
4226 No_Component_Attributes. Update the initialization of
4227 No_Library_Graph_Vertex_Attributes.
4228 (Complementary_Vertex, Contains_Weak_Static_Successor): New
4230 (Create): Update the parameter profile and the comment on usage.
4231 (Decrement_Pending_Predecessors, Is_Dynamically_Elaborated):
4232 Update the parameter profile and the comment on usage.
4233 (Is_Elaborate_Body_Pair, Is_Weakly_Elaborable_Vertex): New
4235 (Pending_Predecessors): Removed.
4236 (Pending_Predecessors_For_Elaboration,
4237 Pending_Strong_Predecessors, Pending_Weak_Predecessors): New
4239 * bindo-writers.adb (Write_Components): Moved from the spec.
4240 (Write_Component): Output the strong and weak predecessors.
4241 (Write_Library_Graph): Output the components as part of the
4243 (Write_Library_Graph_Vertex): Output the strong and weak
4245 * bindo-writers.ads (Write_Components): Moved to the body.
4246 * debug.adb: Add and document new GNATbind switches -d_a, -d_b,
4248 * bindo-validators.adb: Minor reformattings.
4250 2019-07-08 Bob Duff <duff@adacore.com>
4252 * libgnat/g-sercom.ads, libgnat/g-sercom__linux.adb (Data_Rate):
4253 Support additional data rates.
4255 2019-07-08 Olivier Hainque <hainque@adacore.com>
4257 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Don't request
4258 DECL_ARTIFICIAL_P on elab proc declarations.
4260 2019-07-08 Eric Botcazou <ebotcazou@adacore.com>
4262 * repinfo.adb (List_Record_Info): Declare Incomplete_Layout and
4263 Not_In_Extended_Main local exceptions.
4264 (List_Structural_Record_Layout): For an extension, raise the
4265 former if the parent subtype has not been built and the latter
4266 if it is not declared in the main source unit. Fall back to the
4267 flat layout if either exception has been raised.
4269 2019-07-08 Ed Schonberg <schonberg@adacore.com>
4271 * libgnat/a-strfix.adb (Delete): The RM describes the semantics
4272 of Delete as equivalent to that of Replace_String with a null
4273 argument. As a result, deleting a null string that starts past
4274 the end of its argument is a noop and must not raise
4277 2019-07-08 Javier Miranda <miranda@adacore.com>
4279 * exp_disp.adb (Register_Primitive): When registering a
4280 primitive in the secondary dispatch table, handle primitive
4281 inherited through several levels of type derivation (required to
4282 properly handle inherited 'null' primitive).
4284 2019-07-08 Bob Duff <duff@adacore.com>
4286 * doc/gnat_ugn/gnat_utility_programs.rst: Document handling of
4287 preprocessor directives in GNATpp.
4289 2019-07-08 Javier Miranda <miranda@adacore.com>
4291 * gnat1drv.adb (Post_Compilation_Validation_Checks:
4292 Validate_Compile_Time_Warning_Errors is now located in sem_prag
4293 (instead of sem_ch13).
4294 * sem_ch13.ads (Validate_Compile_Time_Warning_Error,
4295 Validate_Compile_Time_Warning_Errors): Move to sem_prag.
4297 (Compile_Time_Warnings_Errors): Move to sem_prag.
4298 (Initialize): Remove initialization of table
4299 Compile_Time_Warning_Errors.
4300 (Validate_Compile_Time_Warning_Error,
4301 Validate_Compile_Time_Warning_Errors): Move to sem_prag.
4302 * sem_prag.ads (Validate_Compile_Time_Warning_Errors): New
4304 * sem_prag.adb (Initialize): Initialize table
4305 Compile_Time_Warning_Errors.
4307 2019-07-08 Ed Schonberg <schonberg@adacore.com>
4309 * sem_ch13.adb (Analyze_Aspect_Specifications): For a
4310 pre/postcondition of a generic subprogram declaration, do not
4311 use Relocate_Node on the aspect expression to construct the
4312 corresponding attribute specification, to prevent tree anomalies
4313 when the expression is a call with named actual parameters.
4315 2019-07-08 Javier Miranda <miranda@adacore.com>
4317 * sem_attr.adb (Analyze_Attribute [Attribute_Size]): For pragmas
4318 used to report user defined compile time warning or errors
4319 handle 'Size for types with known static RM size.
4321 2019-07-08 Justin Squirek <squirek@adacore.com>
4323 * exp_imgv.adb (Build_Enumeration_Image_Tables): Default SSO for
4324 the building of image tables.
4325 (Expand_Image_Attribute): Minor cleanup.
4327 2019-07-08 Dmitriy Anisimkov <anisimko@adacore.com>
4329 * libgnat/g-socket.ads, libgnat/g-socket.adb: Improve
4331 (Get_Socket_Option, Set_Socket_Option): Remove default value for
4334 2019-07-08 Ed Schonberg <schonberg@adacore.com>
4336 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): For an
4337 unanalized aspect in a generic context that has not been
4338 analyzed yet, if the aspect applies to a type, place the type on
4339 the scope stack to make its components visible, before checking
4340 conformance with the version of the expression analyzed at the
4343 2019-07-05 Justin Squirek <squirek@adacore.com>
4345 * checks.adb (Apply_Accessibility_Check): Add logic to fetch the
4346 function result accessibility level if one is required within
4347 the generated check.
4348 * exp_ch6.adb (Needs_Result_Accessibility_Level): Modify
4349 controlling elsif block to handle more cases such as anonymous
4350 access results and disable checking for coextensions.
4352 2019-07-05 Ed Schonberg <schonberg@adacore.com>
4354 * sem_ch9.adb (Analyze_Accept_Statement): If this is an illegal
4355 accept statement for an enclosing entry abandon analysis to
4356 prevent scope mismatches and potential infinite loops in
4359 2019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
4361 * ali.adb (For_Each_Invocation_Construct,
4362 For_Each_Invocation_Relation): New version.
4363 (Scan_ALI): Initialize field Invocation_Graph_Encoding.
4364 (Set_Invocation_Graph_Encoding): Update the setting of the
4365 invocation graph encoding.
4366 * ali.ads: Move field Invocation_Graph_Encoding from Unit_Record
4367 to ALI_Record because the encoding applies to the whole ALI,
4368 rather than one of the units (spec or body) for which the ALI
4370 (For_Each_Invocation_Construct, For_Each_Invocation_Relation):
4372 * bindo.adb: Update the section on switches. Complete the
4373 section of debugging elaboration order issues.
4374 (Find_Elaboration_Order): Prepare the routine for the switch
4375 from the old to the new elaboration order mechanism.
4376 * bindo-diagnostics.adb (Find_And_Output_Invocation_Paths):
4377 Manage a visited set used by Visit_Vertex.
4378 (Output_All_Cycles_Suggestions,
4379 Output_Dynamic_Model_Suggestions): Clarify the nature of the
4381 (Output_Elaborate_Body_Transition): Update the diagnostic to
4382 emit a better message.
4383 (Output_Forced_Suggestions, Output_Full_Encoding_Suggestions):
4384 Clarify the nature of the suggested switch.
4385 (Visit_Vertex): Update the parameter profile to add a set of
4386 invokers visited during the transition. This set prevents
4387 infinite exploration of the graph in case the invocations are
4389 * bindo-elaborators.adb: Add a use clause for
4390 Bindo.Writers.Dependency_Writers.
4391 (Elaborate_Units_Common): Output the library graph after it has
4392 been augmented with invocation edges. Output just the components
4393 instead of outputting the whole library graph again.
4394 (Elaborate_Units_Dynamic, Elaborate_Units_Static): Output the
4395 dependencies as expressed in the library graph.
4396 * bindo-units.adb (Invocation_Graph_Encoding): Update the
4397 extraction of the invocation graph encoding.
4398 * bindo-writers.adb: Add with and use clauses for Binderr and
4400 (palgc, plgc): New debug routine.
4401 (Write_Components): Moved to the spec. Add a header for the
4403 (Write_Dependencies, Write_Dependencies_Of_Vertex,
4404 Write_Dependency_Edge): New routine.
4405 (Write_Elaboration_Order): Update the logic to follow the format
4406 of Binde's order output.
4407 (Write_Library_Graph): Do not output the components every time
4408 the graph is written.
4409 (Write_Unit): Output the invocation graph encoding of the unit.
4410 Output the invocation constructs and relations for the unit
4412 * bindo-writers.ads (Write_Components): Moved from the body.
4413 (Write_Dependencies): New routine.
4414 * bindusg.adb: Prepare the routine for the switch from the old
4415 to the new elaboration order mechanism.
4416 * debug.adb: Binder switch -d_O is now not associated with any
4418 * einfo.adb (Is_Elaboration_Target): The attribute applies to
4419 packages, as specified by the comment on the attribute usage.
4420 * opt.ads: Add a global flag which controls the choice between
4421 the new and the legacy elaboration order mechanism.
4422 * sem_elab.adb: Add Package_Target to type Target_Kind.
4423 (Build_Elaborate_Body_Procedure, Build_Elaborate_Procedure,
4424 Build_Elaborate_Spec_Procedure, Check_Elaboration_Scenarios,
4425 Check_SPARK_Model_In_Effect): Use Main_Unit_Entity to obtain the
4426 entity of the main unit.
4427 (Create_Package_Rep): New routine.
4428 (Create_Target_Rep): Add processing for packages.
4429 (Declaration_Placement_Of_Node, Has_Prior_Elaboration): Use
4430 Main_Unit_Entity to obtain the entity of the main
4432 (Invocation_Graph_Recording_OK): Prepare the routine for the
4433 switch from the old to the new elaboration order mechanism.
4434 (Main_Unit_Entity): New routine.
4435 (Meet_Elaboration_Requirement,
4436 Process_Conditional_ABE_Variable_Reference): Use
4437 Main_Unit_Entity to obtain the entity of the main unit.
4438 (Process_Invocation_Instantiation): New routine.
4439 (Process_Invocation_Scenario): Add processing for
4441 * switch-b.adb (Scan_Binder_Switches): Prepare the routine for
4442 the switch from the old to the new elaboration order mechanism.
4444 2019-07-05 Joffrey Huguet <huguet@adacore.com>
4446 * libgnat/a-textio.adb: Add abstract state refinment.
4447 * libgnat/a-textio.ads: Add File_System abstract state. Add
4448 global contracts, contract cases, preconditions and
4449 postconditions to procedures and functions.
4450 (Set_Input, Set_Output, Set_Error, Standard_Input,
4451 Standard_Output, Standard_Error, Current_Input, Current_Output,
4452 Current_Error): Turn SPARK_Mode off.
4453 (Get_Line): Turn SPARK_Mode off on Get_Line functions.
4454 * libgnat/a-tideio.ads, libgnat/a-tienio.ads,
4455 libgnat/a-tifiio.ads, libgnat/a-tiflio.ads,
4456 libgnat/a-tiinio.ads, libgnat/a-timoio.ads: Add global
4457 contracts, contract cases, preconditions and postconditions to
4458 procedures and functions.
4460 2019-07-05 Arnaud Charlet <charlet@adacore.com>
4462 * doc/gnat_ugn/platform_specific_information.rst: Refresh doc on
4463 installing from the command line on Windows. Remove obsolete
4465 * gnat_ugn.texi: Regenerate.
4467 2019-07-05 Vasiliy Fofanov <fofanov@adacore.com>
4469 * libgnat/a-wichha.ads (Is_Alphanumeric): Replace comment with
4470 the correct one. Also capitalize references to False
4473 2019-07-05 Eric Botcazou <ebotcazou@adacore.com>
4475 * exp_ch4.adb (Expand_N_Indexed_Component): Do not expand actual
4476 parameters of function calls here either.
4478 2019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
4480 * bindo-units.adb, checks.adb, exp_attr.adb, exp_ch3.adb,
4481 exp_ch4.adb, exp_pakd.adb, lib-writ.adb, libgnat/g-traceb.adb,
4482 libgnat/g-traceb.ads, libgnat/s-stratt.ads, sem_aux.ads,
4483 sem_util.adb: Minor reformatting.
4485 2019-07-05 Ed Schonberg <schonberg@adacore.com>
4487 * sem_ch13.adb (Build_Predicate_Functions): If a subtype that
4488 carries a static predicate aspect is frozen immediately after
4489 its declaration, ensure that the generated function body created
4490 for predicate checking is inserted after the corresponding
4491 subprogram declaration, which is created at the point the
4492 declaration is elaborated.
4494 2019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
4496 * exp_ch7.adb (Cleanup_Record): Use the underlying type when
4497 checking for components with tasks.
4499 2019-07-05 Arnaud Charlet <charlet@adacore.com>
4501 * libgnarl/s-osinte__linux.ads: Link with -lrt before -lpthread.
4503 2019-07-05 Ed Schonberg <schonberg@adacore.com>
4505 * exp_pakd.adb (Expand_Bit_Packed_Element_Set): Add explicit
4506 range checks when the index type of the bit-packed array is an
4507 enumeration type with a non-standard representation,
4509 2019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
4511 * sem_res.adb (Is_Control_Flow_Statement): Delay statements
4512 contain an expression, which in turn may have side effects and
4513 affect the infinite recursion. As a result, delay statements
4514 should not be treated specially.
4516 2019-07-05 Arnaud Charlet <charlet@adacore.com>
4518 * libgnarl/s-linux.ads, libgnarl/s-linux__alpha.ads,
4519 libgnarl/s-linux__android.ads, libgnarl/s-linux__hppa.ads,
4520 libgnarl/s-linux__mips.ads, libgnarl/s-linux__riscv.ads,
4521 libgnarl/s-linux__sparc.ads: Fix typos in comments.
4523 2019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
4525 * sem_res.adb (Check_Infinite_Recursion): Reimplemented.
4526 (Enclosing_Declaration_Or_Statement,
4527 Invoked_With_Different_Arguments, Is_Conditional_Statement,
4528 Is_Control_Flow_Statement, Is_Immediately_Within_Body,
4529 Is_Raise_Idiom, Is_Raise_Statement, Is_Sole_Statement,
4530 Preceded_By_Control_Flow_Statement,
4531 Within_Conditional_Statement): New routines.
4533 2019-07-05 Javier Miranda <miranda@adacore.com>
4535 * exp_ch4.adb (Expand_N_Type_Conversion): Do not apply an
4536 accessibility check when the conversion is an access to
4537 class-wide interface type and it is an actual parameter.
4538 * exp_ch6.adb (Expand_Call_Helper): Add documentation on the
4539 accessibility level of an anonymous allocator defining the value
4540 of an access parameter.
4541 * sem_util.ads, sem_util.adb (Dynamic_Accessibility_Level): Add
4542 support for an anonymous allocator whose type is that of a
4543 stand-alone object of an anonymous access to object type.
4545 2019-07-05 Piotr Trojanek <trojanek@adacore.com>
4547 * einfo.ads, sem_res.adb: Typo fixes in comments.
4549 2019-07-05 Bob Duff <duff@adacore.com>
4551 * exp_ch6.adb (Is_Build_In_Place_Function): Narrow the check for
4552 Has_Foreign_Convention to the imported case only. If a
4553 build-in-place function is exported, and called from Ada code,
4554 build-in-place protocols should be used.
4556 2019-07-05 Ed Schonberg <schonberg@adacore.com>
4558 * sem_util.adb (Encloing_Subprogram): If Enclosing_Dynamic_Scope
4559 is a loop, continue climbing the scope stack to find the
4560 enclosing subprogram.
4561 (Gather_Components): Handle properly a choice in a record
4562 aggregate that is given by a subtype with a static predicate.
4564 2019-07-05 Javier Miranda <miranda@adacore.com>
4566 * debug.adb (-gnatd.K): Leave available this switch.
4567 * contracts.adb (Build_And_Analyze_Contract_Only_Subprograms):
4569 * scil_ll.ads, scil_ll.adb (Contract_Only_Body_Flag,
4570 Contract_Only_Body_Nodes, Get_Contract_Only_Body,
4571 Is_Contract_Only_Body, Set_Contract_Only_Body): Remove.
4573 2019-07-05 Pierre-Marie de Rodat <derodat@adacore.com>
4575 * libgnat/a-strunb.ads: Import documentation from the RM
4577 2019-07-05 Pierre-Marie de Rodat <derodat@adacore.com>
4579 * libgnat/a-strfix.ads: Import documentation from the RM
4581 2019-07-05 Yannick Moy <moy@adacore.com>
4583 * adabkend.adb (Scan_Back_End_Switches): Accept -Og and -Ofast
4586 2019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
4588 * ali.adb: Relocate types Invocation_Construct_Record,
4589 Invocation_Relation_Record, and Invocation_Signature_Record to
4590 the body of ALI. Relocate tables Invocation_Constructs,
4591 Invocation_Relations, and Invocation_Signatures to the body of
4592 ALI. Remove type Body_Placement_Codes. Add new types
4593 Declaration_Placement_Codes, and
4594 Invocation_Graph_Encoding_Codes. Update the literals of type
4595 Invocation_Graph_Line_Codes.
4596 (Add_Invocation_Construct): Update the parameter profile. Add an
4597 invocation construct built from all attributes provided.
4598 (Add_Invocation_Relation): Update the parameter profile. Add an
4599 invocation relation built from all attributes provided.
4600 (Body_Placement): New routine.
4601 (Body_Placement_Kind_To_Code, Code_To_Body_Placement_Kind):
4603 (Code_To_Declaration_Placement_Kind,
4604 Code_To_Invocation_Graph_Encoding_Kind, Column,
4605 Declaration_Placement_Kind_To_Code, Extra,
4606 For_Each_Invocation_Construct, For_Each_Invocation_Relation,
4607 Invocation_Graph_Encoding,
4608 Invocation_Graph_Encoding_Kind_To_Code, Invoker, Kind, Line,
4609 Locations, Name): New routine.
4610 (Scan_Invocation_Construct_Line): Reimplement the scanning
4612 (Scan_Invocation_Graph_Attributes_Line): New routine.
4613 (Scan_Invocation_Graph_Line): Use a case statement to dispatch.
4614 (Scan_Invocation_Relation_Line): Reimplement the scanning
4616 (Scope): New routine.
4617 (Set_Invocation_Graph_Encoding, Signature, Spec_Placement,
4618 Target): New routine.
4619 * ali.ads: Add new type Invocation_Graph_Encoding_Kind. Add
4620 component Invocation_Graph_Encoding to type Unit_Record.
4621 Relocate various types and data structures to the body of ALI.
4622 (Add_Invocation_Construct, Add_Invocation_Relation): Update the
4624 (Body_Placement): New routine.
4625 (Body_Placement_Kind_To_Code, Code_To_Body_Placement_Kind):
4627 (Code_To_Declaration_Placement_Kind,
4628 Code_To_Invocation_Graph_Encoding_Kind, Column,
4629 Declaration_Placement_Kind_To_Code, Extra,
4630 For_Each_Invocation_Construct, For_Each_Invocation_Relation,
4631 Invocation_Graph_Encoding,
4632 Invocation_Graph_Encoding_Kind_To_Code, Invoker, Kind, Line,
4633 Locations, Name, Scope, Set_Invocation_Graph_Encoding,
4634 Signature, Spec_Placement, Target): New routine.
4635 * bindo.adb: Add with clause for Binde. Add with and use
4636 clauses for Debug. Update the documentation. Add new switches.
4637 (Find_Elaboration_Order): Dispatch to the proper elaboration
4639 * bindo-augmentors.adb:
4640 Remove with and use clauses for GNAT and GNAT.Sets. Remove
4641 membership set VS. Update the parameter profiles of most
4642 routines to use better parameter names. Update the
4643 implementation of most routine to use the new parameter names.
4644 Remove various redundant assertions.
4645 * bindo-builders.adb: Use better names for instantiated data
4646 structures. Update all references to these names. Update the
4647 parameter profiles of most routines to use better parameter
4648 names. Update the implementation of most routine to use the new
4650 (Build_Library_Graph): Update the parameter profile. Update the
4652 (Create_Vertex): Reimplemented.
4653 (Declaration_Placement_Vertex): New routine.
4654 * bindo-builders.ads (Build_Library_Graph): Update the parameter
4655 profile and comment on usage.
4656 * bindo-diagnostics.adb: Almost a new unit.
4657 * bindo-diagnostics.ads: Add a use clause for
4658 Bindo.Graphs.Invocation_Graphs. Remove package
4660 (Diagnose_Circularities): New routine.
4661 * bindo-elaborators.adb: Remove the with and use clauses for
4662 Binderr and GNAT.Sets. Remove the use clause for
4663 Bindo.Diagnostics.Cycle_Diagnostics. Remove membership set VS.
4664 Update the parameter profiles of most routines to use better
4665 parameter names. Update the implementation of most routine to
4666 use the new parameter names. (Elaborate_Units_Common): Update
4667 the parameter profile. Pass an infication to the library graph
4668 builder whether the dynamic model is in effect.
4669 (Elaborate_Units_Dynamic, Elaborate_Units_Static): Use
4670 Diagnose_Circularities to provide diagnostics.
4671 (Update_Successor): Use routine In_Same_Component to determine
4672 whether the predecessor and successor reside in different
4674 * bindo-graphs.adb: Add with and use clauses for Butil, Debug,
4675 Output, and Bindo.Writers. Remove with and use clauses for
4676 GNAT.Lists. Update the parameter profiles of most routines to
4677 use better parameter names. Update the implementation of most
4678 routine to use the new parameter names. Remove various
4679 redundant assertions. Remove doubly linked list EL. Add new
4680 type Precedence_Kind.
4681 (Add_Cycle): New routine.
4682 (Add_Vertex): Update the parameter profile. Update the creation
4683 of vertex attributes.
4684 (Add_Vertex_And_Complement, Body_Vertex, Column,
4685 Complementary_Vertex, Copy_Cycle_Path, Cycle_Kind_Of): New
4687 (Destroy_Invocation_Graph_Edge, Destroy_Library_Graph_Cycle,
4688 Destroy_Library_Graph_Edge, Extra, File_Name,
4689 Find_All_Cycles_Through_Vertex, Find_All_Cycles_With_Edge,
4690 Find_Cycles, Find_First_Lower_Precedence_Cycle,
4691 Get_LGC_Attributes, Has_Next, Hash_Library_Graph_Cycle,
4692 Hash_Library_Graph_Cycle_Attributes, Highest_Precedence_Cycle,
4693 Highest_Precedence_Edge, In_Same_Component, Insert_And_Sort,
4694 Invocation_Edge_Count, Invocation_Graph_Encoding,
4695 Is_Cycle_Initiating_Edge, Is_Cyclic_Edge,
4696 Is_Cyclic_Elaborate_All_Edge, Is_Cyclic_Elaborate_Body_Edge,
4697 Is_Cyclic_Elaborate_Edge, Is_Cyclic_Forced_Edge,
4698 Is_Cyclic_Invocation_Edge, Is_Cyclic_With_Edge,
4699 Is_Dynamically_Elaborated, Is_Elaborate_All_Edge,
4700 Is_Elaborate_Body_Edge, Is_Elaborate_Edge: New routines.
4701 (Is_Existing_Predecessor_Successor_Relation): Removed.
4702 (Is_Forced_Edge, Is_Invocation_Edge, Is_Recorded_Cycle,
4703 Is_Recorded_Edge, Is_With_Edge, Iterate_Edges_Of_Cycle, Kind,
4704 Length): New routine.
4705 (Lib_Vertex): Removed.
4706 (Line, Links_Vertices_In_Same_Component,
4707 Maximum_Invocation_Edge_Count, Next, Normalize_And_Add_Cycle,
4708 Normalize_Cycle_Path, Number_Of_Cycles, Path, Precedence,
4709 Remove_Vertex_And_Complement, Sequence_Next_Cycle): New routines.
4710 (Sequence_Next_IGE_Id): Renamed to Sequence_Next_Edge.
4711 (Sequence_Next_IGV_Id): Renamed to Sequence_Next_Vertex.
4712 (Sequence_Next_LGE_Id): Renamed to Sequence_Next_Edge.
4713 (Sequence_Next_LGV_Id): Renamed to Sequence_Next_Vertex.
4714 (Set_Is_Existing_Predecessor_Successor_Relation): Removed.
4715 (Set_Is_Recorded_Cycle, Set_Is_Recorded_Edge,
4716 Set_LGC_Attributes, Spec_Vertex, Trace_Cycle, Trace_Edge,
4717 Trace_Eol, Trace_Vertex): New routines.
4718 * bindo-graphs.ads: Add with and use clauses for Types and
4719 GNAT.Lists. Update the parameter profiles of most routines to
4720 use better parameter names. Update the implementation of most
4721 routine to use the new parameter names. Add the new
4722 instantiated data structures IGE_Lists, IGV_Sets, LGC_Lists,
4723 LGE_Lists, LGE_Sets, LGV_Sets, and RC_Sets. Add new type
4724 Library_Graph_Cycle_Id along with an empty and initial value.
4725 Remove component Lib_Vertex and add new components Body_Vertex
4726 and Spec_Vertex to type Invocation_Graph_Vertex_Attributes. Add
4727 new type Library_Graph_Cycle_Kind. Add new iterators
4728 All_Cycle_Iterator and Edges_Of_Cycle_Iterator. Add new type
4729 Library_Graph_Cycle_Attributes. Add new components
4730 Cycle_Attributes, Cycles, and Dynamically_Elaborated to type
4731 Library_Graph_Attributes.
4732 (Body_Vertex, Column, Destroy_Invocation_Graph_Edge,
4733 Destroy_Library_Graph_Cycle_Attributes,
4734 Destroy_Library_Graph_Edge, Extra, File_Name, Find_Cycles,
4735 Has_Elaborate_All_Cycle, Has_Next, Hash_Library_Graph_Cycle,
4736 Hash_Library_Graph_Cycle_Attributes, Highest_Precedence_Cycle,
4737 In_Same_Component, Invocation_Edge_Count,
4738 Invocation_Graph_Encoding, Is_Dynamically_Elaborated,
4739 Is_Elaborate_All_Edge, Is_Elaborate_Body_Edge,
4740 Is_Elaborate_Edge, Is_Forced_Edge, Is_Invocation_Edge,
4741 Is_With_Edge, Iterate_All_Cycles, Iterate_Edges_Of_Cycle, Kind):
4743 (Length, Lib_Vertex, (Line, Next, Number_Of_Cycles, Present,
4744 Same_Library_Graph_Cycle_Attributes, Spec_Vertex): New routines.
4745 * bindo-units.adb (File_Name, Invocation_Graph_Encoding): New
4747 * bindo-units.ads: Add new instantiated data structure
4749 (File_Name, Invocation_Graph_Encoding): New routine.
4750 * bindo-validators.adb: Remove with and use clauses for GNAT and
4751 GNAT.Sets. Remove membership set US. Update the parameter
4752 profiles of most routines to use better parameter names. Update
4753 the implementation of most routine to use the new parameter
4755 (Validate_Cycle, Validate_Cycle_Path, Validate_Cycles,
4756 Validate_Invocation_Graph_Vertex): Remove the validation of
4757 component Lib_Vertex. Add the validation of components
4758 Body_Vertex and Spec_Vertex.
4759 (Write_Error): New routine.
4760 * bindo-validators.ads (Validate_Cycles): New routine.
4761 * bindo-writers.adb: Update the parameter profiles of most
4762 routines to use better parameter names. Update the
4763 implementation of most routine to use the new parameter names.
4764 (Write_Cycle, Write_Cyclic_Edge, Write_Cycles): New routines.
4765 (Write_Invocation_Graph_Vertex): Remove the output of component
4766 Lib_Vertex. Add the output of components Body_Vertex and
4768 * bindo-writers.ads (Write_Cycles): New routine.
4769 * debug.adb: Use binder switches -d_C and -d_P, add
4770 documentation on their usage.
4771 * gnatbind.adb: Remove with and use clauses for Binde. Delegate
4772 the choice of elaboration mechanism to Bindo.
4773 * lib-writ.adb (Column, Extra, Invoker, Kind, Line, Locations,
4774 Name, Placement, Scope, Signature, Target): Removed.
4775 (Write_Invocation_Graph): Moved at the top level.
4776 (Write_Invocation_Graph_Attributes): New routine.
4777 (Write_Invocation_Relation, Write_Invocation_Signature): Moved
4779 * lib-writ.ads: Add a documentation section on invocation graph
4781 * sem_elab.adb (Body_Placement_Of): New routine.
4782 (Declare_Invocation_Construct): Update the call to
4783 Add_Invocation_Construct.
4784 (Declaration_Placement_Of_Node): New routine.
4785 (Get_Invocation_Attributes): Correct the retrieval of the
4786 enclosing subprogram where the postcondition procedure lives.
4787 (Placement_Of, Placement_Of_Node): Removed.
4788 (Record_Invocation_Graph): Record the encoding format used.
4789 (Record_Invocation_Graph_Encoding): New routine.
4790 (Record_Invocation_Relation): Update the call to
4791 Add_Invocation_Relation.
4792 (Spec_Placement_Of): Removed.
4793 * libgnat/g-lists.ads, libgnat/g-lists.adb (Equal): New routine.
4795 2019-07-05 Ed Schonberg <schonberg@adacore.com>
4797 * checks.adb (Apply_Predicate_Check): Except within the
4798 subprogram body that defines the formal, do not apply predicate
4799 check on a formal IN parameter: such a check is redundant and
4800 its expansion can lead to out-of-scope references when it is
4801 originates in a function call in a precondition,
4803 2019-07-05 Yannick Moy <moy@adacore.com>
4805 * sem_res.adb (Resolve_Call): Cannot inline in quantified
4807 * sem_util.adb, sem_util.ads (In_Quantified_Expression): New
4810 2019-07-05 Bob Duff <duff@adacore.com>
4812 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
4814 * gnat_rm.texi: Regenerate.
4816 2019-07-05 Bob Duff <duff@adacore.com>
4818 * exp_attr.adb (Input): Take the No_Stream_Optimizations
4819 restriction into account.
4821 2019-07-05 Claire Dross <dross@adacore.com>
4823 * libgnat/a-cofove.ads, libgnat/a-cofove.adb: Definite formal
4824 vectors are now always bounded so that they do not need to be
4827 2019-07-05 Dmitriy Anisimkov <anisimko@adacore.com>
4829 * libgnat/g-traceb.ads, libgnat/g-traceb.adb (Call_Chain): New
4832 2019-07-04 James Clarke <jrtc27@debian.org>
4834 * libgnarl/s-osinte__kfreebsd-gnu.ads (clockid_t): Make type
4836 (CLOCK_REALTIME): Make value public.
4838 2019-07-04 Javier Miranda <miranda@adacore.com>
4840 * exp_tss.adb (Init_Proc): Adding missing support for access to
4841 subprograms and access to protected subprograms of non-default
4844 2019-07-04 Eric Botcazou <ebotcazou@adacore.com>
4846 * gnat1drv.adb (Adjust_Global_Switches): Use proper interface to
4847 set the validity settings in CodePeer mode.
4848 * par-load.adb (Load): Remove all code dealing with validity
4850 * validsw.ads (Validity_Check_Copies): Alphabetize.
4851 * validsw.adb (Reset_Validity_Check_Options): Set all options to
4853 (Save_Validity_Check_Options): Save all options.
4855 2019-07-04 Hristian Kirtchev <kirtchev@adacore.com>
4857 * exp_ch3.adb, exp_ch4.adb, exp_ch4.ads, exp_ch5.adb,
4858 exp_ch7.adb, exp_ch9.adb, exp_ch11.adb, exp_unst.adb,
4859 rtsfind.ads, sem_attr.adb, sem_ch10.adb, sem_ch12.adb,
4860 sem_ch13.adb, sem_dim.adb, sem_disp.adb, xref_lib.adb: Minor
4863 2019-07-04 Joffrey Huguet <huguet@adacore.com>
4865 * libgnarl/a-taside.ads: Add assertion policy to ignore
4867 (Abort_Task, Is_Terminated, Is_Callable): Add preconditions.
4869 2019-07-04 Eric Botcazou <ebotcazou@adacore.com>
4871 * doc/gnat_rm/implementation_defined_pragmas.rst: Fix
4872 capitalization and parenthesis glitches.
4873 * gnat_rm.texi: Regenerate.
4875 2019-07-04 Ed Schonberg <schonberg@adacore.com>
4877 * sem_ch10.adb (Remove_Context_Clauses): Handle properly the
4878 removal of a limited_with_clause which appears in the library
4879 unit oF the main unit, when some other unit in the context has a
4880 regular with_clause on the same unit, to prevent spurious
4881 visibility errors in the subsequent analysis of pending instance
4884 2019-07-04 Hristian Kirtchev <kirtchev@adacore.com>
4886 * sem_elab.adb: Add new type Elaboration_Phase_Status along with
4887 a global to keep track of the elaboration phase status.
4888 Initialize all internal data structures to Nil for services
4889 Elaborated_Units, Internal_Representation, and Scenario_Storage.
4890 (Build_Call_Marker): Do not create a call marker when the
4891 elaboration phase is not active.
4892 (Build_Variable_Reference_Marker): Do not create a call marker
4893 when the elaboration phase is not active.
4894 (Check_Elaboration_Scenarios): Destroy all internal structures
4895 when the elaboration phase does not have to run. Do not execute
4896 when the elaboration phase is not active.
4897 (Elaboration_Phase_Active): New routine.
4898 (Finalize_All_Data_Structures): New routine.
4899 (Initialize): Initialize all internal data structures and signal
4900 that the elaboration phase has started.
4901 (Initialize_All_Data_Structures): New routine.
4902 (Initialize_Elaborated_Units): Initialize all internal data
4904 (Initialize_Internal_Representation): Initialize all internal
4906 (Initialize_Scenario_Storage): Initialize all internal data
4908 (Kill_Elaboration_Scenario): Do not execute when the elaboration
4909 phase is not active.
4910 (Set_Elaboration_Phase): New routine.
4911 (Update_Elaboration_Scenario): Do not execute when the
4912 elaboration phase is not active.
4914 2019-07-04 Gary Dismukes <dismukes@adacore.com>
4916 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The special
4917 treatment of calling Mask_Unfrozen_Types must also be done in
4918 the case of an Ignored_Ghost_Entity, because Expander_Active is
4921 2019-07-04 Yannick Moy <moy@adacore.com>
4923 * sem_prag.adb (Check_Library_Level_Entity): Update for new rule
4926 2019-07-04 Justin Squirek <squirek@adacore.com>
4928 * sem_disp.adb (Check_Controlling_Formals): Obtain the full view
4929 before type comparison.
4931 2019-07-04 Ed Schonberg <schonberg@adacore.com>
4933 * exp_ch4.ads, exp_ch4.adb (Build_Eq_Call): New visible
4934 subprogram, extracted from Expand_Composite_Equality, to handle
4935 properly the composition of equality for variant record types.
4936 * exp_ch3.adb (MAke_Eq_If): Use Build_Eq_Call for each
4937 component, to handle properly the case of a component with a
4938 user-defined equality. Revert to predefined equality if the
4939 user-defined operation is abstract, to maintain compatibility
4940 with older versions,
4942 2019-07-04 Justin Squirek <squirek@adacore.com>
4944 * exp_ch3.adb (Build_Initialization_Call): Fixup
4945 *_skip_null_excluding_check argument to handle new default.
4946 (Init_Formals): Make *_skip_null_excluding_check formal default
4948 * exp_ch4.adb (Expand_N_Allocator): Add comment to note heavy
4951 2019-07-04 Bob Duff <duff@adacore.com>
4953 * sem_ch3.adb (Access_Definition): Do not create a master unless
4954 Tasking_Allowed. Otherwise, this fails on restricted runtimes.
4956 2019-07-04 Hristian Kirtchev <kirtchev@adacore.com>
4958 * sem_util.adb (Propagate_DIC_Attributes): Do not propagate the
4959 Default_Initial_Condition attributes to an incomplete type.
4961 2019-07-04 Ed Schonberg <schonberg@adacore.com>
4963 * sem_attr.adb (Check_Array_Type): An array type attribute such
4964 as 'First can be applied to an unconstrained array tyope when
4965 the attribute reference appears within an aspect specification
4966 and the prefix is a current instance, given that the prefix of
4967 the attribute will become a formal of the subprogram that
4968 implements the aspect (typically a predicate check).
4970 2019-07-04 Piotr Trojanek <trojanek@adacore.com>
4972 * sem_util.adb (Yields_Synchronized_Object): Fix typos in
4975 2019-07-04 Yannick Moy <moy@adacore.com>
4977 * sem_util.adb (Yields_Synchronized_Object): Adapt to new SPARK
4980 2019-07-04 Yannick Moy <moy@adacore.com>
4982 * sem_spark.adb (Check_Statement): Only check permission of
4983 object in extended return when it is of a deep type.
4985 2019-07-04 Justin Squirek <squirek@adacore.com>
4987 * sem_ch12.adb (Perform_Appropriate_Analysis): Added for
4988 selecting which type of analysis based on wheither the
4989 instantiation is a generic at the library-level. In which case
4990 expansion during analysis.
4991 (Preanalyze_Actuals): Modify calls to Analyze to use the new
4994 2019-07-04 Ed Schonberg <schonberg@adacore.com>
4996 * exp_unst.adb: Handle conditional expressions.
4998 2019-07-04 Yannick Moy <moy@adacore.com>
5000 * sem_spark.adb (Check_Package_Spec, Check_Package_Body): Only
5001 analyze parts of the code marked in SPARK.
5003 2019-07-04 Hristian Kirtchev <kirtchev@adacore.com>
5005 * erroutc.adb, exp_aggr.adb, inline.adb, opt.adb, sem_ch3.adb:
5008 2019-07-04 Yannick Moy <moy@adacore.com>
5010 * sem_spark.adb (Explanation, Get_Expl): New functions to get
5011 the explanation for a permission mismatch.
5012 (Perm_Error, Perm_Mismatch, Perm_Error_Loop_Exit): Take
5013 explanation into account for issuing a more precise error
5015 (Set_Perm_Prefixes, Set_Perm_Extensions,
5016 Set_Perm_Extensions_Move): Pass suitable argument for the
5019 2019-07-04 Arnaud Charlet <charlet@adacore.com>
5021 * exp_aggr.adb (In_Place_Assign_OK): Moved to top level and add
5022 support for record aggregates.
5023 (Component_Check): Use Is_CCG_Supported_Aggregate instead of a
5024 similar local predicate.
5025 (Convert_To_Assignments): Take advantage of In_Place_Assign_OK
5026 predicate when possible.
5027 (Is_CCG_Supported_Aggregate): Return False for records with
5028 representation clauses and fix the logic for dealing with nested
5031 2019-07-04 Piotr Trojanek <trojanek@adacore.com>
5033 * opt.adb (Set_Config_Switches): Keep assertions policy as
5034 enabled when analysing internal units in GNATprove mode.
5036 2019-07-04 Arnaud Charlet <charlet@adacore.com>
5038 * exp_ch4.adb (Expand_Short_Circuit_Operator): Strip
5039 N_Variable_Reference_Marker when checking for the presence of
5042 2019-07-04 Arnaud Charlet <charlet@adacore.com>
5044 * exp_aggr.adb (Check_Component): Take into account type
5047 2019-07-04 Dmitriy Anisimkov <anisimko@adacore.com>
5049 * doc/gnat_ugn/platform_specific_information.rst: Document
5050 Windows socket timeout particularity.
5051 * gnat_ugn.texi: Regenerate.
5052 * gsocket.h: Include versionhelpers.h.
5053 * socket.c (__gnat_minus_500ms): New function.
5054 * libgnat/g-sothco.ads (Minus_500ms_Windows_Timeout): New
5056 * libgnat/g-socket.adb (Set_Socket_Option): Refactor to remove
5057 500ms from the requested timeout only on old Windows version.
5059 2019-07-04 Thomas Quinot <quinot@adacore.com>
5061 * get_scos.adb: Remove bogus, dead code.
5063 2019-07-04 Ed Schonberg <schonberg@adacore.com>
5065 * sem_dim.adb (Analyze_Dimension_Array_Aggregate): If the
5066 component is an entity name, its dimensions are those of its
5069 2019-07-03 Bob Duff <duff@adacore.com>
5071 * doc/gnat_ugn/gnat_utility_programs.rst: Document new flags in
5074 2019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
5076 * binde.adb: Remove with clause for System.OS_Lib.
5077 (Force_Elab_Order): Refactor the majority of the code in Butil.
5078 Use the new forced units iterator to obtain unit names.
5079 * bindo-builders.adb: Add with and use clauses for Binderr,
5080 Butil, Opt, Output, Types, GNAT, and GNAT.Dynamic_HTables. Add
5081 a hash table which maps units to line number in the forced
5082 elaboration order file.
5083 (Add_Unit): New routine.
5084 (Build_Library_Graph): Create forced edges between pairs of
5085 units listed in the forced elaboration order file.
5086 (Create_Forced_Edge, Create_Forced_Edges, Destroy_Line_Number,
5087 Duplicate_Unit_Error, Hash_Unit, Internal_Unit_Info,
5088 Is_Duplicate_Unit, Missing_Unit_Info): New routines.
5089 * bindo-graphs.adb (Is_Internal_Unit, Is_Predefined_Unit):
5090 Refactor some of the behavior to Bindo-Units.
5091 * bindo-graphs.ads: Enable the enumeration literal for forced
5093 * bindo-units.adb, bindo-units.ads (Is_Internal_Unit,
5094 Is_Predefined_Unit): New routines.
5095 * butil.adb: Add with and use clauses for Opt, GNAT, and
5096 System.OS_Lib. Add with clause for Unchecked_Deallocation.
5097 (Has_Next, Iterate_Forced_Units, Next, Parse_Next_Unit_Name,
5098 Read_Forced_Elab_Order_File): New routines.
5099 * butil.ads: Add with and use clauses for Types. Add new
5100 iterator over the units listed in the forced elaboration order
5102 (Has_Next, Iterate_Forced_Units, Next): New routine.
5103 * namet.adb, namet.ads (Present): New routine.
5105 2019-07-03 Bob Duff <duff@adacore.com>
5107 * sem_ch3.adb (Access_Definition): The code was creating a
5108 master in the case where the designated type is a class-wide
5109 interface type. Create a master in the noninterface case as
5110 well. That is, create a master for all limited class-wide types.
5112 2019-07-03 Yannick Moy <moy@adacore.com>
5114 * erroutc.adb (Sloc_In_Range): New function to determine whether
5115 the range of a pragma Warnings covers a location, taking
5116 instantiations into account.
5118 2019-07-03 Johannes Kanig <kanig@adacore.com>
5120 * osint.ads, osint.adb (Get_First_Main_File_Name): New routine
5121 to access the first file provided on the command line.
5123 2019-07-03 Ed Schonberg <schonberg@adacore.com>
5125 * inline.adb (Process_Formals_In_Aspects): New procedure within
5126 Expand_Inlined_Call, to perform a replacement of references to
5127 formals that appear in aspect specifications within the body
5130 2019-07-03 Justin Squirek <squirek@adacore.com>
5132 * sem_ch8.adb (Analyze_Object_Renaming): Add call to search for
5133 the appropriate actual subtype of the object renaming being
5135 (Check_Constrained_Object): Minor cleanup.
5137 2019-07-03 Yannick Moy <moy@adacore.com>
5139 * sem_spark.adb (Get_Observed_Or_Borrowed_Expr): New function to
5140 return go through traversal function call.
5141 (Check_Type): Consistently use underlying type.
5142 (Get_Perm): Adapt for case of elaboration code where variables
5143 are not declared in the environment. Remove incorrect handling
5144 of borrow and observe.
5146 2019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
5148 * inline.adb (Build_Return_Object_Formal): New routine.
5149 (Can_Split_Unconstrained_Function): Code clean up.
5150 (Copy_Formals,Copy_Return_Object): New routines.
5151 (Split_Unconstrained_Function): Code clean up and refactoring.
5153 2019-07-03 Gary Dismukes <dismukes@adacore.com>
5155 * bindo-augmentors.adb, bindo-augmentors.ads,
5156 bindo-builders.ads, bindo-elaborators.adb, sem_ch12.adb,
5157 sem_ch13.adb, sem_spark.adb, sinfo.ads: Minor editorial
5158 corrections and reformatting.
5160 2019-07-03 Bob Duff <duff@adacore.com>
5162 * sem_warn.adb (Check_Infinite_Loop_Warning): Avoid the warning
5163 if an Iterator_Specification is present.
5165 2019-07-03 Bob Duff <duff@adacore.com>
5167 * doc/gnat_ugn/gnat_utility_programs.rst: Document default
5170 2019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
5172 * ali.adb: Add with and use clauses for GNAT,
5173 GNAT.Dynamic_HTables, and Snames. Add a map from invocation
5174 signature records to invocation signature ids. Add various
5175 encodings of invocation-related attributes. Sort and update
5176 table Known_ALI_Lines.
5177 (Add_Invocation_Construct, Add_Invocation_Relation,
5178 Body_Placement_Kind_To_Code, Code_To_Body_Placement_Kind,
5179 Code_To_Invocation_Construct_Kind, Code_To_Invocation_Kind,
5180 Code_To_Invocation_Graph_Line_Kind, Destroy, Hash): New
5182 (Initialize_ALI): Sort the initialization sequence. Add
5183 initialization for all invocation-related tables.
5184 (Invocation_Construct_Kind_To_Code,
5185 Invocation_Graph_Line_Kind_To_Code, Invocation_Kind_To_Code,
5186 Invocation_Signature_Of, Present): New routines.
5187 (Scan_ALI): Add the default values for invocation-related ids.
5188 Scan invocation graph lines.
5189 (Scan_Invocation_Graph_Line): New routine.
5190 * ali.ads: Add with clause for GNAT.Dynamic_Tables. Add types
5191 for invocation constructs, relations, and signatures. Add
5192 tables for invocation constructs, relations, and signatures.
5193 Update Unit_Record to capture invocation-related ids. Relocate
5194 table Unit_Id_Tables and subtypes Unit_Id_Table, Unit_Id_Array
5196 (Add_Invocation_Construct, Add_Invocation_Relation,
5197 Body_Placement_Kind_To_Code, Code_To_Body_Placement_Kind,
5198 Code_To_Invocation_Construct_Kind, Code_To_Invocation_Kind,
5199 Code_To_Invocation_Graph_Line_Kind,
5200 Invocation_Construct_Kind_To_Code,
5201 Invocation_Graph_Line_Kind_To_Code, Invocation_Kind_To_Code,
5202 Invocation_Signature_Of, Present): New routines.
5203 * binde.adb: Add with and use clause for Types. Add use clause
5204 for ALI.Unit_Id_Tables;
5205 * binde.ads: Relocate table Unit_Id_Tables and subtypes
5206 Unit_Id_Table, Unit_Id_Array to ALI.
5207 * bindgen.adb: Remove with and use clause for ALI.
5208 * bindgen.ads: Remove with and use clause for Binde. Add with
5209 and use clause for ALI.
5210 * bindo.adb, bindo.ads, bindo-augmentors.adb,
5211 bindo-augmentors.ads, bindo-builders.adb, bindo-builders.ads,
5212 bindo-diagnostics.adb, bindo-diagnostics.ads,
5213 bindo-elaborators.adb, bindo-elaborators.ads, bindo-graphs.adb,
5214 bindo-graphs.ads, bindo-units.adb, bindo-units.ads,
5215 bindo-validators.adb, bindo-validators.ads, bindo-writers.adb,
5216 bindo-writers.ads: New units.
5217 * debug.adb: Use and describe GNAT debug switches -gnatd_F and
5218 -gnatd_G. Add GNATbind debug switches in the ranges dA .. dZ,
5219 d.a .. d.z, d.A .. d.Z, d.1 .. d.9, d_a .. d_z, d_A .. d_Z, and
5220 d_1 .. d_9. Use and describe GNATbind debug switches -d_A,
5221 -d_I, -d_L, -d_N, -d_O, -d_T, and -d_V.
5222 * exp_util.adb, exp_util.ads (Exceptions_OK): Relocate to
5224 * gnatbind.adb: Add with and use clause for Bindo. Use the new
5225 Bindo elaboration order only when -d_N is in effect.
5227 (Column, Extra, Invoker, Kind, Line, Locations, Name, Placement,
5228 Scope, Signature, Target): New routines.
5229 (Write_ALI): Output all invocation-related data.
5230 (Write_Invocation_Graph): New routine.
5231 * lib-writ.ads: Document the invocation graph ALI line.
5232 * namet.adb, namet.ads (Present): New routines.
5233 * sem_ch8.adb (Find_Direct_Name): Capture the status of
5234 elaboration checks and warnings of an identifier.
5235 (Find_Expanded_Name): Capture the status of elaboration checks
5236 and warnings of an expanded name.
5237 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Ensure
5238 that invocation graph-related data within the body of the main
5239 unit is encoded in the ALI file.
5240 (Analyze_Generic_Subprogram_Declaration): Ensure that invocation
5241 graph-related data within the body of the main unit is encoded
5243 (Analyze_Package_Instantiation): Perform minimal decoration of
5244 the instance entity.
5245 (Analyze_Subprogram_Instantiation): Perform minimal decoration
5246 of the instance entity.
5247 * sem_elab.adb: Perform heavy refactoring of all code. The unit
5248 is now split into "services" which specialize in one area of ABE
5249 checks. Add processing in order to capture invocation-graph
5250 related attributes of the main unit, and encode them in the ALI
5251 file. The Processing phase can now operate in multiple modes,
5252 all described by type Processing_Kind. Scenarios and targets
5253 are now distinct at the higher level, and carry their own
5254 representations. This eliminates the need to constantly
5255 recompute their attributes, and offers the various processors a
5256 uniform interface. The various initial states of the Processing
5257 phase are now encoded using type Processing_In_State, and
5258 xxx_State constants.
5259 * sem_elab.ads: Update the literals of type
5260 Enclosing_Level_Kind. Add Inline pragmas on several routines.
5261 * sem_prag.adb (Process_Inline): Ensure that invocation
5262 graph-related data within the body of the main unit is encoded
5264 * sem_util.adb (Enclosing_Generic_Body, Enclosing_Generic_Unit):
5266 (Exceptions_OK): Relocated from Sem_Util.
5267 (Mark_Save_Invocation_Graph_Of_Body): New routine.
5268 * sem_util.ads (Exceptions_OK): Relocated from Sem_Util.
5269 (Mark_Save_Invocation_Graph_Of_Body): New routine.
5270 * sinfo.adb (Is_Elaboration_Checks_OK_Node): Now applicable to
5271 N_Variable_Reference_Marker.
5272 (Is_Elaboration_Warnings_OK_Node): Now applicable to
5273 N_Expanded_Name, N_Identifier, N_Variable_Reference_Marker.
5274 (Is_Read): Use Flag4.
5275 (Is_SPARK_Mode_On_Node): New applicable to
5276 N_Variable_Reference_Marker.
5277 (Is_Write): Use Flag5.
5278 (Save_Invocation_Graph_Of_Body): New routine.
5279 (Set_Is_Elaboration_Checks_OK_Node): Now applicable to
5280 N_Variable_Reference_Marker.
5281 (Set_Is_Elaboration_Warnings_OK_Node): Now applicable to
5282 N_Expanded_Name, N_Identifier, N_Variable_Reference_Marker.
5283 (Set_Is_SPARK_Mode_On_Node): New applicable to
5284 N_Variable_Reference_Marker.
5285 (Set_Save_Invocation_Graph_Of_Body): New routine.
5286 * sinfo.ads: Update the documentation of attributes
5287 Is_Elaboration_Checks_OK_Node, Is_Elaboration_Warnings_OK_Node,
5288 Is_SPARK_Mode_On_Node. Update the flag usage of attributes
5289 Is_Read, Is_Write. Add attribute Save_Invocation_Graph_Of_Body
5290 and update its occurrence in nodes.
5291 (Save_Invocation_Graph_Of_Body): New routine along with pragma
5293 (Set_Save_Invocation_Graph_Of_Body): New routine along with
5295 * switch-b.adb (Scan_Binder_Switches): Refactor the scanning of
5297 (Scan_Debug_Switches): New routine.
5298 * libgnat/g-dynhta.adb, libgnat/g-dynhta.ads (Contains): New routine.
5299 * libgnat/g-graphs.adb (Associate_Vertices): Update the use of
5300 Component_Vertex_Iterator.
5301 (Contains_Component, Contains_Edge, Contains_Vertex, Has_Next):
5303 (Iterate_Component_Vertices): New routine.
5304 (Iterate_Vertices): Removed.
5305 (Next): Update the parameter profile.
5306 (Number_Of_Component_Vertices, Number_Of_Outgoing_Edges): New
5308 * libgnat/g-graphs.ads: Update the initialization of
5309 No_Component. Add type Component_Vertex_Iterator. Remove type
5311 (Has_Next): Add new versions and remove old ones.
5312 (Iterate_Component_Vertices): New routine.
5313 (Iterate_Vertices): Removed.
5314 (Next): Add new versions and remove old ones.
5315 (Number_Of_Component_Vertices, Number_Of_Outgoing_Edges): New
5317 * libgnat/g-sets.adb (Contains): Reimplemented.
5318 * gcc-interface/Make-lang.in (GNATBIND_OBJS): Add
5319 GNAT.Dynamic_HTables, GNAT.Graphs and Bindo units.
5320 * rtsfind.ads: Remove extra space.
5322 2019-07-03 Yannick Moy <moy@adacore.com>
5324 * sem_spark.adb: Add support for locally borrowing and observing
5326 (Get_Root_Object): Add parameter Through_Traversal to denote
5327 when we are interesting in getting to the traversed parameter.
5328 (Is_Prefix_Or_Almost): New function to support detection of
5329 illegal access to borrowed or observed paths.
5330 (Check_Pragma): Add analysis of assertion pragmas.
5332 2019-07-03 Ed Schonberg <schonberg@adacore.com>
5334 * sem_ch13.adb (Build_Predicate_Functions): In a generic context
5335 we do not build the bodies of predicate fuctions, but the
5336 expression in a static predicate must be elaborated to allow
5337 case coverage checking within the generic unit.
5338 (Build_Discrete_Static_Predicate): In a generic context, return
5339 without building function body once the
5340 Static_Discrete_Predicate expression for the type has been
5343 2019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
5345 * bindgen.adb, inline.adb, layout.adb, sem_ch12.adb,
5346 sem_ch13.adb, sem_ch7.adb, styleg.adb: Minor reformatting.
5348 2019-07-03 Bob Duff <duff@adacore.com>
5350 * par-ch3.adb (P_Defining_Identifier): Call
5351 Check_Defining_Identifier_Casing.
5352 * style.ads, styleg.ads, styleg.adb
5353 (Check_Defining_Identifier_Casing): New procedure to check for
5354 mixed-case defining identifiers.
5355 * stylesw.ads, stylesw.adb (Style_Check_Mixed_Case_Decls): New
5356 flag for checking for mixed-case defining identifiers.
5357 * doc/gnat_ugn/building_executable_programs_with_gnat.rst:
5358 Document new feature.
5359 * gnat_ugn.texi: Regenerate.
5361 2019-07-03 Eric Botcazou <ebotcazou@adacore.com>
5363 * doc/gnat_ugn/building_executable_programs_with_gnat.rst
5364 (Warning message control): Document that -gnatw.z/Z apply to
5366 * freeze.adb (Freeze_Entity): Give -gnatw.z warning for array
5367 types as well, but not if the specified alignment is the minimum
5369 * gnat_ugn.texi: Regenerate.
5371 2019-07-03 Bob Duff <duff@adacore.com>
5373 * einfo.ads, exp_util.adb, layout.ads, sinfo.ads: Spell "laid"
5376 2019-07-03 Ed Schonberg <schonberg@adacore.com>
5378 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): No error
5379 message on attribute applied to a renaming when the renamed
5380 object is an aggregate (from code reading).
5381 (Check_Aspect_At_End_Of_Declarations): In a generic context
5382 where freeze nodes are not generated, the original expression
5383 for an aspect may need to be analyzed to precent spurious
5384 conformance errors when compared with the expression that is
5385 anakyzed at the end of the current declarative list.
5387 2019-07-03 Eric Botcazou <ebotcazou@adacore.com>
5389 * layout.adb (Layout_Type): Do not set the component size of an
5390 array with a scalar component if the component type is
5393 2019-07-03 Ed Schonberg <schonberg@adacore.com>
5395 * inline.adb (Make_Loop_Labels_Unique): New procedure to modify
5396 the source code of subprograms that are inlined by the
5397 front-end, to prevent accidental duplication between loop labels
5398 in the inlined code and the code surrounding the inlined call.
5400 2019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
5402 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update
5403 the section on resolving elaboration circularities to eliminate
5404 certain combinations of switches which together do not produce
5405 the desired effect and confuse users.
5406 * gnat_ugn.texi: Regenerate.
5408 2019-07-03 Arnaud Charlet <charlet@adacore.com>
5410 * bindgen.adb (Gen_Main): Disable generation of reference to
5411 Ada_Main_Program_Name for CCG.
5412 * bindusg.adb (Display): Add -G to the command-line usage for
5414 * opt.ads (Generate_C_Code): Update comment.
5415 * switch-b.adb (Scan_Binder_Switches): Add handling for -G.
5417 2019-07-03 Arnaud Charlet <charlet@adacore.com>
5419 * sem_ch7.adb (Has_Referencer): Do not consider inlined
5420 subprograms when generating C code, which allows us to generate
5421 static inline subprograms.
5423 2019-07-03 Justin Squirek <squirek@adacore.com>
5425 * sem_ch6.adb (Check_Conformance): Add expression checking for
5426 constant modifiers in anonymous access types (in addition to
5427 "non-null" types) so that they are considered "matching" for
5428 subsequent conformance tests.
5430 2019-07-03 Arnaud Charlet <charlet@adacore.com>
5432 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
5433 Clarify wording on No_Multiple_Elaboration.
5434 * gnat_rm.texi: Regenerate.
5436 2019-07-03 Ed Schonberg <schonberg@adacore.com>
5438 * sem_ch8.adb (Find_Selected_Component): If the prefix is the
5439 current instance of a type or subtype, complete the resolution
5440 of the name by finding the component of the type denoted by the
5443 2019-07-03 Eric Botcazou <ebotcazou@adacore.com>
5445 * doc/gnat_rm/interfacing_to_other_languages.rst (Interfacing to C):
5446 Document that boolean types with convention C now map to C99 bool.
5447 * gnat_rm.texi: Regenerate.
5449 2019-07-03 Javier Miranda <miranda@adacore.com>
5451 * exp_attr.adb (Expand_Min_Max_Attribute): Code cleanup:
5452 removing code that it is now never executed in the CCG compiler
5455 2019-07-02 Iain Sandoe <iain@sandoe.co.uk>
5457 * libgnat/system-darwin-ppc.ads: Set Stack_Check_Probes True for
5460 2019-07-01 Ed Schonberg <schonberg@adacore.com>
5462 * sem_ch12.adb (Is_Defaulted): New predicate in
5463 Check_Formal_Package_Intance, to skip the conformance of checks
5464 on parameters of a formal package that are defaulted,
5466 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
5468 * checks.adb, exp_ch9.adb, exp_unst.adb, sem_ch4.adb,
5469 sem_prag.adb, sem_spark.adb: Minor reformatting.
5471 2019-07-01 Ed Schonberg <schonberg@adacore.com>
5473 * sem_attr.adb (Analyze_Attribute, case Enum_Rep): Allow prefix
5474 of attribute to be an attribute reference of a discrete type.
5476 2019-07-01 Eric Botcazou <ebotcazou@adacore.com>
5478 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Move up
5479 handling of Has_Pragma_Inline_Always and deal with
5480 Has_Pragma_No_Inline.
5482 2019-07-01 Ed Schonberg <schonberg@adacore.com>
5484 * sem_ch3.adb (Build_Derived_Record_Type): If the parent type is
5485 declared as a subtype of a private type with an inherited
5486 discriminant constraint, its generated full base appears as a
5487 record subtype, so we need to retrieve its oen base type so that
5488 the inherited constraint can be applied to it.
5490 2019-07-01 Yannick Moy <moy@adacore.com>
5492 * sem_spark.adb: Completely rework the algorithm for ownership
5493 checking, as the rules in SPARK RM have changed a lot.
5494 * sem_spark.ads: Update comments.
5496 2019-07-01 Dmitriy Anisimkov <anisimko@adacore.com>
5498 * gsocket.h (Has_Sockaddr_Len): Use the offset of sin_family offset in
5499 the sockaddr_in structure to determine the existence of length field
5500 before the sin_family.
5502 2019-07-01 Ed Schonberg <schonberg@adacore.com>
5504 * sem_prag.adb (Analyze_Pragma, case Weak_External): Pragma only
5505 applies to entities with run-time addresses, not to types.
5507 2019-07-01 Piotr Trojanek <trojanek@adacore.com>
5509 * einfo.adb, sem_ch7.adb, sem_prag.adb, sem_util.adb: Update
5510 references to the SPARK RM after the removal of Rule 7.1.4(5).
5512 2019-07-01 Piotr Trojanek <trojanek@adacore.com>
5514 * sysdep.c: Cleanup references to LynuxWorks in docs and
5517 2019-07-01 Ed Schonberg <schonberg@adacore.com>
5519 * checks.adb (Insert_Valid_Check): Do not apply validity check
5520 to variable declared within a protected object that uses the
5521 Lock_Free implementation, to prevent unwarranted constant
5522 folding, because entities within such an object msut be treated
5525 2019-07-01 Eric Botcazou <ebotcazou@adacore.com>
5527 * exp_ch9.adb (Check_Inlining): Deal with Has_Pragma_No_Inline.
5529 2019-07-01 Ed Schonberg <schonberg@adacore.com>
5531 * exp_unst.adb (Visit_Node, Check_Static_Type): Improve the
5532 handling of private and incomplete types whose full view is an
5533 access type, to detect additional uplevel references in dynamic
5534 bounds. This is relevant to N_Free_Statement among others that
5535 manipulate types whose full viww may be an access type.
5537 2019-07-01 Pat Rogers <rogers@adacore.com>
5539 * doc/gnat_rm/representation_clauses_and_pragmas.rst: Correct
5540 size indicated for R as a component of an array.
5541 * gnat_rm.texi: Regenerate.
5543 2019-07-01 Justin Squirek <squirek@adacore.com>
5545 * libgnat/s-win32.ads: Add definition for ULONG, modify
5546 OVERLAPPED type, and add appropriate pragmas.
5548 2019-07-01 Bob Duff <duff@adacore.com>
5550 * gnat1drv.adb (gnat1drv): Call Write_ALI if the main unit is
5553 2019-07-01 Yannick Moy <moy@adacore.com>
5555 * sem_ch4.adb (Operator_Check): Refine error message.
5557 2019-07-01 Piotr Trojanek <trojanek@adacore.com>
5559 * libgnat/a-calend.ads: Revert "Global => null" contracts on
5562 2019-07-01 Piotr Trojanek <trojanek@adacore.com>
5564 * exp_attr.adb, libgnat/g-graphs.ads: Fix typos in comments:
5565 componant -> component.
5567 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
5569 * libgnat/g-graphs.adb: Use type Directed_Graph rather than
5570 Instance in various routines.
5571 * libgnat/g-graphs.ads: Change type Instance to Directed_Graph.
5572 Update various routines that mention the type.
5574 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
5576 * libgnat/g-sets.adb: Use type Membership_Set rathern than
5577 Instance in various routines.
5578 * libgnat/g-sets.ads: Change type Instance to Membership_Set.
5579 Update various routines that mention the type.
5581 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
5583 * libgnat/g-lists.adb: Use type Doubly_Linked_List rather than
5584 Instance in various routines.
5585 * libgnat/g-lists.ads: Change type Instance to
5586 Doubly_Linked_List. Update various routines that mention the
5589 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
5591 * libgnat/g-dynhta.adb: Use type Dynamic_Hash_Table rather than
5592 Instance in various routines.
5593 * libgnat/g-dynhta.ads: Change type Instance to
5594 Dynamic_Hash_Table. Update various routines that mention the
5597 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
5599 * exp_attr.adb, exp_ch7.adb, exp_unst.adb, sem_ch3.adb,
5600 sem_util.adb, uintp.adb, uintp.ads: Minor reformatting.
5602 2019-07-01 Javier Miranda <miranda@adacore.com>
5604 * exp_attr.adb (Expand_Min_Max_Attribute): Disable expansion of
5605 'Min/'Max on integer, enumeration, fixed point and floating
5606 point types since the CCG backend now provides in file
5607 standard.h routines to support it.
5609 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
5611 * impunit.adb: Add GNAT.Graphs to list Non_Imp_File_Names_95.
5612 * Makefile.rtl, gcc-interface/Make-lang.in: Register unit
5614 * libgnat/g-dynhta.adb: Various minor cleanups (use Present
5615 rather than direct comparisons).
5616 (Delete): Reimplement to use Delete_Node.
5617 (Delete_Node): New routine.
5618 (Destroy_Bucket): Invoke the provided destructor.
5619 (Present): New routines.
5620 * libgnat/g-dynhta.ads: Add new generic formal Destroy_Value.
5621 Use better names for the components of iterators.
5622 * libgnat/g-graphs.adb, libgnat/g-graphs.ads: New unit.
5623 * libgnat/g-lists.adb: Various minor cleanups (use Present
5624 rather than direct comparisons).
5625 (Delete_Node): Invoke the provided destructor.
5626 (Present): New routine.
5627 * libgnat/g-lists.ads: Add new generic formal Destroy_Element.
5628 Use better names for the components of iterators.
5629 (Present): New routine.
5630 * libgnat/g-sets.adb, libgnat/g-sets.ads (Destroy, Preset,
5631 Reset): New routines.
5633 2019-07-01 Dmitriy Anisimkov <anisimko@adacore.com>
5635 * libgnat/g-sothco.adb (Get_Address): Fix the case when AF_INET6
5638 2019-07-01 Ed Schonberg <schonberg@adacore.com>
5640 * exp_attr.adb (Expand_Attribute_Reference, case Invalid_Value):
5641 Resolve result of call to Get_Simple_Init_Val, which may be a
5642 conversion of a literal.
5644 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
5646 * freeze.adb (Freeze_Expression): Remove the horrible useless
5647 name hiding of N. Insert the freeze nodes generated by the
5648 expression prior to the expression when the nearest enclosing
5651 2019-07-01 Pierre-Marie de Rodat <derodat@adacore.com>
5653 * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Fix
5654 formatting issues in the -gnatR section.
5655 * gnat_ugn.texi: Regenerate.
5657 2019-06-30 Iain Sandoe <iain@sandoe.co.uk>
5659 * gnatlink.adb (Link_Step): Remove duplicate -static-libgcc switches.
5660 Push -shared-libgcc explicitly, when it is the target default (unless
5661 overidden by the static flag).
5662 When the user has put an instance of shared/static-libgcc do not push
5663 a duplicate of this.
5665 2019-06-29 Eric Botcazou <ebotcazou@adacore.com>
5667 * gcc-interface/decl.c (gnat_to_gnu_entity): Beep up comment on SAVED,
5668 and tweak comment on the assertion about the scopes of Itypes. Do not
5669 skip the regular processing for Itypes that are E_Record_Subtype with
5670 a Cloned_Subtype. Get the Cloned_Subtype for every E_Record_Subtype
5671 if the type is dummy and hasn't got its own freeze node.
5672 <E_Record_Subtype>: Save again the DECL of the Cloned_Subtype, if any.
5673 <E_Access_Subtype>: Save again the DECL of the equivalent type.
5674 (Gigi_Equivalent_Type) <E_Access_Subtype>: New case.
5676 2019-06-29 Eric Botcazou <ebotcazou@adacore.com>
5678 * gcc-interface/utils.c (unchecked_convert): Tweak comment. Only skip
5679 dereferences when padding to have the same size on both sides. Do it
5680 for destination types with self-referential size too.
5682 2019-06-29 Eric Botcazou <ebotcazou@adacore.com>
5684 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: If the
5685 type requires strict alignment, then set the RM size to the type size.
5686 Rework handling of alignment and sizes of tagged types in ASIS mode.
5687 (validate_size): Rename local variable and remove special handling for
5688 strict-alignment types.
5689 * gcc-interface/utils.c (finish_record_type): Constify local variables
5690 and use properly typed constants.
5692 2019-06-29 Eric Botcazou <ebotcazou@adacore.com>
5694 * gcc-interface/decl.c (gnat_to_gnu_field): Rework error messages for
5695 fields requiring strict alignment, add explicit test on Storage_Unit
5696 for position and size, and mention type alignment for position.
5698 2019-06-29 Eric Botcazou <ebotcazou@adacore.com>
5700 * gcc-interface/trans.c (mark_visited_r): Set TYPE_SIZES_GIMPLIFIED on
5701 the main variant of a type, if any.
5703 2019-06-29 Eric Botcazou <ebotcazou@adacore.com>
5705 * gcc-interface/decl.c (set_nonaliased_component_on_array_type): Add
5706 missing guard for the presence of TYPE_CANONICAL.
5707 (set_reverse_storage_order_on_array_type): Likewise.
5709 2019-06-29 Eric Botcazou <ebotcazou@adacore.com>
5711 * gcc-interface/gigi.h (make_packable_type): Remove default value.
5712 (value_factor_p): Tweak prototype.
5713 * gcc-interface/decl.c (gnat_to_gnu_entity): Add comment.
5714 (gnat_to_gnu_component_type): Likewise.
5715 (gnat_to_gnu_field): Likewise. Fetch the position of the field earlier
5716 and simplify the condition under which the type is packed. Declare
5717 local variable is_bitfield. Pass 1 as max_align to make_packable_type
5718 if it is set to true.
5719 (copy_and_substitute_in_layout): Pass 0 to make_packable_type.
5720 * gcc-interface/utils.c (make_packable_array_type): New function.
5721 (make_packable_type): Use it to rewrite the type of array field.
5722 (maybe_pad_type): Pass align parameter to make_packable_type.
5723 (create_field_decl): Minor tweaks.
5724 (value_factor_p): Assert that FACTOR is a power of 2 and replace the
5725 modulo computation by a masking operation.
5727 2019-06-25 Eric Botcazou <ebotcazou@adacore.com>
5729 * gcc-interface/decl.c (gnat_to_gnu_entity): Remove superfluous test
5731 * gcc-interface/gigi.h (maybe_character_type): Fix formatting.
5732 (maybe_character_value): Likewise.
5734 2019-06-24 Jan Hubicka <jh@suse.cz>
5736 * gcc-interface/decl.c (gnat_to_gnu_entity): Check that
5737 type is array or integer prior checking string flag.
5738 * gcc-interface/gigi.h (maybe_character_type): Likewise.
5739 (maybe_character_value): Likewise.
5741 2019-06-24 Martin Sebor <msebor@redhat.com>
5743 * gcc-interface/utils.c (handle_nonnull_attribute): Quote attribute
5746 2019-06-18 Arnaud Charlet <charlet@adacore.com>
5749 * sem_ch5.adb (Analyze_Loop_Statement): Avoid exception propagation
5750 during normal processing.
5752 2019-06-17 Arnaud Charlet <charlet@adacore.com>
5755 * exp_ch9.adb (Expand_N_Delay_Relative_Statement): Swap the two
5756 conditions to avoid a unnecessary exception propagation in the default
5759 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
5761 * gcc-interface/utils.c (handle_stack_protect_attribute): Move around.
5763 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
5765 * doc/gnat_rm/implementation_defined_pragmas.rst (Machine_Attribute):
5766 Document additional optional parameters.
5767 * sem_prag.adb (Analyze_Pragma) <Pragma_Machine_Attribute>: Accept
5768 more than one optional parameter.
5769 * gcc-interface/decl.c (prepend_one_attribute_pragma): Alphabetize
5770 the list of supported pragmas. Simplify the handling of parameters
5771 and add support for more than one optional parameter.
5772 * gcc-interface/utils.c (attr_cold_hot_exclusions): New constant.
5773 (gnat_internal_attribute_table): Add entry for no_icf, noipa, flatten,
5774 used, cold, hot, target and target_clones.
5775 (begin_subprog_body): Do not create the RTL for the subprogram here.
5776 (handle_noicf_attribute): New static function.
5777 (handle_noipa_attribute): Likewise.
5778 (handle_flatten_attribute): Likewise.
5779 (handle_used_attribute): Likewise.
5780 (handle_cold_attribute): Likewise.
5781 (handle_hot_attribute): Likewise.
5782 (handle_target_attribute): Likewise.
5783 (handle_target_clones_attribute): Likewise.
5785 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
5787 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Return 0
5789 (Identifier_to_gnu): Use the actual subtype for a reference to a
5790 packed array in a return statement.
5791 (Attribute_to_gnu) <Attr_Size>: Do not strip VIEW_CONVERT_EXPRs from
5792 the prefix in every case.
5794 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
5796 * gcc-interface/trans.c (gnat_to_gnu): Remove superfluous tests on
5797 Backend_Overflow_Checks_On_Target and rework comments.
5799 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
5801 * gcc-interface/trans.c (walk_nesting_tree): New static function.
5802 (finalize_nrv): Use it to walk the entire nesting tree.
5804 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
5806 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Remove
5807 obsolete test on Is_For_Access_Subtype.
5809 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
5811 * gcc-interface/decl.c (components_to_record): Set a name on the type
5812 created for the REP part, if any.
5813 * gcc-interface/utils.c (finish_record_type): Only take the maximum
5814 when merging sizes for a variant part at offset 0.
5815 (merge_sizes): Rename has_rep parameter into max.
5817 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
5819 * gcc-interface/utils.c (gnat_internal_attribute_table): Add support
5820 for stack_protect attribute.
5821 (handle_stack_protect_attribute): New static function.
5823 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
5825 * gcc-interface/decl.c (intrin_arglists_compatible_p): Do not return
5826 false if the internal builtin uses a variable list.
5828 2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
5830 * gcc-interface/trans.c (Call_to_gnu): Do not initialize the temporary
5831 created out of addressability concerns if it's for the _Init parameter
5832 of an initialization procedure.
5834 2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
5836 * gcc-interface/ada-builtin-types.def: New file.
5837 * gcc-interface/ada-builtins.def: Likewise.
5838 * gcc-interface/ada-tree.h (BUILT_IN_LIKELY): New macro.
5839 (BUILT_IN_UNLIKELY): Likewise.
5840 * gcc-interface/trans.c (independent_iterations_p): Initialize the
5841 auto-vector to 16 elements.
5842 (Call_to_gnu): Remove local variable and change the vector of actual
5843 parameters to an auto-vector. Do not convert actual parameters to
5844 the argument type for front-end built-in functions. Add support for
5845 front-end built-in functions.
5846 (build_noreturn_cond): Use internal instead of built-in function.
5847 * gcc-interface/utils.c (c_builtin_type): Include ada-builtin-types.def
5848 (install_builtin_function_types): Likewise.
5849 (install_builtin_functions): Include ada-builtins.def first.
5851 2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
5853 * gcc-interface/utils.c (maybe_pad_type): Issue the warning for the
5854 specific case of component types preferably.
5856 2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
5858 * gcc-interface/trans.c (Identifier_to_gnu): Minor tweaks.
5859 (gnat_to_gnu): Do not convert the result if it is a reference to an
5860 unconstrained array used as the prefix of an attribute reference that
5863 2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
5865 * gcc-interface/trans.c (Gigi_Types_Compatible): New predicate.
5866 (Identifier_to_gnu): Use it to assert that the type of the identifier
5867 and that of its entity are compatible for gigi. Rename a couple of
5868 local variables and separate the processing of the result type.
5870 2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
5872 * gcc-interface/trans.c (Call_to_gnu): Use the unpadded type when
5873 putting back an intermediate conversion the type of the actuals.
5875 2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
5877 * gcc-interface/trans.c (gnat_to_gnu) <Shift operations>: Convert the
5878 count to the unsigned version of its base type before proceeding.
5880 2019-05-16 Martin Sebor <msebor@redhat.com>
5882 * gcc-interface/trans.c (check_inlining_for_nested_subprog): Quote
5885 2019-05-08 Arnaud Charlet <charlet@adacore.com>
5887 * standard.ads.h: New file.
5889 2019-05-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5891 * gcc-interface/Makefile.in (install-gcc-specs): Use foreach.
5894 2019-04-29 Michael K. Darling <darlingm@gmail.com>
5896 * gnatvsn.ads: Bump Library_Version to 10.
5898 2019-04-24 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5899 Bernd Edlinger <bernd.edlinger@hotmail.de>
5900 Jakub Jelinek <jakub@redhat.com>
5903 * raise-gcc.c (TARGET_ATTRIBUTE): Define.
5904 (continue_unwind, personality_body, PERSONALITY_FUNCTION): Add
5907 2019-04-07 Eric Botcazou <ebotcazou@adacore.com>
5909 * libgnat/i-cexten.ads (CFloat_128): New type.
5911 2019-03-22 Dmitriy Anisimkov <anisimko@adacore.com>
5914 * libgnat/g-socket.adb (Bind_Socket, Connect_Socket,
5915 Send_Socket): Fix the computation of structure lengths passed to
5917 (Is_IPv6_Address): Fix the number of expected colons.
5919 2019-03-11 Martin Liska <mliska@suse.cz>
5921 * gcc-interface/misc.c (gnat_post_options): Wrap option name in string
5922 format message and fix GNU coding style.
5924 2019-02-08 Eric Botcazou <ebotcazou@adacore.com>
5926 * gcc-interface/trans.c (gnat_to_gnu) <N_Aggregate>: Minor tweak.
5927 * gcc-interface/utils.c (convert): Do not pad when doing an unchecked
5928 conversion here. Use TREE_CONSTANT throughout the function.
5929 (unchecked_convert): Also pad if the source is a CONSTRUCTOR and the
5930 destination is a more aligned array type or a larger aggregate type,
5931 but not between original and packable versions of a type.
5933 2019-02-08 Eric Botcazou <ebotcazou@adacore.com>
5935 * gcc-interface/utils.c (max_size) <tcc_unary>: Be prepared for an
5936 operand with VOID_TYPE.
5938 2019-02-08 Eric Botcazou <ebotcazou@adacore.com>
5940 * gcc-interface/trans.c (elaborate_all_entities): Do not elaborate the
5941 entities of a package renaming another one.
5943 2019-02-08 Eric Botcazou <ebotcazou@adacore.com>
5945 * gcc-interface/trans.c (Regular_Loop_to_gnu): Replace tests on
5946 individual flag_unswitch_loops and flag_tree_loop_vectorize switches
5947 with test on global optimize switch.
5948 (Raise_Error_to_gnu): Likewise.
5950 2019-02-07 Eric Botcazou <ebotcazou@adacore.com>
5952 * libgnarl/s-linux__sparc.ads (ETIMEDOUT): Set to correct value.
5954 2019-02-06 Arnaud Charlet <charlet@adacore.com>
5956 * libgnarl/s-linux__x32.ads: Resync list of signals with s-linux.ads
5958 2019-01-27 Eric Botcazou <ebotcazou@adacore.com>
5960 * repinfo.adb (List_Component_Layout): Remove superfluous space for
5962 * gcc-interface/ada-tree.h (TYPE_IS_EXTRA_SUBTYPE_P): New macro.
5963 * gcc-interface/gigi.h (create_extra_subtype): Declare.
5964 * gcc-interface/decl.c (TYPE_ARRAY_SIZE_LIMIT): Likewise.
5965 (update_n_elem): New function.
5966 (gnat_to_gnu_entity): Use create_extra_subtype to create extra subtypes
5967 instead of doing it manually.
5968 <E_Array_Type>: Use update_n_elem to compute the maximum size. Use the
5969 index type instead of base type for the bounds. Set TYPE_ARRAY_MAX_SIZE
5970 of the array to the maximum size.
5971 <E_Array_Subtype>: Create an extra subtype using the index type of the
5972 base array type for self-referential bounds. Use update_n_elem to
5973 compute the maximum size. Set TYPE_ARRAY_MAX_SIZE of the array to the
5975 (gnat_to_gnu_field): Clear DECL_NONADDRESSABLE_P on discriminants.
5976 * gcc-interface/misc.c (gnat_get_alias_set): Return the alias set of
5977 the base type for an extra subtype.
5978 (gnat_type_max_size): Remove obsolete code.
5979 * gcc-interface/trans.c (Attribute_to_gnu): Minor tweak.
5980 (can_be_lower_p): Deal with pathological types.
5981 * gcc-interface/utils.c (create_extra_subtype): New function.
5982 (create_field_decl): Minor tweak.
5983 (max_size) <tcc_reference>: Compute a better value by using the extra
5984 subtypes on the self-referential bounds.
5985 <tcc_binary>: Rewrite. Deal with "negative value" in unsigned types.
5986 <tcc_expression>: Likewise.
5987 * gcc-interface/utils2.c (compare_arrays): Retrieve the original bounds
5988 of the arrays upfront. Swap only if the second length is not constant.
5989 Use comparisons on the original bounds consistently for the null tests.
5990 (build_binary_op): Use TYPE_IS_EXTRA_SUBTYPE_P macro.
5991 (build_allocator): Minor tweak.
5993 2019-01-27 Eric Botcazou <ebotcazou@adacore.com>
5995 * gcc-interface/decl.c (array_type_has_nonaliased_component): Return
5996 the same value for every dimension of a multidimensional array type.
5998 2019-01-26 Eric Botcazou <ebotcazou@adacore.com>
6000 * gcc-interface/trans.c (Regular_Loop_to_gnu): Use the SLOC of the
6001 iteration scheme, if present, throughout the translation.
6003 2019-01-26 Eric Botcazou <ebotcazou@adacore.com>
6005 * gcc-interface/trans.c (gnat_to_gnu) <N_Assignment_Statement>: Use
6006 DECL_SIZE_UNIT instead of TYPE_SIZE_UNIT for the size to be assigned
6007 by a call to memset if the LHS is a DECL.
6009 2019-01-26 Eric Botcazou <ebotcazou@adacore.com>
6011 * gcc-interface/trans.c (struct loop_info_d): Remove artificial field.
6012 (Loop_Statement_to_gnu): Do not set it.
6014 2019-01-26 Eric Botcazou <ebotcazou@adacore.com>
6016 * gcc-interface/trans.c (Iterate_Acc_Clause_Arg): Fix formatting.
6017 (Acc_gnat_to_gnu): Likewise.
6018 (Acc_Data_to_gnu): Likewise.
6019 (Acc_Var_to_gnu): Likewise.
6020 (Acc_Reduc_to_gnu): Likewise.
6021 (Acc_Size_List_to_gnu): Likewise.
6022 (Pragma_to_gnu) <Pragma_Acc_Loop>: Likewise.
6023 <Pragma_Acc_Data>): Likewise.
6024 (find_loop_for): Remove default value for parameters.
6025 * gcc-interface/trans.c (gnat_to_gnu) <N_Op_And>: Merge into...
6026 <N_Op_Eq>): ...this.
6028 2019-01-26 Eric Botcazou <ebotcazou@adacore.com>
6030 * gcc-interface/decl.c (annotate_value) <INTEGER_CST>: Use test on
6031 the sign bit instead of on the sign of the value.
6032 <PLUS_EXPR>: Turn addition of negative constant into subtraction.
6033 <MULT_EXPR>: Add test for degenerate case.
6034 <BIT_AND_EXPR>: Simplify.
6036 2019-01-18 Sebastian Huber <sebastian.huber@embedded-brains.de>
6038 * s-oscons-tmplt.c (AF_INET6): Do not undefine for RTEMS.
6040 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
6043 * exp_ch11.adb: Change "can not" to "cannot".
6044 * sem_ch4.adb: Likewise.
6046 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
6049 * exp_ch9.adb: Mechanically replace "can not" with "cannot".
6050 * libgnat/s-regpat.ads: Likewise.
6051 * par-ch4.adb: Likewise.
6052 * set_targ.adb: Likewise.
6053 * types.ads: Likewise.
6055 2019-01-08 Justin Squirek <squirek@adacore.com>
6058 2018-07-31 Justin Squirek <squirek@adacore.com>
6060 * lib-writ.adb (Write_With_Lines): Modfiy the generation
6061 of dependencies within ali files so that source unit
6062 bodies are properly listed even if said bodies are
6063 missing. Perform legacy behavior in GNATprove mode.
6064 * lib-writ.ads: Modify documentation to reflect current
6068 2018-09-26 Justin Squirek <squirek@adacore.com>
6070 * lib-writ.adb, lib-writ.ads (Write_With_Lines): Add
6071 documentation and an extra conditional check for RCI
6072 units so that generated ali files will list the spec
6073 only instead of a body when a body is not found.
6075 2019-01-04 Eric Botcazou <ebotcazou@adacore.com>
6077 * gnatvsn.ads: Bump copyright year.
6079 2019-01-01 Jakub Jelinek <jakub@redhat.com>
6081 Update copyright years.
6083 * gnat_ugn.texi: Bump @copying's copyright year.
6084 * gnat_rm.texi: Likewise.
6086 Copyright (C) 2019 Free Software Foundation, Inc.
6088 Copying and distribution of this file, with or without modification,
6089 are permitted in any medium without royalty provided the copyright
6090 notice and this notice are preserved.