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