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