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