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