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