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