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