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