1 2018-05-29 Pascal Obry <obry@adacore.com>
3 * libgnat/s-os_lib.adb (Normalize_Pathname): Fix handling of ".." in
6 2018-05-29 Pascal Obry <obry@adacore.com>
8 * libgnat/s-os_lib.adb: Minor reformatting.
10 2018-05-29 Doug Rupp <rupp@adacore.com>
12 * libgnat/a-calend.adb (Epoch_Offset): Move from body to ...
13 * libgnat/a-calend.ads (Epoch_Offset): to private part of spec
14 * libgnat/a-calcon.ads (To_Unix_Nano_Time): New function spec.
15 * libgnat/a-calcon.adb (To_Unix_Nano_Time): New function body.
17 2018-05-29 Eric Botcazou <ebotcazou@adacore.com>
19 * repinfo.ads (JSON format): Document new pair for components.
20 * repinfo.adb (Derived_Discriminant): New function.
21 (List_Structural_Record_Layout): Add Outer_Ent parameter and pass it
22 in recursive calls. If the record type is the parent of an extension,
23 find and list the derived discriminant from the extension, if any.
24 (List_Component_Layout): List the Discriminant_Number in JSON mode.
25 (List_Record_Info): Adjust call to List_Structural_Record_Layout.
27 2018-05-29 Eric Botcazou <ebotcazou@adacore.com>
29 * doc/gnat_ugn/building_executable_programs_with_gnat.rst (Alphabetical
30 List of All Switches): Document -gnatRj.
31 (Debugging Control): Likewise.
32 * gnat_ugn.texi: Regenerate.
33 * opt.ads (List_Representation_Info_To_JSON): New boolean variable.
34 * osint-c.adb (Create_Repinfo_File): Use the .json instead of .rep
35 extension if List_Representation_Info_To_JSON is true.
36 * repinfo.ads: Document the JSON output format.
37 * repinfo.adb (List_Location): New procedure.
38 (List_Array_Info): Add support for JSON output.
39 (List_Entities): Likewise.
42 (Print_Expr): Likewise.
43 (List_Linker_Section): Likewise.
44 (List_Mechanisms): Likewise.
45 (List_Name): Likewise.
46 (List_Object_Info): Likewise.
47 (List_Record_Info): Likewise.
48 (List_Component_Layout): Likewise. Add Indent parameter.
49 (List_Structural_Record_Layout): New procedure.
50 (List_Attr): Add support for JSON output.
51 (List_Type_Info): Likewise.
52 (Write_Unknown_Val): Likewise.
53 * switch-c.adb (Scan_Front_End_Switches) <R>: Deal with 'j'.
54 * usage.adb (Usage): List -gnatRj.
56 2018-05-29 Eric Botcazou <ebotcazou@adacore.com>
58 * repinfo.adb (List_Component_Layout): New procedure extracted from...
59 (List_Record_Layout): ...here. Invoke it.
61 2018-05-29 Eric Botcazou <ebotcazou@adacore.com>
63 * repinfo.adb (Write_Unknown_Val): New procedure.
64 (List_GCC_Expression): Call it.
65 (List_Record_Layout): Likewise.
66 (Write_Val): Likewise.
68 2018-05-29 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
70 * exp_ch4.adb (Expand_N_Op_Abs): Clear Do_Overflow_Check when inserting
73 2018-05-29 Arnaud Charlet <charlet@adacore.com>
75 * lib-writ.adb (Write_ALI): Do not use new function from s-casuti yet.
76 This breaks build of cross compilers with older versions of GNAT, so
79 2018-05-29 Doug Rupp <rupp@adacore.com>
81 * libgnarl/s-taprop.ads (Monotonic_Clock): Refine documentation to
84 2018-05-29 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
86 * exp_ch4.adb (Expand_N_Op_Abs): Always do range check against 'First.
88 2018-05-29 Eric Botcazou <ebotcazou@adacore.com>
90 * repinfo.adb (List_Entities): Do not list the Linker_Section for
92 (List_Mechanisms): ...but here instead. Use consistent name output
93 and formatting conventions.
95 2018-05-29 Bob Duff <duff@adacore.com>
97 * lib-writ.adb (Write_ALI): Cleanup: avoid use of global var; call new
99 * libgnat/s-casuti.ads, libgnat/s-casuti.adb (To_Upper, To_Lower,
100 To_Mixed): New functions.
101 * osint.adb: Cleanup: use Is_Directory_Separator, which correctly
102 allows both '\' and '/' on Windows.
104 2018-05-28 Eric Botcazou <ebotcazou@adacore.com>
106 * repinfo.ads: Minor fixes and tweaks in comments.
108 2018-05-28 Eric Botcazou <ebotcazou@adacore.com>
110 * repinfo.adb (List_GCC_Expression): Remove Valop and replace calls to
111 it with calls to Unop.
113 2018-05-28 Eric Botcazou <ebotcazou@adacore.com>
115 * repinfo.ads (TCode): Adjust range.
116 (Truth_Andif_Expr): Remove.
117 (Truth_Orif_Expr): Likewise.
118 (Truth_And_Expr .. Dynamic_Val): Adjust value.
119 * repinfo.adb (Print_Expr): Remove handling of Truth_{And,Or}if_Expr.
120 (Rep_Value): Likewise.
121 * repinfo.h (Truth_Andif_Expr): Remove.
122 (Truth_Orif_Expr): Likewise.
123 (Truth_And_Expr .. Dynamic_Val): Adjust value.
124 * gcc-interface/decl.c (annotate_value) <TRUTH_ANDIF_EXPR>: Fall
125 through to TRUTH_AND_EXPR case.
126 <TRUTH_ORIF_EXPR>: Fall through to TRUTH_OR_EXPR case.
128 2018-05-28 Ed Schonberg <schonberg@adacore.com>
130 * exp_unst.adb (Visit_Node): For indexed components and attribute
131 references, examine index expressions or associated expressions as well
132 to record uplevel references.
133 (Vist_Node): For function and procedure calls, if a formal is an
134 unconstrained array and the actual is constrained, check whether bounds
135 of actual have uplevel references.
137 2018-05-28 Ed Schonberg <schonberg@adacore.com>
139 * einfo.ads, einfo.adb: Exceptions can be uplevel references, and thus
140 they can appear as components of activation records.
141 * exp_unst.adb (Visit_Node): A reference to an exception may be an
144 2018-05-28 Eric Botcazou <ebotcazou@adacore.com>
146 * exp_ch4.adb (Expand_Composite_Equality): Compute whether the size
147 depends on a discriminant manually instead of using the predicate
148 Size_Depends_On_Discriminant in the array type case.
150 2018-05-28 Ed Schonberg <schonberg@adacore.com>
152 * exp_unst.adb (Check_Static_Type): For a record subtype, check
153 discriminant constraints as well.
154 (Visit_Node): For a selected component, check type of prefix, as is
155 done for indexed components and slices.
157 2018-05-28 Javier Miranda <miranda@adacore.com>
159 * exp_ch4.adb (Real_Range_Check): Add a temporary to store the integer
160 value when converting a float value to a fixed-point value. This is
161 required for CCG because it handles fixed-point types by means of
162 unsigned integer type variables. The range check is now performed using
163 the integer value stored in this temporary.
165 2018-05-28 Yannick Moy <moy@adacore.com>
167 * sem_util.adb (Is_OK_Volatile_Context): Add attributes First, Last and
168 Length as valid non-interfering contexts for SPARK.
170 2018-05-28 Claire Dross <dross@adacore.com>
172 * sem_disp.ads, sem_disp.adb (Inheritance_Utilities): Package for
173 generic inheritance utilities.
174 (Generic_Inherited_Subprograms): Generic version of
175 Inherited_Subprograms, generic in Find_Dispatching_Type function.
176 (Generic_Is_Overriding_Subprogram): Generic version of
177 Is_Overriding_Subprogram, generic in Find_Dispatching_Type function.
178 (Inherited_Subprograms): Instance of Generic_Inherited_Subprograms with
179 Sem_Disp.Find_Dispatching_Type.
180 (Is_Overriding_Subprogram): Instance of
181 Generic_Is_Overriding_Subprogram with Sem_Disp.Find_Dispatching_Type.
182 (Inheritance_Utilities_Inst): Instance of Inheritance_Utilities
183 with Sem_Disp.Find_Dispatching_Type.
185 2018-05-28 Eric Botcazou <ebotcazou@adacore.com>
187 * exp_ch4.adb (Expand_Composite_Equality): For a composite (or FP)
188 component type, do not expand array equality using the unconstrained
189 base type, except for the case where the bounds of the type depend on a
192 2018-05-28 Ed Schonberg <schonberg@adacore.com>
194 * einfo.ads, einfo.adb (Needs_Activation_Record): New flag on
195 access-to-subprogram types, to indicate that an indirect call through
196 such a type requires an activation record when compiling for LLVM.
197 * sem_ch3.adb (Access_Subprogram_Declaration): Set new flag as needed.
199 2018-05-28 Ed Schonberg <schonberg@adacore.com>
201 * exp_ch4.adb (Real_Range_Check): Specialize float-to-fixed conversions
202 when bounds of fixed type are static, to remove some spuerfluous
203 implicit conversions and provide an accurate result when converting
204 back and forth between the fixed point type and a floating point type.
206 2018-05-28 Ed Schonberg <schonberg@adacore.com>
208 * exp_unst.adb (Unnest_Subprogram): Prevent creation of empty
211 2018-05-28 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
213 * exp_unst.adb (Check_Static_Type): Add argument to indicate node to be
214 replaced, if any; all callers changed.
215 (Note_Uplevel_Ref): Likewise. Also replace reference to deferred
216 constant with private view so we take the address of that entity.
217 (Note_Uplevel_Bound): Add argument to indicate node to be replaced, if
218 any; all callers changed. Handle N_Indexed_Component like
219 N_Attribute_Reference. Add N_Type_Conversion case.
220 (Visit_Node): Indexed references can be uplevel if the type isn't
222 (Unnest_Subprograms): Don't rewrite if no reference given. If call has
223 been relocated, set first_named pointer in original node as well.
225 2018-05-28 Ed Schonberg <schonberg@adacore.com>
227 * exp_aggr.adb (Flatten): Copy tree of expression in a component
228 association with a range or a set of discrete choices, rather than
229 relocating the node. This avoids inconsistencies in the tree when
230 handling nested subprograms with uplevel references for LLVM.
232 2018-05-28 Arnaud Charlet <charlet@adacore.com>
234 * exp_util.adb (Possible_Bit_Aligned_Component): Always return False in
237 2018-05-28 Arnaud Charlet <charlet@adacore.com>
239 * exp_unst.adb: Fix typo.
241 2018-05-28 Bob Duff <duff@adacore.com>
243 * libgnat/a-convec.adb (Query_Element): Minor cleanup: remove an
244 unnecessary use of 'Unrestricted_Access.
246 2018-05-28 Hristian Kirtchev <kirtchev@adacore.com>
248 * repinfo.adb (Expr_Value_S): New routine.
249 (List_Linker_Section): Properly extract the value of the section
252 2018-05-28 Patrick Bernardi <bernardi@adacore.com>
254 * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Update the
255 description of the -D binder switch to reflect current usage.
256 * gnat_ugn.texi: Regenerate.
258 2018-05-28 Gary Dismukes <dismukes@adacore.com>
260 * exp_ch3.adb: Minor reformatting
262 2018-05-28 Justin Squirek <squirek@adacore.com>
265 (Build_Initialization_Call): Add logic to pass the appropriate actual to match
267 (Init_Formals): Add new formal *_skip_null_excluding_check
268 * exp_util.adb, exp_util.ads
269 (Enclosing_Init_Proc): Added to fetch the enclosing Init_Proc from the current
271 (Inside_Init_Proc): Refactored to use Enclosing_Init_Proc
272 (Needs_Conditional_Null_Excluding_Check): Added to factorize the predicate
273 used to determine how to generate an Init_Proc for a given type.
274 (Needs_Constant_Address): Minor reformatting
276 (Resolve_Null): Add logic to generate a conditional check in certain cases
278 2018-05-28 Hristian Kirtchev <kirtchev@adacore.com>
280 * exp_aggr.adb, gnatlink.adb, sem_ch6.adb, sem_res.adb, sem_util.adb:
283 2018-05-28 Hristian Kirtchev <kirtchev@adacore.com>
285 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile): Include
286 the declarations of single concurrent types because they fall in the
287 category of full type and object declarations.
289 2018-05-28 Eric Botcazou <ebotcazou@adacore.com>
291 * repinfo.adb (Compute_Max_Length): Skip _Parent component.
292 (List_Record_Layout): Likewise.
294 2018-05-28 Ed Schonberg <schonberg@adacore.com>
296 * sem_util.adb (Is_Function_Result): Add a warning if a postcondition
297 includes a call to function to which it applies. This may mean an
298 omission of an attribute reference 'Result, in particular if the
299 function is pqrameterless.
301 2018-05-28 Justin Squirek <squirek@adacore.com>
303 * sem_ch8.adb (Find_Expanded_Name): Add extra guard to make sure the
304 misresolved package name is not a case of mistaken identity.
306 2018-05-28 Yannick Moy <moy@adacore.com>
308 * sem_res.adb (Resolve_Range): Re-resolve the low bound of a range in
309 GNATprove mode, as the order of resolution (low then high) means that
310 all the information is not available when resolving the low bound the
313 2018-05-28 Eric Botcazou <ebotcazou@adacore.com>
315 * repinfo.adb (List_Array_Info): Start with an explicit blank line and
316 end with the linker section, if any.
317 (List_Entities): Do not output the linker section for record types,
318 array types and variables.
319 (Print_Expr): Factor out common processing for unary operators and
320 special values. Adjust and reorder the various cases.
321 (List_Object_Info): End with the linker section, if any.
322 (List_Record_Info): Likewise.
323 (List_Type_Info): Do not start with a blank line.
325 2018-05-25 Nicolas Roche <roche@adacore.com>
327 * libgnat/s-valrea.adb (Scan_Real): Abort computation once it is sure
328 that the result will be either -infinite or +infinite.
330 2018-05-25 Patrick Bernardi <bernardi@adacore.com>
332 * libgnat/s-parame.ads, libgnat/s-parame__vxworks.ads,
333 libgnat/s-parame__ae653.ads, libgnat/s-parame__hpux.ads (Size_Type):
334 Expand range of type to match the address space of the target.
335 (Task_Storage_Size): Remove unused type.
337 2018-05-25 Ed Schonberg <schonberg@adacore.com>
339 * sem_res.adb (Set_Mixed_Mode_Operand): If the operand is an expression
340 of a fixed point type and the parent is a multiplying operation,
341 resolve the operand with its own type because the context will impose a
342 resulting type on the result of the multiplication by means of
343 approriate conversion.
345 2018-05-25 Hristian Kirtchev <kirtchev@adacore.com>
347 * exp_ch3.adb (Default_Initialize_Object): Ensure that the analysis of
348 the in-place initialization aggregate created for pragmas
349 Initialize_Scalars or Normalize_Scalars is performed with checks
352 2018-05-25 Arnaud Charlet <charlet@adacore.com>
354 * exp_aggr.adb (Convert_To_Positional): Bump default for
355 Max_Others_Replicate to 32. Update comments.
356 * osint.ads (Unknown_Attributes): No longer pretend this is a constant.
357 (No_File_Info_Cache): Initialize separately.
358 * osint.adb (No_File_Info_Cache): Update initializer.
360 2018-05-25 Javier Miranda <miranda@adacore.com>
362 * sem_res.adb (Resolve_Membership_Op): Allow the use of the membership
363 test when the left operand is a class-wide interface and the right
364 operand is not a class-wide type.
365 * exp_ch4.adb (Tagged_Membership): Adding support for interface as the
368 2018-05-25 Ed Schonberg <schonberg@adacore.com>
370 * exp_aggr.adb (Flatten): A quantified expression cannot be duplicated
371 in an others clause to prevent visibility issues with the generated
373 (Component_OK_For_Backend): Return false for a quantified expression.
374 (Check_Static_Component): Ditto.
376 2018-05-25 Hristian Kirtchev <kirtchev@adacore.com>
378 * libgnat/s-secsta.adb (SS_Allocate): Reimplemented.
379 (SS_Allocate_Dynamic): New routine. The allocation logic is now split
380 into three distring cases rather than in one loop which attempts to
381 handle all three cases. This rewrite eliminates an issue where the last
382 frame of the stack cannot be freed, thus causing the memory range of a
383 new frame to approach the overflow point of the memory index type.
384 Since the overflow is logically treated as a
385 too-much-memory-on-the-stack scenario, it causes a bogus Storage_Error.
386 (SS_Allocate_Static): New routine. The routine factorizes the static
387 secondary stack-related code from the former SS_Allocate.
389 2018-05-25 Sergey Rybin <rybin@adacore.com>
391 * doc/gnat_ugn/gnat_and_program_execution.rst: Add description of '-U'
394 2018-05-25 Ed Schonberg <schonberg@adacore.com>
396 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not create
397 Class_Wide_Clone_Body when analyzing a subprogram_body_stub: the clone
398 is created when the proper body of the stub is analyzed.
399 * sem_util.adb (ZBuild_Class_Wide_Clone_Body): If the subprogram body
400 is the proper body of a subunit, the cloned body must be inserted in
401 the declarative list that contains the stub.
403 2018-05-25 Justin Squirek <squirek@adacore.com>
405 * exp_ch6.adb (Expand_Simple_Function_Return): Add guard in check to
406 generate code for 6.5(8-10) so that we don't get an assertion error
407 when dealing with an incomplete return type.
409 2018-05-25 Arnaud Charlet <charlet@adacore.com>
411 * pprint.adb (Expression_Name): Strip too long expressions to avoid
412 carrying very large strings.
414 2018-05-25 Patrick Bernardi <bernardi@adacore.com>
416 * switch-b.adb (Scan_Binder_Switches): binder switch -Q accepts Natural
419 2018-05-25 Doug Rupp <rupp@adacore.com>
421 * tracebak.c (aarch64-linux): Implement.
423 2018-05-25 Justin Squirek <squirek@adacore.com>
425 * sem_ch8.adb: Minor reformatting.
427 2018-05-25 Piotr Trojanek <trojanek@adacore.com>
429 * sem_util.adb (Iterate_Call_Parameters): Fix code convention and
432 2018-05-25 Hristian Kirtchev <kirtchev@adacore.com>
434 * einfo.adb, einfo.ads, exp_ch3.adb, exp_ch8.adb, exp_unst.adb,
435 pprint.adb, sem_ch12.adb, sem_ch3.adb, sem_prag.adb, sem_util.adb:
438 2018-05-25 Ed Schonberg <schonberg@adacore.com>
440 * sem_ch12.adb (Instance_Exists): New function, subsidiary of
441 Validate_Derived_Type_Instance, to verify that all interfaces
442 implemented by the formal type are also implemented by the actual. The
443 verification is complicated when an interface of the formal is declared
444 in a generic unit and the actual is declared in an instance of it.
445 There is currently no mechanism to relate an interface declared within
446 a generic to the corresponding interface in an instance, so we must
447 traverse the list of interfaces of the actual, looking for a name
448 match, and verifying that that interface is declared in an instance.
450 2018-05-25 Piotr Trojanek <trojanek@adacore.com>
452 * sem_util.adb (Iterate_Call_Parameters): Rewrite with extra
453 assertions; replace function versions of Next_Formal/Next_Actual with
454 their procedural versions (which are more concise).
456 2018-05-25 Doug Rupp <rupp@adacore.com>
458 * libgnarl/s-osinte__aix.ads, libgnarl/s-osinte__android.ads,
459 libgnarl/s-osinte__darwin.ads, libgnarl/s-osinte__freebsd.ads,
460 libgnarl/s-osinte__hpux.ads, libgnarl/s-osinte__kfreebsd-gnu.ads,
461 libgnarl/s-osinte__linux.ads, libgnarl/s-osinte__lynxos178e.ads,
462 libgnarl/s-osinte__qnx.ads, libgnarl/s-osinte__rtems.ads
463 (Relative_Timed_Wait): Remove.
464 * libgnarl/s-tpopmo.adb (Timed_Sleep, Timed_Delay): Rewrite to allow
465 for incremental looping. Remove references to Rel_Time and
467 * libgnat/s-osprim__posix.adb, libgnat/s-osprim__posix2008.adb
468 (Timed_Delay): Make separate.
469 * libgnat/s-optide.adb: New separate procedure.
470 * libgnat/s-osprim.ads (Max_System_Delay): New constant.
471 * libgnat/s-osprim__lynxos.ads (Max_Sensible_Delay): Set to 6 months.
472 (Max_System_Delay): New constant.
474 2018-05-25 Ed Schonberg <schonberg@adacore.com>
476 * sem_ch12.adb (Validate_Derived_Type_Instance): Verify that the actual
477 for a formal derived type implements all the interfaces declared for
480 2018-05-25 Yannick Moy <moy@adacore.com>
482 * sem_prag.adb (Check_Applicable_Policy): Deal specially with CodePeer
483 and GNATprove modes when applicable policy is Ignore.
485 2018-05-25 Eric Botcazou <ebotcazou@adacore.com>
487 * freeze.adb (Freeze_Enumeration_Type): Do not give integer size to a
488 boolean type with convention C.
489 * libgnat/i-cexten.ads (bool): Change to boolean with convention C.
490 * gcc-interface/decl.c (gnat_to_gnu_entity): Add new local variable
491 FOREIGN and use it throughout the function.
492 <E_Enumeration_Type>: Set precision 1 on boolean types with foreign
494 <E_Enumeration_Subtype>: Likewise for subtypes.
495 <E_Record_Type>: Force the size of a storage unit on empty classes.
496 * gcc-interface/utils.c (make_type_from_size) <BOOLEAN_TYPE>: Skip
497 boolean types with precision 1 if the size is the expected one.
499 2018-05-25 Arnaud Charlet <charlet@adacore.com>
501 * pprint.adb (Expression_Name): Do not print non ASCII characters.
503 2018-05-25 Bob Duff <duff@adacore.com>
505 * libgnat/a-strunb__shared.ads, libgnat/a-stwiun__shared.ads,
506 libgnat/a-stzunb__shared.ads: (Initialize, Adjust): Add pragma Inline.
508 2018-05-25 Bob Duff <duff@adacore.com>
510 * sem_util.ads: Minor comment fix.
512 2018-05-25 Ed Schonberg <schonberg@adacore.com>
514 * exp_unst.adb (Visit_Node): Restrict check for uplevel references in
515 prefixes of array attributes, to prefixes that are entity names whose
517 (Note_Uplevel_Bound): Verify that the bound is declared in an enclosing
518 subprogram, as itype created for loops in pre/postcondition may appear
519 in loops at the library level.
521 2018-05-25 Ed Schonberg <schonberg@adacore.com>
523 * sem_ch13.adb (Build_Predicate_Functions): The predicate function
524 declaration is inserted into the tree and analyzed at that point, so
525 should not be reinserted when the body is constructed. Inside a
526 generic, ensure that the body is not inserted twice in the tree.
528 2018-05-25 Yannick Moy <moy@adacore.com>
530 * sem_prag.adb (Check_Grouping): Modify test to ignore statements and
531 declarations not coming from source.
533 2018-05-25 Fedor Rybin <frybin@adacore.com>
535 * doc/gnat_ugn/gnat_utility_programs.rst: Document new switch
536 --copy-environment for gnattest.
538 2018-05-24 Piotr Trojanek <trojanek@adacore.com>
540 * sem_elab.adb (Non_Private_View): Simplify by removing a local Result
542 * sem_prag.adb (Get_Base_Subprogram): Same as above.
544 2018-05-24 Eric Botcazou <ebotcazou@adacore.com>
546 * fe.h (Set_Normalized_First_Bit): Declare.
547 (Set_Normalized_Position): Likewise.
548 * repinfo.adb (List_Record_Layout): Do not use irregular output for a
549 variable position. Fix minor spacing issue.
550 * gcc-interface/decl.c (annotate_rep): If a field has a variable
551 offset, compute the normalized position and annotate it in addition to
554 2018-05-24 Eric Botcazou <ebotcazou@adacore.com>
556 * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu):
557 Constify and rename variables. Fix formatting.
558 (gnat_to_gnu) <N_Exception_Handler>: Minor tweak.
559 <N_Raise_Statement>: Likewise.
561 2018-05-24 Javier Miranda <miranda@adacore.com>
563 * exp_ch8.adb (Build_Body_For_Renaming): Adding support to build the
564 body of a variant record equality renaming.
565 (Expand_N_Subprogram_Renaming_Declaration): Adapt the code to the new
566 implementation of Build_Body_For_Renaming.
567 * exp_ch3.ads (Build_Variant_Record_Equality): New library level
568 function that factorizes the functionality needed by
569 Build_Body_For_Renaming and Expand_Freeze_Record_Type to build the body
570 of a variant record equality subprogram.
571 * exp_ch3.adb (Build_Variant_Record_Equality): New subprogram.
572 (Build_Variant_Record_Equality): New local procedure of
573 Expand_Freeze_Record_Type containing all the code specific for freezing
574 the record type that cannot be place in the new library level function.
576 2018-05-24 Ed Schonberg <schonberg@adacore.com>
578 * einfo.ads, einfo.adb (Is_Activation_Record): New flag on
579 in_parameters, used when unesting subprograms for LLVM, to indicate
580 that a generated parameter carries the activation record from the
581 enclosing subprogram.
582 * exp_unst.adb (Check_Static_Type): Handle array attributes of types
583 whose bounds may contain up-level references that need to be added to
584 an activation recoord.
585 (Add_Extra_Formal): Set Is_Activation_Record on new formal.
587 2018-05-24 Yannick Moy <moy@adacore.com>
589 * pprint.adb (Expression_Image): Improve the printing of expressions,
590 by taking more cases into account, in particular qualified expressions
591 and aggregates. Also count more the number of parentheses to close
592 after the expression.
594 2018-05-24 Javier Miranda <miranda@adacore.com>
596 * sem_ch3.adb (Is_Visible_Component): For untagged types add missing
597 check for renamed discriminants.
598 * sem_ch4.adb (Analyze_Overloaded_Selected_Component,
599 Analyze_Selected_Component, Check_Misspelled_Selector): For calls to
600 Is_Visible_Component pass the associated selector node to allow
601 checking renamed discriminants on untagged types.
603 2018-05-24 Ed Schonberg <schonberg@adacore.com>
605 * sem_ch8.adb (Analyze_Use_Type): Do not assign the Prev_Use_Clause
606 link to a use_type clause if this would cause an infinite loop in the
607 machinery that detects redundant use clauses. This may happen when the
608 redundant clauses appear in the context of a child unit and the context
611 2018-05-24 Piotr Trojanek <trojanek@adacore.com>
613 * sinfo.ads: Fix grammar in comment.
615 2018-05-24 Justin Squirek <squirek@adacore.com>
617 * einfo.ads, einfo.adb (Append_Entity): Modified to use Link_Entities
618 and manage doubly-linked entity chain.
619 (Nested_Scenarios): Removed entity field used for optimization during
620 elaboration to make room for the new field Prev_Entity.
621 (Link_Entities): Added to replace redundant calls to Set_Next_Entity
622 and Set_Prev_Entity as well as centralize changes to the entity chain.
623 (Predicated_Parent): Modified to use Node38.
624 (Prev_Entity): Added to fetch new node field Prev_Entity in all entity
626 (Remove_Entity): Moved from sem_util.
627 (Set_Nested_Scenarios): Deleted.
628 (Set_Predicated_Parent): Modified to use Node38.
629 (Set_Prev_Entity): Added to set Prev_Entity field.
630 (Set_Validated_Object): Modified to use Node38.
631 (Unlink_Next_Entity): Added to process Prev_Entity when an unlinking
633 (Validated_Object): Modified to use Node38.
634 (Write_Field36_Name): Remove Nested_Scenarios, Validated_Object, and
635 predicated parent cases.
636 (Write_Field38_Name): Add predicated parent and Validated_Object cases.
637 * sem_ch3.adb (Process_Subtype): Add guard to protect against
638 inappropriate marking of Predicated_Parent to non-itype subtypes.
639 (Make_Class_Wide_Type): Preserve Prev_Entity field and set in new type.
640 (Copy_And_Swap): Add setting of Prev_Entity.
641 (Build_derived_Record_Type): Replace Set_Next_Entity w/ Link_Entities.
642 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Replace Set_Next_Entity
644 (New_Overloaded_Entity): Remove block created to search for previous
645 entities in the entity chain with relevant calls to Prev_Entity as well
646 as replace duplicated code from Remove_Entity_And_Homonym with a call
648 * sem_ch7.adb (Exchange_Declarations): Replace Set_Next_Entity w/
650 * sem_elab.adb (Find_And_Process_Nested_Scenarios): Remove global and
651 initial subprogram declarations related to Nested_Scenarios.
652 (Process_Nested_Scenarios): Deleted.
653 (Save_Scenario): Deleted.
654 (Traverse_Body): Remove optimization for Nested_Scenarios so as to free
655 node space in the entity tree.
656 * sem_util.adb, sem_util.ads (Remove_Entity): Moved to einfo.
657 (Remove_Entity_And_Homonym): Added to separate functionality of
658 Remove_Entity from the homonym chain directly.
659 * exp_attr.adb (Expand_N_Attribute_Reference): Replace Set_Next_Entity
660 w/ Link_Entities and Unlink_Next_Entity.
661 * exp_ch3.adb (Expand_N_Object_Declaration): Replace Set_Next_Entity w/
663 * exp_ch6.adb (Replace_Renaming_Declaration_Id): Replace
664 Set_Next_Entity w/ Link_Entities.
665 * exp_disp.adb (Expand_Dispatching_Call): Replace Set_Next_Entity w/
666 Link_Entities and Unlink_Next_Entity.
667 * exp_spark.adb (Expand_SPARK_N_Object_Renaming_Declaration): Replace
668 call to Remove_Entity with its new incarnation.
669 * exp_util.adb (New_Class_Wide_Subtype): Add setting of Prev_Entity.
670 * freeze.adb (Freeze_Record_Type): Replace Set_Next_Entity w/
673 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
675 * sem_ch10.adb (Expand_Limited_With_Clause): Update the call to
676 Install_Limited_Withed_Unit.
677 (Expand_With_Clause): Update the call to Install_Withed_Unit.
678 (Implicit_With_On_Parent): Update the call to Install_Withed_Unit.
679 (Install_Context_Clauses): Update the call to Install_Withed_Unit.
680 (Install_Limited_Context_Clauses): Update the calls to
681 Install_Limited_Withed_Unit.
682 (Install_Limited_Withed_Unit): Renamed to better illustrate its
684 (Install_Private_With_Clauses): Update the calls to Install_Withed_Unit
685 and Install_Limited_Withed_Unit.
686 (Install_With_Clause): Uninstall a limited with clause if a [private]
687 with clause is given for the same package.
688 (Install_Withed_Unit): Renamed to better illustrate its purpose.
689 (Remove_Limited_With_Unit): New routine.
691 2018-05-24 Eric Botcazou <ebotcazou@adacore.com>
693 * raise-gcc.c (__gnat_SEH_error_handler): Remove prototype.
694 (__gnat_personality_seh0): Adjust and beef up comments, and
695 fix formatting throughout.
696 (__gnat_adjust_context): Deal minimally with version 2.
697 * seh_init.c (__gnat_map_SEH): Fix formatting.
698 (_gnat_SEH_error_handler): Adjust comments.
699 (__gnat_install_SEH_handler): Fix formatting.
701 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
703 * exp_ch7.adb, sem_ch3.adb, sem_res.adb: Minor reformatting.
705 2018-05-24 Ed Schonberg <schonberg@adacore.com>
707 * exp_aggr.adb (Flatten): Add a warning on an others clause in an array
708 aggregate with static bounds when named associations cover all index
709 positions and the others clause is redundant.
711 2018-05-24 Raphael Amiard <amiard@adacore.com>
713 * libgnat/a-cohama.ads: Add documentation.
715 2018-05-24 Raphael Amiard <amiard@adacore.com>
717 * libgnat/a-convec.ads: Add documentation.
719 2018-05-24 Justin Squirek <squirek@adacore.com>
721 * exp_ch3.adb (Expand_N_Object_Declaration): Ignore raising an error in
722 expansion for limited tagged types when the node to be expanded is a
723 raise expression due to it not representing a valid object.
724 * exp_ch5.adb (Expand_N_Assignment_Statement): Add exception to error
725 message regarding assignments to limited types to ignore genereated
728 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
730 * exp_util.adb (New_Class_Wide_Subtype): Capture and restore relevant
731 Ghost-related attributes of the class-wide subtype because the copy
734 2018-05-24 Justin Squirek <squirek@adacore.com>
736 * sem_res.adb (Resolve_Entity_Name): Add guard to protect against
737 marking use clauses as effective when the reference appears within
740 2018-05-24 Cyrille Comar <comar@adacore.com>
742 * doc/gnat_rm/the_gnat_library.rst: Fix typos.
743 * gnat_rm.texi: Regenerate.
745 2018-05-24 Bob Duff <duff@adacore.com>
747 * exp_ch7.adb (Expand_Cleanup_Actions): Create a mark unconditionally
748 for build-in-place functions with a caller-unknown-size result.
749 (Create_Finalizer): For build-in-place functions with a
750 caller-unknown-size result, check at run time whether we need to
751 release the secondary stack.
753 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
755 * sem_prag.adb (Analyze_Pragma): Use the full view of an internally
756 generated incomplete type.
758 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
760 * expander.adb (Expand): Update the save and restore of the Ghost
762 * exp_ch3.adb (Freeze_Type): Likewise.
763 * exp_disp.adb (Make_DT): Likewise.
764 * exp_util.adb (Build_DIC_Procedure_Body): Likewise.
765 (Build_DIC_Procedure_Declaration): Likewise.
766 (Build_Invariant_Procedure_Body): Likewise.
767 (Build_Invariant_Procedure_Declaration): Likewise.
768 (Make_Predicate_Call): Likewise.
769 * freeze.adb (Add_To_Result): Insert the freeze action of a living
770 entity prior to the start of the enclosing ignored Ghost region.
771 (Freeze_Entity): Update the save and restore of the Ghost region.
772 * ghost.adb (Install_Ghost_Mode): Reimplemented.
773 (Install_Ghost_Region): New routine.
774 (Mark_And_Set_Ghost_Assignment): Install a region rather than a mode.
775 (Mark_And_Set_Ghost_Body): Likewise.
776 (Mark_And_Set_Ghost_Completion): Likewise.
777 (Mark_And_Set_Ghost_Declaration): Likewise.
778 (Mark_And_Set_Ghost_Instantiation): Likewise.
779 (Mark_And_Set_Ghost_Procedure_Call): Likewise.
780 (Name_To_Ghost_Mode): New routine.
781 (Restore_Ghost_Region): New routine.
782 * ghost.ads (Install_Ghost_Region): New routine.
783 (Restore_Ghost_Region): New routine.
784 * opt.ads: Add new global variable Ignored_Ghost_Region.
785 * rtsfind.adb (Load_RTU): Update the save and restore of the Ghost
786 region. Install a clean region.
787 * sem.adb (Analyze): Likewise.
788 (Do_Analyze): Likewise.
789 * sem_ch3.adb (Analyze_Object_Declaration): Likewise
790 (Derive_Progenitor_Subprograms): Use local variable Iface_Alias to
791 capture the ultimate alias of the current primitive.
792 (Process_Full_View): Update the save and restore of the Ghost region.
793 Do not inherit DIC and invariant procedures.
794 * sem_ch5.adb (Analyze_Assignment): Update the save and restore of the
796 * sem_ch6.adb (Analyze_Procedure_Call): Likewise.
797 (Analyze_Subprogram_Body_Helper): Likewise.
798 * sem_ch7.adb (Analyze_Package_Body_Helper): Likewise.
799 * sem_ch12.adb (Analyze_Package_Instantiation): Likewise.
800 (Analyze_Subprogram_Instantiation): Likewise.
801 (Instantiate_Package_Body): Likewise.
802 (Instantiate_Subprogram_Body): Likewise.
803 * sem_ch13.adb (Build_Predicate_Functions): Likewise.
804 (Build_Predicate_Function_Declaration): Likewise.
806 (Add_Dispatching_Operation): Do not consider DIC and invariant
808 (Check_Dispatching_Operation): Use Add_Dispatching_Operation to collect
809 a dispatching subprogram.
810 (Check_Operation_From_Private_View): Likewise.
811 (Override_Dispatching_Operation): Likewise.
812 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Update the save
813 and restore of the Ghost region.
814 (Analyze_Initial_Condition_In_Decl_Part): Likewise.
815 (Analyze_Pragma): Update the save and restore of the Ghost region.
816 (Analyze_Pre_Post_Condition_In_Decl_Part): Likewise.
817 * sem_util.adb (Is_Suitable_Primitive): New routine.
818 * sem_util.ads (Is_Suitable_Primitive): New routine.
819 * sinfo.ads: Update the section of Ghost regions.
821 2018-05-24 Piotr Trojanek <trojanek@adacore.com>
823 * doc/gnat_rm/implementation_defined_pragmas.rst (Contract_Cases):
824 Change "condition" to "case guard" after renaming in the contract
826 * gnat_rm.texi: Regenerate.
828 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
830 * exp_util.adb (Expand_Static_Predicates_In_Choices): Indicate that the
831 construct with discrete choices no longer contains a subtype with
832 predicates since the expansion already handled this case.
834 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
836 * freeze.adb (Wrap_Imported_Subprogram): Generate an unchecked
837 conversion to the return type to avoid a side effect where an imported
838 relocated function generates a new anonymous access type, whose
839 accessibility level does not agree with with that of the wrapper.
841 2018-05-24 Javier Miranda <miranda@adacore.com>
843 * sem_util.adb (Abstract_Interface_List): Add missing support for
844 private types whose full view is a synchronized type.
845 * sem_ch3.adb (Build_Derived_Private_Type): Skip building the full
846 derivation of a private type parent type is a task type with
847 discriminants as gigi does not use such type directly.
849 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
851 * sem_elab.adb (Build_Variable_Reference_Marker): Do not create a
852 variable marker when the reference appears in the formal part of a
853 compilation unit instance because there is no place to insert it.
854 (In_Compilation_Instance_Formal_Part): New routine.
856 2018-05-24 Piotr Trojanek <trojanek@adacore.com>
858 * layout.ads, repinfo.ads: Fix references to renamed Backend_Layout
859 configuration parameter.
861 2018-05-24 Doug Rupp <rupp@adacore.com>
863 * argv-lynxos178-raven-cert.c: New file.
864 * libgnat/system-lynxos178-x86.ads: New file.
866 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
868 * exp_disp.adb, freeze.adb, gnat1drv.adb, sem_ch5.adb, sem_spark.adb:
871 2018-05-23 Pascal Obry <obry@adacore.com>
873 * adaint.c (win32_wait): Properly free the handle/pid lists when
874 WaitForMultipleObjects fails (return WAIT_FAILED).
876 2018-05-23 Pascal Obry <obry@adacore.com>
878 * adaint.c (win32_wait): Add missing parentheses.
880 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
882 * exp_ch3.adb (Check_Large_Modular_Array): Moved to Freeze.
883 (Expand_N_Object_Declaration): Do not check for a large modular array
885 * freeze.adb (Check_Large_Modular_Array): Moved from Exp_Ch3.
886 (Freeze_Object_Declaration): Code cleanup. Check for a large modular
888 * sem_ch3.adb: Minor reformatting.
890 2018-05-23 Ed Schonberg <schonberg@adacore.com>
892 * einfo.ads: New attribute on types: Predicated_Parent, to simplify the
893 retrieval of the applicable predicate function to an itype created for
894 a constrained array component.
895 * einfo.adb: Subprograms for Predicated_Parent.
896 (Predicate_Function): Use new attribute.
897 * exp_util.adb (Make_Predicate_Call): If the predicate function is not
898 available for a subtype, retrieve it from the base type, which may have
899 been frozen after the subtype declaration and not captured by the
901 * sem_aggr.adb (Resolve_Array_Aggregate): An Others association is
902 legal within a generated initiqlization procedure, as may happen with a
903 predicate check on a component, when the predicate function applies to
904 the base type of the component.
905 * sem_ch3.adb (Analyze_Subtype_Declaration): Clean up inheritance of
906 predicates for subtype declarations and for subtype indications in
908 (Process_Subtype): Likewise. Handle properly the case of a private type
909 with unknown discriminants whose full view is an unconstrained array.
910 Use Predicated_Parent to indicate source of predicate function on an
911 itype whose parent is itself an itype.
912 (Complete_Private_Subtype): If the private view has unknown
913 discriminants and the full view is an unconstrained array, set base
914 type of completion to the full view of parent.
915 (Inherit_Predicate_Flags): Prevent double assignment of predicate
917 (Build_Subtype): For a constrained array component, propagate predicate
918 information from original component type declaration.
920 2018-05-23 Boris Yakobowski <yakobowski@adacore.com>
922 * libgnat/a-ngelfu.ads (Arctanh, Arccoth): Fix faulty preconditions.
924 2018-05-23 Arnaud Charlet <charlet@adacore.com>
926 * checks.adb (Minimize_Eliminate_Overflows): Default initialize Lo and
928 * sem_elab.adb: Make "out" parameters instead of "in out" when
931 2018-05-23 Bob Duff <duff@adacore.com>
933 * gnatbind.adb (List_Applicable_Restrictions): Add
934 No_Implementation_Restrictions to the list of restrictions not to list.
935 Remove double negative "not No_Restriction_List". Comment the
936 commentary that is output, so it won't cause errors if used directly in
939 2018-05-23 Ed Schonberg <schonberg@adacore.com>
941 * sem_prag.adb (Inherit_Class_Wide_Pre): Refine legality check on
942 class-wide precondition on a type extension when ancestor does not have
943 a class-wide precondition. Previously the compiler accepted such a
944 precondition when the ancestor had a class-wide postcondition.
946 2018-05-23 Javier Miranda <miranda@adacore.com>
948 * sem_attr.adb (Valid_Scalars): Do not invoke Error_Attr_P to report
949 the warning on occurrences of this attribute whose evaluation is always
950 true (since that subprogram aborts processing the attribute). In
951 addition, replace the node by its boolean result 'True' (required
952 because the backend has no knowledge of this attribute).
954 2018-05-23 Bob Duff <duff@adacore.com>
956 * libgnat/a-convec.adb: (Insert, Insert_Space): Suppress warnings. The
957 code in question is not reachable in the case where Count_Type'Last is
960 2018-05-23 Yannick Moy <moy@adacore.com>
962 * doc/gnat_rm/implementation_defined_pragmas.rst: Clarify meaning of
963 local pragma Warnings Off without On.
964 * gnat_rm.texi: Regenerate.
966 2018-05-23 Olivier Hainque <hainque@adacore.com>
968 * libgnat/g-excact.ads (Is_Foreign_Exception): New predicate.
969 * libgnat/g-excact.adb: Implement.
971 2018-05-23 Ed Schonberg <schonberg@adacore.com>
973 * sem_ch5.adb (Analyze_Iterator_Specification): If a subtype indication
974 is present, verify its legality when the domain of iteration is a
975 GNAT-specific formal container, as is already done for arrays and
976 predefined containers.
978 2018-05-23 Yannick Moy <moy@adacore.com>
980 * sem_util.adb (Enclosing_Declaration): Fix the case of a named number
981 declaration, which was not taken into account.
983 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
985 * debug.adb: Switch -gnatd_s is now used to stop elaboration checks on
986 synchronized suspension.
987 * rtsfind.ads: Add entries for units Ada.Synchronous_Barriers and
988 Ada.Synchronous_Task_Control and routines Suspend_Until_True and
990 * sem_elab.adb: Document switch -gnatd_s.
991 (In_Task_Body): New routine.
992 (Is_Potential_Scenario): Code cleanup. Stop the traversal of a task
993 body when the current construct denotes a synchronous suspension call,
994 and restriction No_Entry_Calls_In_Elaboration_Code or switch -gnatd_s
996 (Is_Synchronous_Suspension_Call): New routine.
997 * switch-c.adb (Scan_Front_End_Switches): Switch -gnatJ now sets switch
1000 2018-05-23 Javier Miranda <miranda@adacore.com>
1002 * exp_disp.adb (Make_DT): Restrict the initialization of
1003 External_Tag and Expanded_Name to an empty string to the case where
1004 both pragmas apply (i.e. No_Tagged_Streams and Discard_Names), since
1005 restricted runtimes are compiled with pragma Discard_Names.
1006 * doc/gnat_rm/implementation_defined_pragmas.rst,
1007 doc/gnat_rm/implementation_defined_characteristics.rst: Add
1009 * gnat_rm.texi: Regenerate.
1011 2018-05-23 Maroua Maalej <maalej@adacore.com>
1013 * sem_spark.adb: Fix of some permission rules of pointers in SPARK.
1015 2018-05-23 Ed Schonberg <schonberg@adacore.com>
1017 * sem_ch5.adb (Preanalyze_Range): The pre-analysis of the domain of
1018 iteration of an Ada2012 loop is performed to determine the type of the
1019 domain, but full analysis is performed once the loop is rewritten as a
1020 while-loop during expansion. The pre-analysis suppresses expansion; it
1021 must also suppress the generation of freeze nodes, which may otherwise
1022 appear in the wrong scope before rewritting.
1024 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
1026 * sem_elab.adb: Update the section on suppressing elaboration warnings.
1028 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
1030 * einfo.adb (Is_Elaboration_Checks_OK_Id): Use predicate
1031 Is_Elaboration_Target.
1032 (Is_Elaboration_Target): New routine.
1033 (Is_Elaboration_Warnings_OK_Id): Use predicate Is_Elaboration_Target.
1034 (Set_Is_Elaboration_Checks_OK_Id): Use predicate Is_Elaboration_Target.
1035 (Set_Is_Elaboration_Warnings_OK_Id): Use predicate
1036 Is_Elaboration_Target.
1037 * einfo.ads: Add new synthesized attribute Is_Elaboration_Target along
1038 with occurrences in nodes.
1039 (Is_Elaboration_Target): New routine.
1040 * sem_prag.adb (Analyze_Pragma): Suppress elaboration warnings when an
1041 elaboration target is subject to pragma Warnings (Off, ...).
1043 2018-05-23 Eric Botcazou <ebotcazou@adacore.com>
1045 * repinfo.adb (List_Type_Info): Remove obsolete stuff.
1047 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
1049 * einfo.adb: Flag304 is now Is_Elaboration_Warnings_OK_Id.
1050 (Is_Elaboration_Warnings_OK_Id): New routine.
1051 (Set_Is_Elaboration_Warnings_OK_Id): New routine.
1052 (Write_Entity_Flags): Output Flag304.
1053 * einfo.ads: Add new attribute Is_Elaboration_Warnings_OK_Id along with
1054 occurrences in entities.
1055 (Is_Elaboration_Warnings_OK_Id): New routine along with pragma Inline.
1056 (Set_Is_Elaboration_Warnings_OK_Id): New routine along with pragma
1058 * sem_attr.adb (Analyze_Access_Attribute): Capture the state of
1059 elaboration warnings.
1060 * sem_ch3.adb (Analyze_Object_Declaration): Capture the state of
1061 elaboration warnings.
1062 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Capture the
1063 state of elaboration warnings.
1064 (Analyze_Subprogram_Body_Helper): Capture the state of elaboration
1066 (Analyze_Subprogram_Declaration): Capture the state of elaboration
1068 * sem_ch9.adb (Analyze_Entry_Declaration): Capture the state of
1069 elaboration warnings.
1070 (Analyze_Single_Task_Declaration): Capture the state of elaboration
1072 (Analyze_Task_Type_Declaration): Capture the state of elaboration
1074 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Capture the state
1075 of elaboration warnings.
1076 (Analyze_Generic_Subprogram_Declaration): Capture the state of
1077 elaboration warnings.
1078 * sem_elab.adb: Add a section on suppressing elaboration warnings.
1079 Type Processing_Attributes includes component Suppress_Warnings
1080 intended to suppress any elaboration warnings along a path in the
1081 graph. Update Initial_State to include a value for this component.
1082 Types Target_Attributes and Task_Attriutes include component
1083 Elab_Warnings_OK to indicate whether the target or task has elaboration
1084 warnings enabled. component Elab_Warnings_OK.
1085 (Build_Access_Marker): Propagate attribute
1086 Is_Elaboration_Warnings_OK_Node from the attribute to the generated
1088 (Extract_Instantiation_Attributes): Set the value for Elab_Warnings_OK.
1089 (Extract_Target_Attributes): Set the value for Elab_Warnings_OK.
1090 (Extract_Task_Attributes): Set the value for Elab_Warnings_OK.
1091 (Process_Conditional_ABE_Access): Suppress futher elaboration warnings
1092 when already in this mode or when the attribute or target have warnings
1094 (Process_Conditional_ABE_Activation_Impl): Do not emit any diagnostics
1095 if warnings are suppressed.
1096 (Process_Conditional_ABE_Call): Suppress further elaboration warnings
1097 when already in this mode, or the target or call have warnings
1099 (Process_Conditional_ABE_Call_Ada): Do not emit any diagnostics if
1100 warnings are suppressed.
1101 (Process_Conditional_ABE_Call_SPARK): Do not emit any diagnostics if
1102 warnings are suppressed.
1103 (Process_Conditional_ABE_Instantiation): Suppress further elaboration
1104 warnings when already in this mode or when the instantiation has
1105 warnings suppressed.
1106 (Process_Conditional_ABE_Instantiation_Ada): Do not emit any
1107 diagnostics if warnings are suppressed.
1108 (Process_Conditional_ABE_Variable_Assignment_Ada): Use the more
1109 specific Is_Elaboration_Warnings_OK_Id rather than Warnings_Off.
1110 (Process_Conditional_ABE_Variable_Assignment_SPARK): Use the more
1111 specific Is_Elaboration_Warnings_OK_Id rather than Warnings_Off.
1112 (Process_Task_Object): Suppress further elaboration warnings when
1113 already in this mode, or when the object, activation call, or task type
1114 have warnings suppressed. Update the processing state to indicate that
1115 the path goes through a task body.
1116 * sinfo.adb (Is_Elaboration_Warnings_OK_Node): Accept attribute
1118 (Set_Is_Elaboration_Warnings_OK_Node): Accept attribute references.
1119 * sinfo.ads: Attribute Is_Elaboration_Warnings_OK_Node now applies to
1120 attribute references.
1122 2018-05-23 Piotr Trojanek <trojanek@adacore.com>
1124 * einfo.ads: Minor reformatting.
1126 2018-05-23 Ed Schonberg <schonberg@adacore.com>
1128 * sem_ch3.adb (Analyze_Object_Declaration): If expression is an
1129 anonymous_access_to_ subprogram formal, apply a conversion to force an
1130 accsssibility check that will fail statically, enforcing 3.10.2 (13).
1132 2018-05-23 Daniel Mercier <mercier@adacore.com>
1134 * gnat1drv.adb: Turn off length expansion in CodePeer mode.
1136 2018-05-23 Bob Duff <duff@adacore.com>
1138 * freeze.adb: (Check_Address_Clause): Deal with build-in-place
1139 aggregates in addition to build-in-place calls.
1141 2018-05-23 Bob Duff <duff@adacore.com>
1143 * einfo.ads: Minor reformatting.
1144 * sem_ch3.adb: Likewise.
1145 * sinfo.ads: Likewise.
1147 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
1149 * exp_ch3.adb (Default_Initialize_Object): Do not optimize scalar array
1150 initialization when the component type has predicates.
1151 * exp_ch4.adb (Expand_N_Allocator): Do not optimize scalar array
1152 allocation when the component type has predicates.
1154 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
1156 * einfo.adb, exp_disp.adb, sem_ch3.adb, sem_ch6.adb, sem_prag.adb:
1159 2018-05-22 Justin Squirek <squirek@adacore.com>
1161 * sem_ch6.adb (Analyze_Expression_Function): Propagate flags from the
1162 original function spec into the generated function spec due to
1163 expansion of expression functions during analysis.
1164 (Analyze_Subprogram_Body_Helper): Modify check on formal parameter
1165 references from the body to the subprogram spec in the case of
1166 expression functions because of inconsistances related to having a
1168 * libgnarl/s-osinte__android.ads: Flag parameters as unused.
1169 * libgnarl/s-osinte__lynxos178e.ads: Likewise.
1170 * libgnarl/s-osinte__qnx.adb: Likewise.
1171 * libgnarl/s-osinte__qnx.ads: Likewise.
1173 2018-05-22 Doug Rupp <rupp@adacore.com>
1175 * init.c (HAVE_ADJUST_CONTEXT_FOR_RAISE): Don't define on VxWorks7 for
1178 2018-05-22 Olivier Hainque <hainque@adacore.com>
1180 * libgnat/a-except.adb (Exception_Propagation.Propagate_Exception):
1181 Expect an Exception_Occurence object, not an Access.
1182 (Complete_And_Propagate_Occurrence): Adjust accordingly.
1183 (Raise_From_Signal_Handler): Likewise.
1184 (Reraise_Occurrence_No_Defer): If we have a Machine_Occurrence
1185 available in the provided occurrence object, just re-propagate the
1186 latter as a bare "raise;" would do.
1187 * libgnat/a-exexpr.adb (Propagate_Exception): Adjust to spec change.
1188 * libgnat/a-exstat.adb (String_To_EO): Initialize X.Machine_Occurrence
1189 to null, to mark that the occurrence we're crafting from the stream
1190 contents is not being propagated (yet).
1192 2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1194 * exp_aggr.adb (Initialize_Ctrl_Record_Component): Insert the generated
1195 code for a transient component in line with the rest of the
1196 initialization code, rather than before the aggregate. This ensures
1197 that the component has proper visibility of the discriminants.
1199 2018-05-22 Jerome Lambourg <lambourg@adacore.com>
1201 * adaint.c: Reorganize QNX-specific macros, use syspage to retreive the
1204 2018-05-22 Jerome Lambourg <lambourg@adacore.com>
1206 * sigtramp-qnx.c: Properly restore link register in signal trampoline.
1208 2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1210 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Strip away any
1211 conversions before extracting the value of the expression.
1212 * exp_ch3.adb (Default_Initialize_Object): Optimize the default
1213 initialization of an array of scalars.
1214 (Get_Simple_Init_Val): Add processing for array types. Remove the
1215 processing of strings because this case is already handled by the array
1217 (Needs_Simple_Initialization): Moved to Sem_Util.
1218 (Simple_Init_Array_Type): New routine.
1219 (Simple_Init_Initialize_Scalars_Type): Reimplemented to use the new
1220 facilities from Sem_Util.
1221 (Simple_Initialization_OK): New routine.
1222 * exp_ch3.ads (Needs_Simple_Initialization): Moved to Sem_Util.
1223 * exp_ch4.adb (Expand_N_Allocator): Optimize the default allocation of
1224 an array of scalars.
1225 * sem_prag.adb (Analyze_Float_Value): New routine.
1226 (Analyze_Integer_Value): New routine.
1227 (Analyze_Pragma): Reimplement the analysis of pragma Initialize_Scalars
1228 to handled the extended form of the pragma.
1229 (Analyze_Type_Value_Pair): New routine.
1230 * sem_util.adb: Add invalid value-related data structures.
1231 (Examine_Array_Bounds): New routine.
1232 (Has_Static_Array_Bounds): Reimplemented.
1233 (Has_Static_Non_Empty_Array_Bounds): New routine.
1234 (Invalid_Scalar_Value): New routine.
1235 (Needs_Simple_Initialization): Moved from Exp_Ch3.
1236 (Set_Invalid_Scalar_Value): New routines.
1237 * sem_util.ads (Has_Static_Non_Empty_Array_Bounds): New routine.
1238 (Invalid_Scalar_Value): New routine.
1239 (Needs_Simple_Initialization): Moved from Exp_Ch3.
1240 (Set_Invalid_Scalar_Value): New routines.
1241 * snames.ads-tmpl: Add names for the salar type families used by pragma
1244 2018-05-22 Javier Miranda <miranda@adacore.com>
1246 * exp_disp.adb (Make_DT): Initialize the External_Tag with an empty
1247 string when pragma No_Tagged_Streams is applicable to the tagged type,
1248 and initialize the Expanded_Name with an empty string when pragma
1249 Discard_Names is applicable to the tagged type.
1251 2018-05-22 Ed Schonberg <schonberg@adacore.com>
1253 * sem_ch6.adb (Check_Conformance): Add RM reference for rule that a
1254 formal subprogram is never subtype conformqnt, and thus cannot be the
1255 prefix of 'Access. Reject as well the attribute when applied to a
1256 renaming of a formal subprogram.
1258 2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1260 * exp_ch3.adb (Build_Array_Init_Proc): Update the call to
1261 Needs_Simple_Initialization.
1262 (Build_Init_Statements): Update the call to Get_Simple_Init_Val.
1263 (Check_Subtype_Bounds): Renamed to Extract_Subtype_Bounds. Update the
1264 profile and comment on usage.
1265 (Default_Initialize_Object): Do not use New_Copy_Tree to set the proper
1266 Sloc of a value obtained from aspect Default_Value because this could
1267 potentially replicate large trees. The proper Sloc is now set in
1268 Get_Simple_Init_Val.
1269 (Get_Simple_Init_Val): Reorganized by breaking the various cases into
1270 separate routines. Eliminate the use of global variables.
1271 (Init_Component): Update the call to Get_Simple_Init_Val.
1272 (Needs_Simple_Initialization): Update the parameter profile and all
1274 (Simple_Init_Defaulted_Type): Copy the value of aspect Default_Value
1275 and set the proper Sloc.
1276 * exp_ch3.ads (Get_Simple_Init_Val): Update the parameter profile and
1278 (Needs_Simple_Initialization): Update the parameter profile.
1280 2018-05-22 Patrick Bernardi <bernardi@adacore.com>
1282 * sem_ch3.adb (Build_Discriminant_Constraints): Raise an error if the
1283 user tries to use a subtype indication as a discriminant constraint.
1285 2018-05-22 Ed Schonberg <schonberg@adacore.com>
1287 * exp_ch4.ads, exp_ch4.adb, exp_util.adb, expander.adb: Remove mention
1288 of N_Reduction_Expression and N_Reduction_Expression_Parameter.
1289 * par-ch4.adb: Remove parsing routines for reduction expressions.
1290 * sem.adb, sinfo.ads, sinfo.adb, sem_ch4.ads, sem_ch4.adb, sem_res.adb,
1291 sem_spark.adb, sprint.adb: Remove analysis routines for reduction
1294 2018-05-22 Arnaud Charlet <charlet@adacore.com>
1296 * sem_ch8.adb (Check_Frozen_Renaming): Do not emit error in
1297 Relaxed_RM_Semantics mode.
1299 2018-05-22 Arnaud Charlet <charlet@adacore.com>
1301 * comperr.adb (Delete_SCIL_Files): Take into account
1302 N_Generic_Package_Renaming_Declaration.
1304 2018-05-22 Ed Schonberg <schonberg@adacore.com>
1306 * sem_ch3.adb (Search_Derivation_Levels): Whenever a parent type is
1307 private, use the full view if available, because it may include renamed
1308 discriminants whose values are stored in the corresponding
1311 2018-05-22 Ed Schonberg <schonberg@adacore.com>
1313 * einfo.ads, einfo.adb: New attribute Hidden_In_Formal_Instance,
1314 defined on packages that are actuals for formal packages, in order to
1315 set/reset the visibility of the formals of a formal package with given
1316 actuals, when there are subsequent uses of those formals in the
1317 enclosing generic, as required by RN 12.7 (10).
1318 * atree.ads, atree.adb: Add operations for Elist30.
1319 * atree.h: Add Elist30.
1320 * sem_ch12.adb (Analyze_Formal_Package_Instantiation): Collect formals
1321 that are not defaulted and are thus not visible within the current
1323 (Check_Formal_Packages): Reset visibility of formals of a formal
1324 package that are not defaulted, on exit from current instance.
1326 2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1328 * sem_prag.adb (Analyze_Input_Output): Emit an error when a non-null,
1329 non-'Result output appears in the output list of a function.
1331 2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1333 * exp_attr.adb (Build_Array_VS_Func): Reimplemented.
1334 (Build_Record_VS_Func): Reimplemented.
1335 (Expand_N_Attribute): Reimplement the handling of attribute
1337 * sem_attr.adb (Analyze_Attribute): Reimplement the handling of
1338 attribute 'Valid_Scalars.
1339 * sem_util.adb (Scalar_Part_Present): Reimplemented.
1340 (Validated_View): New routine.
1341 * sem_util.ads (Scalar_Part_Present): Update the parameter profile and
1343 (Validated_View): New routine.
1344 * doc/gnat_rm/implementation_defined_attributes.rst: Update the
1345 documentation of attribute 'Valid_Scalars.
1346 * gnat_rm.texi: Regenerate.
1348 2018-05-22 Bob Duff <duff@adacore.com>
1350 * binde.adb: (Choose): Ignore a pragma Elaborate_Body that appears in
1351 the spec of a SAL_Interface package.
1353 2018-05-22 Ed Schonberg <schonberg@adacore.com>
1355 * freeze.adb (Freeze_Entity): When analyzing delayed aspects of an
1356 entity E within a generic unit, indicate that there are no remaining
1357 delayed aspects after invoking Analyze_Aspects_At_Freeze_Point. The
1358 entity E is not frozen yet but the aspects should not be reanalyzed at
1359 the freeze point, which may be outside of the generic and may not have
1360 the proper visibility.
1362 2018-05-22 Bob Duff <duff@adacore.com>
1364 * doc/gnat_ugn/gnat_utility_programs.rst: Add documentation for
1365 the new --split-line-before-record, --indent-named-statements and
1366 --no-align-modes gnatpp switches.
1368 2018-05-22 Ed Schonberg <schonberg@adacore.com>
1370 * sem_prag.adb (Process_Compile_Time_Warning_Or_Error): Handle properly
1371 a second argument that is a constant of a given string value.
1373 2018-05-22 Doug Rupp <rupp@adacore.com>
1375 * sigtramp-vxworks-target.inc: Align stack to 128bits on AArch64.
1377 2018-05-22 Jerome Lambourg <lambourg@adacore.com>
1379 * sigtramp-qnx.c: Fix stack alignment issue in the signal trampoline.
1381 2018-05-22 Ed Schonberg <schonberg@adacore.com>
1383 * freeze.adb (Freeze_Fixed_Point_Type): If the first subtype has
1384 delayed aspects, analyze them now, os that the representation of the
1385 type (size, bounds) can be computed and validated.
1387 2018-05-22 Olivier Hainque <hainque@adacore.com>
1389 * libgnat/s-dwalin.adb (Enable_Cache): Skip symbols outside of the
1390 executable code section boundaries.
1392 2018-05-22 Javier Miranda <miranda@adacore.com>
1394 * locales.c: New implementation for the Ada.Locales package.
1395 * libgnat/a-locale.ads: Remove comment indicating that this is not
1397 * doc/gnat_rm/standard_library_routines.rst: Remove comment indicating
1398 that this is not implemented.
1399 * gnat_rm.texi: Regenerate.
1401 2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1403 * exp_ch5.adb, freeze.adb, pprint.adb, sem_ch4.adb, sem_res.adb: Minor
1406 2018-05-22 Justin Squirek <squirek@adacore.com>
1408 * sem_ch12.adb (In_Same_Declarative_Part): Moved to sem_util.
1409 (Freeze_Subprogram_Body, Install_Body): Modify calls to
1410 In_Same_Declarative_Part.
1411 * sem_prag.adb (Analyze_Pragma-Pragma_Pure_Function): Add check to
1412 verify pragma declaration is within the same declarative list with
1413 corresponding error message.
1414 * sem_util.adb, sem_util.ads (In_Same_Declarative_Part): Moved from
1415 sem_ch12.adb and generalized to be useful outside the scope of
1418 2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1420 * sem_ch6.adb (Analyze_Subprogram_Declaration): Set the proper
1421 categorization of the unit after processing the aspects in case one of
1422 its aspects is converted into a categorization pragma.
1424 2018-05-21 Ed Schonberg <schonberg@adacore.com>
1426 * freeze.adb (Warn_Overlay): Do not emit a wawrning on an object
1427 declaration with an explicit address clause and a type with default
1428 initialization, if the declaration carries an aspect
1429 Suppress_Initialization.
1431 2018-05-21 Daniel Mercier <mercier@adacore.com>
1433 * pprint.adb: Use mixed case for attribute names.
1435 2018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
1437 * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Rename the call to
1438 Analyze_Aspect_Specifications_On_Body_Or_Stub.
1439 (Analyze_Subprogram_Body_Helper): Rename the calls to
1440 Analyze_Aspect_Specifications_On_Body_Or_Stub.
1441 * sem_ch9.adb (Analyze_Entry_Body): Rename the call to
1442 Analyze_Aspect_Specifications_On_Body_Or_Stub.
1443 * sem_ch10.adb: Add with and use clause for Sem_Ch13.
1444 (Analyze_Package_Body_Stub): Add constant Id. Decorate the package stub
1445 prior to analyzing its aspects.
1446 (Analyze_Protected_Body_Stub): Add constant Id. Decorate the package
1447 stub prior to analyzing its aspects. Save and restore the configuration
1449 (Analyze_Task_Body_Stub): Add constant Id. Decorate the package stub
1450 prior to analyzing its aspects.
1451 * sem_ch13.adb (Analyze_Aspect_Specifications_On_Body_Or_Stub): Renamed
1452 to Analyze_Aspects_On_Subprogram_Body_Or_Stub.
1453 * sem_ch13.ads (Analyze_Aspect_Specifications_On_Body_Or_Stub): Renamed
1454 to Analyze_Aspects_On_Subprogram_Body_Or_Stub.
1455 * sem_prag.adb: Code reformatting.
1456 (Analyze_Refined_Depends_Global_Post): Consider task body stubs.
1458 2018-05-21 Jerome Lambourg <lambourg@adacore.com>
1460 * gcc-interface/Makefile.in: Add g-soliop__qnx.ads to the runtime build
1463 2018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
1465 * exp_cg.adb: Remove with and use clause for Exp_Disp.
1466 * exp_ch9.adb: Remove with and use clause for Exp_Disp.
1467 * exp_disp.adb (Is_Predefined_Dispatching_Operation): Moved to Sem_Util.
1468 (Is_Predefined_Interface_Primitive): Moved to Sem_Util.
1469 (Is_Predefined_Internal_Operation): Moved to Sem_Util.
1470 * exp_disp.ads (Is_Predefined_Dispatching_Operation): Moved to Sem_Util.
1471 (Is_Predefined_Interface_Primitive): Moved to Sem_Util.
1472 (Is_Predefined_Internal_Operation): Moved to Sem_Util.
1473 * exp_dist.adb: Remove with and use clause for Exp_Disp.
1474 * freeze.adb: Remove with and use clause for Exp_Disp.
1475 * sem_cat.adb: Remove with and use clause for Exp_Disp.
1476 * sem_ch6.adb: Remove with and use clause for Exp_Disp.
1477 * sem_ch12.adb: Remove with and use clause for Exp_Disp.
1478 * sem_elab.adb (Check_Overriding_Primitive): Do not process predefined
1480 * sem_util.adb: Remove with and use clause for Exp_Disp.
1481 (Is_Predefined_Dispatching_Operation): Moved from Exp_Disp.
1482 (Is_Predefined_Interface_Primitive): Moved from Exp_Disp.
1483 (Is_Predefined_Internal_Operation): Moved from Exp_Disp.
1484 * sem_util.ads (Is_Predefined_Dispatching_Operation): Moved from
1486 (Is_Predefined_Interface_Primitive): Moved from Exp_Disp.
1487 (Is_Predefined_Internal_Operation): Moved from Exp_Disp.
1489 2018-05-21 Ed Schonberg <schonberg@adacore.com>
1491 * sem_res.adb (Valid_Conversion): Improve error message on an illegal
1492 type conversion whose expression has a limited view of a type.
1494 2018-05-21 Ed Schonberg <schonberg@adacore.com>
1496 * exp_ch5.adb (Build_Formal_Container_Iteration): If source has
1497 explicit name for iterator loop, preserve that name in expanded
1498 construct, for possible use in exit statements.
1500 2018-05-21 Javier Miranda <miranda@adacore.com>
1502 * sem_ch4.adb (Analyze_Membership_Op): Avoid compiler crash when the
1503 spec of a unit has Ada 2012 membership tests with multiple choices and
1504 the unit body is not compiled under Ada 2012 mode.
1506 2018-05-21 Doug Rupp <rupp@adacore.com>
1508 * sigtramp-vxworks-target.inc: Set cfa_reg properly from sigcontext
1510 (CFI_COMMON_REGS): Restore LR jic probed from prologue.
1511 (REGNO_PC_OFFSET): Change to correct value for Aarch64.
1513 2018-05-21 Jose Ruiz <ruiz@adacore.com>
1515 * doc/gnat_ugn/gnat_utility_programs.rst, exp_attr.adb,
1516 libgnarl/s-tassta.adb: Minor typo fixes
1518 2018-05-21 Ed Schonberg <schonberg@adacore.com>
1520 * sem_ch4.adb (Analyze_One_Call): Recognize complex cases where an
1521 indexed call originally in prefix forn is itself the prefix of a
1524 2018-05-21 Piotr Trojanek <trojanek@adacore.com>
1526 * sem_eval.adb (Is_Null_Range): Clarify access to the full view of a
1528 (Not_Null_Range): Same as above.
1530 2018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
1532 * exp_ch3.adb: Minor reformatting.
1533 * exp_ch6.adb: Likewise.
1534 * freeze.adb: Likewise.
1535 * inline.adb: Likewise.
1536 * sem_util.adb: Likewise.
1538 2018-05-21 Yannick Moy <moy@adacore.com>
1540 * inline.adb (Expand_Inlined_Call.Process_Formals): Use a type
1541 conversion instead of an unchecked type conversion when inlining a
1542 return statement, unless type qualification is required (for character
1543 and string literal) or no check can result from the conversion (for
1545 * opt.ads: Update comment.
1547 2018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
1549 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Install the elaboration
1550 model of the compilation unit spec, if any.
1551 * sem_ch7.adb (Analyze_Package_Body_Helper): Install the elaboration
1552 model of the compilation unit spec, if any.
1553 * sem_ch10.adb (Analyze_Subunit): Install the elaboration model of the
1554 parent compilation unit spec, if any.
1555 * sem_elab.adb (Check_Elaboration_Scenarios): Restore the elaboration
1556 model of the main unit.
1557 (Is_Same_Unit): The routine now uses Unit_Entity.
1558 (Is_Subunit): Removed.
1559 (Normalize_Unit): Removed.
1560 (Unit_Entity): New routine.
1561 * sem_prag.adb (Analyze_Pragma): Reimplement the handling of pragma
1562 Elaboration_Checks. The analysis now ensures that the pragma appears at
1563 the configuration level, and on the initial declaration of a unit.
1564 Other placements are either flagged as illegal, or ignored.
1565 (Check_Duplicate_Elaboration_Checks_Pragma): New routine.
1566 (Ignore_Elaboration_Checks_Pragma): New routine.
1567 * sem_util.adb (Install_Elaboration_Model): New routine.
1568 * sem_util.ads (Install_Elaboration_Model): New routine.
1569 * doc/gnat_rm/implementation_defined_pragmas.rst: Update the
1570 documentation of pragma Elaboration_Checks.
1571 * gnat_rm.texi: Regenerate.
1573 2018-05-21 Olivier Hainque <hainque@adacore.com>
1575 * libgnat/s-trasym__dwarf.adb (Executable_Name): Return argv[0] instead
1576 of empty string when argv[0] couldn't be found on PATH.
1577 (Enable_Cache): Raise Program_Error instead of attempting a null
1578 pointer dereference when the Exec_Module initialization failed.
1580 2018-05-21 Piotr Trojanek <trojanek@adacore.com>
1582 * libgnarl/a-reatim.ads (Clock_Time): Remove External aspect.
1583 * libgnarl/a-taside.ads (Tasking_State): Likewise.
1584 * libgnat/a-calend.ads (Clock_Time): Likewise.
1586 2018-05-21 Yannick Moy <moy@adacore.com>
1588 * sem_ch6.adb (Analyze_Procedure_Call): Refine test to recognize prefix
1589 call notation in inlined call in GNATprove mode.
1591 2018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
1593 * einfo.adb (Is_External_State): An abstract state is also external
1594 when it is declared with option "synchronous".
1595 * einfo.ads: Update the documentation of synthesized attribute
1597 * sem_util.adb (Find_Simple_Properties): New routine.
1598 (Is_Enabled_External_Property): New routine.
1599 (State_Has_Enabled_Property): Reimplemented. The two flavors of option
1600 External have precedence over option Synchronous when determining
1601 whether a property is in effect.
1603 2018-05-21 Yannick Moy <moy@adacore.com>
1605 * sem_eval.adb (Static_Length): Take into account case of variable of
1606 subtype string literal.
1608 2018-05-21 Olivier Hainque <hainque@adacore.com>
1610 * libgnat/s-objrea.ads (Get_Memory_Bounds): Rename as Get_Xcode_Bounds.
1611 (Object_Section): Rename Flag_Alloc component as Flag_Xcode.
1612 * libgnat/s-objrea.adb (Get_Xcode_Bounds): Adjust to new subprogram and
1614 (Get_Section, ELF case): Set Flag_Xcode from SHF_EXECINSTR.
1615 * libgnat/s-dwalin.adb (Open): Adjust to the Get_Memory_Bounds name
1618 2018-05-21 Olivier Hainque <hainque@adacore.com>
1620 * libgnat/s-dwalin.ads (Dwarf_Context): Change type of Load_Address to
1621 Address, and type of Low, High to Storage_Offset.
1622 (Low): Rename as Low_Address and convey that the return value is a
1623 runtime reference accounting for a load address.
1624 * libgnat/s-dwalin.adb (Read_Aranges_Entry): Adjust to the
1625 address/offset type changes.
1626 (Aranges_Lookup): Likewise.
1627 (Symbolic_Address): Likewise.
1628 (Symbolic_Traceback): Likewise.
1629 (Dump_Cache): Likewise.
1630 (Is_Inside): Likewise.
1632 (Set_Load_Address): Likewise.
1633 (Low_Address): Likewise, and account for C.Load_Address.
1634 * libgnat/s-trasym__dwarf.adb (Lt): Use Low_Address instead of Low.
1635 (Multi_Module_Symbolic_Traceback): Compare address in traceback
1636 with module Low_Address instead of Low.
1638 2018-05-21 Olivier Hainque <hainque@adacore.com>
1640 * libgnat/s-dwalin.ads (Dwarf_Context): Rename Load_Slide as
1642 * libgnat/s-dwalin.adb (Is_Inside): Adjust accordingly.
1643 (Set_Load_Address): Likewise.
1644 (Symbolic_Traceback): Likewise.
1646 2018-05-21 Olivier Hainque <hainque@adacore.com>
1648 * libgnat/s-trasym__dwarf.adb (Add_Module_To_Cache): Expect a
1649 Load_Address argument and pass it down to Init_Module.
1650 * libgnat/s-tsmona__linux.adb (Build_Cache_For_All_Modules): Pass
1651 lm.l_addr as the Load_Address to Add_Module_To_Cache.
1653 2018-05-21 Piotr Trojanek <trojanek@adacore.com>
1655 * einfo.adb (Has_Discriminants): Stronger assertion.
1656 (Set_Has_Discriminants): Stronger assertion.
1657 * sem_ch13.adb (Push_Scope_And_Install_Discriminants): Adapt to respect
1658 the stronger assertion on Has_Discriminant.
1659 (Uninstall_Discriminants_And_Pop_Scope): Same as above.
1660 * sem_util.adb (New_Copy_Tree): Same as above.
1661 * sem_ch7.adb (Generate_Parent_References): Prevent calls to
1662 Has_Discriminant on non-type entities that might happen when the
1663 compiled code has errors.
1664 * sem_ch3.adb (Derived_Type_Declaration): Only call
1665 Set_Has_Discriminant on type entities.
1667 2018-05-21 Arnaud Charlet <charlet@adacore.com>
1669 * exp_unst.adb (Unnest_Subprogram): Unnest all subprograms relevant for
1672 2018-05-21 Piotr Trojanek <trojanek@adacore.com>
1674 * lib.ads: Fix typo in enumeration in comment.
1676 2018-05-21 Ed Schonberg <schonberg@adacore.com>
1678 * sem_attr.adb (Analyze_Attribute, case Scalar_Storage_Order): The
1679 attribute reference is legal within a generic unit when the prefix is a
1680 formal private type.
1682 2018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
1684 * exp_ch7.adb (Establish_Transient_Scope): Code cleanup. Do not
1685 delegate the secondary stack management when there is no suitable
1686 transient context, and the transient scope was intended to manage the
1687 secondary stack because this causes premature reclamation. Change the
1688 transient scope creation logic by special casing assignment statements
1689 of controlled components for type initialization procedures.
1690 (Find_Node_To_Be_Wrapped): Renamed to Find_Transient_Context. Update
1691 the comment on usage.
1692 (Find_Transient_Context): Change the initinte loop into a while loop.
1693 Iterations schemes and iterator specifications are not valid transient
1694 contexts because they rely on special processing. Assignment statements
1695 are now treated as a normal transient context, special cases are
1696 handled by the caller. Add special processing for pragma Check.
1697 (Is_OK_Construct): Removed. Its functionality has been merged in
1698 routine Find_Transient_Context.
1699 * sem_ch5.adb (Check_Call): Reimplemented. Add code to properly
1700 retrieve the subprogram being invoked. Use a more accurate predicate
1701 (Requires_Transient_Scope) to determine that the function will emply
1702 the secondary stack.
1704 2018-05-21 Piotr Trojanek <trojanek@adacore.com>
1706 * ada_get_targ.adb: Fix subprogram body headers.
1707 * adabkend.adb: Likewise.
1708 * checks.adb: Likewise.
1709 * exp_ch3.adb: Likewise.
1710 * exp_ch5.adb: Likewise.
1711 * exp_ch9.adb: Likewise.
1712 * exp_dist.adb: Likewise.
1713 * exp_tss.adb: Likewise.
1714 * inline.adb: Likewise.
1715 * lib-writ.adb: Likewise.
1716 * lib-xref-spark_specific.adb: Likewise.
1717 * libgnarl/s-osinte__darwin.adb: Likewise.
1718 * libgnarl/s-stusta.adb: Likewise.
1719 * libgnarl/s-taprop__solaris.adb: Likewise.
1720 * libgnarl/s-tposen.adb: Likewise.
1721 * libgnarl/s-vxwext__kernel-smp.adb: Likewise.
1722 * libgnarl/s-vxwext__kernel.adb: Likewise.
1723 * libgnat/a-btgbso.adb: Likewise.
1724 * libgnat/a-cfdlli.adb: Likewise.
1725 * libgnat/a-cfhama.adb: Likewise.
1726 * libgnat/a-cfinve.adb: Likewise.
1727 * libgnat/a-cimutr.adb: Likewise.
1728 * libgnat/a-coboho.adb: Likewise.
1729 * libgnat/a-cofove.adb: Likewise.
1730 * libgnat/a-cofuve.adb: Likewise.
1731 * libgnat/a-comutr.adb: Likewise.
1732 * libgnat/a-exexda.adb: Likewise.
1733 * libgnat/a-tags.adb: Likewise.
1734 * libgnat/a-tideau.adb: Likewise.
1735 * libgnat/a-wtdeau.adb: Likewise.
1736 * libgnat/a-ztdeau.adb: Likewise.
1737 * libgnat/g-alleve.adb: Likewise.
1738 * libgnat/s-excdeb.adb: Likewise.
1739 * libgnat/s-parint.adb: Likewise.
1740 * libgnat/s-shasto.adb: Likewise.
1741 * libgnat/s-traceb__hpux.adb: Likewise.
1742 * prepcomp.adb: Likewise.
1743 * sem_ch4.adb: Likewise.
1744 * sem_ch6.adb: Likewise.
1745 * sem_dist.adb: Likewise.
1746 * sem_prag.adb: Likewise.
1747 * sem_util.adb: Likewise.
1748 * sinfo.adb: Likewise.
1749 * switch.adb: Likewise.
1751 2018-05-04 John Marino <gnugcc@marino.st>
1754 * link.c (BSD platforms): Add missing backslash.
1756 2018-04-27 Eric Botcazou <ebotcazou@adacore.com>
1759 * init.c (__gnat_handle_vms_condition): Add missing parentheses.
1761 2018-04-25 Eric Botcazou <ebotcazou@adacore.com>
1764 * gnat_ugn.texi: Regenerate.
1766 2018-03-23 Eric Botcazou <ebotcazou@adacore.com>
1769 * gnatlink.adb (Gnatlink): Remove handling of -b switch.
1770 * doc/gnat_ugn/building_executable_programs_with_gnat.rst (gnatlink):
1771 Remove documentation of -b switch.
1773 2018-03-23 Eric Botcazou <ebotcazou@adacore.com>
1776 * gnatlink.adb (Process_Args): Drop existing link switches if multiple
1777 switches are passed for --LINK.
1779 2018-03-12 Eric Botcazou <ebotcazou@adacore.com>
1782 * gcc-interface/misc.c (gnat_post_options): Disable string overflow
1785 2018-03-10 Eric Botcazou <ebotcazou@adacore.com>
1787 * gcc-interface/trans.c (node_has_volatile_full_access) <N_Identifier>:
1788 Consider only entities for objects.
1790 2018-03-07 Sebastian Huber <sebastian.huber@embedded-brains.de>
1792 * gcc-interface/Makefile.in (OSCONS_CPP): Remove redundant
1794 (OSCONS_EXTRACT): Add $(GNATLIBCFLAGS_FOR_C).
1796 2018-03-06 Eric Botcazou <ebotcazou@adacore.com>
1798 * gcc-interface/trans.c (convert_with_check): Fix typo in the condition
1799 guarding the overflow check emitted for the upper bound of a floating-
1802 2018-03-06 Eric Botcazou <ebotcazou@adacore.com>
1804 * gcc-interface/utils.c (def_builtin_1): Bail out on error_mark_node.
1806 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
1808 * libgnat/i-cexten.ads (Float_128): New type.
1810 2018-02-02 Eric Botcazou <ebotcazou@adacore.com>
1812 * gcc-interface/decl.c (array_type_has_nonaliased_component): Return
1813 false if the component type is a pointer.
1815 2018-01-11 Gary Dismukes <dismukes@adacore.com>
1817 * exp_ch3.adb (Default_Initialize_Object): Call New_Copy_Tree on the
1818 result of Get_Simple_Init_Value and pass the source location of the
1819 object declaration's object_definition.
1821 2018-01-11 Ed Schonberg <schonberg@adacore.com>
1823 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration): Handle
1824 properly object declarations with initializations that are
1825 build-in-place function calls, when there is an address specification,
1826 either as an aspect specification or an explicit attribute
1827 specification clause, for the initialized object.
1828 * freeze.adb (Check_Address_Clause): Do not remove side-effects from
1829 initial expressions in the case of a build-in-place call.
1831 2018-01-11 Piotr Trojanek <trojanek@adacore.com>
1833 * sem_eval.adb (Is_Null_Range): Retrieve the full view when called on a
1834 private (sub)type; refactor to avoid early return statement.
1835 (Not_Null_Range): Same as above.
1837 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
1839 * freeze.adb (Freeze_Entity): Ensure that a Ghost type is not
1840 concurrent, nor effectively volatile.
1841 * ghost.adb (Check_Ghost_Type): New routine.
1842 * ghost.ads (Check_Ghost_Type): New routine.
1843 * sem_util.adb (Is_Declaration): Reimplemented. The routine can now
1844 consider specific subsets of declarations.
1845 (Is_Declaration_Other_Than_Renaming): Removed. Its functionality is
1846 replicated by Is_Declaration.
1847 * sem_util.ads (Is_Declaration): New parameter profile. Update the
1849 (Is_Declaration_Other_Than_Renaming): Removed.
1851 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
1853 * sem_ch5.adb (Analyze_Assignment): Assignments to variables that act
1854 as Part_Of consituents of single protected types are illegal when they
1855 take place inside a protected function.
1856 (Diagnose_Non_Variable_Lhs): Use Within_Function to check for an
1858 (Is_Protected_Part_Of_Constituent): New routine.
1859 (Within_Function): New routine.
1861 2018-01-11 Arnaud Charlet <charlet@adacore.com>
1863 Bump copyright notices to 2018.
1865 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
1867 * binde.adb, par-ch6.adb, par-ch9.adb, sem_ch12.adb, sem_ch13.adb:
1870 2018-01-11 Justin Squirek <squirek@adacore.com>
1872 * par-ch6.adb (Scan_Body_Or_Expression_Function): Add additional check
1873 to make sure a given expression function is properly parenthesized.
1875 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
1877 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Check the
1878 categorization of a subprogram body which does not complete a previous
1881 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
1883 * sem_ch10.adb (Check_Private_Child_Unit): Ensure that the enclosing
1884 scope of package Ada is Standard.
1886 2018-01-11 Ed Schonberg <schonberg@adacore.com>
1888 * sem_ch13.adb (Replace_Type_Ref): Handle properly reference to a
1889 subcomponent of the current entity when building the body for a dynamic
1890 predicate function for a record with composite subcomponents.
1892 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
1894 * exp_aggr.adb (Convert_Aggr_In_Object_Decl): Update the call to
1895 Establish_Transient_Scope.
1896 (Convert_To_Assignments): Update the call to Establish_Transient_Scope.
1897 (Expand_Array_Aggregate): Update the call to Establish_Transient_Scope.
1898 * exp_ch6.adb (Expand_Call_Helper): Update the call to
1899 Establish_Transient_Scope.
1900 (Make_Build_In_Place_Call_In_Object_Declaration): Update the call to
1901 Establish_Transient_Scope.
1902 * exp_ch7.adb (Establish_Transient_Scope): Restructured. Delegate the
1903 management of the secondary stack to an enclosing scope if there is no
1904 suitable construct to wrap, and the transient scope was intended to
1905 manage the secondary stack.
1906 (Find_Node_To_Be_Wrapped): Restructured. A case_statement_alternative
1907 is a valid boundary for a transient expression which comes from the
1908 statements of the alternative, otherwise alternatives cannot be
1909 wrapped. Assignments of controlled objects which have controlled
1910 actions suppressed now stop the traversal as there is no point in
1911 looking for an enclosing construct. Add several N_xxx_Body choices to
1912 the termination conditions for completeness.
1913 * exp_ch7.ads (Establish_Transient_Scope): Update the parameter profile
1914 and the associated comment on usage.
1915 * exp_smem.adb (Add_Shared_Var_Lock_Procs): Update the call to
1916 Establish_Transient_Scope.
1917 (Add_Write_After): Update the call to Establish_Transient_Scope.
1918 * sem_res.adb (Check_Initialization_Call): Removed.
1919 (Resolve_Actuals): Account for additional cases where finalization
1920 actions are required by utilizing predicate Needs_Finalization rather
1922 (Resolve_Call): Type initialization procedures can now utilize
1923 transient scopes to manage the secondary stack, thus preventing leaks
1924 during initialization. Remove the previous kludgy algorithm which
1925 attempts to manage the secondary stack at the object creation site.
1927 2018-01-11 Jerome Lambourg <lambourg@adacore.com>
1929 * libgnat/g-soliop__qnx.ads: New.
1930 * adaint.c, adaint.h, cstreams.c, s-oscons-tmplt.c, sysdep.c: Update
1933 2018-01-11 Bob Duff <duff@adacore.com>
1935 * par-ch9.adb (P_Protected_Operation_Declaration_Opt): Give an error if
1936 a null procedure occurs in a protected definition.
1938 2018-01-11 Bob Duff <duff@adacore.com>
1940 * binderr.ads, namet.ads: Minor reformatting.
1942 2018-01-11 Bob Duff <duff@adacore.com>
1944 * doc/gnat_ugn/gnat_utility_programs.rst: Improve documentation of
1947 2018-01-11 Bob Duff <duff@adacore.com>
1949 * binde.adb (Force_Elab_Order): Give an error if there are duplicate
1952 2018-01-11 Ed Schonberg <schonberg@adacore.com>
1954 * sem_ch6.adb (Freeze_Expr_Types): If an access value is the
1955 controlling argument of a dispatching call. freeze the corresponding
1958 2018-01-11 Ben Brosgol <brosgol@adacore.com>
1960 * doc/Makefile: Add Sphinx option -W to treat warnings as errors.
1962 2018-01-11 Ben Brosgol <brosgol@adacore.com>
1964 * doc/gnat_rm/implementation_defined_aspects.rst: Minor type/wording
1966 * gnat_rm.texi: Regenerate.
1968 2018-01-11 Ed Schonberg <schonberg@adacore.com>
1970 * sem_ch12.adb (Check_Fixed_Point_Type): Do not apply check if the
1971 formsl type corresponding to the actual fixed point type is private,
1972 because in this case there can be no suspicious arithmetic operations
1973 in the generic unless they reference a formal subprogram. Clarify
1976 2018-01-11 Javier Miranda <miranda@adacore.com>
1978 * exp_util.adb (Remove_Side_Effects): No action done for functions
1979 returning class-wide types since it requires generating code using
1980 'reference and the CCG target has no secondary stack.
1981 * gnat1drv.adb: Disable building static dispatch tables when generating
1984 2018-01-11 Piotr Trojanek <trojanek@adacore.com>
1986 * libgnat/a-direio.ads, libgnat/a-sequio.ads, libgnat/a-ststio.ads,
1987 libgnat/a-textio.ads, libgnat/a-witeio.ads, libgnat/a-ztexio.ads
1988 (File_Type): Add Default_Initial_Condition aspect.
1990 2018-01-11 Pascal Obry <obry@adacore.com>
1992 * libgnat/s-os_lib.adb (Normalize_Pathname): New implementation.
1994 2018-01-11 Bob Duff <duff@adacore.com>
1996 * doc/gnat_ugn/gnat_utility_programs.rst: Rewrite gnatpp documentation
1997 to match what the Libadalang-based version does.
1998 * doc/gnat_ugn/about_this_guide.rst: Update reference.
2000 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
2002 * sem_res.adb (Uses_SS): A controlled type requires the secondary stack
2003 if it contains at least one component declaration employing a function
2004 call returning on the secondary stack.
2006 2018-01-11 Yannick Moy <moy@adacore.com>
2008 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
2009 Update description of restriction SPARK_05 with SPARK 2014.
2010 * gnat_rm.texi: Regenerate.
2012 2018-01-11 Vasiliy Fofanov <fofanov@adacore.com>
2014 * doc/gnat_ugn/gnat_utility_programs.rst: Fix layout.
2016 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
2018 * exp_aggr.adb, exp_ch9.adb, exp_util.adb, sem_aggr.adb, sem_ch3.adb,
2019 sem_res.adb, sem_util.adb: Minor reformatting.
2021 2018-01-11 Ed Schonberg <schonberg@adacore.com>
2023 * sem_prag.adb (Analyze_Pragma, case Predicate): Indicate that the type
2024 has a delayed aspect which must be processed at the point the type is
2025 frozen. This mimics what is done when the predicate is provided by a
2028 2018-01-11 Doug Rupp <rupp@adacore.com>
2030 * init.c (vxworks): Add macro checks for __aarch64__.
2032 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
2034 * exp_util.adb (Add_Failure_Expression): New routine.
2035 (Make_Predicate_Check): Reimplement the handling of Predicate_Failure.
2036 * sem_util.adb (Is_Current_Instance): Code cleanup.
2038 2018-01-11 Patrick Bernardi <bernardi@adacore.com>
2040 * libgnat/s-parame*.adb, libgnat/s-parame*.ads: Remove unneeded
2041 Default_Sec_Stack_Size.
2042 * libgnat/s-secsta.adb (SS_Allocate): Handle the fixed secondary stack
2043 limit check so that the integer index does not overflow. Check the
2044 dynamic stack allocation does not cause the secondary stack pointer to
2046 (SS_Info): Align colons.
2047 (SS_Init): Cover the case when bootstraping with an old compiler that
2048 does not set Default_SS_Size.
2050 2018-01-11 Ed Schonberg <schonberg@adacore.com>
2052 * sem_ch3.adb (Add_Internal_Interface_Entities): When checking the
2053 legality of an inherited operation that may require overriding, ignore
2054 primitive_wrappers that correspond to explicit operations that override
2055 an interface primitive.
2056 * exp_util.adb (Build_Class_Wide_Expression, Replace_Entity): If the
2057 operation to which the class-wide expression applies is a protected op.
2058 with a primitive_wrapper, verify that the updated inherited expression
2059 does not contain an internal call to a protected function. This
2060 completes the implementation of AI12-0166.
2062 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
2064 * ali.adb: Document the remaining letters available for ALI lines.
2065 (Scan_ALI): A with clause is internal when it is encoded on a 'Z' line.
2066 * ali.ads: Update type With_Record. Field
2067 Implicit_With_From_Instantiation is no longer in use. Add field
2069 * csinfo.adb (CSinfo): Remove the setup for attribute
2070 Implicit_With_From_Instantiation.
2071 * lib-writ.adb (Collect_Withs): Correct the logic which marks a unit as
2072 either implicitly or explicitly withed.
2073 (Is_Implicit_With_Clause): New routine.
2074 (Write_ALI): Rename array Implicit_With to Has_Implicit_With to avoid
2075 confusion with the with clause attribute by the same name.
2076 (Write_With_Lines): Update the emission of 'W', 'Y', and 'Z' headers.
2077 * rtsfind.adb (Maybe_Add_With): Code cleanup.
2078 * sem_ch8.adb (Present_System_Aux): Code cleanup.
2079 * sem_ch10.adb (Expand_With_Clause): Mark the with clause as generated
2081 (Implicit_With_On_Parent): Mark the with clause as generated for a
2083 * sem_ch12.adb (Inherit_Context): With clauses inherited by an
2084 instantiation are no longer marked as Implicit_With_From_Instantiation
2085 because they are already marked as implicit.
2086 * sem_elab.adb (Ensure_Prior_Elaboration_Static): Remove the kludge
2087 which marks implicit with clauses as related to an instantiation.
2088 * sinfo.adb (Implicit_With_From_Instantiation): Removed.
2089 (Parent_With): New routine.
2090 (Set_Implicit_With_From_Instantiation): Removed.
2091 (Set_Parent_With): New routine.
2092 * sinfo.ads: Update the documentation of attribute Implicit_With.
2093 Remove attribute Implicit_With_From_Instantiation along with
2094 occurrences in nodes. Add attribute Parent_With along with occurrences
2096 (Implicit_With_From_Instantiation): Removed along with pragma Inline.
2097 (Parent_With): New routine along with pragma Inline.
2098 (Set_Implicit_With_From_Instantiation): Removed along with pragma Inline.
2099 (Set_Parent_With): New routine along with pragma Inline.
2101 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
2103 * sem_util.adb (Find_Enclosing_Scope): Return the unique defining
2104 entity when the enclosing construct is a body.
2106 2018-01-11 Patrick Bernardi <bernardi@adacore.com>
2108 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Simplified
2109 Secondary_Stack_Size handling as a pragma is now generated for the
2110 corresponding aspect instead of an attribute. Pragma expression is
2111 relocated instead of evaluated. Discriminant of the corresponding
2112 record type is referenced rather than the type discriminant.
2113 (Create_Secondary_Stack_For_Task, Make_Task_Create_Call): Update
2114 Secondary_Stack_Size rep item checks to only look for the pragma rep.
2115 * sem_ch13.adb (Analyze_One_Aspect): Transform
2116 Aspect_Secondary_Stack_Size into a pragma instead of an attribute
2117 because the attribute does not have visibility on a task type's
2118 discriminants when the type's definition is expanded.
2119 (Analyze_Attribute_Definition_Clause): Remove handling of
2120 Attribute_Secondary_Stack_Size.
2121 * snames.adb-tmpl, snames.ads-tmpl: Remove
2122 Attribute_Secondary_Stack_Size, no longer used.
2124 2018-01-11 Justin Squirek <squirek@adacore.com>
2126 * sem_ch8.adb: Minor comment fix.
2128 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
2130 * exp_ch4.adb (Process_Action): Do not abandon the inspection of an
2131 individual action because the action may denote a complex expression,
2132 such as a case statement, which in turn may contain additional
2135 2018-01-11 Ed Schonberg <schonberg@adacore.com>
2137 * sem_aggr.adb (Resolve_Iterated_Component_Association): Perform
2138 analysis on a copy of the expression with a copy of the index variable,
2139 because full expansion will rewrite construct into a loop with the
2140 original loop variable.
2141 * exp_aggr.adb (Gen_Assign): Defer analysis and resolution if the
2142 expression is an iterated component association. Full analysis takes
2143 place when construct is rewritten as a loop.
2144 (In_Place_Assign_OK, Safe_Component): An iterated_component_association
2145 is not safe for in-place assignment.
2146 * sem_util.adb (Remove_Entity): Handle properly the case of an isolated
2147 entity with no homonym and no other entity in the scope.
2149 2018-01-11 Justin Squirek <squirek@adacore.com>
2151 * sem_prag.adb (Analyze_Pragma:Pragma_Loop_Variant): Modify error
2152 message to be printed on the pragma argument identifier.
2154 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
2156 * exp_util.adb (Build_Invariant_Procedure_Declaration): Set the last
2157 entity of the generated invariant procedure in order to construct a
2158 proper entity chain.
2160 2018-01-11 Piotr Trojanek <trojanek@adacore.com>
2162 * sem_ch13.adb (Build_Predicate_Functions): Fix minor issues in
2165 2018-01-11 Arnaud Charlet <charlet@adacore.com>
2167 * einfo.ads, einfo.adb (Activation_Record_Component,
2168 Set_Activation_Record_Component, Set_Is_Uplevel_Referenced_Entity):
2169 Allow E_Discriminant.
2171 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
2173 * gcc-interface/decl.c (gnat_to_gnu_component_type): Apply the check
2174 for atomic access once the component size is taken into account and
2175 also do it if the component type is Atomic or Volatile_Full_Access.
2177 2018-01-04 Eric Botcazou <ebotcazou@adacore.com>
2179 * gnatvsn.ads: Bump copyright year.
2181 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2182 Alan Hayward <alan.hayward@arm.com>
2183 David Sherwood <david.sherwood@arm.com>
2185 * gcc-interface/misc.c (enumerate_modes): Treat GET_MODE_BITSIZE
2188 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2189 Alan Hayward <alan.hayward@arm.com>
2190 David Sherwood <david.sherwood@arm.com>
2192 * gcc-interface/misc.c (enumerate_modes): Treat GET_MODE_PRECISION
2195 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2196 Alan Hayward <alan.hayward@arm.com>
2197 David Sherwood <david.sherwood@arm.com>
2199 * gcc-interface/utils.c (gnat_types_compatible_p): Handle
2200 polynomial TYPE_VECTOR_SUBPARTS.
2202 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2203 Alan Hayward <alan.hayward@arm.com>
2204 David Sherwood <david.sherwood@arm.com>
2206 * gcc-interface/misc.c (enumerate_modes): Handle polynomial
2209 2018-01-03 Jakub Jelinek <jakub@redhat.com>
2211 Update copyright years.
2213 * gnat_ugn.texi: Bump @copying's copyright year.
2214 * gnat_rm.texi: Likewise.
2216 Copyright (C) 2018 Free Software Foundation, Inc.
2218 Copying and distribution of this file, with or without modification,
2219 are permitted in any medium without royalty provided the copyright
2220 notice and this notice are preserved.