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