1 2017-09-06 Ed Schonberg <schonberg@adacore.com>
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.
7 2017-09-06 Justin Squirek <squirek@adacore.com>
9 * sem_attr.adb: Comment correction.
11 2017-09-06 Gary Dismukes <dismukes@adacore.com>
13 * sem_util.adb: Minor reformatting.
15 2017-09-06 Yannick Moy <moy@adacore.com>
17 * a-comlin.ads (Argument): Add precondition for analysis.
19 2017-09-06 Yannick Moy <moy@adacore.com>
21 * sem_res.adb (Resolve): Update message for function call as statement.
23 2017-09-06 Ed Schonberg <schonberg@adacore.com>
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.
32 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
34 * exp_ch5.adb, freeze.adb, exp_ch4.adb, exp_ch6.adb, lib-xref.adb:
37 2017-09-06 Justin Squirek <squirek@adacore.com>
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.
49 2017-09-06 Ed Schonberg <schonberg@adacore.com>
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.
56 2017-09-06 Yannick Moy <moy@adacore.com>
58 * treepr.adb (Print_Entity_Info): Do not print empty Elist.
60 2017-09-06 Yannick Moy <moy@adacore.com>
62 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do not consider calls
63 to subprograms in other units as possibly inlined.
65 2017-09-06 Ed Schonberg <schonberg@adacore.com>
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.
72 2017-09-06 Arnaud Charlet <charlet@adacore.com>
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.
78 2017-09-06 Ed Schonberg <schonberg@adacore.com>
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.
84 2017-09-06 Javier Miranda <miranda@adacore.com>
86 * exp_ch4.adb (Expand_Modular_Op): Force generating
87 temporary to improve the generated code.
89 2017-09-06 Tristan Gingold <gingold@adacore.com>
91 * s-fatgen.adb: Minor typo fix in comment.
93 2017-09-06 Ed Schonberg <schonberg@adacore.com>
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.
102 2017-09-06 Ed Schonberg <schonberg@adacore.com>
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.
109 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
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.
122 2017-09-06 Ed Schonberg <schonberg@adacore.com>
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).
130 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
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.
137 2017-09-06 Ed Schonberg <schonberg@adacore.com>
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.
151 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
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.
160 2017-09-06 Ed Schonberg <schonberg@adacore.com>
162 * sem_prag.adb: Update description of Eliminate.
164 2017-09-06 Ed Schonberg <schonberg@adacore.com>
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.
171 2017-09-06 Bob Duff <duff@adacore.com>
173 * s-fileio.adb (Name): Do not raise Use_Error for temp files.
175 2017-09-06 Ed Schonberg <schonberg@adacore.com>
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.
183 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
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):
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
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.
242 2017-09-06 Ed Schonberg <schonberg@adacore.com>
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.
250 2017-09-06 Thomas Quinot <quinot@adacore.com>
252 * s-regpat.adb (Compile.Parse_Literal): Fix handling of literal
253 run of 253 characters or more.
255 2017-09-06 Ed Schonberg <schonberg@adacore.com>
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.
272 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
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
279 2017-09-06 Philippe Gil <gil@adacore.com>
281 * g-debpoo.adb: adapt GNAT.Debug_Pools to allow safe thread
284 2017-09-06 Bob Duff <duff@adacore.com>
286 * sem_elim.adb: Minor comment fix.
288 2017-09-06 Ed Schonberg <schonberg@adacore.com>
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.
296 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
298 * exp_util.adb, einfo.adb, sem_attr.adb, exp_ch4.adb, gnatls.adb,
299 exp_ch3.adb, xoscons.adb: Minor reformatting.
301 2017-09-06 Raphael Amiard <amiard@adacore.com>
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
309 2017-09-06 Ed Schonberg <schonberg@adacore.com>
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).
318 2017-09-06 Ed Schonberg <schonberg@adacore.com>
320 * sem_res.adb (Resolve_Entry_Call): Check whether a protected
321 operation is subject to a pragma Eliminate.
323 2017-09-06 Ed Schonberg <schonberg@adacore.com>
325 * sem_elim.ads, exp_ch4.adb: Minor reformatting.
327 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
329 * fe.h (Eliminate_Error_Msg): Remove.
331 2017-09-05 Richard Sandiford <richard.sandiford@linaro.org>
333 * gcc-interface/utils.c (make_packable_type): Update call to
336 2017-09-05 Richard Sandiford <richard.sandiford@linaro.org>
338 * gcc-interface/utils2.c (build_load_modify_store):
339 Use int_mode_for_size.
341 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
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.
348 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
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.
354 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
356 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Address>: Do not strip
357 conversions around prefixes that are not references.
359 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
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.
364 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
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.
383 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
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.
389 (N_Selected_Component): Likewise. Do not try again to translate it.
390 (N_Free_Statement): Invoke adjust_for_implicit_deref on the expression.
392 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
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
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.
409 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
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
415 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
417 * gcc-interface/trans.c (pos_to_constructor): Skip conversions to an
418 unconstrained array type.
420 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
421 Alan Hayward <alan.hayward@arm.com>
422 David Sherwood <david.sherwood@arm.com>
424 * gcc-interface/decl.c (validate_size): Use NARROWEST_INT_MODE
425 instead of GET_CLASS_NARROWEST_MODE (MODE_INT).
427 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
428 Alan Hayward <alan.hayward@arm.com>
429 David Sherwood <david.sherwood@arm.com>
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.
436 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
437 Alan Hayward <alan.hayward@arm.com>
438 David Sherwood <david.sherwood@arm.com>
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.
445 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
446 Alan Hayward <alan.hayward@arm.com>
447 David Sherwood <david.sherwood@arm.com>
449 * gcc-interface/misc.c (fp_prec_to_size): Use opt_scalar_float_mode.
450 (fp_size_to_prec): Likewise.
452 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
453 Alan Hayward <alan.hayward@arm.com>
454 David Sherwood <david.sherwood@arm.com>
456 * gcc-interface/utils.c (gnat_type_for_mode): Use is_a
457 <scalar_float_mode> instead of SCALAR_FLOAT_MODE_P.
459 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
460 Alan Hayward <alan.hayward@arm.com>
461 David Sherwood <david.sherwood@arm.com>
463 * gcc-interface/decl.c (validate_size): Update use of
464 GET_MODE_WIDER_MODE, forcing a wider mode to exist.
466 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
467 Alan Hayward <alan.hayward@arm.com>
468 David Sherwood <david.sherwood@arm.com>
470 * gcc-interface/misc.c (fp_prec_to_size): Use new mode iterators.
471 (fp_size_to_prec): Likewise.
473 2017-08-29 Martin Liska <mliska@suse.cz>
476 * gcc-interface/trans.c (Pragma_to_gnu): Set argument to NULL.
478 2017-08-08 Martin Liska <mliska@suse.cz>
480 * gcc-interface/trans.c: Include header files.
482 2017-07-29 Jakub Jelinek <jakub@redhat.com>
484 * gcc-interface/utils.c (gnat_write_global_declarations): Pass false
485 as new argument to the imported_module_or_decl debug hook.
487 2017-07-25 Javier Miranda <miranda@adacore.com>
489 * checks.adb (Apply_Divide_Checks): Ensure that operands are not
492 2017-07-19 Jakub Jelinek <jakub@redhat.com>
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.
498 2017-07-18 Mike Frysinger <vapier@chromium.org>
500 * gcc-interface/Makefile.in (../../gnatmake$(exeext)): Delete $(P).
501 (../../gnatlink$(exeext)): Likewise.
503 2017-07-15 John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
506 * system-linux-m68k.ads: Add pragma No_Elaboration_Code_All.
507 (Backend_Overflow_Checks): Set to True.
509 2017-06-23 Jakub Jelinek <jakub@redhat.com>
511 * gcc-interface/trans.c (gnat_to_gnu): Initialize sync to false.
513 2017-06-21 Pierre-Marie de Rodat <derodat@adacore.com>
515 * gcc-interface/ada-tree.h (DECL_FUNCTION_IS_DEF): Update copyright
517 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Tag the subprogram
519 (Compilation_Unit_to_gnu): Tag the elaboration procedure as a
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
533 2017-06-15 Nicolas Boulenguez <nicolas.boulenguez@free.fr>
536 * gcc-interface/Makefile.in (x86 kfreebsd): Adjust system.ads setting.
537 (i[3456]86-pc-gnu): Likewise.
538 (x86_64 kfreebsd): Likewise.
540 2017-06-12 Eric Botcazou <ebotcazou@adacore.com>
543 * exp_ch3.adb (Make_Predefined_Primitive_Specs): Use Positive index.
545 2017-06-12 Eric Botcazou <ebotcazou@adacore.com>
548 * s-interr-hwint.adb: Reinstate.
549 * gcc-interface/Makefile.in (RTEMS): Use it again.
551 2017-06-08 Olivier Hainque <hainque@adacore.com>
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.
558 2017-06-07 Sebastian Huber <sebastian.huber@embedded-brains.de>
560 * Makefile.in (rtems): Use TLS implementation for s-tpopsp.adb.
561 * s-tpopsp-rtems.adb: Delete.
563 2017-06-02 Olivier Hainque <hainque@adacore.com>
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.
570 2017-05-25 Jonathan Wakely <jwakely@redhat.com>
572 * gcc-interface/utils2.c (compare_elmt_bitpos): Remove redundant
573 const qualifiers that cause -Wignored-qualifiers warnings.
575 2017-05-22 Eric Botcazou <ebotcazou@adacore.com>
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.
581 2017-05-22 Ed Schonberg <schonberg@adacore.com>
582 Eric Botcazou <ebotcazou@adacore.com>
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.
597 2017-05-22 Eric Botcazou <ebotcazou@adacore.com>
599 * gcc-interface/decl.c (gnat_to_gnu_field): Do not enforce strict
600 alignment for simple volatile fields and remove associated errors.
602 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
604 * gcc-interface/gigi.h (get_elaboration_procedure): Delete.
605 * gcc-interface/trans.c (get_elaboration_procedure): Make static.
607 2017-05-15 Pierre-Marie de Rodat <derodat@adacore.com>
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.
613 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
615 * gcc-interface/trans.c (return_value_ok_for_nrv_p): Only apply the
616 addressability check in the constrained case.
618 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
620 * gcc-interface/trans.c (Identifier_to_gnu): Also accept incomplete
621 types not coming from a limited context.
623 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
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.
630 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
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.
642 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
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.
648 2017-05-12 Eric Botcazou <ebotcazou@adacore.com>
650 * system-linux-arm.ads (Memory_Size): Use Long_Integer'Size
651 instead of Word_Size.
654 2017-03-28 Andreas Schwab <schwab@suse.de>
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.
665 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
668 * system-linux-x86.ads (Memory_Size): Use Long_Integer'Size
669 instead of Word_Size.
671 2017-05-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
673 * raise-gcc.c (exception_class_eq): Make ec parameter const.
675 2017-05-02 Richard Biener <rguenther@suse.de>
677 * gcc-interface/misc.c (gnat_post_options): Do not set
680 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
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.
694 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
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
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
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.
722 2017-05-02 Ed Schonberg <schonberg@adacore.com>
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.
731 2017-05-02 Javier Miranda <miranda@adacore.com>
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.
738 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
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.
744 2017-05-02 Bob Duff <duff@adacore.com>
746 * sem_attr.adb (Attribute_Enum_Rep): Disallow T'Enum_Rep.
748 2017-05-02 Vasiliy Fofanov <fofanov@adacore.com>
750 * s-os_lib.ads: Minor typo fix.
752 2017-05-02 Vasiliy Fofanov <fofanov@adacore.com>
754 * gnatls.adb: Merge and refactor code from Prj.Env and remove
755 this deprecated dependency.
757 2017-05-02 Ed Schonberg <schonberg@adacore.com>
759 * exp_util.ads: minor comment addition.
761 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
763 * sem_ch3.adb (Build_Derived_Record_Type): Fix a few typos and
764 pastos in part #3 of the head comment.
766 2017-05-02 Ed Schonberg <schonberg@adacore.com>
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.
774 2017-05-02 Ed Schonberg <schonberg@adacore.com>
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.
780 2017-05-02 Arnaud Charlet <charlet@adacore.com>
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.
786 2017-05-02 Arnaud Charlet <charlet@adacore.com>
788 * sem_case.adb: Remove extra spaces in parameter declarations.
790 2017-05-02 Justin Squirek <squirek@adacore.com>
792 * usage.adb: Replace space with hyphen ("run time" -> "run-time")
793 in usage line for new -gnatwE switch.
795 2017-05-02 Claire Dross <dross@adacore.com>
797 * a-cofuve.ads (Remove): Remove unnecessary
798 conditions in precondition.
800 2017-05-02 Vasiliy Fofanov <fofanov@adacore.com>
802 * a-stream.ads, exp_imgv.adb, sem_ch10.adb,
803 sem_attr.adb, s-finmas.ads, osint.adb: Minor typo fix.
805 2017-05-02 Justin Squirek <squirek@adacore.com>
807 * sem_ch4.adb (Analyze_Case_Expression): Add check for valid
808 alternative expression.
809 * sem_res.adb (Resolve_Case_Expression): Ditto.
811 2017-05-02 Ed Schonberg <schonberg@adacore.com>
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.
824 2017-05-02 Justin Squirek <squirek@adacore.com>
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
835 2017-05-02 Ed Schonberg <schonberg@adacore.com>
837 * sem_prag.adb (Process_Conversion): Reject an intrinsic operator
838 declaration that operates on some fixed point type.
840 2017-05-02 Justin Squirek <squirek@adacore.com>
842 * a-crbtgo.adb, s-taasde.adb: Remove unused use-type clauses.
844 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
846 * sem_ch6.adb (Analyze_Null_Procedure): Revert previous change.
848 2017-05-02 Justin Squirek <squirek@adacore.com>
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
854 * sem_res.adb (Resolve_If_Expression): Add check for valid
855 condition and then-expression.
857 2017-05-02 Ed Schonberg <schonberg@adacore.com>
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
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.
873 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
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.
884 2017-05-02 Jerome Lambourg <lambourg@adacore.com>
886 * bindusg.adb, bindgen.adb, gnatbind.adb, opt.ads: Remove the -nognarl
887 switch introduced recently. finally not needed.
889 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
891 * sem_ch6.adb (Analyze_Null_Procedure): Set the
892 Corresponding_Body link for a null procedure declaration.
894 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
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.
901 2017-05-02 Gary Dismukes <dismukes@adacore.com>
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
921 2017-05-02 Bob Duff <duff@adacore.com>
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
930 2017-05-02 Ed Schonberg <schonberg@adacore.com>
932 * sem_ch3.adb: Comment predicate inheritance.
934 2017-05-02 Tristan Gingold <gingold@adacore.com>
936 * s-trasym.ads: Add comment.
938 2017-05-02 Bob Duff <duff@adacore.com>
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.
946 2017-05-02 Ed Schonberg <schonberg@adacore.com>
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.
957 2017-05-02 Tristan Gingold <gingold@adacore.com>
959 * s-trasym.ads, s-trasym.adb (Enable_Cache): New.
961 2017-05-02 Ed Schonberg <schonberg@adacore.com>
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.
968 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
970 * sem_prag.adb (Analyze_Pragma): Forbid pragma Contract_Cases on null
973 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
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.
984 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
986 * exp_attr.adb: Minor reformatting.
988 2017-05-02 Ed Schonberg <schonberg@adacore.com>
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.
994 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
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.
1000 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
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.
1007 2017-05-02 Bob Duff <duff@adacore.com>
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,
1014 2017-05-02 Yannick Moy <moy@adacore.com>
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 /=.
1023 2017-05-02 Ed Schonberg <schonberg@adacore.com>
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.
1030 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
1032 * checks.adb, sem_ch3.adb, sem_ch6.adb: Minor reformatting.
1034 2017-05-02 Bob Duff <duff@adacore.com>
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.
1042 2017-05-02 Ed Schonberg <schonberg@adacore.com>
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.
1051 2017-05-02 Justin Squirek <squirek@adacore.com>
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.
1063 2017-05-02 Yannick Moy <moy@adacore.com>
1065 * sem_ch10.adb (Analyze_Subunit): Take
1066 configuration pragma into account when restoring appropriate
1067 pragma for analysis of subunit.
1069 2017-05-02 Justin Squirek <squirek@adacore.com>
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.
1076 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
1078 * freeze.adb (Check_Component_Storage_Order): Do not treat bit-packed
1079 array components specially.
1081 2017-05-02 Ed Schonberg <schonberg@adacore.com>
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.
1088 2017-05-01 Eric Botcazou <ebotcazou@adacore.com>
1090 * gcc-interface/decl.c (components_to_record): Add missing guard.
1092 2017-05-01 Eric Botcazou <ebotcazou@adacore.com>
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.
1098 2017-04-28 Ed Schonberg <schonberg@adacore.com>
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.
1104 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
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.
1111 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
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.
1118 2017-04-28 Javier Miranda <miranda@adacore.com>
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.
1138 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
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
1147 * sem_eval.adb (Why_Not_Static): Initialize Typ.
1148 * sem_prag.adb (Analyze_Pragma): Add pragma Warnings on Str.
1150 2017-04-28 Bob Duff <duff@adacore.com>
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
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
1166 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
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.
1184 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
1186 * checks.adb (Install_Primitive_Elaboration_Check):
1187 Do not generate an elaboration check if all checks have been
1190 2017-04-28 Ed Schonberg <schonberg@adacore.com>
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
1198 2017-04-28 Ed Schonberg <schonberg@adacore.com>
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.
1204 2017-04-28 Gary Dismukes <dismukes@adacore.com>
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.
1211 2017-04-28 Arnaud Charlet <charlet@adacore.com>
1213 * a-cforse.adb: minor style fix in comment.
1215 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
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.
1231 2017-04-28 Ed Schonberg <schonberg@adacore.com>
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.
1238 2017-04-28 Bob Duff <duff@adacore.com>
1240 * alloc.ads (Nodes_Initial): Go back to previous value. The large
1241 value makes large compilations faster, but small compilations slower.
1243 2017-04-28 Arnaud Charlet <charlet@adacore.com>
1245 * sem_util.adb: minor typos in Is_Child_Or_Sibling.
1247 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
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
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.
1259 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
1261 * warnsw.ads: Minor fix for incorrect wording in comment.
1263 2017-04-28 Ed Schonberg <schonberg@adacore.com>
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
1274 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
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.
1284 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
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
1291 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
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.
1296 2017-04-28 Gary Dismukes <dismukes@adacore.com>
1298 * exp_util.adb: Minor reformatting.
1300 2017-04-28 Ed Schonberg <schonberg@adacore.com>
1302 * sem_ch4.adb: Fix copy/pasto.
1304 2017-04-27 Tristan Gingold <gingold@adacore.com>
1306 * gcc-interface/Make-lang.in: Define EH_MECHANISM while building
1307 raise-gcc.c. Fix include search path for raise-gcc.c
1309 2017-04-27 Eric Botcazou <ebotcazou@adacore.com>
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.
1328 2017-04-27 Bob Duff <duff@adacore.com>
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.
1340 2017-04-27 Emmanuel Briot <briot@adacore.com>
1342 * g-comlin.adb (Sort_Sections): remove useless test.
1344 2017-04-27 Claire Dross <dross@adacore.com>
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.
1365 2017-04-27 Yannick Moy <moy@adacore.com>
1367 * gnat1drv.adb: Code cleanup.
1369 2017-04-27 Ed Schonberg <schonberg@adacore.com>
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.
1379 2017-04-27 Bob Duff <duff@adacore.com>
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
1385 * sem_util.adb (In_Instance): Speed this up by removing
1386 unnecessary tests; Is_Generic_Instance is defined for all
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
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.
1405 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1407 * sem_eval.adb (Subtypes_Statically_Compatible): Remove duplicated
1409 (Subtypes_Statically_Match): Remove duplicate check.
1410 * sem_prag.adb (Check_Arg_Is_External_Name): Remove duplicate check.
1412 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
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
1421 * g-comlin.adb (Is_In_Config): Merge the processing for No_Space
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
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.
1434 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1436 * checks.adb (Install_Primitive_Elaboration_Check):
1437 Do not generate the check when restriction No_Elaboration_Code
1440 2017-04-27 Ed Schonberg <schonberg@adacore.com>
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
1449 2017-04-27 Yannick Moy <moy@adacore.com>
1451 * gnat1drv.adb (Adjust_Global_Switches): Issue
1452 a warning in GNATprove mode if the runtime library does not
1453 support IEEE-754 floats.
1455 2017-04-27 Ed Schonberg <schonberg@adacore.com>
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.
1461 2017-04-27 Ed Schonberg <schonberg@adacore.com>
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.
1472 2017-04-27 Yannick Moy <moy@adacore.com>
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.
1479 2017-04-27 Yannick Moy <moy@adacore.com>
1481 * sem_res.adb: Remove duplicate code.
1482 * sem_attr.adb: Delete duplicate code.
1484 2017-04-27 Bob Duff <duff@adacore.com>
1486 * g-dyntab.adb: Reduce the amount of copying in
1487 Release. No need to copy items past Last.
1489 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
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
1499 2017-04-27 Bob Duff <duff@adacore.com>
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
1507 2017-04-27 Claire Dross <dross@adacore.com>
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
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
1526 * a-cofuse.adb, a-cofuse.ads (Enable_Handling_Of_Equivalence)
1527 Boolean generic parameter to disable contracts for equivalence
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.
1534 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
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.
1541 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
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.
1547 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
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.
1554 2017-04-27 Bob Duff <duff@adacore.com>
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
1563 2017-04-27 Bob Duff <duff@adacore.com>
1565 * g-dyntab.ads, g-dyntab.adb: Add assertions to subprograms that
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.
1572 2017-04-27 Claire Dross <dross@adacore.com>
1574 * a-cfdlli.ads: Code cleanup.
1576 2017-04-27 Yannick Moy <moy@adacore.com>
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.
1582 2017-04-27 Gary Dismukes <dismukes@adacore.com>
1584 * a-cofuma.ads, a-cfhama.ads: Minor reformatting, grammar, and typo
1587 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
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.
1597 2017-04-27 Gary Dismukes <dismukes@adacore.com>
1599 * xoscons.adb, osint.ads: Minor reformatting.
1601 2017-04-27 Bob Duff <duff@adacore.com>
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
1618 2017-04-27 Bob Duff <duff@adacore.com>
1620 * namet.adb, namet.ads: Minor: remove unused procedures.
1622 2017-04-27 Eric Botcazou <ebotcazou@adacore.com>
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.
1635 2017-04-27 Claire Dross <dross@adacore.com>
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.
1652 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
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.
1658 2017-04-27 Ed Schonberg <schonberg@adacore.com>
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.
1670 2017-04-27 Yannick Moy <moy@adacore.com>
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
1677 2017-04-27 Claire Dross <dross@adacore.com>
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.
1688 2017-04-27 Steve Baird <baird@adacore.com>
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.
1694 2017-04-27 Ed Schonberg <schonberg@adacore.com>
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
1701 * sem_dim.ads: Add comments on setting of dimension vectors and
1702 its interaction with node rewritings and side-effect removal.
1704 2017-04-27 Bob Duff <duff@adacore.com>
1706 * debug.adb: Minor comment correction.
1707 * sem_dim.ads: Minor reformatting and typo fixes.
1709 2017-04-27 Bob Duff <duff@adacore.com>
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
1715 2017-04-27 Ed Schonberg <schonberg@adacore.com>
1717 * exp_util.adb: No wrapper in GNATprove mode.
1719 2017-04-27 Yannick Moy <moy@adacore.com>
1721 * sem_res.adb (Resolve_Comparison_Op): Always
1722 evaluate comparisons between values of universal types.
1724 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
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.
1731 2017-04-27 Ed Schonberg <schonberg@adacore.com>
1733 * freeze.adb: copy-paste typo.
1735 2017-04-27 Yannick Moy <moy@adacore.com>
1737 * sem_prag.adb (Analyze_Pre_Post_In_Decl_Part):
1738 Use correct test to detect call in GNATprove mode instead of
1741 2017-04-27 Claire Dross <dross@adacore.com>
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
1761 (Delete): Subprogram restored, it seems it was useful to users even if
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
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
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
1782 (Delete): Subprogram restored, it seems it was useful to users even if
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
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.
1794 2017-04-27 Bob Duff <duff@adacore.com>
1796 * g-dyntab.adb (Release): When allocating the new
1797 table, use the correct slice of the old table to initialize it.
1799 2017-04-27 Eric Botcazou <ebotcazou@adacore.com>
1801 * einfo.ads: Minor fixes in comments.
1803 2017-04-27 Ed Schonberg <schonberg@adacore.com>
1805 * sem_prag.adb: disable clones in SPARK_Mode.
1807 2017-04-27 Gary Dismukes <dismukes@adacore.com>
1809 * sem_util.ads, contracts.adb: Minor reformatting.
1811 2017-04-27 Ed Schonberg <schonberg@adacore.com>
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
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.
1845 2017-04-27 Steve Baird <baird@adacore.com>
1847 * exp_util.adb (Build_Allocate_Deallocate_Proc):
1848 Add "Suppress => All_Checks" to avoid generating unnecessary
1851 2017-04-27 Yannick Moy <moy@adacore.com>
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.
1859 2017-04-27 Arnaud Charlet <charlet@adacore.com>
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.
1866 2017-04-27 Yannick Moy <moy@adacore.com>
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.
1872 2017-04-27 Jerome Lambourg <lambourg@adacore.com>
1874 * bindusg.adb, bindgen.adb, gnatbind.adb, opt.ads: add -nognarl switch.
1876 2017-04-27 Justin Squirek <squirek@adacore.com>
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
1882 (Process_Component_List_For_Finalization): Correct calls to
1883 Process_Component_For_Finalize to take Num_Comps as a parameter.
1885 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
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.
1893 2017-04-27 Tristan Gingold <gingold@adacore.com>
1895 * raise-gcc.c: Don't use unwind.h while compiling
1896 for the frontend, but mimic host behavior.
1898 2017-04-27 Javier Miranda <miranda@adacore.com>
1900 * sem_ch3.adb (Build_Discriminated_Subtype):
1901 Propagate Has_Pragma_Unreferenced_Objects to the built subtype.
1903 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
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
1909 (Analyze_Input_Output): Do not consider discriminants
1910 because they are not "entire objects".
1912 2017-04-27 Ed Schonberg <schonberg@adacore.com>
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
1920 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
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:
1926 2017-04-27 Ed Schonberg <schonberg@adacore.com>
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
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.
1937 2017-04-27 Bob Duff <duff@adacore.com>
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.
1943 2017-04-27 Steve Baird <baird@adacore.com>
1945 * exp_attr.adb (Expand_N_Attribute_Reference):
1946 Don't expand Image, Wide_Image, Wide_Wide_Image attributes
1949 2017-04-27 Yannick Moy <moy@adacore.com>
1951 * exp_unst.ads: Fix typos in comments.
1953 2017-04-27 Ed Schonberg <schonberg@adacore.com>
1955 * sem_eval.adb (Choice_Matches): Handle properly a real literal
1956 whose type has a defined static predicate.
1958 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
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.
1965 2017-04-27 Pierre-Marie de Rodat <derodat@adacore.com>
1967 * gcc-interface/utils.c (gnat_type_for_size): Set
1968 TYPE_ARTIFICIAL on created types.
1970 2017-04-27 Claire Dross <dross@adacore.com>
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.
1980 2017-04-27 Gary Dismukes <dismukes@adacore.com>
1982 * exp_spark.adb, sem_elab.adb: Minor reformatting and typo fix.
1984 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
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
1995 2017-04-27 Tristan Gingold <gingold@adacore.com>
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++
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
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.
2024 2017-04-27 Claire Dross <dross@adacore.com>
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.
2034 2017-04-27 Gary Dismukes <dismukes@adacore.com>
2036 * exp_spark.adb, sem_elab.adb: Minor reformatting and typo fix.
2038 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
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
2049 2017-04-27 Tristan Gingold <gingold@adacore.com>
2051 * a-except.ads, a-except.adb, a-exexpr.adb: Removed (will be
2052 replaced by their variants).
2054 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
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.
2060 2017-04-27 Tristan Gingold <gingold@adacore.com>
2062 * s-excmac-gcc.ads, s-excmac-gcc.adb,
2063 s-excmac-arm.ads, s-excmac-arm.adb (New_Occurrence): Rewrite it in
2066 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
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.
2073 2017-04-27 Claire Dross <dross@adacore.com>
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
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
2083 (First_To_Previous): Removed, model functions should
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.
2100 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
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.
2109 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
2111 * sem.adb (Analyze): Diagnose an illegal iterated component
2113 * sem_util.ads, sem_util.adb
2114 (Diagnose_Iterated_Component_Association): New routine.
2116 2017-04-27 Bob Duff <duff@adacore.com>
2118 * adaint.c (__gnat_get_current_dir): Return 0 in length if
2120 * a-direct.adb, g-dirope.adb, osint.adb, s-os_lib.adb: Raise
2121 exception if getcwd failed.
2123 2017-04-27 Yannick Moy <moy@adacore.com>
2125 * exp_dbug.adb, exp_dbug.ads (Get_External_Name): Prefix ghost
2126 entities with special prefix.
2128 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
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
2139 2017-04-27 Ed Schonberg <schonberg@adacore.com>
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.
2149 2017-04-27 Ed Schonberg <schonberg@adacore.com>
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.
2164 2017-04-27 Bob Duff <duff@adacore.com>
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.
2171 2017-04-27 Claire Dross <dross@adacore.com>
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.
2183 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
2185 * checks.adb (Generate_Range_Check): Revert previous change.
2187 2017-04-27 Gary Dismukes <dismukes@adacore.com>
2189 * sem_util.adb: Minor reformatting/rewording.
2191 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
2193 * lib-xref.adb (Generate_Reference): The use
2194 of attribute 'Result is not considered a violation of pragma
2197 2017-04-27 Justin Squirek <squirek@adacore.com>
2199 * cstand.adb (Create_Standard): Correctly set
2200 Directly_Designated_Type for Any_Access.
2201 * sem_type.adb (Covers): Minor grammar fixes.
2203 2017-04-27 Bob Duff <duff@adacore.com>
2205 * sem_attr.adb: Minor cleanup.
2207 2017-04-27 Claire Dross <dross@adacore.com>
2209 * a-cofuba.ads, a-cofuba.adb (Ada.Containers.Functional_Base): New
2210 private child of Ada.Containers used to implement all functional
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
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
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
2224 * Makefile.rtl: Add new packages.
2225 * impunit.adb: Add new packages.
2227 2017-04-27 Gary Dismukes <dismukes@adacore.com>
2229 * sem_ch4.adb: Minor reformatting.
2231 2017-04-27 Ed Schonberg <schonberg@adacore.com>
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.
2239 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
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.
2245 2017-04-27 Ed Schonberg <schonberg@adacore.com>
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.
2251 2017-04-27 Ed Schonberg <schonberg@adacore.com>
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.
2258 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
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.
2269 2017-04-27 Bob Duff <duff@adacore.com>
2271 * atree.ads: Minor edit.
2273 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
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.
2279 2017-04-27 Bob Duff <duff@adacore.com>
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.
2285 2017-04-27 Yannick Moy <moy@adacore.com>
2287 * sem_util.adb (Check_Result_And_Post_State):
2288 Handle more precisely each conjunct in expressions formed by
2289 and'ing sub-expressions.
2291 2017-04-27 Gary Dismukes <dismukes@adacore.com>
2293 * exp_ch4.adb, sem_ch4.adb: Minor typo fix and reformatting.
2295 2017-04-25 Arnaud Charlet <charlet@adacore.com>
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
2312 2017-04-25 Arnaud Charlet <charlet@adacore.com>
2314 * exp_ch4.adb (Expand_N_Case_Expression): Emit error message when
2315 generating C code on complex case expressions.
2317 2017-04-25 Arnaud Charlet <charlet@adacore.com>
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
2324 * bindgen.adb: Silence new warning on pragma Ada_95.
2326 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2328 * checks.adb (Generate_Range_Check): Revert part of previous change.
2330 2017-04-25 Ed Schonberg <schonberg@adacore.com>
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.
2336 2017-04-25 Olivier Ramonat <ramonat@adacore.com>
2338 * prj-proc.adb, sem_util.adb, s-stposu.adb, sem_attr.adb, prj-conf.ads:
2339 Fix spelling mistakes.
2341 2017-04-25 Bob Duff <duff@adacore.com>
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
2362 2017-04-25 Gary Dismukes <dismukes@adacore.com>
2364 * exp_util.adb, exp_ch4.adb: Minor reformatting.
2366 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
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
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.
2377 2017-04-25 Vasiliy Fofanov <fofanov@adacore.com>
2379 * prj-part.adb, cstreams.c, osint.adb, osint.ads: Remove VMS specific
2380 code and some subprogram calls that are now noop.
2382 2017-04-25 Arnaud Charlet <charlet@adacore.com>
2384 * exp_ch4.adb (Expand_N_Case_Expression): Take
2385 Minimize_Expression_With_Actions into account when possible.
2387 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
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.
2402 2017-04-25 Ed Schonberg <schonberg@adacore.com>
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.
2408 2017-04-25 Ed Schonberg <schonberg@adacore.com>
2410 * sem_dim.adb (Dimensions_Of_Operand): The dimensions of a type
2411 conversion are those of the target type.
2413 2017-04-25 Bob Duff <duff@adacore.com>
2415 * a-clrefi.adb: Minor cleanup.
2417 2017-04-25 Gary Dismukes <dismukes@adacore.com>
2419 * exp_util.adb, exp_util.ads, types.ads: Minor reformatting.
2421 2017-04-25 Bob Duff <duff@adacore.com>
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.
2433 2017-04-25 Claire Dross <dross@adacore.com>
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.
2439 2017-04-25 Bob Duff <duff@adacore.com>
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
2446 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
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
2467 * exp_ch3.adb (Freeze_Type): Change the way the Ghost mode is
2469 * exp_disp.adb (Make_DT): Change the way the Ghost mode is saved
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
2483 * ghost.adb (Mark_And_Set_Ghost_Assignment): Remove parameter Mode
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
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.
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
2511 * lib.ads Remove obsolete fields SPARK_Mode_Pragma from various
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
2525 * sem.adb (Analyze): Change the way the Ghost mode is saved
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
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.
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.
2584 2017-04-25 Ed Schonberg <schonberg@adacore.com>
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.
2596 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
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
2604 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2606 * par_sco.adb: Minor reformatting.
2608 2017-04-25 Ed Schonberg <schonberg@adacore.com>
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.
2614 2017-04-25 Tristan Gingold <gingold@adacore.com>
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.
2621 2017-04-25 Justin Squirek <squirek@adacore.com>
2623 * sem_cat.adb (Validate_RT_RAT_Component): Added
2624 an extra check to ignore incomplete types.
2626 2017-04-25 Thomas Quinot <quinot@adacore.com>
2628 * sem_prag.adb (Analyze_Pragma, case Pragma_Check): Remove
2629 bogus circuitry for the case where Name is Predicate.
2631 2017-04-25 Thomas Quinot <quinot@adacore.com>
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.
2639 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
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
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
2651 (Tree_Write): Remove now obsolete pair of pragmas Warnings Off / On.
2652 * usage.adb Remove now obsolete pair of pragmas Warnings Off / On.
2654 2017-04-25 Bob Duff <duff@adacore.com>
2656 * sem_elab.adb (In_Task_Activation): Trace internal calls in
2659 2017-04-25 Gary Dismukes <dismukes@adacore.com>
2661 * sem_prag.adb, sem_warn.adb, sem_eval.adb: Minor reformatting and
2664 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2666 * comperr.adb (Compiler_Abort): Add a pair of pragma Warnings
2667 On/Off to defend against a spurious warning in conditional
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.
2691 2017-04-25 Arnaud Charlet <charlet@adacore.com>
2693 * sinfo.ads, sem_ch13.adb: Update comment.
2695 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2697 * sem_util.adb (Is_Post_State): A reference to a
2698 generic in out parameter is considered a change in the post-state
2701 2017-04-25 Ed Schonberg <schonberg@adacore.com>
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
2708 2017-04-25 Ed Schonberg <schonberg@adacore.com>
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..
2722 2017-04-25 Tristan Gingold <gingold@adacore.com>
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
2735 (Sig_Flags): Add choice for Pragma_Deadline_Floor.
2736 * snames.ads-tmpl (Name_Deadline_Floor, Name_Gnat_Ravenscar_EDF):
2738 (Pragma_Deadline_Floor): New pragma.
2739 * targparm.adb (Get_Target_Parameters): Recognize
2740 GNAT_Ravenscar_EDF profile.
2742 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
2744 * gnatvsn.ads (Library_Version): Bump to 8. Update comment.
2746 2017-04-25 Ed Schonberg <schonberg@adacore.com>
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
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.
2758 2017-04-25 Javier Miranda <miranda@adacore.com>
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.
2764 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
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.
2772 2017-04-25 Ed Schonberg <schonberg@adacore.com>
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.
2777 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2779 * exp_ch6.adb, sem_ch13.adb, sem_ch6.adb: Minor reformatting.
2781 2017-04-25 Bob Duff <duff@adacore.com>
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.
2788 2017-04-25 Ed Schonberg <schonberg@adacore.com>
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.
2800 2017-04-25 Pascal Obry <obry@adacore.com>
2802 * g-sercom.ads: Add simple usage of GNAT.Serial_Communication.
2804 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
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.
2814 2017-04-25 Thomas Quinot <quinot@adacore.com>
2816 * sem_ch13.adb (Build_Predicate_Function_Declaration): Set
2817 Needs_Debug_Info when producing SCOs.
2819 2017-04-25 Thomas Quinot <quinot@adacore.com>
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.
2825 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
2829 * a-ngcoar.adb, a-ngrear.adb (Inverse): call Unit_Matrix with First_1
2830 set to A'First(2) and vice versa.
2832 2017-04-25 Yannick Moy <moy@adacore.com>
2834 * freeze.adb (Freeze_Record_Type): Remove obsolete
2835 rule on volatile tagged record restriction on SPARK code.
2837 2017-04-25 Yannick Moy <moy@adacore.com>
2839 * sem_prag.adb (minor) Fix SPARK RM reference.
2841 2017-04-25 Yannick Moy <moy@adacore.com>
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
2849 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
2851 * sem_res.adb (Set_Slice_Subtype): Treat specially bit-packed
2852 array types only instead of all packed array types.
2854 2017-04-25 Ed Schonberg <schonberg@adacore.com>
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
2860 * sem_dim.ads, sem_dim.adb (Dimensions_Match): New utility
2863 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
2865 * gnatxref.adb, gnatfind.adb: Avoid using the term project file,
2868 2017-04-25 Yannick Moy <moy@adacore.com>
2870 * sem_util.adb: Minor refactoring.
2871 * freeze.adb (Freeze_Record_Type): Fix checking of SPARK RM 7.1.3(5).
2873 2017-04-25 Claire Dross <dross@adacore.com>
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
2880 2017-04-25 Ed Schonberg <schonberg@adacore.com>
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.
2886 2017-04-25 Ed Schonberg <schonberg@adacore.com>
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.
2894 2017-04-25 Yannick Moy <moy@adacore.com>
2896 * sem_util.adb (Is_Effectively_Volatile): Protect against base type
2897 of array that is private.
2899 2017-04-25 Gary Dismukes <dismukes@adacore.com>
2901 * sem_ch3.adb, exp_util.adb, sem_prag.adb, exp_ch4.adb: Minor
2904 2017-04-25 Yannick Moy <moy@adacore.com>
2906 * a-ngelfu.adb, a-ngelfu.ads: Add SPARK_Mode On on spec, Off
2909 2017-04-25 Ed Schonberg <schonberg@adacore.com>
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.
2915 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2917 * exp_util.adb: Minor reformatting.
2919 2017-04-25 Justin Squirek <squirek@adacore.com>
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.
2957 2017-04-25 Bob Duff <duff@adacore.com>
2959 * a-numeri.ads: Go back to using brackets encoding for the Greek
2962 2017-04-25 Ed Schonberg <schonberg@adacore.com>
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.
2974 2017-04-25 Javier Miranda <miranda@adacore.com>
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.
2980 2017-04-25 Javier Miranda <miranda@adacore.com>
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
2987 2017-04-25 Pascal Obry <obry@adacore.com>
2989 * prj-attr.adb, snames.ads-tmpl: Add package Install's
2990 Required_Artifacts attribute.
2992 2017-04-25 Ed Schonberg <schonberg@adacore.com>
2994 * sem_util.adb (Same_Value): String literals are compile-time
2995 values, and comparing them must use Expr_Value_S.
2997 2017-04-25 Ed Schonberg <schonberg@adacore.com>
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
3008 2017-04-25 Bob Duff <duff@adacore.com>
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,
3017 * scng.adb, s-wchcnv.adb: Minor.
3019 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3021 * sem_ch3.adb, sem_ch8.adb, sem_disp.adb: Minor reformatting.
3022 2017-04-25 Ed Schonberg <schonberg@adacore.com>
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
3035 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3037 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Code cleanup.
3038 (Build_Adjust_Statements): Code cleanup.
3039 (Build_Finalizer): Update the initialization of
3041 (Build_Finalize_Statements): Code cleanup.
3042 (Build_Initialize_Statements): Code cleanup.
3043 (Make_Deep_Array_Body): Update the initialization of
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
3050 * exp_util.ads, exp_util.adb (Exceptions_In_Finalization_OK): New
3052 * sem_ch11.adb (Analyze_Exception_Handlers): Do not check any
3053 restrictions when the handler is internally generated and the
3056 2017-04-25 Ed Schonberg <schonberg@adacore.com>
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.
3065 2017-04-25 Gary Dismukes <dismukes@adacore.com>
3067 * sem_ch10.adb: Minor typo fix.
3069 2017-04-25 Arnaud Charlet <charlet@adacore.com>
3071 * gcc-interface/Makefile.in: Cleanup VxWorks targets.
3073 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
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.
3079 2017-04-25 Bob Duff <duff@adacore.com>
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.
3085 2017-04-25 Bob Duff <duff@adacore.com>
3087 * opt.ads (Locking_Policy): Fix incorrect documentation. The
3088 first character of the policy name is not unique.
3090 2017-04-25 Bob Duff <duff@adacore.com>
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
3097 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
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
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
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
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
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".
3160 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3162 * bindgen.adb, exp_dbug.adb, errout.adb, fname.adb: Minor reformatting.
3164 2017-04-25 Bob Duff <duff@adacore.com>
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 =>
3170 * sem.ads: Fix comment.
3171 * expander.ads: Fix comment.
3172 * exp_atag.ads: Fix comment: "Index = 0" should be
3175 2017-04-25 Gary Dismukes <dismukes@adacore.com>
3177 * s-taprop-linux.adb: Minor editorial fixes.
3179 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
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.
3187 2017-04-25 Olivier Hainque <hainque@adacore.com>
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.
3198 2017-04-25 Pierre-Marie de Rodat <derodat@adacore.com>
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.
3205 2017-04-25 Yannick Moy <moy@adacore.com>
3207 * errout.adb (Error_Msg): Adapt continuation
3208 message in instantiations and inlined bodies for info messages.
3210 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
3212 * fname.adb (Has_Internal_Extension): Add pragma Inline.
3213 Use direct 4-character slice comparisons.
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.
3222 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
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.
3231 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3233 * sem_prag.adb, exp_ch6.adb, binde.adb, sem_disp.adb, s-fileio.adb:
3236 2017-04-25 Bob Duff <duff@adacore.com>
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.
3249 2017-04-25 Bob Duff <duff@adacore.com>
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.
3270 2017-04-25 Ed Schonberg <schonberg@adacore.com>
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.
3276 2017-04-25 Javier Miranda <miranda@adacore.com>
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).
3283 2017-04-25 Pascal Obry <obry@adacore.com>
3285 * s-string.adb: Minor code clean-up.
3287 2017-04-25 Bob Duff <duff@adacore.com>
3289 * s-os_lib.ads, s-os_lib.adb (Non_Blocking_Wait_Process): New
3291 * adaint.h, adaint.c (__gnat_portable_no_block_wait): C support
3292 function for Non_Blocking_Wait_Process.
3294 2017-04-25 Bob Duff <duff@adacore.com>
3296 * prep.adb (Preprocess): Remove incorrect
3297 Assert. Current character can be ASCII.CR.
3299 2017-04-25 Ed Schonberg <schonberg@adacore.com>
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.
3306 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
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.
3313 2017-04-25 Javier Miranda <miranda@adacore.com>
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):
3326 * usage.adb: Document -gnatw.j and -gnatw.J.
3328 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3330 * exp_ch7.adb, checks.adb, sem_prag.adb, eval_fat.adb: Minor
3333 2017-04-25 Bob Duff <duff@adacore.com>
3335 * binde.adb (Validate): Do not pass dynamic strings
3336 to pragma Assert, because older compilers do not support that.
3338 2017-04-25 Bob Duff <duff@adacore.com>
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.
3352 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3354 * checks.adb (Insert_Valid_Check): Do not generate
3355 a validity check when inside a generic.
3357 2017-04-25 Yannick Moy <moy@adacore.com>
3359 * sem_res.adb (Resolve_Type_Conversion): Fix bad logic.
3361 2017-04-25 Arnaud Charlet <charlet@adacore.com>
3363 * snames.ads-tmpl (Snames): More names for detecting predefined
3364 potentially blocking subprograms.
3366 2017-04-25 Ed Schonberg <schonberg@adacore.com>
3368 * sem_prag.adb (Analyze_Pre_Post_Condition): The rules
3369 concerning inheritance of class-wide preconditions do not apply
3372 2017-04-25 Bob Duff <duff@adacore.com>
3374 * s-ficobl.ads: Minor comment fix.
3376 2017-04-25 Yannick Moy <moy@adacore.com>
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
3391 2017-04-25 Yannick Moy <moy@adacore.com>
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.
3398 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3400 * checks.adb (Insert_Valid_Check): Partially reimplement validity
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
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.
3418 2017-04-25 Steve Baird <baird@adacore.com>
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.
3424 2017-04-25 Ed Schonberg <schonberg@adacore.com>
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.
3433 2017-04-25 Bob Duff <duff@adacore.com>
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
3443 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3445 * exp_ch6.adb: Minor reformatting.
3447 2017-04-25 Bob Duff <duff@adacore.com>
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.
3456 2017-04-25 Ed Schonberg <schonberg@adacore.com>
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
3464 2017-04-25 Steve Baird <baird@adacore.com>
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).
3475 2017-04-25 Ed Schonberg <schonberg@adacore.com>
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.
3481 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
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.
3489 2017-04-25 Bob Duff <duff@adacore.com>
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.
3496 2017-04-25 Gary Dismukes <dismukes@adacore.com>
3498 * exp_dbug.adb: Minor rewording and reformatting.
3500 2017-04-25 Ed Schonberg <schonberg@adacore.com>
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
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.
3513 2017-04-25 Bob Duff <duff@adacore.com>
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.
3519 2017-04-25 Bob Duff <duff@adacore.com>
3521 * namet.ads, namet.adb (Global_Name_Buffer): Increase the length
3522 of the global name buffer to 4*Max_Line_Length.
3524 2017-04-25 Javier Miranda <miranda@adacore.com>
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.
3530 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
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.
3536 2017-04-25 Pierre-Marie de Rodat <derodat@adacore.com>
3538 * exp_dbug.adb: In Debug_Renaming_Declaration,
3539 skip slices that are made redundant by an indexed component
3541 * atree.h: New definition for Original_Node.
3543 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3545 * sem_prag.adb, sem_prag.ads: Minor reformatting.
3547 2017-04-25 Ed Schonberg <schonberg@adacore.com>
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.
3556 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
3558 * a-numaux.ads: Fix description of a-numaux-darwin
3560 (Double): Define to Long_Float.
3561 * a-numaux-vxworks.ads (Double): Likewise.
3562 * a-numaux-darwin.ads
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.
3572 2017-04-25 Ed Schonberg <schonberg@adacore.com>
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
3579 2017-04-25 Ed Schonberg <schonberg@adacore.com>
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
3586 2017-04-25 Patrick Bernardi <bernardi@adacore.com>
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.
3594 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
3596 * sem_eval.adb (Compile_Time_Compare): Reinstate the expr+literal
3597 (etc) optimizations when the type is modular and the offsets
3600 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
3602 * s-osinte-freebsd.ads: Minor comment tweaks
3604 2017-04-25 Javier Miranda <miranda@adacore.com>
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).
3611 2017-04-25 Bob Duff <duff@adacore.com>
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
3620 2017-04-25 Bob Duff <duff@adacore.com>
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.
3631 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
3633 * gnat1drv.adb (Gnat1Drv): Disable Generate_Processed_File in
3636 2017-04-25 Javier Miranda <miranda@adacore.com>
3638 * urealp.adb (UR_Write): Fix output of constants with a base other
3641 2017-04-25 Justin Squirek <squirek@adacore.com>
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
3651 2017-04-25 Gary Dismukes <dismukes@adacore.com>
3653 * exp_ch7.adb, einfo.ads, sem_prag.adb: Minor reformatting and typo
3656 2017-04-25 Yannick Moy <moy@adacore.com>
3658 * sem_res.adb (Resolve_Comparison_Op): Do not
3659 attempt evaluation of relational operations inside assertions.
3661 2017-04-25 Justin Squirek <squirek@adacore.com>
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.
3671 2017-04-25 Johannes Kanig <kanig@adacore.com>
3673 * errout.adb (Output_Messages): Adjust computation of total
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.
3679 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
3681 * terminals.c (__gnat_terminate_pid): New.
3682 * g-exptty.ads (Terminate_Process): New. Update comments.
3684 2017-04-25 Arnaud Charlet <charlet@adacore.com>
3686 * a-cfinve.ads, a-cofove.ads (Empty_Vector): add Global contract.
3688 2017-04-25 Justin Squirek <squirek@adacore.com>
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
3696 2017-04-25 Ed Schonberg <schonberg@adacore.com>
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.
3705 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3707 * sem_ch5.adb, fname.adb: Minor reformatting.
3709 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
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
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.
3735 2017-04-25 Bob Duff <duff@adacore.com>
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.
3744 2017-04-25 Javier Miranda <miranda@adacore.com>
3746 * debug.adb: Update documentation of -gnatd.6.
3748 2017-04-25 Ed Schonberg <schonberg@adacore.com>
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.
3754 2017-04-25 Bob Duff <duff@adacore.com>
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".
3769 2017-04-25 Justin Squirek <squirek@adacore.com>
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.
3787 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3789 * make.adb, par-ch2.adb, sem_util.adb, scans.ads, sem_ch8.adb,
3790 scn.adb, osint.adb, fname.adb: Minor reformatting.
3792 2017-04-25 Pascal Obry <obry@adacore.com>
3794 * s-taprop-mingw.adb: Do not check for CloseHandle in
3797 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3799 * sem_util.adb (Check_Part_Of_Reference):
3800 Continue to examine the context if the reference appears within
3801 an expression function.
3803 2017-04-25 Justin Squirek <squirek@adacore.com>
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.
3819 2017-04-25 Bob Duff <duff@adacore.com>
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.
3834 2017-04-25 Ed Schonberg <schonberg@adacore.com>
3836 * osint.adb (Find_File): Handle properly a request for a
3837 configuration file whose name is a directory.
3839 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3841 * sem_attr.adb, sem_ch5.adb: Minor reformatting.
3843 2017-04-25 Bob Duff <duff@adacore.com>
3845 * types.ads: Minor: Fix '???' comment.
3846 * sem_ch8.adb: Minor comment fix.
3848 2017-04-25 Bob Duff <duff@adacore.com>
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.
3855 2017-04-25 Justin Squirek <squirek@adacore.com>
3857 * sem_ch3.adb (Analyze_Declarations): Add
3858 additional condition for edge case.
3860 2017-04-25 Bob Duff <duff@adacore.com>
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.
3867 2017-04-25 Javier Miranda <miranda@adacore.com>
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
3875 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3877 * exp_util.adb (Build_Chain): Account for ancestor
3878 subtypes while traversing the derivation chain.
3880 2017-04-25 Ed Schonberg <schonberg@adacore.com>
3882 * sem_attr.adb: minor reformatting.
3884 2017-04-25 Doug Rupp <rupp@adacore.com>
3886 * sigtramp-vxworks-target.inc [PPC64]: Add a .localentry pseudo-op.
3888 2017-04-25 Ed Schonberg <schonberg@adacore.com>
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.
3898 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
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
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
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.
3933 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
3935 * a-tasatt.adb: Complete previous change and use an unsigned
3936 int to avoid overflow checks.
3938 2017-04-25 Ed Schonberg <schonberg@adacore.com>
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)).
3946 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3948 * sem_aggr.adb, inline.adb, einfo.adb, einfo.ads, scng.adb,
3949 sem_prag.adb: Minor reformatting.
3951 2017-04-25 Bob Duff <duff@adacore.com>
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.
3959 2017-04-25 Javier Miranda <miranda@adacore.com>
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.
3965 2017-04-25 Javier Miranda <miranda@adacore.com>
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.
3972 2017-04-25 Ed Schonberg <schonberg@adacore.com>
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.
3985 2017-04-25 Ed Schonberg <schonberg@adacore.com>
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
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.
4000 2017-04-25 Bob Duff <duff@adacore.com>
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.
4007 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
4009 * a-tasatt.adb (Set_Value): Fix handling of 32bits -> 64bits
4012 2017-04-25 Doug Rupp <rupp@adacore.com>
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.
4019 2017-04-25 Arnaud Charlet <charlet@adacore.com>
4021 * ada_get_targ.adb: New file.
4023 2017-04-25 Bob Duff <duff@adacore.com>
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.
4030 * uintp.ads: Minor cleanup.
4032 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
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.
4039 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4041 * sem_ch3.adb, exp_util.adb, sem_prag.adb, freeze.adb, sem_util.adb:
4044 2017-04-25 Ed Schonberg <schonberg@adacore.com>
4046 * scng.adb (Scan): Handle '@' appropriately.
4047 * sem_ch5.adb: Code cleanup.
4049 2017-04-25 Ed Schonberg <schonberg@adacore.com>
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
4056 2017-04-25 Javier Miranda <miranda@adacore.com>
4058 * exp_attr.adb (Rewrite_Stream_Proc_Call): Handle
4059 subtypes of private types when performing the view conversion.
4061 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
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
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
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.
4095 2017-04-25 Tristan Gingold <gingold@adacore.com>
4097 * s-mmap.ads (Data): Add pragma Inline.
4099 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
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.
4106 2017-04-25 Doug Rupp <rupp@adacore.com>
4108 * init.c [VxWorks Section]: Disable sigtramp for ppc64-vx7.
4110 2017-04-25 Ed Schonberg <schonberg@adacore.com>
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.
4127 2017-04-25 Bob Duff <duff@adacore.com>
4129 * s-osinte-linux.ads (pthread_mutexattr_setprotocol,
4130 pthread_mutexattr_setprioceiling): Add new interfaces for these
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.
4137 2017-04-25 Ed Schonberg <schonberg@adacore.com>
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.
4144 2017-04-25 Bob Duff <duff@adacore.com>
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.
4150 2017-04-25 Bob Duff <duff@adacore.com>
4152 * par-ch4.adb (P_Case_Expression): If a semicolon
4153 is followed by "when", assume that ";" was meant to be ",".
4155 2017-04-25 Gary Dismukes <dismukes@adacore.com>
4157 * sem_ch9.adb, sem_ch10.adb, sem_util.adb: Minor reformatting and typo
4160 2017-04-25 Arnaud Charlet <charlet@adacore.com>
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.
4172 2017-04-25 Javier Miranda <miranda@adacore.com>
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.
4187 2017-04-25 Thomas Quinot <quinot@adacore.com>
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.
4199 2017-04-04 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
4201 * system-linux-s390.ads: Use Long_Integer'Size to define
4204 2017-04-04 Eric Botcazou <ebotcazou@adacore.com>
4206 * sem_ch3.adb (Build_Derived_Record_Type): Fix long line.
4208 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
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.
4219 2017-03-28 Andreas Schwab <schwab@suse.de>
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.
4230 2017-03-14 James Cowgill <James.Cowgill@imgtec.com>
4232 * s-osinte-linux.ads (struct_sigaction): Use correct type for sa_flags.
4234 2017-03-08 Thanassis Tsiodras <ttsiodras@gmail.com>
4237 * socket.c (__gnat_gethostbyaddr): Add missing test for __rtems__.
4239 2017-03-08 Eric Botcazou <ebotcazou@adacore.com>
4242 * system-linux-ppc.ads (Default_Bit_Order): Use Standard's setting.
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.
4251 2017-02-24 Jakub Jelinek <jakub@redhat.com>
4254 * gcc-interface/misc.c (gnat_handle_option): Pass true to
4255 handle_generated_option GENERATED_P.
4257 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
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.
4263 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
4265 * gcc-interface/trans.c (gnat_to_gnu): Do not apply special handling
4266 of boolean rvalues to function calls.
4268 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
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.
4276 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
4278 * gcc-interface/trans.c (return_value_ok_for_nrv_p): Add sanity check.
4280 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
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.
4288 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
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.
4294 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
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.
4301 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
4303 * gcc-interface/utils.c (max_size) <tcc_expression>: Flip the second
4304 argument when recursing on TRUTH_NOT_EXPR.
4306 2017-02-12 John Marino <gnugcc@marino.st>
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.
4315 2017-02-09 Gerald Pfeifer <gerald@pfeifer.com>
4317 * comperr.adb: Update FSF bug reporting URL.
4319 2017-02-01 Eric Botcazou <ebotcazou@adacore.com>
4320 Jakub Jelinek <jakub@redhat.com>
4323 * adaint.c (__gnat_killprocesstree): Fix broken string handling.
4325 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
4328 * gcc-interface/utils.c (get_global_context): Pass main_input_filename
4329 to build_translation_unit_decl.
4331 2017-01-23 Javier Miranda <miranda@adacore.com>
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
4346 2017-01-23 Ed Schonberg <schonberg@adacore.com>
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
4359 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
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.
4366 2017-01-23 Yannick Moy <moy@adacore.com>
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.
4373 2017-01-23 Javier Miranda <miranda@adacore.com>
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.
4379 2017-01-23 Gary Dismukes <dismukes@adacore.com>
4381 * exp_strm.ads: Minor reformatting and typo fixes.
4383 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
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.
4390 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
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.
4396 2017-01-23 Tristan Gingold <gingold@adacore.com>
4398 * s-boustr.ads, s-boustr.adb (Is_Full): New function.
4400 2017-01-23 Ed Schonberg <schonberg@adacore.com>
4402 * expander.adb: Handle N_Delta_Aggregate.
4404 2017-01-23 Javier Miranda <miranda@adacore.com>
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.
4410 2017-01-23 Javier Miranda <miranda@adacore.com>
4412 * checks.adb (Apply_Parameter_Aliasing_Checks):
4413 Remove side effects of the actuals before generating the overlap
4416 2017-01-23 Justin Squirek <squirek@adacore.com>
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.
4425 2017-01-23 Gary Dismukes <dismukes@adacore.com>
4427 * scng.adb: Minor reformatting of error message.
4429 2017-01-23 Ed Schonberg <schonberg@adacore.com>
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
4436 2017-01-23 Ed Schonberg <schonberg@adacore.com>
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
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
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.
4461 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
4463 * exp_ch11.adb (Expand_N_Exception_Declaration): Generate an
4464 empty name when the exception declaration is subject to pragma
4466 (Null_String): New routine.
4468 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
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
4477 2017-01-23 Pascal Obry <obry@adacore.com>
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.
4483 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
4485 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
4486 allow an 'Address clause to be specified on a prefix of a
4489 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
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.
4498 2017-01-23 Justin Squirek <squirek@adacore.com>
4500 * sem_eval.adb (Eval_Integer_Literal): Add special
4501 case to avoid optimizing out check if the literal appears in
4504 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
4506 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
4507 allow an 'Address clause to be specified on a prefix of a
4510 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
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.
4519 2017-01-23 Justin Squirek <squirek@adacore.com>
4521 * sem_eval.adb (Eval_Integer_Literal): Add special
4522 case to avoid optimizing out check if the literal appears in
4525 2017-01-23 Ed Schonberg <schonberg@adacore.com>
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
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.
4538 2017-01-23 Yannick Moy <moy@adacore.com>
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
4548 2017-01-23 Thomas Quinot <quinot@adacore.com>
4550 * scos.ads: Document usage of 'd' as default SCO kind for
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.
4559 2017-01-23 Bob Duff <duff@adacore.com>
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.
4566 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
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
4571 * exp_ch9.adb: minor style fix in comment.
4573 2017-01-23 Ed Schonberg <schonberg@adacore.com>
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.
4579 2017-01-23 Yannick Moy <moy@adacore.com>
4581 * exp_spark.adb: Alphabetize with clauses.
4583 2017-01-23 Yannick Moy <moy@adacore.com>
4585 * sem_util.adb (Has_Enabled_Property): Treat
4586 protected objects and variables differently from other variables.
4588 2017-01-23 Thomas Quinot <quinot@adacore.com>
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.
4601 2017-01-23 Justin Squirek <squirek@adacore.com>
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.
4607 2017-01-23 Ed Schonberg <schonberg@adacore.com>
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.
4635 2017-01-23 Eric Botcazou <ebotcazou@adacore.com>
4637 * checks.adb: Minor fix in comment.
4639 2017-01-23 Philippe Gil <gil@adacore.com>
4641 * g-debpoo.adb (Do_Report) remove freed chunks from chunks
4642 count in Sort = Memory_Usage or Allocations_Count
4644 2017-01-23 Justin Squirek <squirek@adacore.com>
4646 * sem_ch3.adb: Code cleanup.
4648 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
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.
4664 2017-01-23 Ed Schonberg <schonberg@adacore.com>
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.
4671 2017-01-23 Justin Squirek <squirek@adacore.com>
4673 * sem_ch3.adb (Analyze_Declarations): Add detection
4674 of an edge case and delay freezing if it is present.
4676 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
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.
4681 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
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.
4691 2017-01-23 Claire Dross <dross@adacore.com>
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.
4697 2017-01-23 Claire Dross <dross@adacore.com>
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.
4707 2017-01-23 Pierre-Marie de Rodat <derodat@adacore.com>
4709 * scos.ads: Introduce a constant to represent ignored
4710 dependencies in SCO_Unit_Table_Entry.
4712 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
4714 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Remove extra
4715 spaces from error messages.
4717 2017-01-23 Ed Schonberg <schonberg@adacore.com>
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.
4727 2017-01-23 Justin Squirek <squirek@adacore.com>
4729 * a-wtenau.adb, par-endh.adb, sem_prag.adb,
4730 sem_type.adb: Code cleanups.
4732 2017-01-23 Bob Duff <duff@adacore.com>
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.
4743 2017-01-21 Eric Botcazou <ebotcazou@adacore.com>
4745 * sem_eval.adb (Compile_Time_Compare): Reinstate the expr+literal (etc)
4746 optimizations when the type is modular and the offsets are equal.
4748 2017-01-20 Thomas Quinot <quinot@adacore.com>
4750 * sem_warn.adb (Warn_On_Useless_Assignment): Adjust wording of warning
4753 2017-01-20 Nicolas Roche <roche@adacore.com>
4755 * terminals.c: Ignore failures on setpgid and tcsetpgrp commands.
4757 2017-01-20 Bob Duff <duff@adacore.com>
4759 * sem_eval.adb (Compile_Time_Compare): Disable the expr+literal
4760 (etc) optimizations when the type is modular.
4762 2017-01-20 Yannick Moy <moy@adacore.com>
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.
4771 2017-01-20 Bob Duff <duff@adacore.com>
4773 * sem_ch3.adb (Analyze_Declarations): Disable Resolve_Aspects
4775 * sem_ch13.adb (Resolve_Name): Enable setting the entity to
4776 Empty even in ASIS mode.
4778 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
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.
4786 2017-01-20 Ed Schonberg <schonberg@adacore.com>
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.
4793 2017-01-20 Tristan Gingold <gingold@adacore.com>
4795 * s-osinte-vxworks.ads (Interrup_Range): New subtype.
4797 2017-01-20 Ed Schonberg <schonberg@adacore.com>
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.
4803 2017-01-20 Pascal Obry <obry@adacore.com>
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
4809 2017-01-20 Bob Duff <duff@adacore.com>
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.
4815 2017-01-20 Gary Dismukes <dismukes@adacore.com>
4817 * s-rident.ads (constant Profile_Info): Remove
4818 No_Calendar from GNAT_Extended_Ravenscar restrictions.
4820 2017-01-20 Tristan Gingold <gingold@adacore.com>
4822 * s-maccod.ads: Add pragma No_Elaboration_Code_All
4824 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
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.
4840 2017-01-20 Javier Miranda <miranda@adacore.com>
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.
4849 2017-01-20 Eric Botcazou <ebotcazou@adacore.com>
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.
4859 2017-01-20 Ed Schonberg <schonberg@adacore.com>
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
4867 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
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.
4874 2017-01-20 Ed Schonberg <schonberg@adacore.com>
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
4882 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
4884 * sem_ch10.adb, sem_cat.adb: Minor reformatting.
4886 2017-01-20 Javier Miranda <miranda@adacore.com>
4888 * sem_ch3.adb (Access_Type_Declaration): Protect access to the
4890 * sem_ch10.adb (Install_Siblings): Skip processing malformed trees.
4891 * sem_cat.adb (Validate_Categoriztion_Dependency): Skip processing
4894 2017-01-20 Ed Schonberg <schonberg@adacore.com>
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.
4902 2017-01-20 Tristan Gingold <gingold@adacore.com>
4904 * s-boustr.ads, s-boustr.adb: New package.
4905 * Makefile.rtl: Add s-boustr.
4907 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
4909 * inline.adb (Process_Formals): Qualify the
4910 expression of a return statement when it yields a universal type.
4912 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
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.
4918 2017-01-20 Ed Schonberg <schonberg@adacore.com>
4920 * sem_ch3.adb (Check_Nonoverridable_Aspects); Refine check
4921 for illegal inherited Implicit_Dereference aspects with renamed
4924 2017-01-20 Javier Miranda <miranda@adacore.com>
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.
4941 2017-01-20 Ed Schonberg <schonberg@adacore.com>
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.
4947 2017-01-20 Justin Squirek <squirek@adacore.com>
4949 * exp_ch6.adb (Expand_Call): Remove optimization
4950 that nulls out calls to null procedures.
4952 2017-01-20 Yannick Moy <moy@adacore.com>
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.
4959 2017-01-20 Ed Schonberg <schonberg@adacore.com>
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
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.
4979 2017-01-20 Pascal Obry <obry@adacore.com>
4981 * a-locale.adb, a-locale.ads: Update Ada.Locales for RM 2012 COR:1:2016
4983 2017-01-20 Yannick Moy <moy@adacore.com>
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.
4990 2017-01-20 Ed Schonberg <schonberg@adacore.com>
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.
4996 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
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
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
5018 (Build_Underlying_Full_View): Mark an underlying full view as such.
5019 * sem_ch7.adb (Install_Private_Declarations): Mark an underlying
5022 2017-01-20 Yannick Moy <moy@adacore.com>
5024 * sinfo.ads: Document lack of Do_Division_Check flag
5025 on float exponentiation.
5027 2017-01-19 Javier Miranda <miranda@adacore.com>
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.
5033 2017-01-19 Bob Duff <duff@adacore.com>
5035 * exp_ch3.adb: Update comment.
5037 2017-01-19 Vincent Celier <celier@adacore.com>
5039 * gprep.adb (Gnatprep): Parse the definition file without
5040 "replace in comments" even when switch -C is used.
5042 2017-01-19 Justin Squirek <squirek@adacore.com>
5044 * exp_ch9.adb (Is_Pure_Barrier): Create function
5045 Is_Count_Attribute to identify an expansion of the 'Count
5048 2017-01-19 Ed Schonberg <schonberg@adacore.com>
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.
5055 2017-01-19 Bob Duff <duff@adacore.com>
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.
5061 2017-01-19 Claire Dross <dross@adacore.com>
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
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
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.
5079 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
5081 * lib-xref-spark_specific.adb: Minor reformatting.
5082 * exp_ch7.adb (Add_Parent_Invariants): Do not process array types.
5084 2017-01-19 Javier Miranda <miranda@adacore.com>
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.
5091 2017-01-19 Ed Schonberg <schonberg@adacore.com>
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.
5097 2017-01-19 Ed Schonberg <schonberg@adacore.com>
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.
5105 2017-01-19 Bob Duff <duff@adacore.com>
5107 * binde.adb, debug.adb: Enable new elaboration order algorithm
5108 by default. -dp switch reverts to the old algorithm.
5110 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
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
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.
5124 2017-01-19 Yannick Moy <moy@adacore.com>
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.
5135 2017-01-19 Ed Schonberg <schonberg@adacore.com>
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.
5142 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
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.
5151 2017-01-19 Javier Miranda <miranda@adacore.com>
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).
5158 2017-01-19 Ed Schonberg <schonberg@adacore.com>
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.
5166 2017-01-19 Arnaud Charlet <charlet@adacore.com>
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.
5180 2017-01-19 Javier Miranda <miranda@adacore.com>
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.
5187 2017-01-19 Yannick Moy <moy@adacore.com>
5189 * sinfo.adb (Pragma_Name): Only access up to Last_Pair of Pragma_Map.
5191 2017-01-19 Ed Schonberg <schonberg@adacore.com>
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.
5200 2017-01-19 Bob Duff <duff@adacore.com>
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.
5206 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
5208 * lib-xref-spark_specific.adb, sem_util.adb, sem_util.ads,
5209 sem_ch4.adb, sem_ch8.adb, lib-xref.ads: Minor reformatting.
5211 2017-01-19 Bob Duff <duff@adacore.com>
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.
5220 2017-01-19 Javier Miranda <miranda@adacore.com>
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
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.
5240 2017-01-19 Javier Miranda <miranda@adacore.com>
5242 * sem_util.ads, sem_util.adb (Expression_Of_Expression_Function): New
5244 (Is_Inlinable_Expression_Function): New subprogram.
5245 * exp_ch6.ads, exp_ch6.adb (Expression_Of_Expression_Function): Moved
5247 (Is_Inlinable_Expression_Function): Moved to Sem_Util.
5249 2017-01-19 Ed Schonberg <schonberg@adacore.com>
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.
5260 2017-01-19 Steve Baird <baird@adacore.com>
5262 * sem_util.ads: Add new Use_Full_View Boolean parameter to
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.
5267 2017-01-19 Arnaud Charlet <charlet@adacore.com>
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).
5280 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
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
5290 2017-01-19 Ed Schonberg <schonberg@adacore.com>
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.
5299 2017-01-16 Jakub Jelinek <jakub@redhat.com>
5302 * gcc-interface/lang.opt (gant, gnatO, gnat): Add Driver flag.
5304 2017-01-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5306 * gcc-interface/Makefile.in (SPARC/Solaris): Fix typo.
5308 2017-01-13 Arnaud Charlet <charlet@adacore.com>
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.
5335 2017-01-13 Ed Schonberg <schonberg@adacore.com>
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.
5343 2017-01-13 Javier Miranda <miranda@adacore.com>
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.
5354 2017-01-13 Gary Dismukes <dismukes@adacore.com>
5356 * checks.adb: Minor typo fix and reformatting.
5358 2017-01-13 Javier Miranda <miranda@adacore.com>
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.
5368 2017-01-13 Javier Miranda <miranda@adacore.com>
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.
5377 2017-01-13 Ed Schonberg <schonberg@adacore.com>
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.
5383 2017-01-13 Bob Duff <duff@adacore.com>
5385 * atree.ads: Minor comment fix.
5387 2017-01-13 Justin Squirek <squirek@adacore.com>
5389 * sem_ch6.adb (Check_Aggregate_Accessibility): Ignore function
5390 calls in accessibility check on return statement.
5392 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
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.
5399 2017-01-13 Gary Dismukes <dismukes@adacore.com>
5401 * bindgen.adb, sem_ch6.adb, binde.adb, exp_ch3.adb: Minor reformatting
5404 2017-01-13 Javier Miranda <miranda@adacore.com>
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.
5410 2017-01-13 Bob Duff <duff@adacore.com>
5412 * ali.ads, ali.adb (Static_Elaboration_Model_Used): Remove unused flag.
5413 * g-locfil.ads: Minor comment fix.
5415 2017-01-13 Bob Duff <duff@adacore.com>
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
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
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
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.
5439 2017-01-13 Ed Schonberg <schonberg@adacore.com>
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.
5446 2017-01-13 Javier Miranda <miranda@adacore.com>
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).
5453 2017-01-13 Vadim Godunko <godunko@adacore.com>
5455 * a-coinho-shared.adb: Fix memory leaks in Constant_Reference and
5456 Reference functions of Ada.Containers.Indefinite_Holders.
5458 2017-01-13 Bob Duff <duff@adacore.com>
5460 * s-os_lib.ads: Minor comment fixes.
5462 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
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.
5472 2017-01-13 Ed Schonberg <schonberg@adacore.com>
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
5479 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): An
5480 Iterated_Component_Association is not static.
5482 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
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
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
5492 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
5494 * sem_aggr.adb, sem_ch3.adb, inline.adb, sem_util.adb, exp_ch4.adb,
5495 exp_aggr.adb: Minor reformatting.
5497 2017-01-13 Gary Dismukes <dismukes@adacore.com>
5499 * inline.adb: Minor reformatting and typo fix.
5501 2017-01-13 Ed Schonberg <schonberg@adacore.com>
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
5515 (Flatten): An Iterated_Component_Association is not static.
5517 2017-01-13 Yannick Moy <moy@adacore.com>
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
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
5527 * inline.adb (Expand_Inlined_Call): Fix the count
5528 for the number of generated gotos.
5530 2017-01-13 Yannick Moy <moy@adacore.com>
5532 * inline.adb: Code cleanup.
5533 * sem_util.adb (Is_OK_Volatile_Context): Add
5534 expression in delay statement as OK for volatile context.
5536 2017-01-13 Ed Schonberg <schonberg@adacore.com>
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.
5543 2017-01-13 Justin Squirek <squirek@adacore.com>
5545 * nlists.ads: Correct minor typo.
5547 2017-01-13 Gary Dismukes <dismukes@adacore.com>
5549 * sem_ch13.adb: Minor reformatting and typo fix.
5551 2017-01-13 Ed Schonberg <schonberg@adacore.com>
5553 * par-ch4.adb (P_Aggregate_Or_Parent_Expr): An
5554 Iterated_Component_Association is a named association in an
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
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
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.
5571 2017-01-13 Yannick Moy <moy@adacore.com>
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.
5578 2017-01-13 Ed Schonberg <schonberg@adacore.com>
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
5593 2017-01-13 Yannick Moy <moy@adacore.com>
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
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.
5607 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
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.
5640 2017-01-13 Gary Dismukes <dismukes@adacore.com>
5642 * exp_util.adb: Minor reformatting.
5644 2017-01-13 Yannick Moy <moy@adacore.com>
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
5651 2017-01-13 Ed Schonberg <schonberg@adacore.com>
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
5660 (P_Aggregate_Or_Paren_Expr): Recognize iterated component
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.
5671 2017-01-13 Justin Squirek <squirek@adacore.com>
5673 * sem_ch12.adb (Analyze_Package_Instantiation): Move disabiling
5674 of the style check until after preanalysis of acutals.
5676 2017-01-13 Yannick Moy <moy@adacore.com>
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
5686 * exp_spark.adb (Expand_SPARK_Attribute_Reference): New procedure to
5687 replace System'To_Address by equivalent call.
5689 2017-01-13 Arnaud Charlet <charlet@adacore.com>
5691 * bindusg.adb: Improve usage output for -f switch.
5693 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
5695 * frontend.adb, freeze.adb, sem_res.adb, sem_attr.adb, sem_ch8.adb:
5698 2017-01-13 Ed Schonberg <schonberg@adacore.com>
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.
5712 2017-01-13 Tristan Gingold <gingold@adacore.com>
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
5720 * s-mmosin-mingw.ads, s-mmosin-unix.ads (Open_Read): Adjust comment.
5722 2017-01-13 Yannick Moy <moy@adacore.com>
5724 * checks.adb: Code cleanup.
5726 2017-01-13 Yannick Moy <moy@adacore.com>
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
5736 2017-01-13 Javier Miranda <miranda@adacore.com>
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.
5743 2017-01-13 Gary Dismukes <dismukes@adacore.com>
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.
5749 2017-01-13 Yannick Moy <moy@adacore.com>
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
5754 (Analyze_Subprogram_Renaming): Do not freeze the renaming or renamed
5755 inside a generic context.
5757 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
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
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.
5769 2017-01-13 Gary Dismukes <dismukes@adacore.com>
5771 * einfo.adb, sem_ch6.adb, atree.adb: Minor reformatting and typo fix.
5773 2017-01-13 Ed Schonberg <schonberg@adacore.com>
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.
5780 2017-01-13 Yannick Moy <moy@adacore.com>
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
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
5802 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
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.
5841 2017-01-13 Tristan Gingold <gingold@adacore.com>
5843 * s-mmosin-mingw.adb: Fix pragma import.
5845 2017-01-13 Arnaud Charlet <charlet@adacore.com>
5847 * gnat1drv.adb (Adjust_Global_Switches): Ignore -gnateE in
5850 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
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
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
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
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
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
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
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
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
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
6017 (Analyze_Generic_Subprogram_Declaration): Remove all Ghost-related
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.
6063 2017-01-12 Tristan Gingold <gingold@adacore.com>
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.
6068 2017-01-12 Yannick Moy <moy@adacore.com>
6070 * errout.adb, errout.ads (Initialize): Factor common treatment
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.
6078 2017-01-12 Javier Miranda <miranda@adacore.com>
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.
6085 2017-01-12 Ed Schonberg <schonberg@adacore.com>
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.
6093 2017-01-12 Gary Dismukes <dismukes@adacore.com>
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
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
6112 2017-01-12 Tristan Gingold <gingold@adacore.com>
6114 * sysdep.c, adaint.c, rtinit.c, ming32.h:
6115 (__gnat_current_codepage): Renamed from CurrentCodePage
6116 (__gnat_current_ccs_encoding): Renamed from CurrentCCSEncoding
6118 2017-01-12 Ed Schonberg <schonberg@adacore.com>
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
6125 2017-01-12 Arnaud Charlet <charlet@adacore.com>
6127 * gcc-interface/Makefile.in: Clean up VxWorks targets.
6129 2017-01-12 Ed Schonberg <schonberg@adacore.com>
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.
6135 2017-01-12 Ed Schonberg <schonberg@adacore.com>
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
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)).
6148 2017-01-12 Yannick Moy <moy@adacore.com>
6150 * gnat1drv.adb (Adjust_Global_Switches): Only
6151 perform checking of exception mechanism when generating code.
6153 2017-01-12 Justin Squirek <squirek@adacore.com>
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
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.
6165 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
6167 * exp_ch9.adb, sem_prag.adb, s-tassta.adb, sem_util.adb, s-tarest.adb,
6168 sem_ch13.adb: Minor reformatting.
6170 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
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
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
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
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.
6225 2017-01-12 Arnaud Charlet <charlet@adacore.com>
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.
6232 2017-01-12 Patrick Bernardi <bernardi@adacore.com>
6234 * sem_ch10.adb (Analyze_With_Clause): Removed code that turned
6235 Configurable_Run_Time_Mode off when analysing with'ed predefined
6238 2017-01-12 Gary Dismukes <dismukes@adacore.com>
6240 * sem_prag.adb: Minor reformatting.
6241 * sem_util.adb (Unique_Entity): fix result for
6242 bodies of entry families.
6244 2017-01-12 Justin Squirek <squirek@adacore.com>
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.
6252 2017-01-12 Gary Dismukes <dismukes@adacore.com>
6254 * exp_ch9.adb, s-secsta.adb, snames.ads-tmpl, exp_ch3.adb: Minor
6256 * debug.adb: Minor comment fixes.
6258 2017-01-12 Arnaud Charlet <charlet@adacore.com>
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
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
6269 2017-01-12 Patrick Bernardi <bernardi@adacore.com>
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
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
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
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
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.
6311 2017-01-12 Yannick Moy <moy@adacore.com>
6313 * exp_spark.adb (Expand_SPARK_Potential_Renaming): Fix sloc of copied
6316 2017-01-12 Justin Squirek <squirek@adacore.com>
6318 * exp_attr.adb (Expand_N_Attribute_Reference):
6319 Fix Finalization_Size case by properly resolving the type after
6320 rewritting the node.
6322 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
6324 * exp_util.adb (Build_DIC_Procedure_Body): Semi-insert the body into
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.
6330 2017-01-12 Justin Squirek <squirek@adacore.com>
6332 * exp_ch6.adb (Expand_Call): Add guard to prevent
6333 invariant checks from being created for internally generated
6336 2017-01-12 Bob Duff <duff@adacore.com>
6338 * lib-writ.ads: Remove incorrect comment.
6340 2017-01-12 Javier Miranda <miranda@adacore.com>
6342 * debug.adb (-gnatd.K): Enable generation of contract-only
6343 procedures in CodePeer mode.
6344 * contracts.adb (Build_And_Analyze_Contract_Only_Subprograms):
6346 (Analyze_Contracts): Generate contract-only procedures if -gnatdK is
6348 * scil_ll.ads, scil_ll.adb (Get_Contract_Only_Body_Name): New
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.
6357 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
6359 * exp_ch6.adb: Minor reformatting.
6360 * spark_xrefs.ads: minor cleanup of comments for SPARK xrefs
6362 2017-01-12 Bob Duff <duff@adacore.com>
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
6371 * switch-b.adb: Parse -f switch.
6373 2017-01-12 Justin Squirek <squirek@adacore.com>
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.
6383 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
6385 * sinfo.ads: Minor reformatting.
6387 2017-01-12 Gary Dismukes <dismukes@adacore.com>
6389 * exp_util.adb, exp_util.ads, einfo.ads: Minor typo fixes and
6392 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
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.
6399 2017-01-12 Bob Duff <duff@adacore.com>
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.
6413 2017-01-09 Hristian Kirtchev <kirtchev@adacore.com>
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
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
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
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
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
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
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
6533 * sinfo.ads, sinfo.adb: Add new attribute Expression_Copy along with
6535 (Expression_Copy): New routine along with pragma Inline.
6536 (Set_Expression_Copy): New routine along with pragma Inline.
6538 2017-01-06 Bob Duff <duff@adacore.com>
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.
6545 2017-01-06 Bob Duff <duff@adacore.com>
6547 * sem_prag.adb: Minor: remove pragma Warnings.
6549 2017-01-06 Tristan Gingold <gingold@adacore.com>
6551 * Makefile.rtl: Do not compile s-stchop by default.
6553 2017-01-06 Patrick Bernardi <bernardi@adacore.com>
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.
6561 2017-01-06 Ed Schonberg <schonberg@adacore.com>
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.
6568 2017-01-06 Patrick Bernardi <bernardi@adacore.com>
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
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
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.
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.
6610 2017-01-06 Pascal Obry <obry@adacore.com>
6612 * a-direio.adb, a-direio.ads, a-sequio.adb, a-sequio.ads: Add Flush to
6613 Sequential_IO and Direct_IO.
6615 2017-01-06 Bob Duff <duff@adacore.com>
6617 * snames.ads-tmpl (Renamed): New name for the pragma argument.
6618 * par-ch2.adb: Allow the new pragma (with analysis deferred
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
6633 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
6635 * exp_ch9.adb: Minor reformatting.
6637 2017-01-06 Tristan Gingold <gingold@adacore.com>
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
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.
6648 2017-01-06 Bob Duff <duff@adacore.com>
6650 * sinfo.ads, sinfo.adb (Map_Pragma_Name): Preparation work,
6651 dummy implementation of Map_Pragma_Name.
6653 2017-01-06 Tristan Gingold <gingold@adacore.com>
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
6660 * s-tposen.ads (Entry_Body_Access): Moved from s-taprob,
6661 now access to constant.
6663 2017-01-06 Gary Dismukes <dismukes@adacore.com>
6665 * einfo.ads, sem_res.adb, sem_attr.adb, sem_ch6.adb: Minor
6666 reformatting and typo fixes.
6668 2017-01-06 Bob Duff <duff@adacore.com>
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
6675 * sinfo.ads, sinfo.adb (Pragma_Name_Mapped): Preparation work,
6676 Dummy implementation of Pragma_Name_Mapped.
6678 2017-01-06 Ed Schonberg <schonberg@adacore.com>
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
6686 * sem_attr.adb: Minor reformatting.
6688 2017-01-06 Justin Squirek <squirek@adacore.com>
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.
6695 2017-01-06 Ed Schonberg <schonberg@adacore.com>
6697 * einfo.ads, einfo.adb (Is_Entry_Wrapper): New flag, defined
6698 on procedures that are wrappers created for entries that have
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
6704 * exp_ch9.adb (Build_Contract_Wrapper): Set Is_Entry_Wrapper on
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
6711 2017-01-06 Yannick Moy <moy@adacore.com>
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.
6717 2017-01-06 Gary Dismukes <dismukes@adacore.com>
6719 * s-tpobop.adb: Minor reformatting.
6721 2017-01-06 Ed Schonberg <schonberg@adacore.com>
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.
6727 2017-01-06 Tristan Gingold <gingold@adacore.com>
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
6734 2017-01-06 Ed Schonberg <schonberg@adacore.com>
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.
6743 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
6745 * exp_attr.adb, sem_attr.ads: Minor reformatting.
6747 2017-01-06 Justin Squirek <squirek@adacore.com>
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.
6758 2017-01-06 Ed Schonberg <schonberg@adacore.com>
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.
6765 2017-01-06 Tristan Gingold <gingold@adacore.com>
6767 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Do not generate
6768 max_queue_lengths_array if unused.
6770 2017-01-06 Bob Duff <duff@adacore.com>
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
6779 2017-01-06 Ed Schonberg <schonberg@adacore.com>
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
6786 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
6788 * exp_ch5.adb, sem_ch3.adb, checks.adb: Minor reformatting and
6791 2017-01-06 Ed Schonberg <schonberg@adacore.com>
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.
6809 2017-01-06 Tristan Gingold <gingold@adacore.com>
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.
6815 2017-01-06 Gary Dismukes <dismukes@adacore.com>
6817 * sem_util.ads: Minor typo fix and reformatting.
6819 2017-01-06 Yannick Moy <moy@adacore.com>
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
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.
6832 2017-01-06 Tristan Gingold <gingold@adacore.com>
6834 * raise-gcc.c (abort): Macro to call Abort_Propagation.
6835 * s-tpoben.ads (Protected_Entry_Queue_Max_Access): Make it access
6837 * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
6838 Do not generate the Entry_Max_Queue_Lengths_Array if all default
6840 * exp_util.adb (Corresponding_Runtime_Package): Consider
6841 Max_Queue_Length pragma.
6843 2017-01-06 Justin Squirek <squirek@adacore.com>
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
6856 * sem_prag.adb (Analyze_Pragma): Remove entry families restriction
6858 2017-01-06 Yannick Moy <moy@adacore.com>
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
6868 2017-01-06 Tristan Gingold <gingold@adacore.com>
6870 * sem_util.adb, s-taprop-linux.adb (Finalize_TCB): Remove call to
6871 Invalidate_Stack_Cache.
6873 2017-01-06 Eric Botcazou <ebotcazou@adacore.com>
6875 * s-os_lib.adb: Minor fix to the signature of Readlink.
6877 2017-01-06 Javier Miranda <miranda@adacore.com>
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.
6883 2017-01-06 Arnaud Charlet <charlet@adacore.com>
6885 * exp_ch5.adb (Expand_N_If_Statement): Obey existing comment and
6886 mark a rewritten if statement as explicit (Comes_From_Source).
6888 2017-01-06 Gary Dismukes <dismukes@adacore.com>
6890 * sem_prag.adb, rtsfind.adb, sem_util.adb: Minor typo fixes.
6892 2017-01-06 Tristan Gingold <gingold@adacore.com>
6894 * ada.ads, a-unccon.ads: Add pragma No_Elaboration_Code_All.
6896 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
6898 * sem_case.adb: Minor reformatting.
6900 2017-01-06 Thomas Quinot <quinot@adacore.com>
6902 * g-socthi-mingw.adb: Remove now extraneous USE TYPE clause
6904 2017-01-06 Justin Squirek <squirek@adacore.com>
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
6917 (Make_Initialize_Protection): Pass a reference to
6918 the Entry_Max_Queue_Lengths_Array in the protected type node to
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.
6941 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
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.
6947 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
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
6955 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
6957 * sem_prag.adb, sem_ch8.adb: Minor reformatting.
6959 2017-01-06 Ed Schonberg <schonberg@adacore.com>
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
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.
6970 2017-01-06 Thomas Quinot <quinot@adacore.com>
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
6975 2017-01-06 Bob Duff <duff@adacore.com>
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
6981 * lib-writ.ads: Comment clarification.
6982 * ali-util.ads: Minor comment fix.
6983 * ali.adb: Minor reformatting.
6985 2017-01-06 Tristan Gingold <gingold@adacore.com>
6987 * a-exexpr-gcc.adb: Improve comment.
6989 2017-01-03 James Cowgill <James.Cowgill@imgtec.com>
6991 * s-linux-mips.ads: Use correct signal and errno constants.
6992 (sa_handler_pos, sa_mask_pos): Fix offsets for 64-bit MIPS.
6994 2017-01-03 James Cowgill <James.Cowgill@imgtec.com>
6996 * s-linux-mips.ads: Rename from s-linux-mipsel.ads.
6997 * gcc-interface/Makefile.in (MIPS/Linux): Merge mips and mipsel
7000 2017-01-01 Eric Botcazou <ebotcazou@adacore.com>
7002 * gnatvsn.ads: Bump copyright year.
7004 2017-01-01 Jakub Jelinek <jakub@redhat.com>
7006 * gnat_ugn.texi: Bump @copying's copyright year.
7007 * gnat_rm.texi: Likewise.
7009 Copyright (C) 2017 Free Software Foundation, Inc.
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.