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