1 2018-05-28 Patrick Bernardi <bernardi@adacore.com>
3 * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Update the
4 description of the -D binder switch to reflect current usage.
5 * gnat_ugn.texi: Regenerate.
7 2018-05-28 Gary Dismukes <dismukes@adacore.com>
9 * exp_ch3.adb: Minor reformatting
11 2018-05-28 Justin Squirek <squirek@adacore.com>
14 (Build_Initialization_Call): Add logic to pass the appropriate actual to match
16 (Init_Formals): Add new formal *_skip_null_excluding_check
17 * exp_util.adb, exp_util.ads
18 (Enclosing_Init_Proc): Added to fetch the enclosing Init_Proc from the current
20 (Inside_Init_Proc): Refactored to use Enclosing_Init_Proc
21 (Needs_Conditional_Null_Excluding_Check): Added to factorize the predicate
22 used to determine how to generate an Init_Proc for a given type.
23 (Needs_Constant_Address): Minor reformatting
25 (Resolve_Null): Add logic to generate a conditional check in certain cases
27 2018-05-28 Hristian Kirtchev <kirtchev@adacore.com>
29 * exp_aggr.adb, gnatlink.adb, sem_ch6.adb, sem_res.adb, sem_util.adb:
32 2018-05-28 Hristian Kirtchev <kirtchev@adacore.com>
34 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile): Include
35 the declarations of single concurrent types because they fall in the
36 category of full type and object declarations.
38 2018-05-28 Eric Botcazou <ebotcazou@adacore.com>
40 * repinfo.adb (Compute_Max_Length): Skip _Parent component.
41 (List_Record_Layout): Likewise.
43 2018-05-28 Ed Schonberg <schonberg@adacore.com>
45 * sem_util.adb (Is_Function_Result): Add a warning if a postcondition
46 includes a call to function to which it applies. This may mean an
47 omission of an attribute reference 'Result, in particular if the
48 function is pqrameterless.
50 2018-05-28 Justin Squirek <squirek@adacore.com>
52 * sem_ch8.adb (Find_Expanded_Name): Add extra guard to make sure the
53 misresolved package name is not a case of mistaken identity.
55 2018-05-28 Yannick Moy <moy@adacore.com>
57 * sem_res.adb (Resolve_Range): Re-resolve the low bound of a range in
58 GNATprove mode, as the order of resolution (low then high) means that
59 all the information is not available when resolving the low bound the
62 2018-05-28 Eric Botcazou <ebotcazou@adacore.com>
64 * repinfo.adb (List_Array_Info): Start with an explicit blank line and
65 end with the linker section, if any.
66 (List_Entities): Do not output the linker section for record types,
67 array types and variables.
68 (Print_Expr): Factor out common processing for unary operators and
69 special values. Adjust and reorder the various cases.
70 (List_Object_Info): End with the linker section, if any.
71 (List_Record_Info): Likewise.
72 (List_Type_Info): Do not start with a blank line.
74 2018-05-25 Nicolas Roche <roche@adacore.com>
76 * libgnat/s-valrea.adb (Scan_Real): Abort computation once it is sure
77 that the result will be either -infinite or +infinite.
79 2018-05-25 Patrick Bernardi <bernardi@adacore.com>
81 * libgnat/s-parame.ads, libgnat/s-parame__vxworks.ads,
82 libgnat/s-parame__ae653.ads, libgnat/s-parame__hpux.ads (Size_Type):
83 Expand range of type to match the address space of the target.
84 (Task_Storage_Size): Remove unused type.
86 2018-05-25 Ed Schonberg <schonberg@adacore.com>
88 * sem_res.adb (Set_Mixed_Mode_Operand): If the operand is an expression
89 of a fixed point type and the parent is a multiplying operation,
90 resolve the operand with its own type because the context will impose a
91 resulting type on the result of the multiplication by means of
92 approriate conversion.
94 2018-05-25 Hristian Kirtchev <kirtchev@adacore.com>
96 * exp_ch3.adb (Default_Initialize_Object): Ensure that the analysis of
97 the in-place initialization aggregate created for pragmas
98 Initialize_Scalars or Normalize_Scalars is performed with checks
101 2018-05-25 Arnaud Charlet <charlet@adacore.com>
103 * exp_aggr.adb (Convert_To_Positional): Bump default for
104 Max_Others_Replicate to 32. Update comments.
105 * osint.ads (Unknown_Attributes): No longer pretend this is a constant.
106 (No_File_Info_Cache): Initialize separately.
107 * osint.adb (No_File_Info_Cache): Update initializer.
109 2018-05-25 Javier Miranda <miranda@adacore.com>
111 * sem_res.adb (Resolve_Membership_Op): Allow the use of the membership
112 test when the left operand is a class-wide interface and the right
113 operand is not a class-wide type.
114 * exp_ch4.adb (Tagged_Membership): Adding support for interface as the
117 2018-05-25 Ed Schonberg <schonberg@adacore.com>
119 * exp_aggr.adb (Flatten): A quantified expression cannot be duplicated
120 in an others clause to prevent visibility issues with the generated
122 (Component_OK_For_Backend): Return false for a quantified expression.
123 (Check_Static_Component): Ditto.
125 2018-05-25 Hristian Kirtchev <kirtchev@adacore.com>
127 * libgnat/s-secsta.adb (SS_Allocate): Reimplemented.
128 (SS_Allocate_Dynamic): New routine. The allocation logic is now split
129 into three distring cases rather than in one loop which attempts to
130 handle all three cases. This rewrite eliminates an issue where the last
131 frame of the stack cannot be freed, thus causing the memory range of a
132 new frame to approach the overflow point of the memory index type.
133 Since the overflow is logically treated as a
134 too-much-memory-on-the-stack scenario, it causes a bogus Storage_Error.
135 (SS_Allocate_Static): New routine. The routine factorizes the static
136 secondary stack-related code from the former SS_Allocate.
138 2018-05-25 Sergey Rybin <rybin@adacore.com>
140 * doc/gnat_ugn/gnat_and_program_execution.rst: Add description of '-U'
143 2018-05-25 Ed Schonberg <schonberg@adacore.com>
145 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not create
146 Class_Wide_Clone_Body when analyzing a subprogram_body_stub: the clone
147 is created when the proper body of the stub is analyzed.
148 * sem_util.adb (ZBuild_Class_Wide_Clone_Body): If the subprogram body
149 is the proper body of a subunit, the cloned body must be inserted in
150 the declarative list that contains the stub.
152 2018-05-25 Justin Squirek <squirek@adacore.com>
154 * exp_ch6.adb (Expand_Simple_Function_Return): Add guard in check to
155 generate code for 6.5(8-10) so that we don't get an assertion error
156 when dealing with an incomplete return type.
158 2018-05-25 Arnaud Charlet <charlet@adacore.com>
160 * pprint.adb (Expression_Name): Strip too long expressions to avoid
161 carrying very large strings.
163 2018-05-25 Patrick Bernardi <bernardi@adacore.com>
165 * switch-b.adb (Scan_Binder_Switches): binder switch -Q accepts Natural
168 2018-05-25 Doug Rupp <rupp@adacore.com>
170 * tracebak.c (aarch64-linux): Implement.
172 2018-05-25 Justin Squirek <squirek@adacore.com>
174 * sem_ch8.adb: Minor reformatting.
176 2018-05-25 Piotr Trojanek <trojanek@adacore.com>
178 * sem_util.adb (Iterate_Call_Parameters): Fix code convention and
181 2018-05-25 Hristian Kirtchev <kirtchev@adacore.com>
183 * einfo.adb, einfo.ads, exp_ch3.adb, exp_ch8.adb, exp_unst.adb,
184 pprint.adb, sem_ch12.adb, sem_ch3.adb, sem_prag.adb, sem_util.adb:
187 2018-05-25 Ed Schonberg <schonberg@adacore.com>
189 * sem_ch12.adb (Instance_Exists): New function, subsidiary of
190 Validate_Derived_Type_Instance, to verify that all interfaces
191 implemented by the formal type are also implemented by the actual. The
192 verification is complicated when an interface of the formal is declared
193 in a generic unit and the actual is declared in an instance of it.
194 There is currently no mechanism to relate an interface declared within
195 a generic to the corresponding interface in an instance, so we must
196 traverse the list of interfaces of the actual, looking for a name
197 match, and verifying that that interface is declared in an instance.
199 2018-05-25 Piotr Trojanek <trojanek@adacore.com>
201 * sem_util.adb (Iterate_Call_Parameters): Rewrite with extra
202 assertions; replace function versions of Next_Formal/Next_Actual with
203 their procedural versions (which are more concise).
205 2018-05-25 Doug Rupp <rupp@adacore.com>
207 * libgnarl/s-osinte__aix.ads, libgnarl/s-osinte__android.ads,
208 libgnarl/s-osinte__darwin.ads, libgnarl/s-osinte__freebsd.ads,
209 libgnarl/s-osinte__hpux.ads, libgnarl/s-osinte__kfreebsd-gnu.ads,
210 libgnarl/s-osinte__linux.ads, libgnarl/s-osinte__lynxos178e.ads,
211 libgnarl/s-osinte__qnx.ads, libgnarl/s-osinte__rtems.ads
212 (Relative_Timed_Wait): Remove.
213 * libgnarl/s-tpopmo.adb (Timed_Sleep, Timed_Delay): Rewrite to allow
214 for incremental looping. Remove references to Rel_Time and
216 * libgnat/s-osprim__posix.adb, libgnat/s-osprim__posix2008.adb
217 (Timed_Delay): Make separate.
218 * libgnat/s-optide.adb: New separate procedure.
219 * libgnat/s-osprim.ads (Max_System_Delay): New constant.
220 * libgnat/s-osprim__lynxos.ads (Max_Sensible_Delay): Set to 6 months.
221 (Max_System_Delay): New constant.
223 2018-05-25 Ed Schonberg <schonberg@adacore.com>
225 * sem_ch12.adb (Validate_Derived_Type_Instance): Verify that the actual
226 for a formal derived type implements all the interfaces declared for
229 2018-05-25 Yannick Moy <moy@adacore.com>
231 * sem_prag.adb (Check_Applicable_Policy): Deal specially with CodePeer
232 and GNATprove modes when applicable policy is Ignore.
234 2018-05-25 Eric Botcazou <ebotcazou@adacore.com>
236 * freeze.adb (Freeze_Enumeration_Type): Do not give integer size to a
237 boolean type with convention C.
238 * libgnat/i-cexten.ads (bool): Change to boolean with convention C.
239 * gcc-interface/decl.c (gnat_to_gnu_entity): Add new local variable
240 FOREIGN and use it throughout the function.
241 <E_Enumeration_Type>: Set precision 1 on boolean types with foreign
243 <E_Enumeration_Subtype>: Likewise for subtypes.
244 <E_Record_Type>: Force the size of a storage unit on empty classes.
245 * gcc-interface/utils.c (make_type_from_size) <BOOLEAN_TYPE>: Skip
246 boolean types with precision 1 if the size is the expected one.
248 2018-05-25 Arnaud Charlet <charlet@adacore.com>
250 * pprint.adb (Expression_Name): Do not print non ASCII characters.
252 2018-05-25 Bob Duff <duff@adacore.com>
254 * libgnat/a-strunb__shared.ads, libgnat/a-stwiun__shared.ads,
255 libgnat/a-stzunb__shared.ads: (Initialize, Adjust): Add pragma Inline.
257 2018-05-25 Bob Duff <duff@adacore.com>
259 * sem_util.ads: Minor comment fix.
261 2018-05-25 Ed Schonberg <schonberg@adacore.com>
263 * exp_unst.adb (Visit_Node): Restrict check for uplevel references in
264 prefixes of array attributes, to prefixes that are entity names whose
266 (Note_Uplevel_Bound): Verify that the bound is declared in an enclosing
267 subprogram, as itype created for loops in pre/postcondition may appear
268 in loops at the library level.
270 2018-05-25 Ed Schonberg <schonberg@adacore.com>
272 * sem_ch13.adb (Build_Predicate_Functions): The predicate function
273 declaration is inserted into the tree and analyzed at that point, so
274 should not be reinserted when the body is constructed. Inside a
275 generic, ensure that the body is not inserted twice in the tree.
277 2018-05-25 Yannick Moy <moy@adacore.com>
279 * sem_prag.adb (Check_Grouping): Modify test to ignore statements and
280 declarations not coming from source.
282 2018-05-25 Fedor Rybin <frybin@adacore.com>
284 * doc/gnat_ugn/gnat_utility_programs.rst: Document new switch
285 --copy-environment for gnattest.
287 2018-05-24 Piotr Trojanek <trojanek@adacore.com>
289 * sem_elab.adb (Non_Private_View): Simplify by removing a local Result
291 * sem_prag.adb (Get_Base_Subprogram): Same as above.
293 2018-05-24 Eric Botcazou <ebotcazou@adacore.com>
295 * fe.h (Set_Normalized_First_Bit): Declare.
296 (Set_Normalized_Position): Likewise.
297 * repinfo.adb (List_Record_Layout): Do not use irregular output for a
298 variable position. Fix minor spacing issue.
299 * gcc-interface/decl.c (annotate_rep): If a field has a variable
300 offset, compute the normalized position and annotate it in addition to
303 2018-05-24 Eric Botcazou <ebotcazou@adacore.com>
305 * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu):
306 Constify and rename variables. Fix formatting.
307 (gnat_to_gnu) <N_Exception_Handler>: Minor tweak.
308 <N_Raise_Statement>: Likewise.
310 2018-05-24 Javier Miranda <miranda@adacore.com>
312 * exp_ch8.adb (Build_Body_For_Renaming): Adding support to build the
313 body of a variant record equality renaming.
314 (Expand_N_Subprogram_Renaming_Declaration): Adapt the code to the new
315 implementation of Build_Body_For_Renaming.
316 * exp_ch3.ads (Build_Variant_Record_Equality): New library level
317 function that factorizes the functionality needed by
318 Build_Body_For_Renaming and Expand_Freeze_Record_Type to build the body
319 of a variant record equality subprogram.
320 * exp_ch3.adb (Build_Variant_Record_Equality): New subprogram.
321 (Build_Variant_Record_Equality): New local procedure of
322 Expand_Freeze_Record_Type containing all the code specific for freezing
323 the record type that cannot be place in the new library level function.
325 2018-05-24 Ed Schonberg <schonberg@adacore.com>
327 * einfo.ads, einfo.adb (Is_Activation_Record): New flag on
328 in_parameters, used when unesting subprograms for LLVM, to indicate
329 that a generated parameter carries the activation record from the
330 enclosing subprogram.
331 * exp_unst.adb (Check_Static_Type): Handle array attributes of types
332 whose bounds may contain up-level references that need to be added to
333 an activation recoord.
334 (Add_Extra_Formal): Set Is_Activation_Record on new formal.
336 2018-05-24 Yannick Moy <moy@adacore.com>
338 * pprint.adb (Expression_Image): Improve the printing of expressions,
339 by taking more cases into account, in particular qualified expressions
340 and aggregates. Also count more the number of parentheses to close
341 after the expression.
343 2018-05-24 Javier Miranda <miranda@adacore.com>
345 * sem_ch3.adb (Is_Visible_Component): For untagged types add missing
346 check for renamed discriminants.
347 * sem_ch4.adb (Analyze_Overloaded_Selected_Component,
348 Analyze_Selected_Component, Check_Misspelled_Selector): For calls to
349 Is_Visible_Component pass the associated selector node to allow
350 checking renamed discriminants on untagged types.
352 2018-05-24 Ed Schonberg <schonberg@adacore.com>
354 * sem_ch8.adb (Analyze_Use_Type): Do not assign the Prev_Use_Clause
355 link to a use_type clause if this would cause an infinite loop in the
356 machinery that detects redundant use clauses. This may happen when the
357 redundant clauses appear in the context of a child unit and the context
360 2018-05-24 Piotr Trojanek <trojanek@adacore.com>
362 * sinfo.ads: Fix grammar in comment.
364 2018-05-24 Justin Squirek <squirek@adacore.com>
366 * einfo.ads, einfo.adb (Append_Entity): Modified to use Link_Entities
367 and manage doubly-linked entity chain.
368 (Nested_Scenarios): Removed entity field used for optimization during
369 elaboration to make room for the new field Prev_Entity.
370 (Link_Entities): Added to replace redundant calls to Set_Next_Entity
371 and Set_Prev_Entity as well as centralize changes to the entity chain.
372 (Predicated_Parent): Modified to use Node38.
373 (Prev_Entity): Added to fetch new node field Prev_Entity in all entity
375 (Remove_Entity): Moved from sem_util.
376 (Set_Nested_Scenarios): Deleted.
377 (Set_Predicated_Parent): Modified to use Node38.
378 (Set_Prev_Entity): Added to set Prev_Entity field.
379 (Set_Validated_Object): Modified to use Node38.
380 (Unlink_Next_Entity): Added to process Prev_Entity when an unlinking
382 (Validated_Object): Modified to use Node38.
383 (Write_Field36_Name): Remove Nested_Scenarios, Validated_Object, and
384 predicated parent cases.
385 (Write_Field38_Name): Add predicated parent and Validated_Object cases.
386 * sem_ch3.adb (Process_Subtype): Add guard to protect against
387 inappropriate marking of Predicated_Parent to non-itype subtypes.
388 (Make_Class_Wide_Type): Preserve Prev_Entity field and set in new type.
389 (Copy_And_Swap): Add setting of Prev_Entity.
390 (Build_derived_Record_Type): Replace Set_Next_Entity w/ Link_Entities.
391 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Replace Set_Next_Entity
393 (New_Overloaded_Entity): Remove block created to search for previous
394 entities in the entity chain with relevant calls to Prev_Entity as well
395 as replace duplicated code from Remove_Entity_And_Homonym with a call
397 * sem_ch7.adb (Exchange_Declarations): Replace Set_Next_Entity w/
399 * sem_elab.adb (Find_And_Process_Nested_Scenarios): Remove global and
400 initial subprogram declarations related to Nested_Scenarios.
401 (Process_Nested_Scenarios): Deleted.
402 (Save_Scenario): Deleted.
403 (Traverse_Body): Remove optimization for Nested_Scenarios so as to free
404 node space in the entity tree.
405 * sem_util.adb, sem_util.ads (Remove_Entity): Moved to einfo.
406 (Remove_Entity_And_Homonym): Added to separate functionality of
407 Remove_Entity from the homonym chain directly.
408 * exp_attr.adb (Expand_N_Attribute_Reference): Replace Set_Next_Entity
409 w/ Link_Entities and Unlink_Next_Entity.
410 * exp_ch3.adb (Expand_N_Object_Declaration): Replace Set_Next_Entity w/
412 * exp_ch6.adb (Replace_Renaming_Declaration_Id): Replace
413 Set_Next_Entity w/ Link_Entities.
414 * exp_disp.adb (Expand_Dispatching_Call): Replace Set_Next_Entity w/
415 Link_Entities and Unlink_Next_Entity.
416 * exp_spark.adb (Expand_SPARK_N_Object_Renaming_Declaration): Replace
417 call to Remove_Entity with its new incarnation.
418 * exp_util.adb (New_Class_Wide_Subtype): Add setting of Prev_Entity.
419 * freeze.adb (Freeze_Record_Type): Replace Set_Next_Entity w/
422 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
424 * sem_ch10.adb (Expand_Limited_With_Clause): Update the call to
425 Install_Limited_Withed_Unit.
426 (Expand_With_Clause): Update the call to Install_Withed_Unit.
427 (Implicit_With_On_Parent): Update the call to Install_Withed_Unit.
428 (Install_Context_Clauses): Update the call to Install_Withed_Unit.
429 (Install_Limited_Context_Clauses): Update the calls to
430 Install_Limited_Withed_Unit.
431 (Install_Limited_Withed_Unit): Renamed to better illustrate its
433 (Install_Private_With_Clauses): Update the calls to Install_Withed_Unit
434 and Install_Limited_Withed_Unit.
435 (Install_With_Clause): Uninstall a limited with clause if a [private]
436 with clause is given for the same package.
437 (Install_Withed_Unit): Renamed to better illustrate its purpose.
438 (Remove_Limited_With_Unit): New routine.
440 2018-05-24 Eric Botcazou <ebotcazou@adacore.com>
442 * raise-gcc.c (__gnat_SEH_error_handler): Remove prototype.
443 (__gnat_personality_seh0): Adjust and beef up comments, and
444 fix formatting throughout.
445 (__gnat_adjust_context): Deal minimally with version 2.
446 * seh_init.c (__gnat_map_SEH): Fix formatting.
447 (_gnat_SEH_error_handler): Adjust comments.
448 (__gnat_install_SEH_handler): Fix formatting.
450 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
452 * exp_ch7.adb, sem_ch3.adb, sem_res.adb: Minor reformatting.
454 2018-05-24 Ed Schonberg <schonberg@adacore.com>
456 * exp_aggr.adb (Flatten): Add a warning on an others clause in an array
457 aggregate with static bounds when named associations cover all index
458 positions and the others clause is redundant.
460 2018-05-24 Raphael Amiard <amiard@adacore.com>
462 * libgnat/a-cohama.ads: Add documentation.
464 2018-05-24 Raphael Amiard <amiard@adacore.com>
466 * libgnat/a-convec.ads: Add documentation.
468 2018-05-24 Justin Squirek <squirek@adacore.com>
470 * exp_ch3.adb (Expand_N_Object_Declaration): Ignore raising an error in
471 expansion for limited tagged types when the node to be expanded is a
472 raise expression due to it not representing a valid object.
473 * exp_ch5.adb (Expand_N_Assignment_Statement): Add exception to error
474 message regarding assignments to limited types to ignore genereated
477 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
479 * exp_util.adb (New_Class_Wide_Subtype): Capture and restore relevant
480 Ghost-related attributes of the class-wide subtype because the copy
483 2018-05-24 Justin Squirek <squirek@adacore.com>
485 * sem_res.adb (Resolve_Entity_Name): Add guard to protect against
486 marking use clauses as effective when the reference appears within
489 2018-05-24 Cyrille Comar <comar@adacore.com>
491 * doc/gnat_rm/the_gnat_library.rst: Fix typos.
492 * gnat_rm.texi: Regenerate.
494 2018-05-24 Bob Duff <duff@adacore.com>
496 * exp_ch7.adb (Expand_Cleanup_Actions): Create a mark unconditionally
497 for build-in-place functions with a caller-unknown-size result.
498 (Create_Finalizer): For build-in-place functions with a
499 caller-unknown-size result, check at run time whether we need to
500 release the secondary stack.
502 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
504 * sem_prag.adb (Analyze_Pragma): Use the full view of an internally
505 generated incomplete type.
507 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
509 * expander.adb (Expand): Update the save and restore of the Ghost
511 * exp_ch3.adb (Freeze_Type): Likewise.
512 * exp_disp.adb (Make_DT): Likewise.
513 * exp_util.adb (Build_DIC_Procedure_Body): Likewise.
514 (Build_DIC_Procedure_Declaration): Likewise.
515 (Build_Invariant_Procedure_Body): Likewise.
516 (Build_Invariant_Procedure_Declaration): Likewise.
517 (Make_Predicate_Call): Likewise.
518 * freeze.adb (Add_To_Result): Insert the freeze action of a living
519 entity prior to the start of the enclosing ignored Ghost region.
520 (Freeze_Entity): Update the save and restore of the Ghost region.
521 * ghost.adb (Install_Ghost_Mode): Reimplemented.
522 (Install_Ghost_Region): New routine.
523 (Mark_And_Set_Ghost_Assignment): Install a region rather than a mode.
524 (Mark_And_Set_Ghost_Body): Likewise.
525 (Mark_And_Set_Ghost_Completion): Likewise.
526 (Mark_And_Set_Ghost_Declaration): Likewise.
527 (Mark_And_Set_Ghost_Instantiation): Likewise.
528 (Mark_And_Set_Ghost_Procedure_Call): Likewise.
529 (Name_To_Ghost_Mode): New routine.
530 (Restore_Ghost_Region): New routine.
531 * ghost.ads (Install_Ghost_Region): New routine.
532 (Restore_Ghost_Region): New routine.
533 * opt.ads: Add new global variable Ignored_Ghost_Region.
534 * rtsfind.adb (Load_RTU): Update the save and restore of the Ghost
535 region. Install a clean region.
536 * sem.adb (Analyze): Likewise.
537 (Do_Analyze): Likewise.
538 * sem_ch3.adb (Analyze_Object_Declaration): Likewise
539 (Derive_Progenitor_Subprograms): Use local variable Iface_Alias to
540 capture the ultimate alias of the current primitive.
541 (Process_Full_View): Update the save and restore of the Ghost region.
542 Do not inherit DIC and invariant procedures.
543 * sem_ch5.adb (Analyze_Assignment): Update the save and restore of the
545 * sem_ch6.adb (Analyze_Procedure_Call): Likewise.
546 (Analyze_Subprogram_Body_Helper): Likewise.
547 * sem_ch7.adb (Analyze_Package_Body_Helper): Likewise.
548 * sem_ch12.adb (Analyze_Package_Instantiation): Likewise.
549 (Analyze_Subprogram_Instantiation): Likewise.
550 (Instantiate_Package_Body): Likewise.
551 (Instantiate_Subprogram_Body): Likewise.
552 * sem_ch13.adb (Build_Predicate_Functions): Likewise.
553 (Build_Predicate_Function_Declaration): Likewise.
555 (Add_Dispatching_Operation): Do not consider DIC and invariant
557 (Check_Dispatching_Operation): Use Add_Dispatching_Operation to collect
558 a dispatching subprogram.
559 (Check_Operation_From_Private_View): Likewise.
560 (Override_Dispatching_Operation): Likewise.
561 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Update the save
562 and restore of the Ghost region.
563 (Analyze_Initial_Condition_In_Decl_Part): Likewise.
564 (Analyze_Pragma): Update the save and restore of the Ghost region.
565 (Analyze_Pre_Post_Condition_In_Decl_Part): Likewise.
566 * sem_util.adb (Is_Suitable_Primitive): New routine.
567 * sem_util.ads (Is_Suitable_Primitive): New routine.
568 * sinfo.ads: Update the section of Ghost regions.
570 2018-05-24 Piotr Trojanek <trojanek@adacore.com>
572 * doc/gnat_rm/implementation_defined_pragmas.rst (Contract_Cases):
573 Change "condition" to "case guard" after renaming in the contract
575 * gnat_rm.texi: Regenerate.
577 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
579 * exp_util.adb (Expand_Static_Predicates_In_Choices): Indicate that the
580 construct with discrete choices no longer contains a subtype with
581 predicates since the expansion already handled this case.
583 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
585 * freeze.adb (Wrap_Imported_Subprogram): Generate an unchecked
586 conversion to the return type to avoid a side effect where an imported
587 relocated function generates a new anonymous access type, whose
588 accessibility level does not agree with with that of the wrapper.
590 2018-05-24 Javier Miranda <miranda@adacore.com>
592 * sem_util.adb (Abstract_Interface_List): Add missing support for
593 private types whose full view is a synchronized type.
594 * sem_ch3.adb (Build_Derived_Private_Type): Skip building the full
595 derivation of a private type parent type is a task type with
596 discriminants as gigi does not use such type directly.
598 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
600 * sem_elab.adb (Build_Variable_Reference_Marker): Do not create a
601 variable marker when the reference appears in the formal part of a
602 compilation unit instance because there is no place to insert it.
603 (In_Compilation_Instance_Formal_Part): New routine.
605 2018-05-24 Piotr Trojanek <trojanek@adacore.com>
607 * layout.ads, repinfo.ads: Fix references to renamed Backend_Layout
608 configuration parameter.
610 2018-05-24 Doug Rupp <rupp@adacore.com>
612 * argv-lynxos178-raven-cert.c: New file.
613 * libgnat/system-lynxos178-x86.ads: New file.
615 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
617 * exp_disp.adb, freeze.adb, gnat1drv.adb, sem_ch5.adb, sem_spark.adb:
620 2018-05-23 Pascal Obry <obry@adacore.com>
622 * adaint.c (win32_wait): Properly free the handle/pid lists when
623 WaitForMultipleObjects fails (return WAIT_FAILED).
625 2018-05-23 Pascal Obry <obry@adacore.com>
627 * adaint.c (win32_wait): Add missing parentheses.
629 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
631 * exp_ch3.adb (Check_Large_Modular_Array): Moved to Freeze.
632 (Expand_N_Object_Declaration): Do not check for a large modular array
634 * freeze.adb (Check_Large_Modular_Array): Moved from Exp_Ch3.
635 (Freeze_Object_Declaration): Code cleanup. Check for a large modular
637 * sem_ch3.adb: Minor reformatting.
639 2018-05-23 Ed Schonberg <schonberg@adacore.com>
641 * einfo.ads: New attribute on types: Predicated_Parent, to simplify the
642 retrieval of the applicable predicate function to an itype created for
643 a constrained array component.
644 * einfo.adb: Subprograms for Predicated_Parent.
645 (Predicate_Function): Use new attribute.
646 * exp_util.adb (Make_Predicate_Call): If the predicate function is not
647 available for a subtype, retrieve it from the base type, which may have
648 been frozen after the subtype declaration and not captured by the
650 * sem_aggr.adb (Resolve_Array_Aggregate): An Others association is
651 legal within a generated initiqlization procedure, as may happen with a
652 predicate check on a component, when the predicate function applies to
653 the base type of the component.
654 * sem_ch3.adb (Analyze_Subtype_Declaration): Clean up inheritance of
655 predicates for subtype declarations and for subtype indications in
657 (Process_Subtype): Likewise. Handle properly the case of a private type
658 with unknown discriminants whose full view is an unconstrained array.
659 Use Predicated_Parent to indicate source of predicate function on an
660 itype whose parent is itself an itype.
661 (Complete_Private_Subtype): If the private view has unknown
662 discriminants and the full view is an unconstrained array, set base
663 type of completion to the full view of parent.
664 (Inherit_Predicate_Flags): Prevent double assignment of predicate
666 (Build_Subtype): For a constrained array component, propagate predicate
667 information from original component type declaration.
669 2018-05-23 Boris Yakobowski <yakobowski@adacore.com>
671 * libgnat/a-ngelfu.ads (Arctanh, Arccoth): Fix faulty preconditions.
673 2018-05-23 Arnaud Charlet <charlet@adacore.com>
675 * checks.adb (Minimize_Eliminate_Overflows): Default initialize Lo and
677 * sem_elab.adb: Make "out" parameters instead of "in out" when
680 2018-05-23 Bob Duff <duff@adacore.com>
682 * gnatbind.adb (List_Applicable_Restrictions): Add
683 No_Implementation_Restrictions to the list of restrictions not to list.
684 Remove double negative "not No_Restriction_List". Comment the
685 commentary that is output, so it won't cause errors if used directly in
688 2018-05-23 Ed Schonberg <schonberg@adacore.com>
690 * sem_prag.adb (Inherit_Class_Wide_Pre): Refine legality check on
691 class-wide precondition on a type extension when ancestor does not have
692 a class-wide precondition. Previously the compiler accepted such a
693 precondition when the ancestor had a class-wide postcondition.
695 2018-05-23 Javier Miranda <miranda@adacore.com>
697 * sem_attr.adb (Valid_Scalars): Do not invoke Error_Attr_P to report
698 the warning on occurrences of this attribute whose evaluation is always
699 true (since that subprogram aborts processing the attribute). In
700 addition, replace the node by its boolean result 'True' (required
701 because the backend has no knowledge of this attribute).
703 2018-05-23 Bob Duff <duff@adacore.com>
705 * libgnat/a-convec.adb: (Insert, Insert_Space): Suppress warnings. The
706 code in question is not reachable in the case where Count_Type'Last is
709 2018-05-23 Yannick Moy <moy@adacore.com>
711 * doc/gnat_rm/implementation_defined_pragmas.rst: Clarify meaning of
712 local pragma Warnings Off without On.
713 * gnat_rm.texi: Regenerate.
715 2018-05-23 Olivier Hainque <hainque@adacore.com>
717 * libgnat/g-excact.ads (Is_Foreign_Exception): New predicate.
718 * libgnat/g-excact.adb: Implement.
720 2018-05-23 Ed Schonberg <schonberg@adacore.com>
722 * sem_ch5.adb (Analyze_Iterator_Specification): If a subtype indication
723 is present, verify its legality when the domain of iteration is a
724 GNAT-specific formal container, as is already done for arrays and
725 predefined containers.
727 2018-05-23 Yannick Moy <moy@adacore.com>
729 * sem_util.adb (Enclosing_Declaration): Fix the case of a named number
730 declaration, which was not taken into account.
732 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
734 * debug.adb: Switch -gnatd_s is now used to stop elaboration checks on
735 synchronized suspension.
736 * rtsfind.ads: Add entries for units Ada.Synchronous_Barriers and
737 Ada.Synchronous_Task_Control and routines Suspend_Until_True and
739 * sem_elab.adb: Document switch -gnatd_s.
740 (In_Task_Body): New routine.
741 (Is_Potential_Scenario): Code cleanup. Stop the traversal of a task
742 body when the current construct denotes a synchronous suspension call,
743 and restriction No_Entry_Calls_In_Elaboration_Code or switch -gnatd_s
745 (Is_Synchronous_Suspension_Call): New routine.
746 * switch-c.adb (Scan_Front_End_Switches): Switch -gnatJ now sets switch
749 2018-05-23 Javier Miranda <miranda@adacore.com>
751 * exp_disp.adb (Make_DT): Restrict the initialization of
752 External_Tag and Expanded_Name to an empty string to the case where
753 both pragmas apply (i.e. No_Tagged_Streams and Discard_Names), since
754 restricted runtimes are compiled with pragma Discard_Names.
755 * doc/gnat_rm/implementation_defined_pragmas.rst,
756 doc/gnat_rm/implementation_defined_characteristics.rst: Add
758 * gnat_rm.texi: Regenerate.
760 2018-05-23 Maroua Maalej <maalej@adacore.com>
762 * sem_spark.adb: Fix of some permission rules of pointers in SPARK.
764 2018-05-23 Ed Schonberg <schonberg@adacore.com>
766 * sem_ch5.adb (Preanalyze_Range): The pre-analysis of the domain of
767 iteration of an Ada2012 loop is performed to determine the type of the
768 domain, but full analysis is performed once the loop is rewritten as a
769 while-loop during expansion. The pre-analysis suppresses expansion; it
770 must also suppress the generation of freeze nodes, which may otherwise
771 appear in the wrong scope before rewritting.
773 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
775 * sem_elab.adb: Update the section on suppressing elaboration warnings.
777 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
779 * einfo.adb (Is_Elaboration_Checks_OK_Id): Use predicate
780 Is_Elaboration_Target.
781 (Is_Elaboration_Target): New routine.
782 (Is_Elaboration_Warnings_OK_Id): Use predicate Is_Elaboration_Target.
783 (Set_Is_Elaboration_Checks_OK_Id): Use predicate Is_Elaboration_Target.
784 (Set_Is_Elaboration_Warnings_OK_Id): Use predicate
785 Is_Elaboration_Target.
786 * einfo.ads: Add new synthesized attribute Is_Elaboration_Target along
787 with occurrences in nodes.
788 (Is_Elaboration_Target): New routine.
789 * sem_prag.adb (Analyze_Pragma): Suppress elaboration warnings when an
790 elaboration target is subject to pragma Warnings (Off, ...).
792 2018-05-23 Eric Botcazou <ebotcazou@adacore.com>
794 * repinfo.adb (List_Type_Info): Remove obsolete stuff.
796 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
798 * einfo.adb: Flag304 is now Is_Elaboration_Warnings_OK_Id.
799 (Is_Elaboration_Warnings_OK_Id): New routine.
800 (Set_Is_Elaboration_Warnings_OK_Id): New routine.
801 (Write_Entity_Flags): Output Flag304.
802 * einfo.ads: Add new attribute Is_Elaboration_Warnings_OK_Id along with
803 occurrences in entities.
804 (Is_Elaboration_Warnings_OK_Id): New routine along with pragma Inline.
805 (Set_Is_Elaboration_Warnings_OK_Id): New routine along with pragma
807 * sem_attr.adb (Analyze_Access_Attribute): Capture the state of
808 elaboration warnings.
809 * sem_ch3.adb (Analyze_Object_Declaration): Capture the state of
810 elaboration warnings.
811 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Capture the
812 state of elaboration warnings.
813 (Analyze_Subprogram_Body_Helper): Capture the state of elaboration
815 (Analyze_Subprogram_Declaration): Capture the state of elaboration
817 * sem_ch9.adb (Analyze_Entry_Declaration): Capture the state of
818 elaboration warnings.
819 (Analyze_Single_Task_Declaration): Capture the state of elaboration
821 (Analyze_Task_Type_Declaration): Capture the state of elaboration
823 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Capture the state
824 of elaboration warnings.
825 (Analyze_Generic_Subprogram_Declaration): Capture the state of
826 elaboration warnings.
827 * sem_elab.adb: Add a section on suppressing elaboration warnings.
828 Type Processing_Attributes includes component Suppress_Warnings
829 intended to suppress any elaboration warnings along a path in the
830 graph. Update Initial_State to include a value for this component.
831 Types Target_Attributes and Task_Attriutes include component
832 Elab_Warnings_OK to indicate whether the target or task has elaboration
833 warnings enabled. component Elab_Warnings_OK.
834 (Build_Access_Marker): Propagate attribute
835 Is_Elaboration_Warnings_OK_Node from the attribute to the generated
837 (Extract_Instantiation_Attributes): Set the value for Elab_Warnings_OK.
838 (Extract_Target_Attributes): Set the value for Elab_Warnings_OK.
839 (Extract_Task_Attributes): Set the value for Elab_Warnings_OK.
840 (Process_Conditional_ABE_Access): Suppress futher elaboration warnings
841 when already in this mode or when the attribute or target have warnings
843 (Process_Conditional_ABE_Activation_Impl): Do not emit any diagnostics
844 if warnings are suppressed.
845 (Process_Conditional_ABE_Call): Suppress further elaboration warnings
846 when already in this mode, or the target or call have warnings
848 (Process_Conditional_ABE_Call_Ada): Do not emit any diagnostics if
849 warnings are suppressed.
850 (Process_Conditional_ABE_Call_SPARK): Do not emit any diagnostics if
851 warnings are suppressed.
852 (Process_Conditional_ABE_Instantiation): Suppress further elaboration
853 warnings when already in this mode or when the instantiation has
855 (Process_Conditional_ABE_Instantiation_Ada): Do not emit any
856 diagnostics if warnings are suppressed.
857 (Process_Conditional_ABE_Variable_Assignment_Ada): Use the more
858 specific Is_Elaboration_Warnings_OK_Id rather than Warnings_Off.
859 (Process_Conditional_ABE_Variable_Assignment_SPARK): Use the more
860 specific Is_Elaboration_Warnings_OK_Id rather than Warnings_Off.
861 (Process_Task_Object): Suppress further elaboration warnings when
862 already in this mode, or when the object, activation call, or task type
863 have warnings suppressed. Update the processing state to indicate that
864 the path goes through a task body.
865 * sinfo.adb (Is_Elaboration_Warnings_OK_Node): Accept attribute
867 (Set_Is_Elaboration_Warnings_OK_Node): Accept attribute references.
868 * sinfo.ads: Attribute Is_Elaboration_Warnings_OK_Node now applies to
869 attribute references.
871 2018-05-23 Piotr Trojanek <trojanek@adacore.com>
873 * einfo.ads: Minor reformatting.
875 2018-05-23 Ed Schonberg <schonberg@adacore.com>
877 * sem_ch3.adb (Analyze_Object_Declaration): If expression is an
878 anonymous_access_to_ subprogram formal, apply a conversion to force an
879 accsssibility check that will fail statically, enforcing 3.10.2 (13).
881 2018-05-23 Daniel Mercier <mercier@adacore.com>
883 * gnat1drv.adb: Turn off length expansion in CodePeer mode.
885 2018-05-23 Bob Duff <duff@adacore.com>
887 * freeze.adb: (Check_Address_Clause): Deal with build-in-place
888 aggregates in addition to build-in-place calls.
890 2018-05-23 Bob Duff <duff@adacore.com>
892 * einfo.ads: Minor reformatting.
893 * sem_ch3.adb: Likewise.
894 * sinfo.ads: Likewise.
896 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
898 * exp_ch3.adb (Default_Initialize_Object): Do not optimize scalar array
899 initialization when the component type has predicates.
900 * exp_ch4.adb (Expand_N_Allocator): Do not optimize scalar array
901 allocation when the component type has predicates.
903 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
905 * einfo.adb, exp_disp.adb, sem_ch3.adb, sem_ch6.adb, sem_prag.adb:
908 2018-05-22 Justin Squirek <squirek@adacore.com>
910 * sem_ch6.adb (Analyze_Expression_Function): Propagate flags from the
911 original function spec into the generated function spec due to
912 expansion of expression functions during analysis.
913 (Analyze_Subprogram_Body_Helper): Modify check on formal parameter
914 references from the body to the subprogram spec in the case of
915 expression functions because of inconsistances related to having a
917 * libgnarl/s-osinte__android.ads: Flag parameters as unused.
918 * libgnarl/s-osinte__lynxos178e.ads: Likewise.
919 * libgnarl/s-osinte__qnx.adb: Likewise.
920 * libgnarl/s-osinte__qnx.ads: Likewise.
922 2018-05-22 Doug Rupp <rupp@adacore.com>
924 * init.c (HAVE_ADJUST_CONTEXT_FOR_RAISE): Don't define on VxWorks7 for
927 2018-05-22 Olivier Hainque <hainque@adacore.com>
929 * libgnat/a-except.adb (Exception_Propagation.Propagate_Exception):
930 Expect an Exception_Occurence object, not an Access.
931 (Complete_And_Propagate_Occurrence): Adjust accordingly.
932 (Raise_From_Signal_Handler): Likewise.
933 (Reraise_Occurrence_No_Defer): If we have a Machine_Occurrence
934 available in the provided occurrence object, just re-propagate the
935 latter as a bare "raise;" would do.
936 * libgnat/a-exexpr.adb (Propagate_Exception): Adjust to spec change.
937 * libgnat/a-exstat.adb (String_To_EO): Initialize X.Machine_Occurrence
938 to null, to mark that the occurrence we're crafting from the stream
939 contents is not being propagated (yet).
941 2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
943 * exp_aggr.adb (Initialize_Ctrl_Record_Component): Insert the generated
944 code for a transient component in line with the rest of the
945 initialization code, rather than before the aggregate. This ensures
946 that the component has proper visibility of the discriminants.
948 2018-05-22 Jerome Lambourg <lambourg@adacore.com>
950 * adaint.c: Reorganize QNX-specific macros, use syspage to retreive the
953 2018-05-22 Jerome Lambourg <lambourg@adacore.com>
955 * sigtramp-qnx.c: Properly restore link register in signal trampoline.
957 2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
959 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Strip away any
960 conversions before extracting the value of the expression.
961 * exp_ch3.adb (Default_Initialize_Object): Optimize the default
962 initialization of an array of scalars.
963 (Get_Simple_Init_Val): Add processing for array types. Remove the
964 processing of strings because this case is already handled by the array
966 (Needs_Simple_Initialization): Moved to Sem_Util.
967 (Simple_Init_Array_Type): New routine.
968 (Simple_Init_Initialize_Scalars_Type): Reimplemented to use the new
969 facilities from Sem_Util.
970 (Simple_Initialization_OK): New routine.
971 * exp_ch3.ads (Needs_Simple_Initialization): Moved to Sem_Util.
972 * exp_ch4.adb (Expand_N_Allocator): Optimize the default allocation of
974 * sem_prag.adb (Analyze_Float_Value): New routine.
975 (Analyze_Integer_Value): New routine.
976 (Analyze_Pragma): Reimplement the analysis of pragma Initialize_Scalars
977 to handled the extended form of the pragma.
978 (Analyze_Type_Value_Pair): New routine.
979 * sem_util.adb: Add invalid value-related data structures.
980 (Examine_Array_Bounds): New routine.
981 (Has_Static_Array_Bounds): Reimplemented.
982 (Has_Static_Non_Empty_Array_Bounds): New routine.
983 (Invalid_Scalar_Value): New routine.
984 (Needs_Simple_Initialization): Moved from Exp_Ch3.
985 (Set_Invalid_Scalar_Value): New routines.
986 * sem_util.ads (Has_Static_Non_Empty_Array_Bounds): New routine.
987 (Invalid_Scalar_Value): New routine.
988 (Needs_Simple_Initialization): Moved from Exp_Ch3.
989 (Set_Invalid_Scalar_Value): New routines.
990 * snames.ads-tmpl: Add names for the salar type families used by pragma
993 2018-05-22 Javier Miranda <miranda@adacore.com>
995 * exp_disp.adb (Make_DT): Initialize the External_Tag with an empty
996 string when pragma No_Tagged_Streams is applicable to the tagged type,
997 and initialize the Expanded_Name with an empty string when pragma
998 Discard_Names is applicable to the tagged type.
1000 2018-05-22 Ed Schonberg <schonberg@adacore.com>
1002 * sem_ch6.adb (Check_Conformance): Add RM reference for rule that a
1003 formal subprogram is never subtype conformqnt, and thus cannot be the
1004 prefix of 'Access. Reject as well the attribute when applied to a
1005 renaming of a formal subprogram.
1007 2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1009 * exp_ch3.adb (Build_Array_Init_Proc): Update the call to
1010 Needs_Simple_Initialization.
1011 (Build_Init_Statements): Update the call to Get_Simple_Init_Val.
1012 (Check_Subtype_Bounds): Renamed to Extract_Subtype_Bounds. Update the
1013 profile and comment on usage.
1014 (Default_Initialize_Object): Do not use New_Copy_Tree to set the proper
1015 Sloc of a value obtained from aspect Default_Value because this could
1016 potentially replicate large trees. The proper Sloc is now set in
1017 Get_Simple_Init_Val.
1018 (Get_Simple_Init_Val): Reorganized by breaking the various cases into
1019 separate routines. Eliminate the use of global variables.
1020 (Init_Component): Update the call to Get_Simple_Init_Val.
1021 (Needs_Simple_Initialization): Update the parameter profile and all
1023 (Simple_Init_Defaulted_Type): Copy the value of aspect Default_Value
1024 and set the proper Sloc.
1025 * exp_ch3.ads (Get_Simple_Init_Val): Update the parameter profile and
1027 (Needs_Simple_Initialization): Update the parameter profile.
1029 2018-05-22 Patrick Bernardi <bernardi@adacore.com>
1031 * sem_ch3.adb (Build_Discriminant_Constraints): Raise an error if the
1032 user tries to use a subtype indication as a discriminant constraint.
1034 2018-05-22 Ed Schonberg <schonberg@adacore.com>
1036 * exp_ch4.ads, exp_ch4.adb, exp_util.adb, expander.adb: Remove mention
1037 of N_Reduction_Expression and N_Reduction_Expression_Parameter.
1038 * par-ch4.adb: Remove parsing routines for reduction expressions.
1039 * sem.adb, sinfo.ads, sinfo.adb, sem_ch4.ads, sem_ch4.adb, sem_res.adb,
1040 sem_spark.adb, sprint.adb: Remove analysis routines for reduction
1043 2018-05-22 Arnaud Charlet <charlet@adacore.com>
1045 * sem_ch8.adb (Check_Frozen_Renaming): Do not emit error in
1046 Relaxed_RM_Semantics mode.
1048 2018-05-22 Arnaud Charlet <charlet@adacore.com>
1050 * comperr.adb (Delete_SCIL_Files): Take into account
1051 N_Generic_Package_Renaming_Declaration.
1053 2018-05-22 Ed Schonberg <schonberg@adacore.com>
1055 * sem_ch3.adb (Search_Derivation_Levels): Whenever a parent type is
1056 private, use the full view if available, because it may include renamed
1057 discriminants whose values are stored in the corresponding
1060 2018-05-22 Ed Schonberg <schonberg@adacore.com>
1062 * einfo.ads, einfo.adb: New attribute Hidden_In_Formal_Instance,
1063 defined on packages that are actuals for formal packages, in order to
1064 set/reset the visibility of the formals of a formal package with given
1065 actuals, when there are subsequent uses of those formals in the
1066 enclosing generic, as required by RN 12.7 (10).
1067 * atree.ads, atree.adb: Add operations for Elist30.
1068 * atree.h: Add Elist30.
1069 * sem_ch12.adb (Analyze_Formal_Package_Instantiation): Collect formals
1070 that are not defaulted and are thus not visible within the current
1072 (Check_Formal_Packages): Reset visibility of formals of a formal
1073 package that are not defaulted, on exit from current instance.
1075 2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1077 * sem_prag.adb (Analyze_Input_Output): Emit an error when a non-null,
1078 non-'Result output appears in the output list of a function.
1080 2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1082 * exp_attr.adb (Build_Array_VS_Func): Reimplemented.
1083 (Build_Record_VS_Func): Reimplemented.
1084 (Expand_N_Attribute): Reimplement the handling of attribute
1086 * sem_attr.adb (Analyze_Attribute): Reimplement the handling of
1087 attribute 'Valid_Scalars.
1088 * sem_util.adb (Scalar_Part_Present): Reimplemented.
1089 (Validated_View): New routine.
1090 * sem_util.ads (Scalar_Part_Present): Update the parameter profile and
1092 (Validated_View): New routine.
1093 * doc/gnat_rm/implementation_defined_attributes.rst: Update the
1094 documentation of attribute 'Valid_Scalars.
1095 * gnat_rm.texi: Regenerate.
1097 2018-05-22 Bob Duff <duff@adacore.com>
1099 * binde.adb: (Choose): Ignore a pragma Elaborate_Body that appears in
1100 the spec of a SAL_Interface package.
1102 2018-05-22 Ed Schonberg <schonberg@adacore.com>
1104 * freeze.adb (Freeze_Entity): When analyzing delayed aspects of an
1105 entity E within a generic unit, indicate that there are no remaining
1106 delayed aspects after invoking Analyze_Aspects_At_Freeze_Point. The
1107 entity E is not frozen yet but the aspects should not be reanalyzed at
1108 the freeze point, which may be outside of the generic and may not have
1109 the proper visibility.
1111 2018-05-22 Bob Duff <duff@adacore.com>
1113 * doc/gnat_ugn/gnat_utility_programs.rst: Add documentation for
1114 the new --split-line-before-record, --indent-named-statements and
1115 --no-align-modes gnatpp switches.
1117 2018-05-22 Ed Schonberg <schonberg@adacore.com>
1119 * sem_prag.adb (Process_Compile_Time_Warning_Or_Error): Handle properly
1120 a second argument that is a constant of a given string value.
1122 2018-05-22 Doug Rupp <rupp@adacore.com>
1124 * sigtramp-vxworks-target.inc: Align stack to 128bits on AArch64.
1126 2018-05-22 Jerome Lambourg <lambourg@adacore.com>
1128 * sigtramp-qnx.c: Fix stack alignment issue in the signal trampoline.
1130 2018-05-22 Ed Schonberg <schonberg@adacore.com>
1132 * freeze.adb (Freeze_Fixed_Point_Type): If the first subtype has
1133 delayed aspects, analyze them now, os that the representation of the
1134 type (size, bounds) can be computed and validated.
1136 2018-05-22 Olivier Hainque <hainque@adacore.com>
1138 * libgnat/s-dwalin.adb (Enable_Cache): Skip symbols outside of the
1139 executable code section boundaries.
1141 2018-05-22 Javier Miranda <miranda@adacore.com>
1143 * locales.c: New implementation for the Ada.Locales package.
1144 * libgnat/a-locale.ads: Remove comment indicating that this is not
1146 * doc/gnat_rm/standard_library_routines.rst: Remove comment indicating
1147 that this is not implemented.
1148 * gnat_rm.texi: Regenerate.
1150 2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1152 * exp_ch5.adb, freeze.adb, pprint.adb, sem_ch4.adb, sem_res.adb: Minor
1155 2018-05-22 Justin Squirek <squirek@adacore.com>
1157 * sem_ch12.adb (In_Same_Declarative_Part): Moved to sem_util.
1158 (Freeze_Subprogram_Body, Install_Body): Modify calls to
1159 In_Same_Declarative_Part.
1160 * sem_prag.adb (Analyze_Pragma-Pragma_Pure_Function): Add check to
1161 verify pragma declaration is within the same declarative list with
1162 corresponding error message.
1163 * sem_util.adb, sem_util.ads (In_Same_Declarative_Part): Moved from
1164 sem_ch12.adb and generalized to be useful outside the scope of
1167 2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1169 * sem_ch6.adb (Analyze_Subprogram_Declaration): Set the proper
1170 categorization of the unit after processing the aspects in case one of
1171 its aspects is converted into a categorization pragma.
1173 2018-05-21 Ed Schonberg <schonberg@adacore.com>
1175 * freeze.adb (Warn_Overlay): Do not emit a wawrning on an object
1176 declaration with an explicit address clause and a type with default
1177 initialization, if the declaration carries an aspect
1178 Suppress_Initialization.
1180 2018-05-21 Daniel Mercier <mercier@adacore.com>
1182 * pprint.adb: Use mixed case for attribute names.
1184 2018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
1186 * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Rename the call to
1187 Analyze_Aspect_Specifications_On_Body_Or_Stub.
1188 (Analyze_Subprogram_Body_Helper): Rename the calls to
1189 Analyze_Aspect_Specifications_On_Body_Or_Stub.
1190 * sem_ch9.adb (Analyze_Entry_Body): Rename the call to
1191 Analyze_Aspect_Specifications_On_Body_Or_Stub.
1192 * sem_ch10.adb: Add with and use clause for Sem_Ch13.
1193 (Analyze_Package_Body_Stub): Add constant Id. Decorate the package stub
1194 prior to analyzing its aspects.
1195 (Analyze_Protected_Body_Stub): Add constant Id. Decorate the package
1196 stub prior to analyzing its aspects. Save and restore the configuration
1198 (Analyze_Task_Body_Stub): Add constant Id. Decorate the package stub
1199 prior to analyzing its aspects.
1200 * sem_ch13.adb (Analyze_Aspect_Specifications_On_Body_Or_Stub): Renamed
1201 to Analyze_Aspects_On_Subprogram_Body_Or_Stub.
1202 * sem_ch13.ads (Analyze_Aspect_Specifications_On_Body_Or_Stub): Renamed
1203 to Analyze_Aspects_On_Subprogram_Body_Or_Stub.
1204 * sem_prag.adb: Code reformatting.
1205 (Analyze_Refined_Depends_Global_Post): Consider task body stubs.
1207 2018-05-21 Jerome Lambourg <lambourg@adacore.com>
1209 * gcc-interface/Makefile.in: Add g-soliop__qnx.ads to the runtime build
1212 2018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
1214 * exp_cg.adb: Remove with and use clause for Exp_Disp.
1215 * exp_ch9.adb: Remove with and use clause for Exp_Disp.
1216 * exp_disp.adb (Is_Predefined_Dispatching_Operation): Moved to Sem_Util.
1217 (Is_Predefined_Interface_Primitive): Moved to Sem_Util.
1218 (Is_Predefined_Internal_Operation): Moved to Sem_Util.
1219 * exp_disp.ads (Is_Predefined_Dispatching_Operation): Moved to Sem_Util.
1220 (Is_Predefined_Interface_Primitive): Moved to Sem_Util.
1221 (Is_Predefined_Internal_Operation): Moved to Sem_Util.
1222 * exp_dist.adb: Remove with and use clause for Exp_Disp.
1223 * freeze.adb: Remove with and use clause for Exp_Disp.
1224 * sem_cat.adb: Remove with and use clause for Exp_Disp.
1225 * sem_ch6.adb: Remove with and use clause for Exp_Disp.
1226 * sem_ch12.adb: Remove with and use clause for Exp_Disp.
1227 * sem_elab.adb (Check_Overriding_Primitive): Do not process predefined
1229 * sem_util.adb: Remove with and use clause for Exp_Disp.
1230 (Is_Predefined_Dispatching_Operation): Moved from Exp_Disp.
1231 (Is_Predefined_Interface_Primitive): Moved from Exp_Disp.
1232 (Is_Predefined_Internal_Operation): Moved from Exp_Disp.
1233 * sem_util.ads (Is_Predefined_Dispatching_Operation): Moved from
1235 (Is_Predefined_Interface_Primitive): Moved from Exp_Disp.
1236 (Is_Predefined_Internal_Operation): Moved from Exp_Disp.
1238 2018-05-21 Ed Schonberg <schonberg@adacore.com>
1240 * sem_res.adb (Valid_Conversion): Improve error message on an illegal
1241 type conversion whose expression has a limited view of a type.
1243 2018-05-21 Ed Schonberg <schonberg@adacore.com>
1245 * exp_ch5.adb (Build_Formal_Container_Iteration): If source has
1246 explicit name for iterator loop, preserve that name in expanded
1247 construct, for possible use in exit statements.
1249 2018-05-21 Javier Miranda <miranda@adacore.com>
1251 * sem_ch4.adb (Analyze_Membership_Op): Avoid compiler crash when the
1252 spec of a unit has Ada 2012 membership tests with multiple choices and
1253 the unit body is not compiled under Ada 2012 mode.
1255 2018-05-21 Doug Rupp <rupp@adacore.com>
1257 * sigtramp-vxworks-target.inc: Set cfa_reg properly from sigcontext
1259 (CFI_COMMON_REGS): Restore LR jic probed from prologue.
1260 (REGNO_PC_OFFSET): Change to correct value for Aarch64.
1262 2018-05-21 Jose Ruiz <ruiz@adacore.com>
1264 * doc/gnat_ugn/gnat_utility_programs.rst, exp_attr.adb,
1265 libgnarl/s-tassta.adb: Minor typo fixes
1267 2018-05-21 Ed Schonberg <schonberg@adacore.com>
1269 * sem_ch4.adb (Analyze_One_Call): Recognize complex cases where an
1270 indexed call originally in prefix forn is itself the prefix of a
1273 2018-05-21 Piotr Trojanek <trojanek@adacore.com>
1275 * sem_eval.adb (Is_Null_Range): Clarify access to the full view of a
1277 (Not_Null_Range): Same as above.
1279 2018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
1281 * exp_ch3.adb: Minor reformatting.
1282 * exp_ch6.adb: Likewise.
1283 * freeze.adb: Likewise.
1284 * inline.adb: Likewise.
1285 * sem_util.adb: Likewise.
1287 2018-05-21 Yannick Moy <moy@adacore.com>
1289 * inline.adb (Expand_Inlined_Call.Process_Formals): Use a type
1290 conversion instead of an unchecked type conversion when inlining a
1291 return statement, unless type qualification is required (for character
1292 and string literal) or no check can result from the conversion (for
1294 * opt.ads: Update comment.
1296 2018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
1298 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Install the elaboration
1299 model of the compilation unit spec, if any.
1300 * sem_ch7.adb (Analyze_Package_Body_Helper): Install the elaboration
1301 model of the compilation unit spec, if any.
1302 * sem_ch10.adb (Analyze_Subunit): Install the elaboration model of the
1303 parent compilation unit spec, if any.
1304 * sem_elab.adb (Check_Elaboration_Scenarios): Restore the elaboration
1305 model of the main unit.
1306 (Is_Same_Unit): The routine now uses Unit_Entity.
1307 (Is_Subunit): Removed.
1308 (Normalize_Unit): Removed.
1309 (Unit_Entity): New routine.
1310 * sem_prag.adb (Analyze_Pragma): Reimplement the handling of pragma
1311 Elaboration_Checks. The analysis now ensures that the pragma appears at
1312 the configuration level, and on the initial declaration of a unit.
1313 Other placements are either flagged as illegal, or ignored.
1314 (Check_Duplicate_Elaboration_Checks_Pragma): New routine.
1315 (Ignore_Elaboration_Checks_Pragma): New routine.
1316 * sem_util.adb (Install_Elaboration_Model): New routine.
1317 * sem_util.ads (Install_Elaboration_Model): New routine.
1318 * doc/gnat_rm/implementation_defined_pragmas.rst: Update the
1319 documentation of pragma Elaboration_Checks.
1320 * gnat_rm.texi: Regenerate.
1322 2018-05-21 Olivier Hainque <hainque@adacore.com>
1324 * libgnat/s-trasym__dwarf.adb (Executable_Name): Return argv[0] instead
1325 of empty string when argv[0] couldn't be found on PATH.
1326 (Enable_Cache): Raise Program_Error instead of attempting a null
1327 pointer dereference when the Exec_Module initialization failed.
1329 2018-05-21 Piotr Trojanek <trojanek@adacore.com>
1331 * libgnarl/a-reatim.ads (Clock_Time): Remove External aspect.
1332 * libgnarl/a-taside.ads (Tasking_State): Likewise.
1333 * libgnat/a-calend.ads (Clock_Time): Likewise.
1335 2018-05-21 Yannick Moy <moy@adacore.com>
1337 * sem_ch6.adb (Analyze_Procedure_Call): Refine test to recognize prefix
1338 call notation in inlined call in GNATprove mode.
1340 2018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
1342 * einfo.adb (Is_External_State): An abstract state is also external
1343 when it is declared with option "synchronous".
1344 * einfo.ads: Update the documentation of synthesized attribute
1346 * sem_util.adb (Find_Simple_Properties): New routine.
1347 (Is_Enabled_External_Property): New routine.
1348 (State_Has_Enabled_Property): Reimplemented. The two flavors of option
1349 External have precedence over option Synchronous when determining
1350 whether a property is in effect.
1352 2018-05-21 Yannick Moy <moy@adacore.com>
1354 * sem_eval.adb (Static_Length): Take into account case of variable of
1355 subtype string literal.
1357 2018-05-21 Olivier Hainque <hainque@adacore.com>
1359 * libgnat/s-objrea.ads (Get_Memory_Bounds): Rename as Get_Xcode_Bounds.
1360 (Object_Section): Rename Flag_Alloc component as Flag_Xcode.
1361 * libgnat/s-objrea.adb (Get_Xcode_Bounds): Adjust to new subprogram and
1363 (Get_Section, ELF case): Set Flag_Xcode from SHF_EXECINSTR.
1364 * libgnat/s-dwalin.adb (Open): Adjust to the Get_Memory_Bounds name
1367 2018-05-21 Olivier Hainque <hainque@adacore.com>
1369 * libgnat/s-dwalin.ads (Dwarf_Context): Change type of Load_Address to
1370 Address, and type of Low, High to Storage_Offset.
1371 (Low): Rename as Low_Address and convey that the return value is a
1372 runtime reference accounting for a load address.
1373 * libgnat/s-dwalin.adb (Read_Aranges_Entry): Adjust to the
1374 address/offset type changes.
1375 (Aranges_Lookup): Likewise.
1376 (Symbolic_Address): Likewise.
1377 (Symbolic_Traceback): Likewise.
1378 (Dump_Cache): Likewise.
1379 (Is_Inside): Likewise.
1381 (Set_Load_Address): Likewise.
1382 (Low_Address): Likewise, and account for C.Load_Address.
1383 * libgnat/s-trasym__dwarf.adb (Lt): Use Low_Address instead of Low.
1384 (Multi_Module_Symbolic_Traceback): Compare address in traceback
1385 with module Low_Address instead of Low.
1387 2018-05-21 Olivier Hainque <hainque@adacore.com>
1389 * libgnat/s-dwalin.ads (Dwarf_Context): Rename Load_Slide as
1391 * libgnat/s-dwalin.adb (Is_Inside): Adjust accordingly.
1392 (Set_Load_Address): Likewise.
1393 (Symbolic_Traceback): Likewise.
1395 2018-05-21 Olivier Hainque <hainque@adacore.com>
1397 * libgnat/s-trasym__dwarf.adb (Add_Module_To_Cache): Expect a
1398 Load_Address argument and pass it down to Init_Module.
1399 * libgnat/s-tsmona__linux.adb (Build_Cache_For_All_Modules): Pass
1400 lm.l_addr as the Load_Address to Add_Module_To_Cache.
1402 2018-05-21 Piotr Trojanek <trojanek@adacore.com>
1404 * einfo.adb (Has_Discriminants): Stronger assertion.
1405 (Set_Has_Discriminants): Stronger assertion.
1406 * sem_ch13.adb (Push_Scope_And_Install_Discriminants): Adapt to respect
1407 the stronger assertion on Has_Discriminant.
1408 (Uninstall_Discriminants_And_Pop_Scope): Same as above.
1409 * sem_util.adb (New_Copy_Tree): Same as above.
1410 * sem_ch7.adb (Generate_Parent_References): Prevent calls to
1411 Has_Discriminant on non-type entities that might happen when the
1412 compiled code has errors.
1413 * sem_ch3.adb (Derived_Type_Declaration): Only call
1414 Set_Has_Discriminant on type entities.
1416 2018-05-21 Arnaud Charlet <charlet@adacore.com>
1418 * exp_unst.adb (Unnest_Subprogram): Unnest all subprograms relevant for
1421 2018-05-21 Piotr Trojanek <trojanek@adacore.com>
1423 * lib.ads: Fix typo in enumeration in comment.
1425 2018-05-21 Ed Schonberg <schonberg@adacore.com>
1427 * sem_attr.adb (Analyze_Attribute, case Scalar_Storage_Order): The
1428 attribute reference is legal within a generic unit when the prefix is a
1429 formal private type.
1431 2018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
1433 * exp_ch7.adb (Establish_Transient_Scope): Code cleanup. Do not
1434 delegate the secondary stack management when there is no suitable
1435 transient context, and the transient scope was intended to manage the
1436 secondary stack because this causes premature reclamation. Change the
1437 transient scope creation logic by special casing assignment statements
1438 of controlled components for type initialization procedures.
1439 (Find_Node_To_Be_Wrapped): Renamed to Find_Transient_Context. Update
1440 the comment on usage.
1441 (Find_Transient_Context): Change the initinte loop into a while loop.
1442 Iterations schemes and iterator specifications are not valid transient
1443 contexts because they rely on special processing. Assignment statements
1444 are now treated as a normal transient context, special cases are
1445 handled by the caller. Add special processing for pragma Check.
1446 (Is_OK_Construct): Removed. Its functionality has been merged in
1447 routine Find_Transient_Context.
1448 * sem_ch5.adb (Check_Call): Reimplemented. Add code to properly
1449 retrieve the subprogram being invoked. Use a more accurate predicate
1450 (Requires_Transient_Scope) to determine that the function will emply
1451 the secondary stack.
1453 2018-05-21 Piotr Trojanek <trojanek@adacore.com>
1455 * ada_get_targ.adb: Fix subprogram body headers.
1456 * adabkend.adb: Likewise.
1457 * checks.adb: Likewise.
1458 * exp_ch3.adb: Likewise.
1459 * exp_ch5.adb: Likewise.
1460 * exp_ch9.adb: Likewise.
1461 * exp_dist.adb: Likewise.
1462 * exp_tss.adb: Likewise.
1463 * inline.adb: Likewise.
1464 * lib-writ.adb: Likewise.
1465 * lib-xref-spark_specific.adb: Likewise.
1466 * libgnarl/s-osinte__darwin.adb: Likewise.
1467 * libgnarl/s-stusta.adb: Likewise.
1468 * libgnarl/s-taprop__solaris.adb: Likewise.
1469 * libgnarl/s-tposen.adb: Likewise.
1470 * libgnarl/s-vxwext__kernel-smp.adb: Likewise.
1471 * libgnarl/s-vxwext__kernel.adb: Likewise.
1472 * libgnat/a-btgbso.adb: Likewise.
1473 * libgnat/a-cfdlli.adb: Likewise.
1474 * libgnat/a-cfhama.adb: Likewise.
1475 * libgnat/a-cfinve.adb: Likewise.
1476 * libgnat/a-cimutr.adb: Likewise.
1477 * libgnat/a-coboho.adb: Likewise.
1478 * libgnat/a-cofove.adb: Likewise.
1479 * libgnat/a-cofuve.adb: Likewise.
1480 * libgnat/a-comutr.adb: Likewise.
1481 * libgnat/a-exexda.adb: Likewise.
1482 * libgnat/a-tags.adb: Likewise.
1483 * libgnat/a-tideau.adb: Likewise.
1484 * libgnat/a-wtdeau.adb: Likewise.
1485 * libgnat/a-ztdeau.adb: Likewise.
1486 * libgnat/g-alleve.adb: Likewise.
1487 * libgnat/s-excdeb.adb: Likewise.
1488 * libgnat/s-parint.adb: Likewise.
1489 * libgnat/s-shasto.adb: Likewise.
1490 * libgnat/s-traceb__hpux.adb: Likewise.
1491 * prepcomp.adb: Likewise.
1492 * sem_ch4.adb: Likewise.
1493 * sem_ch6.adb: Likewise.
1494 * sem_dist.adb: Likewise.
1495 * sem_prag.adb: Likewise.
1496 * sem_util.adb: Likewise.
1497 * sinfo.adb: Likewise.
1498 * switch.adb: Likewise.
1500 2018-05-04 John Marino <gnugcc@marino.st>
1503 * link.c (BSD platforms): Add missing backslash.
1505 2018-04-27 Eric Botcazou <ebotcazou@adacore.com>
1508 * init.c (__gnat_handle_vms_condition): Add missing parentheses.
1510 2018-04-25 Eric Botcazou <ebotcazou@adacore.com>
1513 * gnat_ugn.texi: Regenerate.
1515 2018-03-23 Eric Botcazou <ebotcazou@adacore.com>
1518 * gnatlink.adb (Gnatlink): Remove handling of -b switch.
1519 * doc/gnat_ugn/building_executable_programs_with_gnat.rst (gnatlink):
1520 Remove documentation of -b switch.
1522 2018-03-23 Eric Botcazou <ebotcazou@adacore.com>
1525 * gnatlink.adb (Process_Args): Drop existing link switches if multiple
1526 switches are passed for --LINK.
1528 2018-03-12 Eric Botcazou <ebotcazou@adacore.com>
1531 * gcc-interface/misc.c (gnat_post_options): Disable string overflow
1534 2018-03-10 Eric Botcazou <ebotcazou@adacore.com>
1536 * gcc-interface/trans.c (node_has_volatile_full_access) <N_Identifier>:
1537 Consider only entities for objects.
1539 2018-03-07 Sebastian Huber <sebastian.huber@embedded-brains.de>
1541 * gcc-interface/Makefile.in (OSCONS_CPP): Remove redundant
1543 (OSCONS_EXTRACT): Add $(GNATLIBCFLAGS_FOR_C).
1545 2018-03-06 Eric Botcazou <ebotcazou@adacore.com>
1547 * gcc-interface/trans.c (convert_with_check): Fix typo in the condition
1548 guarding the overflow check emitted for the upper bound of a floating-
1551 2018-03-06 Eric Botcazou <ebotcazou@adacore.com>
1553 * gcc-interface/utils.c (def_builtin_1): Bail out on error_mark_node.
1555 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
1557 * libgnat/i-cexten.ads (Float_128): New type.
1559 2018-02-02 Eric Botcazou <ebotcazou@adacore.com>
1561 * gcc-interface/decl.c (array_type_has_nonaliased_component): Return
1562 false if the component type is a pointer.
1564 2018-01-11 Gary Dismukes <dismukes@adacore.com>
1566 * exp_ch3.adb (Default_Initialize_Object): Call New_Copy_Tree on the
1567 result of Get_Simple_Init_Value and pass the source location of the
1568 object declaration's object_definition.
1570 2018-01-11 Ed Schonberg <schonberg@adacore.com>
1572 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration): Handle
1573 properly object declarations with initializations that are
1574 build-in-place function calls, when there is an address specification,
1575 either as an aspect specification or an explicit attribute
1576 specification clause, for the initialized object.
1577 * freeze.adb (Check_Address_Clause): Do not remove side-effects from
1578 initial expressions in the case of a build-in-place call.
1580 2018-01-11 Piotr Trojanek <trojanek@adacore.com>
1582 * sem_eval.adb (Is_Null_Range): Retrieve the full view when called on a
1583 private (sub)type; refactor to avoid early return statement.
1584 (Not_Null_Range): Same as above.
1586 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
1588 * freeze.adb (Freeze_Entity): Ensure that a Ghost type is not
1589 concurrent, nor effectively volatile.
1590 * ghost.adb (Check_Ghost_Type): New routine.
1591 * ghost.ads (Check_Ghost_Type): New routine.
1592 * sem_util.adb (Is_Declaration): Reimplemented. The routine can now
1593 consider specific subsets of declarations.
1594 (Is_Declaration_Other_Than_Renaming): Removed. Its functionality is
1595 replicated by Is_Declaration.
1596 * sem_util.ads (Is_Declaration): New parameter profile. Update the
1598 (Is_Declaration_Other_Than_Renaming): Removed.
1600 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
1602 * sem_ch5.adb (Analyze_Assignment): Assignments to variables that act
1603 as Part_Of consituents of single protected types are illegal when they
1604 take place inside a protected function.
1605 (Diagnose_Non_Variable_Lhs): Use Within_Function to check for an
1607 (Is_Protected_Part_Of_Constituent): New routine.
1608 (Within_Function): New routine.
1610 2018-01-11 Arnaud Charlet <charlet@adacore.com>
1612 Bump copyright notices to 2018.
1614 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
1616 * binde.adb, par-ch6.adb, par-ch9.adb, sem_ch12.adb, sem_ch13.adb:
1619 2018-01-11 Justin Squirek <squirek@adacore.com>
1621 * par-ch6.adb (Scan_Body_Or_Expression_Function): Add additional check
1622 to make sure a given expression function is properly parenthesized.
1624 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
1626 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Check the
1627 categorization of a subprogram body which does not complete a previous
1630 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
1632 * sem_ch10.adb (Check_Private_Child_Unit): Ensure that the enclosing
1633 scope of package Ada is Standard.
1635 2018-01-11 Ed Schonberg <schonberg@adacore.com>
1637 * sem_ch13.adb (Replace_Type_Ref): Handle properly reference to a
1638 subcomponent of the current entity when building the body for a dynamic
1639 predicate function for a record with composite subcomponents.
1641 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
1643 * exp_aggr.adb (Convert_Aggr_In_Object_Decl): Update the call to
1644 Establish_Transient_Scope.
1645 (Convert_To_Assignments): Update the call to Establish_Transient_Scope.
1646 (Expand_Array_Aggregate): Update the call to Establish_Transient_Scope.
1647 * exp_ch6.adb (Expand_Call_Helper): Update the call to
1648 Establish_Transient_Scope.
1649 (Make_Build_In_Place_Call_In_Object_Declaration): Update the call to
1650 Establish_Transient_Scope.
1651 * exp_ch7.adb (Establish_Transient_Scope): Restructured. Delegate the
1652 management of the secondary stack to an enclosing scope if there is no
1653 suitable construct to wrap, and the transient scope was intended to
1654 manage the secondary stack.
1655 (Find_Node_To_Be_Wrapped): Restructured. A case_statement_alternative
1656 is a valid boundary for a transient expression which comes from the
1657 statements of the alternative, otherwise alternatives cannot be
1658 wrapped. Assignments of controlled objects which have controlled
1659 actions suppressed now stop the traversal as there is no point in
1660 looking for an enclosing construct. Add several N_xxx_Body choices to
1661 the termination conditions for completeness.
1662 * exp_ch7.ads (Establish_Transient_Scope): Update the parameter profile
1663 and the associated comment on usage.
1664 * exp_smem.adb (Add_Shared_Var_Lock_Procs): Update the call to
1665 Establish_Transient_Scope.
1666 (Add_Write_After): Update the call to Establish_Transient_Scope.
1667 * sem_res.adb (Check_Initialization_Call): Removed.
1668 (Resolve_Actuals): Account for additional cases where finalization
1669 actions are required by utilizing predicate Needs_Finalization rather
1671 (Resolve_Call): Type initialization procedures can now utilize
1672 transient scopes to manage the secondary stack, thus preventing leaks
1673 during initialization. Remove the previous kludgy algorithm which
1674 attempts to manage the secondary stack at the object creation site.
1676 2018-01-11 Jerome Lambourg <lambourg@adacore.com>
1678 * libgnat/g-soliop__qnx.ads: New.
1679 * adaint.c, adaint.h, cstreams.c, s-oscons-tmplt.c, sysdep.c: Update
1682 2018-01-11 Bob Duff <duff@adacore.com>
1684 * par-ch9.adb (P_Protected_Operation_Declaration_Opt): Give an error if
1685 a null procedure occurs in a protected definition.
1687 2018-01-11 Bob Duff <duff@adacore.com>
1689 * binderr.ads, namet.ads: Minor reformatting.
1691 2018-01-11 Bob Duff <duff@adacore.com>
1693 * doc/gnat_ugn/gnat_utility_programs.rst: Improve documentation of
1696 2018-01-11 Bob Duff <duff@adacore.com>
1698 * binde.adb (Force_Elab_Order): Give an error if there are duplicate
1701 2018-01-11 Ed Schonberg <schonberg@adacore.com>
1703 * sem_ch6.adb (Freeze_Expr_Types): If an access value is the
1704 controlling argument of a dispatching call. freeze the corresponding
1707 2018-01-11 Ben Brosgol <brosgol@adacore.com>
1709 * doc/Makefile: Add Sphinx option -W to treat warnings as errors.
1711 2018-01-11 Ben Brosgol <brosgol@adacore.com>
1713 * doc/gnat_rm/implementation_defined_aspects.rst: Minor type/wording
1715 * gnat_rm.texi: Regenerate.
1717 2018-01-11 Ed Schonberg <schonberg@adacore.com>
1719 * sem_ch12.adb (Check_Fixed_Point_Type): Do not apply check if the
1720 formsl type corresponding to the actual fixed point type is private,
1721 because in this case there can be no suspicious arithmetic operations
1722 in the generic unless they reference a formal subprogram. Clarify
1725 2018-01-11 Javier Miranda <miranda@adacore.com>
1727 * exp_util.adb (Remove_Side_Effects): No action done for functions
1728 returning class-wide types since it requires generating code using
1729 'reference and the CCG target has no secondary stack.
1730 * gnat1drv.adb: Disable building static dispatch tables when generating
1733 2018-01-11 Piotr Trojanek <trojanek@adacore.com>
1735 * libgnat/a-direio.ads, libgnat/a-sequio.ads, libgnat/a-ststio.ads,
1736 libgnat/a-textio.ads, libgnat/a-witeio.ads, libgnat/a-ztexio.ads
1737 (File_Type): Add Default_Initial_Condition aspect.
1739 2018-01-11 Pascal Obry <obry@adacore.com>
1741 * libgnat/s-os_lib.adb (Normalize_Pathname): New implementation.
1743 2018-01-11 Bob Duff <duff@adacore.com>
1745 * doc/gnat_ugn/gnat_utility_programs.rst: Rewrite gnatpp documentation
1746 to match what the Libadalang-based version does.
1747 * doc/gnat_ugn/about_this_guide.rst: Update reference.
1749 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
1751 * sem_res.adb (Uses_SS): A controlled type requires the secondary stack
1752 if it contains at least one component declaration employing a function
1753 call returning on the secondary stack.
1755 2018-01-11 Yannick Moy <moy@adacore.com>
1757 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
1758 Update description of restriction SPARK_05 with SPARK 2014.
1759 * gnat_rm.texi: Regenerate.
1761 2018-01-11 Vasiliy Fofanov <fofanov@adacore.com>
1763 * doc/gnat_ugn/gnat_utility_programs.rst: Fix layout.
1765 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
1767 * exp_aggr.adb, exp_ch9.adb, exp_util.adb, sem_aggr.adb, sem_ch3.adb,
1768 sem_res.adb, sem_util.adb: Minor reformatting.
1770 2018-01-11 Ed Schonberg <schonberg@adacore.com>
1772 * sem_prag.adb (Analyze_Pragma, case Predicate): Indicate that the type
1773 has a delayed aspect which must be processed at the point the type is
1774 frozen. This mimics what is done when the predicate is provided by a
1777 2018-01-11 Doug Rupp <rupp@adacore.com>
1779 * init.c (vxworks): Add macro checks for __aarch64__.
1781 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
1783 * exp_util.adb (Add_Failure_Expression): New routine.
1784 (Make_Predicate_Check): Reimplement the handling of Predicate_Failure.
1785 * sem_util.adb (Is_Current_Instance): Code cleanup.
1787 2018-01-11 Patrick Bernardi <bernardi@adacore.com>
1789 * libgnat/s-parame*.adb, libgnat/s-parame*.ads: Remove unneeded
1790 Default_Sec_Stack_Size.
1791 * libgnat/s-secsta.adb (SS_Allocate): Handle the fixed secondary stack
1792 limit check so that the integer index does not overflow. Check the
1793 dynamic stack allocation does not cause the secondary stack pointer to
1795 (SS_Info): Align colons.
1796 (SS_Init): Cover the case when bootstraping with an old compiler that
1797 does not set Default_SS_Size.
1799 2018-01-11 Ed Schonberg <schonberg@adacore.com>
1801 * sem_ch3.adb (Add_Internal_Interface_Entities): When checking the
1802 legality of an inherited operation that may require overriding, ignore
1803 primitive_wrappers that correspond to explicit operations that override
1804 an interface primitive.
1805 * exp_util.adb (Build_Class_Wide_Expression, Replace_Entity): If the
1806 operation to which the class-wide expression applies is a protected op.
1807 with a primitive_wrapper, verify that the updated inherited expression
1808 does not contain an internal call to a protected function. This
1809 completes the implementation of AI12-0166.
1811 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
1813 * ali.adb: Document the remaining letters available for ALI lines.
1814 (Scan_ALI): A with clause is internal when it is encoded on a 'Z' line.
1815 * ali.ads: Update type With_Record. Field
1816 Implicit_With_From_Instantiation is no longer in use. Add field
1818 * csinfo.adb (CSinfo): Remove the setup for attribute
1819 Implicit_With_From_Instantiation.
1820 * lib-writ.adb (Collect_Withs): Correct the logic which marks a unit as
1821 either implicitly or explicitly withed.
1822 (Is_Implicit_With_Clause): New routine.
1823 (Write_ALI): Rename array Implicit_With to Has_Implicit_With to avoid
1824 confusion with the with clause attribute by the same name.
1825 (Write_With_Lines): Update the emission of 'W', 'Y', and 'Z' headers.
1826 * rtsfind.adb (Maybe_Add_With): Code cleanup.
1827 * sem_ch8.adb (Present_System_Aux): Code cleanup.
1828 * sem_ch10.adb (Expand_With_Clause): Mark the with clause as generated
1830 (Implicit_With_On_Parent): Mark the with clause as generated for a
1832 * sem_ch12.adb (Inherit_Context): With clauses inherited by an
1833 instantiation are no longer marked as Implicit_With_From_Instantiation
1834 because they are already marked as implicit.
1835 * sem_elab.adb (Ensure_Prior_Elaboration_Static): Remove the kludge
1836 which marks implicit with clauses as related to an instantiation.
1837 * sinfo.adb (Implicit_With_From_Instantiation): Removed.
1838 (Parent_With): New routine.
1839 (Set_Implicit_With_From_Instantiation): Removed.
1840 (Set_Parent_With): New routine.
1841 * sinfo.ads: Update the documentation of attribute Implicit_With.
1842 Remove attribute Implicit_With_From_Instantiation along with
1843 occurrences in nodes. Add attribute Parent_With along with occurrences
1845 (Implicit_With_From_Instantiation): Removed along with pragma Inline.
1846 (Parent_With): New routine along with pragma Inline.
1847 (Set_Implicit_With_From_Instantiation): Removed along with pragma Inline.
1848 (Set_Parent_With): New routine along with pragma Inline.
1850 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
1852 * sem_util.adb (Find_Enclosing_Scope): Return the unique defining
1853 entity when the enclosing construct is a body.
1855 2018-01-11 Patrick Bernardi <bernardi@adacore.com>
1857 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Simplified
1858 Secondary_Stack_Size handling as a pragma is now generated for the
1859 corresponding aspect instead of an attribute. Pragma expression is
1860 relocated instead of evaluated. Discriminant of the corresponding
1861 record type is referenced rather than the type discriminant.
1862 (Create_Secondary_Stack_For_Task, Make_Task_Create_Call): Update
1863 Secondary_Stack_Size rep item checks to only look for the pragma rep.
1864 * sem_ch13.adb (Analyze_One_Aspect): Transform
1865 Aspect_Secondary_Stack_Size into a pragma instead of an attribute
1866 because the attribute does not have visibility on a task type's
1867 discriminants when the type's definition is expanded.
1868 (Analyze_Attribute_Definition_Clause): Remove handling of
1869 Attribute_Secondary_Stack_Size.
1870 * snames.adb-tmpl, snames.ads-tmpl: Remove
1871 Attribute_Secondary_Stack_Size, no longer used.
1873 2018-01-11 Justin Squirek <squirek@adacore.com>
1875 * sem_ch8.adb: Minor comment fix.
1877 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
1879 * exp_ch4.adb (Process_Action): Do not abandon the inspection of an
1880 individual action because the action may denote a complex expression,
1881 such as a case statement, which in turn may contain additional
1884 2018-01-11 Ed Schonberg <schonberg@adacore.com>
1886 * sem_aggr.adb (Resolve_Iterated_Component_Association): Perform
1887 analysis on a copy of the expression with a copy of the index variable,
1888 because full expansion will rewrite construct into a loop with the
1889 original loop variable.
1890 * exp_aggr.adb (Gen_Assign): Defer analysis and resolution if the
1891 expression is an iterated component association. Full analysis takes
1892 place when construct is rewritten as a loop.
1893 (In_Place_Assign_OK, Safe_Component): An iterated_component_association
1894 is not safe for in-place assignment.
1895 * sem_util.adb (Remove_Entity): Handle properly the case of an isolated
1896 entity with no homonym and no other entity in the scope.
1898 2018-01-11 Justin Squirek <squirek@adacore.com>
1900 * sem_prag.adb (Analyze_Pragma:Pragma_Loop_Variant): Modify error
1901 message to be printed on the pragma argument identifier.
1903 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
1905 * exp_util.adb (Build_Invariant_Procedure_Declaration): Set the last
1906 entity of the generated invariant procedure in order to construct a
1907 proper entity chain.
1909 2018-01-11 Piotr Trojanek <trojanek@adacore.com>
1911 * sem_ch13.adb (Build_Predicate_Functions): Fix minor issues in
1914 2018-01-11 Arnaud Charlet <charlet@adacore.com>
1916 * einfo.ads, einfo.adb (Activation_Record_Component,
1917 Set_Activation_Record_Component, Set_Is_Uplevel_Referenced_Entity):
1918 Allow E_Discriminant.
1920 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
1922 * gcc-interface/decl.c (gnat_to_gnu_component_type): Apply the check
1923 for atomic access once the component size is taken into account and
1924 also do it if the component type is Atomic or Volatile_Full_Access.
1926 2018-01-04 Eric Botcazou <ebotcazou@adacore.com>
1928 * gnatvsn.ads: Bump copyright year.
1930 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1931 Alan Hayward <alan.hayward@arm.com>
1932 David Sherwood <david.sherwood@arm.com>
1934 * gcc-interface/misc.c (enumerate_modes): Treat GET_MODE_BITSIZE
1937 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1938 Alan Hayward <alan.hayward@arm.com>
1939 David Sherwood <david.sherwood@arm.com>
1941 * gcc-interface/misc.c (enumerate_modes): Treat GET_MODE_PRECISION
1944 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1945 Alan Hayward <alan.hayward@arm.com>
1946 David Sherwood <david.sherwood@arm.com>
1948 * gcc-interface/utils.c (gnat_types_compatible_p): Handle
1949 polynomial TYPE_VECTOR_SUBPARTS.
1951 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1952 Alan Hayward <alan.hayward@arm.com>
1953 David Sherwood <david.sherwood@arm.com>
1955 * gcc-interface/misc.c (enumerate_modes): Handle polynomial
1958 2018-01-03 Jakub Jelinek <jakub@redhat.com>
1960 Update copyright years.
1962 * gnat_ugn.texi: Bump @copying's copyright year.
1963 * gnat_rm.texi: Likewise.
1965 Copyright (C) 2018 Free Software Foundation, Inc.
1967 Copying and distribution of this file, with or without modification,
1968 are permitted in any medium without royalty provided the copyright
1969 notice and this notice are preserved.