1 2018-05-25 Yannick Moy <moy@adacore.com>
3 * sem_prag.adb (Check_Applicable_Policy): Deal specially with CodePeer
4 and GNATprove modes when applicable policy is Ignore.
6 2018-05-25 Eric Botcazou <ebotcazou@adacore.com>
8 * freeze.adb (Freeze_Enumeration_Type): Do not give integer size to a
9 boolean type with convention C.
10 * libgnat/i-cexten.ads (bool): Change to boolean with convention C.
11 * gcc-interface/decl.c (gnat_to_gnu_entity): Add new local variable
12 FOREIGN and use it throughout the function.
13 <E_Enumeration_Type>: Set precision 1 on boolean types with foreign
15 <E_Enumeration_Subtype>: Likewise for subtypes.
16 <E_Record_Type>: Force the size of a storage unit on empty classes.
17 * gcc-interface/utils.c (make_type_from_size) <BOOLEAN_TYPE>: Skip
18 boolean types with precision 1 if the size is the expected one.
20 2018-05-25 Arnaud Charlet <charlet@adacore.com>
22 * pprint.adb (Expression_Name): Do not print non ASCII characters.
24 2018-05-25 Bob Duff <duff@adacore.com>
26 * libgnat/a-strunb__shared.ads, libgnat/a-stwiun__shared.ads,
27 libgnat/a-stzunb__shared.ads: (Initialize, Adjust): Add pragma Inline.
29 2018-05-25 Bob Duff <duff@adacore.com>
31 * sem_util.ads: Minor comment fix.
33 2018-05-25 Ed Schonberg <schonberg@adacore.com>
35 * exp_unst.adb (Visit_Node): Restrict check for uplevel references in
36 prefixes of array attributes, to prefixes that are entity names whose
38 (Note_Uplevel_Bound): Verify that the bound is declared in an enclosing
39 subprogram, as itype created for loops in pre/postcondition may appear
40 in loops at the library level.
42 2018-05-25 Ed Schonberg <schonberg@adacore.com>
44 * sem_ch13.adb (Build_Predicate_Functions): The predicate function
45 declaration is inserted into the tree and analyzed at that point, so
46 should not be reinserted when the body is constructed. Inside a
47 generic, ensure that the body is not inserted twice in the tree.
49 2018-05-25 Yannick Moy <moy@adacore.com>
51 * sem_prag.adb (Check_Grouping): Modify test to ignore statements and
52 declarations not coming from source.
54 2018-05-25 Fedor Rybin <frybin@adacore.com>
56 * doc/gnat_ugn/gnat_utility_programs.rst: Document new switch
57 --copy-environment for gnattest.
59 2018-05-24 Piotr Trojanek <trojanek@adacore.com>
61 * sem_elab.adb (Non_Private_View): Simplify by removing a local Result
63 * sem_prag.adb (Get_Base_Subprogram): Same as above.
65 2018-05-24 Eric Botcazou <ebotcazou@adacore.com>
67 * fe.h (Set_Normalized_First_Bit): Declare.
68 (Set_Normalized_Position): Likewise.
69 * repinfo.adb (List_Record_Layout): Do not use irregular output for a
70 variable position. Fix minor spacing issue.
71 * gcc-interface/decl.c (annotate_rep): If a field has a variable
72 offset, compute the normalized position and annotate it in addition to
75 2018-05-24 Eric Botcazou <ebotcazou@adacore.com>
77 * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu):
78 Constify and rename variables. Fix formatting.
79 (gnat_to_gnu) <N_Exception_Handler>: Minor tweak.
80 <N_Raise_Statement>: Likewise.
82 2018-05-24 Javier Miranda <miranda@adacore.com>
84 * exp_ch8.adb (Build_Body_For_Renaming): Adding support to build the
85 body of a variant record equality renaming.
86 (Expand_N_Subprogram_Renaming_Declaration): Adapt the code to the new
87 implementation of Build_Body_For_Renaming.
88 * exp_ch3.ads (Build_Variant_Record_Equality): New library level
89 function that factorizes the functionality needed by
90 Build_Body_For_Renaming and Expand_Freeze_Record_Type to build the body
91 of a variant record equality subprogram.
92 * exp_ch3.adb (Build_Variant_Record_Equality): New subprogram.
93 (Build_Variant_Record_Equality): New local procedure of
94 Expand_Freeze_Record_Type containing all the code specific for freezing
95 the record type that cannot be place in the new library level function.
97 2018-05-24 Ed Schonberg <schonberg@adacore.com>
99 * einfo.ads, einfo.adb (Is_Activation_Record): New flag on
100 in_parameters, used when unesting subprograms for LLVM, to indicate
101 that a generated parameter carries the activation record from the
102 enclosing subprogram.
103 * exp_unst.adb (Check_Static_Type): Handle array attributes of types
104 whose bounds may contain up-level references that need to be added to
105 an activation recoord.
106 (Add_Extra_Formal): Set Is_Activation_Record on new formal.
108 2018-05-24 Yannick Moy <moy@adacore.com>
110 * pprint.adb (Expression_Image): Improve the printing of expressions,
111 by taking more cases into account, in particular qualified expressions
112 and aggregates. Also count more the number of parentheses to close
113 after the expression.
115 2018-05-24 Javier Miranda <miranda@adacore.com>
117 * sem_ch3.adb (Is_Visible_Component): For untagged types add missing
118 check for renamed discriminants.
119 * sem_ch4.adb (Analyze_Overloaded_Selected_Component,
120 Analyze_Selected_Component, Check_Misspelled_Selector): For calls to
121 Is_Visible_Component pass the associated selector node to allow
122 checking renamed discriminants on untagged types.
124 2018-05-24 Ed Schonberg <schonberg@adacore.com>
126 * sem_ch8.adb (Analyze_Use_Type): Do not assign the Prev_Use_Clause
127 link to a use_type clause if this would cause an infinite loop in the
128 machinery that detects redundant use clauses. This may happen when the
129 redundant clauses appear in the context of a child unit and the context
132 2018-05-24 Piotr Trojanek <trojanek@adacore.com>
134 * sinfo.ads: Fix grammar in comment.
136 2018-05-24 Justin Squirek <squirek@adacore.com>
138 * einfo.ads, einfo.adb (Append_Entity): Modified to use Link_Entities
139 and manage doubly-linked entity chain.
140 (Nested_Scenarios): Removed entity field used for optimization during
141 elaboration to make room for the new field Prev_Entity.
142 (Link_Entities): Added to replace redundant calls to Set_Next_Entity
143 and Set_Prev_Entity as well as centralize changes to the entity chain.
144 (Predicated_Parent): Modified to use Node38.
145 (Prev_Entity): Added to fetch new node field Prev_Entity in all entity
147 (Remove_Entity): Moved from sem_util.
148 (Set_Nested_Scenarios): Deleted.
149 (Set_Predicated_Parent): Modified to use Node38.
150 (Set_Prev_Entity): Added to set Prev_Entity field.
151 (Set_Validated_Object): Modified to use Node38.
152 (Unlink_Next_Entity): Added to process Prev_Entity when an unlinking
154 (Validated_Object): Modified to use Node38.
155 (Write_Field36_Name): Remove Nested_Scenarios, Validated_Object, and
156 predicated parent cases.
157 (Write_Field38_Name): Add predicated parent and Validated_Object cases.
158 * sem_ch3.adb (Process_Subtype): Add guard to protect against
159 inappropriate marking of Predicated_Parent to non-itype subtypes.
160 (Make_Class_Wide_Type): Preserve Prev_Entity field and set in new type.
161 (Copy_And_Swap): Add setting of Prev_Entity.
162 (Build_derived_Record_Type): Replace Set_Next_Entity w/ Link_Entities.
163 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Replace Set_Next_Entity
165 (New_Overloaded_Entity): Remove block created to search for previous
166 entities in the entity chain with relevant calls to Prev_Entity as well
167 as replace duplicated code from Remove_Entity_And_Homonym with a call
169 * sem_ch7.adb (Exchange_Declarations): Replace Set_Next_Entity w/
171 * sem_elab.adb (Find_And_Process_Nested_Scenarios): Remove global and
172 initial subprogram declarations related to Nested_Scenarios.
173 (Process_Nested_Scenarios): Deleted.
174 (Save_Scenario): Deleted.
175 (Traverse_Body): Remove optimization for Nested_Scenarios so as to free
176 node space in the entity tree.
177 * sem_util.adb, sem_util.ads (Remove_Entity): Moved to einfo.
178 (Remove_Entity_And_Homonym): Added to separate functionality of
179 Remove_Entity from the homonym chain directly.
180 * exp_attr.adb (Expand_N_Attribute_Reference): Replace Set_Next_Entity
181 w/ Link_Entities and Unlink_Next_Entity.
182 * exp_ch3.adb (Expand_N_Object_Declaration): Replace Set_Next_Entity w/
184 * exp_ch6.adb (Replace_Renaming_Declaration_Id): Replace
185 Set_Next_Entity w/ Link_Entities.
186 * exp_disp.adb (Expand_Dispatching_Call): Replace Set_Next_Entity w/
187 Link_Entities and Unlink_Next_Entity.
188 * exp_spark.adb (Expand_SPARK_N_Object_Renaming_Declaration): Replace
189 call to Remove_Entity with its new incarnation.
190 * exp_util.adb (New_Class_Wide_Subtype): Add setting of Prev_Entity.
191 * freeze.adb (Freeze_Record_Type): Replace Set_Next_Entity w/
194 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
196 * sem_ch10.adb (Expand_Limited_With_Clause): Update the call to
197 Install_Limited_Withed_Unit.
198 (Expand_With_Clause): Update the call to Install_Withed_Unit.
199 (Implicit_With_On_Parent): Update the call to Install_Withed_Unit.
200 (Install_Context_Clauses): Update the call to Install_Withed_Unit.
201 (Install_Limited_Context_Clauses): Update the calls to
202 Install_Limited_Withed_Unit.
203 (Install_Limited_Withed_Unit): Renamed to better illustrate its
205 (Install_Private_With_Clauses): Update the calls to Install_Withed_Unit
206 and Install_Limited_Withed_Unit.
207 (Install_With_Clause): Uninstall a limited with clause if a [private]
208 with clause is given for the same package.
209 (Install_Withed_Unit): Renamed to better illustrate its purpose.
210 (Remove_Limited_With_Unit): New routine.
212 2018-05-24 Eric Botcazou <ebotcazou@adacore.com>
214 * raise-gcc.c (__gnat_SEH_error_handler): Remove prototype.
215 (__gnat_personality_seh0): Adjust and beef up comments, and
216 fix formatting throughout.
217 (__gnat_adjust_context): Deal minimally with version 2.
218 * seh_init.c (__gnat_map_SEH): Fix formatting.
219 (_gnat_SEH_error_handler): Adjust comments.
220 (__gnat_install_SEH_handler): Fix formatting.
222 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
224 * exp_ch7.adb, sem_ch3.adb, sem_res.adb: Minor reformatting.
226 2018-05-24 Ed Schonberg <schonberg@adacore.com>
228 * exp_aggr.adb (Flatten): Add a warning on an others clause in an array
229 aggregate with static bounds when named associations cover all index
230 positions and the others clause is redundant.
232 2018-05-24 Raphael Amiard <amiard@adacore.com>
234 * libgnat/a-cohama.ads: Add documentation.
236 2018-05-24 Raphael Amiard <amiard@adacore.com>
238 * libgnat/a-convec.ads: Add documentation.
240 2018-05-24 Justin Squirek <squirek@adacore.com>
242 * exp_ch3.adb (Expand_N_Object_Declaration): Ignore raising an error in
243 expansion for limited tagged types when the node to be expanded is a
244 raise expression due to it not representing a valid object.
245 * exp_ch5.adb (Expand_N_Assignment_Statement): Add exception to error
246 message regarding assignments to limited types to ignore genereated
249 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
251 * exp_util.adb (New_Class_Wide_Subtype): Capture and restore relevant
252 Ghost-related attributes of the class-wide subtype because the copy
255 2018-05-24 Justin Squirek <squirek@adacore.com>
257 * sem_res.adb (Resolve_Entity_Name): Add guard to protect against
258 marking use clauses as effective when the reference appears within
261 2018-05-24 Cyrille Comar <comar@adacore.com>
263 * doc/gnat_rm/the_gnat_library.rst: Fix typos.
264 * gnat_rm.texi: Regenerate.
266 2018-05-24 Bob Duff <duff@adacore.com>
268 * exp_ch7.adb (Expand_Cleanup_Actions): Create a mark unconditionally
269 for build-in-place functions with a caller-unknown-size result.
270 (Create_Finalizer): For build-in-place functions with a
271 caller-unknown-size result, check at run time whether we need to
272 release the secondary stack.
274 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
276 * sem_prag.adb (Analyze_Pragma): Use the full view of an internally
277 generated incomplete type.
279 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
281 * expander.adb (Expand): Update the save and restore of the Ghost
283 * exp_ch3.adb (Freeze_Type): Likewise.
284 * exp_disp.adb (Make_DT): Likewise.
285 * exp_util.adb (Build_DIC_Procedure_Body): Likewise.
286 (Build_DIC_Procedure_Declaration): Likewise.
287 (Build_Invariant_Procedure_Body): Likewise.
288 (Build_Invariant_Procedure_Declaration): Likewise.
289 (Make_Predicate_Call): Likewise.
290 * freeze.adb (Add_To_Result): Insert the freeze action of a living
291 entity prior to the start of the enclosing ignored Ghost region.
292 (Freeze_Entity): Update the save and restore of the Ghost region.
293 * ghost.adb (Install_Ghost_Mode): Reimplemented.
294 (Install_Ghost_Region): New routine.
295 (Mark_And_Set_Ghost_Assignment): Install a region rather than a mode.
296 (Mark_And_Set_Ghost_Body): Likewise.
297 (Mark_And_Set_Ghost_Completion): Likewise.
298 (Mark_And_Set_Ghost_Declaration): Likewise.
299 (Mark_And_Set_Ghost_Instantiation): Likewise.
300 (Mark_And_Set_Ghost_Procedure_Call): Likewise.
301 (Name_To_Ghost_Mode): New routine.
302 (Restore_Ghost_Region): New routine.
303 * ghost.ads (Install_Ghost_Region): New routine.
304 (Restore_Ghost_Region): New routine.
305 * opt.ads: Add new global variable Ignored_Ghost_Region.
306 * rtsfind.adb (Load_RTU): Update the save and restore of the Ghost
307 region. Install a clean region.
308 * sem.adb (Analyze): Likewise.
309 (Do_Analyze): Likewise.
310 * sem_ch3.adb (Analyze_Object_Declaration): Likewise
311 (Derive_Progenitor_Subprograms): Use local variable Iface_Alias to
312 capture the ultimate alias of the current primitive.
313 (Process_Full_View): Update the save and restore of the Ghost region.
314 Do not inherit DIC and invariant procedures.
315 * sem_ch5.adb (Analyze_Assignment): Update the save and restore of the
317 * sem_ch6.adb (Analyze_Procedure_Call): Likewise.
318 (Analyze_Subprogram_Body_Helper): Likewise.
319 * sem_ch7.adb (Analyze_Package_Body_Helper): Likewise.
320 * sem_ch12.adb (Analyze_Package_Instantiation): Likewise.
321 (Analyze_Subprogram_Instantiation): Likewise.
322 (Instantiate_Package_Body): Likewise.
323 (Instantiate_Subprogram_Body): Likewise.
324 * sem_ch13.adb (Build_Predicate_Functions): Likewise.
325 (Build_Predicate_Function_Declaration): Likewise.
327 (Add_Dispatching_Operation): Do not consider DIC and invariant
329 (Check_Dispatching_Operation): Use Add_Dispatching_Operation to collect
330 a dispatching subprogram.
331 (Check_Operation_From_Private_View): Likewise.
332 (Override_Dispatching_Operation): Likewise.
333 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Update the save
334 and restore of the Ghost region.
335 (Analyze_Initial_Condition_In_Decl_Part): Likewise.
336 (Analyze_Pragma): Update the save and restore of the Ghost region.
337 (Analyze_Pre_Post_Condition_In_Decl_Part): Likewise.
338 * sem_util.adb (Is_Suitable_Primitive): New routine.
339 * sem_util.ads (Is_Suitable_Primitive): New routine.
340 * sinfo.ads: Update the section of Ghost regions.
342 2018-05-24 Piotr Trojanek <trojanek@adacore.com>
344 * doc/gnat_rm/implementation_defined_pragmas.rst (Contract_Cases):
345 Change "condition" to "case guard" after renaming in the contract
347 * gnat_rm.texi: Regenerate.
349 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
351 * exp_util.adb (Expand_Static_Predicates_In_Choices): Indicate that the
352 construct with discrete choices no longer contains a subtype with
353 predicates since the expansion already handled this case.
355 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
357 * freeze.adb (Wrap_Imported_Subprogram): Generate an unchecked
358 conversion to the return type to avoid a side effect where an imported
359 relocated function generates a new anonymous access type, whose
360 accessibility level does not agree with with that of the wrapper.
362 2018-05-24 Javier Miranda <miranda@adacore.com>
364 * sem_util.adb (Abstract_Interface_List): Add missing support for
365 private types whose full view is a synchronized type.
366 * sem_ch3.adb (Build_Derived_Private_Type): Skip building the full
367 derivation of a private type parent type is a task type with
368 discriminants as gigi does not use such type directly.
370 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
372 * sem_elab.adb (Build_Variable_Reference_Marker): Do not create a
373 variable marker when the reference appears in the formal part of a
374 compilation unit instance because there is no place to insert it.
375 (In_Compilation_Instance_Formal_Part): New routine.
377 2018-05-24 Piotr Trojanek <trojanek@adacore.com>
379 * layout.ads, repinfo.ads: Fix references to renamed Backend_Layout
380 configuration parameter.
382 2018-05-24 Doug Rupp <rupp@adacore.com>
384 * argv-lynxos178-raven-cert.c: New file.
385 * libgnat/system-lynxos178-x86.ads: New file.
387 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
389 * exp_disp.adb, freeze.adb, gnat1drv.adb, sem_ch5.adb, sem_spark.adb:
392 2018-05-23 Pascal Obry <obry@adacore.com>
394 * adaint.c (win32_wait): Properly free the handle/pid lists when
395 WaitForMultipleObjects fails (return WAIT_FAILED).
397 2018-05-23 Pascal Obry <obry@adacore.com>
399 * adaint.c (win32_wait): Add missing parentheses.
401 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
403 * exp_ch3.adb (Check_Large_Modular_Array): Moved to Freeze.
404 (Expand_N_Object_Declaration): Do not check for a large modular array
406 * freeze.adb (Check_Large_Modular_Array): Moved from Exp_Ch3.
407 (Freeze_Object_Declaration): Code cleanup. Check for a large modular
409 * sem_ch3.adb: Minor reformatting.
411 2018-05-23 Ed Schonberg <schonberg@adacore.com>
413 * einfo.ads: New attribute on types: Predicated_Parent, to simplify the
414 retrieval of the applicable predicate function to an itype created for
415 a constrained array component.
416 * einfo.adb: Subprograms for Predicated_Parent.
417 (Predicate_Function): Use new attribute.
418 * exp_util.adb (Make_Predicate_Call): If the predicate function is not
419 available for a subtype, retrieve it from the base type, which may have
420 been frozen after the subtype declaration and not captured by the
422 * sem_aggr.adb (Resolve_Array_Aggregate): An Others association is
423 legal within a generated initiqlization procedure, as may happen with a
424 predicate check on a component, when the predicate function applies to
425 the base type of the component.
426 * sem_ch3.adb (Analyze_Subtype_Declaration): Clean up inheritance of
427 predicates for subtype declarations and for subtype indications in
429 (Process_Subtype): Likewise. Handle properly the case of a private type
430 with unknown discriminants whose full view is an unconstrained array.
431 Use Predicated_Parent to indicate source of predicate function on an
432 itype whose parent is itself an itype.
433 (Complete_Private_Subtype): If the private view has unknown
434 discriminants and the full view is an unconstrained array, set base
435 type of completion to the full view of parent.
436 (Inherit_Predicate_Flags): Prevent double assignment of predicate
438 (Build_Subtype): For a constrained array component, propagate predicate
439 information from original component type declaration.
441 2018-05-23 Boris Yakobowski <yakobowski@adacore.com>
443 * libgnat/a-ngelfu.ads (Arctanh, Arccoth): Fix faulty preconditions.
445 2018-05-23 Arnaud Charlet <charlet@adacore.com>
447 * checks.adb (Minimize_Eliminate_Overflows): Default initialize Lo and
449 * sem_elab.adb: Make "out" parameters instead of "in out" when
452 2018-05-23 Bob Duff <duff@adacore.com>
454 * gnatbind.adb (List_Applicable_Restrictions): Add
455 No_Implementation_Restrictions to the list of restrictions not to list.
456 Remove double negative "not No_Restriction_List". Comment the
457 commentary that is output, so it won't cause errors if used directly in
460 2018-05-23 Ed Schonberg <schonberg@adacore.com>
462 * sem_prag.adb (Inherit_Class_Wide_Pre): Refine legality check on
463 class-wide precondition on a type extension when ancestor does not have
464 a class-wide precondition. Previously the compiler accepted such a
465 precondition when the ancestor had a class-wide postcondition.
467 2018-05-23 Javier Miranda <miranda@adacore.com>
469 * sem_attr.adb (Valid_Scalars): Do not invoke Error_Attr_P to report
470 the warning on occurrences of this attribute whose evaluation is always
471 true (since that subprogram aborts processing the attribute). In
472 addition, replace the node by its boolean result 'True' (required
473 because the backend has no knowledge of this attribute).
475 2018-05-23 Bob Duff <duff@adacore.com>
477 * libgnat/a-convec.adb: (Insert, Insert_Space): Suppress warnings. The
478 code in question is not reachable in the case where Count_Type'Last is
481 2018-05-23 Yannick Moy <moy@adacore.com>
483 * doc/gnat_rm/implementation_defined_pragmas.rst: Clarify meaning of
484 local pragma Warnings Off without On.
485 * gnat_rm.texi: Regenerate.
487 2018-05-23 Olivier Hainque <hainque@adacore.com>
489 * libgnat/g-excact.ads (Is_Foreign_Exception): New predicate.
490 * libgnat/g-excact.adb: Implement.
492 2018-05-23 Ed Schonberg <schonberg@adacore.com>
494 * sem_ch5.adb (Analyze_Iterator_Specification): If a subtype indication
495 is present, verify its legality when the domain of iteration is a
496 GNAT-specific formal container, as is already done for arrays and
497 predefined containers.
499 2018-05-23 Yannick Moy <moy@adacore.com>
501 * sem_util.adb (Enclosing_Declaration): Fix the case of a named number
502 declaration, which was not taken into account.
504 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
506 * debug.adb: Switch -gnatd_s is now used to stop elaboration checks on
507 synchronized suspension.
508 * rtsfind.ads: Add entries for units Ada.Synchronous_Barriers and
509 Ada.Synchronous_Task_Control and routines Suspend_Until_True and
511 * sem_elab.adb: Document switch -gnatd_s.
512 (In_Task_Body): New routine.
513 (Is_Potential_Scenario): Code cleanup. Stop the traversal of a task
514 body when the current construct denotes a synchronous suspension call,
515 and restriction No_Entry_Calls_In_Elaboration_Code or switch -gnatd_s
517 (Is_Synchronous_Suspension_Call): New routine.
518 * switch-c.adb (Scan_Front_End_Switches): Switch -gnatJ now sets switch
521 2018-05-23 Javier Miranda <miranda@adacore.com>
523 * exp_disp.adb (Make_DT): Restrict the initialization of
524 External_Tag and Expanded_Name to an empty string to the case where
525 both pragmas apply (i.e. No_Tagged_Streams and Discard_Names), since
526 restricted runtimes are compiled with pragma Discard_Names.
527 * doc/gnat_rm/implementation_defined_pragmas.rst,
528 doc/gnat_rm/implementation_defined_characteristics.rst: Add
530 * gnat_rm.texi: Regenerate.
532 2018-05-23 Maroua Maalej <maalej@adacore.com>
534 * sem_spark.adb: Fix of some permission rules of pointers in SPARK.
536 2018-05-23 Ed Schonberg <schonberg@adacore.com>
538 * sem_ch5.adb (Preanalyze_Range): The pre-analysis of the domain of
539 iteration of an Ada2012 loop is performed to determine the type of the
540 domain, but full analysis is performed once the loop is rewritten as a
541 while-loop during expansion. The pre-analysis suppresses expansion; it
542 must also suppress the generation of freeze nodes, which may otherwise
543 appear in the wrong scope before rewritting.
545 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
547 * sem_elab.adb: Update the section on suppressing elaboration warnings.
549 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
551 * einfo.adb (Is_Elaboration_Checks_OK_Id): Use predicate
552 Is_Elaboration_Target.
553 (Is_Elaboration_Target): New routine.
554 (Is_Elaboration_Warnings_OK_Id): Use predicate Is_Elaboration_Target.
555 (Set_Is_Elaboration_Checks_OK_Id): Use predicate Is_Elaboration_Target.
556 (Set_Is_Elaboration_Warnings_OK_Id): Use predicate
557 Is_Elaboration_Target.
558 * einfo.ads: Add new synthesized attribute Is_Elaboration_Target along
559 with occurrences in nodes.
560 (Is_Elaboration_Target): New routine.
561 * sem_prag.adb (Analyze_Pragma): Suppress elaboration warnings when an
562 elaboration target is subject to pragma Warnings (Off, ...).
564 2018-05-23 Eric Botcazou <ebotcazou@adacore.com>
566 * repinfo.adb (List_Type_Info): Remove obsolete stuff.
568 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
570 * einfo.adb: Flag304 is now Is_Elaboration_Warnings_OK_Id.
571 (Is_Elaboration_Warnings_OK_Id): New routine.
572 (Set_Is_Elaboration_Warnings_OK_Id): New routine.
573 (Write_Entity_Flags): Output Flag304.
574 * einfo.ads: Add new attribute Is_Elaboration_Warnings_OK_Id along with
575 occurrences in entities.
576 (Is_Elaboration_Warnings_OK_Id): New routine along with pragma Inline.
577 (Set_Is_Elaboration_Warnings_OK_Id): New routine along with pragma
579 * sem_attr.adb (Analyze_Access_Attribute): Capture the state of
580 elaboration warnings.
581 * sem_ch3.adb (Analyze_Object_Declaration): Capture the state of
582 elaboration warnings.
583 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Capture the
584 state of elaboration warnings.
585 (Analyze_Subprogram_Body_Helper): Capture the state of elaboration
587 (Analyze_Subprogram_Declaration): Capture the state of elaboration
589 * sem_ch9.adb (Analyze_Entry_Declaration): Capture the state of
590 elaboration warnings.
591 (Analyze_Single_Task_Declaration): Capture the state of elaboration
593 (Analyze_Task_Type_Declaration): Capture the state of elaboration
595 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Capture the state
596 of elaboration warnings.
597 (Analyze_Generic_Subprogram_Declaration): Capture the state of
598 elaboration warnings.
599 * sem_elab.adb: Add a section on suppressing elaboration warnings.
600 Type Processing_Attributes includes component Suppress_Warnings
601 intended to suppress any elaboration warnings along a path in the
602 graph. Update Initial_State to include a value for this component.
603 Types Target_Attributes and Task_Attriutes include component
604 Elab_Warnings_OK to indicate whether the target or task has elaboration
605 warnings enabled. component Elab_Warnings_OK.
606 (Build_Access_Marker): Propagate attribute
607 Is_Elaboration_Warnings_OK_Node from the attribute to the generated
609 (Extract_Instantiation_Attributes): Set the value for Elab_Warnings_OK.
610 (Extract_Target_Attributes): Set the value for Elab_Warnings_OK.
611 (Extract_Task_Attributes): Set the value for Elab_Warnings_OK.
612 (Process_Conditional_ABE_Access): Suppress futher elaboration warnings
613 when already in this mode or when the attribute or target have warnings
615 (Process_Conditional_ABE_Activation_Impl): Do not emit any diagnostics
616 if warnings are suppressed.
617 (Process_Conditional_ABE_Call): Suppress further elaboration warnings
618 when already in this mode, or the target or call have warnings
620 (Process_Conditional_ABE_Call_Ada): Do not emit any diagnostics if
621 warnings are suppressed.
622 (Process_Conditional_ABE_Call_SPARK): Do not emit any diagnostics if
623 warnings are suppressed.
624 (Process_Conditional_ABE_Instantiation): Suppress further elaboration
625 warnings when already in this mode or when the instantiation has
627 (Process_Conditional_ABE_Instantiation_Ada): Do not emit any
628 diagnostics if warnings are suppressed.
629 (Process_Conditional_ABE_Variable_Assignment_Ada): Use the more
630 specific Is_Elaboration_Warnings_OK_Id rather than Warnings_Off.
631 (Process_Conditional_ABE_Variable_Assignment_SPARK): Use the more
632 specific Is_Elaboration_Warnings_OK_Id rather than Warnings_Off.
633 (Process_Task_Object): Suppress further elaboration warnings when
634 already in this mode, or when the object, activation call, or task type
635 have warnings suppressed. Update the processing state to indicate that
636 the path goes through a task body.
637 * sinfo.adb (Is_Elaboration_Warnings_OK_Node): Accept attribute
639 (Set_Is_Elaboration_Warnings_OK_Node): Accept attribute references.
640 * sinfo.ads: Attribute Is_Elaboration_Warnings_OK_Node now applies to
641 attribute references.
643 2018-05-23 Piotr Trojanek <trojanek@adacore.com>
645 * einfo.ads: Minor reformatting.
647 2018-05-23 Ed Schonberg <schonberg@adacore.com>
649 * sem_ch3.adb (Analyze_Object_Declaration): If expression is an
650 anonymous_access_to_ subprogram formal, apply a conversion to force an
651 accsssibility check that will fail statically, enforcing 3.10.2 (13).
653 2018-05-23 Daniel Mercier <mercier@adacore.com>
655 * gnat1drv.adb: Turn off length expansion in CodePeer mode.
657 2018-05-23 Bob Duff <duff@adacore.com>
659 * freeze.adb: (Check_Address_Clause): Deal with build-in-place
660 aggregates in addition to build-in-place calls.
662 2018-05-23 Bob Duff <duff@adacore.com>
664 * einfo.ads: Minor reformatting.
665 * sem_ch3.adb: Likewise.
666 * sinfo.ads: Likewise.
668 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
670 * exp_ch3.adb (Default_Initialize_Object): Do not optimize scalar array
671 initialization when the component type has predicates.
672 * exp_ch4.adb (Expand_N_Allocator): Do not optimize scalar array
673 allocation when the component type has predicates.
675 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
677 * einfo.adb, exp_disp.adb, sem_ch3.adb, sem_ch6.adb, sem_prag.adb:
680 2018-05-22 Justin Squirek <squirek@adacore.com>
682 * sem_ch6.adb (Analyze_Expression_Function): Propagate flags from the
683 original function spec into the generated function spec due to
684 expansion of expression functions during analysis.
685 (Analyze_Subprogram_Body_Helper): Modify check on formal parameter
686 references from the body to the subprogram spec in the case of
687 expression functions because of inconsistances related to having a
689 * libgnarl/s-osinte__android.ads: Flag parameters as unused.
690 * libgnarl/s-osinte__lynxos178e.ads: Likewise.
691 * libgnarl/s-osinte__qnx.adb: Likewise.
692 * libgnarl/s-osinte__qnx.ads: Likewise.
694 2018-05-22 Doug Rupp <rupp@adacore.com>
696 * init.c (HAVE_ADJUST_CONTEXT_FOR_RAISE): Don't define on VxWorks7 for
699 2018-05-22 Olivier Hainque <hainque@adacore.com>
701 * libgnat/a-except.adb (Exception_Propagation.Propagate_Exception):
702 Expect an Exception_Occurence object, not an Access.
703 (Complete_And_Propagate_Occurrence): Adjust accordingly.
704 (Raise_From_Signal_Handler): Likewise.
705 (Reraise_Occurrence_No_Defer): If we have a Machine_Occurrence
706 available in the provided occurrence object, just re-propagate the
707 latter as a bare "raise;" would do.
708 * libgnat/a-exexpr.adb (Propagate_Exception): Adjust to spec change.
709 * libgnat/a-exstat.adb (String_To_EO): Initialize X.Machine_Occurrence
710 to null, to mark that the occurrence we're crafting from the stream
711 contents is not being propagated (yet).
713 2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
715 * exp_aggr.adb (Initialize_Ctrl_Record_Component): Insert the generated
716 code for a transient component in line with the rest of the
717 initialization code, rather than before the aggregate. This ensures
718 that the component has proper visibility of the discriminants.
720 2018-05-22 Jerome Lambourg <lambourg@adacore.com>
722 * adaint.c: Reorganize QNX-specific macros, use syspage to retreive the
725 2018-05-22 Jerome Lambourg <lambourg@adacore.com>
727 * sigtramp-qnx.c: Properly restore link register in signal trampoline.
729 2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
731 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Strip away any
732 conversions before extracting the value of the expression.
733 * exp_ch3.adb (Default_Initialize_Object): Optimize the default
734 initialization of an array of scalars.
735 (Get_Simple_Init_Val): Add processing for array types. Remove the
736 processing of strings because this case is already handled by the array
738 (Needs_Simple_Initialization): Moved to Sem_Util.
739 (Simple_Init_Array_Type): New routine.
740 (Simple_Init_Initialize_Scalars_Type): Reimplemented to use the new
741 facilities from Sem_Util.
742 (Simple_Initialization_OK): New routine.
743 * exp_ch3.ads (Needs_Simple_Initialization): Moved to Sem_Util.
744 * exp_ch4.adb (Expand_N_Allocator): Optimize the default allocation of
746 * sem_prag.adb (Analyze_Float_Value): New routine.
747 (Analyze_Integer_Value): New routine.
748 (Analyze_Pragma): Reimplement the analysis of pragma Initialize_Scalars
749 to handled the extended form of the pragma.
750 (Analyze_Type_Value_Pair): New routine.
751 * sem_util.adb: Add invalid value-related data structures.
752 (Examine_Array_Bounds): New routine.
753 (Has_Static_Array_Bounds): Reimplemented.
754 (Has_Static_Non_Empty_Array_Bounds): New routine.
755 (Invalid_Scalar_Value): New routine.
756 (Needs_Simple_Initialization): Moved from Exp_Ch3.
757 (Set_Invalid_Scalar_Value): New routines.
758 * sem_util.ads (Has_Static_Non_Empty_Array_Bounds): New routine.
759 (Invalid_Scalar_Value): New routine.
760 (Needs_Simple_Initialization): Moved from Exp_Ch3.
761 (Set_Invalid_Scalar_Value): New routines.
762 * snames.ads-tmpl: Add names for the salar type families used by pragma
765 2018-05-22 Javier Miranda <miranda@adacore.com>
767 * exp_disp.adb (Make_DT): Initialize the External_Tag with an empty
768 string when pragma No_Tagged_Streams is applicable to the tagged type,
769 and initialize the Expanded_Name with an empty string when pragma
770 Discard_Names is applicable to the tagged type.
772 2018-05-22 Ed Schonberg <schonberg@adacore.com>
774 * sem_ch6.adb (Check_Conformance): Add RM reference for rule that a
775 formal subprogram is never subtype conformqnt, and thus cannot be the
776 prefix of 'Access. Reject as well the attribute when applied to a
777 renaming of a formal subprogram.
779 2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
781 * exp_ch3.adb (Build_Array_Init_Proc): Update the call to
782 Needs_Simple_Initialization.
783 (Build_Init_Statements): Update the call to Get_Simple_Init_Val.
784 (Check_Subtype_Bounds): Renamed to Extract_Subtype_Bounds. Update the
785 profile and comment on usage.
786 (Default_Initialize_Object): Do not use New_Copy_Tree to set the proper
787 Sloc of a value obtained from aspect Default_Value because this could
788 potentially replicate large trees. The proper Sloc is now set in
790 (Get_Simple_Init_Val): Reorganized by breaking the various cases into
791 separate routines. Eliminate the use of global variables.
792 (Init_Component): Update the call to Get_Simple_Init_Val.
793 (Needs_Simple_Initialization): Update the parameter profile and all
795 (Simple_Init_Defaulted_Type): Copy the value of aspect Default_Value
796 and set the proper Sloc.
797 * exp_ch3.ads (Get_Simple_Init_Val): Update the parameter profile and
799 (Needs_Simple_Initialization): Update the parameter profile.
801 2018-05-22 Patrick Bernardi <bernardi@adacore.com>
803 * sem_ch3.adb (Build_Discriminant_Constraints): Raise an error if the
804 user tries to use a subtype indication as a discriminant constraint.
806 2018-05-22 Ed Schonberg <schonberg@adacore.com>
808 * exp_ch4.ads, exp_ch4.adb, exp_util.adb, expander.adb: Remove mention
809 of N_Reduction_Expression and N_Reduction_Expression_Parameter.
810 * par-ch4.adb: Remove parsing routines for reduction expressions.
811 * sem.adb, sinfo.ads, sinfo.adb, sem_ch4.ads, sem_ch4.adb, sem_res.adb,
812 sem_spark.adb, sprint.adb: Remove analysis routines for reduction
815 2018-05-22 Arnaud Charlet <charlet@adacore.com>
817 * sem_ch8.adb (Check_Frozen_Renaming): Do not emit error in
818 Relaxed_RM_Semantics mode.
820 2018-05-22 Arnaud Charlet <charlet@adacore.com>
822 * comperr.adb (Delete_SCIL_Files): Take into account
823 N_Generic_Package_Renaming_Declaration.
825 2018-05-22 Ed Schonberg <schonberg@adacore.com>
827 * sem_ch3.adb (Search_Derivation_Levels): Whenever a parent type is
828 private, use the full view if available, because it may include renamed
829 discriminants whose values are stored in the corresponding
832 2018-05-22 Ed Schonberg <schonberg@adacore.com>
834 * einfo.ads, einfo.adb: New attribute Hidden_In_Formal_Instance,
835 defined on packages that are actuals for formal packages, in order to
836 set/reset the visibility of the formals of a formal package with given
837 actuals, when there are subsequent uses of those formals in the
838 enclosing generic, as required by RN 12.7 (10).
839 * atree.ads, atree.adb: Add operations for Elist30.
840 * atree.h: Add Elist30.
841 * sem_ch12.adb (Analyze_Formal_Package_Instantiation): Collect formals
842 that are not defaulted and are thus not visible within the current
844 (Check_Formal_Packages): Reset visibility of formals of a formal
845 package that are not defaulted, on exit from current instance.
847 2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
849 * sem_prag.adb (Analyze_Input_Output): Emit an error when a non-null,
850 non-'Result output appears in the output list of a function.
852 2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
854 * exp_attr.adb (Build_Array_VS_Func): Reimplemented.
855 (Build_Record_VS_Func): Reimplemented.
856 (Expand_N_Attribute): Reimplement the handling of attribute
858 * sem_attr.adb (Analyze_Attribute): Reimplement the handling of
859 attribute 'Valid_Scalars.
860 * sem_util.adb (Scalar_Part_Present): Reimplemented.
861 (Validated_View): New routine.
862 * sem_util.ads (Scalar_Part_Present): Update the parameter profile and
864 (Validated_View): New routine.
865 * doc/gnat_rm/implementation_defined_attributes.rst: Update the
866 documentation of attribute 'Valid_Scalars.
867 * gnat_rm.texi: Regenerate.
869 2018-05-22 Bob Duff <duff@adacore.com>
871 * binde.adb: (Choose): Ignore a pragma Elaborate_Body that appears in
872 the spec of a SAL_Interface package.
874 2018-05-22 Ed Schonberg <schonberg@adacore.com>
876 * freeze.adb (Freeze_Entity): When analyzing delayed aspects of an
877 entity E within a generic unit, indicate that there are no remaining
878 delayed aspects after invoking Analyze_Aspects_At_Freeze_Point. The
879 entity E is not frozen yet but the aspects should not be reanalyzed at
880 the freeze point, which may be outside of the generic and may not have
881 the proper visibility.
883 2018-05-22 Bob Duff <duff@adacore.com>
885 * doc/gnat_ugn/gnat_utility_programs.rst: Add documentation for
886 the new --split-line-before-record, --indent-named-statements and
887 --no-align-modes gnatpp switches.
889 2018-05-22 Ed Schonberg <schonberg@adacore.com>
891 * sem_prag.adb (Process_Compile_Time_Warning_Or_Error): Handle properly
892 a second argument that is a constant of a given string value.
894 2018-05-22 Doug Rupp <rupp@adacore.com>
896 * sigtramp-vxworks-target.inc: Align stack to 128bits on AArch64.
898 2018-05-22 Jerome Lambourg <lambourg@adacore.com>
900 * sigtramp-qnx.c: Fix stack alignment issue in the signal trampoline.
902 2018-05-22 Ed Schonberg <schonberg@adacore.com>
904 * freeze.adb (Freeze_Fixed_Point_Type): If the first subtype has
905 delayed aspects, analyze them now, os that the representation of the
906 type (size, bounds) can be computed and validated.
908 2018-05-22 Olivier Hainque <hainque@adacore.com>
910 * libgnat/s-dwalin.adb (Enable_Cache): Skip symbols outside of the
911 executable code section boundaries.
913 2018-05-22 Javier Miranda <miranda@adacore.com>
915 * locales.c: New implementation for the Ada.Locales package.
916 * libgnat/a-locale.ads: Remove comment indicating that this is not
918 * doc/gnat_rm/standard_library_routines.rst: Remove comment indicating
919 that this is not implemented.
920 * gnat_rm.texi: Regenerate.
922 2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
924 * exp_ch5.adb, freeze.adb, pprint.adb, sem_ch4.adb, sem_res.adb: Minor
927 2018-05-22 Justin Squirek <squirek@adacore.com>
929 * sem_ch12.adb (In_Same_Declarative_Part): Moved to sem_util.
930 (Freeze_Subprogram_Body, Install_Body): Modify calls to
931 In_Same_Declarative_Part.
932 * sem_prag.adb (Analyze_Pragma-Pragma_Pure_Function): Add check to
933 verify pragma declaration is within the same declarative list with
934 corresponding error message.
935 * sem_util.adb, sem_util.ads (In_Same_Declarative_Part): Moved from
936 sem_ch12.adb and generalized to be useful outside the scope of
939 2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
941 * sem_ch6.adb (Analyze_Subprogram_Declaration): Set the proper
942 categorization of the unit after processing the aspects in case one of
943 its aspects is converted into a categorization pragma.
945 2018-05-21 Ed Schonberg <schonberg@adacore.com>
947 * freeze.adb (Warn_Overlay): Do not emit a wawrning on an object
948 declaration with an explicit address clause and a type with default
949 initialization, if the declaration carries an aspect
950 Suppress_Initialization.
952 2018-05-21 Daniel Mercier <mercier@adacore.com>
954 * pprint.adb: Use mixed case for attribute names.
956 2018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
958 * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Rename the call to
959 Analyze_Aspect_Specifications_On_Body_Or_Stub.
960 (Analyze_Subprogram_Body_Helper): Rename the calls to
961 Analyze_Aspect_Specifications_On_Body_Or_Stub.
962 * sem_ch9.adb (Analyze_Entry_Body): Rename the call to
963 Analyze_Aspect_Specifications_On_Body_Or_Stub.
964 * sem_ch10.adb: Add with and use clause for Sem_Ch13.
965 (Analyze_Package_Body_Stub): Add constant Id. Decorate the package stub
966 prior to analyzing its aspects.
967 (Analyze_Protected_Body_Stub): Add constant Id. Decorate the package
968 stub prior to analyzing its aspects. Save and restore the configuration
970 (Analyze_Task_Body_Stub): Add constant Id. Decorate the package stub
971 prior to analyzing its aspects.
972 * sem_ch13.adb (Analyze_Aspect_Specifications_On_Body_Or_Stub): Renamed
973 to Analyze_Aspects_On_Subprogram_Body_Or_Stub.
974 * sem_ch13.ads (Analyze_Aspect_Specifications_On_Body_Or_Stub): Renamed
975 to Analyze_Aspects_On_Subprogram_Body_Or_Stub.
976 * sem_prag.adb: Code reformatting.
977 (Analyze_Refined_Depends_Global_Post): Consider task body stubs.
979 2018-05-21 Jerome Lambourg <lambourg@adacore.com>
981 * gcc-interface/Makefile.in: Add g-soliop__qnx.ads to the runtime build
984 2018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
986 * exp_cg.adb: Remove with and use clause for Exp_Disp.
987 * exp_ch9.adb: Remove with and use clause for Exp_Disp.
988 * exp_disp.adb (Is_Predefined_Dispatching_Operation): Moved to Sem_Util.
989 (Is_Predefined_Interface_Primitive): Moved to Sem_Util.
990 (Is_Predefined_Internal_Operation): Moved to Sem_Util.
991 * exp_disp.ads (Is_Predefined_Dispatching_Operation): Moved to Sem_Util.
992 (Is_Predefined_Interface_Primitive): Moved to Sem_Util.
993 (Is_Predefined_Internal_Operation): Moved to Sem_Util.
994 * exp_dist.adb: Remove with and use clause for Exp_Disp.
995 * freeze.adb: Remove with and use clause for Exp_Disp.
996 * sem_cat.adb: Remove with and use clause for Exp_Disp.
997 * sem_ch6.adb: Remove with and use clause for Exp_Disp.
998 * sem_ch12.adb: Remove with and use clause for Exp_Disp.
999 * sem_elab.adb (Check_Overriding_Primitive): Do not process predefined
1001 * sem_util.adb: Remove with and use clause for Exp_Disp.
1002 (Is_Predefined_Dispatching_Operation): Moved from Exp_Disp.
1003 (Is_Predefined_Interface_Primitive): Moved from Exp_Disp.
1004 (Is_Predefined_Internal_Operation): Moved from Exp_Disp.
1005 * sem_util.ads (Is_Predefined_Dispatching_Operation): Moved from
1007 (Is_Predefined_Interface_Primitive): Moved from Exp_Disp.
1008 (Is_Predefined_Internal_Operation): Moved from Exp_Disp.
1010 2018-05-21 Ed Schonberg <schonberg@adacore.com>
1012 * sem_res.adb (Valid_Conversion): Improve error message on an illegal
1013 type conversion whose expression has a limited view of a type.
1015 2018-05-21 Ed Schonberg <schonberg@adacore.com>
1017 * exp_ch5.adb (Build_Formal_Container_Iteration): If source has
1018 explicit name for iterator loop, preserve that name in expanded
1019 construct, for possible use in exit statements.
1021 2018-05-21 Javier Miranda <miranda@adacore.com>
1023 * sem_ch4.adb (Analyze_Membership_Op): Avoid compiler crash when the
1024 spec of a unit has Ada 2012 membership tests with multiple choices and
1025 the unit body is not compiled under Ada 2012 mode.
1027 2018-05-21 Doug Rupp <rupp@adacore.com>
1029 * sigtramp-vxworks-target.inc: Set cfa_reg properly from sigcontext
1031 (CFI_COMMON_REGS): Restore LR jic probed from prologue.
1032 (REGNO_PC_OFFSET): Change to correct value for Aarch64.
1034 2018-05-21 Jose Ruiz <ruiz@adacore.com>
1036 * doc/gnat_ugn/gnat_utility_programs.rst, exp_attr.adb,
1037 libgnarl/s-tassta.adb: Minor typo fixes
1039 2018-05-21 Ed Schonberg <schonberg@adacore.com>
1041 * sem_ch4.adb (Analyze_One_Call): Recognize complex cases where an
1042 indexed call originally in prefix forn is itself the prefix of a
1045 2018-05-21 Piotr Trojanek <trojanek@adacore.com>
1047 * sem_eval.adb (Is_Null_Range): Clarify access to the full view of a
1049 (Not_Null_Range): Same as above.
1051 2018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
1053 * exp_ch3.adb: Minor reformatting.
1054 * exp_ch6.adb: Likewise.
1055 * freeze.adb: Likewise.
1056 * inline.adb: Likewise.
1057 * sem_util.adb: Likewise.
1059 2018-05-21 Yannick Moy <moy@adacore.com>
1061 * inline.adb (Expand_Inlined_Call.Process_Formals): Use a type
1062 conversion instead of an unchecked type conversion when inlining a
1063 return statement, unless type qualification is required (for character
1064 and string literal) or no check can result from the conversion (for
1066 * opt.ads: Update comment.
1068 2018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
1070 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Install the elaboration
1071 model of the compilation unit spec, if any.
1072 * sem_ch7.adb (Analyze_Package_Body_Helper): Install the elaboration
1073 model of the compilation unit spec, if any.
1074 * sem_ch10.adb (Analyze_Subunit): Install the elaboration model of the
1075 parent compilation unit spec, if any.
1076 * sem_elab.adb (Check_Elaboration_Scenarios): Restore the elaboration
1077 model of the main unit.
1078 (Is_Same_Unit): The routine now uses Unit_Entity.
1079 (Is_Subunit): Removed.
1080 (Normalize_Unit): Removed.
1081 (Unit_Entity): New routine.
1082 * sem_prag.adb (Analyze_Pragma): Reimplement the handling of pragma
1083 Elaboration_Checks. The analysis now ensures that the pragma appears at
1084 the configuration level, and on the initial declaration of a unit.
1085 Other placements are either flagged as illegal, or ignored.
1086 (Check_Duplicate_Elaboration_Checks_Pragma): New routine.
1087 (Ignore_Elaboration_Checks_Pragma): New routine.
1088 * sem_util.adb (Install_Elaboration_Model): New routine.
1089 * sem_util.ads (Install_Elaboration_Model): New routine.
1090 * doc/gnat_rm/implementation_defined_pragmas.rst: Update the
1091 documentation of pragma Elaboration_Checks.
1092 * gnat_rm.texi: Regenerate.
1094 2018-05-21 Olivier Hainque <hainque@adacore.com>
1096 * libgnat/s-trasym__dwarf.adb (Executable_Name): Return argv[0] instead
1097 of empty string when argv[0] couldn't be found on PATH.
1098 (Enable_Cache): Raise Program_Error instead of attempting a null
1099 pointer dereference when the Exec_Module initialization failed.
1101 2018-05-21 Piotr Trojanek <trojanek@adacore.com>
1103 * libgnarl/a-reatim.ads (Clock_Time): Remove External aspect.
1104 * libgnarl/a-taside.ads (Tasking_State): Likewise.
1105 * libgnat/a-calend.ads (Clock_Time): Likewise.
1107 2018-05-21 Yannick Moy <moy@adacore.com>
1109 * sem_ch6.adb (Analyze_Procedure_Call): Refine test to recognize prefix
1110 call notation in inlined call in GNATprove mode.
1112 2018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
1114 * einfo.adb (Is_External_State): An abstract state is also external
1115 when it is declared with option "synchronous".
1116 * einfo.ads: Update the documentation of synthesized attribute
1118 * sem_util.adb (Find_Simple_Properties): New routine.
1119 (Is_Enabled_External_Property): New routine.
1120 (State_Has_Enabled_Property): Reimplemented. The two flavors of option
1121 External have precedence over option Synchronous when determining
1122 whether a property is in effect.
1124 2018-05-21 Yannick Moy <moy@adacore.com>
1126 * sem_eval.adb (Static_Length): Take into account case of variable of
1127 subtype string literal.
1129 2018-05-21 Olivier Hainque <hainque@adacore.com>
1131 * libgnat/s-objrea.ads (Get_Memory_Bounds): Rename as Get_Xcode_Bounds.
1132 (Object_Section): Rename Flag_Alloc component as Flag_Xcode.
1133 * libgnat/s-objrea.adb (Get_Xcode_Bounds): Adjust to new subprogram and
1135 (Get_Section, ELF case): Set Flag_Xcode from SHF_EXECINSTR.
1136 * libgnat/s-dwalin.adb (Open): Adjust to the Get_Memory_Bounds name
1139 2018-05-21 Olivier Hainque <hainque@adacore.com>
1141 * libgnat/s-dwalin.ads (Dwarf_Context): Change type of Load_Address to
1142 Address, and type of Low, High to Storage_Offset.
1143 (Low): Rename as Low_Address and convey that the return value is a
1144 runtime reference accounting for a load address.
1145 * libgnat/s-dwalin.adb (Read_Aranges_Entry): Adjust to the
1146 address/offset type changes.
1147 (Aranges_Lookup): Likewise.
1148 (Symbolic_Address): Likewise.
1149 (Symbolic_Traceback): Likewise.
1150 (Dump_Cache): Likewise.
1151 (Is_Inside): Likewise.
1153 (Set_Load_Address): Likewise.
1154 (Low_Address): Likewise, and account for C.Load_Address.
1155 * libgnat/s-trasym__dwarf.adb (Lt): Use Low_Address instead of Low.
1156 (Multi_Module_Symbolic_Traceback): Compare address in traceback
1157 with module Low_Address instead of Low.
1159 2018-05-21 Olivier Hainque <hainque@adacore.com>
1161 * libgnat/s-dwalin.ads (Dwarf_Context): Rename Load_Slide as
1163 * libgnat/s-dwalin.adb (Is_Inside): Adjust accordingly.
1164 (Set_Load_Address): Likewise.
1165 (Symbolic_Traceback): Likewise.
1167 2018-05-21 Olivier Hainque <hainque@adacore.com>
1169 * libgnat/s-trasym__dwarf.adb (Add_Module_To_Cache): Expect a
1170 Load_Address argument and pass it down to Init_Module.
1171 * libgnat/s-tsmona__linux.adb (Build_Cache_For_All_Modules): Pass
1172 lm.l_addr as the Load_Address to Add_Module_To_Cache.
1174 2018-05-21 Piotr Trojanek <trojanek@adacore.com>
1176 * einfo.adb (Has_Discriminants): Stronger assertion.
1177 (Set_Has_Discriminants): Stronger assertion.
1178 * sem_ch13.adb (Push_Scope_And_Install_Discriminants): Adapt to respect
1179 the stronger assertion on Has_Discriminant.
1180 (Uninstall_Discriminants_And_Pop_Scope): Same as above.
1181 * sem_util.adb (New_Copy_Tree): Same as above.
1182 * sem_ch7.adb (Generate_Parent_References): Prevent calls to
1183 Has_Discriminant on non-type entities that might happen when the
1184 compiled code has errors.
1185 * sem_ch3.adb (Derived_Type_Declaration): Only call
1186 Set_Has_Discriminant on type entities.
1188 2018-05-21 Arnaud Charlet <charlet@adacore.com>
1190 * exp_unst.adb (Unnest_Subprogram): Unnest all subprograms relevant for
1193 2018-05-21 Piotr Trojanek <trojanek@adacore.com>
1195 * lib.ads: Fix typo in enumeration in comment.
1197 2018-05-21 Ed Schonberg <schonberg@adacore.com>
1199 * sem_attr.adb (Analyze_Attribute, case Scalar_Storage_Order): The
1200 attribute reference is legal within a generic unit when the prefix is a
1201 formal private type.
1203 2018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
1205 * exp_ch7.adb (Establish_Transient_Scope): Code cleanup. Do not
1206 delegate the secondary stack management when there is no suitable
1207 transient context, and the transient scope was intended to manage the
1208 secondary stack because this causes premature reclamation. Change the
1209 transient scope creation logic by special casing assignment statements
1210 of controlled components for type initialization procedures.
1211 (Find_Node_To_Be_Wrapped): Renamed to Find_Transient_Context. Update
1212 the comment on usage.
1213 (Find_Transient_Context): Change the initinte loop into a while loop.
1214 Iterations schemes and iterator specifications are not valid transient
1215 contexts because they rely on special processing. Assignment statements
1216 are now treated as a normal transient context, special cases are
1217 handled by the caller. Add special processing for pragma Check.
1218 (Is_OK_Construct): Removed. Its functionality has been merged in
1219 routine Find_Transient_Context.
1220 * sem_ch5.adb (Check_Call): Reimplemented. Add code to properly
1221 retrieve the subprogram being invoked. Use a more accurate predicate
1222 (Requires_Transient_Scope) to determine that the function will emply
1223 the secondary stack.
1225 2018-05-21 Piotr Trojanek <trojanek@adacore.com>
1227 * ada_get_targ.adb: Fix subprogram body headers.
1228 * adabkend.adb: Likewise.
1229 * checks.adb: Likewise.
1230 * exp_ch3.adb: Likewise.
1231 * exp_ch5.adb: Likewise.
1232 * exp_ch9.adb: Likewise.
1233 * exp_dist.adb: Likewise.
1234 * exp_tss.adb: Likewise.
1235 * inline.adb: Likewise.
1236 * lib-writ.adb: Likewise.
1237 * lib-xref-spark_specific.adb: Likewise.
1238 * libgnarl/s-osinte__darwin.adb: Likewise.
1239 * libgnarl/s-stusta.adb: Likewise.
1240 * libgnarl/s-taprop__solaris.adb: Likewise.
1241 * libgnarl/s-tposen.adb: Likewise.
1242 * libgnarl/s-vxwext__kernel-smp.adb: Likewise.
1243 * libgnarl/s-vxwext__kernel.adb: Likewise.
1244 * libgnat/a-btgbso.adb: Likewise.
1245 * libgnat/a-cfdlli.adb: Likewise.
1246 * libgnat/a-cfhama.adb: Likewise.
1247 * libgnat/a-cfinve.adb: Likewise.
1248 * libgnat/a-cimutr.adb: Likewise.
1249 * libgnat/a-coboho.adb: Likewise.
1250 * libgnat/a-cofove.adb: Likewise.
1251 * libgnat/a-cofuve.adb: Likewise.
1252 * libgnat/a-comutr.adb: Likewise.
1253 * libgnat/a-exexda.adb: Likewise.
1254 * libgnat/a-tags.adb: Likewise.
1255 * libgnat/a-tideau.adb: Likewise.
1256 * libgnat/a-wtdeau.adb: Likewise.
1257 * libgnat/a-ztdeau.adb: Likewise.
1258 * libgnat/g-alleve.adb: Likewise.
1259 * libgnat/s-excdeb.adb: Likewise.
1260 * libgnat/s-parint.adb: Likewise.
1261 * libgnat/s-shasto.adb: Likewise.
1262 * libgnat/s-traceb__hpux.adb: Likewise.
1263 * prepcomp.adb: Likewise.
1264 * sem_ch4.adb: Likewise.
1265 * sem_ch6.adb: Likewise.
1266 * sem_dist.adb: Likewise.
1267 * sem_prag.adb: Likewise.
1268 * sem_util.adb: Likewise.
1269 * sinfo.adb: Likewise.
1270 * switch.adb: Likewise.
1272 2018-05-04 John Marino <gnugcc@marino.st>
1275 * link.c (BSD platforms): Add missing backslash.
1277 2018-04-27 Eric Botcazou <ebotcazou@adacore.com>
1280 * init.c (__gnat_handle_vms_condition): Add missing parentheses.
1282 2018-04-25 Eric Botcazou <ebotcazou@adacore.com>
1285 * gnat_ugn.texi: Regenerate.
1287 2018-03-23 Eric Botcazou <ebotcazou@adacore.com>
1290 * gnatlink.adb (Gnatlink): Remove handling of -b switch.
1291 * doc/gnat_ugn/building_executable_programs_with_gnat.rst (gnatlink):
1292 Remove documentation of -b switch.
1294 2018-03-23 Eric Botcazou <ebotcazou@adacore.com>
1297 * gnatlink.adb (Process_Args): Drop existing link switches if multiple
1298 switches are passed for --LINK.
1300 2018-03-12 Eric Botcazou <ebotcazou@adacore.com>
1303 * gcc-interface/misc.c (gnat_post_options): Disable string overflow
1306 2018-03-10 Eric Botcazou <ebotcazou@adacore.com>
1308 * gcc-interface/trans.c (node_has_volatile_full_access) <N_Identifier>:
1309 Consider only entities for objects.
1311 2018-03-07 Sebastian Huber <sebastian.huber@embedded-brains.de>
1313 * gcc-interface/Makefile.in (OSCONS_CPP): Remove redundant
1315 (OSCONS_EXTRACT): Add $(GNATLIBCFLAGS_FOR_C).
1317 2018-03-06 Eric Botcazou <ebotcazou@adacore.com>
1319 * gcc-interface/trans.c (convert_with_check): Fix typo in the condition
1320 guarding the overflow check emitted for the upper bound of a floating-
1323 2018-03-06 Eric Botcazou <ebotcazou@adacore.com>
1325 * gcc-interface/utils.c (def_builtin_1): Bail out on error_mark_node.
1327 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
1329 * libgnat/i-cexten.ads (Float_128): New type.
1331 2018-02-02 Eric Botcazou <ebotcazou@adacore.com>
1333 * gcc-interface/decl.c (array_type_has_nonaliased_component): Return
1334 false if the component type is a pointer.
1336 2018-01-11 Gary Dismukes <dismukes@adacore.com>
1338 * exp_ch3.adb (Default_Initialize_Object): Call New_Copy_Tree on the
1339 result of Get_Simple_Init_Value and pass the source location of the
1340 object declaration's object_definition.
1342 2018-01-11 Ed Schonberg <schonberg@adacore.com>
1344 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration): Handle
1345 properly object declarations with initializations that are
1346 build-in-place function calls, when there is an address specification,
1347 either as an aspect specification or an explicit attribute
1348 specification clause, for the initialized object.
1349 * freeze.adb (Check_Address_Clause): Do not remove side-effects from
1350 initial expressions in the case of a build-in-place call.
1352 2018-01-11 Piotr Trojanek <trojanek@adacore.com>
1354 * sem_eval.adb (Is_Null_Range): Retrieve the full view when called on a
1355 private (sub)type; refactor to avoid early return statement.
1356 (Not_Null_Range): Same as above.
1358 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
1360 * freeze.adb (Freeze_Entity): Ensure that a Ghost type is not
1361 concurrent, nor effectively volatile.
1362 * ghost.adb (Check_Ghost_Type): New routine.
1363 * ghost.ads (Check_Ghost_Type): New routine.
1364 * sem_util.adb (Is_Declaration): Reimplemented. The routine can now
1365 consider specific subsets of declarations.
1366 (Is_Declaration_Other_Than_Renaming): Removed. Its functionality is
1367 replicated by Is_Declaration.
1368 * sem_util.ads (Is_Declaration): New parameter profile. Update the
1370 (Is_Declaration_Other_Than_Renaming): Removed.
1372 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
1374 * sem_ch5.adb (Analyze_Assignment): Assignments to variables that act
1375 as Part_Of consituents of single protected types are illegal when they
1376 take place inside a protected function.
1377 (Diagnose_Non_Variable_Lhs): Use Within_Function to check for an
1379 (Is_Protected_Part_Of_Constituent): New routine.
1380 (Within_Function): New routine.
1382 2018-01-11 Arnaud Charlet <charlet@adacore.com>
1384 Bump copyright notices to 2018.
1386 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
1388 * binde.adb, par-ch6.adb, par-ch9.adb, sem_ch12.adb, sem_ch13.adb:
1391 2018-01-11 Justin Squirek <squirek@adacore.com>
1393 * par-ch6.adb (Scan_Body_Or_Expression_Function): Add additional check
1394 to make sure a given expression function is properly parenthesized.
1396 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
1398 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Check the
1399 categorization of a subprogram body which does not complete a previous
1402 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
1404 * sem_ch10.adb (Check_Private_Child_Unit): Ensure that the enclosing
1405 scope of package Ada is Standard.
1407 2018-01-11 Ed Schonberg <schonberg@adacore.com>
1409 * sem_ch13.adb (Replace_Type_Ref): Handle properly reference to a
1410 subcomponent of the current entity when building the body for a dynamic
1411 predicate function for a record with composite subcomponents.
1413 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
1415 * exp_aggr.adb (Convert_Aggr_In_Object_Decl): Update the call to
1416 Establish_Transient_Scope.
1417 (Convert_To_Assignments): Update the call to Establish_Transient_Scope.
1418 (Expand_Array_Aggregate): Update the call to Establish_Transient_Scope.
1419 * exp_ch6.adb (Expand_Call_Helper): Update the call to
1420 Establish_Transient_Scope.
1421 (Make_Build_In_Place_Call_In_Object_Declaration): Update the call to
1422 Establish_Transient_Scope.
1423 * exp_ch7.adb (Establish_Transient_Scope): Restructured. Delegate the
1424 management of the secondary stack to an enclosing scope if there is no
1425 suitable construct to wrap, and the transient scope was intended to
1426 manage the secondary stack.
1427 (Find_Node_To_Be_Wrapped): Restructured. A case_statement_alternative
1428 is a valid boundary for a transient expression which comes from the
1429 statements of the alternative, otherwise alternatives cannot be
1430 wrapped. Assignments of controlled objects which have controlled
1431 actions suppressed now stop the traversal as there is no point in
1432 looking for an enclosing construct. Add several N_xxx_Body choices to
1433 the termination conditions for completeness.
1434 * exp_ch7.ads (Establish_Transient_Scope): Update the parameter profile
1435 and the associated comment on usage.
1436 * exp_smem.adb (Add_Shared_Var_Lock_Procs): Update the call to
1437 Establish_Transient_Scope.
1438 (Add_Write_After): Update the call to Establish_Transient_Scope.
1439 * sem_res.adb (Check_Initialization_Call): Removed.
1440 (Resolve_Actuals): Account for additional cases where finalization
1441 actions are required by utilizing predicate Needs_Finalization rather
1443 (Resolve_Call): Type initialization procedures can now utilize
1444 transient scopes to manage the secondary stack, thus preventing leaks
1445 during initialization. Remove the previous kludgy algorithm which
1446 attempts to manage the secondary stack at the object creation site.
1448 2018-01-11 Jerome Lambourg <lambourg@adacore.com>
1450 * libgnat/g-soliop__qnx.ads: New.
1451 * adaint.c, adaint.h, cstreams.c, s-oscons-tmplt.c, sysdep.c: Update
1454 2018-01-11 Bob Duff <duff@adacore.com>
1456 * par-ch9.adb (P_Protected_Operation_Declaration_Opt): Give an error if
1457 a null procedure occurs in a protected definition.
1459 2018-01-11 Bob Duff <duff@adacore.com>
1461 * binderr.ads, namet.ads: Minor reformatting.
1463 2018-01-11 Bob Duff <duff@adacore.com>
1465 * doc/gnat_ugn/gnat_utility_programs.rst: Improve documentation of
1468 2018-01-11 Bob Duff <duff@adacore.com>
1470 * binde.adb (Force_Elab_Order): Give an error if there are duplicate
1473 2018-01-11 Ed Schonberg <schonberg@adacore.com>
1475 * sem_ch6.adb (Freeze_Expr_Types): If an access value is the
1476 controlling argument of a dispatching call. freeze the corresponding
1479 2018-01-11 Ben Brosgol <brosgol@adacore.com>
1481 * doc/Makefile: Add Sphinx option -W to treat warnings as errors.
1483 2018-01-11 Ben Brosgol <brosgol@adacore.com>
1485 * doc/gnat_rm/implementation_defined_aspects.rst: Minor type/wording
1487 * gnat_rm.texi: Regenerate.
1489 2018-01-11 Ed Schonberg <schonberg@adacore.com>
1491 * sem_ch12.adb (Check_Fixed_Point_Type): Do not apply check if the
1492 formsl type corresponding to the actual fixed point type is private,
1493 because in this case there can be no suspicious arithmetic operations
1494 in the generic unless they reference a formal subprogram. Clarify
1497 2018-01-11 Javier Miranda <miranda@adacore.com>
1499 * exp_util.adb (Remove_Side_Effects): No action done for functions
1500 returning class-wide types since it requires generating code using
1501 'reference and the CCG target has no secondary stack.
1502 * gnat1drv.adb: Disable building static dispatch tables when generating
1505 2018-01-11 Piotr Trojanek <trojanek@adacore.com>
1507 * libgnat/a-direio.ads, libgnat/a-sequio.ads, libgnat/a-ststio.ads,
1508 libgnat/a-textio.ads, libgnat/a-witeio.ads, libgnat/a-ztexio.ads
1509 (File_Type): Add Default_Initial_Condition aspect.
1511 2018-01-11 Pascal Obry <obry@adacore.com>
1513 * libgnat/s-os_lib.adb (Normalize_Pathname): New implementation.
1515 2018-01-11 Bob Duff <duff@adacore.com>
1517 * doc/gnat_ugn/gnat_utility_programs.rst: Rewrite gnatpp documentation
1518 to match what the Libadalang-based version does.
1519 * doc/gnat_ugn/about_this_guide.rst: Update reference.
1521 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
1523 * sem_res.adb (Uses_SS): A controlled type requires the secondary stack
1524 if it contains at least one component declaration employing a function
1525 call returning on the secondary stack.
1527 2018-01-11 Yannick Moy <moy@adacore.com>
1529 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
1530 Update description of restriction SPARK_05 with SPARK 2014.
1531 * gnat_rm.texi: Regenerate.
1533 2018-01-11 Vasiliy Fofanov <fofanov@adacore.com>
1535 * doc/gnat_ugn/gnat_utility_programs.rst: Fix layout.
1537 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
1539 * exp_aggr.adb, exp_ch9.adb, exp_util.adb, sem_aggr.adb, sem_ch3.adb,
1540 sem_res.adb, sem_util.adb: Minor reformatting.
1542 2018-01-11 Ed Schonberg <schonberg@adacore.com>
1544 * sem_prag.adb (Analyze_Pragma, case Predicate): Indicate that the type
1545 has a delayed aspect which must be processed at the point the type is
1546 frozen. This mimics what is done when the predicate is provided by a
1549 2018-01-11 Doug Rupp <rupp@adacore.com>
1551 * init.c (vxworks): Add macro checks for __aarch64__.
1553 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
1555 * exp_util.adb (Add_Failure_Expression): New routine.
1556 (Make_Predicate_Check): Reimplement the handling of Predicate_Failure.
1557 * sem_util.adb (Is_Current_Instance): Code cleanup.
1559 2018-01-11 Patrick Bernardi <bernardi@adacore.com>
1561 * libgnat/s-parame*.adb, libgnat/s-parame*.ads: Remove unneeded
1562 Default_Sec_Stack_Size.
1563 * libgnat/s-secsta.adb (SS_Allocate): Handle the fixed secondary stack
1564 limit check so that the integer index does not overflow. Check the
1565 dynamic stack allocation does not cause the secondary stack pointer to
1567 (SS_Info): Align colons.
1568 (SS_Init): Cover the case when bootstraping with an old compiler that
1569 does not set Default_SS_Size.
1571 2018-01-11 Ed Schonberg <schonberg@adacore.com>
1573 * sem_ch3.adb (Add_Internal_Interface_Entities): When checking the
1574 legality of an inherited operation that may require overriding, ignore
1575 primitive_wrappers that correspond to explicit operations that override
1576 an interface primitive.
1577 * exp_util.adb (Build_Class_Wide_Expression, Replace_Entity): If the
1578 operation to which the class-wide expression applies is a protected op.
1579 with a primitive_wrapper, verify that the updated inherited expression
1580 does not contain an internal call to a protected function. This
1581 completes the implementation of AI12-0166.
1583 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
1585 * ali.adb: Document the remaining letters available for ALI lines.
1586 (Scan_ALI): A with clause is internal when it is encoded on a 'Z' line.
1587 * ali.ads: Update type With_Record. Field
1588 Implicit_With_From_Instantiation is no longer in use. Add field
1590 * csinfo.adb (CSinfo): Remove the setup for attribute
1591 Implicit_With_From_Instantiation.
1592 * lib-writ.adb (Collect_Withs): Correct the logic which marks a unit as
1593 either implicitly or explicitly withed.
1594 (Is_Implicit_With_Clause): New routine.
1595 (Write_ALI): Rename array Implicit_With to Has_Implicit_With to avoid
1596 confusion with the with clause attribute by the same name.
1597 (Write_With_Lines): Update the emission of 'W', 'Y', and 'Z' headers.
1598 * rtsfind.adb (Maybe_Add_With): Code cleanup.
1599 * sem_ch8.adb (Present_System_Aux): Code cleanup.
1600 * sem_ch10.adb (Expand_With_Clause): Mark the with clause as generated
1602 (Implicit_With_On_Parent): Mark the with clause as generated for a
1604 * sem_ch12.adb (Inherit_Context): With clauses inherited by an
1605 instantiation are no longer marked as Implicit_With_From_Instantiation
1606 because they are already marked as implicit.
1607 * sem_elab.adb (Ensure_Prior_Elaboration_Static): Remove the kludge
1608 which marks implicit with clauses as related to an instantiation.
1609 * sinfo.adb (Implicit_With_From_Instantiation): Removed.
1610 (Parent_With): New routine.
1611 (Set_Implicit_With_From_Instantiation): Removed.
1612 (Set_Parent_With): New routine.
1613 * sinfo.ads: Update the documentation of attribute Implicit_With.
1614 Remove attribute Implicit_With_From_Instantiation along with
1615 occurrences in nodes. Add attribute Parent_With along with occurrences
1617 (Implicit_With_From_Instantiation): Removed along with pragma Inline.
1618 (Parent_With): New routine along with pragma Inline.
1619 (Set_Implicit_With_From_Instantiation): Removed along with pragma Inline.
1620 (Set_Parent_With): New routine along with pragma Inline.
1622 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
1624 * sem_util.adb (Find_Enclosing_Scope): Return the unique defining
1625 entity when the enclosing construct is a body.
1627 2018-01-11 Patrick Bernardi <bernardi@adacore.com>
1629 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Simplified
1630 Secondary_Stack_Size handling as a pragma is now generated for the
1631 corresponding aspect instead of an attribute. Pragma expression is
1632 relocated instead of evaluated. Discriminant of the corresponding
1633 record type is referenced rather than the type discriminant.
1634 (Create_Secondary_Stack_For_Task, Make_Task_Create_Call): Update
1635 Secondary_Stack_Size rep item checks to only look for the pragma rep.
1636 * sem_ch13.adb (Analyze_One_Aspect): Transform
1637 Aspect_Secondary_Stack_Size into a pragma instead of an attribute
1638 because the attribute does not have visibility on a task type's
1639 discriminants when the type's definition is expanded.
1640 (Analyze_Attribute_Definition_Clause): Remove handling of
1641 Attribute_Secondary_Stack_Size.
1642 * snames.adb-tmpl, snames.ads-tmpl: Remove
1643 Attribute_Secondary_Stack_Size, no longer used.
1645 2018-01-11 Justin Squirek <squirek@adacore.com>
1647 * sem_ch8.adb: Minor comment fix.
1649 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
1651 * exp_ch4.adb (Process_Action): Do not abandon the inspection of an
1652 individual action because the action may denote a complex expression,
1653 such as a case statement, which in turn may contain additional
1656 2018-01-11 Ed Schonberg <schonberg@adacore.com>
1658 * sem_aggr.adb (Resolve_Iterated_Component_Association): Perform
1659 analysis on a copy of the expression with a copy of the index variable,
1660 because full expansion will rewrite construct into a loop with the
1661 original loop variable.
1662 * exp_aggr.adb (Gen_Assign): Defer analysis and resolution if the
1663 expression is an iterated component association. Full analysis takes
1664 place when construct is rewritten as a loop.
1665 (In_Place_Assign_OK, Safe_Component): An iterated_component_association
1666 is not safe for in-place assignment.
1667 * sem_util.adb (Remove_Entity): Handle properly the case of an isolated
1668 entity with no homonym and no other entity in the scope.
1670 2018-01-11 Justin Squirek <squirek@adacore.com>
1672 * sem_prag.adb (Analyze_Pragma:Pragma_Loop_Variant): Modify error
1673 message to be printed on the pragma argument identifier.
1675 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
1677 * exp_util.adb (Build_Invariant_Procedure_Declaration): Set the last
1678 entity of the generated invariant procedure in order to construct a
1679 proper entity chain.
1681 2018-01-11 Piotr Trojanek <trojanek@adacore.com>
1683 * sem_ch13.adb (Build_Predicate_Functions): Fix minor issues in
1686 2018-01-11 Arnaud Charlet <charlet@adacore.com>
1688 * einfo.ads, einfo.adb (Activation_Record_Component,
1689 Set_Activation_Record_Component, Set_Is_Uplevel_Referenced_Entity):
1690 Allow E_Discriminant.
1692 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
1694 * gcc-interface/decl.c (gnat_to_gnu_component_type): Apply the check
1695 for atomic access once the component size is taken into account and
1696 also do it if the component type is Atomic or Volatile_Full_Access.
1698 2018-01-04 Eric Botcazou <ebotcazou@adacore.com>
1700 * gnatvsn.ads: Bump copyright year.
1702 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1703 Alan Hayward <alan.hayward@arm.com>
1704 David Sherwood <david.sherwood@arm.com>
1706 * gcc-interface/misc.c (enumerate_modes): Treat GET_MODE_BITSIZE
1709 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1710 Alan Hayward <alan.hayward@arm.com>
1711 David Sherwood <david.sherwood@arm.com>
1713 * gcc-interface/misc.c (enumerate_modes): Treat GET_MODE_PRECISION
1716 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1717 Alan Hayward <alan.hayward@arm.com>
1718 David Sherwood <david.sherwood@arm.com>
1720 * gcc-interface/utils.c (gnat_types_compatible_p): Handle
1721 polynomial TYPE_VECTOR_SUBPARTS.
1723 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1724 Alan Hayward <alan.hayward@arm.com>
1725 David Sherwood <david.sherwood@arm.com>
1727 * gcc-interface/misc.c (enumerate_modes): Handle polynomial
1730 2018-01-03 Jakub Jelinek <jakub@redhat.com>
1732 Update copyright years.
1734 * gnat_ugn.texi: Bump @copying's copyright year.
1735 * gnat_rm.texi: Likewise.
1737 Copyright (C) 2018 Free Software Foundation, Inc.
1739 Copying and distribution of this file, with or without modification,
1740 are permitted in any medium without royalty provided the copyright
1741 notice and this notice are preserved.