[multiple changes]
[gcc.git] / gcc / ada / ChangeLog
1 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2
3 * sem_warn.adb (Warn_On_Overlapping_Actuals): Refine previous
4 fix and preserve older GNAT warning on overlapping actuals that
5 are not elementary types.
6
7 2017-09-06 Justin Squirek <squirek@adacore.com>
8
9 * sem_attr.adb: Comment correction.
10
11 2017-09-06 Gary Dismukes <dismukes@adacore.com>
12
13 * sem_util.adb: Minor reformatting.
14
15 2017-09-06 Yannick Moy <moy@adacore.com>
16
17 * a-comlin.ads (Argument): Add precondition for analysis.
18
19 2017-09-06 Yannick Moy <moy@adacore.com>
20
21 * sem_res.adb (Resolve): Update message for function call as statement.
22
23 2017-09-06 Ed Schonberg <schonberg@adacore.com>
24
25 * sem_ch6.adb (Check_Returns): Clean up warnings coming from
26 generated bodies for renamings that are completions, when renamed
27 procedure is No_Return.
28 * sem_ch8.adb (Analyze_Subprogram_Renaming): Implement legality
29 rule in 6.5.1 (7/2): if a renaming is a completion of a subprogram
30 with No_Return, the renamed entity must be No_Return as well.
31
32 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
33
34 * exp_ch5.adb, freeze.adb, exp_ch4.adb, exp_ch6.adb, lib-xref.adb:
35 Minor reformatting.
36
37 2017-09-06 Justin Squirek <squirek@adacore.com>
38
39 * exp_attr.adb (Expand_N_Attribute_Reference): Modified Image
40 attribute cases (Rewrite_Object_Reference_Image): Created to
41 aid the rewriting of new-style 'Image attributes.
42 * sem_attr.adb (Analyze_Attribute): Modified Image attribute cases
43 (Check_Object_Reference_Image): Created to handle verification of
44 'Image with object-references as prefixes.
45 * sem_util.ads, sem_util.adb (Is_Image_Applied_To_Object):
46 Create predicate to identify cases where an 'Image attribute's
47 prefix applies to an object reference.
48
49 2017-09-06 Ed Schonberg <schonberg@adacore.com>
50
51 * freeze.adb (Freeze_Entity): Do not generate a freeze
52 node for a generic unit, even if it includes delayed aspect
53 specifications. Freeze nodes for generic entities must never
54 appear in the tree that reaches the back-end of the compiler.
55
56 2017-09-06 Yannick Moy <moy@adacore.com>
57
58 * treepr.adb (Print_Entity_Info): Do not print empty Elist.
59
60 2017-09-06 Yannick Moy <moy@adacore.com>
61
62 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do not consider calls
63 to subprograms in other units as possibly inlined.
64
65 2017-09-06 Ed Schonberg <schonberg@adacore.com>
66
67 * freeze.adb (Freeze_Entity): For a derived type that has no
68 explicit delayed aspects but may inherit delayed aspects from its
69 parent type, analyze aspect at freeze point for proper capture
70 of an inherited aspect.
71
72 2017-09-06 Arnaud Charlet <charlet@adacore.com>
73
74 * lib-xref.adb (Get_Through_Renamings): Get through subprogram
75 renamings; also, avoid repeated calls to Renamed_Object when getting
76 through object renamings.
77
78 2017-09-06 Ed Schonberg <schonberg@adacore.com>
79
80 * sem_ch3.adb (Array_Type_Declaration): Handle properly an
81 array type declaration in a private part, when an index is a
82 subtype indication of a discrete type with a private partial view.
83
84 2017-09-06 Javier Miranda <miranda@adacore.com>
85
86 * exp_ch4.adb (Expand_Modular_Op): Force generating
87 temporary to improve the generated code.
88
89 2017-09-06 Tristan Gingold <gingold@adacore.com>
90
91 * s-fatgen.adb: Minor typo fix in comment.
92
93 2017-09-06 Ed Schonberg <schonberg@adacore.com>
94
95 * exp_ch5.adb (Make_Field_Assign): If the type
96 of the right-hand side has stored constraint, use its values
97 (except for those that are renamings of parent discriminants)
98 to produce additional assignments for the discriminants of the
99 left-hand side, which are invisible in the righ-hand side and
100 not retrievable as selected components.
101
102 2017-09-06 Ed Schonberg <schonberg@adacore.com>
103
104 * sem_util.adb (Needs_One_Formal): The first formal of such a
105 function must be a controlling formal, so that Obj.F (X, Y)
106 can have the interpretation F(Obj)(X, Y).
107 * sem_util.ads: Clarify documentation.
108
109 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
110
111 * table.ads, table.adb: Restore original implementation.
112 * namet.h (Names_Ptr): Adjust back.
113 (Name_Chars_Ptr): Likewise.
114 * uintp.h (Uints_Ptr): Likewise.
115 (Udigits_Ptr): Likewise.
116 * g-table.ads: Remove pragma Compiler_Unit_Warning.
117 * par_sco.adb: Do not with GNAT.Table and use Table consistently.
118 * scos.ads: Replace GNAT.Table with Table and adjust instantiations.
119 * spark_xrefs.ads: Likewise.
120 * scos.h: Undo latest changes.
121
122 2017-09-06 Ed Schonberg <schonberg@adacore.com>
123
124 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Propagate
125 No_Return flag to instance if pragma applies to generic unit. This
126 must be done explicitly because the pragma does not appear
127 directly in the generic declaration (unlike the corresponding
128 aspect specification).
129
130 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
131
132 * sem_ch7.adb (Has_Referencer): Move up and expand comment
133 explaining the test used to detect inlining. Use same test
134 in second occurrence.
135 (Analyze_Package_Body_Helper): Minor formatting fixes.
136
137 2017-09-06 Ed Schonberg <schonberg@adacore.com>
138
139 * exp_ch4.adb (Handle_Changed_Representation): For an untagged
140 derived type with a mixture of renamed and constrained parent
141 discriminants, the constraint for the target must obtain the
142 discriminant values from both the operand and from the stored
143 constraint for it, given that the constrained discriminants are
144 not visible in the object.
145 * exp_ch5.adb (Make_Field_Assign): The type of the right-hand
146 side may be derived from that of the left-hand side (as in the
147 case of an assignment with a change of representation) so the
148 discriminant to be used in the retrieval of the value of the
149 component must be the entity in the type of the right-hand side.
150
151 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
152
153 * sem_ch3.adb, sem_ch7.adb, sem_util.adb, g-debpoo.adb, sem_ch4.adb,
154 sem_ch6.adb, sem_ch8.adb: Minor reformatting.
155 * exp_util.adb (Is_Source_Object): Account for
156 the cases where the source object may appear as a dereference
157 or within a type conversion.
158 * exp_ch6.adb: Fix missing space in error message.
159
160 2017-09-06 Ed Schonberg <schonberg@adacore.com>
161
162 * sem_prag.adb: Update description of Eliminate.
163
164 2017-09-06 Ed Schonberg <schonberg@adacore.com>
165
166 * sem_attr.adb (Analyze_Attribute, case 'Loop_Entry): Handle
167 properly an attribute reference 'Loop_Entry that appears in the
168 list of indices of an indexed expression, to prevent an infinite
169 loop in the compiler.
170
171 2017-09-06 Bob Duff <duff@adacore.com>
172
173 * s-fileio.adb (Name): Do not raise Use_Error for temp files.
174
175 2017-09-06 Ed Schonberg <schonberg@adacore.com>
176
177 * sem_ch4.adb (Analyze_Set_Membership): If an alternative
178 in a set membership is an overloaded enumeration literal, and
179 the type of the alternative is resolved from a previous one,
180 replace the entity of the alternative as well as the type,
181 to prevent inconsistencies between the entity and the type.
182
183 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
184
185 * ali.ads (ALIs_Record): Add No_Component_Reordering component.
186 (No_Component_Reordering_Specified): New switch.
187 * ali.adb (Initialize_ALI): Set No_Component_Reordering_Specified.
188 (Scan_ALI): Set No_Component_Reordering and deal with NC marker.
189 * bcheck.adb (Check_Consistent_No_Component_Reordering):
190 New check.
191 (Check_Configuration_Consistency): Invoke it.
192 * debug.adb (d.r): Toggle the effect of the switch.
193 (d.v): Change to no-op.
194 * einfo.ads (Has_Complex_Representation):
195 Restrict to record types.
196 (No_Reordering): New alias for Flag239.
197 (OK_To_Reorder_Components): Delete.
198 (No_Reordering): Declare.
199 (Set_No_Reordering): Likewise.
200 (OK_To_Reorder_Components): Delete.
201 (Set_OK_To_Reorder_Components): Likewise.
202 * einfo.adb (Has_Complex_Representation): Expect record types.
203 (No_Reordering): New function.
204 (OK_To_Reorder_Components): Delete.
205 (Set_Has_Complex_Representation): Expect base record types.
206 (Set_No_Reordering): New procedure.
207 (Set_OK_To_Reorder_Components): Delete.
208 (Write_Entity_Flags): Adjust to above change.
209 * fe.h (Debug_Flag_Dot_R): New macro and declaration.
210 * freeze.adb (Freeze_Record_Type): Remove conditional code setting
211 OK_To_Reorder_Components on record types with convention Ada.
212 * lib-writ.adb (Write_ALI): Deal with NC marker.
213 * opt.ads (No_Component_Reordering): New flag.
214 (No_Component_Reordering_Config): Likewise.
215 (Config_Switches_Type): Add No_Component_Reordering component.
216 * opt.adb (Register_Opt_Config_Switches): Copy
217 No_Component_Reordering onto No_Component_Reordering_Config.
218 (Restore_Opt_Config_Switches): Restore No_Component_Reordering.
219 (Save_Opt_Config_Switches): Save No_Component_Reordering.
220 (Set_Opt_Config_Switches): Set No_Component_Reordering.
221 * par-prag.adb (Prag): Deal with Pragma_No_Component_Reordering.
222 * sem_ch3.adb (Analyze_Private_Extension_Declaration): Also set the
223 No_Reordering flag from the default.
224 (Build_Derived_Private_Type): Likewise.
225 (Build_Derived_Record_Type): Likewise. Then inherit it
226 for untagged types and clean up handling of similar flags.
227 (Record_Type_Declaration): Likewise.
228 * sem_ch13.adb (Same_Representation): Deal with No_Reordering and
229 remove redundant test on Is_Tagged_Type.
230 * sem_prag.adb (Analyze_Pragma): Handle No_Component_Reordering.
231 (Sig_Flags): Likewise.
232 * snames.ads-tmpl (Name_No_Component_Reordering): New name.
233 (Pragma_Id): Add Pragma_No_Component_Reordering value.
234 * warnsw.adb (Set_GNAT_Mode_Warnings): Enable -gnatw.q as well.
235 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>:
236 Copy the layout of the parent type only if the No_Reordering
237 settings match.
238 (components_to_record): Reorder record types with
239 convention Ada by default unless No_Reordering is set or -gnatd.r
240 is specified and do not warn if No_Reordering is set in GNAT mode.
241
242 2017-09-06 Ed Schonberg <schonberg@adacore.com>
243
244 * sem_util.ads, sem_util.adb (Check_Previous_Null_Procedure):
245 new predicate to reject declarations that can be completions,
246 when there is a visible prior homograph that is a null procedure.
247 * sem_ch6.adb (Analyze_Null_Procedure): use it.
248 * sem_ch8.adb (Analyze_Subprogram_Renaming): ditto.
249
250 2017-09-06 Thomas Quinot <quinot@adacore.com>
251
252 * s-regpat.adb (Compile.Parse_Literal): Fix handling of literal
253 run of 253 characters or more.
254
255 2017-09-06 Ed Schonberg <schonberg@adacore.com>
256
257 * einfo.adb (Designated_Type): Use Is_Incomplete_Type to handle
258 properly incomplete subtypes that may be created by explicit or
259 implicit declarations.
260 (Is_Base_Type): Take E_Incomplete_Subtype into account.
261 (Subtype_Kind): Ditto.
262 * sem_ch3.adb (Build_Discriminated_Subtype): Set properly the
263 Ekind of a subtype of a discriminated incomplete type.
264 (Fixup_Bad_Constraint): Use Subtype_Kind in all cases, including
265 incomplete types, to preserve error reporting.
266 (Process_Incomplete_Dependents): Do not create a subtype
267 declaration for an incomplete subtype that is created internally.
268 * sem_ch7.adb (Analyze_Package_Specification): Handle properly
269 incomplete subtypes that do not require a completion, either
270 because they are limited views, of they are generic actuals.
271
272 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
273
274 * checks.adb (Insert_Valid_Check): Remove the
275 suspicious manipulation of the Do_Range_Check flag as ths is
276 no linger needed. Suppress validity check when analysing the
277 validation variable.
278
279 2017-09-06 Philippe Gil <gil@adacore.com>
280
281 * g-debpoo.adb: adapt GNAT.Debug_Pools to allow safe thread
282 GNATCOLL.Memory
283
284 2017-09-06 Bob Duff <duff@adacore.com>
285
286 * sem_elim.adb: Minor comment fix.
287
288 2017-09-06 Ed Schonberg <schonberg@adacore.com>
289
290 * sem_util.adb (Is_Object_Reference): A function call is an
291 object reference, and thus attribute references for attributes
292 that are functions (such as Pred and Succ) as well as predefined
293 operators are legal in contexts that require an object, such as
294 the prefix of attribute Img and the Ada2020 version of 'Image.
295
296 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
297
298 * exp_util.adb, einfo.adb, sem_attr.adb, exp_ch4.adb, gnatls.adb,
299 exp_ch3.adb, xoscons.adb: Minor reformatting.
300
301 2017-09-06 Raphael Amiard <amiard@adacore.com>
302
303 * a-chtgop.ads, a-chtgop.adb: Add versions of First and Next with
304 Position parameter. If supplied, use it to provide efficient iteration.
305 * a-cohase.ads, a-cohase.adb, a-cihama.ads, a-cihama.adb,
306 a-cohama.ads, a-cohama.adb: Add/Use Position to provide efficient
307 iteration.
308
309 2017-09-06 Ed Schonberg <schonberg@adacore.com>
310
311 * exp_util.adb (Build_Allocate_Deallocate_Proc): If the
312 designated type is class-wide and the expression is an unchecked
313 conversion, preserve the conversion when checking the tag of the
314 designated object, to prevent spurious semantic errors when the
315 expression in the conversion has an untagged type (for example
316 an address attribute).
317
318 2017-09-06 Ed Schonberg <schonberg@adacore.com>
319
320 * sem_res.adb (Resolve_Entry_Call): Check whether a protected
321 operation is subject to a pragma Eliminate.
322
323 2017-09-06 Ed Schonberg <schonberg@adacore.com>
324
325 * sem_elim.ads, exp_ch4.adb: Minor reformatting.
326
327 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
328
329 * fe.h (Eliminate_Error_Msg): Remove.
330
331 2017-09-05 Richard Sandiford <richard.sandiford@linaro.org>
332
333 * gcc-interface/utils.c (make_packable_type): Update call to
334 mode_for_size_tree.
335
336 2017-09-05 Richard Sandiford <richard.sandiford@linaro.org>
337
338 * gcc-interface/utils2.c (build_load_modify_store):
339 Use int_mode_for_size.
340
341 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
342
343 PR ada/62235
344 * gcc-interface/decl.c (gnat_to_gnu_entity): Skip regular processing
345 for Itypes that are E_Record_Subtype with a cloned subtype.
346 <E_Record_Subtype>: Use the DECL of the cloned type directly, if any.
347
348 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
349
350 * gcc-interface/trans.c (convert_with_check): Use a custom base type
351 if the base type of the expression has a different machine mode.
352 Rename a couple of parameters and local variable.
353
354 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
355
356 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Address>: Do not strip
357 conversions around prefixes that are not references.
358
359 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
360
361 * gcc-interface/utils.c (unchecked_convert): When the result type is a
362 non-biased integral type with size 0, set the result to 0 directly.
363
364 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
365
366 * gcc-interface/gigi.h (renaming_from_generic_instantiation_p): Turn to
367 (renaming_from_instantiation_p): ...this.
368 * gcc-interface/decl.c (gnat_to_gnu_entity): Use inline predicate
369 instead of explicit tests on kind of entities. Adjust for renaming.
370 (gnat_to_gnu_profile_type): Likewise.
371 (gnat_to_gnu_subprog_type): Likewise.
372 * gcc-interface/trans.c (Identifier_to_gnu): Likewise.
373 (Case_Statement_to_gnu): Likewise.
374 (gnat_to_gnu): Likewise.
375 (process_freeze_entity): Likewise.
376 (process_type): Likewise.
377 (add_stmt_with_node): Adjust for renaming.
378 * gcc-interface/utils.c (gnat_pushdecl): Adjust for renaming.
379 (renaming_from_generic_instantiation_p): Rename to...
380 (renaming_from_instantiation_p): ...this. Use inline predicate.
381 (pad_type_hasher::keep_cache_entry): Fold.
382
383 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
384
385 * gcc-interface/trans.c (adjust_for_implicit_deref): New function.
386 (gnat_to_gnu) <N_Explicit_Dereference>: Translate result type first.
387 (N_Indexed_Component): Invoke adjust_for_implicit_deref on the prefix.
388 (N_Slice): Likewise.
389 (N_Selected_Component): Likewise. Do not try again to translate it.
390 (N_Free_Statement): Invoke adjust_for_implicit_deref on the expression.
391
392 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
393
394 * repinfo.ads: Document new treatment of dynamic values.
395 (TCode): Bump upper bound to 29.
396 (Dynamic_Val): New constant set to 29.
397 * repinfo.adb (Print_Expr) <Dynamic_Val>: New case.
398 (Rep_Value) <Dynamic_Val>: Likewise.
399 * repinfo.h (Dynamic_Val): New macro.
400 * gcc-interface/decl.c (annotate_value): Tidy up and cache result for
401 DECL_P nodes too.
402 <INTEGER_CST>: Set TCODE instead of recursing.
403 <COMPONENT_REF>: Set TCODE instead of calling Create_Node manually.
404 <VAR_DECL>: New case.
405 <MULT_EXPR, PLUS_EXPR>: Fold conversions into inner operations.
406 <BIT_AND_EXPR>: Adjust.
407 <CALL_EXPR>: Do not fall through.
408
409 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
410
411 * gcc-interface/trans.c (Call_to_gnu): If this is a function call and
412 there is no target, do not create a temporary for the return value for
413 an allocator either.
414
415 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
416
417 * gcc-interface/trans.c (pos_to_constructor): Skip conversions to an
418 unconstrained array type.
419
420 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
421 Alan Hayward <alan.hayward@arm.com>
422 David Sherwood <david.sherwood@arm.com>
423
424 * gcc-interface/decl.c (validate_size): Use NARROWEST_INT_MODE
425 instead of GET_CLASS_NARROWEST_MODE (MODE_INT).
426
427 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
428 Alan Hayward <alan.hayward@arm.com>
429 David Sherwood <david.sherwood@arm.com>
430
431 * gcc-interface/decl.c (check_ok_for_atomic_type): Use
432 is_a <scalar_int_mode>.
433 * gcc-interface/trans.c (Pragma_to_gnu): Likewise.
434 * gcc-interface/utils.c (gnat_type_for_mode): Likewise.
435
436 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
437 Alan Hayward <alan.hayward@arm.com>
438 David Sherwood <david.sherwood@arm.com>
439
440 * gcc-interface/decl.c (gnat_to_gnu_entity): Use int_mode_for_size
441 instead of mode_for_size.
442 (gnat_to_gnu_subprog_type): Likewise.
443 * gcc-interface/utils.c (make_type_from_size): Likewise.
444
445 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
446 Alan Hayward <alan.hayward@arm.com>
447 David Sherwood <david.sherwood@arm.com>
448
449 * gcc-interface/misc.c (fp_prec_to_size): Use opt_scalar_float_mode.
450 (fp_size_to_prec): Likewise.
451
452 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
453 Alan Hayward <alan.hayward@arm.com>
454 David Sherwood <david.sherwood@arm.com>
455
456 * gcc-interface/utils.c (gnat_type_for_mode): Use is_a
457 <scalar_float_mode> instead of SCALAR_FLOAT_MODE_P.
458
459 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
460 Alan Hayward <alan.hayward@arm.com>
461 David Sherwood <david.sherwood@arm.com>
462
463 * gcc-interface/decl.c (validate_size): Update use of
464 GET_MODE_WIDER_MODE, forcing a wider mode to exist.
465
466 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
467 Alan Hayward <alan.hayward@arm.com>
468 David Sherwood <david.sherwood@arm.com>
469
470 * gcc-interface/misc.c (fp_prec_to_size): Use new mode iterators.
471 (fp_size_to_prec): Likewise.
472
473 2017-08-29 Martin Liska <mliska@suse.cz>
474
475 PR other/39851
476 * gcc-interface/trans.c (Pragma_to_gnu): Set argument to NULL.
477
478 2017-08-08 Martin Liska <mliska@suse.cz>
479
480 * gcc-interface/trans.c: Include header files.
481
482 2017-07-29 Jakub Jelinek <jakub@redhat.com>
483
484 * gcc-interface/utils.c (gnat_write_global_declarations): Pass false
485 as new argument to the imported_module_or_decl debug hook.
486
487 2017-07-25 Javier Miranda <miranda@adacore.com>
488
489 * checks.adb (Apply_Divide_Checks): Ensure that operands are not
490 evaluated twice.
491
492 2017-07-19 Jakub Jelinek <jakub@redhat.com>
493
494 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE,
495 TYPE_GCC_MIN_VALUE): Use TYPE_MIN_VALUE_RAW instead of TYPE_MINVAL.
496 (TYPE_GCC_MAX_VALUE): Use TYPE_MAX_VALUE_RAW instead of TYPE_MAXVAL.
497
498 2017-07-18 Mike Frysinger <vapier@chromium.org>
499
500 * gcc-interface/Makefile.in (../../gnatmake$(exeext)): Delete $(P).
501 (../../gnatlink$(exeext)): Likewise.
502
503 2017-07-15 John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
504
505 PR ada/81446
506 * system-linux-m68k.ads: Add pragma No_Elaboration_Code_All.
507 (Backend_Overflow_Checks): Set to True.
508
509 2017-06-23 Jakub Jelinek <jakub@redhat.com>
510
511 * gcc-interface/trans.c (gnat_to_gnu): Initialize sync to false.
512
513 2017-06-21 Pierre-Marie de Rodat <derodat@adacore.com>
514
515 * gcc-interface/ada-tree.h (DECL_FUNCTION_IS_DEF): Update copyright
516 notice. New macro.
517 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Tag the subprogram
518 as a definition.
519 (Compilation_Unit_to_gnu): Tag the elaboration procedure as a
520 definition.
521 * gcc-interface/decl.c (gnat_to_gnu_entity): Tag declarations of
522 imported subprograms for the current compilation unit as
523 definitions. Disable debug info for references to variables.
524 * gcc-interface/gigi.h (create_subprog_decl): Update declaration.
525 * gcc-interface/utils.c (gnat_pushdecl): Add external DECLs that are
526 not built-in functions to their binding scope.
527 (create_subprog_decl): Add a DEFINITION parameter. If it is true, tag
528 the function as a definition. Update all callers.
529 (gnat_write_global_declarations): Emit debug info for imported
530 functions. Filter out external variables for which debug info
531 is disabled.
532
533 2017-06-15 Nicolas Boulenguez <nicolas.boulenguez@free.fr>
534
535 PR ada/81105
536 * gcc-interface/Makefile.in (x86 kfreebsd): Adjust system.ads setting.
537 (i[3456]86-pc-gnu): Likewise.
538 (x86_64 kfreebsd): Likewise.
539
540 2017-06-12 Eric Botcazou <ebotcazou@adacore.com>
541
542 PR bootstrap/80897
543 * exp_ch3.adb (Make_Predefined_Primitive_Specs): Use Positive index.
544
545 2017-06-12 Eric Botcazou <ebotcazou@adacore.com>
546
547 PR ada/81070
548 * s-interr-hwint.adb: Reinstate.
549 * gcc-interface/Makefile.in (RTEMS): Use it again.
550
551 2017-06-08 Olivier Hainque <hainque@adacore.com>
552
553 * vx_crtbegin_auto.c: Update year in copyright notice.
554 * vx_crtbegin.c: Likewise.
555 * vx_crtbegin.inc: Likewise.
556 * vx_crtend.c: Likewise.
557
558 2017-06-07 Sebastian Huber <sebastian.huber@embedded-brains.de>
559
560 * Makefile.in (rtems): Use TLS implementation for s-tpopsp.adb.
561 * s-tpopsp-rtems.adb: Delete.
562
563 2017-06-02 Olivier Hainque <hainque@adacore.com>
564
565 * vx_crtbegin_auto.c: New file.
566 * vx_crtbegin.c: New file.
567 * vx_crtbegin.inc: New file.
568 * vx_crtend.c: New file.
569
570 2017-05-25 Jonathan Wakely <jwakely@redhat.com>
571
572 * gcc-interface/utils2.c (compare_elmt_bitpos): Remove redundant
573 const qualifiers that cause -Wignored-qualifiers warnings.
574
575 2017-05-22 Eric Botcazou <ebotcazou@adacore.com>
576
577 * gcc-interface/decl.c (gnat_to_gnu_entity): Skip regular processing
578 for Itypes that are E_Access_Subtype.
579 <E_Access_Subtype>: Use the DECL of the base type directly.
580
581 2017-05-22 Ed Schonberg <schonberg@adacore.com>
582 Eric Botcazou <ebotcazou@adacore.com>
583
584 * sem_ch4.adb (Analyze_Call): In Ada2012 an incomplete type from a
585 limited view may appear in the profile of a function, and a call to
586 that function in another unit in which the full view is available must
587 use this full view to spurious type errors at the point of call.
588 * inline.adb (Analyze_Inlined_Bodies): Remove restriction on loading
589 of parent body with a with clause for the main unit.
590 * gcc-interface/decl.c (defer_limited_with_list): Document new usage.
591 (gnat_to_gnu_entity) <E_Access_Type>: Handle completed Taft Amendment
592 types declared in external units like types from limited with clauses.
593 Adjust final processing of defer_limited_with_list accordingly.
594 * gcc-interface/trans.c (gnat_to_gnu) < N_Selected_Component>: Try
595 again to translate the prefix after the field if it is incomplete.
596
597 2017-05-22 Eric Botcazou <ebotcazou@adacore.com>
598
599 * gcc-interface/decl.c (gnat_to_gnu_field): Do not enforce strict
600 alignment for simple volatile fields and remove associated errors.
601
602 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
603
604 * gcc-interface/gigi.h (get_elaboration_procedure): Delete.
605 * gcc-interface/trans.c (get_elaboration_procedure): Make static.
606
607 2017-05-15 Pierre-Marie de Rodat <derodat@adacore.com>
608
609 * gcc-interface/utils.c (can_materialize_object_renaming_p):
610 Synchronize with GNAT's Exp_Dbug.Debug_Renaming_Declaration:
611 process Original_Node instead of expanded names.
612
613 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
614
615 * gcc-interface/trans.c (return_value_ok_for_nrv_p): Only apply the
616 addressability check in the constrained case.
617
618 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
619
620 * gcc-interface/trans.c (Identifier_to_gnu): Also accept incomplete
621 types not coming from a limited context.
622
623 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
624
625 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Skip subprograms on
626 the inlined list that are not public.
627 * gcc-interface/utils.c (create_subprog_decl): Clear TREE_PUBLIC if
628 there is a pragma Inline_Always on the subprogram.
629
630 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
631
632 * gcc-interface/trans.c (gnat_to_gnu) <N_Aggregate>: Fix formatting.
633 <N_Allocator>: Use properly typed constants.
634 (extract_values): Move around.
635 (pos_to_constructor): Minor tweaks.
636 (Sloc_to_locus): Fix formatting.
637 * gcc-interface/utils.c (process_deferred_decl_context): Minor tweaks.
638 * gcc-interface/gigi.h (MARK_VISITED): Remove blank line.
639 (Gigi_Equivalent_Type): Adjust head comment.
640 * gcc-interface/decl.c (Gigi_Equivalent_Type): Likewise.
641
642 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
643
644 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: When there
645 is a representation clause on an extension, propagate the alignment of
646 the parent type only if the platform requires strict alignment.
647
648 2017-05-12 Eric Botcazou <ebotcazou@adacore.com>
649
650 * system-linux-arm.ads (Memory_Size): Use Long_Integer'Size
651 instead of Word_Size.
652
653 Revert
654 2017-03-28 Andreas Schwab <schwab@suse.de>
655
656 PR ada/80117
657 * system-linux-aarch64-ilp32.ads: New file.
658 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS_COMMON): Rename
659 from LIBGNAT_TARGET_PAIRS.
660 (LIBGNAT_TARGET_PAIRS_32, LIBGNAT_TARGET_PAIRS_64): Define.
661 (LIBGNAT_TARGET_PAIRS): Use LIBGNAT_TARGET_PAIRS_COMMON, and
662 LIBGNAT_TARGET_PAIRS_64 or LIBGNAT_TARGET_PAIRS_32 for -mabi=lp64
663 or -mabi=ilp32, resp.
664
665 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
666
667 PR ada/80626
668 * system-linux-x86.ads (Memory_Size): Use Long_Integer'Size
669 instead of Word_Size.
670
671 2017-05-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
672
673 * raise-gcc.c (exception_class_eq): Make ec parameter const.
674
675 2017-05-02 Richard Biener <rguenther@suse.de>
676
677 * gcc-interface/misc.c (gnat_post_options): Do not set
678 -fstrict-overflow.
679
680 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
681
682 * gcc-interface/trans.c (assoc_to_constructor): Make sure
683 Corresponding_Discriminant is only called on discriminants.
684 Skip the saving of the result only for them.
685 (gnat_to_gnu) <N_Selected_Component>: Likewise.
686 <N_Unchecked_Type_Conversion>: Translate the result type first.
687 (gigi): Set TREE_NOTHROW on Begin_Handler.
688 (stmt_list_cannot_raise_p): New predicate.
689 (Exception_Handler_to_gnu_gcc): Emit a simple final call instead of
690 a cleanup if the statements of the handler cannot raise.
691 (process_freeze_entity): Use Is_Record_Type.
692 (process_type): Likewise.
693
694 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
695
696 * einfo.ads (Corresponding_Record_Component): New alias
697 for Node21 used for E_Component and E_Discriminant.
698 * einfo.adb (Corresponding_Record_Component): New function.
699 (Set_Corresponding_Record_Component): New procedure.
700 (Write_Field21_Name): Handle Corresponding_Record_Component.
701 * sem_ch3.adb (Inherit_Component): Set
702 Corresponding_Record_Component for every component in
703 the untagged case. Clear it afterwards for non-girder
704 discriminants.
705 * gcc-interface/decl.c (gnat_to_gnu_entity)
706 <E_Record_Type>: For a derived untagged type with discriminants
707 and constraints, apply the constraints to the layout of the
708 parent type to deduce the layout.
709 (field_is_aliased): Delete.
710 (components_to_record): Test DECL_ALIASED_P directly.
711 (annotate_rep): Check that fields are present except for
712 an extension.
713 (create_field_decl_from): Add DEBUG_INFO_P
714 parameter and pass it in recursive and other calls. Add guard
715 for the manual CSE on the size.
716 (is_stored_discriminant): New predicate.
717 (copy_and_substitute_in_layout): Consider only
718 stored discriminants and check that original fields are present
719 in the old type. Deal with derived types. Adjust call to
720 create_variant_part_from.
721
722 2017-05-02 Ed Schonberg <schonberg@adacore.com>
723
724 * exp_ch6.adb (Expand_Call_Helper): When locating the
725 accessibility entity created for an access parameter, handle
726 properly a reference to a formal of an enclosing subprogram. if
727 the reference appears in an inherited class-wide condition, it
728 is the rewriting of the reference in the ancestor expression,
729 but the accessibility entity must be that of the current formal.
730
731 2017-05-02 Javier Miranda <miranda@adacore.com>
732
733 * exp_ch4.adb (Expand_Non_Binary_Modular_Op): New subprogram.
734 (Expand_N_Op_Add, Expand_N_Op_Divide, Expand_N_Op_Minus,
735 Expand_N_Op_Multiply, Expand_N_Op_Or, Expand_N_Op_Subtract):
736 Call Expand_Non_Binary_Modular_Op.
737
738 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
739
740 * sem_ch3.adb (Build_Derived_Private_Type): If the parent type
741 has discriminants, do not override the Stored_Constraint list of
742 the full view of the derived type with that of the derived type.
743
744 2017-05-02 Bob Duff <duff@adacore.com>
745
746 * sem_attr.adb (Attribute_Enum_Rep): Disallow T'Enum_Rep.
747
748 2017-05-02 Vasiliy Fofanov <fofanov@adacore.com>
749
750 * s-os_lib.ads: Minor typo fix.
751
752 2017-05-02 Vasiliy Fofanov <fofanov@adacore.com>
753
754 * gnatls.adb: Merge and refactor code from Prj.Env and remove
755 this deprecated dependency.
756
757 2017-05-02 Ed Schonberg <schonberg@adacore.com>
758
759 * exp_util.ads: minor comment addition.
760
761 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
762
763 * sem_ch3.adb (Build_Derived_Record_Type): Fix a few typos and
764 pastos in part #3 of the head comment.
765
766 2017-05-02 Ed Schonberg <schonberg@adacore.com>
767
768 * exp_ch3.adb (Freeze_Type): Do not generate an invariant
769 procedure body for a local (sub)type declaration within a
770 predicate function. Invariant checks do not apply to these, and
771 the expansion of the procedure will happen in the wrong scope,
772 leading to misplaced freeze nodes.
773
774 2017-05-02 Ed Schonberg <schonberg@adacore.com>
775
776 * exp_util.adb (Insert_Library_Level_Action): Use proper scope
777 to analyze generated actions. If the main unit is a body,
778 the required scope is that of the corresponding unit declaration.
779
780 2017-05-02 Arnaud Charlet <charlet@adacore.com>
781
782 * einfo.adb (Declaration_Node): flip branches of
783 an IF statement to avoid repeated negations in its condition;
784 no change in semantics, only to improve readability.
785
786 2017-05-02 Arnaud Charlet <charlet@adacore.com>
787
788 * sem_case.adb: Remove extra spaces in parameter declarations.
789
790 2017-05-02 Justin Squirek <squirek@adacore.com>
791
792 * usage.adb: Replace space with hyphen ("run time" -> "run-time")
793 in usage line for new -gnatwE switch.
794
795 2017-05-02 Claire Dross <dross@adacore.com>
796
797 * a-cofuve.ads (Remove): Remove unnecessary
798 conditions in precondition.
799
800 2017-05-02 Vasiliy Fofanov <fofanov@adacore.com>
801
802 * a-stream.ads, exp_imgv.adb, sem_ch10.adb,
803 sem_attr.adb, s-finmas.ads, osint.adb: Minor typo fix.
804
805 2017-05-02 Justin Squirek <squirek@adacore.com>
806
807 * sem_ch4.adb (Analyze_Case_Expression): Add check for valid
808 alternative expression.
809 * sem_res.adb (Resolve_Case_Expression): Ditto.
810
811 2017-05-02 Ed Schonberg <schonberg@adacore.com>
812
813 * exp_disp.adb (Set_All_DT_Position, In_Predef_Prim_DT):
814 Refine predicate for the case where the primitive operation
815 is a renaming of equality. An overriding operation that is
816 a user-defined renaming of predefined equality inherits its
817 slot from the overridden operation. Otherwise it is treated
818 as a predefined op and occupies the same predefined slot as
819 equality. A call to it is transformed into a call to its alias,
820 which is the predefined equality. A dispatching call thus uses
821 the proper slot if operation is further inherited and called
822 with class-wide arguments.
823
824 2017-05-02 Justin Squirek <squirek@adacore.com>
825
826 * errout.adb (Set_Msg_Text): Add a case to switch the message
827 type when the character '[' is detected signifying a warning
828 about a run-time exception.
829 * opt.ads Add a new Warning_Mode value for new switch
830 * switch-b.adb (Scan_Binder_Switches): Add case for the binder
831 to handle new warning mode
832 * usage.adb (Usage): Add usage entry for -gnatwE
833 * warnsw.adb (Set_Warning_Switch): Add case for the new switch
834
835 2017-05-02 Ed Schonberg <schonberg@adacore.com>
836
837 * sem_prag.adb (Process_Conversion): Reject an intrinsic operator
838 declaration that operates on some fixed point type.
839
840 2017-05-02 Justin Squirek <squirek@adacore.com>
841
842 * a-crbtgo.adb, s-taasde.adb: Remove unused use-type clauses.
843
844 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
845
846 * sem_ch6.adb (Analyze_Null_Procedure): Revert previous change.
847
848 2017-05-02 Justin Squirek <squirek@adacore.com>
849
850 * sem_ch4.adb (Analyze_Case_Expression): Add check for valid
851 expression (Analyze_If_Expression): Add check for valid condition
852 * sem_eval.adb (Eval_Case_Expression): Add check for error posted
853 on case-expression
854 * sem_res.adb (Resolve_If_Expression): Add check for valid
855 condition and then-expression.
856
857 2017-05-02 Ed Schonberg <schonberg@adacore.com>
858
859 * exp_ch3.adb (Build_Initialization_Call): Generate a null
860 statement if the initialization call is a null procedure, as
861 can happen with a controlled type with no explicit Initialize
862 procedure, or an array of such.
863 * exp_ch7.adb (Process_Object_Declaration): For a type with
864 controlled components that has a trivial Initialize procedure,
865 insert declaration for finalization counter after object
866 declaration itself.
867 (Make_Deep_Array_Body, Build_Initialize_statements): Do not create
868 finalization block and attendant declarations if component has
869 a trivial Initialize procedure.
870 (Make_Init_Call): Do not generate a call if controlled type has
871 a trivial Initialize procedure.
872
873 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
874
875 * g-forstr.ads (Data): Move Format component last.
876 * g-forstr.adb ("+"): Adjust for above change.
877 * g-rewdat.ads (Buffer): Move Buffer, Current, Pattern and Value last.
878 * g-sechas.ads (Context): Move Key last.
879 * g-socket.ads (Service_Entry_Type): Move Aliases last.
880 * s-fileio.adb (Temp_File_Record): Move Name last.
881 * s-regexp.adb (Regexp_Value): Move Case_Sensitive last.
882 * xr_tabls.ads (Project_File): Move Src_Dir and Obj_Dir last.
883
884 2017-05-02 Jerome Lambourg <lambourg@adacore.com>
885
886 * bindusg.adb, bindgen.adb, gnatbind.adb, opt.ads: Remove the -nognarl
887 switch introduced recently. finally not needed.
888
889 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
890
891 * sem_ch6.adb (Analyze_Null_Procedure): Set the
892 Corresponding_Body link for a null procedure declaration.
893
894 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
895
896 * atree.h (Flag290): Add missing terminating parenthesis.
897 * einfo.adb (Is_Class_Wide_Clone): Use Flag290.
898 (Set_Is_Class_Wide_Clone): Likewise.
899 * einfo.ads (Is_Class_Wide_Clone): Likewise.
900
901 2017-05-02 Gary Dismukes <dismukes@adacore.com>
902
903 * checks.ads (Null_Exclusion_Static_Checks): Add Boolean
904 parameter Array_Comp to indicate the case of an array object
905 with null-excluding components.
906 * checks.adb (Null_Exclusion_Static_Checks):
907 Call Compile_Time_Constraint_Error instead of
908 Apply_Compile_Time_Constraint_Error in the component case. Also
909 call that when Array_Comp is True, with an appropriate warning for
910 the array component case. Only create an explicit initialization
911 by null in the case of an object of a null-excluding access type
912 (and no longer do that in the component case).
913 * sem_ch3.adb (Check_Component): Add a Boolean parameter
914 Array_Comp defaulted to False. Pass Empty for the Comp
915 actual when calling Null_Exclusion_Static_Checks in the case
916 where Comp_Decl matches Object_Decl, because we don't have a
917 component in that case. In the case of an object or component
918 of an array type, pass True for Array_Comp on the recursive call
919 to Check_Component.
920
921 2017-05-02 Bob Duff <duff@adacore.com>
922
923 * s-taprop-linux.adb (Prio_To_Linux_Prio): New function to correctly
924 compute the linux priority from the Ada priority. Call this everywhere
925 required. In particular, the previous version was not doing this
926 computation when setting the ceiling priority in various places. It
927 was just converting to C.int, which results in a ceiling that is off
928 by 1.
929
930 2017-05-02 Ed Schonberg <schonberg@adacore.com>
931
932 * sem_ch3.adb: Comment predicate inheritance.
933
934 2017-05-02 Tristan Gingold <gingold@adacore.com>
935
936 * s-trasym.ads: Add comment.
937
938 2017-05-02 Bob Duff <duff@adacore.com>
939
940 * sem_elab.adb, sem_elab.ads: Minor comment fixes.
941 * sem_ch4.adb: Minor reformatting.
942 * s-taprop-linux.adb, s-taspri-posix.ads: Code refactoring.
943 * s-taspri-posix-noaltstack.ads: Minor refactoring.
944 * sinput.ads: Minor typo fix.
945
946 2017-05-02 Ed Schonberg <schonberg@adacore.com>
947
948 * exp_ch9.adb (Discriminated_Size): Moved to sem_util.
949 * sem_util.ads, sem_util.adb (Discriminated_Size): Predicate moved
950 here from exp_ch9, to recognize objects whose creation requires
951 dynamic allocation, so that the proper warning can be emitted
952 when restriction No_Implicit_Heap_Allocation is in effect.
953 * sem_ch3.adb (Analyze_Object_Declaration): Use Discriminated_Size
954 to emit proper warning when an object that requires dynamic
955 allocation is declared.
956
957 2017-05-02 Tristan Gingold <gingold@adacore.com>
958
959 * s-trasym.ads, s-trasym.adb (Enable_Cache): New.
960
961 2017-05-02 Ed Schonberg <schonberg@adacore.com>
962
963 * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): The same relaxed
964 visibility rules for equality operators that apply within an
965 instantiation apply within an inlined body.
966 * sem_type.adb (Add_One_Interp): ditto.
967
968 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
969
970 * sem_prag.adb (Analyze_Pragma): Forbid pragma Contract_Cases on null
971 procedures.
972
973 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
974
975 * snames.ads-tmpl
976 (Name_Assume, Name_Attribute_Definition, Name_Loop_Optimize,
977 Name_No_Tagged_Streams): Move to regular pragmas. Add
978 placeholders for Default_Scalar_Storage_Order, Dispatching_Domain,
979 and Secondary_Stack_Size.
980 (Pragma_Id): Move Pragma_Assume,
981 Pragma_Attribute_Definition, Pragma_Loop_Optimize and
982 Pragma_No_Tagged_Streams to second part.
983
984 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
985
986 * exp_attr.adb: Minor reformatting.
987
988 2017-05-02 Ed Schonberg <schonberg@adacore.com>
989
990 * sem_ch4.adb (Analyze_Selected_Component): Improve error
991 detection for illegal references to private components or
992 operations of a protected type in the body of the type.
993
994 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
995
996 * opt.ads: Add missing GNAT markers in comments.
997 * opt.adb (Set_Opt_Config_Switches): Do not override earlier
998 settings of Optimize_Alignment at the end.
999
1000 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
1001
1002 * checks.adb (Apply_Constraint_Check): Do not apply
1003 a discriminant check when the associated type is a constrained
1004 subtype created for an unconstrained nominal type.
1005 * exp_attr.adb: Minor reformatting.
1006
1007 2017-05-02 Bob Duff <duff@adacore.com>
1008
1009 * sem_ch3.adb (OK_For_Limited_Init_In_05): Handle correctly
1010 the N_Raise_Expression case.
1011 * sem_ch6.adb (Check_Limited_Return): Minor: clarify comment,
1012 and add assertions.
1013
1014 2017-05-02 Yannick Moy <moy@adacore.com>
1015
1016 * exp_ch4.adb (Expand_N_Op_Ne): Do not bump parenthese level and
1017 optimize length comparison in GNATprove mode.
1018 * exp_spark.adb (Expand_SPARK_Op_Ne): New function to rewrite
1019 operator /= into negation of operator = when needed.
1020 (Expand_SPARK): Call new
1021 function to expand operator /=.
1022
1023 2017-05-02 Ed Schonberg <schonberg@adacore.com>
1024
1025 * exp_fixd.adb (Expand_Divide_Fixed_By_Fixed_Giving_Fixed):
1026 Simplify the expression for a fixed-fixed division to remove
1027 divisions by constants whenever possible, as an optimization
1028 for restricted targets.
1029
1030 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
1031
1032 * checks.adb, sem_ch3.adb, sem_ch6.adb: Minor reformatting.
1033
1034 2017-05-02 Bob Duff <duff@adacore.com>
1035
1036 * exp_attr.adb (Callable, Identity, Terminated): Use Find_Prim_Op
1037 to find primitive ops, instead of using an Identifier that will
1038 later be looked up. This is necessary because these ops are not
1039 necessarily visible at all places where we need to call them.
1040 * exp_util.ads: Minor comment fix.
1041
1042 2017-05-02 Ed Schonberg <schonberg@adacore.com>
1043
1044 * sem_ch6.adb (Fully_Conformant_Expressions): Two entity
1045 references are fully conformant if they are both expansions
1046 of the discriminant of a protected type, within one of the
1047 protected operations. One occurrence may be expanded into a
1048 constant declaration while the other is an input parameter to
1049 the corresponding generated subprogram.
1050
1051 2017-05-02 Justin Squirek <squirek@adacore.com>
1052
1053 * sem_ch3.adb (Check_For_Null_Excluding_Components): Created for
1054 recursivly searching composite-types for null-excluding access
1055 types and verifying them.
1056 (Analyze_Object_Declaration): Add a
1057 call to Check_Null_Excluding_Components for static verification
1058 of non-initialized objects.
1059 * checks.adb, checks.ads (Null_Exclusion_Static_Checks): Added
1060 a parameter for a composite-type's component and an extra case
1061 for printing component information.
1062
1063 2017-05-02 Yannick Moy <moy@adacore.com>
1064
1065 * sem_ch10.adb (Analyze_Subunit): Take
1066 configuration pragma into account when restoring appropriate
1067 pragma for analysis of subunit.
1068
1069 2017-05-02 Justin Squirek <squirek@adacore.com>
1070
1071 * s-tasren.adb, s-tasini.adb, s-taprop-linux.adb,
1072 s-mudido-affinity.adb,, a-exetim-posix.adb, a-direio.adb,
1073 g-socket.adb, s-taenca.adb, s-fileio.adb: Remove unused use-type
1074 clauses from the runtime.
1075
1076 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
1077
1078 * freeze.adb (Check_Component_Storage_Order): Do not treat bit-packed
1079 array components specially.
1080
1081 2017-05-02 Ed Schonberg <schonberg@adacore.com>
1082
1083 * sem_ch8.adb (Premature_Usage): If the premature usage of
1084 an entity is as the expression in its own object decaration,
1085 rewrite the reference as Any_Id to prevent cascaded errors or
1086 compiler loops when such an entity is used in an address clause.
1087
1088 2017-05-01 Eric Botcazou <ebotcazou@adacore.com>
1089
1090 * gcc-interface/decl.c (components_to_record): Add missing guard.
1091
1092 2017-05-01 Eric Botcazou <ebotcazou@adacore.com>
1093
1094 * gcc-interface/decl.c (components_to_record): Add more comments.
1095 Put back pending fields onto the regular list if the misalignment
1096 happens to cancel itself.
1097
1098 2017-04-28 Ed Schonberg <schonberg@adacore.com>
1099
1100 * sem_ch4.adb (Complete_Object_Operation): When rewriting the
1101 controlling actual in a prefixed call, preserve the original node
1102 information if the prefix itself has been rewritten, for ASIS use.
1103
1104 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
1105
1106 * exp_ch6.adb (Insert_Post_Call_Actions):
1107 Code clean up. Insert the post-call actions after an enclosing
1108 procedure call when N denotes a function call and appears as an
1109 actual parameter in the procedure call.
1110
1111 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
1112
1113 * freeze.adb (Check_Component_Storage_Order): If there is a clause
1114 for the component, also reject the attribute if the component
1115 doesn't end on a byte boundary and its scalar storage order is
1116 different from that of the enclosing record type.
1117
1118 2017-04-28 Javier Miranda <miranda@adacore.com>
1119
1120 * atree.ads (Info_Messages): Removed.
1121 (Warning_Info_Messages): New counter.
1122 (Report_Info_Messages): New counter.
1123 * err_vars.ads Update documentation.
1124 * errout.adb (Delete_Warning_And_Continuations): Update
1125 Info_Message occurrences.
1126 (Error_Msg_Internal): Update Info_Message occurrences.
1127 (Delete_Warning): Update Info_Message occurrences.
1128 (Write_Error_Summary): Update Info_Message occurrences.
1129 (Output_Messages): Update Info_Message occurrences.
1130 (To_Be_Removed): Update Info_Message occurrences.
1131 (Reset_Warnings): Update Info_Message occurrences.
1132 * errutil.adb (Error_Msg): Update Info_Message occurrences.
1133 (Finalize): Update Info_Message occurrences.
1134 (Initialize): Update Info_Message occurrences.
1135 * erroutc.adb (Delete_Msg): Update Info_Message occurrences.
1136 (Compilation_Errors): Update Info_Message_Occurences.
1137
1138 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
1139
1140 * exp_ch3.adb (Build_Init_Statements): Likewise on Nam.
1141 * freeze.adb (Check_Component_Storage_Order): And on Comp_Byte_Aligned.
1142 * sem_aggr.adb (Resolve_Record_Aggregate): Initialize Box_Node.
1143 * sem_attr.adb (Loop_Entry): Initialize Encl_Loop.
1144 * sem_ch12.adb (Build_Operator_Wrapper): Add pragma Warnings on Expr.
1145 * sem_ch13.adb (Validate_Address_Clauses): Initialize Y_Alignment and
1146 Y_Size.
1147 * sem_eval.adb (Why_Not_Static): Initialize Typ.
1148 * sem_prag.adb (Analyze_Pragma): Add pragma Warnings on Str.
1149
1150 2017-04-28 Bob Duff <duff@adacore.com>
1151
1152 * sem_util.ads, sem_util.adb (Might_Raise): New function
1153 that replaces Is_Exception_Safe, but has the opposite
1154 sense. Is_Exception_Safe was missing various cases -- calls inside
1155 a pragma Debug, calls inside an 'if' or assignment statement,
1156 etc. Might_Raise now walks the entire subtree looking for things
1157 that can raise.
1158 * exp_ch9.adb (Is_Exception_Safe): Remove.
1159 (Build_Protected_Subprogram_Body): Replace call to
1160 Is_Exception_Safe with "not Might_Raise". Misc cleanup (use
1161 constants where possible).
1162 * exp_ch7.adb: Rename Is_Protected_Body -->
1163 Is_Protected_Subp_Body. A protected_body is something different
1164 in the grammar.
1165
1166 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
1167
1168 * inline.adb (Expand_Inlined_Call): Initialize Targ1 variable.
1169 * par-ch3.adb (P_Component_Items): Initialize Decl_Node variable.
1170 (P_Discrete_Choice_List): Initialize Expr_Node variable.
1171 * par-ch9.adb (P_Task): Initialize Aspect_Sloc variable.
1172 (P_Protected): Likewise.
1173 * sem_case.adb (Check_Duplicates):
1174 Add pragma Warnings on variable.
1175 * sem_ch12.adb (Preanalyze_Actuals): Initialize Vis variable.
1176 * sem_ch4.adb (List_Operand_Interps): Add pragma Warnings on variable.
1177 * sem_ch5.adb (Analyze_Assignment): Initialize Save_Full_Analysis.
1178 (Analyze_Exit_Statement): Initialize Scope_Id variable.
1179 (Analyze_Iterator_Specification): Initialize Bas variable.
1180 * sem_ch9.adb (Allows_Lock_Free_Implementation): Initialize
1181 Error_Count (Satisfies_Lock_Free_Requirements): Likewise.
1182 (Analyze_Accept_Statement): Initialize Task_Nam.
1183
1184 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
1185
1186 * checks.adb (Install_Primitive_Elaboration_Check):
1187 Do not generate an elaboration check if all checks have been
1188 suppressed.
1189
1190 2017-04-28 Ed Schonberg <schonberg@adacore.com>
1191
1192 * sem_ch13.adb (Analyze_Aspect_Specifications, case
1193 Interrupt_Handler and Attach_Handler): Generate reference
1194 to protected operation to prevent spurious warnings about
1195 unreferenced entities. Previous scheme failed with style checks
1196 enabled.
1197
1198 2017-04-28 Ed Schonberg <schonberg@adacore.com>
1199
1200 * sem_prag.adb (Relocate_Pragmas_To_Body): A pragma Warnings
1201 that follows an expression function must not be relocated to
1202 the generated body, because it applies to the code that follows.
1203
1204 2017-04-28 Gary Dismukes <dismukes@adacore.com>
1205
1206 * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object): Test
1207 Relaxed_RM_Semantics to avoid having CodePeer issue errors on
1208 code that might violate the more stringent checking for 'Access
1209 introduced in Ada 2005.
1210
1211 2017-04-28 Arnaud Charlet <charlet@adacore.com>
1212
1213 * a-cforse.adb: minor style fix in comment.
1214
1215 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
1216
1217 * exp_ch9.adb (Build_Lock_Free_Unprotected_Subprogram_Body): Also
1218 initialize Block_Decls variable.
1219 (Expand_Entry_Barrier): Add pragma Warnings on Func_Body variable.
1220 (Build_Dispatching_Requeue): Add pragma Warnings on Op variable.
1221 * exp_disp.adb (Expand_Interface_Actuals): Initialize
1222 Formal_DDT and Actual_DDT variables.
1223 (Expand_Interface_Thunk): Initialize Iface_Formal.
1224 (Make_DT): Initialize Size_Comp.
1225 (Make_Select_Specific_Data_Table): Initialize Decls.
1226 * exp_dist.adb (Add_RACW_Primitive_Declarations_And_Bodies):
1227 Also initialize more RPC_Receiver_* variables.
1228 (Build_To_Any_Function): Initialize Cstr_Formal.
1229 * exp_prag.adb (Expand_Pragma_Contract_Cases): Initialize Msg_Str.
1230
1231 2017-04-28 Ed Schonberg <schonberg@adacore.com>
1232
1233 * sem_ch6.adb (Freeze_Type_Refs): For an interface conversion
1234 node between access types, freeze the designated type as well,
1235 so that dispatch table pointers are created in the proper scope,
1236 and not in the constructed body of the expression function.
1237
1238 2017-04-28 Bob Duff <duff@adacore.com>
1239
1240 * alloc.ads (Nodes_Initial): Go back to previous value. The large
1241 value makes large compilations faster, but small compilations slower.
1242
1243 2017-04-28 Arnaud Charlet <charlet@adacore.com>
1244
1245 * sem_util.adb: minor typos in Is_Child_Or_Sibling.
1246
1247 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
1248
1249 * erroutc.adb (Compilation_Errors): Do not consider info messages
1250 as suitable warnings when warnings must be treated as errors.
1251 * sem_ch7.adb (Analyze_Package_Specification): Do not consider
1252 internally-generated packages when outputting completion
1253 information.
1254 * errout.adb (Output_Messages): Do not consider info messages as
1255 suitable warnings when warnings must be treated as errors.
1256 * errutil.adb (Finalize): Do not consider info messages as
1257 suitable warnings when warnings must be treated as errors.
1258
1259 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
1260
1261 * warnsw.ads: Minor fix for incorrect wording in comment.
1262
1263 2017-04-28 Ed Schonberg <schonberg@adacore.com>
1264
1265 * sem_res.adb (In_Instance_Code): New predicate in
1266 Valid_Conversion, to determine whether a type conversion appears
1267 as (or within) an actual for a formal object. Type conversions
1268 in instances are not rechecked in Valid_Conversion because
1269 visibility changes between generic location andi instance may
1270 lead to spurious errors, but conversions within an actual must be
1271 fully checked, and they are not fully resolved when pre-analyzing
1272 the actuals.
1273
1274 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
1275
1276 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Use
1277 New_Copy_Tree instead of Relocate_Node as any subsequent copies
1278 of the relocated node will have mangled Parent pointers.
1279 * sem_util.adb (Build_NCT_Hash_Tables): Reset both hash
1280 tables used in conjunction with entity and itype replication.
1281 (Visit_Entity): Rewrite the restriction on which entities
1282 require duplication. The restriction now includes all types.
1283
1284 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
1285
1286 * a-cofuse.ads, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfinve.adb,
1287 a-cfinve.ads, a-cforma.adb, a-cforma.ads, a-cofuma.adb, a-cofuma.ads,
1288 a-cfhama.adb, a-cfhama.ads, a-cforse.adb: Minor reformatting and code
1289 cleanups.
1290
1291 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
1292
1293 * exp_util.adb, g-dyntab.adb, par-ch4.adb, sem_util.adb, sem_attr.adb,
1294 gnat1drv.adb, exp_disp.adb, namet.adb, alloc.ads: Minor reformatting.
1295
1296 2017-04-28 Gary Dismukes <dismukes@adacore.com>
1297
1298 * exp_util.adb: Minor reformatting.
1299
1300 2017-04-28 Ed Schonberg <schonberg@adacore.com>
1301
1302 * sem_ch4.adb: Fix copy/pasto.
1303
1304 2017-04-27 Tristan Gingold <gingold@adacore.com>
1305
1306 * gcc-interface/Make-lang.in: Define EH_MECHANISM while building
1307 raise-gcc.c. Fix include search path for raise-gcc.c
1308
1309 2017-04-27 Eric Botcazou <ebotcazou@adacore.com>
1310
1311 * fe.h (Warn_On_Questionable_Layout): Declare.
1312 * warnsw.ads (Warn_On_Record_Holes): Move down.
1313 (Warn_On_Questionable_Layout): New boolean variable.
1314 (Warning_Record): Add Warn_On_Questionable_Layout field.
1315 * warnsw.adb (All_Warnings): Set Warn_On_Questionable_Layout.
1316 (Restore_Warnings): Likewise.
1317 (Save_Warnings): Likewise.
1318 (Set_Dot_Warning_Switch): Handle 'q' and 'Q' letters.
1319 * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust call to
1320 components_to_record.
1321 (gnu_field_to_gnat): New function.
1322 (warn_on_field_placement): Likewise.
1323 (components_to_record): Add GNAT_RECORD_TYPE and remove REORDER
1324 parameters. Rename local variables and adjust recursive call.
1325 Rework final scan of the field list and implement warnings on the
1326 problematic placement of specific sorts of fields.
1327
1328 2017-04-27 Bob Duff <duff@adacore.com>
1329
1330 * errout.adb, exp_aggr.adb, exp_attr.adb, exp_code.adb, fname.adb,
1331 * fname.ads, freeze.adb, inline.adb, lib.adb, lib.ads, lib-list.adb,
1332 * lib-load.adb, lib-writ.adb, par.adb, restrict.adb, rtsfind.adb,
1333 * sem.adb, sem_cat.adb, sem_ch10.adb, sem_ch12.adb, sem_ch3.adb,
1334 * sem_ch4.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb, sem_elab.adb,
1335 * sem_intr.adb, sem_res.adb, sem_util.adb, sem_warn.adb, sprint.adb:
1336 For efficiency, cache results of Is_Internal_File_Name and
1337 Is_Predefined_File_Name in the Units table. This avoids a lot
1338 of repeated text processing.
1339
1340 2017-04-27 Emmanuel Briot <briot@adacore.com>
1341
1342 * g-comlin.adb (Sort_Sections): remove useless test.
1343
1344 2017-04-27 Claire Dross <dross@adacore.com>
1345
1346 * a-cfhase.adb, a-cfhase.ads (=): Generic parameter removed to
1347 allow the use of regular equality over elements in contracts.
1348 (Formal_Model): Ghost package containing model functions that are
1349 used in subprogram contracts.
1350 (Current_To_Last): Removed, model functions should be used instead.
1351 (First_To_Previous): Removed, model functions should be used instead.
1352 (Strict_Equal): Removed, model functions should be used instead.
1353 (No_Overlap): Removed, model functions should be used instead.
1354 (Equivalent_Keys): Functions over cursors are removed. They were
1355 awkward with explicit container parameters.
1356 * a-cforse.adb, a-cforse.ads (=): Generic parameter removed to
1357 allow the use of regular equality over elements in contracts.
1358 (Formal_Model): Ghost package containing model functions that
1359 are used in subprogram contracts.
1360 (Current_To_Last): Removed, model functions should be used instead.
1361 (First_To_Previous): Removed, model functions should be used instead.
1362 (Strict_Equal): Removed, model functions should be used instead.
1363 (No_Overlap): Removed, model functions should be used instead.
1364
1365 2017-04-27 Yannick Moy <moy@adacore.com>
1366
1367 * gnat1drv.adb: Code cleanup.
1368
1369 2017-04-27 Ed Schonberg <schonberg@adacore.com>
1370
1371 * exp_util.adb (Replace_Entity): The prefix of a 'Result
1372 attribute reference in a post- condition is the subprogram to
1373 which the condition applies. If the condition is inherited
1374 by a type extension, the prefix becomes a reference to the
1375 inherited operation, but there is no need to create a wrapper
1376 for this operation, because 'Result is expanded independently
1377 when elaborating the postconditions.
1378
1379 2017-04-27 Bob Duff <duff@adacore.com>
1380
1381 * sinput.adb: Minor code cleanup.
1382 * namet.adb (Append): Create faster versions of
1383 Append(String) and Append(Name_Id) by using slice assignment
1384 instead of loops.
1385 * sem_util.adb (In_Instance): Speed this up by removing
1386 unnecessary tests; Is_Generic_Instance is defined for all
1387 entities.
1388 * sem_util.ads, sem_util.adb (In_Parameter_Specification):
1389 Remove unused function.
1390 * alloc.ads (Nodes_Initial): Use a much larger value, because
1391 the compiler was spending a lot of time copying the nodes table
1392 when it grows. This number was chosen in 1996, so is rather out
1393 of date with current memory sizes. Anyway, it's virtual memory.
1394 Get rid of Orig_Nodes_...; use Node_... instead.
1395 * atree.adb (Lock): Do not release the Nodes tables; it's a
1396 waste of time.
1397 Orig_Nodes_ ==> Nodes_
1398 * nlists.adb: Orig_Nodes_ ==> Nodes_
1399 * g-table.adb: Remove unused "with" clause.
1400 * g-table.ads, table.ads: Remove Big_Table_Type, which should
1401 not be used by clients.
1402 * g-dyntab.adb (Last_Allocated): New function
1403 to encapsulate T.P.Last_Allocated, which I'm thinking of changing.
1404
1405 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1406
1407 * sem_eval.adb (Subtypes_Statically_Compatible): Remove duplicated
1408 check.
1409 (Subtypes_Statically_Match): Remove duplicate check.
1410 * sem_prag.adb (Check_Arg_Is_External_Name): Remove duplicate check.
1411
1412 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1413
1414 * exp_aggr.adb (Replace_Type): Remove the special processing
1415 for selected components.
1416 * exp_attr.adb (Expand_N_Attribute_Reference): Merge the
1417 processing for attributes Fixed_Value and Integer_Value.
1418 * exp_util.adb (Side_Effect_Free): Merge the processing for
1419 qualified expressions, type conversions, and unchecked type
1420 conversions.
1421 * g-comlin.adb (Is_In_Config): Merge the processing for No_Space
1422 and Optional.
1423 * par-ch3.adb (P_Declarative_Items): Merge the processing for
1424 tokens function, not, overriding, and procedure.
1425 * sem_ch6.adb (Fully_Conformant_Expressions): Merge the processing
1426 for qualified expressions, type conversions, and unchecked
1427 type conversions.
1428 * sem_util.adb (Compile_Time_Constraint_Error): Merge the
1429 processing for Ada 83 and instances.
1430 (Object_Access_Level): Merge the processing for indexed components
1431 and selected components.
1432 * uname.adb (Add_Node_Name): Merge the processing for stubs.
1433
1434 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1435
1436 * checks.adb (Install_Primitive_Elaboration_Check):
1437 Do not generate the check when restriction No_Elaboration_Code
1438 is in effect.
1439
1440 2017-04-27 Ed Schonberg <schonberg@adacore.com>
1441
1442 * exp_disp.adb (Build_Class_Wide_Check): New subsidiary
1443 of Expand_Dispatching_Call. If the denoted subprogram has a
1444 class-wide precondition, this is the only precondition that
1445 applies to the call, rather that the class-wide preconditions
1446 that may apply to the body that is executed. (This is specified
1447 in AI12-0195).
1448
1449 2017-04-27 Yannick Moy <moy@adacore.com>
1450
1451 * gnat1drv.adb (Adjust_Global_Switches): Issue
1452 a warning in GNATprove mode if the runtime library does not
1453 support IEEE-754 floats.
1454
1455 2017-04-27 Ed Schonberg <schonberg@adacore.com>
1456
1457 * sem_prag.adb (Inherit_Class_Wide_Pre): If the parent operation
1458 is itself inherited it does not carry any contract information,
1459 so examine its parent operation which is its Alias.
1460
1461 2017-04-27 Ed Schonberg <schonberg@adacore.com>
1462
1463 * sem_attr.adb (Analyze_Attribute, case 'Image): In Ada2012 the
1464 prefix can be an object reference in which case Obj'Image (X)
1465 can only be interpreted as an indexing of the parameterless
1466 version of the attribute.
1467 * par-ch4.adb (P_Name): An attribute reference can be the prefix of
1468 an indexing or a slice operation if the attribute does not require
1469 parameters. In Ada2012 'Image also belongs in this category,
1470 and A'Image (lo .. hi) is legal and must be parsed as a slice.
1471
1472 2017-04-27 Yannick Moy <moy@adacore.com>
1473
1474 * exp_ch4.adb: Minor reformatting.
1475 * gnat1drv.adb (Adjust_Global_Switches): When in GNATprove mode,
1476 disable the CodePeer and C generation modes. Similar to the
1477 opposite actions done in CodePeer mode.
1478
1479 2017-04-27 Yannick Moy <moy@adacore.com>
1480
1481 * sem_res.adb: Remove duplicate code.
1482 * sem_attr.adb: Delete duplicate code.
1483
1484 2017-04-27 Bob Duff <duff@adacore.com>
1485
1486 * g-dyntab.adb: Reduce the amount of copying in
1487 Release. No need to copy items past Last.
1488
1489 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1490
1491 * checks.adb Add with and use clauses for Sem_Disp.
1492 (Install_Primitive_Elaboration_Check): New routine.
1493 * checks.ads (Install_Primitive_Elaboration_Check): New routine.
1494 * exp_attr.adb (Expand_N_Attribute_Reference): Clean up the
1495 processing of 'Elaborated.
1496 * exp_ch6.adb (Expand_N_Subprogram_Body): Install a primitive
1497 elaboration check.
1498
1499 2017-04-27 Bob Duff <duff@adacore.com>
1500
1501 * g-dyntab.ads, g-dyntab.adb, g-table.ads: Remove incorrect assertion.
1502 If the table grows and then shrinks back to empty, we won't necessarily
1503 point back to the empty array. Code cleanups.
1504 * sinput.ads: Add 'Base to Size clause to match the declared
1505 component subtypes.
1506
1507 2017-04-27 Claire Dross <dross@adacore.com>
1508
1509 * a-cforma.adb, a-cforma.ads (=): Generic parameter removed to
1510 allow the use of regular equality over elements in contracts.
1511 (Formal_Model): Ghost package containing model functions that
1512 are used in subprogram contracts.
1513 (Current_To_Last): Removed, model functions should be used instead.
1514 (First_To_Previous): Removed, model functions should be used instead.
1515 (Strict_Equal): Removed, model functions should be used instead.
1516 (No_Overlap): Removed, model functions should be used instead.
1517 * a-cofuma.adb, a-cofuma.ads (Enable_Handling_Of_Equivalence)
1518 Boolean generic parameter to disable contracts for equivalence
1519 between keys.
1520 (Witness): Create a witness of a key that is used for handling of
1521 equivalence between keys.
1522 (Has_Witness): Check whether a witness is contained in a map.
1523 (W_Get): Get the element associated to a witness.
1524 (Lift_Equivalent_Keys): Removed, equivalence between keys is handled
1525 directly.
1526 * a-cofuse.adb, a-cofuse.ads (Enable_Handling_Of_Equivalence)
1527 Boolean generic parameter to disable contracts for equivalence
1528 between keys.
1529 * a-cfhama.adb, a-cfhama.ads (Formal_Model.P) Disable handling
1530 of equivalence on functional maps.
1531 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model.P) Disable handling
1532 of equivalence on functional maps.
1533
1534 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1535
1536 * exp_ch9.adb (Expand_Entry_Barrier): Code
1537 cleanup. Do not perform the optimization which removes the
1538 declarations of the discriminant and component renamings when
1539 validity checks on operands and attributes are in effect.
1540
1541 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1542
1543 * exp_spark.adb, exp_util.adb, sem_ch7.adb, g-dyntab.adb, g-dyntab.ads,
1544 freeze.adb, a-cfinve.ads, a-cofuma.adb, a-cofuma.ads, a-cfhama.adb,
1545 a-cfhama.ads, a-cofove.ads: Minor reformatting.
1546
1547 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1548
1549 * g-debpoo.adb (Dump_Gnatmem): Protect against a possible null
1550 pointer dereference.
1551 * g-spipat.adb (Dump): Code clean up. Protect against a possible
1552 null pointer dereference.
1553
1554 2017-04-27 Bob Duff <duff@adacore.com>
1555
1556 * g-dyntab.ads, g-dyntab.adb: Default for Table_Low_Bound.
1557 Rename Empty --> Empty_Table_Ptr, and don't duplicate code for it.
1558 Free renames Init, since they do the same thing.
1559 * g-table.ads: Default for Table_Low_Bound.
1560 * table.ads: Default for Table_Low_Bound, Table_Initial, and
1561 Table_Increment.
1562
1563 2017-04-27 Bob Duff <duff@adacore.com>
1564
1565 * g-dyntab.ads, g-dyntab.adb: Add assertions to subprograms that
1566 can reallocate.
1567 * atree.adb, elists.adb, fname-uf.adb, ghost.adb, inline.adb,
1568 * lib.adb, namet.adb, nlists.adb, sem.adb, sinput.adb, stringt.adb:
1569 Reorder code so that above assertions do not fail.
1570 * table.ads: Remove obsolete comment on Locked.
1571
1572 2017-04-27 Claire Dross <dross@adacore.com>
1573
1574 * a-cfdlli.ads: Code cleanup.
1575
1576 2017-04-27 Yannick Moy <moy@adacore.com>
1577
1578 * exp_spark.adb (Expand_SPARK_Freeze_Type): Build a DIC procedure
1579 when needed for proof. (Expand_SPARK): Call the new procedure.
1580 * exp_util.ads Fix typo.
1581
1582 2017-04-27 Gary Dismukes <dismukes@adacore.com>
1583
1584 * a-cofuma.ads, a-cfhama.ads: Minor reformatting, grammar, and typo
1585 fixes.
1586
1587 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1588
1589 * sem_elab.adb Add new type Visited_Element
1590 and update the contents of table Elab_Visited. Various code clean up.
1591 (Check_Elab_Call): Determine whether a prior call to
1592 the same subprogram was already examined within the same context.
1593 (Check_Internal_Call_Continue): Register the subprogram being
1594 called as examined within a particular context. Do not suppress
1595 elaboration warnings.
1596
1597 2017-04-27 Gary Dismukes <dismukes@adacore.com>
1598
1599 * xoscons.adb, osint.ads: Minor reformatting.
1600
1601 2017-04-27 Bob Duff <duff@adacore.com>
1602
1603 * g-dyntab.ads, g-dyntab.adb: Misc cleanup. Rename
1604 Table_Count_Type --> Table_Last_Type, because the name
1605 was confusing (a "count" usually starts at zero). Add
1606 functionality supported or needed by other tables packages
1607 (Move, Release_Threshold).
1608 * g-table.ads, g-table.adb: This is now just a thin wrapper
1609 around g-dyntab.ads/g-dyntab.adb. Add functionality supported
1610 or needed by other tables packages (Save, Restore).
1611 * table.ads, table.adb: This is now just a thin wrapper around
1612 * g-table.ads/g-table.adb.
1613 * namet.h, scos.h, uintp.h: These files are reaching into the
1614 private data of some instances of g-table, whose names changed,
1615 so the above change requires some adjustment here. It now uses
1616 public interfaces.
1617
1618 2017-04-27 Bob Duff <duff@adacore.com>
1619
1620 * namet.adb, namet.ads: Minor: remove unused procedures.
1621
1622 2017-04-27 Eric Botcazou <ebotcazou@adacore.com>
1623
1624 * checks.adb (Apply_Scalar_Range_Check): Initialize Ok variable too.
1625 (Minimize_Eliminate_Overflows): Initialize Llo and Lhi.
1626 Add pragma Warnings on Rtype variable in nested block. *
1627 * exp_ch3.adb (Build_Init_Statements): Initialize VAR_LOC.
1628 * exp_ch4.adb (Expand_Concatenate): Initialize 3 variables.
1629 (Size_In_Storage_Elements): Add pragma Warnings on Res variable.
1630 * exp_ch7.adb (Build_Adjust_Statements): Initialize Bod_Stmts.
1631 (Process_Component_List_For_Finalize): Initialize Counter_Id.
1632 (Build_Finalize_Statements): Initialize Bod_Stmts.
1633 * exp_disp.adb (Expand_Dispatching_Call): Initialize SCIL_Node.
1634
1635 2017-04-27 Claire Dross <dross@adacore.com>
1636
1637 * a-cfhama.adb, a-cfhamai.ads (=): Generic parameter removed to
1638 allow the use of regular equality over elements in contracts.
1639 (Formal_Model): Ghost package containing model functions that are
1640 used in subprogram contracts.
1641 (Current_To_Last): Removed, model
1642 functions should be used instead.
1643 (First_To_Previous): Removed, model functions should be used instead.
1644 (Strict_Equal): Removed, model functions should be used instead.
1645 (No_Overlap): Removed, model functions should be used instead.
1646 (Equivalent_Keys): Functions over cursors are removed. They were
1647 awkward with explicit container parameters.
1648 * a-cofuma.adb, a-cofuma.ads (Lift_Equivalent_Keys): New lemma
1649 (proof only) procedure to help GNATprove when equivalence over
1650 keys is not equality.
1651
1652 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1653
1654 * exp_util.adb, a-cfdlli.adb, a-cfdlli.ads, exp_ch9.adb, g-dyntab.adb,
1655 sem_dim.adb, a-cfinve.adb, a-cfinve.ads, a-cofove.adb, a-cofove.ads:
1656 Minor reformatting and code cleanups.
1657
1658 2017-04-27 Ed Schonberg <schonberg@adacore.com>
1659
1660 * freeze.adb (Build_Inherited_Condition_Pragmas): New procedure,
1661 subsidiary of Check_Inherited_Conditions, to build pragmas for an
1662 operation whose ancestor has classwide pre/postconditions. This
1663 is used both to check the legality of the inheritance in Ada
1664 and in SPARK, and to determine whether a wrapper is needed for
1665 an inherited operation.
1666 * exp_util.adb (Build_Class_Wide_Expression, Replace_Entity):
1667 Improve placement of error message for inherited classwide
1668 conditions that become illegal on type derivation.
1669
1670 2017-04-27 Yannick Moy <moy@adacore.com>
1671
1672 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Set
1673 SPARK_Mode from context on generic package.
1674 * sem_ch7.adb (Analyze_Package_Declaration): Simplify code to remove
1675 useless test.
1676
1677 2017-04-27 Claire Dross <dross@adacore.com>
1678
1679 * a-cofuve.ads (Range_Shifted): Rewrite precondition to avoid
1680 overflows in computations.
1681 * a-cofove.ads (Capacity_Range): Rewrite last bound to avoid
1682 overflows in computations.
1683 (Insert): Rewrite precondition to avoid overflows in computations.
1684 * a-cfinve.ads (Capacity_Range): Rewrite last bound to avoid
1685 overflows in computations.
1686 (Insert): Rewrite precondition to avoid overflows in computations.
1687
1688 2017-04-27 Steve Baird <baird@adacore.com>
1689
1690 * exp_ch9.adb (Expand_N_Asynchronous_Select): Initialize the Cancel
1691 flag when it is declared in order to avoid confusing CodePeer about
1692 the possibility of an uninitialized variable read.
1693
1694 2017-04-27 Ed Schonberg <schonberg@adacore.com>
1695
1696 * sem_dim.adb (Analyze_Dimension_Object_Declaration): There is
1697 no dimensionality error if the subtype of the expression is
1698 identical to the nominal subtype in the declaration, even though
1699 the expression itself may have been constant-folded and lack a
1700 dimension vector.
1701 * sem_dim.ads: Add comments on setting of dimension vectors and
1702 its interaction with node rewritings and side-effect removal.
1703
1704 2017-04-27 Bob Duff <duff@adacore.com>
1705
1706 * debug.adb: Minor comment correction.
1707 * sem_dim.ads: Minor reformatting and typo fixes.
1708
1709 2017-04-27 Bob Duff <duff@adacore.com>
1710
1711 * g-table.adb, g-table.adsa, scos.h: From the C side, access First and
1712 Last of the tables via function calls, rather than relying on layout
1713 of data structures.
1714
1715 2017-04-27 Ed Schonberg <schonberg@adacore.com>
1716
1717 * exp_util.adb: No wrapper in GNATprove mode.
1718
1719 2017-04-27 Yannick Moy <moy@adacore.com>
1720
1721 * sem_res.adb (Resolve_Comparison_Op): Always
1722 evaluate comparisons between values of universal types.
1723
1724 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1725
1726 * sem_elab.adb (Check_Internal_Call_Continue): Do not generate
1727 an elaboration counter nor a check when in GNATprove mode.
1728 * sem_util.adb (Build_Elaboration_Entity): Do not create an
1729 elaboration counter when in GNATprove mode.
1730
1731 2017-04-27 Ed Schonberg <schonberg@adacore.com>
1732
1733 * freeze.adb: copy-paste typo.
1734
1735 2017-04-27 Yannick Moy <moy@adacore.com>
1736
1737 * sem_prag.adb (Analyze_Pre_Post_In_Decl_Part):
1738 Use correct test to detect call in GNATprove mode instead of
1739 compilation.
1740
1741 2017-04-27 Claire Dross <dross@adacore.com>
1742
1743 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model.M_Elements_In_Union):
1744 New property function expressing that the element of a
1745 sequence are contained in the union of two sequences.
1746 (Formal_Model.M_Elements_Included): New property function
1747 expressing that the element of a sequence are another sequence.
1748 (Generic_Sorting): Use new property functions to state that
1749 elements are preserved by Sort and Merge.
1750 * a-cofove.adb, a-cofove.ads (=): Generic parameter removed to
1751 allow the use of regular equality over elements in contracts.
1752 (Formal_Model): Ghost package containing model functions
1753 that are used in subprogram contracts. (Capacity):
1754 On unbounded containers, return the maximal capacity.
1755 (Current_To_Last): Removed, model functions should be used instead.
1756 (First_To_Previous): Removed, model functions should be used instead.
1757 (Append): Default parameter value replaced
1758 by new wrapper to allow more precise contracts.
1759 (Insert): Subprogram restored, it seems it was useful to users even if
1760 it is inefficient.
1761 (Delete): Subprogram restored, it seems it was useful to users even if
1762 it is inefficient.
1763 (Prepend): Subprogram restored, it seems it was useful to users even
1764 if it is inefficient.
1765 (Delete_First): Subprogram restored, it seems it
1766 was useful to users even if it is inefficient. (Delete_Last):
1767 Default parameter value replaced by new wrapper to allow more
1768 precise contracts.
1769 (Generic_Sorting.Merge): Subprogram restored.
1770 * a-cfinve.adb, a-cfinve.ads (=): Generic parameter removed to
1771 allow the use of regular equality over elements in contracts.
1772 (Formal_Model): Ghost package containing model functions
1773 that are used in subprogram contracts. (Capacity):
1774 On unbounded containers, return the maximal capacity.
1775 (Current_To_Last): Removed, model functions should be used
1776 instead.
1777 (First_To_Previous): Removed, model functions should be used instead.
1778 (Append): Default parameter value replaced
1779 by new wrapper to allow more precise contracts.
1780 (Insert): Subprogram restored, it seems it was useful to users even if
1781 it is inefficient.
1782 (Delete): Subprogram restored, it seems it was useful to users even if
1783 it is inefficient.
1784 (Prepend): Subprogram restored, it seems it was useful to users even
1785 if it is inefficient.
1786 (Delete_First): Subprogram restored, it seems it
1787 was useful to users even if it is inefficient. (Delete_Last):
1788 Default parameter value replaced by new wrapper to allow more
1789 precise contracts.
1790 (Generic_Sorting.Merge): Subprogram restored.
1791 (Vector): Do not reuse formal vectors, as it is no longer possible
1792 to supply them with an equality function over elements.
1793
1794 2017-04-27 Bob Duff <duff@adacore.com>
1795
1796 * g-dyntab.adb (Release): When allocating the new
1797 table, use the correct slice of the old table to initialize it.
1798
1799 2017-04-27 Eric Botcazou <ebotcazou@adacore.com>
1800
1801 * einfo.ads: Minor fixes in comments.
1802
1803 2017-04-27 Ed Schonberg <schonberg@adacore.com>
1804
1805 * sem_prag.adb: disable clones in SPARK_Mode.
1806
1807 2017-04-27 Gary Dismukes <dismukes@adacore.com>
1808
1809 * sem_util.ads, contracts.adb: Minor reformatting.
1810
1811 2017-04-27 Ed Schonberg <schonberg@adacore.com>
1812
1813 * sem_util.adb, sem_util.ads (Build_Class_Wide_Clone_Body):
1814 Build body of subprogram that has a class-wide condition that
1815 contains calls to other primitives.
1816 (Build_Class_Wide_Clone_Call); Build a call to the common
1817 class-wide clone of a subprogram with classwide conditions. The
1818 body of the subprogram becomes a wrapper for a call to the
1819 clone. The inherited operation becomes a similar wrapper to which
1820 modified conditions apply, and the call to the clone includes
1821 the proper conversion in a call the parent operation.
1822 (Build_Class_Wide_Clone_Decl (Spec_Id : Entity_Id): For a
1823 subprogram that has a classwide condition that contains calls to
1824 other primitives, build an internal subprogram that is invoked
1825 through a type-specific wrapper for all inherited subprograms
1826 that may have a modified condition.
1827 * sem_prag.adb (Check_References): If subprogram has a classwide
1828 condition, create entity for corresponding clone, to be invoked
1829 through wrapper subprograns.
1830 (Analyze_Pre_Post_Condition_In_Decl_Part): Do not emit error
1831 message about placement if pragma isi internally generated.
1832 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If subprogram has
1833 a classwide clone, build body of clone as copy of original body,
1834 and rewrite original body as a wrapper as a wrapper for a call to
1835 the clone, so that it incorporates the original pre/postconditions
1836 of the subprogram.
1837 * freeze.adb (Check_Inherited_Conditions): For an inherited
1838 subprogram that inherits a classwide condition, build spec and
1839 body of corresponding wrapper so that call to inherited operation
1840 gets the modified conditions.
1841 * contracts.adb (Analyze_Contracts): If analysis of classwide
1842 condition has created a clone for a primitive operation, analyze
1843 declaration of clone.
1844
1845 2017-04-27 Steve Baird <baird@adacore.com>
1846
1847 * exp_util.adb (Build_Allocate_Deallocate_Proc):
1848 Add "Suppress => All_Checks" to avoid generating unnecessary
1849 checks.
1850
1851 2017-04-27 Yannick Moy <moy@adacore.com>
1852
1853 * debug.adb: Reserve debug flag 'm' for no inlining in GNATprove.
1854 * sem_ch6.adb (Anayze_Subprogram_Body_Helper): Skip creation of
1855 inlining body in GNATprove mode when switch -gnatdm used.
1856 * sem_res.adb (Resolve_Call): Skip detection of lack of inlining
1857 in GNATprove mode when switch -gnatdm used.
1858
1859 2017-04-27 Arnaud Charlet <charlet@adacore.com>
1860
1861 * sem_ch13.adb (Analyze_Attribute_Definition_Clause
1862 [Attribute_Address]): Call Set_Address_Taken when ignoring rep
1863 clauses, so that we keep an indication of the address clause
1864 before removing it from the tree.
1865
1866 2017-04-27 Yannick Moy <moy@adacore.com>
1867
1868 * exp_util.ads, exp_util.adb (Evaluate_Name): Force evaluation
1869 of expression being qualified, when not an object name, or else
1870 evaluate the underlying name.
1871
1872 2017-04-27 Jerome Lambourg <lambourg@adacore.com>
1873
1874 * bindusg.adb, bindgen.adb, gnatbind.adb, opt.ads: add -nognarl switch.
1875
1876 2017-04-27 Justin Squirek <squirek@adacore.com>
1877
1878 * exp_ch7.adb (Build_Finalize_Statements): Move Num_Comps to
1879 Process_Component_List_For_Finalization as a local variable.
1880 (Process_Component_For_Finalize): Add an extra parameter to avoid
1881 global references.
1882 (Process_Component_List_For_Finalization): Correct calls to
1883 Process_Component_For_Finalize to take Num_Comps as a parameter.
1884
1885 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1886
1887 * sem_ch8.adb (Find_Direct_Name): Account for the case where
1888 a use-visible entity is defined within a nested scope of an
1889 instance when giving priority to entities which were visible in
1890 the original generic.
1891 * sem_util.ads, sem_util.adb (Nearest_Enclosing_Instance): New routine.
1892
1893 2017-04-27 Tristan Gingold <gingold@adacore.com>
1894
1895 * raise-gcc.c: Don't use unwind.h while compiling
1896 for the frontend, but mimic host behavior.
1897
1898 2017-04-27 Javier Miranda <miranda@adacore.com>
1899
1900 * sem_ch3.adb (Build_Discriminated_Subtype):
1901 Propagate Has_Pragma_Unreferenced_Objects to the built subtype.
1902
1903 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1904
1905 * sem_prag.adb (Analyze_Global_Item):
1906 Do not consider discriminants because they are not "entire
1907 objects". Remove the discriminant-related checks because they are
1908 obsolete.
1909 (Analyze_Input_Output): Do not consider discriminants
1910 because they are not "entire objects".
1911
1912 2017-04-27 Ed Schonberg <schonberg@adacore.com>
1913
1914 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Do not
1915 perform check if the current scope does not come from source,
1916 as is the case for a rewritten task body, because check has
1917 been performed already, and may not be doable because of changed
1918 visibility.
1919
1920 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1921
1922 * a-cofuse.adb, a-cfdlli.adb, a-cofuse.ads, a-cfdlli.ads, a-cofuve.adb,
1923 a-cofuve.ads, a-cofuma.adb, a-cofuma.ads, sem_eval.adb, a-cofuba.adb:
1924 Minor reformatting.
1925
1926 2017-04-27 Ed Schonberg <schonberg@adacore.com>
1927
1928 * sem_ch4.adb (Analyze_Call): If the return type of a function
1929 is incomplete in an context in which the full view is available,
1930 replace the type of the call by the full view, to prevent spurious
1931 type errors.
1932 * exp_disp.adb (Check_Premature_Freezing): Disable check on an
1933 abstract subprogram so that compiler does not reject a parameter
1934 of a primitive operation of a tagged type being frozen, when
1935 the untagged type of that parameter cannot be frozen.
1936
1937 2017-04-27 Bob Duff <duff@adacore.com>
1938
1939 * sem_attr.adb (Compute_Type_Key): Don't walk
1940 representation items for irrelevant types, which could be in a
1941 different source file.
1942
1943 2017-04-27 Steve Baird <baird@adacore.com>
1944
1945 * exp_attr.adb (Expand_N_Attribute_Reference):
1946 Don't expand Image, Wide_Image, Wide_Wide_Image attributes
1947 for CodePeer.
1948
1949 2017-04-27 Yannick Moy <moy@adacore.com>
1950
1951 * exp_unst.ads: Fix typos in comments.
1952
1953 2017-04-27 Ed Schonberg <schonberg@adacore.com>
1954
1955 * sem_eval.adb (Choice_Matches): Handle properly a real literal
1956 whose type has a defined static predicate.
1957
1958 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1959
1960 * exp_ch4.adb (Insert_Dereference_Action):
1961 Do not adjust the address of a controlled object when the
1962 associated access type is subject to pragma No_Heap_Finalization.
1963 Code reformatting.
1964
1965 2017-04-27 Pierre-Marie de Rodat <derodat@adacore.com>
1966
1967 * gcc-interface/utils.c (gnat_type_for_size): Set
1968 TYPE_ARTIFICIAL on created types.
1969
1970 2017-04-27 Claire Dross <dross@adacore.com>
1971
1972 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model): Adapt to
1973 modifications in functional containers.
1974 * a-cofuba.ads, a-cofuma.ads, a-cofuse.ads, a-cofuve.ads Reformat
1975 to improve readablity. Subprograms are separated between basic
1976 operations, constructors and properties. Universally quantified
1977 formulas in contracts are factorized in independant functions
1978 with a name and a comment. Names of parameters are improved.
1979
1980 2017-04-27 Gary Dismukes <dismukes@adacore.com>
1981
1982 * exp_spark.adb, sem_elab.adb: Minor reformatting and typo fix.
1983
1984 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1985
1986 * sem_res.adb (Resolve_Type_Conversion): Do not
1987 install a predicate check here since this is already done during
1988 the expansion phase. Verify whether the operand satisfies the
1989 static predicate (if any) of the target type.
1990 * sem_ch3.adb (Analyze_Object_Declaration): Do
1991 not install a predicate check if the object is initialized by
1992 means of a type conversion because the conversion is subjected
1993 to the same check.
1994
1995 2017-04-27 Tristan Gingold <gingold@adacore.com>
1996
1997 * raise.c (__gnat_builtin_longjmp): Remove.
1998 (__gnat_bracktrace):
1999 Add a dummy definition for the compiler (__gnat_eh_personality,
2000 __gnat_rcheck_04, __gnat_rcheck_10) (__gnat_rcheck_19,
2001 __gnat_rcheck_20, __gnat_rcheck_21) (__gnat_rcheck_30,
2002 __gnat_rcheck_31, __gnat_rcheck_32): Likewise.
2003 * a-exexpr.adb: Renamed from a-exexpr-gcc.adb
2004 * a-except.ads, a-except.adb: Renamed from a-except-2005.ads
2005 and a-except-2005.adb.
2006 * raise-gcc.c: Allow build in compiler, compiled as a C++
2007 file.
2008 (__gnat_Unwind_ForcedUnwind): Adjust prototype.
2009 (db): Constify msg_format.
2010 (get_call_site_action_for): Don't use void arithmetic.
2011 * system.ads (Frontend_Exceptions): Set to False.
2012 (ZCX_By_Default): Set to True.
2013 (GCC_ZC_Support): Set to True.
2014 * gcc-interface/Makefile.in: No more variants for a-exexpr.adb and
2015 a-except.ad[sb].
2016 * gcc-interface/Make-lang.in: Add support for backend zcx exceptions
2017 in gnat1 and gnatbind.
2018 * gnat1, gnatbind: link with raise-gcc.o, a-exctra.o, s-addima.o,
2019 s-excmac.o, s-imgint.o, s-traceb.o, s-trasym.o, s-wchstw.o
2020 * s-excmac.ads, s-excmac.adb: Copy of variants.
2021 * a-except.o: Adjust preequisites.
2022 Add handling of s-excmac-arm.adb and s-excmac-gcc.adb.
2023
2024 2017-04-27 Claire Dross <dross@adacore.com>
2025
2026 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model): Adapt to
2027 modifications in functional containers.
2028 * a-cofuba.ads, a-cofuma.ads, a-cofuse.ads, a-cofuve.ads Reformat
2029 to improve readablity. Subprograms are separated between basic
2030 operations, constructors and properties. Universally quantified
2031 formulas in contracts are factorized in independant functions
2032 with a name and a comment. Names of parameters are improved.
2033
2034 2017-04-27 Gary Dismukes <dismukes@adacore.com>
2035
2036 * exp_spark.adb, sem_elab.adb: Minor reformatting and typo fix.
2037
2038 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
2039
2040 * sem_res.adb (Resolve_Type_Conversion): Do not
2041 install a predicate check here since this is already done during
2042 the expansion phase. Verify whether the operand satisfies the
2043 static predicate (if any) of the target type.
2044 * sem_ch3.adb (Analyze_Object_Declaration): Do
2045 not install a predicate check if the object is initialized by
2046 means of a type conversion because the conversion is subjected
2047 to the same check.
2048
2049 2017-04-27 Tristan Gingold <gingold@adacore.com>
2050
2051 * a-except.ads, a-except.adb, a-exexpr.adb: Removed (will be
2052 replaced by their variants).
2053
2054 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
2055
2056 * exp_prag.adb, a-cofuse.adb, a-cofuse.ads, einfo.adb, sem_prag.adb,
2057 cstand.adb, par-prag.adb, a-cofuve.adb, a-cofuve.ads, a-cofuma.adb,
2058 a-cofuma.ads, a-cofuba.adb, a-cofuba.ads: Minor reformatting.
2059
2060 2017-04-27 Tristan Gingold <gingold@adacore.com>
2061
2062 * s-excmac-gcc.ads, s-excmac-gcc.adb,
2063 s-excmac-arm.ads, s-excmac-arm.adb (New_Occurrence): Rewrite it in
2064 Ada95.
2065
2066 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
2067
2068 * exp_ch7.adb (Establish_Transient_Scope): Rewrite
2069 the loop which detects potential enclosing transient scopes. The
2070 loop now terminates much earlier as transient scopes are bounded
2071 by packages and subprograms.
2072
2073 2017-04-27 Claire Dross <dross@adacore.com>
2074
2075 * a-cfdlli.adb, a-cfdlli.ads (=): Generic parameter removed to
2076 allow the use of regular equality over elements in contracts.
2077 (Cursor): Type is now public so that it can be used in
2078 model functions.
2079 (Formal_Model): Ghost package containing
2080 model functions that are used in subprogram contracts.
2081 (Current_To_Last): Removed, model functions should be used
2082 instead.
2083 (First_To_Previous): Removed, model functions should
2084 be used instead.
2085 (Strict_Equal): Removed, model functions
2086 should be used instead.
2087 (Append): Default parameter value
2088 replaced by new wrapper to allow more precise contracts.
2089 (Insert): Default parameter value replaced by new wrapper to
2090 allow more precise contracts.
2091 (Delete): Default parameter
2092 value replaced by new wrapper to allow more precise contracts.
2093 (Prepend): Default parameter value replaced by new wrapper to
2094 allow more precise contracts.
2095 (Delete_First): Default parameter
2096 value replaced by new wrapper to allow more precise contracts.
2097 (Delete_Last): Default parameter value replaced by new wrapper
2098 to allow more precise contracts.
2099
2100 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
2101
2102 * exp_spark.adb (Expand_SPARK): Perform specialized expansion
2103 for object declarations.
2104 (Expand_SPARK_N_Object_Declaration): New routine.
2105 * sem_elab.adb (Check_A_Call): Include calls to the
2106 Default_Initial_Condition procedure of a type under the SPARK
2107 elaboration checks umbrella.
2108
2109 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
2110
2111 * sem.adb (Analyze): Diagnose an illegal iterated component
2112 association.
2113 * sem_util.ads, sem_util.adb
2114 (Diagnose_Iterated_Component_Association): New routine.
2115
2116 2017-04-27 Bob Duff <duff@adacore.com>
2117
2118 * adaint.c (__gnat_get_current_dir): Return 0 in length if
2119 getcwd fails.
2120 * a-direct.adb, g-dirope.adb, osint.adb, s-os_lib.adb: Raise
2121 exception if getcwd failed.
2122
2123 2017-04-27 Yannick Moy <moy@adacore.com>
2124
2125 * exp_dbug.adb, exp_dbug.ads (Get_External_Name): Prefix ghost
2126 entities with special prefix.
2127
2128 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
2129
2130 * debug.adb Change the documentation of switch -gnatd.s.
2131 * exp_ch7.adb (Make_Transient_Block): Transient blocks do not need
2132 to manage the secondary stack when an enclosing scope already
2133 performs this functionality (aka relaxed management). Switch
2134 -gnatd.s may be used to force strict management in which case
2135 the block will manage the secondary stack unconditionally. Add
2136 a guard to stop the traversal when encountering a package or a
2137 subprogram scope.
2138
2139 2017-04-27 Ed Schonberg <schonberg@adacore.com>
2140
2141 * sem_res.adb (Resolve_Call): Refine further the handling of
2142 limited views of return types in function calls. If the function
2143 that returns a limited view appears in the current unit,
2144 we do not replace its type by the non-limited view because
2145 this transformation is performed int the back-end. However,
2146 the type of the call itself must be the non-limited view, to
2147 prevent spurious resolution errors.
2148
2149 2017-04-27 Ed Schonberg <schonberg@adacore.com>
2150
2151 * einfo,ads, einfo.adb (Class_Wide_Preconds, Class_Wide_Postconds):
2152 Removed, proposed implementation using generics for class-wide
2153 preconditions proved impractical.
2154 (Class_Wide_Clone): New attribute of subprogram. Designates
2155 subprogram created for primitive operations with class-wide
2156 pre/postconditions that contain calls to other primitives. The
2157 clone holds the body of the original primitive, but the
2158 pre/postonditions do not apply to it. The original body is
2159 rewritten as a wrapper for a call to the clone.
2160 (Is_Class_Wide_Clone): New flag to identify a Class_Wide_Clone. If
2161 the flag is set, no code for the corresponding pre/postconditions
2162 is inserted into its body.
2163
2164 2017-04-27 Bob Duff <duff@adacore.com>
2165
2166 * exp_prag.adb, par-prag.adb, sem_ch13.adb: Ignore
2167 Scalar_Storage_Order if -gnatI is given.
2168 * sem_prag.adb (Analyze_Pragma): Ignore
2169 Default_Scalar_Storage_Order if -gnatI is given.
2170
2171 2017-04-27 Claire Dross <dross@adacore.com>
2172
2173 * a-cofuba.ads (Add): Take as an additional input parameter
2174 the position where the element should be inserted.
2175 (Remove): New function that removes an element from the container.
2176 * a-cofuma.ads (Add): Adapt to the new API of Base.Add.
2177 * a-cofuse.ads (Add): Adapt to the new API of Base.Add.
2178 (Remove): New function that removes an element from a set.
2179 * a-cofuve.ads (Add): Adapt to the new API of Base.Add.
2180 (Remove): New function that removes an element from a sequence.
2181 (Insert): New function that adds anywhere in a sequence.
2182
2183 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
2184
2185 * checks.adb (Generate_Range_Check): Revert previous change.
2186
2187 2017-04-27 Gary Dismukes <dismukes@adacore.com>
2188
2189 * sem_util.adb: Minor reformatting/rewording.
2190
2191 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
2192
2193 * lib-xref.adb (Generate_Reference): The use
2194 of attribute 'Result is not considered a violation of pragma
2195 Unreferenced.
2196
2197 2017-04-27 Justin Squirek <squirek@adacore.com>
2198
2199 * cstand.adb (Create_Standard): Correctly set
2200 Directly_Designated_Type for Any_Access.
2201 * sem_type.adb (Covers): Minor grammar fixes.
2202
2203 2017-04-27 Bob Duff <duff@adacore.com>
2204
2205 * sem_attr.adb: Minor cleanup.
2206
2207 2017-04-27 Claire Dross <dross@adacore.com>
2208
2209 * a-cofuba.ads, a-cofuba.adb (Ada.Containers.Functional_Base): New
2210 private child of Ada.Containers used to implement all functional
2211 containers.
2212 * a-cofuma.ads, a-cofuma.adb (Ada.Containers.Functional_Maps): New
2213 child of Ada.Containers. It provides functional indefinite unbounded
2214 maps which can be used as high level models for specification
2215 of data structures.
2216 * a-cofuse.ads, a-cofuse.adb (Ada.Containers.Functional_Sets): New
2217 child of Ada.Containers. It provides functional indefinite unbounded
2218 sets which can be used as high level models for specification
2219 of data structures.
2220 * a-cofuve.ads, a-cofuve.adb (Ada.Containers.Functional_Vectors): New
2221 child of Ada.Containers. It provides functional indefinite unbounded
2222 vectors which can be used as high level models for specification
2223 of data structures.
2224 * Makefile.rtl: Add new packages.
2225 * impunit.adb: Add new packages.
2226
2227 2017-04-27 Gary Dismukes <dismukes@adacore.com>
2228
2229 * sem_ch4.adb: Minor reformatting.
2230
2231 2017-04-27 Ed Schonberg <schonberg@adacore.com>
2232
2233 * sem_ch12.adb (Analyze_Associations): minor reformatting.
2234 (Check_Fixed_Point_Actual): Do not emit a warning on a fixed
2235 point type actual that has user-defined arithmetic primitives,
2236 when there is a previous actual for a formal package that defines
2237 a fixed-point type with the parent user-defined operator.
2238
2239 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
2240
2241 * checks.adb (Generate_Range_Check): Reinstate part of previous change.
2242 * sem_attr.adb (Resolve_Attribute): Generate a range check when
2243 the component type allows range checks.
2244
2245 2017-04-27 Ed Schonberg <schonberg@adacore.com>
2246
2247 * sem_aux.adb (Is_Generic_Formal): Use original node to locate
2248 corresponding declaration, because formal derived types are
2249 rewritten as private extensions.
2250
2251 2017-04-27 Ed Schonberg <schonberg@adacore.com>
2252
2253 * sem_dim.adb (Analyze_Dimension_Binary_Op): Do not check
2254 dimensions of operands if node has been analyzed already, because
2255 previous analysis and dimension checking will have removed the
2256 dimension information from the operands.
2257
2258 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
2259
2260 * debug.adb: Document the use of switch -gnatd.s.
2261 * einfo.ads Update the documentation on attribute
2262 Sec_Stack_Needed_For_Return and attribute Uses_Sec_Stack. Remove
2263 the uses of these attributes from certain entities.
2264 * exp_ch7.adb (Make_Transient_Block): Reimplement the circuitry
2265 which determines whether the block should continue to manage
2266 the secondary stack.
2267 (Manages_Sec_Stack): New routine.
2268
2269 2017-04-27 Bob Duff <duff@adacore.com>
2270
2271 * atree.ads: Minor edit.
2272
2273 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
2274
2275 * sinfo.ads: Update the section on Ghost mode. Add
2276 a section on SPARK mode. Update the placement of section on
2277 expression functions.
2278
2279 2017-04-27 Bob Duff <duff@adacore.com>
2280
2281 * sinput.adb (Get_Source_File_Index): Don't
2282 assert that S is in the right range in the case where this is
2283 a .dg file under construction.
2284
2285 2017-04-27 Yannick Moy <moy@adacore.com>
2286
2287 * sem_util.adb (Check_Result_And_Post_State):
2288 Handle more precisely each conjunct in expressions formed by
2289 and'ing sub-expressions.
2290
2291 2017-04-27 Gary Dismukes <dismukes@adacore.com>
2292
2293 * exp_ch4.adb, sem_ch4.adb: Minor typo fix and reformatting.
2294
2295 2017-04-25 Arnaud Charlet <charlet@adacore.com>
2296
2297 * gnat_rm.texi, gnat_ugn.texi,
2298 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
2299 doc/gnat_ugn/platform_specific_information.rst,
2300 doc/gnat_ugn/gnat_and_program_execution.rst,
2301 doc/gnat_ugn/gnat_utility_programs.rst,
2302 doc/gnat_ugn/the_gnat_compilation_model.rst,
2303 doc/gnat_rm/implementation_defined_attributes.rst,
2304 doc/gnat_rm/the_gnat_library.rst,
2305 doc/gnat_rm/implementation_defined_pragmas.rst,
2306 doc/gnat_rm/representation_clauses_and_pragmas.rst,
2307 doc/gnat_rm/implementation_of_specific_ada_features.rst,
2308 doc/gnat_rm/implementation_defined_aspects.rst,
2309 doc/gnat_rm/implementation_defined_characteristics.rst: Update
2310 documentation.
2311
2312 2017-04-25 Arnaud Charlet <charlet@adacore.com>
2313
2314 * exp_ch4.adb (Expand_N_Case_Expression): Emit error message when
2315 generating C code on complex case expressions.
2316
2317 2017-04-25 Arnaud Charlet <charlet@adacore.com>
2318
2319 * sem_prag.adb (Analyze_Pragma): Generate a warning instead
2320 of silently ignoring pragma Ada_xxx in Latest_Ada_Only mode.
2321 * directio.ads, ioexcept.ads, sequenio.ads, text_io.ads: Use
2322 Ada_2012 instead of Ada_2005 to be compatible with the above
2323 change.
2324 * bindgen.adb: Silence new warning on pragma Ada_95.
2325
2326 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2327
2328 * checks.adb (Generate_Range_Check): Revert part of previous change.
2329
2330 2017-04-25 Ed Schonberg <schonberg@adacore.com>
2331
2332 * sem_ch4.adb (Try_Container_Indexing): Handle properly a
2333 container indexing operation that appears as a an actual in a
2334 parameter association in a procedure call.
2335
2336 2017-04-25 Olivier Ramonat <ramonat@adacore.com>
2337
2338 * prj-proc.adb, sem_util.adb, s-stposu.adb, sem_attr.adb, prj-conf.ads:
2339 Fix spelling mistakes.
2340
2341 2017-04-25 Bob Duff <duff@adacore.com>
2342
2343 * types.ads, osint.adb, sinput-c.adb, sinput-d.adb, sinput-l.adb,
2344 * sinput-p.adb: Use regular fat pointers, with bounds checking,
2345 for source buffers. Fix misc obscure bugs.
2346 * sinput.ads, sinput.adb: Use regular fat pointers, with bounds
2347 checking, for source buffers. Modify representation clause for
2348 Source_File_Record as appropriate. Move Source_File_Index_Table
2349 from spec to body, because it is not used outside the body.
2350 Move Set_Source_File_Index_Table into the private part, because
2351 it is used only in the body and in children. Use trickery to
2352 modify the dope in the generic instantiation case. It's ugly,
2353 but not as ugly as the previous method. Fix documentation.
2354 Remove obsolete code.
2355 * fname-sf.adb, targparm.adb: Fix misc out-of-bounds
2356 indexing in source buffers.
2357 * fmap.adb: Avoid conversions from one string type to another.
2358 Remove a use of global name buffer.
2359 * osint.ads, sfn_scan.ads, sfn_scan.adb, sinput-c.ads: Comment
2360 fixes.
2361
2362 2017-04-25 Gary Dismukes <dismukes@adacore.com>
2363
2364 * exp_util.adb, exp_ch4.adb: Minor reformatting.
2365
2366 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2367
2368 * checks.adb: Code clean up in various routines.
2369 (Generate_Range_Check): Do not generate a range check when the
2370 expander is not active or when index/range checks are suppressed
2371 on the target type.
2372 (Insert_List_After_And_Analyze, Insert_List_Before_And_Analyze):
2373 Remove variants that include a Supress parameter. These routines
2374 are never used, and were introduced before the current scope-based
2375 check suppression method.
2376
2377 2017-04-25 Vasiliy Fofanov <fofanov@adacore.com>
2378
2379 * prj-part.adb, cstreams.c, osint.adb, osint.ads: Remove VMS specific
2380 code and some subprogram calls that are now noop.
2381
2382 2017-04-25 Arnaud Charlet <charlet@adacore.com>
2383
2384 * exp_ch4.adb (Expand_N_Case_Expression): Take
2385 Minimize_Expression_With_Actions into account when possible.
2386
2387 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2388
2389 * exp_util.adb (Known_Non_Null): Moved to Sem_Util.
2390 (Known_Null): Moved to Sem_Util.
2391 * exp_util.ads (Known_Non_Null): Moved to Sem_Util.
2392 (Known_Null): Moved to Sem_Util.
2393 * sem_util.adb Add new enumeration type Null_Status_Kind.
2394 (Known_Non_Null): Moved from Exp_Util. Most of the logic in
2395 this routine is now carried out by Null_Status.
2396 (Known_Null): Moved from Exp_Util. Most of the logic in this routine
2397 is now carried out by Null_Status.
2398 (Null_Status): New routine.
2399 * sem_util.ads (Known_Non_Null): Moved from Exp_Util.
2400 (Known_Null): Moved from Exp_Util.
2401
2402 2017-04-25 Ed Schonberg <schonberg@adacore.com>
2403
2404 * sem_ch6.adb (Analyze_Expression_Function): Do not report an
2405 error on the return type of an expression function that is a
2406 completion, if the type is derived from a generic formal type.
2407
2408 2017-04-25 Ed Schonberg <schonberg@adacore.com>
2409
2410 * sem_dim.adb (Dimensions_Of_Operand): The dimensions of a type
2411 conversion are those of the target type.
2412
2413 2017-04-25 Bob Duff <duff@adacore.com>
2414
2415 * a-clrefi.adb: Minor cleanup.
2416
2417 2017-04-25 Gary Dismukes <dismukes@adacore.com>
2418
2419 * exp_util.adb, exp_util.ads, types.ads: Minor reformatting.
2420
2421 2017-04-25 Bob Duff <duff@adacore.com>
2422
2423 * err_vars.ads, fmap.adb, fmap.ads, comperr.adb, fname-sf.adb,
2424 types.adb, types.ads, types.h, sinput-l.adb, targparm.adb,
2425 errout.adb, sinput.adb, sinput.ads, cstand.adb, scn.adb,
2426 scn.ads, gnatls.adb: Eliminate the vestigial Internal_Source_File and
2427 the Internal_Source buffer. This removes the incorrect call to "="
2428 the customer noticed.
2429 Wrap remaining calls to "=" in Null_Source_Buffer_Ptr. We
2430 eventually need to eliminate them altogether. Or else get rid
2431 of zero-origin addressing.
2432
2433 2017-04-25 Claire Dross <dross@adacore.com>
2434
2435 * exp_util.ads (Expression_Contains_Primitives_Calls_Of): New
2436 function used in GNATprove to know if an expression contains
2437 non-dispatching calls on primitives of a tagged type.
2438
2439 2017-04-25 Bob Duff <duff@adacore.com>
2440
2441 * rtsfind.adb (Initialize): Initialize
2442 First_Implicit_With. Building the compiler with Normalize_Scalars
2443 and validity checking finds this being used as an uninitialized
2444 variable.
2445
2446 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2447
2448 * contracts.adb (Analyze_Entry_Or_Subprogram_Body_Contract):
2449 Add a warning about SPARK mode management. The routine now
2450 saves and restores both the mode and associated pragma.
2451 (Analyze_Entry_Or_Subprogram_Contract): Add a warning about
2452 SPARK mode management. The routine now saves and restores both
2453 the mode and associated pragma.
2454 (Analyze_Object_Contract):
2455 Add a warning about SPARK mode management. The routine
2456 now saves and restores both the mode and associated pragma.
2457 (Analyze_Package_Body_Contract): Add a warning about SPARK mode
2458 management. The routine now saves and restores both the mode
2459 and associated pragma. (Analyze_Package_Contract): Add a warning
2460 about SPARK mode management. The routine now saves and restores
2461 both the mode and associated pragma.
2462 (Analyze_Task_Contract):
2463 Add a warning about SPARK mode management. The routine now saves
2464 and restores both the mode and associated pragma.
2465 * expander.adb (Expand): Change the way the Ghost mode is saved
2466 and restored.
2467 * exp_ch3.adb (Freeze_Type): Change the way the Ghost mode is
2468 saved and restored.
2469 * exp_disp.adb (Make_DT): Change the way the Ghost mode is saved
2470 and restored.
2471 * exp_util.adb (Build_DIC_Procedure_Body):
2472 Change the way the Ghost mode is saved and restored.
2473 (Build_DIC_Procedure_Declaration): Change the way the Ghost
2474 mode is saved and restored.
2475 (Build_Invariant_Procedure_Body):
2476 Change the way the Ghost mode is saved and restored.
2477 (Build_Invariant_Procedure_Declaration): Change the way the Ghost
2478 mode is saved and restored.
2479 (Make_Predicate_Call): Change the
2480 way the Ghost mode is saved and restored.
2481 * freeze.adb (Freeze_Entity): Change the way the Ghost mode is
2482 saved and restored.
2483 * ghost.adb (Mark_And_Set_Ghost_Assignment): Remove parameter Mode
2484 and its assignment.
2485 (Mark_And_Set_Ghost_Body): Remove parameter
2486 Mode and its assignment.
2487 (Mark_And_Set_Ghost_Completion):
2488 Remove parameter Mode and its assignment.
2489 (Mark_And_Set_Ghost_Declaration): Remove parameter Mode and its
2490 assignment.
2491 (Mark_And_Set_Ghost_Instantiation): Remove parameter
2492 Mode and its assignment.
2493 (Mark_And_Set_Ghost_Procedure_Call):
2494 Remove parameter Mode and its assignment.
2495 (Set_Ghost_Mode):
2496 Remove parameter Mode and its assignment.
2497 * ghost.ads (Mark_And_Set_Ghost_Assignment): Remove parameter Mode
2498 and update the comment on usage.
2499 (Mark_And_Set_Ghost_Body):
2500 Remove parameter Mode and update the comment on usage.
2501 (Mark_And_Set_Ghost_Completion): Remove parameter Mode and
2502 update the comment on usage.
2503 (Mark_And_Set_Ghost_Declaration):
2504 Remove parameter Mode and update the comment on usage.
2505 (Mark_And_Set_Ghost_Instantiation): Remove parameter Mode and
2506 update the comment on usage.
2507 (Mark_And_Set_Ghost_Procedure_Call):
2508 Remove parameter Mode and update the comment on usage.
2509 (Set_Ghost_Mode): Remove parameter Mode and update the comment
2510 on usage.
2511 * lib.ads Remove obsolete fields SPARK_Mode_Pragma from various
2512 types.
2513 * lib-load.adb (Create_Dummy_Package_Unit): Remove the assignment
2514 of obsolete field SPARK_Mode_Pragma.
2515 (Load_Main_Source): Remove
2516 the assignment of obsolete field SPARK_Mode_Pragma.
2517 (Load_Unit): Remove the assignment of obsolete field SPARK_Mode_Pragma.
2518 * lib-writ.adb (Add_Preprocessing_Dependency): Remove
2519 the assignment of obsolete field SPARK_Mode_Pragma.
2520 (Ensure_System_Dependency): Remove the assignment of obsolete
2521 field SPARK_Mode_Pragma.
2522 * rtsfind.adb (Load_RTU): Add a warning about Ghost and SPARK
2523 mode management. Change the way Ghost and SPARK modes are saved
2524 and restored.
2525 * sem.adb (Analyze): Change the way the Ghost mode is saved
2526 and restored.
2527 * sem_ch3.adb (Analyze_Object_Declaration): Change the way the
2528 Ghost mode is saved and restored.
2529 (Process_Full_View): Change
2530 the way the Ghost mode is saved and restored.
2531 * sem_ch5.adb (Analyze_Assignment): Change the way the Ghost
2532 mode is saved and restored.
2533 * sem_ch6.adb (Analyze_Procedure_Call): Change the way the Ghost
2534 mode is saved and restored.
2535 (Analyze_Subprogram_Body_Helper):
2536 Change the way the Ghost mode is saved and restored.
2537 * sem_ch7.adb (Analyze_Package_Body_Helper): Change the way the
2538 Ghost mode is saved and restored.
2539 * sem_ch10.adb (Analyze_Subunit): Add a warning about SPARK mode
2540 management. Save the SPARK mode-related data prior to any changes
2541 to the scope stack and contexts. The mode is then reinstalled
2542 before the subunit is analyzed in order to restore the original
2543 view of the subunit.
2544 * sem_ch12.adb (Analyze_Package_Instantiation): Update the
2545 warning on region management. Change the way the Ghost and
2546 SPARK modes are saved and restored.
2547 (Inline_Instance_Body):
2548 Add a warning about SPARK mode management. Code clean up.
2549 (Analyze_Subprogram_Instantiation): Update the warning on region
2550 management. Change the way the Ghost and SPARK modes are saved
2551 and restored.
2552 (Instantiate_Package_Body): Update the warning
2553 on region management. Change the way the Ghost and SPARK modes
2554 are saved and restored.
2555 (Instantiate_Subprogram_Body): Update
2556 the warning on region management. Change the way the Ghost and
2557 SPARK modes are saved and restored.
2558 (Set_Instance_Env): Add a
2559 warning about SPARK mode management. Change the way SPARK mode
2560 is saved and restored.
2561 * sem_ch13.adb (Build_Predicate_Functions):
2562 Change the way the Ghost mode is saved and restored.
2563 (Build_Predicate_Function_Declaration): Change the way the Ghost
2564 mode is saved and restored.
2565 * sem_elab.adb (Check_Elab_Calls): Add a warning about SPARK
2566 mode management. Change the way SPARK mode is saved and restored.
2567 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
2568 Change the way the Ghost mode is saved and restored.
2569 (Analyze_Initial_Condition_In_Decl_Part): Change the way
2570 the Ghost mode is saved and restored.
2571 (Analyze_Pragma):
2572 Change the way the Ghost mode is saved and restored.
2573 (Analyze_Pre_Post_Condition_In_Decl_Part): Change the way the
2574 Ghost mode is saved and restored.
2575 * sem_util.adb (Install_SPARK_Mode): New routine.
2576 (Restore_SPARK_Mode): New routine.
2577 (Save_SPARK_Mode_And_Set): Removed.
2578 (Set_SPARK_Mode): New routine.
2579 * sem_util.ads (Install_SPARK_Mode): New routine.
2580 (Restore_SPARK_Mode): New routine.
2581 (Save_SPARK_Mode_And_Set): Removed.
2582 (Set_SPARK_Mode): New routine.
2583
2584 2017-04-25 Ed Schonberg <schonberg@adacore.com>
2585
2586 * sem_util.adb, sem_util.ads (From_Nested_Package): New predicate
2587 to determine whether a type is declared in a local package that
2588 has not yet been frozen.
2589 * freeze.adb (Freeze_Before): Use new predicate to determine
2590 whether a local package must be installed on the scope stack
2591 in order to evaluate in the proper scope actions generated by
2592 aspect specifications, such as Predicate
2593 * sem_ch13.adb: Simplify code in Analyze_Aspects_At_Freeze_Point
2594 using new predicate.
2595
2596 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2597
2598 * sem_warn.adb (Warn_On_Constant_Valid_Condition): Do not consider
2599 comparisons between non- scalar expressions expressions because
2600 their values cannot be invalidated.
2601 * sem_warn.ads (Warn_On_Constant_Valid_Condition): Update the
2602 comment on usage.
2603
2604 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2605
2606 * par_sco.adb: Minor reformatting.
2607
2608 2017-04-25 Ed Schonberg <schonberg@adacore.com>
2609
2610 * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): If entity
2611 is a type from an unfrozen local package, install package to
2612 complete the analysis of delayed aspects of the type.
2613
2614 2017-04-25 Tristan Gingold <gingold@adacore.com>
2615
2616 * bingen.adb (System_Version_Control_Used): New variable.
2617 (Resolve_Binder_Options): Set the above variable.
2618 (Gen_Output_File_Ada): Conditionally call Gen_Versions.
2619 (Gen_Elab_Order): Emit blank line before.
2620
2621 2017-04-25 Justin Squirek <squirek@adacore.com>
2622
2623 * sem_cat.adb (Validate_RT_RAT_Component): Added
2624 an extra check to ignore incomplete types.
2625
2626 2017-04-25 Thomas Quinot <quinot@adacore.com>
2627
2628 * sem_prag.adb (Analyze_Pragma, case Pragma_Check): Remove
2629 bogus circuitry for the case where Name is Predicate.
2630
2631 2017-04-25 Thomas Quinot <quinot@adacore.com>
2632
2633 * par_sco.adb(Traverse_Declarations_Or_Statements.Traverse_Aspects):
2634 Create SCOs for Predicate aspects in disabled
2635 state initially, to be enabled later on by...
2636 * sem_ch13.adb (Build_Predicate_Functions.Add_Predicates): Mark
2637 SCO for predicate as enabled.
2638
2639 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2640
2641 * comperr.adb (Compiler_Abort): Remove now obsolete pair of
2642 pragmas Warnings Off / On.
2643 * namet.adb (Finalize): Remove now obsolete pair of pragmas
2644 Warnings Off / On.
2645 * output.adb: Remove now obsolete pair of pragmas Warnings Off / On.
2646 * sem_warn.adb (Warn_On_Constant_Valid_Condition): Do not
2647 consider comparisons between static expressions because their
2648 values cannot be invalidated.
2649 * urealp.adb (Tree_Read): Remove now obsolete pair of pragmas
2650 Warnings Off / On.
2651 (Tree_Write): Remove now obsolete pair of pragmas Warnings Off / On.
2652 * usage.adb Remove now obsolete pair of pragmas Warnings Off / On.
2653
2654 2017-04-25 Bob Duff <duff@adacore.com>
2655
2656 * sem_elab.adb (In_Task_Activation): Trace internal calls in
2657 task bodies.
2658
2659 2017-04-25 Gary Dismukes <dismukes@adacore.com>
2660
2661 * sem_prag.adb, sem_warn.adb, sem_eval.adb: Minor reformatting and
2662 typo fixes.
2663
2664 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2665
2666 * comperr.adb (Compiler_Abort): Add a pair of pragma Warnings
2667 On/Off to defend against a spurious warning in conditional
2668 compilation.
2669 * exp_ch4.adb (Rewrite_Comparison): Reimplemented.
2670 * namet.adb (Finalize): Add a pair of pragma Warnings On/Off to
2671 defend against a spurious warning in conditional compilation.
2672 * output.adb Add a pair of pragma Warnings On/Off to defend
2673 against a spurious warning in conditional compilation.
2674 * sem_eval.adb (Eval_Relational_Op): Major code clean up.
2675 (Fold_General_Op): New routine.
2676 (Fold_Static_Real_Op): New routine.
2677 (Test_Comparison): New routine.
2678 * sem_eval.ads (Test_Comparison): New routine.
2679 * sem_warn.adb (Is_Attribute_Constant_Comparison): New routine.
2680 (Warn_On_Constant_Valid_Condition): New routine.
2681 (Warn_On_Known_Condition): Use Is_Attribute_Constant_Comparison
2682 to detect a specific case.
2683 * sem_warn.adb (Warn_On_Constant_Valid_Condition): New routine.
2684 * urealp.adb (Tree_Read): Add a pair of pragma Warnings On/Off
2685 to defend against a spurious warning in conditional compilation.
2686 (Tree_Write): Add a pair of pragma Warnings On/Off to defend
2687 against a spurious warning in conditional compilation.
2688 * usage.adb Add a pair of pragma Warnings On/Off to defend
2689 against a spurious warning in conditional compilation.
2690
2691 2017-04-25 Arnaud Charlet <charlet@adacore.com>
2692
2693 * sinfo.ads, sem_ch13.adb: Update comment.
2694
2695 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2696
2697 * sem_util.adb (Is_Post_State): A reference to a
2698 generic in out parameter is considered a change in the post-state
2699 of a subprogram.
2700
2701 2017-04-25 Ed Schonberg <schonberg@adacore.com>
2702
2703 * sem_ch12.adb (Load_Parent_Of_Generic); When retrieving the
2704 declaration of a subprogram instance within its wrapper package,
2705 skip over null statements that may result from the rewriting of
2706 ignored pragmas.
2707
2708 2017-04-25 Ed Schonberg <schonberg@adacore.com>
2709
2710 * exp_attr.adb (Expand_Attribute_Reference, case 'Read):
2711 If the type is an unchecked_union, replace the attribute with
2712 a Raise_Program_Error (rather than inserting such before the
2713 attribute reference) to handle properly the case where we are
2714 processing a component of a larger record, and we need to prevent
2715 further expansion for the unchecked union.
2716 (Expand_Attribute_Reference, case 'Write): If the type is
2717 an unchecked_union, check whether enclosing scope is a Write
2718 subprogram. Replace attribute with a Raise_Program_Error if the
2719 discriminants of the unchecked_union type have not default values
2720 because such a use is erroneous..
2721
2722 2017-04-25 Tristan Gingold <gingold@adacore.com>
2723
2724 * exp_ch9.adb (Expand_N_Task_Type_Declaration):
2725 Add relative_deadline to task record on edf profile.
2726 (Make_Initialize_Protection): Pass deadline_floor value on edf profile.
2727 (Make_Task_Create_Call): Pass relative_deadline value.
2728 * par-prag.adb (Prag): Handle Pragma_Deadline_Floor.
2729 * s-rident.ads (Profile_Name): Add GNAT_Ravenscar_EDF.
2730 (Profile_Info): Add info for GNAT_Ravenscar_EDF.
2731 * sem_prag.adb (Set_Ravenscar_Profile): Handle
2732 GNAT_Ravenscar_EDF (set scheduling policy).
2733 (Analyze_Pragma): Handle GNAT_Ravenscar_EDF profile and Deadline_Floor
2734 pragma.
2735 (Sig_Flags): Add choice for Pragma_Deadline_Floor.
2736 * snames.ads-tmpl (Name_Deadline_Floor, Name_Gnat_Ravenscar_EDF):
2737 New names.
2738 (Pragma_Deadline_Floor): New pragma.
2739 * targparm.adb (Get_Target_Parameters): Recognize
2740 GNAT_Ravenscar_EDF profile.
2741
2742 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
2743
2744 * gnatvsn.ads (Library_Version): Bump to 8. Update comment.
2745
2746 2017-04-25 Ed Schonberg <schonberg@adacore.com>
2747
2748 * sem_aux.adb (Nearest_Ancestor): Use original node of type
2749 declaration to locate nearest ancestor, because derived
2750 type declarations for record types are rewritten as record
2751 declarations.
2752 * sem_ch13.adb (Add_Call): Use an unchecked conversion to handle
2753 properly derivations that are completions of private types.
2754 (Add_Predicates): If type is private, examine rep. items of full
2755 view, which may include inherited predicates.
2756 (Build_Predicate_Functions): Ditto.
2757
2758 2017-04-25 Javier Miranda <miranda@adacore.com>
2759
2760 * sem_util.adb (New_Copy_Tree.Visit_Entity): Extend previous change
2761 to generate new entities for subtype declarations located in
2762 Expression_With_Action nodes.
2763
2764 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2765
2766 * sem_elab.adb (Check_A_Call): Remove
2767 local variables Is_DIC_Proc and Issue_In_SPARK. Verify the
2768 need for Elaborate_All when SPARK elaboration checks are
2769 required. Update the checks for instances, variables, and calls
2770 to Default_Initial_Condition procedures.
2771
2772 2017-04-25 Ed Schonberg <schonberg@adacore.com>
2773
2774 * aspects.ads, aspects.adb: Make the GNAT-specific pragma No_Inline
2775 into a boolean aspect, in analogy with the Ada aspect No_Return.
2776
2777 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2778
2779 * exp_ch6.adb, sem_ch13.adb, sem_ch6.adb: Minor reformatting.
2780
2781 2017-04-25 Bob Duff <duff@adacore.com>
2782
2783 * sem_res.adb (Resolve_Actuals): Under -gnatd.q, reset
2784 Is_True_Constant for an array variable that is passed to a
2785 foreign function as an 'in' parameter.
2786 * debug.adb: Document -gnatd.q.
2787
2788 2017-04-25 Ed Schonberg <schonberg@adacore.com>
2789
2790 * sem_ch6.adb (Analyze_Expression_Function): If expression function
2791 is completion and return type is an access type do not freeze
2792 designated type: this will be done in the process of freezing
2793 the expression if needed.
2794 (Freeze_Expr_Types): Check whether type is complete before
2795 creating freeze node, to provide a better error message if
2796 reference is premature.
2797 * sem_ch13.adb (Check_Indexing_Functions): Ignore inherited
2798 functions created by type derivations.
2799
2800 2017-04-25 Pascal Obry <obry@adacore.com>
2801
2802 * g-sercom.ads: Add simple usage of GNAT.Serial_Communication.
2803
2804 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2805
2806 * sem_res.adb (Resolve_Type_Conversion):
2807 When resolving against any fixed type, set the type of the
2808 operand as universal real when the operand is a multiplication
2809 or a division where both operands are of any fixed type.
2810 (Unique_Fixed_Point_Type): Add local variable ErrN. Improve the
2811 placement of an error message by pointing to the operand of a
2812 type conversion rather than the conversion itself.
2813
2814 2017-04-25 Thomas Quinot <quinot@adacore.com>
2815
2816 * sem_ch13.adb (Build_Predicate_Function_Declaration): Set
2817 Needs_Debug_Info when producing SCOs.
2818
2819 2017-04-25 Thomas Quinot <quinot@adacore.com>
2820
2821 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
2822 Always pass a null finalization master for a library level named access
2823 type to which a pragme No_Heap_Finalization applies.
2824
2825 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
2826
2827 PR ada/78845
2828
2829 * a-ngcoar.adb, a-ngrear.adb (Inverse): call Unit_Matrix with First_1
2830 set to A'First(2) and vice versa.
2831
2832 2017-04-25 Yannick Moy <moy@adacore.com>
2833
2834 * freeze.adb (Freeze_Record_Type): Remove obsolete
2835 rule on volatile tagged record restriction on SPARK code.
2836
2837 2017-04-25 Yannick Moy <moy@adacore.com>
2838
2839 * sem_prag.adb (minor) Fix SPARK RM reference.
2840
2841 2017-04-25 Yannick Moy <moy@adacore.com>
2842
2843 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): Update
2844 comment to reflect which entity is chosen as unique entity.
2845 (Unique_Entity): Return full view instead of private spec for
2846 protected type or task type. Fix possible incorrect access when
2847 called on entry.
2848
2849 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
2850
2851 * sem_res.adb (Set_Slice_Subtype): Treat specially bit-packed
2852 array types only instead of all packed array types.
2853
2854 2017-04-25 Ed Schonberg <schonberg@adacore.com>
2855
2856 * sem_ch6.adb (Conforming_Types): If type of formal as a specified
2857 dimension system, verify that dimensions of both match.
2858 (Check_Conformance): Add error message in case of dimension
2859 mismatch.
2860 * sem_dim.ads, sem_dim.adb (Dimensions_Match): New utility
2861 predicate.
2862
2863 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
2864
2865 * gnatxref.adb, gnatfind.adb: Avoid using the term project file,
2866 confusing.
2867
2868 2017-04-25 Yannick Moy <moy@adacore.com>
2869
2870 * sem_util.adb: Minor refactoring.
2871 * freeze.adb (Freeze_Record_Type): Fix checking of SPARK RM 7.1.3(5).
2872
2873 2017-04-25 Claire Dross <dross@adacore.com>
2874
2875 * sem_prag.adb (Collect_Inherited_Class_Wide_Conditions): Go to
2876 ultimate alias when accessing overridden operation. Indeed, if the
2877 overridden operation is itself inherited, it won't have any explicit
2878 contract.
2879
2880 2017-04-25 Ed Schonberg <schonberg@adacore.com>
2881
2882 * sem_warn.adb (Warn_On_Overlapping_Actuals): There can be no
2883 overlap if the two formals have different types, because formally
2884 the corresponding actuals cannot designate the same objects.
2885
2886 2017-04-25 Ed Schonberg <schonberg@adacore.com>
2887
2888 * sem_dim.adb (Dimensions_Of_Operand): minot cleanups: a) If
2889 dimensions are present from context, use them. b) If operand is
2890 a static constant rewritten as a literal, obtain the dimensions
2891 from the original declaration, otherwise use dimensions of type
2892 established from context.
2893
2894 2017-04-25 Yannick Moy <moy@adacore.com>
2895
2896 * sem_util.adb (Is_Effectively_Volatile): Protect against base type
2897 of array that is private.
2898
2899 2017-04-25 Gary Dismukes <dismukes@adacore.com>
2900
2901 * sem_ch3.adb, exp_util.adb, sem_prag.adb, exp_ch4.adb: Minor
2902 reformatting.
2903
2904 2017-04-25 Yannick Moy <moy@adacore.com>
2905
2906 * a-ngelfu.adb, a-ngelfu.ads: Add SPARK_Mode On on spec, Off
2907 on body.
2908
2909 2017-04-25 Ed Schonberg <schonberg@adacore.com>
2910
2911 * sem_disp.adb (Check_Dispatching_Context): Add guard to refine
2912 the check that recognizes a call to a private overridding and
2913 replaces the called subprogram with its alias.
2914
2915 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2916
2917 * exp_util.adb: Minor reformatting.
2918
2919 2017-04-25 Justin Squirek <squirek@adacore.com>
2920
2921 * exp_ch3.adb (Freeze_Type): Add condition to always treat
2922 interface types as a partial view of a private type for the
2923 generation of invariant procedure bodies.
2924 * exp_util.adb, exp_util.ads (Add_Inherited_Invariants):
2925 Add a condition to get the Corresponding_Record_Type for
2926 concurrent types, add condition to return in the absence of a
2927 class in the pragma, remove call to Replace_Type_References,
2928 and add call to Replace_References.
2929 (Add_Interface_Invariatns),
2930 (Add_Parent_Invariants): Modify call to Add_Inherited_Invariants
2931 to including the working type T.
2932 (Add_Own_Invariants): Remove
2933 legacy condition for separate units, remove dispatching for ASIS
2934 and save a copy of the expression in the pragma expression.
2935 (Build_Invariant_Procedure_Body): Default initalize vars,
2936 remove return condition on interfaces, always use the
2937 private type for interfaces, and move the processing of types
2938 until after the processing of invariants for the full view.
2939 (Build_Invariant_Procedure_Declaration): Remove condition
2940 to return if an interface type is encountered and add
2941 condition to convert the formal parameter to its class-wide
2942 counterpart if Work_Typ is abstract.
2943 (Replace_Type): Add call to Remove_Controlling_Arguments.
2944 (Replace_Type_Ref): Remove class-wide dispatching for the current
2945 instance of the type.
2946 (Replace_Type_References): Remove parameter "Derived"
2947 (Remove_Controlling_Arguments): Created in order to removing
2948 the controlliong argument from calls to primitives in the case
2949 of the formal parameter being an class-wide abstract type.
2950 * sem_ch3.adb (Build_Assertion_Bodies_For_Type): Almost identical
2951 to the change made to Freeze_Type in exp_ch3. Add a condition
2952 to treat interface types as a partial view.
2953 * sem_prag.adb (Analyze_Pragma): Modify parameters in the call
2954 to Build_Invariant_Procedure_Declaration to properly generate a
2955 "partial" invariant procedure when Typ is an interface.
2956
2957 2017-04-25 Bob Duff <duff@adacore.com>
2958
2959 * a-numeri.ads: Go back to using brackets encoding for the Greek
2960 letter pi.
2961
2962 2017-04-25 Ed Schonberg <schonberg@adacore.com>
2963
2964 * sem_ch3.adb (Derive_Subprogram): Implement rule in RM 6.1.1
2965 (10-15): if derived type T with progenitors is abstract,
2966 and primitive P of this type inherits non-trivial classwide
2967 preconditions from both a parent operation and from an interface
2968 operation, then the inherited operation is abstract if the parent
2969 operation is not null.
2970 * sem_disp.ads, sem_disp.adb: replace function Covers_Some_Interface
2971 with Covered_Interface_Op to yield the actual interface operation
2972 that is implemented by a given inherited operation.
2973
2974 2017-04-25 Javier Miranda <miranda@adacore.com>
2975
2976 * exp_ch4.adb (Expand_N_Op_Expon): Relocate left
2977 and right operands after performing the validity checks. Required
2978 because validity checks may remove side effects from the operands.
2979
2980 2017-04-25 Javier Miranda <miranda@adacore.com>
2981
2982 * exp_attr.adb (Attribute_Unrestricted_Access):
2983 Do not disable implicit type conversion. Required to generate
2984 code that displaces the pointer to reference the secondary
2985 dispatch table.
2986
2987 2017-04-25 Pascal Obry <obry@adacore.com>
2988
2989 * prj-attr.adb, snames.ads-tmpl: Add package Install's
2990 Required_Artifacts attribute.
2991
2992 2017-04-25 Ed Schonberg <schonberg@adacore.com>
2993
2994 * sem_util.adb (Same_Value): String literals are compile-time
2995 values, and comparing them must use Expr_Value_S.
2996
2997 2017-04-25 Ed Schonberg <schonberg@adacore.com>
2998
2999 * sem_ch4.adb (Complete_Object_Interpretation): If an explicit
3000 dereference is introduced for the object, and the object is
3001 overloaded, do not check whether it is aliased, because it may
3002 include an implicit dereference.
3003 * sem_type.adb (Disambiguate): If two interpretations are access
3004 attribute types with the same designated type keep either of
3005 them and do not report an ambiguity. A true ambiguity will be
3006 reported elsewhere.
3007
3008 2017-04-25 Bob Duff <duff@adacore.com>
3009
3010 * a-numeri.ads: Change the encoding of Greek letter Pi from
3011 brackets encoding to UTF-8. Use pragma Wide_Character_Encoding
3012 to indicate the encoding. We considered using a byte order mark
3013 (BOM), but that causes various trouble (misc software eats the
3014 BOM, if you have a patch with a BOM, then it's not at the start
3015 of the patch, so it's not a BOM, the BOM affects with-ing files,
3016 etc.).
3017 * scng.adb, s-wchcnv.adb: Minor.
3018
3019 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3020
3021 * sem_ch3.adb, sem_ch8.adb, sem_disp.adb: Minor reformatting.
3022 2017-04-25 Ed Schonberg <schonberg@adacore.com>
3023
3024 * sem_ch3.adb (Add_Internal_Interface_Entities): Move
3025 Has_Non_Trivial_Precondition to sem_util. for use elsewhere.
3026 Improve error message on operations that inherit non-conforming
3027 classwide preconditions from ancestor and progenitor.
3028 * sem_util.ads, sem_util.adb (Has_Non_Trivial_Precondition):
3029 moved here from sem_ch3.
3030 * sem_ch8.adb (Analyze_Subprogram_Renaming): Implement legality
3031 check given in RM 6.1.1 (17) concerning renamings of overriding
3032 operations that inherits class-wide preconditions from ancestor
3033 or progenitor.
3034
3035 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3036
3037 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Code cleanup.
3038 (Build_Adjust_Statements): Code cleanup.
3039 (Build_Finalizer): Update the initialization of
3040 Exceptions_OK.
3041 (Build_Finalize_Statements): Code cleanup.
3042 (Build_Initialize_Statements): Code cleanup.
3043 (Make_Deep_Array_Body): Update the initialization of
3044 Exceptions_OK.
3045 (Make_Deep_Record_Body): Update the initialization of Exceptions_OK.
3046 (Process_Object_Declaration): Generate a null exception handler only
3047 when exceptions are allowed.
3048 (Process_Transients_In_Scope): Update the initialization of
3049 Exceptions_OK.
3050 * exp_util.ads, exp_util.adb (Exceptions_In_Finalization_OK): New
3051 routine.
3052 * sem_ch11.adb (Analyze_Exception_Handlers): Do not check any
3053 restrictions when the handler is internally generated and the
3054 mode is warnings.
3055
3056 2017-04-25 Ed Schonberg <schonberg@adacore.com>
3057
3058 * sem_ch3.adb (Has_Non_Trivial_Precondition): New predicate to
3059 enforce legality rule on classwide preconditions inherited from
3060 both an ancestor and a progenitor (RM 6.1.1 (10-13).
3061 * sem_disp.adb (Check_Dispatching_Context): A call to an abstract
3062 subprogram need not be dispatching if it appears in a precondition
3063 for an abstract or null subprogram.
3064
3065 2017-04-25 Gary Dismukes <dismukes@adacore.com>
3066
3067 * sem_ch10.adb: Minor typo fix.
3068
3069 2017-04-25 Arnaud Charlet <charlet@adacore.com>
3070
3071 * gcc-interface/Makefile.in: Cleanup VxWorks targets.
3072
3073 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
3074
3075 * fname.adb (Is_Internal_File_Name): Arrange for the slices to
3076 have a length which is a power of 2.
3077 (Is_Predefined_File_Name): Likewise. Adjust comment.
3078
3079 2017-04-25 Bob Duff <duff@adacore.com>
3080
3081 * exp_aggr.adb (Component_Count): Protect the
3082 arithmetic from attempting to convert a value >= 2**31 to Int,
3083 which would otherwise raise Constraint_Error.
3084
3085 2017-04-25 Bob Duff <duff@adacore.com>
3086
3087 * opt.ads (Locking_Policy): Fix incorrect documentation. The
3088 first character of the policy name is not unique.
3089
3090 2017-04-25 Bob Duff <duff@adacore.com>
3091
3092 * s-fileio.adb (Name): Raise Use_Error if the file is a temp file.
3093 * s-ficobl.ads (Is_Temporary_File): Remove incorrect comment
3094 about this flag not being used. It was already used, and it is
3095 now used more.
3096
3097 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3098
3099 * einfo.adb Flag301 is now known as Ignore_SPARK_Mode_Pragmas.
3100 (Ignore_SPARK_Mode_Pragmas): New routine.
3101 (Set_Ignore_SPARK_Mode_Pragmas): New routine.
3102 (Write_Entity_Flags): Add an entry for Ignore_SPARK_Mode_Pragmas.
3103 * einfo.ads Add new attribute Ignore_SPARK_Mode_Pragmas and update
3104 related entities.
3105 (Ignore_SPARK_Mode_Pragmas): New routine
3106 along with pragma Inline.
3107 (Set_Ignore_SPARK_Mode_Pragmas): New routine along with pragma Inline.
3108 * opt.ads Rename flag Ignore_Pragma_SPARK_Mode to
3109 Ignore_SPARK_Mode_Pragmas_In_Instance.
3110 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
3111 Save and restore the value of global flag
3112 Ignore_SPARK_Mode_Pragmas_In_Instance. Set or reinstate the value
3113 of global flag Ignore_SPARK_Mode_Pragmas_In_Instance when either
3114 the corresponding spec or the body must ignore all SPARK_Mode
3115 pragmas found within.
3116 (Analyze_Subprogram_Declaration): Mark
3117 the spec when it needs to ignore all SPARK_Mode pragmas found
3118 within to allow the body to infer this property in case it is
3119 instantiated or inlined later.
3120 * sem_ch7.adb (Analyze_Package_Body_Helper): Save and restore the
3121 value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set
3122 the value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance
3123 when the corresponding spec also ignored all SPARK_Mode pragmas
3124 found within.
3125 (Analyze_Package_Declaration): Mark the spec when
3126 it needs to ignore all SPARK_Mode pragmas found within to allow
3127 the body to infer this property in case it is instantiated or
3128 inlined later.
3129 * sem_ch12.adb (Analyze_Formal_Package_Declaration):
3130 Save and restore the value of flag
3131 Ignore_SPARK_Mode_Pragmas_In_Instance. Mark the
3132 formal spec when it needs to ignore all SPARK_Mode
3133 pragmas found within to allow the body to infer this
3134 property in case it is instantiated or inlined later.
3135 (Analyze_Package_Instantiation): Save and restore the value
3136 of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Mark
3137 the instance spec when it needs to ignore all SPARK_Mode
3138 pragmas found within to allow the body to infer this
3139 property in case it is instantiated or inlined later.
3140 (Analyze_Subprogram_Instantiation): Save and restore the value
3141 of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Mark the
3142 instance spec and anonymous package when they need to ignore
3143 all SPARK_Mode pragmas found within to allow the body to infer
3144 this property in case it is instantiated or inlined later.
3145 (Instantiate_Package_Body): Save and restore the value of global
3146 flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set the value of
3147 global flag Ignore_SPARK_Mode_Pragmas_In_Instance when the
3148 corresponding instance spec also ignored all SPARK_Mode pragmas
3149 found within.
3150 (Instantiate_Subprogram_Body): Save and restore the
3151 value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set
3152 the value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance
3153 when the corresponding instance spec also ignored all SPARK_Mode
3154 pragmas found within.
3155 * sem_prag.adb (Analyze_Pragma): Update the reference to
3156 Ignore_Pragma_SPARK_Mode.
3157 * sem_util.adb (SPARK_Mode_Is_Off): A construct which ignored
3158 all SPARK_Mode pragmas defined within yields mode "off".
3159
3160 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3161
3162 * bindgen.adb, exp_dbug.adb, errout.adb, fname.adb: Minor reformatting.
3163
3164 2017-04-25 Bob Duff <duff@adacore.com>
3165
3166 * exp_atag.adb (Build_CW_Membership): Add "Suppress =>
3167 All_Checks" to avoid generating unnecessary checks.
3168 * exp_ch4.adb (Expand_N_In, Make_Tag_Check): Add "Suppress =>
3169 All_Checks".
3170 * sem.ads: Fix comment.
3171 * expander.ads: Fix comment.
3172 * exp_atag.ads: Fix comment: "Index = 0" should be
3173 "Index >= 0".
3174
3175 2017-04-25 Gary Dismukes <dismukes@adacore.com>
3176
3177 * s-taprop-linux.adb: Minor editorial fixes.
3178
3179 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
3180
3181 * sem_util.adb (New_Copy_Tree): Put back the declarations of the
3182 hash tables at library level. Reinstate the NCT_Hash_Tables_Used
3183 variable and set it to True whenever the main hash table is
3184 populated. Short- circuit the Assoc function if it is false
3185 and add associated guards.
3186
3187 2017-04-25 Olivier Hainque <hainque@adacore.com>
3188
3189 * bindgen.adb (Gen_Elab_Calls): Also update counter of lone
3190 specs without elaboration code that have an elaboration counter
3191 nevertheless, e.g. when compiled with -fpreserve-control-flow.
3192 * sem_ch10.adb (Analyze_Compilation_Unit):
3193 Set_Elaboration_Entity_Required when requested to preserve
3194 control flow, to ensure the unit elaboration is materialized at
3195 bind time, resulting in the inclusion of the unit object file
3196 in the executable closure at link time.
3197
3198 2017-04-25 Pierre-Marie de Rodat <derodat@adacore.com>
3199
3200 * exp_dbug.adb: In Debug_Renaming_Declaration,
3201 when dealing with indexed component, accept to produce a renaming
3202 symbol when the index is an IN parameter or when it is a name
3203 defined in an outer scope.
3204
3205 2017-04-25 Yannick Moy <moy@adacore.com>
3206
3207 * errout.adb (Error_Msg): Adapt continuation
3208 message in instantiations and inlined bodies for info messages.
3209
3210 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
3211
3212 * fname.adb (Has_Internal_Extension): Add pragma Inline.
3213 Use direct 4-character slice comparisons.
3214 (Has_Prefix): Add
3215 pragma Inline. (Has_Suffix): Delete.
3216 (Is_Internal_File_Name):
3217 Test Is_Predefined_File_Name first.
3218 (Is_Predefined_File_Name):
3219 Use direct slice comparisons as much as possible and limit all
3220 comparisons to at most 8 characters.
3221
3222 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3223
3224 * checks.adb (Insert_Valid_Check): Code cleanup.
3225 * exp_ch6.adb (Add_Validation_Call_By_Copy_Code): New routine.
3226 (Expand_Actuals): Generate proper copy-back for a validation
3227 variable when it acts as the argument of a type conversion.
3228 * sem_util.adb (Is_Validation_Variable_Reference): Augment the
3229 predicate to operate on type qualifications.
3230
3231 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3232
3233 * sem_prag.adb, exp_ch6.adb, binde.adb, sem_disp.adb, s-fileio.adb:
3234 Minor reformatting.
3235
3236 2017-04-25 Bob Duff <duff@adacore.com>
3237
3238 * sem_prag.adb (No_Return): Give an error if the pragma applies
3239 to a body. Specialize the error for the specless body case,
3240 as is done for (e.g.) pragma Convention.
3241 * debug.adb: Add switch -gnatd.J to disable the above legality
3242 checks. This is mainly for use in our test suite, to avoid
3243 rewriting a lot of illegal (but working) code. It might also
3244 be useful to customers. Under this switch, if a pragma No_Return
3245 applies to a body, and the procedure raises an exception (as it
3246 should), the pragma has no effect. If the procedure does return,
3247 execution is erroneous.
3248
3249 2017-04-25 Bob Duff <duff@adacore.com>
3250
3251 * exp_ch6.adb (Expand_Actuals): This is the
3252 root of the problem. It took N as an 'in out' parameter, and in
3253 some cases, rewrote N, but then set N to Original_Node(N). So
3254 the node returned in N had no Parent. The caller continued
3255 processing of this orphaned node. In some cases that caused a
3256 crash (e.g. Remove_Side_Effects climbs up Parents in a loop,
3257 and trips over the Empty Parent). The solution is to make N an
3258 'in' parameter. Instead of rewriting it, return the list of
3259 post-call actions, so the caller can do the rewriting later,
3260 after N has been fully processed.
3261 (Expand_Call_Helper): Move most of Expand_Call here. It has
3262 too many premature 'return' statements, and we want to do the
3263 rewriting on return.
3264 (Insert_Post_Call_Actions): New procedure to insert the post-call
3265 actions in the appropriate place. In the problematic case,
3266 that involves rewriting N as an Expression_With_Actions.
3267 (Expand_Call): Call the new procedures Expand_Call_Helper and
3268 Insert_Post_Call_Actions.
3269
3270 2017-04-25 Ed Schonberg <schonberg@adacore.com>
3271
3272 * sem_prag.adb (Inherits_Class_Wide_Pre): Cleanup code, handle
3273 properly type derived from generic formal types, to handle
3274 properly modified version of ACATS 4.1B B611017.
3275
3276 2017-04-25 Javier Miranda <miranda@adacore.com>
3277
3278 * exp_unst.adb (Subp_Index): Adding missing
3279 support for renamings and functions that return a constrained
3280 array type (i.e. functions for which the frontend built a
3281 procedure with an extra out parameter).
3282
3283 2017-04-25 Pascal Obry <obry@adacore.com>
3284
3285 * s-string.adb: Minor code clean-up.
3286
3287 2017-04-25 Bob Duff <duff@adacore.com>
3288
3289 * s-os_lib.ads, s-os_lib.adb (Non_Blocking_Wait_Process): New
3290 procedure.
3291 * adaint.h, adaint.c (__gnat_portable_no_block_wait): C support
3292 function for Non_Blocking_Wait_Process.
3293
3294 2017-04-25 Bob Duff <duff@adacore.com>
3295
3296 * prep.adb (Preprocess): Remove incorrect
3297 Assert. Current character can be ASCII.CR.
3298
3299 2017-04-25 Ed Schonberg <schonberg@adacore.com>
3300
3301 * sem_prag.adb (Set_Convention_From_Pragma): Cleanup code for
3302 convention Stdcall, which has a number of exceptions. Convention
3303 is legal on a component declaration whose type is an anonymous
3304 access to subprogram.
3305
3306 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3307
3308 * sem_ch4.adb: sem_ch4.adb Various reformattings.
3309 (Try_One_Prefix_Interpretation): Use the base type when dealing
3310 with a subtype created for purposes of constraining a private
3311 type with discriminants.
3312
3313 2017-04-25 Javier Miranda <miranda@adacore.com>
3314
3315 * einfo.ads, einfo.adb (Has_Private_Extension): new attribute.
3316 * warnsw.ads, warnsw.adb (All_Warnings): Set warning on late
3317 dispatching primitives (Restore_Warnings): Restore warning on
3318 late dispatching primitives (Save_Warnings): Save warning on late
3319 dispatching primitives (Do_Warning_Switch): Use -gnatw.j/-gnatw.J
3320 to enable/disable this warning.
3321 (WA_Warnings): Set warning on late dispatching primitives.
3322 * sem_ch3.adb (Analyze_Private_Extension_Declaration): Remember
3323 that its parent type has a private extension.
3324 * sem_disp.adb (Warn_On_Late_Primitive_After_Private_Extension):
3325 New subprogram.
3326 * usage.adb: Document -gnatw.j and -gnatw.J.
3327
3328 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3329
3330 * exp_ch7.adb, checks.adb, sem_prag.adb, eval_fat.adb: Minor
3331 reformatting.
3332
3333 2017-04-25 Bob Duff <duff@adacore.com>
3334
3335 * binde.adb (Validate): Do not pass dynamic strings
3336 to pragma Assert, because older compilers do not support that.
3337
3338 2017-04-25 Bob Duff <duff@adacore.com>
3339
3340 * s-fileio.adb (Close): When a temp file is
3341 closed, delete it and clean up its Temp_File_Record immediately,
3342 rather than waiting until later.
3343 (Temp_File_Record): Add File
3344 component, so Close can know which Temp_File_Record corresponds
3345 to the file being closed.
3346 (Delete): Don't delete temp files,
3347 because they are deleted by Close.
3348 (Open): Set the File component
3349 of Temp_File_Record. This requires moving the creation of the
3350 Temp_File_Record to the end, after the AFCB has been created.
3351
3352 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3353
3354 * checks.adb (Insert_Valid_Check): Do not generate
3355 a validity check when inside a generic.
3356
3357 2017-04-25 Yannick Moy <moy@adacore.com>
3358
3359 * sem_res.adb (Resolve_Type_Conversion): Fix bad logic.
3360
3361 2017-04-25 Arnaud Charlet <charlet@adacore.com>
3362
3363 * snames.ads-tmpl (Snames): More names for detecting predefined
3364 potentially blocking subprograms.
3365
3366 2017-04-25 Ed Schonberg <schonberg@adacore.com>
3367
3368 * sem_prag.adb (Analyze_Pre_Post_Condition): The rules
3369 concerning inheritance of class-wide preconditions do not apply
3370 to postconditions.
3371
3372 2017-04-25 Bob Duff <duff@adacore.com>
3373
3374 * s-ficobl.ads: Minor comment fix.
3375
3376 2017-04-25 Yannick Moy <moy@adacore.com>
3377
3378 * checks.adb (Apply_Scalar_Range_Check): Analyze precisely
3379 conversions from float to integer in GNATprove mode.
3380 (Apply_Type_Conversion_Checks): Make sure in GNATprove mode
3381 to call Apply_Type_Conversion_Checks, so that range checks
3382 are properly positioned when needed on conversions, including
3383 when converting from float to integer. (Determine_Range): In
3384 GNATprove mode, take into account the possibility of conversion
3385 from float to integer.
3386 * sem_res.adb (Resolve_Type_Conversion): Only enforce range
3387 check on conversions from fixed-point to integer, not anymore
3388 on conversions from floating-point to integer, when in GNATprove
3389 mode.
3390
3391 2017-04-25 Yannick Moy <moy@adacore.com>
3392
3393 * checks.adb (Determine_Range_R): Special case type conversions
3394 from integer to float in order to get bounds in that case too.
3395 * eval_fat.adb (Machine): Avoid issuing warnings in GNATprove
3396 mode, for computations involved in interval checking.
3397
3398 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3399
3400 * checks.adb (Insert_Valid_Check): Partially reimplement validity
3401 checks.
3402 * einfo.adb Node36 is now used as Validated_Object.
3403 (Validated_Object): New routine.
3404 (Set_Validated_Object): New routine.
3405 (Write_Field36_Name): Add an entry for Validated_Object.
3406 * einfo.ads Add new attribute Validated_Object along with
3407 usage in entities.
3408 (Validated_Object): New routine along with pragma Inline.
3409 (Set_Validated_Object): New routine along with pragma Inline.
3410 * exp_attr.adb (Make_Range_Test): Add processing for validation
3411 variables to avoid extra reads and copies of the prefix.
3412 * exp_ch6.adb (Expand_Actuals): Add copy-back for validation
3413 variables in order to reflect any changes done in the variable
3414 back into the original object.
3415 * sem_util.adb (Is_Validation_Variable_Reference): New routine.
3416 * sem_util.ads (Is_Validation_Variable_Reference): New routine.
3417
3418 2017-04-25 Steve Baird <baird@adacore.com>
3419
3420 * exp_ch7.adb (Build_Array_Deep_Procs,
3421 Build_Record_Deep_Procs, Make_Finalize_Address_Body): Don't
3422 generate Finalize_Address routines for CodePeer.
3423
3424 2017-04-25 Ed Schonberg <schonberg@adacore.com>
3425
3426 * sem_prag.adb (Inherits_Class_Wide_Pre): subsidiary of
3427 Analyze_Pre_Post_Condition, to implement the legality checks
3428 mandated by AI12-0131: Pre'Class shall not be specified for an
3429 overriding primitive subprogram of a tagged type T unless the
3430 Pre'Class aspect is specified for the corresponding primitive
3431 subprogram of some ancestor of T.
3432
3433 2017-04-25 Bob Duff <duff@adacore.com>
3434
3435 * sem_ch8.adb (Use_One_Type): If a use_type_clause
3436 is redundant, set its Used_Operations to empty. This is only
3437 necessary for use clauses that appear in the parent of a generic
3438 child unit, because those use clauses get reanalyzed when we
3439 instantiate the generic, and we don't want the Used_Operations
3440 carried over from the original context (where it was probably
3441 not redundant).
3442
3443 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3444
3445 * exp_ch6.adb: Minor reformatting.
3446
3447 2017-04-25 Bob Duff <duff@adacore.com>
3448
3449 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
3450 Use Source_Index (Current_Sem_Unit) to find the correct casing.
3451 * exp_prag.adb (Expand_Pragma_Check): Use Source_Index
3452 (Current_Sem_Unit) to find the correct casing.
3453 * par.adb (Par): Null out Current_Source_File, to ensure that
3454 the above bugs won't rear their ugly heads again.
3455
3456 2017-04-25 Ed Schonberg <schonberg@adacore.com>
3457
3458 * sem_ch8.adb (Find_Type): For an attribute reference
3459 'Class, if prefix type is synchronized and previous errors
3460 have suppressed the creation of the corresponding record type,
3461 create a spurious class-wide for the synchonized type itself,
3462 to catch other misuses of the attribute
3463
3464 2017-04-25 Steve Baird <baird@adacore.com>
3465
3466 * exp_ch6.adb (Expand_Simple_Function_Return): if CodePeer_Mode
3467 is True, then don't generate the accessibility check for the
3468 tag of a tagged result.
3469 * exp_intr.adb (Expand_Dispatching_Constructor_Call):
3470 if CodePeer_Mode is True, then don't generate the
3471 tag checks for the result of call to an instance of
3472 Ada.Tags.Generic_Dispatching_Constructor (i.e., both the "is a
3473 descendant of" check and the accessibility check).
3474
3475 2017-04-25 Ed Schonberg <schonberg@adacore.com>
3476
3477 * sem_ch13.adb: Code cleanups.
3478 * a-strbou.ads: minor whitespace fix in Trim for bounded strings.
3479 * sem_ch8.ads: Minor comment fix.
3480
3481 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
3482
3483 * exp_ch4.adb (Library_Level_Target): New function.
3484 (Expand_Concatenate): When optimization is enabled, also expand
3485 the operation out-of-line if the concatenation is present within
3486 the expression of the declaration of a library-level object and
3487 not only if it is the expression of the declaration.
3488
3489 2017-04-25 Bob Duff <duff@adacore.com>
3490
3491 * freeze.adb (Freeze_Object_Declaration): Do
3492 not Remove_Side_Effects if there is a pragma Linker_Section,
3493 because in that case we want static initialization in the
3494 appropriate section.
3495
3496 2017-04-25 Gary Dismukes <dismukes@adacore.com>
3497
3498 * exp_dbug.adb: Minor rewording and reformatting.
3499
3500 2017-04-25 Ed Schonberg <schonberg@adacore.com>
3501
3502 * sem_attr.adb (Statically_Denotes_Object): New predicate, to
3503 handle the proposed changes to rules concerning potentially
3504 unevaluated expressions, to include selected components that
3505 do not depend on discriminants, and indexed components with
3506 static indices.
3507 * sem_util.adb (Is_Potentially_Unevaluated): Add check for
3508 predicate in quantified expression, and fix bugs in the handling
3509 of case expressions and membership test.
3510 (Analyze_Attribute_Old_Result): use new predicate.
3511 (Analyze_Attribute, case Loop_Entry): ditto.
3512
3513 2017-04-25 Bob Duff <duff@adacore.com>
3514
3515 * s-secsta.adb (SS_Info): Add a comment
3516 explaining why we don't need to walk all the chunks in order to
3517 compute the total size.
3518
3519 2017-04-25 Bob Duff <duff@adacore.com>
3520
3521 * namet.ads, namet.adb (Global_Name_Buffer): Increase the length
3522 of the global name buffer to 4*Max_Line_Length.
3523
3524 2017-04-25 Javier Miranda <miranda@adacore.com>
3525
3526 * exp_ch8.adb (Expand_N_Object_Renaming_Declaration): When creating a
3527 renaming entity for debug information, mark the entity as needing debug
3528 info if it comes from sources.
3529
3530 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3531
3532 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Remove the
3533 restriction converning the use of 'Address where the prefix is
3534 of a controlled type.
3535
3536 2017-04-25 Pierre-Marie de Rodat <derodat@adacore.com>
3537
3538 * exp_dbug.adb: In Debug_Renaming_Declaration,
3539 skip slices that are made redundant by an indexed component
3540 access.
3541 * atree.h: New definition for Original_Node.
3542
3543 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3544
3545 * sem_prag.adb, sem_prag.ads: Minor reformatting.
3546
3547 2017-04-25 Ed Schonberg <schonberg@adacore.com>
3548
3549 * sem_ch3.adb (Check_Entry_Contract): Call
3550 Preanalyze_Spec_Expression so that resolution takes place as well.
3551 * sem_util.adb (Check_Internal_Protected_Use): Reject properly
3552 internal calls that appear in preconditions of protected
3553 operations, in default values for same, and in contract guards
3554 for contract cases in SPARK.
3555
3556 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
3557
3558 * a-numaux.ads: Fix description of a-numaux-darwin
3559 and a-numaux-x86.
3560 (Double): Define to Long_Float.
3561 * a-numaux-vxworks.ads (Double): Likewise.
3562 * a-numaux-darwin.ads
3563 (Double): Likewise.
3564 * a-numaux-libc-x86.ads (Double): Define to Long_Long_Float.
3565 * a-numaux-x86.ads: Fix package description.
3566 * a-numaux-x86.adb (Is_Nan): Minor tweak.
3567 (Reduce): Adjust and complete description. Call Is_Nan instead of
3568 testing manually. Use an integer temporary to hold rounded value.
3569 * a-numaux-darwin.adb (Reduce): Likewise.
3570 (Is_Nan): New function.
3571
3572 2017-04-25 Ed Schonberg <schonberg@adacore.com>
3573
3574 * sem_ch4.adb (Analyze_Selected_Component): Additional refinement
3575 on analysis of prefix whose type is a current instance of a
3576 synchronized type, but where the prefix itself is an entity that
3577 is an object.
3578
3579 2017-04-25 Ed Schonberg <schonberg@adacore.com>
3580
3581 * exp_ch5.adb (Replace_Target): When rewriting the RHS, preserve
3582 the identity of callable entities therein, because they have been
3583 properly resolved, and prefixed calls may have been rewritten
3584 as normal calls.
3585
3586 2017-04-25 Patrick Bernardi <bernardi@adacore.com>
3587
3588 * exp_ch3.adb (Build_Init_Statements): Convert
3589 the expression of the pragma/aspect Secondary_Stack_Size to
3590 internal type System.Parameters.Size_Type before assigning
3591 it to the Secondary_Stack_Size component of the task type's
3592 corresponding record.
3593
3594 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
3595
3596 * sem_eval.adb (Compile_Time_Compare): Reinstate the expr+literal
3597 (etc) optimizations when the type is modular and the offsets
3598 are equal.
3599
3600 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
3601
3602 * s-osinte-freebsd.ads: Minor comment tweaks
3603
3604 2017-04-25 Javier Miranda <miranda@adacore.com>
3605
3606 * urealp.adb (UR_Write): Reverse previous patch
3607 adding documentation on why we generate multiplications instead
3608 of divisions (needed to avoid expressions whose computation with
3609 large numbers may cause division by 0).
3610
3611 2017-04-25 Bob Duff <duff@adacore.com>
3612
3613 * erroutc.adb (Set_Specific_Warning_Off,
3614 Set_Warnings_Mode_Off): Use the correct source file for
3615 Stop. Was using Current_Source_File, which is only valid during
3616 parsing. Current_Source_File will have a leftover value from
3617 whatever file happened to be parsed last, because of a with_clause
3618 or something.
3619
3620 2017-04-25 Bob Duff <duff@adacore.com>
3621
3622 * lib.ads, lib.adb (In_Internal_Unit): New functions similar
3623 to In_Predefined_Unit, but including GNAT units.
3624 * sem_util.ads, sem_util.adb (Should_Ignore_Pragma): Replace
3625 with Should_Ignore_Pragma_Par and Should_Ignore_Pragma_Sem,
3626 because Should_Ignore_Pragma was not working reliably outside
3627 the parser, because Current_Source_File is not valid.
3628 * sem_prag.adb, exp_prag.adb: Call Should_Ignore_Pragma_Sem.
3629 * par-prag.adb: Call Should_Ignore_Pragma_Par.
3630
3631 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
3632
3633 * gnat1drv.adb (Gnat1Drv): Disable Generate_Processed_File in
3634 codepeer mode.
3635
3636 2017-04-25 Javier Miranda <miranda@adacore.com>
3637
3638 * urealp.adb (UR_Write): Fix output of constants with a base other
3639 that 10.
3640
3641 2017-04-25 Justin Squirek <squirek@adacore.com>
3642
3643 * sem_ch13.adb (Get_Interfacing_Aspects): Moved to sem_util.adb.
3644 * sem_prag.adb (Analyze_Pragma, Process_Import_Or_Interface):
3645 Add extra parameter for Process_Interface_Name.
3646 (Process_Interface_Name): Add parameter for pragma to analyze
3647 corresponding aspect.
3648 * sem_util.ads, sem_util.adb (Get_Interfacing_Aspects): Added
3649 from sem_ch13.adb
3650
3651 2017-04-25 Gary Dismukes <dismukes@adacore.com>
3652
3653 * exp_ch7.adb, einfo.ads, sem_prag.adb: Minor reformatting and typo
3654 correction.
3655
3656 2017-04-25 Yannick Moy <moy@adacore.com>
3657
3658 * sem_res.adb (Resolve_Comparison_Op): Do not
3659 attempt evaluation of relational operations inside assertions.
3660
3661 2017-04-25 Justin Squirek <squirek@adacore.com>
3662
3663 * exp_util.adb (Add_Interface_Invariants):
3664 Restored, code moved back from Build_Invariant_Procedure_Body.
3665 (Add_Parent_Invariants): Restored, code moved back from
3666 Build_Invariant_Procedure_Body.
3667 (Build_Invariant_Procedure_Body):
3668 Remove refactored calls and integrated code from
3669 Add_Parent_Invariants and Add_Interface_Invariants.
3670
3671 2017-04-25 Johannes Kanig <kanig@adacore.com>
3672
3673 * errout.adb (Output_Messages): Adjust computation of total
3674 errors
3675 * erroutc.adb (Error_Msg): In statistics counts, deal
3676 correctly with informational messages that are not warnings.
3677 * errutil.adb (Finalize): adjust computation of total errors.
3678
3679 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
3680
3681 * terminals.c (__gnat_terminate_pid): New.
3682 * g-exptty.ads (Terminate_Process): New. Update comments.
3683
3684 2017-04-25 Arnaud Charlet <charlet@adacore.com>
3685
3686 * a-cfinve.ads, a-cofove.ads (Empty_Vector): add Global contract.
3687
3688 2017-04-25 Justin Squirek <squirek@adacore.com>
3689
3690 * sem_ch3.adb (Analyze_Declarations): Minor
3691 correction to comments, move out large conditional and scope
3692 traversal into a predicate.
3693 (Uses_Unseen_Lib_Unit_Priv): Predicate function made from extracted
3694 logic.
3695
3696 2017-04-25 Ed Schonberg <schonberg@adacore.com>
3697
3698 * sem_ch4.adb (Analyze_Selected_Component): Refine analysis
3699 of prefix whose type is a current instance of a synchronized
3700 type. If the prefix is an object this is an external call (or
3701 requeue) that can only access public operations of the object. The
3702 previous predicate was too restrictive, and did not allow public
3703 protected operations, only task entries.
3704
3705 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3706
3707 * sem_ch5.adb, fname.adb: Minor reformatting.
3708
3709 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3710
3711 * einfo.adb (Is_Anonymous_Access_Type): New routine.
3712 * einfo.ads Update the placement of
3713 E_Anonymous_Access_Subprogram_Type along with all subtypes that
3714 mention the ekind.
3715 (Is_Anonymous_Access_Type): New routine.
3716 * exp_ch7.adb (Allows_Finalization_Master): Do not generate a
3717 master for an access type subject to pragma No_Heap_Finalization.
3718 * exp_util.adb (Build_Allocate_Deallocate_Proc): An object being
3719 allocated or deallocated does not finalization actions if the
3720 associated access type is subject to pragma No_Heap_Finalization.
3721 * opt.ads Add new global variable No_Heap_Finalization_Pragma.
3722 * par-prag.adb Pragma No_Heap_Finalization does not need special
3723 processing from the parser.
3724 * sem_ch6.adb (Check_Return_Subtype_Indication): Remove ancient
3725 ??? comments. Use the new predicate Is_Anonymous_Access_Type.
3726 * sem_prag.adb Add an entry in table Sig_Flags for pragma
3727 No_Heap_Finalization.
3728 (Analyze_Pragma): Add processing for
3729 pragma No_Heap_Finalization. Update various error messages to
3730 use Duplication_Error.
3731 * sem_util.ads, sem_util.adb (No_Heap_Finalization): New routine.
3732 * snames.ads-tmpl: Add new predefined name No_Heap_Finalization
3733 and corresponding pragma id.
3734
3735 2017-04-25 Bob Duff <duff@adacore.com>
3736
3737 * freeze.adb (Freeze_Record_Type): Use the
3738 underlying type of the component type to determine whether it's
3739 elementary. For representation clause purposes, a private type
3740 should behave the same as its full type.
3741 * fname.ads, fname.adb (Is_Predefined_File_Name):
3742 Make sure things like "system.ali" are recognized as predefined.
3743
3744 2017-04-25 Javier Miranda <miranda@adacore.com>
3745
3746 * debug.adb: Update documentation of -gnatd.6.
3747
3748 2017-04-25 Ed Schonberg <schonberg@adacore.com>
3749
3750 * sem_ch5.adb (Preanalyze_Range): Handle properly an Ada2012
3751 element iterator when the name is an overloaded function call,
3752 one of whose interpretations yields an array.
3753
3754 2017-04-25 Bob Duff <duff@adacore.com>
3755
3756 * uname.ads, uname.adb (Is_Predefined_Unit_Name,
3757 Is_Internal_Unit_Name): New functions for operating on unit
3758 names, as opposed to file names. There's some duplicated code
3759 with fname.adb, which is unfortunate, but it seems like we don't
3760 want to add dependencies here.
3761 * fname-uf.adb (Get_File_Name): Change Is_Predefined_File_Name
3762 to Is_Predefined_Unit_Name; the former was wrong, because Uname
3763 is not a file name at all.
3764 * fname.ads, fname.adb: Document the fact that
3765 Is_Predefined_File_Name and Is_Internal_File_Name can be called
3766 for ALI files, and fix the code so it works properly for ALI
3767 files. E.g. these should return True for "system.ali".
3768
3769 2017-04-25 Justin Squirek <squirek@adacore.com>
3770
3771 * exp_util.adb (Add_Invariant): Removed,
3772 code moved to Add_Invariant_Check, Add_Inherited_Invariant,
3773 and Add_Own_Invariant. (Add_Invariant_Check): Used
3774 for adding runtime checks from any kind of invariant.
3775 (Add_Inherited_Invariant): Generates invariant checks for
3776 class-wide invariants (Add_Interface_Invariants): Removed, code
3777 moved to Build_Invariant_Procedure_Body (Add_Own_Invariant):
3778 Create a types own invariant procedure (Add_Parent_Invariants):
3779 Removed, code moved to Build_Invariant_Procedure_Body
3780 (Build_Invariant_Procedure_Body): Add refactored calls
3781 and integrated code from Add_Parent_Invariants and
3782 Add_Interface_Invariants.
3783 (Process_Type): Removed, the
3784 relavant code was inlined into both Add_Own_Invariant and
3785 Add_Inherited_Invariant.
3786
3787 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3788
3789 * make.adb, par-ch2.adb, sem_util.adb, scans.ads, sem_ch8.adb,
3790 scn.adb, osint.adb, fname.adb: Minor reformatting.
3791
3792 2017-04-25 Pascal Obry <obry@adacore.com>
3793
3794 * s-taprop-mingw.adb: Do not check for CloseHandle in
3795 Finalize_TCB.
3796
3797 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3798
3799 * sem_util.adb (Check_Part_Of_Reference):
3800 Continue to examine the context if the reference appears within
3801 an expression function.
3802
3803 2017-04-25 Justin Squirek <squirek@adacore.com>
3804
3805 * exp_ch7.adb, exp_ch7.ads Remove Build_Invariant_Procedure_Body
3806 and Build_Invariant_Procedure_Declaration.
3807 * exp_util.ads, exp_util.adb Add Build_Invariant_Procedure_Body
3808 and Build_Invariant_Procedure_Declaration from exp_ch7
3809 and break-out Is_Untagged_Private_Derivation from
3810 Build_Invariant_Procedure_Body.
3811 (Replace_Type_References):
3812 Append an extra parameter to allow for dispatching replacements
3813 and add the corrasponding logic.
3814 (Type_Invariant): Remove
3815 Replace_Typ_Refs and replace its references with calls to
3816 Replace_Type_References.
3817 * sem_ch3.adb, sem_prag.adb: Remove with and use of exp_ch7.
3818
3819 2017-04-25 Bob Duff <duff@adacore.com>
3820
3821 * sem_util.ads, sem_util.adb (Should_Ignore_Pragma): New function
3822 that returns True when appropriate.
3823 * par-prag.adb, exp_prag.adb, sem_prag.adb: Do not ignore pragmas
3824 when compiling predefined files.
3825 * fname.ads, fname.adb (Is_Predefined_File_Name): Fix bug:
3826 "gnat.adc" should not be considered a predefined file name.
3827 That required (or at least encouraged) a lot of cleanup of global
3828 variable usage. We shouldn't be communicating information via
3829 the global name buffer.
3830 * bindgen.adb, errout.adb, fname-uf.adb, lib-load.adb, make.adb,
3831 * restrict.adb, sem_ch10.adb, sem_ch6.adb, sem_ch8.adb: Changes
3832 required by the above-mentioned cleanup.
3833
3834 2017-04-25 Ed Schonberg <schonberg@adacore.com>
3835
3836 * osint.adb (Find_File): Handle properly a request for a
3837 configuration file whose name is a directory.
3838
3839 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3840
3841 * sem_attr.adb, sem_ch5.adb: Minor reformatting.
3842
3843 2017-04-25 Bob Duff <duff@adacore.com>
3844
3845 * types.ads: Minor: Fix '???' comment.
3846 * sem_ch8.adb: Minor comment fix.
3847
3848 2017-04-25 Bob Duff <duff@adacore.com>
3849
3850 * sem_prag.adb: Remove suspicious uses of Name_Buf.
3851 * stringt.ads, stringt.adb, exp_dbug.adb, sem_dim.adb: Remove
3852 Add_String_To_Name_Buffer, to avoid using the global Name_Buf.
3853 Add String_To_Name with no side effects.
3854
3855 2017-04-25 Justin Squirek <squirek@adacore.com>
3856
3857 * sem_ch3.adb (Analyze_Declarations): Add
3858 additional condition for edge case.
3859
3860 2017-04-25 Bob Duff <duff@adacore.com>
3861
3862 * par-ch2.adb, scans.ads, scn.adb: Do not give an error for
3863 reserved words inside pragmas. This is necessary to allow the
3864 pragma name Interface to be used in pragma Ignore_Pragma.
3865 * par.adb: Minor comment fix.
3866
3867 2017-04-25 Javier Miranda <miranda@adacore.com>
3868
3869 * a-tags.ads, a-tags.adb (Type_Is_Abstract): Renamed as Is_Abstract.
3870 * rtsfind.ads (RE_Type_Is_Abstract): Renamed as Is_Abstract.
3871 * exp_disp.adb (Make_DT): Update occurrences of RE_Type_Is_Abstract.
3872 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Update
3873 occurrences of RE_Type_Is_Abstract
3874
3875 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3876
3877 * exp_util.adb (Build_Chain): Account for ancestor
3878 subtypes while traversing the derivation chain.
3879
3880 2017-04-25 Ed Schonberg <schonberg@adacore.com>
3881
3882 * sem_attr.adb: minor reformatting.
3883
3884 2017-04-25 Doug Rupp <rupp@adacore.com>
3885
3886 * sigtramp-vxworks-target.inc [PPC64]: Add a .localentry pseudo-op.
3887
3888 2017-04-25 Ed Schonberg <schonberg@adacore.com>
3889
3890 * sem_ch5.adb (Analyze_Assignment): Reset Full_Analysis flag on
3891 the first pass over an assignment statement with target names,
3892 to prevent the generation of subtypes (such as discriminated
3893 record components)that may carry the target name outside of the
3894 tree for the assignment. The subtypes will be generated when
3895 the assignment is reanalyzed in full.
3896 (Analyze_Target_Name): Handle properly class-wide types.
3897
3898 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3899
3900 * elists.ads, elists.adb (Prepend_Unique_Elmt): New routine.
3901 * exp_ch3.adb (Freeze_Type): Signal the DIC body is created for
3902 the purposes of freezing.
3903 * exp_util.adb Update the documentation and structure of the
3904 type map used in class-wide semantics of assertion expressions.
3905 (Add_Inherited_Tagged_DIC): There is really no need to preanalyze
3906 and resolve the triaged expression because all substitutions
3907 refer to the proper entities. Update the replacement of
3908 references.
3909 (Build_DIC_Procedure_Body): Add formal parameter
3910 For_Freeze. Add local variable Build_Body. Inherited DIC pragmas
3911 are now only processed when freezing occurs. Build a body only
3912 when one is needed.
3913 (Entity_Hash): Removed.
3914 (Map_Types): New routine.
3915 (Replace_Object_And_Primitive_References): Removed.
3916 (Replace_References): New routine.
3917 (Replace_Type_References): Moved to the library level of Exp_Util.
3918 (Type_Map_Hash): New routine.
3919 (Update_Primitives_Mapping): Update the mapping call.
3920 (Update_Primitives_Mapping_Of_Types): Removed.
3921 * exp_util.ads (Build_DIC_Procedure_Body): Add formal
3922 parameter For_Freeze and update the comment on usage.
3923 (Map_Types): New routine.
3924 (Replace_References): New routine.
3925 (Replace_Type_References): Moved to the library level of Exp_Util.
3926 (Update_Primitives_Mapping_Of_Types): Removed.
3927 * sem_ch7.adb (Preserve_Full_Attributes): Propagate the DIC
3928 properties of the private type to the full view in case the full
3929 view derives from a parent type and inherits a DIC pragma.
3930 * sem_prag.adb (Analyze_Pragma): Guard against a case where a
3931 DIC pragma is placed at the top of a declarative region.
3932
3933 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
3934
3935 * a-tasatt.adb: Complete previous change and use an unsigned
3936 int to avoid overflow checks.
3937
3938 2017-04-25 Ed Schonberg <schonberg@adacore.com>
3939
3940 * sem_attr.adb (Analyze_Attribute, case 'Access): Specialize
3941 the error message when the attribute reference is an actual in
3942 a call to a subprogram inherited from a generic formal type with
3943 unknown discriminants, which makes the subprogram and its formal
3944 parameters intrinsic (see RM 6.3.1 (8) and (13)).
3945
3946 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3947
3948 * sem_aggr.adb, inline.adb, einfo.adb, einfo.ads, scng.adb,
3949 sem_prag.adb: Minor reformatting.
3950
3951 2017-04-25 Bob Duff <duff@adacore.com>
3952
3953 * sem_attr.adb (Type_Key): Add code in the
3954 recursive Compute_Type_Key to protect against fetching the source
3955 code for Standard, in case a component of the type is declared
3956 in Standard. There was already code to do this for the original
3957 type, but not for its components.
3958
3959 2017-04-25 Javier Miranda <miranda@adacore.com>
3960
3961 * exp_ch3.adb (Build_Initialization_Call): Handle
3962 subtypes of private types when searching for the underlying full
3963 view of a private type.
3964
3965 2017-04-25 Javier Miranda <miranda@adacore.com>
3966
3967 * sem_res.adb (Set_Mixed_Mode_Operand): A universal
3968 real conditional expression can appear in a fixed-type context
3969 and must be resolved with that context to facilitate the code
3970 generation to the backend.
3971
3972 2017-04-25 Ed Schonberg <schonberg@adacore.com>
3973
3974 * einfo.adb, einfo.ads (Body_Needed_For_Inlining): New flag,
3975 to indicate whether during inline processing, when some unit U1
3976 appears in the context of a unit U2 compiled for instantiation
3977 or inlining purposes, the body of U1 needs to be compiled as well.
3978 * sem_prag.adb (Process_Inline): Set Body_Needed_For_Inlining if
3979 context is a package declaration.
3980 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration,
3981 Analyze_Generic_Package_Declaration): ditto.
3982 * inline.adb (Analyze_Inlined_Bodies): Check
3983 Body_Needed_For_Inlining.
3984
3985 2017-04-25 Ed Schonberg <schonberg@adacore.com>
3986
3987 * par.adb (Current_Assign_Node): Global variable use to record
3988 the presence of a target_name in the right hand side of the
3989 assignment being parsed.
3990 * par-ch4.adb (P_Name): If the name is a target_name, mark the
3991 enclosing assignment node accordingly.
3992 * par-ch5.adb (P_Assignment_Statement): Set Current_Assign_Node
3993 appropriately.
3994 * sem_ch5.adb (Analyze_Assignment): Disable expansion before
3995 analyzing RHS if the statement has target_names.
3996 * sem_aggr.adb (Resolve_Iterated_Component_Association): Handle
3997 properly choices that are subtype marks.
3998 * exp_ch5.adb: Code cleanup.
3999
4000 2017-04-25 Bob Duff <duff@adacore.com>
4001
4002 * s-memory.adb: Add a comment regarding efficiency.
4003 * atree.adb: Fix the assertion, and combine 2 assertions into one,
4004 "the source has an extension if and only if the destination does."
4005 * sem_ch3.adb, sem_ch13.adb: Address ??? comments.
4006
4007 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
4008
4009 * a-tasatt.adb (Set_Value): Fix handling of 32bits -> 64bits
4010 conversion.
4011
4012 2017-04-25 Doug Rupp <rupp@adacore.com>
4013
4014 * init.c (__gnat_error_handler) [vxworks]: Turn on sigtramp
4015 handling for ppc64-vx7.
4016 * sigtramp-vxworks-target.inc
4017 [SIGTRAMP_BODY]: Add section for ppc64-vx7.
4018
4019 2017-04-25 Arnaud Charlet <charlet@adacore.com>
4020
4021 * ada_get_targ.adb: New file.
4022
4023 2017-04-25 Bob Duff <duff@adacore.com>
4024
4025 * uintp.adb (Most_Sig_2_Digits): In case Direct (Right), fetch
4026 Direct_Val (Right), instead of the incorrect Direct_Val (Left).
4027 (UI_GCD): Remove ??? comment involving possible efficiency
4028 improvements. This just isn't important after all these years.
4029 Also minor cleanup.
4030 * uintp.ads: Minor cleanup.
4031
4032 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4033
4034 * exp_util.adb, exp_util.ads, sem_ch7.adb, sem_prag.adb, exp_ch3.adb:
4035 Revert previous changes.
4036 * scng.adb: Minor reformatting.
4037 * s-stratt.ads: Fix unbalanced parens in comment.
4038
4039 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4040
4041 * sem_ch3.adb, exp_util.adb, sem_prag.adb, freeze.adb, sem_util.adb:
4042 Minor reformatting.
4043
4044 2017-04-25 Ed Schonberg <schonberg@adacore.com>
4045
4046 * scng.adb (Scan): Handle '@' appropriately.
4047 * sem_ch5.adb: Code cleanup.
4048
4049 2017-04-25 Ed Schonberg <schonberg@adacore.com>
4050
4051 * freeze.adb (Check_Expression_Function): Do not check for the
4052 use of deferred constants if the freezing of the expression
4053 function is triggered by its generated body, rather than a
4054 premature use.
4055
4056 2017-04-25 Javier Miranda <miranda@adacore.com>
4057
4058 * exp_attr.adb (Rewrite_Stream_Proc_Call): Handle
4059 subtypes of private types when performing the view conversion.
4060
4061 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4062
4063 * exp_ch3.adb (Freeze_Type): Signal the DIC body is created for
4064 the purposes of freezing.
4065 * exp_util.adb Update the documentation and structure of the
4066 type map used in class-wide semantics of assertion expressions.
4067 (Add_Inherited_Tagged_DIC): There is really no need to preanalyze
4068 and resolve the triaged expression because all substitutions
4069 refer to the proper entities. Update the replacement of
4070 references.
4071 (Build_DIC_Procedure_Body): Add formal parameter
4072 For_Freeze. Add local variable Build_Body. Inherited DIC pragmas
4073 are now only processed when freezing occurs. Build a body only
4074 when one is needed.
4075 (Entity_Hash): Removed.
4076 (Map_Types): New routine.
4077 (Replace_Object_And_Primitive_References): Removed.
4078 (Replace_References): New routine.
4079 (Replace_Type_References): Moved to the library level of Exp_Util.
4080 (Type_Map_Hash): New routine.
4081 (Update_Primitives_Mapping): Update the mapping call.
4082 (Update_Primitives_Mapping_Of_Types): Removed.
4083 * exp_util.ads (Build_DIC_Procedure_Body): Add formal
4084 parameter For_Freeze and update the comment on usage.
4085 (Map_Types): New routine.
4086 (Replace_References): New routine.
4087 (Replace_Type_References): Moved to the library level of Exp_Util.
4088 (Update_Primitives_Mapping_Of_Types): Removed.
4089 * sem_ch7.adb (Preserve_Full_Attributes): Propagate the DIC
4090 properties of the private type to the full view in case the full
4091 view derives from a parent type and inherits a DIC pragma.
4092 * sem_prag.adb (Analyze_Pragma): Guard against a case where a
4093 DIC pragma is placed at the top of a declarative region.
4094
4095 2017-04-25 Tristan Gingold <gingold@adacore.com>
4096
4097 * s-mmap.ads (Data): Add pragma Inline.
4098
4099 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4100
4101 * checks.adb (Insert_Valid_Check): Do not use
4102 a renaming to alias a volatile name because this will lead to
4103 multiple evaluations of the volatile name. Use a constant to
4104 capture the value instead.
4105
4106 2017-04-25 Doug Rupp <rupp@adacore.com>
4107
4108 * init.c [VxWorks Section]: Disable sigtramp for ppc64-vx7.
4109
4110 2017-04-25 Ed Schonberg <schonberg@adacore.com>
4111
4112 * exp_util.adb, exp_util.ads (Build_Class_Wide_Expression):
4113 Add out parameter to indicate to caller that a wrapper must
4114 be constructed for an inherited primitive whose inherited
4115 pre/postcondition has called to overridden primitives.
4116 * freeze.adb (Check_Inherited_Conditions): Build wrapper body
4117 for inherited primitive that requires it.
4118 * sem_disp.adb (Check_Dispatching_Operation): Such wrappers are
4119 legal primitive operations and belong to the list of bodies
4120 generated after the freeze point of a type.
4121 * sem_prag.adb (Build_Pragma_Check_Equivalent): Use new signature
4122 of Build_Class_Wide_Expression.
4123 * sem_util.adb, sem_util.ads (Build_Overriding_Spec): New procedure
4124 to construct the specification of the wrapper subprogram created
4125 for an inherited operation.
4126
4127 2017-04-25 Bob Duff <duff@adacore.com>
4128
4129 * s-osinte-linux.ads (pthread_mutexattr_setprotocol,
4130 pthread_mutexattr_setprioceiling): Add new interfaces for these
4131 pthread operations.
4132 * s-taprop-linux.adb (Initialize_Lock, Initialize_TCB): Set
4133 protocols as appropriate for Locking_Policy 'C' and 'I'.
4134 * s-taprop-posix.adb: Minor reformatting to make it more similar
4135 to s-taprop-linux.adb.
4136
4137 2017-04-25 Ed Schonberg <schonberg@adacore.com>
4138
4139 * sem_ch3.adb (Get_Discriminant_Value, Search_Derivation_Levels):
4140 Handle properly a multi- level derivation involving both renamed
4141 and constrained parent discriminants, when the type to be
4142 constrained has fewer discriminants that the ultimate ancestor.
4143
4144 2017-04-25 Bob Duff <duff@adacore.com>
4145
4146 * sem_util.adb (Is_Object_Reference): In the
4147 case of N_Explicit_Dereference, return False if it came from a
4148 conditional expression.
4149
4150 2017-04-25 Bob Duff <duff@adacore.com>
4151
4152 * par-ch4.adb (P_Case_Expression): If a semicolon
4153 is followed by "when", assume that ";" was meant to be ",".
4154
4155 2017-04-25 Gary Dismukes <dismukes@adacore.com>
4156
4157 * sem_ch9.adb, sem_ch10.adb, sem_util.adb: Minor reformatting and typo
4158 fixes.
4159
4160 2017-04-25 Arnaud Charlet <charlet@adacore.com>
4161
4162 * rtsfind.ads (SPARK_Implicit_Load): New procedure for forced
4163 loading of an entity.
4164 * rtsfind.adb (SPARK_Implicit_Load): Body with a pattern
4165 previously repeated in the analysis.
4166 * sem_ch9.adb (Analyze_Protected_Type_Declaration): use new
4167 procedure SPARK_Implicit_Load. (Analyze_Task_Type_Declaration):
4168 use new procedure SPARK_Implicit_Load.
4169 * sem_ch10.adb (Analyze_Compilation_Unit): Use new procedure
4170 SPARK_Implicit_Load.
4171
4172 2017-04-25 Javier Miranda <miranda@adacore.com>
4173
4174 * sem_util.adb (New_Copy_Tree): By default
4175 copying of defining identifiers is prohibited because
4176 this would introduce an entirely new entity into the
4177 tree. This patch introduces an exception to this general
4178 rule: the declaration of constants and variables located in
4179 Expression_With_Action nodes.
4180 (Copy_Itype_With_Replacement): Renamed as Copy_Entity_With_Replacement.
4181 (In_Map): New subprogram.
4182 (Visit_Entity): New subprogram.
4183 (Visit_Node): Handle EWA_Level,
4184 EWA_Inner_Scope_Level, and take care of defining entities defined
4185 in Expression_With_Action nodes.
4186
4187 2017-04-25 Thomas Quinot <quinot@adacore.com>
4188
4189 * exp_ch6.adb: minor comment edit.
4190 * sinfo.ads, sinfo.adb: New Null_Statement attribute for null
4191 procedure specifications that come from source.
4192 * par-ch6.adb (P_Subprogram, case of a null procedure): Set new
4193 Null_Statement attribute.
4194 * par_sco.adb (Traverse_Declarations_Or_Statements): For a null
4195 procedure, generate statement SCO for the generated NULL statement.
4196 * sem_ch6.adb (Analyze_Null_Procedure): Use null statement from
4197 parser, if available.
4198
4199 2017-04-04 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
4200
4201 * system-linux-s390.ads: Use Long_Integer'Size to define
4202 Memory_Size.
4203
4204 2017-04-04 Eric Botcazou <ebotcazou@adacore.com>
4205
4206 * sem_ch3.adb (Build_Derived_Record_Type): Fix long line.
4207
4208 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
4209
4210 * doc/gnat_ugn/gnat_and_program_execution.rst: Fix typo.
4211 * g-socket.adb (To_Host_Entry): Fix typo in comment.
4212 * gnat_ugn.texi: Fix typo.
4213 * raise.c (_gnat_builtin_longjmp): Fix capitalization in comment.
4214 * s-stposu.adb (Allocate_Any_Controlled): Fix typo in comment.
4215 * sem_ch3.adb (Build_Derived_Record_Type): Likewise.
4216 * sem_util.adb (Mark_Coextensions): Likewise.
4217 * sem_util.ads (Available_Full_View_Of_Component): Likewise.
4218
4219 2017-03-28 Andreas Schwab <schwab@suse.de>
4220
4221 PR ada/80117
4222 * system-linux-aarch64-ilp32.ads: New file.
4223 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS_COMMON): Rename
4224 from LIBGNAT_TARGET_PAIRS.
4225 (LIBGNAT_TARGET_PAIRS_32, LIBGNAT_TARGET_PAIRS_64): Define.
4226 (LIBGNAT_TARGET_PAIRS): Use LIBGNAT_TARGET_PAIRS_COMMON, and
4227 LIBGNAT_TARGET_PAIRS_64 or LIBGNAT_TARGET_PAIRS_32 for -mabi=lp64
4228 or -mabi=ilp32, resp.
4229
4230 2017-03-14 James Cowgill <James.Cowgill@imgtec.com>
4231
4232 * s-osinte-linux.ads (struct_sigaction): Use correct type for sa_flags.
4233
4234 2017-03-08 Thanassis Tsiodras <ttsiodras@gmail.com>
4235
4236 PR ada/79903
4237 * socket.c (__gnat_gethostbyaddr): Add missing test for __rtems__.
4238
4239 2017-03-08 Eric Botcazou <ebotcazou@adacore.com>
4240
4241 PR ada/79945
4242 * system-linux-ppc.ads (Default_Bit_Order): Use Standard's setting.
4243
4244 * system-linux-arm.ads (Default_Bit_Order): Likewise.
4245 * system-linux-mips.ads (Default_Bit_Order): Likewise.
4246 * system-linux-armeb.ads: Delete.
4247 * system-linux-mipsel.ads: Likewise.
4248 * gcc-interface/Makefile.in (MIPS/Linux): Adjust.
4249 (ARM/Linux): Likewise.
4250
4251 2017-02-24 Jakub Jelinek <jakub@redhat.com>
4252
4253 PR c/79677
4254 * gcc-interface/misc.c (gnat_handle_option): Pass true to
4255 handle_generated_option GENERATED_P.
4256
4257 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
4258
4259 * gcc-interface/decl.c (gnat_to_gnu_field): Do not remove the wrapper
4260 around a justified modular type if it doesn't have the same scalar
4261 storage order as the enclosing record type.
4262
4263 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
4264
4265 * gcc-interface/trans.c (gnat_to_gnu): Do not apply special handling
4266 of boolean rvalues to function calls.
4267
4268 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
4269
4270 * gcc-interface/utils.c (fold_bit_position): New function.
4271 (rest_of_record_type_compilation): Call it instead of bit_position to
4272 compute the field position and remove the call to remove_conversions.
4273 (compute_related_constant): Factor out the multiplication in both
4274 operands, if any, and streamline the final test.
4275
4276 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
4277
4278 * gcc-interface/trans.c (return_value_ok_for_nrv_p): Add sanity check.
4279
4280 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
4281
4282 * gcc-interface/decl.c: Include demangle.h.
4283 (is_cplusplus_method): Return again true for a primitive operation
4284 only if it is dispatching. For a subprogram with an interface name,
4285 call the demangler to get the number of C++ parameters and compare it
4286 with the number of Ada parameters.
4287
4288 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
4289
4290 * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): If
4291 there is no end label, put the location of the At_End procedure on
4292 the call to the procedure.
4293
4294 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
4295
4296 * gcc-interface/misc.c (gnat_type_max_size): Try to return a meaningful
4297 value for array types with TYPE_INDEX_TYPE set on their domain type.
4298 * gcc-interface/utils.c (max_size): For operations and expressions, do
4299 not build a new node if the operands have not changed or are missing.
4300
4301 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
4302
4303 * gcc-interface/utils.c (max_size) <tcc_expression>: Flip the second
4304 argument when recursing on TRUTH_NOT_EXPR.
4305
4306 2017-02-12 John Marino <gnugcc@marino.st>
4307
4308 * system-freebsd-x86.ads: Rename into...
4309 * system-freebsd.ads: ...this.
4310 (Default_Bit_Order): Define using Standard'Default_Bit_Order.
4311 * gcc-interface/Makefile.in: Support aarch64-freebsd.
4312 (x86-64/FreeBSD): Adjust to above renaming.
4313 (i386/FreeBSD): Likewise.
4314
4315 2017-02-09 Gerald Pfeifer <gerald@pfeifer.com>
4316
4317 * comperr.adb: Update FSF bug reporting URL.
4318
4319 2017-02-01 Eric Botcazou <ebotcazou@adacore.com>
4320 Jakub Jelinek <jakub@redhat.com>
4321
4322 PR ada/79309
4323 * adaint.c (__gnat_killprocesstree): Fix broken string handling.
4324
4325 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
4326
4327 PR lto/79061
4328 * gcc-interface/utils.c (get_global_context): Pass main_input_filename
4329 to build_translation_unit_decl.
4330
4331 2017-01-23 Javier Miranda <miranda@adacore.com>
4332
4333 * sem_util.adb (New_Copy_Tree): Code cleanup:
4334 removal of the internal map (ie. variable Actual_Map, its
4335 associated local variables, and all the code handling it).
4336 * sem_ch9.adb (Analyze_Task_Type_Declaration): in GNATprove mode
4337 force loading of the System package when processing a task type.
4338 (Analyze_Protected_Type_Declaration): in GNATprove mode force
4339 loading of the System package when processing a protected type.
4340 * sem_ch10.adb (Analyze_Compilation_Unit): in GNATprove mode
4341 force loading of the System package when processing compilation
4342 unit with a main-like subprogram.
4343 * frontend.adb (Frontend): remove forced loading of the System
4344 package.
4345
4346 2017-01-23 Ed Schonberg <schonberg@adacore.com>
4347
4348 * sem_prag.adb (Default_Initial_Condition): If the desired type
4349 declaration is a derived type declaration with discriminants,
4350 it is rewritten as a private type declaration.
4351 * sem_ch13.adb (Replace_Type_References_Generic,
4352 Visible_Component): A discriminated private type with descriminnts
4353 has components that must be rewritten as selected components
4354 if they appear as identifiers in an aspect expression such as
4355 a Default_Initial_Condition.
4356 * sem_util.adb (Defining_Entity): support N_Iterator_Specification
4357 nodes.
4358
4359 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
4360
4361 * ghost.ads, ghost.adb (Is_Ignored_Ghost_Unit): New routine.
4362 * gnat1drv.adb Generate an empty object file for an ignored
4363 Ghost compilation unit.
4364 * inline.adb, sem_util.adb, sem_ch4.adb: Minor reformatting.
4365
4366 2017-01-23 Yannick Moy <moy@adacore.com>
4367
4368 * sem_ch4.adb (Analyze_Indexed_Component_Form):
4369 Adapt to inlined prefix with string literal subtype.
4370 * inline.adb (Expand_Inlined_Call): Keep unchecked
4371 conversion inside inlined call when formal type is constrained.
4372
4373 2017-01-23 Javier Miranda <miranda@adacore.com>
4374
4375 * sem_util.adb (New_Copy_Tree): Code cleanup:
4376 removal of global variables. All the global variables, global
4377 functions and tables of this subprogram are now declared locally.
4378
4379 2017-01-23 Gary Dismukes <dismukes@adacore.com>
4380
4381 * exp_strm.ads: Minor reformatting and typo fixes.
4382
4383 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
4384
4385 * sem_aggr.adb, par_sco.adb, exp_util.adb, sem.adb, sem_ch4.adb,
4386 exp_aggr.adb: Minor reformatting.
4387 * g-diopit.adb: minor grammar/punctuation fix in comment.
4388 * g-byorma.ads: minor fix of unbalanced parens in comment.
4389
4390 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
4391
4392 * par.adb: Update the documentation of component Labl.
4393 * par-ch6.adb (P_Return_Statement): Set the expected label of
4394 an extended return statement to Error.
4395
4396 2017-01-23 Tristan Gingold <gingold@adacore.com>
4397
4398 * s-boustr.ads, s-boustr.adb (Is_Full): New function.
4399
4400 2017-01-23 Ed Schonberg <schonberg@adacore.com>
4401
4402 * expander.adb: Handle N_Delta_Aggregate.
4403
4404 2017-01-23 Javier Miranda <miranda@adacore.com>
4405
4406 * exp_ch6.adb (Expand_Call): Improve the code that
4407 checks if some formal of the called subprogram is a class-wide
4408 interface, to handle subtypes of class-wide interfaces.
4409
4410 2017-01-23 Javier Miranda <miranda@adacore.com>
4411
4412 * checks.adb (Apply_Parameter_Aliasing_Checks):
4413 Remove side effects of the actuals before generating the overlap
4414 check.
4415
4416 2017-01-23 Justin Squirek <squirek@adacore.com>
4417
4418 * exp_strm.ads, exp_strm.ads
4419 (Build_Record_Or_Elementary_Input_Function): Add an extra parameter so
4420 as to avoid getting the underlying type by default.
4421 * exp_attr.adb (Expand_N_Attribute_Reference): Remove use of
4422 underlying type in the Iiput and output attribute cases when
4423 building their respective functions.
4424
4425 2017-01-23 Gary Dismukes <dismukes@adacore.com>
4426
4427 * scng.adb: Minor reformatting of error message.
4428
4429 2017-01-23 Ed Schonberg <schonberg@adacore.com>
4430
4431 * sem_ch6.adb (Analyze_Expression_Function): Do not attempt
4432 to freeze the return type of an expression funxtion that is a
4433 completion, if the type is a limited view and the non-limited
4434 view is available.
4435
4436 2017-01-23 Ed Schonberg <schonberg@adacore.com>
4437
4438 * par-ch4.adb (P_Aggregate_Or_Parent_Expr): Recognize delta
4439 aggregate construct.
4440 (P_Record_Or_Array_Component_Association): An array aggregate
4441 can start with an Iterated_Component_Association.
4442 * scng.adb: Modify error message on improper use of @ in earlier
4443 versions of the language.
4444 * sinfo.ads: New node kind N_Delta_Aggregate.
4445 * sinfo.adb: An N_Delta_Aggregate has component associations and
4446 an expression.
4447 * sem_res.adb (Resolve): Call Resolve_Delta_Aggregate.
4448 * sem_aggr.ads, sem_aggr.adb (Resolve_Iterated_Component_Association):
4449 Create a new index for each one of the choices in the association,
4450 to prevent spurious homonyms in the scope.
4451 (Resolve_Delta_Aggregate): New.
4452 * sem.adb: An N_Delta_Aggregate is analyzed like an aggregate.
4453 * exp_util.adb (Insert_Actions): Take into account
4454 N_Delta_Aggregate.
4455 * exp_aggr.ads: New procedure Expand_N_Delta_Aggregate.
4456 * exp_aggr.adb: New procedure Expand_N_Delta_Aggregate,
4457 and local procedures Expand_Delta_Array_Aggregate and
4458 expand_Delta_Record_Aggregate.
4459 * sprint.adb: Handle N_Delta_Aggregate.
4460
4461 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
4462
4463 * exp_ch11.adb (Expand_N_Exception_Declaration): Generate an
4464 empty name when the exception declaration is subject to pragma
4465 Discard_Names.
4466 (Null_String): New routine.
4467
4468 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
4469
4470 * par-ch9.adb (P_Protected_Definition): Parse
4471 any optional and potentially illegal pragmas which appear in
4472 a protected operation declaration list.
4473 (P_Task_Items): Parse
4474 any optional and potentially illegal pragmas which appear in a
4475 task item list.
4476
4477 2017-01-23 Pascal Obry <obry@adacore.com>
4478
4479 * s-taprop-mingw.adb (Enter_Task): Initialize the Thread handle which
4480 is needed when a foreign thread call a Win32 API using a thread handle
4481 like GetThreadTimes() for example.
4482
4483 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
4484
4485 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
4486 allow an 'Address clause to be specified on a prefix of a
4487 class-wide type.
4488
4489 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
4490
4491 * checks.adb (Insert_Valid_Check): Ensure that the prefix of
4492 attribute 'Valid is a renaming of the original expression when
4493 the expression denotes a name. For all other kinds of expression,
4494 use a constant to capture the value.
4495 * exp_util.adb (Is_Name_Reference): Moved to Sem_Util.
4496 * sem_util.ads, sem_util.adb (Is_Name_Reference): Moved from Exp_Util.
4497
4498 2017-01-23 Justin Squirek <squirek@adacore.com>
4499
4500 * sem_eval.adb (Eval_Integer_Literal): Add special
4501 case to avoid optimizing out check if the literal appears in
4502 an if-expression.
4503
4504 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
4505
4506 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
4507 allow an 'Address clause to be specified on a prefix of a
4508 class-wide type.
4509
4510 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
4511
4512 * checks.adb (Insert_Valid_Check): Ensure that the prefix of
4513 attribute 'Valid is a renaming of the original expression when
4514 the expression denotes a name. For all other kinds of expression,
4515 use a constant to capture the value.
4516 * exp_util.adb (Is_Name_Reference): Moved to Sem_Util.
4517 * sem_util.ads, sem_util.adb (Is_Name_Reference): Moved from Exp_Util.
4518
4519 2017-01-23 Justin Squirek <squirek@adacore.com>
4520
4521 * sem_eval.adb (Eval_Integer_Literal): Add special
4522 case to avoid optimizing out check if the literal appears in
4523 an if-expression.
4524
4525 2017-01-23 Ed Schonberg <schonberg@adacore.com>
4526
4527 * sem_ch4.adb (Try_Primitive_Operations,
4528 Is_Valid_First_Argument_Of): argument is valid if it is a derived
4529 type with unknown discriminants that matches its underlying
4530 record view.
4531 * exp_util.adb (Expand_Subtype_From_Expr): Do not expand
4532 expression if its type is derived from a limited type with
4533 unknown discriminants, because the expansion (which is a call)
4534 must be expanded in the enclosing context to add the proper build-
4535 in-place parameters to the call.
4536 * lib.ads, exp_ch9.adb: Minor fixes in comments.
4537
4538 2017-01-23 Yannick Moy <moy@adacore.com>
4539
4540 * frontend.adb (Frontend): Do not load runtime
4541 unit for GNATprove when parsing failed.
4542 * exp_ch9.adb: minor removal of extra whitespace
4543 * exp_ch6.adb: minor typo in comment
4544 * sem_util.adb: Code cleanup.
4545 * exp_ch9.ads, par-ch2.adb: minor style fixes in whitespace and comment
4546 * a-ngcefu.adb: minor style fix in whitespace
4547
4548 2017-01-23 Thomas Quinot <quinot@adacore.com>
4549
4550 * scos.ads: Document usage of 'd' as default SCO kind for
4551 declarations.
4552 * par_sco.adb (Traverse_Declarations_Or_Statements.
4553 Traverse_Degenerate_Subprogram): New supporting routine for expression
4554 functions and null procedures.
4555 (Traverse_Declarations_Or_Statements.Traverse_One): Add
4556 N_Expression_Function to the subprogram case; add required
4557 support for null procedures and expression functions.
4558
4559 2017-01-23 Bob Duff <duff@adacore.com>
4560
4561 * namet.ads (Bounded_String): Decrease the size of type
4562 Bounded_String to avoid running out of stack space.
4563 * namet.ads (Append): Don't ignore buffer overflow; raise
4564 Program_Error instead.
4565
4566 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
4567
4568 * exp_ch5.adb, freeze.adb, par-ch4.adb, scng.adb, sem_ch13.adb,
4569 sem_ch3.adb, sem_ch5.adb, sem_ch5.ads, sem_util.adb, sinfo.ads: Minor
4570 reformatting.
4571 * exp_ch9.adb: minor style fix in comment.
4572
4573 2017-01-23 Ed Schonberg <schonberg@adacore.com>
4574
4575 * sem_ch4.adb (Analyze_Allocator): Handle properly a type derived
4576 for a limited record extension with unknown discriminants whose
4577 full view has no discriminants.
4578
4579 2017-01-23 Yannick Moy <moy@adacore.com>
4580
4581 * exp_spark.adb: Alphabetize with clauses.
4582
4583 2017-01-23 Yannick Moy <moy@adacore.com>
4584
4585 * sem_util.adb (Has_Enabled_Property): Treat
4586 protected objects and variables differently from other variables.
4587
4588 2017-01-23 Thomas Quinot <quinot@adacore.com>
4589
4590 * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order):
4591 Split original Ada 95 part off into new subprogram
4592 below. Call that subprogram (instead of proceeding with
4593 AI95-0133 behaviour) if debug switch -gnatd.p is in use.
4594 (Adjust_Record_For_Reverse_Bit_Order_Ada_95): ... new subprogram
4595 * debug.adb Document new switch -gnatd.p
4596 * freeze.adb (Freeze_Entity.Freeze_Record_Type): Do not adjust
4597 record for reverse bit order if an error has already been posted
4598 on the record type. This avoids generating extraneous "info:"
4599 messages for illegal code.
4600
4601 2017-01-23 Justin Squirek <squirek@adacore.com>
4602
4603 * sem_ch3.adb (Analyze_Declarations): Correct comments
4604 * freeze.adb (Find_Constant): Add detection of deferred constants
4605 so they are not incorrectly flagged as premature.
4606
4607 2017-01-23 Ed Schonberg <schonberg@adacore.com>
4608
4609 * scans.ads: New token At_Sign. Remove '@' from list of illegal
4610 characters for future version of the language. '@' is legal name.
4611 * scng.ads, scng.adb (Scan): Handle '@' appropriately.
4612 * scn.adb (Scan_Reserved_Identifier): An occurrence of '@'
4613 denotes a Target_Name.
4614 * par-ch4.adb (P_Name, P_Primary): Handle Target_Name.
4615 * sinfo.ads, sinfo.adb (N_Target_Name): New non-terminal node.
4616 (Has_Target_Names): New flag on N_Assignment_Statement, to
4617 indicate that RHS has occurrences of N_Target_Name.
4618 * sem.adb: Call Analyze_Target_Name.
4619 * sem_ch5.ads, sem_ch5.adb (Analyze_Target_Name): New subpogram.
4620 (urrent_LHS): Global variable that denotes LHS of assignment,
4621 used in the analysis of Target_Name nodes.
4622 * sem_res.adb (Resolve_Target_Name): New procedure.
4623 * exp_ch5.adb (Expand_Assign_With_Target_Names): (AI12-0125):
4624 N is an assignment statement whose RHS contains occurences of @
4625 that designate the value of the LHS of the assignment. If the
4626 LHS is side-effect free the target names can be replaced with
4627 a copy of the LHS; otherwise the semantics of the assignment
4628 is described in terms of a procedure with an in-out parameter,
4629 and expanded as such.
4630 (Expand_N_Assignment_Statement): Call
4631 Expand_Assign_With_Target_Names when needed.
4632 * exp_util.adb (Insert_Actions): Take into account N_Target_Name.
4633 * sprint.adb: Handle N_Target_Name.
4634
4635 2017-01-23 Eric Botcazou <ebotcazou@adacore.com>
4636
4637 * checks.adb: Minor fix in comment.
4638
4639 2017-01-23 Philippe Gil <gil@adacore.com>
4640
4641 * g-debpoo.adb (Do_Report) remove freed chunks from chunks
4642 count in Sort = Memory_Usage or Allocations_Count
4643
4644 2017-01-23 Justin Squirek <squirek@adacore.com>
4645
4646 * sem_ch3.adb: Code cleanup.
4647
4648 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
4649
4650 * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Move all global
4651 variables to the local variable section. Update the profile
4652 of various nested routine that previously had visibility
4653 of those globals. One the matching phase has completed,
4654 remove certain classes of clauses which are considered noise.
4655 (Check_Dependency_Clause): Properly detect a match between two
4656 'Result attributes. Update the various post-match cases to use
4657 Is_Already_Matched as this routine now automatically recognizes
4658 a previously matched 'Result attribute.
4659 (Is_Already_Matched): New routine.
4660 (Remove_Extra_Clauses): New routine.
4661 (Report_Extra_Clauses): Remove the detection of ... => null
4662 clauses as this is now done in Remove_Extra_Clauses.
4663
4664 2017-01-23 Ed Schonberg <schonberg@adacore.com>
4665
4666 * sem_aggr.adb (Resolve_Array_Aggregate): In ASIS mode do not
4667 report on spurious overlaps between values involving a subtype
4668 with a static predicate, because the expansion of such a subtype
4669 into individual ranges in inhibited in ASIS mode.
4670
4671 2017-01-23 Justin Squirek <squirek@adacore.com>
4672
4673 * sem_ch3.adb (Analyze_Declarations): Add detection
4674 of an edge case and delay freezing if it is present.
4675
4676 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
4677
4678 * sem_ch3.adb, exp_spark.adb, exp_attr.adb, sem_ch9.adb, sem_prag.adb,
4679 sem_util.adb, sem_warn.adb, exp_ch3.adb: Minor reformatting.
4680
4681 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
4682
4683 * freeze.adb (Freeze_Subprogram): Ensure that all anonymous
4684 access-to-subprogram types inherit the convention of the
4685 associated subprogram. (Set_Profile_Convention): New routine.
4686 * sem_ch6.adb (Check_Conformance): Do not compare the conventions
4687 of the two entities directly, use Conventions_Match to account
4688 for anonymous access-to-subprogram and subprogram types.
4689 (Conventions_Match): New routine.
4690
4691 2017-01-23 Claire Dross <dross@adacore.com>
4692
4693 * exp_spark.adb (Expand_SPARK_Attribute_Reference): For attributes
4694 which return Universal_Integer, force the overflow check flag for
4695 Length and Range_Length for types as big as Long_Long_Integer.
4696
4697 2017-01-23 Claire Dross <dross@adacore.com>
4698
4699 * exp_spark.adb (Expand_SPARK_Attribute_Reference): For
4700 attributes which return Universal_Integer, introduce a conversion
4701 to the expected type with the appropriate check flags set.
4702 * sem_res.adb (Resolve_Range): The higher bound can be in Typ's
4703 base type if the range is null. It may still be invalid if it
4704 is higher than the lower bound. This is checked later in the
4705 context in which the range appears.
4706
4707 2017-01-23 Pierre-Marie de Rodat <derodat@adacore.com>
4708
4709 * scos.ads: Introduce a constant to represent ignored
4710 dependencies in SCO_Unit_Table_Entry.
4711
4712 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
4713
4714 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Remove extra
4715 spaces from error messages.
4716
4717 2017-01-23 Ed Schonberg <schonberg@adacore.com>
4718
4719 * exp_ch3.adb (Check_Large_Modular_Array): New procedure,
4720 subsidiary to Expand_N_Object_ Declaration, to compute a guard on
4721 an object declaration for an array type with a modular index type
4722 with the size of Long_Long_Integer. Special processing is needed
4723 in this case to compute reliably the size of the object, and
4724 eventually to raise Storage_Error, when wrap-around arithmetic
4725 might compute a meangingless size for the object.
4726
4727 2017-01-23 Justin Squirek <squirek@adacore.com>
4728
4729 * a-wtenau.adb, par-endh.adb, sem_prag.adb,
4730 sem_type.adb: Code cleanups.
4731
4732 2017-01-23 Bob Duff <duff@adacore.com>
4733
4734 * sem_res.adb (Resolve_Call): In the part of the code where
4735 it is deciding whether to turn the call into an indexed
4736 component, avoid doing so if the call is to an instance of
4737 Unchecked_Conversion. Otherwise, the compiler turns it into an
4738 indexed component, and resolution of that turns it back into a
4739 function call, and so on, resulting in infinite recursion.
4740 * sem_util.adb (Needs_One_Actual): If the first formal has a
4741 default, then return False.
4742
4743 2017-01-21 Eric Botcazou <ebotcazou@adacore.com>
4744
4745 * sem_eval.adb (Compile_Time_Compare): Reinstate the expr+literal (etc)
4746 optimizations when the type is modular and the offsets are equal.
4747
4748 2017-01-20 Thomas Quinot <quinot@adacore.com>
4749
4750 * sem_warn.adb (Warn_On_Useless_Assignment): Adjust wording of warning
4751 message.
4752
4753 2017-01-20 Nicolas Roche <roche@adacore.com>
4754
4755 * terminals.c: Ignore failures on setpgid and tcsetpgrp commands.
4756
4757 2017-01-20 Bob Duff <duff@adacore.com>
4758
4759 * sem_eval.adb (Compile_Time_Compare): Disable the expr+literal
4760 (etc) optimizations when the type is modular.
4761
4762 2017-01-20 Yannick Moy <moy@adacore.com>
4763
4764 * sem_ch6.adb (Move_Pragmas): move some pragmas,
4765 but copy the SPARK_Mode pragma instead of moving it.
4766 (Build_Subprogram_Declaration): Ensure that the generated spec
4767 and original body share the same SPARK_Pragma aspect/pragma.
4768 * sem_util.adb, sem_util.ads (Copy_SPARK_Mode_Aspect): New
4769 procedure to copy SPARK_Mode aspect.
4770
4771 2017-01-20 Bob Duff <duff@adacore.com>
4772
4773 * sem_ch3.adb (Analyze_Declarations): Disable Resolve_Aspects
4774 even in ASIS mode.
4775 * sem_ch13.adb (Resolve_Name): Enable setting the entity to
4776 Empty even in ASIS mode.
4777
4778 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
4779
4780 * exp_ch9.adb: minor style fixes in comments.
4781 * sem_ch9.adb (Analyze_Delay_Relative): in GNATprove mode a delay
4782 relative statement introduces an implicit dependency on
4783 Ada.Real_Time.Clock_Time.
4784 * sem_util.adb: Minor reformatting.
4785
4786 2017-01-20 Ed Schonberg <schonberg@adacore.com>
4787
4788 * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect Alignment
4789 must be treated as delayed aspect even if the expression is
4790 a literal, because the aspect affects the freezing and the
4791 elaboration of the object to which it applies.
4792
4793 2017-01-20 Tristan Gingold <gingold@adacore.com>
4794
4795 * s-osinte-vxworks.ads (Interrup_Range): New subtype.
4796
4797 2017-01-20 Ed Schonberg <schonberg@adacore.com>
4798
4799 * lib-xref.adb (Generate_Reference): Do not warn about the
4800 presence of a pragma Unreferenced if the entity appears as the
4801 actual in a procedure call that does not come from source.
4802
4803 2017-01-20 Pascal Obry <obry@adacore.com>
4804
4805 * expect.c, terminals.c: Fix some warnings about unused variables.
4806 * gsocket.h, adaint.c, adaint.h: Fix some more warnings in the C part
4807 of the runtime.
4808
4809 2017-01-20 Bob Duff <duff@adacore.com>
4810
4811 * exp_attr.adb (Constrained): Apply an access check (check that
4812 the prefix is not null) when the prefix denotes an object of an
4813 access type; that is, when there is an implicit dereference.
4814
4815 2017-01-20 Gary Dismukes <dismukes@adacore.com>
4816
4817 * s-rident.ads (constant Profile_Info): Remove
4818 No_Calendar from GNAT_Extended_Ravenscar restrictions.
4819
4820 2017-01-20 Tristan Gingold <gingold@adacore.com>
4821
4822 * s-maccod.ads: Add pragma No_Elaboration_Code_All
4823
4824 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
4825
4826 * ghost.adb (Mark_Ghost_Clause): New routine.
4827 (Prune_Node): Do not prune compilation unit nodes.
4828 (Remove_Ignored_Ghost_Code): Prune the compilation unit node directly.
4829 This does not touch the node itself, but does prune all its fields.
4830 * ghost.ads (Mark_Ghost_Clause): New routine.
4831 * sem_ch8.adb (Analyze_Use_Package): Emit an error when a use
4832 package clause mentions Ghost and non-Ghost packages. Mark a
4833 use package clause as Ghost when it mentions a Ghost package.
4834 (Analyze_Use_Type): Emit an error when a use type clause mentions
4835 Ghost and non-Ghost types. Mark a use type clause as Ghost when
4836 it mentions a Ghost type.
4837 * sem_ch10.adb (Analyze_With_Clause): Mark a with clause as
4838 Ghost when it withs a Ghost unit.
4839
4840 2017-01-20 Javier Miranda <miranda@adacore.com>
4841
4842 * sem_res.adb (Resolve_Call): If a function call
4843 returns a limited view of a type and at the point of the call the
4844 function is not declared in the extended main unit then replace
4845 it with the non-limited view, which must be available. If the
4846 called function is in the extended main unit then no action is
4847 needed since the back-end handles this case.
4848
4849 2017-01-20 Eric Botcazou <ebotcazou@adacore.com>
4850
4851 * sem_ch7.adb (Contains_Subp_Or_Const_Refs): Rename into...
4852 (Contains_Subprograms_Refs): ...this. Adjust comment
4853 for constants. (Is_Subp_Or_Const_Ref): Rename into...
4854 (Is_Subprogram_Ref): ...this.
4855 (Has_Referencer): Rename Has_Non_Subp_Const_Referencer variable into
4856 Has_Non_Subprograms_Referencer and adjust comment. Remove
4857 incorrect shortcut for package declarations and bodies.
4858
4859 2017-01-20 Ed Schonberg <schonberg@adacore.com>
4860
4861 * sem_ch3.adb (Complete_Private_Subtype): If the scope of the
4862 base type differs from that of the completion and the private
4863 subtype is an itype (created for a constraint on an access
4864 type e.g.), set Delayed_Freeze on both to prevent out-of-scope
4865 anomalies in gigi.
4866
4867 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
4868
4869 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
4870 When inheriting the SPARK_Mode of a prior expression function,
4871 look at the properly resolved entity rather than the initial
4872 candidate which may denote a homonym.
4873
4874 2017-01-20 Ed Schonberg <schonberg@adacore.com>
4875
4876 * sem_prag.adb (Rewrite_Assertion_Kind): If the name is
4877 Precondition or Postcondition, and the context is pragma
4878 Check_Policy, indicate that this Pre-Ada2012 usage is deprecated
4879 and suggest the standard names Assertion_Policy /Pre /Post
4880 instead.
4881
4882 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
4883
4884 * sem_ch10.adb, sem_cat.adb: Minor reformatting.
4885
4886 2017-01-20 Javier Miranda <miranda@adacore.com>
4887
4888 * sem_ch3.adb (Access_Type_Declaration): Protect access to the
4889 Entity attribute.
4890 * sem_ch10.adb (Install_Siblings): Skip processing malformed trees.
4891 * sem_cat.adb (Validate_Categoriztion_Dependency): Skip processing
4892 malformed trees.
4893
4894 2017-01-20 Ed Schonberg <schonberg@adacore.com>
4895
4896 * sem_ch13.adb (Analyze_Aspect_Specification, case
4897 Dynamic_Predicate): If the entity E is a subtype that inherits
4898 a static predicate for its parent P,, the inherited and the
4899 new predicate combine in the generated predicate function,
4900 and E only has a dynamic predicate.
4901
4902 2017-01-20 Tristan Gingold <gingold@adacore.com>
4903
4904 * s-boustr.ads, s-boustr.adb: New package.
4905 * Makefile.rtl: Add s-boustr.
4906
4907 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
4908
4909 * inline.adb (Process_Formals): Qualify the
4910 expression of a return statement when it yields a universal type.
4911
4912 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
4913
4914 * freeze.adb (Freeze_All): Freeze the default
4915 expressions of all eligible formal parameters that appear in
4916 entries, entry families, and protected subprograms.
4917
4918 2017-01-20 Ed Schonberg <schonberg@adacore.com>
4919
4920 * sem_ch3.adb (Check_Nonoverridable_Aspects); Refine check
4921 for illegal inherited Implicit_Dereference aspects with renamed
4922 discriminants.
4923
4924 2017-01-20 Javier Miranda <miranda@adacore.com>
4925
4926 * debug.adb (switch d.6): do not avoid declaring unreferenced itypes.
4927 * nlists.ads (Lock_Lists, Unlock_Lists): New subprograms.
4928 * nlists.adb (Lock_Lists, Unlock_Lists): New subprograms.
4929 (Set_First, Set_Last, Set_List_Link, Set_Next, Set_Parent,
4930 Set_Prev, Tree_Read): Adding assertion.
4931 * atree.ads (Lock_Nodes, Unlock_Nodes): New subprograms.
4932 * atree.adb (Lock_Nodes, Unlock_Nodes): New subprograms.
4933 (Set_Analyzed, Set_Check_Actuals, Set_Comes_From_Source,
4934 Set_Ekind, Set_Error_Posted, Set_Has_Aspects,
4935 Set_Is_Ignored_Ghost_Node, Set_Original_Node, Set_Paren_Count,
4936 Set_Parent, Set_Sloc, Set_Nkind, Set_FieldNN, Set_NodeNN,
4937 Set_ListNN, Set_ElistNN, Set_NameN, Set_StrN, Set_UintNN,
4938 Set_UrealNN, Set_FlagNNN, Set_NodeN_With_Parent,
4939 Set_ListN_With_Parent): Adding assertion.
4940
4941 2017-01-20 Ed Schonberg <schonberg@adacore.com>
4942
4943 * sem_prag.adb (Process_Convention): Diagnose properly a pragma
4944 import that applies to several homograph subprograms. when one
4945 of them is declared by a subprogram body.
4946
4947 2017-01-20 Justin Squirek <squirek@adacore.com>
4948
4949 * exp_ch6.adb (Expand_Call): Remove optimization
4950 that nulls out calls to null procedures.
4951
4952 2017-01-20 Yannick Moy <moy@adacore.com>
4953
4954 * inline.adb (Expand_Inlined_Call): Keep more
4955 precise type of actual for inlining whenever possible. In
4956 particular, do not switch to the formal type in GNATprove mode in
4957 some case where the GNAT backend might require it for visibility.
4958
4959 2017-01-20 Ed Schonberg <schonberg@adacore.com>
4960
4961 * sem_ch3.adb (Check_Non_Overridable_Aspects): An inherited
4962 aspect Implicit_Dereference can be inherited by a full view if
4963 the partial view has no discriminants, because there is no way
4964 to apply the aspect to the partial view.
4965 (Build_Derived_Record_Type): If derived type renames discriminants
4966 of the parent, the new discriminant inherits the aspect from
4967 the old one.
4968 * sem_ch4.adb (Analyze_Call): Handle properly a parameterless
4969 call through an access discriminant designating a subprogram.
4970 * sem_ch5.adb (Analyze_Assignment): (Analyze_Call): Handle
4971 properly a parameterless call through an access discriminant on
4972 the left-hand side of an assignment.
4973 * sem_res.adb (resolve): If an interpreation involves a
4974 discriminant with an implicit dereference and the expression is an
4975 entity, resolution takes place later in the appropriate routine.
4976 * sem_ch13.adb (Analyze_Aspect_Implicit_Dereference): Recognize
4977 access discriminants that designate a subprogram type.
4978
4979 2017-01-20 Pascal Obry <obry@adacore.com>
4980
4981 * a-locale.adb, a-locale.ads: Update Ada.Locales for RM 2012 COR:1:2016
4982
4983 2017-01-20 Yannick Moy <moy@adacore.com>
4984
4985 * sem_ch10.adb (Check_No_Elab_Code_All): Do not issue an error
4986 on implicitly with'ed units in GNATprove mode.
4987 * sinfo.ads (Implicit_With): Document use of flag for implicitly
4988 with'ed units in GNATprove mode.
4989
4990 2017-01-20 Ed Schonberg <schonberg@adacore.com>
4991
4992 * sem_cat.adb (Validate_Static_Object_Name): In a preelaborated
4993 unit Do not report an error on a non-static entity that appears
4994 in the context of a spec expression, such as an aspect expression.
4995
4996 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
4997
4998 * einfo.adb: Flag298 now denotes Is_Underlying_Full_View.
4999 (Is_Underlying_Full_View): New routine.
5000 (Set_Is_Underlying_Full_View): New routine.
5001 (Write_Entity_Flags): Add an entry for Is_Underlying_Full_View.
5002 * einfo.ads Add new attribute Is_Underlying_Full_View.
5003 (Is_Underlying_Full_View): New routine along with pragma Inline.
5004 (Set_Is_Underlying_Full_View): New routine along with pragma Inline.
5005 * exp_util.adb (Build_DIC_Procedure_Body): Do not consider
5006 class-wide types and underlying full views. The first subtype
5007 is used as the working type for all Itypes, not just array base types.
5008 (Build_DIC_Procedure_Declaration): Do not consider
5009 class-wide types and underlying full views. The first subtype
5010 is used as the working type for all Itypes, not just array
5011 base types.
5012 * freeze.adb (Freeze_Entity): Inherit the freeze node of a full
5013 view or an underlying full view without clobbering the attributes
5014 of a previous freeze node.
5015 (Inherit_Freeze_Node): New routine.
5016 * sem_ch3.adb (Build_Derived_Private_Type): Mark an underlying
5017 full view as such.
5018 (Build_Underlying_Full_View): Mark an underlying full view as such.
5019 * sem_ch7.adb (Install_Private_Declarations): Mark an underlying
5020 full view as such.
5021
5022 2017-01-20 Yannick Moy <moy@adacore.com>
5023
5024 * sinfo.ads: Document lack of Do_Division_Check flag
5025 on float exponentiation.
5026
5027 2017-01-19 Javier Miranda <miranda@adacore.com>
5028
5029 * ghost.adb (Propagate_Ignored_Ghost_Code): Protect access to the
5030 identifier attribute of a block-statement node. Required to avoid
5031 assertion failure when building the new containers library.
5032
5033 2017-01-19 Bob Duff <duff@adacore.com>
5034
5035 * exp_ch3.adb: Update comment.
5036
5037 2017-01-19 Vincent Celier <celier@adacore.com>
5038
5039 * gprep.adb (Gnatprep): Parse the definition file without
5040 "replace in comments" even when switch -C is used.
5041
5042 2017-01-19 Justin Squirek <squirek@adacore.com>
5043
5044 * exp_ch9.adb (Is_Pure_Barrier): Create function
5045 Is_Count_Attribute to identify an expansion of the 'Count
5046 attribute.
5047
5048 2017-01-19 Ed Schonberg <schonberg@adacore.com>
5049
5050 * sem_ch5.adb (Analyze_Loop_Statement): In GNATprove mode the
5051 statements within an element iterator loop are only analyzed
5052 agter the loop is rewritten. Within a generic the analysis must
5053 be performed in any case to complete name capture.
5054
5055 2017-01-19 Bob Duff <duff@adacore.com>
5056
5057 * sem_prag.adb (Analyze_Pragma): Check for ignored pragmas first,
5058 before checking for unrecognized pragmas.
5059 Initialize Pname on its declarations; that's always good style.
5060
5061 2017-01-19 Claire Dross <dross@adacore.com>
5062
5063 * exp_ch7.adb (Build_Invariant_Procedure_Body): Semi-insert the
5064 body into the tree for GNATprove by setting its Parent field. The
5065 components invariants of composite types are not checked by
5066 the composite type's invariant procedure in GNATprove mode.
5067 (Build_Invariant_Procedure_Declaration): Semi-insert the
5068 declaration into the tree for GNATprove by setting its Parent
5069 field.
5070 * freeze.adb (Freeze_Arry_Type):In GNATprove mode, do not add
5071 the component invariants to the array type invariant procedure
5072 so that the procedure can be used to check the array type
5073 invariants if any.
5074 (Freeze_Record_Type): In GNATprove mode, do
5075 not add the component invariants to the record type invariant
5076 procedure so that the procedure can be used to check the record
5077 type invariants if any.
5078
5079 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
5080
5081 * lib-xref-spark_specific.adb: Minor reformatting.
5082 * exp_ch7.adb (Add_Parent_Invariants): Do not process array types.
5083
5084 2017-01-19 Javier Miranda <miranda@adacore.com>
5085
5086 * exp_aggr.adb (Pass_Aggregate_To_Back_End): Renamed as
5087 Build_Back_End_Aggregate.
5088 (Generate_Aggregate_For_Derived_Type): Code cleanup.
5089 (Prepend_Stored_Values): Code cleanup.
5090
5091 2017-01-19 Ed Schonberg <schonberg@adacore.com>
5092
5093 * sem_ch6.adb (Analyze_Expression_Function): Check for an
5094 incomplete return type after attempting to freeze it, so that
5095 other freeze actiona are generated in the proper order.
5096
5097 2017-01-19 Ed Schonberg <schonberg@adacore.com>
5098
5099 * sem_aggr.adb (Resolve_Aggregate): If the type is a string
5100 type, ie. a type whose component is a character type, and the
5101 aggregate is positional, do not convert into a string literal
5102 if the index type is not an integer type, because the original
5103 type may be required in an enclosing operation.
5104
5105 2017-01-19 Bob Duff <duff@adacore.com>
5106
5107 * binde.adb, debug.adb: Enable new elaboration order algorithm
5108 by default. -dp switch reverts to the old algorithm.
5109
5110 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
5111
5112 * sem_ch3.adb Add with and use clauses for Exp_Ch7.
5113 (Analyze_Declarations): Create the DIC and Invariant
5114 procedure bodies s after all freezing has taken place.
5115 (Build_Assertion_Bodies): New routine.
5116 * sem_ch7.adb Remove the with and use clauses for Exp_Ch7
5117 and Exp_Util.
5118 (Analyze_Package_Specification): Remove the
5119 generation of the DIC and Invariant procedure bodies. This is
5120 now done by Analyze_Declarations.
5121 * sem_disp.adb (Check_Dispatching_Operation): DIC and Invariant
5122 procedures are never treated as primitives.
5123
5124 2017-01-19 Yannick Moy <moy@adacore.com>
5125
5126 * frontend.adb: Analyze inlined bodies and check elaboration
5127 rules in GNATprove mode too.
5128 * sem_elab.adb (Delay_Element): Add Boolean component to save
5129 indication that call is in SPARK code. (Check_Elab_Calls):
5130 Check elaboration rules in GNATprove mode, and correctly set
5131 the current value of SPARK_Mode.
5132 * lib-xref-spark_specific.adb
5133 (Add_SPARK_Xrefs): Simplify iteration over dereferences.
5134
5135 2017-01-19 Ed Schonberg <schonberg@adacore.com>
5136
5137 * exp_ch4.adb (Expand_Concatenate): Do no enable overflow
5138 checks on the expression for the high bound of concatenation
5139 when checks are disabled, to suppress warnings about potential
5140 constraint errors in restricted runtimes.
5141
5142 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
5143
5144 * exp_ch3.adb (Expand_Freeze_Enumeration_Type): Mark the
5145 representation-to-position function as inlined.
5146 * sem_cat.adb (Set_Categorization_From_Scope): Do not modify
5147 the purity of an internally generated entity if it has been
5148 explicitly marked as pure for optimization purposes.
5149 * exp_aggr.adb: Minor reformatting.
5150
5151 2017-01-19 Javier Miranda <miranda@adacore.com>
5152
5153 * exp_ch6.adb (Expand_Call): Remove side effects on
5154 actuals that are allocators with qualified expression since the
5155 initialization of the object is performed by means of individual
5156 statements (and hence it must be done before the call).
5157
5158 2017-01-19 Ed Schonberg <schonberg@adacore.com>
5159
5160 * sem_ch3.adb (Analyze_Declarations): Minor reformatting.
5161 (Build_Derived_Enumeration_Type): If the derived type inherits a
5162 dynamic predicate from its parent, the bounds of the type must
5163 freeze because an explicit constraint is constructed for the
5164 type and the corresponding range is elaborated now.
5165
5166 2017-01-19 Arnaud Charlet <charlet@adacore.com>
5167
5168 * sem_attr.ads: minor fix of inconsistent casing in comment
5169 * lib-writ.ads: minor align comments in columns
5170 * sem_ch3.adb: Minor reformatting.
5171 * spark_xrefs.ads: minor fix typo in SPARK-related comment
5172 * table.ads: minor style fix in comment
5173 * lib-xref-spark_specific.adb
5174 (Add_SPARK_Xrefs): simplify processing of SPARK cross-references.
5175 * sem_ch12.adb: minor whitespace fix
5176 * freeze.adb: Add comment.
5177 * sem_util.adb (Unique_Name): for instances of
5178 generic subprograms ignore the name of the wrapper package.
5179
5180 2017-01-19 Javier Miranda <miranda@adacore.com>
5181
5182 * exp_aggr.adb (Resolve_Record_Aggregate):
5183 Factorize code needed for aggregates of limited and unlimited
5184 types in a new routine.
5185 (Pass_Aggregate_To_Back_End): New subprogram.
5186
5187 2017-01-19 Yannick Moy <moy@adacore.com>
5188
5189 * sinfo.adb (Pragma_Name): Only access up to Last_Pair of Pragma_Map.
5190
5191 2017-01-19 Ed Schonberg <schonberg@adacore.com>
5192
5193 * sem_ch4.ads, sem_ch4.adb (Try_Object_Operation): Make subprogram
5194 public, for use elsewhere.
5195 * sem_ch6.adb (Analyze_Procedure_Call): In SPARK_Mode and within
5196 an Inlined_body, recognize a call that uses object notation
5197 and has not been rewritten as a regular call because regular
5198 expansion has not taken place.
5199
5200 2017-01-19 Bob Duff <duff@adacore.com>
5201
5202 * checks.adb (Apply_Type_Conversion_Checks): Disable small optimization
5203 in case of generic formal discrete types, because it causes crashes in
5204 the compiler when built with assertions on.
5205
5206 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
5207
5208 * lib-xref-spark_specific.adb, sem_util.adb, sem_util.ads,
5209 sem_ch4.adb, sem_ch8.adb, lib-xref.ads: Minor reformatting.
5210
5211 2017-01-19 Bob Duff <duff@adacore.com>
5212
5213 * bcheck.adb (Check_Consistent_Dynamic_Elaboration_Checking):
5214 Increment Warnings_Detected. It was decrementing, which is
5215 wrong since we just issued a warning message.
5216 * binderr.ads (Errors_Detected, Warnings_Detected): Declare
5217 these variables to be of subtype Nat instead of Int, because
5218 they should never be negative.
5219
5220 2017-01-19 Javier Miranda <miranda@adacore.com>
5221
5222 * contracts.adb (Build_Postconditions_Procedure): Replace
5223 Generate_C_Code by Modify_Tree_For_C.
5224 * exp_aggr.adb (Build_Record_Aggr_Code, Expand_Array_Aggregate):
5225 Replace Generate_C_Code by Modify_Tree_For_C.
5226 * exp_attr.adb (Float_Valid, Is_GCC_Target): Replace Generate_C_Code by
5227 Modify_Tree_For_C.
5228 * exp_ch11.adb (Expand_N_Exception_Declaration): Replace
5229 Generate_C_Code by Modify_Tree_For_C.
5230 * exp_ch4.adb (Expand_Allocator_Expression): Replace
5231 Generate_C_Code by Modify_Tree_For_C.
5232 * exp_dbug.adb (Qualify_Entity_Name): Replace Generate_C_Code
5233 by Modify_Tree_For_C.
5234 * exp_util.adb (Remove_Side_Effects, Side_Effect_Free): Replace
5235 Generate_C_Code by Modify_Tree_For_C.
5236 * sem_res.adb (Resolve_Type_Conversion): Replace Generate_C_Code
5237 by Modify_Tree_For_C.
5238 * sinfo.ads (Modify_Tree_For_C): Adding documentation.
5239
5240 2017-01-19 Javier Miranda <miranda@adacore.com>
5241
5242 * sem_util.ads, sem_util.adb (Expression_Of_Expression_Function): New
5243 subprogram.
5244 (Is_Inlinable_Expression_Function): New subprogram.
5245 * exp_ch6.ads, exp_ch6.adb (Expression_Of_Expression_Function): Moved
5246 to Sem_Util.
5247 (Is_Inlinable_Expression_Function): Moved to Sem_Util.
5248
5249 2017-01-19 Ed Schonberg <schonberg@adacore.com>
5250
5251 * sem_ch4.adb (Diagnose_Call): Improve error message when a
5252 selected component has a prefix that might be interpreted
5253 as a parameterless function call, but none of the candidate
5254 interpretations is parameterless, and there is a hidden homonym
5255 of the prefix that is a package.
5256 * sem_ch8.adb (Find_Selected_Component): If the prefix might be
5257 interpreted as a parameterless function call and its analysis
5258 fails, do not call Analyze_Selected_Component.
5259
5260 2017-01-19 Steve Baird <baird@adacore.com>
5261
5262 * sem_util.ads: Add new Use_Full_View Boolean parameter to
5263 Get_Index_Bounds.
5264 * sem_util.adb (Get_Index_Bounds): replace calls to Scalar_Range with
5265 calls to a newly-defined Scalar_Range_Of_Right_View function.
5266
5267 2017-01-19 Arnaud Charlet <charlet@adacore.com>
5268
5269 * gnat1drv.adb: minor fix of unbalanced parens in comment
5270 * lib-xref.ads (Traverse_Compilation_Unit): declaration moved
5271 to visible part of the package to allow re-use in GNATprove.
5272 * lib-xref-spark_specific.adb (Traverse_Stub): routine refactored
5273 from repeated code of Traverse_Compilation_Unit.
5274 (Traverse_Declaration_Or_Statement): fixed detection of
5275 generic subprograms and packages; also, iteration over case
5276 statement alternatives rewritten to avoid testing if the first
5277 alternative is present (since it must be present due to Ada
5278 syntax restrictions).
5279
5280 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
5281
5282 * exp_ch6.adb (Expand_N_Subprogram_Body): Mark the spec as
5283 returning by reference not just for subprogram body stubs,
5284 but for all subprogram cases.
5285 * sem_util.adb: Code reformatting.
5286 (Requires_Transient_Scope): Update the call to Results_Differ.
5287 (Results_Differ): Update the parameter profile and the associated
5288 comment on usage.
5289
5290 2017-01-19 Ed Schonberg <schonberg@adacore.com>
5291
5292 * sem_dim.adb (Analyze_Dimension): Analyze object declaration and
5293 identifier nodes that do not come from source, to handle properly
5294 dimensionality check within an inlined body which inclddes both
5295 original operands and rewritten operands. This removes spurious
5296 dimensionality errors in the presence of front-end inlining,
5297 as well as in SPARK mode.
5298
5299 2017-01-16 Jakub Jelinek <jakub@redhat.com>
5300
5301 PR driver/49726
5302 * gcc-interface/lang.opt (gant, gnatO, gnat): Add Driver flag.
5303
5304 2017-01-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5305
5306 * gcc-interface/Makefile.in (SPARC/Solaris): Fix typo.
5307
5308 2017-01-13 Arnaud Charlet <charlet@adacore.com>
5309
5310 * doc/gnat_ugn/getting_started_with_gnat.rst,
5311 doc/gnat_ugn/inline_assembler.rst,
5312 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
5313 doc/gnat_ugn/elaboration_order_handling_in_gnat.rst,
5314 doc/gnat_ugn/about_this_guide.rst,
5315 doc/gnat_ugn/platform_specific_information.rst,
5316 doc/gnat_ugn/example_of_binder_output.rst,
5317 doc/gnat_ugn/gnat_and_program_execution.rst,
5318 doc/gnat_ugn/gnat_utility_programs.rst,
5319 doc/gnat_ugn/the_gnat_compilation_model.rst,
5320 doc/gnat_rm/implementation_defined_attributes.rst,
5321 doc/gnat_rm/compatibility_and_porting_guide.rst,
5322 doc/gnat_rm/standard_library_routines.rst,
5323 doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
5324 doc/gnat_rm/implementation_defined_pragmas.rst,
5325 doc/gnat_rm/the_gnat_library.rst,
5326 doc/gnat_rm/obsolescent_features.rst,
5327 doc/gnat_rm/about_this_guide.rst,
5328 doc/gnat_rm/the_implementation_of_standard_i_o.rst,
5329 doc/gnat_rm/implementation_of_ada_2012_features.rst,
5330 doc/gnat_rm/interfacing_to_other_languages.rst,
5331 doc/gnat_rm/implementation_defined_aspects.rst,
5332 doc/gnat_rm.rst: Update documentation.
5333 * gnat_rm.texi, gnat_ugn.texi: Regenerated.
5334
5335 2017-01-13 Ed Schonberg <schonberg@adacore.com>
5336
5337 * einfo.ads: minor grammar fixes in comment of Normalized_Position_Max.
5338 * scil_ll.adb: Minor style fix in comment.
5339 * sem_ch8.adb (Analyze_Expanded_Name): Perform dimension analysis
5340 even if entity is already set, because the node may be renalyzed
5341 after inlining transformations.
5342
5343 2017-01-13 Javier Miranda <miranda@adacore.com>
5344
5345 * sem_res.adb (Resolve_Call): Do not establish a transient scope
5346 for a call to inlinable expression function (since the call will
5347 be replaced by its returned object).
5348 * exp_ch6.ads (Is_Inlinable_Expression_Function): New subprogram.
5349 * exp_ch6.adb (Expression_Of_Expression_Function): New subprogram.
5350 (Expand_Call): For inlinable expression function call replace the
5351 call by its returned object.
5352 (Is_Inlinable_Expression_Function): New subprogram.
5353
5354 2017-01-13 Gary Dismukes <dismukes@adacore.com>
5355
5356 * checks.adb: Minor typo fix and reformatting.
5357
5358 2017-01-13 Javier Miranda <miranda@adacore.com>
5359
5360 * contracts.adb (Contract_Only_Subprograms): Remove formal.
5361 (Copy_Original_Specification): Removed.
5362 (Skip_Contract_Only_Subprogram): Move here checks previously
5363 located in the caller of this routine (to leave the code more clean).
5364 (Build_Contract_Only_Subprogram): Code cleanup.
5365 * scil_ll.ads, scil_ll.adb (Get_Contract_Only_Body_Name): Removed.
5366 (Get_Contract_Only_Missing_Body_Name): Removed.
5367
5368 2017-01-13 Javier Miranda <miranda@adacore.com>
5369
5370 * sem_ch6.adb (Cloned_Expression): New subprogram.
5371 (Freeze_Expr_Types): Complete previous patch since the expression
5372 of an expression-function may have iterators and loops with
5373 defining identifiers which, as part of the preanalysis of the
5374 expression, may be left decorated with itypes that will not be
5375 available in the tree passed to the backend.
5376
5377 2017-01-13 Ed Schonberg <schonberg@adacore.com>
5378
5379 * checks.adb (Apply_Type_Conversion_Checks): Optimize a type
5380 conversion to Integer of an expression that is an attribute
5381 reference 'Pos on an enumeration type.
5382
5383 2017-01-13 Bob Duff <duff@adacore.com>
5384
5385 * atree.ads: Minor comment fix.
5386
5387 2017-01-13 Justin Squirek <squirek@adacore.com>
5388
5389 * sem_ch6.adb (Check_Aggregate_Accessibility): Ignore function
5390 calls in accessibility check on return statement.
5391
5392 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
5393
5394 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
5395 Ensure that the input body is a subprogram body before trying to
5396 determine whether it denoted an expression function. Note that
5397 subprogram body stubs cannot denote expression functions.
5398
5399 2017-01-13 Gary Dismukes <dismukes@adacore.com>
5400
5401 * bindgen.adb, sem_ch6.adb, binde.adb, exp_ch3.adb: Minor reformatting
5402 and typo fixes.
5403
5404 2017-01-13 Javier Miranda <miranda@adacore.com>
5405
5406 * einfo.ads (Component_Bit_Offset): Fix documentation.
5407 * sem_ch13.adb (Check_Record_Representation_Clause): Skip check
5408 on record holes for components with unknown compile-time offsets.
5409
5410 2017-01-13 Bob Duff <duff@adacore.com>
5411
5412 * ali.ads, ali.adb (Static_Elaboration_Model_Used): Remove unused flag.
5413 * g-locfil.ads: Minor comment fix.
5414
5415 2017-01-13 Bob Duff <duff@adacore.com>
5416
5417 * binde.adb (Elab_New): New elaboration order algorithm
5418 that is expected to cause fewer ABE issues. This is a work in
5419 progress. The new algorithm is currently disabled, and can be
5420 enable by the -dp switch, or by modifying the Do_Old and Do_New
5421 etc. flags and rebuilding. Experimental code is included to
5422 compare the results of the old and new algorithms.
5423 * binde.ads: Use GNAT.Dynamic_Tables instead of Table, so we
5424 can have multiple of these tables, so the old and new algorithms
5425 can coexist.
5426 * bindgen.ads (Gen_Output_File): Pass Elab_Order as an 'in'
5427 parameter of type array. This avoids the global variable, and
5428 allows bounds checking (which is normally defeated by the tables
5429 packages). It also ensures that the Elab_Order is read-only
5430 to Bindgen.
5431 * bindgen.adb: Pass Elab_Order as an 'in' parameter to all
5432 subprograms that need it, as above.
5433 * debug.adb: Document new -dp switch. Modify doc of old -do
5434 switch.
5435 * gnatbind.adb (Gnatbind): Make use of new interfaces to Binde
5436 and Bindgen. Move writing of closure (-R and -Ra switches)
5437 to Binde; that's more convenient.
5438
5439 2017-01-13 Ed Schonberg <schonberg@adacore.com>
5440
5441 * sem_ch6.adb (Analyze_Expression_Function): If the expression
5442 function is a completion, all entities referenced in the
5443 expression are frozen. As a consequence, a reference to an
5444 uncompleted private type from an enclosing scope is illegal.
5445
5446 2017-01-13 Javier Miranda <miranda@adacore.com>
5447
5448 * sem_ch6.adb (Freeze_Expr_Types): New subprogram.
5449 (Analyze_Subprogram_Body_Helper): At the occurrence of an
5450 expression function declaration that is a completion, its
5451 expression causes freezing (AI12-0103).
5452
5453 2017-01-13 Vadim Godunko <godunko@adacore.com>
5454
5455 * a-coinho-shared.adb: Fix memory leaks in Constant_Reference and
5456 Reference functions of Ada.Containers.Indefinite_Holders.
5457
5458 2017-01-13 Bob Duff <duff@adacore.com>
5459
5460 * s-os_lib.ads: Minor comment fixes.
5461
5462 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
5463
5464 * exp_ch3.adb (Default_Initialize_Object): Do not default
5465 initialize an object when it is of a task type and restriction
5466 No_Tasking is in effect because the initialization is obsolete.
5467 * exp_ch9.adb (Build_Master_Entity): Do not generate a master when
5468 restriction No_Tasking is in effect.
5469 (Build_Master_Renaming): Do not rename a master when restriction
5470 No_Tasking is in effect.
5471
5472 2017-01-13 Ed Schonberg <schonberg@adacore.com>
5473
5474 * sem_aggr.adb (Resolve_Array_Aggregate): The code that verifies
5475 the legality of An others clause applies as well to a choice in
5476 an Iterated_component_ association.
5477 (Resolve_Iterated_Component_Association): An others choice
5478 is legal.
5479 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): An
5480 Iterated_Component_Association is not static.
5481
5482 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
5483
5484 * exp_ch3.adb (Freeze_Type): Mark the Ghost mode as set in case
5485 control is passed to the expresion handler before the new mode
5486 is set.
5487 * sem_ch12.adb (Analyze_Package_Instantiation,
5488 Analyze_Subprogram_Instantiation): Mark the Ghost mode as set
5489 in case control is passed to the expresion handler before the
5490 new mode is set.
5491
5492 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
5493
5494 * sem_aggr.adb, sem_ch3.adb, inline.adb, sem_util.adb, exp_ch4.adb,
5495 exp_aggr.adb: Minor reformatting.
5496
5497 2017-01-13 Gary Dismukes <dismukes@adacore.com>
5498
5499 * inline.adb: Minor reformatting and typo fix.
5500
5501 2017-01-13 Ed Schonberg <schonberg@adacore.com>
5502
5503 * sem_util.ads, sem_util.adb (Choice_List): Move function here
5504 from sem_aggr.adb, for use elsewhere.
5505 * sem_ch3.adb (Analyze_Object_Declaration): Use Choice_List.
5506 * sem_aggr.adb (Resolve_Array_Aggregate): Remove
5507 Iterated_Component_Present.
5508 * exp_aggr.adb: Use Choice_List throughout, to handle
5509 Iterated_Component_Associations.
5510 (Gen_Loop): Generate proper loop for an
5511 Iterated_Component_Association: loop variable has the identifier
5512 of the original association. Generate a loop even for a single
5513 component choice, in order to make loop parameter visible in
5514 expression.
5515 (Flatten): An Iterated_Component_Association is not static.
5516
5517 2017-01-13 Yannick Moy <moy@adacore.com>
5518
5519 * exp_ch4.adb (Expand_N_Op_Expon): Ensure that the value of
5520 float exponentiation for statically known small negative values
5521 is the reciprocal of the exponentiation for the opposite value
5522 of the exponent.
5523 * s-exnllf.adb (Exn_Float, Exn_Long_Float, Exn_Long_Long_Float):
5524 Ensure that the value of float exponentiation for negative values
5525 is the reciprocal of the exponentiation for the opposite value
5526 of the exponent.
5527 * inline.adb (Expand_Inlined_Call): Fix the count
5528 for the number of generated gotos.
5529
5530 2017-01-13 Yannick Moy <moy@adacore.com>
5531
5532 * inline.adb: Code cleanup.
5533 * sem_util.adb (Is_OK_Volatile_Context): Add
5534 expression in delay statement as OK for volatile context.
5535
5536 2017-01-13 Ed Schonberg <schonberg@adacore.com>
5537
5538 * sem_aggr.adb (Resolve_Array_Aggregate): In normal compilation
5539 mode a choice that is a subtype with a static predicate is
5540 replaced by the values it covers. This transformation must not
5541 be performed in ASIS mode, to preserve the source for analysis.
5542
5543 2017-01-13 Justin Squirek <squirek@adacore.com>
5544
5545 * nlists.ads: Correct minor typo.
5546
5547 2017-01-13 Gary Dismukes <dismukes@adacore.com>
5548
5549 * sem_ch13.adb: Minor reformatting and typo fix.
5550
5551 2017-01-13 Ed Schonberg <schonberg@adacore.com>
5552
5553 * par-ch4.adb (P_Aggregate_Or_Parent_Expr): An
5554 Iterated_Component_Association is a named association in an
5555 array aggregate.
5556 * sem_aggr.adb (Resolve_Iterated_Component_Association): New
5557 procedure, subsidiary of Resolve_Array_Aggregate, to analyze
5558 and resolve the discrete choices and the expression of the
5559 new construct.
5560 * sinfo.adb, sinfo.ads: In analogy with N_Component_Association,
5561 Loop_Actions and Box_Present are attributes of
5562 N_Iterated_Component_Association nodes. Box_Present is always
5563 False in this case.
5564 * sprint.adb (Sprint_Node): An Iterated_Component_Association
5565 has a Discrete_Choices list, as specified in the RM. A
5566 Component_Association for aggregate uses instead a Choices list.
5567 We have to live with this small inconsistency because the new
5568 construct also has a defining identifier, and there is no way
5569 to merge the two node structures.
5570
5571 2017-01-13 Yannick Moy <moy@adacore.com>
5572
5573 * inline.adb (Remove_Aspects_And_Pragmas): Add Unused to the
5574 list of pragmas to remove. Remove pragmas from the list of
5575 statements in the body to inline.
5576 * namet.adb, namet.ads (Nam_In): New version with 12 parameters.
5577
5578 2017-01-13 Ed Schonberg <schonberg@adacore.com>
5579
5580 * sem_ch3.adb (Resolve_Aspects): New procedure, subsidiary of
5581 Analyze_Declarations, to analyze and resolve the expressions of
5582 aspect specifications in the current declarative list, so that
5583 the expressions have proper entity and type info. This is needed
5584 for ASIS when there is no subsequent expansion to generate this
5585 semantic information.
5586 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Use Etype of
5587 original expression, to suppress cascaded errors when expression
5588 has been constant-folded.
5589 (Resolve_Aspect_Expressions, Resolve_Name): Preserve entities in
5590 ASIS mode, because there is no subsequent expansion to decorate
5591 the tree.
5592
5593 2017-01-13 Yannick Moy <moy@adacore.com>
5594
5595 * inline.adb, inline.ads (Call_Can_Be_Inlined_In_GNATprove_Mode):
5596 New function to detect when a call may be inlined or not in
5597 GNATprove mode.
5598 (Expand_Inlined_Call): Ensure that a temporary
5599 is always created in the cases where a type conversion may be
5600 needed on an input parameter in GNATprove mode, so that GNATprove
5601 sees the check to perform.
5602 * sem_res.adb (Resolve_Call): In GNATprove mode, skip inlining
5603 when not applicable due to actual requiring type conversion
5604 with possible check but no temporary value can be copied for
5605 GNATprove to see the check.
5606
5607 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
5608
5609 * sem_aggr.adb, par_sco.adb, s-osprim-mingw.adb, exp_ch5.adb,
5610 exp_prag.adb, sem_ch3.adb, xr_tabls.adb, lib-xref-spark_specific.adb,
5611 layout.adb, sem_dist.adb, exp_spark.adb, exp_ch7.adb, gnatcmd.adb,
5612 exp_util.adb, prj-proc.adb, sem_aux.adb, comperr.adb, g-memdum.adb,
5613 exp_attr.adb, s-intman-solaris.adb, exp_ch9.adb, make.adb, live.adb,
5614 g-sercom-linux.adb, sem_dim.adb, mlib-prj.adb, s-intman-posix.adb,
5615 sem_ch9.adb, sem_ch10.adb, prep.adb, einfo.adb, scng.adb, checks.adb,
5616 prj-strt.adb, sem_prag.adb, eval_fat.adb, sem_ch12.adb, sem.adb,
5617 a-numaux-x86.adb, a-stwifi.adb, i-cobol.adb, prj.adb,
5618 get_spark_xrefs.adb, s-tasini.adb, rtsfind.adb, freeze.adb,
5619 g-arrspl.adb, par-ch4.adb, sem_util.adb, sem_res.adb, expander.adb,
5620 sem_attr.adb, exp_dbug.adb, prj-pp.adb, a-stzfix.adb, s-interr.adb,
5621 s-wchcnv.adb, switch-m.adb, gnat1drv.adb, sinput-l.adb, stylesw.adb,
5622 contracts.adb, s-intman-android.adb, g-expect.adb, exp_ch4.adb,
5623 g-comlin.adb, errout.adb, sinput.adb, s-exctra.adb, repinfo.adb,
5624 g-spipat.adb, g-debpoo.adb, exp_ch6.adb, sem_ch4.adb, exp_ch13.adb,
5625 a-wtedit.adb, validsw.adb, pprint.adb, widechar.adb, makeutl.adb,
5626 ali.adb, set_targ.adb, sem_mech.adb, sem_ch6.adb, gnatdll.adb,
5627 get_scos.adb, g-pehage.adb, s-tratas-default.adb, gnatbind.adb,
5628 prj-dect.adb, g-socthi-mingw.adb, par-prag.adb, prj-nmsc.adb,
5629 exp_disp.adb, par-ch12.adb, binde.adb, sem_ch8.adb,
5630 s-tfsetr-default.adb, s-regexp.adb, gprep.adb, s-tpobop.adb,
5631 a-teioed.adb, sem_warn.adb, sem_eval.adb, g-awk.adb, s-io.adb,
5632 a-ztedit.adb, xoscons.adb, exp_intr.adb, sem_cat.adb, sprint.adb,
5633 g-socket.adb, exp_dist.adb, sem_ch13.adb, s-tfsetr-vxworks.adb,
5634 par-ch3.adb, treepr.adb, g-forstr.adb, g-catiio.adb, par-ch5.adb,
5635 uname.adb, osint.adb, exp_ch3.adb, prj-env.adb, a-strfix.adb,
5636 a-stzsup.adb, prj-tree.adb, s-fileio.adb: Update all eligible case
5637 statements to reflect the new style for case alternatives. Various
5638 code clean up and reformatting.
5639
5640 2017-01-13 Gary Dismukes <dismukes@adacore.com>
5641
5642 * exp_util.adb: Minor reformatting.
5643
5644 2017-01-13 Yannick Moy <moy@adacore.com>
5645
5646 * exp_spark.adb: Code cleanup.
5647 * sem_ch9.adb (Analyze_Delay_Until): Resolve
5648 expression so that calls are identified as such inside delay
5649 until.
5650
5651 2017-01-13 Ed Schonberg <schonberg@adacore.com>
5652
5653 * exp_util.adb (Insert_Actions): Handle Iterated_Component_Association.
5654 * par-ch3.adb (P_Discrete_Choice_List): An
5655 Iterated_Component_Association is an array aggregate component.
5656 * par-ch4.adb (P_Iterated_Component_Association): New procedure.
5657 (Is_Quantified_Expression): New function that performs a lookahead
5658 to distinguish quantified expressions from iterated component
5659 associations.
5660 (P_Aggregate_Or_Paren_Expr): Recognize iterated component
5661 associations.
5662 (P_Unparen_Cond_Case_Quant_Expression, P_Primary): Ditto.
5663 * sem.adb (Analyze): Handle Iterated_Component_Association.
5664 * sem_aggr.adb (Resolve_Array_Aggregate): Dummy handling of iterated
5665 component associations.
5666 * sinfo.ads, sinfo.adb: Entries for for
5667 N_Iterated_Component_Association and its fields.
5668 * sprint.adb (Sprint_Node_Actual): Handle
5669 N_Iterated_Component_Association.
5670
5671 2017-01-13 Justin Squirek <squirek@adacore.com>
5672
5673 * sem_ch12.adb (Analyze_Package_Instantiation): Move disabiling
5674 of the style check until after preanalysis of acutals.
5675
5676 2017-01-13 Yannick Moy <moy@adacore.com>
5677
5678 * sem_ch13.adb: Minor reformatting.
5679 * par-ch11.adb: minor style fix in whitespace
5680 * gnatbind.adb (Gnatbind): Scope of Std_Lib_File
5681 reduced to Add_Artificial_ALI_File; style fix in declaration of
5682 Text; grammar fix in comment.
5683 * osint-c.adb (Read_Library_Info): strip trailing NUL from result.
5684 * freeze.adb: Cleanup to pass pragma instead of
5685 expression to call.
5686 * exp_spark.adb (Expand_SPARK_Attribute_Reference): New procedure to
5687 replace System'To_Address by equivalent call.
5688
5689 2017-01-13 Arnaud Charlet <charlet@adacore.com>
5690
5691 * bindusg.adb: Improve usage output for -f switch.
5692
5693 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
5694
5695 * frontend.adb, freeze.adb, sem_res.adb, sem_attr.adb, sem_ch8.adb:
5696 Minor reformatting.
5697
5698 2017-01-13 Ed Schonberg <schonberg@adacore.com>
5699
5700 * sem_ch13.adb (Is_Predicate_Static): Following the intent of the RM,
5701 treat comparisons on strings as legal in a Static_Predicate.
5702 (Is_Predicate_Static, Is_Type_Ref): Predicate also returns true on
5703 a function call that is the expansion of a string comparison.The
5704 function call is built when compiling the corresponding predicate
5705 function, but the expression has been found legal as a static
5706 predicate during earlier analysis.
5707 * sem_eval.adb (Real_Or_String_Static_Predicate_Matches): Handle
5708 properly a function call that is the expansion of a string
5709 comparison operation, in order to recover the Static_Predicate
5710 expression and apply it to a static argument when needed.
5711
5712 2017-01-13 Tristan Gingold <gingold@adacore.com>
5713
5714 * s-mmap.adb, s-mmap.ads (Open_Read_No_Exception): New function.
5715 (Open_Read): Re-implement using Open_Read_No_Exception.
5716 (Open_Write): Raise exception in case of error.
5717 * s-mmosin-mingw.adb (Open_Common): Do not raise exception.
5718 * s-mmosin-unix.adb (Open_Read, Open_Write): Do not
5719 reaise exception.
5720 * s-mmosin-mingw.ads, s-mmosin-unix.ads (Open_Read): Adjust comment.
5721
5722 2017-01-13 Yannick Moy <moy@adacore.com>
5723
5724 * checks.adb: Code cleanup.
5725
5726 2017-01-13 Yannick Moy <moy@adacore.com>
5727
5728 * freeze.adb (Check_Inherited_Conditions): Use analyzed pragma
5729 expression instead of unanalyzed aspect expression for checking
5730 the validity of inheriting an operation. Also copy the expression
5731 being passing it to Build_Class_Wide_Expression, as this call
5732 modifies its argument.
5733 * sem_util.ads Fix comment to reference correct function name
5734 New_Copy_Tree.
5735
5736 2017-01-13 Javier Miranda <miranda@adacore.com>
5737
5738 * sem_res.adb (Resolve_Generalized_Indexing): Compiling in ASIS mode,
5739 when we propagate information about the indexes back to the original
5740 indexing mode and the prefix of the index is a function call, do not
5741 remove any parameter from such call.
5742
5743 2017-01-13 Gary Dismukes <dismukes@adacore.com>
5744
5745 * exp_ch6.ads (Needs_BIP_Finalization_Master): Update comment.
5746 * exp_ch6.adb (Needs_BIP_Finalization_Master): Return True for
5747 a build-in-place function whose result type is tagged.
5748
5749 2017-01-13 Yannick Moy <moy@adacore.com>
5750
5751 * sem_ch8.adb (Analyze_Subprogram_Renaming.Build_Class_Wide_Wrapper):
5752 Do not generate a wrapper when the only candidate is a class-wide
5753 subprogram.
5754 (Analyze_Subprogram_Renaming): Do not freeze the renaming or renamed
5755 inside a generic context.
5756
5757 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
5758
5759 * exp_util.adb (Add_Inherited_Tagged_DIC):
5760 Pass the object parameters of both the parent and the derived
5761 type DIC procedure to the reference replacement circuitry.
5762 (Find_DIC_Type): Modify the circuitry to present the partial
5763 view of a private type in case the private type defines its own
5764 DIC pragma.
5765 (Replace_Object_And_Primitive_References): Add two
5766 optional formal parameters. Update the comment on usage. Update
5767 the replacement of references to object parameters.
5768
5769 2017-01-13 Gary Dismukes <dismukes@adacore.com>
5770
5771 * einfo.adb, sem_ch6.adb, atree.adb: Minor reformatting and typo fix.
5772
5773 2017-01-13 Ed Schonberg <schonberg@adacore.com>
5774
5775 * sem_res.adb (Resolve_Actuals): Apply Scalar_Range_Check to
5776 an out parameter that is a type conversion, independently of th
5777 range check that may apply to the expression of the conversion,
5778 for use in GNATProve.
5779
5780 2017-01-13 Yannick Moy <moy@adacore.com>
5781
5782 * gnat1drv.adb (Gnat1drv): Move the implicit with for System in
5783 GNATprove_Mode here to Frontend.
5784 * frontend.adb (Frontend): Move the implicit with for System
5785 in GNATprove_Mode here as it ismore correct this way; the old
5786 place only worked by chance, since there were no overloaded names.
5787 * rtsfind.ads (RE_Id, RE_Unit_Table): Add RE_Tasking_State.
5788 * sem_attr.adb (Analyze_Attribute): In GNATprove_Mode, for the
5789 four attributes identified in SRM 9(18), add an implicit with
5790 to Ada.Task_Identification.
5791 * sem_ch8.adb (Analyze_Subprogram_Renaming.Build_Class_Wide_Wrapper):
5792 Deal specially with the wrapper introduced for AI05-0071 in GNATprove
5793 mode.
5794 * checks.adb (Apply_Discriminant_Check,
5795 Apply_Selected_Length_Checks, Apply_Selected_Range_Checks):
5796 In GNATprove mode, we do not apply the checks, but we still
5797 analyze the expression to possibly issue errors on SPARK
5798 code when a run-time error can be detected at compile time.
5799 (Selected_Length_Checks, Selected_Range_Checks): Perform analysis
5800 in GNATprove mode.
5801
5802 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
5803
5804 * expander.adb (Expand): Add a warning about using return
5805 statements in Ghost management code.
5806 * exp_ch3.adb (Freeze_Type): Add a warning about using return
5807 statements in Ghost management code.
5808 * exp_ch7.adb (Build_Invariant_Procedure_Body,
5809 Build_Invariant_Procedure_Declaration): Add a warning about
5810 using return statements in Ghost management code.
5811 * exp_disp.adb (Make_DT): Add a warning about using return
5812 statements in Ghost management code.
5813 * exp_util.adb (Build_DIC_Procedure_Body,
5814 Build_DIC_Procedure_Declaration, Make_Predicated_Call): Add a
5815 warning about using return statements in Ghost management code.
5816 * freeze.adb (Freeze_Entity): Add a warning about using return
5817 statements in Ghost management code.
5818 * sem.adb (Analyze, Do_Analyze): Add a warning about using return
5819 statements in Ghost management code.
5820 * sem_ch3.adb (Analyze_Object_Declaration, Process_Full_View): Add
5821 a warning about using return statements in Ghost management code.
5822 * sem_ch5.adb (Analyze_Assignment): Add a warning about using
5823 return statements in Ghost management code.
5824 * sem_ch6.adb (Analyze_Procedure_Call,
5825 Analyze_Subprogram_Body_Helper): Add a warning about using return
5826 statements in Ghost management code.
5827 * sem_ch7.adb (Analyze_Package_Body_Helper): Add a warning about
5828 using return statements in Ghost management code.
5829 * sem_ch12.adb (Analyze_Package_Instantiation,
5830 Analyze_Subprogram_Instantiation, Instantiate_Package_Body,
5831 Instantiate_Subprogram_Body): Add a warning about using return
5832 statements in Ghost management code.
5833 * sem_ch13.adb (Build_Predicate_Functions,
5834 Build_Predicate_Function_Declarations): Add a warning about
5835 using return statements in Ghost management code.
5836 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part,
5837 Analyze_Initial_Condition_In_Decl_Part, Analyze_Pragma,
5838 Analyze_Pre_Post_Condition_In_Decl_Part): Add a warning about
5839 using return statements in Ghost management code.
5840
5841 2017-01-13 Tristan Gingold <gingold@adacore.com>
5842
5843 * s-mmosin-mingw.adb: Fix pragma import.
5844
5845 2017-01-13 Arnaud Charlet <charlet@adacore.com>
5846
5847 * gnat1drv.adb (Adjust_Global_Switches): Ignore -gnateE in
5848 codepeer mode.
5849
5850 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
5851
5852 * atree.adb (Allocate_Initialize_Node): A newly created node is
5853 no longer marked as Ghost at this level.
5854 (Mark_New_Ghost_Node): New routine.
5855 (New_Copy): Mark the copy as Ghost.
5856 (New_Entity): Mark the entity as Ghost.
5857 (New_Node): Mark the node as Ghost.
5858 * einfo.adb (Is_Checked_Ghost_Entity): This attribute can now
5859 apply to unanalyzed entities.
5860 (Is_Ignored_Ghost_Entity): This attribute can now apply to unanalyzed
5861 entities.
5862 (Set_Is_Checked_Ghost_Entity): This attribute now
5863 applies to all entities as well as unanalyzed entities.
5864 (Set_Is_Ignored_Ghost_Entity): This attribute now applies to
5865 all entities as well as unanalyzed entities.
5866 * expander.adb Add with and use clauses for Ghost.
5867 (Expand): Install and revert the Ghost region associated with the node
5868 being expanded.
5869 * exp_ch3.adb (Expand_Freeze_Array_Type): Remove all Ghost-related code.
5870 (Expand_Freeze_Class_Wide_Type): Remoe all Ghost-related code.
5871 (Expand_Freeze_Enumeration_Type): Remove all Ghost-related code.
5872 (Expand_Freeze_Record_Type): Remove all Ghost-related code.
5873 (Freeze_Type): Install and revert the Ghost region associated
5874 with the type being frozen.
5875 * exp_ch5.adb Remove with and use clauses for Ghost.
5876 (Expand_N_Assignment_Statement): Remove all Ghost-related code.
5877 * exp_ch6.adb Remove with and use clauses for Ghost.
5878 (Expand_N_Procedure_Call_Statement): Remove all Ghost-relatd code.
5879 (Expand_N_Subprogram_Body): Remove all Ghost-related code.
5880 * exp_ch7.adb (Build_Invariant_Procedure_Body): Install and revert the
5881 Ghost region of the working type.
5882 (Build_Invariant_Procedure_Declaration): Install and revert
5883 the Ghost region of the working type.
5884 (Expand_N_Package_Body): Remove all Ghost-related code.
5885 * exp_ch8.adb Remove with and use clauses for Ghost.
5886 (Expand_N_Exception_Renaming_Declaration): Remove all Ghost-related
5887 code.
5888 (Expand_N_Object_Renaming_Declaration): Remove all Ghost-related code.
5889 (Expand_N_Package_Renaming_Declaration): Remove all Ghost-related code.
5890 (Expand_N_Subprogram_Renaming_Declaration): Remove all Ghost-related
5891 code.
5892 * exp_ch13.adb Remove with and use clauses for Ghost.
5893 (Expand_N_Freeze_Entity): Remove all Ghost-related code.
5894 * exp_disp.adb (Make_DT): Install and revert the Ghost region of
5895 the tagged type. Move the generation of various entities within
5896 the Ghost region of the type.
5897 * exp_prag.adb Remove with and use clauses for Ghost.
5898 (Expand_Pragma_Check): Remove all Ghost-related code.
5899 (Expand_Pragma_Contract_Cases): Remove all Ghost-related code.
5900 (Expand_Pragma_Initial_Condition): Remove all Ghost-related code.
5901 (Expand_Pragma_Loop_Variant): Remove all Ghost-related code.
5902 * exp_util.adb (Build_DIC_Procedure_Body): Install
5903 and revert the Ghost region of the working types.
5904 (Build_DIC_Procedure_Declaration): Install and revert the
5905 Ghost region of the working type.
5906 (Make_Invariant_Call): Install and revert the Ghost region of the
5907 associated type.
5908 (Make_Predicate_Call): Reimplemented. Install and revert the
5909 Ghost region of the associated type.
5910 * freeze.adb (Freeze_Entity): Install and revert the Ghost region
5911 of the entity being frozen.
5912 (New_Freeze_Node): Removed.
5913 * ghost.adb Remove with and use clauses for Opt.
5914 (Check_Ghost_Completion): Update the parameter profile
5915 and all references to formal parameters.
5916 (Ghost_Entity): Update the comment on usage.
5917 (Install_Ghost_Mode): New routines.
5918 (Is_Ghost_Assignment): New routine.
5919 (Is_Ghost_Declaration): New routine.
5920 (Is_Ghost_Pragma): New routine.
5921 (Is_Ghost_Procedure_Call): New routine.
5922 (Is_Ghost_Renaming): Removed.
5923 (Is_OK_Declaration): Reimplemented.
5924 (Is_OK_Pragma): Reimplemented.
5925 (Is_OK_Statement): Reimplemented.
5926 (Is_Subject_To_Ghost): Update the comment on usage.
5927 (Mark_And_Set_Ghost_Assignment): New routine.
5928 (Mark_And_Set_Ghost_Body): New routine.
5929 (Mark_And_Set_Ghost_Completion): New routine.
5930 (Mark_And_Set_Ghost_Declaration): New routine.
5931 (Mark_And_Set_Ghost_Instantiation): New routine.
5932 (Mark_And_Set_Ghost_Procedure_Call): New routine.
5933 (Mark_Full_View_As_Ghost): Removed.
5934 (Mark_Ghost_Declaration_Or_Body): New routine.
5935 (Mark_Ghost_Pragma): New routine.
5936 (Mark_Ghost_Renaming): New routine.
5937 (Mark_Pragma_As_Ghost): Removed.
5938 (Mark_Renaming_As_Ghost): Removed.
5939 (Propagate_Ignored_Ghost_Code): Update the comment on usage.
5940 (Prune_Node): Freeze nodes no longer need special pruning, they
5941 are processed by the general ignored Ghost code mechanism.
5942 (Restore_Ghost_Mode): New routine.
5943 (Set_Ghost_Mode): Reimplemented.
5944 (Set_Ghost_Mode_From_Entity): Removed.
5945 * ghost.ads Add with and use clauses for Ghost.
5946 (Check_Ghost_Completion): Update the parameter profile
5947 along with the comment on usage.
5948 (Install_Ghost_Mode): New routine.
5949 (Is_Ghost_Assignment): New routine.
5950 (Is_Ghost_Declaration): New routine.
5951 (Is_Ghost_Pragma): New routine.
5952 (Is_Ghost_Procedure_Call): New routine.
5953 (Mark_And_Set_Ghost_Assignment): New routine.
5954 (Mark_And_Set_Ghost_Body): New routine.
5955 (Mark_And_Set_Ghost_Completion): New routine.
5956 (Mark_And_Set_Ghost_Declaration): New routine.
5957 (Mark_And_Set_Ghost_Instantiation): New routine.
5958 (Mark_And_Set_Ghost_Procedure_Call): New routine.
5959 (Mark_Full_View_As_Ghost): Removed.
5960 (Mark_Ghost_Pragma): New routine.
5961 (Mark_Ghost_Renaming): New routine.
5962 (Mark_Pragma_As_Ghost): Removed.
5963 (Mark_Renaming_As_Ghost): Removed.
5964 (Restore_Ghost_Mode): New routine.
5965 (Set_Ghost_Mode): Redefined.
5966 (Set_Ghost_Mode_From_Entity): Removed.
5967 * sem.adb (Analyze): Install and revert the Ghost region of the
5968 node being analyzed.
5969 (Do_Analyze): Change the way a clean Ghost
5970 region is installed and reverted.
5971 * sem_ch3.adb (Analyze_Full_Type_Declaration): Remove
5972 all Ghost-related code.
5973 (Analyze_Incomplete_Type_Decl): Remove all Ghost-related code.
5974 (Analyze_Number_Declaration): Remove all Ghost-related code.
5975 (Analyze_Object_Declaration): Install and revert the Ghost region of
5976 a deferred object declaration's completion.
5977 (Array_Type_Declaration): Remove all Ghost-related code.
5978 (Build_Derived_Type): Update the comment on
5979 the propagation of Ghost attributes from a parent to a derived type.
5980 (Derive_Subprogram): Remove all Ghost-related code.
5981 (Make_Class_Wide_Type): Remove all Ghost-related code.
5982 (Make_Implicit_Base): Remove all Ghost-related code.
5983 (Process_Full_View): Install and revert the Ghost region of
5984 the partial view. There is no longer need to check the Ghost
5985 completion here.
5986 * sem_ch5.adb (Analyze_Assignment): Install and revert the Ghost
5987 region of the left hand side.
5988 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Remove
5989 all Ghost-related code.
5990 (Analyze_Expression_Function): Remove all Ghost-related code.
5991 (Analyze_Generic_Subprogram_Body): Remove all Ghost-related code.
5992 (Analyze_Procedure_Call): Install and revert the Ghost region of
5993 the procedure being called.
5994 (Analyze_Subprogram_Body_Helper): Install and revert the Ghost
5995 region of the spec or body.
5996 (Analyze_Subprogram_Declaration): Remove all Ghost-related code.
5997 (Build_Subprogram_Declaration): Remove all Ghost-related code.
5998 (Find_Corresponding_Spec): Remove all Ghost-related code.
5999 (Process_Formals): Remove all Ghost-related code.
6000 * sem_ch7.adb (Analyze_Package_Body_Helper): Install and revert
6001 the Ghost region of the spec.
6002 (Analyze_Package_Declaration): Remove all Ghost-related code.
6003 * sem_ch8.adb (Analyze_Exception_Renaming): Mark a renaming as
6004 Ghost when it aliases a Ghost entity.
6005 (Analyze_Generic_Renaming): Mark a renaming as Ghost when it aliases
6006 a Ghost entity.
6007 (Analyze_Object_Renaming): Mark a renaming as Ghost when
6008 it aliases a Ghost entity.
6009 (Analyze_Package_Renaming): Mark a renaming as Ghost when it aliases
6010 a Ghost entity.
6011 (Analyze_Subprogram_Renaming): Mark a renaming as Ghost when it
6012 aliases a Ghost entity.
6013 * sem_ch11.adb Remove with and use clauses for Ghost.
6014 (Analyze_Exception_Declaration): Remove all Ghost-related code.
6015 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Remove all
6016 Ghost-related code.
6017 (Analyze_Generic_Subprogram_Declaration): Remove all Ghost-related
6018 code.
6019 (Analyze_Package_Instantiation): Install and revert the Ghost region
6020 of the package instantiation.
6021 (Analyze_Subprogram_Instantiation): Install
6022 and revert the Ghost region of the subprogram instantiation.
6023 (Instantiate_Package_Body): Code clean up. Install and revert the
6024 Ghost region of the package body.
6025 (Instantiate_Subprogram_Body): Code clean up. Install and revert the
6026 Ghost region of the subprogram body.
6027 * sem_ch13.adb (Build_Predicate_Functions): Install
6028 and revert the Ghost region of the related type.
6029 (Build_Predicate_Function_Declaration): Code clean up. Install
6030 and rever the Ghost region of the related type.
6031 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
6032 Install and revert the Ghost region of the pragma.
6033 (Analyze_Initial_Condition_In_Decl_Part): Install and revert the
6034 Ghost region of the pragma.
6035 (Analyze_Pragma): Install and revert the Ghost region of various
6036 pragmas. Mark a pragma as Ghost when it is related to a Ghost entity
6037 or encloses a Ghost entity.
6038 (Analyze_Pre_Post_Condition): Install and revert the Ghost
6039 region of the pragma.
6040 (Analyze_Pre_Post_Condition_In_Decl_Part): Install and revert the
6041 Ghost region of the pragma.
6042 * sem_res.adb (Resolve): Remove all Ghost-related code.
6043 * sem_util.adb (Is_Declaration): Reimplemented.
6044 (Is_Declaration_Other_Than_Renaming): New routine.
6045 * sem_util.ads (Is_Declaration_Other_Than_Renaming): New routine.
6046 * sinfo.adb (Is_Checked_Ghost_Pragma): New routine.
6047 (Is_Ghost_Pragma): Removed.
6048 (Is_Ignored_Ghost_Pragma): New routine.
6049 (Set_Is_Checked_Ghost_Pragma): New routine.
6050 (Set_Is_Ghost_Pragma): Removed.
6051 (Set_Is_Ignored_Ghost_Pragma): New routine.
6052 * sinfo.ads: Update the documentation on Ghost mode and
6053 Ghost regions. New attributes Is_Checked_Ghost_Pragma
6054 and Is_Ignored_Ghost_Pragma along with usages in nodes.
6055 Remove attribute Is_Ghost_Pragma along with usages in nodes.
6056 (Is_Checked_Ghost_Pragma): New routine along with pragma Inline.
6057 (Is_Ghost_Pragma): Removed along with pragma Inline.
6058 (Is_Ignored_Ghost_Pragma): New routine along with pragma Inline.
6059 (Set_Is_Checked_Ghost_Pragma): New routine along with pragma Inline.
6060 (Set_Is_Ghost_Pragma): Removed along with pragma Inline.
6061 (Set_Is_Ignored_Ghost_Pragma): New routine along with pragma Inline.
6062
6063 2017-01-12 Tristan Gingold <gingold@adacore.com>
6064
6065 * s-mmap.ads, s-mmap.adb, s-mmosin-unix.ads, s-mmosin-unix.adb,
6066 s-mmauni-long.ads, s-mmosin-mingw.ads, s-mmosin-mingw.adb: New files.
6067
6068 2017-01-12 Yannick Moy <moy@adacore.com>
6069
6070 * errout.adb, errout.ads (Initialize): Factor common treatment
6071 in Reset_Warnings.
6072 (Reset_Warnings): New procedure to reset counts related to warnings.
6073 (Record_Compilation_Errors): New variable to store the presence of an
6074 error, used in gnat2why to allow changing the Warning_Mode.
6075 (Compilation_Errors): Use new variable Record_Compilation_Errors to
6076 store the presence of an error.
6077
6078 2017-01-12 Javier Miranda <miranda@adacore.com>
6079
6080 * sem_ch13.adb (Analyze_Aspect_Specifications):
6081 For Interrupt_Handler and Attach_ Handler aspects, decorate the
6082 internally built reference to the protected procedure as coming
6083 from sources and force its analysis.
6084
6085 2017-01-12 Ed Schonberg <schonberg@adacore.com>
6086
6087 * sem_ch3.adb (Build_Derived_Type): For a scalar derived type,
6088 inherit predicates if any from the first_subtype of the parent,
6089 not from the anonymous parent type.
6090 * sem_eval.adb (Is_Static_Subtype): A type that inherits a dynamic
6091 predicate is not a static subtype.
6092
6093 2017-01-12 Gary Dismukes <dismukes@adacore.com>
6094
6095 * freeze.adb (Check_Suspicious_Convention): New procedure
6096 performing a warning check on discriminated record types with
6097 convention C or C++. Factored out of procedure Freeze_Record_Type,
6098 and changed to only apply to base types (to avoid spurious
6099 warnings on subtypes). Minor improvement of warning messages
6100 to refer to discriminated rather than variant record types.
6101 (Freeze_Record_Type): Remove code for performing a suspicious
6102 convention check.
6103 (Freeze_Entity): Only call Freeze_Record_Type
6104 on types that aren't declared within any enclosing generic units
6105 (rather than just excluding the type when the innermost scope
6106 is generic). Call Check_Suspicious_Convention whether or not
6107 the type is declared within a generic unit.
6108 * sem_ch8.adb (In_Generic_Scope): Move this function to Sem_Util.
6109 * sem_util.ads, sem_util.adb (In_Generic_Scope): New function (moved
6110 from Sem_Ch8).
6111
6112 2017-01-12 Tristan Gingold <gingold@adacore.com>
6113
6114 * sysdep.c, adaint.c, rtinit.c, ming32.h:
6115 (__gnat_current_codepage): Renamed from CurrentCodePage
6116 (__gnat_current_ccs_encoding): Renamed from CurrentCCSEncoding
6117
6118 2017-01-12 Ed Schonberg <schonberg@adacore.com>
6119
6120 * sem_ch6.adb (Fully_Conformant_Expressions): Handle properly
6121 quantified expressions, following AI12-050: the loop parameters
6122 of two quantified expressions are conformant if they have the
6123 same identifier.
6124
6125 2017-01-12 Arnaud Charlet <charlet@adacore.com>
6126
6127 * gcc-interface/Makefile.in: Clean up VxWorks targets.
6128
6129 2017-01-12 Ed Schonberg <schonberg@adacore.com>
6130
6131 * sem_attr.adb (Analyze_Attribute_Reference, case Loop_Entry):
6132 Hnadle properly the attribute reference when it appears as part
6133 of an expression in another loop aspect.
6134
6135 2017-01-12 Ed Schonberg <schonberg@adacore.com>
6136
6137 * exp_ch3.adb (Check_Predicated_Discriminant): New procedure,
6138 subsidiary of Build_Initialization_Call, to complete generation
6139 of predicate checks on discriminants whose (sub)types have
6140 predicates, and to add checks on variants that do not have an
6141 others clause.
6142 * sem_util.adb (Gather_Components): A missing Others alternative is
6143 not an error when the type of the discriminant is a static predicate
6144 (and coverage has been checked when analyzing the case statement). A
6145 runtime check is generated to verify that a given discriminant
6146 satisfies the predicate (RM 3.8.1. (21.1/2)).
6147
6148 2017-01-12 Yannick Moy <moy@adacore.com>
6149
6150 * gnat1drv.adb (Adjust_Global_Switches): Only
6151 perform checking of exception mechanism when generating code.
6152
6153 2017-01-12 Justin Squirek <squirek@adacore.com>
6154
6155 * exp_ch7.adb (Add_Type_Invariants, Process_Array_Component):
6156 Remove handling of access component with invariant.
6157 (Build_Invariant_Procedure_Declaration): Remove return on class
6158 wide type.
6159 * freeze.adb (Freeze_Array_Type, Freeze_Record_Type): Remove
6160 conditional exception for component or array so Has_Own_Invariants
6161 flag is not falsly set.
6162 * sem_ch3.adb (Make_Class_Wide_Type): Initialize copy of class
6163 wide type to have no invariant flags.
6164
6165 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
6166
6167 * exp_ch9.adb, sem_prag.adb, s-tassta.adb, sem_util.adb, s-tarest.adb,
6168 sem_ch13.adb: Minor reformatting.
6169
6170 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
6171
6172 * exp_aggr.adb (Build_Record_Aggr_Code): Guard against a missing
6173 adjustment primitive when the ancestor type was not properly frozen.
6174 (Gen_Assign): Guard against a missing initialization
6175 primitive when the component type was not properly frozen.
6176 (Initialize_Array_Component): Guard against a missing adjustment
6177 primitive when the component type was not properly frozen.
6178 (Initialize_Record_Component): Guard against a missing adjustment
6179 primitive when the component type was not properly frozen.
6180 (Process_Transient_Component_Completion): The transient object may
6181 not be finalized when its associated type was not properly frozen.
6182 * exp_ch3.adb (Build_Assignment): Guard against a missing
6183 adjustment primitive when the component type was not properly frozen.
6184 (Build_Initialization_Call): Guard against a missing
6185 initialization primitive when the associated type was not properly
6186 frozen.
6187 (Expand_N_Object_Declaration): Guard against a missing
6188 adjustment primitive when the base type was not properly frozen.
6189 (Predefined_Primitive_Bodies): Create an empty Deep_Adjust
6190 body when there is no adjustment primitive available. Create an
6191 empty Deep_Finalize body when there is no finalization primitive
6192 available.
6193 * exp_ch4.adb (Apply_Accessibility_Check): Guard against a
6194 missing finalization primitive when the designated type was
6195 not properly frozen.
6196 (Expand_N_Allocator): Guard against a missing initialization primitive
6197 when the designated type was not properly frozen.
6198 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add the adjustment call
6199 only when the corresponding adjustment primitive is available.
6200 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Generate the
6201 adjustment/finalization statements only when there is an available
6202 primitive to carry out the action.
6203 (Build_Initialize_Statements): Generate the initialization/finalization
6204 statements only when there is an available primitive to carry out the
6205 action.
6206 (Make_Adjust_Call): Do not generate a call when the underlying
6207 type is not present due to a possible missing full view.
6208 (Make_Final_Call): Do not generate a call when the underlying
6209 type is not present due to a possible missing full view.
6210 (Make_Finalize_Address_Stmts): Generate an empty body when the
6211 designated type lacks a finalization primitive.
6212 (Make_Init_Call): Do not generate a call when the underlying type is
6213 not present due to a possible missing full view.
6214 (Process_Component_For_Adjust): Add the adjustment call only when the
6215 corresponding adjustment primitive is available.
6216 (Process_Component_For_Finalize): Add the finalization call only when
6217 the corresponding finalization primitive is available.
6218 (Process_Object_Declaration): Use a null statement to emulate a
6219 missing call to the finalization primitive of the object type.
6220 * exp_ch7.ads (Make_Adjust_Call): Update the comment on usage.
6221 (Make_Final_Call): Update the comment on usage.
6222 (Make_Init_Call): Update the comment on usage.
6223 * exp_util.adb (Build_Transient_Object_Statements): Code reformatting.
6224
6225 2017-01-12 Arnaud Charlet <charlet@adacore.com>
6226
6227 * einfo.ads: Update documentation of Address_Taken.
6228 * sem_attr.adb (Analyze_Access_Attribute, Resolve_Attribute
6229 [Access_Attribute]): Only consider 'Access/'Unchecked_Access
6230 for subprograms when setting Address_Taken flag.
6231
6232 2017-01-12 Patrick Bernardi <bernardi@adacore.com>
6233
6234 * sem_ch10.adb (Analyze_With_Clause): Removed code that turned
6235 Configurable_Run_Time_Mode off when analysing with'ed predefined
6236 libraries.
6237
6238 2017-01-12 Gary Dismukes <dismukes@adacore.com>
6239
6240 * sem_prag.adb: Minor reformatting.
6241 * sem_util.adb (Unique_Entity): fix result for
6242 bodies of entry families.
6243
6244 2017-01-12 Justin Squirek <squirek@adacore.com>
6245
6246 * sem_prag.adb (Analyze_Pragma): Add appropriate calls to
6247 Resolve_Suppressible in the pragma Assertion_Policy case.
6248 (Resolve_Suppressible): Created this function to factor out
6249 common code used to resolve Suppress to either Ignore or Check
6250 * snames.ads-tmpl: Add name for Suppressible.
6251
6252 2017-01-12 Gary Dismukes <dismukes@adacore.com>
6253
6254 * exp_ch9.adb, s-secsta.adb, snames.ads-tmpl, exp_ch3.adb: Minor
6255 reformatting.
6256 * debug.adb: Minor comment fixes.
6257
6258 2017-01-12 Arnaud Charlet <charlet@adacore.com>
6259
6260 * sem_util.adb (Unique_Entity): For concurrent
6261 bodies that are defined with stubs and complete a declaration
6262 of a single concurrent object return the entity of an implicit
6263 concurrent type, not the entity of the anonymous concurrent
6264 object.
6265 * debug.adb: -gnatd.J is no longer used.
6266 * make.adb (Globalize): Removed, no longer used.
6267 * sem_ch9.adb: minor typo in comment for entry index
6268
6269 2017-01-12 Patrick Bernardi <bernardi@adacore.com>
6270
6271 * aspect.adb, aspect.ads: Added new aspect Secondary_Stack_Size.
6272 * exp_ch3.adb (Build_Init_Statements): As part of initialising
6273 the value record of a task, set its _Secondary_Stack_Size field
6274 if present.
6275 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Create
6276 a _Secondary_Stack_Size field in the value record of
6277 the task if a Secondary_Stack_Size rep item is present.
6278 (Make_Task_Create_Call): Include secondary stack size
6279 parameter. If No_Secondary_Stack restriction is in place, passes
6280 stack size of 0.
6281 * par-prag.adb, sem_prag.adb, sem_prag.ads: Added new pragma
6282 Secondary_Stack_Size.
6283 * s-secsta.adb, s-secsta.ads (Minimum_Secondary_Stack_Size): New
6284 function to define the overhead of the secondary stack.
6285 * s-tarest.adb (Create_Restricted_Task,
6286 Create_Restricted_Task_Sequential): Functions now include
6287 Secondary_Stack_Size parameter to pass to Initialize_ATCB.
6288 * s-tarest.adb (Create_Restricted_Task,
6289 Create_Restricted_Task_Sequential): Calls to Initialize_ATCB now
6290 include Secondary_Stack_Size parameter.
6291 (Task_Wrapper): Secondary stack now allocated to the size specified by
6292 the Secondary_Stack_Size parameter in the task's ATCB.
6293 * s-taskin.adb, s-taskin.adb (Common_ATCB, Initialize_ATCB): New
6294 Secondary_Stack_Size component.
6295 * s-tassta.adb, s-tassta.ads (Create_Restricted_Task,
6296 Create_Restricted_Task_Sequential): Function now include
6297 Secondary_Stack_Size parameter.
6298 (Task_Wrapper): Secondary stack now allocated to the size
6299 specified by the Secondary_Stack_Size parameter in the task's
6300 ATCB.
6301 * s-tproft.adb (Register_Foreign_Thread): Amended Initialize_ATCB call
6302 to include Secondary_Stack_Size parameter.
6303 * sem_ch13.adb (Analyze_Aspect_Specification): Add support for
6304 Secondary_Stack_Size aspect, turning the aspect into its corresponding
6305 internal attribute.
6306 (Analyze_Attribute_Definition): Process Secondary_Stack_Size attribute.
6307 * snames.adb-tmpl, snames.ads-tmpl: Added names
6308 Name_Secondary_Stack_Size, Name_uSecondary_Stack_Size,
6309 Attribute_Secondary_Stack_Size and Pragma_Secondary_Stack_Size.
6310
6311 2017-01-12 Yannick Moy <moy@adacore.com>
6312
6313 * exp_spark.adb (Expand_SPARK_Potential_Renaming): Fix sloc of copied
6314 subtree.
6315
6316 2017-01-12 Justin Squirek <squirek@adacore.com>
6317
6318 * exp_attr.adb (Expand_N_Attribute_Reference):
6319 Fix Finalization_Size case by properly resolving the type after
6320 rewritting the node.
6321
6322 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
6323
6324 * exp_util.adb (Build_DIC_Procedure_Body): Semi-insert the body into
6325 the tree.
6326 (Build_DIC_Procedure_Declaration): Semi-insert the body into the tree.
6327 * binde.adb, exp_ch5.adb, sem_type.adb, sem.ads, sem_res.adb,
6328 exp_sel.ads: Minor reformatting.
6329
6330 2017-01-12 Justin Squirek <squirek@adacore.com>
6331
6332 * exp_ch6.adb (Expand_Call): Add guard to prevent
6333 invariant checks from being created for internally generated
6334 subprograms.
6335
6336 2017-01-12 Bob Duff <duff@adacore.com>
6337
6338 * lib-writ.ads: Remove incorrect comment.
6339
6340 2017-01-12 Javier Miranda <miranda@adacore.com>
6341
6342 * debug.adb (-gnatd.K): Enable generation of contract-only
6343 procedures in CodePeer mode.
6344 * contracts.adb (Build_And_Analyze_Contract_Only_Subprograms):
6345 New subprogram.
6346 (Analyze_Contracts): Generate contract-only procedures if -gnatdK is
6347 set.
6348 * scil_ll.ads, scil_ll.adb (Get_Contract_Only_Body_Name): New
6349 subprogram.
6350 (Get_Contract_Only_Missing_Body_Name): New subprogram.
6351 (Get_Contract_Only_Body): New subprogram.
6352 (Set_Contract_Only_Body): New subprogram.
6353 (Is_Contract_Only_Body): New subprogram.
6354 (Set_Is_Contract_Only_Body): New subprogram.
6355 (SCIL_Nodes): Replace table by hash-table.
6356
6357 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
6358
6359 * exp_ch6.adb: Minor reformatting.
6360 * spark_xrefs.ads: minor cleanup of comments for SPARK xrefs
6361
6362 2017-01-12 Bob Duff <duff@adacore.com>
6363
6364 * binde.adb (Forced): New reason for a dependence.
6365 (Force_Elab_Order): Implementation of the new switch.
6366 * binde.ads: Minor comment fixes.
6367 * bindusg.adb: Add -f switch. Apparently, there was an -f switch
6368 long ago that is no longer supported; removed comment about that.
6369 * opt.ads (Force_Elab_Order_File): Name of file specified for
6370 -f switch.
6371 * switch-b.adb: Parse -f switch.
6372
6373 2017-01-12 Justin Squirek <squirek@adacore.com>
6374
6375 * exp_ch6.adb (Check_View_Conversion): Created this function
6376 to properly chain calls to check type invariants that may be
6377 present in a subprogram call after the subprogram.
6378 (Expand_Call): Add a conditional to identify when a view conversion
6379 needs to be checked.
6380 * nlists.adb, nlists.ads (Prepend_New): New routine.
6381 (Prepend_New_To): New routine.
6382
6383 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
6384
6385 * sinfo.ads: Minor reformatting.
6386
6387 2017-01-12 Gary Dismukes <dismukes@adacore.com>
6388
6389 * exp_util.adb, exp_util.ads, einfo.ads: Minor typo fixes and
6390 reformatting.
6391
6392 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
6393
6394 * exp_ch6.adb (Make_Build_In_Place_Call_In_Anonymous_Context): Add new
6395 variable Definite. Create a local object and pass its 'Access to the
6396 BIP function when the result type is either definite or it does not
6397 require any finalization or secondary stack management.
6398
6399 2017-01-12 Bob Duff <duff@adacore.com>
6400
6401 * contracts.adb, einfo.adb, errout.adb, exp_attr.adb,
6402 exp_ch3.adb, exp_ch7.adb, exp_ch9.adb, exp_prag.adb, freeze.adb,
6403 frontend.adb, ghost.adb, inline.adb, lib-writ.adb, lib-xref.adb,
6404 par.adb, par-ch10.adb, par-ch2.adb, par-prag.adb, par_sco.adb,
6405 sem_attr.adb, sem_aux.adb, sem_ch10.adb, sem_ch12.adb,
6406 sem_ch13.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb, sem_elab.adb,
6407 sem_prag.adb, sem_res.adb, sem_util.adb, sem_util.ads,
6408 sem_warn.adb, sinfo.adb, sinfo.ads, sprint.adb (Pragma_Name):
6409 Change name to Pragma_Name_Unmapped.
6410 (Pragma_Name_Mapped): Change name to Pragma_Name.
6411 This is because the "mapped" version should be the usual case.
6412
6413 2017-01-09 Hristian Kirtchev <kirtchev@adacore.com>
6414
6415 * einfo.ads, einfo.adb: Remove uses of flags Has_Default_Init_Cond,
6416 Is_Default_Init_Cond_Procedure, and
6417 Has_Inherited_Default_Init_Cond. Add uses of flags
6418 Has_Own_DIC, Is_DIC_Procedure, and Has_Inherited_DIC.
6419 (Default_Init_Cond_Procedure): Removed.
6420 (DIC_Procedure): New routine.
6421 (Has_Default_Init_Cond): Removed.
6422 (Has_DIC): New routine.
6423 (Has_Inheritable_Invariants): The attribute applies to the base type.
6424 (Has_Inherited_Default_Init_Cond): Removed.
6425 (Has_Inherited_DIC): New routine.
6426 (Has_Inherited_Invariants): The attribute applies to the base type.
6427 (Has_Own_DIC): New routine.
6428 (Has_Own_Invariants): The attribute applies to the base type.
6429 (Is_Default_Init_Cond_Procedure): Removed.
6430 (Is_DIC_Procedure): New routine.
6431 (Set_Default_Init_Cond_Procedure): Removed.
6432 (Set_DIC_Procedure): New routine.
6433 (Set_Has_Default_Init_Cond): Removed.
6434 (Set_Has_Inheritable_Invariants): The attribute applies
6435 to the base type.
6436 (Set_Has_Inherited_Default_Init_Cond): Removed.
6437 (Set_Has_Inherited_DIC): New routine.
6438 (Set_Has_Inherited_Invariants): The attribute applies to the base type.
6439 (Set_Has_Own_DIC): New routine.
6440 (Set_Has_Own_Invariants): The attribute applies to the base type.
6441 (Set_Is_Default_Init_Cond_Procedure): Removed.
6442 (Set_Is_DIC_Procedure): New routine.
6443 (Write_Entity_Flags): Update the output of all flags related to
6444 default initial condition.
6445 * exp_ch3.adb (Expand_N_Object_Declaration): Update the generation
6446 of the call to the DIC procedure.
6447 (Freeze_Type): Generate the body of the DIC procedure.
6448 * exp_ch7.adb (Build_Invariant_Procedure_Body): Replace
6449 all occurrences of Create_Append with Append_New_To. Do
6450 not generate an invariant procedure for a class-wide type.
6451 The generated body acts as a freeze action of the working type.
6452 (Build_Invariant_Procedure_Declaration): Do not generate an
6453 invariant procedure for a class-wide type.
6454 (Create_Append): Removed.
6455 * exp_util.adb: Add with and use clauses for Sem_Ch3, sem_ch6,
6456 sem_Ch12, Sem_Disp, and GNAT.HTable. Move the handling of
6457 class-wide pre/postcondition description and data structures from
6458 Sem_Prag.
6459 (Build_Class_Wide_Expression): Moved from Sem_Prag.
6460 (Build_DIC_Call): New routine.
6461 (Build_DIC_Procedure_Body): New routine.
6462 (Build_DIC_Procedure_Declaration): New routine.
6463 (Entity_Hash): Moved from Sem_Prag.
6464 (Find_DIC_Type): New routine.
6465 (Update_Primitives_Mapping): Reimplemented.
6466 (Update_Primitives_Mapping_Of_Types): New routine.
6467 * exp_util.ads (Build_Class_Wide_Expression): Moved from Sem_Prag.
6468 (Build_DIC_Call): New routine.
6469 (Build_DIC_Procedure_Body): New routine.
6470 (Build_DIC_Procedure_Declaration): New routine.
6471 (Update_Primitives_Mapping): Moved from Sem_Prag.
6472 (Update_Primitives_Mapping_Of_Types): New routine.
6473 * nlists.adb (Append_New): New routine.
6474 (Append_New_To): New routine.
6475 * nlists.ads (Append_New): New routine.
6476 (Append_New_To): New routine.
6477 * sem_ch3.adb (Analyze_Declarations): Do not generate the bodies
6478 of DIC procedures here. This is now done at the end of the
6479 visible declarations, private declarations, and at the freeze
6480 point of a type.
6481 (Analyze_Private_Extension_Declaration):
6482 A private extension inherits the DIC pragma of a parent type.
6483 (Analyze_Subtype_Declaration): No need to propagate invariant
6484 attributes to a subtype as those apply to the base type.
6485 (Build_Derived_Record_Type): No need to inherit invariants here
6486 as this is now done in Build_Derived_Type.
6487 (Build_Derived_Type): Inherit both the DIC pragma and invariants from
6488 a parent type.
6489 (Process_Full_View): Update the propagation of DIC attributes.
6490 (Propagate_Default_Init_Cond_Attributes): Removed.
6491 * sem_ch7.adb Add with and use clauses for Exp_Util.
6492 (Analyze_Package_Specification): Create the body of the DIC
6493 procedure at the end of the visible and private declarations.
6494 (Preserve_Full_Attributes): Propagate DIC attributes.
6495 * sem_ch9.adb (Analyze_Protected_Type_Declaration): Propagate
6496 DIC attributes.
6497 (Analyze_Task_Type_Declaration): Propagate DIC attributes.
6498 * sem_elab.adb (Check_A_Call): Update the call to
6499 Is_Nontrivial_Default_Init_Cond_Procedure.
6500 * sem_prag.adb Remove the with and use clauses for
6501 GNAT.HTable. Move the handling of class- wide pre/postcondition
6502 description and data structures to Exp_Util.
6503 (Analyze_Pragma): Create the declaration of the DIC procedure. There
6504 is no need to propagate invariant-related attributes at this point
6505 as this is done in Build_Invariant_Procedure_Declaration.
6506 (Build_Class_Wide_Expression): Moved to Exp_Util.
6507 (Entity_Hash): Moved to Exp_Util.
6508 (Update_Primitives_Mapping): Moved to Exp_Util.
6509 * sem_prag.ads (Build_Class_Wide_Expression): Moved to Exp_Util.
6510 (Update_Primitives_Mapping): Moved to Exp_Util.
6511 * sem_util.adb: Remove with and use clauses for Ghost
6512 and Sem_Ch13.
6513 (Build_Default_Init_Cond_Call): Removed.
6514 (Build_Default_Init_Cond_Procedure_Bodies): Removed.
6515 (Build_Default_Init_Cond_Procedure_Declaration): Removed.
6516 (Get_Views): Reimplemented.
6517 (Has_Full_Default_Initialization): Reimplement the section on DIC.
6518 (Inherit_Default_Init_Cond_Procedure): Removed.
6519 (Is_Nontrivial_Default_Init_Cond_Procedure): Removed.
6520 (Is_Nontrivial_DIC_Procedure): New routine.
6521 (Is_Verifiable_DIC_Pragma): New routine.
6522 (Propagate_DIC_Attributes): New routine.
6523 * sem_util.ads (Build_Default_Init_Cond_Call): Removed.
6524 (Build_Default_Init_Cond_Procedure_Bodies): Removed.
6525 (Build_Default_Init_Cond_Procedure_Declaration): Removed.
6526 (Inherit_Default_Init_Cond_Procedure): Removed.
6527 (Is_Nontrivial_Default_Init_Cond_Procedure): Removed.
6528 (Is_Nontrivial_DIC_Procedure): New routine.
6529 (Is_Verifiable_DIC_Pragma): New routine.
6530 (Propagate_DIC_Attributes): New routine.
6531 * sem_warn.adb (Is_OK_Fully_Initialized): Reimplement the section
6532 on DIC.
6533 * sinfo.ads, sinfo.adb: Add new attribute Expression_Copy along with
6534 usage in nodes.
6535 (Expression_Copy): New routine along with pragma Inline.
6536 (Set_Expression_Copy): New routine along with pragma Inline.
6537
6538 2017-01-06 Bob Duff <duff@adacore.com>
6539
6540 * bindgen.adb (Gen_Adainit, Gen_Adafinal): Change
6541 "Bind_Main_Program" to "not Bind_For_Library", because otherwise
6542 we won't generate the call to s_stalib_adafinal when the main
6543 is not written in Ada.
6544
6545 2017-01-06 Bob Duff <duff@adacore.com>
6546
6547 * sem_prag.adb: Minor: remove pragma Warnings.
6548
6549 2017-01-06 Tristan Gingold <gingold@adacore.com>
6550
6551 * Makefile.rtl: Do not compile s-stchop by default.
6552
6553 2017-01-06 Patrick Bernardi <bernardi@adacore.com>
6554
6555 * aspects.adb, aspects.ads, exp_ch3.adb, exp_ch9.adb, par-prag.adb,
6556 sem_ch13.adb, sem_prag.adb, sem_prag.ads, snames.adb-tmpl,
6557 snames.ads-tmpl, s-secsta.adb, s-secsta.ads, s-tarest.adb,
6558 s-tarest.ads, s-taskin.adb, s-taskin.ads, s-tassta.adb, s-tassta.ads:
6559 Reverted previous change for now.
6560
6561 2017-01-06 Ed Schonberg <schonberg@adacore.com>
6562
6563 * exp_ch3.adb (Build_Initialization_Call): Apply predicate
6564 check to default discriminant value if checks are enabled.
6565 (Build_Assignment): If type of component has static predicate,
6566 apply check to its default value, if any.
6567
6568 2017-01-06 Patrick Bernardi <bernardi@adacore.com>
6569
6570 * aspect.adb, aspect.ads: Added new aspect Secondary_Stack_Size.
6571 * exp_ch3.adb (Build_Init_Statements): As part of initialising
6572 the value record of a task, set its _Secondary_Stack_Size field
6573 if present.
6574 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Create
6575 a _Secondary_Stack_Size field in the value record of
6576 the task if a Secondary_Stack_Size rep item is present.
6577 (Make_Task_Create_Call): Include secondary stack size
6578 parameter. If No_Secondary_Stack restriction is in place, passes
6579 stack size of 0.
6580 * par-prag.adb, sem_prag.adb, sem_prag.ads: Added new pragma
6581 Secondary_Stack_Size.
6582 * s-secsta.adb, s-secsta.ads (Minimum_Secondary_Stack_Size): New
6583 function to define the overhead of the secondary stack.
6584 * s-tarest.adb (Create_Restricted_Task,
6585 Create_Restricted_Task_Sequential): Functions now include
6586 Secondary_Stack_Size parameter to pass to Initialize_ATCB.
6587 * s-tarest.adb (Create_Restricted_Task,
6588 Create_Restricted_Task_Sequential): Calls to Initialize_ATCB
6589 now include Secondary_Stack_Size parameter.
6590 (Task_Wrapper):
6591 Secondary stack now allocated to the size specified by the
6592 Secondary_Stack_Size parameter in the task's ATCB.
6593 * s-taskin.adb, s-taskin.adb (Common_ATCB, Initialise_ATCB): New
6594 Secondary_Stack_Size component.
6595 * s-tassta.adb, s-tassta.ads (Create_Restricted_Task,
6596 Create_Restricted_Task_Sequential): Function now include
6597 Secondary_Stack_Size parameter.
6598 (Task_Wrapper): Secondary stack
6599 now allocated to the size specified by the Secondary_Stack_Size
6600 parameter in the task's ATCB.
6601 * sem_ch13.adb (Analyze_Aspect_Specification): Add support
6602 for Secondary_Stack_Size aspect, turning the aspect into its
6603 corresponding internal attribute.
6604 (Analyze_Attribute_Definition):
6605 Process Secondary_Stack_Size attribute.
6606 * snames.adb-tmpl, snames.ads-tmpl: Added names
6607 Name_Secondary_Stack_Size, Name_uSecondary_Stack_Size,
6608 Attribute_Secondary_Stack_Size and Pragma_Secondary_Stack_Size.
6609
6610 2017-01-06 Pascal Obry <obry@adacore.com>
6611
6612 * a-direio.adb, a-direio.ads, a-sequio.adb, a-sequio.ads: Add Flush to
6613 Sequential_IO and Direct_IO.
6614
6615 2017-01-06 Bob Duff <duff@adacore.com>
6616
6617 * snames.ads-tmpl (Renamed): New name for the pragma argument.
6618 * par-ch2.adb: Allow the new pragma (with analysis deferred
6619 to Sem_Prag).
6620 * sinfo.ads, sinfo.adb (Map_Pragma_Name, Pragma_Name_Mapped):
6621 Keep a mapping from new pragma names to old names.
6622 * sem_prag.adb: Check legality of pragma Rename_Pragma, and
6623 implement it by calling Map_Pragma_Name.
6624 * checks.adb, contracts.adb, einfo.adb, errout.adb,
6625 * exp_attr.adb, exp_ch3.adb, exp_ch6.adb, exp_ch7.adb, exp_ch9.adb,
6626 * exp_prag.adb, exp_util.adb, freeze.adb, frontend.adb, ghost.adb,
6627 * inline.adb, lib-writ.adb, scans.adb, scans.ads, sem_attr.adb,
6628 * sem_aux.adb, sem_ch10.adb, sem_ch13.adb, sem_ch6.adb, sem_ch9.adb,
6629 * sem_elab.adb, sem_res.adb, sem_util.adb, sem_util.ads,
6630 * sem_warn.adb: Call Pragma_Name_Mapped instead of Pragma_Name
6631 as appropriate.
6632
6633 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
6634
6635 * exp_ch9.adb: Minor reformatting.
6636
6637 2017-01-06 Tristan Gingold <gingold@adacore.com>
6638
6639 * exp_ch9.ads, exp_ch9.adb (Build_Entry_Names): Remove (unused).
6640 * rtsfind.ads (RE_Task_Entry_Names_Array, RO_ST_Set_Entry_Names)
6641 (RE_Protected_Entry_Names_Array, RO_PE_Set_Entry_Names): Remove
6642 (unused).
6643 * s-taskin.ads, s-taskin.adb (Set_Entry_Names,
6644 Task_Entry_Names_Array, Task_Entry_Names_Access): Remove.
6645 * s-tpoben.ads, s-tpoben.adb (Set_Entry_Names,
6646 Protected_Entry_Names_Array, Protected_Entry_Names_Access): Remove.
6647
6648 2017-01-06 Bob Duff <duff@adacore.com>
6649
6650 * sinfo.ads, sinfo.adb (Map_Pragma_Name): Preparation work,
6651 dummy implementation of Map_Pragma_Name.
6652
6653 2017-01-06 Tristan Gingold <gingold@adacore.com>
6654
6655 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Make the
6656 entry_body variable constant.
6657 * s-taprob.ads (Entry_Body_Access): Move to s-tposen.
6658 * s-tpoben.ads (Protected_Entry_Body_Access): Now access
6659 to constant.
6660 * s-tposen.ads (Entry_Body_Access): Moved from s-taprob,
6661 now access to constant.
6662
6663 2017-01-06 Gary Dismukes <dismukes@adacore.com>
6664
6665 * einfo.ads, sem_res.adb, sem_attr.adb, sem_ch6.adb: Minor
6666 reformatting and typo fixes.
6667
6668 2017-01-06 Bob Duff <duff@adacore.com>
6669
6670 * snames.ads-tmpl: New names for pragma renaming.
6671 * snames.adb-tmpl (Is_Configuration_Pragma_Name): Minor cleanup.
6672 * par-prag.adb: Add new pragma name to case statement.
6673 * sem_prag.adb (Rename_Pragma): Initial cut at semantic analysis
6674 of the pragma.
6675 * sinfo.ads, sinfo.adb (Pragma_Name_Mapped): Preparation work,
6676 Dummy implementation of Pragma_Name_Mapped.
6677
6678 2017-01-06 Ed Schonberg <schonberg@adacore.com>
6679
6680 * exp_ch6.adb (Expand_Protected_Subprogram_Call): Add guard to
6681 better detect call within an entry_wrapper.
6682 * sem_res.adb (Resolve_Call): A protected call within an
6683 entity_wrapper is analyzed in the context of the protected
6684 object but corresponds to a pre-analysis and is not an access
6685 before elaboration.
6686 * sem_attr.adb: Minor reformatting.
6687
6688 2017-01-06 Justin Squirek <squirek@adacore.com>
6689
6690 * sem_attr.adb (Analyze_Attribute): Modify semantic checks for
6691 Finalization_Size to allow a prefix of any non-class-wide type.
6692 * sem_attr.ads Modify comment for Finalization_Size to include
6693 definite type use case.
6694
6695 2017-01-06 Ed Schonberg <schonberg@adacore.com>
6696
6697 * einfo.ads, einfo.adb (Is_Entry_Wrapper): New flag, defined
6698 on procedures that are wrappers created for entries that have
6699 preconditions.
6700 * sem_ch6.adb (Analyze_Subrogram_Body_Helper): If the subprogram
6701 body is an entry_wrapper, compile it in the context of the
6702 synchronized type, because a precondition may refer to funtions
6703 of the type.
6704 * exp_ch9.adb (Build_Contract_Wrapper): Set Is_Entry_Wrapper on
6705 body entity.
6706 * exp_ch6.adb (Expand_Protected_Subprogram_Call): if the call is
6707 within an Entry_Wrapper this is an external call whose target
6708 is the synchronized object that is the actual in the call to
6709 the wrapper.
6710
6711 2017-01-06 Yannick Moy <moy@adacore.com>
6712
6713 * sem_attr.adb (Analyze_Attribute/Attribute_Loop_Entry): Analyze node
6714 in tree, which means not analyzing the previous prefix if the node has
6715 been rewritten into its prefix.
6716
6717 2017-01-06 Gary Dismukes <dismukes@adacore.com>
6718
6719 * s-tpobop.adb: Minor reformatting.
6720
6721 2017-01-06 Ed Schonberg <schonberg@adacore.com>
6722
6723 * checks.adb (Ensure_Valid): Do not generate a validity check
6724 within a generated predicate function, validity checks will have
6725 been applied earlier when required.
6726
6727 2017-01-06 Tristan Gingold <gingold@adacore.com>
6728
6729 * s-tpoben.ads (Protection_Entries): Add comment and reorder
6730 components for performances.
6731 * s-tpobop.adb (PO_Do_Or_Queue): Implement Max_Queue_Length runtime
6732 semantic.
6733
6734 2017-01-06 Ed Schonberg <schonberg@adacore.com>
6735
6736 * sem_eval.adb (Check_Expression_Against_Static_Predicate):
6737 If expression is compile-time known and obeys a static predicate
6738 it must be labelled as static, to prevent spurious warnings and
6739 run-time errors, e.g. in case statements. This is relevant when
6740 the expression is the result of constant-folding a type conversion
6741 whose expression is a variable with a known static value.
6742
6743 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
6744
6745 * exp_attr.adb, sem_attr.ads: Minor reformatting.
6746
6747 2017-01-06 Justin Squirek <squirek@adacore.com>
6748
6749 * exp_attr.adb (Expand_N_Attribute_Reference): Add entry for
6750 expansion of Finalization_Size attribute.
6751 * sem_attr.adb (Analyze_Attribute): Add entry to check the
6752 semantics of Finalization_Size.
6753 (Eval_Attribute): Add null entry for Finalization_Size.
6754 * sem_attr.ads: Add Finalization_Size to the implementation
6755 dependent attribute list.
6756 * snames.ads-tmpl: Add name entry for Finalization_Size attribute.
6757
6758 2017-01-06 Ed Schonberg <schonberg@adacore.com>
6759
6760 * sem_ch5.adb (Analyze_Loop_Statement): If the loop includes an
6761 iterator specification with a serious syntactic error, transform
6762 construct into an infinite loop in order to continue analysis
6763 and prevent a compiler abort.
6764
6765 2017-01-06 Tristan Gingold <gingold@adacore.com>
6766
6767 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Do not generate
6768 max_queue_lengths_array if unused.
6769
6770 2017-01-06 Bob Duff <duff@adacore.com>
6771
6772 * errout.adb (Set_Msg_Text): Protect against out-of-bounds
6773 array access, in case "\" is at the end of Text.
6774 * stylesw.adb (Set_Style_Check_Options): Don't include input
6775 characters in the error message template, because they could
6776 be control characters such as "\", which Errout will try to
6777 interpret.
6778
6779 2017-01-06 Ed Schonberg <schonberg@adacore.com>
6780
6781 * sem_ch4.adb (Find_Indexing_Operations, Inspect_Declarations):
6782 For a private type examine the visible declarations that follow
6783 the partial view, not just the private declarations that follow
6784 the full view.
6785
6786 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
6787
6788 * exp_ch5.adb, sem_ch3.adb, checks.adb: Minor reformatting and
6789 code cleanup.
6790
6791 2017-01-06 Ed Schonberg <schonberg@adacore.com>
6792
6793 * exp_ch5.adb (Get_Default_Iterator): For a derived type, the
6794 alias of the inherited op is the parent iterator, no need to
6795 examine dispatch table positions which might not be established
6796 yet if type is not frozen.
6797 * sem_disp.adb (Check_Controlling_Formals): The formal of a
6798 predicate function may be a subtype of a tagged type.
6799 * sem_ch3.adb (Complete_Private_Subtype): Adjust inheritance
6800 of representation items for the completion of a type extension
6801 where a predicate applies to the partial view.
6802 * checks.ads, checks.adb (Apply_Predicate_Check): Add optional
6803 parameter that designates function whose actual receives a
6804 predicate check, to improve warning message when the check will
6805 lead to infinite recursion.
6806 * sem_res.adb (Resolve_Actuals): Pass additional parameter to
6807 Apply_Predicate_Check.
6808
6809 2017-01-06 Tristan Gingold <gingold@adacore.com>
6810
6811 * s-rident.ads (Profile_Info): Remove No_Entry_Queue from
6812 Gnat_Extended_Ravenscar.
6813 * exp_ch9.adb, s-tpoben.adb, s-tpoben.ads: Fix spelling.
6814
6815 2017-01-06 Gary Dismukes <dismukes@adacore.com>
6816
6817 * sem_util.ads: Minor typo fix and reformatting.
6818
6819 2017-01-06 Yannick Moy <moy@adacore.com>
6820
6821 * ghost.adb Minor fixing of references to SPARK RM.
6822 (Check_Ghost_Context): Check whether reference is to a lvalue
6823 before issuing an error about violation of SPARK RM 6.9(13)
6824 when declaration has Ghost policy Check and reference has Ghost
6825 policy Ignore.
6826 * sem_util.adb Minor indentation.
6827 * sem_ch10.adb (Analyze_Package_Body_Stub, Analyze_Protected_Body_Stub,
6828 Analyze_Task_Body_Stub): Set Ekind of the defining identifier.
6829 * sem_util.ads (Unique_Defining_Entity): Document the result
6830 for package body stubs.
6831
6832 2017-01-06 Tristan Gingold <gingold@adacore.com>
6833
6834 * raise-gcc.c (abort): Macro to call Abort_Propagation.
6835 * s-tpoben.ads (Protected_Entry_Queue_Max_Access): Make it access
6836 constant.
6837 * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
6838 Do not generate the Entry_Max_Queue_Lengths_Array if all default
6839 values.
6840 * exp_util.adb (Corresponding_Runtime_Package): Consider
6841 Max_Queue_Length pragma.
6842
6843 2017-01-06 Justin Squirek <squirek@adacore.com>
6844
6845 * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
6846 Remove declaration generation in the case of
6847 System_Tasking_Protected_Objects_Single_Entry being used,
6848 and add a warning message when this is detected to occur.
6849 (Make_Initialize_Protection): Remove reference pass in the case
6850 of System_Tasking_Protected_Objects_Single_Entry.
6851 * rtsfind.ads: Remove RE_Protected_Entry_Queue_Max
6852 * s-tposen.adb (Initialize_Protection_Entry): Remove
6853 Entry_Queue_Max parameter.
6854 * s-tposen.ads: Remove the types use to store the entry queue
6855 maximum.
6856 * sem_prag.adb (Analyze_Pragma): Remove entry families restriction
6857
6858 2017-01-06 Yannick Moy <moy@adacore.com>
6859
6860 * sem_util.adb, sem_util.ads (Get_Enum_Lit_From_Pos): Strengthen
6861 behavior of function, to also accept out of range positions
6862 and raise Constraint_Error in such case, and to copy sloc from
6863 literal if No_Location passed as location.
6864 * uintp.adb, uintp.ads (UI_To_Int, UI_To_CC): Strengthen behavior
6865 of functions to raise Constraint_Error in case of value not in
6866 appropriate range.
6867
6868 2017-01-06 Tristan Gingold <gingold@adacore.com>
6869
6870 * sem_util.adb, s-taprop-linux.adb (Finalize_TCB): Remove call to
6871 Invalidate_Stack_Cache.
6872
6873 2017-01-06 Eric Botcazou <ebotcazou@adacore.com>
6874
6875 * s-os_lib.adb: Minor fix to the signature of Readlink.
6876
6877 2017-01-06 Javier Miranda <miranda@adacore.com>
6878
6879 * sem_ch6.adb (Conforming_Types): Handle another
6880 confusion between views in a nested instance with an actual
6881 private type whose full view is not in scope.
6882
6883 2017-01-06 Arnaud Charlet <charlet@adacore.com>
6884
6885 * exp_ch5.adb (Expand_N_If_Statement): Obey existing comment and
6886 mark a rewritten if statement as explicit (Comes_From_Source).
6887
6888 2017-01-06 Gary Dismukes <dismukes@adacore.com>
6889
6890 * sem_prag.adb, rtsfind.adb, sem_util.adb: Minor typo fixes.
6891
6892 2017-01-06 Tristan Gingold <gingold@adacore.com>
6893
6894 * ada.ads, a-unccon.ads: Add pragma No_Elaboration_Code_All.
6895
6896 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
6897
6898 * sem_case.adb: Minor reformatting.
6899
6900 2017-01-06 Thomas Quinot <quinot@adacore.com>
6901
6902 * g-socthi-mingw.adb: Remove now extraneous USE TYPE clause
6903
6904 2017-01-06 Justin Squirek <squirek@adacore.com>
6905
6906 * aspects.adb: Register aspect in Canonical_Aspect.
6907 * aspects.ads: Associate qualities of Aspect_Max_Queue_Length
6908 into respective tables.
6909 * einfo.ads, einfo.adb: Add a new attribute for
6910 handling the parameters for Pragma_Max_Entry_Queue
6911 (Entry_Max_Queue_Lengths_Array) in E_Protected_Type. Subprograms
6912 for accessing and setting were added as well.
6913 * par-prag.adb (Prag): Register Pramga_Max_Entry_Queue.
6914 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Emit
6915 declaration for pramga arguments and store them in the protected
6916 type node.
6917 (Make_Initialize_Protection): Pass a reference to
6918 the Entry_Max_Queue_Lengths_Array in the protected type node to
6919 the runtime.
6920 * rtsfind.adb: Minor grammar fix.
6921 * rtsfind.ads: Register new types taken from the
6922 runtime libraries RE_Protected_Entry_Queue_Max and
6923 RE_Protected_Entry_Queue_Max_Array
6924 * s-tposen.adb, s-tpoben.adb
6925 (Initialize_Protection_Entry/Initialize_Protection_Entries):
6926 Add extra parameter and add assignment to local object.
6927 * s-tposen.ads, s-tpoben.ads: Add new types to
6928 store entry queue maximums and a field to the entry object record.
6929 * sem_ch13.adb (Analyze_Aspect_Specifications): Add case statement
6930 for Aspect_Max_Queue_Length.
6931 (Check_Aspect_At_Freeze_Point):
6932 Add aspect to list of aspects that don't require delayed analysis.
6933 * sem_prag.adb (Analyze_Pragma): Add case statement for
6934 Pragma_Max_Queue_Length, check semantics, and register arugments
6935 in the respective entry nodes.
6936 * sem_util.adb, sem_util.ads Add functions Get_Max_Queue_Length
6937 and Has_Max_Queue_Length
6938 * snames.ads-tmpl: Add constant for the new aspect-name
6939 Name_Max_Queue_Length and corrasponding pragma.
6940
6941 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
6942
6943 * exp_util.adb (Is_Controlled_Function_Call):
6944 Reimplemented. Consider any node which has an entity as the
6945 function call may appear in various ways.
6946
6947 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
6948
6949 * exp_attr.adb (Rewrite_Stream_Proc_Call): Use
6950 an unchecked type conversion when performing a view conversion
6951 to/from a private type. In all other cases use a regular type
6952 conversion to ensure that any relevant checks are properly
6953 installed.
6954
6955 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
6956
6957 * sem_prag.adb, sem_ch8.adb: Minor reformatting.
6958
6959 2017-01-06 Ed Schonberg <schonberg@adacore.com>
6960
6961 * sem_case.adb (Explain_Non_Static_Bound): Suppress cascaded
6962 error on case expression that is an entity, when coverage is
6963 incomplete and entity has a static value obtained by local
6964 propagation.
6965 (Handle_Static_Predicate): New procedure, subsidiary of
6966 Check_Choices, to handle case alternatives that are either
6967 subtype names or subtype indications involving subtypes that
6968 have static predicates.
6969
6970 2017-01-06 Thomas Quinot <quinot@adacore.com>
6971
6972 * s-oscons-tmplt.c, g-socket.adb, g-socket.ads, g-sothco.ads:
6973 (GNAT.Socket): Add support for Busy_Polling and Generic_Option
6974
6975 2017-01-06 Bob Duff <duff@adacore.com>
6976
6977 * sem_elab.adb (Activate_Elaborate_All_Desirable): Don't add
6978 Elaborate_All(P) to P itself. That could happen in obscure cases,
6979 and always introduced a cycle (P body must be elaborated before
6980 P body).
6981 * lib-writ.ads: Comment clarification.
6982 * ali-util.ads: Minor comment fix.
6983 * ali.adb: Minor reformatting.
6984
6985 2017-01-06 Tristan Gingold <gingold@adacore.com>
6986
6987 * a-exexpr-gcc.adb: Improve comment.
6988
6989 2017-01-03 James Cowgill <James.Cowgill@imgtec.com>
6990
6991 * s-linux-mips.ads: Use correct signal and errno constants.
6992 (sa_handler_pos, sa_mask_pos): Fix offsets for 64-bit MIPS.
6993
6994 2017-01-03 James Cowgill <James.Cowgill@imgtec.com>
6995
6996 * s-linux-mips.ads: Rename from s-linux-mipsel.ads.
6997 * gcc-interface/Makefile.in (MIPS/Linux): Merge mips and mipsel
6998 sections.
6999
7000 2017-01-01 Eric Botcazou <ebotcazou@adacore.com>
7001
7002 * gnatvsn.ads: Bump copyright year.
7003
7004 2017-01-01 Jakub Jelinek <jakub@redhat.com>
7005
7006 * gnat_ugn.texi: Bump @copying's copyright year.
7007 * gnat_rm.texi: Likewise.
7008 \f
7009 Copyright (C) 2017 Free Software Foundation, Inc.
7010
7011 Copying and distribution of this file, with or without modification,
7012 are permitted in any medium without royalty provided the copyright
7013 notice and this notice are preserved.