[Ada] Fix Default_Storage_Pool aspect handling in generic instantiations
[gcc.git] / gcc / ada / ChangeLog
1 2018-07-16 Ed Schonberg <schonberg@adacore.com>
2
3 * sem_ch12.adb (Analyze_Package_Instantiation): Handle properly an
4 instance that carries an aspect Default_Storage_Pool that overrides a
5 default storage pool that applies to the generic unit. The aspect in
6 the generic unit was removed before copying it in the instance, rather
7 than removing it from the copy of the aspects that are appended to the
8 aspects in the instance.
9
10 2018-07-16 Ed Schonberg <schonberg@adacore.com>
11
12 * einfo.adb (Set_Is_Uplevel_Referenced_Entity): Flag can appear on
13 loop parameters.
14 * exp_ch7.adb (Check_Unnesting_Elaboration_Code): Handle subprogram
15 bodies.
16 * exp_ch9.adb (Reset_Scopes_To): Set the scopes of entities local to an
17 entry body to be the corresponding generated subprogram, for correct
18 analysis of uplevel references.
19 * exp_unst.adb (Visit_Node): Handle properly binary and unary operators
20 Ignore pragmas, fix component associations.
21 (Register_Subprograms): Subprograms in synchronized types must be
22 treated as reachable.
23
24 2018-07-16 Hristian Kirtchev <kirtchev@adacore.com>
25
26 * sem_util.adb (Check_No_Hidden_State): Ignore internally-generated
27 states and variables.
28
29 2018-07-16 Piotr Trojanek <trojanek@adacore.com>
30
31 * sinfo.ads, sinfo.adb (Withed_Body): Remove.
32 (Set_Withed_Body): Remove.
33
34 2018-07-16 Piotr Trojanek <trojanek@adacore.com>
35
36 * sem.adb (Walk_Library_Items): Skip units with configuration pragmas
37 when printing debug info.
38
39 2018-07-16 Piotr Trojanek <trojanek@adacore.com>
40
41 * sem.adb (Walk_Library_Items): Reuse local constant.
42 (Is_Subunit_Of_Main): Turn condition to positive and flip the
43 IF-THEN-ELSE branches; avoid potentially ineffective assignment to the
44 Lib variable.
45
46 2018-07-16 Piotr Trojanek <trojanek@adacore.com>
47
48 * sem.adb (Walk_Library_Items): Deconstruct dead code.
49
50 2018-07-16 Ed Schonberg <schonberg@adacore.com>
51
52 * exp_ch4.adb (Expand_N_Op_Xor): Use common routine
53 Expand_Nonbinary_Modular_Op. Needed for unnesting.
54
55 2018-07-16 Ed Schonberg <schonberg@adacore.com>
56
57 * sem_ch3.adb (Inherit_Predicate_Flags): A non-discrete type may have a
58 static predicate (for example True) but has no
59 static_discrete_predicate.
60
61 2018-07-16 Hristian Kirtchev <kirtchev@adacore.com>
62
63 * exp_attr.adb (Build_Record_VS_Func): Handle corner cases dealing with
64 class-wide types and record extensions.
65
66 2018-07-16 Justin Squirek <squirek@adacore.com>
67
68 * sem_eval.adb (Eval_Integer_Literal): Add exception for avoiding
69 checks on expanded literals within if and case expressions.
70
71 2018-07-16 Hristian Kirtchev <kirtchev@adacore.com>
72
73 * libgnat/s-wchwts.adb (Wide_String_To_String): Use the appropriate
74 longest sequence factor. Code clean up.
75 (Wide_Wide_String_To_String): Use the appropriate longest sequence
76 factor. Code clean up.
77
78 2018-07-16 Javier Miranda <miranda@adacore.com>
79
80 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Report an error
81 on Bit_Order when defined for a record extension.
82
83 2018-07-16 Arnaud Charlet <charlet@adacore.com>
84
85 * libgnat/s-objrea.ads: Minor code clean up.
86
87 2018-07-16 Piotr Trojanek <trojanek@adacore.com>
88
89 * sem_ch3.adb (Process_Discriminants): Adjust reference to the SPARM RM
90 rule.
91
92 2018-07-16 Arnaud Charlet <charlet@adacore.com>
93
94 * adaint.c (__gnat_set_file_time_name): Code clean up.
95
96 2018-07-16 Javier Miranda <miranda@adacore.com>
97
98 * inline.adb (Build_Body_To_Inline): Minor code reorganization that
99 ensures that calls to function Has_Single_Return() pass a decorated
100 tree.
101 (Has_Single_Return.Check_Return): Peform checks on entities (instead on
102 relying on their characters).
103
104 2018-07-16 Javier Miranda <miranda@adacore.com>
105
106 * exp_ch5.adb (Expand_Iterator_Loop_Over_Array): Code cleanup. Required
107 to avoid generating an ill-formed tree that confuses gnatprove causing
108 it to blowup.
109
110 2018-07-16 Yannick Moy <moy@adacore.com>
111
112 * inline.adb (Has_Single_Return): Rewrap comment.
113
114 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
115
116 * einfo.ads: Minor tweak in comment.
117
118 2018-07-16 Javier Miranda <miranda@adacore.com>
119
120 * sem_ch4.adb (Analyze_Membership_Op): Code cleanup.
121
122 2018-07-16 Javier Miranda <miranda@adacore.com>
123
124 * exp_attr.adb (Expand_N_Attribute_Reference ['Count]): Do not
125 transform 'Count into a function call if the current scope has been
126 eliminated.
127
128 2018-07-16 Javier Miranda <miranda@adacore.com>
129
130 * sem_util.ads, sem_util.adb (Has_Prefix): Move this function to the
131 public part of this package.
132
133 2018-07-16 Yannick Moy <moy@adacore.com>
134
135 * sem_res.adb (Resolve_Call): Do not inline calls inside
136 compiler-generated functions translated as predicates in GNATprove.
137
138 2018-07-16 Gary Dismukes <dismukes@adacore.com>
139
140 * exp_ch4.adb (Expand_N_Allocator): Test for Storage_Pool being RTE in
141 addition to the existing test for no Storage_Pool as a condition
142 enabling generation of the call to Check_Standard_Allocator when the
143 restriction No_Standard_Allocators_After_Elaboration is active.
144 * libgnat/s-elaall.ads (Check_Standard_Allocator): Correct comment to
145 say that Storage_Error will be raised (rather than Program_Error).
146 * libgnat/s-elaall.adb (Check_Standard_Allocator): Raise Storage_Error
147 rather than Program_Error when Elaboration_In_Progress is False.
148
149 2018-07-16 Gary Dismukes <dismukes@adacore.com>
150
151 * sem_eval.adb: Fix spelling for compile-time-known.
152
153 2018-07-16 Hristian Kirtchev <kirtchev@adacore.com>
154
155 * sem_eval.adb (Compile_Time_Known_Value): Add a guard which prevents
156 the compiler from entering infinite recursion when trying to determine
157 whether a deferred constant has a compile time known value, and the
158 initialization expression of the constant is a reference to the
159 constant itself.
160
161 2018-07-16 Nicolas Roche <roche@adacore.com>
162
163 * libgnat/a-strunb.adb, libgnat/a-strunb__shared.adb: Adjust growth
164 factor from 1/32 to 1/2 for Unbounded_String.
165
166 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
167
168 * gcc-interface/lang.opt (funsigned-char): New option.
169 * gcc-interface/misc.c (gnat_handle_option): Accept it.
170 * gcc-interface/utils.c (finish_character_type): Tweak comment.
171
172 2018-07-07 Eric Botcazou <ebotcazou@adacore.com>
173
174 * gcc-interface/decl.c (gnat_to_gnu_entity): Add GNAT_DECL local
175 variable and use it throughout.
176 <E_Variable>: If the nominal subtype of the object is unconstrained,
177 compute the Ada size separately and put in on the padding type if the
178 size is not fixed.
179 <E_Record_Type>: Minor tweak.
180 * gcc-interface/misc.c (gnat_type_max_size): Rename max_size_unit
181 into max_size_unit throughout.
182
183 2018-07-07 Eric Botcazou <ebotcazou@adacore.com>
184
185 * gcc-interface/gigi.h (add_decl_expr): Adjust prototype.
186 * gcc-interface/decl.c (gnat_to_gnu_entity): Remove useless test.
187 * gcc-interface/trans.c (add_stmt_with_node): Remove exceptions.
188 (add_decl_expr): Change type of second parameter and rename it.
189 (renaming_from_instantiation_p): New function moved from...
190 (set_expr_location_from_node): Test for exceptions here and add one
191 for actual subtypes built for unconstrained composite actuals.
192 * gcc-interface/utils.c (renaming_from_instantiation_p): ...here.
193
194 2018-07-07 Eric Botcazou <ebotcazou@adacore.com>
195
196 * gcc-interface/trans.c (lvalue_required_p): Remove ALIASED parameter
197 and adjust recursive calls.
198 (Identifier_to_gnu): Adjust calls to lvalue_required_p.
199 (gnat_to_gnu): Likewise.
200
201 2018-07-07 Eric Botcazou <ebotcazou@adacore.com>
202
203 * gcc-interface/decl.c (gnat_to_gnu_param): Minor tweak.
204 (gnat_to_gnu_subprog_type): New pure_flag local variable. Set it for
205 a pure Ada function with a by-ref In parameter. Propagate it onto the
206 function type by means of the TYPE_QUAL_RESTRICT flag.
207 * gcc-interface/utils.c (finish_subprog_decl): Set DECL_PURE_P if the
208 function type has the TYPE_QUAL_RESTRICT flag set.
209
210 2018-07-06 Jim Wilson <jimw@sifive.com>
211
212 * Makefile.rtl: Add riscv*-linux* support.
213 * libgnarl/s-linux__riscv.ads: New.
214 * libgnat/system-linux-riscv.ads: New.
215
216 * Make-generated.in (treeprs.ads): Use $(GNATMAKE) instead of gnatmake.
217 (einfo.h, sinfo.h, stamp-snames, stamp-nmake): Likewise.
218 * gcc-interface/Makefile.in (xoscons): Likewise.
219
220 2018-07-06 Sebastian Huber <sebastian.huber@embedded-brains.de>
221
222 * libgnat/system-rtems.ads (Frontend_Exceptions): Set to False.
223 (ZCX_By_Default): Set to True.
224
225 2018-07-02 Martin Liska <mliska@suse.cz>
226
227 * gnatvsn.ads: Bump Library_Version to 9.
228
229 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
230
231 * gcc-interface/ada-tree.h (TYPE_RETURN_BY_DIRECT_REF_P): Change from
232 using TYPE_LANG_FLAG_4 to using TYPE_LANG_FLAG_0.
233 (TYPE_ALIGN_OK): Move around.
234 (TYPE_PADDING_FOR_COMPONENT): Remove superfluous parentheses.
235 * gcc-interface/decl.c (change_qualified_type): Move to...
236 (gnat_to_gnu_entity): Adjust comment.
237 * gcc-interface/gigi.h (change_qualified_type): ...here; make inline.
238 (ceil_pow2): Use ceil_log2.
239 * gcc-interface/utils.c (finish_subprog_decl): Add couple of comments
240 and do not set TREE_SIDE_EFFECTS.
241 (handle_noreturn_attribute): Use change_qualified_type.
242
243 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
244
245 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: Do not get
246 the expression of a dispatch table that is not being defined.
247 <E_Record_Subtype>: Remove obsolete kludge.
248
249 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
250
251 * gcc-interface/decl.c (warn_on_field_placement): Use specific wording
252 for discriminants.
253 (warn_on_list_placement): New static function.
254 (components_to_record): Use it to warn on multiple fields in list.
255
256 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
257
258 * gcc-interface/decl.c (variant_desc): Add AUX field.
259 (gnat_to_gnu_entity) <discrete_type>: Do not call compute_record_mode
260 directly.
261 (reverse_sort_field_list): New static function.
262 (components_to_record): Place the variant part at the beginning of the
263 field list when there is an obvious order of increasing position.
264 (build_variant_list): Initialize it.
265 (create_variant_part_from): Do not call compute_record_mode directly.
266 (copy_and_substitute_in_layout): Likewise. Always sort the fields with
267 fixed position in order of increasing position, in the record and all
268 the variants, in any. Call reverse_sort_field_list.
269 * gcc-interface/utils.c (make_packable_type): Compute the sizes before
270 calling finish_record_type. Do not call compute_record_mode directly.
271 (finish_record_type): Overhaul final processing depending on REP_LEVEL
272 and call finish_bitfield_layout if it is equal to one or two.
273
274 2018-06-11 Eric Botcazou <ebotcazou@adacore.com>
275
276 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Reuse the
277 existing fields of a dummy fat pointer type, if any. Clear the
278 TYPE_DECL_SUPPRESS_DEBUG on the fat pointer type after completing it.
279
280 2018-06-11 Hristian Kirtchev <kirtchev@adacore.com>
281
282 * contracts.adb (Process_Body_Postconditions): Expand only checked
283 postconditions.
284 (Process_Contract_Cases_For): Expand only checked contract cases.
285 (Process_Inherited_Preconditions): Ignored class-wide preconditions are
286 partially expanded because some of their semantic checks are tied to
287 the expansion.
288 (Process_Preconditions_For): Expand only checked preconditions.
289 (Process_Spec_Postconditions): Expand only checked preconditions.
290 Ignored class-wide preconditions are partially expanded because some of
291 their semantic checks are tied to the expansion.
292 * exp_prag.adb (Expand_N_Pragma): Suppress the expansion of ignored
293 assertion pragmas.
294 * exp_util.adb (Add_Inherited_Invariants): Code clean up.
295 * sem_util.adb (Propagate_Invariant_Attributes): Code clean up.
296
297 2018-06-11 Hristian Kirtchev <kirtchev@adacore.com>
298
299 * exp_ch9.adb, exp_unst.adb, inline.adb, libgnat/a-ciorma.adb,
300 libgnat/a-ciormu.adb, libgnat/a-ciorse.adb, libgnat/a-coorma.adb,
301 libgnat/a-coormu.adb, libgnat/a-coorse.adb, sem_prag.adb: Minor
302 reformatting.
303
304 2018-06-11 Gary Dismukes <dismukes@adacore.com>
305
306 * exp_unst.ads, exp_unst.adb: Typo fixes and minor reformatting.
307
308 2018-06-11 Hristian Kirtchev <kirtchev@adacore.com>
309
310 * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call): Do
311 not add any actuals when the size of the object is known, and the
312 caller will allocate it.
313 (Build_Heap_Allocator): Rename to Build_Heap_Or_Pool_Allocator to
314 better illustrate its functionality. Update the comment on the
315 generated code. Generate a branch for the heap and pool cases where
316 the object is not necessarity controlled.
317 (Expand_N_Extended_Return_Statement): Expand the extended return
318 statement into four branches depending the requested mode if the caller
319 will not allocate the object on its side.
320 (Make_Build_In_Place_Call_In_Allocator): Do not allocate a controlled
321 object on the caller side because this will violate the semantics of
322 finalizable types. Instead notify the function to allocate the object
323 on the heap or a user-defined storage pool.
324 (Needs_BIP_Alloc_Form): A build-in-place function needs to be notified
325 which of the four modes to employ when returning a limited controlled
326 result.
327 * exp_util.adb (Build_Allocate_Deallocate_Proc): Remove a redundant
328 guard which is already covered in Needs_Finalization.
329
330 2018-06-11 Olivier Hainque <hainque@adacore.com>
331
332 * libgnat/s-excmac*.ads: Factorize Unwind_Action definitions ...
333 * libgnat/a-exexpr.adb: ... Here, then add comments describing the
334 major datastructures associated with the current exception raised.
335 (Setup_Current_Excep): Accept a "Phase" argument conveying the
336 unwinding phase during which this subprogram is called. For an Ada
337 exception, don't update the current exception buffer from the raised
338 exception object during SEARCH_PHASE, as this is redundant with the
339 call now issued just before propagation starts.
340 (Propagate_GCC_Exception): Move call to Setup_Current_Excep ahead of
341 the unwinding start, conveying Phase 0.
342 (Unhandled_Except_Handler): Pass UA_CLEANUP_PHASE as the Phase value on
343 the call to Setup_Current_Excep.
344 * raise-gcc.c (personality_body): Pass uw_phases as the Phase argument
345 on calls to Setup_Current_Excep.
346
347 2018-06-11 Ed Schonberg <schonberg@adacore.com>
348
349 * exp_unst.ads, exp_unst.adb (Needs_Fat_Pointer,
350 Build_Access_Type_Decl): New subprograms to handle uplevel references
351 to formals of an unconstrained array type. The activation record
352 component for these is an access type, and the reference is rewritten
353 as an explicit derefenrence of that component.
354
355 2018-06-11 Bob Duff <duff@adacore.com>
356
357 * libgnat/a-ciorma.adb, libgnat/a-ciormu.adb, libgnat/a-ciorse.adb,
358 libgnat/a-coorma.adb, libgnat/a-coormu.adb, libgnat/a-coorse.adb:
359 (Element): Add code to detect dangling cursors in some cases.
360
361 2018-06-11 Yannick Moy <moy@adacore.com>
362
363 * sem_ch6.adb (Build_Subprogram_Declaration): Mark parameters as coming
364 from source.
365
366 2018-06-11 Ed Schonberg <schonberg@adacore.com>
367
368 * sem_ch13.adb (Build_Predicate_Functions): For a derived type, ensure
369 that its parent is already frozen so that its predicate function, if
370 any, has already been constructed.
371
372 2018-06-11 Yannick Moy <moy@adacore.com>
373
374 * sem_prag.adb (Check_Mode_Restriction_In_Enclosing_Context): Adapt for
375 possible task unit as the enclosing context.
376
377 2018-06-11 Eric Botcazou <ebotcazou@adacore.com>
378
379 * gnat1drv.adb: Remove use clause for Repinfo.
380 (Gnat1drv): Beef up comment about the interplay between -gnatc and
381 back-end annotations. Use full qualified name for List_Rep_Info.
382
383 2018-06-11 Hristian Kirtchev <kirtchev@adacore.com>
384
385 * libgnat/g-arrspl.ads: Add pragma Preelaborate.
386
387 2018-06-11 Arnaud Charlet <charlet@adacore.com>
388
389 * exp_ch4.adb (Expand_Record_Equality): Remove extraneous "True and
390 then" and general logical "ada" in codepeer mode.
391
392 2018-06-11 Javier Miranda <miranda@adacore.com>
393
394 * exp_ch9.adb (Expand_N_Protected_Body): Add missing handling of
395 N_Call_Marker nodes.
396
397 2018-06-11 Arnaud Charlet <charlet@adacore.com>
398
399 * exp_ch3.adb, exp_unst.adb, inline.adb, sem_prag.adb: Minor
400 reformatting.
401
402 2018-06-11 Yannick Moy <moy@adacore.com>
403
404 * doc/gnat_rm/implementation_defined_pragmas.rst: Add Suppressible
405 argument to Assertion_Policy
406 * gnat_rm.texi: Regenerate.
407
408 2018-06-11 Yannick Moy <moy@adacore.com>
409
410 * gnat1drv.adb: Do not check representation information in CodePeer and
411 GNATprove modes, as these modes call a special backend instead of gigi,
412 so do not have the information.
413
414 2018-06-11 Yannick Moy <moy@adacore.com>
415
416 * inline.adb (Build_Body_To_Inline): Consider case of extended return
417 of unconstrained type as one case where inlining is not supported.
418 (Expand_Inlined_Call): Remove special case for body as extended return
419 of unconstrained type.
420
421 2018-06-11 Yannick Moy <moy@adacore.com>
422
423 * sem_prag.adb (Analyze_Part_Of): Only allow Part_Of on non-generic
424 unit.
425 (Check_Missing_Part_Of): Do not force Part_Of on generic unit.
426
427 2018-06-11 Piotr Trojanek <trojanek@adacore.com>
428
429 * sem_ch13.adb (Analyze_Aspect_Specifications): Don't split AND THEN
430 expressions in Pre/Post contracts while in GNATprove_Mode.
431
432 2018-06-11 Piotr Trojanek <trojanek@adacore.com>
433
434 * sem_util.adb (Is_Potentially_Unevaluated): Fix detection of contracts
435 with AND THEN expressions broken down into individual conjuncts.
436
437 2018-06-11 Ed Schonberg <schonberg@adacore.com>
438
439 * exp_ch7.adb (Check_Unnesting_Elaboration_Code): Add guard.
440
441 2018-06-11 Ed Schonberg <schonberg@adacore.com>
442
443 * exp_unst.adb (Visit_Node): Skip generic associations.
444
445 2018-06-11 Arnaud Charlet <charlet@adacore.com>
446
447 * libgnat/memtrack.adb (fwrite): Remove second definition.
448
449 2018-06-11 Javier Miranda <miranda@adacore.com>
450
451 * sinfo.ads (Is_Dynamic_Coextension): Adding documentation.
452 (Is_Static_Coextension): Adding documentation.
453 * sinfo.adb (Is_Dynamic_Coextension): Extending the assertion.
454 (Is_Static_Coextension): Extending the assertion.
455 * sem_util.adb (Mark_Allocator): Clear Is_Static_Coextension when
456 setting flag Is_Dynamic_Coextension (and vice versa).
457
458 2018-06-11 Ed Schonberg <schonberg@adacore.com>
459
460 * exp_unst.adb (Search_Subprograms): Handle explicitly stubs at the top
461 level of a compilation unit, becuase they may contain nested
462 subprograms that need an activation record.
463
464 2018-06-11 Arnaud Charlet <charlet@adacore.com>
465
466 * Makefile.rtl: Compile Ada files with $(ADAC) instead of $(CC).
467
468 2018-06-11 Hristian Kirtchev <kirtchev@adacore.com>
469
470 * exp_ch11.adb, exp_unst.adb, inline.adb, sem_ch12.adb, sem_util.adb:
471 Minor reformatting.
472 * sinfo.ads: Fix a typo.
473
474 2018-06-11 Ed Schonberg <schonberg@adacore.com>
475
476 * inline.adb (Expand_Inlined_Call): If no optimization level is
477 specified, the expansion of a call to an Inline_Always function is
478 fully performed in the front-end even on a target that support back-end
479 inlining.
480
481 2018-06-11 Arnaud Charlet <charlet@adacore.com>
482
483 * bindgen.adb (Gen_Adainit): Protect reference to System.Parameters
484 with Sec_Stack_Used.
485
486 2018-06-11 Hristian Kirtchev <kirtchev@adacore.com>
487
488 * sem_ch8.adb (Find_Direct_Name): Mode the declaration of
489 Is_Assignment_LHS further in. Use predicate
490 Needs_Variable_Reference_Marker to determine whether to create a
491 variable marker.
492 (Find_Expanded_Name): Mode the declaration of Is_Assignment_LHS further
493 in. Use predicate Needs_Variable_Reference_Marker to determine whether
494 to create a variable marker.
495 * sem_elab.adb (Build_Variable_Reference_Marker): Remove the various
496 checks that determine whether the identifier or expanded name is a
497 suitable variable reference. The checks are now performed by
498 Needs_Variable_Reference_Marker.
499 * sem_res.adb (Resolve_Actuals): Use predicate
500 Needs_Variable_Reference_Marker to determine whether to create a
501 variable marker.
502 * sem_util.adb (Needs_Variable_Reference_Marker): New routine.
503 * sem_util.ads (Needs_Variable_Reference_Marker): New routine.
504
505 2018-06-11 Valentine Reboul <reboul@adacore.com>
506
507 * doc/gnat_rm.rst, doc/gnat_ugn.rst: Rename "GPL Edition" into
508 "Community Edition".
509
510 2018-06-11 Ed Schonberg <schonberg@adacore.com>
511
512 * sem_ch12.adb (Install_Body): In order to determine the placement of
513 the freeze node for an instance of a generic nested within another
514 instance, take into account that the outer instance may be declared in
515 the visible part of a package and the inner intance may be in the
516 private part of the same package.
517
518 2018-06-11 Eric Botcazou <ebotcazou@adacore.com>
519
520 * errout.adb (Special_Msg_Delete): Remove handling of Atomic and VFA.
521
522 2018-06-11 Nicolas Roche <roche@adacore.com>
523
524 * libgnat/s-valuti.adb (Bad_Value): Ensure that we do not generate a
525 stack overflow while raising a constraint error.
526
527 2018-06-11 Eric Botcazou <ebotcazou@adacore.com>
528
529 * repinfo.ads (Rep_Value): Use a single line.
530 * repinfo.adb (Rep_Value): Likewise.
531 (List_Attr): Do not use string concatenation.
532
533 2018-06-11 Ed Schonberg <schonberg@adacore.com>
534
535 * exp_unst.adb (Visit_Node): Check reference to formal parameter of
536 current procedure, because the bounds of its type may be uplevel
537 references.
538
539 2018-06-02 Eric Botcazou <ebotcazou@adacore.com>
540
541 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: If this is
542 not a definition, retrieve the expression only if it's a compile-time
543 known value if we are just annotating types.
544
545 * gcc-interface/utils.c (convert): Do not try to upcast properly for a
546 conversion between tagged types in type_annotate_only mode.
547
548 2018-06-02 Eric Botcazou <ebotcazou@adacore.com>
549
550 * gcc-interface/ada-tree.h (TYPE_PADDING_FOR_COMPONENT): New macro.
551 * gcc-interface/decl.c (gnat_to_gnu_component_type): Cache the padding
552 type built for an aliased component with variable size.
553
554 2018-05-31 Pierre-Marie de Rodat <derodat@adacore.com>
555
556 * doc/gnat_ugn/project-manager-figure.png: Delete.
557
558 2018-05-31 Pierre-Marie de Rodat <derodat@adacore.com>
559
560 * vxworks-arm-link.spec, vxworks-e500-link.spec,
561 vxworks-gnat-crtbe-link.spec, vxworks-smp-arm-link.spec,
562 vxworks-smp-e500-link.spec, vxworks-smp-ppc-link.spec,
563 vxworks-smp-x86-link.spec: New files.
564
565 2018-05-31 Pierre-Marie de Rodat <derodat@adacore.com>
566
567 * gnatvsn.adb: Re-center the copyright header.
568 * indepsw-darwin.adb: Adjust the starting copyright year to 2011.
569
570 2018-05-31 Fedor Rybin <frybin@adacore.com>
571
572 * doc/gnat_ugn/gnat_utility_programs.rst: Document Stubs_Subdir in
573 gnattest section on user guide.
574
575 2018-05-31 Ed Schonberg <schonberg@adacore.com>
576
577 * sem_res.adb (Resolve_String_Literal): If the type is a string type
578 whose component subtype has a static predicate, ensure that the
579 predicate is applied to each character by expanding the string into the
580 equivalent aggregate. This is also done if the component subtype is
581 constrained.
582
583 2018-05-31 Eric Botcazou <ebotcazou@adacore.com>
584
585 * gcc-interface/trans.c (Call_to_gnu): Remove obsolete code.
586
587 2018-05-31 Piotr Trojanek <trojanek@adacore.com>
588
589 * sem_ch6.adb (Check_Missing_Return): Handle procedures with no
590 explicit spec.
591
592 2018-05-31 Eric Botcazou <ebotcazou@adacore.com>
593
594 * gcc-interface/trans.c (Call_to_gnu): In the by-reference case, if
595 the type of the parameter is an unconstrained array type, convert
596 to the type of the actual before the type of the formal only if the
597 conversion was suppressed earlier. Use in_param and gnu_actual_type
598 local variables throughout, and uniform spelling for In Out or Out.
599 Also remove dead code in the component-by-reference case.
600
601 2018-05-31 Frederic Konrad <konrad@adacore.com>
602
603 * tracebak.c (STOP_FRAME): Harden condition.
604 (is_return_from, EXTRA_STOP_CONDITION): New helpers for VxWorks in RTP
605 mode.
606
607 2018-05-31 Ed Schonberg <schonberg@adacore.com>
608
609 * checks.adb (Apply_Discriminant_Check): Do not apply discriminant
610 check to a call to a build-in-place function, given that the return
611 object is limited and cannot be copied.
612
613 2018-05-31 Olivier Hainque <hainque@adacore.com>
614
615 * libgnat/s-atopri.ads: Update comment on __atomic_compare_exchange
616 builtins.
617
618 2018-05-31 Eric Botcazou <ebotcazou@adacore.com>
619
620 * gcc-interface/trans.c (Call_to_gnu): If this is a function call and
621 there is no target, also create a temporary for the return value for
622 an allocator if the type is an unconstrained record type with default
623 discriminant.
624
625 2018-05-31 Hristian Kirtchev <kirtchev@adacore.com>
626
627 * exp_ch7.adb (Find_Transient_Context): An iteration scheme is a valid
628 boudary for a transient scope.
629
630 2018-05-31 Valentine Reboul <reboul@adacore.com>
631
632 * gnatvsn.ads: Rename "GPL" version to "Community".
633
634 2018-05-31 Ed Schonberg <schonberg@adacore.com>
635
636 * einfo.ads: Improve documentation for the Is_Unsigned_Type entity
637 flag.
638
639 2018-05-31 Piotr Trojanek <trojanek@adacore.com>
640
641 * sem_prag.adb (Analyze_Pragma): Replace call to Unique_Defining_Entity
642 with a semantically equivalent call to Defining_Entity.
643
644 2018-05-31 Piotr Trojanek <trojanek@adacore.com>
645
646 * sem_prag.adb (Analyze_Pragma): Set Etype on the rewritten
647 Max_Queue_Length expression.
648
649 2018-05-31 Sergey Rybin <rybin@adacore.com>
650
651 * doc/gnat_ugn/gnat_and_program_execution.rst: gnatelim does not need
652 that the main unit to be built before the call, now it computes the
653 closure of the main unit itself.
654 * gnat_ugn.texi: Regenerate.
655
656 2018-05-31 Eric Botcazou <ebotcazou@adacore.com>
657
658 * repinfo.adb (List_Structural_Record_Layout): Set First to false
659 after having listed the fields of the parent type, if any.
660
661 2018-05-31 Eric Botcazou <ebotcazou@adacore.com>
662
663 * gcc-interface/decl.c (gnat_to_gnu_entity) <discrete_type>: Do not
664 deal with the ___XP suffix for packed array types here...
665 <E_Array_Subtype>: ...or here when processing the implementation type
666 but when processing the original type instead. Do not reuse the DECL
667 of the implementation type for the original type. Tidy up.
668
669 2018-05-31 Eric Botcazou <ebotcazou@adacore.com>
670
671 * einfo.ads (Object_Size_Clause): Declare.
672 * einfo.adb (Object_Size_Clause): New function.
673 * gcc-interface/utils.c (maybe_pad_type): Test Has_Size_Clause before
674 retrieving Size_Clause and post the warning on the object size clause
675 if Has_Object_Size_Clause is true.
676
677 2018-05-31 Javier Miranda <miranda@adacore.com>
678
679 * sem_util.ads, sem_util.adb (Find_Primitive_Eq): New subprogram.
680 * exp_ch4.adb (Expand_Composite_Equality): Use the new subprogram
681 Find_Primitive_Eq to search for the primitive of types whose underlying
682 type is a tagged type.
683
684 2018-05-31 Yannick Moy <moy@adacore.com>
685
686 * sem_prag.adb (Analyze_Pragma.Check_Loop_Pragma_Placement): Inverse
687 order of treatment between nodes recognized as loop pragmas (or
688 generated from one) and block statements.
689
690 2018-05-31 Doug Rupp <rupp@adacore.com>
691
692 * libgnat/s-osprim__posix2008.adb (Clock): Implement using
693 clock_gettime.
694
695 2018-05-31 Ed Schonberg <schonberg@adacore.com>
696
697 * exp_unst.ads, exp_unst.adb (In_Synchronized_Unit): New predicate to
698 mark subprograms that cannot be eliminated because they must be treated
699 as reachable from outside the current unit. This includes entry bodies
700 and protected operations.
701
702 2018-05-31 Ed Schonberg <schonberg@adacore.com>
703
704 * exp_ch4.adb (Expand_Modular_Addition, Expand_Modular_Subtraction):
705 Convert all operands of the generated code to Standard.Unsigned, to
706 prevent spurious visibility errors. This is needed when the generated
707 expansion involves a modular index type of an array type, and the index
708 type is not immediately visible.
709
710 2018-05-30 Piotr Trojanek <trojanek@adacore.com>
711
712 * einfo.ads (Package_Instantiation): Update comment after a routine
713 that uses this field has been renamed.
714
715 2018-05-30 Ed Schonberg <schonberg@adacore.com>
716
717 * exp_ch11.adb (Replace_Raise_By_Goto): The transfomation is legal even
718 if the local raise statement includes a string expression. This
719 expression might be picked up by an outer handler or discarded, but
720 plays no role in this transformation.
721
722 2018-05-30 Hristian Kirtchev <kirtchev@adacore.com>
723
724 * exp_aggr.adb, exp_unst.adb, freeze.adb, libgnat/a-direct.adb: Minor
725 reformatting.
726
727 2018-05-30 Ed Schonberg <schonberg@adacore.com>
728
729 * exp_unst.adb (Visit_Node): Handle the semantic Procedure_To_Call
730 field in relevant nodes: Allocate, Free, and return statements.
731
732 2018-05-30 Ed Schonberg <schonberg@adacore.com>
733
734 * exp_unst.adb (Visit_Node): Do not traverse a Component_Association
735 that has not been analyzed, as will be the case for a nested aggregate
736 that is expanded into individual assignments.
737
738 2018-05-30 Justin Squirek <squirek@adacore.com>
739
740 * aspects.adb, aspects.ads: Register new aspect.
741 * par-prag.adb (Prag): Register new pragma.
742 * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing for new
743 aspect similar to Aspect_Max_Queue_Length.
744 * sem_prag.adb, sem_prag.ads (Analyze_Pragma): Register new pragma and
745 set it to use the same processing as Pragma_Max_Queue_Length.
746 * snames.ads-tmpl: Move definition of Name_Max_Entry_Queue_Depth so
747 that it can be processed as a pragma in addition to a restriction and
748 add an entry for the pragma itself.
749
750 2018-05-30 Ed Schonberg <schonberg@adacore.com>
751
752 * freeze.adb (Freeze_Object_Declaration): A pragma Thread_Local_Storage
753 is now legal on a variable of composite type initialized with an
754 aggregate that is fully static and requires no elaboration code.
755 * exp_aggr.adb (Convert_To_Positional): Recognize additional cases of
756 nested aggregates that are compile-time static, so they can be used to
757 initialize variables declared with Threqd_Local_Storage.
758 * doc/gnat_rm/implementation_defined_pragmas.rst: Add documentation on
759 Thread_Local_Storage.
760 * gnat_rm.texi: Regenerate.
761
762 2018-05-30 Yannick Moy <moy@adacore.com>
763
764 * sem_util.adb (Policy_In_Effect): Take into account CodePeer and
765 GNATprove modes.
766
767 2018-05-30 Justin Squirek <squirek@adacore.com>
768
769 * libgnat/a-direct.adb, libgnat/a-direct.ads (Name_Case_Equivalence):
770 Add implementation.
771 (Start_Search): Modify to use Start_Search_Internal
772 (Start_Search_Internal): Add to break out an extra flag for searching
773 case insensative due to the potential for directories within the same
774 OS to allow different casing schemes.
775 * sysdep.c (__gnat_name_case_equivalence): Add as a default fallback
776 for when the more precise solution fails.
777
778 2018-05-30 Hristian Kirtchev <kirtchev@adacore.com>
779
780 * checks.adb, exp_ch5.adb, exp_ch7.adb, exp_unst.adb, sem_eval.adb:
781 Minor reformatting.
782
783 2018-05-30 Pascal Obry <obry@adacore.com>
784
785 * libgnat/g-comlin.ads (Value_Callback, Define_Switch): New.
786 * libgnat/g-comlin.adb: Add corresponding implementation.
787
788 2018-05-30 Gary Dismukes <dismukes@adacore.com>
789
790 * sem_res.adb, sem_util.adb: Fix several typos.
791
792 2018-05-30 Olivier Hainque <hainque@adacore.com>
793
794 * vx_crtbegin_attr.c (CTOR_ATTRIBUTE, DTOR_ATTRIBUTE): Empty.
795 (eh_registration_ctors, eh_registration_tors): New static variables,
796 forced in a .ctors/.dtors section, respectively, with priority.
797
798 2018-05-30 Bob Duff <duff@adacore.com>
799
800 * aspects.ads, contracts.adb, exp_util.adb, expander.adb, expander.ads,
801 freeze.adb, inline.adb, lib-xref.adb, sem.ads, sem_aggr.adb,
802 sem_attr.adb, sem_ch13.adb, sem_ch3.adb, sem_ch5.adb, sem_ch6.adb,
803 sem_ch8.adb, sem_dim.adb, sem_elab.adb, sem_res.adb, sem_res.ads,
804 sinfo.ads: Spell preanalysis, preanalyze correctly.
805
806 2018-05-30 Bob Duff <duff@adacore.com>
807
808 * libgnat/g-sestin.ads: Rework documentation comments.
809
810 2018-05-30 Piotr Trojanek <trojanek@adacore.com>
811
812 * errout.adb, exp_aggr.adb, exp_ch7.adb, exp_util.adb, lib.adb,
813 sem_ch13.adb, sem_ch4.adb, sem_res.adb, sem_util.adb
814 (Has_Original_Node): Refactor to use Is_Rewrite_Substitution.
815
816 2018-05-30 Piotr Trojanek <trojanek@adacore.com>
817
818 * sem_prag.adb (Analyze_Pragma): Remove conjuncts that are always true.
819
820 2018-05-30 Hristian Kirtchev <kirtchev@adacore.com>
821
822 * sem_util.adb (Is_Atomic_Object): Cleaned up. Split the entity logic
823 in a separate routine.
824 (Is_Atomic_Object_Entity): New routine.
825 (Is_Atomic_Prefix): Cleaned up.
826 (Is_Synchronized_Object): Check that the object is atomic, or its type
827 is atomic.
828 (Object_Has_Atomic_Components): Removed.
829 * sem_util.ads (Is_Atomic_Object): Reword the comment on usage.
830 (Is_Atomic_Object_Entity): New routine.
831
832 2018-05-30 Ed Schonberg <schonberg@adacore.com>
833
834 * sem_ch3.adb (Access_Subprogram_Declaration): The flag
835 Needs_Activation_Record is only needed on a subprogram type, not on a
836 pointer to such.
837 * sem_res.adb (Resolve_Selected_Component): If the context type and the
838 component type are anonymous access to subprograms, use the component
839 type to obtain the proper value of Needs_Activation_Record flag for the
840 expression.
841
842 2018-05-30 Eric Botcazou <ebotcazou@adacore.com>
843
844 * gcc-interface/trans.c (gnat_to_gnu) <N_Assignment_Statement>: Add
845 comment about the memset case.
846
847 2018-05-30 Bob Duff <duff@adacore.com>
848
849 * exp_ch5.adb (Expand_Formal_Container_Element_Loop): Remove the code
850 to analyze the Elmt_Decl, because it gets analyzed in the wrong scope.
851 We need to analyze it as part of analyzing the block, so that if the
852 call to Element that initializes Elmt_Decl returns on the secondary
853 stack, the block will ss_mark/ss_release. This block is inside the
854 loop; we don't want to leak memory until the loop exits. The purpose
855 of analyzing Elmt_Decl first was to catch the error of modifying it,
856 which is illegal because it's a loop parameter. The above causes us to
857 miss that error. Therefore, we add a flag Is_Loop_Parameter, and set
858 it on the Element entity, so we end up with an E_Variable node with the
859 flag set.
860 * einfo.ads, einfo.adb (Is_Loop_Parameter): New flag.
861 * sem_ch5.adb (Diagnose_Non_Variable_Lhs): Give the "assignment to loop
862 parameter not allowed" error if Is_Loop_Parameter.
863 * sem_util.adb (Is_Variable): Return False if Is_Loop_Parameter, to
864 trigger the call to Diagnose_Non_Variable_Lhs.
865
866 2018-05-30 Arnaud Charlet <charlet@adacore.com>
867
868 * checks.adb (Apply_Scalar_Range_Check):
869 * sem_eval.adb (Check_Non_Static_Context, Out_Of_Range): Ignore out of
870 range values for System.Priority in CodePeer mode since the actual
871 target compiler may provide a wider range.
872
873 2018-05-30 Ed Schonberg <schonberg@adacore.com>
874
875 * exp_unst.adb: Search specification of main unit as well, for
876 unnesting.
877
878 2018-05-30 Ed Schonberg <schonberg@adacore.com>
879
880 * exp_ch7.adb (Check_Unnesting_Elaboration_Code): The statement part of
881 a package body that is a compilation unit may contain blocks that
882 declare local subprograms. In Subprogram_Unnesting Mode such
883 subprograms must be handled as nested inside the (implicit) elaboration
884 procedure that executes that statement part. To handle properly uplevel
885 references we construct that subprogram explicitly, to contain blocks
886 and inner subprograms, The statement part of the compilation unit
887 becomes a call to this subprogram. This is only done if blocks are
888 present in the statement list of the body.
889
890 2018-05-30 Bob Duff <duff@adacore.com>
891
892 * exp_ch7.adb: Minor comment fix.
893
894 2018-05-30 Ed Schonberg <schonberg@adacore.com>
895
896 * exp_unst.adb (Visit_Node): Handle properly subprogram instantiations
897 that have no corresponding body and appear as attributes of the
898 corresponding wrapper package declaration.
899 (Register_Subprogram): New subprogram, used for subprogram bodies and
900 for subprogram instantiations to enter callable entity into Subp table.
901
902 2018-05-30 Hristian Kirtchev <kirtchev@adacore.com>
903
904 * libgnat/s-secsta.adb: Reimplement the secondary stack support.
905 * libgnat/s-secsta.ads: Update the documentation of all routines in the
906 public part of the package. Reimplement the private part of the
907 package to account for the new secondary stack structure. Add types
908 and subprograms for testing purposes. Add several documentation
909 sections.
910
911 2018-05-30 Hristian Kirtchev <kirtchev@adacore.com>
912
913 * exp_aggr.adb, exp_ch3.adb, exp_ch4.adb, exp_ch7.adb, exp_unst.adb,
914 exp_util.adb, exp_util.ads, libgnat/a-calcon.adb, libgnat/a-calcon.ads,
915 libgnat/s-os_lib.adb, repinfo.adb, sem_ch3.adb, sem_disp.adb,
916 sem_disp.ads, sem_util.adb: Minor reformatting.
917
918 2018-05-30 Arnaud Charlet <charlet@adacore.com>
919
920 * gcc-interface/Makefile.in: Move special flags for Ada runtime files
921 from here...
922 * Makefile.rtl: ... to here. Update comments. Protect call to
923 "GCC_FOR_TARGET" in case target_os isn't defined.
924
925 2018-05-30 Arnaud Charlet <charlet@adacore.com>
926
927 * gcc-interface/Makefile.in: Move target pair settings from here...
928 * Makefile.rtl: ... to here.
929 (setup-rts): New target.
930
931 2018-05-29 Eric Botcazou <ebotcazou@adacore.com>
932
933 * doc/gnat_ugn/building_executable_programs_with_gnat.rst (Alphabetical
934 List of All Switches): Replace "modules" with "units".
935 (Subprogram Inlining Control): Likewise.
936 * gnat_ugn.texi: Regenerate.
937 * usage.adb (Usage): Fix description of -gnatn switch.
938
939 2018-05-29 Arnaud Charlet <charlet@adacore.com>
940
941 * gcc-interface/Makefile.in: Fix typos.
942
943 2018-05-29 Ed Schonberg <schonberg@adacore.com>
944
945 * exp_ch7.adb (Build_Finalizer_Call): Attach to tree the reference to
946 the finalizer procedure in the At_End handler, for use in LLVM
947 generation.
948
949 2018-05-29 Javier Miranda <miranda@adacore.com>
950
951 * exp_ch4.adb (Expand_N_Op_Eq, Expand_Composite_Equality): Use the new
952 subprogram Inherits_From_Tagged_Full_View to identify more reliably
953 untagged private types completed with a derivation of an untagged
954 private whose full view is a tagged type.
955 * sem_util.ads, sem_util.adb (Inherits_From_Tagged_Full_View): New
956 subprogram.
957 (Collect_Primitive_Operations): Handle untagged private types completed
958 with a derivation of an untagged private type whose full view is a
959 tagged type. In such case, collecting the list of primitives we may
960 find two equality primitives: one associated with the untagged private
961 and another associated with the ultimate tagged type (and we must
962 remove from the returned list this latter one).
963
964 2018-05-29 Ed Schonberg <schonberg@adacore.com>
965
966 * exp_unst.adb (Visit_Node): Handle statement sequences that include an
967 At_End handler.
968
969 2018-05-29 Eric Botcazou <ebotcazou@adacore.com>
970
971 * repinfo.adb (List_Entities): Also recurse into blocks without label.
972
973 2018-05-29 Ed Schonberg <schonberg@adacore.com>
974
975 * exp_ch6.adb (Expand_N_Subprogram_Body): Do not generate push/pop for
976 exceptions if subprogram unnesting is in effect, because these branch
977 nodes are relevant only in the presence of nested subprograms.
978
979 2018-05-29 Ed Schonberg <schonberg@adacore.com>
980
981 * libgnat/s-fatgen.adb (Succ, Pred): Raise Constraint_Error
982 unconditionally when applied to the largest positive (resp. largest
983 negative) value of a floating-point type.
984
985 2018-05-29 Ed Schonberg <schonberg@adacore.com>
986
987 * einfo.ads, einfo.adb: Clarify use of Activation_Record_Component:
988 discriminants and exceptions are never components of such. The flag
989 Needs_Activation_Record is set on subprogram types, not on access to
990 them.
991
992 2018-05-29 Ed Schonberg <schonberg@adacore.com>
993
994 * sem_ch3.adb: Set scope of component of subtype.
995
996 2018-05-29 Ed Schonberg <schonberg@adacore.com>
997
998 * exp_unst.adb (Visit_Node): Exclude selected components whose prefix
999 carry no type. Such selected components appear in unit names that are
1000 child units, both in the specification and possibly in an end label for
1001 the unit, and they do not contain any relevant uplevel references.
1002
1003 2018-05-29 Arnaud Charlet <charlet@adacore.com>
1004
1005 * libgnat/a-calend.ads, libgnat/a-calend.adb (Epoch_Offset): Make it a
1006 function.
1007
1008 2018-05-29 Olivier Hainque <hainque@adacore.com>
1009
1010 * libgnat/system-vxworks7-ppc-rtp.ads: New file.
1011 * libgnat/system-vxworks7-ppc-kernel.ads: New file.
1012 * libgnat/system-vxworks7-e500-rtp.ads: New file.
1013 * libgnat/system-vxworks7-e500-kernel.ads: New file.
1014 * libgnat/system-vxworks7-x86-rtp.ads: New file.
1015 * libgnat/system-vxworks-ppc64-kernel.ads: Rename as ...
1016 * libgnat/system-vxworks7-ppc64-kernel.ads: and adjust name of
1017 gnat-crtbe link spec to use the vx7 variant.
1018
1019 2018-05-29 Olivier Hainque <hainque@adacore.com>
1020
1021 * vx_crtbegin.inc: Use a consistent naming convention for the
1022 registration/deregistration functions across RTP or kernel. Remove the
1023 ctor/dtor attribute setting based on RTP/kernel, expect the optional
1024 attribute extension to be provided by includers instead.
1025 * vx_crtbegin.c: Mere inclusion of vx_crtbegin.inc with empty attribute
1026 extension for the registration/deregistration functions.
1027 * vx_crtbegin_attr.c: New file. Include vx_crtbegin.inc with explicit
1028 constructor/destructor attribute extensions.
1029 * vx_crtbegin_array.c: New file. Include vx_crtbegin.inc with empty
1030 attribute extensions and declare _ctors/_dtors arrays.
1031 * vx_crtbegin_auto.c: Remove.
1032 * libgnat/system-vxworks7-aarch64-rtp-smp.ads: Use
1033 vxworks7-gnat-crtbe-link.spec.
1034 * libgnat/system-vxworks7-aarch64.ads: Likewise.
1035 * libgnat/system-vxworks7-e500-rtp-smp.ads: Likewise.
1036 * libgnat/system-vxworks7-ppc-rtp-smp.ads: Likewise.
1037 * libgnat/system-vxworks7-ppc64-rtp-smp.ads: Likewise.
1038 * libgnat/system-vxworks7-x86-kernel.ads: Likewise.
1039 * libgnat/system-vxworks7-x86-rtp-smp.ads: Likewise.
1040 * libgnat/system-vxworks7-x86_64-kernel.ads: Likewise.
1041 * libgnat/system-vxworks7-x86_64-rtp-smp.ads: Likewise.
1042
1043 2018-05-29 Piotr Trojanek <trojanek@adacore.com>
1044
1045 * ali.adb: Minor reformatting.
1046
1047 2018-05-29 Joel Brobecker <brobecker@adacore.com>
1048
1049 * doc/gnat_ugn/platform_specific_information.rst: Update package
1050 requirements for 32bit GNAT on x86_64-linux.
1051 * gnat_ugn.texi: Regenerate.
1052
1053 2018-05-29 Eric Botcazou <ebotcazou@adacore.com>
1054
1055 * doc/gnat_ugn/building_executable_programs_with_gnat.rst (Debugging
1056 Control): Adjust description of -gnatRj.
1057 * gnat_ugn.texi: Regenerate.
1058 * opt.ads (List_Representation_Info_To_JSON): Likewise.
1059 * repinfo.adb (List_Rep_Info): Do not automatically create a file
1060 if List_Representation_Info_To_JSON is true.
1061 * switch-c.adb (Scan_Front_End_Switches) <R>: Remove incompatibility
1062 check between -gnatRj and -gnatRs.
1063 * usage.adb (Usage): Adjust description of -gnatRj.
1064
1065 2018-05-29 Pascal Obry <obry@adacore.com>
1066
1067 * libgnat/s-os_lib.adb (Normalize_Pathname): Fix handling of ".." in
1068 the root directory.
1069
1070 2018-05-29 Pascal Obry <obry@adacore.com>
1071
1072 * libgnat/s-os_lib.adb: Minor reformatting.
1073
1074 2018-05-29 Doug Rupp <rupp@adacore.com>
1075
1076 * libgnat/a-calend.adb (Epoch_Offset): Move from body to ...
1077 * libgnat/a-calend.ads (Epoch_Offset): to private part of spec
1078 * libgnat/a-calcon.ads (To_Unix_Nano_Time): New function spec.
1079 * libgnat/a-calcon.adb (To_Unix_Nano_Time): New function body.
1080
1081 2018-05-29 Eric Botcazou <ebotcazou@adacore.com>
1082
1083 * repinfo.ads (JSON format): Document new pair for components.
1084 * repinfo.adb (Derived_Discriminant): New function.
1085 (List_Structural_Record_Layout): Add Outer_Ent parameter and pass it
1086 in recursive calls. If the record type is the parent of an extension,
1087 find and list the derived discriminant from the extension, if any.
1088 (List_Component_Layout): List the Discriminant_Number in JSON mode.
1089 (List_Record_Info): Adjust call to List_Structural_Record_Layout.
1090
1091 2018-05-29 Eric Botcazou <ebotcazou@adacore.com>
1092
1093 * doc/gnat_ugn/building_executable_programs_with_gnat.rst (Alphabetical
1094 List of All Switches): Document -gnatRj.
1095 (Debugging Control): Likewise.
1096 * gnat_ugn.texi: Regenerate.
1097 * opt.ads (List_Representation_Info_To_JSON): New boolean variable.
1098 * osint-c.adb (Create_Repinfo_File): Use the .json instead of .rep
1099 extension if List_Representation_Info_To_JSON is true.
1100 * repinfo.ads: Document the JSON output format.
1101 * repinfo.adb (List_Location): New procedure.
1102 (List_Array_Info): Add support for JSON output.
1103 (List_Entities): Likewise.
1104 (Unop): Likewise.
1105 (Binop): Likewise.
1106 (Print_Expr): Likewise.
1107 (List_Linker_Section): Likewise.
1108 (List_Mechanisms): Likewise.
1109 (List_Name): Likewise.
1110 (List_Object_Info): Likewise.
1111 (List_Record_Info): Likewise.
1112 (List_Component_Layout): Likewise. Add Indent parameter.
1113 (List_Structural_Record_Layout): New procedure.
1114 (List_Attr): Add support for JSON output.
1115 (List_Type_Info): Likewise.
1116 (Write_Unknown_Val): Likewise.
1117 * switch-c.adb (Scan_Front_End_Switches) <R>: Deal with 'j'.
1118 * usage.adb (Usage): List -gnatRj.
1119
1120 2018-05-29 Eric Botcazou <ebotcazou@adacore.com>
1121
1122 * repinfo.adb (List_Component_Layout): New procedure extracted from...
1123 (List_Record_Layout): ...here. Invoke it.
1124
1125 2018-05-29 Eric Botcazou <ebotcazou@adacore.com>
1126
1127 * repinfo.adb (Write_Unknown_Val): New procedure.
1128 (List_GCC_Expression): Call it.
1129 (List_Record_Layout): Likewise.
1130 (Write_Val): Likewise.
1131
1132 2018-05-29 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1133
1134 * exp_ch4.adb (Expand_N_Op_Abs): Clear Do_Overflow_Check when inserting
1135 code to do check.
1136
1137 2018-05-29 Arnaud Charlet <charlet@adacore.com>
1138
1139 * lib-writ.adb (Write_ALI): Do not use new function from s-casuti yet.
1140 This breaks build of cross compilers with older versions of GNAT, so
1141 better avoid it.
1142
1143 2018-05-29 Doug Rupp <rupp@adacore.com>
1144
1145 * libgnarl/s-taprop.ads (Monotonic_Clock): Refine documentation to
1146 reflect reality.
1147
1148 2018-05-29 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1149
1150 * exp_ch4.adb (Expand_N_Op_Abs): Always do range check against 'First.
1151
1152 2018-05-29 Eric Botcazou <ebotcazou@adacore.com>
1153
1154 * repinfo.adb (List_Entities): Do not list the Linker_Section for
1155 subprograms here...
1156 (List_Mechanisms): ...but here instead. Use consistent name output
1157 and formatting conventions.
1158
1159 2018-05-29 Bob Duff <duff@adacore.com>
1160
1161 * lib-writ.adb (Write_ALI): Cleanup: avoid use of global var; call new
1162 To_Lower function.
1163 * libgnat/s-casuti.ads, libgnat/s-casuti.adb (To_Upper, To_Lower,
1164 To_Mixed): New functions.
1165 * osint.adb: Cleanup: use Is_Directory_Separator, which correctly
1166 allows both '\' and '/' on Windows.
1167
1168 2018-05-28 Eric Botcazou <ebotcazou@adacore.com>
1169
1170 * repinfo.ads: Minor fixes and tweaks in comments.
1171
1172 2018-05-28 Eric Botcazou <ebotcazou@adacore.com>
1173
1174 * repinfo.adb (List_GCC_Expression): Remove Valop and replace calls to
1175 it with calls to Unop.
1176
1177 2018-05-28 Eric Botcazou <ebotcazou@adacore.com>
1178
1179 * repinfo.ads (TCode): Adjust range.
1180 (Truth_Andif_Expr): Remove.
1181 (Truth_Orif_Expr): Likewise.
1182 (Truth_And_Expr .. Dynamic_Val): Adjust value.
1183 * repinfo.adb (Print_Expr): Remove handling of Truth_{And,Or}if_Expr.
1184 (Rep_Value): Likewise.
1185 * repinfo.h (Truth_Andif_Expr): Remove.
1186 (Truth_Orif_Expr): Likewise.
1187 (Truth_And_Expr .. Dynamic_Val): Adjust value.
1188 * gcc-interface/decl.c (annotate_value) <TRUTH_ANDIF_EXPR>: Fall
1189 through to TRUTH_AND_EXPR case.
1190 <TRUTH_ORIF_EXPR>: Fall through to TRUTH_OR_EXPR case.
1191
1192 2018-05-28 Ed Schonberg <schonberg@adacore.com>
1193
1194 * exp_unst.adb (Visit_Node): For indexed components and attribute
1195 references, examine index expressions or associated expressions as well
1196 to record uplevel references.
1197 (Vist_Node): For function and procedure calls, if a formal is an
1198 unconstrained array and the actual is constrained, check whether bounds
1199 of actual have uplevel references.
1200
1201 2018-05-28 Ed Schonberg <schonberg@adacore.com>
1202
1203 * einfo.ads, einfo.adb: Exceptions can be uplevel references, and thus
1204 they can appear as components of activation records.
1205 * exp_unst.adb (Visit_Node): A reference to an exception may be an
1206 uplevel reference.
1207
1208 2018-05-28 Eric Botcazou <ebotcazou@adacore.com>
1209
1210 * exp_ch4.adb (Expand_Composite_Equality): Compute whether the size
1211 depends on a discriminant manually instead of using the predicate
1212 Size_Depends_On_Discriminant in the array type case.
1213
1214 2018-05-28 Ed Schonberg <schonberg@adacore.com>
1215
1216 * exp_unst.adb (Check_Static_Type): For a record subtype, check
1217 discriminant constraints as well.
1218 (Visit_Node): For a selected component, check type of prefix, as is
1219 done for indexed components and slices.
1220
1221 2018-05-28 Javier Miranda <miranda@adacore.com>
1222
1223 * exp_ch4.adb (Real_Range_Check): Add a temporary to store the integer
1224 value when converting a float value to a fixed-point value. This is
1225 required for CCG because it handles fixed-point types by means of
1226 unsigned integer type variables. The range check is now performed using
1227 the integer value stored in this temporary.
1228
1229 2018-05-28 Yannick Moy <moy@adacore.com>
1230
1231 * sem_util.adb (Is_OK_Volatile_Context): Add attributes First, Last and
1232 Length as valid non-interfering contexts for SPARK.
1233
1234 2018-05-28 Claire Dross <dross@adacore.com>
1235
1236 * sem_disp.ads, sem_disp.adb (Inheritance_Utilities): Package for
1237 generic inheritance utilities.
1238 (Generic_Inherited_Subprograms): Generic version of
1239 Inherited_Subprograms, generic in Find_Dispatching_Type function.
1240 (Generic_Is_Overriding_Subprogram): Generic version of
1241 Is_Overriding_Subprogram, generic in Find_Dispatching_Type function.
1242 (Inherited_Subprograms): Instance of Generic_Inherited_Subprograms with
1243 Sem_Disp.Find_Dispatching_Type.
1244 (Is_Overriding_Subprogram): Instance of
1245 Generic_Is_Overriding_Subprogram with Sem_Disp.Find_Dispatching_Type.
1246 (Inheritance_Utilities_Inst): Instance of Inheritance_Utilities
1247 with Sem_Disp.Find_Dispatching_Type.
1248
1249 2018-05-28 Eric Botcazou <ebotcazou@adacore.com>
1250
1251 * exp_ch4.adb (Expand_Composite_Equality): For a composite (or FP)
1252 component type, do not expand array equality using the unconstrained
1253 base type, except for the case where the bounds of the type depend on a
1254 discriminant.
1255
1256 2018-05-28 Ed Schonberg <schonberg@adacore.com>
1257
1258 * einfo.ads, einfo.adb (Needs_Activation_Record): New flag on
1259 access-to-subprogram types, to indicate that an indirect call through
1260 such a type requires an activation record when compiling for LLVM.
1261 * sem_ch3.adb (Access_Subprogram_Declaration): Set new flag as needed.
1262
1263 2018-05-28 Ed Schonberg <schonberg@adacore.com>
1264
1265 * exp_ch4.adb (Real_Range_Check): Specialize float-to-fixed conversions
1266 when bounds of fixed type are static, to remove some spuerfluous
1267 implicit conversions and provide an accurate result when converting
1268 back and forth between the fixed point type and a floating point type.
1269
1270 2018-05-28 Ed Schonberg <schonberg@adacore.com>
1271
1272 * exp_unst.adb (Unnest_Subprogram): Prevent creation of empty
1273 activation records.
1274
1275 2018-05-28 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1276
1277 * exp_unst.adb (Check_Static_Type): Add argument to indicate node to be
1278 replaced, if any; all callers changed.
1279 (Note_Uplevel_Ref): Likewise. Also replace reference to deferred
1280 constant with private view so we take the address of that entity.
1281 (Note_Uplevel_Bound): Add argument to indicate node to be replaced, if
1282 any; all callers changed. Handle N_Indexed_Component like
1283 N_Attribute_Reference. Add N_Type_Conversion case.
1284 (Visit_Node): Indexed references can be uplevel if the type isn't
1285 static.
1286 (Unnest_Subprograms): Don't rewrite if no reference given. If call has
1287 been relocated, set first_named pointer in original node as well.
1288
1289 2018-05-28 Ed Schonberg <schonberg@adacore.com>
1290
1291 * exp_aggr.adb (Flatten): Copy tree of expression in a component
1292 association with a range or a set of discrete choices, rather than
1293 relocating the node. This avoids inconsistencies in the tree when
1294 handling nested subprograms with uplevel references for LLVM.
1295
1296 2018-05-28 Arnaud Charlet <charlet@adacore.com>
1297
1298 * exp_util.adb (Possible_Bit_Aligned_Component): Always return False in
1299 codepeer mode.
1300
1301 2018-05-28 Arnaud Charlet <charlet@adacore.com>
1302
1303 * exp_unst.adb: Fix typo.
1304
1305 2018-05-28 Bob Duff <duff@adacore.com>
1306
1307 * libgnat/a-convec.adb (Query_Element): Minor cleanup: remove an
1308 unnecessary use of 'Unrestricted_Access.
1309
1310 2018-05-28 Hristian Kirtchev <kirtchev@adacore.com>
1311
1312 * repinfo.adb (Expr_Value_S): New routine.
1313 (List_Linker_Section): Properly extract the value of the section
1314 argument.
1315
1316 2018-05-28 Patrick Bernardi <bernardi@adacore.com>
1317
1318 * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Update the
1319 description of the -D binder switch to reflect current usage.
1320 * gnat_ugn.texi: Regenerate.
1321
1322 2018-05-28 Gary Dismukes <dismukes@adacore.com>
1323
1324 * exp_ch3.adb: Minor reformatting
1325
1326 2018-05-28 Justin Squirek <squirek@adacore.com>
1327
1328 * exp_ch3.adb
1329 (Build_Initialization_Call): Add logic to pass the appropriate actual to match
1330 new formal.
1331 (Init_Formals): Add new formal *_skip_null_excluding_check
1332 * exp_util.adb, exp_util.ads
1333 (Enclosing_Init_Proc): Added to fetch the enclosing Init_Proc from the current
1334 scope.
1335 (Inside_Init_Proc): Refactored to use Enclosing_Init_Proc
1336 (Needs_Conditional_Null_Excluding_Check): Added to factorize the predicate
1337 used to determine how to generate an Init_Proc for a given type.
1338 (Needs_Constant_Address): Minor reformatting
1339 * sem_res.adb
1340 (Resolve_Null): Add logic to generate a conditional check in certain cases
1341
1342 2018-05-28 Hristian Kirtchev <kirtchev@adacore.com>
1343
1344 * exp_aggr.adb, gnatlink.adb, sem_ch6.adb, sem_res.adb, sem_util.adb:
1345 Minor reformatting.
1346
1347 2018-05-28 Hristian Kirtchev <kirtchev@adacore.com>
1348
1349 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile): Include
1350 the declarations of single concurrent types because they fall in the
1351 category of full type and object declarations.
1352
1353 2018-05-28 Eric Botcazou <ebotcazou@adacore.com>
1354
1355 * repinfo.adb (Compute_Max_Length): Skip _Parent component.
1356 (List_Record_Layout): Likewise.
1357
1358 2018-05-28 Ed Schonberg <schonberg@adacore.com>
1359
1360 * sem_util.adb (Is_Function_Result): Add a warning if a postcondition
1361 includes a call to function to which it applies. This may mean an
1362 omission of an attribute reference 'Result, in particular if the
1363 function is pqrameterless.
1364
1365 2018-05-28 Justin Squirek <squirek@adacore.com>
1366
1367 * sem_ch8.adb (Find_Expanded_Name): Add extra guard to make sure the
1368 misresolved package name is not a case of mistaken identity.
1369
1370 2018-05-28 Yannick Moy <moy@adacore.com>
1371
1372 * sem_res.adb (Resolve_Range): Re-resolve the low bound of a range in
1373 GNATprove mode, as the order of resolution (low then high) means that
1374 all the information is not available when resolving the low bound the
1375 first time.
1376
1377 2018-05-28 Eric Botcazou <ebotcazou@adacore.com>
1378
1379 * repinfo.adb (List_Array_Info): Start with an explicit blank line and
1380 end with the linker section, if any.
1381 (List_Entities): Do not output the linker section for record types,
1382 array types and variables.
1383 (Print_Expr): Factor out common processing for unary operators and
1384 special values. Adjust and reorder the various cases.
1385 (List_Object_Info): End with the linker section, if any.
1386 (List_Record_Info): Likewise.
1387 (List_Type_Info): Do not start with a blank line.
1388
1389 2018-05-25 Nicolas Roche <roche@adacore.com>
1390
1391 * libgnat/s-valrea.adb (Scan_Real): Abort computation once it is sure
1392 that the result will be either -infinite or +infinite.
1393
1394 2018-05-25 Patrick Bernardi <bernardi@adacore.com>
1395
1396 * libgnat/s-parame.ads, libgnat/s-parame__vxworks.ads,
1397 libgnat/s-parame__ae653.ads, libgnat/s-parame__hpux.ads (Size_Type):
1398 Expand range of type to match the address space of the target.
1399 (Task_Storage_Size): Remove unused type.
1400
1401 2018-05-25 Ed Schonberg <schonberg@adacore.com>
1402
1403 * sem_res.adb (Set_Mixed_Mode_Operand): If the operand is an expression
1404 of a fixed point type and the parent is a multiplying operation,
1405 resolve the operand with its own type because the context will impose a
1406 resulting type on the result of the multiplication by means of
1407 approriate conversion.
1408
1409 2018-05-25 Hristian Kirtchev <kirtchev@adacore.com>
1410
1411 * exp_ch3.adb (Default_Initialize_Object): Ensure that the analysis of
1412 the in-place initialization aggregate created for pragmas
1413 Initialize_Scalars or Normalize_Scalars is performed with checks
1414 suppressed.
1415
1416 2018-05-25 Arnaud Charlet <charlet@adacore.com>
1417
1418 * exp_aggr.adb (Convert_To_Positional): Bump default for
1419 Max_Others_Replicate to 32. Update comments.
1420 * osint.ads (Unknown_Attributes): No longer pretend this is a constant.
1421 (No_File_Info_Cache): Initialize separately.
1422 * osint.adb (No_File_Info_Cache): Update initializer.
1423
1424 2018-05-25 Javier Miranda <miranda@adacore.com>
1425
1426 * sem_res.adb (Resolve_Membership_Op): Allow the use of the membership
1427 test when the left operand is a class-wide interface and the right
1428 operand is not a class-wide type.
1429 * exp_ch4.adb (Tagged_Membership): Adding support for interface as the
1430 left operand.
1431
1432 2018-05-25 Ed Schonberg <schonberg@adacore.com>
1433
1434 * exp_aggr.adb (Flatten): A quantified expression cannot be duplicated
1435 in an others clause to prevent visibility issues with the generated
1436 loop variable.
1437 (Component_OK_For_Backend): Return false for a quantified expression.
1438 (Check_Static_Component): Ditto.
1439
1440 2018-05-25 Hristian Kirtchev <kirtchev@adacore.com>
1441
1442 * libgnat/s-secsta.adb (SS_Allocate): Reimplemented.
1443 (SS_Allocate_Dynamic): New routine. The allocation logic is now split
1444 into three distring cases rather than in one loop which attempts to
1445 handle all three cases. This rewrite eliminates an issue where the last
1446 frame of the stack cannot be freed, thus causing the memory range of a
1447 new frame to approach the overflow point of the memory index type.
1448 Since the overflow is logically treated as a
1449 too-much-memory-on-the-stack scenario, it causes a bogus Storage_Error.
1450 (SS_Allocate_Static): New routine. The routine factorizes the static
1451 secondary stack-related code from the former SS_Allocate.
1452
1453 2018-05-25 Sergey Rybin <rybin@adacore.com>
1454
1455 * doc/gnat_ugn/gnat_and_program_execution.rst: Add description of '-U'
1456 option for gnatelim.
1457
1458 2018-05-25 Ed Schonberg <schonberg@adacore.com>
1459
1460 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not create
1461 Class_Wide_Clone_Body when analyzing a subprogram_body_stub: the clone
1462 is created when the proper body of the stub is analyzed.
1463 * sem_util.adb (ZBuild_Class_Wide_Clone_Body): If the subprogram body
1464 is the proper body of a subunit, the cloned body must be inserted in
1465 the declarative list that contains the stub.
1466
1467 2018-05-25 Justin Squirek <squirek@adacore.com>
1468
1469 * exp_ch6.adb (Expand_Simple_Function_Return): Add guard in check to
1470 generate code for 6.5(8-10) so that we don't get an assertion error
1471 when dealing with an incomplete return type.
1472
1473 2018-05-25 Arnaud Charlet <charlet@adacore.com>
1474
1475 * pprint.adb (Expression_Name): Strip too long expressions to avoid
1476 carrying very large strings.
1477
1478 2018-05-25 Patrick Bernardi <bernardi@adacore.com>
1479
1480 * switch-b.adb (Scan_Binder_Switches): binder switch -Q accepts Natural
1481 numbers.
1482
1483 2018-05-25 Doug Rupp <rupp@adacore.com>
1484
1485 * tracebak.c (aarch64-linux): Implement.
1486
1487 2018-05-25 Justin Squirek <squirek@adacore.com>
1488
1489 * sem_ch8.adb: Minor reformatting.
1490
1491 2018-05-25 Piotr Trojanek <trojanek@adacore.com>
1492
1493 * sem_util.adb (Iterate_Call_Parameters): Fix code convention and
1494 assertions.
1495
1496 2018-05-25 Hristian Kirtchev <kirtchev@adacore.com>
1497
1498 * einfo.adb, einfo.ads, exp_ch3.adb, exp_ch8.adb, exp_unst.adb,
1499 pprint.adb, sem_ch12.adb, sem_ch3.adb, sem_prag.adb, sem_util.adb:
1500 Minor reformatting.
1501
1502 2018-05-25 Ed Schonberg <schonberg@adacore.com>
1503
1504 * sem_ch12.adb (Instance_Exists): New function, subsidiary of
1505 Validate_Derived_Type_Instance, to verify that all interfaces
1506 implemented by the formal type are also implemented by the actual. The
1507 verification is complicated when an interface of the formal is declared
1508 in a generic unit and the actual is declared in an instance of it.
1509 There is currently no mechanism to relate an interface declared within
1510 a generic to the corresponding interface in an instance, so we must
1511 traverse the list of interfaces of the actual, looking for a name
1512 match, and verifying that that interface is declared in an instance.
1513
1514 2018-05-25 Piotr Trojanek <trojanek@adacore.com>
1515
1516 * sem_util.adb (Iterate_Call_Parameters): Rewrite with extra
1517 assertions; replace function versions of Next_Formal/Next_Actual with
1518 their procedural versions (which are more concise).
1519
1520 2018-05-25 Doug Rupp <rupp@adacore.com>
1521
1522 * libgnarl/s-osinte__aix.ads, libgnarl/s-osinte__android.ads,
1523 libgnarl/s-osinte__darwin.ads, libgnarl/s-osinte__freebsd.ads,
1524 libgnarl/s-osinte__hpux.ads, libgnarl/s-osinte__kfreebsd-gnu.ads,
1525 libgnarl/s-osinte__linux.ads, libgnarl/s-osinte__lynxos178e.ads,
1526 libgnarl/s-osinte__qnx.ads, libgnarl/s-osinte__rtems.ads
1527 (Relative_Timed_Wait): Remove.
1528 * libgnarl/s-tpopmo.adb (Timed_Sleep, Timed_Delay): Rewrite to allow
1529 for incremental looping. Remove references to Rel_Time and
1530 Relative_Timed_Wait.
1531 * libgnat/s-osprim__posix.adb, libgnat/s-osprim__posix2008.adb
1532 (Timed_Delay): Make separate.
1533 * libgnat/s-optide.adb: New separate procedure.
1534 * libgnat/s-osprim.ads (Max_System_Delay): New constant.
1535 * libgnat/s-osprim__lynxos.ads (Max_Sensible_Delay): Set to 6 months.
1536 (Max_System_Delay): New constant.
1537
1538 2018-05-25 Ed Schonberg <schonberg@adacore.com>
1539
1540 * sem_ch12.adb (Validate_Derived_Type_Instance): Verify that the actual
1541 for a formal derived type implements all the interfaces declared for
1542 the formal.
1543
1544 2018-05-25 Yannick Moy <moy@adacore.com>
1545
1546 * sem_prag.adb (Check_Applicable_Policy): Deal specially with CodePeer
1547 and GNATprove modes when applicable policy is Ignore.
1548
1549 2018-05-25 Eric Botcazou <ebotcazou@adacore.com>
1550
1551 * freeze.adb (Freeze_Enumeration_Type): Do not give integer size to a
1552 boolean type with convention C.
1553 * libgnat/i-cexten.ads (bool): Change to boolean with convention C.
1554 * gcc-interface/decl.c (gnat_to_gnu_entity): Add new local variable
1555 FOREIGN and use it throughout the function.
1556 <E_Enumeration_Type>: Set precision 1 on boolean types with foreign
1557 convention.
1558 <E_Enumeration_Subtype>: Likewise for subtypes.
1559 <E_Record_Type>: Force the size of a storage unit on empty classes.
1560 * gcc-interface/utils.c (make_type_from_size) <BOOLEAN_TYPE>: Skip
1561 boolean types with precision 1 if the size is the expected one.
1562
1563 2018-05-25 Arnaud Charlet <charlet@adacore.com>
1564
1565 * pprint.adb (Expression_Name): Do not print non ASCII characters.
1566
1567 2018-05-25 Bob Duff <duff@adacore.com>
1568
1569 * libgnat/a-strunb__shared.ads, libgnat/a-stwiun__shared.ads,
1570 libgnat/a-stzunb__shared.ads: (Initialize, Adjust): Add pragma Inline.
1571
1572 2018-05-25 Bob Duff <duff@adacore.com>
1573
1574 * sem_util.ads: Minor comment fix.
1575
1576 2018-05-25 Ed Schonberg <schonberg@adacore.com>
1577
1578 * exp_unst.adb (Visit_Node): Restrict check for uplevel references in
1579 prefixes of array attributes, to prefixes that are entity names whose
1580 type is constrained.
1581 (Note_Uplevel_Bound): Verify that the bound is declared in an enclosing
1582 subprogram, as itype created for loops in pre/postcondition may appear
1583 in loops at the library level.
1584
1585 2018-05-25 Ed Schonberg <schonberg@adacore.com>
1586
1587 * sem_ch13.adb (Build_Predicate_Functions): The predicate function
1588 declaration is inserted into the tree and analyzed at that point, so
1589 should not be reinserted when the body is constructed. Inside a
1590 generic, ensure that the body is not inserted twice in the tree.
1591
1592 2018-05-25 Yannick Moy <moy@adacore.com>
1593
1594 * sem_prag.adb (Check_Grouping): Modify test to ignore statements and
1595 declarations not coming from source.
1596
1597 2018-05-25 Fedor Rybin <frybin@adacore.com>
1598
1599 * doc/gnat_ugn/gnat_utility_programs.rst: Document new switch
1600 --copy-environment for gnattest.
1601
1602 2018-05-24 Piotr Trojanek <trojanek@adacore.com>
1603
1604 * sem_elab.adb (Non_Private_View): Simplify by removing a local Result
1605 variable.
1606 * sem_prag.adb (Get_Base_Subprogram): Same as above.
1607
1608 2018-05-24 Eric Botcazou <ebotcazou@adacore.com>
1609
1610 * fe.h (Set_Normalized_First_Bit): Declare.
1611 (Set_Normalized_Position): Likewise.
1612 * repinfo.adb (List_Record_Layout): Do not use irregular output for a
1613 variable position. Fix minor spacing issue.
1614 * gcc-interface/decl.c (annotate_rep): If a field has a variable
1615 offset, compute the normalized position and annotate it in addition to
1616 the bit offset.
1617
1618 2018-05-24 Eric Botcazou <ebotcazou@adacore.com>
1619
1620 * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu):
1621 Constify and rename variables. Fix formatting.
1622 (gnat_to_gnu) <N_Exception_Handler>: Minor tweak.
1623 <N_Raise_Statement>: Likewise.
1624
1625 2018-05-24 Javier Miranda <miranda@adacore.com>
1626
1627 * exp_ch8.adb (Build_Body_For_Renaming): Adding support to build the
1628 body of a variant record equality renaming.
1629 (Expand_N_Subprogram_Renaming_Declaration): Adapt the code to the new
1630 implementation of Build_Body_For_Renaming.
1631 * exp_ch3.ads (Build_Variant_Record_Equality): New library level
1632 function that factorizes the functionality needed by
1633 Build_Body_For_Renaming and Expand_Freeze_Record_Type to build the body
1634 of a variant record equality subprogram.
1635 * exp_ch3.adb (Build_Variant_Record_Equality): New subprogram.
1636 (Build_Variant_Record_Equality): New local procedure of
1637 Expand_Freeze_Record_Type containing all the code specific for freezing
1638 the record type that cannot be place in the new library level function.
1639
1640 2018-05-24 Ed Schonberg <schonberg@adacore.com>
1641
1642 * einfo.ads, einfo.adb (Is_Activation_Record): New flag on
1643 in_parameters, used when unesting subprograms for LLVM, to indicate
1644 that a generated parameter carries the activation record from the
1645 enclosing subprogram.
1646 * exp_unst.adb (Check_Static_Type): Handle array attributes of types
1647 whose bounds may contain up-level references that need to be added to
1648 an activation recoord.
1649 (Add_Extra_Formal): Set Is_Activation_Record on new formal.
1650
1651 2018-05-24 Yannick Moy <moy@adacore.com>
1652
1653 * pprint.adb (Expression_Image): Improve the printing of expressions,
1654 by taking more cases into account, in particular qualified expressions
1655 and aggregates. Also count more the number of parentheses to close
1656 after the expression.
1657
1658 2018-05-24 Javier Miranda <miranda@adacore.com>
1659
1660 * sem_ch3.adb (Is_Visible_Component): For untagged types add missing
1661 check for renamed discriminants.
1662 * sem_ch4.adb (Analyze_Overloaded_Selected_Component,
1663 Analyze_Selected_Component, Check_Misspelled_Selector): For calls to
1664 Is_Visible_Component pass the associated selector node to allow
1665 checking renamed discriminants on untagged types.
1666
1667 2018-05-24 Ed Schonberg <schonberg@adacore.com>
1668
1669 * sem_ch8.adb (Analyze_Use_Type): Do not assign the Prev_Use_Clause
1670 link to a use_type clause if this would cause an infinite loop in the
1671 machinery that detects redundant use clauses. This may happen when the
1672 redundant clauses appear in the context of a child unit and the context
1673 of its parent.
1674
1675 2018-05-24 Piotr Trojanek <trojanek@adacore.com>
1676
1677 * sinfo.ads: Fix grammar in comment.
1678
1679 2018-05-24 Justin Squirek <squirek@adacore.com>
1680
1681 * einfo.ads, einfo.adb (Append_Entity): Modified to use Link_Entities
1682 and manage doubly-linked entity chain.
1683 (Nested_Scenarios): Removed entity field used for optimization during
1684 elaboration to make room for the new field Prev_Entity.
1685 (Link_Entities): Added to replace redundant calls to Set_Next_Entity
1686 and Set_Prev_Entity as well as centralize changes to the entity chain.
1687 (Predicated_Parent): Modified to use Node38.
1688 (Prev_Entity): Added to fetch new node field Prev_Entity in all entity
1689 types.
1690 (Remove_Entity): Moved from sem_util.
1691 (Set_Nested_Scenarios): Deleted.
1692 (Set_Predicated_Parent): Modified to use Node38.
1693 (Set_Prev_Entity): Added to set Prev_Entity field.
1694 (Set_Validated_Object): Modified to use Node38.
1695 (Unlink_Next_Entity): Added to process Prev_Entity when an unlinking
1696 action is required.
1697 (Validated_Object): Modified to use Node38.
1698 (Write_Field36_Name): Remove Nested_Scenarios, Validated_Object, and
1699 predicated parent cases.
1700 (Write_Field38_Name): Add predicated parent and Validated_Object cases.
1701 * sem_ch3.adb (Process_Subtype): Add guard to protect against
1702 inappropriate marking of Predicated_Parent to non-itype subtypes.
1703 (Make_Class_Wide_Type): Preserve Prev_Entity field and set in new type.
1704 (Copy_And_Swap): Add setting of Prev_Entity.
1705 (Build_derived_Record_Type): Replace Set_Next_Entity w/ Link_Entities.
1706 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Replace Set_Next_Entity
1707 w/ Link_Entities.
1708 (New_Overloaded_Entity): Remove block created to search for previous
1709 entities in the entity chain with relevant calls to Prev_Entity as well
1710 as replace duplicated code from Remove_Entity_And_Homonym with a call
1711 to that subprogram.
1712 * sem_ch7.adb (Exchange_Declarations): Replace Set_Next_Entity w/
1713 Link_Entities.
1714 * sem_elab.adb (Find_And_Process_Nested_Scenarios): Remove global and
1715 initial subprogram declarations related to Nested_Scenarios.
1716 (Process_Nested_Scenarios): Deleted.
1717 (Save_Scenario): Deleted.
1718 (Traverse_Body): Remove optimization for Nested_Scenarios so as to free
1719 node space in the entity tree.
1720 * sem_util.adb, sem_util.ads (Remove_Entity): Moved to einfo.
1721 (Remove_Entity_And_Homonym): Added to separate functionality of
1722 Remove_Entity from the homonym chain directly.
1723 * exp_attr.adb (Expand_N_Attribute_Reference): Replace Set_Next_Entity
1724 w/ Link_Entities and Unlink_Next_Entity.
1725 * exp_ch3.adb (Expand_N_Object_Declaration): Replace Set_Next_Entity w/
1726 Link_Entities.
1727 * exp_ch6.adb (Replace_Renaming_Declaration_Id): Replace
1728 Set_Next_Entity w/ Link_Entities.
1729 * exp_disp.adb (Expand_Dispatching_Call): Replace Set_Next_Entity w/
1730 Link_Entities and Unlink_Next_Entity.
1731 * exp_spark.adb (Expand_SPARK_N_Object_Renaming_Declaration): Replace
1732 call to Remove_Entity with its new incarnation.
1733 * exp_util.adb (New_Class_Wide_Subtype): Add setting of Prev_Entity.
1734 * freeze.adb (Freeze_Record_Type): Replace Set_Next_Entity w/
1735 Link_Entities.
1736
1737 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
1738
1739 * sem_ch10.adb (Expand_Limited_With_Clause): Update the call to
1740 Install_Limited_Withed_Unit.
1741 (Expand_With_Clause): Update the call to Install_Withed_Unit.
1742 (Implicit_With_On_Parent): Update the call to Install_Withed_Unit.
1743 (Install_Context_Clauses): Update the call to Install_Withed_Unit.
1744 (Install_Limited_Context_Clauses): Update the calls to
1745 Install_Limited_Withed_Unit.
1746 (Install_Limited_Withed_Unit): Renamed to better illustrate its
1747 purpose.
1748 (Install_Private_With_Clauses): Update the calls to Install_Withed_Unit
1749 and Install_Limited_Withed_Unit.
1750 (Install_With_Clause): Uninstall a limited with clause if a [private]
1751 with clause is given for the same package.
1752 (Install_Withed_Unit): Renamed to better illustrate its purpose.
1753 (Remove_Limited_With_Unit): New routine.
1754
1755 2018-05-24 Eric Botcazou <ebotcazou@adacore.com>
1756
1757 * raise-gcc.c (__gnat_SEH_error_handler): Remove prototype.
1758 (__gnat_personality_seh0): Adjust and beef up comments, and
1759 fix formatting throughout.
1760 (__gnat_adjust_context): Deal minimally with version 2.
1761 * seh_init.c (__gnat_map_SEH): Fix formatting.
1762 (_gnat_SEH_error_handler): Adjust comments.
1763 (__gnat_install_SEH_handler): Fix formatting.
1764
1765 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
1766
1767 * exp_ch7.adb, sem_ch3.adb, sem_res.adb: Minor reformatting.
1768
1769 2018-05-24 Ed Schonberg <schonberg@adacore.com>
1770
1771 * exp_aggr.adb (Flatten): Add a warning on an others clause in an array
1772 aggregate with static bounds when named associations cover all index
1773 positions and the others clause is redundant.
1774
1775 2018-05-24 Raphael Amiard <amiard@adacore.com>
1776
1777 * libgnat/a-cohama.ads: Add documentation.
1778
1779 2018-05-24 Raphael Amiard <amiard@adacore.com>
1780
1781 * libgnat/a-convec.ads: Add documentation.
1782
1783 2018-05-24 Justin Squirek <squirek@adacore.com>
1784
1785 * exp_ch3.adb (Expand_N_Object_Declaration): Ignore raising an error in
1786 expansion for limited tagged types when the node to be expanded is a
1787 raise expression due to it not representing a valid object.
1788 * exp_ch5.adb (Expand_N_Assignment_Statement): Add exception to error
1789 message regarding assignments to limited types to ignore genereated
1790 code.
1791
1792 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
1793
1794 * exp_util.adb (New_Class_Wide_Subtype): Capture and restore relevant
1795 Ghost-related attributes of the class-wide subtype because the copy
1796 clobbers them.
1797
1798 2018-05-24 Justin Squirek <squirek@adacore.com>
1799
1800 * sem_res.adb (Resolve_Entity_Name): Add guard to protect against
1801 marking use clauses as effective when the reference appears within
1802 generated code.
1803
1804 2018-05-24 Cyrille Comar <comar@adacore.com>
1805
1806 * doc/gnat_rm/the_gnat_library.rst: Fix typos.
1807 * gnat_rm.texi: Regenerate.
1808
1809 2018-05-24 Bob Duff <duff@adacore.com>
1810
1811 * exp_ch7.adb (Expand_Cleanup_Actions): Create a mark unconditionally
1812 for build-in-place functions with a caller-unknown-size result.
1813 (Create_Finalizer): For build-in-place functions with a
1814 caller-unknown-size result, check at run time whether we need to
1815 release the secondary stack.
1816
1817 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
1818
1819 * sem_prag.adb (Analyze_Pragma): Use the full view of an internally
1820 generated incomplete type.
1821
1822 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
1823
1824 * expander.adb (Expand): Update the save and restore of the Ghost
1825 region.
1826 * exp_ch3.adb (Freeze_Type): Likewise.
1827 * exp_disp.adb (Make_DT): Likewise.
1828 * exp_util.adb (Build_DIC_Procedure_Body): Likewise.
1829 (Build_DIC_Procedure_Declaration): Likewise.
1830 (Build_Invariant_Procedure_Body): Likewise.
1831 (Build_Invariant_Procedure_Declaration): Likewise.
1832 (Make_Predicate_Call): Likewise.
1833 * freeze.adb (Add_To_Result): Insert the freeze action of a living
1834 entity prior to the start of the enclosing ignored Ghost region.
1835 (Freeze_Entity): Update the save and restore of the Ghost region.
1836 * ghost.adb (Install_Ghost_Mode): Reimplemented.
1837 (Install_Ghost_Region): New routine.
1838 (Mark_And_Set_Ghost_Assignment): Install a region rather than a mode.
1839 (Mark_And_Set_Ghost_Body): Likewise.
1840 (Mark_And_Set_Ghost_Completion): Likewise.
1841 (Mark_And_Set_Ghost_Declaration): Likewise.
1842 (Mark_And_Set_Ghost_Instantiation): Likewise.
1843 (Mark_And_Set_Ghost_Procedure_Call): Likewise.
1844 (Name_To_Ghost_Mode): New routine.
1845 (Restore_Ghost_Region): New routine.
1846 * ghost.ads (Install_Ghost_Region): New routine.
1847 (Restore_Ghost_Region): New routine.
1848 * opt.ads: Add new global variable Ignored_Ghost_Region.
1849 * rtsfind.adb (Load_RTU): Update the save and restore of the Ghost
1850 region. Install a clean region.
1851 * sem.adb (Analyze): Likewise.
1852 (Do_Analyze): Likewise.
1853 * sem_ch3.adb (Analyze_Object_Declaration): Likewise
1854 (Derive_Progenitor_Subprograms): Use local variable Iface_Alias to
1855 capture the ultimate alias of the current primitive.
1856 (Process_Full_View): Update the save and restore of the Ghost region.
1857 Do not inherit DIC and invariant procedures.
1858 * sem_ch5.adb (Analyze_Assignment): Update the save and restore of the
1859 Ghost region.
1860 * sem_ch6.adb (Analyze_Procedure_Call): Likewise.
1861 (Analyze_Subprogram_Body_Helper): Likewise.
1862 * sem_ch7.adb (Analyze_Package_Body_Helper): Likewise.
1863 * sem_ch12.adb (Analyze_Package_Instantiation): Likewise.
1864 (Analyze_Subprogram_Instantiation): Likewise.
1865 (Instantiate_Package_Body): Likewise.
1866 (Instantiate_Subprogram_Body): Likewise.
1867 * sem_ch13.adb (Build_Predicate_Functions): Likewise.
1868 (Build_Predicate_Function_Declaration): Likewise.
1869 * sem_disp.adb
1870 (Add_Dispatching_Operation): Do not consider DIC and invariant
1871 procedures.
1872 (Check_Dispatching_Operation): Use Add_Dispatching_Operation to collect
1873 a dispatching subprogram.
1874 (Check_Operation_From_Private_View): Likewise.
1875 (Override_Dispatching_Operation): Likewise.
1876 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Update the save
1877 and restore of the Ghost region.
1878 (Analyze_Initial_Condition_In_Decl_Part): Likewise.
1879 (Analyze_Pragma): Update the save and restore of the Ghost region.
1880 (Analyze_Pre_Post_Condition_In_Decl_Part): Likewise.
1881 * sem_util.adb (Is_Suitable_Primitive): New routine.
1882 * sem_util.ads (Is_Suitable_Primitive): New routine.
1883 * sinfo.ads: Update the section of Ghost regions.
1884
1885 2018-05-24 Piotr Trojanek <trojanek@adacore.com>
1886
1887 * doc/gnat_rm/implementation_defined_pragmas.rst (Contract_Cases):
1888 Change "condition" to "case guard" after renaming in the contract
1889 grammar.
1890 * gnat_rm.texi: Regenerate.
1891
1892 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
1893
1894 * exp_util.adb (Expand_Static_Predicates_In_Choices): Indicate that the
1895 construct with discrete choices no longer contains a subtype with
1896 predicates since the expansion already handled this case.
1897
1898 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
1899
1900 * freeze.adb (Wrap_Imported_Subprogram): Generate an unchecked
1901 conversion to the return type to avoid a side effect where an imported
1902 relocated function generates a new anonymous access type, whose
1903 accessibility level does not agree with with that of the wrapper.
1904
1905 2018-05-24 Javier Miranda <miranda@adacore.com>
1906
1907 * sem_util.adb (Abstract_Interface_List): Add missing support for
1908 private types whose full view is a synchronized type.
1909 * sem_ch3.adb (Build_Derived_Private_Type): Skip building the full
1910 derivation of a private type parent type is a task type with
1911 discriminants as gigi does not use such type directly.
1912
1913 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
1914
1915 * sem_elab.adb (Build_Variable_Reference_Marker): Do not create a
1916 variable marker when the reference appears in the formal part of a
1917 compilation unit instance because there is no place to insert it.
1918 (In_Compilation_Instance_Formal_Part): New routine.
1919
1920 2018-05-24 Piotr Trojanek <trojanek@adacore.com>
1921
1922 * layout.ads, repinfo.ads: Fix references to renamed Backend_Layout
1923 configuration parameter.
1924
1925 2018-05-24 Doug Rupp <rupp@adacore.com>
1926
1927 * argv-lynxos178-raven-cert.c: New file.
1928 * libgnat/system-lynxos178-x86.ads: New file.
1929
1930 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
1931
1932 * exp_disp.adb, freeze.adb, gnat1drv.adb, sem_ch5.adb, sem_spark.adb:
1933 Minor reformattings.
1934
1935 2018-05-23 Pascal Obry <obry@adacore.com>
1936
1937 * adaint.c (win32_wait): Properly free the handle/pid lists when
1938 WaitForMultipleObjects fails (return WAIT_FAILED).
1939
1940 2018-05-23 Pascal Obry <obry@adacore.com>
1941
1942 * adaint.c (win32_wait): Add missing parentheses.
1943
1944 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
1945
1946 * exp_ch3.adb (Check_Large_Modular_Array): Moved to Freeze.
1947 (Expand_N_Object_Declaration): Do not check for a large modular array
1948 here.
1949 * freeze.adb (Check_Large_Modular_Array): Moved from Exp_Ch3.
1950 (Freeze_Object_Declaration): Code cleanup. Check for a large modular
1951 array.
1952 * sem_ch3.adb: Minor reformatting.
1953
1954 2018-05-23 Ed Schonberg <schonberg@adacore.com>
1955
1956 * einfo.ads: New attribute on types: Predicated_Parent, to simplify the
1957 retrieval of the applicable predicate function to an itype created for
1958 a constrained array component.
1959 * einfo.adb: Subprograms for Predicated_Parent.
1960 (Predicate_Function): Use new attribute.
1961 * exp_util.adb (Make_Predicate_Call): If the predicate function is not
1962 available for a subtype, retrieve it from the base type, which may have
1963 been frozen after the subtype declaration and not captured by the
1964 subtype declaration.
1965 * sem_aggr.adb (Resolve_Array_Aggregate): An Others association is
1966 legal within a generated initiqlization procedure, as may happen with a
1967 predicate check on a component, when the predicate function applies to
1968 the base type of the component.
1969 * sem_ch3.adb (Analyze_Subtype_Declaration): Clean up inheritance of
1970 predicates for subtype declarations and for subtype indications in
1971 other contexts.
1972 (Process_Subtype): Likewise. Handle properly the case of a private type
1973 with unknown discriminants whose full view is an unconstrained array.
1974 Use Predicated_Parent to indicate source of predicate function on an
1975 itype whose parent is itself an itype.
1976 (Complete_Private_Subtype): If the private view has unknown
1977 discriminants and the full view is an unconstrained array, set base
1978 type of completion to the full view of parent.
1979 (Inherit_Predicate_Flags): Prevent double assignment of predicate
1980 function and flags.
1981 (Build_Subtype): For a constrained array component, propagate predicate
1982 information from original component type declaration.
1983
1984 2018-05-23 Boris Yakobowski <yakobowski@adacore.com>
1985
1986 * libgnat/a-ngelfu.ads (Arctanh, Arccoth): Fix faulty preconditions.
1987
1988 2018-05-23 Arnaud Charlet <charlet@adacore.com>
1989
1990 * checks.adb (Minimize_Eliminate_Overflows): Default initialize Lo and
1991 Hi.
1992 * sem_elab.adb: Make "out" parameters instead of "in out" when
1993 relevant.
1994
1995 2018-05-23 Bob Duff <duff@adacore.com>
1996
1997 * gnatbind.adb (List_Applicable_Restrictions): Add
1998 No_Implementation_Restrictions to the list of restrictions not to list.
1999 Remove double negative "not No_Restriction_List". Comment the
2000 commentary that is output, so it won't cause errors if used directly in
2001 a gnat.adc.
2002
2003 2018-05-23 Ed Schonberg <schonberg@adacore.com>
2004
2005 * sem_prag.adb (Inherit_Class_Wide_Pre): Refine legality check on
2006 class-wide precondition on a type extension when ancestor does not have
2007 a class-wide precondition. Previously the compiler accepted such a
2008 precondition when the ancestor had a class-wide postcondition.
2009
2010 2018-05-23 Javier Miranda <miranda@adacore.com>
2011
2012 * sem_attr.adb (Valid_Scalars): Do not invoke Error_Attr_P to report
2013 the warning on occurrences of this attribute whose evaluation is always
2014 true (since that subprogram aborts processing the attribute). In
2015 addition, replace the node by its boolean result 'True' (required
2016 because the backend has no knowledge of this attribute).
2017
2018 2018-05-23 Bob Duff <duff@adacore.com>
2019
2020 * libgnat/a-convec.adb: (Insert, Insert_Space): Suppress warnings. The
2021 code in question is not reachable in the case where Count_Type'Last is
2022 out of range.
2023
2024 2018-05-23 Yannick Moy <moy@adacore.com>
2025
2026 * doc/gnat_rm/implementation_defined_pragmas.rst: Clarify meaning of
2027 local pragma Warnings Off without On.
2028 * gnat_rm.texi: Regenerate.
2029
2030 2018-05-23 Olivier Hainque <hainque@adacore.com>
2031
2032 * libgnat/g-excact.ads (Is_Foreign_Exception): New predicate.
2033 * libgnat/g-excact.adb: Implement.
2034
2035 2018-05-23 Ed Schonberg <schonberg@adacore.com>
2036
2037 * sem_ch5.adb (Analyze_Iterator_Specification): If a subtype indication
2038 is present, verify its legality when the domain of iteration is a
2039 GNAT-specific formal container, as is already done for arrays and
2040 predefined containers.
2041
2042 2018-05-23 Yannick Moy <moy@adacore.com>
2043
2044 * sem_util.adb (Enclosing_Declaration): Fix the case of a named number
2045 declaration, which was not taken into account.
2046
2047 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
2048
2049 * debug.adb: Switch -gnatd_s is now used to stop elaboration checks on
2050 synchronized suspension.
2051 * rtsfind.ads: Add entries for units Ada.Synchronous_Barriers and
2052 Ada.Synchronous_Task_Control and routines Suspend_Until_True and
2053 Wait_For_Release.
2054 * sem_elab.adb: Document switch -gnatd_s.
2055 (In_Task_Body): New routine.
2056 (Is_Potential_Scenario): Code cleanup. Stop the traversal of a task
2057 body when the current construct denotes a synchronous suspension call,
2058 and restriction No_Entry_Calls_In_Elaboration_Code or switch -gnatd_s
2059 is in effect.
2060 (Is_Synchronous_Suspension_Call): New routine.
2061 * switch-c.adb (Scan_Front_End_Switches): Switch -gnatJ now sets switch
2062 -gnatd_s.
2063
2064 2018-05-23 Javier Miranda <miranda@adacore.com>
2065
2066 * exp_disp.adb (Make_DT): Restrict the initialization of
2067 External_Tag and Expanded_Name to an empty string to the case where
2068 both pragmas apply (i.e. No_Tagged_Streams and Discard_Names), since
2069 restricted runtimes are compiled with pragma Discard_Names.
2070 * doc/gnat_rm/implementation_defined_pragmas.rst,
2071 doc/gnat_rm/implementation_defined_characteristics.rst: Add
2072 documentation.
2073 * gnat_rm.texi: Regenerate.
2074
2075 2018-05-23 Maroua Maalej <maalej@adacore.com>
2076
2077 * sem_spark.adb: Fix of some permission rules of pointers in SPARK.
2078
2079 2018-05-23 Ed Schonberg <schonberg@adacore.com>
2080
2081 * sem_ch5.adb (Preanalyze_Range): The pre-analysis of the domain of
2082 iteration of an Ada2012 loop is performed to determine the type of the
2083 domain, but full analysis is performed once the loop is rewritten as a
2084 while-loop during expansion. The pre-analysis suppresses expansion; it
2085 must also suppress the generation of freeze nodes, which may otherwise
2086 appear in the wrong scope before rewritting.
2087
2088 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
2089
2090 * sem_elab.adb: Update the section on suppressing elaboration warnings.
2091
2092 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
2093
2094 * einfo.adb (Is_Elaboration_Checks_OK_Id): Use predicate
2095 Is_Elaboration_Target.
2096 (Is_Elaboration_Target): New routine.
2097 (Is_Elaboration_Warnings_OK_Id): Use predicate Is_Elaboration_Target.
2098 (Set_Is_Elaboration_Checks_OK_Id): Use predicate Is_Elaboration_Target.
2099 (Set_Is_Elaboration_Warnings_OK_Id): Use predicate
2100 Is_Elaboration_Target.
2101 * einfo.ads: Add new synthesized attribute Is_Elaboration_Target along
2102 with occurrences in nodes.
2103 (Is_Elaboration_Target): New routine.
2104 * sem_prag.adb (Analyze_Pragma): Suppress elaboration warnings when an
2105 elaboration target is subject to pragma Warnings (Off, ...).
2106
2107 2018-05-23 Eric Botcazou <ebotcazou@adacore.com>
2108
2109 * repinfo.adb (List_Type_Info): Remove obsolete stuff.
2110
2111 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
2112
2113 * einfo.adb: Flag304 is now Is_Elaboration_Warnings_OK_Id.
2114 (Is_Elaboration_Warnings_OK_Id): New routine.
2115 (Set_Is_Elaboration_Warnings_OK_Id): New routine.
2116 (Write_Entity_Flags): Output Flag304.
2117 * einfo.ads: Add new attribute Is_Elaboration_Warnings_OK_Id along with
2118 occurrences in entities.
2119 (Is_Elaboration_Warnings_OK_Id): New routine along with pragma Inline.
2120 (Set_Is_Elaboration_Warnings_OK_Id): New routine along with pragma
2121 Inline.
2122 * sem_attr.adb (Analyze_Access_Attribute): Capture the state of
2123 elaboration warnings.
2124 * sem_ch3.adb (Analyze_Object_Declaration): Capture the state of
2125 elaboration warnings.
2126 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Capture the
2127 state of elaboration warnings.
2128 (Analyze_Subprogram_Body_Helper): Capture the state of elaboration
2129 warnings.
2130 (Analyze_Subprogram_Declaration): Capture the state of elaboration
2131 warnings.
2132 * sem_ch9.adb (Analyze_Entry_Declaration): Capture the state of
2133 elaboration warnings.
2134 (Analyze_Single_Task_Declaration): Capture the state of elaboration
2135 warnings.
2136 (Analyze_Task_Type_Declaration): Capture the state of elaboration
2137 warnings.
2138 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Capture the state
2139 of elaboration warnings.
2140 (Analyze_Generic_Subprogram_Declaration): Capture the state of
2141 elaboration warnings.
2142 * sem_elab.adb: Add a section on suppressing elaboration warnings.
2143 Type Processing_Attributes includes component Suppress_Warnings
2144 intended to suppress any elaboration warnings along a path in the
2145 graph. Update Initial_State to include a value for this component.
2146 Types Target_Attributes and Task_Attriutes include component
2147 Elab_Warnings_OK to indicate whether the target or task has elaboration
2148 warnings enabled. component Elab_Warnings_OK.
2149 (Build_Access_Marker): Propagate attribute
2150 Is_Elaboration_Warnings_OK_Node from the attribute to the generated
2151 call marker.
2152 (Extract_Instantiation_Attributes): Set the value for Elab_Warnings_OK.
2153 (Extract_Target_Attributes): Set the value for Elab_Warnings_OK.
2154 (Extract_Task_Attributes): Set the value for Elab_Warnings_OK.
2155 (Process_Conditional_ABE_Access): Suppress futher elaboration warnings
2156 when already in this mode or when the attribute or target have warnings
2157 suppressed.
2158 (Process_Conditional_ABE_Activation_Impl): Do not emit any diagnostics
2159 if warnings are suppressed.
2160 (Process_Conditional_ABE_Call): Suppress further elaboration warnings
2161 when already in this mode, or the target or call have warnings
2162 suppressed.
2163 (Process_Conditional_ABE_Call_Ada): Do not emit any diagnostics if
2164 warnings are suppressed.
2165 (Process_Conditional_ABE_Call_SPARK): Do not emit any diagnostics if
2166 warnings are suppressed.
2167 (Process_Conditional_ABE_Instantiation): Suppress further elaboration
2168 warnings when already in this mode or when the instantiation has
2169 warnings suppressed.
2170 (Process_Conditional_ABE_Instantiation_Ada): Do not emit any
2171 diagnostics if warnings are suppressed.
2172 (Process_Conditional_ABE_Variable_Assignment_Ada): Use the more
2173 specific Is_Elaboration_Warnings_OK_Id rather than Warnings_Off.
2174 (Process_Conditional_ABE_Variable_Assignment_SPARK): Use the more
2175 specific Is_Elaboration_Warnings_OK_Id rather than Warnings_Off.
2176 (Process_Task_Object): Suppress further elaboration warnings when
2177 already in this mode, or when the object, activation call, or task type
2178 have warnings suppressed. Update the processing state to indicate that
2179 the path goes through a task body.
2180 * sinfo.adb (Is_Elaboration_Warnings_OK_Node): Accept attribute
2181 references.
2182 (Set_Is_Elaboration_Warnings_OK_Node): Accept attribute references.
2183 * sinfo.ads: Attribute Is_Elaboration_Warnings_OK_Node now applies to
2184 attribute references.
2185
2186 2018-05-23 Piotr Trojanek <trojanek@adacore.com>
2187
2188 * einfo.ads: Minor reformatting.
2189
2190 2018-05-23 Ed Schonberg <schonberg@adacore.com>
2191
2192 * sem_ch3.adb (Analyze_Object_Declaration): If expression is an
2193 anonymous_access_to_ subprogram formal, apply a conversion to force an
2194 accsssibility check that will fail statically, enforcing 3.10.2 (13).
2195
2196 2018-05-23 Daniel Mercier <mercier@adacore.com>
2197
2198 * gnat1drv.adb: Turn off length expansion in CodePeer mode.
2199
2200 2018-05-23 Bob Duff <duff@adacore.com>
2201
2202 * freeze.adb: (Check_Address_Clause): Deal with build-in-place
2203 aggregates in addition to build-in-place calls.
2204
2205 2018-05-23 Bob Duff <duff@adacore.com>
2206
2207 * einfo.ads: Minor reformatting.
2208 * sem_ch3.adb: Likewise.
2209 * sinfo.ads: Likewise.
2210
2211 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
2212
2213 * exp_ch3.adb (Default_Initialize_Object): Do not optimize scalar array
2214 initialization when the component type has predicates.
2215 * exp_ch4.adb (Expand_N_Allocator): Do not optimize scalar array
2216 allocation when the component type has predicates.
2217
2218 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
2219
2220 * einfo.adb, exp_disp.adb, sem_ch3.adb, sem_ch6.adb, sem_prag.adb:
2221 Minor reformatting.
2222
2223 2018-05-22 Justin Squirek <squirek@adacore.com>
2224
2225 * sem_ch6.adb (Analyze_Expression_Function): Propagate flags from the
2226 original function spec into the generated function spec due to
2227 expansion of expression functions during analysis.
2228 (Analyze_Subprogram_Body_Helper): Modify check on formal parameter
2229 references from the body to the subprogram spec in the case of
2230 expression functions because of inconsistances related to having a
2231 generated body.
2232 * libgnarl/s-osinte__android.ads: Flag parameters as unused.
2233 * libgnarl/s-osinte__lynxos178e.ads: Likewise.
2234 * libgnarl/s-osinte__qnx.adb: Likewise.
2235 * libgnarl/s-osinte__qnx.ads: Likewise.
2236
2237 2018-05-22 Doug Rupp <rupp@adacore.com>
2238
2239 * init.c (HAVE_ADJUST_CONTEXT_FOR_RAISE): Don't define on VxWorks7 for
2240 AArch64.
2241
2242 2018-05-22 Olivier Hainque <hainque@adacore.com>
2243
2244 * libgnat/a-except.adb (Exception_Propagation.Propagate_Exception):
2245 Expect an Exception_Occurence object, not an Access.
2246 (Complete_And_Propagate_Occurrence): Adjust accordingly.
2247 (Raise_From_Signal_Handler): Likewise.
2248 (Reraise_Occurrence_No_Defer): If we have a Machine_Occurrence
2249 available in the provided occurrence object, just re-propagate the
2250 latter as a bare "raise;" would do.
2251 * libgnat/a-exexpr.adb (Propagate_Exception): Adjust to spec change.
2252 * libgnat/a-exstat.adb (String_To_EO): Initialize X.Machine_Occurrence
2253 to null, to mark that the occurrence we're crafting from the stream
2254 contents is not being propagated (yet).
2255
2256 2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
2257
2258 * exp_aggr.adb (Initialize_Ctrl_Record_Component): Insert the generated
2259 code for a transient component in line with the rest of the
2260 initialization code, rather than before the aggregate. This ensures
2261 that the component has proper visibility of the discriminants.
2262
2263 2018-05-22 Jerome Lambourg <lambourg@adacore.com>
2264
2265 * adaint.c: Reorganize QNX-specific macros, use syspage to retreive the
2266 number of CPUs.
2267
2268 2018-05-22 Jerome Lambourg <lambourg@adacore.com>
2269
2270 * sigtramp-qnx.c: Properly restore link register in signal trampoline.
2271
2272 2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
2273
2274 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Strip away any
2275 conversions before extracting the value of the expression.
2276 * exp_ch3.adb (Default_Initialize_Object): Optimize the default
2277 initialization of an array of scalars.
2278 (Get_Simple_Init_Val): Add processing for array types. Remove the
2279 processing of strings because this case is already handled by the array
2280 case.
2281 (Needs_Simple_Initialization): Moved to Sem_Util.
2282 (Simple_Init_Array_Type): New routine.
2283 (Simple_Init_Initialize_Scalars_Type): Reimplemented to use the new
2284 facilities from Sem_Util.
2285 (Simple_Initialization_OK): New routine.
2286 * exp_ch3.ads (Needs_Simple_Initialization): Moved to Sem_Util.
2287 * exp_ch4.adb (Expand_N_Allocator): Optimize the default allocation of
2288 an array of scalars.
2289 * sem_prag.adb (Analyze_Float_Value): New routine.
2290 (Analyze_Integer_Value): New routine.
2291 (Analyze_Pragma): Reimplement the analysis of pragma Initialize_Scalars
2292 to handled the extended form of the pragma.
2293 (Analyze_Type_Value_Pair): New routine.
2294 * sem_util.adb: Add invalid value-related data structures.
2295 (Examine_Array_Bounds): New routine.
2296 (Has_Static_Array_Bounds): Reimplemented.
2297 (Has_Static_Non_Empty_Array_Bounds): New routine.
2298 (Invalid_Scalar_Value): New routine.
2299 (Needs_Simple_Initialization): Moved from Exp_Ch3.
2300 (Set_Invalid_Scalar_Value): New routines.
2301 * sem_util.ads (Has_Static_Non_Empty_Array_Bounds): New routine.
2302 (Invalid_Scalar_Value): New routine.
2303 (Needs_Simple_Initialization): Moved from Exp_Ch3.
2304 (Set_Invalid_Scalar_Value): New routines.
2305 * snames.ads-tmpl: Add names for the salar type families used by pragma
2306 Initialize_Scalars.
2307
2308 2018-05-22 Javier Miranda <miranda@adacore.com>
2309
2310 * exp_disp.adb (Make_DT): Initialize the External_Tag with an empty
2311 string when pragma No_Tagged_Streams is applicable to the tagged type,
2312 and initialize the Expanded_Name with an empty string when pragma
2313 Discard_Names is applicable to the tagged type.
2314
2315 2018-05-22 Ed Schonberg <schonberg@adacore.com>
2316
2317 * sem_ch6.adb (Check_Conformance): Add RM reference for rule that a
2318 formal subprogram is never subtype conformqnt, and thus cannot be the
2319 prefix of 'Access. Reject as well the attribute when applied to a
2320 renaming of a formal subprogram.
2321
2322 2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
2323
2324 * exp_ch3.adb (Build_Array_Init_Proc): Update the call to
2325 Needs_Simple_Initialization.
2326 (Build_Init_Statements): Update the call to Get_Simple_Init_Val.
2327 (Check_Subtype_Bounds): Renamed to Extract_Subtype_Bounds. Update the
2328 profile and comment on usage.
2329 (Default_Initialize_Object): Do not use New_Copy_Tree to set the proper
2330 Sloc of a value obtained from aspect Default_Value because this could
2331 potentially replicate large trees. The proper Sloc is now set in
2332 Get_Simple_Init_Val.
2333 (Get_Simple_Init_Val): Reorganized by breaking the various cases into
2334 separate routines. Eliminate the use of global variables.
2335 (Init_Component): Update the call to Get_Simple_Init_Val.
2336 (Needs_Simple_Initialization): Update the parameter profile and all
2337 uses of T.
2338 (Simple_Init_Defaulted_Type): Copy the value of aspect Default_Value
2339 and set the proper Sloc.
2340 * exp_ch3.ads (Get_Simple_Init_Val): Update the parameter profile and
2341 comment on usage.
2342 (Needs_Simple_Initialization): Update the parameter profile.
2343
2344 2018-05-22 Patrick Bernardi <bernardi@adacore.com>
2345
2346 * sem_ch3.adb (Build_Discriminant_Constraints): Raise an error if the
2347 user tries to use a subtype indication as a discriminant constraint.
2348
2349 2018-05-22 Ed Schonberg <schonberg@adacore.com>
2350
2351 * exp_ch4.ads, exp_ch4.adb, exp_util.adb, expander.adb: Remove mention
2352 of N_Reduction_Expression and N_Reduction_Expression_Parameter.
2353 * par-ch4.adb: Remove parsing routines for reduction expressions.
2354 * sem.adb, sinfo.ads, sinfo.adb, sem_ch4.ads, sem_ch4.adb, sem_res.adb,
2355 sem_spark.adb, sprint.adb: Remove analysis routines for reduction
2356 expressions.
2357
2358 2018-05-22 Arnaud Charlet <charlet@adacore.com>
2359
2360 * sem_ch8.adb (Check_Frozen_Renaming): Do not emit error in
2361 Relaxed_RM_Semantics mode.
2362
2363 2018-05-22 Arnaud Charlet <charlet@adacore.com>
2364
2365 * comperr.adb (Delete_SCIL_Files): Take into account
2366 N_Generic_Package_Renaming_Declaration.
2367
2368 2018-05-22 Ed Schonberg <schonberg@adacore.com>
2369
2370 * sem_ch3.adb (Search_Derivation_Levels): Whenever a parent type is
2371 private, use the full view if available, because it may include renamed
2372 discriminants whose values are stored in the corresponding
2373 Stored_Constraint.
2374
2375 2018-05-22 Ed Schonberg <schonberg@adacore.com>
2376
2377 * einfo.ads, einfo.adb: New attribute Hidden_In_Formal_Instance,
2378 defined on packages that are actuals for formal packages, in order to
2379 set/reset the visibility of the formals of a formal package with given
2380 actuals, when there are subsequent uses of those formals in the
2381 enclosing generic, as required by RN 12.7 (10).
2382 * atree.ads, atree.adb: Add operations for Elist30.
2383 * atree.h: Add Elist30.
2384 * sem_ch12.adb (Analyze_Formal_Package_Instantiation): Collect formals
2385 that are not defaulted and are thus not visible within the current
2386 instance.
2387 (Check_Formal_Packages): Reset visibility of formals of a formal
2388 package that are not defaulted, on exit from current instance.
2389
2390 2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
2391
2392 * sem_prag.adb (Analyze_Input_Output): Emit an error when a non-null,
2393 non-'Result output appears in the output list of a function.
2394
2395 2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
2396
2397 * exp_attr.adb (Build_Array_VS_Func): Reimplemented.
2398 (Build_Record_VS_Func): Reimplemented.
2399 (Expand_N_Attribute): Reimplement the handling of attribute
2400 'Valid_Scalars.
2401 * sem_attr.adb (Analyze_Attribute): Reimplement the handling of
2402 attribute 'Valid_Scalars.
2403 * sem_util.adb (Scalar_Part_Present): Reimplemented.
2404 (Validated_View): New routine.
2405 * sem_util.ads (Scalar_Part_Present): Update the parameter profile and
2406 comment on usage.
2407 (Validated_View): New routine.
2408 * doc/gnat_rm/implementation_defined_attributes.rst: Update the
2409 documentation of attribute 'Valid_Scalars.
2410 * gnat_rm.texi: Regenerate.
2411
2412 2018-05-22 Bob Duff <duff@adacore.com>
2413
2414 * binde.adb: (Choose): Ignore a pragma Elaborate_Body that appears in
2415 the spec of a SAL_Interface package.
2416
2417 2018-05-22 Ed Schonberg <schonberg@adacore.com>
2418
2419 * freeze.adb (Freeze_Entity): When analyzing delayed aspects of an
2420 entity E within a generic unit, indicate that there are no remaining
2421 delayed aspects after invoking Analyze_Aspects_At_Freeze_Point. The
2422 entity E is not frozen yet but the aspects should not be reanalyzed at
2423 the freeze point, which may be outside of the generic and may not have
2424 the proper visibility.
2425
2426 2018-05-22 Bob Duff <duff@adacore.com>
2427
2428 * doc/gnat_ugn/gnat_utility_programs.rst: Add documentation for
2429 the new --split-line-before-record, --indent-named-statements and
2430 --no-align-modes gnatpp switches.
2431
2432 2018-05-22 Ed Schonberg <schonberg@adacore.com>
2433
2434 * sem_prag.adb (Process_Compile_Time_Warning_Or_Error): Handle properly
2435 a second argument that is a constant of a given string value.
2436
2437 2018-05-22 Doug Rupp <rupp@adacore.com>
2438
2439 * sigtramp-vxworks-target.inc: Align stack to 128bits on AArch64.
2440
2441 2018-05-22 Jerome Lambourg <lambourg@adacore.com>
2442
2443 * sigtramp-qnx.c: Fix stack alignment issue in the signal trampoline.
2444
2445 2018-05-22 Ed Schonberg <schonberg@adacore.com>
2446
2447 * freeze.adb (Freeze_Fixed_Point_Type): If the first subtype has
2448 delayed aspects, analyze them now, os that the representation of the
2449 type (size, bounds) can be computed and validated.
2450
2451 2018-05-22 Olivier Hainque <hainque@adacore.com>
2452
2453 * libgnat/s-dwalin.adb (Enable_Cache): Skip symbols outside of the
2454 executable code section boundaries.
2455
2456 2018-05-22 Javier Miranda <miranda@adacore.com>
2457
2458 * locales.c: New implementation for the Ada.Locales package.
2459 * libgnat/a-locale.ads: Remove comment indicating that this is not
2460 implemented.
2461 * doc/gnat_rm/standard_library_routines.rst: Remove comment indicating
2462 that this is not implemented.
2463 * gnat_rm.texi: Regenerate.
2464
2465 2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
2466
2467 * exp_ch5.adb, freeze.adb, pprint.adb, sem_ch4.adb, sem_res.adb: Minor
2468 reformattings.
2469
2470 2018-05-22 Justin Squirek <squirek@adacore.com>
2471
2472 * sem_ch12.adb (In_Same_Declarative_Part): Moved to sem_util.
2473 (Freeze_Subprogram_Body, Install_Body): Modify calls to
2474 In_Same_Declarative_Part.
2475 * sem_prag.adb (Analyze_Pragma-Pragma_Pure_Function): Add check to
2476 verify pragma declaration is within the same declarative list with
2477 corresponding error message.
2478 * sem_util.adb, sem_util.ads (In_Same_Declarative_Part): Moved from
2479 sem_ch12.adb and generalized to be useful outside the scope of
2480 freezing.
2481
2482 2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
2483
2484 * sem_ch6.adb (Analyze_Subprogram_Declaration): Set the proper
2485 categorization of the unit after processing the aspects in case one of
2486 its aspects is converted into a categorization pragma.
2487
2488 2018-05-21 Ed Schonberg <schonberg@adacore.com>
2489
2490 * freeze.adb (Warn_Overlay): Do not emit a wawrning on an object
2491 declaration with an explicit address clause and a type with default
2492 initialization, if the declaration carries an aspect
2493 Suppress_Initialization.
2494
2495 2018-05-21 Daniel Mercier <mercier@adacore.com>
2496
2497 * pprint.adb: Use mixed case for attribute names.
2498
2499 2018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
2500
2501 * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Rename the call to
2502 Analyze_Aspect_Specifications_On_Body_Or_Stub.
2503 (Analyze_Subprogram_Body_Helper): Rename the calls to
2504 Analyze_Aspect_Specifications_On_Body_Or_Stub.
2505 * sem_ch9.adb (Analyze_Entry_Body): Rename the call to
2506 Analyze_Aspect_Specifications_On_Body_Or_Stub.
2507 * sem_ch10.adb: Add with and use clause for Sem_Ch13.
2508 (Analyze_Package_Body_Stub): Add constant Id. Decorate the package stub
2509 prior to analyzing its aspects.
2510 (Analyze_Protected_Body_Stub): Add constant Id. Decorate the package
2511 stub prior to analyzing its aspects. Save and restore the configuration
2512 switches.
2513 (Analyze_Task_Body_Stub): Add constant Id. Decorate the package stub
2514 prior to analyzing its aspects.
2515 * sem_ch13.adb (Analyze_Aspect_Specifications_On_Body_Or_Stub): Renamed
2516 to Analyze_Aspects_On_Subprogram_Body_Or_Stub.
2517 * sem_ch13.ads (Analyze_Aspect_Specifications_On_Body_Or_Stub): Renamed
2518 to Analyze_Aspects_On_Subprogram_Body_Or_Stub.
2519 * sem_prag.adb: Code reformatting.
2520 (Analyze_Refined_Depends_Global_Post): Consider task body stubs.
2521
2522 2018-05-21 Jerome Lambourg <lambourg@adacore.com>
2523
2524 * gcc-interface/Makefile.in: Add g-soliop__qnx.ads to the runtime build
2525 for QNX.
2526
2527 2018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
2528
2529 * exp_cg.adb: Remove with and use clause for Exp_Disp.
2530 * exp_ch9.adb: Remove with and use clause for Exp_Disp.
2531 * exp_disp.adb (Is_Predefined_Dispatching_Operation): Moved to Sem_Util.
2532 (Is_Predefined_Interface_Primitive): Moved to Sem_Util.
2533 (Is_Predefined_Internal_Operation): Moved to Sem_Util.
2534 * exp_disp.ads (Is_Predefined_Dispatching_Operation): Moved to Sem_Util.
2535 (Is_Predefined_Interface_Primitive): Moved to Sem_Util.
2536 (Is_Predefined_Internal_Operation): Moved to Sem_Util.
2537 * exp_dist.adb: Remove with and use clause for Exp_Disp.
2538 * freeze.adb: Remove with and use clause for Exp_Disp.
2539 * sem_cat.adb: Remove with and use clause for Exp_Disp.
2540 * sem_ch6.adb: Remove with and use clause for Exp_Disp.
2541 * sem_ch12.adb: Remove with and use clause for Exp_Disp.
2542 * sem_elab.adb (Check_Overriding_Primitive): Do not process predefined
2543 primitives.
2544 * sem_util.adb: Remove with and use clause for Exp_Disp.
2545 (Is_Predefined_Dispatching_Operation): Moved from Exp_Disp.
2546 (Is_Predefined_Interface_Primitive): Moved from Exp_Disp.
2547 (Is_Predefined_Internal_Operation): Moved from Exp_Disp.
2548 * sem_util.ads (Is_Predefined_Dispatching_Operation): Moved from
2549 Exp_Disp.
2550 (Is_Predefined_Interface_Primitive): Moved from Exp_Disp.
2551 (Is_Predefined_Internal_Operation): Moved from Exp_Disp.
2552
2553 2018-05-21 Ed Schonberg <schonberg@adacore.com>
2554
2555 * sem_res.adb (Valid_Conversion): Improve error message on an illegal
2556 type conversion whose expression has a limited view of a type.
2557
2558 2018-05-21 Ed Schonberg <schonberg@adacore.com>
2559
2560 * exp_ch5.adb (Build_Formal_Container_Iteration): If source has
2561 explicit name for iterator loop, preserve that name in expanded
2562 construct, for possible use in exit statements.
2563
2564 2018-05-21 Javier Miranda <miranda@adacore.com>
2565
2566 * sem_ch4.adb (Analyze_Membership_Op): Avoid compiler crash when the
2567 spec of a unit has Ada 2012 membership tests with multiple choices and
2568 the unit body is not compiled under Ada 2012 mode.
2569
2570 2018-05-21 Doug Rupp <rupp@adacore.com>
2571
2572 * sigtramp-vxworks-target.inc: Set cfa_reg properly from sigcontext
2573 pregs.
2574 (CFI_COMMON_REGS): Restore LR jic probed from prologue.
2575 (REGNO_PC_OFFSET): Change to correct value for Aarch64.
2576
2577 2018-05-21 Jose Ruiz <ruiz@adacore.com>
2578
2579 * doc/gnat_ugn/gnat_utility_programs.rst, exp_attr.adb,
2580 libgnarl/s-tassta.adb: Minor typo fixes
2581
2582 2018-05-21 Ed Schonberg <schonberg@adacore.com>
2583
2584 * sem_ch4.adb (Analyze_One_Call): Recognize complex cases where an
2585 indexed call originally in prefix forn is itself the prefix of a
2586 further call.
2587
2588 2018-05-21 Piotr Trojanek <trojanek@adacore.com>
2589
2590 * sem_eval.adb (Is_Null_Range): Clarify access to the full view of a
2591 type.
2592 (Not_Null_Range): Same as above.
2593
2594 2018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
2595
2596 * exp_ch3.adb: Minor reformatting.
2597 * exp_ch6.adb: Likewise.
2598 * freeze.adb: Likewise.
2599 * inline.adb: Likewise.
2600 * sem_util.adb: Likewise.
2601
2602 2018-05-21 Yannick Moy <moy@adacore.com>
2603
2604 * inline.adb (Expand_Inlined_Call.Process_Formals): Use a type
2605 conversion instead of an unchecked type conversion when inlining a
2606 return statement, unless type qualification is required (for character
2607 and string literal) or no check can result from the conversion (for
2608 access types).
2609 * opt.ads: Update comment.
2610
2611 2018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
2612
2613 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Install the elaboration
2614 model of the compilation unit spec, if any.
2615 * sem_ch7.adb (Analyze_Package_Body_Helper): Install the elaboration
2616 model of the compilation unit spec, if any.
2617 * sem_ch10.adb (Analyze_Subunit): Install the elaboration model of the
2618 parent compilation unit spec, if any.
2619 * sem_elab.adb (Check_Elaboration_Scenarios): Restore the elaboration
2620 model of the main unit.
2621 (Is_Same_Unit): The routine now uses Unit_Entity.
2622 (Is_Subunit): Removed.
2623 (Normalize_Unit): Removed.
2624 (Unit_Entity): New routine.
2625 * sem_prag.adb (Analyze_Pragma): Reimplement the handling of pragma
2626 Elaboration_Checks. The analysis now ensures that the pragma appears at
2627 the configuration level, and on the initial declaration of a unit.
2628 Other placements are either flagged as illegal, or ignored.
2629 (Check_Duplicate_Elaboration_Checks_Pragma): New routine.
2630 (Ignore_Elaboration_Checks_Pragma): New routine.
2631 * sem_util.adb (Install_Elaboration_Model): New routine.
2632 * sem_util.ads (Install_Elaboration_Model): New routine.
2633 * doc/gnat_rm/implementation_defined_pragmas.rst: Update the
2634 documentation of pragma Elaboration_Checks.
2635 * gnat_rm.texi: Regenerate.
2636
2637 2018-05-21 Olivier Hainque <hainque@adacore.com>
2638
2639 * libgnat/s-trasym__dwarf.adb (Executable_Name): Return argv[0] instead
2640 of empty string when argv[0] couldn't be found on PATH.
2641 (Enable_Cache): Raise Program_Error instead of attempting a null
2642 pointer dereference when the Exec_Module initialization failed.
2643
2644 2018-05-21 Piotr Trojanek <trojanek@adacore.com>
2645
2646 * libgnarl/a-reatim.ads (Clock_Time): Remove External aspect.
2647 * libgnarl/a-taside.ads (Tasking_State): Likewise.
2648 * libgnat/a-calend.ads (Clock_Time): Likewise.
2649
2650 2018-05-21 Yannick Moy <moy@adacore.com>
2651
2652 * sem_ch6.adb (Analyze_Procedure_Call): Refine test to recognize prefix
2653 call notation in inlined call in GNATprove mode.
2654
2655 2018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
2656
2657 * einfo.adb (Is_External_State): An abstract state is also external
2658 when it is declared with option "synchronous".
2659 * einfo.ads: Update the documentation of synthesized attribute
2660 Is_External_State.
2661 * sem_util.adb (Find_Simple_Properties): New routine.
2662 (Is_Enabled_External_Property): New routine.
2663 (State_Has_Enabled_Property): Reimplemented. The two flavors of option
2664 External have precedence over option Synchronous when determining
2665 whether a property is in effect.
2666
2667 2018-05-21 Yannick Moy <moy@adacore.com>
2668
2669 * sem_eval.adb (Static_Length): Take into account case of variable of
2670 subtype string literal.
2671
2672 2018-05-21 Olivier Hainque <hainque@adacore.com>
2673
2674 * libgnat/s-objrea.ads (Get_Memory_Bounds): Rename as Get_Xcode_Bounds.
2675 (Object_Section): Rename Flag_Alloc component as Flag_Xcode.
2676 * libgnat/s-objrea.adb (Get_Xcode_Bounds): Adjust to new subprogram and
2677 component name.
2678 (Get_Section, ELF case): Set Flag_Xcode from SHF_EXECINSTR.
2679 * libgnat/s-dwalin.adb (Open): Adjust to the Get_Memory_Bounds name
2680 change.
2681
2682 2018-05-21 Olivier Hainque <hainque@adacore.com>
2683
2684 * libgnat/s-dwalin.ads (Dwarf_Context): Change type of Load_Address to
2685 Address, and type of Low, High to Storage_Offset.
2686 (Low): Rename as Low_Address and convey that the return value is a
2687 runtime reference accounting for a load address.
2688 * libgnat/s-dwalin.adb (Read_Aranges_Entry): Adjust to the
2689 address/offset type changes.
2690 (Aranges_Lookup): Likewise.
2691 (Symbolic_Address): Likewise.
2692 (Symbolic_Traceback): Likewise.
2693 (Dump_Cache): Likewise.
2694 (Is_Inside): Likewise.
2695 (Open): Likewise.
2696 (Set_Load_Address): Likewise.
2697 (Low_Address): Likewise, and account for C.Load_Address.
2698 * libgnat/s-trasym__dwarf.adb (Lt): Use Low_Address instead of Low.
2699 (Multi_Module_Symbolic_Traceback): Compare address in traceback
2700 with module Low_Address instead of Low.
2701
2702 2018-05-21 Olivier Hainque <hainque@adacore.com>
2703
2704 * libgnat/s-dwalin.ads (Dwarf_Context): Rename Load_Slide as
2705 Load_Address.
2706 * libgnat/s-dwalin.adb (Is_Inside): Adjust accordingly.
2707 (Set_Load_Address): Likewise.
2708 (Symbolic_Traceback): Likewise.
2709
2710 2018-05-21 Olivier Hainque <hainque@adacore.com>
2711
2712 * libgnat/s-trasym__dwarf.adb (Add_Module_To_Cache): Expect a
2713 Load_Address argument and pass it down to Init_Module.
2714 * libgnat/s-tsmona__linux.adb (Build_Cache_For_All_Modules): Pass
2715 lm.l_addr as the Load_Address to Add_Module_To_Cache.
2716
2717 2018-05-21 Piotr Trojanek <trojanek@adacore.com>
2718
2719 * einfo.adb (Has_Discriminants): Stronger assertion.
2720 (Set_Has_Discriminants): Stronger assertion.
2721 * sem_ch13.adb (Push_Scope_And_Install_Discriminants): Adapt to respect
2722 the stronger assertion on Has_Discriminant.
2723 (Uninstall_Discriminants_And_Pop_Scope): Same as above.
2724 * sem_util.adb (New_Copy_Tree): Same as above.
2725 * sem_ch7.adb (Generate_Parent_References): Prevent calls to
2726 Has_Discriminant on non-type entities that might happen when the
2727 compiled code has errors.
2728 * sem_ch3.adb (Derived_Type_Declaration): Only call
2729 Set_Has_Discriminant on type entities.
2730
2731 2018-05-21 Arnaud Charlet <charlet@adacore.com>
2732
2733 * exp_unst.adb (Unnest_Subprogram): Unnest all subprograms relevant for
2734 code generation.
2735
2736 2018-05-21 Piotr Trojanek <trojanek@adacore.com>
2737
2738 * lib.ads: Fix typo in enumeration in comment.
2739
2740 2018-05-21 Ed Schonberg <schonberg@adacore.com>
2741
2742 * sem_attr.adb (Analyze_Attribute, case Scalar_Storage_Order): The
2743 attribute reference is legal within a generic unit when the prefix is a
2744 formal private type.
2745
2746 2018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
2747
2748 * exp_ch7.adb (Establish_Transient_Scope): Code cleanup. Do not
2749 delegate the secondary stack management when there is no suitable
2750 transient context, and the transient scope was intended to manage the
2751 secondary stack because this causes premature reclamation. Change the
2752 transient scope creation logic by special casing assignment statements
2753 of controlled components for type initialization procedures.
2754 (Find_Node_To_Be_Wrapped): Renamed to Find_Transient_Context. Update
2755 the comment on usage.
2756 (Find_Transient_Context): Change the initinte loop into a while loop.
2757 Iterations schemes and iterator specifications are not valid transient
2758 contexts because they rely on special processing. Assignment statements
2759 are now treated as a normal transient context, special cases are
2760 handled by the caller. Add special processing for pragma Check.
2761 (Is_OK_Construct): Removed. Its functionality has been merged in
2762 routine Find_Transient_Context.
2763 * sem_ch5.adb (Check_Call): Reimplemented. Add code to properly
2764 retrieve the subprogram being invoked. Use a more accurate predicate
2765 (Requires_Transient_Scope) to determine that the function will emply
2766 the secondary stack.
2767
2768 2018-05-21 Piotr Trojanek <trojanek@adacore.com>
2769
2770 * ada_get_targ.adb: Fix subprogram body headers.
2771 * adabkend.adb: Likewise.
2772 * checks.adb: Likewise.
2773 * exp_ch3.adb: Likewise.
2774 * exp_ch5.adb: Likewise.
2775 * exp_ch9.adb: Likewise.
2776 * exp_dist.adb: Likewise.
2777 * exp_tss.adb: Likewise.
2778 * inline.adb: Likewise.
2779 * lib-writ.adb: Likewise.
2780 * lib-xref-spark_specific.adb: Likewise.
2781 * libgnarl/s-osinte__darwin.adb: Likewise.
2782 * libgnarl/s-stusta.adb: Likewise.
2783 * libgnarl/s-taprop__solaris.adb: Likewise.
2784 * libgnarl/s-tposen.adb: Likewise.
2785 * libgnarl/s-vxwext__kernel-smp.adb: Likewise.
2786 * libgnarl/s-vxwext__kernel.adb: Likewise.
2787 * libgnat/a-btgbso.adb: Likewise.
2788 * libgnat/a-cfdlli.adb: Likewise.
2789 * libgnat/a-cfhama.adb: Likewise.
2790 * libgnat/a-cfinve.adb: Likewise.
2791 * libgnat/a-cimutr.adb: Likewise.
2792 * libgnat/a-coboho.adb: Likewise.
2793 * libgnat/a-cofove.adb: Likewise.
2794 * libgnat/a-cofuve.adb: Likewise.
2795 * libgnat/a-comutr.adb: Likewise.
2796 * libgnat/a-exexda.adb: Likewise.
2797 * libgnat/a-tags.adb: Likewise.
2798 * libgnat/a-tideau.adb: Likewise.
2799 * libgnat/a-wtdeau.adb: Likewise.
2800 * libgnat/a-ztdeau.adb: Likewise.
2801 * libgnat/g-alleve.adb: Likewise.
2802 * libgnat/s-excdeb.adb: Likewise.
2803 * libgnat/s-parint.adb: Likewise.
2804 * libgnat/s-shasto.adb: Likewise.
2805 * libgnat/s-traceb__hpux.adb: Likewise.
2806 * prepcomp.adb: Likewise.
2807 * sem_ch4.adb: Likewise.
2808 * sem_ch6.adb: Likewise.
2809 * sem_dist.adb: Likewise.
2810 * sem_prag.adb: Likewise.
2811 * sem_util.adb: Likewise.
2812 * sinfo.adb: Likewise.
2813 * switch.adb: Likewise.
2814
2815 2018-05-04 John Marino <gnugcc@marino.st>
2816
2817 PR ada/85635
2818 * link.c (BSD platforms): Add missing backslash.
2819
2820 2018-04-27 Eric Botcazou <ebotcazou@adacore.com>
2821
2822 PR ada/85540
2823 * init.c (__gnat_handle_vms_condition): Add missing parentheses.
2824
2825 2018-04-25 Eric Botcazou <ebotcazou@adacore.com>
2826
2827 PR ada/85007
2828 * gnat_ugn.texi: Regenerate.
2829
2830 2018-03-23 Eric Botcazou <ebotcazou@adacore.com>
2831
2832 PR ada/85007
2833 * gnatlink.adb (Gnatlink): Remove handling of -b switch.
2834 * doc/gnat_ugn/building_executable_programs_with_gnat.rst (gnatlink):
2835 Remove documentation of -b switch.
2836
2837 2018-03-23 Eric Botcazou <ebotcazou@adacore.com>
2838
2839 PR ada/85036
2840 * gnatlink.adb (Process_Args): Drop existing link switches if multiple
2841 switches are passed for --LINK.
2842
2843 2018-03-12 Eric Botcazou <ebotcazou@adacore.com>
2844
2845 PR ada/82813
2846 * gcc-interface/misc.c (gnat_post_options): Disable string overflow
2847 warnings.
2848
2849 2018-03-10 Eric Botcazou <ebotcazou@adacore.com>
2850
2851 * gcc-interface/trans.c (node_has_volatile_full_access) <N_Identifier>:
2852 Consider only entities for objects.
2853
2854 2018-03-07 Sebastian Huber <sebastian.huber@embedded-brains.de>
2855
2856 * gcc-interface/Makefile.in (OSCONS_CPP): Remove redundant
2857 $(GNATLIBCFLAGS).
2858 (OSCONS_EXTRACT): Add $(GNATLIBCFLAGS_FOR_C).
2859
2860 2018-03-06 Eric Botcazou <ebotcazou@adacore.com>
2861
2862 * gcc-interface/trans.c (convert_with_check): Fix typo in the condition
2863 guarding the overflow check emitted for the upper bound of a floating-
2864 point conversion.
2865
2866 2018-03-06 Eric Botcazou <ebotcazou@adacore.com>
2867
2868 * gcc-interface/utils.c (def_builtin_1): Bail out on error_mark_node.
2869
2870 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
2871
2872 * libgnat/i-cexten.ads (Float_128): New type.
2873
2874 2018-02-02 Eric Botcazou <ebotcazou@adacore.com>
2875
2876 * gcc-interface/decl.c (array_type_has_nonaliased_component): Return
2877 false if the component type is a pointer.
2878
2879 2018-01-11 Gary Dismukes <dismukes@adacore.com>
2880
2881 * exp_ch3.adb (Default_Initialize_Object): Call New_Copy_Tree on the
2882 result of Get_Simple_Init_Value and pass the source location of the
2883 object declaration's object_definition.
2884
2885 2018-01-11 Ed Schonberg <schonberg@adacore.com>
2886
2887 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration): Handle
2888 properly object declarations with initializations that are
2889 build-in-place function calls, when there is an address specification,
2890 either as an aspect specification or an explicit attribute
2891 specification clause, for the initialized object.
2892 * freeze.adb (Check_Address_Clause): Do not remove side-effects from
2893 initial expressions in the case of a build-in-place call.
2894
2895 2018-01-11 Piotr Trojanek <trojanek@adacore.com>
2896
2897 * sem_eval.adb (Is_Null_Range): Retrieve the full view when called on a
2898 private (sub)type; refactor to avoid early return statement.
2899 (Not_Null_Range): Same as above.
2900
2901 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
2902
2903 * freeze.adb (Freeze_Entity): Ensure that a Ghost type is not
2904 concurrent, nor effectively volatile.
2905 * ghost.adb (Check_Ghost_Type): New routine.
2906 * ghost.ads (Check_Ghost_Type): New routine.
2907 * sem_util.adb (Is_Declaration): Reimplemented. The routine can now
2908 consider specific subsets of declarations.
2909 (Is_Declaration_Other_Than_Renaming): Removed. Its functionality is
2910 replicated by Is_Declaration.
2911 * sem_util.ads (Is_Declaration): New parameter profile. Update the
2912 comment on usage.
2913 (Is_Declaration_Other_Than_Renaming): Removed.
2914
2915 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
2916
2917 * sem_ch5.adb (Analyze_Assignment): Assignments to variables that act
2918 as Part_Of consituents of single protected types are illegal when they
2919 take place inside a protected function.
2920 (Diagnose_Non_Variable_Lhs): Use Within_Function to check for an
2921 enclosing function.
2922 (Is_Protected_Part_Of_Constituent): New routine.
2923 (Within_Function): New routine.
2924
2925 2018-01-11 Arnaud Charlet <charlet@adacore.com>
2926
2927 Bump copyright notices to 2018.
2928
2929 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
2930
2931 * binde.adb, par-ch6.adb, par-ch9.adb, sem_ch12.adb, sem_ch13.adb:
2932 Minor reformatting.
2933
2934 2018-01-11 Justin Squirek <squirek@adacore.com>
2935
2936 * par-ch6.adb (Scan_Body_Or_Expression_Function): Add additional check
2937 to make sure a given expression function is properly parenthesized.
2938
2939 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
2940
2941 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Check the
2942 categorization of a subprogram body which does not complete a previous
2943 declaration.
2944
2945 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
2946
2947 * sem_ch10.adb (Check_Private_Child_Unit): Ensure that the enclosing
2948 scope of package Ada is Standard.
2949
2950 2018-01-11 Ed Schonberg <schonberg@adacore.com>
2951
2952 * sem_ch13.adb (Replace_Type_Ref): Handle properly reference to a
2953 subcomponent of the current entity when building the body for a dynamic
2954 predicate function for a record with composite subcomponents.
2955
2956 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
2957
2958 * exp_aggr.adb (Convert_Aggr_In_Object_Decl): Update the call to
2959 Establish_Transient_Scope.
2960 (Convert_To_Assignments): Update the call to Establish_Transient_Scope.
2961 (Expand_Array_Aggregate): Update the call to Establish_Transient_Scope.
2962 * exp_ch6.adb (Expand_Call_Helper): Update the call to
2963 Establish_Transient_Scope.
2964 (Make_Build_In_Place_Call_In_Object_Declaration): Update the call to
2965 Establish_Transient_Scope.
2966 * exp_ch7.adb (Establish_Transient_Scope): Restructured. Delegate the
2967 management of the secondary stack to an enclosing scope if there is no
2968 suitable construct to wrap, and the transient scope was intended to
2969 manage the secondary stack.
2970 (Find_Node_To_Be_Wrapped): Restructured. A case_statement_alternative
2971 is a valid boundary for a transient expression which comes from the
2972 statements of the alternative, otherwise alternatives cannot be
2973 wrapped. Assignments of controlled objects which have controlled
2974 actions suppressed now stop the traversal as there is no point in
2975 looking for an enclosing construct. Add several N_xxx_Body choices to
2976 the termination conditions for completeness.
2977 * exp_ch7.ads (Establish_Transient_Scope): Update the parameter profile
2978 and the associated comment on usage.
2979 * exp_smem.adb (Add_Shared_Var_Lock_Procs): Update the call to
2980 Establish_Transient_Scope.
2981 (Add_Write_After): Update the call to Establish_Transient_Scope.
2982 * sem_res.adb (Check_Initialization_Call): Removed.
2983 (Resolve_Actuals): Account for additional cases where finalization
2984 actions are required by utilizing predicate Needs_Finalization rather
2985 than Is_Controlled.
2986 (Resolve_Call): Type initialization procedures can now utilize
2987 transient scopes to manage the secondary stack, thus preventing leaks
2988 during initialization. Remove the previous kludgy algorithm which
2989 attempts to manage the secondary stack at the object creation site.
2990
2991 2018-01-11 Jerome Lambourg <lambourg@adacore.com>
2992
2993 * libgnat/g-soliop__qnx.ads: New.
2994 * adaint.c, adaint.h, cstreams.c, s-oscons-tmplt.c, sysdep.c: Update
2995 for QNX.
2996
2997 2018-01-11 Bob Duff <duff@adacore.com>
2998
2999 * par-ch9.adb (P_Protected_Operation_Declaration_Opt): Give an error if
3000 a null procedure occurs in a protected definition.
3001
3002 2018-01-11 Bob Duff <duff@adacore.com>
3003
3004 * binderr.ads, namet.ads: Minor reformatting.
3005
3006 2018-01-11 Bob Duff <duff@adacore.com>
3007
3008 * doc/gnat_ugn/gnat_utility_programs.rst: Improve documentation of
3009 xml2gnat.
3010
3011 2018-01-11 Bob Duff <duff@adacore.com>
3012
3013 * binde.adb (Force_Elab_Order): Give an error if there are duplicate
3014 unit names.
3015
3016 2018-01-11 Ed Schonberg <schonberg@adacore.com>
3017
3018 * sem_ch6.adb (Freeze_Expr_Types): If an access value is the
3019 controlling argument of a dispatching call. freeze the corresponding
3020 designated type.
3021
3022 2018-01-11 Ben Brosgol <brosgol@adacore.com>
3023
3024 * doc/Makefile: Add Sphinx option -W to treat warnings as errors.
3025
3026 2018-01-11 Ben Brosgol <brosgol@adacore.com>
3027
3028 * doc/gnat_rm/implementation_defined_aspects.rst: Minor type/wording
3029 corrections.
3030 * gnat_rm.texi: Regenerate.
3031
3032 2018-01-11 Ed Schonberg <schonberg@adacore.com>
3033
3034 * sem_ch12.adb (Check_Fixed_Point_Type): Do not apply check if the
3035 formsl type corresponding to the actual fixed point type is private,
3036 because in this case there can be no suspicious arithmetic operations
3037 in the generic unless they reference a formal subprogram. Clarify
3038 warning.
3039
3040 2018-01-11 Javier Miranda <miranda@adacore.com>
3041
3042 * exp_util.adb (Remove_Side_Effects): No action done for functions
3043 returning class-wide types since it requires generating code using
3044 'reference and the CCG target has no secondary stack.
3045 * gnat1drv.adb: Disable building static dispatch tables when generating
3046 C code.
3047
3048 2018-01-11 Piotr Trojanek <trojanek@adacore.com>
3049
3050 * libgnat/a-direio.ads, libgnat/a-sequio.ads, libgnat/a-ststio.ads,
3051 libgnat/a-textio.ads, libgnat/a-witeio.ads, libgnat/a-ztexio.ads
3052 (File_Type): Add Default_Initial_Condition aspect.
3053
3054 2018-01-11 Pascal Obry <obry@adacore.com>
3055
3056 * libgnat/s-os_lib.adb (Normalize_Pathname): New implementation.
3057
3058 2018-01-11 Bob Duff <duff@adacore.com>
3059
3060 * doc/gnat_ugn/gnat_utility_programs.rst: Rewrite gnatpp documentation
3061 to match what the Libadalang-based version does.
3062 * doc/gnat_ugn/about_this_guide.rst: Update reference.
3063
3064 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
3065
3066 * sem_res.adb (Uses_SS): A controlled type requires the secondary stack
3067 if it contains at least one component declaration employing a function
3068 call returning on the secondary stack.
3069
3070 2018-01-11 Yannick Moy <moy@adacore.com>
3071
3072 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
3073 Update description of restriction SPARK_05 with SPARK 2014.
3074 * gnat_rm.texi: Regenerate.
3075
3076 2018-01-11 Vasiliy Fofanov <fofanov@adacore.com>
3077
3078 * doc/gnat_ugn/gnat_utility_programs.rst: Fix layout.
3079
3080 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
3081
3082 * exp_aggr.adb, exp_ch9.adb, exp_util.adb, sem_aggr.adb, sem_ch3.adb,
3083 sem_res.adb, sem_util.adb: Minor reformatting.
3084
3085 2018-01-11 Ed Schonberg <schonberg@adacore.com>
3086
3087 * sem_prag.adb (Analyze_Pragma, case Predicate): Indicate that the type
3088 has a delayed aspect which must be processed at the point the type is
3089 frozen. This mimics what is done when the predicate is provided by a
3090 source aspect.
3091
3092 2018-01-11 Doug Rupp <rupp@adacore.com>
3093
3094 * init.c (vxworks): Add macro checks for __aarch64__.
3095
3096 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
3097
3098 * exp_util.adb (Add_Failure_Expression): New routine.
3099 (Make_Predicate_Check): Reimplement the handling of Predicate_Failure.
3100 * sem_util.adb (Is_Current_Instance): Code cleanup.
3101
3102 2018-01-11 Patrick Bernardi <bernardi@adacore.com>
3103
3104 * libgnat/s-parame*.adb, libgnat/s-parame*.ads: Remove unneeded
3105 Default_Sec_Stack_Size.
3106 * libgnat/s-secsta.adb (SS_Allocate): Handle the fixed secondary stack
3107 limit check so that the integer index does not overflow. Check the
3108 dynamic stack allocation does not cause the secondary stack pointer to
3109 overflow.
3110 (SS_Info): Align colons.
3111 (SS_Init): Cover the case when bootstraping with an old compiler that
3112 does not set Default_SS_Size.
3113
3114 2018-01-11 Ed Schonberg <schonberg@adacore.com>
3115
3116 * sem_ch3.adb (Add_Internal_Interface_Entities): When checking the
3117 legality of an inherited operation that may require overriding, ignore
3118 primitive_wrappers that correspond to explicit operations that override
3119 an interface primitive.
3120 * exp_util.adb (Build_Class_Wide_Expression, Replace_Entity): If the
3121 operation to which the class-wide expression applies is a protected op.
3122 with a primitive_wrapper, verify that the updated inherited expression
3123 does not contain an internal call to a protected function. This
3124 completes the implementation of AI12-0166.
3125
3126 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
3127
3128 * ali.adb: Document the remaining letters available for ALI lines.
3129 (Scan_ALI): A with clause is internal when it is encoded on a 'Z' line.
3130 * ali.ads: Update type With_Record. Field
3131 Implicit_With_From_Instantiation is no longer in use. Add field
3132 Implicit_With.
3133 * csinfo.adb (CSinfo): Remove the setup for attribute
3134 Implicit_With_From_Instantiation.
3135 * lib-writ.adb (Collect_Withs): Correct the logic which marks a unit as
3136 either implicitly or explicitly withed.
3137 (Is_Implicit_With_Clause): New routine.
3138 (Write_ALI): Rename array Implicit_With to Has_Implicit_With to avoid
3139 confusion with the with clause attribute by the same name.
3140 (Write_With_Lines): Update the emission of 'W', 'Y', and 'Z' headers.
3141 * rtsfind.adb (Maybe_Add_With): Code cleanup.
3142 * sem_ch8.adb (Present_System_Aux): Code cleanup.
3143 * sem_ch10.adb (Expand_With_Clause): Mark the with clause as generated
3144 for a parent unit.
3145 (Implicit_With_On_Parent): Mark the with clause as generated for a
3146 parent unit.
3147 * sem_ch12.adb (Inherit_Context): With clauses inherited by an
3148 instantiation are no longer marked as Implicit_With_From_Instantiation
3149 because they are already marked as implicit.
3150 * sem_elab.adb (Ensure_Prior_Elaboration_Static): Remove the kludge
3151 which marks implicit with clauses as related to an instantiation.
3152 * sinfo.adb (Implicit_With_From_Instantiation): Removed.
3153 (Parent_With): New routine.
3154 (Set_Implicit_With_From_Instantiation): Removed.
3155 (Set_Parent_With): New routine.
3156 * sinfo.ads: Update the documentation of attribute Implicit_With.
3157 Remove attribute Implicit_With_From_Instantiation along with
3158 occurrences in nodes. Add attribute Parent_With along with occurrences
3159 in nodes.
3160 (Implicit_With_From_Instantiation): Removed along with pragma Inline.
3161 (Parent_With): New routine along with pragma Inline.
3162 (Set_Implicit_With_From_Instantiation): Removed along with pragma Inline.
3163 (Set_Parent_With): New routine along with pragma Inline.
3164
3165 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
3166
3167 * sem_util.adb (Find_Enclosing_Scope): Return the unique defining
3168 entity when the enclosing construct is a body.
3169
3170 2018-01-11 Patrick Bernardi <bernardi@adacore.com>
3171
3172 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Simplified
3173 Secondary_Stack_Size handling as a pragma is now generated for the
3174 corresponding aspect instead of an attribute. Pragma expression is
3175 relocated instead of evaluated. Discriminant of the corresponding
3176 record type is referenced rather than the type discriminant.
3177 (Create_Secondary_Stack_For_Task, Make_Task_Create_Call): Update
3178 Secondary_Stack_Size rep item checks to only look for the pragma rep.
3179 * sem_ch13.adb (Analyze_One_Aspect): Transform
3180 Aspect_Secondary_Stack_Size into a pragma instead of an attribute
3181 because the attribute does not have visibility on a task type's
3182 discriminants when the type's definition is expanded.
3183 (Analyze_Attribute_Definition_Clause): Remove handling of
3184 Attribute_Secondary_Stack_Size.
3185 * snames.adb-tmpl, snames.ads-tmpl: Remove
3186 Attribute_Secondary_Stack_Size, no longer used.
3187
3188 2018-01-11 Justin Squirek <squirek@adacore.com>
3189
3190 * sem_ch8.adb: Minor comment fix.
3191
3192 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
3193
3194 * exp_ch4.adb (Process_Action): Do not abandon the inspection of an
3195 individual action because the action may denote a complex expression,
3196 such as a case statement, which in turn may contain additional
3197 transient objects.
3198
3199 2018-01-11 Ed Schonberg <schonberg@adacore.com>
3200
3201 * sem_aggr.adb (Resolve_Iterated_Component_Association): Perform
3202 analysis on a copy of the expression with a copy of the index variable,
3203 because full expansion will rewrite construct into a loop with the
3204 original loop variable.
3205 * exp_aggr.adb (Gen_Assign): Defer analysis and resolution if the
3206 expression is an iterated component association. Full analysis takes
3207 place when construct is rewritten as a loop.
3208 (In_Place_Assign_OK, Safe_Component): An iterated_component_association
3209 is not safe for in-place assignment.
3210 * sem_util.adb (Remove_Entity): Handle properly the case of an isolated
3211 entity with no homonym and no other entity in the scope.
3212
3213 2018-01-11 Justin Squirek <squirek@adacore.com>
3214
3215 * sem_prag.adb (Analyze_Pragma:Pragma_Loop_Variant): Modify error
3216 message to be printed on the pragma argument identifier.
3217
3218 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
3219
3220 * exp_util.adb (Build_Invariant_Procedure_Declaration): Set the last
3221 entity of the generated invariant procedure in order to construct a
3222 proper entity chain.
3223
3224 2018-01-11 Piotr Trojanek <trojanek@adacore.com>
3225
3226 * sem_ch13.adb (Build_Predicate_Functions): Fix minor issues in
3227 comment.
3228
3229 2018-01-11 Arnaud Charlet <charlet@adacore.com>
3230
3231 * einfo.ads, einfo.adb (Activation_Record_Component,
3232 Set_Activation_Record_Component, Set_Is_Uplevel_Referenced_Entity):
3233 Allow E_Discriminant.
3234
3235 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
3236
3237 * gcc-interface/decl.c (gnat_to_gnu_component_type): Apply the check
3238 for atomic access once the component size is taken into account and
3239 also do it if the component type is Atomic or Volatile_Full_Access.
3240
3241 2018-01-04 Eric Botcazou <ebotcazou@adacore.com>
3242
3243 * gnatvsn.ads: Bump copyright year.
3244
3245 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
3246 Alan Hayward <alan.hayward@arm.com>
3247 David Sherwood <david.sherwood@arm.com>
3248
3249 * gcc-interface/misc.c (enumerate_modes): Treat GET_MODE_BITSIZE
3250 as polynomial.
3251
3252 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
3253 Alan Hayward <alan.hayward@arm.com>
3254 David Sherwood <david.sherwood@arm.com>
3255
3256 * gcc-interface/misc.c (enumerate_modes): Treat GET_MODE_PRECISION
3257 as polynomial.
3258
3259 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
3260 Alan Hayward <alan.hayward@arm.com>
3261 David Sherwood <david.sherwood@arm.com>
3262
3263 * gcc-interface/utils.c (gnat_types_compatible_p): Handle
3264 polynomial TYPE_VECTOR_SUBPARTS.
3265
3266 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
3267 Alan Hayward <alan.hayward@arm.com>
3268 David Sherwood <david.sherwood@arm.com>
3269
3270 * gcc-interface/misc.c (enumerate_modes): Handle polynomial
3271 GET_MODE_NUNITS.
3272
3273 2018-01-03 Jakub Jelinek <jakub@redhat.com>
3274
3275 Update copyright years.
3276
3277 * gnat_ugn.texi: Bump @copying's copyright year.
3278 * gnat_rm.texi: Likewise.
3279 \f
3280 Copyright (C) 2018 Free Software Foundation, Inc.
3281
3282 Copying and distribution of this file, with or without modification,
3283 are permitted in any medium without royalty provided the copyright
3284 notice and this notice are preserved.