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