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