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