1 2018-05-30 Hristian Kirtchev <kirtchev@adacore.com>
3 * exp_aggr.adb, exp_ch3.adb, exp_ch4.adb, exp_ch7.adb, exp_unst.adb,
4 exp_util.adb, exp_util.ads, libgnat/a-calcon.adb, libgnat/a-calcon.ads,
5 libgnat/s-os_lib.adb, repinfo.adb, sem_ch3.adb, sem_disp.adb,
6 sem_disp.ads, sem_util.adb: Minor reformatting.
8 2018-05-30 Arnaud Charlet <charlet@adacore.com>
10 * gcc-interface/Makefile.in: Move special flags for Ada runtime files
12 * Makefile.rtl: ... to here. Update comments. Protect call to
13 "GCC_FOR_TARGET" in case target_os isn't defined.
15 2018-05-30 Arnaud Charlet <charlet@adacore.com>
17 * gcc-interface/Makefile.in: Move target pair settings from here...
18 * Makefile.rtl: ... to here.
19 (setup-rts): New target.
21 2018-05-29 Eric Botcazou <ebotcazou@adacore.com>
23 * doc/gnat_ugn/building_executable_programs_with_gnat.rst (Alphabetical
24 List of All Switches): Replace "modules" with "units".
25 (Subprogram Inlining Control): Likewise.
26 * gnat_ugn.texi: Regenerate.
27 * usage.adb (Usage): Fix description of -gnatn switch.
29 2018-05-29 Arnaud Charlet <charlet@adacore.com>
31 * gcc-interface/Makefile.in: Fix typos.
33 2018-05-29 Ed Schonberg <schonberg@adacore.com>
35 * exp_ch7.adb (Build_Finalizer_Call): Attach to tree the reference to
36 the finalizer procedure in the At_End handler, for use in LLVM
39 2018-05-29 Javier Miranda <miranda@adacore.com>
41 * exp_ch4.adb (Expand_N_Op_Eq, Expand_Composite_Equality): Use the new
42 subprogram Inherits_From_Tagged_Full_View to identify more reliably
43 untagged private types completed with a derivation of an untagged
44 private whose full view is a tagged type.
45 * sem_util.ads, sem_util.adb (Inherits_From_Tagged_Full_View): New
47 (Collect_Primitive_Operations): Handle untagged private types completed
48 with a derivation of an untagged private type whose full view is a
49 tagged type. In such case, collecting the list of primitives we may
50 find two equality primitives: one associated with the untagged private
51 and another associated with the ultimate tagged type (and we must
52 remove from the returned list this latter one).
54 2018-05-29 Ed Schonberg <schonberg@adacore.com>
56 * exp_unst.adb (Visit_Node): Handle statement sequences that include an
59 2018-05-29 Eric Botcazou <ebotcazou@adacore.com>
61 * repinfo.adb (List_Entities): Also recurse into blocks without label.
63 2018-05-29 Ed Schonberg <schonberg@adacore.com>
65 * exp_ch6.adb (Expand_N_Subprogram_Body): Do not generate push/pop for
66 exceptions if subprogram unnesting is in effect, because these branch
67 nodes are relevant only in the presence of nested subprograms.
69 2018-05-29 Ed Schonberg <schonberg@adacore.com>
71 * libgnat/s-fatgen.adb (Succ, Pred): Raise Constraint_Error
72 unconditionally when applied to the largest positive (resp. largest
73 negative) value of a floating-point type.
75 2018-05-29 Ed Schonberg <schonberg@adacore.com>
77 * einfo.ads, einfo.adb: Clarify use of Activation_Record_Component:
78 discriminants and exceptions are never components of such. The flag
79 Needs_Activation_Record is set on subprogram types, not on access to
82 2018-05-29 Ed Schonberg <schonberg@adacore.com>
84 * sem_ch3.adb: Set scope of component of subtype.
86 2018-05-29 Ed Schonberg <schonberg@adacore.com>
88 * exp_unst.adb (Visit_Node): Exclude selected components whose prefix
89 carry no type. Such selected components appear in unit names that are
90 child units, both in the specification and possibly in an end label for
91 the unit, and they do not contain any relevant uplevel references.
93 2018-05-29 Arnaud Charlet <charlet@adacore.com>
95 * libgnat/a-calend.ads, libgnat/a-calend.adb (Epoch_Offset): Make it a
98 2018-05-29 Olivier Hainque <hainque@adacore.com>
100 * libgnat/system-vxworks7-ppc-rtp.ads: New file.
101 * libgnat/system-vxworks7-ppc-kernel.ads: New file.
102 * libgnat/system-vxworks7-e500-rtp.ads: New file.
103 * libgnat/system-vxworks7-e500-kernel.ads: New file.
104 * libgnat/system-vxworks7-x86-rtp.ads: New file.
105 * libgnat/system-vxworks-ppc64-kernel.ads: Rename as ...
106 * libgnat/system-vxworks7-ppc64-kernel.ads: and adjust name of
107 gnat-crtbe link spec to use the vx7 variant.
109 2018-05-29 Olivier Hainque <hainque@adacore.com>
111 * vx_crtbegin.inc: Use a consistent naming convention for the
112 registration/deregistration functions across RTP or kernel. Remove the
113 ctor/dtor attribute setting based on RTP/kernel, expect the optional
114 attribute extension to be provided by includers instead.
115 * vx_crtbegin.c: Mere inclusion of vx_crtbegin.inc with empty attribute
116 extension for the registration/deregistration functions.
117 * vx_crtbegin_attr.c: New file. Include vx_crtbegin.inc with explicit
118 constructor/destructor attribute extensions.
119 * vx_crtbegin_array.c: New file. Include vx_crtbegin.inc with empty
120 attribute extensions and declare _ctors/_dtors arrays.
121 * vx_crtbegin_auto.c: Remove.
122 * libgnat/system-vxworks7-aarch64-rtp-smp.ads: Use
123 vxworks7-gnat-crtbe-link.spec.
124 * libgnat/system-vxworks7-aarch64.ads: Likewise.
125 * libgnat/system-vxworks7-e500-rtp-smp.ads: Likewise.
126 * libgnat/system-vxworks7-ppc-rtp-smp.ads: Likewise.
127 * libgnat/system-vxworks7-ppc64-rtp-smp.ads: Likewise.
128 * libgnat/system-vxworks7-x86-kernel.ads: Likewise.
129 * libgnat/system-vxworks7-x86-rtp-smp.ads: Likewise.
130 * libgnat/system-vxworks7-x86_64-kernel.ads: Likewise.
131 * libgnat/system-vxworks7-x86_64-rtp-smp.ads: Likewise.
133 2018-05-29 Piotr Trojanek <trojanek@adacore.com>
135 * ali.adb: Minor reformatting.
137 2018-05-29 Joel Brobecker <brobecker@adacore.com>
139 * doc/gnat_ugn/platform_specific_information.rst: Update package
140 requirements for 32bit GNAT on x86_64-linux.
141 * gnat_ugn.texi: Regenerate.
143 2018-05-29 Eric Botcazou <ebotcazou@adacore.com>
145 * doc/gnat_ugn/building_executable_programs_with_gnat.rst (Debugging
146 Control): Adjust description of -gnatRj.
147 * gnat_ugn.texi: Regenerate.
148 * opt.ads (List_Representation_Info_To_JSON): Likewise.
149 * repinfo.adb (List_Rep_Info): Do not automatically create a file
150 if List_Representation_Info_To_JSON is true.
151 * switch-c.adb (Scan_Front_End_Switches) <R>: Remove incompatibility
152 check between -gnatRj and -gnatRs.
153 * usage.adb (Usage): Adjust description of -gnatRj.
155 2018-05-29 Pascal Obry <obry@adacore.com>
157 * libgnat/s-os_lib.adb (Normalize_Pathname): Fix handling of ".." in
160 2018-05-29 Pascal Obry <obry@adacore.com>
162 * libgnat/s-os_lib.adb: Minor reformatting.
164 2018-05-29 Doug Rupp <rupp@adacore.com>
166 * libgnat/a-calend.adb (Epoch_Offset): Move from body to ...
167 * libgnat/a-calend.ads (Epoch_Offset): to private part of spec
168 * libgnat/a-calcon.ads (To_Unix_Nano_Time): New function spec.
169 * libgnat/a-calcon.adb (To_Unix_Nano_Time): New function body.
171 2018-05-29 Eric Botcazou <ebotcazou@adacore.com>
173 * repinfo.ads (JSON format): Document new pair for components.
174 * repinfo.adb (Derived_Discriminant): New function.
175 (List_Structural_Record_Layout): Add Outer_Ent parameter and pass it
176 in recursive calls. If the record type is the parent of an extension,
177 find and list the derived discriminant from the extension, if any.
178 (List_Component_Layout): List the Discriminant_Number in JSON mode.
179 (List_Record_Info): Adjust call to List_Structural_Record_Layout.
181 2018-05-29 Eric Botcazou <ebotcazou@adacore.com>
183 * doc/gnat_ugn/building_executable_programs_with_gnat.rst (Alphabetical
184 List of All Switches): Document -gnatRj.
185 (Debugging Control): Likewise.
186 * gnat_ugn.texi: Regenerate.
187 * opt.ads (List_Representation_Info_To_JSON): New boolean variable.
188 * osint-c.adb (Create_Repinfo_File): Use the .json instead of .rep
189 extension if List_Representation_Info_To_JSON is true.
190 * repinfo.ads: Document the JSON output format.
191 * repinfo.adb (List_Location): New procedure.
192 (List_Array_Info): Add support for JSON output.
193 (List_Entities): Likewise.
196 (Print_Expr): Likewise.
197 (List_Linker_Section): Likewise.
198 (List_Mechanisms): Likewise.
199 (List_Name): Likewise.
200 (List_Object_Info): Likewise.
201 (List_Record_Info): Likewise.
202 (List_Component_Layout): Likewise. Add Indent parameter.
203 (List_Structural_Record_Layout): New procedure.
204 (List_Attr): Add support for JSON output.
205 (List_Type_Info): Likewise.
206 (Write_Unknown_Val): Likewise.
207 * switch-c.adb (Scan_Front_End_Switches) <R>: Deal with 'j'.
208 * usage.adb (Usage): List -gnatRj.
210 2018-05-29 Eric Botcazou <ebotcazou@adacore.com>
212 * repinfo.adb (List_Component_Layout): New procedure extracted from...
213 (List_Record_Layout): ...here. Invoke it.
215 2018-05-29 Eric Botcazou <ebotcazou@adacore.com>
217 * repinfo.adb (Write_Unknown_Val): New procedure.
218 (List_GCC_Expression): Call it.
219 (List_Record_Layout): Likewise.
220 (Write_Val): Likewise.
222 2018-05-29 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
224 * exp_ch4.adb (Expand_N_Op_Abs): Clear Do_Overflow_Check when inserting
227 2018-05-29 Arnaud Charlet <charlet@adacore.com>
229 * lib-writ.adb (Write_ALI): Do not use new function from s-casuti yet.
230 This breaks build of cross compilers with older versions of GNAT, so
233 2018-05-29 Doug Rupp <rupp@adacore.com>
235 * libgnarl/s-taprop.ads (Monotonic_Clock): Refine documentation to
238 2018-05-29 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
240 * exp_ch4.adb (Expand_N_Op_Abs): Always do range check against 'First.
242 2018-05-29 Eric Botcazou <ebotcazou@adacore.com>
244 * repinfo.adb (List_Entities): Do not list the Linker_Section for
246 (List_Mechanisms): ...but here instead. Use consistent name output
247 and formatting conventions.
249 2018-05-29 Bob Duff <duff@adacore.com>
251 * lib-writ.adb (Write_ALI): Cleanup: avoid use of global var; call new
253 * libgnat/s-casuti.ads, libgnat/s-casuti.adb (To_Upper, To_Lower,
254 To_Mixed): New functions.
255 * osint.adb: Cleanup: use Is_Directory_Separator, which correctly
256 allows both '\' and '/' on Windows.
258 2018-05-28 Eric Botcazou <ebotcazou@adacore.com>
260 * repinfo.ads: Minor fixes and tweaks in comments.
262 2018-05-28 Eric Botcazou <ebotcazou@adacore.com>
264 * repinfo.adb (List_GCC_Expression): Remove Valop and replace calls to
265 it with calls to Unop.
267 2018-05-28 Eric Botcazou <ebotcazou@adacore.com>
269 * repinfo.ads (TCode): Adjust range.
270 (Truth_Andif_Expr): Remove.
271 (Truth_Orif_Expr): Likewise.
272 (Truth_And_Expr .. Dynamic_Val): Adjust value.
273 * repinfo.adb (Print_Expr): Remove handling of Truth_{And,Or}if_Expr.
274 (Rep_Value): Likewise.
275 * repinfo.h (Truth_Andif_Expr): Remove.
276 (Truth_Orif_Expr): Likewise.
277 (Truth_And_Expr .. Dynamic_Val): Adjust value.
278 * gcc-interface/decl.c (annotate_value) <TRUTH_ANDIF_EXPR>: Fall
279 through to TRUTH_AND_EXPR case.
280 <TRUTH_ORIF_EXPR>: Fall through to TRUTH_OR_EXPR case.
282 2018-05-28 Ed Schonberg <schonberg@adacore.com>
284 * exp_unst.adb (Visit_Node): For indexed components and attribute
285 references, examine index expressions or associated expressions as well
286 to record uplevel references.
287 (Vist_Node): For function and procedure calls, if a formal is an
288 unconstrained array and the actual is constrained, check whether bounds
289 of actual have uplevel references.
291 2018-05-28 Ed Schonberg <schonberg@adacore.com>
293 * einfo.ads, einfo.adb: Exceptions can be uplevel references, and thus
294 they can appear as components of activation records.
295 * exp_unst.adb (Visit_Node): A reference to an exception may be an
298 2018-05-28 Eric Botcazou <ebotcazou@adacore.com>
300 * exp_ch4.adb (Expand_Composite_Equality): Compute whether the size
301 depends on a discriminant manually instead of using the predicate
302 Size_Depends_On_Discriminant in the array type case.
304 2018-05-28 Ed Schonberg <schonberg@adacore.com>
306 * exp_unst.adb (Check_Static_Type): For a record subtype, check
307 discriminant constraints as well.
308 (Visit_Node): For a selected component, check type of prefix, as is
309 done for indexed components and slices.
311 2018-05-28 Javier Miranda <miranda@adacore.com>
313 * exp_ch4.adb (Real_Range_Check): Add a temporary to store the integer
314 value when converting a float value to a fixed-point value. This is
315 required for CCG because it handles fixed-point types by means of
316 unsigned integer type variables. The range check is now performed using
317 the integer value stored in this temporary.
319 2018-05-28 Yannick Moy <moy@adacore.com>
321 * sem_util.adb (Is_OK_Volatile_Context): Add attributes First, Last and
322 Length as valid non-interfering contexts for SPARK.
324 2018-05-28 Claire Dross <dross@adacore.com>
326 * sem_disp.ads, sem_disp.adb (Inheritance_Utilities): Package for
327 generic inheritance utilities.
328 (Generic_Inherited_Subprograms): Generic version of
329 Inherited_Subprograms, generic in Find_Dispatching_Type function.
330 (Generic_Is_Overriding_Subprogram): Generic version of
331 Is_Overriding_Subprogram, generic in Find_Dispatching_Type function.
332 (Inherited_Subprograms): Instance of Generic_Inherited_Subprograms with
333 Sem_Disp.Find_Dispatching_Type.
334 (Is_Overriding_Subprogram): Instance of
335 Generic_Is_Overriding_Subprogram with Sem_Disp.Find_Dispatching_Type.
336 (Inheritance_Utilities_Inst): Instance of Inheritance_Utilities
337 with Sem_Disp.Find_Dispatching_Type.
339 2018-05-28 Eric Botcazou <ebotcazou@adacore.com>
341 * exp_ch4.adb (Expand_Composite_Equality): For a composite (or FP)
342 component type, do not expand array equality using the unconstrained
343 base type, except for the case where the bounds of the type depend on a
346 2018-05-28 Ed Schonberg <schonberg@adacore.com>
348 * einfo.ads, einfo.adb (Needs_Activation_Record): New flag on
349 access-to-subprogram types, to indicate that an indirect call through
350 such a type requires an activation record when compiling for LLVM.
351 * sem_ch3.adb (Access_Subprogram_Declaration): Set new flag as needed.
353 2018-05-28 Ed Schonberg <schonberg@adacore.com>
355 * exp_ch4.adb (Real_Range_Check): Specialize float-to-fixed conversions
356 when bounds of fixed type are static, to remove some spuerfluous
357 implicit conversions and provide an accurate result when converting
358 back and forth between the fixed point type and a floating point type.
360 2018-05-28 Ed Schonberg <schonberg@adacore.com>
362 * exp_unst.adb (Unnest_Subprogram): Prevent creation of empty
365 2018-05-28 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
367 * exp_unst.adb (Check_Static_Type): Add argument to indicate node to be
368 replaced, if any; all callers changed.
369 (Note_Uplevel_Ref): Likewise. Also replace reference to deferred
370 constant with private view so we take the address of that entity.
371 (Note_Uplevel_Bound): Add argument to indicate node to be replaced, if
372 any; all callers changed. Handle N_Indexed_Component like
373 N_Attribute_Reference. Add N_Type_Conversion case.
374 (Visit_Node): Indexed references can be uplevel if the type isn't
376 (Unnest_Subprograms): Don't rewrite if no reference given. If call has
377 been relocated, set first_named pointer in original node as well.
379 2018-05-28 Ed Schonberg <schonberg@adacore.com>
381 * exp_aggr.adb (Flatten): Copy tree of expression in a component
382 association with a range or a set of discrete choices, rather than
383 relocating the node. This avoids inconsistencies in the tree when
384 handling nested subprograms with uplevel references for LLVM.
386 2018-05-28 Arnaud Charlet <charlet@adacore.com>
388 * exp_util.adb (Possible_Bit_Aligned_Component): Always return False in
391 2018-05-28 Arnaud Charlet <charlet@adacore.com>
393 * exp_unst.adb: Fix typo.
395 2018-05-28 Bob Duff <duff@adacore.com>
397 * libgnat/a-convec.adb (Query_Element): Minor cleanup: remove an
398 unnecessary use of 'Unrestricted_Access.
400 2018-05-28 Hristian Kirtchev <kirtchev@adacore.com>
402 * repinfo.adb (Expr_Value_S): New routine.
403 (List_Linker_Section): Properly extract the value of the section
406 2018-05-28 Patrick Bernardi <bernardi@adacore.com>
408 * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Update the
409 description of the -D binder switch to reflect current usage.
410 * gnat_ugn.texi: Regenerate.
412 2018-05-28 Gary Dismukes <dismukes@adacore.com>
414 * exp_ch3.adb: Minor reformatting
416 2018-05-28 Justin Squirek <squirek@adacore.com>
419 (Build_Initialization_Call): Add logic to pass the appropriate actual to match
421 (Init_Formals): Add new formal *_skip_null_excluding_check
422 * exp_util.adb, exp_util.ads
423 (Enclosing_Init_Proc): Added to fetch the enclosing Init_Proc from the current
425 (Inside_Init_Proc): Refactored to use Enclosing_Init_Proc
426 (Needs_Conditional_Null_Excluding_Check): Added to factorize the predicate
427 used to determine how to generate an Init_Proc for a given type.
428 (Needs_Constant_Address): Minor reformatting
430 (Resolve_Null): Add logic to generate a conditional check in certain cases
432 2018-05-28 Hristian Kirtchev <kirtchev@adacore.com>
434 * exp_aggr.adb, gnatlink.adb, sem_ch6.adb, sem_res.adb, sem_util.adb:
437 2018-05-28 Hristian Kirtchev <kirtchev@adacore.com>
439 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile): Include
440 the declarations of single concurrent types because they fall in the
441 category of full type and object declarations.
443 2018-05-28 Eric Botcazou <ebotcazou@adacore.com>
445 * repinfo.adb (Compute_Max_Length): Skip _Parent component.
446 (List_Record_Layout): Likewise.
448 2018-05-28 Ed Schonberg <schonberg@adacore.com>
450 * sem_util.adb (Is_Function_Result): Add a warning if a postcondition
451 includes a call to function to which it applies. This may mean an
452 omission of an attribute reference 'Result, in particular if the
453 function is pqrameterless.
455 2018-05-28 Justin Squirek <squirek@adacore.com>
457 * sem_ch8.adb (Find_Expanded_Name): Add extra guard to make sure the
458 misresolved package name is not a case of mistaken identity.
460 2018-05-28 Yannick Moy <moy@adacore.com>
462 * sem_res.adb (Resolve_Range): Re-resolve the low bound of a range in
463 GNATprove mode, as the order of resolution (low then high) means that
464 all the information is not available when resolving the low bound the
467 2018-05-28 Eric Botcazou <ebotcazou@adacore.com>
469 * repinfo.adb (List_Array_Info): Start with an explicit blank line and
470 end with the linker section, if any.
471 (List_Entities): Do not output the linker section for record types,
472 array types and variables.
473 (Print_Expr): Factor out common processing for unary operators and
474 special values. Adjust and reorder the various cases.
475 (List_Object_Info): End with the linker section, if any.
476 (List_Record_Info): Likewise.
477 (List_Type_Info): Do not start with a blank line.
479 2018-05-25 Nicolas Roche <roche@adacore.com>
481 * libgnat/s-valrea.adb (Scan_Real): Abort computation once it is sure
482 that the result will be either -infinite or +infinite.
484 2018-05-25 Patrick Bernardi <bernardi@adacore.com>
486 * libgnat/s-parame.ads, libgnat/s-parame__vxworks.ads,
487 libgnat/s-parame__ae653.ads, libgnat/s-parame__hpux.ads (Size_Type):
488 Expand range of type to match the address space of the target.
489 (Task_Storage_Size): Remove unused type.
491 2018-05-25 Ed Schonberg <schonberg@adacore.com>
493 * sem_res.adb (Set_Mixed_Mode_Operand): If the operand is an expression
494 of a fixed point type and the parent is a multiplying operation,
495 resolve the operand with its own type because the context will impose a
496 resulting type on the result of the multiplication by means of
497 approriate conversion.
499 2018-05-25 Hristian Kirtchev <kirtchev@adacore.com>
501 * exp_ch3.adb (Default_Initialize_Object): Ensure that the analysis of
502 the in-place initialization aggregate created for pragmas
503 Initialize_Scalars or Normalize_Scalars is performed with checks
506 2018-05-25 Arnaud Charlet <charlet@adacore.com>
508 * exp_aggr.adb (Convert_To_Positional): Bump default for
509 Max_Others_Replicate to 32. Update comments.
510 * osint.ads (Unknown_Attributes): No longer pretend this is a constant.
511 (No_File_Info_Cache): Initialize separately.
512 * osint.adb (No_File_Info_Cache): Update initializer.
514 2018-05-25 Javier Miranda <miranda@adacore.com>
516 * sem_res.adb (Resolve_Membership_Op): Allow the use of the membership
517 test when the left operand is a class-wide interface and the right
518 operand is not a class-wide type.
519 * exp_ch4.adb (Tagged_Membership): Adding support for interface as the
522 2018-05-25 Ed Schonberg <schonberg@adacore.com>
524 * exp_aggr.adb (Flatten): A quantified expression cannot be duplicated
525 in an others clause to prevent visibility issues with the generated
527 (Component_OK_For_Backend): Return false for a quantified expression.
528 (Check_Static_Component): Ditto.
530 2018-05-25 Hristian Kirtchev <kirtchev@adacore.com>
532 * libgnat/s-secsta.adb (SS_Allocate): Reimplemented.
533 (SS_Allocate_Dynamic): New routine. The allocation logic is now split
534 into three distring cases rather than in one loop which attempts to
535 handle all three cases. This rewrite eliminates an issue where the last
536 frame of the stack cannot be freed, thus causing the memory range of a
537 new frame to approach the overflow point of the memory index type.
538 Since the overflow is logically treated as a
539 too-much-memory-on-the-stack scenario, it causes a bogus Storage_Error.
540 (SS_Allocate_Static): New routine. The routine factorizes the static
541 secondary stack-related code from the former SS_Allocate.
543 2018-05-25 Sergey Rybin <rybin@adacore.com>
545 * doc/gnat_ugn/gnat_and_program_execution.rst: Add description of '-U'
548 2018-05-25 Ed Schonberg <schonberg@adacore.com>
550 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not create
551 Class_Wide_Clone_Body when analyzing a subprogram_body_stub: the clone
552 is created when the proper body of the stub is analyzed.
553 * sem_util.adb (ZBuild_Class_Wide_Clone_Body): If the subprogram body
554 is the proper body of a subunit, the cloned body must be inserted in
555 the declarative list that contains the stub.
557 2018-05-25 Justin Squirek <squirek@adacore.com>
559 * exp_ch6.adb (Expand_Simple_Function_Return): Add guard in check to
560 generate code for 6.5(8-10) so that we don't get an assertion error
561 when dealing with an incomplete return type.
563 2018-05-25 Arnaud Charlet <charlet@adacore.com>
565 * pprint.adb (Expression_Name): Strip too long expressions to avoid
566 carrying very large strings.
568 2018-05-25 Patrick Bernardi <bernardi@adacore.com>
570 * switch-b.adb (Scan_Binder_Switches): binder switch -Q accepts Natural
573 2018-05-25 Doug Rupp <rupp@adacore.com>
575 * tracebak.c (aarch64-linux): Implement.
577 2018-05-25 Justin Squirek <squirek@adacore.com>
579 * sem_ch8.adb: Minor reformatting.
581 2018-05-25 Piotr Trojanek <trojanek@adacore.com>
583 * sem_util.adb (Iterate_Call_Parameters): Fix code convention and
586 2018-05-25 Hristian Kirtchev <kirtchev@adacore.com>
588 * einfo.adb, einfo.ads, exp_ch3.adb, exp_ch8.adb, exp_unst.adb,
589 pprint.adb, sem_ch12.adb, sem_ch3.adb, sem_prag.adb, sem_util.adb:
592 2018-05-25 Ed Schonberg <schonberg@adacore.com>
594 * sem_ch12.adb (Instance_Exists): New function, subsidiary of
595 Validate_Derived_Type_Instance, to verify that all interfaces
596 implemented by the formal type are also implemented by the actual. The
597 verification is complicated when an interface of the formal is declared
598 in a generic unit and the actual is declared in an instance of it.
599 There is currently no mechanism to relate an interface declared within
600 a generic to the corresponding interface in an instance, so we must
601 traverse the list of interfaces of the actual, looking for a name
602 match, and verifying that that interface is declared in an instance.
604 2018-05-25 Piotr Trojanek <trojanek@adacore.com>
606 * sem_util.adb (Iterate_Call_Parameters): Rewrite with extra
607 assertions; replace function versions of Next_Formal/Next_Actual with
608 their procedural versions (which are more concise).
610 2018-05-25 Doug Rupp <rupp@adacore.com>
612 * libgnarl/s-osinte__aix.ads, libgnarl/s-osinte__android.ads,
613 libgnarl/s-osinte__darwin.ads, libgnarl/s-osinte__freebsd.ads,
614 libgnarl/s-osinte__hpux.ads, libgnarl/s-osinte__kfreebsd-gnu.ads,
615 libgnarl/s-osinte__linux.ads, libgnarl/s-osinte__lynxos178e.ads,
616 libgnarl/s-osinte__qnx.ads, libgnarl/s-osinte__rtems.ads
617 (Relative_Timed_Wait): Remove.
618 * libgnarl/s-tpopmo.adb (Timed_Sleep, Timed_Delay): Rewrite to allow
619 for incremental looping. Remove references to Rel_Time and
621 * libgnat/s-osprim__posix.adb, libgnat/s-osprim__posix2008.adb
622 (Timed_Delay): Make separate.
623 * libgnat/s-optide.adb: New separate procedure.
624 * libgnat/s-osprim.ads (Max_System_Delay): New constant.
625 * libgnat/s-osprim__lynxos.ads (Max_Sensible_Delay): Set to 6 months.
626 (Max_System_Delay): New constant.
628 2018-05-25 Ed Schonberg <schonberg@adacore.com>
630 * sem_ch12.adb (Validate_Derived_Type_Instance): Verify that the actual
631 for a formal derived type implements all the interfaces declared for
634 2018-05-25 Yannick Moy <moy@adacore.com>
636 * sem_prag.adb (Check_Applicable_Policy): Deal specially with CodePeer
637 and GNATprove modes when applicable policy is Ignore.
639 2018-05-25 Eric Botcazou <ebotcazou@adacore.com>
641 * freeze.adb (Freeze_Enumeration_Type): Do not give integer size to a
642 boolean type with convention C.
643 * libgnat/i-cexten.ads (bool): Change to boolean with convention C.
644 * gcc-interface/decl.c (gnat_to_gnu_entity): Add new local variable
645 FOREIGN and use it throughout the function.
646 <E_Enumeration_Type>: Set precision 1 on boolean types with foreign
648 <E_Enumeration_Subtype>: Likewise for subtypes.
649 <E_Record_Type>: Force the size of a storage unit on empty classes.
650 * gcc-interface/utils.c (make_type_from_size) <BOOLEAN_TYPE>: Skip
651 boolean types with precision 1 if the size is the expected one.
653 2018-05-25 Arnaud Charlet <charlet@adacore.com>
655 * pprint.adb (Expression_Name): Do not print non ASCII characters.
657 2018-05-25 Bob Duff <duff@adacore.com>
659 * libgnat/a-strunb__shared.ads, libgnat/a-stwiun__shared.ads,
660 libgnat/a-stzunb__shared.ads: (Initialize, Adjust): Add pragma Inline.
662 2018-05-25 Bob Duff <duff@adacore.com>
664 * sem_util.ads: Minor comment fix.
666 2018-05-25 Ed Schonberg <schonberg@adacore.com>
668 * exp_unst.adb (Visit_Node): Restrict check for uplevel references in
669 prefixes of array attributes, to prefixes that are entity names whose
671 (Note_Uplevel_Bound): Verify that the bound is declared in an enclosing
672 subprogram, as itype created for loops in pre/postcondition may appear
673 in loops at the library level.
675 2018-05-25 Ed Schonberg <schonberg@adacore.com>
677 * sem_ch13.adb (Build_Predicate_Functions): The predicate function
678 declaration is inserted into the tree and analyzed at that point, so
679 should not be reinserted when the body is constructed. Inside a
680 generic, ensure that the body is not inserted twice in the tree.
682 2018-05-25 Yannick Moy <moy@adacore.com>
684 * sem_prag.adb (Check_Grouping): Modify test to ignore statements and
685 declarations not coming from source.
687 2018-05-25 Fedor Rybin <frybin@adacore.com>
689 * doc/gnat_ugn/gnat_utility_programs.rst: Document new switch
690 --copy-environment for gnattest.
692 2018-05-24 Piotr Trojanek <trojanek@adacore.com>
694 * sem_elab.adb (Non_Private_View): Simplify by removing a local Result
696 * sem_prag.adb (Get_Base_Subprogram): Same as above.
698 2018-05-24 Eric Botcazou <ebotcazou@adacore.com>
700 * fe.h (Set_Normalized_First_Bit): Declare.
701 (Set_Normalized_Position): Likewise.
702 * repinfo.adb (List_Record_Layout): Do not use irregular output for a
703 variable position. Fix minor spacing issue.
704 * gcc-interface/decl.c (annotate_rep): If a field has a variable
705 offset, compute the normalized position and annotate it in addition to
708 2018-05-24 Eric Botcazou <ebotcazou@adacore.com>
710 * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu):
711 Constify and rename variables. Fix formatting.
712 (gnat_to_gnu) <N_Exception_Handler>: Minor tweak.
713 <N_Raise_Statement>: Likewise.
715 2018-05-24 Javier Miranda <miranda@adacore.com>
717 * exp_ch8.adb (Build_Body_For_Renaming): Adding support to build the
718 body of a variant record equality renaming.
719 (Expand_N_Subprogram_Renaming_Declaration): Adapt the code to the new
720 implementation of Build_Body_For_Renaming.
721 * exp_ch3.ads (Build_Variant_Record_Equality): New library level
722 function that factorizes the functionality needed by
723 Build_Body_For_Renaming and Expand_Freeze_Record_Type to build the body
724 of a variant record equality subprogram.
725 * exp_ch3.adb (Build_Variant_Record_Equality): New subprogram.
726 (Build_Variant_Record_Equality): New local procedure of
727 Expand_Freeze_Record_Type containing all the code specific for freezing
728 the record type that cannot be place in the new library level function.
730 2018-05-24 Ed Schonberg <schonberg@adacore.com>
732 * einfo.ads, einfo.adb (Is_Activation_Record): New flag on
733 in_parameters, used when unesting subprograms for LLVM, to indicate
734 that a generated parameter carries the activation record from the
735 enclosing subprogram.
736 * exp_unst.adb (Check_Static_Type): Handle array attributes of types
737 whose bounds may contain up-level references that need to be added to
738 an activation recoord.
739 (Add_Extra_Formal): Set Is_Activation_Record on new formal.
741 2018-05-24 Yannick Moy <moy@adacore.com>
743 * pprint.adb (Expression_Image): Improve the printing of expressions,
744 by taking more cases into account, in particular qualified expressions
745 and aggregates. Also count more the number of parentheses to close
746 after the expression.
748 2018-05-24 Javier Miranda <miranda@adacore.com>
750 * sem_ch3.adb (Is_Visible_Component): For untagged types add missing
751 check for renamed discriminants.
752 * sem_ch4.adb (Analyze_Overloaded_Selected_Component,
753 Analyze_Selected_Component, Check_Misspelled_Selector): For calls to
754 Is_Visible_Component pass the associated selector node to allow
755 checking renamed discriminants on untagged types.
757 2018-05-24 Ed Schonberg <schonberg@adacore.com>
759 * sem_ch8.adb (Analyze_Use_Type): Do not assign the Prev_Use_Clause
760 link to a use_type clause if this would cause an infinite loop in the
761 machinery that detects redundant use clauses. This may happen when the
762 redundant clauses appear in the context of a child unit and the context
765 2018-05-24 Piotr Trojanek <trojanek@adacore.com>
767 * sinfo.ads: Fix grammar in comment.
769 2018-05-24 Justin Squirek <squirek@adacore.com>
771 * einfo.ads, einfo.adb (Append_Entity): Modified to use Link_Entities
772 and manage doubly-linked entity chain.
773 (Nested_Scenarios): Removed entity field used for optimization during
774 elaboration to make room for the new field Prev_Entity.
775 (Link_Entities): Added to replace redundant calls to Set_Next_Entity
776 and Set_Prev_Entity as well as centralize changes to the entity chain.
777 (Predicated_Parent): Modified to use Node38.
778 (Prev_Entity): Added to fetch new node field Prev_Entity in all entity
780 (Remove_Entity): Moved from sem_util.
781 (Set_Nested_Scenarios): Deleted.
782 (Set_Predicated_Parent): Modified to use Node38.
783 (Set_Prev_Entity): Added to set Prev_Entity field.
784 (Set_Validated_Object): Modified to use Node38.
785 (Unlink_Next_Entity): Added to process Prev_Entity when an unlinking
787 (Validated_Object): Modified to use Node38.
788 (Write_Field36_Name): Remove Nested_Scenarios, Validated_Object, and
789 predicated parent cases.
790 (Write_Field38_Name): Add predicated parent and Validated_Object cases.
791 * sem_ch3.adb (Process_Subtype): Add guard to protect against
792 inappropriate marking of Predicated_Parent to non-itype subtypes.
793 (Make_Class_Wide_Type): Preserve Prev_Entity field and set in new type.
794 (Copy_And_Swap): Add setting of Prev_Entity.
795 (Build_derived_Record_Type): Replace Set_Next_Entity w/ Link_Entities.
796 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Replace Set_Next_Entity
798 (New_Overloaded_Entity): Remove block created to search for previous
799 entities in the entity chain with relevant calls to Prev_Entity as well
800 as replace duplicated code from Remove_Entity_And_Homonym with a call
802 * sem_ch7.adb (Exchange_Declarations): Replace Set_Next_Entity w/
804 * sem_elab.adb (Find_And_Process_Nested_Scenarios): Remove global and
805 initial subprogram declarations related to Nested_Scenarios.
806 (Process_Nested_Scenarios): Deleted.
807 (Save_Scenario): Deleted.
808 (Traverse_Body): Remove optimization for Nested_Scenarios so as to free
809 node space in the entity tree.
810 * sem_util.adb, sem_util.ads (Remove_Entity): Moved to einfo.
811 (Remove_Entity_And_Homonym): Added to separate functionality of
812 Remove_Entity from the homonym chain directly.
813 * exp_attr.adb (Expand_N_Attribute_Reference): Replace Set_Next_Entity
814 w/ Link_Entities and Unlink_Next_Entity.
815 * exp_ch3.adb (Expand_N_Object_Declaration): Replace Set_Next_Entity w/
817 * exp_ch6.adb (Replace_Renaming_Declaration_Id): Replace
818 Set_Next_Entity w/ Link_Entities.
819 * exp_disp.adb (Expand_Dispatching_Call): Replace Set_Next_Entity w/
820 Link_Entities and Unlink_Next_Entity.
821 * exp_spark.adb (Expand_SPARK_N_Object_Renaming_Declaration): Replace
822 call to Remove_Entity with its new incarnation.
823 * exp_util.adb (New_Class_Wide_Subtype): Add setting of Prev_Entity.
824 * freeze.adb (Freeze_Record_Type): Replace Set_Next_Entity w/
827 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
829 * sem_ch10.adb (Expand_Limited_With_Clause): Update the call to
830 Install_Limited_Withed_Unit.
831 (Expand_With_Clause): Update the call to Install_Withed_Unit.
832 (Implicit_With_On_Parent): Update the call to Install_Withed_Unit.
833 (Install_Context_Clauses): Update the call to Install_Withed_Unit.
834 (Install_Limited_Context_Clauses): Update the calls to
835 Install_Limited_Withed_Unit.
836 (Install_Limited_Withed_Unit): Renamed to better illustrate its
838 (Install_Private_With_Clauses): Update the calls to Install_Withed_Unit
839 and Install_Limited_Withed_Unit.
840 (Install_With_Clause): Uninstall a limited with clause if a [private]
841 with clause is given for the same package.
842 (Install_Withed_Unit): Renamed to better illustrate its purpose.
843 (Remove_Limited_With_Unit): New routine.
845 2018-05-24 Eric Botcazou <ebotcazou@adacore.com>
847 * raise-gcc.c (__gnat_SEH_error_handler): Remove prototype.
848 (__gnat_personality_seh0): Adjust and beef up comments, and
849 fix formatting throughout.
850 (__gnat_adjust_context): Deal minimally with version 2.
851 * seh_init.c (__gnat_map_SEH): Fix formatting.
852 (_gnat_SEH_error_handler): Adjust comments.
853 (__gnat_install_SEH_handler): Fix formatting.
855 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
857 * exp_ch7.adb, sem_ch3.adb, sem_res.adb: Minor reformatting.
859 2018-05-24 Ed Schonberg <schonberg@adacore.com>
861 * exp_aggr.adb (Flatten): Add a warning on an others clause in an array
862 aggregate with static bounds when named associations cover all index
863 positions and the others clause is redundant.
865 2018-05-24 Raphael Amiard <amiard@adacore.com>
867 * libgnat/a-cohama.ads: Add documentation.
869 2018-05-24 Raphael Amiard <amiard@adacore.com>
871 * libgnat/a-convec.ads: Add documentation.
873 2018-05-24 Justin Squirek <squirek@adacore.com>
875 * exp_ch3.adb (Expand_N_Object_Declaration): Ignore raising an error in
876 expansion for limited tagged types when the node to be expanded is a
877 raise expression due to it not representing a valid object.
878 * exp_ch5.adb (Expand_N_Assignment_Statement): Add exception to error
879 message regarding assignments to limited types to ignore genereated
882 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
884 * exp_util.adb (New_Class_Wide_Subtype): Capture and restore relevant
885 Ghost-related attributes of the class-wide subtype because the copy
888 2018-05-24 Justin Squirek <squirek@adacore.com>
890 * sem_res.adb (Resolve_Entity_Name): Add guard to protect against
891 marking use clauses as effective when the reference appears within
894 2018-05-24 Cyrille Comar <comar@adacore.com>
896 * doc/gnat_rm/the_gnat_library.rst: Fix typos.
897 * gnat_rm.texi: Regenerate.
899 2018-05-24 Bob Duff <duff@adacore.com>
901 * exp_ch7.adb (Expand_Cleanup_Actions): Create a mark unconditionally
902 for build-in-place functions with a caller-unknown-size result.
903 (Create_Finalizer): For build-in-place functions with a
904 caller-unknown-size result, check at run time whether we need to
905 release the secondary stack.
907 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
909 * sem_prag.adb (Analyze_Pragma): Use the full view of an internally
910 generated incomplete type.
912 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
914 * expander.adb (Expand): Update the save and restore of the Ghost
916 * exp_ch3.adb (Freeze_Type): Likewise.
917 * exp_disp.adb (Make_DT): Likewise.
918 * exp_util.adb (Build_DIC_Procedure_Body): Likewise.
919 (Build_DIC_Procedure_Declaration): Likewise.
920 (Build_Invariant_Procedure_Body): Likewise.
921 (Build_Invariant_Procedure_Declaration): Likewise.
922 (Make_Predicate_Call): Likewise.
923 * freeze.adb (Add_To_Result): Insert the freeze action of a living
924 entity prior to the start of the enclosing ignored Ghost region.
925 (Freeze_Entity): Update the save and restore of the Ghost region.
926 * ghost.adb (Install_Ghost_Mode): Reimplemented.
927 (Install_Ghost_Region): New routine.
928 (Mark_And_Set_Ghost_Assignment): Install a region rather than a mode.
929 (Mark_And_Set_Ghost_Body): Likewise.
930 (Mark_And_Set_Ghost_Completion): Likewise.
931 (Mark_And_Set_Ghost_Declaration): Likewise.
932 (Mark_And_Set_Ghost_Instantiation): Likewise.
933 (Mark_And_Set_Ghost_Procedure_Call): Likewise.
934 (Name_To_Ghost_Mode): New routine.
935 (Restore_Ghost_Region): New routine.
936 * ghost.ads (Install_Ghost_Region): New routine.
937 (Restore_Ghost_Region): New routine.
938 * opt.ads: Add new global variable Ignored_Ghost_Region.
939 * rtsfind.adb (Load_RTU): Update the save and restore of the Ghost
940 region. Install a clean region.
941 * sem.adb (Analyze): Likewise.
942 (Do_Analyze): Likewise.
943 * sem_ch3.adb (Analyze_Object_Declaration): Likewise
944 (Derive_Progenitor_Subprograms): Use local variable Iface_Alias to
945 capture the ultimate alias of the current primitive.
946 (Process_Full_View): Update the save and restore of the Ghost region.
947 Do not inherit DIC and invariant procedures.
948 * sem_ch5.adb (Analyze_Assignment): Update the save and restore of the
950 * sem_ch6.adb (Analyze_Procedure_Call): Likewise.
951 (Analyze_Subprogram_Body_Helper): Likewise.
952 * sem_ch7.adb (Analyze_Package_Body_Helper): Likewise.
953 * sem_ch12.adb (Analyze_Package_Instantiation): Likewise.
954 (Analyze_Subprogram_Instantiation): Likewise.
955 (Instantiate_Package_Body): Likewise.
956 (Instantiate_Subprogram_Body): Likewise.
957 * sem_ch13.adb (Build_Predicate_Functions): Likewise.
958 (Build_Predicate_Function_Declaration): Likewise.
960 (Add_Dispatching_Operation): Do not consider DIC and invariant
962 (Check_Dispatching_Operation): Use Add_Dispatching_Operation to collect
963 a dispatching subprogram.
964 (Check_Operation_From_Private_View): Likewise.
965 (Override_Dispatching_Operation): Likewise.
966 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Update the save
967 and restore of the Ghost region.
968 (Analyze_Initial_Condition_In_Decl_Part): Likewise.
969 (Analyze_Pragma): Update the save and restore of the Ghost region.
970 (Analyze_Pre_Post_Condition_In_Decl_Part): Likewise.
971 * sem_util.adb (Is_Suitable_Primitive): New routine.
972 * sem_util.ads (Is_Suitable_Primitive): New routine.
973 * sinfo.ads: Update the section of Ghost regions.
975 2018-05-24 Piotr Trojanek <trojanek@adacore.com>
977 * doc/gnat_rm/implementation_defined_pragmas.rst (Contract_Cases):
978 Change "condition" to "case guard" after renaming in the contract
980 * gnat_rm.texi: Regenerate.
982 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
984 * exp_util.adb (Expand_Static_Predicates_In_Choices): Indicate that the
985 construct with discrete choices no longer contains a subtype with
986 predicates since the expansion already handled this case.
988 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
990 * freeze.adb (Wrap_Imported_Subprogram): Generate an unchecked
991 conversion to the return type to avoid a side effect where an imported
992 relocated function generates a new anonymous access type, whose
993 accessibility level does not agree with with that of the wrapper.
995 2018-05-24 Javier Miranda <miranda@adacore.com>
997 * sem_util.adb (Abstract_Interface_List): Add missing support for
998 private types whose full view is a synchronized type.
999 * sem_ch3.adb (Build_Derived_Private_Type): Skip building the full
1000 derivation of a private type parent type is a task type with
1001 discriminants as gigi does not use such type directly.
1003 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
1005 * sem_elab.adb (Build_Variable_Reference_Marker): Do not create a
1006 variable marker when the reference appears in the formal part of a
1007 compilation unit instance because there is no place to insert it.
1008 (In_Compilation_Instance_Formal_Part): New routine.
1010 2018-05-24 Piotr Trojanek <trojanek@adacore.com>
1012 * layout.ads, repinfo.ads: Fix references to renamed Backend_Layout
1013 configuration parameter.
1015 2018-05-24 Doug Rupp <rupp@adacore.com>
1017 * argv-lynxos178-raven-cert.c: New file.
1018 * libgnat/system-lynxos178-x86.ads: New file.
1020 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
1022 * exp_disp.adb, freeze.adb, gnat1drv.adb, sem_ch5.adb, sem_spark.adb:
1023 Minor reformattings.
1025 2018-05-23 Pascal Obry <obry@adacore.com>
1027 * adaint.c (win32_wait): Properly free the handle/pid lists when
1028 WaitForMultipleObjects fails (return WAIT_FAILED).
1030 2018-05-23 Pascal Obry <obry@adacore.com>
1032 * adaint.c (win32_wait): Add missing parentheses.
1034 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
1036 * exp_ch3.adb (Check_Large_Modular_Array): Moved to Freeze.
1037 (Expand_N_Object_Declaration): Do not check for a large modular array
1039 * freeze.adb (Check_Large_Modular_Array): Moved from Exp_Ch3.
1040 (Freeze_Object_Declaration): Code cleanup. Check for a large modular
1042 * sem_ch3.adb: Minor reformatting.
1044 2018-05-23 Ed Schonberg <schonberg@adacore.com>
1046 * einfo.ads: New attribute on types: Predicated_Parent, to simplify the
1047 retrieval of the applicable predicate function to an itype created for
1048 a constrained array component.
1049 * einfo.adb: Subprograms for Predicated_Parent.
1050 (Predicate_Function): Use new attribute.
1051 * exp_util.adb (Make_Predicate_Call): If the predicate function is not
1052 available for a subtype, retrieve it from the base type, which may have
1053 been frozen after the subtype declaration and not captured by the
1054 subtype declaration.
1055 * sem_aggr.adb (Resolve_Array_Aggregate): An Others association is
1056 legal within a generated initiqlization procedure, as may happen with a
1057 predicate check on a component, when the predicate function applies to
1058 the base type of the component.
1059 * sem_ch3.adb (Analyze_Subtype_Declaration): Clean up inheritance of
1060 predicates for subtype declarations and for subtype indications in
1062 (Process_Subtype): Likewise. Handle properly the case of a private type
1063 with unknown discriminants whose full view is an unconstrained array.
1064 Use Predicated_Parent to indicate source of predicate function on an
1065 itype whose parent is itself an itype.
1066 (Complete_Private_Subtype): If the private view has unknown
1067 discriminants and the full view is an unconstrained array, set base
1068 type of completion to the full view of parent.
1069 (Inherit_Predicate_Flags): Prevent double assignment of predicate
1071 (Build_Subtype): For a constrained array component, propagate predicate
1072 information from original component type declaration.
1074 2018-05-23 Boris Yakobowski <yakobowski@adacore.com>
1076 * libgnat/a-ngelfu.ads (Arctanh, Arccoth): Fix faulty preconditions.
1078 2018-05-23 Arnaud Charlet <charlet@adacore.com>
1080 * checks.adb (Minimize_Eliminate_Overflows): Default initialize Lo and
1082 * sem_elab.adb: Make "out" parameters instead of "in out" when
1085 2018-05-23 Bob Duff <duff@adacore.com>
1087 * gnatbind.adb (List_Applicable_Restrictions): Add
1088 No_Implementation_Restrictions to the list of restrictions not to list.
1089 Remove double negative "not No_Restriction_List". Comment the
1090 commentary that is output, so it won't cause errors if used directly in
1093 2018-05-23 Ed Schonberg <schonberg@adacore.com>
1095 * sem_prag.adb (Inherit_Class_Wide_Pre): Refine legality check on
1096 class-wide precondition on a type extension when ancestor does not have
1097 a class-wide precondition. Previously the compiler accepted such a
1098 precondition when the ancestor had a class-wide postcondition.
1100 2018-05-23 Javier Miranda <miranda@adacore.com>
1102 * sem_attr.adb (Valid_Scalars): Do not invoke Error_Attr_P to report
1103 the warning on occurrences of this attribute whose evaluation is always
1104 true (since that subprogram aborts processing the attribute). In
1105 addition, replace the node by its boolean result 'True' (required
1106 because the backend has no knowledge of this attribute).
1108 2018-05-23 Bob Duff <duff@adacore.com>
1110 * libgnat/a-convec.adb: (Insert, Insert_Space): Suppress warnings. The
1111 code in question is not reachable in the case where Count_Type'Last is
1114 2018-05-23 Yannick Moy <moy@adacore.com>
1116 * doc/gnat_rm/implementation_defined_pragmas.rst: Clarify meaning of
1117 local pragma Warnings Off without On.
1118 * gnat_rm.texi: Regenerate.
1120 2018-05-23 Olivier Hainque <hainque@adacore.com>
1122 * libgnat/g-excact.ads (Is_Foreign_Exception): New predicate.
1123 * libgnat/g-excact.adb: Implement.
1125 2018-05-23 Ed Schonberg <schonberg@adacore.com>
1127 * sem_ch5.adb (Analyze_Iterator_Specification): If a subtype indication
1128 is present, verify its legality when the domain of iteration is a
1129 GNAT-specific formal container, as is already done for arrays and
1130 predefined containers.
1132 2018-05-23 Yannick Moy <moy@adacore.com>
1134 * sem_util.adb (Enclosing_Declaration): Fix the case of a named number
1135 declaration, which was not taken into account.
1137 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
1139 * debug.adb: Switch -gnatd_s is now used to stop elaboration checks on
1140 synchronized suspension.
1141 * rtsfind.ads: Add entries for units Ada.Synchronous_Barriers and
1142 Ada.Synchronous_Task_Control and routines Suspend_Until_True and
1144 * sem_elab.adb: Document switch -gnatd_s.
1145 (In_Task_Body): New routine.
1146 (Is_Potential_Scenario): Code cleanup. Stop the traversal of a task
1147 body when the current construct denotes a synchronous suspension call,
1148 and restriction No_Entry_Calls_In_Elaboration_Code or switch -gnatd_s
1150 (Is_Synchronous_Suspension_Call): New routine.
1151 * switch-c.adb (Scan_Front_End_Switches): Switch -gnatJ now sets switch
1154 2018-05-23 Javier Miranda <miranda@adacore.com>
1156 * exp_disp.adb (Make_DT): Restrict the initialization of
1157 External_Tag and Expanded_Name to an empty string to the case where
1158 both pragmas apply (i.e. No_Tagged_Streams and Discard_Names), since
1159 restricted runtimes are compiled with pragma Discard_Names.
1160 * doc/gnat_rm/implementation_defined_pragmas.rst,
1161 doc/gnat_rm/implementation_defined_characteristics.rst: Add
1163 * gnat_rm.texi: Regenerate.
1165 2018-05-23 Maroua Maalej <maalej@adacore.com>
1167 * sem_spark.adb: Fix of some permission rules of pointers in SPARK.
1169 2018-05-23 Ed Schonberg <schonberg@adacore.com>
1171 * sem_ch5.adb (Preanalyze_Range): The pre-analysis of the domain of
1172 iteration of an Ada2012 loop is performed to determine the type of the
1173 domain, but full analysis is performed once the loop is rewritten as a
1174 while-loop during expansion. The pre-analysis suppresses expansion; it
1175 must also suppress the generation of freeze nodes, which may otherwise
1176 appear in the wrong scope before rewritting.
1178 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
1180 * sem_elab.adb: Update the section on suppressing elaboration warnings.
1182 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
1184 * einfo.adb (Is_Elaboration_Checks_OK_Id): Use predicate
1185 Is_Elaboration_Target.
1186 (Is_Elaboration_Target): New routine.
1187 (Is_Elaboration_Warnings_OK_Id): Use predicate Is_Elaboration_Target.
1188 (Set_Is_Elaboration_Checks_OK_Id): Use predicate Is_Elaboration_Target.
1189 (Set_Is_Elaboration_Warnings_OK_Id): Use predicate
1190 Is_Elaboration_Target.
1191 * einfo.ads: Add new synthesized attribute Is_Elaboration_Target along
1192 with occurrences in nodes.
1193 (Is_Elaboration_Target): New routine.
1194 * sem_prag.adb (Analyze_Pragma): Suppress elaboration warnings when an
1195 elaboration target is subject to pragma Warnings (Off, ...).
1197 2018-05-23 Eric Botcazou <ebotcazou@adacore.com>
1199 * repinfo.adb (List_Type_Info): Remove obsolete stuff.
1201 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
1203 * einfo.adb: Flag304 is now Is_Elaboration_Warnings_OK_Id.
1204 (Is_Elaboration_Warnings_OK_Id): New routine.
1205 (Set_Is_Elaboration_Warnings_OK_Id): New routine.
1206 (Write_Entity_Flags): Output Flag304.
1207 * einfo.ads: Add new attribute Is_Elaboration_Warnings_OK_Id along with
1208 occurrences in entities.
1209 (Is_Elaboration_Warnings_OK_Id): New routine along with pragma Inline.
1210 (Set_Is_Elaboration_Warnings_OK_Id): New routine along with pragma
1212 * sem_attr.adb (Analyze_Access_Attribute): Capture the state of
1213 elaboration warnings.
1214 * sem_ch3.adb (Analyze_Object_Declaration): Capture the state of
1215 elaboration warnings.
1216 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Capture the
1217 state of elaboration warnings.
1218 (Analyze_Subprogram_Body_Helper): Capture the state of elaboration
1220 (Analyze_Subprogram_Declaration): Capture the state of elaboration
1222 * sem_ch9.adb (Analyze_Entry_Declaration): Capture the state of
1223 elaboration warnings.
1224 (Analyze_Single_Task_Declaration): Capture the state of elaboration
1226 (Analyze_Task_Type_Declaration): Capture the state of elaboration
1228 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Capture the state
1229 of elaboration warnings.
1230 (Analyze_Generic_Subprogram_Declaration): Capture the state of
1231 elaboration warnings.
1232 * sem_elab.adb: Add a section on suppressing elaboration warnings.
1233 Type Processing_Attributes includes component Suppress_Warnings
1234 intended to suppress any elaboration warnings along a path in the
1235 graph. Update Initial_State to include a value for this component.
1236 Types Target_Attributes and Task_Attriutes include component
1237 Elab_Warnings_OK to indicate whether the target or task has elaboration
1238 warnings enabled. component Elab_Warnings_OK.
1239 (Build_Access_Marker): Propagate attribute
1240 Is_Elaboration_Warnings_OK_Node from the attribute to the generated
1242 (Extract_Instantiation_Attributes): Set the value for Elab_Warnings_OK.
1243 (Extract_Target_Attributes): Set the value for Elab_Warnings_OK.
1244 (Extract_Task_Attributes): Set the value for Elab_Warnings_OK.
1245 (Process_Conditional_ABE_Access): Suppress futher elaboration warnings
1246 when already in this mode or when the attribute or target have warnings
1248 (Process_Conditional_ABE_Activation_Impl): Do not emit any diagnostics
1249 if warnings are suppressed.
1250 (Process_Conditional_ABE_Call): Suppress further elaboration warnings
1251 when already in this mode, or the target or call have warnings
1253 (Process_Conditional_ABE_Call_Ada): Do not emit any diagnostics if
1254 warnings are suppressed.
1255 (Process_Conditional_ABE_Call_SPARK): Do not emit any diagnostics if
1256 warnings are suppressed.
1257 (Process_Conditional_ABE_Instantiation): Suppress further elaboration
1258 warnings when already in this mode or when the instantiation has
1259 warnings suppressed.
1260 (Process_Conditional_ABE_Instantiation_Ada): Do not emit any
1261 diagnostics if warnings are suppressed.
1262 (Process_Conditional_ABE_Variable_Assignment_Ada): Use the more
1263 specific Is_Elaboration_Warnings_OK_Id rather than Warnings_Off.
1264 (Process_Conditional_ABE_Variable_Assignment_SPARK): Use the more
1265 specific Is_Elaboration_Warnings_OK_Id rather than Warnings_Off.
1266 (Process_Task_Object): Suppress further elaboration warnings when
1267 already in this mode, or when the object, activation call, or task type
1268 have warnings suppressed. Update the processing state to indicate that
1269 the path goes through a task body.
1270 * sinfo.adb (Is_Elaboration_Warnings_OK_Node): Accept attribute
1272 (Set_Is_Elaboration_Warnings_OK_Node): Accept attribute references.
1273 * sinfo.ads: Attribute Is_Elaboration_Warnings_OK_Node now applies to
1274 attribute references.
1276 2018-05-23 Piotr Trojanek <trojanek@adacore.com>
1278 * einfo.ads: Minor reformatting.
1280 2018-05-23 Ed Schonberg <schonberg@adacore.com>
1282 * sem_ch3.adb (Analyze_Object_Declaration): If expression is an
1283 anonymous_access_to_ subprogram formal, apply a conversion to force an
1284 accsssibility check that will fail statically, enforcing 3.10.2 (13).
1286 2018-05-23 Daniel Mercier <mercier@adacore.com>
1288 * gnat1drv.adb: Turn off length expansion in CodePeer mode.
1290 2018-05-23 Bob Duff <duff@adacore.com>
1292 * freeze.adb: (Check_Address_Clause): Deal with build-in-place
1293 aggregates in addition to build-in-place calls.
1295 2018-05-23 Bob Duff <duff@adacore.com>
1297 * einfo.ads: Minor reformatting.
1298 * sem_ch3.adb: Likewise.
1299 * sinfo.ads: Likewise.
1301 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
1303 * exp_ch3.adb (Default_Initialize_Object): Do not optimize scalar array
1304 initialization when the component type has predicates.
1305 * exp_ch4.adb (Expand_N_Allocator): Do not optimize scalar array
1306 allocation when the component type has predicates.
1308 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
1310 * einfo.adb, exp_disp.adb, sem_ch3.adb, sem_ch6.adb, sem_prag.adb:
1313 2018-05-22 Justin Squirek <squirek@adacore.com>
1315 * sem_ch6.adb (Analyze_Expression_Function): Propagate flags from the
1316 original function spec into the generated function spec due to
1317 expansion of expression functions during analysis.
1318 (Analyze_Subprogram_Body_Helper): Modify check on formal parameter
1319 references from the body to the subprogram spec in the case of
1320 expression functions because of inconsistances related to having a
1322 * libgnarl/s-osinte__android.ads: Flag parameters as unused.
1323 * libgnarl/s-osinte__lynxos178e.ads: Likewise.
1324 * libgnarl/s-osinte__qnx.adb: Likewise.
1325 * libgnarl/s-osinte__qnx.ads: Likewise.
1327 2018-05-22 Doug Rupp <rupp@adacore.com>
1329 * init.c (HAVE_ADJUST_CONTEXT_FOR_RAISE): Don't define on VxWorks7 for
1332 2018-05-22 Olivier Hainque <hainque@adacore.com>
1334 * libgnat/a-except.adb (Exception_Propagation.Propagate_Exception):
1335 Expect an Exception_Occurence object, not an Access.
1336 (Complete_And_Propagate_Occurrence): Adjust accordingly.
1337 (Raise_From_Signal_Handler): Likewise.
1338 (Reraise_Occurrence_No_Defer): If we have a Machine_Occurrence
1339 available in the provided occurrence object, just re-propagate the
1340 latter as a bare "raise;" would do.
1341 * libgnat/a-exexpr.adb (Propagate_Exception): Adjust to spec change.
1342 * libgnat/a-exstat.adb (String_To_EO): Initialize X.Machine_Occurrence
1343 to null, to mark that the occurrence we're crafting from the stream
1344 contents is not being propagated (yet).
1346 2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1348 * exp_aggr.adb (Initialize_Ctrl_Record_Component): Insert the generated
1349 code for a transient component in line with the rest of the
1350 initialization code, rather than before the aggregate. This ensures
1351 that the component has proper visibility of the discriminants.
1353 2018-05-22 Jerome Lambourg <lambourg@adacore.com>
1355 * adaint.c: Reorganize QNX-specific macros, use syspage to retreive the
1358 2018-05-22 Jerome Lambourg <lambourg@adacore.com>
1360 * sigtramp-qnx.c: Properly restore link register in signal trampoline.
1362 2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1364 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Strip away any
1365 conversions before extracting the value of the expression.
1366 * exp_ch3.adb (Default_Initialize_Object): Optimize the default
1367 initialization of an array of scalars.
1368 (Get_Simple_Init_Val): Add processing for array types. Remove the
1369 processing of strings because this case is already handled by the array
1371 (Needs_Simple_Initialization): Moved to Sem_Util.
1372 (Simple_Init_Array_Type): New routine.
1373 (Simple_Init_Initialize_Scalars_Type): Reimplemented to use the new
1374 facilities from Sem_Util.
1375 (Simple_Initialization_OK): New routine.
1376 * exp_ch3.ads (Needs_Simple_Initialization): Moved to Sem_Util.
1377 * exp_ch4.adb (Expand_N_Allocator): Optimize the default allocation of
1378 an array of scalars.
1379 * sem_prag.adb (Analyze_Float_Value): New routine.
1380 (Analyze_Integer_Value): New routine.
1381 (Analyze_Pragma): Reimplement the analysis of pragma Initialize_Scalars
1382 to handled the extended form of the pragma.
1383 (Analyze_Type_Value_Pair): New routine.
1384 * sem_util.adb: Add invalid value-related data structures.
1385 (Examine_Array_Bounds): New routine.
1386 (Has_Static_Array_Bounds): Reimplemented.
1387 (Has_Static_Non_Empty_Array_Bounds): New routine.
1388 (Invalid_Scalar_Value): New routine.
1389 (Needs_Simple_Initialization): Moved from Exp_Ch3.
1390 (Set_Invalid_Scalar_Value): New routines.
1391 * sem_util.ads (Has_Static_Non_Empty_Array_Bounds): New routine.
1392 (Invalid_Scalar_Value): New routine.
1393 (Needs_Simple_Initialization): Moved from Exp_Ch3.
1394 (Set_Invalid_Scalar_Value): New routines.
1395 * snames.ads-tmpl: Add names for the salar type families used by pragma
1398 2018-05-22 Javier Miranda <miranda@adacore.com>
1400 * exp_disp.adb (Make_DT): Initialize the External_Tag with an empty
1401 string when pragma No_Tagged_Streams is applicable to the tagged type,
1402 and initialize the Expanded_Name with an empty string when pragma
1403 Discard_Names is applicable to the tagged type.
1405 2018-05-22 Ed Schonberg <schonberg@adacore.com>
1407 * sem_ch6.adb (Check_Conformance): Add RM reference for rule that a
1408 formal subprogram is never subtype conformqnt, and thus cannot be the
1409 prefix of 'Access. Reject as well the attribute when applied to a
1410 renaming of a formal subprogram.
1412 2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1414 * exp_ch3.adb (Build_Array_Init_Proc): Update the call to
1415 Needs_Simple_Initialization.
1416 (Build_Init_Statements): Update the call to Get_Simple_Init_Val.
1417 (Check_Subtype_Bounds): Renamed to Extract_Subtype_Bounds. Update the
1418 profile and comment on usage.
1419 (Default_Initialize_Object): Do not use New_Copy_Tree to set the proper
1420 Sloc of a value obtained from aspect Default_Value because this could
1421 potentially replicate large trees. The proper Sloc is now set in
1422 Get_Simple_Init_Val.
1423 (Get_Simple_Init_Val): Reorganized by breaking the various cases into
1424 separate routines. Eliminate the use of global variables.
1425 (Init_Component): Update the call to Get_Simple_Init_Val.
1426 (Needs_Simple_Initialization): Update the parameter profile and all
1428 (Simple_Init_Defaulted_Type): Copy the value of aspect Default_Value
1429 and set the proper Sloc.
1430 * exp_ch3.ads (Get_Simple_Init_Val): Update the parameter profile and
1432 (Needs_Simple_Initialization): Update the parameter profile.
1434 2018-05-22 Patrick Bernardi <bernardi@adacore.com>
1436 * sem_ch3.adb (Build_Discriminant_Constraints): Raise an error if the
1437 user tries to use a subtype indication as a discriminant constraint.
1439 2018-05-22 Ed Schonberg <schonberg@adacore.com>
1441 * exp_ch4.ads, exp_ch4.adb, exp_util.adb, expander.adb: Remove mention
1442 of N_Reduction_Expression and N_Reduction_Expression_Parameter.
1443 * par-ch4.adb: Remove parsing routines for reduction expressions.
1444 * sem.adb, sinfo.ads, sinfo.adb, sem_ch4.ads, sem_ch4.adb, sem_res.adb,
1445 sem_spark.adb, sprint.adb: Remove analysis routines for reduction
1448 2018-05-22 Arnaud Charlet <charlet@adacore.com>
1450 * sem_ch8.adb (Check_Frozen_Renaming): Do not emit error in
1451 Relaxed_RM_Semantics mode.
1453 2018-05-22 Arnaud Charlet <charlet@adacore.com>
1455 * comperr.adb (Delete_SCIL_Files): Take into account
1456 N_Generic_Package_Renaming_Declaration.
1458 2018-05-22 Ed Schonberg <schonberg@adacore.com>
1460 * sem_ch3.adb (Search_Derivation_Levels): Whenever a parent type is
1461 private, use the full view if available, because it may include renamed
1462 discriminants whose values are stored in the corresponding
1465 2018-05-22 Ed Schonberg <schonberg@adacore.com>
1467 * einfo.ads, einfo.adb: New attribute Hidden_In_Formal_Instance,
1468 defined on packages that are actuals for formal packages, in order to
1469 set/reset the visibility of the formals of a formal package with given
1470 actuals, when there are subsequent uses of those formals in the
1471 enclosing generic, as required by RN 12.7 (10).
1472 * atree.ads, atree.adb: Add operations for Elist30.
1473 * atree.h: Add Elist30.
1474 * sem_ch12.adb (Analyze_Formal_Package_Instantiation): Collect formals
1475 that are not defaulted and are thus not visible within the current
1477 (Check_Formal_Packages): Reset visibility of formals of a formal
1478 package that are not defaulted, on exit from current instance.
1480 2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1482 * sem_prag.adb (Analyze_Input_Output): Emit an error when a non-null,
1483 non-'Result output appears in the output list of a function.
1485 2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1487 * exp_attr.adb (Build_Array_VS_Func): Reimplemented.
1488 (Build_Record_VS_Func): Reimplemented.
1489 (Expand_N_Attribute): Reimplement the handling of attribute
1491 * sem_attr.adb (Analyze_Attribute): Reimplement the handling of
1492 attribute 'Valid_Scalars.
1493 * sem_util.adb (Scalar_Part_Present): Reimplemented.
1494 (Validated_View): New routine.
1495 * sem_util.ads (Scalar_Part_Present): Update the parameter profile and
1497 (Validated_View): New routine.
1498 * doc/gnat_rm/implementation_defined_attributes.rst: Update the
1499 documentation of attribute 'Valid_Scalars.
1500 * gnat_rm.texi: Regenerate.
1502 2018-05-22 Bob Duff <duff@adacore.com>
1504 * binde.adb: (Choose): Ignore a pragma Elaborate_Body that appears in
1505 the spec of a SAL_Interface package.
1507 2018-05-22 Ed Schonberg <schonberg@adacore.com>
1509 * freeze.adb (Freeze_Entity): When analyzing delayed aspects of an
1510 entity E within a generic unit, indicate that there are no remaining
1511 delayed aspects after invoking Analyze_Aspects_At_Freeze_Point. The
1512 entity E is not frozen yet but the aspects should not be reanalyzed at
1513 the freeze point, which may be outside of the generic and may not have
1514 the proper visibility.
1516 2018-05-22 Bob Duff <duff@adacore.com>
1518 * doc/gnat_ugn/gnat_utility_programs.rst: Add documentation for
1519 the new --split-line-before-record, --indent-named-statements and
1520 --no-align-modes gnatpp switches.
1522 2018-05-22 Ed Schonberg <schonberg@adacore.com>
1524 * sem_prag.adb (Process_Compile_Time_Warning_Or_Error): Handle properly
1525 a second argument that is a constant of a given string value.
1527 2018-05-22 Doug Rupp <rupp@adacore.com>
1529 * sigtramp-vxworks-target.inc: Align stack to 128bits on AArch64.
1531 2018-05-22 Jerome Lambourg <lambourg@adacore.com>
1533 * sigtramp-qnx.c: Fix stack alignment issue in the signal trampoline.
1535 2018-05-22 Ed Schonberg <schonberg@adacore.com>
1537 * freeze.adb (Freeze_Fixed_Point_Type): If the first subtype has
1538 delayed aspects, analyze them now, os that the representation of the
1539 type (size, bounds) can be computed and validated.
1541 2018-05-22 Olivier Hainque <hainque@adacore.com>
1543 * libgnat/s-dwalin.adb (Enable_Cache): Skip symbols outside of the
1544 executable code section boundaries.
1546 2018-05-22 Javier Miranda <miranda@adacore.com>
1548 * locales.c: New implementation for the Ada.Locales package.
1549 * libgnat/a-locale.ads: Remove comment indicating that this is not
1551 * doc/gnat_rm/standard_library_routines.rst: Remove comment indicating
1552 that this is not implemented.
1553 * gnat_rm.texi: Regenerate.
1555 2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1557 * exp_ch5.adb, freeze.adb, pprint.adb, sem_ch4.adb, sem_res.adb: Minor
1560 2018-05-22 Justin Squirek <squirek@adacore.com>
1562 * sem_ch12.adb (In_Same_Declarative_Part): Moved to sem_util.
1563 (Freeze_Subprogram_Body, Install_Body): Modify calls to
1564 In_Same_Declarative_Part.
1565 * sem_prag.adb (Analyze_Pragma-Pragma_Pure_Function): Add check to
1566 verify pragma declaration is within the same declarative list with
1567 corresponding error message.
1568 * sem_util.adb, sem_util.ads (In_Same_Declarative_Part): Moved from
1569 sem_ch12.adb and generalized to be useful outside the scope of
1572 2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1574 * sem_ch6.adb (Analyze_Subprogram_Declaration): Set the proper
1575 categorization of the unit after processing the aspects in case one of
1576 its aspects is converted into a categorization pragma.
1578 2018-05-21 Ed Schonberg <schonberg@adacore.com>
1580 * freeze.adb (Warn_Overlay): Do not emit a wawrning on an object
1581 declaration with an explicit address clause and a type with default
1582 initialization, if the declaration carries an aspect
1583 Suppress_Initialization.
1585 2018-05-21 Daniel Mercier <mercier@adacore.com>
1587 * pprint.adb: Use mixed case for attribute names.
1589 2018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
1591 * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Rename the call to
1592 Analyze_Aspect_Specifications_On_Body_Or_Stub.
1593 (Analyze_Subprogram_Body_Helper): Rename the calls to
1594 Analyze_Aspect_Specifications_On_Body_Or_Stub.
1595 * sem_ch9.adb (Analyze_Entry_Body): Rename the call to
1596 Analyze_Aspect_Specifications_On_Body_Or_Stub.
1597 * sem_ch10.adb: Add with and use clause for Sem_Ch13.
1598 (Analyze_Package_Body_Stub): Add constant Id. Decorate the package stub
1599 prior to analyzing its aspects.
1600 (Analyze_Protected_Body_Stub): Add constant Id. Decorate the package
1601 stub prior to analyzing its aspects. Save and restore the configuration
1603 (Analyze_Task_Body_Stub): Add constant Id. Decorate the package stub
1604 prior to analyzing its aspects.
1605 * sem_ch13.adb (Analyze_Aspect_Specifications_On_Body_Or_Stub): Renamed
1606 to Analyze_Aspects_On_Subprogram_Body_Or_Stub.
1607 * sem_ch13.ads (Analyze_Aspect_Specifications_On_Body_Or_Stub): Renamed
1608 to Analyze_Aspects_On_Subprogram_Body_Or_Stub.
1609 * sem_prag.adb: Code reformatting.
1610 (Analyze_Refined_Depends_Global_Post): Consider task body stubs.
1612 2018-05-21 Jerome Lambourg <lambourg@adacore.com>
1614 * gcc-interface/Makefile.in: Add g-soliop__qnx.ads to the runtime build
1617 2018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
1619 * exp_cg.adb: Remove with and use clause for Exp_Disp.
1620 * exp_ch9.adb: Remove with and use clause for Exp_Disp.
1621 * exp_disp.adb (Is_Predefined_Dispatching_Operation): Moved to Sem_Util.
1622 (Is_Predefined_Interface_Primitive): Moved to Sem_Util.
1623 (Is_Predefined_Internal_Operation): Moved to Sem_Util.
1624 * exp_disp.ads (Is_Predefined_Dispatching_Operation): Moved to Sem_Util.
1625 (Is_Predefined_Interface_Primitive): Moved to Sem_Util.
1626 (Is_Predefined_Internal_Operation): Moved to Sem_Util.
1627 * exp_dist.adb: Remove with and use clause for Exp_Disp.
1628 * freeze.adb: Remove with and use clause for Exp_Disp.
1629 * sem_cat.adb: Remove with and use clause for Exp_Disp.
1630 * sem_ch6.adb: Remove with and use clause for Exp_Disp.
1631 * sem_ch12.adb: Remove with and use clause for Exp_Disp.
1632 * sem_elab.adb (Check_Overriding_Primitive): Do not process predefined
1634 * sem_util.adb: Remove with and use clause for Exp_Disp.
1635 (Is_Predefined_Dispatching_Operation): Moved from Exp_Disp.
1636 (Is_Predefined_Interface_Primitive): Moved from Exp_Disp.
1637 (Is_Predefined_Internal_Operation): Moved from Exp_Disp.
1638 * sem_util.ads (Is_Predefined_Dispatching_Operation): Moved from
1640 (Is_Predefined_Interface_Primitive): Moved from Exp_Disp.
1641 (Is_Predefined_Internal_Operation): Moved from Exp_Disp.
1643 2018-05-21 Ed Schonberg <schonberg@adacore.com>
1645 * sem_res.adb (Valid_Conversion): Improve error message on an illegal
1646 type conversion whose expression has a limited view of a type.
1648 2018-05-21 Ed Schonberg <schonberg@adacore.com>
1650 * exp_ch5.adb (Build_Formal_Container_Iteration): If source has
1651 explicit name for iterator loop, preserve that name in expanded
1652 construct, for possible use in exit statements.
1654 2018-05-21 Javier Miranda <miranda@adacore.com>
1656 * sem_ch4.adb (Analyze_Membership_Op): Avoid compiler crash when the
1657 spec of a unit has Ada 2012 membership tests with multiple choices and
1658 the unit body is not compiled under Ada 2012 mode.
1660 2018-05-21 Doug Rupp <rupp@adacore.com>
1662 * sigtramp-vxworks-target.inc: Set cfa_reg properly from sigcontext
1664 (CFI_COMMON_REGS): Restore LR jic probed from prologue.
1665 (REGNO_PC_OFFSET): Change to correct value for Aarch64.
1667 2018-05-21 Jose Ruiz <ruiz@adacore.com>
1669 * doc/gnat_ugn/gnat_utility_programs.rst, exp_attr.adb,
1670 libgnarl/s-tassta.adb: Minor typo fixes
1672 2018-05-21 Ed Schonberg <schonberg@adacore.com>
1674 * sem_ch4.adb (Analyze_One_Call): Recognize complex cases where an
1675 indexed call originally in prefix forn is itself the prefix of a
1678 2018-05-21 Piotr Trojanek <trojanek@adacore.com>
1680 * sem_eval.adb (Is_Null_Range): Clarify access to the full view of a
1682 (Not_Null_Range): Same as above.
1684 2018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
1686 * exp_ch3.adb: Minor reformatting.
1687 * exp_ch6.adb: Likewise.
1688 * freeze.adb: Likewise.
1689 * inline.adb: Likewise.
1690 * sem_util.adb: Likewise.
1692 2018-05-21 Yannick Moy <moy@adacore.com>
1694 * inline.adb (Expand_Inlined_Call.Process_Formals): Use a type
1695 conversion instead of an unchecked type conversion when inlining a
1696 return statement, unless type qualification is required (for character
1697 and string literal) or no check can result from the conversion (for
1699 * opt.ads: Update comment.
1701 2018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
1703 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Install the elaboration
1704 model of the compilation unit spec, if any.
1705 * sem_ch7.adb (Analyze_Package_Body_Helper): Install the elaboration
1706 model of the compilation unit spec, if any.
1707 * sem_ch10.adb (Analyze_Subunit): Install the elaboration model of the
1708 parent compilation unit spec, if any.
1709 * sem_elab.adb (Check_Elaboration_Scenarios): Restore the elaboration
1710 model of the main unit.
1711 (Is_Same_Unit): The routine now uses Unit_Entity.
1712 (Is_Subunit): Removed.
1713 (Normalize_Unit): Removed.
1714 (Unit_Entity): New routine.
1715 * sem_prag.adb (Analyze_Pragma): Reimplement the handling of pragma
1716 Elaboration_Checks. The analysis now ensures that the pragma appears at
1717 the configuration level, and on the initial declaration of a unit.
1718 Other placements are either flagged as illegal, or ignored.
1719 (Check_Duplicate_Elaboration_Checks_Pragma): New routine.
1720 (Ignore_Elaboration_Checks_Pragma): New routine.
1721 * sem_util.adb (Install_Elaboration_Model): New routine.
1722 * sem_util.ads (Install_Elaboration_Model): New routine.
1723 * doc/gnat_rm/implementation_defined_pragmas.rst: Update the
1724 documentation of pragma Elaboration_Checks.
1725 * gnat_rm.texi: Regenerate.
1727 2018-05-21 Olivier Hainque <hainque@adacore.com>
1729 * libgnat/s-trasym__dwarf.adb (Executable_Name): Return argv[0] instead
1730 of empty string when argv[0] couldn't be found on PATH.
1731 (Enable_Cache): Raise Program_Error instead of attempting a null
1732 pointer dereference when the Exec_Module initialization failed.
1734 2018-05-21 Piotr Trojanek <trojanek@adacore.com>
1736 * libgnarl/a-reatim.ads (Clock_Time): Remove External aspect.
1737 * libgnarl/a-taside.ads (Tasking_State): Likewise.
1738 * libgnat/a-calend.ads (Clock_Time): Likewise.
1740 2018-05-21 Yannick Moy <moy@adacore.com>
1742 * sem_ch6.adb (Analyze_Procedure_Call): Refine test to recognize prefix
1743 call notation in inlined call in GNATprove mode.
1745 2018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
1747 * einfo.adb (Is_External_State): An abstract state is also external
1748 when it is declared with option "synchronous".
1749 * einfo.ads: Update the documentation of synthesized attribute
1751 * sem_util.adb (Find_Simple_Properties): New routine.
1752 (Is_Enabled_External_Property): New routine.
1753 (State_Has_Enabled_Property): Reimplemented. The two flavors of option
1754 External have precedence over option Synchronous when determining
1755 whether a property is in effect.
1757 2018-05-21 Yannick Moy <moy@adacore.com>
1759 * sem_eval.adb (Static_Length): Take into account case of variable of
1760 subtype string literal.
1762 2018-05-21 Olivier Hainque <hainque@adacore.com>
1764 * libgnat/s-objrea.ads (Get_Memory_Bounds): Rename as Get_Xcode_Bounds.
1765 (Object_Section): Rename Flag_Alloc component as Flag_Xcode.
1766 * libgnat/s-objrea.adb (Get_Xcode_Bounds): Adjust to new subprogram and
1768 (Get_Section, ELF case): Set Flag_Xcode from SHF_EXECINSTR.
1769 * libgnat/s-dwalin.adb (Open): Adjust to the Get_Memory_Bounds name
1772 2018-05-21 Olivier Hainque <hainque@adacore.com>
1774 * libgnat/s-dwalin.ads (Dwarf_Context): Change type of Load_Address to
1775 Address, and type of Low, High to Storage_Offset.
1776 (Low): Rename as Low_Address and convey that the return value is a
1777 runtime reference accounting for a load address.
1778 * libgnat/s-dwalin.adb (Read_Aranges_Entry): Adjust to the
1779 address/offset type changes.
1780 (Aranges_Lookup): Likewise.
1781 (Symbolic_Address): Likewise.
1782 (Symbolic_Traceback): Likewise.
1783 (Dump_Cache): Likewise.
1784 (Is_Inside): Likewise.
1786 (Set_Load_Address): Likewise.
1787 (Low_Address): Likewise, and account for C.Load_Address.
1788 * libgnat/s-trasym__dwarf.adb (Lt): Use Low_Address instead of Low.
1789 (Multi_Module_Symbolic_Traceback): Compare address in traceback
1790 with module Low_Address instead of Low.
1792 2018-05-21 Olivier Hainque <hainque@adacore.com>
1794 * libgnat/s-dwalin.ads (Dwarf_Context): Rename Load_Slide as
1796 * libgnat/s-dwalin.adb (Is_Inside): Adjust accordingly.
1797 (Set_Load_Address): Likewise.
1798 (Symbolic_Traceback): Likewise.
1800 2018-05-21 Olivier Hainque <hainque@adacore.com>
1802 * libgnat/s-trasym__dwarf.adb (Add_Module_To_Cache): Expect a
1803 Load_Address argument and pass it down to Init_Module.
1804 * libgnat/s-tsmona__linux.adb (Build_Cache_For_All_Modules): Pass
1805 lm.l_addr as the Load_Address to Add_Module_To_Cache.
1807 2018-05-21 Piotr Trojanek <trojanek@adacore.com>
1809 * einfo.adb (Has_Discriminants): Stronger assertion.
1810 (Set_Has_Discriminants): Stronger assertion.
1811 * sem_ch13.adb (Push_Scope_And_Install_Discriminants): Adapt to respect
1812 the stronger assertion on Has_Discriminant.
1813 (Uninstall_Discriminants_And_Pop_Scope): Same as above.
1814 * sem_util.adb (New_Copy_Tree): Same as above.
1815 * sem_ch7.adb (Generate_Parent_References): Prevent calls to
1816 Has_Discriminant on non-type entities that might happen when the
1817 compiled code has errors.
1818 * sem_ch3.adb (Derived_Type_Declaration): Only call
1819 Set_Has_Discriminant on type entities.
1821 2018-05-21 Arnaud Charlet <charlet@adacore.com>
1823 * exp_unst.adb (Unnest_Subprogram): Unnest all subprograms relevant for
1826 2018-05-21 Piotr Trojanek <trojanek@adacore.com>
1828 * lib.ads: Fix typo in enumeration in comment.
1830 2018-05-21 Ed Schonberg <schonberg@adacore.com>
1832 * sem_attr.adb (Analyze_Attribute, case Scalar_Storage_Order): The
1833 attribute reference is legal within a generic unit when the prefix is a
1834 formal private type.
1836 2018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
1838 * exp_ch7.adb (Establish_Transient_Scope): Code cleanup. Do not
1839 delegate the secondary stack management when there is no suitable
1840 transient context, and the transient scope was intended to manage the
1841 secondary stack because this causes premature reclamation. Change the
1842 transient scope creation logic by special casing assignment statements
1843 of controlled components for type initialization procedures.
1844 (Find_Node_To_Be_Wrapped): Renamed to Find_Transient_Context. Update
1845 the comment on usage.
1846 (Find_Transient_Context): Change the initinte loop into a while loop.
1847 Iterations schemes and iterator specifications are not valid transient
1848 contexts because they rely on special processing. Assignment statements
1849 are now treated as a normal transient context, special cases are
1850 handled by the caller. Add special processing for pragma Check.
1851 (Is_OK_Construct): Removed. Its functionality has been merged in
1852 routine Find_Transient_Context.
1853 * sem_ch5.adb (Check_Call): Reimplemented. Add code to properly
1854 retrieve the subprogram being invoked. Use a more accurate predicate
1855 (Requires_Transient_Scope) to determine that the function will emply
1856 the secondary stack.
1858 2018-05-21 Piotr Trojanek <trojanek@adacore.com>
1860 * ada_get_targ.adb: Fix subprogram body headers.
1861 * adabkend.adb: Likewise.
1862 * checks.adb: Likewise.
1863 * exp_ch3.adb: Likewise.
1864 * exp_ch5.adb: Likewise.
1865 * exp_ch9.adb: Likewise.
1866 * exp_dist.adb: Likewise.
1867 * exp_tss.adb: Likewise.
1868 * inline.adb: Likewise.
1869 * lib-writ.adb: Likewise.
1870 * lib-xref-spark_specific.adb: Likewise.
1871 * libgnarl/s-osinte__darwin.adb: Likewise.
1872 * libgnarl/s-stusta.adb: Likewise.
1873 * libgnarl/s-taprop__solaris.adb: Likewise.
1874 * libgnarl/s-tposen.adb: Likewise.
1875 * libgnarl/s-vxwext__kernel-smp.adb: Likewise.
1876 * libgnarl/s-vxwext__kernel.adb: Likewise.
1877 * libgnat/a-btgbso.adb: Likewise.
1878 * libgnat/a-cfdlli.adb: Likewise.
1879 * libgnat/a-cfhama.adb: Likewise.
1880 * libgnat/a-cfinve.adb: Likewise.
1881 * libgnat/a-cimutr.adb: Likewise.
1882 * libgnat/a-coboho.adb: Likewise.
1883 * libgnat/a-cofove.adb: Likewise.
1884 * libgnat/a-cofuve.adb: Likewise.
1885 * libgnat/a-comutr.adb: Likewise.
1886 * libgnat/a-exexda.adb: Likewise.
1887 * libgnat/a-tags.adb: Likewise.
1888 * libgnat/a-tideau.adb: Likewise.
1889 * libgnat/a-wtdeau.adb: Likewise.
1890 * libgnat/a-ztdeau.adb: Likewise.
1891 * libgnat/g-alleve.adb: Likewise.
1892 * libgnat/s-excdeb.adb: Likewise.
1893 * libgnat/s-parint.adb: Likewise.
1894 * libgnat/s-shasto.adb: Likewise.
1895 * libgnat/s-traceb__hpux.adb: Likewise.
1896 * prepcomp.adb: Likewise.
1897 * sem_ch4.adb: Likewise.
1898 * sem_ch6.adb: Likewise.
1899 * sem_dist.adb: Likewise.
1900 * sem_prag.adb: Likewise.
1901 * sem_util.adb: Likewise.
1902 * sinfo.adb: Likewise.
1903 * switch.adb: Likewise.
1905 2018-05-04 John Marino <gnugcc@marino.st>
1908 * link.c (BSD platforms): Add missing backslash.
1910 2018-04-27 Eric Botcazou <ebotcazou@adacore.com>
1913 * init.c (__gnat_handle_vms_condition): Add missing parentheses.
1915 2018-04-25 Eric Botcazou <ebotcazou@adacore.com>
1918 * gnat_ugn.texi: Regenerate.
1920 2018-03-23 Eric Botcazou <ebotcazou@adacore.com>
1923 * gnatlink.adb (Gnatlink): Remove handling of -b switch.
1924 * doc/gnat_ugn/building_executable_programs_with_gnat.rst (gnatlink):
1925 Remove documentation of -b switch.
1927 2018-03-23 Eric Botcazou <ebotcazou@adacore.com>
1930 * gnatlink.adb (Process_Args): Drop existing link switches if multiple
1931 switches are passed for --LINK.
1933 2018-03-12 Eric Botcazou <ebotcazou@adacore.com>
1936 * gcc-interface/misc.c (gnat_post_options): Disable string overflow
1939 2018-03-10 Eric Botcazou <ebotcazou@adacore.com>
1941 * gcc-interface/trans.c (node_has_volatile_full_access) <N_Identifier>:
1942 Consider only entities for objects.
1944 2018-03-07 Sebastian Huber <sebastian.huber@embedded-brains.de>
1946 * gcc-interface/Makefile.in (OSCONS_CPP): Remove redundant
1948 (OSCONS_EXTRACT): Add $(GNATLIBCFLAGS_FOR_C).
1950 2018-03-06 Eric Botcazou <ebotcazou@adacore.com>
1952 * gcc-interface/trans.c (convert_with_check): Fix typo in the condition
1953 guarding the overflow check emitted for the upper bound of a floating-
1956 2018-03-06 Eric Botcazou <ebotcazou@adacore.com>
1958 * gcc-interface/utils.c (def_builtin_1): Bail out on error_mark_node.
1960 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
1962 * libgnat/i-cexten.ads (Float_128): New type.
1964 2018-02-02 Eric Botcazou <ebotcazou@adacore.com>
1966 * gcc-interface/decl.c (array_type_has_nonaliased_component): Return
1967 false if the component type is a pointer.
1969 2018-01-11 Gary Dismukes <dismukes@adacore.com>
1971 * exp_ch3.adb (Default_Initialize_Object): Call New_Copy_Tree on the
1972 result of Get_Simple_Init_Value and pass the source location of the
1973 object declaration's object_definition.
1975 2018-01-11 Ed Schonberg <schonberg@adacore.com>
1977 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration): Handle
1978 properly object declarations with initializations that are
1979 build-in-place function calls, when there is an address specification,
1980 either as an aspect specification or an explicit attribute
1981 specification clause, for the initialized object.
1982 * freeze.adb (Check_Address_Clause): Do not remove side-effects from
1983 initial expressions in the case of a build-in-place call.
1985 2018-01-11 Piotr Trojanek <trojanek@adacore.com>
1987 * sem_eval.adb (Is_Null_Range): Retrieve the full view when called on a
1988 private (sub)type; refactor to avoid early return statement.
1989 (Not_Null_Range): Same as above.
1991 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
1993 * freeze.adb (Freeze_Entity): Ensure that a Ghost type is not
1994 concurrent, nor effectively volatile.
1995 * ghost.adb (Check_Ghost_Type): New routine.
1996 * ghost.ads (Check_Ghost_Type): New routine.
1997 * sem_util.adb (Is_Declaration): Reimplemented. The routine can now
1998 consider specific subsets of declarations.
1999 (Is_Declaration_Other_Than_Renaming): Removed. Its functionality is
2000 replicated by Is_Declaration.
2001 * sem_util.ads (Is_Declaration): New parameter profile. Update the
2003 (Is_Declaration_Other_Than_Renaming): Removed.
2005 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
2007 * sem_ch5.adb (Analyze_Assignment): Assignments to variables that act
2008 as Part_Of consituents of single protected types are illegal when they
2009 take place inside a protected function.
2010 (Diagnose_Non_Variable_Lhs): Use Within_Function to check for an
2012 (Is_Protected_Part_Of_Constituent): New routine.
2013 (Within_Function): New routine.
2015 2018-01-11 Arnaud Charlet <charlet@adacore.com>
2017 Bump copyright notices to 2018.
2019 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
2021 * binde.adb, par-ch6.adb, par-ch9.adb, sem_ch12.adb, sem_ch13.adb:
2024 2018-01-11 Justin Squirek <squirek@adacore.com>
2026 * par-ch6.adb (Scan_Body_Or_Expression_Function): Add additional check
2027 to make sure a given expression function is properly parenthesized.
2029 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
2031 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Check the
2032 categorization of a subprogram body which does not complete a previous
2035 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
2037 * sem_ch10.adb (Check_Private_Child_Unit): Ensure that the enclosing
2038 scope of package Ada is Standard.
2040 2018-01-11 Ed Schonberg <schonberg@adacore.com>
2042 * sem_ch13.adb (Replace_Type_Ref): Handle properly reference to a
2043 subcomponent of the current entity when building the body for a dynamic
2044 predicate function for a record with composite subcomponents.
2046 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
2048 * exp_aggr.adb (Convert_Aggr_In_Object_Decl): Update the call to
2049 Establish_Transient_Scope.
2050 (Convert_To_Assignments): Update the call to Establish_Transient_Scope.
2051 (Expand_Array_Aggregate): Update the call to Establish_Transient_Scope.
2052 * exp_ch6.adb (Expand_Call_Helper): Update the call to
2053 Establish_Transient_Scope.
2054 (Make_Build_In_Place_Call_In_Object_Declaration): Update the call to
2055 Establish_Transient_Scope.
2056 * exp_ch7.adb (Establish_Transient_Scope): Restructured. Delegate the
2057 management of the secondary stack to an enclosing scope if there is no
2058 suitable construct to wrap, and the transient scope was intended to
2059 manage the secondary stack.
2060 (Find_Node_To_Be_Wrapped): Restructured. A case_statement_alternative
2061 is a valid boundary for a transient expression which comes from the
2062 statements of the alternative, otherwise alternatives cannot be
2063 wrapped. Assignments of controlled objects which have controlled
2064 actions suppressed now stop the traversal as there is no point in
2065 looking for an enclosing construct. Add several N_xxx_Body choices to
2066 the termination conditions for completeness.
2067 * exp_ch7.ads (Establish_Transient_Scope): Update the parameter profile
2068 and the associated comment on usage.
2069 * exp_smem.adb (Add_Shared_Var_Lock_Procs): Update the call to
2070 Establish_Transient_Scope.
2071 (Add_Write_After): Update the call to Establish_Transient_Scope.
2072 * sem_res.adb (Check_Initialization_Call): Removed.
2073 (Resolve_Actuals): Account for additional cases where finalization
2074 actions are required by utilizing predicate Needs_Finalization rather
2076 (Resolve_Call): Type initialization procedures can now utilize
2077 transient scopes to manage the secondary stack, thus preventing leaks
2078 during initialization. Remove the previous kludgy algorithm which
2079 attempts to manage the secondary stack at the object creation site.
2081 2018-01-11 Jerome Lambourg <lambourg@adacore.com>
2083 * libgnat/g-soliop__qnx.ads: New.
2084 * adaint.c, adaint.h, cstreams.c, s-oscons-tmplt.c, sysdep.c: Update
2087 2018-01-11 Bob Duff <duff@adacore.com>
2089 * par-ch9.adb (P_Protected_Operation_Declaration_Opt): Give an error if
2090 a null procedure occurs in a protected definition.
2092 2018-01-11 Bob Duff <duff@adacore.com>
2094 * binderr.ads, namet.ads: Minor reformatting.
2096 2018-01-11 Bob Duff <duff@adacore.com>
2098 * doc/gnat_ugn/gnat_utility_programs.rst: Improve documentation of
2101 2018-01-11 Bob Duff <duff@adacore.com>
2103 * binde.adb (Force_Elab_Order): Give an error if there are duplicate
2106 2018-01-11 Ed Schonberg <schonberg@adacore.com>
2108 * sem_ch6.adb (Freeze_Expr_Types): If an access value is the
2109 controlling argument of a dispatching call. freeze the corresponding
2112 2018-01-11 Ben Brosgol <brosgol@adacore.com>
2114 * doc/Makefile: Add Sphinx option -W to treat warnings as errors.
2116 2018-01-11 Ben Brosgol <brosgol@adacore.com>
2118 * doc/gnat_rm/implementation_defined_aspects.rst: Minor type/wording
2120 * gnat_rm.texi: Regenerate.
2122 2018-01-11 Ed Schonberg <schonberg@adacore.com>
2124 * sem_ch12.adb (Check_Fixed_Point_Type): Do not apply check if the
2125 formsl type corresponding to the actual fixed point type is private,
2126 because in this case there can be no suspicious arithmetic operations
2127 in the generic unless they reference a formal subprogram. Clarify
2130 2018-01-11 Javier Miranda <miranda@adacore.com>
2132 * exp_util.adb (Remove_Side_Effects): No action done for functions
2133 returning class-wide types since it requires generating code using
2134 'reference and the CCG target has no secondary stack.
2135 * gnat1drv.adb: Disable building static dispatch tables when generating
2138 2018-01-11 Piotr Trojanek <trojanek@adacore.com>
2140 * libgnat/a-direio.ads, libgnat/a-sequio.ads, libgnat/a-ststio.ads,
2141 libgnat/a-textio.ads, libgnat/a-witeio.ads, libgnat/a-ztexio.ads
2142 (File_Type): Add Default_Initial_Condition aspect.
2144 2018-01-11 Pascal Obry <obry@adacore.com>
2146 * libgnat/s-os_lib.adb (Normalize_Pathname): New implementation.
2148 2018-01-11 Bob Duff <duff@adacore.com>
2150 * doc/gnat_ugn/gnat_utility_programs.rst: Rewrite gnatpp documentation
2151 to match what the Libadalang-based version does.
2152 * doc/gnat_ugn/about_this_guide.rst: Update reference.
2154 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
2156 * sem_res.adb (Uses_SS): A controlled type requires the secondary stack
2157 if it contains at least one component declaration employing a function
2158 call returning on the secondary stack.
2160 2018-01-11 Yannick Moy <moy@adacore.com>
2162 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
2163 Update description of restriction SPARK_05 with SPARK 2014.
2164 * gnat_rm.texi: Regenerate.
2166 2018-01-11 Vasiliy Fofanov <fofanov@adacore.com>
2168 * doc/gnat_ugn/gnat_utility_programs.rst: Fix layout.
2170 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
2172 * exp_aggr.adb, exp_ch9.adb, exp_util.adb, sem_aggr.adb, sem_ch3.adb,
2173 sem_res.adb, sem_util.adb: Minor reformatting.
2175 2018-01-11 Ed Schonberg <schonberg@adacore.com>
2177 * sem_prag.adb (Analyze_Pragma, case Predicate): Indicate that the type
2178 has a delayed aspect which must be processed at the point the type is
2179 frozen. This mimics what is done when the predicate is provided by a
2182 2018-01-11 Doug Rupp <rupp@adacore.com>
2184 * init.c (vxworks): Add macro checks for __aarch64__.
2186 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
2188 * exp_util.adb (Add_Failure_Expression): New routine.
2189 (Make_Predicate_Check): Reimplement the handling of Predicate_Failure.
2190 * sem_util.adb (Is_Current_Instance): Code cleanup.
2192 2018-01-11 Patrick Bernardi <bernardi@adacore.com>
2194 * libgnat/s-parame*.adb, libgnat/s-parame*.ads: Remove unneeded
2195 Default_Sec_Stack_Size.
2196 * libgnat/s-secsta.adb (SS_Allocate): Handle the fixed secondary stack
2197 limit check so that the integer index does not overflow. Check the
2198 dynamic stack allocation does not cause the secondary stack pointer to
2200 (SS_Info): Align colons.
2201 (SS_Init): Cover the case when bootstraping with an old compiler that
2202 does not set Default_SS_Size.
2204 2018-01-11 Ed Schonberg <schonberg@adacore.com>
2206 * sem_ch3.adb (Add_Internal_Interface_Entities): When checking the
2207 legality of an inherited operation that may require overriding, ignore
2208 primitive_wrappers that correspond to explicit operations that override
2209 an interface primitive.
2210 * exp_util.adb (Build_Class_Wide_Expression, Replace_Entity): If the
2211 operation to which the class-wide expression applies is a protected op.
2212 with a primitive_wrapper, verify that the updated inherited expression
2213 does not contain an internal call to a protected function. This
2214 completes the implementation of AI12-0166.
2216 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
2218 * ali.adb: Document the remaining letters available for ALI lines.
2219 (Scan_ALI): A with clause is internal when it is encoded on a 'Z' line.
2220 * ali.ads: Update type With_Record. Field
2221 Implicit_With_From_Instantiation is no longer in use. Add field
2223 * csinfo.adb (CSinfo): Remove the setup for attribute
2224 Implicit_With_From_Instantiation.
2225 * lib-writ.adb (Collect_Withs): Correct the logic which marks a unit as
2226 either implicitly or explicitly withed.
2227 (Is_Implicit_With_Clause): New routine.
2228 (Write_ALI): Rename array Implicit_With to Has_Implicit_With to avoid
2229 confusion with the with clause attribute by the same name.
2230 (Write_With_Lines): Update the emission of 'W', 'Y', and 'Z' headers.
2231 * rtsfind.adb (Maybe_Add_With): Code cleanup.
2232 * sem_ch8.adb (Present_System_Aux): Code cleanup.
2233 * sem_ch10.adb (Expand_With_Clause): Mark the with clause as generated
2235 (Implicit_With_On_Parent): Mark the with clause as generated for a
2237 * sem_ch12.adb (Inherit_Context): With clauses inherited by an
2238 instantiation are no longer marked as Implicit_With_From_Instantiation
2239 because they are already marked as implicit.
2240 * sem_elab.adb (Ensure_Prior_Elaboration_Static): Remove the kludge
2241 which marks implicit with clauses as related to an instantiation.
2242 * sinfo.adb (Implicit_With_From_Instantiation): Removed.
2243 (Parent_With): New routine.
2244 (Set_Implicit_With_From_Instantiation): Removed.
2245 (Set_Parent_With): New routine.
2246 * sinfo.ads: Update the documentation of attribute Implicit_With.
2247 Remove attribute Implicit_With_From_Instantiation along with
2248 occurrences in nodes. Add attribute Parent_With along with occurrences
2250 (Implicit_With_From_Instantiation): Removed along with pragma Inline.
2251 (Parent_With): New routine along with pragma Inline.
2252 (Set_Implicit_With_From_Instantiation): Removed along with pragma Inline.
2253 (Set_Parent_With): New routine along with pragma Inline.
2255 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
2257 * sem_util.adb (Find_Enclosing_Scope): Return the unique defining
2258 entity when the enclosing construct is a body.
2260 2018-01-11 Patrick Bernardi <bernardi@adacore.com>
2262 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Simplified
2263 Secondary_Stack_Size handling as a pragma is now generated for the
2264 corresponding aspect instead of an attribute. Pragma expression is
2265 relocated instead of evaluated. Discriminant of the corresponding
2266 record type is referenced rather than the type discriminant.
2267 (Create_Secondary_Stack_For_Task, Make_Task_Create_Call): Update
2268 Secondary_Stack_Size rep item checks to only look for the pragma rep.
2269 * sem_ch13.adb (Analyze_One_Aspect): Transform
2270 Aspect_Secondary_Stack_Size into a pragma instead of an attribute
2271 because the attribute does not have visibility on a task type's
2272 discriminants when the type's definition is expanded.
2273 (Analyze_Attribute_Definition_Clause): Remove handling of
2274 Attribute_Secondary_Stack_Size.
2275 * snames.adb-tmpl, snames.ads-tmpl: Remove
2276 Attribute_Secondary_Stack_Size, no longer used.
2278 2018-01-11 Justin Squirek <squirek@adacore.com>
2280 * sem_ch8.adb: Minor comment fix.
2282 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
2284 * exp_ch4.adb (Process_Action): Do not abandon the inspection of an
2285 individual action because the action may denote a complex expression,
2286 such as a case statement, which in turn may contain additional
2289 2018-01-11 Ed Schonberg <schonberg@adacore.com>
2291 * sem_aggr.adb (Resolve_Iterated_Component_Association): Perform
2292 analysis on a copy of the expression with a copy of the index variable,
2293 because full expansion will rewrite construct into a loop with the
2294 original loop variable.
2295 * exp_aggr.adb (Gen_Assign): Defer analysis and resolution if the
2296 expression is an iterated component association. Full analysis takes
2297 place when construct is rewritten as a loop.
2298 (In_Place_Assign_OK, Safe_Component): An iterated_component_association
2299 is not safe for in-place assignment.
2300 * sem_util.adb (Remove_Entity): Handle properly the case of an isolated
2301 entity with no homonym and no other entity in the scope.
2303 2018-01-11 Justin Squirek <squirek@adacore.com>
2305 * sem_prag.adb (Analyze_Pragma:Pragma_Loop_Variant): Modify error
2306 message to be printed on the pragma argument identifier.
2308 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
2310 * exp_util.adb (Build_Invariant_Procedure_Declaration): Set the last
2311 entity of the generated invariant procedure in order to construct a
2312 proper entity chain.
2314 2018-01-11 Piotr Trojanek <trojanek@adacore.com>
2316 * sem_ch13.adb (Build_Predicate_Functions): Fix minor issues in
2319 2018-01-11 Arnaud Charlet <charlet@adacore.com>
2321 * einfo.ads, einfo.adb (Activation_Record_Component,
2322 Set_Activation_Record_Component, Set_Is_Uplevel_Referenced_Entity):
2323 Allow E_Discriminant.
2325 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
2327 * gcc-interface/decl.c (gnat_to_gnu_component_type): Apply the check
2328 for atomic access once the component size is taken into account and
2329 also do it if the component type is Atomic or Volatile_Full_Access.
2331 2018-01-04 Eric Botcazou <ebotcazou@adacore.com>
2333 * gnatvsn.ads: Bump copyright year.
2335 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2336 Alan Hayward <alan.hayward@arm.com>
2337 David Sherwood <david.sherwood@arm.com>
2339 * gcc-interface/misc.c (enumerate_modes): Treat GET_MODE_BITSIZE
2342 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2343 Alan Hayward <alan.hayward@arm.com>
2344 David Sherwood <david.sherwood@arm.com>
2346 * gcc-interface/misc.c (enumerate_modes): Treat GET_MODE_PRECISION
2349 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2350 Alan Hayward <alan.hayward@arm.com>
2351 David Sherwood <david.sherwood@arm.com>
2353 * gcc-interface/utils.c (gnat_types_compatible_p): Handle
2354 polynomial TYPE_VECTOR_SUBPARTS.
2356 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2357 Alan Hayward <alan.hayward@arm.com>
2358 David Sherwood <david.sherwood@arm.com>
2360 * gcc-interface/misc.c (enumerate_modes): Handle polynomial
2363 2018-01-03 Jakub Jelinek <jakub@redhat.com>
2365 Update copyright years.
2367 * gnat_ugn.texi: Bump @copying's copyright year.
2368 * gnat_rm.texi: Likewise.
2370 Copyright (C) 2018 Free Software Foundation, Inc.
2372 Copying and distribution of this file, with or without modification,
2373 are permitted in any medium without royalty provided the copyright
2374 notice and this notice are preserved.