1 2018-05-28 Justin Squirek <squirek@adacore.com>
3 * sem_ch8.adb (Find_Expanded_Name): Add extra guard to make sure the
4 misresolved package name is not a case of mistaken identity.
6 2018-05-28 Yannick Moy <moy@adacore.com>
8 * sem_res.adb (Resolve_Range): Re-resolve the low bound of a range in
9 GNATprove mode, as the order of resolution (low then high) means that
10 all the information is not available when resolving the low bound the
13 2018-05-28 Eric Botcazou <ebotcazou@adacore.com>
15 * repinfo.adb (List_Array_Info): Start with an explicit blank line and
16 end with the linker section, if any.
17 (List_Entities): Do not output the linker section for record types,
18 array types and variables.
19 (Print_Expr): Factor out common processing for unary operators and
20 special values. Adjust and reorder the various cases.
21 (List_Object_Info): End with the linker section, if any.
22 (List_Record_Info): Likewise.
23 (List_Type_Info): Do not start with a blank line.
25 2018-05-25 Nicolas Roche <roche@adacore.com>
27 * libgnat/s-valrea.adb (Scan_Real): Abort computation once it is sure
28 that the result will be either -infinite or +infinite.
30 2018-05-25 Patrick Bernardi <bernardi@adacore.com>
32 * libgnat/s-parame.ads, libgnat/s-parame__vxworks.ads,
33 libgnat/s-parame__ae653.ads, libgnat/s-parame__hpux.ads (Size_Type):
34 Expand range of type to match the address space of the target.
35 (Task_Storage_Size): Remove unused type.
37 2018-05-25 Ed Schonberg <schonberg@adacore.com>
39 * sem_res.adb (Set_Mixed_Mode_Operand): If the operand is an expression
40 of a fixed point type and the parent is a multiplying operation,
41 resolve the operand with its own type because the context will impose a
42 resulting type on the result of the multiplication by means of
43 approriate conversion.
45 2018-05-25 Hristian Kirtchev <kirtchev@adacore.com>
47 * exp_ch3.adb (Default_Initialize_Object): Ensure that the analysis of
48 the in-place initialization aggregate created for pragmas
49 Initialize_Scalars or Normalize_Scalars is performed with checks
52 2018-05-25 Arnaud Charlet <charlet@adacore.com>
54 * exp_aggr.adb (Convert_To_Positional): Bump default for
55 Max_Others_Replicate to 32. Update comments.
56 * osint.ads (Unknown_Attributes): No longer pretend this is a constant.
57 (No_File_Info_Cache): Initialize separately.
58 * osint.adb (No_File_Info_Cache): Update initializer.
60 2018-05-25 Javier Miranda <miranda@adacore.com>
62 * sem_res.adb (Resolve_Membership_Op): Allow the use of the membership
63 test when the left operand is a class-wide interface and the right
64 operand is not a class-wide type.
65 * exp_ch4.adb (Tagged_Membership): Adding support for interface as the
68 2018-05-25 Ed Schonberg <schonberg@adacore.com>
70 * exp_aggr.adb (Flatten): A quantified expression cannot be duplicated
71 in an others clause to prevent visibility issues with the generated
73 (Component_OK_For_Backend): Return false for a quantified expression.
74 (Check_Static_Component): Ditto.
76 2018-05-25 Hristian Kirtchev <kirtchev@adacore.com>
78 * libgnat/s-secsta.adb (SS_Allocate): Reimplemented.
79 (SS_Allocate_Dynamic): New routine. The allocation logic is now split
80 into three distring cases rather than in one loop which attempts to
81 handle all three cases. This rewrite eliminates an issue where the last
82 frame of the stack cannot be freed, thus causing the memory range of a
83 new frame to approach the overflow point of the memory index type.
84 Since the overflow is logically treated as a
85 too-much-memory-on-the-stack scenario, it causes a bogus Storage_Error.
86 (SS_Allocate_Static): New routine. The routine factorizes the static
87 secondary stack-related code from the former SS_Allocate.
89 2018-05-25 Sergey Rybin <rybin@adacore.com>
91 * doc/gnat_ugn/gnat_and_program_execution.rst: Add description of '-U'
94 2018-05-25 Ed Schonberg <schonberg@adacore.com>
96 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not create
97 Class_Wide_Clone_Body when analyzing a subprogram_body_stub: the clone
98 is created when the proper body of the stub is analyzed.
99 * sem_util.adb (ZBuild_Class_Wide_Clone_Body): If the subprogram body
100 is the proper body of a subunit, the cloned body must be inserted in
101 the declarative list that contains the stub.
103 2018-05-25 Justin Squirek <squirek@adacore.com>
105 * exp_ch6.adb (Expand_Simple_Function_Return): Add guard in check to
106 generate code for 6.5(8-10) so that we don't get an assertion error
107 when dealing with an incomplete return type.
109 2018-05-25 Arnaud Charlet <charlet@adacore.com>
111 * pprint.adb (Expression_Name): Strip too long expressions to avoid
112 carrying very large strings.
114 2018-05-25 Patrick Bernardi <bernardi@adacore.com>
116 * switch-b.adb (Scan_Binder_Switches): binder switch -Q accepts Natural
119 2018-05-25 Doug Rupp <rupp@adacore.com>
121 * tracebak.c (aarch64-linux): Implement.
123 2018-05-25 Justin Squirek <squirek@adacore.com>
125 * sem_ch8.adb: Minor reformatting.
127 2018-05-25 Piotr Trojanek <trojanek@adacore.com>
129 * sem_util.adb (Iterate_Call_Parameters): Fix code convention and
132 2018-05-25 Hristian Kirtchev <kirtchev@adacore.com>
134 * einfo.adb, einfo.ads, exp_ch3.adb, exp_ch8.adb, exp_unst.adb,
135 pprint.adb, sem_ch12.adb, sem_ch3.adb, sem_prag.adb, sem_util.adb:
138 2018-05-25 Ed Schonberg <schonberg@adacore.com>
140 * sem_ch12.adb (Instance_Exists): New function, subsidiary of
141 Validate_Derived_Type_Instance, to verify that all interfaces
142 implemented by the formal type are also implemented by the actual. The
143 verification is complicated when an interface of the formal is declared
144 in a generic unit and the actual is declared in an instance of it.
145 There is currently no mechanism to relate an interface declared within
146 a generic to the corresponding interface in an instance, so we must
147 traverse the list of interfaces of the actual, looking for a name
148 match, and verifying that that interface is declared in an instance.
150 2018-05-25 Piotr Trojanek <trojanek@adacore.com>
152 * sem_util.adb (Iterate_Call_Parameters): Rewrite with extra
153 assertions; replace function versions of Next_Formal/Next_Actual with
154 their procedural versions (which are more concise).
156 2018-05-25 Doug Rupp <rupp@adacore.com>
158 * libgnarl/s-osinte__aix.ads, libgnarl/s-osinte__android.ads,
159 libgnarl/s-osinte__darwin.ads, libgnarl/s-osinte__freebsd.ads,
160 libgnarl/s-osinte__hpux.ads, libgnarl/s-osinte__kfreebsd-gnu.ads,
161 libgnarl/s-osinte__linux.ads, libgnarl/s-osinte__lynxos178e.ads,
162 libgnarl/s-osinte__qnx.ads, libgnarl/s-osinte__rtems.ads
163 (Relative_Timed_Wait): Remove.
164 * libgnarl/s-tpopmo.adb (Timed_Sleep, Timed_Delay): Rewrite to allow
165 for incremental looping. Remove references to Rel_Time and
167 * libgnat/s-osprim__posix.adb, libgnat/s-osprim__posix2008.adb
168 (Timed_Delay): Make separate.
169 * libgnat/s-optide.adb: New separate procedure.
170 * libgnat/s-osprim.ads (Max_System_Delay): New constant.
171 * libgnat/s-osprim__lynxos.ads (Max_Sensible_Delay): Set to 6 months.
172 (Max_System_Delay): New constant.
174 2018-05-25 Ed Schonberg <schonberg@adacore.com>
176 * sem_ch12.adb (Validate_Derived_Type_Instance): Verify that the actual
177 for a formal derived type implements all the interfaces declared for
180 2018-05-25 Yannick Moy <moy@adacore.com>
182 * sem_prag.adb (Check_Applicable_Policy): Deal specially with CodePeer
183 and GNATprove modes when applicable policy is Ignore.
185 2018-05-25 Eric Botcazou <ebotcazou@adacore.com>
187 * freeze.adb (Freeze_Enumeration_Type): Do not give integer size to a
188 boolean type with convention C.
189 * libgnat/i-cexten.ads (bool): Change to boolean with convention C.
190 * gcc-interface/decl.c (gnat_to_gnu_entity): Add new local variable
191 FOREIGN and use it throughout the function.
192 <E_Enumeration_Type>: Set precision 1 on boolean types with foreign
194 <E_Enumeration_Subtype>: Likewise for subtypes.
195 <E_Record_Type>: Force the size of a storage unit on empty classes.
196 * gcc-interface/utils.c (make_type_from_size) <BOOLEAN_TYPE>: Skip
197 boolean types with precision 1 if the size is the expected one.
199 2018-05-25 Arnaud Charlet <charlet@adacore.com>
201 * pprint.adb (Expression_Name): Do not print non ASCII characters.
203 2018-05-25 Bob Duff <duff@adacore.com>
205 * libgnat/a-strunb__shared.ads, libgnat/a-stwiun__shared.ads,
206 libgnat/a-stzunb__shared.ads: (Initialize, Adjust): Add pragma Inline.
208 2018-05-25 Bob Duff <duff@adacore.com>
210 * sem_util.ads: Minor comment fix.
212 2018-05-25 Ed Schonberg <schonberg@adacore.com>
214 * exp_unst.adb (Visit_Node): Restrict check for uplevel references in
215 prefixes of array attributes, to prefixes that are entity names whose
217 (Note_Uplevel_Bound): Verify that the bound is declared in an enclosing
218 subprogram, as itype created for loops in pre/postcondition may appear
219 in loops at the library level.
221 2018-05-25 Ed Schonberg <schonberg@adacore.com>
223 * sem_ch13.adb (Build_Predicate_Functions): The predicate function
224 declaration is inserted into the tree and analyzed at that point, so
225 should not be reinserted when the body is constructed. Inside a
226 generic, ensure that the body is not inserted twice in the tree.
228 2018-05-25 Yannick Moy <moy@adacore.com>
230 * sem_prag.adb (Check_Grouping): Modify test to ignore statements and
231 declarations not coming from source.
233 2018-05-25 Fedor Rybin <frybin@adacore.com>
235 * doc/gnat_ugn/gnat_utility_programs.rst: Document new switch
236 --copy-environment for gnattest.
238 2018-05-24 Piotr Trojanek <trojanek@adacore.com>
240 * sem_elab.adb (Non_Private_View): Simplify by removing a local Result
242 * sem_prag.adb (Get_Base_Subprogram): Same as above.
244 2018-05-24 Eric Botcazou <ebotcazou@adacore.com>
246 * fe.h (Set_Normalized_First_Bit): Declare.
247 (Set_Normalized_Position): Likewise.
248 * repinfo.adb (List_Record_Layout): Do not use irregular output for a
249 variable position. Fix minor spacing issue.
250 * gcc-interface/decl.c (annotate_rep): If a field has a variable
251 offset, compute the normalized position and annotate it in addition to
254 2018-05-24 Eric Botcazou <ebotcazou@adacore.com>
256 * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu):
257 Constify and rename variables. Fix formatting.
258 (gnat_to_gnu) <N_Exception_Handler>: Minor tweak.
259 <N_Raise_Statement>: Likewise.
261 2018-05-24 Javier Miranda <miranda@adacore.com>
263 * exp_ch8.adb (Build_Body_For_Renaming): Adding support to build the
264 body of a variant record equality renaming.
265 (Expand_N_Subprogram_Renaming_Declaration): Adapt the code to the new
266 implementation of Build_Body_For_Renaming.
267 * exp_ch3.ads (Build_Variant_Record_Equality): New library level
268 function that factorizes the functionality needed by
269 Build_Body_For_Renaming and Expand_Freeze_Record_Type to build the body
270 of a variant record equality subprogram.
271 * exp_ch3.adb (Build_Variant_Record_Equality): New subprogram.
272 (Build_Variant_Record_Equality): New local procedure of
273 Expand_Freeze_Record_Type containing all the code specific for freezing
274 the record type that cannot be place in the new library level function.
276 2018-05-24 Ed Schonberg <schonberg@adacore.com>
278 * einfo.ads, einfo.adb (Is_Activation_Record): New flag on
279 in_parameters, used when unesting subprograms for LLVM, to indicate
280 that a generated parameter carries the activation record from the
281 enclosing subprogram.
282 * exp_unst.adb (Check_Static_Type): Handle array attributes of types
283 whose bounds may contain up-level references that need to be added to
284 an activation recoord.
285 (Add_Extra_Formal): Set Is_Activation_Record on new formal.
287 2018-05-24 Yannick Moy <moy@adacore.com>
289 * pprint.adb (Expression_Image): Improve the printing of expressions,
290 by taking more cases into account, in particular qualified expressions
291 and aggregates. Also count more the number of parentheses to close
292 after the expression.
294 2018-05-24 Javier Miranda <miranda@adacore.com>
296 * sem_ch3.adb (Is_Visible_Component): For untagged types add missing
297 check for renamed discriminants.
298 * sem_ch4.adb (Analyze_Overloaded_Selected_Component,
299 Analyze_Selected_Component, Check_Misspelled_Selector): For calls to
300 Is_Visible_Component pass the associated selector node to allow
301 checking renamed discriminants on untagged types.
303 2018-05-24 Ed Schonberg <schonberg@adacore.com>
305 * sem_ch8.adb (Analyze_Use_Type): Do not assign the Prev_Use_Clause
306 link to a use_type clause if this would cause an infinite loop in the
307 machinery that detects redundant use clauses. This may happen when the
308 redundant clauses appear in the context of a child unit and the context
311 2018-05-24 Piotr Trojanek <trojanek@adacore.com>
313 * sinfo.ads: Fix grammar in comment.
315 2018-05-24 Justin Squirek <squirek@adacore.com>
317 * einfo.ads, einfo.adb (Append_Entity): Modified to use Link_Entities
318 and manage doubly-linked entity chain.
319 (Nested_Scenarios): Removed entity field used for optimization during
320 elaboration to make room for the new field Prev_Entity.
321 (Link_Entities): Added to replace redundant calls to Set_Next_Entity
322 and Set_Prev_Entity as well as centralize changes to the entity chain.
323 (Predicated_Parent): Modified to use Node38.
324 (Prev_Entity): Added to fetch new node field Prev_Entity in all entity
326 (Remove_Entity): Moved from sem_util.
327 (Set_Nested_Scenarios): Deleted.
328 (Set_Predicated_Parent): Modified to use Node38.
329 (Set_Prev_Entity): Added to set Prev_Entity field.
330 (Set_Validated_Object): Modified to use Node38.
331 (Unlink_Next_Entity): Added to process Prev_Entity when an unlinking
333 (Validated_Object): Modified to use Node38.
334 (Write_Field36_Name): Remove Nested_Scenarios, Validated_Object, and
335 predicated parent cases.
336 (Write_Field38_Name): Add predicated parent and Validated_Object cases.
337 * sem_ch3.adb (Process_Subtype): Add guard to protect against
338 inappropriate marking of Predicated_Parent to non-itype subtypes.
339 (Make_Class_Wide_Type): Preserve Prev_Entity field and set in new type.
340 (Copy_And_Swap): Add setting of Prev_Entity.
341 (Build_derived_Record_Type): Replace Set_Next_Entity w/ Link_Entities.
342 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Replace Set_Next_Entity
344 (New_Overloaded_Entity): Remove block created to search for previous
345 entities in the entity chain with relevant calls to Prev_Entity as well
346 as replace duplicated code from Remove_Entity_And_Homonym with a call
348 * sem_ch7.adb (Exchange_Declarations): Replace Set_Next_Entity w/
350 * sem_elab.adb (Find_And_Process_Nested_Scenarios): Remove global and
351 initial subprogram declarations related to Nested_Scenarios.
352 (Process_Nested_Scenarios): Deleted.
353 (Save_Scenario): Deleted.
354 (Traverse_Body): Remove optimization for Nested_Scenarios so as to free
355 node space in the entity tree.
356 * sem_util.adb, sem_util.ads (Remove_Entity): Moved to einfo.
357 (Remove_Entity_And_Homonym): Added to separate functionality of
358 Remove_Entity from the homonym chain directly.
359 * exp_attr.adb (Expand_N_Attribute_Reference): Replace Set_Next_Entity
360 w/ Link_Entities and Unlink_Next_Entity.
361 * exp_ch3.adb (Expand_N_Object_Declaration): Replace Set_Next_Entity w/
363 * exp_ch6.adb (Replace_Renaming_Declaration_Id): Replace
364 Set_Next_Entity w/ Link_Entities.
365 * exp_disp.adb (Expand_Dispatching_Call): Replace Set_Next_Entity w/
366 Link_Entities and Unlink_Next_Entity.
367 * exp_spark.adb (Expand_SPARK_N_Object_Renaming_Declaration): Replace
368 call to Remove_Entity with its new incarnation.
369 * exp_util.adb (New_Class_Wide_Subtype): Add setting of Prev_Entity.
370 * freeze.adb (Freeze_Record_Type): Replace Set_Next_Entity w/
373 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
375 * sem_ch10.adb (Expand_Limited_With_Clause): Update the call to
376 Install_Limited_Withed_Unit.
377 (Expand_With_Clause): Update the call to Install_Withed_Unit.
378 (Implicit_With_On_Parent): Update the call to Install_Withed_Unit.
379 (Install_Context_Clauses): Update the call to Install_Withed_Unit.
380 (Install_Limited_Context_Clauses): Update the calls to
381 Install_Limited_Withed_Unit.
382 (Install_Limited_Withed_Unit): Renamed to better illustrate its
384 (Install_Private_With_Clauses): Update the calls to Install_Withed_Unit
385 and Install_Limited_Withed_Unit.
386 (Install_With_Clause): Uninstall a limited with clause if a [private]
387 with clause is given for the same package.
388 (Install_Withed_Unit): Renamed to better illustrate its purpose.
389 (Remove_Limited_With_Unit): New routine.
391 2018-05-24 Eric Botcazou <ebotcazou@adacore.com>
393 * raise-gcc.c (__gnat_SEH_error_handler): Remove prototype.
394 (__gnat_personality_seh0): Adjust and beef up comments, and
395 fix formatting throughout.
396 (__gnat_adjust_context): Deal minimally with version 2.
397 * seh_init.c (__gnat_map_SEH): Fix formatting.
398 (_gnat_SEH_error_handler): Adjust comments.
399 (__gnat_install_SEH_handler): Fix formatting.
401 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
403 * exp_ch7.adb, sem_ch3.adb, sem_res.adb: Minor reformatting.
405 2018-05-24 Ed Schonberg <schonberg@adacore.com>
407 * exp_aggr.adb (Flatten): Add a warning on an others clause in an array
408 aggregate with static bounds when named associations cover all index
409 positions and the others clause is redundant.
411 2018-05-24 Raphael Amiard <amiard@adacore.com>
413 * libgnat/a-cohama.ads: Add documentation.
415 2018-05-24 Raphael Amiard <amiard@adacore.com>
417 * libgnat/a-convec.ads: Add documentation.
419 2018-05-24 Justin Squirek <squirek@adacore.com>
421 * exp_ch3.adb (Expand_N_Object_Declaration): Ignore raising an error in
422 expansion for limited tagged types when the node to be expanded is a
423 raise expression due to it not representing a valid object.
424 * exp_ch5.adb (Expand_N_Assignment_Statement): Add exception to error
425 message regarding assignments to limited types to ignore genereated
428 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
430 * exp_util.adb (New_Class_Wide_Subtype): Capture and restore relevant
431 Ghost-related attributes of the class-wide subtype because the copy
434 2018-05-24 Justin Squirek <squirek@adacore.com>
436 * sem_res.adb (Resolve_Entity_Name): Add guard to protect against
437 marking use clauses as effective when the reference appears within
440 2018-05-24 Cyrille Comar <comar@adacore.com>
442 * doc/gnat_rm/the_gnat_library.rst: Fix typos.
443 * gnat_rm.texi: Regenerate.
445 2018-05-24 Bob Duff <duff@adacore.com>
447 * exp_ch7.adb (Expand_Cleanup_Actions): Create a mark unconditionally
448 for build-in-place functions with a caller-unknown-size result.
449 (Create_Finalizer): For build-in-place functions with a
450 caller-unknown-size result, check at run time whether we need to
451 release the secondary stack.
453 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
455 * sem_prag.adb (Analyze_Pragma): Use the full view of an internally
456 generated incomplete type.
458 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
460 * expander.adb (Expand): Update the save and restore of the Ghost
462 * exp_ch3.adb (Freeze_Type): Likewise.
463 * exp_disp.adb (Make_DT): Likewise.
464 * exp_util.adb (Build_DIC_Procedure_Body): Likewise.
465 (Build_DIC_Procedure_Declaration): Likewise.
466 (Build_Invariant_Procedure_Body): Likewise.
467 (Build_Invariant_Procedure_Declaration): Likewise.
468 (Make_Predicate_Call): Likewise.
469 * freeze.adb (Add_To_Result): Insert the freeze action of a living
470 entity prior to the start of the enclosing ignored Ghost region.
471 (Freeze_Entity): Update the save and restore of the Ghost region.
472 * ghost.adb (Install_Ghost_Mode): Reimplemented.
473 (Install_Ghost_Region): New routine.
474 (Mark_And_Set_Ghost_Assignment): Install a region rather than a mode.
475 (Mark_And_Set_Ghost_Body): Likewise.
476 (Mark_And_Set_Ghost_Completion): Likewise.
477 (Mark_And_Set_Ghost_Declaration): Likewise.
478 (Mark_And_Set_Ghost_Instantiation): Likewise.
479 (Mark_And_Set_Ghost_Procedure_Call): Likewise.
480 (Name_To_Ghost_Mode): New routine.
481 (Restore_Ghost_Region): New routine.
482 * ghost.ads (Install_Ghost_Region): New routine.
483 (Restore_Ghost_Region): New routine.
484 * opt.ads: Add new global variable Ignored_Ghost_Region.
485 * rtsfind.adb (Load_RTU): Update the save and restore of the Ghost
486 region. Install a clean region.
487 * sem.adb (Analyze): Likewise.
488 (Do_Analyze): Likewise.
489 * sem_ch3.adb (Analyze_Object_Declaration): Likewise
490 (Derive_Progenitor_Subprograms): Use local variable Iface_Alias to
491 capture the ultimate alias of the current primitive.
492 (Process_Full_View): Update the save and restore of the Ghost region.
493 Do not inherit DIC and invariant procedures.
494 * sem_ch5.adb (Analyze_Assignment): Update the save and restore of the
496 * sem_ch6.adb (Analyze_Procedure_Call): Likewise.
497 (Analyze_Subprogram_Body_Helper): Likewise.
498 * sem_ch7.adb (Analyze_Package_Body_Helper): Likewise.
499 * sem_ch12.adb (Analyze_Package_Instantiation): Likewise.
500 (Analyze_Subprogram_Instantiation): Likewise.
501 (Instantiate_Package_Body): Likewise.
502 (Instantiate_Subprogram_Body): Likewise.
503 * sem_ch13.adb (Build_Predicate_Functions): Likewise.
504 (Build_Predicate_Function_Declaration): Likewise.
506 (Add_Dispatching_Operation): Do not consider DIC and invariant
508 (Check_Dispatching_Operation): Use Add_Dispatching_Operation to collect
509 a dispatching subprogram.
510 (Check_Operation_From_Private_View): Likewise.
511 (Override_Dispatching_Operation): Likewise.
512 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Update the save
513 and restore of the Ghost region.
514 (Analyze_Initial_Condition_In_Decl_Part): Likewise.
515 (Analyze_Pragma): Update the save and restore of the Ghost region.
516 (Analyze_Pre_Post_Condition_In_Decl_Part): Likewise.
517 * sem_util.adb (Is_Suitable_Primitive): New routine.
518 * sem_util.ads (Is_Suitable_Primitive): New routine.
519 * sinfo.ads: Update the section of Ghost regions.
521 2018-05-24 Piotr Trojanek <trojanek@adacore.com>
523 * doc/gnat_rm/implementation_defined_pragmas.rst (Contract_Cases):
524 Change "condition" to "case guard" after renaming in the contract
526 * gnat_rm.texi: Regenerate.
528 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
530 * exp_util.adb (Expand_Static_Predicates_In_Choices): Indicate that the
531 construct with discrete choices no longer contains a subtype with
532 predicates since the expansion already handled this case.
534 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
536 * freeze.adb (Wrap_Imported_Subprogram): Generate an unchecked
537 conversion to the return type to avoid a side effect where an imported
538 relocated function generates a new anonymous access type, whose
539 accessibility level does not agree with with that of the wrapper.
541 2018-05-24 Javier Miranda <miranda@adacore.com>
543 * sem_util.adb (Abstract_Interface_List): Add missing support for
544 private types whose full view is a synchronized type.
545 * sem_ch3.adb (Build_Derived_Private_Type): Skip building the full
546 derivation of a private type parent type is a task type with
547 discriminants as gigi does not use such type directly.
549 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
551 * sem_elab.adb (Build_Variable_Reference_Marker): Do not create a
552 variable marker when the reference appears in the formal part of a
553 compilation unit instance because there is no place to insert it.
554 (In_Compilation_Instance_Formal_Part): New routine.
556 2018-05-24 Piotr Trojanek <trojanek@adacore.com>
558 * layout.ads, repinfo.ads: Fix references to renamed Backend_Layout
559 configuration parameter.
561 2018-05-24 Doug Rupp <rupp@adacore.com>
563 * argv-lynxos178-raven-cert.c: New file.
564 * libgnat/system-lynxos178-x86.ads: New file.
566 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
568 * exp_disp.adb, freeze.adb, gnat1drv.adb, sem_ch5.adb, sem_spark.adb:
571 2018-05-23 Pascal Obry <obry@adacore.com>
573 * adaint.c (win32_wait): Properly free the handle/pid lists when
574 WaitForMultipleObjects fails (return WAIT_FAILED).
576 2018-05-23 Pascal Obry <obry@adacore.com>
578 * adaint.c (win32_wait): Add missing parentheses.
580 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
582 * exp_ch3.adb (Check_Large_Modular_Array): Moved to Freeze.
583 (Expand_N_Object_Declaration): Do not check for a large modular array
585 * freeze.adb (Check_Large_Modular_Array): Moved from Exp_Ch3.
586 (Freeze_Object_Declaration): Code cleanup. Check for a large modular
588 * sem_ch3.adb: Minor reformatting.
590 2018-05-23 Ed Schonberg <schonberg@adacore.com>
592 * einfo.ads: New attribute on types: Predicated_Parent, to simplify the
593 retrieval of the applicable predicate function to an itype created for
594 a constrained array component.
595 * einfo.adb: Subprograms for Predicated_Parent.
596 (Predicate_Function): Use new attribute.
597 * exp_util.adb (Make_Predicate_Call): If the predicate function is not
598 available for a subtype, retrieve it from the base type, which may have
599 been frozen after the subtype declaration and not captured by the
601 * sem_aggr.adb (Resolve_Array_Aggregate): An Others association is
602 legal within a generated initiqlization procedure, as may happen with a
603 predicate check on a component, when the predicate function applies to
604 the base type of the component.
605 * sem_ch3.adb (Analyze_Subtype_Declaration): Clean up inheritance of
606 predicates for subtype declarations and for subtype indications in
608 (Process_Subtype): Likewise. Handle properly the case of a private type
609 with unknown discriminants whose full view is an unconstrained array.
610 Use Predicated_Parent to indicate source of predicate function on an
611 itype whose parent is itself an itype.
612 (Complete_Private_Subtype): If the private view has unknown
613 discriminants and the full view is an unconstrained array, set base
614 type of completion to the full view of parent.
615 (Inherit_Predicate_Flags): Prevent double assignment of predicate
617 (Build_Subtype): For a constrained array component, propagate predicate
618 information from original component type declaration.
620 2018-05-23 Boris Yakobowski <yakobowski@adacore.com>
622 * libgnat/a-ngelfu.ads (Arctanh, Arccoth): Fix faulty preconditions.
624 2018-05-23 Arnaud Charlet <charlet@adacore.com>
626 * checks.adb (Minimize_Eliminate_Overflows): Default initialize Lo and
628 * sem_elab.adb: Make "out" parameters instead of "in out" when
631 2018-05-23 Bob Duff <duff@adacore.com>
633 * gnatbind.adb (List_Applicable_Restrictions): Add
634 No_Implementation_Restrictions to the list of restrictions not to list.
635 Remove double negative "not No_Restriction_List". Comment the
636 commentary that is output, so it won't cause errors if used directly in
639 2018-05-23 Ed Schonberg <schonberg@adacore.com>
641 * sem_prag.adb (Inherit_Class_Wide_Pre): Refine legality check on
642 class-wide precondition on a type extension when ancestor does not have
643 a class-wide precondition. Previously the compiler accepted such a
644 precondition when the ancestor had a class-wide postcondition.
646 2018-05-23 Javier Miranda <miranda@adacore.com>
648 * sem_attr.adb (Valid_Scalars): Do not invoke Error_Attr_P to report
649 the warning on occurrences of this attribute whose evaluation is always
650 true (since that subprogram aborts processing the attribute). In
651 addition, replace the node by its boolean result 'True' (required
652 because the backend has no knowledge of this attribute).
654 2018-05-23 Bob Duff <duff@adacore.com>
656 * libgnat/a-convec.adb: (Insert, Insert_Space): Suppress warnings. The
657 code in question is not reachable in the case where Count_Type'Last is
660 2018-05-23 Yannick Moy <moy@adacore.com>
662 * doc/gnat_rm/implementation_defined_pragmas.rst: Clarify meaning of
663 local pragma Warnings Off without On.
664 * gnat_rm.texi: Regenerate.
666 2018-05-23 Olivier Hainque <hainque@adacore.com>
668 * libgnat/g-excact.ads (Is_Foreign_Exception): New predicate.
669 * libgnat/g-excact.adb: Implement.
671 2018-05-23 Ed Schonberg <schonberg@adacore.com>
673 * sem_ch5.adb (Analyze_Iterator_Specification): If a subtype indication
674 is present, verify its legality when the domain of iteration is a
675 GNAT-specific formal container, as is already done for arrays and
676 predefined containers.
678 2018-05-23 Yannick Moy <moy@adacore.com>
680 * sem_util.adb (Enclosing_Declaration): Fix the case of a named number
681 declaration, which was not taken into account.
683 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
685 * debug.adb: Switch -gnatd_s is now used to stop elaboration checks on
686 synchronized suspension.
687 * rtsfind.ads: Add entries for units Ada.Synchronous_Barriers and
688 Ada.Synchronous_Task_Control and routines Suspend_Until_True and
690 * sem_elab.adb: Document switch -gnatd_s.
691 (In_Task_Body): New routine.
692 (Is_Potential_Scenario): Code cleanup. Stop the traversal of a task
693 body when the current construct denotes a synchronous suspension call,
694 and restriction No_Entry_Calls_In_Elaboration_Code or switch -gnatd_s
696 (Is_Synchronous_Suspension_Call): New routine.
697 * switch-c.adb (Scan_Front_End_Switches): Switch -gnatJ now sets switch
700 2018-05-23 Javier Miranda <miranda@adacore.com>
702 * exp_disp.adb (Make_DT): Restrict the initialization of
703 External_Tag and Expanded_Name to an empty string to the case where
704 both pragmas apply (i.e. No_Tagged_Streams and Discard_Names), since
705 restricted runtimes are compiled with pragma Discard_Names.
706 * doc/gnat_rm/implementation_defined_pragmas.rst,
707 doc/gnat_rm/implementation_defined_characteristics.rst: Add
709 * gnat_rm.texi: Regenerate.
711 2018-05-23 Maroua Maalej <maalej@adacore.com>
713 * sem_spark.adb: Fix of some permission rules of pointers in SPARK.
715 2018-05-23 Ed Schonberg <schonberg@adacore.com>
717 * sem_ch5.adb (Preanalyze_Range): The pre-analysis of the domain of
718 iteration of an Ada2012 loop is performed to determine the type of the
719 domain, but full analysis is performed once the loop is rewritten as a
720 while-loop during expansion. The pre-analysis suppresses expansion; it
721 must also suppress the generation of freeze nodes, which may otherwise
722 appear in the wrong scope before rewritting.
724 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
726 * sem_elab.adb: Update the section on suppressing elaboration warnings.
728 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
730 * einfo.adb (Is_Elaboration_Checks_OK_Id): Use predicate
731 Is_Elaboration_Target.
732 (Is_Elaboration_Target): New routine.
733 (Is_Elaboration_Warnings_OK_Id): Use predicate Is_Elaboration_Target.
734 (Set_Is_Elaboration_Checks_OK_Id): Use predicate Is_Elaboration_Target.
735 (Set_Is_Elaboration_Warnings_OK_Id): Use predicate
736 Is_Elaboration_Target.
737 * einfo.ads: Add new synthesized attribute Is_Elaboration_Target along
738 with occurrences in nodes.
739 (Is_Elaboration_Target): New routine.
740 * sem_prag.adb (Analyze_Pragma): Suppress elaboration warnings when an
741 elaboration target is subject to pragma Warnings (Off, ...).
743 2018-05-23 Eric Botcazou <ebotcazou@adacore.com>
745 * repinfo.adb (List_Type_Info): Remove obsolete stuff.
747 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
749 * einfo.adb: Flag304 is now Is_Elaboration_Warnings_OK_Id.
750 (Is_Elaboration_Warnings_OK_Id): New routine.
751 (Set_Is_Elaboration_Warnings_OK_Id): New routine.
752 (Write_Entity_Flags): Output Flag304.
753 * einfo.ads: Add new attribute Is_Elaboration_Warnings_OK_Id along with
754 occurrences in entities.
755 (Is_Elaboration_Warnings_OK_Id): New routine along with pragma Inline.
756 (Set_Is_Elaboration_Warnings_OK_Id): New routine along with pragma
758 * sem_attr.adb (Analyze_Access_Attribute): Capture the state of
759 elaboration warnings.
760 * sem_ch3.adb (Analyze_Object_Declaration): Capture the state of
761 elaboration warnings.
762 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Capture the
763 state of elaboration warnings.
764 (Analyze_Subprogram_Body_Helper): Capture the state of elaboration
766 (Analyze_Subprogram_Declaration): Capture the state of elaboration
768 * sem_ch9.adb (Analyze_Entry_Declaration): Capture the state of
769 elaboration warnings.
770 (Analyze_Single_Task_Declaration): Capture the state of elaboration
772 (Analyze_Task_Type_Declaration): Capture the state of elaboration
774 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Capture the state
775 of elaboration warnings.
776 (Analyze_Generic_Subprogram_Declaration): Capture the state of
777 elaboration warnings.
778 * sem_elab.adb: Add a section on suppressing elaboration warnings.
779 Type Processing_Attributes includes component Suppress_Warnings
780 intended to suppress any elaboration warnings along a path in the
781 graph. Update Initial_State to include a value for this component.
782 Types Target_Attributes and Task_Attriutes include component
783 Elab_Warnings_OK to indicate whether the target or task has elaboration
784 warnings enabled. component Elab_Warnings_OK.
785 (Build_Access_Marker): Propagate attribute
786 Is_Elaboration_Warnings_OK_Node from the attribute to the generated
788 (Extract_Instantiation_Attributes): Set the value for Elab_Warnings_OK.
789 (Extract_Target_Attributes): Set the value for Elab_Warnings_OK.
790 (Extract_Task_Attributes): Set the value for Elab_Warnings_OK.
791 (Process_Conditional_ABE_Access): Suppress futher elaboration warnings
792 when already in this mode or when the attribute or target have warnings
794 (Process_Conditional_ABE_Activation_Impl): Do not emit any diagnostics
795 if warnings are suppressed.
796 (Process_Conditional_ABE_Call): Suppress further elaboration warnings
797 when already in this mode, or the target or call have warnings
799 (Process_Conditional_ABE_Call_Ada): Do not emit any diagnostics if
800 warnings are suppressed.
801 (Process_Conditional_ABE_Call_SPARK): Do not emit any diagnostics if
802 warnings are suppressed.
803 (Process_Conditional_ABE_Instantiation): Suppress further elaboration
804 warnings when already in this mode or when the instantiation has
806 (Process_Conditional_ABE_Instantiation_Ada): Do not emit any
807 diagnostics if warnings are suppressed.
808 (Process_Conditional_ABE_Variable_Assignment_Ada): Use the more
809 specific Is_Elaboration_Warnings_OK_Id rather than Warnings_Off.
810 (Process_Conditional_ABE_Variable_Assignment_SPARK): Use the more
811 specific Is_Elaboration_Warnings_OK_Id rather than Warnings_Off.
812 (Process_Task_Object): Suppress further elaboration warnings when
813 already in this mode, or when the object, activation call, or task type
814 have warnings suppressed. Update the processing state to indicate that
815 the path goes through a task body.
816 * sinfo.adb (Is_Elaboration_Warnings_OK_Node): Accept attribute
818 (Set_Is_Elaboration_Warnings_OK_Node): Accept attribute references.
819 * sinfo.ads: Attribute Is_Elaboration_Warnings_OK_Node now applies to
820 attribute references.
822 2018-05-23 Piotr Trojanek <trojanek@adacore.com>
824 * einfo.ads: Minor reformatting.
826 2018-05-23 Ed Schonberg <schonberg@adacore.com>
828 * sem_ch3.adb (Analyze_Object_Declaration): If expression is an
829 anonymous_access_to_ subprogram formal, apply a conversion to force an
830 accsssibility check that will fail statically, enforcing 3.10.2 (13).
832 2018-05-23 Daniel Mercier <mercier@adacore.com>
834 * gnat1drv.adb: Turn off length expansion in CodePeer mode.
836 2018-05-23 Bob Duff <duff@adacore.com>
838 * freeze.adb: (Check_Address_Clause): Deal with build-in-place
839 aggregates in addition to build-in-place calls.
841 2018-05-23 Bob Duff <duff@adacore.com>
843 * einfo.ads: Minor reformatting.
844 * sem_ch3.adb: Likewise.
845 * sinfo.ads: Likewise.
847 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
849 * exp_ch3.adb (Default_Initialize_Object): Do not optimize scalar array
850 initialization when the component type has predicates.
851 * exp_ch4.adb (Expand_N_Allocator): Do not optimize scalar array
852 allocation when the component type has predicates.
854 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
856 * einfo.adb, exp_disp.adb, sem_ch3.adb, sem_ch6.adb, sem_prag.adb:
859 2018-05-22 Justin Squirek <squirek@adacore.com>
861 * sem_ch6.adb (Analyze_Expression_Function): Propagate flags from the
862 original function spec into the generated function spec due to
863 expansion of expression functions during analysis.
864 (Analyze_Subprogram_Body_Helper): Modify check on formal parameter
865 references from the body to the subprogram spec in the case of
866 expression functions because of inconsistances related to having a
868 * libgnarl/s-osinte__android.ads: Flag parameters as unused.
869 * libgnarl/s-osinte__lynxos178e.ads: Likewise.
870 * libgnarl/s-osinte__qnx.adb: Likewise.
871 * libgnarl/s-osinte__qnx.ads: Likewise.
873 2018-05-22 Doug Rupp <rupp@adacore.com>
875 * init.c (HAVE_ADJUST_CONTEXT_FOR_RAISE): Don't define on VxWorks7 for
878 2018-05-22 Olivier Hainque <hainque@adacore.com>
880 * libgnat/a-except.adb (Exception_Propagation.Propagate_Exception):
881 Expect an Exception_Occurence object, not an Access.
882 (Complete_And_Propagate_Occurrence): Adjust accordingly.
883 (Raise_From_Signal_Handler): Likewise.
884 (Reraise_Occurrence_No_Defer): If we have a Machine_Occurrence
885 available in the provided occurrence object, just re-propagate the
886 latter as a bare "raise;" would do.
887 * libgnat/a-exexpr.adb (Propagate_Exception): Adjust to spec change.
888 * libgnat/a-exstat.adb (String_To_EO): Initialize X.Machine_Occurrence
889 to null, to mark that the occurrence we're crafting from the stream
890 contents is not being propagated (yet).
892 2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
894 * exp_aggr.adb (Initialize_Ctrl_Record_Component): Insert the generated
895 code for a transient component in line with the rest of the
896 initialization code, rather than before the aggregate. This ensures
897 that the component has proper visibility of the discriminants.
899 2018-05-22 Jerome Lambourg <lambourg@adacore.com>
901 * adaint.c: Reorganize QNX-specific macros, use syspage to retreive the
904 2018-05-22 Jerome Lambourg <lambourg@adacore.com>
906 * sigtramp-qnx.c: Properly restore link register in signal trampoline.
908 2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
910 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Strip away any
911 conversions before extracting the value of the expression.
912 * exp_ch3.adb (Default_Initialize_Object): Optimize the default
913 initialization of an array of scalars.
914 (Get_Simple_Init_Val): Add processing for array types. Remove the
915 processing of strings because this case is already handled by the array
917 (Needs_Simple_Initialization): Moved to Sem_Util.
918 (Simple_Init_Array_Type): New routine.
919 (Simple_Init_Initialize_Scalars_Type): Reimplemented to use the new
920 facilities from Sem_Util.
921 (Simple_Initialization_OK): New routine.
922 * exp_ch3.ads (Needs_Simple_Initialization): Moved to Sem_Util.
923 * exp_ch4.adb (Expand_N_Allocator): Optimize the default allocation of
925 * sem_prag.adb (Analyze_Float_Value): New routine.
926 (Analyze_Integer_Value): New routine.
927 (Analyze_Pragma): Reimplement the analysis of pragma Initialize_Scalars
928 to handled the extended form of the pragma.
929 (Analyze_Type_Value_Pair): New routine.
930 * sem_util.adb: Add invalid value-related data structures.
931 (Examine_Array_Bounds): New routine.
932 (Has_Static_Array_Bounds): Reimplemented.
933 (Has_Static_Non_Empty_Array_Bounds): New routine.
934 (Invalid_Scalar_Value): New routine.
935 (Needs_Simple_Initialization): Moved from Exp_Ch3.
936 (Set_Invalid_Scalar_Value): New routines.
937 * sem_util.ads (Has_Static_Non_Empty_Array_Bounds): New routine.
938 (Invalid_Scalar_Value): New routine.
939 (Needs_Simple_Initialization): Moved from Exp_Ch3.
940 (Set_Invalid_Scalar_Value): New routines.
941 * snames.ads-tmpl: Add names for the salar type families used by pragma
944 2018-05-22 Javier Miranda <miranda@adacore.com>
946 * exp_disp.adb (Make_DT): Initialize the External_Tag with an empty
947 string when pragma No_Tagged_Streams is applicable to the tagged type,
948 and initialize the Expanded_Name with an empty string when pragma
949 Discard_Names is applicable to the tagged type.
951 2018-05-22 Ed Schonberg <schonberg@adacore.com>
953 * sem_ch6.adb (Check_Conformance): Add RM reference for rule that a
954 formal subprogram is never subtype conformqnt, and thus cannot be the
955 prefix of 'Access. Reject as well the attribute when applied to a
956 renaming of a formal subprogram.
958 2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
960 * exp_ch3.adb (Build_Array_Init_Proc): Update the call to
961 Needs_Simple_Initialization.
962 (Build_Init_Statements): Update the call to Get_Simple_Init_Val.
963 (Check_Subtype_Bounds): Renamed to Extract_Subtype_Bounds. Update the
964 profile and comment on usage.
965 (Default_Initialize_Object): Do not use New_Copy_Tree to set the proper
966 Sloc of a value obtained from aspect Default_Value because this could
967 potentially replicate large trees. The proper Sloc is now set in
969 (Get_Simple_Init_Val): Reorganized by breaking the various cases into
970 separate routines. Eliminate the use of global variables.
971 (Init_Component): Update the call to Get_Simple_Init_Val.
972 (Needs_Simple_Initialization): Update the parameter profile and all
974 (Simple_Init_Defaulted_Type): Copy the value of aspect Default_Value
975 and set the proper Sloc.
976 * exp_ch3.ads (Get_Simple_Init_Val): Update the parameter profile and
978 (Needs_Simple_Initialization): Update the parameter profile.
980 2018-05-22 Patrick Bernardi <bernardi@adacore.com>
982 * sem_ch3.adb (Build_Discriminant_Constraints): Raise an error if the
983 user tries to use a subtype indication as a discriminant constraint.
985 2018-05-22 Ed Schonberg <schonberg@adacore.com>
987 * exp_ch4.ads, exp_ch4.adb, exp_util.adb, expander.adb: Remove mention
988 of N_Reduction_Expression and N_Reduction_Expression_Parameter.
989 * par-ch4.adb: Remove parsing routines for reduction expressions.
990 * sem.adb, sinfo.ads, sinfo.adb, sem_ch4.ads, sem_ch4.adb, sem_res.adb,
991 sem_spark.adb, sprint.adb: Remove analysis routines for reduction
994 2018-05-22 Arnaud Charlet <charlet@adacore.com>
996 * sem_ch8.adb (Check_Frozen_Renaming): Do not emit error in
997 Relaxed_RM_Semantics mode.
999 2018-05-22 Arnaud Charlet <charlet@adacore.com>
1001 * comperr.adb (Delete_SCIL_Files): Take into account
1002 N_Generic_Package_Renaming_Declaration.
1004 2018-05-22 Ed Schonberg <schonberg@adacore.com>
1006 * sem_ch3.adb (Search_Derivation_Levels): Whenever a parent type is
1007 private, use the full view if available, because it may include renamed
1008 discriminants whose values are stored in the corresponding
1011 2018-05-22 Ed Schonberg <schonberg@adacore.com>
1013 * einfo.ads, einfo.adb: New attribute Hidden_In_Formal_Instance,
1014 defined on packages that are actuals for formal packages, in order to
1015 set/reset the visibility of the formals of a formal package with given
1016 actuals, when there are subsequent uses of those formals in the
1017 enclosing generic, as required by RN 12.7 (10).
1018 * atree.ads, atree.adb: Add operations for Elist30.
1019 * atree.h: Add Elist30.
1020 * sem_ch12.adb (Analyze_Formal_Package_Instantiation): Collect formals
1021 that are not defaulted and are thus not visible within the current
1023 (Check_Formal_Packages): Reset visibility of formals of a formal
1024 package that are not defaulted, on exit from current instance.
1026 2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1028 * sem_prag.adb (Analyze_Input_Output): Emit an error when a non-null,
1029 non-'Result output appears in the output list of a function.
1031 2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1033 * exp_attr.adb (Build_Array_VS_Func): Reimplemented.
1034 (Build_Record_VS_Func): Reimplemented.
1035 (Expand_N_Attribute): Reimplement the handling of attribute
1037 * sem_attr.adb (Analyze_Attribute): Reimplement the handling of
1038 attribute 'Valid_Scalars.
1039 * sem_util.adb (Scalar_Part_Present): Reimplemented.
1040 (Validated_View): New routine.
1041 * sem_util.ads (Scalar_Part_Present): Update the parameter profile and
1043 (Validated_View): New routine.
1044 * doc/gnat_rm/implementation_defined_attributes.rst: Update the
1045 documentation of attribute 'Valid_Scalars.
1046 * gnat_rm.texi: Regenerate.
1048 2018-05-22 Bob Duff <duff@adacore.com>
1050 * binde.adb: (Choose): Ignore a pragma Elaborate_Body that appears in
1051 the spec of a SAL_Interface package.
1053 2018-05-22 Ed Schonberg <schonberg@adacore.com>
1055 * freeze.adb (Freeze_Entity): When analyzing delayed aspects of an
1056 entity E within a generic unit, indicate that there are no remaining
1057 delayed aspects after invoking Analyze_Aspects_At_Freeze_Point. The
1058 entity E is not frozen yet but the aspects should not be reanalyzed at
1059 the freeze point, which may be outside of the generic and may not have
1060 the proper visibility.
1062 2018-05-22 Bob Duff <duff@adacore.com>
1064 * doc/gnat_ugn/gnat_utility_programs.rst: Add documentation for
1065 the new --split-line-before-record, --indent-named-statements and
1066 --no-align-modes gnatpp switches.
1068 2018-05-22 Ed Schonberg <schonberg@adacore.com>
1070 * sem_prag.adb (Process_Compile_Time_Warning_Or_Error): Handle properly
1071 a second argument that is a constant of a given string value.
1073 2018-05-22 Doug Rupp <rupp@adacore.com>
1075 * sigtramp-vxworks-target.inc: Align stack to 128bits on AArch64.
1077 2018-05-22 Jerome Lambourg <lambourg@adacore.com>
1079 * sigtramp-qnx.c: Fix stack alignment issue in the signal trampoline.
1081 2018-05-22 Ed Schonberg <schonberg@adacore.com>
1083 * freeze.adb (Freeze_Fixed_Point_Type): If the first subtype has
1084 delayed aspects, analyze them now, os that the representation of the
1085 type (size, bounds) can be computed and validated.
1087 2018-05-22 Olivier Hainque <hainque@adacore.com>
1089 * libgnat/s-dwalin.adb (Enable_Cache): Skip symbols outside of the
1090 executable code section boundaries.
1092 2018-05-22 Javier Miranda <miranda@adacore.com>
1094 * locales.c: New implementation for the Ada.Locales package.
1095 * libgnat/a-locale.ads: Remove comment indicating that this is not
1097 * doc/gnat_rm/standard_library_routines.rst: Remove comment indicating
1098 that this is not implemented.
1099 * gnat_rm.texi: Regenerate.
1101 2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1103 * exp_ch5.adb, freeze.adb, pprint.adb, sem_ch4.adb, sem_res.adb: Minor
1106 2018-05-22 Justin Squirek <squirek@adacore.com>
1108 * sem_ch12.adb (In_Same_Declarative_Part): Moved to sem_util.
1109 (Freeze_Subprogram_Body, Install_Body): Modify calls to
1110 In_Same_Declarative_Part.
1111 * sem_prag.adb (Analyze_Pragma-Pragma_Pure_Function): Add check to
1112 verify pragma declaration is within the same declarative list with
1113 corresponding error message.
1114 * sem_util.adb, sem_util.ads (In_Same_Declarative_Part): Moved from
1115 sem_ch12.adb and generalized to be useful outside the scope of
1118 2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1120 * sem_ch6.adb (Analyze_Subprogram_Declaration): Set the proper
1121 categorization of the unit after processing the aspects in case one of
1122 its aspects is converted into a categorization pragma.
1124 2018-05-21 Ed Schonberg <schonberg@adacore.com>
1126 * freeze.adb (Warn_Overlay): Do not emit a wawrning on an object
1127 declaration with an explicit address clause and a type with default
1128 initialization, if the declaration carries an aspect
1129 Suppress_Initialization.
1131 2018-05-21 Daniel Mercier <mercier@adacore.com>
1133 * pprint.adb: Use mixed case for attribute names.
1135 2018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
1137 * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Rename the call to
1138 Analyze_Aspect_Specifications_On_Body_Or_Stub.
1139 (Analyze_Subprogram_Body_Helper): Rename the calls to
1140 Analyze_Aspect_Specifications_On_Body_Or_Stub.
1141 * sem_ch9.adb (Analyze_Entry_Body): Rename the call to
1142 Analyze_Aspect_Specifications_On_Body_Or_Stub.
1143 * sem_ch10.adb: Add with and use clause for Sem_Ch13.
1144 (Analyze_Package_Body_Stub): Add constant Id. Decorate the package stub
1145 prior to analyzing its aspects.
1146 (Analyze_Protected_Body_Stub): Add constant Id. Decorate the package
1147 stub prior to analyzing its aspects. Save and restore the configuration
1149 (Analyze_Task_Body_Stub): Add constant Id. Decorate the package stub
1150 prior to analyzing its aspects.
1151 * sem_ch13.adb (Analyze_Aspect_Specifications_On_Body_Or_Stub): Renamed
1152 to Analyze_Aspects_On_Subprogram_Body_Or_Stub.
1153 * sem_ch13.ads (Analyze_Aspect_Specifications_On_Body_Or_Stub): Renamed
1154 to Analyze_Aspects_On_Subprogram_Body_Or_Stub.
1155 * sem_prag.adb: Code reformatting.
1156 (Analyze_Refined_Depends_Global_Post): Consider task body stubs.
1158 2018-05-21 Jerome Lambourg <lambourg@adacore.com>
1160 * gcc-interface/Makefile.in: Add g-soliop__qnx.ads to the runtime build
1163 2018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
1165 * exp_cg.adb: Remove with and use clause for Exp_Disp.
1166 * exp_ch9.adb: Remove with and use clause for Exp_Disp.
1167 * exp_disp.adb (Is_Predefined_Dispatching_Operation): Moved to Sem_Util.
1168 (Is_Predefined_Interface_Primitive): Moved to Sem_Util.
1169 (Is_Predefined_Internal_Operation): Moved to Sem_Util.
1170 * exp_disp.ads (Is_Predefined_Dispatching_Operation): Moved to Sem_Util.
1171 (Is_Predefined_Interface_Primitive): Moved to Sem_Util.
1172 (Is_Predefined_Internal_Operation): Moved to Sem_Util.
1173 * exp_dist.adb: Remove with and use clause for Exp_Disp.
1174 * freeze.adb: Remove with and use clause for Exp_Disp.
1175 * sem_cat.adb: Remove with and use clause for Exp_Disp.
1176 * sem_ch6.adb: Remove with and use clause for Exp_Disp.
1177 * sem_ch12.adb: Remove with and use clause for Exp_Disp.
1178 * sem_elab.adb (Check_Overriding_Primitive): Do not process predefined
1180 * sem_util.adb: Remove with and use clause for Exp_Disp.
1181 (Is_Predefined_Dispatching_Operation): Moved from Exp_Disp.
1182 (Is_Predefined_Interface_Primitive): Moved from Exp_Disp.
1183 (Is_Predefined_Internal_Operation): Moved from Exp_Disp.
1184 * sem_util.ads (Is_Predefined_Dispatching_Operation): Moved from
1186 (Is_Predefined_Interface_Primitive): Moved from Exp_Disp.
1187 (Is_Predefined_Internal_Operation): Moved from Exp_Disp.
1189 2018-05-21 Ed Schonberg <schonberg@adacore.com>
1191 * sem_res.adb (Valid_Conversion): Improve error message on an illegal
1192 type conversion whose expression has a limited view of a type.
1194 2018-05-21 Ed Schonberg <schonberg@adacore.com>
1196 * exp_ch5.adb (Build_Formal_Container_Iteration): If source has
1197 explicit name for iterator loop, preserve that name in expanded
1198 construct, for possible use in exit statements.
1200 2018-05-21 Javier Miranda <miranda@adacore.com>
1202 * sem_ch4.adb (Analyze_Membership_Op): Avoid compiler crash when the
1203 spec of a unit has Ada 2012 membership tests with multiple choices and
1204 the unit body is not compiled under Ada 2012 mode.
1206 2018-05-21 Doug Rupp <rupp@adacore.com>
1208 * sigtramp-vxworks-target.inc: Set cfa_reg properly from sigcontext
1210 (CFI_COMMON_REGS): Restore LR jic probed from prologue.
1211 (REGNO_PC_OFFSET): Change to correct value for Aarch64.
1213 2018-05-21 Jose Ruiz <ruiz@adacore.com>
1215 * doc/gnat_ugn/gnat_utility_programs.rst, exp_attr.adb,
1216 libgnarl/s-tassta.adb: Minor typo fixes
1218 2018-05-21 Ed Schonberg <schonberg@adacore.com>
1220 * sem_ch4.adb (Analyze_One_Call): Recognize complex cases where an
1221 indexed call originally in prefix forn is itself the prefix of a
1224 2018-05-21 Piotr Trojanek <trojanek@adacore.com>
1226 * sem_eval.adb (Is_Null_Range): Clarify access to the full view of a
1228 (Not_Null_Range): Same as above.
1230 2018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
1232 * exp_ch3.adb: Minor reformatting.
1233 * exp_ch6.adb: Likewise.
1234 * freeze.adb: Likewise.
1235 * inline.adb: Likewise.
1236 * sem_util.adb: Likewise.
1238 2018-05-21 Yannick Moy <moy@adacore.com>
1240 * inline.adb (Expand_Inlined_Call.Process_Formals): Use a type
1241 conversion instead of an unchecked type conversion when inlining a
1242 return statement, unless type qualification is required (for character
1243 and string literal) or no check can result from the conversion (for
1245 * opt.ads: Update comment.
1247 2018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
1249 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Install the elaboration
1250 model of the compilation unit spec, if any.
1251 * sem_ch7.adb (Analyze_Package_Body_Helper): Install the elaboration
1252 model of the compilation unit spec, if any.
1253 * sem_ch10.adb (Analyze_Subunit): Install the elaboration model of the
1254 parent compilation unit spec, if any.
1255 * sem_elab.adb (Check_Elaboration_Scenarios): Restore the elaboration
1256 model of the main unit.
1257 (Is_Same_Unit): The routine now uses Unit_Entity.
1258 (Is_Subunit): Removed.
1259 (Normalize_Unit): Removed.
1260 (Unit_Entity): New routine.
1261 * sem_prag.adb (Analyze_Pragma): Reimplement the handling of pragma
1262 Elaboration_Checks. The analysis now ensures that the pragma appears at
1263 the configuration level, and on the initial declaration of a unit.
1264 Other placements are either flagged as illegal, or ignored.
1265 (Check_Duplicate_Elaboration_Checks_Pragma): New routine.
1266 (Ignore_Elaboration_Checks_Pragma): New routine.
1267 * sem_util.adb (Install_Elaboration_Model): New routine.
1268 * sem_util.ads (Install_Elaboration_Model): New routine.
1269 * doc/gnat_rm/implementation_defined_pragmas.rst: Update the
1270 documentation of pragma Elaboration_Checks.
1271 * gnat_rm.texi: Regenerate.
1273 2018-05-21 Olivier Hainque <hainque@adacore.com>
1275 * libgnat/s-trasym__dwarf.adb (Executable_Name): Return argv[0] instead
1276 of empty string when argv[0] couldn't be found on PATH.
1277 (Enable_Cache): Raise Program_Error instead of attempting a null
1278 pointer dereference when the Exec_Module initialization failed.
1280 2018-05-21 Piotr Trojanek <trojanek@adacore.com>
1282 * libgnarl/a-reatim.ads (Clock_Time): Remove External aspect.
1283 * libgnarl/a-taside.ads (Tasking_State): Likewise.
1284 * libgnat/a-calend.ads (Clock_Time): Likewise.
1286 2018-05-21 Yannick Moy <moy@adacore.com>
1288 * sem_ch6.adb (Analyze_Procedure_Call): Refine test to recognize prefix
1289 call notation in inlined call in GNATprove mode.
1291 2018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
1293 * einfo.adb (Is_External_State): An abstract state is also external
1294 when it is declared with option "synchronous".
1295 * einfo.ads: Update the documentation of synthesized attribute
1297 * sem_util.adb (Find_Simple_Properties): New routine.
1298 (Is_Enabled_External_Property): New routine.
1299 (State_Has_Enabled_Property): Reimplemented. The two flavors of option
1300 External have precedence over option Synchronous when determining
1301 whether a property is in effect.
1303 2018-05-21 Yannick Moy <moy@adacore.com>
1305 * sem_eval.adb (Static_Length): Take into account case of variable of
1306 subtype string literal.
1308 2018-05-21 Olivier Hainque <hainque@adacore.com>
1310 * libgnat/s-objrea.ads (Get_Memory_Bounds): Rename as Get_Xcode_Bounds.
1311 (Object_Section): Rename Flag_Alloc component as Flag_Xcode.
1312 * libgnat/s-objrea.adb (Get_Xcode_Bounds): Adjust to new subprogram and
1314 (Get_Section, ELF case): Set Flag_Xcode from SHF_EXECINSTR.
1315 * libgnat/s-dwalin.adb (Open): Adjust to the Get_Memory_Bounds name
1318 2018-05-21 Olivier Hainque <hainque@adacore.com>
1320 * libgnat/s-dwalin.ads (Dwarf_Context): Change type of Load_Address to
1321 Address, and type of Low, High to Storage_Offset.
1322 (Low): Rename as Low_Address and convey that the return value is a
1323 runtime reference accounting for a load address.
1324 * libgnat/s-dwalin.adb (Read_Aranges_Entry): Adjust to the
1325 address/offset type changes.
1326 (Aranges_Lookup): Likewise.
1327 (Symbolic_Address): Likewise.
1328 (Symbolic_Traceback): Likewise.
1329 (Dump_Cache): Likewise.
1330 (Is_Inside): Likewise.
1332 (Set_Load_Address): Likewise.
1333 (Low_Address): Likewise, and account for C.Load_Address.
1334 * libgnat/s-trasym__dwarf.adb (Lt): Use Low_Address instead of Low.
1335 (Multi_Module_Symbolic_Traceback): Compare address in traceback
1336 with module Low_Address instead of Low.
1338 2018-05-21 Olivier Hainque <hainque@adacore.com>
1340 * libgnat/s-dwalin.ads (Dwarf_Context): Rename Load_Slide as
1342 * libgnat/s-dwalin.adb (Is_Inside): Adjust accordingly.
1343 (Set_Load_Address): Likewise.
1344 (Symbolic_Traceback): Likewise.
1346 2018-05-21 Olivier Hainque <hainque@adacore.com>
1348 * libgnat/s-trasym__dwarf.adb (Add_Module_To_Cache): Expect a
1349 Load_Address argument and pass it down to Init_Module.
1350 * libgnat/s-tsmona__linux.adb (Build_Cache_For_All_Modules): Pass
1351 lm.l_addr as the Load_Address to Add_Module_To_Cache.
1353 2018-05-21 Piotr Trojanek <trojanek@adacore.com>
1355 * einfo.adb (Has_Discriminants): Stronger assertion.
1356 (Set_Has_Discriminants): Stronger assertion.
1357 * sem_ch13.adb (Push_Scope_And_Install_Discriminants): Adapt to respect
1358 the stronger assertion on Has_Discriminant.
1359 (Uninstall_Discriminants_And_Pop_Scope): Same as above.
1360 * sem_util.adb (New_Copy_Tree): Same as above.
1361 * sem_ch7.adb (Generate_Parent_References): Prevent calls to
1362 Has_Discriminant on non-type entities that might happen when the
1363 compiled code has errors.
1364 * sem_ch3.adb (Derived_Type_Declaration): Only call
1365 Set_Has_Discriminant on type entities.
1367 2018-05-21 Arnaud Charlet <charlet@adacore.com>
1369 * exp_unst.adb (Unnest_Subprogram): Unnest all subprograms relevant for
1372 2018-05-21 Piotr Trojanek <trojanek@adacore.com>
1374 * lib.ads: Fix typo in enumeration in comment.
1376 2018-05-21 Ed Schonberg <schonberg@adacore.com>
1378 * sem_attr.adb (Analyze_Attribute, case Scalar_Storage_Order): The
1379 attribute reference is legal within a generic unit when the prefix is a
1380 formal private type.
1382 2018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
1384 * exp_ch7.adb (Establish_Transient_Scope): Code cleanup. Do not
1385 delegate the secondary stack management when there is no suitable
1386 transient context, and the transient scope was intended to manage the
1387 secondary stack because this causes premature reclamation. Change the
1388 transient scope creation logic by special casing assignment statements
1389 of controlled components for type initialization procedures.
1390 (Find_Node_To_Be_Wrapped): Renamed to Find_Transient_Context. Update
1391 the comment on usage.
1392 (Find_Transient_Context): Change the initinte loop into a while loop.
1393 Iterations schemes and iterator specifications are not valid transient
1394 contexts because they rely on special processing. Assignment statements
1395 are now treated as a normal transient context, special cases are
1396 handled by the caller. Add special processing for pragma Check.
1397 (Is_OK_Construct): Removed. Its functionality has been merged in
1398 routine Find_Transient_Context.
1399 * sem_ch5.adb (Check_Call): Reimplemented. Add code to properly
1400 retrieve the subprogram being invoked. Use a more accurate predicate
1401 (Requires_Transient_Scope) to determine that the function will emply
1402 the secondary stack.
1404 2018-05-21 Piotr Trojanek <trojanek@adacore.com>
1406 * ada_get_targ.adb: Fix subprogram body headers.
1407 * adabkend.adb: Likewise.
1408 * checks.adb: Likewise.
1409 * exp_ch3.adb: Likewise.
1410 * exp_ch5.adb: Likewise.
1411 * exp_ch9.adb: Likewise.
1412 * exp_dist.adb: Likewise.
1413 * exp_tss.adb: Likewise.
1414 * inline.adb: Likewise.
1415 * lib-writ.adb: Likewise.
1416 * lib-xref-spark_specific.adb: Likewise.
1417 * libgnarl/s-osinte__darwin.adb: Likewise.
1418 * libgnarl/s-stusta.adb: Likewise.
1419 * libgnarl/s-taprop__solaris.adb: Likewise.
1420 * libgnarl/s-tposen.adb: Likewise.
1421 * libgnarl/s-vxwext__kernel-smp.adb: Likewise.
1422 * libgnarl/s-vxwext__kernel.adb: Likewise.
1423 * libgnat/a-btgbso.adb: Likewise.
1424 * libgnat/a-cfdlli.adb: Likewise.
1425 * libgnat/a-cfhama.adb: Likewise.
1426 * libgnat/a-cfinve.adb: Likewise.
1427 * libgnat/a-cimutr.adb: Likewise.
1428 * libgnat/a-coboho.adb: Likewise.
1429 * libgnat/a-cofove.adb: Likewise.
1430 * libgnat/a-cofuve.adb: Likewise.
1431 * libgnat/a-comutr.adb: Likewise.
1432 * libgnat/a-exexda.adb: Likewise.
1433 * libgnat/a-tags.adb: Likewise.
1434 * libgnat/a-tideau.adb: Likewise.
1435 * libgnat/a-wtdeau.adb: Likewise.
1436 * libgnat/a-ztdeau.adb: Likewise.
1437 * libgnat/g-alleve.adb: Likewise.
1438 * libgnat/s-excdeb.adb: Likewise.
1439 * libgnat/s-parint.adb: Likewise.
1440 * libgnat/s-shasto.adb: Likewise.
1441 * libgnat/s-traceb__hpux.adb: Likewise.
1442 * prepcomp.adb: Likewise.
1443 * sem_ch4.adb: Likewise.
1444 * sem_ch6.adb: Likewise.
1445 * sem_dist.adb: Likewise.
1446 * sem_prag.adb: Likewise.
1447 * sem_util.adb: Likewise.
1448 * sinfo.adb: Likewise.
1449 * switch.adb: Likewise.
1451 2018-05-04 John Marino <gnugcc@marino.st>
1454 * link.c (BSD platforms): Add missing backslash.
1456 2018-04-27 Eric Botcazou <ebotcazou@adacore.com>
1459 * init.c (__gnat_handle_vms_condition): Add missing parentheses.
1461 2018-04-25 Eric Botcazou <ebotcazou@adacore.com>
1464 * gnat_ugn.texi: Regenerate.
1466 2018-03-23 Eric Botcazou <ebotcazou@adacore.com>
1469 * gnatlink.adb (Gnatlink): Remove handling of -b switch.
1470 * doc/gnat_ugn/building_executable_programs_with_gnat.rst (gnatlink):
1471 Remove documentation of -b switch.
1473 2018-03-23 Eric Botcazou <ebotcazou@adacore.com>
1476 * gnatlink.adb (Process_Args): Drop existing link switches if multiple
1477 switches are passed for --LINK.
1479 2018-03-12 Eric Botcazou <ebotcazou@adacore.com>
1482 * gcc-interface/misc.c (gnat_post_options): Disable string overflow
1485 2018-03-10 Eric Botcazou <ebotcazou@adacore.com>
1487 * gcc-interface/trans.c (node_has_volatile_full_access) <N_Identifier>:
1488 Consider only entities for objects.
1490 2018-03-07 Sebastian Huber <sebastian.huber@embedded-brains.de>
1492 * gcc-interface/Makefile.in (OSCONS_CPP): Remove redundant
1494 (OSCONS_EXTRACT): Add $(GNATLIBCFLAGS_FOR_C).
1496 2018-03-06 Eric Botcazou <ebotcazou@adacore.com>
1498 * gcc-interface/trans.c (convert_with_check): Fix typo in the condition
1499 guarding the overflow check emitted for the upper bound of a floating-
1502 2018-03-06 Eric Botcazou <ebotcazou@adacore.com>
1504 * gcc-interface/utils.c (def_builtin_1): Bail out on error_mark_node.
1506 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
1508 * libgnat/i-cexten.ads (Float_128): New type.
1510 2018-02-02 Eric Botcazou <ebotcazou@adacore.com>
1512 * gcc-interface/decl.c (array_type_has_nonaliased_component): Return
1513 false if the component type is a pointer.
1515 2018-01-11 Gary Dismukes <dismukes@adacore.com>
1517 * exp_ch3.adb (Default_Initialize_Object): Call New_Copy_Tree on the
1518 result of Get_Simple_Init_Value and pass the source location of the
1519 object declaration's object_definition.
1521 2018-01-11 Ed Schonberg <schonberg@adacore.com>
1523 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration): Handle
1524 properly object declarations with initializations that are
1525 build-in-place function calls, when there is an address specification,
1526 either as an aspect specification or an explicit attribute
1527 specification clause, for the initialized object.
1528 * freeze.adb (Check_Address_Clause): Do not remove side-effects from
1529 initial expressions in the case of a build-in-place call.
1531 2018-01-11 Piotr Trojanek <trojanek@adacore.com>
1533 * sem_eval.adb (Is_Null_Range): Retrieve the full view when called on a
1534 private (sub)type; refactor to avoid early return statement.
1535 (Not_Null_Range): Same as above.
1537 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
1539 * freeze.adb (Freeze_Entity): Ensure that a Ghost type is not
1540 concurrent, nor effectively volatile.
1541 * ghost.adb (Check_Ghost_Type): New routine.
1542 * ghost.ads (Check_Ghost_Type): New routine.
1543 * sem_util.adb (Is_Declaration): Reimplemented. The routine can now
1544 consider specific subsets of declarations.
1545 (Is_Declaration_Other_Than_Renaming): Removed. Its functionality is
1546 replicated by Is_Declaration.
1547 * sem_util.ads (Is_Declaration): New parameter profile. Update the
1549 (Is_Declaration_Other_Than_Renaming): Removed.
1551 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
1553 * sem_ch5.adb (Analyze_Assignment): Assignments to variables that act
1554 as Part_Of consituents of single protected types are illegal when they
1555 take place inside a protected function.
1556 (Diagnose_Non_Variable_Lhs): Use Within_Function to check for an
1558 (Is_Protected_Part_Of_Constituent): New routine.
1559 (Within_Function): New routine.
1561 2018-01-11 Arnaud Charlet <charlet@adacore.com>
1563 Bump copyright notices to 2018.
1565 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
1567 * binde.adb, par-ch6.adb, par-ch9.adb, sem_ch12.adb, sem_ch13.adb:
1570 2018-01-11 Justin Squirek <squirek@adacore.com>
1572 * par-ch6.adb (Scan_Body_Or_Expression_Function): Add additional check
1573 to make sure a given expression function is properly parenthesized.
1575 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
1577 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Check the
1578 categorization of a subprogram body which does not complete a previous
1581 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
1583 * sem_ch10.adb (Check_Private_Child_Unit): Ensure that the enclosing
1584 scope of package Ada is Standard.
1586 2018-01-11 Ed Schonberg <schonberg@adacore.com>
1588 * sem_ch13.adb (Replace_Type_Ref): Handle properly reference to a
1589 subcomponent of the current entity when building the body for a dynamic
1590 predicate function for a record with composite subcomponents.
1592 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
1594 * exp_aggr.adb (Convert_Aggr_In_Object_Decl): Update the call to
1595 Establish_Transient_Scope.
1596 (Convert_To_Assignments): Update the call to Establish_Transient_Scope.
1597 (Expand_Array_Aggregate): Update the call to Establish_Transient_Scope.
1598 * exp_ch6.adb (Expand_Call_Helper): Update the call to
1599 Establish_Transient_Scope.
1600 (Make_Build_In_Place_Call_In_Object_Declaration): Update the call to
1601 Establish_Transient_Scope.
1602 * exp_ch7.adb (Establish_Transient_Scope): Restructured. Delegate the
1603 management of the secondary stack to an enclosing scope if there is no
1604 suitable construct to wrap, and the transient scope was intended to
1605 manage the secondary stack.
1606 (Find_Node_To_Be_Wrapped): Restructured. A case_statement_alternative
1607 is a valid boundary for a transient expression which comes from the
1608 statements of the alternative, otherwise alternatives cannot be
1609 wrapped. Assignments of controlled objects which have controlled
1610 actions suppressed now stop the traversal as there is no point in
1611 looking for an enclosing construct. Add several N_xxx_Body choices to
1612 the termination conditions for completeness.
1613 * exp_ch7.ads (Establish_Transient_Scope): Update the parameter profile
1614 and the associated comment on usage.
1615 * exp_smem.adb (Add_Shared_Var_Lock_Procs): Update the call to
1616 Establish_Transient_Scope.
1617 (Add_Write_After): Update the call to Establish_Transient_Scope.
1618 * sem_res.adb (Check_Initialization_Call): Removed.
1619 (Resolve_Actuals): Account for additional cases where finalization
1620 actions are required by utilizing predicate Needs_Finalization rather
1622 (Resolve_Call): Type initialization procedures can now utilize
1623 transient scopes to manage the secondary stack, thus preventing leaks
1624 during initialization. Remove the previous kludgy algorithm which
1625 attempts to manage the secondary stack at the object creation site.
1627 2018-01-11 Jerome Lambourg <lambourg@adacore.com>
1629 * libgnat/g-soliop__qnx.ads: New.
1630 * adaint.c, adaint.h, cstreams.c, s-oscons-tmplt.c, sysdep.c: Update
1633 2018-01-11 Bob Duff <duff@adacore.com>
1635 * par-ch9.adb (P_Protected_Operation_Declaration_Opt): Give an error if
1636 a null procedure occurs in a protected definition.
1638 2018-01-11 Bob Duff <duff@adacore.com>
1640 * binderr.ads, namet.ads: Minor reformatting.
1642 2018-01-11 Bob Duff <duff@adacore.com>
1644 * doc/gnat_ugn/gnat_utility_programs.rst: Improve documentation of
1647 2018-01-11 Bob Duff <duff@adacore.com>
1649 * binde.adb (Force_Elab_Order): Give an error if there are duplicate
1652 2018-01-11 Ed Schonberg <schonberg@adacore.com>
1654 * sem_ch6.adb (Freeze_Expr_Types): If an access value is the
1655 controlling argument of a dispatching call. freeze the corresponding
1658 2018-01-11 Ben Brosgol <brosgol@adacore.com>
1660 * doc/Makefile: Add Sphinx option -W to treat warnings as errors.
1662 2018-01-11 Ben Brosgol <brosgol@adacore.com>
1664 * doc/gnat_rm/implementation_defined_aspects.rst: Minor type/wording
1666 * gnat_rm.texi: Regenerate.
1668 2018-01-11 Ed Schonberg <schonberg@adacore.com>
1670 * sem_ch12.adb (Check_Fixed_Point_Type): Do not apply check if the
1671 formsl type corresponding to the actual fixed point type is private,
1672 because in this case there can be no suspicious arithmetic operations
1673 in the generic unless they reference a formal subprogram. Clarify
1676 2018-01-11 Javier Miranda <miranda@adacore.com>
1678 * exp_util.adb (Remove_Side_Effects): No action done for functions
1679 returning class-wide types since it requires generating code using
1680 'reference and the CCG target has no secondary stack.
1681 * gnat1drv.adb: Disable building static dispatch tables when generating
1684 2018-01-11 Piotr Trojanek <trojanek@adacore.com>
1686 * libgnat/a-direio.ads, libgnat/a-sequio.ads, libgnat/a-ststio.ads,
1687 libgnat/a-textio.ads, libgnat/a-witeio.ads, libgnat/a-ztexio.ads
1688 (File_Type): Add Default_Initial_Condition aspect.
1690 2018-01-11 Pascal Obry <obry@adacore.com>
1692 * libgnat/s-os_lib.adb (Normalize_Pathname): New implementation.
1694 2018-01-11 Bob Duff <duff@adacore.com>
1696 * doc/gnat_ugn/gnat_utility_programs.rst: Rewrite gnatpp documentation
1697 to match what the Libadalang-based version does.
1698 * doc/gnat_ugn/about_this_guide.rst: Update reference.
1700 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
1702 * sem_res.adb (Uses_SS): A controlled type requires the secondary stack
1703 if it contains at least one component declaration employing a function
1704 call returning on the secondary stack.
1706 2018-01-11 Yannick Moy <moy@adacore.com>
1708 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
1709 Update description of restriction SPARK_05 with SPARK 2014.
1710 * gnat_rm.texi: Regenerate.
1712 2018-01-11 Vasiliy Fofanov <fofanov@adacore.com>
1714 * doc/gnat_ugn/gnat_utility_programs.rst: Fix layout.
1716 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
1718 * exp_aggr.adb, exp_ch9.adb, exp_util.adb, sem_aggr.adb, sem_ch3.adb,
1719 sem_res.adb, sem_util.adb: Minor reformatting.
1721 2018-01-11 Ed Schonberg <schonberg@adacore.com>
1723 * sem_prag.adb (Analyze_Pragma, case Predicate): Indicate that the type
1724 has a delayed aspect which must be processed at the point the type is
1725 frozen. This mimics what is done when the predicate is provided by a
1728 2018-01-11 Doug Rupp <rupp@adacore.com>
1730 * init.c (vxworks): Add macro checks for __aarch64__.
1732 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
1734 * exp_util.adb (Add_Failure_Expression): New routine.
1735 (Make_Predicate_Check): Reimplement the handling of Predicate_Failure.
1736 * sem_util.adb (Is_Current_Instance): Code cleanup.
1738 2018-01-11 Patrick Bernardi <bernardi@adacore.com>
1740 * libgnat/s-parame*.adb, libgnat/s-parame*.ads: Remove unneeded
1741 Default_Sec_Stack_Size.
1742 * libgnat/s-secsta.adb (SS_Allocate): Handle the fixed secondary stack
1743 limit check so that the integer index does not overflow. Check the
1744 dynamic stack allocation does not cause the secondary stack pointer to
1746 (SS_Info): Align colons.
1747 (SS_Init): Cover the case when bootstraping with an old compiler that
1748 does not set Default_SS_Size.
1750 2018-01-11 Ed Schonberg <schonberg@adacore.com>
1752 * sem_ch3.adb (Add_Internal_Interface_Entities): When checking the
1753 legality of an inherited operation that may require overriding, ignore
1754 primitive_wrappers that correspond to explicit operations that override
1755 an interface primitive.
1756 * exp_util.adb (Build_Class_Wide_Expression, Replace_Entity): If the
1757 operation to which the class-wide expression applies is a protected op.
1758 with a primitive_wrapper, verify that the updated inherited expression
1759 does not contain an internal call to a protected function. This
1760 completes the implementation of AI12-0166.
1762 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
1764 * ali.adb: Document the remaining letters available for ALI lines.
1765 (Scan_ALI): A with clause is internal when it is encoded on a 'Z' line.
1766 * ali.ads: Update type With_Record. Field
1767 Implicit_With_From_Instantiation is no longer in use. Add field
1769 * csinfo.adb (CSinfo): Remove the setup for attribute
1770 Implicit_With_From_Instantiation.
1771 * lib-writ.adb (Collect_Withs): Correct the logic which marks a unit as
1772 either implicitly or explicitly withed.
1773 (Is_Implicit_With_Clause): New routine.
1774 (Write_ALI): Rename array Implicit_With to Has_Implicit_With to avoid
1775 confusion with the with clause attribute by the same name.
1776 (Write_With_Lines): Update the emission of 'W', 'Y', and 'Z' headers.
1777 * rtsfind.adb (Maybe_Add_With): Code cleanup.
1778 * sem_ch8.adb (Present_System_Aux): Code cleanup.
1779 * sem_ch10.adb (Expand_With_Clause): Mark the with clause as generated
1781 (Implicit_With_On_Parent): Mark the with clause as generated for a
1783 * sem_ch12.adb (Inherit_Context): With clauses inherited by an
1784 instantiation are no longer marked as Implicit_With_From_Instantiation
1785 because they are already marked as implicit.
1786 * sem_elab.adb (Ensure_Prior_Elaboration_Static): Remove the kludge
1787 which marks implicit with clauses as related to an instantiation.
1788 * sinfo.adb (Implicit_With_From_Instantiation): Removed.
1789 (Parent_With): New routine.
1790 (Set_Implicit_With_From_Instantiation): Removed.
1791 (Set_Parent_With): New routine.
1792 * sinfo.ads: Update the documentation of attribute Implicit_With.
1793 Remove attribute Implicit_With_From_Instantiation along with
1794 occurrences in nodes. Add attribute Parent_With along with occurrences
1796 (Implicit_With_From_Instantiation): Removed along with pragma Inline.
1797 (Parent_With): New routine along with pragma Inline.
1798 (Set_Implicit_With_From_Instantiation): Removed along with pragma Inline.
1799 (Set_Parent_With): New routine along with pragma Inline.
1801 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
1803 * sem_util.adb (Find_Enclosing_Scope): Return the unique defining
1804 entity when the enclosing construct is a body.
1806 2018-01-11 Patrick Bernardi <bernardi@adacore.com>
1808 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Simplified
1809 Secondary_Stack_Size handling as a pragma is now generated for the
1810 corresponding aspect instead of an attribute. Pragma expression is
1811 relocated instead of evaluated. Discriminant of the corresponding
1812 record type is referenced rather than the type discriminant.
1813 (Create_Secondary_Stack_For_Task, Make_Task_Create_Call): Update
1814 Secondary_Stack_Size rep item checks to only look for the pragma rep.
1815 * sem_ch13.adb (Analyze_One_Aspect): Transform
1816 Aspect_Secondary_Stack_Size into a pragma instead of an attribute
1817 because the attribute does not have visibility on a task type's
1818 discriminants when the type's definition is expanded.
1819 (Analyze_Attribute_Definition_Clause): Remove handling of
1820 Attribute_Secondary_Stack_Size.
1821 * snames.adb-tmpl, snames.ads-tmpl: Remove
1822 Attribute_Secondary_Stack_Size, no longer used.
1824 2018-01-11 Justin Squirek <squirek@adacore.com>
1826 * sem_ch8.adb: Minor comment fix.
1828 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
1830 * exp_ch4.adb (Process_Action): Do not abandon the inspection of an
1831 individual action because the action may denote a complex expression,
1832 such as a case statement, which in turn may contain additional
1835 2018-01-11 Ed Schonberg <schonberg@adacore.com>
1837 * sem_aggr.adb (Resolve_Iterated_Component_Association): Perform
1838 analysis on a copy of the expression with a copy of the index variable,
1839 because full expansion will rewrite construct into a loop with the
1840 original loop variable.
1841 * exp_aggr.adb (Gen_Assign): Defer analysis and resolution if the
1842 expression is an iterated component association. Full analysis takes
1843 place when construct is rewritten as a loop.
1844 (In_Place_Assign_OK, Safe_Component): An iterated_component_association
1845 is not safe for in-place assignment.
1846 * sem_util.adb (Remove_Entity): Handle properly the case of an isolated
1847 entity with no homonym and no other entity in the scope.
1849 2018-01-11 Justin Squirek <squirek@adacore.com>
1851 * sem_prag.adb (Analyze_Pragma:Pragma_Loop_Variant): Modify error
1852 message to be printed on the pragma argument identifier.
1854 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
1856 * exp_util.adb (Build_Invariant_Procedure_Declaration): Set the last
1857 entity of the generated invariant procedure in order to construct a
1858 proper entity chain.
1860 2018-01-11 Piotr Trojanek <trojanek@adacore.com>
1862 * sem_ch13.adb (Build_Predicate_Functions): Fix minor issues in
1865 2018-01-11 Arnaud Charlet <charlet@adacore.com>
1867 * einfo.ads, einfo.adb (Activation_Record_Component,
1868 Set_Activation_Record_Component, Set_Is_Uplevel_Referenced_Entity):
1869 Allow E_Discriminant.
1871 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
1873 * gcc-interface/decl.c (gnat_to_gnu_component_type): Apply the check
1874 for atomic access once the component size is taken into account and
1875 also do it if the component type is Atomic or Volatile_Full_Access.
1877 2018-01-04 Eric Botcazou <ebotcazou@adacore.com>
1879 * gnatvsn.ads: Bump copyright year.
1881 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1882 Alan Hayward <alan.hayward@arm.com>
1883 David Sherwood <david.sherwood@arm.com>
1885 * gcc-interface/misc.c (enumerate_modes): Treat GET_MODE_BITSIZE
1888 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1889 Alan Hayward <alan.hayward@arm.com>
1890 David Sherwood <david.sherwood@arm.com>
1892 * gcc-interface/misc.c (enumerate_modes): Treat GET_MODE_PRECISION
1895 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1896 Alan Hayward <alan.hayward@arm.com>
1897 David Sherwood <david.sherwood@arm.com>
1899 * gcc-interface/utils.c (gnat_types_compatible_p): Handle
1900 polynomial TYPE_VECTOR_SUBPARTS.
1902 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1903 Alan Hayward <alan.hayward@arm.com>
1904 David Sherwood <david.sherwood@arm.com>
1906 * gcc-interface/misc.c (enumerate_modes): Handle polynomial
1909 2018-01-03 Jakub Jelinek <jakub@redhat.com>
1911 Update copyright years.
1913 * gnat_ugn.texi: Bump @copying's copyright year.
1914 * gnat_rm.texi: Likewise.
1916 Copyright (C) 2018 Free Software Foundation, Inc.
1918 Copying and distribution of this file, with or without modification,
1919 are permitted in any medium without royalty provided the copyright
1920 notice and this notice are preserved.