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