1 2018-05-30 Eric Botcazou <ebotcazou@adacore.com>
3 * gcc-interface/trans.c (gnat_to_gnu) <N_Assignment_Statement>: Add
4 comment about the memset case.
6 2018-05-30 Bob Duff <duff@adacore.com>
8 * exp_ch5.adb (Expand_Formal_Container_Element_Loop): Remove the code
9 to analyze the Elmt_Decl, because it gets analyzed in the wrong scope.
10 We need to analyze it as part of analyzing the block, so that if the
11 call to Element that initializes Elmt_Decl returns on the secondary
12 stack, the block will ss_mark/ss_release. This block is inside the
13 loop; we don't want to leak memory until the loop exits. The purpose
14 of analyzing Elmt_Decl first was to catch the error of modifying it,
15 which is illegal because it's a loop parameter. The above causes us to
16 miss that error. Therefore, we add a flag Is_Loop_Parameter, and set
17 it on the Element entity, so we end up with an E_Variable node with the
19 * einfo.ads, einfo.adb (Is_Loop_Parameter): New flag.
20 * sem_ch5.adb (Diagnose_Non_Variable_Lhs): Give the "assignment to loop
21 parameter not allowed" error if Is_Loop_Parameter.
22 * sem_util.adb (Is_Variable): Return False if Is_Loop_Parameter, to
23 trigger the call to Diagnose_Non_Variable_Lhs.
25 2018-05-30 Arnaud Charlet <charlet@adacore.com>
27 * checks.adb (Apply_Scalar_Range_Check):
28 * sem_eval.adb (Check_Non_Static_Context, Out_Of_Range): Ignore out of
29 range values for System.Priority in CodePeer mode since the actual
30 target compiler may provide a wider range.
32 2018-05-30 Ed Schonberg <schonberg@adacore.com>
34 * exp_unst.adb: Search specification of main unit as well, for
37 2018-05-30 Ed Schonberg <schonberg@adacore.com>
39 * exp_ch7.adb (Check_Unnesting_Elaboration_Code): The statement part of
40 a package body that is a compilation unit may contain blocks that
41 declare local subprograms. In Subprogram_Unnesting Mode such
42 subprograms must be handled as nested inside the (implicit) elaboration
43 procedure that executes that statement part. To handle properly uplevel
44 references we construct that subprogram explicitly, to contain blocks
45 and inner subprograms, The statement part of the compilation unit
46 becomes a call to this subprogram. This is only done if blocks are
47 present in the statement list of the body.
49 2018-05-30 Bob Duff <duff@adacore.com>
51 * exp_ch7.adb: Minor comment fix.
53 2018-05-30 Ed Schonberg <schonberg@adacore.com>
55 * exp_unst.adb (Visit_Node): Handle properly subprogram instantiations
56 that have no corresponding body and appear as attributes of the
57 corresponding wrapper package declaration.
58 (Register_Subprogram): New subprogram, used for subprogram bodies and
59 for subprogram instantiations to enter callable entity into Subp table.
61 2018-05-30 Hristian Kirtchev <kirtchev@adacore.com>
63 * libgnat/s-secsta.adb: Reimplement the secondary stack support.
64 * libgnat/s-secsta.ads: Update the documentation of all routines in the
65 public part of the package. Reimplement the private part of the
66 package to account for the new secondary stack structure. Add types
67 and subprograms for testing purposes. Add several documentation
70 2018-05-30 Hristian Kirtchev <kirtchev@adacore.com>
72 * exp_aggr.adb, exp_ch3.adb, exp_ch4.adb, exp_ch7.adb, exp_unst.adb,
73 exp_util.adb, exp_util.ads, libgnat/a-calcon.adb, libgnat/a-calcon.ads,
74 libgnat/s-os_lib.adb, repinfo.adb, sem_ch3.adb, sem_disp.adb,
75 sem_disp.ads, sem_util.adb: Minor reformatting.
77 2018-05-30 Arnaud Charlet <charlet@adacore.com>
79 * gcc-interface/Makefile.in: Move special flags for Ada runtime files
81 * Makefile.rtl: ... to here. Update comments. Protect call to
82 "GCC_FOR_TARGET" in case target_os isn't defined.
84 2018-05-30 Arnaud Charlet <charlet@adacore.com>
86 * gcc-interface/Makefile.in: Move target pair settings from here...
87 * Makefile.rtl: ... to here.
88 (setup-rts): New target.
90 2018-05-29 Eric Botcazou <ebotcazou@adacore.com>
92 * doc/gnat_ugn/building_executable_programs_with_gnat.rst (Alphabetical
93 List of All Switches): Replace "modules" with "units".
94 (Subprogram Inlining Control): Likewise.
95 * gnat_ugn.texi: Regenerate.
96 * usage.adb (Usage): Fix description of -gnatn switch.
98 2018-05-29 Arnaud Charlet <charlet@adacore.com>
100 * gcc-interface/Makefile.in: Fix typos.
102 2018-05-29 Ed Schonberg <schonberg@adacore.com>
104 * exp_ch7.adb (Build_Finalizer_Call): Attach to tree the reference to
105 the finalizer procedure in the At_End handler, for use in LLVM
108 2018-05-29 Javier Miranda <miranda@adacore.com>
110 * exp_ch4.adb (Expand_N_Op_Eq, Expand_Composite_Equality): Use the new
111 subprogram Inherits_From_Tagged_Full_View to identify more reliably
112 untagged private types completed with a derivation of an untagged
113 private whose full view is a tagged type.
114 * sem_util.ads, sem_util.adb (Inherits_From_Tagged_Full_View): New
116 (Collect_Primitive_Operations): Handle untagged private types completed
117 with a derivation of an untagged private type whose full view is a
118 tagged type. In such case, collecting the list of primitives we may
119 find two equality primitives: one associated with the untagged private
120 and another associated with the ultimate tagged type (and we must
121 remove from the returned list this latter one).
123 2018-05-29 Ed Schonberg <schonberg@adacore.com>
125 * exp_unst.adb (Visit_Node): Handle statement sequences that include an
128 2018-05-29 Eric Botcazou <ebotcazou@adacore.com>
130 * repinfo.adb (List_Entities): Also recurse into blocks without label.
132 2018-05-29 Ed Schonberg <schonberg@adacore.com>
134 * exp_ch6.adb (Expand_N_Subprogram_Body): Do not generate push/pop for
135 exceptions if subprogram unnesting is in effect, because these branch
136 nodes are relevant only in the presence of nested subprograms.
138 2018-05-29 Ed Schonberg <schonberg@adacore.com>
140 * libgnat/s-fatgen.adb (Succ, Pred): Raise Constraint_Error
141 unconditionally when applied to the largest positive (resp. largest
142 negative) value of a floating-point type.
144 2018-05-29 Ed Schonberg <schonberg@adacore.com>
146 * einfo.ads, einfo.adb: Clarify use of Activation_Record_Component:
147 discriminants and exceptions are never components of such. The flag
148 Needs_Activation_Record is set on subprogram types, not on access to
151 2018-05-29 Ed Schonberg <schonberg@adacore.com>
153 * sem_ch3.adb: Set scope of component of subtype.
155 2018-05-29 Ed Schonberg <schonberg@adacore.com>
157 * exp_unst.adb (Visit_Node): Exclude selected components whose prefix
158 carry no type. Such selected components appear in unit names that are
159 child units, both in the specification and possibly in an end label for
160 the unit, and they do not contain any relevant uplevel references.
162 2018-05-29 Arnaud Charlet <charlet@adacore.com>
164 * libgnat/a-calend.ads, libgnat/a-calend.adb (Epoch_Offset): Make it a
167 2018-05-29 Olivier Hainque <hainque@adacore.com>
169 * libgnat/system-vxworks7-ppc-rtp.ads: New file.
170 * libgnat/system-vxworks7-ppc-kernel.ads: New file.
171 * libgnat/system-vxworks7-e500-rtp.ads: New file.
172 * libgnat/system-vxworks7-e500-kernel.ads: New file.
173 * libgnat/system-vxworks7-x86-rtp.ads: New file.
174 * libgnat/system-vxworks-ppc64-kernel.ads: Rename as ...
175 * libgnat/system-vxworks7-ppc64-kernel.ads: and adjust name of
176 gnat-crtbe link spec to use the vx7 variant.
178 2018-05-29 Olivier Hainque <hainque@adacore.com>
180 * vx_crtbegin.inc: Use a consistent naming convention for the
181 registration/deregistration functions across RTP or kernel. Remove the
182 ctor/dtor attribute setting based on RTP/kernel, expect the optional
183 attribute extension to be provided by includers instead.
184 * vx_crtbegin.c: Mere inclusion of vx_crtbegin.inc with empty attribute
185 extension for the registration/deregistration functions.
186 * vx_crtbegin_attr.c: New file. Include vx_crtbegin.inc with explicit
187 constructor/destructor attribute extensions.
188 * vx_crtbegin_array.c: New file. Include vx_crtbegin.inc with empty
189 attribute extensions and declare _ctors/_dtors arrays.
190 * vx_crtbegin_auto.c: Remove.
191 * libgnat/system-vxworks7-aarch64-rtp-smp.ads: Use
192 vxworks7-gnat-crtbe-link.spec.
193 * libgnat/system-vxworks7-aarch64.ads: Likewise.
194 * libgnat/system-vxworks7-e500-rtp-smp.ads: Likewise.
195 * libgnat/system-vxworks7-ppc-rtp-smp.ads: Likewise.
196 * libgnat/system-vxworks7-ppc64-rtp-smp.ads: Likewise.
197 * libgnat/system-vxworks7-x86-kernel.ads: Likewise.
198 * libgnat/system-vxworks7-x86-rtp-smp.ads: Likewise.
199 * libgnat/system-vxworks7-x86_64-kernel.ads: Likewise.
200 * libgnat/system-vxworks7-x86_64-rtp-smp.ads: Likewise.
202 2018-05-29 Piotr Trojanek <trojanek@adacore.com>
204 * ali.adb: Minor reformatting.
206 2018-05-29 Joel Brobecker <brobecker@adacore.com>
208 * doc/gnat_ugn/platform_specific_information.rst: Update package
209 requirements for 32bit GNAT on x86_64-linux.
210 * gnat_ugn.texi: Regenerate.
212 2018-05-29 Eric Botcazou <ebotcazou@adacore.com>
214 * doc/gnat_ugn/building_executable_programs_with_gnat.rst (Debugging
215 Control): Adjust description of -gnatRj.
216 * gnat_ugn.texi: Regenerate.
217 * opt.ads (List_Representation_Info_To_JSON): Likewise.
218 * repinfo.adb (List_Rep_Info): Do not automatically create a file
219 if List_Representation_Info_To_JSON is true.
220 * switch-c.adb (Scan_Front_End_Switches) <R>: Remove incompatibility
221 check between -gnatRj and -gnatRs.
222 * usage.adb (Usage): Adjust description of -gnatRj.
224 2018-05-29 Pascal Obry <obry@adacore.com>
226 * libgnat/s-os_lib.adb (Normalize_Pathname): Fix handling of ".." in
229 2018-05-29 Pascal Obry <obry@adacore.com>
231 * libgnat/s-os_lib.adb: Minor reformatting.
233 2018-05-29 Doug Rupp <rupp@adacore.com>
235 * libgnat/a-calend.adb (Epoch_Offset): Move from body to ...
236 * libgnat/a-calend.ads (Epoch_Offset): to private part of spec
237 * libgnat/a-calcon.ads (To_Unix_Nano_Time): New function spec.
238 * libgnat/a-calcon.adb (To_Unix_Nano_Time): New function body.
240 2018-05-29 Eric Botcazou <ebotcazou@adacore.com>
242 * repinfo.ads (JSON format): Document new pair for components.
243 * repinfo.adb (Derived_Discriminant): New function.
244 (List_Structural_Record_Layout): Add Outer_Ent parameter and pass it
245 in recursive calls. If the record type is the parent of an extension,
246 find and list the derived discriminant from the extension, if any.
247 (List_Component_Layout): List the Discriminant_Number in JSON mode.
248 (List_Record_Info): Adjust call to List_Structural_Record_Layout.
250 2018-05-29 Eric Botcazou <ebotcazou@adacore.com>
252 * doc/gnat_ugn/building_executable_programs_with_gnat.rst (Alphabetical
253 List of All Switches): Document -gnatRj.
254 (Debugging Control): Likewise.
255 * gnat_ugn.texi: Regenerate.
256 * opt.ads (List_Representation_Info_To_JSON): New boolean variable.
257 * osint-c.adb (Create_Repinfo_File): Use the .json instead of .rep
258 extension if List_Representation_Info_To_JSON is true.
259 * repinfo.ads: Document the JSON output format.
260 * repinfo.adb (List_Location): New procedure.
261 (List_Array_Info): Add support for JSON output.
262 (List_Entities): Likewise.
265 (Print_Expr): Likewise.
266 (List_Linker_Section): Likewise.
267 (List_Mechanisms): Likewise.
268 (List_Name): Likewise.
269 (List_Object_Info): Likewise.
270 (List_Record_Info): Likewise.
271 (List_Component_Layout): Likewise. Add Indent parameter.
272 (List_Structural_Record_Layout): New procedure.
273 (List_Attr): Add support for JSON output.
274 (List_Type_Info): Likewise.
275 (Write_Unknown_Val): Likewise.
276 * switch-c.adb (Scan_Front_End_Switches) <R>: Deal with 'j'.
277 * usage.adb (Usage): List -gnatRj.
279 2018-05-29 Eric Botcazou <ebotcazou@adacore.com>
281 * repinfo.adb (List_Component_Layout): New procedure extracted from...
282 (List_Record_Layout): ...here. Invoke it.
284 2018-05-29 Eric Botcazou <ebotcazou@adacore.com>
286 * repinfo.adb (Write_Unknown_Val): New procedure.
287 (List_GCC_Expression): Call it.
288 (List_Record_Layout): Likewise.
289 (Write_Val): Likewise.
291 2018-05-29 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
293 * exp_ch4.adb (Expand_N_Op_Abs): Clear Do_Overflow_Check when inserting
296 2018-05-29 Arnaud Charlet <charlet@adacore.com>
298 * lib-writ.adb (Write_ALI): Do not use new function from s-casuti yet.
299 This breaks build of cross compilers with older versions of GNAT, so
302 2018-05-29 Doug Rupp <rupp@adacore.com>
304 * libgnarl/s-taprop.ads (Monotonic_Clock): Refine documentation to
307 2018-05-29 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
309 * exp_ch4.adb (Expand_N_Op_Abs): Always do range check against 'First.
311 2018-05-29 Eric Botcazou <ebotcazou@adacore.com>
313 * repinfo.adb (List_Entities): Do not list the Linker_Section for
315 (List_Mechanisms): ...but here instead. Use consistent name output
316 and formatting conventions.
318 2018-05-29 Bob Duff <duff@adacore.com>
320 * lib-writ.adb (Write_ALI): Cleanup: avoid use of global var; call new
322 * libgnat/s-casuti.ads, libgnat/s-casuti.adb (To_Upper, To_Lower,
323 To_Mixed): New functions.
324 * osint.adb: Cleanup: use Is_Directory_Separator, which correctly
325 allows both '\' and '/' on Windows.
327 2018-05-28 Eric Botcazou <ebotcazou@adacore.com>
329 * repinfo.ads: Minor fixes and tweaks in comments.
331 2018-05-28 Eric Botcazou <ebotcazou@adacore.com>
333 * repinfo.adb (List_GCC_Expression): Remove Valop and replace calls to
334 it with calls to Unop.
336 2018-05-28 Eric Botcazou <ebotcazou@adacore.com>
338 * repinfo.ads (TCode): Adjust range.
339 (Truth_Andif_Expr): Remove.
340 (Truth_Orif_Expr): Likewise.
341 (Truth_And_Expr .. Dynamic_Val): Adjust value.
342 * repinfo.adb (Print_Expr): Remove handling of Truth_{And,Or}if_Expr.
343 (Rep_Value): Likewise.
344 * repinfo.h (Truth_Andif_Expr): Remove.
345 (Truth_Orif_Expr): Likewise.
346 (Truth_And_Expr .. Dynamic_Val): Adjust value.
347 * gcc-interface/decl.c (annotate_value) <TRUTH_ANDIF_EXPR>: Fall
348 through to TRUTH_AND_EXPR case.
349 <TRUTH_ORIF_EXPR>: Fall through to TRUTH_OR_EXPR case.
351 2018-05-28 Ed Schonberg <schonberg@adacore.com>
353 * exp_unst.adb (Visit_Node): For indexed components and attribute
354 references, examine index expressions or associated expressions as well
355 to record uplevel references.
356 (Vist_Node): For function and procedure calls, if a formal is an
357 unconstrained array and the actual is constrained, check whether bounds
358 of actual have uplevel references.
360 2018-05-28 Ed Schonberg <schonberg@adacore.com>
362 * einfo.ads, einfo.adb: Exceptions can be uplevel references, and thus
363 they can appear as components of activation records.
364 * exp_unst.adb (Visit_Node): A reference to an exception may be an
367 2018-05-28 Eric Botcazou <ebotcazou@adacore.com>
369 * exp_ch4.adb (Expand_Composite_Equality): Compute whether the size
370 depends on a discriminant manually instead of using the predicate
371 Size_Depends_On_Discriminant in the array type case.
373 2018-05-28 Ed Schonberg <schonberg@adacore.com>
375 * exp_unst.adb (Check_Static_Type): For a record subtype, check
376 discriminant constraints as well.
377 (Visit_Node): For a selected component, check type of prefix, as is
378 done for indexed components and slices.
380 2018-05-28 Javier Miranda <miranda@adacore.com>
382 * exp_ch4.adb (Real_Range_Check): Add a temporary to store the integer
383 value when converting a float value to a fixed-point value. This is
384 required for CCG because it handles fixed-point types by means of
385 unsigned integer type variables. The range check is now performed using
386 the integer value stored in this temporary.
388 2018-05-28 Yannick Moy <moy@adacore.com>
390 * sem_util.adb (Is_OK_Volatile_Context): Add attributes First, Last and
391 Length as valid non-interfering contexts for SPARK.
393 2018-05-28 Claire Dross <dross@adacore.com>
395 * sem_disp.ads, sem_disp.adb (Inheritance_Utilities): Package for
396 generic inheritance utilities.
397 (Generic_Inherited_Subprograms): Generic version of
398 Inherited_Subprograms, generic in Find_Dispatching_Type function.
399 (Generic_Is_Overriding_Subprogram): Generic version of
400 Is_Overriding_Subprogram, generic in Find_Dispatching_Type function.
401 (Inherited_Subprograms): Instance of Generic_Inherited_Subprograms with
402 Sem_Disp.Find_Dispatching_Type.
403 (Is_Overriding_Subprogram): Instance of
404 Generic_Is_Overriding_Subprogram with Sem_Disp.Find_Dispatching_Type.
405 (Inheritance_Utilities_Inst): Instance of Inheritance_Utilities
406 with Sem_Disp.Find_Dispatching_Type.
408 2018-05-28 Eric Botcazou <ebotcazou@adacore.com>
410 * exp_ch4.adb (Expand_Composite_Equality): For a composite (or FP)
411 component type, do not expand array equality using the unconstrained
412 base type, except for the case where the bounds of the type depend on a
415 2018-05-28 Ed Schonberg <schonberg@adacore.com>
417 * einfo.ads, einfo.adb (Needs_Activation_Record): New flag on
418 access-to-subprogram types, to indicate that an indirect call through
419 such a type requires an activation record when compiling for LLVM.
420 * sem_ch3.adb (Access_Subprogram_Declaration): Set new flag as needed.
422 2018-05-28 Ed Schonberg <schonberg@adacore.com>
424 * exp_ch4.adb (Real_Range_Check): Specialize float-to-fixed conversions
425 when bounds of fixed type are static, to remove some spuerfluous
426 implicit conversions and provide an accurate result when converting
427 back and forth between the fixed point type and a floating point type.
429 2018-05-28 Ed Schonberg <schonberg@adacore.com>
431 * exp_unst.adb (Unnest_Subprogram): Prevent creation of empty
434 2018-05-28 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
436 * exp_unst.adb (Check_Static_Type): Add argument to indicate node to be
437 replaced, if any; all callers changed.
438 (Note_Uplevel_Ref): Likewise. Also replace reference to deferred
439 constant with private view so we take the address of that entity.
440 (Note_Uplevel_Bound): Add argument to indicate node to be replaced, if
441 any; all callers changed. Handle N_Indexed_Component like
442 N_Attribute_Reference. Add N_Type_Conversion case.
443 (Visit_Node): Indexed references can be uplevel if the type isn't
445 (Unnest_Subprograms): Don't rewrite if no reference given. If call has
446 been relocated, set first_named pointer in original node as well.
448 2018-05-28 Ed Schonberg <schonberg@adacore.com>
450 * exp_aggr.adb (Flatten): Copy tree of expression in a component
451 association with a range or a set of discrete choices, rather than
452 relocating the node. This avoids inconsistencies in the tree when
453 handling nested subprograms with uplevel references for LLVM.
455 2018-05-28 Arnaud Charlet <charlet@adacore.com>
457 * exp_util.adb (Possible_Bit_Aligned_Component): Always return False in
460 2018-05-28 Arnaud Charlet <charlet@adacore.com>
462 * exp_unst.adb: Fix typo.
464 2018-05-28 Bob Duff <duff@adacore.com>
466 * libgnat/a-convec.adb (Query_Element): Minor cleanup: remove an
467 unnecessary use of 'Unrestricted_Access.
469 2018-05-28 Hristian Kirtchev <kirtchev@adacore.com>
471 * repinfo.adb (Expr_Value_S): New routine.
472 (List_Linker_Section): Properly extract the value of the section
475 2018-05-28 Patrick Bernardi <bernardi@adacore.com>
477 * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Update the
478 description of the -D binder switch to reflect current usage.
479 * gnat_ugn.texi: Regenerate.
481 2018-05-28 Gary Dismukes <dismukes@adacore.com>
483 * exp_ch3.adb: Minor reformatting
485 2018-05-28 Justin Squirek <squirek@adacore.com>
488 (Build_Initialization_Call): Add logic to pass the appropriate actual to match
490 (Init_Formals): Add new formal *_skip_null_excluding_check
491 * exp_util.adb, exp_util.ads
492 (Enclosing_Init_Proc): Added to fetch the enclosing Init_Proc from the current
494 (Inside_Init_Proc): Refactored to use Enclosing_Init_Proc
495 (Needs_Conditional_Null_Excluding_Check): Added to factorize the predicate
496 used to determine how to generate an Init_Proc for a given type.
497 (Needs_Constant_Address): Minor reformatting
499 (Resolve_Null): Add logic to generate a conditional check in certain cases
501 2018-05-28 Hristian Kirtchev <kirtchev@adacore.com>
503 * exp_aggr.adb, gnatlink.adb, sem_ch6.adb, sem_res.adb, sem_util.adb:
506 2018-05-28 Hristian Kirtchev <kirtchev@adacore.com>
508 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile): Include
509 the declarations of single concurrent types because they fall in the
510 category of full type and object declarations.
512 2018-05-28 Eric Botcazou <ebotcazou@adacore.com>
514 * repinfo.adb (Compute_Max_Length): Skip _Parent component.
515 (List_Record_Layout): Likewise.
517 2018-05-28 Ed Schonberg <schonberg@adacore.com>
519 * sem_util.adb (Is_Function_Result): Add a warning if a postcondition
520 includes a call to function to which it applies. This may mean an
521 omission of an attribute reference 'Result, in particular if the
522 function is pqrameterless.
524 2018-05-28 Justin Squirek <squirek@adacore.com>
526 * sem_ch8.adb (Find_Expanded_Name): Add extra guard to make sure the
527 misresolved package name is not a case of mistaken identity.
529 2018-05-28 Yannick Moy <moy@adacore.com>
531 * sem_res.adb (Resolve_Range): Re-resolve the low bound of a range in
532 GNATprove mode, as the order of resolution (low then high) means that
533 all the information is not available when resolving the low bound the
536 2018-05-28 Eric Botcazou <ebotcazou@adacore.com>
538 * repinfo.adb (List_Array_Info): Start with an explicit blank line and
539 end with the linker section, if any.
540 (List_Entities): Do not output the linker section for record types,
541 array types and variables.
542 (Print_Expr): Factor out common processing for unary operators and
543 special values. Adjust and reorder the various cases.
544 (List_Object_Info): End with the linker section, if any.
545 (List_Record_Info): Likewise.
546 (List_Type_Info): Do not start with a blank line.
548 2018-05-25 Nicolas Roche <roche@adacore.com>
550 * libgnat/s-valrea.adb (Scan_Real): Abort computation once it is sure
551 that the result will be either -infinite or +infinite.
553 2018-05-25 Patrick Bernardi <bernardi@adacore.com>
555 * libgnat/s-parame.ads, libgnat/s-parame__vxworks.ads,
556 libgnat/s-parame__ae653.ads, libgnat/s-parame__hpux.ads (Size_Type):
557 Expand range of type to match the address space of the target.
558 (Task_Storage_Size): Remove unused type.
560 2018-05-25 Ed Schonberg <schonberg@adacore.com>
562 * sem_res.adb (Set_Mixed_Mode_Operand): If the operand is an expression
563 of a fixed point type and the parent is a multiplying operation,
564 resolve the operand with its own type because the context will impose a
565 resulting type on the result of the multiplication by means of
566 approriate conversion.
568 2018-05-25 Hristian Kirtchev <kirtchev@adacore.com>
570 * exp_ch3.adb (Default_Initialize_Object): Ensure that the analysis of
571 the in-place initialization aggregate created for pragmas
572 Initialize_Scalars or Normalize_Scalars is performed with checks
575 2018-05-25 Arnaud Charlet <charlet@adacore.com>
577 * exp_aggr.adb (Convert_To_Positional): Bump default for
578 Max_Others_Replicate to 32. Update comments.
579 * osint.ads (Unknown_Attributes): No longer pretend this is a constant.
580 (No_File_Info_Cache): Initialize separately.
581 * osint.adb (No_File_Info_Cache): Update initializer.
583 2018-05-25 Javier Miranda <miranda@adacore.com>
585 * sem_res.adb (Resolve_Membership_Op): Allow the use of the membership
586 test when the left operand is a class-wide interface and the right
587 operand is not a class-wide type.
588 * exp_ch4.adb (Tagged_Membership): Adding support for interface as the
591 2018-05-25 Ed Schonberg <schonberg@adacore.com>
593 * exp_aggr.adb (Flatten): A quantified expression cannot be duplicated
594 in an others clause to prevent visibility issues with the generated
596 (Component_OK_For_Backend): Return false for a quantified expression.
597 (Check_Static_Component): Ditto.
599 2018-05-25 Hristian Kirtchev <kirtchev@adacore.com>
601 * libgnat/s-secsta.adb (SS_Allocate): Reimplemented.
602 (SS_Allocate_Dynamic): New routine. The allocation logic is now split
603 into three distring cases rather than in one loop which attempts to
604 handle all three cases. This rewrite eliminates an issue where the last
605 frame of the stack cannot be freed, thus causing the memory range of a
606 new frame to approach the overflow point of the memory index type.
607 Since the overflow is logically treated as a
608 too-much-memory-on-the-stack scenario, it causes a bogus Storage_Error.
609 (SS_Allocate_Static): New routine. The routine factorizes the static
610 secondary stack-related code from the former SS_Allocate.
612 2018-05-25 Sergey Rybin <rybin@adacore.com>
614 * doc/gnat_ugn/gnat_and_program_execution.rst: Add description of '-U'
617 2018-05-25 Ed Schonberg <schonberg@adacore.com>
619 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not create
620 Class_Wide_Clone_Body when analyzing a subprogram_body_stub: the clone
621 is created when the proper body of the stub is analyzed.
622 * sem_util.adb (ZBuild_Class_Wide_Clone_Body): If the subprogram body
623 is the proper body of a subunit, the cloned body must be inserted in
624 the declarative list that contains the stub.
626 2018-05-25 Justin Squirek <squirek@adacore.com>
628 * exp_ch6.adb (Expand_Simple_Function_Return): Add guard in check to
629 generate code for 6.5(8-10) so that we don't get an assertion error
630 when dealing with an incomplete return type.
632 2018-05-25 Arnaud Charlet <charlet@adacore.com>
634 * pprint.adb (Expression_Name): Strip too long expressions to avoid
635 carrying very large strings.
637 2018-05-25 Patrick Bernardi <bernardi@adacore.com>
639 * switch-b.adb (Scan_Binder_Switches): binder switch -Q accepts Natural
642 2018-05-25 Doug Rupp <rupp@adacore.com>
644 * tracebak.c (aarch64-linux): Implement.
646 2018-05-25 Justin Squirek <squirek@adacore.com>
648 * sem_ch8.adb: Minor reformatting.
650 2018-05-25 Piotr Trojanek <trojanek@adacore.com>
652 * sem_util.adb (Iterate_Call_Parameters): Fix code convention and
655 2018-05-25 Hristian Kirtchev <kirtchev@adacore.com>
657 * einfo.adb, einfo.ads, exp_ch3.adb, exp_ch8.adb, exp_unst.adb,
658 pprint.adb, sem_ch12.adb, sem_ch3.adb, sem_prag.adb, sem_util.adb:
661 2018-05-25 Ed Schonberg <schonberg@adacore.com>
663 * sem_ch12.adb (Instance_Exists): New function, subsidiary of
664 Validate_Derived_Type_Instance, to verify that all interfaces
665 implemented by the formal type are also implemented by the actual. The
666 verification is complicated when an interface of the formal is declared
667 in a generic unit and the actual is declared in an instance of it.
668 There is currently no mechanism to relate an interface declared within
669 a generic to the corresponding interface in an instance, so we must
670 traverse the list of interfaces of the actual, looking for a name
671 match, and verifying that that interface is declared in an instance.
673 2018-05-25 Piotr Trojanek <trojanek@adacore.com>
675 * sem_util.adb (Iterate_Call_Parameters): Rewrite with extra
676 assertions; replace function versions of Next_Formal/Next_Actual with
677 their procedural versions (which are more concise).
679 2018-05-25 Doug Rupp <rupp@adacore.com>
681 * libgnarl/s-osinte__aix.ads, libgnarl/s-osinte__android.ads,
682 libgnarl/s-osinte__darwin.ads, libgnarl/s-osinte__freebsd.ads,
683 libgnarl/s-osinte__hpux.ads, libgnarl/s-osinte__kfreebsd-gnu.ads,
684 libgnarl/s-osinte__linux.ads, libgnarl/s-osinte__lynxos178e.ads,
685 libgnarl/s-osinte__qnx.ads, libgnarl/s-osinte__rtems.ads
686 (Relative_Timed_Wait): Remove.
687 * libgnarl/s-tpopmo.adb (Timed_Sleep, Timed_Delay): Rewrite to allow
688 for incremental looping. Remove references to Rel_Time and
690 * libgnat/s-osprim__posix.adb, libgnat/s-osprim__posix2008.adb
691 (Timed_Delay): Make separate.
692 * libgnat/s-optide.adb: New separate procedure.
693 * libgnat/s-osprim.ads (Max_System_Delay): New constant.
694 * libgnat/s-osprim__lynxos.ads (Max_Sensible_Delay): Set to 6 months.
695 (Max_System_Delay): New constant.
697 2018-05-25 Ed Schonberg <schonberg@adacore.com>
699 * sem_ch12.adb (Validate_Derived_Type_Instance): Verify that the actual
700 for a formal derived type implements all the interfaces declared for
703 2018-05-25 Yannick Moy <moy@adacore.com>
705 * sem_prag.adb (Check_Applicable_Policy): Deal specially with CodePeer
706 and GNATprove modes when applicable policy is Ignore.
708 2018-05-25 Eric Botcazou <ebotcazou@adacore.com>
710 * freeze.adb (Freeze_Enumeration_Type): Do not give integer size to a
711 boolean type with convention C.
712 * libgnat/i-cexten.ads (bool): Change to boolean with convention C.
713 * gcc-interface/decl.c (gnat_to_gnu_entity): Add new local variable
714 FOREIGN and use it throughout the function.
715 <E_Enumeration_Type>: Set precision 1 on boolean types with foreign
717 <E_Enumeration_Subtype>: Likewise for subtypes.
718 <E_Record_Type>: Force the size of a storage unit on empty classes.
719 * gcc-interface/utils.c (make_type_from_size) <BOOLEAN_TYPE>: Skip
720 boolean types with precision 1 if the size is the expected one.
722 2018-05-25 Arnaud Charlet <charlet@adacore.com>
724 * pprint.adb (Expression_Name): Do not print non ASCII characters.
726 2018-05-25 Bob Duff <duff@adacore.com>
728 * libgnat/a-strunb__shared.ads, libgnat/a-stwiun__shared.ads,
729 libgnat/a-stzunb__shared.ads: (Initialize, Adjust): Add pragma Inline.
731 2018-05-25 Bob Duff <duff@adacore.com>
733 * sem_util.ads: Minor comment fix.
735 2018-05-25 Ed Schonberg <schonberg@adacore.com>
737 * exp_unst.adb (Visit_Node): Restrict check for uplevel references in
738 prefixes of array attributes, to prefixes that are entity names whose
740 (Note_Uplevel_Bound): Verify that the bound is declared in an enclosing
741 subprogram, as itype created for loops in pre/postcondition may appear
742 in loops at the library level.
744 2018-05-25 Ed Schonberg <schonberg@adacore.com>
746 * sem_ch13.adb (Build_Predicate_Functions): The predicate function
747 declaration is inserted into the tree and analyzed at that point, so
748 should not be reinserted when the body is constructed. Inside a
749 generic, ensure that the body is not inserted twice in the tree.
751 2018-05-25 Yannick Moy <moy@adacore.com>
753 * sem_prag.adb (Check_Grouping): Modify test to ignore statements and
754 declarations not coming from source.
756 2018-05-25 Fedor Rybin <frybin@adacore.com>
758 * doc/gnat_ugn/gnat_utility_programs.rst: Document new switch
759 --copy-environment for gnattest.
761 2018-05-24 Piotr Trojanek <trojanek@adacore.com>
763 * sem_elab.adb (Non_Private_View): Simplify by removing a local Result
765 * sem_prag.adb (Get_Base_Subprogram): Same as above.
767 2018-05-24 Eric Botcazou <ebotcazou@adacore.com>
769 * fe.h (Set_Normalized_First_Bit): Declare.
770 (Set_Normalized_Position): Likewise.
771 * repinfo.adb (List_Record_Layout): Do not use irregular output for a
772 variable position. Fix minor spacing issue.
773 * gcc-interface/decl.c (annotate_rep): If a field has a variable
774 offset, compute the normalized position and annotate it in addition to
777 2018-05-24 Eric Botcazou <ebotcazou@adacore.com>
779 * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu):
780 Constify and rename variables. Fix formatting.
781 (gnat_to_gnu) <N_Exception_Handler>: Minor tweak.
782 <N_Raise_Statement>: Likewise.
784 2018-05-24 Javier Miranda <miranda@adacore.com>
786 * exp_ch8.adb (Build_Body_For_Renaming): Adding support to build the
787 body of a variant record equality renaming.
788 (Expand_N_Subprogram_Renaming_Declaration): Adapt the code to the new
789 implementation of Build_Body_For_Renaming.
790 * exp_ch3.ads (Build_Variant_Record_Equality): New library level
791 function that factorizes the functionality needed by
792 Build_Body_For_Renaming and Expand_Freeze_Record_Type to build the body
793 of a variant record equality subprogram.
794 * exp_ch3.adb (Build_Variant_Record_Equality): New subprogram.
795 (Build_Variant_Record_Equality): New local procedure of
796 Expand_Freeze_Record_Type containing all the code specific for freezing
797 the record type that cannot be place in the new library level function.
799 2018-05-24 Ed Schonberg <schonberg@adacore.com>
801 * einfo.ads, einfo.adb (Is_Activation_Record): New flag on
802 in_parameters, used when unesting subprograms for LLVM, to indicate
803 that a generated parameter carries the activation record from the
804 enclosing subprogram.
805 * exp_unst.adb (Check_Static_Type): Handle array attributes of types
806 whose bounds may contain up-level references that need to be added to
807 an activation recoord.
808 (Add_Extra_Formal): Set Is_Activation_Record on new formal.
810 2018-05-24 Yannick Moy <moy@adacore.com>
812 * pprint.adb (Expression_Image): Improve the printing of expressions,
813 by taking more cases into account, in particular qualified expressions
814 and aggregates. Also count more the number of parentheses to close
815 after the expression.
817 2018-05-24 Javier Miranda <miranda@adacore.com>
819 * sem_ch3.adb (Is_Visible_Component): For untagged types add missing
820 check for renamed discriminants.
821 * sem_ch4.adb (Analyze_Overloaded_Selected_Component,
822 Analyze_Selected_Component, Check_Misspelled_Selector): For calls to
823 Is_Visible_Component pass the associated selector node to allow
824 checking renamed discriminants on untagged types.
826 2018-05-24 Ed Schonberg <schonberg@adacore.com>
828 * sem_ch8.adb (Analyze_Use_Type): Do not assign the Prev_Use_Clause
829 link to a use_type clause if this would cause an infinite loop in the
830 machinery that detects redundant use clauses. This may happen when the
831 redundant clauses appear in the context of a child unit and the context
834 2018-05-24 Piotr Trojanek <trojanek@adacore.com>
836 * sinfo.ads: Fix grammar in comment.
838 2018-05-24 Justin Squirek <squirek@adacore.com>
840 * einfo.ads, einfo.adb (Append_Entity): Modified to use Link_Entities
841 and manage doubly-linked entity chain.
842 (Nested_Scenarios): Removed entity field used for optimization during
843 elaboration to make room for the new field Prev_Entity.
844 (Link_Entities): Added to replace redundant calls to Set_Next_Entity
845 and Set_Prev_Entity as well as centralize changes to the entity chain.
846 (Predicated_Parent): Modified to use Node38.
847 (Prev_Entity): Added to fetch new node field Prev_Entity in all entity
849 (Remove_Entity): Moved from sem_util.
850 (Set_Nested_Scenarios): Deleted.
851 (Set_Predicated_Parent): Modified to use Node38.
852 (Set_Prev_Entity): Added to set Prev_Entity field.
853 (Set_Validated_Object): Modified to use Node38.
854 (Unlink_Next_Entity): Added to process Prev_Entity when an unlinking
856 (Validated_Object): Modified to use Node38.
857 (Write_Field36_Name): Remove Nested_Scenarios, Validated_Object, and
858 predicated parent cases.
859 (Write_Field38_Name): Add predicated parent and Validated_Object cases.
860 * sem_ch3.adb (Process_Subtype): Add guard to protect against
861 inappropriate marking of Predicated_Parent to non-itype subtypes.
862 (Make_Class_Wide_Type): Preserve Prev_Entity field and set in new type.
863 (Copy_And_Swap): Add setting of Prev_Entity.
864 (Build_derived_Record_Type): Replace Set_Next_Entity w/ Link_Entities.
865 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Replace Set_Next_Entity
867 (New_Overloaded_Entity): Remove block created to search for previous
868 entities in the entity chain with relevant calls to Prev_Entity as well
869 as replace duplicated code from Remove_Entity_And_Homonym with a call
871 * sem_ch7.adb (Exchange_Declarations): Replace Set_Next_Entity w/
873 * sem_elab.adb (Find_And_Process_Nested_Scenarios): Remove global and
874 initial subprogram declarations related to Nested_Scenarios.
875 (Process_Nested_Scenarios): Deleted.
876 (Save_Scenario): Deleted.
877 (Traverse_Body): Remove optimization for Nested_Scenarios so as to free
878 node space in the entity tree.
879 * sem_util.adb, sem_util.ads (Remove_Entity): Moved to einfo.
880 (Remove_Entity_And_Homonym): Added to separate functionality of
881 Remove_Entity from the homonym chain directly.
882 * exp_attr.adb (Expand_N_Attribute_Reference): Replace Set_Next_Entity
883 w/ Link_Entities and Unlink_Next_Entity.
884 * exp_ch3.adb (Expand_N_Object_Declaration): Replace Set_Next_Entity w/
886 * exp_ch6.adb (Replace_Renaming_Declaration_Id): Replace
887 Set_Next_Entity w/ Link_Entities.
888 * exp_disp.adb (Expand_Dispatching_Call): Replace Set_Next_Entity w/
889 Link_Entities and Unlink_Next_Entity.
890 * exp_spark.adb (Expand_SPARK_N_Object_Renaming_Declaration): Replace
891 call to Remove_Entity with its new incarnation.
892 * exp_util.adb (New_Class_Wide_Subtype): Add setting of Prev_Entity.
893 * freeze.adb (Freeze_Record_Type): Replace Set_Next_Entity w/
896 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
898 * sem_ch10.adb (Expand_Limited_With_Clause): Update the call to
899 Install_Limited_Withed_Unit.
900 (Expand_With_Clause): Update the call to Install_Withed_Unit.
901 (Implicit_With_On_Parent): Update the call to Install_Withed_Unit.
902 (Install_Context_Clauses): Update the call to Install_Withed_Unit.
903 (Install_Limited_Context_Clauses): Update the calls to
904 Install_Limited_Withed_Unit.
905 (Install_Limited_Withed_Unit): Renamed to better illustrate its
907 (Install_Private_With_Clauses): Update the calls to Install_Withed_Unit
908 and Install_Limited_Withed_Unit.
909 (Install_With_Clause): Uninstall a limited with clause if a [private]
910 with clause is given for the same package.
911 (Install_Withed_Unit): Renamed to better illustrate its purpose.
912 (Remove_Limited_With_Unit): New routine.
914 2018-05-24 Eric Botcazou <ebotcazou@adacore.com>
916 * raise-gcc.c (__gnat_SEH_error_handler): Remove prototype.
917 (__gnat_personality_seh0): Adjust and beef up comments, and
918 fix formatting throughout.
919 (__gnat_adjust_context): Deal minimally with version 2.
920 * seh_init.c (__gnat_map_SEH): Fix formatting.
921 (_gnat_SEH_error_handler): Adjust comments.
922 (__gnat_install_SEH_handler): Fix formatting.
924 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
926 * exp_ch7.adb, sem_ch3.adb, sem_res.adb: Minor reformatting.
928 2018-05-24 Ed Schonberg <schonberg@adacore.com>
930 * exp_aggr.adb (Flatten): Add a warning on an others clause in an array
931 aggregate with static bounds when named associations cover all index
932 positions and the others clause is redundant.
934 2018-05-24 Raphael Amiard <amiard@adacore.com>
936 * libgnat/a-cohama.ads: Add documentation.
938 2018-05-24 Raphael Amiard <amiard@adacore.com>
940 * libgnat/a-convec.ads: Add documentation.
942 2018-05-24 Justin Squirek <squirek@adacore.com>
944 * exp_ch3.adb (Expand_N_Object_Declaration): Ignore raising an error in
945 expansion for limited tagged types when the node to be expanded is a
946 raise expression due to it not representing a valid object.
947 * exp_ch5.adb (Expand_N_Assignment_Statement): Add exception to error
948 message regarding assignments to limited types to ignore genereated
951 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
953 * exp_util.adb (New_Class_Wide_Subtype): Capture and restore relevant
954 Ghost-related attributes of the class-wide subtype because the copy
957 2018-05-24 Justin Squirek <squirek@adacore.com>
959 * sem_res.adb (Resolve_Entity_Name): Add guard to protect against
960 marking use clauses as effective when the reference appears within
963 2018-05-24 Cyrille Comar <comar@adacore.com>
965 * doc/gnat_rm/the_gnat_library.rst: Fix typos.
966 * gnat_rm.texi: Regenerate.
968 2018-05-24 Bob Duff <duff@adacore.com>
970 * exp_ch7.adb (Expand_Cleanup_Actions): Create a mark unconditionally
971 for build-in-place functions with a caller-unknown-size result.
972 (Create_Finalizer): For build-in-place functions with a
973 caller-unknown-size result, check at run time whether we need to
974 release the secondary stack.
976 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
978 * sem_prag.adb (Analyze_Pragma): Use the full view of an internally
979 generated incomplete type.
981 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
983 * expander.adb (Expand): Update the save and restore of the Ghost
985 * exp_ch3.adb (Freeze_Type): Likewise.
986 * exp_disp.adb (Make_DT): Likewise.
987 * exp_util.adb (Build_DIC_Procedure_Body): Likewise.
988 (Build_DIC_Procedure_Declaration): Likewise.
989 (Build_Invariant_Procedure_Body): Likewise.
990 (Build_Invariant_Procedure_Declaration): Likewise.
991 (Make_Predicate_Call): Likewise.
992 * freeze.adb (Add_To_Result): Insert the freeze action of a living
993 entity prior to the start of the enclosing ignored Ghost region.
994 (Freeze_Entity): Update the save and restore of the Ghost region.
995 * ghost.adb (Install_Ghost_Mode): Reimplemented.
996 (Install_Ghost_Region): New routine.
997 (Mark_And_Set_Ghost_Assignment): Install a region rather than a mode.
998 (Mark_And_Set_Ghost_Body): Likewise.
999 (Mark_And_Set_Ghost_Completion): Likewise.
1000 (Mark_And_Set_Ghost_Declaration): Likewise.
1001 (Mark_And_Set_Ghost_Instantiation): Likewise.
1002 (Mark_And_Set_Ghost_Procedure_Call): Likewise.
1003 (Name_To_Ghost_Mode): New routine.
1004 (Restore_Ghost_Region): New routine.
1005 * ghost.ads (Install_Ghost_Region): New routine.
1006 (Restore_Ghost_Region): New routine.
1007 * opt.ads: Add new global variable Ignored_Ghost_Region.
1008 * rtsfind.adb (Load_RTU): Update the save and restore of the Ghost
1009 region. Install a clean region.
1010 * sem.adb (Analyze): Likewise.
1011 (Do_Analyze): Likewise.
1012 * sem_ch3.adb (Analyze_Object_Declaration): Likewise
1013 (Derive_Progenitor_Subprograms): Use local variable Iface_Alias to
1014 capture the ultimate alias of the current primitive.
1015 (Process_Full_View): Update the save and restore of the Ghost region.
1016 Do not inherit DIC and invariant procedures.
1017 * sem_ch5.adb (Analyze_Assignment): Update the save and restore of the
1019 * sem_ch6.adb (Analyze_Procedure_Call): Likewise.
1020 (Analyze_Subprogram_Body_Helper): Likewise.
1021 * sem_ch7.adb (Analyze_Package_Body_Helper): Likewise.
1022 * sem_ch12.adb (Analyze_Package_Instantiation): Likewise.
1023 (Analyze_Subprogram_Instantiation): Likewise.
1024 (Instantiate_Package_Body): Likewise.
1025 (Instantiate_Subprogram_Body): Likewise.
1026 * sem_ch13.adb (Build_Predicate_Functions): Likewise.
1027 (Build_Predicate_Function_Declaration): Likewise.
1029 (Add_Dispatching_Operation): Do not consider DIC and invariant
1031 (Check_Dispatching_Operation): Use Add_Dispatching_Operation to collect
1032 a dispatching subprogram.
1033 (Check_Operation_From_Private_View): Likewise.
1034 (Override_Dispatching_Operation): Likewise.
1035 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Update the save
1036 and restore of the Ghost region.
1037 (Analyze_Initial_Condition_In_Decl_Part): Likewise.
1038 (Analyze_Pragma): Update the save and restore of the Ghost region.
1039 (Analyze_Pre_Post_Condition_In_Decl_Part): Likewise.
1040 * sem_util.adb (Is_Suitable_Primitive): New routine.
1041 * sem_util.ads (Is_Suitable_Primitive): New routine.
1042 * sinfo.ads: Update the section of Ghost regions.
1044 2018-05-24 Piotr Trojanek <trojanek@adacore.com>
1046 * doc/gnat_rm/implementation_defined_pragmas.rst (Contract_Cases):
1047 Change "condition" to "case guard" after renaming in the contract
1049 * gnat_rm.texi: Regenerate.
1051 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
1053 * exp_util.adb (Expand_Static_Predicates_In_Choices): Indicate that the
1054 construct with discrete choices no longer contains a subtype with
1055 predicates since the expansion already handled this case.
1057 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
1059 * freeze.adb (Wrap_Imported_Subprogram): Generate an unchecked
1060 conversion to the return type to avoid a side effect where an imported
1061 relocated function generates a new anonymous access type, whose
1062 accessibility level does not agree with with that of the wrapper.
1064 2018-05-24 Javier Miranda <miranda@adacore.com>
1066 * sem_util.adb (Abstract_Interface_List): Add missing support for
1067 private types whose full view is a synchronized type.
1068 * sem_ch3.adb (Build_Derived_Private_Type): Skip building the full
1069 derivation of a private type parent type is a task type with
1070 discriminants as gigi does not use such type directly.
1072 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
1074 * sem_elab.adb (Build_Variable_Reference_Marker): Do not create a
1075 variable marker when the reference appears in the formal part of a
1076 compilation unit instance because there is no place to insert it.
1077 (In_Compilation_Instance_Formal_Part): New routine.
1079 2018-05-24 Piotr Trojanek <trojanek@adacore.com>
1081 * layout.ads, repinfo.ads: Fix references to renamed Backend_Layout
1082 configuration parameter.
1084 2018-05-24 Doug Rupp <rupp@adacore.com>
1086 * argv-lynxos178-raven-cert.c: New file.
1087 * libgnat/system-lynxos178-x86.ads: New file.
1089 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
1091 * exp_disp.adb, freeze.adb, gnat1drv.adb, sem_ch5.adb, sem_spark.adb:
1092 Minor reformattings.
1094 2018-05-23 Pascal Obry <obry@adacore.com>
1096 * adaint.c (win32_wait): Properly free the handle/pid lists when
1097 WaitForMultipleObjects fails (return WAIT_FAILED).
1099 2018-05-23 Pascal Obry <obry@adacore.com>
1101 * adaint.c (win32_wait): Add missing parentheses.
1103 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
1105 * exp_ch3.adb (Check_Large_Modular_Array): Moved to Freeze.
1106 (Expand_N_Object_Declaration): Do not check for a large modular array
1108 * freeze.adb (Check_Large_Modular_Array): Moved from Exp_Ch3.
1109 (Freeze_Object_Declaration): Code cleanup. Check for a large modular
1111 * sem_ch3.adb: Minor reformatting.
1113 2018-05-23 Ed Schonberg <schonberg@adacore.com>
1115 * einfo.ads: New attribute on types: Predicated_Parent, to simplify the
1116 retrieval of the applicable predicate function to an itype created for
1117 a constrained array component.
1118 * einfo.adb: Subprograms for Predicated_Parent.
1119 (Predicate_Function): Use new attribute.
1120 * exp_util.adb (Make_Predicate_Call): If the predicate function is not
1121 available for a subtype, retrieve it from the base type, which may have
1122 been frozen after the subtype declaration and not captured by the
1123 subtype declaration.
1124 * sem_aggr.adb (Resolve_Array_Aggregate): An Others association is
1125 legal within a generated initiqlization procedure, as may happen with a
1126 predicate check on a component, when the predicate function applies to
1127 the base type of the component.
1128 * sem_ch3.adb (Analyze_Subtype_Declaration): Clean up inheritance of
1129 predicates for subtype declarations and for subtype indications in
1131 (Process_Subtype): Likewise. Handle properly the case of a private type
1132 with unknown discriminants whose full view is an unconstrained array.
1133 Use Predicated_Parent to indicate source of predicate function on an
1134 itype whose parent is itself an itype.
1135 (Complete_Private_Subtype): If the private view has unknown
1136 discriminants and the full view is an unconstrained array, set base
1137 type of completion to the full view of parent.
1138 (Inherit_Predicate_Flags): Prevent double assignment of predicate
1140 (Build_Subtype): For a constrained array component, propagate predicate
1141 information from original component type declaration.
1143 2018-05-23 Boris Yakobowski <yakobowski@adacore.com>
1145 * libgnat/a-ngelfu.ads (Arctanh, Arccoth): Fix faulty preconditions.
1147 2018-05-23 Arnaud Charlet <charlet@adacore.com>
1149 * checks.adb (Minimize_Eliminate_Overflows): Default initialize Lo and
1151 * sem_elab.adb: Make "out" parameters instead of "in out" when
1154 2018-05-23 Bob Duff <duff@adacore.com>
1156 * gnatbind.adb (List_Applicable_Restrictions): Add
1157 No_Implementation_Restrictions to the list of restrictions not to list.
1158 Remove double negative "not No_Restriction_List". Comment the
1159 commentary that is output, so it won't cause errors if used directly in
1162 2018-05-23 Ed Schonberg <schonberg@adacore.com>
1164 * sem_prag.adb (Inherit_Class_Wide_Pre): Refine legality check on
1165 class-wide precondition on a type extension when ancestor does not have
1166 a class-wide precondition. Previously the compiler accepted such a
1167 precondition when the ancestor had a class-wide postcondition.
1169 2018-05-23 Javier Miranda <miranda@adacore.com>
1171 * sem_attr.adb (Valid_Scalars): Do not invoke Error_Attr_P to report
1172 the warning on occurrences of this attribute whose evaluation is always
1173 true (since that subprogram aborts processing the attribute). In
1174 addition, replace the node by its boolean result 'True' (required
1175 because the backend has no knowledge of this attribute).
1177 2018-05-23 Bob Duff <duff@adacore.com>
1179 * libgnat/a-convec.adb: (Insert, Insert_Space): Suppress warnings. The
1180 code in question is not reachable in the case where Count_Type'Last is
1183 2018-05-23 Yannick Moy <moy@adacore.com>
1185 * doc/gnat_rm/implementation_defined_pragmas.rst: Clarify meaning of
1186 local pragma Warnings Off without On.
1187 * gnat_rm.texi: Regenerate.
1189 2018-05-23 Olivier Hainque <hainque@adacore.com>
1191 * libgnat/g-excact.ads (Is_Foreign_Exception): New predicate.
1192 * libgnat/g-excact.adb: Implement.
1194 2018-05-23 Ed Schonberg <schonberg@adacore.com>
1196 * sem_ch5.adb (Analyze_Iterator_Specification): If a subtype indication
1197 is present, verify its legality when the domain of iteration is a
1198 GNAT-specific formal container, as is already done for arrays and
1199 predefined containers.
1201 2018-05-23 Yannick Moy <moy@adacore.com>
1203 * sem_util.adb (Enclosing_Declaration): Fix the case of a named number
1204 declaration, which was not taken into account.
1206 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
1208 * debug.adb: Switch -gnatd_s is now used to stop elaboration checks on
1209 synchronized suspension.
1210 * rtsfind.ads: Add entries for units Ada.Synchronous_Barriers and
1211 Ada.Synchronous_Task_Control and routines Suspend_Until_True and
1213 * sem_elab.adb: Document switch -gnatd_s.
1214 (In_Task_Body): New routine.
1215 (Is_Potential_Scenario): Code cleanup. Stop the traversal of a task
1216 body when the current construct denotes a synchronous suspension call,
1217 and restriction No_Entry_Calls_In_Elaboration_Code or switch -gnatd_s
1219 (Is_Synchronous_Suspension_Call): New routine.
1220 * switch-c.adb (Scan_Front_End_Switches): Switch -gnatJ now sets switch
1223 2018-05-23 Javier Miranda <miranda@adacore.com>
1225 * exp_disp.adb (Make_DT): Restrict the initialization of
1226 External_Tag and Expanded_Name to an empty string to the case where
1227 both pragmas apply (i.e. No_Tagged_Streams and Discard_Names), since
1228 restricted runtimes are compiled with pragma Discard_Names.
1229 * doc/gnat_rm/implementation_defined_pragmas.rst,
1230 doc/gnat_rm/implementation_defined_characteristics.rst: Add
1232 * gnat_rm.texi: Regenerate.
1234 2018-05-23 Maroua Maalej <maalej@adacore.com>
1236 * sem_spark.adb: Fix of some permission rules of pointers in SPARK.
1238 2018-05-23 Ed Schonberg <schonberg@adacore.com>
1240 * sem_ch5.adb (Preanalyze_Range): The pre-analysis of the domain of
1241 iteration of an Ada2012 loop is performed to determine the type of the
1242 domain, but full analysis is performed once the loop is rewritten as a
1243 while-loop during expansion. The pre-analysis suppresses expansion; it
1244 must also suppress the generation of freeze nodes, which may otherwise
1245 appear in the wrong scope before rewritting.
1247 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
1249 * sem_elab.adb: Update the section on suppressing elaboration warnings.
1251 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
1253 * einfo.adb (Is_Elaboration_Checks_OK_Id): Use predicate
1254 Is_Elaboration_Target.
1255 (Is_Elaboration_Target): New routine.
1256 (Is_Elaboration_Warnings_OK_Id): Use predicate Is_Elaboration_Target.
1257 (Set_Is_Elaboration_Checks_OK_Id): Use predicate Is_Elaboration_Target.
1258 (Set_Is_Elaboration_Warnings_OK_Id): Use predicate
1259 Is_Elaboration_Target.
1260 * einfo.ads: Add new synthesized attribute Is_Elaboration_Target along
1261 with occurrences in nodes.
1262 (Is_Elaboration_Target): New routine.
1263 * sem_prag.adb (Analyze_Pragma): Suppress elaboration warnings when an
1264 elaboration target is subject to pragma Warnings (Off, ...).
1266 2018-05-23 Eric Botcazou <ebotcazou@adacore.com>
1268 * repinfo.adb (List_Type_Info): Remove obsolete stuff.
1270 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
1272 * einfo.adb: Flag304 is now Is_Elaboration_Warnings_OK_Id.
1273 (Is_Elaboration_Warnings_OK_Id): New routine.
1274 (Set_Is_Elaboration_Warnings_OK_Id): New routine.
1275 (Write_Entity_Flags): Output Flag304.
1276 * einfo.ads: Add new attribute Is_Elaboration_Warnings_OK_Id along with
1277 occurrences in entities.
1278 (Is_Elaboration_Warnings_OK_Id): New routine along with pragma Inline.
1279 (Set_Is_Elaboration_Warnings_OK_Id): New routine along with pragma
1281 * sem_attr.adb (Analyze_Access_Attribute): Capture the state of
1282 elaboration warnings.
1283 * sem_ch3.adb (Analyze_Object_Declaration): Capture the state of
1284 elaboration warnings.
1285 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Capture the
1286 state of elaboration warnings.
1287 (Analyze_Subprogram_Body_Helper): Capture the state of elaboration
1289 (Analyze_Subprogram_Declaration): Capture the state of elaboration
1291 * sem_ch9.adb (Analyze_Entry_Declaration): Capture the state of
1292 elaboration warnings.
1293 (Analyze_Single_Task_Declaration): Capture the state of elaboration
1295 (Analyze_Task_Type_Declaration): Capture the state of elaboration
1297 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Capture the state
1298 of elaboration warnings.
1299 (Analyze_Generic_Subprogram_Declaration): Capture the state of
1300 elaboration warnings.
1301 * sem_elab.adb: Add a section on suppressing elaboration warnings.
1302 Type Processing_Attributes includes component Suppress_Warnings
1303 intended to suppress any elaboration warnings along a path in the
1304 graph. Update Initial_State to include a value for this component.
1305 Types Target_Attributes and Task_Attriutes include component
1306 Elab_Warnings_OK to indicate whether the target or task has elaboration
1307 warnings enabled. component Elab_Warnings_OK.
1308 (Build_Access_Marker): Propagate attribute
1309 Is_Elaboration_Warnings_OK_Node from the attribute to the generated
1311 (Extract_Instantiation_Attributes): Set the value for Elab_Warnings_OK.
1312 (Extract_Target_Attributes): Set the value for Elab_Warnings_OK.
1313 (Extract_Task_Attributes): Set the value for Elab_Warnings_OK.
1314 (Process_Conditional_ABE_Access): Suppress futher elaboration warnings
1315 when already in this mode or when the attribute or target have warnings
1317 (Process_Conditional_ABE_Activation_Impl): Do not emit any diagnostics
1318 if warnings are suppressed.
1319 (Process_Conditional_ABE_Call): Suppress further elaboration warnings
1320 when already in this mode, or the target or call have warnings
1322 (Process_Conditional_ABE_Call_Ada): Do not emit any diagnostics if
1323 warnings are suppressed.
1324 (Process_Conditional_ABE_Call_SPARK): Do not emit any diagnostics if
1325 warnings are suppressed.
1326 (Process_Conditional_ABE_Instantiation): Suppress further elaboration
1327 warnings when already in this mode or when the instantiation has
1328 warnings suppressed.
1329 (Process_Conditional_ABE_Instantiation_Ada): Do not emit any
1330 diagnostics if warnings are suppressed.
1331 (Process_Conditional_ABE_Variable_Assignment_Ada): Use the more
1332 specific Is_Elaboration_Warnings_OK_Id rather than Warnings_Off.
1333 (Process_Conditional_ABE_Variable_Assignment_SPARK): Use the more
1334 specific Is_Elaboration_Warnings_OK_Id rather than Warnings_Off.
1335 (Process_Task_Object): Suppress further elaboration warnings when
1336 already in this mode, or when the object, activation call, or task type
1337 have warnings suppressed. Update the processing state to indicate that
1338 the path goes through a task body.
1339 * sinfo.adb (Is_Elaboration_Warnings_OK_Node): Accept attribute
1341 (Set_Is_Elaboration_Warnings_OK_Node): Accept attribute references.
1342 * sinfo.ads: Attribute Is_Elaboration_Warnings_OK_Node now applies to
1343 attribute references.
1345 2018-05-23 Piotr Trojanek <trojanek@adacore.com>
1347 * einfo.ads: Minor reformatting.
1349 2018-05-23 Ed Schonberg <schonberg@adacore.com>
1351 * sem_ch3.adb (Analyze_Object_Declaration): If expression is an
1352 anonymous_access_to_ subprogram formal, apply a conversion to force an
1353 accsssibility check that will fail statically, enforcing 3.10.2 (13).
1355 2018-05-23 Daniel Mercier <mercier@adacore.com>
1357 * gnat1drv.adb: Turn off length expansion in CodePeer mode.
1359 2018-05-23 Bob Duff <duff@adacore.com>
1361 * freeze.adb: (Check_Address_Clause): Deal with build-in-place
1362 aggregates in addition to build-in-place calls.
1364 2018-05-23 Bob Duff <duff@adacore.com>
1366 * einfo.ads: Minor reformatting.
1367 * sem_ch3.adb: Likewise.
1368 * sinfo.ads: Likewise.
1370 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
1372 * exp_ch3.adb (Default_Initialize_Object): Do not optimize scalar array
1373 initialization when the component type has predicates.
1374 * exp_ch4.adb (Expand_N_Allocator): Do not optimize scalar array
1375 allocation when the component type has predicates.
1377 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
1379 * einfo.adb, exp_disp.adb, sem_ch3.adb, sem_ch6.adb, sem_prag.adb:
1382 2018-05-22 Justin Squirek <squirek@adacore.com>
1384 * sem_ch6.adb (Analyze_Expression_Function): Propagate flags from the
1385 original function spec into the generated function spec due to
1386 expansion of expression functions during analysis.
1387 (Analyze_Subprogram_Body_Helper): Modify check on formal parameter
1388 references from the body to the subprogram spec in the case of
1389 expression functions because of inconsistances related to having a
1391 * libgnarl/s-osinte__android.ads: Flag parameters as unused.
1392 * libgnarl/s-osinte__lynxos178e.ads: Likewise.
1393 * libgnarl/s-osinte__qnx.adb: Likewise.
1394 * libgnarl/s-osinte__qnx.ads: Likewise.
1396 2018-05-22 Doug Rupp <rupp@adacore.com>
1398 * init.c (HAVE_ADJUST_CONTEXT_FOR_RAISE): Don't define on VxWorks7 for
1401 2018-05-22 Olivier Hainque <hainque@adacore.com>
1403 * libgnat/a-except.adb (Exception_Propagation.Propagate_Exception):
1404 Expect an Exception_Occurence object, not an Access.
1405 (Complete_And_Propagate_Occurrence): Adjust accordingly.
1406 (Raise_From_Signal_Handler): Likewise.
1407 (Reraise_Occurrence_No_Defer): If we have a Machine_Occurrence
1408 available in the provided occurrence object, just re-propagate the
1409 latter as a bare "raise;" would do.
1410 * libgnat/a-exexpr.adb (Propagate_Exception): Adjust to spec change.
1411 * libgnat/a-exstat.adb (String_To_EO): Initialize X.Machine_Occurrence
1412 to null, to mark that the occurrence we're crafting from the stream
1413 contents is not being propagated (yet).
1415 2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1417 * exp_aggr.adb (Initialize_Ctrl_Record_Component): Insert the generated
1418 code for a transient component in line with the rest of the
1419 initialization code, rather than before the aggregate. This ensures
1420 that the component has proper visibility of the discriminants.
1422 2018-05-22 Jerome Lambourg <lambourg@adacore.com>
1424 * adaint.c: Reorganize QNX-specific macros, use syspage to retreive the
1427 2018-05-22 Jerome Lambourg <lambourg@adacore.com>
1429 * sigtramp-qnx.c: Properly restore link register in signal trampoline.
1431 2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1433 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Strip away any
1434 conversions before extracting the value of the expression.
1435 * exp_ch3.adb (Default_Initialize_Object): Optimize the default
1436 initialization of an array of scalars.
1437 (Get_Simple_Init_Val): Add processing for array types. Remove the
1438 processing of strings because this case is already handled by the array
1440 (Needs_Simple_Initialization): Moved to Sem_Util.
1441 (Simple_Init_Array_Type): New routine.
1442 (Simple_Init_Initialize_Scalars_Type): Reimplemented to use the new
1443 facilities from Sem_Util.
1444 (Simple_Initialization_OK): New routine.
1445 * exp_ch3.ads (Needs_Simple_Initialization): Moved to Sem_Util.
1446 * exp_ch4.adb (Expand_N_Allocator): Optimize the default allocation of
1447 an array of scalars.
1448 * sem_prag.adb (Analyze_Float_Value): New routine.
1449 (Analyze_Integer_Value): New routine.
1450 (Analyze_Pragma): Reimplement the analysis of pragma Initialize_Scalars
1451 to handled the extended form of the pragma.
1452 (Analyze_Type_Value_Pair): New routine.
1453 * sem_util.adb: Add invalid value-related data structures.
1454 (Examine_Array_Bounds): New routine.
1455 (Has_Static_Array_Bounds): Reimplemented.
1456 (Has_Static_Non_Empty_Array_Bounds): New routine.
1457 (Invalid_Scalar_Value): New routine.
1458 (Needs_Simple_Initialization): Moved from Exp_Ch3.
1459 (Set_Invalid_Scalar_Value): New routines.
1460 * sem_util.ads (Has_Static_Non_Empty_Array_Bounds): New routine.
1461 (Invalid_Scalar_Value): New routine.
1462 (Needs_Simple_Initialization): Moved from Exp_Ch3.
1463 (Set_Invalid_Scalar_Value): New routines.
1464 * snames.ads-tmpl: Add names for the salar type families used by pragma
1467 2018-05-22 Javier Miranda <miranda@adacore.com>
1469 * exp_disp.adb (Make_DT): Initialize the External_Tag with an empty
1470 string when pragma No_Tagged_Streams is applicable to the tagged type,
1471 and initialize the Expanded_Name with an empty string when pragma
1472 Discard_Names is applicable to the tagged type.
1474 2018-05-22 Ed Schonberg <schonberg@adacore.com>
1476 * sem_ch6.adb (Check_Conformance): Add RM reference for rule that a
1477 formal subprogram is never subtype conformqnt, and thus cannot be the
1478 prefix of 'Access. Reject as well the attribute when applied to a
1479 renaming of a formal subprogram.
1481 2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1483 * exp_ch3.adb (Build_Array_Init_Proc): Update the call to
1484 Needs_Simple_Initialization.
1485 (Build_Init_Statements): Update the call to Get_Simple_Init_Val.
1486 (Check_Subtype_Bounds): Renamed to Extract_Subtype_Bounds. Update the
1487 profile and comment on usage.
1488 (Default_Initialize_Object): Do not use New_Copy_Tree to set the proper
1489 Sloc of a value obtained from aspect Default_Value because this could
1490 potentially replicate large trees. The proper Sloc is now set in
1491 Get_Simple_Init_Val.
1492 (Get_Simple_Init_Val): Reorganized by breaking the various cases into
1493 separate routines. Eliminate the use of global variables.
1494 (Init_Component): Update the call to Get_Simple_Init_Val.
1495 (Needs_Simple_Initialization): Update the parameter profile and all
1497 (Simple_Init_Defaulted_Type): Copy the value of aspect Default_Value
1498 and set the proper Sloc.
1499 * exp_ch3.ads (Get_Simple_Init_Val): Update the parameter profile and
1501 (Needs_Simple_Initialization): Update the parameter profile.
1503 2018-05-22 Patrick Bernardi <bernardi@adacore.com>
1505 * sem_ch3.adb (Build_Discriminant_Constraints): Raise an error if the
1506 user tries to use a subtype indication as a discriminant constraint.
1508 2018-05-22 Ed Schonberg <schonberg@adacore.com>
1510 * exp_ch4.ads, exp_ch4.adb, exp_util.adb, expander.adb: Remove mention
1511 of N_Reduction_Expression and N_Reduction_Expression_Parameter.
1512 * par-ch4.adb: Remove parsing routines for reduction expressions.
1513 * sem.adb, sinfo.ads, sinfo.adb, sem_ch4.ads, sem_ch4.adb, sem_res.adb,
1514 sem_spark.adb, sprint.adb: Remove analysis routines for reduction
1517 2018-05-22 Arnaud Charlet <charlet@adacore.com>
1519 * sem_ch8.adb (Check_Frozen_Renaming): Do not emit error in
1520 Relaxed_RM_Semantics mode.
1522 2018-05-22 Arnaud Charlet <charlet@adacore.com>
1524 * comperr.adb (Delete_SCIL_Files): Take into account
1525 N_Generic_Package_Renaming_Declaration.
1527 2018-05-22 Ed Schonberg <schonberg@adacore.com>
1529 * sem_ch3.adb (Search_Derivation_Levels): Whenever a parent type is
1530 private, use the full view if available, because it may include renamed
1531 discriminants whose values are stored in the corresponding
1534 2018-05-22 Ed Schonberg <schonberg@adacore.com>
1536 * einfo.ads, einfo.adb: New attribute Hidden_In_Formal_Instance,
1537 defined on packages that are actuals for formal packages, in order to
1538 set/reset the visibility of the formals of a formal package with given
1539 actuals, when there are subsequent uses of those formals in the
1540 enclosing generic, as required by RN 12.7 (10).
1541 * atree.ads, atree.adb: Add operations for Elist30.
1542 * atree.h: Add Elist30.
1543 * sem_ch12.adb (Analyze_Formal_Package_Instantiation): Collect formals
1544 that are not defaulted and are thus not visible within the current
1546 (Check_Formal_Packages): Reset visibility of formals of a formal
1547 package that are not defaulted, on exit from current instance.
1549 2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1551 * sem_prag.adb (Analyze_Input_Output): Emit an error when a non-null,
1552 non-'Result output appears in the output list of a function.
1554 2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1556 * exp_attr.adb (Build_Array_VS_Func): Reimplemented.
1557 (Build_Record_VS_Func): Reimplemented.
1558 (Expand_N_Attribute): Reimplement the handling of attribute
1560 * sem_attr.adb (Analyze_Attribute): Reimplement the handling of
1561 attribute 'Valid_Scalars.
1562 * sem_util.adb (Scalar_Part_Present): Reimplemented.
1563 (Validated_View): New routine.
1564 * sem_util.ads (Scalar_Part_Present): Update the parameter profile and
1566 (Validated_View): New routine.
1567 * doc/gnat_rm/implementation_defined_attributes.rst: Update the
1568 documentation of attribute 'Valid_Scalars.
1569 * gnat_rm.texi: Regenerate.
1571 2018-05-22 Bob Duff <duff@adacore.com>
1573 * binde.adb: (Choose): Ignore a pragma Elaborate_Body that appears in
1574 the spec of a SAL_Interface package.
1576 2018-05-22 Ed Schonberg <schonberg@adacore.com>
1578 * freeze.adb (Freeze_Entity): When analyzing delayed aspects of an
1579 entity E within a generic unit, indicate that there are no remaining
1580 delayed aspects after invoking Analyze_Aspects_At_Freeze_Point. The
1581 entity E is not frozen yet but the aspects should not be reanalyzed at
1582 the freeze point, which may be outside of the generic and may not have
1583 the proper visibility.
1585 2018-05-22 Bob Duff <duff@adacore.com>
1587 * doc/gnat_ugn/gnat_utility_programs.rst: Add documentation for
1588 the new --split-line-before-record, --indent-named-statements and
1589 --no-align-modes gnatpp switches.
1591 2018-05-22 Ed Schonberg <schonberg@adacore.com>
1593 * sem_prag.adb (Process_Compile_Time_Warning_Or_Error): Handle properly
1594 a second argument that is a constant of a given string value.
1596 2018-05-22 Doug Rupp <rupp@adacore.com>
1598 * sigtramp-vxworks-target.inc: Align stack to 128bits on AArch64.
1600 2018-05-22 Jerome Lambourg <lambourg@adacore.com>
1602 * sigtramp-qnx.c: Fix stack alignment issue in the signal trampoline.
1604 2018-05-22 Ed Schonberg <schonberg@adacore.com>
1606 * freeze.adb (Freeze_Fixed_Point_Type): If the first subtype has
1607 delayed aspects, analyze them now, os that the representation of the
1608 type (size, bounds) can be computed and validated.
1610 2018-05-22 Olivier Hainque <hainque@adacore.com>
1612 * libgnat/s-dwalin.adb (Enable_Cache): Skip symbols outside of the
1613 executable code section boundaries.
1615 2018-05-22 Javier Miranda <miranda@adacore.com>
1617 * locales.c: New implementation for the Ada.Locales package.
1618 * libgnat/a-locale.ads: Remove comment indicating that this is not
1620 * doc/gnat_rm/standard_library_routines.rst: Remove comment indicating
1621 that this is not implemented.
1622 * gnat_rm.texi: Regenerate.
1624 2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1626 * exp_ch5.adb, freeze.adb, pprint.adb, sem_ch4.adb, sem_res.adb: Minor
1629 2018-05-22 Justin Squirek <squirek@adacore.com>
1631 * sem_ch12.adb (In_Same_Declarative_Part): Moved to sem_util.
1632 (Freeze_Subprogram_Body, Install_Body): Modify calls to
1633 In_Same_Declarative_Part.
1634 * sem_prag.adb (Analyze_Pragma-Pragma_Pure_Function): Add check to
1635 verify pragma declaration is within the same declarative list with
1636 corresponding error message.
1637 * sem_util.adb, sem_util.ads (In_Same_Declarative_Part): Moved from
1638 sem_ch12.adb and generalized to be useful outside the scope of
1641 2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1643 * sem_ch6.adb (Analyze_Subprogram_Declaration): Set the proper
1644 categorization of the unit after processing the aspects in case one of
1645 its aspects is converted into a categorization pragma.
1647 2018-05-21 Ed Schonberg <schonberg@adacore.com>
1649 * freeze.adb (Warn_Overlay): Do not emit a wawrning on an object
1650 declaration with an explicit address clause and a type with default
1651 initialization, if the declaration carries an aspect
1652 Suppress_Initialization.
1654 2018-05-21 Daniel Mercier <mercier@adacore.com>
1656 * pprint.adb: Use mixed case for attribute names.
1658 2018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
1660 * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Rename the call to
1661 Analyze_Aspect_Specifications_On_Body_Or_Stub.
1662 (Analyze_Subprogram_Body_Helper): Rename the calls to
1663 Analyze_Aspect_Specifications_On_Body_Or_Stub.
1664 * sem_ch9.adb (Analyze_Entry_Body): Rename the call to
1665 Analyze_Aspect_Specifications_On_Body_Or_Stub.
1666 * sem_ch10.adb: Add with and use clause for Sem_Ch13.
1667 (Analyze_Package_Body_Stub): Add constant Id. Decorate the package stub
1668 prior to analyzing its aspects.
1669 (Analyze_Protected_Body_Stub): Add constant Id. Decorate the package
1670 stub prior to analyzing its aspects. Save and restore the configuration
1672 (Analyze_Task_Body_Stub): Add constant Id. Decorate the package stub
1673 prior to analyzing its aspects.
1674 * sem_ch13.adb (Analyze_Aspect_Specifications_On_Body_Or_Stub): Renamed
1675 to Analyze_Aspects_On_Subprogram_Body_Or_Stub.
1676 * sem_ch13.ads (Analyze_Aspect_Specifications_On_Body_Or_Stub): Renamed
1677 to Analyze_Aspects_On_Subprogram_Body_Or_Stub.
1678 * sem_prag.adb: Code reformatting.
1679 (Analyze_Refined_Depends_Global_Post): Consider task body stubs.
1681 2018-05-21 Jerome Lambourg <lambourg@adacore.com>
1683 * gcc-interface/Makefile.in: Add g-soliop__qnx.ads to the runtime build
1686 2018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
1688 * exp_cg.adb: Remove with and use clause for Exp_Disp.
1689 * exp_ch9.adb: Remove with and use clause for Exp_Disp.
1690 * exp_disp.adb (Is_Predefined_Dispatching_Operation): Moved to Sem_Util.
1691 (Is_Predefined_Interface_Primitive): Moved to Sem_Util.
1692 (Is_Predefined_Internal_Operation): Moved to Sem_Util.
1693 * exp_disp.ads (Is_Predefined_Dispatching_Operation): Moved to Sem_Util.
1694 (Is_Predefined_Interface_Primitive): Moved to Sem_Util.
1695 (Is_Predefined_Internal_Operation): Moved to Sem_Util.
1696 * exp_dist.adb: Remove with and use clause for Exp_Disp.
1697 * freeze.adb: Remove with and use clause for Exp_Disp.
1698 * sem_cat.adb: Remove with and use clause for Exp_Disp.
1699 * sem_ch6.adb: Remove with and use clause for Exp_Disp.
1700 * sem_ch12.adb: Remove with and use clause for Exp_Disp.
1701 * sem_elab.adb (Check_Overriding_Primitive): Do not process predefined
1703 * sem_util.adb: Remove with and use clause for Exp_Disp.
1704 (Is_Predefined_Dispatching_Operation): Moved from Exp_Disp.
1705 (Is_Predefined_Interface_Primitive): Moved from Exp_Disp.
1706 (Is_Predefined_Internal_Operation): Moved from Exp_Disp.
1707 * sem_util.ads (Is_Predefined_Dispatching_Operation): Moved from
1709 (Is_Predefined_Interface_Primitive): Moved from Exp_Disp.
1710 (Is_Predefined_Internal_Operation): Moved from Exp_Disp.
1712 2018-05-21 Ed Schonberg <schonberg@adacore.com>
1714 * sem_res.adb (Valid_Conversion): Improve error message on an illegal
1715 type conversion whose expression has a limited view of a type.
1717 2018-05-21 Ed Schonberg <schonberg@adacore.com>
1719 * exp_ch5.adb (Build_Formal_Container_Iteration): If source has
1720 explicit name for iterator loop, preserve that name in expanded
1721 construct, for possible use in exit statements.
1723 2018-05-21 Javier Miranda <miranda@adacore.com>
1725 * sem_ch4.adb (Analyze_Membership_Op): Avoid compiler crash when the
1726 spec of a unit has Ada 2012 membership tests with multiple choices and
1727 the unit body is not compiled under Ada 2012 mode.
1729 2018-05-21 Doug Rupp <rupp@adacore.com>
1731 * sigtramp-vxworks-target.inc: Set cfa_reg properly from sigcontext
1733 (CFI_COMMON_REGS): Restore LR jic probed from prologue.
1734 (REGNO_PC_OFFSET): Change to correct value for Aarch64.
1736 2018-05-21 Jose Ruiz <ruiz@adacore.com>
1738 * doc/gnat_ugn/gnat_utility_programs.rst, exp_attr.adb,
1739 libgnarl/s-tassta.adb: Minor typo fixes
1741 2018-05-21 Ed Schonberg <schonberg@adacore.com>
1743 * sem_ch4.adb (Analyze_One_Call): Recognize complex cases where an
1744 indexed call originally in prefix forn is itself the prefix of a
1747 2018-05-21 Piotr Trojanek <trojanek@adacore.com>
1749 * sem_eval.adb (Is_Null_Range): Clarify access to the full view of a
1751 (Not_Null_Range): Same as above.
1753 2018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
1755 * exp_ch3.adb: Minor reformatting.
1756 * exp_ch6.adb: Likewise.
1757 * freeze.adb: Likewise.
1758 * inline.adb: Likewise.
1759 * sem_util.adb: Likewise.
1761 2018-05-21 Yannick Moy <moy@adacore.com>
1763 * inline.adb (Expand_Inlined_Call.Process_Formals): Use a type
1764 conversion instead of an unchecked type conversion when inlining a
1765 return statement, unless type qualification is required (for character
1766 and string literal) or no check can result from the conversion (for
1768 * opt.ads: Update comment.
1770 2018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
1772 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Install the elaboration
1773 model of the compilation unit spec, if any.
1774 * sem_ch7.adb (Analyze_Package_Body_Helper): Install the elaboration
1775 model of the compilation unit spec, if any.
1776 * sem_ch10.adb (Analyze_Subunit): Install the elaboration model of the
1777 parent compilation unit spec, if any.
1778 * sem_elab.adb (Check_Elaboration_Scenarios): Restore the elaboration
1779 model of the main unit.
1780 (Is_Same_Unit): The routine now uses Unit_Entity.
1781 (Is_Subunit): Removed.
1782 (Normalize_Unit): Removed.
1783 (Unit_Entity): New routine.
1784 * sem_prag.adb (Analyze_Pragma): Reimplement the handling of pragma
1785 Elaboration_Checks. The analysis now ensures that the pragma appears at
1786 the configuration level, and on the initial declaration of a unit.
1787 Other placements are either flagged as illegal, or ignored.
1788 (Check_Duplicate_Elaboration_Checks_Pragma): New routine.
1789 (Ignore_Elaboration_Checks_Pragma): New routine.
1790 * sem_util.adb (Install_Elaboration_Model): New routine.
1791 * sem_util.ads (Install_Elaboration_Model): New routine.
1792 * doc/gnat_rm/implementation_defined_pragmas.rst: Update the
1793 documentation of pragma Elaboration_Checks.
1794 * gnat_rm.texi: Regenerate.
1796 2018-05-21 Olivier Hainque <hainque@adacore.com>
1798 * libgnat/s-trasym__dwarf.adb (Executable_Name): Return argv[0] instead
1799 of empty string when argv[0] couldn't be found on PATH.
1800 (Enable_Cache): Raise Program_Error instead of attempting a null
1801 pointer dereference when the Exec_Module initialization failed.
1803 2018-05-21 Piotr Trojanek <trojanek@adacore.com>
1805 * libgnarl/a-reatim.ads (Clock_Time): Remove External aspect.
1806 * libgnarl/a-taside.ads (Tasking_State): Likewise.
1807 * libgnat/a-calend.ads (Clock_Time): Likewise.
1809 2018-05-21 Yannick Moy <moy@adacore.com>
1811 * sem_ch6.adb (Analyze_Procedure_Call): Refine test to recognize prefix
1812 call notation in inlined call in GNATprove mode.
1814 2018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
1816 * einfo.adb (Is_External_State): An abstract state is also external
1817 when it is declared with option "synchronous".
1818 * einfo.ads: Update the documentation of synthesized attribute
1820 * sem_util.adb (Find_Simple_Properties): New routine.
1821 (Is_Enabled_External_Property): New routine.
1822 (State_Has_Enabled_Property): Reimplemented. The two flavors of option
1823 External have precedence over option Synchronous when determining
1824 whether a property is in effect.
1826 2018-05-21 Yannick Moy <moy@adacore.com>
1828 * sem_eval.adb (Static_Length): Take into account case of variable of
1829 subtype string literal.
1831 2018-05-21 Olivier Hainque <hainque@adacore.com>
1833 * libgnat/s-objrea.ads (Get_Memory_Bounds): Rename as Get_Xcode_Bounds.
1834 (Object_Section): Rename Flag_Alloc component as Flag_Xcode.
1835 * libgnat/s-objrea.adb (Get_Xcode_Bounds): Adjust to new subprogram and
1837 (Get_Section, ELF case): Set Flag_Xcode from SHF_EXECINSTR.
1838 * libgnat/s-dwalin.adb (Open): Adjust to the Get_Memory_Bounds name
1841 2018-05-21 Olivier Hainque <hainque@adacore.com>
1843 * libgnat/s-dwalin.ads (Dwarf_Context): Change type of Load_Address to
1844 Address, and type of Low, High to Storage_Offset.
1845 (Low): Rename as Low_Address and convey that the return value is a
1846 runtime reference accounting for a load address.
1847 * libgnat/s-dwalin.adb (Read_Aranges_Entry): Adjust to the
1848 address/offset type changes.
1849 (Aranges_Lookup): Likewise.
1850 (Symbolic_Address): Likewise.
1851 (Symbolic_Traceback): Likewise.
1852 (Dump_Cache): Likewise.
1853 (Is_Inside): Likewise.
1855 (Set_Load_Address): Likewise.
1856 (Low_Address): Likewise, and account for C.Load_Address.
1857 * libgnat/s-trasym__dwarf.adb (Lt): Use Low_Address instead of Low.
1858 (Multi_Module_Symbolic_Traceback): Compare address in traceback
1859 with module Low_Address instead of Low.
1861 2018-05-21 Olivier Hainque <hainque@adacore.com>
1863 * libgnat/s-dwalin.ads (Dwarf_Context): Rename Load_Slide as
1865 * libgnat/s-dwalin.adb (Is_Inside): Adjust accordingly.
1866 (Set_Load_Address): Likewise.
1867 (Symbolic_Traceback): Likewise.
1869 2018-05-21 Olivier Hainque <hainque@adacore.com>
1871 * libgnat/s-trasym__dwarf.adb (Add_Module_To_Cache): Expect a
1872 Load_Address argument and pass it down to Init_Module.
1873 * libgnat/s-tsmona__linux.adb (Build_Cache_For_All_Modules): Pass
1874 lm.l_addr as the Load_Address to Add_Module_To_Cache.
1876 2018-05-21 Piotr Trojanek <trojanek@adacore.com>
1878 * einfo.adb (Has_Discriminants): Stronger assertion.
1879 (Set_Has_Discriminants): Stronger assertion.
1880 * sem_ch13.adb (Push_Scope_And_Install_Discriminants): Adapt to respect
1881 the stronger assertion on Has_Discriminant.
1882 (Uninstall_Discriminants_And_Pop_Scope): Same as above.
1883 * sem_util.adb (New_Copy_Tree): Same as above.
1884 * sem_ch7.adb (Generate_Parent_References): Prevent calls to
1885 Has_Discriminant on non-type entities that might happen when the
1886 compiled code has errors.
1887 * sem_ch3.adb (Derived_Type_Declaration): Only call
1888 Set_Has_Discriminant on type entities.
1890 2018-05-21 Arnaud Charlet <charlet@adacore.com>
1892 * exp_unst.adb (Unnest_Subprogram): Unnest all subprograms relevant for
1895 2018-05-21 Piotr Trojanek <trojanek@adacore.com>
1897 * lib.ads: Fix typo in enumeration in comment.
1899 2018-05-21 Ed Schonberg <schonberg@adacore.com>
1901 * sem_attr.adb (Analyze_Attribute, case Scalar_Storage_Order): The
1902 attribute reference is legal within a generic unit when the prefix is a
1903 formal private type.
1905 2018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
1907 * exp_ch7.adb (Establish_Transient_Scope): Code cleanup. Do not
1908 delegate the secondary stack management when there is no suitable
1909 transient context, and the transient scope was intended to manage the
1910 secondary stack because this causes premature reclamation. Change the
1911 transient scope creation logic by special casing assignment statements
1912 of controlled components for type initialization procedures.
1913 (Find_Node_To_Be_Wrapped): Renamed to Find_Transient_Context. Update
1914 the comment on usage.
1915 (Find_Transient_Context): Change the initinte loop into a while loop.
1916 Iterations schemes and iterator specifications are not valid transient
1917 contexts because they rely on special processing. Assignment statements
1918 are now treated as a normal transient context, special cases are
1919 handled by the caller. Add special processing for pragma Check.
1920 (Is_OK_Construct): Removed. Its functionality has been merged in
1921 routine Find_Transient_Context.
1922 * sem_ch5.adb (Check_Call): Reimplemented. Add code to properly
1923 retrieve the subprogram being invoked. Use a more accurate predicate
1924 (Requires_Transient_Scope) to determine that the function will emply
1925 the secondary stack.
1927 2018-05-21 Piotr Trojanek <trojanek@adacore.com>
1929 * ada_get_targ.adb: Fix subprogram body headers.
1930 * adabkend.adb: Likewise.
1931 * checks.adb: Likewise.
1932 * exp_ch3.adb: Likewise.
1933 * exp_ch5.adb: Likewise.
1934 * exp_ch9.adb: Likewise.
1935 * exp_dist.adb: Likewise.
1936 * exp_tss.adb: Likewise.
1937 * inline.adb: Likewise.
1938 * lib-writ.adb: Likewise.
1939 * lib-xref-spark_specific.adb: Likewise.
1940 * libgnarl/s-osinte__darwin.adb: Likewise.
1941 * libgnarl/s-stusta.adb: Likewise.
1942 * libgnarl/s-taprop__solaris.adb: Likewise.
1943 * libgnarl/s-tposen.adb: Likewise.
1944 * libgnarl/s-vxwext__kernel-smp.adb: Likewise.
1945 * libgnarl/s-vxwext__kernel.adb: Likewise.
1946 * libgnat/a-btgbso.adb: Likewise.
1947 * libgnat/a-cfdlli.adb: Likewise.
1948 * libgnat/a-cfhama.adb: Likewise.
1949 * libgnat/a-cfinve.adb: Likewise.
1950 * libgnat/a-cimutr.adb: Likewise.
1951 * libgnat/a-coboho.adb: Likewise.
1952 * libgnat/a-cofove.adb: Likewise.
1953 * libgnat/a-cofuve.adb: Likewise.
1954 * libgnat/a-comutr.adb: Likewise.
1955 * libgnat/a-exexda.adb: Likewise.
1956 * libgnat/a-tags.adb: Likewise.
1957 * libgnat/a-tideau.adb: Likewise.
1958 * libgnat/a-wtdeau.adb: Likewise.
1959 * libgnat/a-ztdeau.adb: Likewise.
1960 * libgnat/g-alleve.adb: Likewise.
1961 * libgnat/s-excdeb.adb: Likewise.
1962 * libgnat/s-parint.adb: Likewise.
1963 * libgnat/s-shasto.adb: Likewise.
1964 * libgnat/s-traceb__hpux.adb: Likewise.
1965 * prepcomp.adb: Likewise.
1966 * sem_ch4.adb: Likewise.
1967 * sem_ch6.adb: Likewise.
1968 * sem_dist.adb: Likewise.
1969 * sem_prag.adb: Likewise.
1970 * sem_util.adb: Likewise.
1971 * sinfo.adb: Likewise.
1972 * switch.adb: Likewise.
1974 2018-05-04 John Marino <gnugcc@marino.st>
1977 * link.c (BSD platforms): Add missing backslash.
1979 2018-04-27 Eric Botcazou <ebotcazou@adacore.com>
1982 * init.c (__gnat_handle_vms_condition): Add missing parentheses.
1984 2018-04-25 Eric Botcazou <ebotcazou@adacore.com>
1987 * gnat_ugn.texi: Regenerate.
1989 2018-03-23 Eric Botcazou <ebotcazou@adacore.com>
1992 * gnatlink.adb (Gnatlink): Remove handling of -b switch.
1993 * doc/gnat_ugn/building_executable_programs_with_gnat.rst (gnatlink):
1994 Remove documentation of -b switch.
1996 2018-03-23 Eric Botcazou <ebotcazou@adacore.com>
1999 * gnatlink.adb (Process_Args): Drop existing link switches if multiple
2000 switches are passed for --LINK.
2002 2018-03-12 Eric Botcazou <ebotcazou@adacore.com>
2005 * gcc-interface/misc.c (gnat_post_options): Disable string overflow
2008 2018-03-10 Eric Botcazou <ebotcazou@adacore.com>
2010 * gcc-interface/trans.c (node_has_volatile_full_access) <N_Identifier>:
2011 Consider only entities for objects.
2013 2018-03-07 Sebastian Huber <sebastian.huber@embedded-brains.de>
2015 * gcc-interface/Makefile.in (OSCONS_CPP): Remove redundant
2017 (OSCONS_EXTRACT): Add $(GNATLIBCFLAGS_FOR_C).
2019 2018-03-06 Eric Botcazou <ebotcazou@adacore.com>
2021 * gcc-interface/trans.c (convert_with_check): Fix typo in the condition
2022 guarding the overflow check emitted for the upper bound of a floating-
2025 2018-03-06 Eric Botcazou <ebotcazou@adacore.com>
2027 * gcc-interface/utils.c (def_builtin_1): Bail out on error_mark_node.
2029 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
2031 * libgnat/i-cexten.ads (Float_128): New type.
2033 2018-02-02 Eric Botcazou <ebotcazou@adacore.com>
2035 * gcc-interface/decl.c (array_type_has_nonaliased_component): Return
2036 false if the component type is a pointer.
2038 2018-01-11 Gary Dismukes <dismukes@adacore.com>
2040 * exp_ch3.adb (Default_Initialize_Object): Call New_Copy_Tree on the
2041 result of Get_Simple_Init_Value and pass the source location of the
2042 object declaration's object_definition.
2044 2018-01-11 Ed Schonberg <schonberg@adacore.com>
2046 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration): Handle
2047 properly object declarations with initializations that are
2048 build-in-place function calls, when there is an address specification,
2049 either as an aspect specification or an explicit attribute
2050 specification clause, for the initialized object.
2051 * freeze.adb (Check_Address_Clause): Do not remove side-effects from
2052 initial expressions in the case of a build-in-place call.
2054 2018-01-11 Piotr Trojanek <trojanek@adacore.com>
2056 * sem_eval.adb (Is_Null_Range): Retrieve the full view when called on a
2057 private (sub)type; refactor to avoid early return statement.
2058 (Not_Null_Range): Same as above.
2060 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
2062 * freeze.adb (Freeze_Entity): Ensure that a Ghost type is not
2063 concurrent, nor effectively volatile.
2064 * ghost.adb (Check_Ghost_Type): New routine.
2065 * ghost.ads (Check_Ghost_Type): New routine.
2066 * sem_util.adb (Is_Declaration): Reimplemented. The routine can now
2067 consider specific subsets of declarations.
2068 (Is_Declaration_Other_Than_Renaming): Removed. Its functionality is
2069 replicated by Is_Declaration.
2070 * sem_util.ads (Is_Declaration): New parameter profile. Update the
2072 (Is_Declaration_Other_Than_Renaming): Removed.
2074 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
2076 * sem_ch5.adb (Analyze_Assignment): Assignments to variables that act
2077 as Part_Of consituents of single protected types are illegal when they
2078 take place inside a protected function.
2079 (Diagnose_Non_Variable_Lhs): Use Within_Function to check for an
2081 (Is_Protected_Part_Of_Constituent): New routine.
2082 (Within_Function): New routine.
2084 2018-01-11 Arnaud Charlet <charlet@adacore.com>
2086 Bump copyright notices to 2018.
2088 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
2090 * binde.adb, par-ch6.adb, par-ch9.adb, sem_ch12.adb, sem_ch13.adb:
2093 2018-01-11 Justin Squirek <squirek@adacore.com>
2095 * par-ch6.adb (Scan_Body_Or_Expression_Function): Add additional check
2096 to make sure a given expression function is properly parenthesized.
2098 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
2100 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Check the
2101 categorization of a subprogram body which does not complete a previous
2104 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
2106 * sem_ch10.adb (Check_Private_Child_Unit): Ensure that the enclosing
2107 scope of package Ada is Standard.
2109 2018-01-11 Ed Schonberg <schonberg@adacore.com>
2111 * sem_ch13.adb (Replace_Type_Ref): Handle properly reference to a
2112 subcomponent of the current entity when building the body for a dynamic
2113 predicate function for a record with composite subcomponents.
2115 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
2117 * exp_aggr.adb (Convert_Aggr_In_Object_Decl): Update the call to
2118 Establish_Transient_Scope.
2119 (Convert_To_Assignments): Update the call to Establish_Transient_Scope.
2120 (Expand_Array_Aggregate): Update the call to Establish_Transient_Scope.
2121 * exp_ch6.adb (Expand_Call_Helper): Update the call to
2122 Establish_Transient_Scope.
2123 (Make_Build_In_Place_Call_In_Object_Declaration): Update the call to
2124 Establish_Transient_Scope.
2125 * exp_ch7.adb (Establish_Transient_Scope): Restructured. Delegate the
2126 management of the secondary stack to an enclosing scope if there is no
2127 suitable construct to wrap, and the transient scope was intended to
2128 manage the secondary stack.
2129 (Find_Node_To_Be_Wrapped): Restructured. A case_statement_alternative
2130 is a valid boundary for a transient expression which comes from the
2131 statements of the alternative, otherwise alternatives cannot be
2132 wrapped. Assignments of controlled objects which have controlled
2133 actions suppressed now stop the traversal as there is no point in
2134 looking for an enclosing construct. Add several N_xxx_Body choices to
2135 the termination conditions for completeness.
2136 * exp_ch7.ads (Establish_Transient_Scope): Update the parameter profile
2137 and the associated comment on usage.
2138 * exp_smem.adb (Add_Shared_Var_Lock_Procs): Update the call to
2139 Establish_Transient_Scope.
2140 (Add_Write_After): Update the call to Establish_Transient_Scope.
2141 * sem_res.adb (Check_Initialization_Call): Removed.
2142 (Resolve_Actuals): Account for additional cases where finalization
2143 actions are required by utilizing predicate Needs_Finalization rather
2145 (Resolve_Call): Type initialization procedures can now utilize
2146 transient scopes to manage the secondary stack, thus preventing leaks
2147 during initialization. Remove the previous kludgy algorithm which
2148 attempts to manage the secondary stack at the object creation site.
2150 2018-01-11 Jerome Lambourg <lambourg@adacore.com>
2152 * libgnat/g-soliop__qnx.ads: New.
2153 * adaint.c, adaint.h, cstreams.c, s-oscons-tmplt.c, sysdep.c: Update
2156 2018-01-11 Bob Duff <duff@adacore.com>
2158 * par-ch9.adb (P_Protected_Operation_Declaration_Opt): Give an error if
2159 a null procedure occurs in a protected definition.
2161 2018-01-11 Bob Duff <duff@adacore.com>
2163 * binderr.ads, namet.ads: Minor reformatting.
2165 2018-01-11 Bob Duff <duff@adacore.com>
2167 * doc/gnat_ugn/gnat_utility_programs.rst: Improve documentation of
2170 2018-01-11 Bob Duff <duff@adacore.com>
2172 * binde.adb (Force_Elab_Order): Give an error if there are duplicate
2175 2018-01-11 Ed Schonberg <schonberg@adacore.com>
2177 * sem_ch6.adb (Freeze_Expr_Types): If an access value is the
2178 controlling argument of a dispatching call. freeze the corresponding
2181 2018-01-11 Ben Brosgol <brosgol@adacore.com>
2183 * doc/Makefile: Add Sphinx option -W to treat warnings as errors.
2185 2018-01-11 Ben Brosgol <brosgol@adacore.com>
2187 * doc/gnat_rm/implementation_defined_aspects.rst: Minor type/wording
2189 * gnat_rm.texi: Regenerate.
2191 2018-01-11 Ed Schonberg <schonberg@adacore.com>
2193 * sem_ch12.adb (Check_Fixed_Point_Type): Do not apply check if the
2194 formsl type corresponding to the actual fixed point type is private,
2195 because in this case there can be no suspicious arithmetic operations
2196 in the generic unless they reference a formal subprogram. Clarify
2199 2018-01-11 Javier Miranda <miranda@adacore.com>
2201 * exp_util.adb (Remove_Side_Effects): No action done for functions
2202 returning class-wide types since it requires generating code using
2203 'reference and the CCG target has no secondary stack.
2204 * gnat1drv.adb: Disable building static dispatch tables when generating
2207 2018-01-11 Piotr Trojanek <trojanek@adacore.com>
2209 * libgnat/a-direio.ads, libgnat/a-sequio.ads, libgnat/a-ststio.ads,
2210 libgnat/a-textio.ads, libgnat/a-witeio.ads, libgnat/a-ztexio.ads
2211 (File_Type): Add Default_Initial_Condition aspect.
2213 2018-01-11 Pascal Obry <obry@adacore.com>
2215 * libgnat/s-os_lib.adb (Normalize_Pathname): New implementation.
2217 2018-01-11 Bob Duff <duff@adacore.com>
2219 * doc/gnat_ugn/gnat_utility_programs.rst: Rewrite gnatpp documentation
2220 to match what the Libadalang-based version does.
2221 * doc/gnat_ugn/about_this_guide.rst: Update reference.
2223 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
2225 * sem_res.adb (Uses_SS): A controlled type requires the secondary stack
2226 if it contains at least one component declaration employing a function
2227 call returning on the secondary stack.
2229 2018-01-11 Yannick Moy <moy@adacore.com>
2231 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
2232 Update description of restriction SPARK_05 with SPARK 2014.
2233 * gnat_rm.texi: Regenerate.
2235 2018-01-11 Vasiliy Fofanov <fofanov@adacore.com>
2237 * doc/gnat_ugn/gnat_utility_programs.rst: Fix layout.
2239 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
2241 * exp_aggr.adb, exp_ch9.adb, exp_util.adb, sem_aggr.adb, sem_ch3.adb,
2242 sem_res.adb, sem_util.adb: Minor reformatting.
2244 2018-01-11 Ed Schonberg <schonberg@adacore.com>
2246 * sem_prag.adb (Analyze_Pragma, case Predicate): Indicate that the type
2247 has a delayed aspect which must be processed at the point the type is
2248 frozen. This mimics what is done when the predicate is provided by a
2251 2018-01-11 Doug Rupp <rupp@adacore.com>
2253 * init.c (vxworks): Add macro checks for __aarch64__.
2255 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
2257 * exp_util.adb (Add_Failure_Expression): New routine.
2258 (Make_Predicate_Check): Reimplement the handling of Predicate_Failure.
2259 * sem_util.adb (Is_Current_Instance): Code cleanup.
2261 2018-01-11 Patrick Bernardi <bernardi@adacore.com>
2263 * libgnat/s-parame*.adb, libgnat/s-parame*.ads: Remove unneeded
2264 Default_Sec_Stack_Size.
2265 * libgnat/s-secsta.adb (SS_Allocate): Handle the fixed secondary stack
2266 limit check so that the integer index does not overflow. Check the
2267 dynamic stack allocation does not cause the secondary stack pointer to
2269 (SS_Info): Align colons.
2270 (SS_Init): Cover the case when bootstraping with an old compiler that
2271 does not set Default_SS_Size.
2273 2018-01-11 Ed Schonberg <schonberg@adacore.com>
2275 * sem_ch3.adb (Add_Internal_Interface_Entities): When checking the
2276 legality of an inherited operation that may require overriding, ignore
2277 primitive_wrappers that correspond to explicit operations that override
2278 an interface primitive.
2279 * exp_util.adb (Build_Class_Wide_Expression, Replace_Entity): If the
2280 operation to which the class-wide expression applies is a protected op.
2281 with a primitive_wrapper, verify that the updated inherited expression
2282 does not contain an internal call to a protected function. This
2283 completes the implementation of AI12-0166.
2285 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
2287 * ali.adb: Document the remaining letters available for ALI lines.
2288 (Scan_ALI): A with clause is internal when it is encoded on a 'Z' line.
2289 * ali.ads: Update type With_Record. Field
2290 Implicit_With_From_Instantiation is no longer in use. Add field
2292 * csinfo.adb (CSinfo): Remove the setup for attribute
2293 Implicit_With_From_Instantiation.
2294 * lib-writ.adb (Collect_Withs): Correct the logic which marks a unit as
2295 either implicitly or explicitly withed.
2296 (Is_Implicit_With_Clause): New routine.
2297 (Write_ALI): Rename array Implicit_With to Has_Implicit_With to avoid
2298 confusion with the with clause attribute by the same name.
2299 (Write_With_Lines): Update the emission of 'W', 'Y', and 'Z' headers.
2300 * rtsfind.adb (Maybe_Add_With): Code cleanup.
2301 * sem_ch8.adb (Present_System_Aux): Code cleanup.
2302 * sem_ch10.adb (Expand_With_Clause): Mark the with clause as generated
2304 (Implicit_With_On_Parent): Mark the with clause as generated for a
2306 * sem_ch12.adb (Inherit_Context): With clauses inherited by an
2307 instantiation are no longer marked as Implicit_With_From_Instantiation
2308 because they are already marked as implicit.
2309 * sem_elab.adb (Ensure_Prior_Elaboration_Static): Remove the kludge
2310 which marks implicit with clauses as related to an instantiation.
2311 * sinfo.adb (Implicit_With_From_Instantiation): Removed.
2312 (Parent_With): New routine.
2313 (Set_Implicit_With_From_Instantiation): Removed.
2314 (Set_Parent_With): New routine.
2315 * sinfo.ads: Update the documentation of attribute Implicit_With.
2316 Remove attribute Implicit_With_From_Instantiation along with
2317 occurrences in nodes. Add attribute Parent_With along with occurrences
2319 (Implicit_With_From_Instantiation): Removed along with pragma Inline.
2320 (Parent_With): New routine along with pragma Inline.
2321 (Set_Implicit_With_From_Instantiation): Removed along with pragma Inline.
2322 (Set_Parent_With): New routine along with pragma Inline.
2324 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
2326 * sem_util.adb (Find_Enclosing_Scope): Return the unique defining
2327 entity when the enclosing construct is a body.
2329 2018-01-11 Patrick Bernardi <bernardi@adacore.com>
2331 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Simplified
2332 Secondary_Stack_Size handling as a pragma is now generated for the
2333 corresponding aspect instead of an attribute. Pragma expression is
2334 relocated instead of evaluated. Discriminant of the corresponding
2335 record type is referenced rather than the type discriminant.
2336 (Create_Secondary_Stack_For_Task, Make_Task_Create_Call): Update
2337 Secondary_Stack_Size rep item checks to only look for the pragma rep.
2338 * sem_ch13.adb (Analyze_One_Aspect): Transform
2339 Aspect_Secondary_Stack_Size into a pragma instead of an attribute
2340 because the attribute does not have visibility on a task type's
2341 discriminants when the type's definition is expanded.
2342 (Analyze_Attribute_Definition_Clause): Remove handling of
2343 Attribute_Secondary_Stack_Size.
2344 * snames.adb-tmpl, snames.ads-tmpl: Remove
2345 Attribute_Secondary_Stack_Size, no longer used.
2347 2018-01-11 Justin Squirek <squirek@adacore.com>
2349 * sem_ch8.adb: Minor comment fix.
2351 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
2353 * exp_ch4.adb (Process_Action): Do not abandon the inspection of an
2354 individual action because the action may denote a complex expression,
2355 such as a case statement, which in turn may contain additional
2358 2018-01-11 Ed Schonberg <schonberg@adacore.com>
2360 * sem_aggr.adb (Resolve_Iterated_Component_Association): Perform
2361 analysis on a copy of the expression with a copy of the index variable,
2362 because full expansion will rewrite construct into a loop with the
2363 original loop variable.
2364 * exp_aggr.adb (Gen_Assign): Defer analysis and resolution if the
2365 expression is an iterated component association. Full analysis takes
2366 place when construct is rewritten as a loop.
2367 (In_Place_Assign_OK, Safe_Component): An iterated_component_association
2368 is not safe for in-place assignment.
2369 * sem_util.adb (Remove_Entity): Handle properly the case of an isolated
2370 entity with no homonym and no other entity in the scope.
2372 2018-01-11 Justin Squirek <squirek@adacore.com>
2374 * sem_prag.adb (Analyze_Pragma:Pragma_Loop_Variant): Modify error
2375 message to be printed on the pragma argument identifier.
2377 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
2379 * exp_util.adb (Build_Invariant_Procedure_Declaration): Set the last
2380 entity of the generated invariant procedure in order to construct a
2381 proper entity chain.
2383 2018-01-11 Piotr Trojanek <trojanek@adacore.com>
2385 * sem_ch13.adb (Build_Predicate_Functions): Fix minor issues in
2388 2018-01-11 Arnaud Charlet <charlet@adacore.com>
2390 * einfo.ads, einfo.adb (Activation_Record_Component,
2391 Set_Activation_Record_Component, Set_Is_Uplevel_Referenced_Entity):
2392 Allow E_Discriminant.
2394 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
2396 * gcc-interface/decl.c (gnat_to_gnu_component_type): Apply the check
2397 for atomic access once the component size is taken into account and
2398 also do it if the component type is Atomic or Volatile_Full_Access.
2400 2018-01-04 Eric Botcazou <ebotcazou@adacore.com>
2402 * gnatvsn.ads: Bump copyright year.
2404 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2405 Alan Hayward <alan.hayward@arm.com>
2406 David Sherwood <david.sherwood@arm.com>
2408 * gcc-interface/misc.c (enumerate_modes): Treat GET_MODE_BITSIZE
2411 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2412 Alan Hayward <alan.hayward@arm.com>
2413 David Sherwood <david.sherwood@arm.com>
2415 * gcc-interface/misc.c (enumerate_modes): Treat GET_MODE_PRECISION
2418 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2419 Alan Hayward <alan.hayward@arm.com>
2420 David Sherwood <david.sherwood@arm.com>
2422 * gcc-interface/utils.c (gnat_types_compatible_p): Handle
2423 polynomial TYPE_VECTOR_SUBPARTS.
2425 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2426 Alan Hayward <alan.hayward@arm.com>
2427 David Sherwood <david.sherwood@arm.com>
2429 * gcc-interface/misc.c (enumerate_modes): Handle polynomial
2432 2018-01-03 Jakub Jelinek <jakub@redhat.com>
2434 Update copyright years.
2436 * gnat_ugn.texi: Bump @copying's copyright year.
2437 * gnat_rm.texi: Likewise.
2439 Copyright (C) 2018 Free Software Foundation, Inc.
2441 Copying and distribution of this file, with or without modification,
2442 are permitted in any medium without royalty provided the copyright
2443 notice and this notice are preserved.