2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
[official-gcc.git] / gcc / ada / ChangeLog
blob51ba99854e9ddacd5ad664e5dc4db8a654aa381f
1 2016-05-02  Hristian Kirtchev  <kirtchev@adacore.com>
3         * sem_ch3.adb, exp_ch9.adb, einfo.adb, sem_ch4.adb, sem_ch6.adb: Minor
4         reformatting.
6 2016-05-02  Ed Schonberg  <schonberg@adacore.com>
8         * exp_ch4.adb (Expand_N_Allocator): If the designated type
9         is a private derived type with no discriminants, examine its
10         underlying_full_view to determine whether the full view has
11         defaulted discriminants, so their defaults can be used in the
12         call to the initialization procedure for the designated object.
14 2016-05-02  Hristian Kirtchev  <kirtchev@adacore.com>
16         * exp_prag.adb, comperr.adb: Minor reformatting.
18 2016-05-02  Ed Schonberg  <schonberg@adacore.com>
20         * exp_pakd.adb (Rj_Unchecked_Convert_To): Do not perform an
21         unchecked conversion if the source size is 0 (indicating that
22         its RM size is unknown). This will happen with packed arrays of
23         non-discrete types, in which case the component type is known
24         to match.
26 2016-05-02  Arnaud Charlet  <charlet@adacore.com>
28         * debug.adb: Reserve -gnatd.V.
30 2016-05-02  Javier Miranda  <miranda@adacore.com>
32         * sem_ch3.adb (Process_Full_View): Remove from visibility
33         wrappers of synchronized types to avoid spurious errors with
34         their wrapped entity.
35         * exp_ch9.adb (Build_Wrapper_Spec): Do not generate the wrapper
36         if no interface primitive is covered by the subprogram and this is
37         not a primitive declared between two views; see Process_Full_View.
38         (Build_Protected_Sub_Specification): Link the dispatching
39         subprogram with its original non-dispatching protected subprogram
40         since their names differ.
41         (Expand_N_Protected_Type_Declaration):
42         If a protected subprogram overrides an interface primitive then
43         do not build a wrapper if it was already built.
44         * einfo.ads, einfo.adb (Original_Protected_Subprogram): New attribute.
45         * sem_ch4.adb (Names_Match): New subprogram.
46         * sem_ch6.adb (Check_Synchronized_Overriding): Moved
47         to library level and defined in the public part of the
48         package to invoke it from Exp_Ch9.Build_Wrapper_Spec
49         (Has_Matching_Entry_Or_Subprogram): New subprogram.
50         (Report_Conflict): New subprogram.
52 2016-05-02  Jerome Lambourg  <lambourg@adacore.com>
54         * s-unstyp.ads: Code cleanups.
56 2016-05-02  Hristian Kirtchev  <kirtchev@adacore.com>
58         * sem_ch13.adb (Size_Too_Small_Error): Fix the error message format.
60 2016-05-02  Ed Schonberg  <schonberg@adacore.com>
62         * exp_prag.adb (Expand_attributes_In_Consequence,
63         Expand_Attributes): If the prefix of'Old is an unconstrained type,
64         for example an unconstrained formal of the enclosing subprogram,
65         create an object declaration with an expression to obtain the
66         actual subtype of the temporary.
68 2016-05-02  Arnaud Charlet  <charlet@adacore.com>
70         * comperr.adb (Delete_SCIL_Files): Add missing handling of
71         N_Subprogram_Declaration.
73 2016-05-02  Gary Dismukes  <dismukes@adacore.com>
75         * exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, checks.adb, sem_attr.adb,
76         gnat1drv.adb, sem_ch4.adb, sem_ch13.adb: Minor reformatting and typo
77         fixes.
78         * sem_prag.adb, sem_ch12.adb: Minor typo fixes.
80 2016-05-02  Ed Schonberg  <schonberg@adacore.com>
82         * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): The
83         function call may be wrapped in an explicit type conversion.
85 2016-05-02  Jerome Lambourg  <lambourg@adacore.com>
87         * interfac.ads: use pragma No_Elaboration_Code_All.
88         * s-unstyp.ads: s-unstyp.ads: use pragma No_Elaboration_Code_All.
90 2016-05-02  Ed Schonberg  <schonberg@adacore.com>
92         * sem.adb (Analyze: If node is an error node previously created
93         by the parser, disable expansion to prevent subsequent glitches
94         in error recovery.
96 2016-05-02  Hristian Kirtchev  <kirtchev@adacore.com>
98         * sem_ch13.adb (Alignment_Error): Removed.
99         (Get_Alignment_Value): Code cleanup.
101 2016-05-02  Tristan Gingold  <gingold@adacore.com>
103         * sem_ch3.adb (Analyze_Object_Declaration): Use Has_Protected
104         to check for the no local protected objects restriction.
106 2016-05-02  Hristian Kirtchev  <kirtchev@adacore.com>
108         * einfo.adb Anonymous_Master now uses Node35.
109         (Anonymous_Master): Update the assertion and node reference.
110         (Set_Anonymous_Master): Update the assertion and node reference.
111         (Write_Field35_Name): Add output for Anonymous_Master.
112         (Write_Field36_Name): The output is now undefined.
113         * einfo.ads Update the node and description of attribute
114         Anonymous_Master. Remove prior occurrences in entities as this
115         is now a type attribute.
116         * exp_ch3.adb (Expand_Freeze_Array_Type): Remove local variable
117         Ins_Node. Anonymous access- to-controlled component types no
118         longer need finalization masters. The master is now built when
119         a related allocator is expanded.
120         (Expand_Freeze_Record_Type): Remove local variable Has_AACC. Do not
121         detect whether the record type has at least one component of anonymous
122         access-to- controlled type. These types no longer need finalization
123         masters. The master is now built when a related allocator is expanded.
124         * exp_ch4.adb Remove with and use clauses for Lib and Sem_Ch8.
125         (Current_Anonymous_Master): Removed.
126         (Expand_N_Allocator): Call Build_Anonymous_Master to create a
127         finalization master for an anonymous access-to-controlled type.
128         * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
129         Call routine Build_Anonymous_Master to create a finalization master
130         for an anonymous access-to-controlled type.
131         * exp_ch7.adb (Allows_Finalization_Master): New routine.
132         (Build_Anonymous_Master): New routine.
133         (Build_Finalization_Master): Remove formal parameter
134         For_Anonymous. Use Allows_Finalization_Master to determine whether
135         circumstances warrant a finalization master. This routine no
136         longer creates masters for anonymous access-to-controlled types.
137         (In_Deallocation_Instance): Removed.
138         * exp_ch7.ads (Build_Anonymous_Master): New routine.
139         (Build_Finalization_Master): Remove formal parameter For_Anonymous
140         and update the comment on usage.
141         * sem_util.adb (Get_Qualified_Name): New routines.
142         (Output_Name): Reimplemented.
143         (Output_Scope): Removed.
144         * sem_util.ads (Get_Qualified_Name): New routines.
146 2016-05-02  Hristian Kirtchev  <kirtchev@adacore.com>
148         * debug.adb: Document the use of switch -gnatd.H.
149         * gnat1drv.adb (Adjust_Global_Switches): Set ASIS_GNSA mode when
150         -gnatd.H is present.
151         (Gnat1drv): Suppress the call to gigi when ASIS_GNSA mode is active.
152         * opt.ads: Add new option ASIS_GNSA_Mode.
153         * sem_ch13.adb (Alignment_Error): New routine.
154         (Analyze_Attribute_Definition_Clause): Suppress certain errors in
155         ASIS mode for attribute clause Alignment, Machine_Radix, Size, and
156         Stream_Size.
157         (Check_Size): Use routine Size_Too_Small_Error to
158         suppress certain errors in ASIS mode.
159         (Get_Alignment_Value): Use routine Alignment_Error to suppress certain
160         errors in ASIS mode.
161         (Size_Too_Small_Error): New routine.
163 2016-05-02  Arnaud Charlet  <charlet@adacore.com>
165         * spark_xrefs.ads Description of the spark cross-references
166         clarified; small style fixes.
167         * lib-xref-spark_specific.adb (Add_SPARK_Scope,
168         Detect_And_Add_SPARK_Scope): consider protected types and bodies
169         as yet another scopes.
170         (Enclosing_Subprogram_Or_Library_Package): refactored using
171         Hristian's suggestions; added support for scopes of protected
172         types and bodies; fix for entries to return the scope of the
173         enclosing concurrent type, which is consistent with what is
174         returned for protected subprograms.
175         * sem_intr.adb: Minor style fix in comment.
177 2016-05-02  Hristian Kirtchev  <kirtchev@adacore.com>
179         * lib-xref.ads, lib-xref-spark_specific.adb, get_spark_xrefs.adb,
180         put_spark_xrefs.adb: Minor reformatting.
182 2016-05-02  Doug Rupp  <rupp@adacore.com>
184         * g-traceb.ads: Document traceback for ARM.
186 2016-05-02  Javier Miranda  <miranda@adacore.com>
188         * exp_disp.adb (Make_Tags): Do not generate the
189         external name of interface tags adding the suffix counter since
190         it causes problems at link time when the IP routines are inlined
191         across units with optimization.
193 2016-05-02  Ed Schonberg  <schonberg@adacore.com>
195         * einfo.ads, einfo.adb (Predicates_Ignared): new flag to indicate
196         that predicate checking is disabled for predicated subtypes in
197         the context of an Assertion_Policy pragma.
198         * checks.adb (Apply_Predicate_Check): Do nothing if
199         Predicates_Ignored is true.
200         * exp_ch3.adb (Expand_Freeze_Enumeration_Type): If
201         Predicates_Ignores is true, the function Rep_To_Pos does raise
202         an exception for invalid data.
203         * exp_ch4.adb (Expand_N_Type_Conversion): IF target is a predicated
204         type do not apply check if Predicates_Ignored is true.
205         * exp_ch5.adb (Expand_N_Case_Statement): If Predicates_Ignored
206         is true, sem_prag.adb:
207         * sem_ch3.adb (Analyze_Object_Declaration): If Predicates_Ignored
208         is true do not emit predicate check on initializing expression.
210 2016-05-02  Arnaud Charlet  <charlet@adacore.com>
212         * get_spark_xrefs.adb (Get_Nat, Get_Name): Initialize variables when
213         they are declared; refine type of a counter from Integer to Natural.
214         * sem_ch5.adb, gnatcmd.adb, s-intman-posix.adb, eval_fat.adb,
215         prj.adb, sem_util.adb, s-intman-android.adb, prj-nmsc.adb, sem_ch8.adb,
216         exp_ch3.adb: Minor editing.
218 2016-05-02  Yannick Moy  <moy@adacore.com>
220         * a-tigeli.adb (Get_Line): Always set Last prior to returning.
222 2016-05-02  Yannick Moy  <moy@adacore.com>
224         * lib-xref.adb: Minor style fix in whitespace of declarations.
225         * put_spark_xrefs.adb (Put_SPARK_Xrefs): printing of strings
226         refactored without loops.
227         * put_spark_xrefs.ads (Write_Info_Str): new formal argument of
228         generic procedure.
229         * spark_xrefs.adb (Write_Info_Str): new actual in instantiation
230         of generic procedure.
232 2016-05-02  Arnaud Charlet  <charlet@adacore.com>
234         * lib-xref-spark_specific.adb (Add_SPARK_Scope): add task type scope.
235         (Detect_And_Add_SPARK_Scope): detect and add task type scope.
236         (Enclosing_Subprogram_Or_Package): Respect boundaries of task
237         and entry declarations.
238         * spark_xrefs.ads: minor typo in comment.
240 2016-05-02  Arnaud Charlet  <charlet@adacore.com>
242         * make.adb: Minor: avoid an exception when calling gnatmake with
243         no argument and gnatmake is built with checks on.
244         * lib-xref-spark_specific.adb: Minor code cleanup.
246 2016-05-02  Ed Schonberg  <schonberg@adacore.com>
248         * sem_util.adb (Normalize_Actuals): Take into account extra
249         actuals that may have been introduced previously. Normally extra
250         actuals are introduced when a call is expanded, but a validity
251         check may copy and reanalyze a call that carries an extra actual
252         (e.g. an accessibility parameter) before the call itself is
253         marked Analzyed, and the analysis of the copy has to be able to
254         cope with the added actual.
256 2016-05-02  Bob Duff  <duff@adacore.com>
258         * sem_ch10.adb (Analyze_Compilation_Unit): Preserve
259         treeishness. Previous version had Context_Items shared between
260         the spec and body.
262 2016-05-02  Ed Schonberg  <schonberg@adacore.com>
264         * sem_aggr.adb (Resolve_Aggr_Expression): For both array and
265         record cases, apply predicate check on component for expression
266         only if expression has been analyzed already. For expressions
267         that need to be duplicated when they cover multiple components,
268         resolution and predicate checking take place later.
270 2016-05-02  Olivier Hainque  <hainque@adacore.com>
272         * a-direct.adb (Delete_Tree): Use full names to designate subdirs
273         and files therein, instead of local names after a change of
274         current directory.
276 2016-05-02  Thomas Quinot  <quinot@adacore.com>
278         * freeze.adb (Check_Component_Storage_Order): Get full view of
279         component type.
281 2016-05-02  Hristian Kirtchev  <kirtchev@adacore.com>
283         * checks.adb, freeze.adb, sem_res.adb, s-stposu.adb, repinfo.adb:
284         Minor reformatting.
286 2016-05-02  Hristian Kirtchev  <kirtchev@adacore.com>
288         * sem_ch4.adb (Find_Indexing_Operations): Use the underlying type
289         of the container base type in case the container is a subtype.
290         * sem_ch5.adb (Analyze_Iterator_Specification): Ensure that
291         the selector has an entity when checking for a component of a
292         mutable object.
294 2016-05-02  Arnaud Charlet  <charlet@adacore.com>
296         Remove dead code.
297         * opt.ads (Latest_Ada_Only): New flag.
298         * sem_prag.adb, par-prag.adb: Ignore pragma Ada_xx under this flag.
299         * usage.adb, switch-c.adb: Disable support for -gnatxx under this flag.
300         * einfo.ads (Has_Predicates, Predicate_Function):
301         Clarify that Has_Predicates does not imply that Predicate_Function
302         will return a non-empty entity.
304 2016-05-02  Ed Schonberg  <schonberg@adacore.com>
306         * sem_res.adb (Resolve_Qualified_Expression): Generate a predicate
307         check if type requires it.
308         * checks.adb (Apply_Predicate_Check): Disable checks in the
309         object declaration created for an expression with side-effects
310         that requires a predicate check to prevent infinite recursion
311         during expansion.
313 2016-05-02  Ed Schonberg  <schonberg@adacore.com>
315         * sem_ch6.adb (Process_Formals): Check properly the type of a
316         formal to determine whether a given convention applies to it.
318 2016-05-02  Doug Rupp  <rupp@adacore.com>
320         * tracebak.c: Add incantations for arm-vxworks[67] traceback.
322 2016-05-02  Thomas Quinot  <quinot@adacore.com>
324         * freeze.adb (Check_Component_Storage_Order): Make it a warning, not an
325         error, to have a component with implicit SSO within a composite type
326         that has explicit SSO.
328 2016-05-02  Bob Duff  <duff@adacore.com>
330         * s-stposu.adb (Allocate_Any_Controlled): Don't lock/unlock twice.
332 2016-05-02  Ed Schonberg  <schonberg@adacore.com>
334         * repinfo.adb (List_Entities): Make procedure recursive, to
335         provide representation information for subprograms declared
336         within subprogram bodies.
338 2016-05-02  Arnaud Charlet  <charlet@adacore.com>
340         * exp_ch5.adb, layout.adb, gnatcmd.adb exp_attr.adb, make.adb,
341         bindgen.adb, debug.adb, exp_pakd.adb, freeze.adb, sem_util.adb,
342         gnatlink.adb, switch-m.adb, exp_ch4.adb, repinfo.adb, adabkend.adb,
343         osint.adb: Remove dead code.
345 2016-05-02  Yannick Moy  <moy@adacore.com>
347         * a-tigeli.adb (Get_Line): Fix bound for test to
348         decide when to compensate for character 0 added by call to fgets.
350 2016-05-02  Ed Schonberg  <schonberg@adacore.com>
352         * sem_ch4.adb (Analyze_Allocator): If the expression does not
353         have a subtype indication and the type is an unconstrained tagged
354         type with defaulted discriminants, create an explicit constraint
355         for it during analysis to prevent out-of-order freezing actions
356         on generated classwide types.
358 2016-05-02  Javier Miranda  <miranda@adacore.com>
360         * exp_ch5.adb (Expand_N_Assignment_Statement):
361         In the runtime check that ensures that the tags of source an
362         target match, add missing displacement of the pointer to the
363         objects if they cover interface types.
365 2016-05-02  Ed Schonberg  <schonberg@adacore.com>
367         * sem_attr.adb (Analyze_Attribute, case 'Old): Do not use
368         base type for attribute when type is discrete: transformation
369         is not needed for such types, and leads to spurious errors if
370         the context is a case construct.
372 2016-05-02  Eric Botcazou  <ebotcazou@adacore.com>
374         * gcc-interface/decl.c (elaborate_reference_1): Do not bother about
375         operand #2 for COMPONENT_REF.
376         * gcc-interface/utils2.c (gnat_save_expr): Likewise.
377         (gnat_protect_expr): Likewise.
378         (gnat_stabilize_reference_1): Likewise.
379         (gnat_rewrite_reference): Do not bother about operand #3 for ARRAY_REF.
380         (get_inner_constant_reference): Likewise.
381         (gnat_invariant_expr): Likewise.
382         * gcc-interface/trans.c (fold_constant_decl_in_expr): Likewise.
384 2016-05-02  Eric Botcazou  <ebotcazou@adacore.com>
386         * gcc-interface/trans.c (Range_to_gnu): New static function.
387         (Raise_Error_to_gnu) <N_In>: Call it to translate the range.
388         (gnat_to_gnu) <N_In>: Likewise.
390 2016-04-30  Eric Botcazou  <ebotcazou@adacore.com>
392         * gcc-interface/Make-lang.in (ACATSCMD): New variable.
393         (check-acats): Use it.
394         (check_acats_targets): Likewise.
396 2016-04-28  Eric Botcazou  <ebotcazou@adacore.com>
398         PR ada/70786
399         * a-textio.adb (Get_Immediate): Add missing 'not' in expression.
401 2016-04-27  Eric Botcazou  <ebotcazou@adacore.com>
403         * sem_aux.adb (Is_By_Reference_Type): Also return true for a tagged
404         incomplete type without full view.
405         * sem_ch6.adb (Exchange_Limited_Views): Change into a function and
406         return the list of changes.
407         (Restore_Limited_Views): New procedure to undo the transformation made
408         by Exchange_Limited_Views.
409         (Analyze_Subprogram_Body_Helper): Adjust call to Exchange_Limited_Views
410         and call Restore_Limited_Views at the end, if need be.
411         (Possible_Freeze): Do not delay freezing because of incomplete types.
412         (Process_Formals): Remove kludges for class-wide types.
413         * types.h (By_Copy_Return): Delete.
414         * gcc-interface/ada-tree.h (TYPE_MAX_ALIGN): Move around.
415         (TYPE_DUMMY_IN_PROFILE_P): New macro.
416         * gcc-interface/gigi.h (update_profiles_with): Declare.
417         (finish_subprog_decl): Likewise.
418         (get_minimal_subprog_decl): Delete.
419         (create_subprog_type): Likewise.
420         (create_param_decl): Adjust prototype.
421         (create_subprog_decl): Likewise.
422         * gcc-interface/decl.c (defer_limited_with): Rename into...
423         (defer_limited_with_list): ...this.
424         (gnat_to_gnu_entity): Adjust to above renaming.
425         (finalize_from_limited_with): Likewise.
426         (tree_entity_vec_map): New structure.
427         (gt_pch_nx): New helpers.
428         (dummy_to_subprog_map): New hash table.
429         (gnat_to_gnu_param): Set the SLOC here.  Remove MECH parameter and
430         add FIRST parameter.  Deal with the mechanism here instead of...
431         Do not make read-only variant of types.  Simplify expressions.
432         In the by-ref case, test the mechanism before must_pass_by_ref
433         and also TYPE_IS_BY_REFERENCE_P before building the reference type.
434         (gnat_to_gnu_subprog_type): New static function extracted from...
435         Do not special-case the type_annotate_only mode.  Call
436         gnat_to_gnu_profile_type instead of gnat_to_gnu_type on return type.
437         Deal with dummy return types.  Likewise for parameter types.  Deal
438         with by-reference types explicitly and add a kludge for null procedures
439         with untagged incomplete types.  Remove assertion on the types and be
440         prepared for multiple elaboration of the declarations.  Skip the whole
441         CICO processing if the profile is incomplete.  Handle the completion of
442         a previously incomplete profile.
443         (gnat_to_gnu_entity) <E_Variable>: Rename local variable.
444         Adjust couple of calls to create_param_decl.
445         <E_Access_Subprogram_Type, E_Anonymous_Access_Subprogram_Type>:
446         Remove specific deferring code.
447         <E_Access_Type>: Also deal with E_Subprogram_Type designated type.
448         Simplify handling of dummy types and remove obsolete comment.
449         Constify a couple of variables.  Do not set TYPE_UNIVERSAL_ALIASING_P
450         on dummy types.
451         <E_Access_Subtype>: Tweak comment and simplify condition.
452         <E_Subprogram_Type>: ...here.  Call it and clean up handling.  Remove
453         obsolete comment and adjust call to gnat_to_gnu_param.  Adjust call to
454         create_subprog_decl.
455         <E_Incomplete_Type>: Add a couple of 'const' qualifiers and get rid of
456         inner break statements.  Tidy up condition guarding direct use of the
457         full view.
458         (get_minimal_subprog_decl): Delete.
459         (finalize_from_limited_with): Call update_profiles_with on dummy types
460         with TYPE_DUMMY_IN_PROFILE_P set.
461         (is_from_limited_with_of_main): Delete.
462         (associate_subprog_with_dummy_type): New function.
463         (update_profile): Likewise.
464         (update_profiles_with): Likewise.
465         (gnat_to_gnu_profile_type): Likewise.
466         (init_gnat_decl): Initialize dummy_to_subprog_map.
467         (destroy_gnat_decl): Destroy dummy_to_subprog_map.
468         * gcc-interface/misc.c (gnat_get_alias_set): Add guard for accessing
469         TYPE_UNIVERSAL_ALIASING_P.
470         (gnat_get_array_descr_info): Minor tweak.
471         * gcc-interface/trans.c (gigi): Adjust calls to create_subprog_decl.
472         (build_raise_check): Likewise.
473         (Compilation_Unit_to_gnu): Likewise.
474         (Identifier_to_gnu): Accept mismatches coming from a limited context.
475         (Attribute_to_gnu): Remove kludge for dispatch table entities.
476         (process_freeze_entity): Do not retrieve old definition if there is an
477         address clause on the entity.  Call update_profiles_with on dummy types
478         with TYPE_DUMMY_IN_PROFILE_P set.
479         * gcc-interface/utils.c (build_dummy_unc_pointer_types): Also set
480         TYPE_REFERENCE_TO to the fat pointer type.
481         (create_subprog_type): Delete.
482         (create_param_decl): Remove READONLY parameter.
483         (finish_subprog_decl): New function extracted from...
484         (create_subprog_decl): ...here.  Call it.  Remove CONST_FLAG and
485         VOLATILE_FLAG parameters and adjust.
486         (update_pointer_to): Also clear TYPE_REFERENCE_TO in the unconstrained
487         case.
489 2016-04-27  Arnaud Charlet  <charlet@adacore.com>
491         * aa_util.adb, aa_util.ads: Removed, no longer used.
493 2016-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
495         * sem_prag.adb (Analyze_Pragma): An object
496         renaming declaration resulting from the expansion of an object
497         declaration is a suitable context for pragma Ghost.
499 2016-04-27  Doug Rupp  <rupp@adacore.com>
501         * init.c: Refine last checkin so the only requirement is the
502         signaling compilation unit is compiled with the same mode as
503         the compilation unit containing the initial landing pad.
505 2016-04-27  Ed Schonberg  <schonberg@adacore.com>
507         * sem_ch13.adb (Valid_Default_Iterator): Better filter of illegal
508         specifications for Default_Iterator, including overloaded cases
509         where no interpretations are legal, and return types that are
510         not iterator types.
512 2016-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
514         * exp_ch5.adb (Expand_N_Assignment_Statement): Do not install
515         an accessibility check when the left hand side of the assignment
516         denotes a container cursor.
517         * exp_util.ads, exp_util.adb (Find_Primitive_Operations): Removed.
518         * sem_ch4.adb (Find_Indexing_Operations): New routine.
519         (Try_Container_Indexing): Code cleanup.
521 2016-04-27  Arnaud Charlet  <charlet@adacore.com>
523         * sem_ch10.adb, sem_case.adb: Mark messages udner -gnatwr when needed.
525 2016-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
527         * errout.adb, errutil.adb: Minor reformatting.
529 2016-04-27  Ed Schonberg  <schonberg@adacore.com>
531         * sem_ch13.adb (Analyze_Aspect_Specifications, case Pre/Post):
532         Check that the classwide version is illegal when the prefix is
533         an operation of an untagged synchronized type.
535 2016-04-27  Arnaud Charlet  <charleT@adacore.com>
537         * sinput-l.ads, sem_ch13.adb: Minor editing.
539 2016-04-27  Doug Rupp  <rupp@adacore.com>
541         * init.c (__gnat_adjust_context_for_raise) [arm-linux thumb]:
542         Bump the pc so the lower order bit is set.
544 2016-04-27  Ed Schonberg  <schonberg@adacore.com>
546         * sem_case.adb, sem_case.ads (NO_Op): If appropriate warning is
547         enabled, report an empty range in a case construct.
549 2016-04-27  Arnaud Charlet  <charlet@adacore.com>
551         * sinput.ads, a-cfdlli.adb, a-crbtgo.adb, a-chtgop.adb, a-cbhama.adb,
552         a-rbtgbo.adb, a-crdlli.adb, a-chtgbo.adb: Minor editing.
554 2016-04-27  Bob Duff  <duff@adacore.com>
556         * a-chtgop.adb (Adjust): Zero the tampering counts on assignment,
557         as is done for the other containers.
559 2016-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
561         * ghost.adb (In_Subprogram_Body_Profile): New routine.
562         (Is_OK_Declaration): Treat an unanalyzed expression
563         function as an OK context.  Treat a reference to a Ghost entity
564         as OK when it appears within the profile of a subprogram body.
566 2016-04-27  Bob Duff  <duff@adacore.com>
568         * errout.ads: Document the fact that informational messages
569         don't have to be warnings.
570         * errout.adb (Error_Msg_Internal): In statistics counts, deal
571         correctly with informational messages that are not warnings.
572         (Error_Msg_NEL): Remove useless 'if' aroung Set_Posted, because
573         Set_Posted already checks for errors and ignores others.
574         * erroutc.adb (Prescan_Message): Set Is_Serious_Error to False
575         if Is_Info_Msg; the previous code was assuming that Is_Info_Msg
576         implies Is_Warning_Msg.
577         * errutil.adb (Error_Msg): In statistics counts, deal correctly
578         with informational messages that are not warnings.
580 2016-04-27  Ed Schonberg  <schonberg@adacore.com>
582         * sem_util.ads, sem_util.adb (Is_Null_Record_Type): New predicate
583         to determine whether a record type is a null record.
584         * sem_ch3.adb (Analyze_Object_Declaration): If the type is a
585         null record and there is no expression in the declaration,
586         no predicate check applies to the object.
588 2016-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
590         * sem_ch7.adb (Analyze_Package_Body_Helper): The body of an
591         instantiated package should not cause freezing of previous contracts.
593 2016-04-27  Ed Schonberg  <schonberg@adacore.com>
595         * sem_dim.adb (Analyze_Dimension): Handle subtype declarations
596         that do not come from source.
597         (Analyze_Dimension_Subtype_Declaration): Allow confirming
598         dimensions on subtype entity, either inherited from base type
599         or provided by aspect specification.
601 2016-04-27  Ed Schonberg  <schonberg@adacore.com>
603         * s-gearop.ads (Matrix_Vector_Solution, Matrix_Matrix_Solution):
604         Add scalar formal object Zero, to allow detection and report
605         when the matrix is singular.
606         * s-gearop.adb (Matrix_Vector_Solution, Matrix_Matrix_Solution):
607         Raise Constraint_Error if the Forward_Eliminate pass has
608         determined that determinant is Zero.o
609         * s-ngrear.adb (Solve): Add actual for Zero in corresponding
610         instantiations.
611         * s-ngcoar.adb (Solve): Ditto.
613 2016-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
615         * sem_ch3.adb: Minor reformatting.
617 2016-04-27  Ed Schonberg  <schonberg@adacore.com>
619         * sem_dim.adb (Analyze_Dimension, case N_Identifier): Check
620         that identifier has a usable type before analysis, to handle
621         properly identifiers introduced after some lexical/syntactic
622         recovery that created new identifiers.
624 2016-04-27  Bob Duff  <duff@adacore.com>
626         * a-coinve.adb, a-comutr.adb, a-conhel.adb, a-convec.adb,
627         exp_util.adb: Remove assertions that can fail in obscure cases when
628         assertions are turned on but tampering checks are turned off.
630 2016-04-27  Javier Miranda  <miranda@adacore.com>
632         * exp_ch6.adb (Add_Call_By_Copy_Code,
633         Add_Simple_Call_By_Copy_Code, Expand_Actuals): Handle formals
634         whose type comes from the limited view.
636 2016-04-27  Yannick Moy  <moy@adacore.com>
638         * a-textio.adb: Complete previous patch.
640 2016-04-27  Yannick Moy  <moy@adacore.com>
642         * inline.adb (Expand_Inlined_Call): Use Cannot_Inline instead of
643         Error_Msg_N to issue message about impossibility to inline call,
644         with slight change of message.
646 2016-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
648         * exp_spark.adb (Expand_Potential_Renaming): Removed.
649         (Expand_SPARK): Update the call to expand a potential renaming.
650         (Expand_SPARK_Potential_Renaming): New routine.
651         * exp_spark.ads (Expand_SPARK_Potential_Renaming): New routine.
652         * sem.adb Add with and use clauses for Exp_SPARK.
653         (Analyze): Expand a non-overloaded potential renaming for SPARK.
655 2016-04-27  Ed Schonberg  <schonberg@adacore.com>
657         * sem_ch3.adb (Constrain_Discriminated_Type): In an instance,
658         check full view for the presence of defaulted discriminants,
659         even when the partial view of a private type has no visible and
660         no unknown discriminants.
662 2016-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
664         * lib-xref.adb, exp_ch3.adb: Minor reformatting.
666 2016-04-27  Nicolas Roche  <roche@adacore.com>
668         * rtinit.c: Add weak symbol __gnat_do_argv_expansion.
670 2016-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
672         * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile): Code
673         cleanup. Check the original node when trying to determine the node kind
674         of pragma Volatile's argument to account for untagged derivations
675         where the type is transformed into a constrained subtype.
677 2016-04-27  Olivier Hainque  <hainque@adacore.com>
679         * mkdir.c (__gnat_mkdir): Rework the vxworks section to use a
680         consistent posix interface on the caller side.
682 2016-04-27  Ed Schonberg  <schonberg@adacore.com>
684         * sem_ch10.adb (Build_Limited_View, Decorate_Type): If this
685         is a limited view of a type, initialize the Limited_Dependents
686         field to catch misuses of the type in a client unit.
688 2016-04-27  Thomas Quinot  <quinot@adacore.com>
690         * a-strunb-shared.adb (Finalize): add missing Reference call.
691         * s-strhas.adb: minor grammar fix and extension of comment
692         * sem_ch8.adb: minor whitespace fixes
694 2016-04-27  Ed Schonberg  <schonberg@adacore.com>
696         * lib-xref.adb (Get_Type_Reference): Handle properly the case
697         of an object declaration whose type definition is a class-wide
698         subtype and whose expression is a function call that returns a
699         classwide type.
701 2016-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
703         * sem_util.ads, sem_util.adb (Output_Entity): New routine.
704         (Output_Name): New routine.
706 2016-04-27  Bob Duff  <duff@adacore.com>
708         * exp_ch3.adb (Rewrite_As_Renaming): Disable previous change for now.
710 2016-04-27  Vincent Celier  <celier@adacore.com>
712         * gnatcmd.adb: For "gnat ls -V -P", recognize switch
713         --unchecked-shared-lib-imports and set the flag
714         Opt.Unchecked_Shared_Lib_Imports accordingly.
716 2016-04-27  Ed Schonberg  <schonberg@adacore.com>
718         * sem_prag.adb (Analyze_Pre_Post_Condition_In_Decl_Part):
719         A generic subprogram is never a primitive operation, and thus
720         a classwide condition for it is not legal.
722 2016-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
724         * sem_aggr.adb, sem_dim.adb, sem_dim.ads, einfo.adb: Minor
725         reformatting.
727 2016-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
729         * sem_res.adb (Flag_Effectively_Volatile_Objects): New routine.
730         (Resolve_Actuals): Flag effectively volatile objects with enabled
731         property Async_Writers or Effective_Reads as illegal.
732         * sem_util.adb (Is_OK_Volatile_Context): Comment reformatting.
734 2016-04-27  Javier Miranda  <miranda@adacore.com>
736         * exp_ch3.adb (Make_Predefined_Primitive_Specs):
737         Do not generate the profile of the equality operator if it has
738         been explicitly defined as abstract in the parent type. Required
739         to avoid reporting an spurious error.
741 2016-04-27  Ed Schonberg  <schonberg@adacore.com>
743         * sem_dim.ads, sem_dim.adb (Check_Expression_Dimensions): New
744         procedure to compute the dimension vector of a scalar expression
745         and compare it with the dimensions if its expected subtype. Used
746         for the ultimate components of a multidimensional aggregate,
747         whose components typically are themselves aggregates that are
748         expanded separately. Previous to this patch, dimensionality
749         checking on such aggregates generated spurious errors.
750         * sem_aggr.adb (Resolve_Array_Aggregate): Use
751         Check_Expression_Dimensions when needed.
753 2016-04-27  Javier Miranda  <miranda@adacore.com>
755         * einfo.ads, einfo.adb (Corresponding_Function): New attribute
756         (applicable to E_Procedure).
757         (Corresponding_Procedure): New attribute (applicable to E_Function).
758         * exp_util.adb (Build_Procedure_Form): Link the function with
759         its internally built proc and viceversa.
760         * sem_ch6.adb (Build_Subprogram_Declaration): Propagate the
761         attribute Rewritten_For_C and Corresponding_Procedure to the body.
762         * exp_ch6.adb (Rewritten_For_C_Func_Id): Removed.
763         (Rewritten_For_C_Proc_Id): Removed.
764         * exp_unst.adb (Note_Uplevel_Ref): Use the new attribute to
765         locate the corresponding procedure.
767 2016-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
769         * sem_ch13.adb (Analyze_Aspect_Export_Import): Signal that there is no
770         corresponding pragma.
772 2016-04-27  Bob Duff  <duff@adacore.com>
774         * exp_ch3.adb: Minor comment improvement.
776 2016-04-27  Ed Schonberg  <schonberg@adacore.com>
778         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration): If the
779         return type is an untagged limited record with only access
780         discriminants and no controlled components, the return value does not
781         need to use the secondary stack.
783 2016-04-27  Javier Miranda  <miranda@adacore.com>
785         * exp_util.adb (Remove_Side_Effects): When
786         generating C code handle object declarations that have
787         discriminants and are initialized by means of a call to a
788         function.
790 2016-04-27  Ed Schonberg  <schonberg@adacore.com>
792         * a-textio.adb (Get_Line function): Handle properly the case of
793         a line that has the same length as the buffer (or a multiple
794         thereof) and there is no line terminator.
795         * a-tigeli.adb (Get_Line procedure): Do not store an end_of_file
796         in the string when there is no previous line terminator and we
797         need at most one additional character.
799 2016-04-27  Arnaud Charlet  <charlet@adacore.com>
801         * s-rident.ads: Make No_Implicit_Loops non partition wide.
803 2016-04-27  Arnaud Charlet  <charlet@adacore.com>
805         * sem_ch11.adb (Analyze_Handled_Statements): check useless
806         assignments also in entries and task bodies, not only in
807         procedures and declaration blocks.
808         * sem_ch5.adb (Analyze_Block_Statement): check useless
809         assignements in declaration blocks as part of processing their
810         handled statement sequence, just like it was done for procedures
811         and now is also done for entries and task bodies.
812         * sem_warn.adb (Warn_On_Useless_Assignment): detect boundries
813         of entries and task bodies just like of procedures.
815 2016-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
817         * sem_util.adb (Is_Volatile_Function): Recognize
818         a function declared within a protected type as well as the
819         protected/unprotected version of a function.
821 2016-04-27  Bob Duff  <duff@adacore.com>
823         * exp_ch3.adb (Expand_N_Object_Declaration): Rewrite an object
824         declaration of the form "X : T := Func (...);", where T is
825         controlled, as a renaming.
826         * a-strunb-shared.adb (Finalize): Set the Unbounded_String Object
827         to be an empty string, instead of null-ing out the Reference.
828         * exp_util.adb (Needs_Finalization): Remove redundant code.
830 2016-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
832         * aspects.ads Aspects Export and Import do not require delay. They
833         were classified as delayed aspects, but treated as non-delayed
834         by the analysis of aspects.
835         * freeze.adb (Copy_Import_Pragma): New routine.
836         (Wrap_Imported_Subprogram): Copy the import pragma by first
837         resetting all semantic fields to avoid an infinite loop when
838         performing the copy.
839         * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): Add
840         comment on the processing of aspects Export and Import
841         at the freeze point.
842         (Analyze_Aspect_Convention: New routine.
843         (Analyze_Aspect_Export_Import): New routine.
844         (Analyze_Aspect_External_Link_Name): New routine.
845         (Analyze_Aspect_External_Or_Link_Name): Removed.
846         (Analyze_Aspect_Specifications): Factor out the analysis of
847         aspects Convention, Export, External_Name, Import, and Link_Name
848         in their respective routines.  Aspects Export and Import should
849         not generate a Boolean pragma because their corresponding pragmas
850         have a very different syntax.
851         (Build_Export_Import_Pragma): New routine.
852         (Get_Interfacing_Aspects): New routine.
854 2016-04-27  Eric Botcazou  <ebotcazou@adacore.com>
856         * inline.adb (Add_Inlined_Body): Overhaul implementation,
857         robustify handling of -gnatn1, add special treatment for
858         expression functions.
860 2016-04-27  Doug Rupp  <rupp@adacore.com>
862         * g-traceb.ads: Update comment.
863         * exp_ch2.adb: minor style fix in object declaration
865 2016-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
867         * sem_elab.adb (Check_Internal_Call): Do not
868         consider a call when it appears within pragma Initial_Condition
869         since the pragma is part of the elaboration statements of a
870         package body and may only call external subprograms or subprograms
871         whose body is already available.
872         (Within_Initial_Condition): New routine.
874 2016-04-27  Ed Schonberg  <schonberg@adacore.com>
876         * exp_util.adb (Build_Procedure_Form): Prevent double generation
877         of the procedure form when dealing with an expression function
878         whose return type is an array.
879         * sem_ch3.adb: Fix out-of order Has_Predicates setting.
880         * exp_ch6.adb: Proper conversion for inherited operation in C.
881         * sem_ch6.adb: Code cleanup.
883 2016-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
885         * lib-xref.ads, sem_ch10.adb: minor style fix in comment
886         * g-socket.adb: Minor reformatting.
887         * sinfo.ads: Minor comment correction.
888         * sem_warn.ads: minor grammar fix in comment
890 2016-04-27  Eric Botcazou  <ebotcazou@adacore.com>
892         * gcc-interface/gigi.h (gnat_to_gnu_entity): Adjust prototype.
893         (maybe_pad_type): Adjust comment.
894         (finish_record_type): Likewise.
895         (rest_of_record_type_compilation): Likewise.
896         * gcc-interface/decl.c (gnat_to_gnu_entity): Change DEFINITION type
897         parameter from integer to boolean.  Adjust recursive calls.
898         <E_Subprogram_Type>: Use copy_type and remove redundant assignments.
899         <E_Signed_Integer_Subtype>:  Adjust comment.  Remove call to
900         rest_of_record_type_compilation.  Set TYPE_PADDING_P flag earlier.
901         Pass false to finish_record_type.  Set the debug type later.
902         <E_Record_Subtype>: Remove call to rest_of_record_type_compilation.
903         (gnat_to_gnu_component_type): Fix formatting.
904         (gnat_to_gnu_field_decl): Adjust call to gnat_to_gnu_entity.
905         (gnat_to_gnu_type): Likewise.
906         * gcc-interface/trans.c (Identifier_to_gnu): Likewise.
907         (Loop_Statement_to_gnu): Likewise.
908         (Subprogram_Body_to_gnu): Likewise.
909         (Exception_Handler_to_gnu_fe_sjlj): Likewise.
910         (Exception_Handler_to_gnu_gcc): Likewise.
911         (Compilation_Unit_to_gnu): Likewise.
912         (gnat_to_gnu): Likewise.
913         (push_exception_label_stack): Likewise.
914         (elaborate_all_entities_for_package): Likewise.
915         (process_freeze_entity): Likewise.
916         (process_decls): Likewise.
917         (process_type): Likewise.
918         * gcc-interface/utils.c (struct deferred_decl_context_node): Tweak.
919         (maybe_pad_type): Adjust comments.  Set the debug type later.  Remove
920         call to rest_of_record_type_compilation.
921         (rest_of_record_type_compilation): Use copy_type.
922         (copy_type): Use correctly typed constants.
923         (gnat_signed_or_unsigned_type_for): Use copy_type.
924         * gcc-interface/utils2.c (nonbinary_modular_operation): Likewise.
925         (build_goto_raise): Adjust call tognat_to_gnu_entity.
927 2016-04-27  Eric Botcazou  <ebotcazou@adacore.com>
929         * gcc-interface/misc.c (gnat_init): Do not call
930         internal_reference_types.
932 2016-04-27  Svante Signell  <svante.signell@gmail.com>
934         * gcc-interface/Makefile.in (x86 GNU/Hurd): Use s-osinte-gnu.adb.
935         * s-osinte-gnu.ads: Small tweaks.
936         * s-osinte-gnu.adb: New file.
938 2016-04-21  Hristian Kirtchev  <kirtchev@adacore.com>
940         * sem_prag.adb (Match_Constituent): Treat a constant as a legal
941         constituent even if it is not to prevent spurious errors.
943 2016-04-21  Gary Dismukes  <dismukes@adacore.com>
945         * sem_ch4.adb: Minor typo fixes and reformatting.
947 2016-04-21  Dmitriy Anisimkov  <anisimko@adacore.com>
949         * g-calend.ads (No_Time): The same value in any timezone.
950         * g-socket.adb (Raise_Host_Error): Remove ending
951         dot from original error message before append colon delimited
952         host name.
954 2016-04-21  Hristian Kirtchev  <kirtchev@adacore.com>
956         * sem_ch3.adb: Code cleanup.
957         * sem_ch6.adb: Code cleanup.
958         (Is_Matching_Limited_View): New routine.
959         (Matches_Limited_With_View): Reimplemented.
960         * sem_ch10.adb (Decorate_Type): Code cleanup.
962 2016-04-21  Doug Rupp  <rupp@adacore.com>
964         * tracebak.c (PPC ELF): Add macro defs for lynxos178e.
966 2016-04-21  Ed Schonberg  <schonberg@adacore.com>
968         * sem_ch4.adb (Try_Container_Indexing): If there are overloaded
969         indexing functions, collect all overloadings of the call firts,
970         and then transfer them to indexing node, to prevent interleaving
971         of the set of interpretations of the nodes involved.
972         * sem_res.adb (Resolve): Suppress cascaded errors that report
973         ambiguities when one of the actuals in an overloaded generatlized
974         indexing operation is illegal and has type Any_Type, as is done
975         for similar cascaded errors in subprogram calls.
976         (Valid_Tagged_Conversion): Cleanup conversion checks when one
977         of the types involved is a class-wide subtype.
979 2016-04-21  Ed Schonberg  <schonberg@adacore.com>
981         * sem_ch12.adb (Load_Parent_Of_Generic): When looking for the
982         subprogram declaration within a wrapper package, skip pragmas
983         that may have been generated by aspect specifications on the
984         generic instance.
986 2016-04-21  Javier Miranda  <miranda@adacore.com>
988         * exp_aggr.adb (Component_Not_OK_For_Backend): Generating C
989         code return True for array identifiers since the backend needs
990         to initialize such component by means of memcpy().
992 2016-04-21  Arnaud Charlet  <charlet@adacore.com>
994         * a-tasatt.adb, a-tasatt.ads (Fast_Path): Rewritten to avoid reading
995         potentially uninitialized memory.
996         * sem_ch3.adb: Minor style fix in comment.
998 2016-04-21  Arnaud Charlet  <charlet@adacore.com>
1000         * gnat_rm.texi, gnat_ugn.texi,
1001         doc/gnat_ugn/gnat_project_manager.rst,
1002         doc/gnat_ugn/building_executable_programs_with_gnat.rst,
1003         doc/gnat_ugn/gnat_and_program_execution.rst,
1004         doc/gnat_ugn/gnat_utility_programs.rst,
1005         doc/gnat_ugn/the_gnat_compilation_model.rst,
1006         doc/gnat_rm/implementation_defined_attributes.rst,
1007         doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
1008         doc/gnat_rm/implementation_defined_pragmas.rst,
1009         doc/gnat_rm/the_gnat_library.rst,
1010         doc/gnat_rm/implementation_defined_aspects.rst: Update doc.
1011         * doc/Makefile: Cleanups.
1013 2016-04-21  Hristian Kirtchev  <kirtchev@adacore.com>
1015         * exp_pakd.adb, sem_ch13.adb: Minor reformatting.
1017 2016-04-21  Ed Schonberg  <schonberg@adacore.com>
1019         * exp_dbug.adb, exp_dbug.ads (Qualify_Entity_Name): Add suffixes to
1020         disambiguate local variables that may be hidden from inner visibility
1021         by nested block declarations or loop variables.
1023 2016-04-21  Jerome Lambourg  <lambourg@adacore.com>
1025         * s-soflin.adb: Initialize the Stack_Limit global variable.
1027 2016-04-21  Hristian Kirtchev  <kirtchev@adacore.com>
1029         * lib-writ.adb: Minor reformatting.
1031 2016-04-21  Ed Schonberg  <schonberg@adacore.com>
1033         * exp_pakd.adb (Compute_Number_Components): New function to
1034         build an expression that computes the number of a components of
1035         an array that may be multidimensional.
1036         (Expan_Packed_Eq): Use it.
1038 2016-04-21  Arnaud Charlet  <charlet@adacore.com>
1040         * g-traceb.ads: Update list of supported platforms.
1042 2016-04-21  Ed Schonberg  <schonberg@adacore.com>
1044         * sem_ch13.adb (Add_Predicates): if the type is declared in
1045         an inner package it may be frozen outside of the package, and
1046         the generated pragma has not been analyzed yet, the expression
1047         for the predicate must be captured and added to the predicate
1048         function at this point.
1050 2016-04-21  Hristian Kirtchev  <kirtchev@adacore.com>
1052         * contracts.adb (Analyze_Package_Body_Contract): Do not check
1053         for a missing package refinement because 1) packages do not have
1054         "refinement" and 2) the check for proper state refinement is
1055         performed in a different place.
1056         * einfo.adb (Has_Non_Null_Visible_Refinement): Reimplemented.
1057         (Has_Null_Visible_Refinement): Reimplemented.
1058         * sem_ch3.adb (Analyze_Declarations): Determine whether all
1059         abstract states have received a refinement and if not, emit
1060         errors.
1061         * sem_ch7.adb (Analyze_Package_Declaration): Code
1062         cleanup. Determine whether all abstract states of the
1063         package and any nested packages have received a refinement
1064         and if not, emit errors.
1065         (Requires_Completion_In_Body): Add new formal parameter
1066         Do_Abstract_States. Update the comment on usage. Propagate the
1067         Do_Abstract_States flag to all Unit_Requires_Body calls.
1068         (Unit_Requires_Body): Remove formal
1069         parameter Ignore_Abstract_States. Add new formal paramter
1070         Do_Abstract_States. Propagate the Do_Abstract_States flag to
1071         all Requires_Completion_In calls.
1072         * sem_ch7.ads (Unit_Requires_Body): Remove formal
1073         parameter Ignore_Abstract_States. Add new formal paramter
1074         Do_Abstract_States. Update the comment on usage.
1075         * sem_ch9.adb (Analyze_Single_Protected_Declaration): Do
1076         not initialize the constituent list as this is now done on a
1077         need-to-add-element basis.
1078         (Analyze_Single_Task_Declaration):
1079         Do not initialize the constituent list as this is now done on
1080         a need-to-add-element basis.
1081         * sem_ch10.adb (Decorate_State): Do not initialize the constituent
1082         lists as this is now done on a need-to-add-element basis.
1083         * sem_prag.adb (Analyze_Constituent): Set the
1084         refinement constituents when adding a new element.
1085         (Analyze_Part_Of_In_Decl_Part): Set the Part_Of constituents when
1086         adding a new element.
1087         (Analyze_Part_Of_Option): Set the Part_Of
1088         constituents when adding a new element.
1089         (Analyze_Pragma): Set the Part_Of constituents when adding a new
1090         element.
1091         (Check_Constituent_Usage (all versions)): Reimplemented.
1092         (Collect_Constituent): Set the refinement constituents when adding
1093         a new element.
1094         (Create_Abstract_State): Do not initialize the
1095         constituent lists as this is now done on a need-to-add-element basis.
1096         (Propagate_Part_Of): Set the Part_Of constituents when
1097         adding a new element.
1098         * sem_util.adb (Check_State_Refinements): New routine.
1099         (Has_Non_Null_Refinement): Reimplemented.
1100         (Has_Null_Refinement): Reimplemented.
1101         (Requires_State_Refinement): Removed.
1102         * sem_util.ads (Check_State_Refinements): New routine.
1103         (Requires_State_Refinement): Removed.
1105 2016-04-21  Hristian Kirtchev  <kirtchev@adacore.com>
1107         * lib-writ.adb, sem_ch6.adb: Minor reformatting and code cleanup.
1108         * sem.adb: Fix comment.
1110 2016-04-21  Ed Schonberg  <schonberg@adacore.com>
1112         * sem_ch3.adb (Analyze_Subtype_Declaration): A subtype
1113         declaration with no aspects, whose subtype_mark is a subtype
1114         with predicates, inherits the list of subprograms for the type.
1116 2016-04-21  Arnaud Charlet  <charlet@adacore.com>
1118         * exp_aggr.adb (Has_Per_Object_Constraint): Refine previous
1119         change.
1121 2016-04-21  Thomas Quinot  <quinot@adacore.com>
1123         * g-socket.adb (Raise_Host_Error): Include additional Name parameter.
1125 2016-04-21  Ed Schonberg  <schonberg@adacore.com>
1127         * lib-writ.adb (Write_ALI): Do not record in ali file units
1128         that are present in the files table but not analyzed. These
1129         units are present because they appear in the context of units
1130         named in limited_with clauses, and the unit being compiled does
1131         not depend semantically on them.
1133 2016-04-21  Ed Schonberg  <schonberg@adacore.com>
1135         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Simplify code to
1136         create the procedure body for an function returning an array type,
1137         when generating C code. Reuse the subprogram body rather than
1138         creating a new one, both as an efficiency measure and because
1139         in an instance the body may contain global references that must
1140         be preserved.
1142 2016-04-21  Hristian Kirtchev  <kirtchev@adacore.com>
1144         * sem_ch3.adb, exp_attr.adb, exp_ch6.adb, exp_aggr.adb: Minor
1145         reformatting.
1147 2016-04-21  Javier Miranda  <miranda@adacore.com>
1149         * exp_aggr.adb (Component_Check): Extend
1150         the check that verifies that the aggregate has no function
1151         calls to handle transformations performed by the frontend.
1152         (Ultimate_Original_Expression): New subprogram.
1154 2016-04-21  Philippe Gil  <gil@adacore.com>
1156         * krunch.adb (Krunch): Fix krunching of i-java.
1158 2016-04-21  Arnaud Charlet  <charlet@adacore.com>
1160         * exp_ch8.adb (Evaluation_Required): Always return
1161         True when Modify_Tree_For_C.
1163 2016-04-21  Eric Botcazou  <ebotcazou@adacore.com>
1165         * gnatlink.adb (Gnatlink): Robustify detection of Windows target.
1166         * alloc.ads: Minor comment fixes.
1167         * einfo.ads: Fix typo.
1169 2016-04-21  Arnaud Charlet  <charlet@adacore.com>
1171         * exp_aggr.adb (Component_Not_OK_For_Backend): Redo previous
1172         changes to handle all cases of components depending on the
1173         discriminant, not just string literals.
1175 2016-04-21  Ed Schonberg  <schonberg@adacore.com>
1177         * sem_ch3.adb (Analyze_Subtype_Declaration): If the subtype
1178         declaration is the generated declaration for a generic actual,
1179         inherit predicates from the actual if it is a predicated subtype.
1181 2016-04-21  Ed Schonberg  <schonberg@adacore.com>
1183         * exp_ch6.adb (Rewrite_Function_Call_For_C): If the function is
1184         inherited and its result is controlling,  introduce a conversion
1185         on the actual for the corresponding procedure call, to avoid
1186         spurious type errors.
1188 2016-04-21  Jerome Lambourg  <lambourg@adacore.com>
1190         * krunch.adb (Krunch): Fix krunching of i-vxworks.
1192 2016-04-21  Gary Dismukes  <dismukes@adacore.com>
1194         * exp_aggr.adb: Minor reformatting and code cleanup.
1196 2016-04-21  Ed Schonberg  <schonberg@adacore.com>
1198         * sem_ch13.adb (Resolve_Name): Omit quantified expressions from
1199         resolution, because they introduce local names. Full resolution
1200         will take place when predicate function is constructed.
1202 2016-04-21  Arnaud Charlet  <charlet@adacore.com>
1204         * exp_aggr.adb (Component_Not_OK_For_Backend): Refine previous
1205         change to take into account Per_Object_Constraint field rather
1206         than special casing strings.
1207         * exp_ch6.adb: Fix typo in Replace_Returns.
1209 2016-04-21  Hristian Kirtchev  <kirtchev@adacore.com>
1211         * sem_ch5.adb: Minor reformatting.
1213 2016-04-21  Arnaud Charlet  <charlet@adacore.com>
1215         * exp_aggr.adb (Backend_Processing_Possible): Return False
1216         when generating C and aggregate contains function calls.
1218 2016-04-21  Tristan Gingold  <gingold@adacore.com>
1220         * krunch.adb (Krunch): Only partially krunch children of
1221         Interfaces that aren't known.
1223 2016-04-21  Ed Schonberg  <schonberg@adacore.com>
1225         * sem_prag.adb (Make_Inline): Handle properly the instantiation
1226         of a generic subpprogram that carries an Inline aspect. Place
1227         inline info on the anonymous subprogram that is constructed in
1228         the wrapper package.
1229         (Analyze_Pragma, case Pure): Do not check placement if pragma
1230         appears within an instantiation, which can be nested at any level.
1231         * sem_ch12.adb (Analyze_Instance_And_Renamings): Do not copy Freeze
1232         node from anonymous subprogram to its visible renaming. The
1233         freeze node will be constructed if the subprogram carries
1234         delayed aspects.
1235         (Set_Global): Preserve dimension information if present (from
1236         code reading).
1238 2016-04-21  Vasiliy Fofanov  <fofanov@adacore.com>
1240         * gnatlink.adb: Change wording of the warning message on
1241         problematic filenames to be more neutral. Add a new substring
1242         "patch" introduced on Windows 10.
1244 2016-04-21  Philippe Gil  <gil@adacore.com>
1246         * tracebak.c (__gnat_backtrace): handle bad RIP values (win64 only)
1248 2016-04-21  Javier Miranda  <miranda@adacore.com>
1250         * exp_aggr.adb (Component_Not_OK_For_Backend): Return true for string
1251         literals.
1253 2016-04-21  Hristian Kirtchev  <kirtchev@adacore.com>
1255         * einfo.adb (Has_Non_Null_Abstract_State): New routine.
1256         * einfo.ads New synthesized attribute
1257         Has_Non_Null_Abstract_State along with occurrences in entities.
1258         (Has_Non_Null_Abstract_State): New routine.
1259         * sem_ch7.adb (Unit_Requires_Body): Add local variable
1260         Requires_Body. A package declaring an abstract state requires
1261         a body only when the state is non-null and the package contains
1262         at least one other construct that requires completion in a body.
1263         * sem_util.adb (Mode_Is_Off): Removed.
1264         (Requires_State_Refinement): Remove an obsolete check. Code
1265         cleanup.
1267 2016-04-21  Bob Duff  <duff@adacore.com>
1269         * sem_attr.adb (Analyze_Attribute): In processing
1270         the 'Old attribute, a warning is given for infinite recursion. Fix
1271         the code to not crash when the prefix of 'Old denotes a protected
1272         function.
1273         * sem_ch5.adb (Analyze_Iterator_Specification):
1274         Avoid calling Is_Dependent_Component_Of_Mutable_Object in cases
1275         where the parameter would not be an object.
1277 2016-04-21  Eric Botcazou  <ebotcazou@adacore.com>
1279         * sem_eval.adb (Compile_Time_Compare): Be prepared for an empty
1280         Etype or Underlying_Type of the operands.
1282 2016-04-21  Eric Botcazou  <ebotcazou@adacore.com>
1284         * atree.adb (Print_Statistics): Protect against overflows and
1285         print the memory consumption in bytes.
1286         * table.adb (Reallocate): Do the intermediate calculation of the new
1287         size using the Memory.size_t type.
1289 2016-04-21  Gary Dismukes  <dismukes@adacore.com>
1291         * exp_attr.adb (Is_Inline_Floating_Point_Attribute): Suppress
1292         expansion of Attribute_Machine and Attribute_Model for AAMP.
1294 2016-04-21  Ed Schonberg  <schonberg@adacore.com>
1296         * freeze.adb: Disable previous change for now.
1298 2016-04-21  Ed Schonberg  <schonberg@adacore.com>
1300         * sem_ch8.adb (Find_Selected_Component): If prefix has an
1301         access type and designated type is a limited view, introduce
1302         an explicit dereference before continuing the analysis, and
1303         set its type to the non-limited view of the designated type,
1304         if we are in context where it is available.
1306 2016-04-21  Ed Schonberg  <schonberg@adacore.com>
1308         * freeze.adb: Freeze profile in ASIS mode.
1310 2016-04-21  Hristian Kirtchev  <kirtchev@adacore.com>
1312         * sem_aux.ads, sem_aux.adb (Has_Rep_Item): New variant.
1313         * sem_util.adb (Inherit_Rep_Item_Chain): Reimplemented.
1315 2016-04-21  Hristian Kirtchev  <kirtchev@adacore.com>
1317         * exp_ch6.adb: Minor reformatting.
1319 2016-04-21  Ed Schonberg  <schonberg@adacore.com>
1321         * sem_ch13.adb: Minor comment update.
1323 2016-04-21  Ed Schonberg  <schonberg@adacore.com>
1325         * freeze.ads, freeze.adb (Freeze_Entity, Freeze_Before): Add
1326         boolean parameter to determine whether freezing an overloadable
1327         entity freezes its profile as well. This is required by
1328         AI05-019. The call to Freeze_Profile within Freeze_Entity is
1329         conditioned by the value of this flag, whose default is True.
1330         * sem_attr.adb (Resolve_Attribute, case 'Access): The attribute
1331         reference freezes the prefix, but it the prefix is a subprogram
1332         it does not freeze its profile.
1334 2016-04-21  Javier Miranda  <miranda@adacore.com>
1336         * exp_util.adb (Build_Procedure_Form): No action needed for
1337         subprogram renamings since the backend can generate the call
1338         using the renamed subprogram. This leaves the tree more clean
1339         to the backend.
1340         * exp_ch6.adb (Expand_Call): Extend previous patch for
1341         rewritten-for-c entities to handle subprogram renamings.
1342         (Rewrite_Function_Call_For_C): Handle subprogram renamings.
1344 2016-04-21  Ed Schonberg  <schonberg@adacore.com>
1346         * sem_ch13.adb: Code cleanup.
1348 2016-04-21  Ed Schonberg  <schonberg@adacore.com>
1350         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If the body is
1351         created for SPARK_To_C, the entity must remain invisible so it
1352         does not overload subsequent references to the original function.
1353         * exp_ch6.adb (Build_Procedure_Body_Form, Replace_Returns):
1354         Handle Extended_Return_Statements by replacing it with a block
1355         with assignments and a simple return statement.
1356         * exp_util.adb (Build_Procedure_Form): Make procedure entity
1357         invisible after analyzing declaration, to prevent improper
1358         overloading.
1360 2016-04-21  Javier Miranda  <miranda@adacore.com>
1362         * sem_ch6.adb (Build_Subprogram_Declaration): Propagate the
1363         attribute Rewritten_For_C to the body since since the expander
1364         may generate calls using that entity.
1365         * exp_ch6.adb (Expand_Call): For internally generated
1366         calls ensure that they reference the entity of the spec
1367         of the called function.
1368         (Rewritten_For_C_Func_Id): New subprogram.
1369         (Rewritten_For_C_Proc_Id): New subprogram.
1370         (Rewrite_Function_Call_For_C): Invoke the new subprogram to
1371         ensure that we skip freezing entities.
1372         * exp_util.adb (Build_Procedure_Form): No action needed if the
1373         procedure was already built.
1375 2016-04-21  Hristian Kirtchev  <kirtchev@adacore.com>
1377         * sem_ch3.adb, exp_util.adb, sem_ch13.adb, exp_unst.adb: Minor
1378         reformatting.
1380 2016-04-21  Ed Schonberg  <schonberg@adacore.com>
1382         * sem_util.adb (Denotes_Iterator): Use root type to determine
1383         whether the ultimate ancestor is the predefined iterator
1384         interface pakage.
1385         * exp_ch5.adb (Expand_Iterator_Over_Container): simplify code
1386         and avoid reuse of Pack local variable.
1388 2016-04-21  Olivier Hainque  <hainque@adacore.com>
1390         * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
1391         system-vxworks-ppc.ads, system-vxworks-m68k.ads,
1392         system-vxworks-mips.ads, system-vxworks-x86.ads: Define
1393         Executable_Extension to ".out".
1395 2016-04-21  Javier Miranda  <miranda@adacore.com>
1397         * frontend.adb: Update call to Unnest_Subprograms.
1398         * exp_ch6.ads, exp_ch6.adb, exp_unst.ads, exp_unst.adb
1399         (Unnest_Subprograms): Moved to package exp_unst.
1400         * exp_unst.ads (Unnest_Subprogram): Moved to the body of the
1401         package.
1402         * exp_dbug.adb (Qualify_Entity_Name): Enable qualification of
1403         enumeration literals when generating C code.
1405 2016-04-21  Javier Miranda  <miranda@adacore.com>
1407         * frontend.adb: Remove call to initialize Exp_Ch6.
1408         * exp_ch6.ads, exp_ch6.adb (Initialize): removed.
1409         (Unest_Entry/Unest_Bodies): Removed.
1410         (Unnest_Subprograms): Code cleanup.
1412 2016-04-21  Arnaud Charlet  <charlet@adacore.com>
1414         * set_targ.adb (Read_Target_Dependent_Values):
1415         close target description file once its contents is read.
1416         * s-os_lib.adb (Non_Blocking_Spawn, version with Stdout_File
1417         and Stderr_File): Close local file descriptors before spawning
1418         child process.
1419         * exp_util.adb (Containing_Package_With_Ext_Axioms): Limit scope of
1420         local variables to make the code easier to understand and avoid
1421         duplicated calls to Parent and Generic_Parent.
1423 2016-04-20  Bob Duff  <duff@adacore.com>
1425         * s-os_lib.ads: Minor comment fix.
1427 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
1429         * exp_ch5.adb (Expand_N_Assignment_Statement): Do no generate
1430         a discriminant check for a type whose partial view has unknown
1431         discriminants when the full view has discriminants with defaults.
1433 2016-04-20  Javier Miranda  <miranda@adacore.com>
1435         * exp_util.adb (Remove_Side_Effects): When generating C code
1436         remove side effect of type conversion of access to unconstrained
1437         array type.
1438         (Side_Effect_Free): Return false for the type
1439         conversion of access to unconstrained array type when generating
1440         C code.
1441         * sem_res.adb (Resolved_Type_Conversion): Remove side effects
1442         of access to unconstrained array type conversion when generating
1443         C code.
1445 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
1447         * sem_ch13.adb (Build_Predicate_Function_Declaration): New
1448         function, to construct the declaration of a predicate function
1449         at the end of the current declarative part rather than at the
1450         (possibly later) freeze point of the type. This also allows uses
1451         of a type with predicates in instantiations elsewhere.
1452         (Resolve_Aspect_Expression): New procedure to detect visiblity
1453         errors in aspect expressions, at the end of the declarative part
1454         that includes the type declaration.
1455         * sem_ch3.adb (Complete_Private_Subtype): Propagate properly the
1456         predicate function from private to full view.
1457         * einfo.adb (Predicate_Function): Refine search for predicate
1458         function when type has a full view and predicate function may
1459         be defined on either view.
1461 2016-04-20  Javier Miranda  <miranda@adacore.com>
1463         * frontend.adb: Passing the root of the tree to
1464         Unnest_Subprograms().
1465         * exp_ch6.adb (Expand_N_Subprogram_Body): Remove code that
1466         took care of adding subprograms to the Unest_Bodies table since
1467         performing such action too early disables the ability to process
1468         generic instantiations.
1469         (Unnest_Subprograms): Adding parameter.
1470         (Search_Unnesting_Subprograms): New subprogram.
1471         * exp_ch6.ads (Unnest_Subrograms): Update documentation.
1473 2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>
1475         * exp_util.adb, freeze.adb, sem_util.adb: Minor reformatting.
1477 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
1479         * exp_unst.adb (Check_Static_Type): For a private type, check
1480         full view.
1482 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
1484         * sem_attr.adb (Check_Type): Reject an attribute reference in
1485         an aspect expression, when the prefix of the reference is the
1486         current instance of the type to which the aspect applies.
1488 2016-04-20  Bob Duff  <duff@adacore.com>
1490         * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about
1491         hiding unless we're actually hiding something. The previous
1492         code would (for example) warn about a "<" on a record type
1493         because it incorrectly thought it was hiding the "<" on Boolean
1494         in Standard. We need to check that the homonym S is in fact a
1495         homograph of a predefined operator.
1497 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
1499         * exp_util.ads, exp_util.adb (Build_Procedure_Form): Moved here
1500         from exp_ch6.adb, for use in SPARK_To_C mode when creating the
1501         procedure equivalent to a function returning an array, when this
1502         construction is deferred to the freeze point of the function.
1503         * sem_util.adb (Is_Unchecked_Conversion_Instance): Include a
1504         function that renames an instance of Unchecked_Conversion.
1505         * freeze.adb (Freeze_Subprogram): Generate the proper procedure
1506         declaration for a function returning an array.
1507         * exp_ch6.adb (Build_Procedure_Form): Moved to exp_util.
1509 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
1511         * sem_util.ads, sem_util.adb (Is_Expanded_Priority_Attribute):
1512         New predicate to determine that in a context with full run-time,
1513         a function call is an expansion of a reference to attribute
1514         Priority.
1515         * sem_ch5.adb (Analyze_Function_Call): use it.
1516         * exp_ch5.adb (Expand_N_Subprogram_Call): use it.
1518 2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>
1520         * einfo.adb Flag286 is now used as Is_Exception_Handler.
1521         (Is_Exception_Handler): New routine.
1522         (Set_Is_Exception_Handler): New routine.
1523         (Write_Entity_Flags): Output the status of Is_Exception_Handler.
1524         * einfo.ads New attribute Is_Exception_Handler along with
1525         occurrences in entities.
1526         (Is_Exception_Handler): New routine along with pragma Inline.
1527         (Set_Is_Exception_Handler): New routine along with pragma Inline.
1528         * exp_ch7.adb (Make_Transient_Block): Ignore blocks generated
1529         for exception handlers with a choice parameter.
1530         * sem_ch11.adb (Analyze_Exception_Handlers): Mark the scope
1531         generated for a choice parameter as an exception handler.
1533 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
1535         * sem_ch3.adb (Build_Derived_Access_Type): Remove dead code.
1536         (Constrain_Discriminated_Type): In an instance, if the type has
1537         unknown discriminants, use its full view.
1538         (Process_Subtype): Check that the base type is private before
1539         adding subtype to Private_Dependents list.
1541 2016-04-20  Bob Duff  <duff@adacore.com>
1543         * sem_ch13.adb: Minor comment fix.
1545 2016-04-20  Yannick Moy  <moy@adacore.com>
1547         * sem_ch4.adb: Fix typos in comments.
1548         * sem_res.adb (Resolve_Case_Expression): Fix type of case alternatives.
1550 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
1552         * sem_ch4.adb (Analyze_Selected_Component): A reference to the
1553         current instance of a task type is legal if the prefix is an
1554         expression of that task type and the selector is an entry or
1555         entry family.
1557 2016-04-20  Arnaud Charlet  <charlet@adacore.com>
1559         * a-cfdlli.ads (List): Type is no longer tagged, not needed. Move
1560         varsize field at the end for efficiency.
1562 2016-04-20  Vincent Celier  <celier@adacore.com>
1564         * gnatcmd.adb: Do not invoke gprls when the invocation of "gnat
1565         ls" includes the switch -V.
1566         * clean.adb: "<target>-gnatclean -P" now calls "gprclean
1567         --target=<target>"
1568         * make.adb: "<target>-gnatmake -P" now calls "gprbuild
1569         --target=<target>"
1571 2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>
1573         * sem_ch12.adb (Qualify_Type): Do not perform
1574         partial qualification when the immediate scope is a generic unit.
1576 2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>
1578         * exp_unst.adb: Minor reformatting.
1580 2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>
1582         * exp_ch4.adb (Expand_Allocator_Expression): Ensure that the
1583         tag assignment and adjustment preceed the accessibility check.
1584         * exp_ch7.adb (Is_Subprogram_Call): Reimplemented.
1586 2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>
1588         * exp_prag.adb (Expand_Attributes): Ensure that
1589         the temporary used to capture the value of attribute 'Old's
1590         prefix is properly initialized.
1592 2016-04-20  Javier Miranda  <miranda@adacore.com>
1594         * exp_unst.ads, exp_unst.adb (Get_Level, Subp_Index): Moved to library
1595         level.
1597 2016-04-20  Arnaud Charlet  <charlet@adacore.com>
1599         * sem_ch9.adb (Analyze_Task_Type_Declaration): Shut down warning
1600         in codepeer mode.
1602 2016-04-20  Vincent Celier  <celier@adacore.com>
1604         * make.adb: Code cleanup.
1606 2016-04-20  Arnaud Charlet  <charlet@adacore.com>
1608         * exp_ch4.adb (Expand_Allocator_Expression): Help C code
1609         generation.
1611 2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>
1613         * sem_ch12.adb (Copy_Generic_Node): Handle the special
1614         qualification installed for universal literals that act as
1615         operands in binary or unary operators.  (Qualify_Operand): Mark
1616         the qualification to signal the instantiation mechanism how to
1617         handle global reference propagation.
1618         * sinfo.adb (Is_Qualified_Universal_Literal): New routine.
1619         (Set_Is_Qualified_Universal_Literal): New routine.
1620         * sinfo.ads New attribute Is_Qualified_Universal_Literal along
1621         with occurrences in nodes.
1622         (Is_Qualified_Universal_Literal):
1623         New routine along with pragma Inline.
1624         (Set_Is_Qualified_Universal_Literal): New routine along with
1625         pragma Inline.
1627 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
1629         * sem.adb (Do_Analyze): Save and restore Style_Max_Line_Length
1630         so that the corresponding checks are preserved across compilations
1631         that include System.Constants in their context.
1633 2016-04-20  Gary Dismukes  <dismukes@adacore.com>
1635         * sem_type.adb: Minor typo fix and reformatting.
1636         * a-conhel.ads: Update comment.
1638 2016-04-20  Bob Duff  <duff@adacore.com>
1640         * a-cihama.adb, a-cihase.adb, a-coinve.adb (Copy): Rewrite the
1641         code so it doesn't trigger an "uninit var" warning.
1643 2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>
1645         * sem_attr.ads Add new table Universal_Type_Attribute.
1646         * sem_util.adb (Yields_Universal_Type): Use a table lookup when
1647         checking attributes.
1649 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
1651         * exp_aggr.adb (Init_Stored_Discriminants,
1652         Init_Visible_Discriminants): New procedures, subsidiary of
1653         Build_Record_Aggr_Code, to handle properly the construction
1654         of aggregates for a derived type that constrains some parent
1655         discriminants and renames others.
1657 2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>
1659         * sem_ch12.adb (Qualify_Universal_Operands): New routine.
1660         (Save_References_In_Operator): Add explicit qualifications in
1661         the generic template for all operands of universal type.
1662         * sem_type.adb (Disambiguate): Update the call to Matches.
1663         (Matches): Reimplemented.
1664         * sem_util.ads, sem_util.adb (Yields_Universal_Type): New routine.
1666 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
1668         * sem_ch13.adb (Rep_Item_Too_Late): Better error message for
1669         an illegal aspect that freezes the entity to which it applies.
1671 2016-04-20  Bob Duff  <duff@adacore.com>
1673         * a-stwibo.ads, a-stzbou.ads
1674         ("="): Add overriding keyword before function to avoid crash when
1675         compiler is called with -gnatyO (check overriding indicators).
1677 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
1679         * sem_prag.adb (Analyze_Pragma, case Check_Policy):  If this
1680         is a configuration pragma and it uses the ARG syntax, insert
1681         the rewritten pragma after the current one rather than using
1682         Insert_Actions.
1684 2016-04-20  Arnaud Charlet  <charlet@adacore.com>
1686         * exp_aggr.adb (Backend_Processing_Possible): Add handling of
1687         C back-end.
1689 2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>
1691         * s-imgllu.adb, sem_util.adb, s-imgint.adb, s-imguns.adb,
1692         s-imglli.adb: Minor reformatting.
1694 2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>
1696         * sem_res.adb (Rewrite_Renamed_Operator): Do not rewrite the
1697         renamed operator when the associated node appears within a
1698         pre/postcondition.
1699         * sem_util.ads, sem_util.adb (In_Pre_Post_Condition): New routine.
1701 2016-04-20  Yannick Moy  <moy@adacore.com>
1703         * osint.adb (Relocate_Path): Fix test when Path is shorter than Prefix.
1704         * einfo.adb (Set_Overridden_Operation): Add assertion.
1705         * sem_util.adb (Unique_Entity): for renaming-as-body return the spec
1706         entity.
1708 2016-04-20  Javier Miranda  <miranda@adacore.com>
1710         * exp_unst.adb (Append_Unique_Call): New subprogram.
1711         (Unnest_Subprogram): Replace the unique occurrence
1712         of Call.Append() by Append_Unique_Call() which protects us from
1713         adding to the Calls table duplicated entries.
1715 2016-04-20  Arnaud Charlet  <charlet@adacore.com>
1717         * exp_attr.adb (Is_GCC_Target): Fix for C backend.
1718         * xref_lib.ads (Dependencies_Tables): instantiate
1719         Table package with types that guarantee its safe use.
1720         * s-imgllu.adb, s-imgint.adb, s-imguns.adb, s-imglli.adb: Avoid nested
1721         procedures.
1723 2016-04-20  Arnaud Charlet  <charlet@adacore.com>
1725         * exp_attr.adb (Expand_N_Attribute_Reference [Attribute_Valid]):
1726         Disable expansion when generating C code.
1727         * sinfo.ads, inline.ads: Minor editing.
1729 2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>
1731         * sem_util.adb, contracts.adb, ghost.adb, exp_ch6.adb: Minor
1732         reformatting.
1734 2016-04-20  Javier Miranda  <miranda@adacore.com>
1736         * contracts.adb (Build_Postconditions_Procedure): Code cleanup.
1737         * ghost.adb (Os_OK_Ghost_Context.Is_OK_Declaration): Handle the
1738         declaration of the internally built _postcondition procedure.
1740 2016-04-20  Arnaud Charlet  <charlet@adacore.com>
1742         * snames.ads-tmpl (Internal_Attribute_Id, Attribute_Class_Array): Fix
1743         indentation.
1744         * sem_util.adb (Is_Unchecked_Conversion_Instance):
1745         defense against library-level renamings of other functions,
1746         which are never instances of Unchecked_Conversion.
1747         * einfo.ads: minor fix of casing in comment
1749 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
1751         * exp_ch6.adb (Expand_N_Subprogram_Stub): Do not expand a body
1752         that has been analyzed and expanded already. Qualify the names
1753         in the proper body for use in the generation of C code.
1755 2016-04-20  Javier Miranda  <miranda@adacore.com>
1757         * contracts.adb (Build_Postconditions_Procedure): Force its
1758         inlining when generating C code.
1759         * sem_attr.adb (Analyze_Attribute_Old_Result): Handle inlined
1760         _postconditions when generating C code.
1761         * exp_ch6.adb (Inlined_Subprogram): Inline calls to
1762         _postconditions when generating C code.
1763         * sinfo.ads, sinfo.adb (Corresponding_Spec, Set_Corresponding_Spec):
1764         types of return value and argument changed from Node_Id to
1765         Entity_Id.
1767 2016-04-20  Vincent Celier  <celier@adacore.com>
1769         * make.adb, clean.adb, gnatname.adb: Revert previous change for now.
1771 2016-04-20  Eric Botcazou  <ebotcazou@adacore.com>
1773         * sem_ch12.adb (Analyze_Instance_And_Renamings): Do not reset
1774         the Has_Delayed_Freeze flag on the anonymous instance node.
1776 2016-04-20  Javier Miranda  <miranda@adacore.com>
1778         * sem_ch5.adb (Analyze_Iterator_Specification): Remove transient
1779         scope associated with the renaming object declaration.
1780         * exp_util.adb (Insert_Actions): Remove handling of iterator
1781         loop marked as requiring the secondary stack.
1783 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
1785         * sem_attr.adb (Analyze_Attribute, case 'Image): Implement
1786         AI12-0124, which extends the functionality of the attribute so it
1787         reflects the semantics of GNAT 'Img when applied to scalar types.
1788         * lib-xref.adb: minor whitespace layout fix.
1790 2016-04-20  Vincent Celier  <celier@adacore.com>
1792         * clean.adb (Gnatclean): Fail if project file specified and
1793         gprclean is not available.
1794         * gnatname.adb: Fail is -P is used and gprname is not available.
1795         * make.adb (Initialize): Fail if project file specified and
1796         gprbuild is not available.
1798 2016-04-20  Bob Duff  <duff@adacore.com>
1800         * sem_ch5.adb (Analyze_Iterator_Specification): Do not use secondary
1801         stack when possible.
1803 2016-04-20  Gary Dismukes  <dismukes@adacore.com>
1805         * par_sco.adb, sem_util.adb, sem_ch13.adb: Minor typo corrections and
1806         reformatting.
1808 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
1810         * sem_prag.adb (Analyze_Pragma, case Default_Storage_Pool):
1811         If the pragma comes from an aspect specification, verify that
1812         the aspect applies to an entity with a declarative part.
1813         * exp_ch5.adb: Code cleanup.
1815 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
1817         * sem_res.adb (Resolve_If_Expression): If first expression is
1818         universal, resolve subsequent ones with the corresponding class
1819         type (Any_Integer or Any_Real).
1821 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
1823         * sem_ch5.adb (Analyze_Iterator_Specification): If expansion is
1824         disabled, complete the analysis of the iterator name to ensure
1825         that reference for entities within are properly generated.
1827 2016-04-20  Arnaud Charlet  <charlet@adacore.com>
1829         * a-dispat.ads (Yield): add Global contract.
1830         * a-calend.ads, a-reatim.ads: Added Initializes => Clock_Time.
1831         * a-taside.adb: Added Initializes => Tasking_State.
1833 2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>
1835         * sem_ch13.adb (Build_Invariant_Procedure):
1836         Reimplement the invariant procedure spec and body insertion.
1838 2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>
1840         * sem_ch13.adb (Add_Invariant): Do not replace
1841         the saved expression of an invariatn aspect when inheriting
1842         a class-wide type invariant as this clobbers the existing
1843         expression. Do not use New_Copy_List as it is unnecessary
1844         and leaves the parent pointers referencing the wrong part of
1845         the tree. Do not replace the type references for ASIS when
1846         inheriting a class-wide type invariant as this clobbers the
1847         existing replacement.
1849 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
1851         * sem_util.adb (Build_Explicit_Dereference): If the designated
1852         expression is an entity name, generate reference to the entity
1853         because it will not be resolved again.
1855 2016-04-19  Arnaud Charlet  <charlet@adacore.com>
1857         * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
1858         gnat_rm.texi: Update documentation.
1860 2016-04-19  Olivier Hainque  <hainque@adacore.com>
1862         * par_sco.adb (Traverse_One, case N_Case_Statement):
1863         Skip pragmas before the first alternative.
1864         (Traverse_Handled_Statement_Sequence, Exception_Handlers): Likewise.
1866 2016-04-19  Tristan Gingold  <gingold@adacore.com>
1868         * adaint.c (__gnat_lwp_self): New function (for darwin).
1869         * s-osinte-darwin.ads, s-osinte-darwin.adb (lwp_self): Import
1870         of __gnat_lwp_self.
1872 2016-04-19  Olivier Hainque  <hainque@adacore.com>
1874         * sem_util.adb (Build_Elaboration_Entity): Always request an
1875         elab counter when preserving control-flow.
1877 2016-04-19  Olivier Hainque  <hainque@adacore.com>
1879         * sem_ch13.adb (Build_Invariant_Procedure_Declaration): Set
1880         Needs_Debug_Info when producing SCOs.
1881         * par_sco.adb (Traverse_Aspects): Fix categorization of
1882         Type_Invariant to match actual processing as activated depending
1883         on pragma Assertion_Policy.
1884         * sem_prag.adb (Analyze_Pragma): Remove special case for
1885         Name_Invariant regarding SCO generation, which completely disabled
1886         the production of SCOs for Invariant pragmas and aspects.
1888 2016-04-19  Hristian Kirtchev  <kirtchev@adacore.com>
1890         * checks.adb, sem_util.adb, sem_res.adb, sem_attr.adb: Minor
1891         reformatting.
1893 2016-04-19  Ed Schonberg  <schonberg@adacore.com>
1895         * freeze.adb (Freeze_Profile): Refine predicate that checks
1896         whether a function that returns a limited view is declared in
1897         another unit and cannot be frozen at this point.
1899 2016-04-19  Ed Schonberg  <schonberg@adacore.com>
1901         * exp_aggr.adb (Component_Count): Handle properly superflat
1902         arrays, i.e. empty arrays where Hi < Lo - 1, to ensure that the
1903         return value of the function is Natural, rather than leaving
1904         the handling of such arrays to the caller of this function.
1906 2016-04-19  Arnaud Charlet  <charlet@adacore.com>
1908         * sem_prag.adb, sem_attr.adb, par-prag.adb, exp_aggr.adb, sem_type.adb
1909         sem_ch12.adb, sem_ch3.adb, exp_ch7.adb, exp_ch9.adb: Code cleanup.
1910         * sem_res.adb, sem_util.ads, sem_util.adb (Is_OK_Volatile_Context):
1911         Promoted from being a nested subprogram in Sem_Res.Resolve_Entity_Name
1912         to publicly visible routine in Sem_Util.
1914 2016-04-19  Ed Schonberg  <schonberg@adacore.com>
1916         * checks.adb (Apply_Parameter_Aliasing_Checks): Do not apply
1917         the check if the type of the actual is By_Reference.
1919 2016-04-19  Arnaud Charlet  <charlet@adacore.com>
1921         * sem_res.adb (Within_Subprogram_Call): Detect
1922         also nodes that appear in entry calls.
1923         (Resolve_Actuals, Insert_Default): Propagate
1924         dimension information if any, from default expression to the
1925         copy that appears in the list of actuals.
1926         * uintp.ads: minor whitespace fix in comment.
1927         * sem_prag.adb, stringt.adb, inline.adb, lib-xref-spark_specific.adb:
1928         Minor code cleanup.
1929         * set_targ.adb (Set_Targ): convert directly from
1930         Natural to Pos, without intermediate conversion to Int.
1932 2016-04-19  Arnaud Charlet  <charlet@adacore.com>
1934         * sem_ch6.adb (Process_Formals): Mark suspicious reference to
1935         SPARK RM in comment.
1936         * sem_prag.adb (Analyze_Global_Item): Fix reference to SPARK RM
1937         in comment.
1938         * sem_res.adb (Property_Error, Resolve_Actuals): Fix reference
1939         to SPARK RM in both comment and error message.
1941 2016-04-19  Eric Botcazou  <ebotcazou@adacore.com>
1943         * sem_ch6.adb (Possible_Freeze): If the type is an incomplete
1944         CW type, then the subprogram must have a delayed freeze. This
1945         ensures that the backend can properly recover the full view when
1946         elaborating the access subprogram declaration.
1948 2016-04-19  Ed Schonberg  <schonberg@adacore.com>
1950         * sem_attr.adb (Resolve_Attribute, case 'Access): Freeze
1951         overloadable entity if originally overloaded.
1953 2016-04-19  Arnaud Charlet  <charlet@adacore.com>
1955         * exp_aggr.adb, exp_ch3.adb, exp_ch7.adb, exp_ch9.adb, exp_code.adb,
1956         exp_fixd.adb, namet.adb, osint.adb, osint.ads, par-ch2.adb,
1957         sem_ch10.adb, sem_ch12.adb, sem_disp.adb, sem_elab.adb, sem_elim.adb
1958         sem_util.adb, styleg.adb, styleg.ads, stylesw.ads: Minor code
1959         clean up.
1961 2016-04-19  Arnaud Charlet  <charlet@adacore.com>
1963         * sem_util.adb (Copy_Node_With_Replacement):
1964         use Set_Comes_From_Source instead of directly manipulating
1965         internals of the node table.
1966         * sem_util.adb (Within_Scope): refactored to remove duplicated code.
1967         * sem_aux.adb (Get_Rep_Pragma,
1968         Subprogram_Body_Entity, Subprogram_Spec): declare variables that
1969         do not change as constants and initialize them in the declaration.
1970         (Get_Rep_Pragma, Subprogram_Body_Entity, Subprogram_Spec): declare
1971         variables that do not change as constants and initialize them
1972         in the declaration.
1974 2016-04-19  Ed Schonberg  <schonberg@adacore.com>
1976         * sem_res.adb (Resolve_Entry_Call): If the entry has
1977         preconditions it is rewritten by means of a wrapper that
1978         incorporates the original call. Before rewriting generate a
1979         reference to the entry being called to prevent spurious warnings
1980         and provide correct cross-reference information.
1982 2016-04-19  Hristian Kirtchev  <kirtchev@adacore.com>
1984         * sem_disp.adb (Check_Dispatching_Context): Code cleanup. Add
1985         local constant Scop. Ignore any internally generated loops when
1986         performing the check concerning an abstract subprogram call
1987         without a controlling argument.
1988         * sem_util.ads, sem_util.adb (Current_Scope_No_Loops): New routine.
1990 2016-04-19  Bob Duff  <duff@adacore.com>
1992         * sem_elab.adb (Check_A_Call): There are cases where we have No
1993         (Ent) after the Alias loop, even when there was no previous error,
1994         so we can't assert that there was an error.
1996 2016-04-19  Ed Schonberg  <schonberg@adacore.com>
1998         * sem_attr.adb (Analyze_Access_Attribute, OK_Self_Reference):
1999         Reject use of type name as a prefix to 'access within an aggregate
2000         in a context that is not the declarative region of a type.
2002 2016-04-19  Vincent Celier  <celier@adacore.com>
2004         * gnatcmd.adb: Make "gnat ls -P" invoke gprls Make "gnat bind
2005         -P" invoke "gprbuild -b" Make "gnat link -P" invoke "gprbuild
2006         -l" Fail if the invocation is "gnat find -P" or "gnat xref -P"
2007         Remove anything related to project files
2008         * g-mbdira.adb: minor whitespace cleanup
2009         * g-spipat.adb: minor removal of extra spaces after closing paren
2011 2016-04-19  Ed Schonberg  <schonberg@adacore.com>
2013         * exp_ch6.adb (Expand_Actuals):  If post-statements are present
2014         and the enclosing context is a function call or indexing, build
2015         an Expression_With_Actions for the call.
2017 2016-04-19  Hristian Kirtchev  <kirtchev@adacore.com>
2019         * lib-writ.adb (Write_With_Lines): Code cleanup. Do not generate
2020         a with line for an ignored Ghost unit.
2021         * sem_ch7.adb (Analyze_Package_Declaration): Add local constant
2022         Par. A child package is Ghost when its parent is Ghost.
2023         * sem_prag.adb (Analyze_Pragma): Pragma Ghost can now apply to
2024         a subprogram declaration that acts as a compilation unit.
2026 2016-04-18  Michael Matz  <matz@suse.de>
2028         * gcc-interface/decl.c (gnat_to_gnu_entity): Use SET_TYPE_ALIGN.
2029         (gnat_to_gnu_field): Ditto.
2030         (components_to_record): Ditto.
2031         (create_variant_part_from): Ditto.
2032         (copy_and_substitute_in_size): Ditto.
2033         (substitute_in_type): Ditto.
2034         * gcc-interface/utils.c (make_aligning_type): Use SET_TYPE_ALIGN.
2035         (make_packable_type): Ditto.
2036         (maybe_pad_type): Ditto.
2037         (finish_fat_pointer_type): Ditto.
2038         (finish_record_type): Ditto and use SET_DECL_ALIGN.
2039         (rest_of_record_type_compilation): Use SET_TYPE_ALIGN.
2040         (create_field_decl): Use SET_DECL_ALIGN.
2042 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
2044         * einfo.adb (Overridden_Operation): assert that
2045         function is called for valid arguments.
2046         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, sem_type.adb,
2047         s-osinte-vxworks.ads, a-ngcefu.adb, sem_ch10.adb, einfo.ads,
2048         sem_prag.adb, sem_ch12.adb, sem.adb, i-cobol.ads, freeze.adb,
2049         sem_util.adb, a-chtgop.ads, s-rannum.adb, exp_ch6.adb, s-bignum.adb,
2050         s-osinte-freebsd.ads, par-ch5.adb, a-chtgbo.ads, a-cofove.adb:
2051         No space after closing parenthesis except where required for
2052         layout.
2053         * sem_res.adb: Minor reformatting.
2055 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
2057         * exp_ch4.adb (Expand_N_Case_Expression): Convert into a case
2058         statement when relevant.
2060 2016-04-18  Bob Duff  <duff@adacore.com>
2062         * a-cuprqu.adb (Enqueue): Properly handle the
2063         case where the new element has a unique priority.
2065 2016-04-18  Tristan Gingold  <gingold@adacore.com>
2067         * adaint.h: Define stat structures and functions for iOS
2068         simulator.
2070 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
2072         * sem_res.adb (Resolve_Entry_Call): reset
2073         Is_Overloaded flag after resolving calls to overloaded protected
2074         operations.
2075         * exp_spark.adb (Expand_SPARK): call
2076         Qualify_Entity_Names for tasking nodes, i.e. protected types,
2077         task types and entries.
2078         * exp_ch4.adb (Expand_N_If_Expression): Refine previous change
2079         in case of an unconstrained type.
2081 2016-04-18  Yannick Moy  <moy@adacore.com>
2083         * sem_eval.adb, sem_eval.ads (Check_Non_Static_Context): Add
2084         comment to document usage of subprogram in GNATprove.
2086 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
2088         * sem_prag.adb (Analyze_Pragma, case Test_Case): Improve error
2089         message for wrong placement of aspect Test_Case.
2091 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
2093         * einfo.ads: Update the documentation of attribute Renamed_Object.
2094         * exp_spark.adb (Expand_Potential_Renaming): Reimplemented.
2096 2016-04-18  Gary Dismukes  <dismukes@adacore.com>
2098         * exp_ch4.adb (Optimize_Length_Comparison): Return immediately
2099         in the case of AAMP (same as for use of the -gnatd.P switch) to
2100         suppress this optimization, which avoids creating a dependence
2101         on the 64-bit arithmetic package.
2103 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
2105         * exp_ch4.adb: Update comment.
2107 2016-04-18  Eric Botcazou  <ebotcazou@adacore.com>
2109         * exp_ch6.adb (Expand_Call): Make sure instantiations are
2110         registered only once as pending here.
2112 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
2114         * exp_ch4.adb, gnat1drv.adb, opt.ads, sem_res.adb
2115         (Minimize_Expression_With_Actions): New flag.
2116         (Adjust_Global_Switches): Set Minimize_Expression_With_Actions
2117         when generating C.
2118         (Resolve_Short_Circuit): Redo previous change
2119         using Minimize_Expression_With_Actions.
2120         (Expand_N_If_Expression,
2121         Expand_Short_Circuit_Operator): Restore old code to avoid
2122         Expression_With_Actions when Minimize_Expression_With_Actions
2123         is set.
2125 2016-04-18  Vincent Celier  <celier@adacore.com>
2127         * s-os_lib.adb (Non_Blocking_Spawn, version with Stdout_File and
2128         Stderr_File): Close local file descriptors when no longer needed.
2130 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
2132         * sem_ch5.adb (Analyze_Iterator_Specification): Remove SPARK
2133         mode check that the type of the cursor in an iteration over
2134         a formal container is not volatile. The proper check on the
2135         element type is done elsewhere.
2137 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
2139         * sem_ch6.adb (Process_Formals): Do not set a delay freeze on
2140         a subprogram that returns a class-wide type, if the subprogram
2141         is a compilation unit, because otherwise gigi will treat the
2142         subprogram as external, leading to link errors.
2144 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
2146         * sem_res.adb (Resolve_Short_Circuit): Do not use
2147         expression-with-actions when generating C.
2149 2016-04-18  Yannick Moy  <moy@adacore.com>
2151         * sem_util.adb (Apply_Compile_Time_Constraint_Error): Do not generate
2152         raise node in GNATprove mode.
2154 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
2156         * s-fileio.adb: Minor reformatting.
2157         * sem_prag.adb (Analyze_Input_Item): Add local
2158         variable Input_OK. Do not consider mappings of generic formal
2159         parameters to actuals.
2161 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
2163         * sem_ch5.adb (Get_Cursor_Type): If iterator type is a derived
2164         type, the cursor is declared in the scope of the parent type.
2165         (Analyze_Parameter_Specification): A qualified expression with an
2166         iterator type indicates an iteration over a container (explicit
2167         or implicit).
2169 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
2171         * osint-c.ads, osint-c.adb (Delete_C_File, Delete_H_File): New.
2172         * gnat1drv.adb (Gnat1drv): Delete old C files before regenerating them.
2173         * debug.adb: Reserve -gnatd.4 to force generation of C files.
2175 2016-04-18  Yannick Moy  <moy@adacore.com>
2177         * sem_eval.adb (Eval_Arithmetic_Op): Do not issue error on static
2178         division by zero, instead possibly issue a warning.
2179         * sem_res.adb (Resolve_Arithmetic_Op): Do not issue error on
2180         static division by zero, instead add check flag on original
2181         expression.
2182         * sem_util.adb, sem_util.ads (Compile_Time_Constraint_Error):
2183         Only issue error when both SPARK_Mode is On and Warn is False.
2185 2016-04-18  Yannick Moy  <moy@adacore.com>
2187         * checks.adb (Apply_Scalar_Range_Check): Force
2188         warning instead of error when SPARK_Mode is On, on index out of
2189         bounds, and set check flag for GNATprove.
2191 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
2193         * sem_prag.adb (Check_In_Out_States.Check_Constituent_Usage):
2194         Update the comment on usage.  Reimplemented.
2195         (Check_Input_States.Check_Constituent_Usage): Update the comment
2196         on usage. A Proof_In constituent can now refine an Input state
2197         as long as there is at least one Input constituent present.
2199 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
2201         * sem_ch6.adb (Check_Inline_Pragma): Use the Sloc of the
2202         body id as the sloc of the entity in the generated subprogram
2203         declaration, to avoid spurious conformance errors when style
2204         checks are enabled.
2206 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
2208         * sem_ch4.adb (Analyze_Selected_Component, Has_Dereference):
2209         Refine check on illegal calls to entities within a task body,
2210         when the entity is declared in an object of the same type. In
2211         a generic context there might be no explicit dereference but if
2212         the prefix includes an access type the construct is legal.
2214 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
2216         * rtsfind.ads, rtsfind.adb (RE_Id, RE_Unit_Table): add
2217         RE_Default_Priority.
2219 2016-04-18  Bob Duff  <duff@adacore.com>
2221         * sem_prag.adb (Check_Arg_Is_Local_Name): Don't do the check
2222         if the pragma came from an aspect specification.
2224 2016-04-18  Gary Dismukes  <dismukes@adacore.com>
2226         * gnat1drv.adb, contracts.adb: Minor reformatting and wording fixes.
2228 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
2230         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): To suppress
2231         superfluous conformance check on an inlined body with a previous
2232         spec, use the fact that the generated declaration does not come
2233         from source. We must treat the entity as coming from source to
2234         enable some back-end inlining when pragma appears after the body.
2236 2016-04-18  Gary Dismukes  <dismukes@adacore.com>
2238         * lib-xref-spark_specific.adb, par-ch2.adb, errout.ads,
2239         exp_intr.adb: Minor reformatting and typo corrections.
2241 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
2243         * sem_ch6.adb: Code cleanup.
2245 2016-04-18  Thomas Quinot  <quinot@adacore.com>
2247         * sem_ch13.adb: Minor reformatting and error message tweaking
2248         (remove extraneous spaces).
2250 2016-04-18  Johannes Kanig  <kanig@adacore.com>
2252         * gnat1drv.adb (Gnat1drv): Force loading of System unit for SPARK.
2254 2016-04-18  Bob Duff  <duff@adacore.com>
2256         * s-fileio.adb (Fopen_Mode): If Mode = Out_File, and the file
2257         exists, and it's a fifo, we use "w" as the open string instead of
2258         "r+". This is necessary to make a write to the fifo block until
2259         a reader is ready.
2261 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
2263         * sem_attr.adb (Denote_Same_Function): Account
2264         for a special case where a primitive of a tagged type inherits
2265         a class-wide postcondition from a parent type.
2267 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
2269         * par-ch2.adb (P_Expression_Or_Reserved_Word): New routine.
2270         (P_Pragma): Signal Scan_Pragma_Argument_Association when the use
2271         of reserved words is OK.
2272         (Scan_Pragma_Argument_Association):
2273         Add new formal Reserved_Words_OK and update the comment on
2274         usage. Code cleanup. Parse an expression or a reserved word in
2275         identifier form for pragmas Restriction_Warnings and Restrictions
2276         No_Use_Of_Attribute.
2277         * restrict.adb (Check_Restriction_No_Use_Of_Attribute):
2278         Reimplemented.  (Check_Restriction_No_Use_Of_Pragma): Code cleanup.
2279         (Set_Restriction_No_Specification_Of_Aspect): Properly set the warning
2280         flag for an aspect.
2281         (Set_Restriction_No_Use_Of_Attribute): Properly set the warning
2282         flag for an attribute.  (Set_Restriction_No_Use_Of_Entity):
2283         Update the parameter profile.
2284         (Set_Restriction_No_Use_Of_Pragma): Properly set the warning flag for
2285         a pragma.
2286         * restrict.ads (Check_Restriction_No_Use_Of_Attribute): Update
2287         the comment on usage.
2288         (Set_Restriction_No_Use_Of_Entity): Update the parameter profile.
2289         * sem_attr.adb (Analyze_Attribute): Check restriction
2290         No_Use_Of_Attribute.
2291         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Check
2292         restriction No_Use_Of_Attribute before any rewritings have
2293         taken place.
2294         * sem_prag.adb (Analyze_Pragma): Check restriction
2295         No_Use_Of_Pragma before any rewritings have taken place.
2297 2016-04-18  Bob Duff  <duff@adacore.com>
2299         * sem_ch6.adb (Is_Inline_Pragma): The pragma
2300         argument can be a selected component, which has no Chars field,
2301         so we need to deal with that case (use the Selector_Name).
2302         (Check_Inline_Pragma): We need to test Is_List_Member before
2303         calling In_Same_List, because in case of a library unit, they're
2304         not in lists, so In_Same_List fails an assertion.
2306 2016-04-18  Bob Duff  <duff@adacore.com>
2308         * namet.ads, namet.adb: Add an Append that appends a
2309         Bounded_String onto a Bounded_String. Probably a little more
2310         efficient than "Append(X, +Y);". Also minor cleanup.
2311         (Append_Decoded, Append_Decoded_With_Brackets, Append_Unqualified,
2312         Append_Unqualified_Decoded): Make sure these work with non-empty
2313         buffers.
2314         * casing.ads, casing.adb (Set_Casing): Pass a Bounded_String
2315         parameter, defaulting to Global_Name_Buffer.
2316         * errout.ads, errout.adb (Adjust_Name_Case): Pass a
2317         Bounded_String parameter, no default.
2318         * exp_ch11.adb (Expand_N_Raise_Statement): Use local
2319         Bounded_String instead of Global_Name_Buffer.
2320         * exp_intr.ads, exp_intr.adb (Write_Entity_Name): Rename it
2321         to Append_Entity_Name, and pass a Bounded_String parameter,
2322         instead of using globals.
2323         (Add_Source_Info): Pass a Bounded_String parameter, instead of
2324         using globals.
2325         (Expand_Source_Info): Use local instead of globals.
2326         * stringt.ads, stringt.adb (Append): Add an Append procedure
2327         for appending a String_Id onto a Bounded_String.
2328         (String_To_Name_Buffer, Add_String_To_Name_Buffer): Rewrite in
2329         terms of Append.
2330         * sem_prag.adb (Set_Error_Msg_To_Profile_Name): Adjust for new
2331         Adjust_Name_Case parameter.
2332         * erroutc.adb, uname.adb: Don't pass D => Mixed_Case to
2333         Set_Casing; that's the default.
2334         * lib-xref-spark_specific.adb (Add_SPARK_Scope): Pretend that calls to
2335         protected subprograms are entry calls; otherwise it is not possible to
2336         distinguish them from regular subprogram calls.
2338 2016-04-18  Gary Dismukes  <dismukes@adacore.com>
2340         * sem_ch13.adb (Has_Good_Profile): Improvement
2341         of error message. Now indicates subtype_mark of formal parameter
2342         rather than the formal's name, plus minor rewording.
2344 2016-04-18  Pascal Obry  <obry@adacore.com>
2346         * adaint.c, adaint.h, s-os_lib.ads: Add new routine Current_Process_Id.
2348 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
2350         * stringt.adb, exp_ch6.adb, sem_ch13.adb: Minor reformatting.
2352 2016-04-18  Gary Dismukes  <dismukes@adacore.com>
2354         * par-ch4.adb, sem_prag.adb: Minor reformatting.
2356 2016-04-18  Bob Duff  <duff@adacore.com>
2358         * sinput.ads, sinput.adb (Build_Location_String): Take a
2359         parameter instead of using a global variable.  The function
2360         version no longer destroys the Name_Buffer.
2361         * stringt.ads, stringt.adb (String_From_Name_Buffer): Take a
2362         parameter, which defaults to the Global_Name_Buffer, so some
2363         calls can avoid the global.
2364         * exp_ch11.adb, exp_intr.adb: Use new interfaces above
2365         to avoid using globals. All but one call to Build_Location_String
2366         avoids the global. Only one call to String_From_Name_Buffer
2367         avoids it.
2369 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
2371         * namet.adb, namet.ads, exp_unst.adb: Minor reformatting.
2373 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
2375         * sem_eval.adb (Choice_Matches): Check the expression
2376         against the predicate values when the choice denotes a
2377         subtype with a static predicate.
2378         (Eval_Membership_Op): Code cleanup. Remove the suspicious guard which
2379         tests for predicates.
2380         (Is_OK_Static_Subtype): A subtype with a dynamic predicate
2381         is not static.  (Is_Static_Subtype): A subtype with a dynamic
2382         predicate is not static.
2383         * sem_eval.ads (Is_OK_Static_Subtype): Update the comment on usage.
2384         (Is_Static_Subtype): Update the comment on usage.
2386 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
2388         * sem_prag.adb (Analyze_Input_Item): Allow
2389         generic formals to appear as initialization items.
2391 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
2393         * sem_ch13.adb (Analyze_Stream_TSS_Definition,
2394         Has_Good_Profile): Additional error message to indicate that
2395         the second parameter of the subprogram must be a first subtype.
2397 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
2399         * sem_ch6.adb (Analyze_Subprogram_Body_Helper, Is_Inline_Pragma):
2400         Use the pragma lookahead that determines whether a subprogram
2401         is to be inlined, when some level of backend optimization is
2402         required.
2403         * sem_ch12.ads, sem_ch12.adb (Add_Pending_Instantiation): Factorize
2404         code used to create an instance body when needed for inlining.
2405         * exp_ch6.adb (Expand_Call): When a call is to be inlined, and the
2406         call appears within an instantiation that is not a compilation
2407         unit, add a pending instantiation for the enclosing instance,
2408         so the backend can inline in turn the calls contained in the
2409         inlined body.
2411 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
2413         * sem_prag.adb (Build_Pragma_Check_Equivalent): The mapping
2414         that relates operations of the parent type to the operations of
2415         the derived type has three distinct sources:
2416         a) explicit operations of the derived type carry an
2417         Overridden_Operation that designates the operation in the
2418         ancestor.
2419         b) Implicit operations that are inherited by the derived type
2420         carry an alias that may be an explicit subprogram (in which case
2421         it may have an Overridden_ Operation indicator) or may also be
2422         inherited and carry its own alias.
2423         c) If the parent type is an interface, the operation of the
2424         derived type does not override, but the interface operation
2425         indicates the operation that implements it.
2426         * sem_prag.adb: Minor reformatting.
2427         * sem_prag.adb (Check_External_Property): Update
2428         the comment on usage. Reimplement.
2430 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
2432         * exp_ch5.adb (Expand_Assignment_Statement): In restricted
2433         profiles such as ZFP, ceiling priority is not available.
2435 2016-04-18  Bob Duff  <duff@adacore.com>
2437         * namet-sp.ads: Minor typo fix, ironically in 'Spelling_Checker'.
2439 2016-04-18  Bob Duff  <duff@adacore.com>
2441         * sem_elab.adb (Output_Calls): Use
2442         Get_Name_String, to clearly indicate that the global Name_Buffer
2443         is being used. The previous code used Is_Internal_Name, which
2444         returns a Boolean, but also has a side effect of setting the
2445         Name_Buffer. Then it called the other Is_Internal_Name, which uses
2446         the Name_Buffer for its input. And then it called Error_Msg_N,
2447         again using the Name_Buffer. We haven't eliminated the global
2448         usage here, but we've made it a bit clearer.
2449         This also allows us to have a side-effect-free version of
2450         Is_Internal_Name.
2451         * namet.ads, namet.adb: Provide a type Bounded_String, along with
2452         routines that can be used without using global variables. Provide
2453         Global_Name_Buffer so existing code can continue to use the
2454         global. Mark the routines that use globals as obsolete.  New code
2455         shouldn't call the obsolete ones, and we should clean up existing
2456         code from time to time.
2457         Name_Find_Str is renamed as Name_Find.
2458         * namet.h: Changed as necessary to interface to the new version
2459         of Namet.
2460         * bindgen.adb, exp_unst.adb: Name_Find_Str is renamed as
2461         Name_Find.
2463 2016-04-18  Yannick Moy  <moy@adacore.com>
2465         * sem_util.adb, sem_util.ads (Has_Full_Default_Initialization): used
2466         outside of GNATprove, hence it should not be removed.
2468 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
2470         * sem_prag.adb (Analyze_Refinement_Clause):
2471         The refinement of an external abstract state can now mention
2472         non-external constituents.
2473         (Check_External_Property): Update all SPARK RM references.
2475 2016-04-18  Bob Duff  <duff@adacore.com>
2477         * exp_intr.adb: Remove some duplicated code.
2479 2016-04-18  Yannick Moy  <moy@adacore.com>
2481         * a-nudira.adb, a-nudira.ads, a-nuflra.adb, a-nuflra.ads: Mark
2482         package spec and body out of SPARK.
2484 2016-04-18  Johannes Kanig  <kanig@adacore.com>
2486         * spark_xrefs.ads: Minor comment update.
2488 2016-04-18  Johannes Kanig  <kanig@adacore.com>
2490         * gnat1drv.adb (Gnat1drv): Force loading of System
2491         unit for SPARK.
2493 2016-04-18  Bob Duff  <duff@adacore.com>
2495         * a-cuprqu.adb: Correction to previous change. If a new node
2496         is inserted at the front of the queue (because it is higher
2497         priority than the previous front node), we need to update
2498         Header.Next_Unequal -- not just in the case where the queue was
2499         previously empty.
2501 2016-04-18  Bob Duff  <duff@adacore.com>
2503         * a-cuprqu.ads: Change the representation of List_Type from a
2504         singly-linked list to a doubly-linked list. In addition, add a
2505         pointer Next_Unequal, which points past a possibly-long chain
2506         of equal-priority items. This increases efficiency, especially
2507         in the case of many equal-priority items.
2508         * a-cuprqu.adb (Dequeue, Enqueue): Rewrite algorithms to take
2509         advantage of new data structure.
2510         (Finalize): Rewrite in terms of Dequeue, for simplicity.
2512 2016-04-18  Yannick Moy  <moy@adacore.com>
2514         * contracts.adb (Analyze_Object_Contract,
2515         Analyze_Protected_Contract): Remove tests performed in GNATprove.
2516         * sem_util.adb, sem_util.ads (Has_Full_Default_Initialization):
2517         Remove query for tests performed in GNATprove.
2519 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
2521         * sem_aggr.adb (Resolve_Record_Aggregate): If
2522         Warn_On_Redundant_Constructs is enabled, report a redundant box
2523         association that does not cover any components, as it done for
2524         redundant others associations in case statements.
2526 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
2528         * sem_prag.adb (Collect_Inherited_Class_Wide_Conditions):
2529         Analyze the generated Check pragma for an inherited condition so
2530         that it does not freeze the dispatching type of the primitive
2531         operation, because it is pre-analyzed at the point of the
2532         subprogram declaration (and not in the subprogram body, as is
2533         done during regular expansion).
2535 2016-04-18  Vincent Celier  <celier@adacore.com>
2537         * ali.ads: Increase the range of all _Id types to 100 millions.
2539 2016-04-18  Gary Dismukes  <dismukes@adacore.com>
2541         * sem_warn.adb (Check_References): Change warning to suggest
2542         using pragma Export rather than saying "volatile has no effect".
2544 2016-04-18  Bob Duff  <duff@adacore.com>
2546         * g-souinf.ads (Compilation_ISO_Date): New function to return
2547         the current date in ISO form.
2548         * exp_intr.adb (Expand_Source_Info, Add_Source_Info): Expand
2549         a call to Compilation_ISO_Date into a string literal containing
2550         the current date in ISO form.
2551         * exp_intr.ads (Add_Source_Info): Improve documentation.
2552         * sem_intr.adb (Check_Intrinsic_Subprogram): Recognize
2553         Compilation_ISO_Date.
2554         * snames.ads-tmpl (Name_Compilation_ISO_Date): New Name_Id.
2556 2016-04-18  Eric Botcazou  <ebotcazou@adacore.com>
2558         * layout.adb (Set_Elem_Alignment): Extend setting of alignment
2559         to subtypes that are not first subtypes.
2561 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
2563         * sem_prag.ads (Collect_Inherited_Class_Wide_Conditions):
2564         Simplify interface.
2565         * sem_prag.adb (Collect_Inherited_Class_Wide_Conditions): Insert
2566         generated pragmas after subprogram declaration, rather than in
2567         the corresponding subprogram body.
2568         * sem_ch6.adb (New_Overloaded_Entity): In GNATProve
2569         mode, if the operation is overridding, call
2570         Collect_Inherited_Class_Wide_Conditions to generate the
2571         corresponding pragmas immediately after the corresponding
2572         subprogram declaration.
2574 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
2576         * spark_xrefs.ads (Xref_Index, Scope_Index, File_Index): restrict
2577         type to natural numbers.
2578         (Stype): document code characters for concurrent entities.
2580 2016-04-18  Olivier Hainque  <hainque@adacore.com>
2582         * targparm.ads: Update the Frontend_Exceptions default internal
2583         value.
2584         (Frontend_Exceptions_On_Target): Change default value to True.
2586 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
2588         * sem_ch4.adb (Analyze_Selected_Component): Refine error
2589         detection when a selected component in the body of a synchronized
2590         type is a reference to an object of the same type declared
2591         elsewhere. The construct is legal if the prefix of the selected
2592         component includes an explicit dereference at any point.
2594 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
2596         * sem_ch3.adb (Analyze_Object_Declaration): Do not consider
2597         internally generated expressions when trying to determine whether
2598         a formal parameter of a tagged type subject to Extensions_Visible
2599         False is used to initialize an object.
2600         * sem_ch4.adb (Analyze_Type_Conversion): Do not consider
2601         internally generated expressions when trying to determine whether
2602         a formal parameter of a tagged type subject to Extensions_Visible
2603         False is used in a type conversion.
2605 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
2607         * sem_res.adb (Is_Protected_Operation_Call):
2608         Add guards to account for a non-decorated selected component.
2610 2016-04-18  Yannick Moy  <moy@adacore.com>
2612         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Improve
2613         implementation of Body_Has_SPARK_Mode_On.
2614         * sem_prag.adb, sem_prag.ads (Get_SPARK_Mode_From_Annotation):
2615         New function replacing previous Get_SPARK_Mode_From_Pragma, that
2616         deals also with aspects.
2617         (Get_SPARK_Mode_Type): Make function internal again.
2618         * inline.adb, sem_ch7.adb, sem_util.adb: Use new
2619         Get_SPARK_Mode_From_Annotation.
2621 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
2623         * contracts.adb (Analyze_Object_Contract): Update references to
2624         SPARK RM.
2625         * freeze.adb (Freeze_Entity): Update references to SPARK RM.
2626         * ghost.adb Add with and use clauses for Sem_Disp.
2627         (Check_Ghost_Derivation): Removed.
2628         (Check_Ghost_Overriding):
2629         Reimplemented.  (Check_Ghost_Policy): Update references to SPARK RM.
2630         (Check_Ghost_Primitive): New routine.
2631         (Check_Ghost_Refinement): New routine.  (Is_OK_Ghost_Context):
2632         Update references to SPARK RM.  (Is_OK_Pragma): Update references
2633         to SPARK RM. Predicates are now a valid context for references
2634         to Ghost entities.
2635         * ghost.ads (Check_Ghost_Derivation): Removed.
2636         (Check_Ghost_Overriding): Update the comment on usage.
2637         (Check_Ghost_Primitive): New routine.
2638         (Check_Ghost_Refinement): New routine.
2639         (Remove_Ignored_Ghost_Code): Update references to SPARK RM.
2640         * sem_ch3.adb (Process_Full_View): Remove the now obsolete check
2641         related to Ghost derivations
2642         * sem_ch6.adb (Check_Conformance): Remove now obsolete check
2643         related to the convention-like behavior of pragma Ghost.
2644         (Check_For_Primitive_Subprogram): Verify that the Ghost policy
2645         of a tagged type and its primitive agree.
2646         * sem_prag.adb (Analyze_Pragma): Update references to SPARK
2647         RM. Move the verification of pragma Assertion_Policy Ghost
2648         to the proper place. Remove the now obsolete check related
2649         to Ghost derivations.
2650         (Collect_Constituent): Add a call to Check_Ghost_Refinement.
2651         * sem_res.adb (Resolve_Actuals): Update references to SPARK RM.
2653 2016-04-18  Eric Botcazou  <ebotcazou@adacore.com>
2655         * layout.adb: Fix more minor typos in comments.
2657 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
2659         * a-calend.ads, sem_prag.adb, sem_ch6.adb: Minor reformatting.
2661 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
2663         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): In GNATprove
2664         mode, collect inherited class-wide conditions to generate the
2665         corresponding pragmas.
2666         * sem_prag.ads (Build_Pragma_Check_Equivalent): Moved from contracts
2667         * contracts.adb (Collect_Inherited_Class_Wide_Conditions): New
2668         procedure for overriding subprograms, used to generate the pragmas
2669         corresponding to an inherited class- wide pre- or postcondition.
2670         * sem_prag.adb (Build_Pragma_Check_Equivalent): moved here
2671         from contracts.adb (Replace_Condition_Entities): Subsidiary
2672         Build_Pragma_Check_Equivalent, to implement the proper semantics
2673         of inherited class-wide conditions, as given in AI12-0113.
2674         (Process_Class_Wide_Condition): Removed.
2675         (Collect_Inherited_Class_Wide_Conditions): Iterate over pragmas
2676         in contract of subprogram, to collect inherited class-wide
2677         conditions.
2678         (Build_Pragma_Check_Equivalent): Moved to sem_prag.adb
2680 2016-04-18  Yannick Moy  <moy@adacore.com>
2682         * a-calend.adb (Ada.Calendar): Mark package body as SPARK_Mode Off.
2683         * a-calend.ads (Ada.Calendar): Mark package spec as
2684         SPARK_Mode and add synchronous external abstract state Clock_Time.
2686 2016-04-18  Yannick Moy  <moy@adacore.com>
2688         * sem_res.adb (Resolve_Call): Prevent inlining of
2689         calls inside expression functions.  Factor previous code issuing
2690         errors to call Cannot_Inline instead, which does appropriate
2691         processing of message for GNATprove.
2693 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
2695         * einfo.ads, sem_ch3.adb, sem_ch8.adb, osint-l.adb, rtsfind.adb,
2696         osint-b.adb: Cleanups.
2698 2016-04-18  Yannick Moy  <moy@adacore.com>
2700         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Only create
2701         body to inline in GNATprove mode when SPARK_Mode On applies to
2702         subprogram body.
2703         * sem_prag.adb, sem_prag.ads (Get_SPARK_Mode_Type): Make function
2704         public.
2706 2016-04-18  Eric Botcazou  <ebotcazou@adacore.com>
2708         * layout.adb: Fix minor typo in comment.
2709         * inline.adb: Fix minor pasto.
2710         * sem_ch12.ads: Fix minor typos in comments.
2712 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
2714         * sem_disp.adb (Check_Dispatching_Call): Major rewriting to
2715         handle some complex cases of tag indeterminate calls that are
2716         actuals in other dispatching calls that are themselves tag
2717         indeterminate.
2718         (Check_Dispatching_Context): Add parameter to support recursive
2719         check for an enclosing construct that may provide a tag for a
2720         tag-indeterminate call.
2722 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
2724         * sem_prag.adb (Analyze_Depends_In_Decl_Part):
2725         Add global variables Task_Input_Seen and Task_Output_Seen.
2726         (Analyze_Global_Item): Detect an illegal use of the current
2727         instance of a single protected/task type in a global annotation.
2728         (Analyze_Input_Output): Inputs and output related to the current
2729         instance of a task unit are now tracked.
2730         (Check_Usage): Require
2731         the presence of the current instance of a task unit only when
2732         one input/output is available.  (Current_Task_Instance_Seen):
2733         New routine.
2734         (Is_CCT_Instance): New parameter profile. Update
2735         the comment on usage. The routine now properly recognizes several
2736         cases related to single protected/task types.
2738 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
2740         * freeze.adb (Freeze_Entity): Use New_Freeze_Node
2741         to create a brand new freeze node. This handles a case where an
2742         ignored Ghost context is freezing something which is not ignored
2743         Ghost and whose freeze node should not be removed from the tree.
2744         (New_Freeze_Node): New routine.
2746 2016-04-18  Jerome Lambourg  <lambourg@adacore.com>
2748         * sigtramp.h (__gnat_set_is_vxsim) New function to
2749         tell sigtramp-vxworks to handle vxsim signal contexts.  *
2750         sigtramp-vxworks.c (__gnat_sigtramp) Take into account the
2751         differences in the sigcontext structure between the expected
2752         regular x86 or x86_64 ones and the ones received in case of
2753         exexution on the vxworks simulator.
2754         * init.c: also compute is_vxsim in case of x86_64-vx7 target. Provide
2755         this information to sigtramp-vxworks.c. Remove the old mechanism for
2756         vxsim.
2757         * init-vxsim.c, sigtramp-vxworks-vxsim.c: remove, now obsolete.
2759 2016-04-18  Eric Botcazou  <ebotcazou@adacore.com>
2761         * exp_ch3.adb (Inline_Init_Proc): New function returning
2762         whether the initialization procedure of a type should be
2763         inlined.  Return again True for controlled type themselves.
2764         (Build_Array_Init_Proc): Call it to set Set_Is_Inlined on Init_Proc.
2765         (Build_Record_Init_Proc): Likewise.
2767 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
2769         * gnatvsn.ads (Library_Version): Bump to 7.
2771 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
2773         * sem_ch6.adb (Analyze_Expression_Function): Set Inlined flag
2774         on the entity of a subprogram declaration that is completed by
2775         an expression function.
2777 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
2779         * sem_util.adb (Is_Current_Instance): A entity given by a subtype
2780         declaration can appear in an aspect specification for a dynamic
2781         predicate, and a pragma for aspect Predicate_Failure.
2782         * exp_util.adb (Replace_Subtype_References): Replace current
2783         occurrences of the subtype to which a dynamic predicate applies,
2784         byt the expression that triggers a predicate check. Needed to
2785         implement new aspect Predicate_Failure.
2787 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
2789         * a-intsig.ads, a-intsig.adb: Removed, no longer used.
2790         * Makefile.rtl: update accordingly.
2792 2016-04-18  Eric Botcazou  <ebotcazou@adacore.com>
2794         * sem_type.adb (Disambiguate): Call Covers only when necessary
2795         for standard operators.
2797 2016-04-18  Eric Botcazou  <ebotcazou@adacore.com>
2799         * atree.ads (Num_Extension_Nodes): Add couple of figures
2800         to comment.
2801         * atree.adb: Add GNAT.Heap_Sort_G dependency.
2802         (Print_Statistics): New exported procedure to print statistics.
2804 2016-04-18  Eric Botcazou  <ebotcazou@adacore.com>
2806         * exp_ch3.adb (Build_Record_Init_Proc): Do not mark the procedure
2807         as to be inlined if the type needs finalization.
2809 2016-04-18  Jerome Lambourg  <lambourg@adacore.com>
2811         * sigtramp-vxworks-target.inc: sigtramp-vxworks: force the stack
2812         alignment for x86_64.
2813         * init.c: Better fix for guard page reset on x86_64-vx7.
2814         Do not try to retrieve the page that actually raised
2815         the signal as the probing mechanism used on x86_64 do not allow
2816         such retrieval. We thus just test if the guard page is active,
2817         and re-activate it if not.
2819 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
2821         * a-sytaco.adb (Suspension_Object): Aspect Default_Initial_Condition
2822         added.
2824 2016-04-18  Jerome Lambourg  <lambourg@adacore.com>
2826         * affinity.c: Use the proper type for task id.
2827         * init.c (__gnat_inum_to_ivec): ivec is a pointer.
2829 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
2831         * sem_prag.adb (Process_Convention): Relax rule on exporting
2832         Intrinsic types if Relaxed_RM_Semantics is True.
2834 2016-04-18  Vincent Celier  <celier@adacore.com>
2836         * sem_ch3.adb, lib.ads, sinfo.ads, sem_ch10.adb, einfo.adb, einfo.ads,
2837         checks.ads, sem_ch12.adb, sem.adb, sem_util.adb, sem_util.ads,
2838         sem_res.adb, sem_attr.adb, par.adb, exp_ch4.adb, errout.ads,
2839         sem_ch4.adb, atree.adb, atree.ads, sem_warn.adb, treepr.adb,
2840         exp_ch3.ads, exp_unst.adb: Change "descendent" to
2841         "descendant" in comments, error messages and identifiers.
2842         * gcc-interface/decl.c: Ditto.
2844 2016-04-18  Eric Botcazou  <ebotcazou@adacore.com>
2846         * sem_type.adb (Operator_Matches_Spec): Call First_Formal on
2847         New_S only once at the beginning of the function.
2849 2016-04-02  Eric Botcazou  <ebotcazou@adacore.com>
2851         * gcc-interface/decl.c (components_to_record): Restrict the previous
2852         change to fields with variable size.
2854 2016-03-27  Eric Botcazou  <ebotcazou@adacore.com>
2856         * gcc-interface/decl.c (components_to_record): Add special case for
2857         single field with representation clause at offset 0.
2859 2016-03-16  Svante Signell  <svante.signell@gmail.com>
2861         * gcc-interface/Makefile.in: Add support for x86 GNU/Hurd.
2862         * s-osinte-gnu.ads: New file.
2864 2016-03-13  Eric Botcazou  <ebotcazou@adacore.com>
2866         * system-vxworks-m68k.ads (Stack_Check_Probes): Set to True.
2867         (Stack_Check_Limits): Set to False.
2868         * system-vxworks-mips.ads (Stack_Check_Probes): Set to True.
2869         (Stack_Check_Limits): Set to False.
2870         * system-vxworks-ppc.ads (Stack_Check_Probes): Set to True.
2871         (Stack_Check_Limits): Set to False.
2872         * system-vxworks-sparcv9.ads (Stack_Check_Probes): Set to True.
2873         (Stack_Check_Limits): Set to False.
2874         * system-vxworks-x86.ads (Stack_Check_Probes): Set to True.
2875         (Stack_Check_Limits): Set to False.
2877 2016-03-07  Eric Botcazou  <ebotcazou@adacore.com>
2879         * gcc-interface/trans.c (statement_node_p): New predicate.
2880         (gnat_to_gnu): Invoke it to detect statement nodes.  In ASIS mode, do
2881         not return dummy results for expressions attached to packed array
2882         implementation types.
2884 2016-03-07  Eric Botcazou  <ebotcazou@adacore.com>
2886         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Always mark
2887         the expression of a renaming manually in case #3.
2889 2016-03-02  Dominik Vogt  <vogt@linux.vnet.ibm.com>
2891         * system-linux-s390.ads: Enable Stack_Check_Probes.
2892         * system-linux-s390.ads: Likewise.
2894 2016-02-29  Martin Liska  <mliska@suse.cz>
2896         * gcc-interface/utils.c (set_reverse_storage_order_on_pad_type):
2897         Replace ENABLE_CHECKING macro with flag_checking.
2899 2016-02-29  Eric Botcazou  <ebotcazou@adacore.com>
2901         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Retrofit
2902         handling of unconstrained array types as designated types into common
2903         processing.  Also handle array types as incomplete designated types.
2905 2016-02-29  Eric Botcazou  <ebotcazou@adacore.com>
2907         * gcc-interface/decl.c (gnat_to_gnu_entity) <Concurrent types>: In
2908         ASIS mode, fully lay out the minimal record type.
2910 2016-02-29  Eric Botcazou  <ebotcazou@adacore.com>
2912         * gcc-interface/trans.c (finalize_nrv_r): Remove obsolete code.
2913         (build_return_expr): Likewise.
2914         (Call_to_gnu): If this is a function call and there is no target,
2915         create a temporary for the return value for all aggregate types,
2916         but never create it for a return statement.  Push a binding level
2917         around the call in more cases.  Remove obsolete code.
2919 2016-02-29  Eric Botcazou  <ebotcazou@adacore.com>
2921         * gcc-interface/ada-tree.h (DECL_RETURN_VALUE_P): New macro.
2922         * gcc-interface/gigi.h (gigi): Remove useless attribute.
2923         (gnat_gimplify_expr): Likewise.
2924         (gnat_to_gnu_external): Declare.
2925         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: Factor out
2926         code dealing with the expression of external constants into...
2927         Invoke gnat_to_gnu_external instead.
2928         <E_Variable>: Invoke gnat_to_gnu_external to translate renamed objects
2929         when not for a definition.  Deal with COMPOUND_EXPR and variables with
2930         DECL_RETURN_VALUE_P set for renamings and with the case of a dangling
2931         'reference to a function call in a renaming.  Remove obsolete test and
2932         adjust associated comment.
2933         * gcc-interface/trans.c (Call_to_gnu): Set DECL_RETURN_VALUE_P on the
2934         temporaries created to hold the return value, if any.
2935         (gnat_to_gnu_external): ...this.  New function.
2936         * gcc-interface/utils.c (create_var_decl): Detect a constant created
2937         to hold 'reference to function call.
2938         * gcc-interface/utils2.c (build_unary_op) <ADDR_EXPR>: Add folding
2939         for COMPOUND_EXPR in the DECL_RETURN_VALUE_P case.
2941 2016-02-17  Eric Botcazou  <ebotcazou@adacore.com>
2943         * exp_ch4.adb (Expand_N_Indexed_Component): Activate synchronization if
2944         the prefix denotes an entity which Has_Atomic_Components.
2945         * gcc-interface/trans.c (node_is_atomic): Return true if the prefix
2946         denotes an entity which Has_Atomic_Components.
2948 2016-02-17  Eric Botcazou  <ebotcazou@adacore.com>
2950         * gcc-interface/utils2.c (gnat_protect_expr): Make a SAVE_EXPR only
2951         for fat pointer or scalar types.
2953 2016-02-16  Eric Botcazou  <ebotcazou@adacore.com>
2955         * gcc-interface/gigi.h (maybe_debug_type): New inline function.
2956         * gcc-interface/misc.c (gnat_get_array_descr_info): Use it.
2957         Call maybe_character_value on the array bounds.  Get to the base type
2958         of the index type and call maybe_debug_type on it.
2959         * gcc-interface/utils.c (finish_character_type): Add special treatment
2960         for char_type_node.
2962 2016-02-16  Eric Botcazou  <ebotcazou@adacore.com>
2964         * gcc-interface/misc.c (gnat_enum_underlying_base_type): New function.
2965         (LANG_HOOKS_ENUM_UNDERLYING_BASE_TYPE): Define to above.
2967 2016-02-12  Jakub Jelinek  <jakub@redhat.com>
2969         * prj-tree.ads: Spelling fixes - behaviour -> behavior and
2970         neighbour -> neighbor.
2971         * prep.adb: Likewise.
2972         * prj.ads: Likewise.
2973         * prepcomp.adb: Likewise.
2974         * g-socket.ads: Likewise.
2975         * s-imgrea.adb: Likewise.
2976         * a-calend.adb: Likewise.
2977         * exp_disp.adb: Likewise.
2978         * doc/gnat_ugn/gnat_utility_programs.rst: Likewise.
2979         * g-socket.adb: Likewise.
2980         * sem_ch12.adb: Likewise.
2981         * terminals.c: Likewise.
2983 2016-02-08  Bernd Schmidt  <bschmidt@redhat.com>
2985         * gcc-interface/misc.c (gnat_init): Remove second argument in call to
2986         build_common_tree_nodes.
2988 2016-02-08  Eric Botcazou  <ebotcazou@adacore.com>
2990         * gcc-interface/utils.c (create_var_decl): Set again DECL_COMMON and
2991         DECL_IGNORED_P last.
2993 2016-01-28  Eric Botcazou  <ebotcazou@adacore.com>
2995         * gcc-interface/gigi.h (enum attr_type): Rename into...
2996         (enum attrib_type): ...this.
2997         (struct attrib): Adjust.
2998         * gcc-interface/decl.c (prepend_one_attribute): Likewise.
3000 2016-01-20  Eric Botcazou  <ebotcazou@adacore.com>
3002         * exp_ch2.adb (Expand_Current_Value): Make an appropriate character
3003         literal if the entity is of a character type.
3004         * gcc-interface/lang.opt (fsigned-char): New option.
3005         * gcc-interface/misc.c (gnat_handle_option): Accept it.
3006         (gnat_init): Adjust comment.
3007         * gcc-interface/gigi.h (finish_character_type): New prototype.
3008         (maybe_character_type): New inline function.
3009         (maybe_character_value): Likewise.
3010         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Enumeration_Type>: For
3011         a character of CHAR_TYPE_SIZE, make a signed type if flag_signed_char.
3012         Set TYPE_ARTIFICIAL early and call finish_character_type on the type.
3013         <E_Enumeration_Subtype>: For a subtype of character with RM_Size and
3014         Esize equal to CHAR_TYPE_SIZE, make a signed type if flag_signed_char.
3015         Copy TYPE_STRING_FLAG from type to subtype.
3016         <E_Array_Type>: Deal with character index types.
3017         <E_Array_Subtype>: Likewise.
3018         * gcc-interface/trans.c (gigi): Replace unsigned_char_type_node with
3019         char_type_node throughout.
3020         (build_raise_check): Likewise.
3021         (get_type_length): Deal with character types.
3022         (Attribute_to_gnu) <Attr_Pos>: Likewise.  Remove obsolete range check
3023         code.  Minor tweak.
3024         <Attr_Pred>: Likewise.
3025         (Loop_Statement_to_gnu): Likewise.
3026         (Raise_Error_to_gnu): Likewise.
3027         <N_Indexed_Component>: Deal with character index types.  Remove
3028         obsolete code.
3029         <N_Slice>: Likewise.
3030         <N_Type_Conversion>: Deal with character types.  Minor tweak.
3031         <N_Unchecked_Type_Conversion>: Likewise.
3032         <N_In>: Likewise.
3033         <N_Op_Eq>: Likewise.
3034         (emit_index_check): Delete.
3035         * gcc-interface/utils.c (finish_character_type): New function.
3036         (gnat_signed_or_unsigned_type_for): Deal with built-in character types.
3037         * gcc-interface/utils2.c (expand_sloc): Replace unsigned_char_type_node
3038         with char_type_node.
3039         (build_call_raise): Likewise.
3040         (build_call_raise_column): Likewise.
3041         (build_call_raise_range): Likewise.
3043 2016-01-18  Eric Botcazou  <ebotcazou@adacore.com>
3045         * gcc-interface/gigi.h (build_call_raise_column): Adjust prototype.
3046         (build_call_raise_range): Likewise.
3047         (gnat_unsigned_type): Delete.
3048         (gnat_signed_type): Likewise.
3049         (gnat_signed_or_unsigned_type_for): New prototype.
3050         (gnat_unsigned_type_for): New inline function.
3051         (gnat_signed_type_for): Likewise.
3052         * gcc-interface/cuintp.c (build_cst_from_int): Call build_int_cst.
3053         * gcc-interface/decl.c (gnat_to_gnu_entity): Likewise.
3054         (gnat_to_gnu_entity) <E_Array_Type>: Always translate the index types
3055         and compute their base type from that.
3056         <E_Array_Subtype>: Remove duplicate declaration.
3057         * gcc-interface/misc.c (get_array_bit_stride): Call build_int_cst.
3058         * gcc-interface/trans.c (get_type_length): Likewise.
3059         (Attribute_to_gnu): Likewise.
3060         (Loop_Statement_to_gnu): Likewise.
3061         (Call_to_gnu): Likewise.
3062         (gnat_to_gnu): Call build_real, build_int_cst, gnat_unsigned_type_for
3063         and gnat_signed_type_for.  Minor tweaks.
3064         (build_binary_op_trapv): Likewise.
3065         (emit_check): Likewise.
3066         (convert_with_check): Likewise.
3067         (Raise_Error_to_gnu): Adjust calls to the build_call_raise family of
3068         functions.  Minor tweaks.
3069         (Case_Statement_to_gnu): Remove dead code.
3070         (gnat_to_gnu): Call gnat_unsigned_type_for and gnat_signed_type_for.
3071         (init_code_table): Minor reordering.
3072         * gcc-interface/utils.c (gnat_unsigned_type): Delete.
3073         (gnat_signed_type): Likewise.
3074         (gnat_signed_or_unsigned_type_for): New function.
3075         (unchecked_convert): Use directly the size in the test for precision
3076         vs size adjustments.
3077         (install_builtin_elementary_types): Call gnat_signed_type_for.
3078         * gcc-interface/utils2.c (nonbinary_modular_operation): Call
3079         build_int_cst.
3080         (build_goto_raise): New function taken from...
3081         (build_call_raise): ...here.  Call it.
3082         (build_call_raise_column): Add KIND parameter and call it.
3083         (build_call_raise_range): Likewise.
3085 2016-01-18  Eric Botcazou  <ebotcazou@adacore.com>
3087         * gcc-interface/ada-tree.h (TYPE_IMPLEMENTS_PACKED_ARRAY_P): Rename to
3088         (TYPE_IMPL_PACKED_ARRAY_P): ...this.
3089         (TYPE_CAN_HAVE_DEBUG_TYPE_P): Do not test TYPE_DEBUG_TYPE.
3090         * gcc-interface/decl.c (gnat_to_gnu_entity): Simplify NULL_TREE tests
3091         and tweak gnat_encodings tests throughout.
3092         (initial_value_needs_conversion): Likewise.
3093         (intrin_arglists_compatible_p): Likewise.
3094         * gcc-interface/misc.c (gnat_print_type): Likewise.
3095         (gnat_get_debug_type): Likewise.
3096         (gnat_get_fixed_point_type_info): Likewise.
3097         (gnat_get_array_descr_info): Likewise.
3098         (get_array_bit_stride): Likewise.
3099         (gnat_get_type_bias): Fix formatting.
3100         (enumerate_modes): Likewise.
3101         * gcc-interface/trans.c (gnat_to_gnu): Likewise.
3102         (add_decl_expr): Simplify NULL_TREE test.
3103         (end_stmt_group): Likewise.
3104         (build_binary_op_trapv): Fix formatting.
3105         (get_exception_label): Use switch statement.
3106         (init_code_table): Move around.
3107         * gcc-interface/utils.c (global_bindings_p): Simplify NULL_TREE test.
3108         (gnat_poplevel): Likewise.
3109         (gnat_set_type_context): Likewise.
3110         (defer_or_set_type_context): Fix formatting.
3111         (gnat_pushdecl): Simplify NULL_TREE test.
3112         (maybe_pad_type): Likewise.
3113         (add_parallel_type): Likewise.
3114         (create_range_type): Likewise.
3115         (process_deferred_decl_context): Likewise.
3116         (convert): Likewise.
3117         (def_builtin_1): Likewise.
3118         * gcc-interface/utils2.c (find_common_type): Likewise.
3119         (build_binary_op): Likewise.
3120         (gnat_rewrite_reference): Likewise.
3121         (get_inner_constant_reference): Likewise.
3123 2016-01-18  Eric Botcazou  <ebotcazou@adacore.com>
3125         PR ada/69219
3126         * gcc-interface/trans.c (check_inlining_for_nested_subprog): Consider
3127         the parent function instead of the current function in order to issue
3128         the warning or the error.  Add guard for ignored functions.
3130 2016-01-17  Jakub Jelinek  <jakub@redhat.com>
3132         * adaint.c (__gnat_killprocesstree): Avoid -Wparentheses warning.
3134 2016-01-15  Jakub Jelinek  <jakub@redhat.com>
3136         * adaint.c (__gnat_locate_exec_on_path): Use const char * instead
3137         of char * for path_val to avoid warnings.
3139 2016-01-06  Pierre-Marie de Rodat  <derodat@adacore.com>
3141         * gcc-interface/utils.c: Bump copyright year.
3142         (rest_of_record_type_compilation): Add XVE/XVU parallel types to
3143         the current lexical scope.
3145 2016-01-04  Jakub Jelinek  <jakub@redhat.com>
3147         * gnat_ugn.texi: Bump @copying's copyright year.
3148         * gnat_rm.texi: Likewise.
3150 2016-01-02  Eric Botcazou  <ebotcazou@adacore.com>
3152         * gnatvsn.ads: Bump copyright year.
3155 Copyright (C) 2016 Free Software Foundation, Inc.
3157 Copying and distribution of this file, with or without modification,
3158 are permitted in any medium without royalty provided the copyright
3159 notice and this notice are preserved.