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