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