[Ada] Unnesting: do not set size of access subprograms
[gcc.git] / gcc / ada / ChangeLog
1 2018-08-21 Ed Schonberg <schonberg@adacore.com>
2
3 * layout.adb: Do not set size of access subprogram if unnesting.
4
5 2018-08-21 Ed Schonberg <schonberg@adacore.com>
6
7 * freeze.adb: Remove warnings for access to subprograms when
8 unnesting is active.
9
10 2018-08-21 Ed Schonberg <schonberg@adacore.com>
11
12 * exp_aggr.adb (Expand_Array_Aggregate): If the component type
13 is limited, the array must be constructed in place, so set flag
14 In_Place_Assign_OK_For_Declaration accordingly. This prevents
15 improper copying of an array of tasks during initialization.
16
17 2018-08-21 Eric Botcazou <ebotcazou@adacore.com>
18
19 * gcc-interface/trans.c (Call_to_gnu): Always suppress an
20 unchecked conversion around the actual for an In parameter
21 passed by copy.
22
23 2018-08-21 Eric Botcazou <ebotcazou@adacore.com>
24
25 * exp_util.adb (Is_Possibly_Unaligned_Object): For the case of a
26 selected component inherited in a record extension and subject
27 to a representation clause, retrieve the position and size from
28 the original record component.
29
30 2018-08-21 Ed Schonberg <schonberg@adacore.com>
31
32 * sem_util.ads, sem_util.adb (New_External_Entity): Type of
33 Suffix_Index must be Int, not Nat, so that a negative value can
34 be used to generate a unique name for an external object, as
35 specified in Tbuild.New_External_Name.
36 (Scope_Within): Handle private type whose completion is a
37 synchronized type (For unnesting).
38 * itypes.ads, itypes.adb (Create_Itype): Ditto
39 * sem_ch3.adb (Constrain_Corresponding_Record): Generate a
40 unique name for the created subtype, because there may be
41 several discriminated tasks present in the same scope, and each
42 needs its distinct corresponding record subtype.
43
44 2018-08-21 Yannick Moy <moy@adacore.com>
45
46 * doc/gnat_ugn/gnat_and_program_execution.rst: Update
47 documentation of dimensionality analysis.
48 * gnat_ugn.texi: Regenerate.
49 * Makefile.rtl, impunit.adb: Consider the new units.
50 * libgnat/s-dfmkio.ads, libgnat/s-dfmopr.ads,
51 libgnat/s-diflmk.ads: New units based on Float.
52 * libgnat/s-dilomk.ads, libgnat/s-dlmkio.ads,
53 libgnat/s-dlmopr.ads: New units based on Long_Float.
54 * libgnat/s-dmotpr.ads: Rename to libgnat/s-dgmgop.ads and turn
55 into an instance of
56 System.Dim.Generic_Mks.Generic_Other_Prefixes.
57 * libgnat/s-dimmks.ads: Rename to libgnat/s-digemk.ads and turn
58 into an instance of System.Dim.Generic_Mks.
59
60 2018-08-21 Hristian Kirtchev <kirtchev@adacore.com>
61
62 * impunit.adb: Add g-lists to the set of non-implementation
63 units.
64 * libgnat/g-lists.adb, libgnat/g-lists.ads: New unit.
65 * Makefile.rtl: Add g-lists to the set of non-tasking units.
66 * gcc-interface/Make-lang.in: Add g-lists to the set of files
67 used by gnat1.
68
69 2018-08-21 Ed Schonberg <schonberg@adacore.com>
70
71 * exp_ch9.adb (Reset_Scopes): Do not recurse into type
72 declarations when resetting the scope of entities declared the
73 procedures generated for entry bodies and accept alternatives.
74 Use the entity of the procedure declaration, not its body, as
75 the new scope.
76
77 2018-08-21 Hristian Kirtchev <kirtchev@adacore.com>
78
79 * einfo.adb (Elaboration_Entity): Include entries and entry
80 families in the set of legal entities.
81 (Elaboration_Entity_Required): Include entries and entry
82 families in the set of legal entities.
83 (Set_Elaboration_Entity): Include entries and entry families in
84 the set of legal entities.
85 (Set_Elaboration_Entity_Required): Include entries and entry
86 families in the set of legal entities.
87 (Write_Field13_Name): Update the output of attribute
88 Elaboration_Entity.
89 * einfo.ads: Attributes Elaboration_Entity and
90 Elaboration_Entity_Required now apply to entries and entry
91 families.
92
93 2018-08-21 Arnaud Charlet <charlet@adacore.com>
94
95 * set_targ.adb: Mark some CodePeer message as Intentional.
96
97 2018-08-21 Ed Schonberg <schonberg@adacore.com>
98
99 * sem_res.adb (Resolve_Call): Force the freezing of an
100 expression function that is called to provide a default value
101 for a defaulted discriminant in an object initialization.
102
103 2018-08-21 Hristian Kirtchev <kirtchev@adacore.com>
104
105 * libgnat/g-dynhta.adb, libgnat/g-dynhta.ads: New package
106 Dynamic_HTable.
107
108 2018-08-21 Javier Miranda <miranda@adacore.com>
109
110 * checks.ads (Determine_Range): Adding documentation.
111 * checks.adb (Determine_Range): Don't deal with enumerated types
112 with non-standard representation.
113 (Convert_And_Check_Range): For conversion of enumeration types
114 with non standard representation to an integer type perform a
115 direct conversion to the target integer type.
116
117 2018-08-21 Piotr Trojanek <trojanek@adacore.com>
118
119 * lib-xref.ads, lib-xref-spark_specific.adb
120 (Enclosing_Subprogram_Or_Library_Package): Now roughtly works
121 for pragmas that come from aspect specifications.
122
123 2018-08-21 Pierre-Marie de Rodat <derodat@adacore.com>
124
125 * sa_messages.ads, sa_messages.adb: New source files.
126
127 2018-08-03 Pierre-Marie de Rodat <derodat@adacore.com>
128
129 Reverts
130 2018-07-06 Jim Wilson <jimw@sifive.com>
131
132 * Make-generated.in (treeprs.ads): Use $(GNATMAKE) instead of gnatmake.
133 (einfo.h, sinfo.h, stamp-snames, stamp-nmake): Likewise.
134 * gcc-interface/Makefile.in (xoscons): Likewise.
135
136 2018-07-31 Alexandre Oliva <oliva@adacore.com>
137 Olivier Hainque <hainque@adacore.com>
138
139 * gcc-interface/trans.c: Include debug.h.
140 (file_map): New static variable.
141 (gigi): Set it. Create decl_to_instance_map when needed.
142 (Subprogram_Body_to_gnu): Pass gnu_subprog_decl to...
143 (Sloc_to_locus): ... this. Add decl parm, map it to instance.
144 * gcc-interface/gigi.h (Sloc_to_locus): Adjust declaration.
145
146 2018-07-31 Arnaud Charlet <charlet@adacore.com>
147
148 * clean.adb, gnatchop.adb, gnatfind.adb, gnatls.adb,
149 gnatmake.ads, gnatxref.adb, make.adb, make.ads, make_util.ads,
150 sfn_scan.adb, vxaddr2line.adb, xeinfo.adb, xoscons.adb,
151 xr_tabls.adb, xref_lib.adb: Address CodePeer messages.
152
153 2018-07-31 Arnaud Charlet <charlet@adacore.com>
154
155 * gnatlink.adb: Fix potential Constraint_Error if
156 Library_Version is too long.
157
158 2018-07-31 Arnaud Charlet <charlet@adacore.com>
159
160 * sem_elab.adb: Remove duplicate condition detected by CodePeer.
161
162 2018-07-31 Ed Schonberg <schonberg@adacore.com>
163
164 * exp_unst.adb (Subp_Index): In the case of a protected
165 operation, the relevant entry is the generated
166 protected_subprogram_body into which the original body is
167 rewritten. Assorted cleanup and optimizations.
168
169 2018-07-31 Ed Schonberg <schonberg@adacore.com>
170
171 * exp_attr.adb (Expand_Attribute, case Fixed_Value): Set the
172 base type of the result to ensure that proper overflow and range
173 checks are generated. If the target is a fixed-point tyoe,
174 generate the required overflow and range checks explicitly,
175 rather than relying on Apply_Type_Conversion_Checks, which might
176 simply set the Do_Range_Check flag and rely on the backend to
177 add the check.
178
179 2018-07-31 Hristian Kirtchev <kirtchev@adacore.com>
180
181 * sem_res.adb (Resolve_Call): Establish a transient scope to
182 manage the secondary stack when the designated type of an
183 access-to-subprogram requires it.
184
185 2018-07-31 Ed Schonberg <schonberg@adacore.com>
186
187 * exp_ch7.adb (Check_Unnesting_Elaboration_Code): To find local
188 subprograms in the elaboration code for a package body, recurse
189 through nested statement sequences because a compiler-generated
190 procedure may appear within a condition statement.
191
192 2018-07-31 Ed Schonberg <schonberg@adacore.com>
193
194 * exp_ch6.adb (Expand_Protected_Subprogram_Call): Handle
195 properly a protected call that includes a default parameter that
196 is a call to a protected function of the same type.
197
198 2018-07-31 Justin Squirek <squirek@adacore.com>
199
200 * lib-writ.adb (Write_With_Lines): Modfiy the generation of
201 dependencies within ali files so that source unit bodies are
202 properly listed even if said bodies are missing. Perform legacy
203 behavior in GNATprove mode.
204 * lib-writ.ads: Modify documentation to reflect current behavior.
205
206 2018-07-31 Eric Botcazou <ebotcazou@adacore.com>
207
208 * libgnarl/s-osinte__solaris.ads (upad64_t): New private type.
209 (mutex_t): Use it for 'lock' and 'data' components.
210 (cond_t): Likewise for 'data' and use single 'flags' component.
211
212 2018-07-31 Justin Squirek <squirek@adacore.com>
213
214 * exp_ch5.adb (Make_Field_Assign): Force temporarily generated
215 objects for assignment of overlaid user objects to be renamings
216 instead of constant declarations.
217
218 2018-07-31 Hristian Kirtchev <kirtchev@adacore.com>
219
220 * exp_ch9.adb (Analyze_Pragmas): New routine.
221 (Build_Private_Protected_Declaration): Code clean up. Relocate
222 relevant aspects and pragmas from the stand-alone body to the
223 newly created spec. Explicitly analyze any pragmas that have
224 been either relocated or produced by the analysis of the
225 aspects.
226 (Move_Pragmas): New routine.
227 * sem_prag.adb (Find_Related_Declaration_Or_Body): Recognize the
228 case where a pragma applies to the internally created spec for a
229 stand-along subprogram body declared in a protected body.
230
231 2018-07-31 Gary Dismukes <dismukes@adacore.com>
232
233 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace
234 calls to Current_Scope in three assertions with calls to
235 Current_Subprogram.
236
237 2018-07-31 Ed Schonberg <schonberg@adacore.com>
238
239 * sem_eval.adb (Check_Non_Static_Context): Do not warn on an
240 integer literal greater than the upper bound of
241 Universal_Integer'Last when expansion is disabled, to avoid a
242 spurious warning over ranges involving 64-bit modular types.
243
244 2018-07-31 Arnaud Charlet <charlet@adacore.com>
245
246 * einfo.adb (Write_Entity_Flags): Also print
247 Is_Activation_Record flag.
248
249 2018-07-31 Piotr Trojanek <trojanek@adacore.com>
250
251 * exp_aggr.adb, exp_ch4.adb, exp_ch6.adb, lib-xref.adb,
252 repinfo.adb, sem_ch9.adb: Minor replace Ekind membership tests
253 with a wrapper routine.
254
255 2018-07-31 Piotr Trojanek <trojanek@adacore.com>
256
257 * ali.adb (Known_ALI_Lines): Remove 'F' as a prefix for lines
258 related to the FORMAL analysis done by GNATprove.
259
260 2018-07-31 Javier Miranda <miranda@adacore.com>
261
262 * sem.ads (Inside_Preanalysis_Without_Freezing): New global
263 counter.
264 * sem.adb (Semantics): This subprogram has now the
265 responsibility of resetting the counter before analyzing a unit,
266 and restoring its previous value before returning.
267 * freeze.adb (Freeze_Entity): Do not freeze if we are
268 preanalyzing without freezing.
269 * sem_res.adb (Preanalyze_And_Resolve): Set & restore
270 In_Preanalysis_Without_Freezing.
271
272 2018-07-31 Ed Schonberg <schonberg@adacore.com>
273
274 * sem_ch4.adb (Traverse_Homonyms): Consider generic actuals that
275 may rename a matching class-wide operation only if the renaming
276 declaration for that actual is in an enclosing scope (i.e.
277 within the corrresponding instance).
278
279 2018-07-31 Hristian Kirtchev <kirtchev@adacore.com>
280
281 * checks.adb, contracts.adb, exp_aggr.adb, exp_ch5.adb,
282 exp_disp.adb, make.adb, sem_ch4.adb, sem_eval.adb, sem_res.adb,
283 usage.adb: Minor reformatting.
284
285 2018-07-31 Bob Duff <duff@adacore.com>
286
287 * sem_res.adb (Resolve_Allocator): Do not complain about the
288 implicit allocator that occurs in the expansion of a return
289 statement for a build-in-place function.
290
291 2018-07-20 Martin Sebor <msebor@redhat.com>
292
293 PR middle-end/82063
294 * gcc-interface/misc.c (gnat_handle_option): Change function argument
295 to HOST_WIDE_INT.
296
297 2018-07-17 Eric Botcazou <ebotcazou@adacore.com>
298
299 * gcc-interface/decl.c (choices_to_gnu): Rename parameters. Deal with
300 an operand of Character type. Factor out range generation to the end.
301 Check that the bounds are literals and convert them to the type of the
302 operand before building the ranges.
303 * gcc-interface/utils.c (make_dummy_type): Minor tweak.
304 (make_packable_type): Propagate TYPE_DEBUG_TYPE.
305 (maybe_pad_type): Likewise.
306
307 2018-07-17 Ed Schonberg <schonberg@adacore.com>
308
309 * sem_ch4.adb (Try_Object_Operation): Handle properly a prefixed call
310 in an instance, when the generic parameters include an interface type
311 and a abstract operation of that type, and the actuals in the instance
312 include an interface type and a corresponding abstract operation of it,
313 with a different name than the corresponding generic subprogram
314 parameter.
315
316 2018-07-17 Arnaud Charlet <charlet@adacore.com>
317
318 * sem_eval.adb (Rewrite_In_Raise_CE): Keep the original reason in more
319 cases.
320
321 2018-07-17 Arnaud Charlet <charlet@adacore.com>
322
323 * checks.adb (Apply_Division_Check): Add provision for floating-point
324 checks.
325
326 2018-07-17 Ed Schonberg <schonberg@adacore.com>
327
328 * exp_aggr.adb (Component_OK_For_Backend): If an array component of the
329 enclosing record has a bound that is out of range (and that has been
330 rewritten as a raise statement) the aggregate is not OK for any back
331 end, and should be expanded into individual assignments.
332
333 2018-07-17 Piotr Trojanek <trojanek@adacore.com>
334
335 * atree.adb (Relocate_Node): Simplify with Is_Rewrite_Substitution.
336
337 2018-07-17 Piotr Trojanek <trojanek@adacore.com>
338
339 * sem_util.ads (Denotes_Same_Object): Likewise.
340 * sem_warn.adb (Warn_On_Overlapping_Actuals): Fix RM rule references.
341
342 2018-07-17 Eric Botcazou <ebotcazou@adacore.com>
343
344 * exp_disp.adb (Make_Tags): When the type has user-defined primitives,
345 build the access type that is later used by Build_Get_Prim_Op_Address
346 as pointing to a subtype of Ada.Tags.Address_Array.
347
348 2018-07-17 Patrick Bernardi <bernardi@adacore.com>
349
350 * libgnat/s-memory__mingw.adb: Remove.
351 * Makefile.rtl: Remove s-memory.adb target pair from the Cygwin/Mingw32
352 section.
353
354 2018-07-17 Hristian Kirtchev <kirtchev@adacore.com>
355
356 * frontend.adb (Frontend): The removal of ignored Ghost code must be
357 the last semantic operation performed on the tree.
358
359 2018-07-17 Hristian Kirtchev <kirtchev@adacore.com>
360
361 * frontend.adb (Frontend): Update the call to Register_Config_Switches.
362 * inline.ads: Add new component Config_Switches to record
363 Pending_Body_Info which captures the configuration state of the pending
364 body. Remove components Version, Version_Pragma, SPARK_Mode, and
365 SPARK_Mode_Pragma from record Pending_Body_Info because they are
366 already captured in component Config_Switches.
367 * opt.adb (Register_Opt_Config_Switches): Rename to
368 Register_Config_Switches.
369 (Restore_Opt_Config_Switches): Rename to Restore_Config_Switches.
370 (Save_Opt_Config_Switches): Rename to Save_Config_Switches. This
371 routine is now a function, and returns the saved configuration state as
372 an aggregate to avoid missing an attribute.
373 (Set_Opt_Config_Switches): Rename to Set_Config_Switches.
374 * opt.ads (Register_Opt_Config_Switches): Rename to
375 Register_Config_Switches.
376 (Restore_Opt_Config_Switches): Rename to Restore_Config_Switches.
377 (Save_Opt_Config_Switches): Rename to Save_Config_Switches. This
378 routine is now a function.
379 (Set_Opt_Config_Switches): Rename to Set_Config_Switches.
380 * par.adb (Par): Update the calls to configuration switch-related
381 subprograms.
382 * sem.adb (Semantics): Update the calls to configuration switch-related
383 subprograms.
384 * sem_ch10.adb (Analyze_Package_Body_Stub): Update the calls to
385 configuration switch-related subprograms.
386 (Analyze_Protected_Body_Stub): Update the calls to configuration
387 switch-related subprograms.
388 (Analyze_Subprogram_Body_Stub): Update calls to configuration
389 switch-related subprograms.
390 * sem_ch12.adb (Add_Pending_Instantiation): Update the capture of
391 pending instantiation attributes.
392 (Inline_Instance_Body): Update the capture of pending instantiation
393 attributes. It is no longer needed to explicitly manipulate the SPARK
394 mode.
395 (Instantiate_Package_Body): Update the restoration of the context
396 attributes.
397 (Instantiate_Subprogram_Body): Update the restoration of context
398 attributes.
399 (Load_Parent_Of_Generic): Update the capture of pending instantiation
400 attributes.
401 (Set_Instance_Env): Update the way relevant configuration attributes
402 are saved and restored.
403
404 2018-07-17 Eric Botcazou <ebotcazou@adacore.com>
405
406 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Deal with
407 more rvalues in the expression of a renaming.
408
409 2018-07-17 Eric Botcazou <ebotcazou@adacore.com>
410
411 * gcc-interface/ada-tree.h (TYPE_RETURN_BY_DIRECT_REF_P): Define for
412 METHOD_TYPE too.
413 (TYPE_RETURN_UNCONSTRAINED_P): Likewise.
414 (TYPE_CI_CO_LIST): Likewise.
415 * gcc-interface/gigi.h (is_cplusplus_method): Delete.
416 (fntype_same_flags_p): Adjust comment.
417 * gcc-interface/decl.c (Has_Thiscall_Convention): Delete.
418 (gnat_to_gnu_entity) <E_Subprogram_Type>: Do not set the "thiscall"
419 attribute directly.
420 (is_cplusplus_method): Make static and adjust head comment.
421 (gnat_to_gnu_param): Return a pointer for the "this" parameter of
422 C++ constructors.
423 (gnat_to_gnu_subprog_type): Turn imported C++ constructors into their
424 callable form. Generate a METHOD_TYPE node for imported C++ methods.
425 Set param_list at the very end of the processing.
426 (substitute_in_type) <METHOD_TYPE>: New case.
427 * gcc-interface/misc.c (gnat_print_type) <METHOD_TYPE>: Likewise.
428 (gnat_type_hash_eq): Accept METHOD_TYPE.
429 * gcc-interface/trans.c (Identifier_to_gnu): Deal with METHOD_TYPE.
430 (Attribute_to_gnu): Likewise.
431 (Call_to_gnu): Likewise.
432 (process_freeze_entity): Likewise.
433 * gcc-interface/utils.c (create_subprog_decl): Adjust head comment.
434 (fntype_same_flags_p): Likewise.
435
436 2018-07-17 Piotr Trojanek <trojanek@adacore.com>
437
438 * inline.adb (Expand_Inlined_Call): Remove extra parentheses.
439
440 2018-07-17 Eric Botcazou <ebotcazou@adacore.com>
441
442 * exp_disp.adb (Gen_Parameters_Profile): Make the _Init parameter an
443 In/Out parameter.
444 (Set_CPP_Constructors): Adjust comment accordingly.
445
446 2018-07-17 Bob Duff <duff@adacore.com>
447
448 * exp_disp.adb (Build_Class_Wide_Check): Return early if the
449 precondition is supposed to be ignored.
450
451 2018-07-17 Ed Schonberg <schonberg@adacore.com>
452
453 * sem_ch6.adb (Check_Untagged_Equality): Extend check to operations
454 declared in the same scope as the operand type, when that scope is a
455 procedure.
456
457 2018-07-17 Ed Schonberg <schonberg@adacore.com>
458
459 * exp_unst.adb (Unnest_Subprograms): Do nothing if the expander is not
460 active. Don't use Get_Actual_Subtype for record subtypes. Ignore
461 rewritten identifiers and uplevel references to bounds of types that
462 come from the original type reference.
463
464 2018-07-17 Hristian Kirtchev <kirtchev@adacore.com>
465
466 * exp_ch13.adb, exp_ch7.adb, exp_unst.adb, freeze.adb,
467 libgnat/s-os_lib.adb, sem_ch3.adb, sem_ch3.ads, sem_ch5.adb,
468 sem_eval.adb, sem_res.adb, sem_util.adb: Minor reformatting.
469
470 2018-07-17 Javier Miranda <miranda@adacore.com>
471
472 * exp_ch13.adb (Expand_N_Freeze_Entity): Handle subtype declared for an
473 iterator.
474 * freeze.adb (Freeze_Expression): Handle freeze of an entity defined
475 outside of a subprogram body. This case was previously handled during
476 preanalysis; the frozen entities were remembered and left pending until
477 we continued freezeing entities outside of the subprogram. Now, when
478 climbing the parents chain to locate the correct placement for the
479 freezeing node, we check if the entity can be frozen and only when no
480 enclosing node is marked as Must_Not_Freeze the entity is frozen.
481 * sem_ch3.ads (Preanalyze_Default_Expression): Declaration moved to the
482 package body.
483 * sem_ch3.adb (Preanalyze_Default_Expression): Code adjusted to invoke
484 the new subprogram Preanalyze_With_Freezing_And_Resolve.
485 * sem_ch6.adb (Preanalyze_Formal_Expression): New subprogram.
486 (Analyze_Expression_Function, Process_Formals): Invoke
487 Preanalyze_Formal_Expression instead of Preanalyze_Spec_Expression
488 since the analysis of the formals may freeze entities.
489 (Analyze_Subprogram_Body_Helper): Skip building the body of the
490 class-wide clone for eliminated subprograms.
491 * sem_res.ads, sem_res.adb (Preanalyze_And_Resolve): New subprogram.
492 Its code is basically the previous version of this routine but extended
493 with an additional parameter which is used to specify if during
494 preanalysis we are allowed to freeze entities. If the new parameter is
495 True then the subtree root node is marked as Must_Not_Freeze and no
496 entities are frozen during preanalysis.
497 (Preanalyze_And_Resolve): Invokes the internal version of
498 Preanalyze_And_Resolve without entity freezing.
499 (Preanalyze_With_Freezing_And_Resolve): Invokes the internal version of
500 Prenalyze_And_Resolve with freezing enabled.
501
502 2018-07-17 Piotr Trojanek <trojanek@adacore.com>
503
504 * einfo.ads, libgnat/g-comlin.ads: Minor change "ie" to "i.e." in docs
505 and comments.
506
507 2018-07-17 Justin Squirek <squirek@adacore.com>
508
509 * libgnat/s-os_lib.adb (Argument_String_To_List): Fix trimming of
510 whitespace.
511
512 2018-07-17 Hristian Kirtchev <kirtchev@adacore.com>
513
514 * sem_prag.adb (Has_Visible_State): Do not consider constants as
515 visible state because it is not possible to determine whether a
516 constant depends on variable input.
517 (Propagate_Part_Of): Add comment clarifying the behavior with respect
518 to constant.
519
520 2018-07-17 Yannick Moy <moy@adacore.com>
521
522 * gnat1drv.adb (Gnat1drv): Do not issue warning about exception not
523 being propagated in GNATprove mode.
524
525 2018-07-17 Dmitriy Anisimkov <anisimko@adacore.com>
526
527 * libgnat/g-socket.adb, libgnat/g-socket.ads: Reorganize and make
528 public components of Inet_Addr_Type. Introduce public binary
529 operations.
530
531 2018-07-17 Javier Miranda <miranda@adacore.com>
532
533 * exp_ch7.adb (Make_Transient_Block): When determining whether an
534 enclosing scope already handles the secondary stack, take into account
535 transient blocks nested in a block that do not manage the secondary
536 stack and are located within a loop.
537
538 2018-07-17 Ed Schonberg <schonberg@adacore.com>
539
540 * sem_util.adb (Enclosing_Subprogram): Protected entries and task
541 entries must be treated separately: task entries are within the
542 enclosing subprogram of the task type, while protected entries are
543 transformed into the corresponding Protected_Body_Subprogram, which is
544 the enclosing_subprogram of any subprogram declared within the entry
545 body.
546
547 2018-07-17 Hristian Kirtchev <kirtchev@adacore.com>
548
549 * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Add missing
550 sections on -gnatH and -gnatJ compiler switches.
551 * gnat_ugn.texi: Regenerate.
552
553 2018-07-17 Hristian Kirtchev <kirtchev@adacore.com>
554
555 * alloc.ads: Update the allocation metrics of the ignored Ghost nodes
556 table.
557 * atree.adb: Add a soft link for a procedure which is invoked whenever
558 an ignored Ghost node or entity is created.
559 (Change_Node): Preserve relevant attributes which come from the Flags
560 table.
561 (Mark_New_Ghost_Node): Record a newly created ignored Ghost node or
562 entity.
563 (Rewrite): Preserve relevant attributes which come from the Flags
564 table.
565 (Set_Ignored_Ghost_Recording_Proc): New routine.
566 * atree.ads: Define an access-to-suprogram type for a soft link which
567 records a newly created ignored Ghost node or entity.
568 (Set_Ignored_Ghost_Recording_Proc): New routine.
569 * ghost.adb: Remove with and use clause for Lib. Remove table
570 Ignored_Ghost_Units. Add new table Ignored_Ghost_Nodes.
571 (Add_Ignored_Ghost_Unit): Removed.
572 (Initialize): Initialize the table which stores ignored Ghost nodes.
573 Set the soft link which allows Atree.Mark_New_Ghost_Node to record an
574 ignored Ghost node.
575 (Is_Ignored_Ghost_Unit): Use the ultimate original node when checking
576 an eliminated ignored Ghost unit.
577 (Lock): Release and lock the table which stores ignored Ghost nodes.
578 (Mark_And_Set_Ghost_Assignment): Record rather than propagate ignored
579 Ghost nodes.
580 (Mark_And_Set_Ghost_Procedure_Call): Record rather than propagate
581 ignored Ghost nodes.
582 (Mark_Ghost_Clause): Record rather than propagate ignored Ghost nodes.
583 (Mark_Ghost_Declaration_Or_Body): Record rather than propagate ignored
584 Ghost nodes.
585 (Mark_Ghost_Pragma): Record rather than propagate ignored Ghost nodes.
586 (Propagate_Ignored_Ghost_Code): Removed.
587 (Record_Ignored_Ghost_Node): New routine.
588 (Remove_Ignored_Ghost_Code): Reimplemented.
589 (Remove_Ignored_Ghost_Node): New routine.
590 (Ultimate_Original_Node): New routine.
591 * ghost.ads (Check_Ghost_Completion): Removed.
592 * sem_ch8.adb (Analyze_Use_Package): Remove obsolete code. Mark a use
593 package clause as ignored Ghost if applicable.
594 * sem_util.adb (Is_Body_Or_Package_Declaration): Reimplemented.
595
596 2018-07-17 Javier Miranda <miranda@adacore.com>
597
598 * sem_ch5.adb (Has_Call_Using_Secondary_Stack): Moved to library level
599 to reuse it.
600 (Analyze_Loop_Statement): Wrap the loop in a block when the evaluation
601 of the loop iterator relies on the secondary stack.
602
603 2018-07-17 Piotr Trojanek <trojanek@adacore.com>
604
605 * sem_util.adb (Next_Actual): If the parent is a N_Null_Statement,
606 which happens for inlined calls, then fetch the next actual from the
607 original AST.
608
609 2018-07-17 Ed Schonberg <schonberg@adacore.com>
610
611 * einfo.ads: Update documentation for Scalar_Range.
612
613 2018-07-17 Piotr Trojanek <trojanek@adacore.com>
614
615 * lib-xref-spark_specific.adb (Create_Heap): Attach the HEAP entity to
616 the Standard package.
617
618 2018-07-17 Piotr Trojanek <trojanek@adacore.com>
619
620 * einfo.adb (Is_Wrapper_Package): Remove extra parentheses.
621
622 2018-07-17 Ed Schonberg <schonberg@adacore.com>
623
624 * sem_util.adb (Enclosing_Subprogram): Handle properly entries, and
625 synchronized types that are completions of limited types or private
626 extensions.
627 (Scope_Within): Handle properly accept statements in task bodies.
628
629 2018-07-17 Hristian Kirtchev <kirtchev@adacore.com>
630
631 * sem_prag.adb (Has_Visible_State): Do not consider generic formals
632 because they are not part of the visible state space. Add constants to
633 the list of acceptable visible states.
634 (Propagate_Part_Of): Do not consider generic formals when propagating
635 the Part_Of indicator.
636 * sem_util.adb (Entity_Of): Do not follow renaming chains which go
637 through a generic formal because they are not visible for SPARK
638 purposes.
639 * sem_util.ads (Entity_Of): Update the comment on usage.
640
641 2018-07-17 Ed Schonberg <schonberg@adacore.com>
642
643 * sem_util.adb (Gather_Components): A discriminant of an ancestor may
644 have been constrained by a later ancestor, so when looking for the
645 value of that hidden discriminant we must examine the stored constraint
646 of other ancestors than the immediate parent type.
647
648 2018-07-17 Hristian Kirtchev <kirtchev@adacore.com>
649
650 * exp_ch6.adb (Build_Heap_Or_Pool_Allocator): Ensure that scoping
651 constructs and entities within receive new entities when replicating a
652 tree.
653 (Expand_N_Extended_Return_Statement): Ensure that scoping constructs
654 and entities within receive new entities when replicating a tree.
655 * sem_util.adb (New_Copy_Tree): Add new formal Scopes_In_EWA_OK.
656 (Visit_Entity): Visit entities within scoping constructs inside
657 expression with actions nodes when requested by the caller. Add blocks,
658 labels, and procedures to the list of entities which need replication.
659 * sem_util.ads (New_Copy_Tree): Add new formal Scopes_In_EWA_OK. Update
660 the comment on usage.
661
662 2018-07-17 Arnaud Charlet <charlet@adacore.com>
663
664 * doc/gnat_ugn/about_this_guide.rst,
665 doc/gnat_ugn/gnat_and_program_execution.rst: Remove references to gcov.
666 * gnat_ugn.texi: Regenerate.
667
668 2018-07-16 Hristian Kirtchev <kirtchev@adacore.com>
669
670 * contracts.adb (Analyze_Contracts): Add specialized processing for
671 package instantiation contracts.
672 (Analyze_Package_Contract): Remove the verification of a missing
673 Part_Of indicator.
674 (Analyze_Package_Instantiation_Contract): New routine.
675 * contracts.ads (Analyze_Package_Contract): Update the comment on
676 usage.
677 * sem_prag.adb (Check_Missing_Part_Of): Ensure that the entity of the
678 instance is being examined when trying to determine whether a package
679 instantiation needs a Part_Of indicator.
680
681 2018-07-16 Hristian Kirtchev <kirtchev@adacore.com>
682
683 * einfo.adb, exp_ch7.adb, exp_ch9.adb, exp_unst.adb, inline.adb,
684 sem.adb, sem_ch12.adb, sem_ch13.adb, sem_ch3.adb, sem_eval.adb,
685 sem_util.adb: Minor reformatting.
686
687 2018-07-16 Arnaud Charlet <charlet@adacore.com>
688
689 * frontend.adb: Only unnest subprograms if no previous errors were
690 detected.
691
692 2018-07-16 Ed Schonberg <schonberg@adacore.com>
693
694 * exp_ch7.adb (Check_Unnesting_Elaboration_Code): Handle loops that
695 contain blocks in the elaboration code for a package body. Create the
696 elaboration subprogram wrapper only if there is a subprogram
697 declaration in a block or loop.
698
699 2018-07-16 Ed Schonberg <schonberg@adacore.com>
700
701 * exp_ch4.adb (Expand_Set_Membership): Use New_Copy_Tree to perform a
702 deep copy of the left operand when building each conjuct of the
703 expanded membership operation, to avoid sharing nodes between them.
704 This sharing interferes with the unnesting machinery and is generally
705 undesirable.
706
707 2018-07-16 Ed Schonberg <schonberg@adacore.com>
708
709 * exp_unst.adb (Visit_Node): Handle 'Address references that are
710 calls.
711
712 2018-07-16 Ed Schonberg <schonberg@adacore.com>
713
714 * exp_unst.adb (Visit_Node): Handle the semantic of Storage_Pool field
715 in relevant nodes: Allocate, Free, and return statements.
716
717 2018-07-16 Ed Schonberg <schonberg@adacore.com>
718
719 * sem_ch12.adb (Analyze_Package_Instantiation): Handle properly an
720 instance that carries an aspect Default_Storage_Pool that overrides a
721 default storage pool that applies to the generic unit. The aspect in
722 the generic unit was removed before copying it in the instance, rather
723 than removing it from the copy of the aspects that are appended to the
724 aspects in the instance.
725
726 2018-07-16 Ed Schonberg <schonberg@adacore.com>
727
728 * einfo.adb (Set_Is_Uplevel_Referenced_Entity): Flag can appear on
729 loop parameters.
730 * exp_ch7.adb (Check_Unnesting_Elaboration_Code): Handle subprogram
731 bodies.
732 * exp_ch9.adb (Reset_Scopes_To): Set the scopes of entities local to an
733 entry body to be the corresponding generated subprogram, for correct
734 analysis of uplevel references.
735 * exp_unst.adb (Visit_Node): Handle properly binary and unary operators
736 Ignore pragmas, fix component associations.
737 (Register_Subprograms): Subprograms in synchronized types must be
738 treated as reachable.
739
740 2018-07-16 Hristian Kirtchev <kirtchev@adacore.com>
741
742 * sem_util.adb (Check_No_Hidden_State): Ignore internally-generated
743 states and variables.
744
745 2018-07-16 Piotr Trojanek <trojanek@adacore.com>
746
747 * sinfo.ads, sinfo.adb (Withed_Body): Remove.
748 (Set_Withed_Body): Remove.
749
750 2018-07-16 Piotr Trojanek <trojanek@adacore.com>
751
752 * sem.adb (Walk_Library_Items): Skip units with configuration pragmas
753 when printing debug info.
754
755 2018-07-16 Piotr Trojanek <trojanek@adacore.com>
756
757 * sem.adb (Walk_Library_Items): Reuse local constant.
758 (Is_Subunit_Of_Main): Turn condition to positive and flip the
759 IF-THEN-ELSE branches; avoid potentially ineffective assignment to the
760 Lib variable.
761
762 2018-07-16 Piotr Trojanek <trojanek@adacore.com>
763
764 * sem.adb (Walk_Library_Items): Deconstruct dead code.
765
766 2018-07-16 Ed Schonberg <schonberg@adacore.com>
767
768 * exp_ch4.adb (Expand_N_Op_Xor): Use common routine
769 Expand_Nonbinary_Modular_Op. Needed for unnesting.
770
771 2018-07-16 Ed Schonberg <schonberg@adacore.com>
772
773 * sem_ch3.adb (Inherit_Predicate_Flags): A non-discrete type may have a
774 static predicate (for example True) but has no
775 static_discrete_predicate.
776
777 2018-07-16 Hristian Kirtchev <kirtchev@adacore.com>
778
779 * exp_attr.adb (Build_Record_VS_Func): Handle corner cases dealing with
780 class-wide types and record extensions.
781
782 2018-07-16 Justin Squirek <squirek@adacore.com>
783
784 * sem_eval.adb (Eval_Integer_Literal): Add exception for avoiding
785 checks on expanded literals within if and case expressions.
786
787 2018-07-16 Hristian Kirtchev <kirtchev@adacore.com>
788
789 * libgnat/s-wchwts.adb (Wide_String_To_String): Use the appropriate
790 longest sequence factor. Code clean up.
791 (Wide_Wide_String_To_String): Use the appropriate longest sequence
792 factor. Code clean up.
793
794 2018-07-16 Javier Miranda <miranda@adacore.com>
795
796 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Report an error
797 on Bit_Order when defined for a record extension.
798
799 2018-07-16 Arnaud Charlet <charlet@adacore.com>
800
801 * libgnat/s-objrea.ads: Minor code clean up.
802
803 2018-07-16 Piotr Trojanek <trojanek@adacore.com>
804
805 * sem_ch3.adb (Process_Discriminants): Adjust reference to the SPARM RM
806 rule.
807
808 2018-07-16 Arnaud Charlet <charlet@adacore.com>
809
810 * adaint.c (__gnat_set_file_time_name): Code clean up.
811
812 2018-07-16 Javier Miranda <miranda@adacore.com>
813
814 * inline.adb (Build_Body_To_Inline): Minor code reorganization that
815 ensures that calls to function Has_Single_Return() pass a decorated
816 tree.
817 (Has_Single_Return.Check_Return): Peform checks on entities (instead on
818 relying on their characters).
819
820 2018-07-16 Javier Miranda <miranda@adacore.com>
821
822 * exp_ch5.adb (Expand_Iterator_Loop_Over_Array): Code cleanup. Required
823 to avoid generating an ill-formed tree that confuses gnatprove causing
824 it to blowup.
825
826 2018-07-16 Yannick Moy <moy@adacore.com>
827
828 * inline.adb (Has_Single_Return): Rewrap comment.
829
830 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
831
832 * einfo.ads: Minor tweak in comment.
833
834 2018-07-16 Javier Miranda <miranda@adacore.com>
835
836 * sem_ch4.adb (Analyze_Membership_Op): Code cleanup.
837
838 2018-07-16 Javier Miranda <miranda@adacore.com>
839
840 * exp_attr.adb (Expand_N_Attribute_Reference ['Count]): Do not
841 transform 'Count into a function call if the current scope has been
842 eliminated.
843
844 2018-07-16 Javier Miranda <miranda@adacore.com>
845
846 * sem_util.ads, sem_util.adb (Has_Prefix): Move this function to the
847 public part of this package.
848
849 2018-07-16 Yannick Moy <moy@adacore.com>
850
851 * sem_res.adb (Resolve_Call): Do not inline calls inside
852 compiler-generated functions translated as predicates in GNATprove.
853
854 2018-07-16 Gary Dismukes <dismukes@adacore.com>
855
856 * exp_ch4.adb (Expand_N_Allocator): Test for Storage_Pool being RTE in
857 addition to the existing test for no Storage_Pool as a condition
858 enabling generation of the call to Check_Standard_Allocator when the
859 restriction No_Standard_Allocators_After_Elaboration is active.
860 * libgnat/s-elaall.ads (Check_Standard_Allocator): Correct comment to
861 say that Storage_Error will be raised (rather than Program_Error).
862 * libgnat/s-elaall.adb (Check_Standard_Allocator): Raise Storage_Error
863 rather than Program_Error when Elaboration_In_Progress is False.
864
865 2018-07-16 Gary Dismukes <dismukes@adacore.com>
866
867 * sem_eval.adb: Fix spelling for compile-time-known.
868
869 2018-07-16 Hristian Kirtchev <kirtchev@adacore.com>
870
871 * sem_eval.adb (Compile_Time_Known_Value): Add a guard which prevents
872 the compiler from entering infinite recursion when trying to determine
873 whether a deferred constant has a compile time known value, and the
874 initialization expression of the constant is a reference to the
875 constant itself.
876
877 2018-07-16 Nicolas Roche <roche@adacore.com>
878
879 * libgnat/a-strunb.adb, libgnat/a-strunb__shared.adb: Adjust growth
880 factor from 1/32 to 1/2 for Unbounded_String.
881
882 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
883
884 * gcc-interface/lang.opt (funsigned-char): New option.
885 * gcc-interface/misc.c (gnat_handle_option): Accept it.
886 * gcc-interface/utils.c (finish_character_type): Tweak comment.
887
888 2018-07-07 Eric Botcazou <ebotcazou@adacore.com>
889
890 * gcc-interface/decl.c (gnat_to_gnu_entity): Add GNAT_DECL local
891 variable and use it throughout.
892 <E_Variable>: If the nominal subtype of the object is unconstrained,
893 compute the Ada size separately and put in on the padding type if the
894 size is not fixed.
895 <E_Record_Type>: Minor tweak.
896 * gcc-interface/misc.c (gnat_type_max_size): Rename max_size_unit
897 into max_size_unit throughout.
898
899 2018-07-07 Eric Botcazou <ebotcazou@adacore.com>
900
901 * gcc-interface/gigi.h (add_decl_expr): Adjust prototype.
902 * gcc-interface/decl.c (gnat_to_gnu_entity): Remove useless test.
903 * gcc-interface/trans.c (add_stmt_with_node): Remove exceptions.
904 (add_decl_expr): Change type of second parameter and rename it.
905 (renaming_from_instantiation_p): New function moved from...
906 (set_expr_location_from_node): Test for exceptions here and add one
907 for actual subtypes built for unconstrained composite actuals.
908 * gcc-interface/utils.c (renaming_from_instantiation_p): ...here.
909
910 2018-07-07 Eric Botcazou <ebotcazou@adacore.com>
911
912 * gcc-interface/trans.c (lvalue_required_p): Remove ALIASED parameter
913 and adjust recursive calls.
914 (Identifier_to_gnu): Adjust calls to lvalue_required_p.
915 (gnat_to_gnu): Likewise.
916
917 2018-07-07 Eric Botcazou <ebotcazou@adacore.com>
918
919 * gcc-interface/decl.c (gnat_to_gnu_param): Minor tweak.
920 (gnat_to_gnu_subprog_type): New pure_flag local variable. Set it for
921 a pure Ada function with a by-ref In parameter. Propagate it onto the
922 function type by means of the TYPE_QUAL_RESTRICT flag.
923 * gcc-interface/utils.c (finish_subprog_decl): Set DECL_PURE_P if the
924 function type has the TYPE_QUAL_RESTRICT flag set.
925
926 2018-07-06 Jim Wilson <jimw@sifive.com>
927
928 * Makefile.rtl: Add riscv*-linux* support.
929 * libgnarl/s-linux__riscv.ads: New.
930 * libgnat/system-linux-riscv.ads: New.
931
932 * Make-generated.in (treeprs.ads): Use $(GNATMAKE) instead of gnatmake.
933 (einfo.h, sinfo.h, stamp-snames, stamp-nmake): Likewise.
934 * gcc-interface/Makefile.in (xoscons): Likewise.
935
936 2018-07-06 Sebastian Huber <sebastian.huber@embedded-brains.de>
937
938 * libgnat/system-rtems.ads (Frontend_Exceptions): Set to False.
939 (ZCX_By_Default): Set to True.
940
941 2018-07-02 Martin Liska <mliska@suse.cz>
942
943 * gnatvsn.ads: Bump Library_Version to 9.
944
945 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
946
947 * gcc-interface/ada-tree.h (TYPE_RETURN_BY_DIRECT_REF_P): Change from
948 using TYPE_LANG_FLAG_4 to using TYPE_LANG_FLAG_0.
949 (TYPE_ALIGN_OK): Move around.
950 (TYPE_PADDING_FOR_COMPONENT): Remove superfluous parentheses.
951 * gcc-interface/decl.c (change_qualified_type): Move to...
952 (gnat_to_gnu_entity): Adjust comment.
953 * gcc-interface/gigi.h (change_qualified_type): ...here; make inline.
954 (ceil_pow2): Use ceil_log2.
955 * gcc-interface/utils.c (finish_subprog_decl): Add couple of comments
956 and do not set TREE_SIDE_EFFECTS.
957 (handle_noreturn_attribute): Use change_qualified_type.
958
959 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
960
961 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: Do not get
962 the expression of a dispatch table that is not being defined.
963 <E_Record_Subtype>: Remove obsolete kludge.
964
965 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
966
967 * gcc-interface/decl.c (warn_on_field_placement): Use specific wording
968 for discriminants.
969 (warn_on_list_placement): New static function.
970 (components_to_record): Use it to warn on multiple fields in list.
971
972 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
973
974 * gcc-interface/decl.c (variant_desc): Add AUX field.
975 (gnat_to_gnu_entity) <discrete_type>: Do not call compute_record_mode
976 directly.
977 (reverse_sort_field_list): New static function.
978 (components_to_record): Place the variant part at the beginning of the
979 field list when there is an obvious order of increasing position.
980 (build_variant_list): Initialize it.
981 (create_variant_part_from): Do not call compute_record_mode directly.
982 (copy_and_substitute_in_layout): Likewise. Always sort the fields with
983 fixed position in order of increasing position, in the record and all
984 the variants, in any. Call reverse_sort_field_list.
985 * gcc-interface/utils.c (make_packable_type): Compute the sizes before
986 calling finish_record_type. Do not call compute_record_mode directly.
987 (finish_record_type): Overhaul final processing depending on REP_LEVEL
988 and call finish_bitfield_layout if it is equal to one or two.
989
990 2018-06-11 Eric Botcazou <ebotcazou@adacore.com>
991
992 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Reuse the
993 existing fields of a dummy fat pointer type, if any. Clear the
994 TYPE_DECL_SUPPRESS_DEBUG on the fat pointer type after completing it.
995
996 2018-06-11 Hristian Kirtchev <kirtchev@adacore.com>
997
998 * contracts.adb (Process_Body_Postconditions): Expand only checked
999 postconditions.
1000 (Process_Contract_Cases_For): Expand only checked contract cases.
1001 (Process_Inherited_Preconditions): Ignored class-wide preconditions are
1002 partially expanded because some of their semantic checks are tied to
1003 the expansion.
1004 (Process_Preconditions_For): Expand only checked preconditions.
1005 (Process_Spec_Postconditions): Expand only checked preconditions.
1006 Ignored class-wide preconditions are partially expanded because some of
1007 their semantic checks are tied to the expansion.
1008 * exp_prag.adb (Expand_N_Pragma): Suppress the expansion of ignored
1009 assertion pragmas.
1010 * exp_util.adb (Add_Inherited_Invariants): Code clean up.
1011 * sem_util.adb (Propagate_Invariant_Attributes): Code clean up.
1012
1013 2018-06-11 Hristian Kirtchev <kirtchev@adacore.com>
1014
1015 * exp_ch9.adb, exp_unst.adb, inline.adb, libgnat/a-ciorma.adb,
1016 libgnat/a-ciormu.adb, libgnat/a-ciorse.adb, libgnat/a-coorma.adb,
1017 libgnat/a-coormu.adb, libgnat/a-coorse.adb, sem_prag.adb: Minor
1018 reformatting.
1019
1020 2018-06-11 Gary Dismukes <dismukes@adacore.com>
1021
1022 * exp_unst.ads, exp_unst.adb: Typo fixes and minor reformatting.
1023
1024 2018-06-11 Hristian Kirtchev <kirtchev@adacore.com>
1025
1026 * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call): Do
1027 not add any actuals when the size of the object is known, and the
1028 caller will allocate it.
1029 (Build_Heap_Allocator): Rename to Build_Heap_Or_Pool_Allocator to
1030 better illustrate its functionality. Update the comment on the
1031 generated code. Generate a branch for the heap and pool cases where
1032 the object is not necessarity controlled.
1033 (Expand_N_Extended_Return_Statement): Expand the extended return
1034 statement into four branches depending the requested mode if the caller
1035 will not allocate the object on its side.
1036 (Make_Build_In_Place_Call_In_Allocator): Do not allocate a controlled
1037 object on the caller side because this will violate the semantics of
1038 finalizable types. Instead notify the function to allocate the object
1039 on the heap or a user-defined storage pool.
1040 (Needs_BIP_Alloc_Form): A build-in-place function needs to be notified
1041 which of the four modes to employ when returning a limited controlled
1042 result.
1043 * exp_util.adb (Build_Allocate_Deallocate_Proc): Remove a redundant
1044 guard which is already covered in Needs_Finalization.
1045
1046 2018-06-11 Olivier Hainque <hainque@adacore.com>
1047
1048 * libgnat/s-excmac*.ads: Factorize Unwind_Action definitions ...
1049 * libgnat/a-exexpr.adb: ... Here, then add comments describing the
1050 major datastructures associated with the current exception raised.
1051 (Setup_Current_Excep): Accept a "Phase" argument conveying the
1052 unwinding phase during which this subprogram is called. For an Ada
1053 exception, don't update the current exception buffer from the raised
1054 exception object during SEARCH_PHASE, as this is redundant with the
1055 call now issued just before propagation starts.
1056 (Propagate_GCC_Exception): Move call to Setup_Current_Excep ahead of
1057 the unwinding start, conveying Phase 0.
1058 (Unhandled_Except_Handler): Pass UA_CLEANUP_PHASE as the Phase value on
1059 the call to Setup_Current_Excep.
1060 * raise-gcc.c (personality_body): Pass uw_phases as the Phase argument
1061 on calls to Setup_Current_Excep.
1062
1063 2018-06-11 Ed Schonberg <schonberg@adacore.com>
1064
1065 * exp_unst.ads, exp_unst.adb (Needs_Fat_Pointer,
1066 Build_Access_Type_Decl): New subprograms to handle uplevel references
1067 to formals of an unconstrained array type. The activation record
1068 component for these is an access type, and the reference is rewritten
1069 as an explicit derefenrence of that component.
1070
1071 2018-06-11 Bob Duff <duff@adacore.com>
1072
1073 * libgnat/a-ciorma.adb, libgnat/a-ciormu.adb, libgnat/a-ciorse.adb,
1074 libgnat/a-coorma.adb, libgnat/a-coormu.adb, libgnat/a-coorse.adb:
1075 (Element): Add code to detect dangling cursors in some cases.
1076
1077 2018-06-11 Yannick Moy <moy@adacore.com>
1078
1079 * sem_ch6.adb (Build_Subprogram_Declaration): Mark parameters as coming
1080 from source.
1081
1082 2018-06-11 Ed Schonberg <schonberg@adacore.com>
1083
1084 * sem_ch13.adb (Build_Predicate_Functions): For a derived type, ensure
1085 that its parent is already frozen so that its predicate function, if
1086 any, has already been constructed.
1087
1088 2018-06-11 Yannick Moy <moy@adacore.com>
1089
1090 * sem_prag.adb (Check_Mode_Restriction_In_Enclosing_Context): Adapt for
1091 possible task unit as the enclosing context.
1092
1093 2018-06-11 Eric Botcazou <ebotcazou@adacore.com>
1094
1095 * gnat1drv.adb: Remove use clause for Repinfo.
1096 (Gnat1drv): Beef up comment about the interplay between -gnatc and
1097 back-end annotations. Use full qualified name for List_Rep_Info.
1098
1099 2018-06-11 Hristian Kirtchev <kirtchev@adacore.com>
1100
1101 * libgnat/g-arrspl.ads: Add pragma Preelaborate.
1102
1103 2018-06-11 Arnaud Charlet <charlet@adacore.com>
1104
1105 * exp_ch4.adb (Expand_Record_Equality): Remove extraneous "True and
1106 then" and general logical "ada" in codepeer mode.
1107
1108 2018-06-11 Javier Miranda <miranda@adacore.com>
1109
1110 * exp_ch9.adb (Expand_N_Protected_Body): Add missing handling of
1111 N_Call_Marker nodes.
1112
1113 2018-06-11 Arnaud Charlet <charlet@adacore.com>
1114
1115 * exp_ch3.adb, exp_unst.adb, inline.adb, sem_prag.adb: Minor
1116 reformatting.
1117
1118 2018-06-11 Yannick Moy <moy@adacore.com>
1119
1120 * doc/gnat_rm/implementation_defined_pragmas.rst: Add Suppressible
1121 argument to Assertion_Policy
1122 * gnat_rm.texi: Regenerate.
1123
1124 2018-06-11 Yannick Moy <moy@adacore.com>
1125
1126 * gnat1drv.adb: Do not check representation information in CodePeer and
1127 GNATprove modes, as these modes call a special backend instead of gigi,
1128 so do not have the information.
1129
1130 2018-06-11 Yannick Moy <moy@adacore.com>
1131
1132 * inline.adb (Build_Body_To_Inline): Consider case of extended return
1133 of unconstrained type as one case where inlining is not supported.
1134 (Expand_Inlined_Call): Remove special case for body as extended return
1135 of unconstrained type.
1136
1137 2018-06-11 Yannick Moy <moy@adacore.com>
1138
1139 * sem_prag.adb (Analyze_Part_Of): Only allow Part_Of on non-generic
1140 unit.
1141 (Check_Missing_Part_Of): Do not force Part_Of on generic unit.
1142
1143 2018-06-11 Piotr Trojanek <trojanek@adacore.com>
1144
1145 * sem_ch13.adb (Analyze_Aspect_Specifications): Don't split AND THEN
1146 expressions in Pre/Post contracts while in GNATprove_Mode.
1147
1148 2018-06-11 Piotr Trojanek <trojanek@adacore.com>
1149
1150 * sem_util.adb (Is_Potentially_Unevaluated): Fix detection of contracts
1151 with AND THEN expressions broken down into individual conjuncts.
1152
1153 2018-06-11 Ed Schonberg <schonberg@adacore.com>
1154
1155 * exp_ch7.adb (Check_Unnesting_Elaboration_Code): Add guard.
1156
1157 2018-06-11 Ed Schonberg <schonberg@adacore.com>
1158
1159 * exp_unst.adb (Visit_Node): Skip generic associations.
1160
1161 2018-06-11 Arnaud Charlet <charlet@adacore.com>
1162
1163 * libgnat/memtrack.adb (fwrite): Remove second definition.
1164
1165 2018-06-11 Javier Miranda <miranda@adacore.com>
1166
1167 * sinfo.ads (Is_Dynamic_Coextension): Adding documentation.
1168 (Is_Static_Coextension): Adding documentation.
1169 * sinfo.adb (Is_Dynamic_Coextension): Extending the assertion.
1170 (Is_Static_Coextension): Extending the assertion.
1171 * sem_util.adb (Mark_Allocator): Clear Is_Static_Coextension when
1172 setting flag Is_Dynamic_Coextension (and vice versa).
1173
1174 2018-06-11 Ed Schonberg <schonberg@adacore.com>
1175
1176 * exp_unst.adb (Search_Subprograms): Handle explicitly stubs at the top
1177 level of a compilation unit, becuase they may contain nested
1178 subprograms that need an activation record.
1179
1180 2018-06-11 Arnaud Charlet <charlet@adacore.com>
1181
1182 * Makefile.rtl: Compile Ada files with $(ADAC) instead of $(CC).
1183
1184 2018-06-11 Hristian Kirtchev <kirtchev@adacore.com>
1185
1186 * exp_ch11.adb, exp_unst.adb, inline.adb, sem_ch12.adb, sem_util.adb:
1187 Minor reformatting.
1188 * sinfo.ads: Fix a typo.
1189
1190 2018-06-11 Ed Schonberg <schonberg@adacore.com>
1191
1192 * inline.adb (Expand_Inlined_Call): If no optimization level is
1193 specified, the expansion of a call to an Inline_Always function is
1194 fully performed in the front-end even on a target that support back-end
1195 inlining.
1196
1197 2018-06-11 Arnaud Charlet <charlet@adacore.com>
1198
1199 * bindgen.adb (Gen_Adainit): Protect reference to System.Parameters
1200 with Sec_Stack_Used.
1201
1202 2018-06-11 Hristian Kirtchev <kirtchev@adacore.com>
1203
1204 * sem_ch8.adb (Find_Direct_Name): Mode the declaration of
1205 Is_Assignment_LHS further in. Use predicate
1206 Needs_Variable_Reference_Marker to determine whether to create a
1207 variable marker.
1208 (Find_Expanded_Name): Mode the declaration of Is_Assignment_LHS further
1209 in. Use predicate Needs_Variable_Reference_Marker to determine whether
1210 to create a variable marker.
1211 * sem_elab.adb (Build_Variable_Reference_Marker): Remove the various
1212 checks that determine whether the identifier or expanded name is a
1213 suitable variable reference. The checks are now performed by
1214 Needs_Variable_Reference_Marker.
1215 * sem_res.adb (Resolve_Actuals): Use predicate
1216 Needs_Variable_Reference_Marker to determine whether to create a
1217 variable marker.
1218 * sem_util.adb (Needs_Variable_Reference_Marker): New routine.
1219 * sem_util.ads (Needs_Variable_Reference_Marker): New routine.
1220
1221 2018-06-11 Valentine Reboul <reboul@adacore.com>
1222
1223 * doc/gnat_rm.rst, doc/gnat_ugn.rst: Rename "GPL Edition" into
1224 "Community Edition".
1225
1226 2018-06-11 Ed Schonberg <schonberg@adacore.com>
1227
1228 * sem_ch12.adb (Install_Body): In order to determine the placement of
1229 the freeze node for an instance of a generic nested within another
1230 instance, take into account that the outer instance may be declared in
1231 the visible part of a package and the inner intance may be in the
1232 private part of the same package.
1233
1234 2018-06-11 Eric Botcazou <ebotcazou@adacore.com>
1235
1236 * errout.adb (Special_Msg_Delete): Remove handling of Atomic and VFA.
1237
1238 2018-06-11 Nicolas Roche <roche@adacore.com>
1239
1240 * libgnat/s-valuti.adb (Bad_Value): Ensure that we do not generate a
1241 stack overflow while raising a constraint error.
1242
1243 2018-06-11 Eric Botcazou <ebotcazou@adacore.com>
1244
1245 * repinfo.ads (Rep_Value): Use a single line.
1246 * repinfo.adb (Rep_Value): Likewise.
1247 (List_Attr): Do not use string concatenation.
1248
1249 2018-06-11 Ed Schonberg <schonberg@adacore.com>
1250
1251 * exp_unst.adb (Visit_Node): Check reference to formal parameter of
1252 current procedure, because the bounds of its type may be uplevel
1253 references.
1254
1255 2018-06-02 Eric Botcazou <ebotcazou@adacore.com>
1256
1257 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: If this is
1258 not a definition, retrieve the expression only if it's a compile-time
1259 known value if we are just annotating types.
1260
1261 * gcc-interface/utils.c (convert): Do not try to upcast properly for a
1262 conversion between tagged types in type_annotate_only mode.
1263
1264 2018-06-02 Eric Botcazou <ebotcazou@adacore.com>
1265
1266 * gcc-interface/ada-tree.h (TYPE_PADDING_FOR_COMPONENT): New macro.
1267 * gcc-interface/decl.c (gnat_to_gnu_component_type): Cache the padding
1268 type built for an aliased component with variable size.
1269
1270 2018-05-31 Pierre-Marie de Rodat <derodat@adacore.com>
1271
1272 * doc/gnat_ugn/project-manager-figure.png: Delete.
1273
1274 2018-05-31 Pierre-Marie de Rodat <derodat@adacore.com>
1275
1276 * vxworks-arm-link.spec, vxworks-e500-link.spec,
1277 vxworks-gnat-crtbe-link.spec, vxworks-smp-arm-link.spec,
1278 vxworks-smp-e500-link.spec, vxworks-smp-ppc-link.spec,
1279 vxworks-smp-x86-link.spec: New files.
1280
1281 2018-05-31 Pierre-Marie de Rodat <derodat@adacore.com>
1282
1283 * gnatvsn.adb: Re-center the copyright header.
1284 * indepsw-darwin.adb: Adjust the starting copyright year to 2011.
1285
1286 2018-05-31 Fedor Rybin <frybin@adacore.com>
1287
1288 * doc/gnat_ugn/gnat_utility_programs.rst: Document Stubs_Subdir in
1289 gnattest section on user guide.
1290
1291 2018-05-31 Ed Schonberg <schonberg@adacore.com>
1292
1293 * sem_res.adb (Resolve_String_Literal): If the type is a string type
1294 whose component subtype has a static predicate, ensure that the
1295 predicate is applied to each character by expanding the string into the
1296 equivalent aggregate. This is also done if the component subtype is
1297 constrained.
1298
1299 2018-05-31 Eric Botcazou <ebotcazou@adacore.com>
1300
1301 * gcc-interface/trans.c (Call_to_gnu): Remove obsolete code.
1302
1303 2018-05-31 Piotr Trojanek <trojanek@adacore.com>
1304
1305 * sem_ch6.adb (Check_Missing_Return): Handle procedures with no
1306 explicit spec.
1307
1308 2018-05-31 Eric Botcazou <ebotcazou@adacore.com>
1309
1310 * gcc-interface/trans.c (Call_to_gnu): In the by-reference case, if
1311 the type of the parameter is an unconstrained array type, convert
1312 to the type of the actual before the type of the formal only if the
1313 conversion was suppressed earlier. Use in_param and gnu_actual_type
1314 local variables throughout, and uniform spelling for In Out or Out.
1315 Also remove dead code in the component-by-reference case.
1316
1317 2018-05-31 Frederic Konrad <konrad@adacore.com>
1318
1319 * tracebak.c (STOP_FRAME): Harden condition.
1320 (is_return_from, EXTRA_STOP_CONDITION): New helpers for VxWorks in RTP
1321 mode.
1322
1323 2018-05-31 Ed Schonberg <schonberg@adacore.com>
1324
1325 * checks.adb (Apply_Discriminant_Check): Do not apply discriminant
1326 check to a call to a build-in-place function, given that the return
1327 object is limited and cannot be copied.
1328
1329 2018-05-31 Olivier Hainque <hainque@adacore.com>
1330
1331 * libgnat/s-atopri.ads: Update comment on __atomic_compare_exchange
1332 builtins.
1333
1334 2018-05-31 Eric Botcazou <ebotcazou@adacore.com>
1335
1336 * gcc-interface/trans.c (Call_to_gnu): If this is a function call and
1337 there is no target, also create a temporary for the return value for
1338 an allocator if the type is an unconstrained record type with default
1339 discriminant.
1340
1341 2018-05-31 Hristian Kirtchev <kirtchev@adacore.com>
1342
1343 * exp_ch7.adb (Find_Transient_Context): An iteration scheme is a valid
1344 boudary for a transient scope.
1345
1346 2018-05-31 Valentine Reboul <reboul@adacore.com>
1347
1348 * gnatvsn.ads: Rename "GPL" version to "Community".
1349
1350 2018-05-31 Ed Schonberg <schonberg@adacore.com>
1351
1352 * einfo.ads: Improve documentation for the Is_Unsigned_Type entity
1353 flag.
1354
1355 2018-05-31 Piotr Trojanek <trojanek@adacore.com>
1356
1357 * sem_prag.adb (Analyze_Pragma): Replace call to Unique_Defining_Entity
1358 with a semantically equivalent call to Defining_Entity.
1359
1360 2018-05-31 Piotr Trojanek <trojanek@adacore.com>
1361
1362 * sem_prag.adb (Analyze_Pragma): Set Etype on the rewritten
1363 Max_Queue_Length expression.
1364
1365 2018-05-31 Sergey Rybin <rybin@adacore.com>
1366
1367 * doc/gnat_ugn/gnat_and_program_execution.rst: gnatelim does not need
1368 that the main unit to be built before the call, now it computes the
1369 closure of the main unit itself.
1370 * gnat_ugn.texi: Regenerate.
1371
1372 2018-05-31 Eric Botcazou <ebotcazou@adacore.com>
1373
1374 * repinfo.adb (List_Structural_Record_Layout): Set First to false
1375 after having listed the fields of the parent type, if any.
1376
1377 2018-05-31 Eric Botcazou <ebotcazou@adacore.com>
1378
1379 * gcc-interface/decl.c (gnat_to_gnu_entity) <discrete_type>: Do not
1380 deal with the ___XP suffix for packed array types here...
1381 <E_Array_Subtype>: ...or here when processing the implementation type
1382 but when processing the original type instead. Do not reuse the DECL
1383 of the implementation type for the original type. Tidy up.
1384
1385 2018-05-31 Eric Botcazou <ebotcazou@adacore.com>
1386
1387 * einfo.ads (Object_Size_Clause): Declare.
1388 * einfo.adb (Object_Size_Clause): New function.
1389 * gcc-interface/utils.c (maybe_pad_type): Test Has_Size_Clause before
1390 retrieving Size_Clause and post the warning on the object size clause
1391 if Has_Object_Size_Clause is true.
1392
1393 2018-05-31 Javier Miranda <miranda@adacore.com>
1394
1395 * sem_util.ads, sem_util.adb (Find_Primitive_Eq): New subprogram.
1396 * exp_ch4.adb (Expand_Composite_Equality): Use the new subprogram
1397 Find_Primitive_Eq to search for the primitive of types whose underlying
1398 type is a tagged type.
1399
1400 2018-05-31 Yannick Moy <moy@adacore.com>
1401
1402 * sem_prag.adb (Analyze_Pragma.Check_Loop_Pragma_Placement): Inverse
1403 order of treatment between nodes recognized as loop pragmas (or
1404 generated from one) and block statements.
1405
1406 2018-05-31 Doug Rupp <rupp@adacore.com>
1407
1408 * libgnat/s-osprim__posix2008.adb (Clock): Implement using
1409 clock_gettime.
1410
1411 2018-05-31 Ed Schonberg <schonberg@adacore.com>
1412
1413 * exp_unst.ads, exp_unst.adb (In_Synchronized_Unit): New predicate to
1414 mark subprograms that cannot be eliminated because they must be treated
1415 as reachable from outside the current unit. This includes entry bodies
1416 and protected operations.
1417
1418 2018-05-31 Ed Schonberg <schonberg@adacore.com>
1419
1420 * exp_ch4.adb (Expand_Modular_Addition, Expand_Modular_Subtraction):
1421 Convert all operands of the generated code to Standard.Unsigned, to
1422 prevent spurious visibility errors. This is needed when the generated
1423 expansion involves a modular index type of an array type, and the index
1424 type is not immediately visible.
1425
1426 2018-05-30 Piotr Trojanek <trojanek@adacore.com>
1427
1428 * einfo.ads (Package_Instantiation): Update comment after a routine
1429 that uses this field has been renamed.
1430
1431 2018-05-30 Ed Schonberg <schonberg@adacore.com>
1432
1433 * exp_ch11.adb (Replace_Raise_By_Goto): The transfomation is legal even
1434 if the local raise statement includes a string expression. This
1435 expression might be picked up by an outer handler or discarded, but
1436 plays no role in this transformation.
1437
1438 2018-05-30 Hristian Kirtchev <kirtchev@adacore.com>
1439
1440 * exp_aggr.adb, exp_unst.adb, freeze.adb, libgnat/a-direct.adb: Minor
1441 reformatting.
1442
1443 2018-05-30 Ed Schonberg <schonberg@adacore.com>
1444
1445 * exp_unst.adb (Visit_Node): Handle the semantic Procedure_To_Call
1446 field in relevant nodes: Allocate, Free, and return statements.
1447
1448 2018-05-30 Ed Schonberg <schonberg@adacore.com>
1449
1450 * exp_unst.adb (Visit_Node): Do not traverse a Component_Association
1451 that has not been analyzed, as will be the case for a nested aggregate
1452 that is expanded into individual assignments.
1453
1454 2018-05-30 Justin Squirek <squirek@adacore.com>
1455
1456 * aspects.adb, aspects.ads: Register new aspect.
1457 * par-prag.adb (Prag): Register new pragma.
1458 * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing for new
1459 aspect similar to Aspect_Max_Queue_Length.
1460 * sem_prag.adb, sem_prag.ads (Analyze_Pragma): Register new pragma and
1461 set it to use the same processing as Pragma_Max_Queue_Length.
1462 * snames.ads-tmpl: Move definition of Name_Max_Entry_Queue_Depth so
1463 that it can be processed as a pragma in addition to a restriction and
1464 add an entry for the pragma itself.
1465
1466 2018-05-30 Ed Schonberg <schonberg@adacore.com>
1467
1468 * freeze.adb (Freeze_Object_Declaration): A pragma Thread_Local_Storage
1469 is now legal on a variable of composite type initialized with an
1470 aggregate that is fully static and requires no elaboration code.
1471 * exp_aggr.adb (Convert_To_Positional): Recognize additional cases of
1472 nested aggregates that are compile-time static, so they can be used to
1473 initialize variables declared with Threqd_Local_Storage.
1474 * doc/gnat_rm/implementation_defined_pragmas.rst: Add documentation on
1475 Thread_Local_Storage.
1476 * gnat_rm.texi: Regenerate.
1477
1478 2018-05-30 Yannick Moy <moy@adacore.com>
1479
1480 * sem_util.adb (Policy_In_Effect): Take into account CodePeer and
1481 GNATprove modes.
1482
1483 2018-05-30 Justin Squirek <squirek@adacore.com>
1484
1485 * libgnat/a-direct.adb, libgnat/a-direct.ads (Name_Case_Equivalence):
1486 Add implementation.
1487 (Start_Search): Modify to use Start_Search_Internal
1488 (Start_Search_Internal): Add to break out an extra flag for searching
1489 case insensative due to the potential for directories within the same
1490 OS to allow different casing schemes.
1491 * sysdep.c (__gnat_name_case_equivalence): Add as a default fallback
1492 for when the more precise solution fails.
1493
1494 2018-05-30 Hristian Kirtchev <kirtchev@adacore.com>
1495
1496 * checks.adb, exp_ch5.adb, exp_ch7.adb, exp_unst.adb, sem_eval.adb:
1497 Minor reformatting.
1498
1499 2018-05-30 Pascal Obry <obry@adacore.com>
1500
1501 * libgnat/g-comlin.ads (Value_Callback, Define_Switch): New.
1502 * libgnat/g-comlin.adb: Add corresponding implementation.
1503
1504 2018-05-30 Gary Dismukes <dismukes@adacore.com>
1505
1506 * sem_res.adb, sem_util.adb: Fix several typos.
1507
1508 2018-05-30 Olivier Hainque <hainque@adacore.com>
1509
1510 * vx_crtbegin_attr.c (CTOR_ATTRIBUTE, DTOR_ATTRIBUTE): Empty.
1511 (eh_registration_ctors, eh_registration_tors): New static variables,
1512 forced in a .ctors/.dtors section, respectively, with priority.
1513
1514 2018-05-30 Bob Duff <duff@adacore.com>
1515
1516 * aspects.ads, contracts.adb, exp_util.adb, expander.adb, expander.ads,
1517 freeze.adb, inline.adb, lib-xref.adb, sem.ads, sem_aggr.adb,
1518 sem_attr.adb, sem_ch13.adb, sem_ch3.adb, sem_ch5.adb, sem_ch6.adb,
1519 sem_ch8.adb, sem_dim.adb, sem_elab.adb, sem_res.adb, sem_res.ads,
1520 sinfo.ads: Spell preanalysis, preanalyze correctly.
1521
1522 2018-05-30 Bob Duff <duff@adacore.com>
1523
1524 * libgnat/g-sestin.ads: Rework documentation comments.
1525
1526 2018-05-30 Piotr Trojanek <trojanek@adacore.com>
1527
1528 * errout.adb, exp_aggr.adb, exp_ch7.adb, exp_util.adb, lib.adb,
1529 sem_ch13.adb, sem_ch4.adb, sem_res.adb, sem_util.adb
1530 (Has_Original_Node): Refactor to use Is_Rewrite_Substitution.
1531
1532 2018-05-30 Piotr Trojanek <trojanek@adacore.com>
1533
1534 * sem_prag.adb (Analyze_Pragma): Remove conjuncts that are always true.
1535
1536 2018-05-30 Hristian Kirtchev <kirtchev@adacore.com>
1537
1538 * sem_util.adb (Is_Atomic_Object): Cleaned up. Split the entity logic
1539 in a separate routine.
1540 (Is_Atomic_Object_Entity): New routine.
1541 (Is_Atomic_Prefix): Cleaned up.
1542 (Is_Synchronized_Object): Check that the object is atomic, or its type
1543 is atomic.
1544 (Object_Has_Atomic_Components): Removed.
1545 * sem_util.ads (Is_Atomic_Object): Reword the comment on usage.
1546 (Is_Atomic_Object_Entity): New routine.
1547
1548 2018-05-30 Ed Schonberg <schonberg@adacore.com>
1549
1550 * sem_ch3.adb (Access_Subprogram_Declaration): The flag
1551 Needs_Activation_Record is only needed on a subprogram type, not on a
1552 pointer to such.
1553 * sem_res.adb (Resolve_Selected_Component): If the context type and the
1554 component type are anonymous access to subprograms, use the component
1555 type to obtain the proper value of Needs_Activation_Record flag for the
1556 expression.
1557
1558 2018-05-30 Eric Botcazou <ebotcazou@adacore.com>
1559
1560 * gcc-interface/trans.c (gnat_to_gnu) <N_Assignment_Statement>: Add
1561 comment about the memset case.
1562
1563 2018-05-30 Bob Duff <duff@adacore.com>
1564
1565 * exp_ch5.adb (Expand_Formal_Container_Element_Loop): Remove the code
1566 to analyze the Elmt_Decl, because it gets analyzed in the wrong scope.
1567 We need to analyze it as part of analyzing the block, so that if the
1568 call to Element that initializes Elmt_Decl returns on the secondary
1569 stack, the block will ss_mark/ss_release. This block is inside the
1570 loop; we don't want to leak memory until the loop exits. The purpose
1571 of analyzing Elmt_Decl first was to catch the error of modifying it,
1572 which is illegal because it's a loop parameter. The above causes us to
1573 miss that error. Therefore, we add a flag Is_Loop_Parameter, and set
1574 it on the Element entity, so we end up with an E_Variable node with the
1575 flag set.
1576 * einfo.ads, einfo.adb (Is_Loop_Parameter): New flag.
1577 * sem_ch5.adb (Diagnose_Non_Variable_Lhs): Give the "assignment to loop
1578 parameter not allowed" error if Is_Loop_Parameter.
1579 * sem_util.adb (Is_Variable): Return False if Is_Loop_Parameter, to
1580 trigger the call to Diagnose_Non_Variable_Lhs.
1581
1582 2018-05-30 Arnaud Charlet <charlet@adacore.com>
1583
1584 * checks.adb (Apply_Scalar_Range_Check):
1585 * sem_eval.adb (Check_Non_Static_Context, Out_Of_Range): Ignore out of
1586 range values for System.Priority in CodePeer mode since the actual
1587 target compiler may provide a wider range.
1588
1589 2018-05-30 Ed Schonberg <schonberg@adacore.com>
1590
1591 * exp_unst.adb: Search specification of main unit as well, for
1592 unnesting.
1593
1594 2018-05-30 Ed Schonberg <schonberg@adacore.com>
1595
1596 * exp_ch7.adb (Check_Unnesting_Elaboration_Code): The statement part of
1597 a package body that is a compilation unit may contain blocks that
1598 declare local subprograms. In Subprogram_Unnesting Mode such
1599 subprograms must be handled as nested inside the (implicit) elaboration
1600 procedure that executes that statement part. To handle properly uplevel
1601 references we construct that subprogram explicitly, to contain blocks
1602 and inner subprograms, The statement part of the compilation unit
1603 becomes a call to this subprogram. This is only done if blocks are
1604 present in the statement list of the body.
1605
1606 2018-05-30 Bob Duff <duff@adacore.com>
1607
1608 * exp_ch7.adb: Minor comment fix.
1609
1610 2018-05-30 Ed Schonberg <schonberg@adacore.com>
1611
1612 * exp_unst.adb (Visit_Node): Handle properly subprogram instantiations
1613 that have no corresponding body and appear as attributes of the
1614 corresponding wrapper package declaration.
1615 (Register_Subprogram): New subprogram, used for subprogram bodies and
1616 for subprogram instantiations to enter callable entity into Subp table.
1617
1618 2018-05-30 Hristian Kirtchev <kirtchev@adacore.com>
1619
1620 * libgnat/s-secsta.adb: Reimplement the secondary stack support.
1621 * libgnat/s-secsta.ads: Update the documentation of all routines in the
1622 public part of the package. Reimplement the private part of the
1623 package to account for the new secondary stack structure. Add types
1624 and subprograms for testing purposes. Add several documentation
1625 sections.
1626
1627 2018-05-30 Hristian Kirtchev <kirtchev@adacore.com>
1628
1629 * exp_aggr.adb, exp_ch3.adb, exp_ch4.adb, exp_ch7.adb, exp_unst.adb,
1630 exp_util.adb, exp_util.ads, libgnat/a-calcon.adb, libgnat/a-calcon.ads,
1631 libgnat/s-os_lib.adb, repinfo.adb, sem_ch3.adb, sem_disp.adb,
1632 sem_disp.ads, sem_util.adb: Minor reformatting.
1633
1634 2018-05-30 Arnaud Charlet <charlet@adacore.com>
1635
1636 * gcc-interface/Makefile.in: Move special flags for Ada runtime files
1637 from here...
1638 * Makefile.rtl: ... to here. Update comments. Protect call to
1639 "GCC_FOR_TARGET" in case target_os isn't defined.
1640
1641 2018-05-30 Arnaud Charlet <charlet@adacore.com>
1642
1643 * gcc-interface/Makefile.in: Move target pair settings from here...
1644 * Makefile.rtl: ... to here.
1645 (setup-rts): New target.
1646
1647 2018-05-29 Eric Botcazou <ebotcazou@adacore.com>
1648
1649 * doc/gnat_ugn/building_executable_programs_with_gnat.rst (Alphabetical
1650 List of All Switches): Replace "modules" with "units".
1651 (Subprogram Inlining Control): Likewise.
1652 * gnat_ugn.texi: Regenerate.
1653 * usage.adb (Usage): Fix description of -gnatn switch.
1654
1655 2018-05-29 Arnaud Charlet <charlet@adacore.com>
1656
1657 * gcc-interface/Makefile.in: Fix typos.
1658
1659 2018-05-29 Ed Schonberg <schonberg@adacore.com>
1660
1661 * exp_ch7.adb (Build_Finalizer_Call): Attach to tree the reference to
1662 the finalizer procedure in the At_End handler, for use in LLVM
1663 generation.
1664
1665 2018-05-29 Javier Miranda <miranda@adacore.com>
1666
1667 * exp_ch4.adb (Expand_N_Op_Eq, Expand_Composite_Equality): Use the new
1668 subprogram Inherits_From_Tagged_Full_View to identify more reliably
1669 untagged private types completed with a derivation of an untagged
1670 private whose full view is a tagged type.
1671 * sem_util.ads, sem_util.adb (Inherits_From_Tagged_Full_View): New
1672 subprogram.
1673 (Collect_Primitive_Operations): Handle untagged private types completed
1674 with a derivation of an untagged private type whose full view is a
1675 tagged type. In such case, collecting the list of primitives we may
1676 find two equality primitives: one associated with the untagged private
1677 and another associated with the ultimate tagged type (and we must
1678 remove from the returned list this latter one).
1679
1680 2018-05-29 Ed Schonberg <schonberg@adacore.com>
1681
1682 * exp_unst.adb (Visit_Node): Handle statement sequences that include an
1683 At_End handler.
1684
1685 2018-05-29 Eric Botcazou <ebotcazou@adacore.com>
1686
1687 * repinfo.adb (List_Entities): Also recurse into blocks without label.
1688
1689 2018-05-29 Ed Schonberg <schonberg@adacore.com>
1690
1691 * exp_ch6.adb (Expand_N_Subprogram_Body): Do not generate push/pop for
1692 exceptions if subprogram unnesting is in effect, because these branch
1693 nodes are relevant only in the presence of nested subprograms.
1694
1695 2018-05-29 Ed Schonberg <schonberg@adacore.com>
1696
1697 * libgnat/s-fatgen.adb (Succ, Pred): Raise Constraint_Error
1698 unconditionally when applied to the largest positive (resp. largest
1699 negative) value of a floating-point type.
1700
1701 2018-05-29 Ed Schonberg <schonberg@adacore.com>
1702
1703 * einfo.ads, einfo.adb: Clarify use of Activation_Record_Component:
1704 discriminants and exceptions are never components of such. The flag
1705 Needs_Activation_Record is set on subprogram types, not on access to
1706 them.
1707
1708 2018-05-29 Ed Schonberg <schonberg@adacore.com>
1709
1710 * sem_ch3.adb: Set scope of component of subtype.
1711
1712 2018-05-29 Ed Schonberg <schonberg@adacore.com>
1713
1714 * exp_unst.adb (Visit_Node): Exclude selected components whose prefix
1715 carry no type. Such selected components appear in unit names that are
1716 child units, both in the specification and possibly in an end label for
1717 the unit, and they do not contain any relevant uplevel references.
1718
1719 2018-05-29 Arnaud Charlet <charlet@adacore.com>
1720
1721 * libgnat/a-calend.ads, libgnat/a-calend.adb (Epoch_Offset): Make it a
1722 function.
1723
1724 2018-05-29 Olivier Hainque <hainque@adacore.com>
1725
1726 * libgnat/system-vxworks7-ppc-rtp.ads: New file.
1727 * libgnat/system-vxworks7-ppc-kernel.ads: New file.
1728 * libgnat/system-vxworks7-e500-rtp.ads: New file.
1729 * libgnat/system-vxworks7-e500-kernel.ads: New file.
1730 * libgnat/system-vxworks7-x86-rtp.ads: New file.
1731 * libgnat/system-vxworks-ppc64-kernel.ads: Rename as ...
1732 * libgnat/system-vxworks7-ppc64-kernel.ads: and adjust name of
1733 gnat-crtbe link spec to use the vx7 variant.
1734
1735 2018-05-29 Olivier Hainque <hainque@adacore.com>
1736
1737 * vx_crtbegin.inc: Use a consistent naming convention for the
1738 registration/deregistration functions across RTP or kernel. Remove the
1739 ctor/dtor attribute setting based on RTP/kernel, expect the optional
1740 attribute extension to be provided by includers instead.
1741 * vx_crtbegin.c: Mere inclusion of vx_crtbegin.inc with empty attribute
1742 extension for the registration/deregistration functions.
1743 * vx_crtbegin_attr.c: New file. Include vx_crtbegin.inc with explicit
1744 constructor/destructor attribute extensions.
1745 * vx_crtbegin_array.c: New file. Include vx_crtbegin.inc with empty
1746 attribute extensions and declare _ctors/_dtors arrays.
1747 * vx_crtbegin_auto.c: Remove.
1748 * libgnat/system-vxworks7-aarch64-rtp-smp.ads: Use
1749 vxworks7-gnat-crtbe-link.spec.
1750 * libgnat/system-vxworks7-aarch64.ads: Likewise.
1751 * libgnat/system-vxworks7-e500-rtp-smp.ads: Likewise.
1752 * libgnat/system-vxworks7-ppc-rtp-smp.ads: Likewise.
1753 * libgnat/system-vxworks7-ppc64-rtp-smp.ads: Likewise.
1754 * libgnat/system-vxworks7-x86-kernel.ads: Likewise.
1755 * libgnat/system-vxworks7-x86-rtp-smp.ads: Likewise.
1756 * libgnat/system-vxworks7-x86_64-kernel.ads: Likewise.
1757 * libgnat/system-vxworks7-x86_64-rtp-smp.ads: Likewise.
1758
1759 2018-05-29 Piotr Trojanek <trojanek@adacore.com>
1760
1761 * ali.adb: Minor reformatting.
1762
1763 2018-05-29 Joel Brobecker <brobecker@adacore.com>
1764
1765 * doc/gnat_ugn/platform_specific_information.rst: Update package
1766 requirements for 32bit GNAT on x86_64-linux.
1767 * gnat_ugn.texi: Regenerate.
1768
1769 2018-05-29 Eric Botcazou <ebotcazou@adacore.com>
1770
1771 * doc/gnat_ugn/building_executable_programs_with_gnat.rst (Debugging
1772 Control): Adjust description of -gnatRj.
1773 * gnat_ugn.texi: Regenerate.
1774 * opt.ads (List_Representation_Info_To_JSON): Likewise.
1775 * repinfo.adb (List_Rep_Info): Do not automatically create a file
1776 if List_Representation_Info_To_JSON is true.
1777 * switch-c.adb (Scan_Front_End_Switches) <R>: Remove incompatibility
1778 check between -gnatRj and -gnatRs.
1779 * usage.adb (Usage): Adjust description of -gnatRj.
1780
1781 2018-05-29 Pascal Obry <obry@adacore.com>
1782
1783 * libgnat/s-os_lib.adb (Normalize_Pathname): Fix handling of ".." in
1784 the root directory.
1785
1786 2018-05-29 Pascal Obry <obry@adacore.com>
1787
1788 * libgnat/s-os_lib.adb: Minor reformatting.
1789
1790 2018-05-29 Doug Rupp <rupp@adacore.com>
1791
1792 * libgnat/a-calend.adb (Epoch_Offset): Move from body to ...
1793 * libgnat/a-calend.ads (Epoch_Offset): to private part of spec
1794 * libgnat/a-calcon.ads (To_Unix_Nano_Time): New function spec.
1795 * libgnat/a-calcon.adb (To_Unix_Nano_Time): New function body.
1796
1797 2018-05-29 Eric Botcazou <ebotcazou@adacore.com>
1798
1799 * repinfo.ads (JSON format): Document new pair for components.
1800 * repinfo.adb (Derived_Discriminant): New function.
1801 (List_Structural_Record_Layout): Add Outer_Ent parameter and pass it
1802 in recursive calls. If the record type is the parent of an extension,
1803 find and list the derived discriminant from the extension, if any.
1804 (List_Component_Layout): List the Discriminant_Number in JSON mode.
1805 (List_Record_Info): Adjust call to List_Structural_Record_Layout.
1806
1807 2018-05-29 Eric Botcazou <ebotcazou@adacore.com>
1808
1809 * doc/gnat_ugn/building_executable_programs_with_gnat.rst (Alphabetical
1810 List of All Switches): Document -gnatRj.
1811 (Debugging Control): Likewise.
1812 * gnat_ugn.texi: Regenerate.
1813 * opt.ads (List_Representation_Info_To_JSON): New boolean variable.
1814 * osint-c.adb (Create_Repinfo_File): Use the .json instead of .rep
1815 extension if List_Representation_Info_To_JSON is true.
1816 * repinfo.ads: Document the JSON output format.
1817 * repinfo.adb (List_Location): New procedure.
1818 (List_Array_Info): Add support for JSON output.
1819 (List_Entities): Likewise.
1820 (Unop): Likewise.
1821 (Binop): Likewise.
1822 (Print_Expr): Likewise.
1823 (List_Linker_Section): Likewise.
1824 (List_Mechanisms): Likewise.
1825 (List_Name): Likewise.
1826 (List_Object_Info): Likewise.
1827 (List_Record_Info): Likewise.
1828 (List_Component_Layout): Likewise. Add Indent parameter.
1829 (List_Structural_Record_Layout): New procedure.
1830 (List_Attr): Add support for JSON output.
1831 (List_Type_Info): Likewise.
1832 (Write_Unknown_Val): Likewise.
1833 * switch-c.adb (Scan_Front_End_Switches) <R>: Deal with 'j'.
1834 * usage.adb (Usage): List -gnatRj.
1835
1836 2018-05-29 Eric Botcazou <ebotcazou@adacore.com>
1837
1838 * repinfo.adb (List_Component_Layout): New procedure extracted from...
1839 (List_Record_Layout): ...here. Invoke it.
1840
1841 2018-05-29 Eric Botcazou <ebotcazou@adacore.com>
1842
1843 * repinfo.adb (Write_Unknown_Val): New procedure.
1844 (List_GCC_Expression): Call it.
1845 (List_Record_Layout): Likewise.
1846 (Write_Val): Likewise.
1847
1848 2018-05-29 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1849
1850 * exp_ch4.adb (Expand_N_Op_Abs): Clear Do_Overflow_Check when inserting
1851 code to do check.
1852
1853 2018-05-29 Arnaud Charlet <charlet@adacore.com>
1854
1855 * lib-writ.adb (Write_ALI): Do not use new function from s-casuti yet.
1856 This breaks build of cross compilers with older versions of GNAT, so
1857 better avoid it.
1858
1859 2018-05-29 Doug Rupp <rupp@adacore.com>
1860
1861 * libgnarl/s-taprop.ads (Monotonic_Clock): Refine documentation to
1862 reflect reality.
1863
1864 2018-05-29 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1865
1866 * exp_ch4.adb (Expand_N_Op_Abs): Always do range check against 'First.
1867
1868 2018-05-29 Eric Botcazou <ebotcazou@adacore.com>
1869
1870 * repinfo.adb (List_Entities): Do not list the Linker_Section for
1871 subprograms here...
1872 (List_Mechanisms): ...but here instead. Use consistent name output
1873 and formatting conventions.
1874
1875 2018-05-29 Bob Duff <duff@adacore.com>
1876
1877 * lib-writ.adb (Write_ALI): Cleanup: avoid use of global var; call new
1878 To_Lower function.
1879 * libgnat/s-casuti.ads, libgnat/s-casuti.adb (To_Upper, To_Lower,
1880 To_Mixed): New functions.
1881 * osint.adb: Cleanup: use Is_Directory_Separator, which correctly
1882 allows both '\' and '/' on Windows.
1883
1884 2018-05-28 Eric Botcazou <ebotcazou@adacore.com>
1885
1886 * repinfo.ads: Minor fixes and tweaks in comments.
1887
1888 2018-05-28 Eric Botcazou <ebotcazou@adacore.com>
1889
1890 * repinfo.adb (List_GCC_Expression): Remove Valop and replace calls to
1891 it with calls to Unop.
1892
1893 2018-05-28 Eric Botcazou <ebotcazou@adacore.com>
1894
1895 * repinfo.ads (TCode): Adjust range.
1896 (Truth_Andif_Expr): Remove.
1897 (Truth_Orif_Expr): Likewise.
1898 (Truth_And_Expr .. Dynamic_Val): Adjust value.
1899 * repinfo.adb (Print_Expr): Remove handling of Truth_{And,Or}if_Expr.
1900 (Rep_Value): Likewise.
1901 * repinfo.h (Truth_Andif_Expr): Remove.
1902 (Truth_Orif_Expr): Likewise.
1903 (Truth_And_Expr .. Dynamic_Val): Adjust value.
1904 * gcc-interface/decl.c (annotate_value) <TRUTH_ANDIF_EXPR>: Fall
1905 through to TRUTH_AND_EXPR case.
1906 <TRUTH_ORIF_EXPR>: Fall through to TRUTH_OR_EXPR case.
1907
1908 2018-05-28 Ed Schonberg <schonberg@adacore.com>
1909
1910 * exp_unst.adb (Visit_Node): For indexed components and attribute
1911 references, examine index expressions or associated expressions as well
1912 to record uplevel references.
1913 (Vist_Node): For function and procedure calls, if a formal is an
1914 unconstrained array and the actual is constrained, check whether bounds
1915 of actual have uplevel references.
1916
1917 2018-05-28 Ed Schonberg <schonberg@adacore.com>
1918
1919 * einfo.ads, einfo.adb: Exceptions can be uplevel references, and thus
1920 they can appear as components of activation records.
1921 * exp_unst.adb (Visit_Node): A reference to an exception may be an
1922 uplevel reference.
1923
1924 2018-05-28 Eric Botcazou <ebotcazou@adacore.com>
1925
1926 * exp_ch4.adb (Expand_Composite_Equality): Compute whether the size
1927 depends on a discriminant manually instead of using the predicate
1928 Size_Depends_On_Discriminant in the array type case.
1929
1930 2018-05-28 Ed Schonberg <schonberg@adacore.com>
1931
1932 * exp_unst.adb (Check_Static_Type): For a record subtype, check
1933 discriminant constraints as well.
1934 (Visit_Node): For a selected component, check type of prefix, as is
1935 done for indexed components and slices.
1936
1937 2018-05-28 Javier Miranda <miranda@adacore.com>
1938
1939 * exp_ch4.adb (Real_Range_Check): Add a temporary to store the integer
1940 value when converting a float value to a fixed-point value. This is
1941 required for CCG because it handles fixed-point types by means of
1942 unsigned integer type variables. The range check is now performed using
1943 the integer value stored in this temporary.
1944
1945 2018-05-28 Yannick Moy <moy@adacore.com>
1946
1947 * sem_util.adb (Is_OK_Volatile_Context): Add attributes First, Last and
1948 Length as valid non-interfering contexts for SPARK.
1949
1950 2018-05-28 Claire Dross <dross@adacore.com>
1951
1952 * sem_disp.ads, sem_disp.adb (Inheritance_Utilities): Package for
1953 generic inheritance utilities.
1954 (Generic_Inherited_Subprograms): Generic version of
1955 Inherited_Subprograms, generic in Find_Dispatching_Type function.
1956 (Generic_Is_Overriding_Subprogram): Generic version of
1957 Is_Overriding_Subprogram, generic in Find_Dispatching_Type function.
1958 (Inherited_Subprograms): Instance of Generic_Inherited_Subprograms with
1959 Sem_Disp.Find_Dispatching_Type.
1960 (Is_Overriding_Subprogram): Instance of
1961 Generic_Is_Overriding_Subprogram with Sem_Disp.Find_Dispatching_Type.
1962 (Inheritance_Utilities_Inst): Instance of Inheritance_Utilities
1963 with Sem_Disp.Find_Dispatching_Type.
1964
1965 2018-05-28 Eric Botcazou <ebotcazou@adacore.com>
1966
1967 * exp_ch4.adb (Expand_Composite_Equality): For a composite (or FP)
1968 component type, do not expand array equality using the unconstrained
1969 base type, except for the case where the bounds of the type depend on a
1970 discriminant.
1971
1972 2018-05-28 Ed Schonberg <schonberg@adacore.com>
1973
1974 * einfo.ads, einfo.adb (Needs_Activation_Record): New flag on
1975 access-to-subprogram types, to indicate that an indirect call through
1976 such a type requires an activation record when compiling for LLVM.
1977 * sem_ch3.adb (Access_Subprogram_Declaration): Set new flag as needed.
1978
1979 2018-05-28 Ed Schonberg <schonberg@adacore.com>
1980
1981 * exp_ch4.adb (Real_Range_Check): Specialize float-to-fixed conversions
1982 when bounds of fixed type are static, to remove some spuerfluous
1983 implicit conversions and provide an accurate result when converting
1984 back and forth between the fixed point type and a floating point type.
1985
1986 2018-05-28 Ed Schonberg <schonberg@adacore.com>
1987
1988 * exp_unst.adb (Unnest_Subprogram): Prevent creation of empty
1989 activation records.
1990
1991 2018-05-28 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1992
1993 * exp_unst.adb (Check_Static_Type): Add argument to indicate node to be
1994 replaced, if any; all callers changed.
1995 (Note_Uplevel_Ref): Likewise. Also replace reference to deferred
1996 constant with private view so we take the address of that entity.
1997 (Note_Uplevel_Bound): Add argument to indicate node to be replaced, if
1998 any; all callers changed. Handle N_Indexed_Component like
1999 N_Attribute_Reference. Add N_Type_Conversion case.
2000 (Visit_Node): Indexed references can be uplevel if the type isn't
2001 static.
2002 (Unnest_Subprograms): Don't rewrite if no reference given. If call has
2003 been relocated, set first_named pointer in original node as well.
2004
2005 2018-05-28 Ed Schonberg <schonberg@adacore.com>
2006
2007 * exp_aggr.adb (Flatten): Copy tree of expression in a component
2008 association with a range or a set of discrete choices, rather than
2009 relocating the node. This avoids inconsistencies in the tree when
2010 handling nested subprograms with uplevel references for LLVM.
2011
2012 2018-05-28 Arnaud Charlet <charlet@adacore.com>
2013
2014 * exp_util.adb (Possible_Bit_Aligned_Component): Always return False in
2015 codepeer mode.
2016
2017 2018-05-28 Arnaud Charlet <charlet@adacore.com>
2018
2019 * exp_unst.adb: Fix typo.
2020
2021 2018-05-28 Bob Duff <duff@adacore.com>
2022
2023 * libgnat/a-convec.adb (Query_Element): Minor cleanup: remove an
2024 unnecessary use of 'Unrestricted_Access.
2025
2026 2018-05-28 Hristian Kirtchev <kirtchev@adacore.com>
2027
2028 * repinfo.adb (Expr_Value_S): New routine.
2029 (List_Linker_Section): Properly extract the value of the section
2030 argument.
2031
2032 2018-05-28 Patrick Bernardi <bernardi@adacore.com>
2033
2034 * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Update the
2035 description of the -D binder switch to reflect current usage.
2036 * gnat_ugn.texi: Regenerate.
2037
2038 2018-05-28 Gary Dismukes <dismukes@adacore.com>
2039
2040 * exp_ch3.adb: Minor reformatting
2041
2042 2018-05-28 Justin Squirek <squirek@adacore.com>
2043
2044 * exp_ch3.adb
2045 (Build_Initialization_Call): Add logic to pass the appropriate actual to match
2046 new formal.
2047 (Init_Formals): Add new formal *_skip_null_excluding_check
2048 * exp_util.adb, exp_util.ads
2049 (Enclosing_Init_Proc): Added to fetch the enclosing Init_Proc from the current
2050 scope.
2051 (Inside_Init_Proc): Refactored to use Enclosing_Init_Proc
2052 (Needs_Conditional_Null_Excluding_Check): Added to factorize the predicate
2053 used to determine how to generate an Init_Proc for a given type.
2054 (Needs_Constant_Address): Minor reformatting
2055 * sem_res.adb
2056 (Resolve_Null): Add logic to generate a conditional check in certain cases
2057
2058 2018-05-28 Hristian Kirtchev <kirtchev@adacore.com>
2059
2060 * exp_aggr.adb, gnatlink.adb, sem_ch6.adb, sem_res.adb, sem_util.adb:
2061 Minor reformatting.
2062
2063 2018-05-28 Hristian Kirtchev <kirtchev@adacore.com>
2064
2065 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile): Include
2066 the declarations of single concurrent types because they fall in the
2067 category of full type and object declarations.
2068
2069 2018-05-28 Eric Botcazou <ebotcazou@adacore.com>
2070
2071 * repinfo.adb (Compute_Max_Length): Skip _Parent component.
2072 (List_Record_Layout): Likewise.
2073
2074 2018-05-28 Ed Schonberg <schonberg@adacore.com>
2075
2076 * sem_util.adb (Is_Function_Result): Add a warning if a postcondition
2077 includes a call to function to which it applies. This may mean an
2078 omission of an attribute reference 'Result, in particular if the
2079 function is pqrameterless.
2080
2081 2018-05-28 Justin Squirek <squirek@adacore.com>
2082
2083 * sem_ch8.adb (Find_Expanded_Name): Add extra guard to make sure the
2084 misresolved package name is not a case of mistaken identity.
2085
2086 2018-05-28 Yannick Moy <moy@adacore.com>
2087
2088 * sem_res.adb (Resolve_Range): Re-resolve the low bound of a range in
2089 GNATprove mode, as the order of resolution (low then high) means that
2090 all the information is not available when resolving the low bound the
2091 first time.
2092
2093 2018-05-28 Eric Botcazou <ebotcazou@adacore.com>
2094
2095 * repinfo.adb (List_Array_Info): Start with an explicit blank line and
2096 end with the linker section, if any.
2097 (List_Entities): Do not output the linker section for record types,
2098 array types and variables.
2099 (Print_Expr): Factor out common processing for unary operators and
2100 special values. Adjust and reorder the various cases.
2101 (List_Object_Info): End with the linker section, if any.
2102 (List_Record_Info): Likewise.
2103 (List_Type_Info): Do not start with a blank line.
2104
2105 2018-05-25 Nicolas Roche <roche@adacore.com>
2106
2107 * libgnat/s-valrea.adb (Scan_Real): Abort computation once it is sure
2108 that the result will be either -infinite or +infinite.
2109
2110 2018-05-25 Patrick Bernardi <bernardi@adacore.com>
2111
2112 * libgnat/s-parame.ads, libgnat/s-parame__vxworks.ads,
2113 libgnat/s-parame__ae653.ads, libgnat/s-parame__hpux.ads (Size_Type):
2114 Expand range of type to match the address space of the target.
2115 (Task_Storage_Size): Remove unused type.
2116
2117 2018-05-25 Ed Schonberg <schonberg@adacore.com>
2118
2119 * sem_res.adb (Set_Mixed_Mode_Operand): If the operand is an expression
2120 of a fixed point type and the parent is a multiplying operation,
2121 resolve the operand with its own type because the context will impose a
2122 resulting type on the result of the multiplication by means of
2123 approriate conversion.
2124
2125 2018-05-25 Hristian Kirtchev <kirtchev@adacore.com>
2126
2127 * exp_ch3.adb (Default_Initialize_Object): Ensure that the analysis of
2128 the in-place initialization aggregate created for pragmas
2129 Initialize_Scalars or Normalize_Scalars is performed with checks
2130 suppressed.
2131
2132 2018-05-25 Arnaud Charlet <charlet@adacore.com>
2133
2134 * exp_aggr.adb (Convert_To_Positional): Bump default for
2135 Max_Others_Replicate to 32. Update comments.
2136 * osint.ads (Unknown_Attributes): No longer pretend this is a constant.
2137 (No_File_Info_Cache): Initialize separately.
2138 * osint.adb (No_File_Info_Cache): Update initializer.
2139
2140 2018-05-25 Javier Miranda <miranda@adacore.com>
2141
2142 * sem_res.adb (Resolve_Membership_Op): Allow the use of the membership
2143 test when the left operand is a class-wide interface and the right
2144 operand is not a class-wide type.
2145 * exp_ch4.adb (Tagged_Membership): Adding support for interface as the
2146 left operand.
2147
2148 2018-05-25 Ed Schonberg <schonberg@adacore.com>
2149
2150 * exp_aggr.adb (Flatten): A quantified expression cannot be duplicated
2151 in an others clause to prevent visibility issues with the generated
2152 loop variable.
2153 (Component_OK_For_Backend): Return false for a quantified expression.
2154 (Check_Static_Component): Ditto.
2155
2156 2018-05-25 Hristian Kirtchev <kirtchev@adacore.com>
2157
2158 * libgnat/s-secsta.adb (SS_Allocate): Reimplemented.
2159 (SS_Allocate_Dynamic): New routine. The allocation logic is now split
2160 into three distring cases rather than in one loop which attempts to
2161 handle all three cases. This rewrite eliminates an issue where the last
2162 frame of the stack cannot be freed, thus causing the memory range of a
2163 new frame to approach the overflow point of the memory index type.
2164 Since the overflow is logically treated as a
2165 too-much-memory-on-the-stack scenario, it causes a bogus Storage_Error.
2166 (SS_Allocate_Static): New routine. The routine factorizes the static
2167 secondary stack-related code from the former SS_Allocate.
2168
2169 2018-05-25 Sergey Rybin <rybin@adacore.com>
2170
2171 * doc/gnat_ugn/gnat_and_program_execution.rst: Add description of '-U'
2172 option for gnatelim.
2173
2174 2018-05-25 Ed Schonberg <schonberg@adacore.com>
2175
2176 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not create
2177 Class_Wide_Clone_Body when analyzing a subprogram_body_stub: the clone
2178 is created when the proper body of the stub is analyzed.
2179 * sem_util.adb (ZBuild_Class_Wide_Clone_Body): If the subprogram body
2180 is the proper body of a subunit, the cloned body must be inserted in
2181 the declarative list that contains the stub.
2182
2183 2018-05-25 Justin Squirek <squirek@adacore.com>
2184
2185 * exp_ch6.adb (Expand_Simple_Function_Return): Add guard in check to
2186 generate code for 6.5(8-10) so that we don't get an assertion error
2187 when dealing with an incomplete return type.
2188
2189 2018-05-25 Arnaud Charlet <charlet@adacore.com>
2190
2191 * pprint.adb (Expression_Name): Strip too long expressions to avoid
2192 carrying very large strings.
2193
2194 2018-05-25 Patrick Bernardi <bernardi@adacore.com>
2195
2196 * switch-b.adb (Scan_Binder_Switches): binder switch -Q accepts Natural
2197 numbers.
2198
2199 2018-05-25 Doug Rupp <rupp@adacore.com>
2200
2201 * tracebak.c (aarch64-linux): Implement.
2202
2203 2018-05-25 Justin Squirek <squirek@adacore.com>
2204
2205 * sem_ch8.adb: Minor reformatting.
2206
2207 2018-05-25 Piotr Trojanek <trojanek@adacore.com>
2208
2209 * sem_util.adb (Iterate_Call_Parameters): Fix code convention and
2210 assertions.
2211
2212 2018-05-25 Hristian Kirtchev <kirtchev@adacore.com>
2213
2214 * einfo.adb, einfo.ads, exp_ch3.adb, exp_ch8.adb, exp_unst.adb,
2215 pprint.adb, sem_ch12.adb, sem_ch3.adb, sem_prag.adb, sem_util.adb:
2216 Minor reformatting.
2217
2218 2018-05-25 Ed Schonberg <schonberg@adacore.com>
2219
2220 * sem_ch12.adb (Instance_Exists): New function, subsidiary of
2221 Validate_Derived_Type_Instance, to verify that all interfaces
2222 implemented by the formal type are also implemented by the actual. The
2223 verification is complicated when an interface of the formal is declared
2224 in a generic unit and the actual is declared in an instance of it.
2225 There is currently no mechanism to relate an interface declared within
2226 a generic to the corresponding interface in an instance, so we must
2227 traverse the list of interfaces of the actual, looking for a name
2228 match, and verifying that that interface is declared in an instance.
2229
2230 2018-05-25 Piotr Trojanek <trojanek@adacore.com>
2231
2232 * sem_util.adb (Iterate_Call_Parameters): Rewrite with extra
2233 assertions; replace function versions of Next_Formal/Next_Actual with
2234 their procedural versions (which are more concise).
2235
2236 2018-05-25 Doug Rupp <rupp@adacore.com>
2237
2238 * libgnarl/s-osinte__aix.ads, libgnarl/s-osinte__android.ads,
2239 libgnarl/s-osinte__darwin.ads, libgnarl/s-osinte__freebsd.ads,
2240 libgnarl/s-osinte__hpux.ads, libgnarl/s-osinte__kfreebsd-gnu.ads,
2241 libgnarl/s-osinte__linux.ads, libgnarl/s-osinte__lynxos178e.ads,
2242 libgnarl/s-osinte__qnx.ads, libgnarl/s-osinte__rtems.ads
2243 (Relative_Timed_Wait): Remove.
2244 * libgnarl/s-tpopmo.adb (Timed_Sleep, Timed_Delay): Rewrite to allow
2245 for incremental looping. Remove references to Rel_Time and
2246 Relative_Timed_Wait.
2247 * libgnat/s-osprim__posix.adb, libgnat/s-osprim__posix2008.adb
2248 (Timed_Delay): Make separate.
2249 * libgnat/s-optide.adb: New separate procedure.
2250 * libgnat/s-osprim.ads (Max_System_Delay): New constant.
2251 * libgnat/s-osprim__lynxos.ads (Max_Sensible_Delay): Set to 6 months.
2252 (Max_System_Delay): New constant.
2253
2254 2018-05-25 Ed Schonberg <schonberg@adacore.com>
2255
2256 * sem_ch12.adb (Validate_Derived_Type_Instance): Verify that the actual
2257 for a formal derived type implements all the interfaces declared for
2258 the formal.
2259
2260 2018-05-25 Yannick Moy <moy@adacore.com>
2261
2262 * sem_prag.adb (Check_Applicable_Policy): Deal specially with CodePeer
2263 and GNATprove modes when applicable policy is Ignore.
2264
2265 2018-05-25 Eric Botcazou <ebotcazou@adacore.com>
2266
2267 * freeze.adb (Freeze_Enumeration_Type): Do not give integer size to a
2268 boolean type with convention C.
2269 * libgnat/i-cexten.ads (bool): Change to boolean with convention C.
2270 * gcc-interface/decl.c (gnat_to_gnu_entity): Add new local variable
2271 FOREIGN and use it throughout the function.
2272 <E_Enumeration_Type>: Set precision 1 on boolean types with foreign
2273 convention.
2274 <E_Enumeration_Subtype>: Likewise for subtypes.
2275 <E_Record_Type>: Force the size of a storage unit on empty classes.
2276 * gcc-interface/utils.c (make_type_from_size) <BOOLEAN_TYPE>: Skip
2277 boolean types with precision 1 if the size is the expected one.
2278
2279 2018-05-25 Arnaud Charlet <charlet@adacore.com>
2280
2281 * pprint.adb (Expression_Name): Do not print non ASCII characters.
2282
2283 2018-05-25 Bob Duff <duff@adacore.com>
2284
2285 * libgnat/a-strunb__shared.ads, libgnat/a-stwiun__shared.ads,
2286 libgnat/a-stzunb__shared.ads: (Initialize, Adjust): Add pragma Inline.
2287
2288 2018-05-25 Bob Duff <duff@adacore.com>
2289
2290 * sem_util.ads: Minor comment fix.
2291
2292 2018-05-25 Ed Schonberg <schonberg@adacore.com>
2293
2294 * exp_unst.adb (Visit_Node): Restrict check for uplevel references in
2295 prefixes of array attributes, to prefixes that are entity names whose
2296 type is constrained.
2297 (Note_Uplevel_Bound): Verify that the bound is declared in an enclosing
2298 subprogram, as itype created for loops in pre/postcondition may appear
2299 in loops at the library level.
2300
2301 2018-05-25 Ed Schonberg <schonberg@adacore.com>
2302
2303 * sem_ch13.adb (Build_Predicate_Functions): The predicate function
2304 declaration is inserted into the tree and analyzed at that point, so
2305 should not be reinserted when the body is constructed. Inside a
2306 generic, ensure that the body is not inserted twice in the tree.
2307
2308 2018-05-25 Yannick Moy <moy@adacore.com>
2309
2310 * sem_prag.adb (Check_Grouping): Modify test to ignore statements and
2311 declarations not coming from source.
2312
2313 2018-05-25 Fedor Rybin <frybin@adacore.com>
2314
2315 * doc/gnat_ugn/gnat_utility_programs.rst: Document new switch
2316 --copy-environment for gnattest.
2317
2318 2018-05-24 Piotr Trojanek <trojanek@adacore.com>
2319
2320 * sem_elab.adb (Non_Private_View): Simplify by removing a local Result
2321 variable.
2322 * sem_prag.adb (Get_Base_Subprogram): Same as above.
2323
2324 2018-05-24 Eric Botcazou <ebotcazou@adacore.com>
2325
2326 * fe.h (Set_Normalized_First_Bit): Declare.
2327 (Set_Normalized_Position): Likewise.
2328 * repinfo.adb (List_Record_Layout): Do not use irregular output for a
2329 variable position. Fix minor spacing issue.
2330 * gcc-interface/decl.c (annotate_rep): If a field has a variable
2331 offset, compute the normalized position and annotate it in addition to
2332 the bit offset.
2333
2334 2018-05-24 Eric Botcazou <ebotcazou@adacore.com>
2335
2336 * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu):
2337 Constify and rename variables. Fix formatting.
2338 (gnat_to_gnu) <N_Exception_Handler>: Minor tweak.
2339 <N_Raise_Statement>: Likewise.
2340
2341 2018-05-24 Javier Miranda <miranda@adacore.com>
2342
2343 * exp_ch8.adb (Build_Body_For_Renaming): Adding support to build the
2344 body of a variant record equality renaming.
2345 (Expand_N_Subprogram_Renaming_Declaration): Adapt the code to the new
2346 implementation of Build_Body_For_Renaming.
2347 * exp_ch3.ads (Build_Variant_Record_Equality): New library level
2348 function that factorizes the functionality needed by
2349 Build_Body_For_Renaming and Expand_Freeze_Record_Type to build the body
2350 of a variant record equality subprogram.
2351 * exp_ch3.adb (Build_Variant_Record_Equality): New subprogram.
2352 (Build_Variant_Record_Equality): New local procedure of
2353 Expand_Freeze_Record_Type containing all the code specific for freezing
2354 the record type that cannot be place in the new library level function.
2355
2356 2018-05-24 Ed Schonberg <schonberg@adacore.com>
2357
2358 * einfo.ads, einfo.adb (Is_Activation_Record): New flag on
2359 in_parameters, used when unesting subprograms for LLVM, to indicate
2360 that a generated parameter carries the activation record from the
2361 enclosing subprogram.
2362 * exp_unst.adb (Check_Static_Type): Handle array attributes of types
2363 whose bounds may contain up-level references that need to be added to
2364 an activation recoord.
2365 (Add_Extra_Formal): Set Is_Activation_Record on new formal.
2366
2367 2018-05-24 Yannick Moy <moy@adacore.com>
2368
2369 * pprint.adb (Expression_Image): Improve the printing of expressions,
2370 by taking more cases into account, in particular qualified expressions
2371 and aggregates. Also count more the number of parentheses to close
2372 after the expression.
2373
2374 2018-05-24 Javier Miranda <miranda@adacore.com>
2375
2376 * sem_ch3.adb (Is_Visible_Component): For untagged types add missing
2377 check for renamed discriminants.
2378 * sem_ch4.adb (Analyze_Overloaded_Selected_Component,
2379 Analyze_Selected_Component, Check_Misspelled_Selector): For calls to
2380 Is_Visible_Component pass the associated selector node to allow
2381 checking renamed discriminants on untagged types.
2382
2383 2018-05-24 Ed Schonberg <schonberg@adacore.com>
2384
2385 * sem_ch8.adb (Analyze_Use_Type): Do not assign the Prev_Use_Clause
2386 link to a use_type clause if this would cause an infinite loop in the
2387 machinery that detects redundant use clauses. This may happen when the
2388 redundant clauses appear in the context of a child unit and the context
2389 of its parent.
2390
2391 2018-05-24 Piotr Trojanek <trojanek@adacore.com>
2392
2393 * sinfo.ads: Fix grammar in comment.
2394
2395 2018-05-24 Justin Squirek <squirek@adacore.com>
2396
2397 * einfo.ads, einfo.adb (Append_Entity): Modified to use Link_Entities
2398 and manage doubly-linked entity chain.
2399 (Nested_Scenarios): Removed entity field used for optimization during
2400 elaboration to make room for the new field Prev_Entity.
2401 (Link_Entities): Added to replace redundant calls to Set_Next_Entity
2402 and Set_Prev_Entity as well as centralize changes to the entity chain.
2403 (Predicated_Parent): Modified to use Node38.
2404 (Prev_Entity): Added to fetch new node field Prev_Entity in all entity
2405 types.
2406 (Remove_Entity): Moved from sem_util.
2407 (Set_Nested_Scenarios): Deleted.
2408 (Set_Predicated_Parent): Modified to use Node38.
2409 (Set_Prev_Entity): Added to set Prev_Entity field.
2410 (Set_Validated_Object): Modified to use Node38.
2411 (Unlink_Next_Entity): Added to process Prev_Entity when an unlinking
2412 action is required.
2413 (Validated_Object): Modified to use Node38.
2414 (Write_Field36_Name): Remove Nested_Scenarios, Validated_Object, and
2415 predicated parent cases.
2416 (Write_Field38_Name): Add predicated parent and Validated_Object cases.
2417 * sem_ch3.adb (Process_Subtype): Add guard to protect against
2418 inappropriate marking of Predicated_Parent to non-itype subtypes.
2419 (Make_Class_Wide_Type): Preserve Prev_Entity field and set in new type.
2420 (Copy_And_Swap): Add setting of Prev_Entity.
2421 (Build_derived_Record_Type): Replace Set_Next_Entity w/ Link_Entities.
2422 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Replace Set_Next_Entity
2423 w/ Link_Entities.
2424 (New_Overloaded_Entity): Remove block created to search for previous
2425 entities in the entity chain with relevant calls to Prev_Entity as well
2426 as replace duplicated code from Remove_Entity_And_Homonym with a call
2427 to that subprogram.
2428 * sem_ch7.adb (Exchange_Declarations): Replace Set_Next_Entity w/
2429 Link_Entities.
2430 * sem_elab.adb (Find_And_Process_Nested_Scenarios): Remove global and
2431 initial subprogram declarations related to Nested_Scenarios.
2432 (Process_Nested_Scenarios): Deleted.
2433 (Save_Scenario): Deleted.
2434 (Traverse_Body): Remove optimization for Nested_Scenarios so as to free
2435 node space in the entity tree.
2436 * sem_util.adb, sem_util.ads (Remove_Entity): Moved to einfo.
2437 (Remove_Entity_And_Homonym): Added to separate functionality of
2438 Remove_Entity from the homonym chain directly.
2439 * exp_attr.adb (Expand_N_Attribute_Reference): Replace Set_Next_Entity
2440 w/ Link_Entities and Unlink_Next_Entity.
2441 * exp_ch3.adb (Expand_N_Object_Declaration): Replace Set_Next_Entity w/
2442 Link_Entities.
2443 * exp_ch6.adb (Replace_Renaming_Declaration_Id): Replace
2444 Set_Next_Entity w/ Link_Entities.
2445 * exp_disp.adb (Expand_Dispatching_Call): Replace Set_Next_Entity w/
2446 Link_Entities and Unlink_Next_Entity.
2447 * exp_spark.adb (Expand_SPARK_N_Object_Renaming_Declaration): Replace
2448 call to Remove_Entity with its new incarnation.
2449 * exp_util.adb (New_Class_Wide_Subtype): Add setting of Prev_Entity.
2450 * freeze.adb (Freeze_Record_Type): Replace Set_Next_Entity w/
2451 Link_Entities.
2452
2453 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
2454
2455 * sem_ch10.adb (Expand_Limited_With_Clause): Update the call to
2456 Install_Limited_Withed_Unit.
2457 (Expand_With_Clause): Update the call to Install_Withed_Unit.
2458 (Implicit_With_On_Parent): Update the call to Install_Withed_Unit.
2459 (Install_Context_Clauses): Update the call to Install_Withed_Unit.
2460 (Install_Limited_Context_Clauses): Update the calls to
2461 Install_Limited_Withed_Unit.
2462 (Install_Limited_Withed_Unit): Renamed to better illustrate its
2463 purpose.
2464 (Install_Private_With_Clauses): Update the calls to Install_Withed_Unit
2465 and Install_Limited_Withed_Unit.
2466 (Install_With_Clause): Uninstall a limited with clause if a [private]
2467 with clause is given for the same package.
2468 (Install_Withed_Unit): Renamed to better illustrate its purpose.
2469 (Remove_Limited_With_Unit): New routine.
2470
2471 2018-05-24 Eric Botcazou <ebotcazou@adacore.com>
2472
2473 * raise-gcc.c (__gnat_SEH_error_handler): Remove prototype.
2474 (__gnat_personality_seh0): Adjust and beef up comments, and
2475 fix formatting throughout.
2476 (__gnat_adjust_context): Deal minimally with version 2.
2477 * seh_init.c (__gnat_map_SEH): Fix formatting.
2478 (_gnat_SEH_error_handler): Adjust comments.
2479 (__gnat_install_SEH_handler): Fix formatting.
2480
2481 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
2482
2483 * exp_ch7.adb, sem_ch3.adb, sem_res.adb: Minor reformatting.
2484
2485 2018-05-24 Ed Schonberg <schonberg@adacore.com>
2486
2487 * exp_aggr.adb (Flatten): Add a warning on an others clause in an array
2488 aggregate with static bounds when named associations cover all index
2489 positions and the others clause is redundant.
2490
2491 2018-05-24 Raphael Amiard <amiard@adacore.com>
2492
2493 * libgnat/a-cohama.ads: Add documentation.
2494
2495 2018-05-24 Raphael Amiard <amiard@adacore.com>
2496
2497 * libgnat/a-convec.ads: Add documentation.
2498
2499 2018-05-24 Justin Squirek <squirek@adacore.com>
2500
2501 * exp_ch3.adb (Expand_N_Object_Declaration): Ignore raising an error in
2502 expansion for limited tagged types when the node to be expanded is a
2503 raise expression due to it not representing a valid object.
2504 * exp_ch5.adb (Expand_N_Assignment_Statement): Add exception to error
2505 message regarding assignments to limited types to ignore genereated
2506 code.
2507
2508 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
2509
2510 * exp_util.adb (New_Class_Wide_Subtype): Capture and restore relevant
2511 Ghost-related attributes of the class-wide subtype because the copy
2512 clobbers them.
2513
2514 2018-05-24 Justin Squirek <squirek@adacore.com>
2515
2516 * sem_res.adb (Resolve_Entity_Name): Add guard to protect against
2517 marking use clauses as effective when the reference appears within
2518 generated code.
2519
2520 2018-05-24 Cyrille Comar <comar@adacore.com>
2521
2522 * doc/gnat_rm/the_gnat_library.rst: Fix typos.
2523 * gnat_rm.texi: Regenerate.
2524
2525 2018-05-24 Bob Duff <duff@adacore.com>
2526
2527 * exp_ch7.adb (Expand_Cleanup_Actions): Create a mark unconditionally
2528 for build-in-place functions with a caller-unknown-size result.
2529 (Create_Finalizer): For build-in-place functions with a
2530 caller-unknown-size result, check at run time whether we need to
2531 release the secondary stack.
2532
2533 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
2534
2535 * sem_prag.adb (Analyze_Pragma): Use the full view of an internally
2536 generated incomplete type.
2537
2538 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
2539
2540 * expander.adb (Expand): Update the save and restore of the Ghost
2541 region.
2542 * exp_ch3.adb (Freeze_Type): Likewise.
2543 * exp_disp.adb (Make_DT): Likewise.
2544 * exp_util.adb (Build_DIC_Procedure_Body): Likewise.
2545 (Build_DIC_Procedure_Declaration): Likewise.
2546 (Build_Invariant_Procedure_Body): Likewise.
2547 (Build_Invariant_Procedure_Declaration): Likewise.
2548 (Make_Predicate_Call): Likewise.
2549 * freeze.adb (Add_To_Result): Insert the freeze action of a living
2550 entity prior to the start of the enclosing ignored Ghost region.
2551 (Freeze_Entity): Update the save and restore of the Ghost region.
2552 * ghost.adb (Install_Ghost_Mode): Reimplemented.
2553 (Install_Ghost_Region): New routine.
2554 (Mark_And_Set_Ghost_Assignment): Install a region rather than a mode.
2555 (Mark_And_Set_Ghost_Body): Likewise.
2556 (Mark_And_Set_Ghost_Completion): Likewise.
2557 (Mark_And_Set_Ghost_Declaration): Likewise.
2558 (Mark_And_Set_Ghost_Instantiation): Likewise.
2559 (Mark_And_Set_Ghost_Procedure_Call): Likewise.
2560 (Name_To_Ghost_Mode): New routine.
2561 (Restore_Ghost_Region): New routine.
2562 * ghost.ads (Install_Ghost_Region): New routine.
2563 (Restore_Ghost_Region): New routine.
2564 * opt.ads: Add new global variable Ignored_Ghost_Region.
2565 * rtsfind.adb (Load_RTU): Update the save and restore of the Ghost
2566 region. Install a clean region.
2567 * sem.adb (Analyze): Likewise.
2568 (Do_Analyze): Likewise.
2569 * sem_ch3.adb (Analyze_Object_Declaration): Likewise
2570 (Derive_Progenitor_Subprograms): Use local variable Iface_Alias to
2571 capture the ultimate alias of the current primitive.
2572 (Process_Full_View): Update the save and restore of the Ghost region.
2573 Do not inherit DIC and invariant procedures.
2574 * sem_ch5.adb (Analyze_Assignment): Update the save and restore of the
2575 Ghost region.
2576 * sem_ch6.adb (Analyze_Procedure_Call): Likewise.
2577 (Analyze_Subprogram_Body_Helper): Likewise.
2578 * sem_ch7.adb (Analyze_Package_Body_Helper): Likewise.
2579 * sem_ch12.adb (Analyze_Package_Instantiation): Likewise.
2580 (Analyze_Subprogram_Instantiation): Likewise.
2581 (Instantiate_Package_Body): Likewise.
2582 (Instantiate_Subprogram_Body): Likewise.
2583 * sem_ch13.adb (Build_Predicate_Functions): Likewise.
2584 (Build_Predicate_Function_Declaration): Likewise.
2585 * sem_disp.adb
2586 (Add_Dispatching_Operation): Do not consider DIC and invariant
2587 procedures.
2588 (Check_Dispatching_Operation): Use Add_Dispatching_Operation to collect
2589 a dispatching subprogram.
2590 (Check_Operation_From_Private_View): Likewise.
2591 (Override_Dispatching_Operation): Likewise.
2592 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Update the save
2593 and restore of the Ghost region.
2594 (Analyze_Initial_Condition_In_Decl_Part): Likewise.
2595 (Analyze_Pragma): Update the save and restore of the Ghost region.
2596 (Analyze_Pre_Post_Condition_In_Decl_Part): Likewise.
2597 * sem_util.adb (Is_Suitable_Primitive): New routine.
2598 * sem_util.ads (Is_Suitable_Primitive): New routine.
2599 * sinfo.ads: Update the section of Ghost regions.
2600
2601 2018-05-24 Piotr Trojanek <trojanek@adacore.com>
2602
2603 * doc/gnat_rm/implementation_defined_pragmas.rst (Contract_Cases):
2604 Change "condition" to "case guard" after renaming in the contract
2605 grammar.
2606 * gnat_rm.texi: Regenerate.
2607
2608 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
2609
2610 * exp_util.adb (Expand_Static_Predicates_In_Choices): Indicate that the
2611 construct with discrete choices no longer contains a subtype with
2612 predicates since the expansion already handled this case.
2613
2614 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
2615
2616 * freeze.adb (Wrap_Imported_Subprogram): Generate an unchecked
2617 conversion to the return type to avoid a side effect where an imported
2618 relocated function generates a new anonymous access type, whose
2619 accessibility level does not agree with with that of the wrapper.
2620
2621 2018-05-24 Javier Miranda <miranda@adacore.com>
2622
2623 * sem_util.adb (Abstract_Interface_List): Add missing support for
2624 private types whose full view is a synchronized type.
2625 * sem_ch3.adb (Build_Derived_Private_Type): Skip building the full
2626 derivation of a private type parent type is a task type with
2627 discriminants as gigi does not use such type directly.
2628
2629 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
2630
2631 * sem_elab.adb (Build_Variable_Reference_Marker): Do not create a
2632 variable marker when the reference appears in the formal part of a
2633 compilation unit instance because there is no place to insert it.
2634 (In_Compilation_Instance_Formal_Part): New routine.
2635
2636 2018-05-24 Piotr Trojanek <trojanek@adacore.com>
2637
2638 * layout.ads, repinfo.ads: Fix references to renamed Backend_Layout
2639 configuration parameter.
2640
2641 2018-05-24 Doug Rupp <rupp@adacore.com>
2642
2643 * argv-lynxos178-raven-cert.c: New file.
2644 * libgnat/system-lynxos178-x86.ads: New file.
2645
2646 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
2647
2648 * exp_disp.adb, freeze.adb, gnat1drv.adb, sem_ch5.adb, sem_spark.adb:
2649 Minor reformattings.
2650
2651 2018-05-23 Pascal Obry <obry@adacore.com>
2652
2653 * adaint.c (win32_wait): Properly free the handle/pid lists when
2654 WaitForMultipleObjects fails (return WAIT_FAILED).
2655
2656 2018-05-23 Pascal Obry <obry@adacore.com>
2657
2658 * adaint.c (win32_wait): Add missing parentheses.
2659
2660 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
2661
2662 * exp_ch3.adb (Check_Large_Modular_Array): Moved to Freeze.
2663 (Expand_N_Object_Declaration): Do not check for a large modular array
2664 here.
2665 * freeze.adb (Check_Large_Modular_Array): Moved from Exp_Ch3.
2666 (Freeze_Object_Declaration): Code cleanup. Check for a large modular
2667 array.
2668 * sem_ch3.adb: Minor reformatting.
2669
2670 2018-05-23 Ed Schonberg <schonberg@adacore.com>
2671
2672 * einfo.ads: New attribute on types: Predicated_Parent, to simplify the
2673 retrieval of the applicable predicate function to an itype created for
2674 a constrained array component.
2675 * einfo.adb: Subprograms for Predicated_Parent.
2676 (Predicate_Function): Use new attribute.
2677 * exp_util.adb (Make_Predicate_Call): If the predicate function is not
2678 available for a subtype, retrieve it from the base type, which may have
2679 been frozen after the subtype declaration and not captured by the
2680 subtype declaration.
2681 * sem_aggr.adb (Resolve_Array_Aggregate): An Others association is
2682 legal within a generated initiqlization procedure, as may happen with a
2683 predicate check on a component, when the predicate function applies to
2684 the base type of the component.
2685 * sem_ch3.adb (Analyze_Subtype_Declaration): Clean up inheritance of
2686 predicates for subtype declarations and for subtype indications in
2687 other contexts.
2688 (Process_Subtype): Likewise. Handle properly the case of a private type
2689 with unknown discriminants whose full view is an unconstrained array.
2690 Use Predicated_Parent to indicate source of predicate function on an
2691 itype whose parent is itself an itype.
2692 (Complete_Private_Subtype): If the private view has unknown
2693 discriminants and the full view is an unconstrained array, set base
2694 type of completion to the full view of parent.
2695 (Inherit_Predicate_Flags): Prevent double assignment of predicate
2696 function and flags.
2697 (Build_Subtype): For a constrained array component, propagate predicate
2698 information from original component type declaration.
2699
2700 2018-05-23 Boris Yakobowski <yakobowski@adacore.com>
2701
2702 * libgnat/a-ngelfu.ads (Arctanh, Arccoth): Fix faulty preconditions.
2703
2704 2018-05-23 Arnaud Charlet <charlet@adacore.com>
2705
2706 * checks.adb (Minimize_Eliminate_Overflows): Default initialize Lo and
2707 Hi.
2708 * sem_elab.adb: Make "out" parameters instead of "in out" when
2709 relevant.
2710
2711 2018-05-23 Bob Duff <duff@adacore.com>
2712
2713 * gnatbind.adb (List_Applicable_Restrictions): Add
2714 No_Implementation_Restrictions to the list of restrictions not to list.
2715 Remove double negative "not No_Restriction_List". Comment the
2716 commentary that is output, so it won't cause errors if used directly in
2717 a gnat.adc.
2718
2719 2018-05-23 Ed Schonberg <schonberg@adacore.com>
2720
2721 * sem_prag.adb (Inherit_Class_Wide_Pre): Refine legality check on
2722 class-wide precondition on a type extension when ancestor does not have
2723 a class-wide precondition. Previously the compiler accepted such a
2724 precondition when the ancestor had a class-wide postcondition.
2725
2726 2018-05-23 Javier Miranda <miranda@adacore.com>
2727
2728 * sem_attr.adb (Valid_Scalars): Do not invoke Error_Attr_P to report
2729 the warning on occurrences of this attribute whose evaluation is always
2730 true (since that subprogram aborts processing the attribute). In
2731 addition, replace the node by its boolean result 'True' (required
2732 because the backend has no knowledge of this attribute).
2733
2734 2018-05-23 Bob Duff <duff@adacore.com>
2735
2736 * libgnat/a-convec.adb: (Insert, Insert_Space): Suppress warnings. The
2737 code in question is not reachable in the case where Count_Type'Last is
2738 out of range.
2739
2740 2018-05-23 Yannick Moy <moy@adacore.com>
2741
2742 * doc/gnat_rm/implementation_defined_pragmas.rst: Clarify meaning of
2743 local pragma Warnings Off without On.
2744 * gnat_rm.texi: Regenerate.
2745
2746 2018-05-23 Olivier Hainque <hainque@adacore.com>
2747
2748 * libgnat/g-excact.ads (Is_Foreign_Exception): New predicate.
2749 * libgnat/g-excact.adb: Implement.
2750
2751 2018-05-23 Ed Schonberg <schonberg@adacore.com>
2752
2753 * sem_ch5.adb (Analyze_Iterator_Specification): If a subtype indication
2754 is present, verify its legality when the domain of iteration is a
2755 GNAT-specific formal container, as is already done for arrays and
2756 predefined containers.
2757
2758 2018-05-23 Yannick Moy <moy@adacore.com>
2759
2760 * sem_util.adb (Enclosing_Declaration): Fix the case of a named number
2761 declaration, which was not taken into account.
2762
2763 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
2764
2765 * debug.adb: Switch -gnatd_s is now used to stop elaboration checks on
2766 synchronized suspension.
2767 * rtsfind.ads: Add entries for units Ada.Synchronous_Barriers and
2768 Ada.Synchronous_Task_Control and routines Suspend_Until_True and
2769 Wait_For_Release.
2770 * sem_elab.adb: Document switch -gnatd_s.
2771 (In_Task_Body): New routine.
2772 (Is_Potential_Scenario): Code cleanup. Stop the traversal of a task
2773 body when the current construct denotes a synchronous suspension call,
2774 and restriction No_Entry_Calls_In_Elaboration_Code or switch -gnatd_s
2775 is in effect.
2776 (Is_Synchronous_Suspension_Call): New routine.
2777 * switch-c.adb (Scan_Front_End_Switches): Switch -gnatJ now sets switch
2778 -gnatd_s.
2779
2780 2018-05-23 Javier Miranda <miranda@adacore.com>
2781
2782 * exp_disp.adb (Make_DT): Restrict the initialization of
2783 External_Tag and Expanded_Name to an empty string to the case where
2784 both pragmas apply (i.e. No_Tagged_Streams and Discard_Names), since
2785 restricted runtimes are compiled with pragma Discard_Names.
2786 * doc/gnat_rm/implementation_defined_pragmas.rst,
2787 doc/gnat_rm/implementation_defined_characteristics.rst: Add
2788 documentation.
2789 * gnat_rm.texi: Regenerate.
2790
2791 2018-05-23 Maroua Maalej <maalej@adacore.com>
2792
2793 * sem_spark.adb: Fix of some permission rules of pointers in SPARK.
2794
2795 2018-05-23 Ed Schonberg <schonberg@adacore.com>
2796
2797 * sem_ch5.adb (Preanalyze_Range): The pre-analysis of the domain of
2798 iteration of an Ada2012 loop is performed to determine the type of the
2799 domain, but full analysis is performed once the loop is rewritten as a
2800 while-loop during expansion. The pre-analysis suppresses expansion; it
2801 must also suppress the generation of freeze nodes, which may otherwise
2802 appear in the wrong scope before rewritting.
2803
2804 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
2805
2806 * sem_elab.adb: Update the section on suppressing elaboration warnings.
2807
2808 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
2809
2810 * einfo.adb (Is_Elaboration_Checks_OK_Id): Use predicate
2811 Is_Elaboration_Target.
2812 (Is_Elaboration_Target): New routine.
2813 (Is_Elaboration_Warnings_OK_Id): Use predicate Is_Elaboration_Target.
2814 (Set_Is_Elaboration_Checks_OK_Id): Use predicate Is_Elaboration_Target.
2815 (Set_Is_Elaboration_Warnings_OK_Id): Use predicate
2816 Is_Elaboration_Target.
2817 * einfo.ads: Add new synthesized attribute Is_Elaboration_Target along
2818 with occurrences in nodes.
2819 (Is_Elaboration_Target): New routine.
2820 * sem_prag.adb (Analyze_Pragma): Suppress elaboration warnings when an
2821 elaboration target is subject to pragma Warnings (Off, ...).
2822
2823 2018-05-23 Eric Botcazou <ebotcazou@adacore.com>
2824
2825 * repinfo.adb (List_Type_Info): Remove obsolete stuff.
2826
2827 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
2828
2829 * einfo.adb: Flag304 is now Is_Elaboration_Warnings_OK_Id.
2830 (Is_Elaboration_Warnings_OK_Id): New routine.
2831 (Set_Is_Elaboration_Warnings_OK_Id): New routine.
2832 (Write_Entity_Flags): Output Flag304.
2833 * einfo.ads: Add new attribute Is_Elaboration_Warnings_OK_Id along with
2834 occurrences in entities.
2835 (Is_Elaboration_Warnings_OK_Id): New routine along with pragma Inline.
2836 (Set_Is_Elaboration_Warnings_OK_Id): New routine along with pragma
2837 Inline.
2838 * sem_attr.adb (Analyze_Access_Attribute): Capture the state of
2839 elaboration warnings.
2840 * sem_ch3.adb (Analyze_Object_Declaration): Capture the state of
2841 elaboration warnings.
2842 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Capture the
2843 state of elaboration warnings.
2844 (Analyze_Subprogram_Body_Helper): Capture the state of elaboration
2845 warnings.
2846 (Analyze_Subprogram_Declaration): Capture the state of elaboration
2847 warnings.
2848 * sem_ch9.adb (Analyze_Entry_Declaration): Capture the state of
2849 elaboration warnings.
2850 (Analyze_Single_Task_Declaration): Capture the state of elaboration
2851 warnings.
2852 (Analyze_Task_Type_Declaration): Capture the state of elaboration
2853 warnings.
2854 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Capture the state
2855 of elaboration warnings.
2856 (Analyze_Generic_Subprogram_Declaration): Capture the state of
2857 elaboration warnings.
2858 * sem_elab.adb: Add a section on suppressing elaboration warnings.
2859 Type Processing_Attributes includes component Suppress_Warnings
2860 intended to suppress any elaboration warnings along a path in the
2861 graph. Update Initial_State to include a value for this component.
2862 Types Target_Attributes and Task_Attriutes include component
2863 Elab_Warnings_OK to indicate whether the target or task has elaboration
2864 warnings enabled. component Elab_Warnings_OK.
2865 (Build_Access_Marker): Propagate attribute
2866 Is_Elaboration_Warnings_OK_Node from the attribute to the generated
2867 call marker.
2868 (Extract_Instantiation_Attributes): Set the value for Elab_Warnings_OK.
2869 (Extract_Target_Attributes): Set the value for Elab_Warnings_OK.
2870 (Extract_Task_Attributes): Set the value for Elab_Warnings_OK.
2871 (Process_Conditional_ABE_Access): Suppress futher elaboration warnings
2872 when already in this mode or when the attribute or target have warnings
2873 suppressed.
2874 (Process_Conditional_ABE_Activation_Impl): Do not emit any diagnostics
2875 if warnings are suppressed.
2876 (Process_Conditional_ABE_Call): Suppress further elaboration warnings
2877 when already in this mode, or the target or call have warnings
2878 suppressed.
2879 (Process_Conditional_ABE_Call_Ada): Do not emit any diagnostics if
2880 warnings are suppressed.
2881 (Process_Conditional_ABE_Call_SPARK): Do not emit any diagnostics if
2882 warnings are suppressed.
2883 (Process_Conditional_ABE_Instantiation): Suppress further elaboration
2884 warnings when already in this mode or when the instantiation has
2885 warnings suppressed.
2886 (Process_Conditional_ABE_Instantiation_Ada): Do not emit any
2887 diagnostics if warnings are suppressed.
2888 (Process_Conditional_ABE_Variable_Assignment_Ada): Use the more
2889 specific Is_Elaboration_Warnings_OK_Id rather than Warnings_Off.
2890 (Process_Conditional_ABE_Variable_Assignment_SPARK): Use the more
2891 specific Is_Elaboration_Warnings_OK_Id rather than Warnings_Off.
2892 (Process_Task_Object): Suppress further elaboration warnings when
2893 already in this mode, or when the object, activation call, or task type
2894 have warnings suppressed. Update the processing state to indicate that
2895 the path goes through a task body.
2896 * sinfo.adb (Is_Elaboration_Warnings_OK_Node): Accept attribute
2897 references.
2898 (Set_Is_Elaboration_Warnings_OK_Node): Accept attribute references.
2899 * sinfo.ads: Attribute Is_Elaboration_Warnings_OK_Node now applies to
2900 attribute references.
2901
2902 2018-05-23 Piotr Trojanek <trojanek@adacore.com>
2903
2904 * einfo.ads: Minor reformatting.
2905
2906 2018-05-23 Ed Schonberg <schonberg@adacore.com>
2907
2908 * sem_ch3.adb (Analyze_Object_Declaration): If expression is an
2909 anonymous_access_to_ subprogram formal, apply a conversion to force an
2910 accsssibility check that will fail statically, enforcing 3.10.2 (13).
2911
2912 2018-05-23 Daniel Mercier <mercier@adacore.com>
2913
2914 * gnat1drv.adb: Turn off length expansion in CodePeer mode.
2915
2916 2018-05-23 Bob Duff <duff@adacore.com>
2917
2918 * freeze.adb: (Check_Address_Clause): Deal with build-in-place
2919 aggregates in addition to build-in-place calls.
2920
2921 2018-05-23 Bob Duff <duff@adacore.com>
2922
2923 * einfo.ads: Minor reformatting.
2924 * sem_ch3.adb: Likewise.
2925 * sinfo.ads: Likewise.
2926
2927 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
2928
2929 * exp_ch3.adb (Default_Initialize_Object): Do not optimize scalar array
2930 initialization when the component type has predicates.
2931 * exp_ch4.adb (Expand_N_Allocator): Do not optimize scalar array
2932 allocation when the component type has predicates.
2933
2934 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
2935
2936 * einfo.adb, exp_disp.adb, sem_ch3.adb, sem_ch6.adb, sem_prag.adb:
2937 Minor reformatting.
2938
2939 2018-05-22 Justin Squirek <squirek@adacore.com>
2940
2941 * sem_ch6.adb (Analyze_Expression_Function): Propagate flags from the
2942 original function spec into the generated function spec due to
2943 expansion of expression functions during analysis.
2944 (Analyze_Subprogram_Body_Helper): Modify check on formal parameter
2945 references from the body to the subprogram spec in the case of
2946 expression functions because of inconsistances related to having a
2947 generated body.
2948 * libgnarl/s-osinte__android.ads: Flag parameters as unused.
2949 * libgnarl/s-osinte__lynxos178e.ads: Likewise.
2950 * libgnarl/s-osinte__qnx.adb: Likewise.
2951 * libgnarl/s-osinte__qnx.ads: Likewise.
2952
2953 2018-05-22 Doug Rupp <rupp@adacore.com>
2954
2955 * init.c (HAVE_ADJUST_CONTEXT_FOR_RAISE): Don't define on VxWorks7 for
2956 AArch64.
2957
2958 2018-05-22 Olivier Hainque <hainque@adacore.com>
2959
2960 * libgnat/a-except.adb (Exception_Propagation.Propagate_Exception):
2961 Expect an Exception_Occurence object, not an Access.
2962 (Complete_And_Propagate_Occurrence): Adjust accordingly.
2963 (Raise_From_Signal_Handler): Likewise.
2964 (Reraise_Occurrence_No_Defer): If we have a Machine_Occurrence
2965 available in the provided occurrence object, just re-propagate the
2966 latter as a bare "raise;" would do.
2967 * libgnat/a-exexpr.adb (Propagate_Exception): Adjust to spec change.
2968 * libgnat/a-exstat.adb (String_To_EO): Initialize X.Machine_Occurrence
2969 to null, to mark that the occurrence we're crafting from the stream
2970 contents is not being propagated (yet).
2971
2972 2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
2973
2974 * exp_aggr.adb (Initialize_Ctrl_Record_Component): Insert the generated
2975 code for a transient component in line with the rest of the
2976 initialization code, rather than before the aggregate. This ensures
2977 that the component has proper visibility of the discriminants.
2978
2979 2018-05-22 Jerome Lambourg <lambourg@adacore.com>
2980
2981 * adaint.c: Reorganize QNX-specific macros, use syspage to retreive the
2982 number of CPUs.
2983
2984 2018-05-22 Jerome Lambourg <lambourg@adacore.com>
2985
2986 * sigtramp-qnx.c: Properly restore link register in signal trampoline.
2987
2988 2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
2989
2990 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Strip away any
2991 conversions before extracting the value of the expression.
2992 * exp_ch3.adb (Default_Initialize_Object): Optimize the default
2993 initialization of an array of scalars.
2994 (Get_Simple_Init_Val): Add processing for array types. Remove the
2995 processing of strings because this case is already handled by the array
2996 case.
2997 (Needs_Simple_Initialization): Moved to Sem_Util.
2998 (Simple_Init_Array_Type): New routine.
2999 (Simple_Init_Initialize_Scalars_Type): Reimplemented to use the new
3000 facilities from Sem_Util.
3001 (Simple_Initialization_OK): New routine.
3002 * exp_ch3.ads (Needs_Simple_Initialization): Moved to Sem_Util.
3003 * exp_ch4.adb (Expand_N_Allocator): Optimize the default allocation of
3004 an array of scalars.
3005 * sem_prag.adb (Analyze_Float_Value): New routine.
3006 (Analyze_Integer_Value): New routine.
3007 (Analyze_Pragma): Reimplement the analysis of pragma Initialize_Scalars
3008 to handled the extended form of the pragma.
3009 (Analyze_Type_Value_Pair): New routine.
3010 * sem_util.adb: Add invalid value-related data structures.
3011 (Examine_Array_Bounds): New routine.
3012 (Has_Static_Array_Bounds): Reimplemented.
3013 (Has_Static_Non_Empty_Array_Bounds): New routine.
3014 (Invalid_Scalar_Value): New routine.
3015 (Needs_Simple_Initialization): Moved from Exp_Ch3.
3016 (Set_Invalid_Scalar_Value): New routines.
3017 * sem_util.ads (Has_Static_Non_Empty_Array_Bounds): New routine.
3018 (Invalid_Scalar_Value): New routine.
3019 (Needs_Simple_Initialization): Moved from Exp_Ch3.
3020 (Set_Invalid_Scalar_Value): New routines.
3021 * snames.ads-tmpl: Add names for the salar type families used by pragma
3022 Initialize_Scalars.
3023
3024 2018-05-22 Javier Miranda <miranda@adacore.com>
3025
3026 * exp_disp.adb (Make_DT): Initialize the External_Tag with an empty
3027 string when pragma No_Tagged_Streams is applicable to the tagged type,
3028 and initialize the Expanded_Name with an empty string when pragma
3029 Discard_Names is applicable to the tagged type.
3030
3031 2018-05-22 Ed Schonberg <schonberg@adacore.com>
3032
3033 * sem_ch6.adb (Check_Conformance): Add RM reference for rule that a
3034 formal subprogram is never subtype conformqnt, and thus cannot be the
3035 prefix of 'Access. Reject as well the attribute when applied to a
3036 renaming of a formal subprogram.
3037
3038 2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
3039
3040 * exp_ch3.adb (Build_Array_Init_Proc): Update the call to
3041 Needs_Simple_Initialization.
3042 (Build_Init_Statements): Update the call to Get_Simple_Init_Val.
3043 (Check_Subtype_Bounds): Renamed to Extract_Subtype_Bounds. Update the
3044 profile and comment on usage.
3045 (Default_Initialize_Object): Do not use New_Copy_Tree to set the proper
3046 Sloc of a value obtained from aspect Default_Value because this could
3047 potentially replicate large trees. The proper Sloc is now set in
3048 Get_Simple_Init_Val.
3049 (Get_Simple_Init_Val): Reorganized by breaking the various cases into
3050 separate routines. Eliminate the use of global variables.
3051 (Init_Component): Update the call to Get_Simple_Init_Val.
3052 (Needs_Simple_Initialization): Update the parameter profile and all
3053 uses of T.
3054 (Simple_Init_Defaulted_Type): Copy the value of aspect Default_Value
3055 and set the proper Sloc.
3056 * exp_ch3.ads (Get_Simple_Init_Val): Update the parameter profile and
3057 comment on usage.
3058 (Needs_Simple_Initialization): Update the parameter profile.
3059
3060 2018-05-22 Patrick Bernardi <bernardi@adacore.com>
3061
3062 * sem_ch3.adb (Build_Discriminant_Constraints): Raise an error if the
3063 user tries to use a subtype indication as a discriminant constraint.
3064
3065 2018-05-22 Ed Schonberg <schonberg@adacore.com>
3066
3067 * exp_ch4.ads, exp_ch4.adb, exp_util.adb, expander.adb: Remove mention
3068 of N_Reduction_Expression and N_Reduction_Expression_Parameter.
3069 * par-ch4.adb: Remove parsing routines for reduction expressions.
3070 * sem.adb, sinfo.ads, sinfo.adb, sem_ch4.ads, sem_ch4.adb, sem_res.adb,
3071 sem_spark.adb, sprint.adb: Remove analysis routines for reduction
3072 expressions.
3073
3074 2018-05-22 Arnaud Charlet <charlet@adacore.com>
3075
3076 * sem_ch8.adb (Check_Frozen_Renaming): Do not emit error in
3077 Relaxed_RM_Semantics mode.
3078
3079 2018-05-22 Arnaud Charlet <charlet@adacore.com>
3080
3081 * comperr.adb (Delete_SCIL_Files): Take into account
3082 N_Generic_Package_Renaming_Declaration.
3083
3084 2018-05-22 Ed Schonberg <schonberg@adacore.com>
3085
3086 * sem_ch3.adb (Search_Derivation_Levels): Whenever a parent type is
3087 private, use the full view if available, because it may include renamed
3088 discriminants whose values are stored in the corresponding
3089 Stored_Constraint.
3090
3091 2018-05-22 Ed Schonberg <schonberg@adacore.com>
3092
3093 * einfo.ads, einfo.adb: New attribute Hidden_In_Formal_Instance,
3094 defined on packages that are actuals for formal packages, in order to
3095 set/reset the visibility of the formals of a formal package with given
3096 actuals, when there are subsequent uses of those formals in the
3097 enclosing generic, as required by RN 12.7 (10).
3098 * atree.ads, atree.adb: Add operations for Elist30.
3099 * atree.h: Add Elist30.
3100 * sem_ch12.adb (Analyze_Formal_Package_Instantiation): Collect formals
3101 that are not defaulted and are thus not visible within the current
3102 instance.
3103 (Check_Formal_Packages): Reset visibility of formals of a formal
3104 package that are not defaulted, on exit from current instance.
3105
3106 2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
3107
3108 * sem_prag.adb (Analyze_Input_Output): Emit an error when a non-null,
3109 non-'Result output appears in the output list of a function.
3110
3111 2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
3112
3113 * exp_attr.adb (Build_Array_VS_Func): Reimplemented.
3114 (Build_Record_VS_Func): Reimplemented.
3115 (Expand_N_Attribute): Reimplement the handling of attribute
3116 'Valid_Scalars.
3117 * sem_attr.adb (Analyze_Attribute): Reimplement the handling of
3118 attribute 'Valid_Scalars.
3119 * sem_util.adb (Scalar_Part_Present): Reimplemented.
3120 (Validated_View): New routine.
3121 * sem_util.ads (Scalar_Part_Present): Update the parameter profile and
3122 comment on usage.
3123 (Validated_View): New routine.
3124 * doc/gnat_rm/implementation_defined_attributes.rst: Update the
3125 documentation of attribute 'Valid_Scalars.
3126 * gnat_rm.texi: Regenerate.
3127
3128 2018-05-22 Bob Duff <duff@adacore.com>
3129
3130 * binde.adb: (Choose): Ignore a pragma Elaborate_Body that appears in
3131 the spec of a SAL_Interface package.
3132
3133 2018-05-22 Ed Schonberg <schonberg@adacore.com>
3134
3135 * freeze.adb (Freeze_Entity): When analyzing delayed aspects of an
3136 entity E within a generic unit, indicate that there are no remaining
3137 delayed aspects after invoking Analyze_Aspects_At_Freeze_Point. The
3138 entity E is not frozen yet but the aspects should not be reanalyzed at
3139 the freeze point, which may be outside of the generic and may not have
3140 the proper visibility.
3141
3142 2018-05-22 Bob Duff <duff@adacore.com>
3143
3144 * doc/gnat_ugn/gnat_utility_programs.rst: Add documentation for
3145 the new --split-line-before-record, --indent-named-statements and
3146 --no-align-modes gnatpp switches.
3147
3148 2018-05-22 Ed Schonberg <schonberg@adacore.com>
3149
3150 * sem_prag.adb (Process_Compile_Time_Warning_Or_Error): Handle properly
3151 a second argument that is a constant of a given string value.
3152
3153 2018-05-22 Doug Rupp <rupp@adacore.com>
3154
3155 * sigtramp-vxworks-target.inc: Align stack to 128bits on AArch64.
3156
3157 2018-05-22 Jerome Lambourg <lambourg@adacore.com>
3158
3159 * sigtramp-qnx.c: Fix stack alignment issue in the signal trampoline.
3160
3161 2018-05-22 Ed Schonberg <schonberg@adacore.com>
3162
3163 * freeze.adb (Freeze_Fixed_Point_Type): If the first subtype has
3164 delayed aspects, analyze them now, os that the representation of the
3165 type (size, bounds) can be computed and validated.
3166
3167 2018-05-22 Olivier Hainque <hainque@adacore.com>
3168
3169 * libgnat/s-dwalin.adb (Enable_Cache): Skip symbols outside of the
3170 executable code section boundaries.
3171
3172 2018-05-22 Javier Miranda <miranda@adacore.com>
3173
3174 * locales.c: New implementation for the Ada.Locales package.
3175 * libgnat/a-locale.ads: Remove comment indicating that this is not
3176 implemented.
3177 * doc/gnat_rm/standard_library_routines.rst: Remove comment indicating
3178 that this is not implemented.
3179 * gnat_rm.texi: Regenerate.
3180
3181 2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
3182
3183 * exp_ch5.adb, freeze.adb, pprint.adb, sem_ch4.adb, sem_res.adb: Minor
3184 reformattings.
3185
3186 2018-05-22 Justin Squirek <squirek@adacore.com>
3187
3188 * sem_ch12.adb (In_Same_Declarative_Part): Moved to sem_util.
3189 (Freeze_Subprogram_Body, Install_Body): Modify calls to
3190 In_Same_Declarative_Part.
3191 * sem_prag.adb (Analyze_Pragma-Pragma_Pure_Function): Add check to
3192 verify pragma declaration is within the same declarative list with
3193 corresponding error message.
3194 * sem_util.adb, sem_util.ads (In_Same_Declarative_Part): Moved from
3195 sem_ch12.adb and generalized to be useful outside the scope of
3196 freezing.
3197
3198 2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
3199
3200 * sem_ch6.adb (Analyze_Subprogram_Declaration): Set the proper
3201 categorization of the unit after processing the aspects in case one of
3202 its aspects is converted into a categorization pragma.
3203
3204 2018-05-21 Ed Schonberg <schonberg@adacore.com>
3205
3206 * freeze.adb (Warn_Overlay): Do not emit a wawrning on an object
3207 declaration with an explicit address clause and a type with default
3208 initialization, if the declaration carries an aspect
3209 Suppress_Initialization.
3210
3211 2018-05-21 Daniel Mercier <mercier@adacore.com>
3212
3213 * pprint.adb: Use mixed case for attribute names.
3214
3215 2018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
3216
3217 * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Rename the call to
3218 Analyze_Aspect_Specifications_On_Body_Or_Stub.
3219 (Analyze_Subprogram_Body_Helper): Rename the calls to
3220 Analyze_Aspect_Specifications_On_Body_Or_Stub.
3221 * sem_ch9.adb (Analyze_Entry_Body): Rename the call to
3222 Analyze_Aspect_Specifications_On_Body_Or_Stub.
3223 * sem_ch10.adb: Add with and use clause for Sem_Ch13.
3224 (Analyze_Package_Body_Stub): Add constant Id. Decorate the package stub
3225 prior to analyzing its aspects.
3226 (Analyze_Protected_Body_Stub): Add constant Id. Decorate the package
3227 stub prior to analyzing its aspects. Save and restore the configuration
3228 switches.
3229 (Analyze_Task_Body_Stub): Add constant Id. Decorate the package stub
3230 prior to analyzing its aspects.
3231 * sem_ch13.adb (Analyze_Aspect_Specifications_On_Body_Or_Stub): Renamed
3232 to Analyze_Aspects_On_Subprogram_Body_Or_Stub.
3233 * sem_ch13.ads (Analyze_Aspect_Specifications_On_Body_Or_Stub): Renamed
3234 to Analyze_Aspects_On_Subprogram_Body_Or_Stub.
3235 * sem_prag.adb: Code reformatting.
3236 (Analyze_Refined_Depends_Global_Post): Consider task body stubs.
3237
3238 2018-05-21 Jerome Lambourg <lambourg@adacore.com>
3239
3240 * gcc-interface/Makefile.in: Add g-soliop__qnx.ads to the runtime build
3241 for QNX.
3242
3243 2018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
3244
3245 * exp_cg.adb: Remove with and use clause for Exp_Disp.
3246 * exp_ch9.adb: Remove with and use clause for Exp_Disp.
3247 * exp_disp.adb (Is_Predefined_Dispatching_Operation): Moved to Sem_Util.
3248 (Is_Predefined_Interface_Primitive): Moved to Sem_Util.
3249 (Is_Predefined_Internal_Operation): Moved to Sem_Util.
3250 * exp_disp.ads (Is_Predefined_Dispatching_Operation): Moved to Sem_Util.
3251 (Is_Predefined_Interface_Primitive): Moved to Sem_Util.
3252 (Is_Predefined_Internal_Operation): Moved to Sem_Util.
3253 * exp_dist.adb: Remove with and use clause for Exp_Disp.
3254 * freeze.adb: Remove with and use clause for Exp_Disp.
3255 * sem_cat.adb: Remove with and use clause for Exp_Disp.
3256 * sem_ch6.adb: Remove with and use clause for Exp_Disp.
3257 * sem_ch12.adb: Remove with and use clause for Exp_Disp.
3258 * sem_elab.adb (Check_Overriding_Primitive): Do not process predefined
3259 primitives.
3260 * sem_util.adb: Remove with and use clause for Exp_Disp.
3261 (Is_Predefined_Dispatching_Operation): Moved from Exp_Disp.
3262 (Is_Predefined_Interface_Primitive): Moved from Exp_Disp.
3263 (Is_Predefined_Internal_Operation): Moved from Exp_Disp.
3264 * sem_util.ads (Is_Predefined_Dispatching_Operation): Moved from
3265 Exp_Disp.
3266 (Is_Predefined_Interface_Primitive): Moved from Exp_Disp.
3267 (Is_Predefined_Internal_Operation): Moved from Exp_Disp.
3268
3269 2018-05-21 Ed Schonberg <schonberg@adacore.com>
3270
3271 * sem_res.adb (Valid_Conversion): Improve error message on an illegal
3272 type conversion whose expression has a limited view of a type.
3273
3274 2018-05-21 Ed Schonberg <schonberg@adacore.com>
3275
3276 * exp_ch5.adb (Build_Formal_Container_Iteration): If source has
3277 explicit name for iterator loop, preserve that name in expanded
3278 construct, for possible use in exit statements.
3279
3280 2018-05-21 Javier Miranda <miranda@adacore.com>
3281
3282 * sem_ch4.adb (Analyze_Membership_Op): Avoid compiler crash when the
3283 spec of a unit has Ada 2012 membership tests with multiple choices and
3284 the unit body is not compiled under Ada 2012 mode.
3285
3286 2018-05-21 Doug Rupp <rupp@adacore.com>
3287
3288 * sigtramp-vxworks-target.inc: Set cfa_reg properly from sigcontext
3289 pregs.
3290 (CFI_COMMON_REGS): Restore LR jic probed from prologue.
3291 (REGNO_PC_OFFSET): Change to correct value for Aarch64.
3292
3293 2018-05-21 Jose Ruiz <ruiz@adacore.com>
3294
3295 * doc/gnat_ugn/gnat_utility_programs.rst, exp_attr.adb,
3296 libgnarl/s-tassta.adb: Minor typo fixes
3297
3298 2018-05-21 Ed Schonberg <schonberg@adacore.com>
3299
3300 * sem_ch4.adb (Analyze_One_Call): Recognize complex cases where an
3301 indexed call originally in prefix forn is itself the prefix of a
3302 further call.
3303
3304 2018-05-21 Piotr Trojanek <trojanek@adacore.com>
3305
3306 * sem_eval.adb (Is_Null_Range): Clarify access to the full view of a
3307 type.
3308 (Not_Null_Range): Same as above.
3309
3310 2018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
3311
3312 * exp_ch3.adb: Minor reformatting.
3313 * exp_ch6.adb: Likewise.
3314 * freeze.adb: Likewise.
3315 * inline.adb: Likewise.
3316 * sem_util.adb: Likewise.
3317
3318 2018-05-21 Yannick Moy <moy@adacore.com>
3319
3320 * inline.adb (Expand_Inlined_Call.Process_Formals): Use a type
3321 conversion instead of an unchecked type conversion when inlining a
3322 return statement, unless type qualification is required (for character
3323 and string literal) or no check can result from the conversion (for
3324 access types).
3325 * opt.ads: Update comment.
3326
3327 2018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
3328
3329 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Install the elaboration
3330 model of the compilation unit spec, if any.
3331 * sem_ch7.adb (Analyze_Package_Body_Helper): Install the elaboration
3332 model of the compilation unit spec, if any.
3333 * sem_ch10.adb (Analyze_Subunit): Install the elaboration model of the
3334 parent compilation unit spec, if any.
3335 * sem_elab.adb (Check_Elaboration_Scenarios): Restore the elaboration
3336 model of the main unit.
3337 (Is_Same_Unit): The routine now uses Unit_Entity.
3338 (Is_Subunit): Removed.
3339 (Normalize_Unit): Removed.
3340 (Unit_Entity): New routine.
3341 * sem_prag.adb (Analyze_Pragma): Reimplement the handling of pragma
3342 Elaboration_Checks. The analysis now ensures that the pragma appears at
3343 the configuration level, and on the initial declaration of a unit.
3344 Other placements are either flagged as illegal, or ignored.
3345 (Check_Duplicate_Elaboration_Checks_Pragma): New routine.
3346 (Ignore_Elaboration_Checks_Pragma): New routine.
3347 * sem_util.adb (Install_Elaboration_Model): New routine.
3348 * sem_util.ads (Install_Elaboration_Model): New routine.
3349 * doc/gnat_rm/implementation_defined_pragmas.rst: Update the
3350 documentation of pragma Elaboration_Checks.
3351 * gnat_rm.texi: Regenerate.
3352
3353 2018-05-21 Olivier Hainque <hainque@adacore.com>
3354
3355 * libgnat/s-trasym__dwarf.adb (Executable_Name): Return argv[0] instead
3356 of empty string when argv[0] couldn't be found on PATH.
3357 (Enable_Cache): Raise Program_Error instead of attempting a null
3358 pointer dereference when the Exec_Module initialization failed.
3359
3360 2018-05-21 Piotr Trojanek <trojanek@adacore.com>
3361
3362 * libgnarl/a-reatim.ads (Clock_Time): Remove External aspect.
3363 * libgnarl/a-taside.ads (Tasking_State): Likewise.
3364 * libgnat/a-calend.ads (Clock_Time): Likewise.
3365
3366 2018-05-21 Yannick Moy <moy@adacore.com>
3367
3368 * sem_ch6.adb (Analyze_Procedure_Call): Refine test to recognize prefix
3369 call notation in inlined call in GNATprove mode.
3370
3371 2018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
3372
3373 * einfo.adb (Is_External_State): An abstract state is also external
3374 when it is declared with option "synchronous".
3375 * einfo.ads: Update the documentation of synthesized attribute
3376 Is_External_State.
3377 * sem_util.adb (Find_Simple_Properties): New routine.
3378 (Is_Enabled_External_Property): New routine.
3379 (State_Has_Enabled_Property): Reimplemented. The two flavors of option
3380 External have precedence over option Synchronous when determining
3381 whether a property is in effect.
3382
3383 2018-05-21 Yannick Moy <moy@adacore.com>
3384
3385 * sem_eval.adb (Static_Length): Take into account case of variable of
3386 subtype string literal.
3387
3388 2018-05-21 Olivier Hainque <hainque@adacore.com>
3389
3390 * libgnat/s-objrea.ads (Get_Memory_Bounds): Rename as Get_Xcode_Bounds.
3391 (Object_Section): Rename Flag_Alloc component as Flag_Xcode.
3392 * libgnat/s-objrea.adb (Get_Xcode_Bounds): Adjust to new subprogram and
3393 component name.
3394 (Get_Section, ELF case): Set Flag_Xcode from SHF_EXECINSTR.
3395 * libgnat/s-dwalin.adb (Open): Adjust to the Get_Memory_Bounds name
3396 change.
3397
3398 2018-05-21 Olivier Hainque <hainque@adacore.com>
3399
3400 * libgnat/s-dwalin.ads (Dwarf_Context): Change type of Load_Address to
3401 Address, and type of Low, High to Storage_Offset.
3402 (Low): Rename as Low_Address and convey that the return value is a
3403 runtime reference accounting for a load address.
3404 * libgnat/s-dwalin.adb (Read_Aranges_Entry): Adjust to the
3405 address/offset type changes.
3406 (Aranges_Lookup): Likewise.
3407 (Symbolic_Address): Likewise.
3408 (Symbolic_Traceback): Likewise.
3409 (Dump_Cache): Likewise.
3410 (Is_Inside): Likewise.
3411 (Open): Likewise.
3412 (Set_Load_Address): Likewise.
3413 (Low_Address): Likewise, and account for C.Load_Address.
3414 * libgnat/s-trasym__dwarf.adb (Lt): Use Low_Address instead of Low.
3415 (Multi_Module_Symbolic_Traceback): Compare address in traceback
3416 with module Low_Address instead of Low.
3417
3418 2018-05-21 Olivier Hainque <hainque@adacore.com>
3419
3420 * libgnat/s-dwalin.ads (Dwarf_Context): Rename Load_Slide as
3421 Load_Address.
3422 * libgnat/s-dwalin.adb (Is_Inside): Adjust accordingly.
3423 (Set_Load_Address): Likewise.
3424 (Symbolic_Traceback): Likewise.
3425
3426 2018-05-21 Olivier Hainque <hainque@adacore.com>
3427
3428 * libgnat/s-trasym__dwarf.adb (Add_Module_To_Cache): Expect a
3429 Load_Address argument and pass it down to Init_Module.
3430 * libgnat/s-tsmona__linux.adb (Build_Cache_For_All_Modules): Pass
3431 lm.l_addr as the Load_Address to Add_Module_To_Cache.
3432
3433 2018-05-21 Piotr Trojanek <trojanek@adacore.com>
3434
3435 * einfo.adb (Has_Discriminants): Stronger assertion.
3436 (Set_Has_Discriminants): Stronger assertion.
3437 * sem_ch13.adb (Push_Scope_And_Install_Discriminants): Adapt to respect
3438 the stronger assertion on Has_Discriminant.
3439 (Uninstall_Discriminants_And_Pop_Scope): Same as above.
3440 * sem_util.adb (New_Copy_Tree): Same as above.
3441 * sem_ch7.adb (Generate_Parent_References): Prevent calls to
3442 Has_Discriminant on non-type entities that might happen when the
3443 compiled code has errors.
3444 * sem_ch3.adb (Derived_Type_Declaration): Only call
3445 Set_Has_Discriminant on type entities.
3446
3447 2018-05-21 Arnaud Charlet <charlet@adacore.com>
3448
3449 * exp_unst.adb (Unnest_Subprogram): Unnest all subprograms relevant for
3450 code generation.
3451
3452 2018-05-21 Piotr Trojanek <trojanek@adacore.com>
3453
3454 * lib.ads: Fix typo in enumeration in comment.
3455
3456 2018-05-21 Ed Schonberg <schonberg@adacore.com>
3457
3458 * sem_attr.adb (Analyze_Attribute, case Scalar_Storage_Order): The
3459 attribute reference is legal within a generic unit when the prefix is a
3460 formal private type.
3461
3462 2018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
3463
3464 * exp_ch7.adb (Establish_Transient_Scope): Code cleanup. Do not
3465 delegate the secondary stack management when there is no suitable
3466 transient context, and the transient scope was intended to manage the
3467 secondary stack because this causes premature reclamation. Change the
3468 transient scope creation logic by special casing assignment statements
3469 of controlled components for type initialization procedures.
3470 (Find_Node_To_Be_Wrapped): Renamed to Find_Transient_Context. Update
3471 the comment on usage.
3472 (Find_Transient_Context): Change the initinte loop into a while loop.
3473 Iterations schemes and iterator specifications are not valid transient
3474 contexts because they rely on special processing. Assignment statements
3475 are now treated as a normal transient context, special cases are
3476 handled by the caller. Add special processing for pragma Check.
3477 (Is_OK_Construct): Removed. Its functionality has been merged in
3478 routine Find_Transient_Context.
3479 * sem_ch5.adb (Check_Call): Reimplemented. Add code to properly
3480 retrieve the subprogram being invoked. Use a more accurate predicate
3481 (Requires_Transient_Scope) to determine that the function will emply
3482 the secondary stack.
3483
3484 2018-05-21 Piotr Trojanek <trojanek@adacore.com>
3485
3486 * ada_get_targ.adb: Fix subprogram body headers.
3487 * adabkend.adb: Likewise.
3488 * checks.adb: Likewise.
3489 * exp_ch3.adb: Likewise.
3490 * exp_ch5.adb: Likewise.
3491 * exp_ch9.adb: Likewise.
3492 * exp_dist.adb: Likewise.
3493 * exp_tss.adb: Likewise.
3494 * inline.adb: Likewise.
3495 * lib-writ.adb: Likewise.
3496 * lib-xref-spark_specific.adb: Likewise.
3497 * libgnarl/s-osinte__darwin.adb: Likewise.
3498 * libgnarl/s-stusta.adb: Likewise.
3499 * libgnarl/s-taprop__solaris.adb: Likewise.
3500 * libgnarl/s-tposen.adb: Likewise.
3501 * libgnarl/s-vxwext__kernel-smp.adb: Likewise.
3502 * libgnarl/s-vxwext__kernel.adb: Likewise.
3503 * libgnat/a-btgbso.adb: Likewise.
3504 * libgnat/a-cfdlli.adb: Likewise.
3505 * libgnat/a-cfhama.adb: Likewise.
3506 * libgnat/a-cfinve.adb: Likewise.
3507 * libgnat/a-cimutr.adb: Likewise.
3508 * libgnat/a-coboho.adb: Likewise.
3509 * libgnat/a-cofove.adb: Likewise.
3510 * libgnat/a-cofuve.adb: Likewise.
3511 * libgnat/a-comutr.adb: Likewise.
3512 * libgnat/a-exexda.adb: Likewise.
3513 * libgnat/a-tags.adb: Likewise.
3514 * libgnat/a-tideau.adb: Likewise.
3515 * libgnat/a-wtdeau.adb: Likewise.
3516 * libgnat/a-ztdeau.adb: Likewise.
3517 * libgnat/g-alleve.adb: Likewise.
3518 * libgnat/s-excdeb.adb: Likewise.
3519 * libgnat/s-parint.adb: Likewise.
3520 * libgnat/s-shasto.adb: Likewise.
3521 * libgnat/s-traceb__hpux.adb: Likewise.
3522 * prepcomp.adb: Likewise.
3523 * sem_ch4.adb: Likewise.
3524 * sem_ch6.adb: Likewise.
3525 * sem_dist.adb: Likewise.
3526 * sem_prag.adb: Likewise.
3527 * sem_util.adb: Likewise.
3528 * sinfo.adb: Likewise.
3529 * switch.adb: Likewise.
3530
3531 2018-05-04 John Marino <gnugcc@marino.st>
3532
3533 PR ada/85635
3534 * link.c (BSD platforms): Add missing backslash.
3535
3536 2018-04-27 Eric Botcazou <ebotcazou@adacore.com>
3537
3538 PR ada/85540
3539 * init.c (__gnat_handle_vms_condition): Add missing parentheses.
3540
3541 2018-04-25 Eric Botcazou <ebotcazou@adacore.com>
3542
3543 PR ada/85007
3544 * gnat_ugn.texi: Regenerate.
3545
3546 2018-03-23 Eric Botcazou <ebotcazou@adacore.com>
3547
3548 PR ada/85007
3549 * gnatlink.adb (Gnatlink): Remove handling of -b switch.
3550 * doc/gnat_ugn/building_executable_programs_with_gnat.rst (gnatlink):
3551 Remove documentation of -b switch.
3552
3553 2018-03-23 Eric Botcazou <ebotcazou@adacore.com>
3554
3555 PR ada/85036
3556 * gnatlink.adb (Process_Args): Drop existing link switches if multiple
3557 switches are passed for --LINK.
3558
3559 2018-03-12 Eric Botcazou <ebotcazou@adacore.com>
3560
3561 PR ada/82813
3562 * gcc-interface/misc.c (gnat_post_options): Disable string overflow
3563 warnings.
3564
3565 2018-03-10 Eric Botcazou <ebotcazou@adacore.com>
3566
3567 * gcc-interface/trans.c (node_has_volatile_full_access) <N_Identifier>:
3568 Consider only entities for objects.
3569
3570 2018-03-07 Sebastian Huber <sebastian.huber@embedded-brains.de>
3571
3572 * gcc-interface/Makefile.in (OSCONS_CPP): Remove redundant
3573 $(GNATLIBCFLAGS).
3574 (OSCONS_EXTRACT): Add $(GNATLIBCFLAGS_FOR_C).
3575
3576 2018-03-06 Eric Botcazou <ebotcazou@adacore.com>
3577
3578 * gcc-interface/trans.c (convert_with_check): Fix typo in the condition
3579 guarding the overflow check emitted for the upper bound of a floating-
3580 point conversion.
3581
3582 2018-03-06 Eric Botcazou <ebotcazou@adacore.com>
3583
3584 * gcc-interface/utils.c (def_builtin_1): Bail out on error_mark_node.
3585
3586 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
3587
3588 * libgnat/i-cexten.ads (Float_128): New type.
3589
3590 2018-02-02 Eric Botcazou <ebotcazou@adacore.com>
3591
3592 * gcc-interface/decl.c (array_type_has_nonaliased_component): Return
3593 false if the component type is a pointer.
3594
3595 2018-01-11 Gary Dismukes <dismukes@adacore.com>
3596
3597 * exp_ch3.adb (Default_Initialize_Object): Call New_Copy_Tree on the
3598 result of Get_Simple_Init_Value and pass the source location of the
3599 object declaration's object_definition.
3600
3601 2018-01-11 Ed Schonberg <schonberg@adacore.com>
3602
3603 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration): Handle
3604 properly object declarations with initializations that are
3605 build-in-place function calls, when there is an address specification,
3606 either as an aspect specification or an explicit attribute
3607 specification clause, for the initialized object.
3608 * freeze.adb (Check_Address_Clause): Do not remove side-effects from
3609 initial expressions in the case of a build-in-place call.
3610
3611 2018-01-11 Piotr Trojanek <trojanek@adacore.com>
3612
3613 * sem_eval.adb (Is_Null_Range): Retrieve the full view when called on a
3614 private (sub)type; refactor to avoid early return statement.
3615 (Not_Null_Range): Same as above.
3616
3617 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
3618
3619 * freeze.adb (Freeze_Entity): Ensure that a Ghost type is not
3620 concurrent, nor effectively volatile.
3621 * ghost.adb (Check_Ghost_Type): New routine.
3622 * ghost.ads (Check_Ghost_Type): New routine.
3623 * sem_util.adb (Is_Declaration): Reimplemented. The routine can now
3624 consider specific subsets of declarations.
3625 (Is_Declaration_Other_Than_Renaming): Removed. Its functionality is
3626 replicated by Is_Declaration.
3627 * sem_util.ads (Is_Declaration): New parameter profile. Update the
3628 comment on usage.
3629 (Is_Declaration_Other_Than_Renaming): Removed.
3630
3631 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
3632
3633 * sem_ch5.adb (Analyze_Assignment): Assignments to variables that act
3634 as Part_Of consituents of single protected types are illegal when they
3635 take place inside a protected function.
3636 (Diagnose_Non_Variable_Lhs): Use Within_Function to check for an
3637 enclosing function.
3638 (Is_Protected_Part_Of_Constituent): New routine.
3639 (Within_Function): New routine.
3640
3641 2018-01-11 Arnaud Charlet <charlet@adacore.com>
3642
3643 Bump copyright notices to 2018.
3644
3645 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
3646
3647 * binde.adb, par-ch6.adb, par-ch9.adb, sem_ch12.adb, sem_ch13.adb:
3648 Minor reformatting.
3649
3650 2018-01-11 Justin Squirek <squirek@adacore.com>
3651
3652 * par-ch6.adb (Scan_Body_Or_Expression_Function): Add additional check
3653 to make sure a given expression function is properly parenthesized.
3654
3655 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
3656
3657 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Check the
3658 categorization of a subprogram body which does not complete a previous
3659 declaration.
3660
3661 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
3662
3663 * sem_ch10.adb (Check_Private_Child_Unit): Ensure that the enclosing
3664 scope of package Ada is Standard.
3665
3666 2018-01-11 Ed Schonberg <schonberg@adacore.com>
3667
3668 * sem_ch13.adb (Replace_Type_Ref): Handle properly reference to a
3669 subcomponent of the current entity when building the body for a dynamic
3670 predicate function for a record with composite subcomponents.
3671
3672 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
3673
3674 * exp_aggr.adb (Convert_Aggr_In_Object_Decl): Update the call to
3675 Establish_Transient_Scope.
3676 (Convert_To_Assignments): Update the call to Establish_Transient_Scope.
3677 (Expand_Array_Aggregate): Update the call to Establish_Transient_Scope.
3678 * exp_ch6.adb (Expand_Call_Helper): Update the call to
3679 Establish_Transient_Scope.
3680 (Make_Build_In_Place_Call_In_Object_Declaration): Update the call to
3681 Establish_Transient_Scope.
3682 * exp_ch7.adb (Establish_Transient_Scope): Restructured. Delegate the
3683 management of the secondary stack to an enclosing scope if there is no
3684 suitable construct to wrap, and the transient scope was intended to
3685 manage the secondary stack.
3686 (Find_Node_To_Be_Wrapped): Restructured. A case_statement_alternative
3687 is a valid boundary for a transient expression which comes from the
3688 statements of the alternative, otherwise alternatives cannot be
3689 wrapped. Assignments of controlled objects which have controlled
3690 actions suppressed now stop the traversal as there is no point in
3691 looking for an enclosing construct. Add several N_xxx_Body choices to
3692 the termination conditions for completeness.
3693 * exp_ch7.ads (Establish_Transient_Scope): Update the parameter profile
3694 and the associated comment on usage.
3695 * exp_smem.adb (Add_Shared_Var_Lock_Procs): Update the call to
3696 Establish_Transient_Scope.
3697 (Add_Write_After): Update the call to Establish_Transient_Scope.
3698 * sem_res.adb (Check_Initialization_Call): Removed.
3699 (Resolve_Actuals): Account for additional cases where finalization
3700 actions are required by utilizing predicate Needs_Finalization rather
3701 than Is_Controlled.
3702 (Resolve_Call): Type initialization procedures can now utilize
3703 transient scopes to manage the secondary stack, thus preventing leaks
3704 during initialization. Remove the previous kludgy algorithm which
3705 attempts to manage the secondary stack at the object creation site.
3706
3707 2018-01-11 Jerome Lambourg <lambourg@adacore.com>
3708
3709 * libgnat/g-soliop__qnx.ads: New.
3710 * adaint.c, adaint.h, cstreams.c, s-oscons-tmplt.c, sysdep.c: Update
3711 for QNX.
3712
3713 2018-01-11 Bob Duff <duff@adacore.com>
3714
3715 * par-ch9.adb (P_Protected_Operation_Declaration_Opt): Give an error if
3716 a null procedure occurs in a protected definition.
3717
3718 2018-01-11 Bob Duff <duff@adacore.com>
3719
3720 * binderr.ads, namet.ads: Minor reformatting.
3721
3722 2018-01-11 Bob Duff <duff@adacore.com>
3723
3724 * doc/gnat_ugn/gnat_utility_programs.rst: Improve documentation of
3725 xml2gnat.
3726
3727 2018-01-11 Bob Duff <duff@adacore.com>
3728
3729 * binde.adb (Force_Elab_Order): Give an error if there are duplicate
3730 unit names.
3731
3732 2018-01-11 Ed Schonberg <schonberg@adacore.com>
3733
3734 * sem_ch6.adb (Freeze_Expr_Types): If an access value is the
3735 controlling argument of a dispatching call. freeze the corresponding
3736 designated type.
3737
3738 2018-01-11 Ben Brosgol <brosgol@adacore.com>
3739
3740 * doc/Makefile: Add Sphinx option -W to treat warnings as errors.
3741
3742 2018-01-11 Ben Brosgol <brosgol@adacore.com>
3743
3744 * doc/gnat_rm/implementation_defined_aspects.rst: Minor type/wording
3745 corrections.
3746 * gnat_rm.texi: Regenerate.
3747
3748 2018-01-11 Ed Schonberg <schonberg@adacore.com>
3749
3750 * sem_ch12.adb (Check_Fixed_Point_Type): Do not apply check if the
3751 formsl type corresponding to the actual fixed point type is private,
3752 because in this case there can be no suspicious arithmetic operations
3753 in the generic unless they reference a formal subprogram. Clarify
3754 warning.
3755
3756 2018-01-11 Javier Miranda <miranda@adacore.com>
3757
3758 * exp_util.adb (Remove_Side_Effects): No action done for functions
3759 returning class-wide types since it requires generating code using
3760 'reference and the CCG target has no secondary stack.
3761 * gnat1drv.adb: Disable building static dispatch tables when generating
3762 C code.
3763
3764 2018-01-11 Piotr Trojanek <trojanek@adacore.com>
3765
3766 * libgnat/a-direio.ads, libgnat/a-sequio.ads, libgnat/a-ststio.ads,
3767 libgnat/a-textio.ads, libgnat/a-witeio.ads, libgnat/a-ztexio.ads
3768 (File_Type): Add Default_Initial_Condition aspect.
3769
3770 2018-01-11 Pascal Obry <obry@adacore.com>
3771
3772 * libgnat/s-os_lib.adb (Normalize_Pathname): New implementation.
3773
3774 2018-01-11 Bob Duff <duff@adacore.com>
3775
3776 * doc/gnat_ugn/gnat_utility_programs.rst: Rewrite gnatpp documentation
3777 to match what the Libadalang-based version does.
3778 * doc/gnat_ugn/about_this_guide.rst: Update reference.
3779
3780 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
3781
3782 * sem_res.adb (Uses_SS): A controlled type requires the secondary stack
3783 if it contains at least one component declaration employing a function
3784 call returning on the secondary stack.
3785
3786 2018-01-11 Yannick Moy <moy@adacore.com>
3787
3788 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
3789 Update description of restriction SPARK_05 with SPARK 2014.
3790 * gnat_rm.texi: Regenerate.
3791
3792 2018-01-11 Vasiliy Fofanov <fofanov@adacore.com>
3793
3794 * doc/gnat_ugn/gnat_utility_programs.rst: Fix layout.
3795
3796 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
3797
3798 * exp_aggr.adb, exp_ch9.adb, exp_util.adb, sem_aggr.adb, sem_ch3.adb,
3799 sem_res.adb, sem_util.adb: Minor reformatting.
3800
3801 2018-01-11 Ed Schonberg <schonberg@adacore.com>
3802
3803 * sem_prag.adb (Analyze_Pragma, case Predicate): Indicate that the type
3804 has a delayed aspect which must be processed at the point the type is
3805 frozen. This mimics what is done when the predicate is provided by a
3806 source aspect.
3807
3808 2018-01-11 Doug Rupp <rupp@adacore.com>
3809
3810 * init.c (vxworks): Add macro checks for __aarch64__.
3811
3812 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
3813
3814 * exp_util.adb (Add_Failure_Expression): New routine.
3815 (Make_Predicate_Check): Reimplement the handling of Predicate_Failure.
3816 * sem_util.adb (Is_Current_Instance): Code cleanup.
3817
3818 2018-01-11 Patrick Bernardi <bernardi@adacore.com>
3819
3820 * libgnat/s-parame*.adb, libgnat/s-parame*.ads: Remove unneeded
3821 Default_Sec_Stack_Size.
3822 * libgnat/s-secsta.adb (SS_Allocate): Handle the fixed secondary stack
3823 limit check so that the integer index does not overflow. Check the
3824 dynamic stack allocation does not cause the secondary stack pointer to
3825 overflow.
3826 (SS_Info): Align colons.
3827 (SS_Init): Cover the case when bootstraping with an old compiler that
3828 does not set Default_SS_Size.
3829
3830 2018-01-11 Ed Schonberg <schonberg@adacore.com>
3831
3832 * sem_ch3.adb (Add_Internal_Interface_Entities): When checking the
3833 legality of an inherited operation that may require overriding, ignore
3834 primitive_wrappers that correspond to explicit operations that override
3835 an interface primitive.
3836 * exp_util.adb (Build_Class_Wide_Expression, Replace_Entity): If the
3837 operation to which the class-wide expression applies is a protected op.
3838 with a primitive_wrapper, verify that the updated inherited expression
3839 does not contain an internal call to a protected function. This
3840 completes the implementation of AI12-0166.
3841
3842 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
3843
3844 * ali.adb: Document the remaining letters available for ALI lines.
3845 (Scan_ALI): A with clause is internal when it is encoded on a 'Z' line.
3846 * ali.ads: Update type With_Record. Field
3847 Implicit_With_From_Instantiation is no longer in use. Add field
3848 Implicit_With.
3849 * csinfo.adb (CSinfo): Remove the setup for attribute
3850 Implicit_With_From_Instantiation.
3851 * lib-writ.adb (Collect_Withs): Correct the logic which marks a unit as
3852 either implicitly or explicitly withed.
3853 (Is_Implicit_With_Clause): New routine.
3854 (Write_ALI): Rename array Implicit_With to Has_Implicit_With to avoid
3855 confusion with the with clause attribute by the same name.
3856 (Write_With_Lines): Update the emission of 'W', 'Y', and 'Z' headers.
3857 * rtsfind.adb (Maybe_Add_With): Code cleanup.
3858 * sem_ch8.adb (Present_System_Aux): Code cleanup.
3859 * sem_ch10.adb (Expand_With_Clause): Mark the with clause as generated
3860 for a parent unit.
3861 (Implicit_With_On_Parent): Mark the with clause as generated for a
3862 parent unit.
3863 * sem_ch12.adb (Inherit_Context): With clauses inherited by an
3864 instantiation are no longer marked as Implicit_With_From_Instantiation
3865 because they are already marked as implicit.
3866 * sem_elab.adb (Ensure_Prior_Elaboration_Static): Remove the kludge
3867 which marks implicit with clauses as related to an instantiation.
3868 * sinfo.adb (Implicit_With_From_Instantiation): Removed.
3869 (Parent_With): New routine.
3870 (Set_Implicit_With_From_Instantiation): Removed.
3871 (Set_Parent_With): New routine.
3872 * sinfo.ads: Update the documentation of attribute Implicit_With.
3873 Remove attribute Implicit_With_From_Instantiation along with
3874 occurrences in nodes. Add attribute Parent_With along with occurrences
3875 in nodes.
3876 (Implicit_With_From_Instantiation): Removed along with pragma Inline.
3877 (Parent_With): New routine along with pragma Inline.
3878 (Set_Implicit_With_From_Instantiation): Removed along with pragma Inline.
3879 (Set_Parent_With): New routine along with pragma Inline.
3880
3881 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
3882
3883 * sem_util.adb (Find_Enclosing_Scope): Return the unique defining
3884 entity when the enclosing construct is a body.
3885
3886 2018-01-11 Patrick Bernardi <bernardi@adacore.com>
3887
3888 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Simplified
3889 Secondary_Stack_Size handling as a pragma is now generated for the
3890 corresponding aspect instead of an attribute. Pragma expression is
3891 relocated instead of evaluated. Discriminant of the corresponding
3892 record type is referenced rather than the type discriminant.
3893 (Create_Secondary_Stack_For_Task, Make_Task_Create_Call): Update
3894 Secondary_Stack_Size rep item checks to only look for the pragma rep.
3895 * sem_ch13.adb (Analyze_One_Aspect): Transform
3896 Aspect_Secondary_Stack_Size into a pragma instead of an attribute
3897 because the attribute does not have visibility on a task type's
3898 discriminants when the type's definition is expanded.
3899 (Analyze_Attribute_Definition_Clause): Remove handling of
3900 Attribute_Secondary_Stack_Size.
3901 * snames.adb-tmpl, snames.ads-tmpl: Remove
3902 Attribute_Secondary_Stack_Size, no longer used.
3903
3904 2018-01-11 Justin Squirek <squirek@adacore.com>
3905
3906 * sem_ch8.adb: Minor comment fix.
3907
3908 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
3909
3910 * exp_ch4.adb (Process_Action): Do not abandon the inspection of an
3911 individual action because the action may denote a complex expression,
3912 such as a case statement, which in turn may contain additional
3913 transient objects.
3914
3915 2018-01-11 Ed Schonberg <schonberg@adacore.com>
3916
3917 * sem_aggr.adb (Resolve_Iterated_Component_Association): Perform
3918 analysis on a copy of the expression with a copy of the index variable,
3919 because full expansion will rewrite construct into a loop with the
3920 original loop variable.
3921 * exp_aggr.adb (Gen_Assign): Defer analysis and resolution if the
3922 expression is an iterated component association. Full analysis takes
3923 place when construct is rewritten as a loop.
3924 (In_Place_Assign_OK, Safe_Component): An iterated_component_association
3925 is not safe for in-place assignment.
3926 * sem_util.adb (Remove_Entity): Handle properly the case of an isolated
3927 entity with no homonym and no other entity in the scope.
3928
3929 2018-01-11 Justin Squirek <squirek@adacore.com>
3930
3931 * sem_prag.adb (Analyze_Pragma:Pragma_Loop_Variant): Modify error
3932 message to be printed on the pragma argument identifier.
3933
3934 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
3935
3936 * exp_util.adb (Build_Invariant_Procedure_Declaration): Set the last
3937 entity of the generated invariant procedure in order to construct a
3938 proper entity chain.
3939
3940 2018-01-11 Piotr Trojanek <trojanek@adacore.com>
3941
3942 * sem_ch13.adb (Build_Predicate_Functions): Fix minor issues in
3943 comment.
3944
3945 2018-01-11 Arnaud Charlet <charlet@adacore.com>
3946
3947 * einfo.ads, einfo.adb (Activation_Record_Component,
3948 Set_Activation_Record_Component, Set_Is_Uplevel_Referenced_Entity):
3949 Allow E_Discriminant.
3950
3951 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
3952
3953 * gcc-interface/decl.c (gnat_to_gnu_component_type): Apply the check
3954 for atomic access once the component size is taken into account and
3955 also do it if the component type is Atomic or Volatile_Full_Access.
3956
3957 2018-01-04 Eric Botcazou <ebotcazou@adacore.com>
3958
3959 * gnatvsn.ads: Bump copyright year.
3960
3961 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
3962 Alan Hayward <alan.hayward@arm.com>
3963 David Sherwood <david.sherwood@arm.com>
3964
3965 * gcc-interface/misc.c (enumerate_modes): Treat GET_MODE_BITSIZE
3966 as polynomial.
3967
3968 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
3969 Alan Hayward <alan.hayward@arm.com>
3970 David Sherwood <david.sherwood@arm.com>
3971
3972 * gcc-interface/misc.c (enumerate_modes): Treat GET_MODE_PRECISION
3973 as polynomial.
3974
3975 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
3976 Alan Hayward <alan.hayward@arm.com>
3977 David Sherwood <david.sherwood@arm.com>
3978
3979 * gcc-interface/utils.c (gnat_types_compatible_p): Handle
3980 polynomial TYPE_VECTOR_SUBPARTS.
3981
3982 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
3983 Alan Hayward <alan.hayward@arm.com>
3984 David Sherwood <david.sherwood@arm.com>
3985
3986 * gcc-interface/misc.c (enumerate_modes): Handle polynomial
3987 GET_MODE_NUNITS.
3988
3989 2018-01-03 Jakub Jelinek <jakub@redhat.com>
3990
3991 Update copyright years.
3992
3993 * gnat_ugn.texi: Bump @copying's copyright year.
3994 * gnat_rm.texi: Likewise.
3995 \f
3996 Copyright (C) 2018 Free Software Foundation, Inc.
3997
3998 Copying and distribution of this file, with or without modification,
3999 are permitted in any medium without royalty provided the copyright
4000 notice and this notice are preserved.