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