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