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