* expr.h (array_at_struct_end_p): Move to...
[official-gcc.git] / gcc / ada / ChangeLog
blob98d5ea9586980d668d0757b30e5b3e038e0fdce5
1 2015-05-27  Eric Botcazou  <ebotcazou@adacore.com>
3         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Move down
4         code applying atomic checks to the object.
6 2015-05-27  Robert Dewar  <dewar@adacore.com>
8         * sem_aux.adb: Minor rewording.
10 2015-05-27  Bob Duff  <duff@adacore.com>
12         * exp_prag.adb (Expand_Pragma_Abort_Defer): Make
13         pragma Abort_Defer do nothing if Abort_Allowed is False.
15 2015-05-27  Arnaud Charlet  <charlet@adacore.com>
17         * exp_ch9.adb, sem_util.adb, sem_util.ads, s-stposu.adb, s-spsufi.ads,
18         sem_elab.ads, g-comlin.ads, errout.ads, exp_ch6.adb, sem_ch4.adb,
19         opt.ads, s-bignum.adb, output.ads, sem_ch13.adb, erroutc.ads,
20         sem_disp.ads, exp_ch3.adb: Minor fixes of duplicate words in comments.
22 2015-05-27  Doug Rupp  <rupp@adacore.com>
24         * adaint.c (__gnat_tmp_name) [vxworks]: Robustify and use for rtp as
25         well as kernel.
27 2015-05-27  Pierre-Marie de Rodat  <derodat@adacore.com>
29         * par_sco.adb (Process_Decision): Store sloc to
30         condition/pragmas SCOs associations into a temporary table before
31         moving them to the SCO_Raw_Hash_Table so that we can back them
32         out just like we do for SCO entries that are simple decisions
33         in an expression context.
35 2015-05-27  Ed Schonberg  <schonberg@adacore.com>
37         * sem_ch6.adb (Process_Formals): A non-private formal type that
38         is a limited view does not have a list of private dependents.
40 2015-05-27  Ed Schonberg  <schonberg@adacore.com>
42         * exp_ch5.adb (Expand_N_Case_Statement): If the expression in
43         the case statement is a compile-time known value, we look for a
44         corresponding alternative to optimize the case statement into a
45         single case. If the type has a static predicate and the expression
46         does not satisfy the predicate, there is no legal alternative and
47         this optimization is not applicable.  Excecution is erroneous,
48         or else if assertions are enabled, an exception will be raised
49         earlier, at the point the expression is elaborated.
51 2015-05-27  Robert Dewar  <dewar@adacore.com>
53         * sem_elab.adb (Check_Internal_Call_Continue): Suppress
54         warning on Finalize, Adjust, or Initialize if type involved has
55         Warnings_Off set.
57 2015-05-27  Ed Schonberg  <schonberg@adacore.com>
59         * sem_aux.adb, sem_aux.ads (First_Discriminant): Return empty when
60         applied to a type with no known discriminants.
62 2015-05-26  Robert Dewar  <dewar@adacore.com>
64         * errout.ads, sem_ch4.adb, sem_ch6.adb: Minor reformatting.
66 2015-05-26  Bob Duff  <duff@adacore.com>
68         * sem_elab.adb (Check_A_Call): In the case where we're
69         calling something in an instance of a generic package that is
70         within this same unit (as the call), make sure we treat it
71         as a call to an entity within the same unit. That is, call
72         Check_Internal_Call, rather than putting "Elaborate_All(X)"
73         on X, which would necessarily result in an elaboration cycle in
74         static-elaboration mode.
76 2015-05-26  Eric Botcazou  <ebotcazou@adacore.com>
78         * freeze.ads (Is_Atomic_VFA_Aggregate): Adjust profile.
79         * freeze.adb (Is_Atomic_VFA_Aggregate): Change Entity
80         parameter into Node parameter and remove Type parameter.
81         Look at Is_Atomic_Or_VFA both on the type and on the object.
82         (Freeze_Entity): Adjust call to Is_Atomic_VFA_Aggregate.
83         * exp_aggr.adb (Expand_Record_Aggregate): Likewise.
84         (Process_Atomic_Independent_Shared_Volatile): Remove code
85         propagating Atomic or VFA from object to locally-defined type.
87 2015-05-26  Bob Duff  <duff@adacore.com>
89         * exp_ch7.adb: Minor comment fix.
91 2015-05-26  Eric Botcazou  <ebotcazou@adacore.com>
93         * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Min/Attr_Max>: Do not
94         bother about NaN's if Machine_Overflows is true.
96 2015-05-26  Eric Botcazou  <ebotcazou@adacore.com>
98         * gcc-interface/trans.c (gnat_to_gnu) <N_Object_Declaration>: Really
99         force evaluation of the expression, if any, when the object has its
100         elaboration delayed.  Do not create a variable at global level.
102 2015-05-26  Eric Botcazou  <ebotcazou@adacore.com>
104         * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Machine>: Do not apply
105         extra-precision trick to literals.  Build SAVE_EXPR manually.
107         * gcc-interface/misc.c (enumerate_modes): Add bypass for x86/x86-64.
109 2015-05-26  Eric Botcazou  <ebotcazou@adacore.com>
111         * gcc-interface/ada-tree.h (DECL_GLOBAL_NONCONSTANT_RENAMING_P): Delete
112         (DECL_RENAMED_OBJECT): Adjust comment.
113         * gcc-interface/gigi.h (record_global_nonconstant_renaming): Delete.
114         (invalidate_global_nonconstant_renamings): Likewise.
115         (gnat_constant_reference_p): Likewise.
116         (rewrite_fn): New function type.
117         (gnat_rewrite_reference): Declare.
118         (call_is_atomic_load): New inline predicate.
119         * gcc-interface/decl.c (elaborate_reference_1): New function.
120         (elaborate_reference): Likewise.
121         (gnat_to_gnu_entity): Call elaborate_reference to elaborate renamings
122         and simplify associated code.  Set const_flag to true consistently in
123         conjunction with used_by_ref.
124         * gcc-interface/trans.c (Identifier_to_gnu): Always replace renaming
125         pointers by renamed objects.
126         (outer_atomic_access_required_p): Deal with renamings.
127         (Compilation_Unit_to_gnu): Do not call
128         invalidate_global_nonconstant_renamings.
129         (gnat_to_gnu) <N_Object_Renaming_Declaration>: Adjust comment.
130         (gnat_gimplify_expr): Deal with atomic loads.
131         * gcc-interface/utils.c (global_nonconstant_renamings): Delete.
132         (destroy_gnat_utils): Do not call
133         invalidate_global_nonconstant_renamings.
134         (record_global_nonconstant_renaming): Delete.
135         (invalidate_global_nonconstant_renamings): Likewise.
136         * gcc-interface/utils2.c (call_is_atomic_load): Move to gigi.h.
137         (build_load_modify_store): Build a copy of the destination.
138         (gnat_stabilize_reference_1): Adjust.
139         (gnat_stabilize_reference): Call gnat_stabilize_reference_1 through
140         gnat_rewrite_reference and move bulk of code to...
141         (gnat_rewrite_reference): ...here.  New global function.
142         (gnat_constant_reference_p): Delete.
144 2015-05-26  Eric Botcazou  <ebotcazou@adacore.com>
146         * gcc-interface/gigi.h (gnat_stabilize_reference): Adjust prototype.
147         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not rely on const_flag
148         to detect constant renamings.  Be prepared for specific pattern of
149         renamed object based on function calls.  Create a constant object
150         for the renaming of a NULL_EXPR or of a CONSTRUCTOR.  Adjust calls
151         to gnat_stabilize_reference and tidy up.  Remove redundant tests.
152         (elaborate_expression_1): Remove obsolete test and tidy up.
153         * gcc-interface/trans.c (Call_to_gnu): Do not stabilize In/Out or Out
154         parameters passed by reference.
155         (gnat_to_gnu) <N_Selected_Component>: Remove redundant protection again
156         side-effects.
157         Use gnat_protect_expr instead of gnat_stabilize_reference for general
158         protection against side-effects.
159         * gcc-interface/utils2.c (gnat_stable_expr_p): New predicate.
160         (gnat_save_expr): Invoke it.
161         (gnat_protect_expr): Likewise.
162         (gnat_stabilize_reference_1): Likewise.  Remove useless propagation
163         of TREE_THIS_NOTRAP.
164         (gnat_stabilize_reference): Remove parameter and adjust throughout.
165         Delete ADDR_EXDR, COMPOUND_EXPR and CONSTRUCTOR cases.
166         Restrict CALL_EXPR case to atomic loads and tweak ERROR_MARK case.
168 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
170         * sinfo.ads: Minor reformatting.
171         * sem_aux.ads: Clarify use of First_Discriminant.
172         * sem_ch4.adb (Analyze_Explicit_Dereference): The use of a limited
173         view is replaced with the non-limited view in an instance body,
174         where the enclosing unit must have a regular with_clause on the
175         relevant unit.
176         * sem_ch12.adb (Install_Body): Freeze instantation after its
177         body. Remove useless freeze nodes for incomplete actuals to
178         prevent multiple generation of internal operations.
179         (Instantiate_Package_Body): Set sloc of body appropriately when
180         there are incomplete actuals and the instance body is placed in
181         the body of the enclosing unit.
182         * errout.ads: Consistent punctuation, better alignment and trivial
183         typos in comments.
184         * err_vars.ads: Fix typo.
186 2015-05-26  Eric Botcazou  <ebotcazou@adacore.com>
188         * sem_ch8.adb (Analyze_Object_Renaming): Lift restriction on
189         components of Volatile_Full_Access objects.
191 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
193         * sem_ch6.adb (Is_Non_Overriding_Operation,
194         Get_Generic_Parent_Type): Handle properly the case of a derived
195         scalar type by using the first subtype rather than its generated
196         anonymous base type.
198 2015-05-26  Eric Botcazou  <ebotcazou@adacore.com>
200         * einfo.adb (Write_Field17_Name): Move E_Incomplete_Subtype
201         case to...
202         (Write_Field19_Name): ...here.
204 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
206         * sem_ch13.adb: sem_ch13.adb (Add_Predicates): Undo analysis
207         of original expression in ASIS mode: does not solve the ASIS
208         problem of a usable type information, and crashes the back-end
209         when performing type annotations.
211 2015-05-26  Robert Dewar  <dewar@adacore.com>
213         * sem_disp.adb (Inherited_Subprograms): Add One_Only parameter.
214         (Is_Overriding_Subprogram): Use One_Only_Parameter.
215         * sem_disp.ads (Inherited_Subprograms): Add One_Only parameter.
217 2015-05-26  Robert Dewar  <dewar@adacore.com>
219         * exp_prag.adb, sem_ch3.adb, sem_ch5.adb, exp_ch11.adb, ghost.adb,
220         exp_ch6.adb, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb, sem_ch13.adb,
221         exp_ch3.adb: Minor reformatting.
223 2015-05-26  Bob Duff  <duff@adacore.com>
225         * treepr.adb: Minor improvement to debugging routines (pp, pn)
226         robustness.  Rearrange the code so passing a nonexistent Node_Id
227         prints "No such node" rather than crashing, and causing gdb to
228         generate confusing messages.
230 2015-05-26  Gary Dismukes  <dismukes@adacore.com>
232         * sem_util.adb: Minor typo fix.
234 2015-05-26  Yannick Moy  <moy@adacore.com>
236         * sem_aux.adb (Subprogram_Body_Entity): Deal with subprogram stubs.
238 2015-05-26  Hristian Kirtchev  <kirtchev@adacore.com>
240         * exp_ch3.adb (Expand_N_Full_Type_Declaration): Capture, set and
241         restore the Ghost mode.
242         (Expand_N_Object_Declaration): Capture, set and restore the Ghost mode.
243         (Freeze_Type): Update the call to Set_Ghost_Mode.
244         (Restore_Globals): New routine.
245         * exp_ch5.adb Add with and use clauses for Ghost.
246         (Expand_N_Assignment_Statement): Capture, set and restore the
247         Ghost mode.
248         (Restore_Globals): New routine.
249         * exp_ch6.adb Add with and use clauses for Ghost.
250         (Expand_N_Procedure_Call_Statement): Capture, set and
251         restore the Ghost mode.
252         (Expand_N_Subprogram_Body):
253         Code cleanup. Capture, set and restore the Ghost mode.
254         (Expand_N_Subprogram_Declaration): Capture, set and restore the
255         Ghost mode.
256         (Restore_Globals): New routine.
257         * exp_ch7.adb Add with and use clauses for Ghost.
258         (Expand_N_Package_Body): Capture, set and restore the Ghost mode.
259         (Expand_N_Package_Declaration): Capture, set and restore the
260         Ghost mode.
261         (Wrap_HSS_In_Block): Create a proper identifier for the block.
262         * exp_ch8.adb Add with and use clauses for Ghost.
263         (Expand_N_Exception_Renaming_Declaration): Code
264         cleanup. Capture, set and restore the Ghost mode.
265         (Expand_N_Object_Renaming_Declaration): Capture, set and restore
266         the Ghost mode.
267         (Expand_N_Package_Renaming_Declaration): Capture, set and restore the
268         Ghost mode.
269         (Expand_N_Subprogram_Renaming_Declaration): Capture, set and
270         restore the Ghost mode.
271         * exp_ch11.adb (Expand_N_Exception_Declaration): Code
272         cleanup. Capture, set and restore the Ghost mode.
273         * exp_disp.adb (Make_DT): Update the call to Set_Ghost_Mode. Do
274         not initialize the dispatch table slot of a Ghost subprogram.
275         * exp_prag.adb Add with and use clauses for Ghost.
276         (Expand_Pragma_Check): Capture, set and restore the Ghost mode.
277         (Expand_Pragma_Contract_Cases): Capture, set and restore the
278         Ghost mode.
279         (Expand_Pragma_Initial_Condition): Capture, set and
280         restore the Ghost mode.
281         (Expand_Pragma_Loop_Variant): Capture,
282         set and restore the Ghost mode.
283         (Restore_Globals): New routine.
284         * exp_util.adb Add with and use clauses for Ghost.
285         (Make_Predicate_Call): Code cleanup. Capture, set and restore
286         the Ghost mode.
287         (Restore_Globals): New routine.
288         * freeze.adb (Freeze_Entity): Code cleanup. Update the call
289         to Set_Ghost_Mode.
290         * ghost.adb Add with and use clause for Sem_Prag.
291         (Check_Ghost_Completion): Code cleanup.
292         (Check_Ghost_Overriding): New routine.
293         (Check_Ghost_Policy): Code cleanup.
294         (Ghost_Entity): New routine.
295         (Is_Ghost_Declaration): Removed.
296         (Is_Ghost_Statement_Or_Pragma): Removed.
297         (Is_OK_Context): Reimplemented.
298         (Is_OK_Declaration): New routine.
299         (Is_OK_Pragma): New routine.
300         (Is_OK_Statement): New routine.
301         (Mark_Full_View_As_Ghost): New routine.
302         (Mark_Pragma_As_Ghost): New routine.
303         (Mark_Renaming_As_Ghost): New routine.
304         (Propagate_Ignored_Ghost_Code): Update the comment on usage.
305         (Set_From_Entity): New routine.
306         (Set_From_Policy): New routine.
307         (Set_Ghost_Mode): This routine now handles pragmas and freeze nodes.
308         (Set_Ghost_Mode_For_Freeze): Removed.
309         (Set_Ghost_Mode_From_Entity): New routine.
310         (Set_Ghost_Mode_From_Policy): Removed.
311         * ghost.ads (Check_Ghost_Overriding): New routine.
312         (Mark_Full_View_As_Ghost): New routine.
313         (Mark_Pragma_As_Ghost): New routine.
314         (Mark_Renaming_As_Ghost): New routine.
315         (Set_Ghost_Mode): Update the parameter profile. Update the
316         comment on usage.
317         (Set_Ghost_Mode_For_Freeze): Removed.
318         (Set_Ghost_Mode_From_Entity): New routine.
319         * sem_ch3.adb (Analyze_Full_Type_Declaration):
320         Capture and restore the Ghost mode. Mark a type
321         as Ghost regardless of whether it comes from source.
322         (Analyze_Incomplete_Type_Decl): Capture, set and restore the
323         Ghost mode.
324         (Analyze_Number_Declaration): Capture and restore the Ghost mode.
325         (Analyze_Object_Declaration): Capture and restore the Ghost mode.
326         (Analyze_Private_Extension_Declaration): Capture and
327         restore the Ghost mode.
328         (Analyze_Subtype_Declaration): Capture and restore the Ghost mode.
329         (Process_Full_View): The full view inherits all Ghost-related
330         attributes from the private view.
331         (Restore_Globals): New routine.
332         * sem_ch5.adb (Analyze_Assignment): Capture and restore the
333         Ghost mode.
334         (Restore_Globals): New routine.
335         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration):
336         Code cleanup. Capture and restore the Ghost mode. Mark a
337         subprogram as Ghost regarless of whether it comes from source.
338         (Analyze_Procedure_Call): Capture and restore the Ghost mode.
339         (Analyze_Subprogram_Body_Helper): Capture and restore the Ghost mode.
340         (Analyze_Subprogram_Declaration): Capture and restore the Ghost mode.
341         (New_Overloaded_Entity): Ensure that a
342         parent subprogram and an overriding subprogram have compatible
343         Ghost policies.
344         * sem_ch7.adb (Analyze_Package_Body_Helper): Capture and restore
345         the Ghost mode.
346         (Analyze_Package_Declaration): Capture and
347         restore the Ghost mode. Mark a package as Ghost when it is
348         declared in a Ghost region.
349         (Analyze_Private_Type_Declaration): Capture and restore the Ghost mode.
350         (Restore_Globals): New routine.
351         * sem_ch8.adb (Analyze_Exception_Renaming): Code
352         reformatting. Capture and restore the Ghost mode. A renaming
353         becomes Ghost when its name references a Ghost entity.
354         (Analyze_Generic_Renaming): Capture and restore the Ghost mode. A
355         renaming becomes Ghost when its name references a Ghost entity.
356         (Analyze_Object_Renaming): Capture and restore the Ghost mode. A
357         renaming becomes Ghost when its name references a Ghost entity.
358         (Analyze_Package_Renaming): Capture and restore the Ghost mode. A
359         renaming becomes Ghost when its name references a Ghost entity.
360         (Analyze_Subprogram_Renaming): Capture and restore the Ghost
361         mode. A renaming becomes Ghost when its name references a
362         Ghost entity.
363         * sem_ch11.adb (Analyze_Exception_Declaration): Capture, set
364         and restore the Ghost mode.
365         * sem_ch12.adb (Analyze_Generic_Package_Declaration): Capture and
366         restore the Ghost mode.
367         (Analyze_Generic_Subprogram_Declaration):
368         Capture and restore the Ghost mode.
369         * sem_ch13.adb Add with and use clauses for Ghost.
370         (Add_Invariant): New routine.
371         (Add_Invariants): Factor out code.
372         (Add_Predicate): New routine.
373         (Add_Predicates): Factor out code.
374         (Build_Invariant_Procedure_Declaration): Code cleanup. Capture,
375         set and restore the Ghost mode.
376         (Build_Invariant_Procedure): Code cleanup.
377         (Build_Predicate_Functions): Capture, set and
378         restore the Ghost mode. Mark the generated functions as Ghost.
379         * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
380         Capture, set and restore the Ghost mode.
381         (Analyze_External_Property_In_Decl_Part): Capture, set and restore
382         the Ghost mode.
383         (Analyze_Initial_Condition_In_Decl_Part):
384         Capture, set and restore the Ghost mode.
385         (Analyze_Pragma):
386         Code cleanup. Capture, set and restore the Ghost mode. Flag
387         pragmas Linker_Section, No_Return, Unmodified, Unreferenced and
388         Unreferenced_Objects as illegal when it applies to both Ghost
389         and living arguments. Pragma Ghost cannot apply to synchronized
390         objects.
391         (Check_Kind): Moved to the spec of Sem_Prag.
392         (Process_Inline): Flag the pragma as illegal when it applies to
393         both Ghost and living arguments.
394         (Restore_Globals): New routine.
395         * sem_prag.ads Add pragma Default_Initial_Condition
396         to table Assertion_Expression_Pragma. Add new table
397         Is_Aspect_Specifying_Pragma.
398         (Check_Kind): Moved from body of Sem_Prag.
399         * sem_util.adb Add with and use clauses for Ghost.
400         (Build_Default_Init_Cond_Procedure_Body): Capture, set and restore
401         the Ghost mode.
402         (Build_Default_Init_Cond_Procedure_Declaration):
403         Capture, set and restore the Ghost mode. Mark the default
404         initial condition procedure as Ghost when it is declared
405         in a Ghost region.
406         (Is_Renaming_Declaration): New routine.
407         (Policy_In_List): Account for the single argument version of
408         Check_Pragma.
409         * sem_util.ads (Is_Renaming_Declaration): New routine.
410         * sinfo.adb (Is_Ghost_Pragma): New routine.
411         (Set_Is_Ghost_Pragma): New routine.
412         * sinfo.ads New attribute Is_Ghost_Pragma.
413         (Is_Ghost_Pragma): New routine along with pragma Inline.
414         (Set_Is_Ghost_Pragma): New routine along with pragma Inline.
416 2015-05-26  Robert Dewar  <dewar@adacore.com>
418         * sem_ch3.adb, sem_aux.adb, sem_aux.ads, exp_ch6.adb, sprint.adb:
419         Minor reformatting.
421 2015-05-26  Gary Dismukes  <dismukes@adacore.com>
423         * gnat1drv.adb, targparm.adb, targparm.ads, restrict.adb: Minor
424         reformatting and typo fixes in comments.
426 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
428         * sem_ch7.adb (Swap_Private_Dependets): Set visibility of
429         the two views of a private dependent in two separate steps,
430         to ensure proper visibility in parent units analyzed for inlining.
432 2015-05-26  Yannick Moy  <moy@adacore.com>
434         * sem_aux.adb, sem_aux.ads (Get_Low_Bound): Use Type_Low_Bound.
435         (Package_Body, Package_Spec): New queries moved
436         here from GNATprove.
437         (Package_Specification): Simplify query to remove use of loop.
438         * sem_util.adb, sem_util.ads (Enclosing_Declaration,
439         Enclosing_Package_Or_Subprogram, Is_Attribute_Update): New
440         queries moved here from GNATprove.
442 2015-05-26  Bob Duff  <duff@adacore.com>
444         * einfo.adb, einfo.ads, sprint.adb, lib-xref.ads: Minor cleanup: Remove
445         obsolete Entity_Kinds E_String_Type and E_String_Subtype. Update
446         redundant assertions.
448 2015-05-26  Gary Dismukes  <dismukes@adacore.com>
450         * sem_util.adb, sem_util.ads, sem_ch13.adb: Minor typo fixes.
452 2015-05-26  Doug Rupp  <rupp@adacore.com>
454         * init.c [vxworks]: Refine previous checkin.
456 2015-05-26  Robert Dewar  <dewar@adacore.com>
458         * exp_ch4.adb (Wrap_MA): New function.
459         (Expand_N_Op_Expon): Use Wrap_MA.
461 2015-05-26  Bob Duff  <duff@adacore.com>
463         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
464         Do not use secondary stack to return limited records with
465         defaulted discriminants. This is an efficiency improvement.
466         * exp_ch6.adb, exp_dist.adb, sem_attr.adb, sem_aux.adb, sem_aux.ads,
467         sem_ch12.adb, sem_ch3.adb, sem_ch4.adb, sem_ch6.adb, sem_ch7.adb,
468         sem_util.adb: Change the sense of Is_Indefinite_Subtype to be
469         Is_Definite_Subtype. This is an improvement to readability (the double
470         negative in "not Is_Indefinite_Subtype" was slightly confusing). Also
471         disallow passing non-[sub]type entities, an unnecessary and slightly
472         bug-prone flexibility.
474 2015-05-26  Robert Dewar  <dewar@adacore.com>
476         * sem_aggr.adb (Resolve_Array_Aggregate): Defend against
477         bad bounds.
478         * debug.adb: Document -gnatd.k.
479         * erroutc.adb (Set_Msg_Insertion_Line_Number): Implement -gnatd.k.
481 2015-05-26  Robert Dewar  <dewar@adacore.com>
483         * gnat1drv.adb (Gnat1drv): Provide new arguments for
484         Get_Target_Parameters.
485         * restrict.adb (Set_Restriction_No_Specification_Of_Aspect):
486         new procedure.
487         (Set_Restriction_No_Use_Of_Attribute): new procedure.
488         * restrict.ads (Set_Restriction_No_Specification_Of_Aspect):
489         new procedure.
490         (Set_Restriction_No_Use_Of_Attribute): new procedure.
491         * s-rident.ads (Integer_Parameter_Restrictions): New subtype.
492         * targparm.adb (Get_Target_Parameters): Allow new restriction
493         pragmas No_Specification_Of_Aspect No_Use_Of_Attribute
494         No_Use_Of_Pragma.
495         * targparm.ads: New parameters for Get_Target_Parameters.
496         * tbuild.adb (Set_NOD): New name for Set_RND.
497         (Set_NSA): New procedure.
498         (Set_NUA): New procedure.
499         (Set_NUP): New procedure.
500         * tbuild.ads (Make_SC): Minor reformatting.
501         (Set_NOD): New name for Set_RND.
502         (Set_NSA, Set_NUA, Set_NUP): New procedure.
504 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
506         * a-stwise.adb (Find_Token): If source'first is not positive,
507         an exception must be raised, as specified by RM 2005 A.4.3
508         (68/1). This must be checked explicitly, given that run-time
509         files are normally compiled without constraint checks.
510         * a-stzsea.adb (Find_Token): Ditto.
512 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
514         * sem_util.ads sem_util.adb (Is_Current_Instance):  New predicate
515         to fully implement RM 8.6 (17/3). which earlier only applied
516         to synchronized types. Used to preanalyze aspects that include
517         current instances of types, such as Predicate and Invariant.
518         * sem_res.adb (Resolve_Entity_Name): Use Is_Current_Instance.
519         * sem_ch13.adb (Add_Predicates): In ASIS mode, preserve original
520         expression of aspect and analyze it to provide proper type
521         information.
523 2015-05-26  Robert Dewar  <dewar@adacore.com>
525         * rtsfind.ads: Add entries for RE_Exn[_Long]_Float.
526         * s-exnllf.adb (Exn_Float): New function.
527         (Exn_Long_Float): New function.
528         (Exn_Long_Long_Float): Rewritten interface.
529         (Exp): New name for what used to be Exn_Long_Long_Float.
530         * s-exnllf.ads (Exn_Float): New function.
531         (Exn_Long_Float): New function.
533 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
535         * sem_ch8.adb (Find_Selected_Component): Do not emit an error
536         on a selected component when the prefix is a type name that is
537         a Current_Instance.
538         * einfo.ads: Minor grammar fix.
540 2015-05-26  Doug Rupp  <rupp@adacore.com>
542         * init.c [vxworks] (sysLib.h): Only for x86.
544 2015-05-26  Doug Rupp  <rupp@adacore.com>
546         * init-vxsim.c (CPU): define as __VXSIM_CPU__
547         * sigtramp-vxworks-vxsim.c (CPU): Likewise.
548         sigtramp-vxworks-target.inc: Add check for SIMLINUX.
549         * sigtramp.h: Likewise.
551 2015-05-26  Robert Dewar  <dewar@adacore.com>
553         * sem_aux.adb, sem_disp.adb, sem_util.ads: Add comment.
554         * sem_util.adb: Minor reformatting
556 2015-05-26  Yannick Moy  <moy@adacore.com>
558         * inline.adb (Has_Initialized_Type): Adapt to new names.
559         * sem_aux.adb, sem_aux.ads (Get_Low_Bound, Number_Components,
560         Subprogram_Body, Subprogram_Body_Entity, Subprogram_Spec,
561         Subprogram_Specification): New query functions used in GNATprove.
562         * sem_disp.adb, sem_disp.ads (Is_Overriding_Subprogram): New
563         query functions used in GNATprove.
564         * sem_util.adb, sem_util.adso (Enclosing_Lib_Unit_Node,
565         Get_Cursor_Type, Get_Return_Object, Get_User_Defined_Eq,
566         Is_Double_Precision_Floating_Point_Type,
567         Is_Single_Precision_Floating_Point_Type): New query functions
568         used in GNATprove.
570 2015-05-26  Bob Duff  <duff@adacore.com>
572         * s-rpc.ads (Partition_ID): Increase maximum Partition_ID to
573         some huge number.
574         * a-except-2005.adb, a-except-2005.ads, a-except.adb,
575         a-except.ads, a-exexda.adb, a-exstat.adb: Minor comment fixes.
577 2015-05-26  Robert Dewar  <dewar@adacore.com>
579         * sinfo.adb: Minor comment addition.
580         * einfo.adb: Minor whitespace and punctuation fix.
581         * sem_util.adb: Minor editing of comments.
583 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
585         * sem_ch7.adb (Install_Private_Declarations,
586         Swap_Private_Dependents): Ensure that both views of the dependent
587         subtype are immediately visible if we are within their scope. This
588         may be needed when a procedure body is both the parent of an
589         instantiated child unit, and is itself used to inline a local
590         function.
592 2015-05-26  Gary Dismukes  <dismukes@adacore.com>
594         * exp_prag.adb, gnat1drv.adb: Minor reformatting.
596 2015-05-26  Eric Botcazou  <ebotcazou@adacore.com>
598         * exp_ch4.adb (Expand_N_Indexed_Component): In the circuit
599         detecting exceptions to the rewriting, deal with implicit
600         dereferences in the selected component case.
602 2015-05-26  Bob Duff  <duff@adacore.com>
604         * sem_ch13.adb (Analyze_One_Aspect): Do not
605         require the expression of the Disable_Controlled aspect to be
606         static in a generic template, because 'Enabled is not known
607         until the instance.
609 2015-05-26  Doug Rupp  <rupp@adacore.com>
611         * init-vxsim.c: New file for vxsim ZCX
612         * sigtramp-vxworks-vxsim.c: Likewise.
613         * sigtramp-vxworks.c: Factor out target dependent bits into ...
614         * sigtramp-vxworks-target.inc: ... here.
615         * sigtramp.h: Add vxsim zcx protos.
616         * init.c [vxworks...] (sysLib.h): Include.
617         (__gnat_map_signal): Make global.
618          [...i386] (__gnat_error_handler): Call __gnat_vxsim_error_handler if
619         on vxsim.
620         [...i386] (__gnat_install_handler): Test if on vxsim.
622 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
624         * sem_ch5.adb (Analyze_Iterator_Specification): For an element
625         iterator over an array, if the component is aliased, the loop
626         variable is aliased as well.
628 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
630         * exp_ch6.adb (Expand_Actuals): For a function call with in-out
631         parameters that is rewritten as an expression_with_actions,
632         we preserve the original function call node for further use by
633         the caller (typically Expand_Call). In the presence of validity
634         checks, that function call, though it is labelled Analyzed to
635         prevent an infinite recursion, may be rewritten as a temporary
636         by Remove_Side_Effects.  Ensure that the caller has access to
637         the original function call to continue expansion.
638         * atree.ads: Minor typo in comment.
640 2015-05-26  Javier Miranda  <miranda@adacore.com>
642         * sem_util.adb (Check_Function_Writable_Actuals):
643         Add missing support to check the violation of writable actuals
644         in array aggregates that have a nonstatic range.
646 2015-05-26  Hristian Kirtchev  <kirtchev@adacore.com>
648         * exp_ch6.adb (Process_Contract_Cases_For): Update the call to
649         Expand_Pragma_Contract_Cases.
650         * exp_prag.ads, exp_prag.adb (Expand_Contract_Cases): Rename to
651         Expand_Pragma_Contract_Cases.
652         * sem_ch13.adb (Add_Invariants): Use the original aspect name
653         when creating the arguments of pragma Check. This ensures that
654         'Class is properly recognized and handled.
656 2015-05-26  Arnaud Charlet  <charlet@adacore.com>
658         * gnat1drv.adb: Minor adjustments.
659         (Adjust_Global_Switches): Disable some related flags in CodePeer mode.
660         * sem_ch4.adb (Has_Arbitrary_Evaluation_Order,
661         Stop_Subtree_Climbind): Code cleanup.
662         * einfo.ads: Minor comment change.
664 2015-05-26  Javier Miranda  <miranda@adacore.com>
666         * sem_aggr.adb (Resolve_Aggregate, Resolve_Extension_Aggregate):
667         Code cleanup.
668         * sem_ch3.adb (Build_Derived_Record_Type,
669         Record_Type_Declaration): Code cleanup.
670         * sem_ch4.adb (Has_Arbitrary_Evaluation_Order,
671         Stop_Subtree_Climbind): Tables which speed up the identification
672         of dangerous calls to Ada 2012 functions with writable actuals
673         (AI05-0144).
674         (Analyze_Arithmetic_Op, Analyze_Call, Analyze_Comparison_Op,
675         Analyze_Equality_Op, Analyze_Logical_Op, Analyze_Membership_Op,
676         Analyze_Range): Code cleanup.
677         (Is_Arbitrary_Evaluation_Order_Construct): Removed.
678         (Check_Writable_Actuals): Code cleanup using the added tables.
679         * sem_util.adb (Check_Function_Writable_Actuals): Return
680         immediately if the node does not have the flag Check_Actuals
681         set to True.
683 2015-05-26  Eric Botcazou  <ebotcazou@adacore.com>
685         * exp_ch6.adb (Add_Call_By_Copy_Code): Remove restrictive
686         condition in the detection of the effects of Remove_Side_Effects.
687         * exp_util.ads (Remove_Side_Effects): Add general and historical note.
688         * exp_util.adb (Is_Name_Reference): New predicate.
689         (Remove_Side_Effects): Use it in lieu of Is_Object_Reference
690         in order to decide whether to use the renaming to capture the
691         side effects of the subexpression.
692         (Side_Effect_Free): Remove obsolete test.
694 2015-05-26  Robert Dewar  <dewar@adacore.com>
696         * aspects.ads, aspects.adb: Add aspect Disable_Controlled.
697         * einfo.ads, einfo.adb (Disable_Controlled): New flag.
698         (Is_Controlled_Active): New function.
699         * exp_ch3.adb (Expand_Freeze_Record_Type): Use
700         Is_Controlled_Active.
701         * exp_util.adb (Needs_Finalization): Finalization not needed
702         if Disable_Controlled set.
703         * freeze.adb (Freeze_Array_Type): Do not set
704         Has_Controlled_Component if the component has Disable_Controlled.
705         (Freeze_Record_Type): ditto.
706         * sem_ch13.adb (Decorate): Minor reformatting.
707         (Analyze_Aspect_Specifications): Implement Disable_Controlled.
708         * sem_ch3.adb (Analyze_Object_Declaration): Handle
709         Disable_Controlled.
710         (Array_Type_Declaration): ditto.
711         (Build_Derived_Private_Type): ditto.
712         (Build_Derived_Type): ditto.
713         (Record_Type_Definition): ditto.
714         * snames.ads-tmpl: Add Name_Disable_Controlled.
716 2015-05-26  Eric Botcazou  <ebotcazou@adacore.com>
718         * exp_ch6.adb (Expand_Actuals): Use a constant declaration instead
719         of a renaming to capture the return value of a function call.
720         (Expand_Simple_Function_Return): Call Remove_Side_Effects
721         instead of removing side effects manually before the call to
722         _Postconditions.
724 2015-05-26  Robert Dewar  <dewar@adacore.com>
726         * exp_ch4.adb (Expand_N_Op_Expon): Deal with problem of wrong
727         order in calling Duplicate_Subexpr.
728         * einfo.ads: Fix documentation of Object/Value size for scalar types.
730 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
732         * exp_aggr.adb (Build_Array_Aggr_Code, Gen_Assign):
733         If a component is default-initialized and its type has an
734         invariant procedure, insert an invariant test after code for
735         default-initialization of the component.
737 2015-05-26  Gary Dismukes  <dismukes@adacore.com>
739         * einfo.ads, sem_util.adb, sem_ch4.adb: Minor reformatting.
741 2015-05-26  Robert Dewar  <dewar@adacore.com>
743         * exp_unst.adb, exp_unst.ads: Change to using Subps table index for
744         making AREC entity names unique.
746 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
748         * sem_cat.adb (Has_Stream_Attribute_Definition): If the type
749         has aspect specifications, examine the corresponding list of
750         representation items to determine whether there is a visible
751         stream operation. The attribute definition clause generated from
752         the aspect will be inserted at the freeze point of the type,
753         which may be in the private part and not directly visible,
754         but the aspect makes the operation available to a client.
756 2015-05-26  Robert Dewar  <dewar@adacore.com>
758         * sem_util.adb: Minor code reorganization.
759         * sem_ch6.adb: Minor reformatting.
761 2015-05-25  Eric Botcazou  <ebotcazou@adacore.com>
763         * gcc-interface/utils.c (maybe_pad_type): Do not apply adjustment to
764         original size for elementary types before issuing the size warning.
766 2015-05-25  Eric Botcazou  <ebotcazou@adacore.com>
768         * get_targ.adb (C_Get_Float_Words_BE): Adjust import name.
769         (C_Get_Words_BE): Likewise.
770         (C_Get_Bytes_BE): Likewise.
771         (C_Get_Bits_BE): Likewise.
772         (Width_From_Size): Remove superfluous space.
773         * gcc-interface/targtyps.c (get_float_words_be): Rename into...
774         (get_target_float_words_be): ...this.
775         (get_words_be): Rename into...
776         (get_target_words_be): ...this.
777         (get_bytes_be): Rename into...
778         (get_target_bytes_be): ...this.
779         (get_bits_be): Rename into...
780         (get_target_bits_be): ...this.
781         * gcc-interface/gigi.h (standard_datatypes): Remove ADT_ptr_void_type.
782         (ptr_void_type_node): Delete.
783         (get_target_float_size): Likewise.
784         (get_target_double_size): Likewise.
785         (get_target_long_double_size): Likewise.
786         (get_float_words_be): Likewise.
787         (get_words_be): Likewise.
788         (get_bytes_be): Likewise.
789         (get_bits_be): Likewise.
790         (get_target_float_words_be): Declare.
791         (get_target_words_be): Likewise.
792         (get_target_bytes_be): Likewise.
793         (get_target_bits_be): Likewise.
794         * gcc-interface/decl.c (gnat_to_gnu_entity): Replace ptr_void_type_node
795         with ptr_type_node.
796         (intrin_return_compatible_p): Likewise.
797         * gcc-interface/trans.c (gigi): Likewise.
798         * gcc-interface/utils2.c (maybe_wrap_malloc): Likewise.
799         (maybe_wrap_free): Likewise.
800         * gcc-interface/utils.c (maybe_pad_type): Remove superfluous space.
801         * gcc-interface/misc.c (gnat_init): Do not set ptr_void_type_node.
803 2015-05-25  Eric Botcazou  <ebotcazou@adacore.com>
805         * gcc-interface/decl.c (elaborate_expression): Take a const string
806         suffix instead of a tree.
807         (elaborate_expression_1): Likewise.
808         (elaborate_expression_2): Likewise.
809         (gnat_to_gnu_entity): Adjust to above changes.
810         (build_subst_list): Likewise.
811         (get_entity_char): New static function.
813 2015-05-25  Eric Botcazou  <ebotcazou@adacore.com>
815         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: Move around.
816         <E_Exception>: Merge with E_Variable case.
817         <E_Variable>: Remove 'object' label.
819 2015-05-25  Eric Botcazou  <ebotcazou@adacore.com>
821         * gcc-interface/decl.c (gnat_to_gnu_entity): Minor tweak.
822         * gcc-interface/trans.c (finalize_nrv_unc_r): Use CONSTRUCTOR_ELT.
823         * gcc-interface/utils.c (convert): Likewise and simplify.
824         (remove_conversions): Likewise.
825         * gcc-interface/utils2.c (compare_fat_pointers): Likewise.
826         (build_unary_op): Likewise and simplify.
828 2015-05-25  Eric Botcazou  <ebotcazou@adacore.com>
830         * gcc-interface/gigi.h (build_atomic_load): Adjust prototype.
831         (build_atomic_store): Likewise.
832         (build_load_modify_store): Declare.
833         (VECTOR_TYPE_P): Delete.
834         * gcc-interface/decl.c (gnat_to_gnu_entity): Replace Is_Atomic with
835         Is_Atomic_Or_VFA throughout.
836         <E_Array_Type>: Build a variant of the XUA type instead of forcing
837         TYPE_VOLATILE on it.
838         <E_Array_Subtype>: Use the main variant of the base type.
839         Do not force TYPE_VOLATILE on the type being built.
840         <E_Record_Type>: Likewise.
841         <E_Array_Subtype>: Likewise.
842         <E_Subprogram_Type>: Rename local variable.
843         Add Atomic qualifier in conjunction with Volatile on types if needed.
844         Force BLKmode for by-ref types only at the end of the processing.
845         Change qualifiers only after changing the mode of the type.  Set
846         TYPE_UNIVERSAL_ALIASING_P on the type directly.
847         (check_ok_for_atomic_type): Issue specific error message for VFA.
848         (gnat_to_gnu_component_type): Replace Is_Atomic with
849         Is_Atomic_Or_VFA throughout.
850         * gcc-interface/misc.c (gnat_get_alias_set): Test
851         TYPE_UNIVERSAL_ALIASING_P on the type directly.
852         * gcc-interface/trans.c (lvalue_required_p): Replace Is_Atomic with
853         Is_Atomic_Or_VFA throughout.  Add missing guard.
854         (node_is_atomic): New predicate.
855         (node_has_volatile_full_access): Likewise.
856         (gnat_strip_type_conversion): New function.
857         (outer_atomic_access_required_p): New predicate.
858         (atomic_sync_required_p): Rename into...
859         (atomic_access_required_p): ...this.  Add SYNC parameter, scan the
860         parent node first and then look for the atomic setting.  Add support
861         for Volatile_Full_Access.
862         (Call_to_gnu): Add atomic_access and outer_atomic_access parameters
863         and adjusts calls to above functions.  Use load-modify-store sequence
864         for updates of In/Out and Out parameters if required, as well as for
865         moving the result to the target if required.  Add couple of missing
866         guards.
867         (gnat_to_gnu): Adjust calls to above functions.
868         <N_Object_Renaming_Declaration>: If the renamed object has side-effects
869         evaluate only its address.
870         <N_Assignment_Statement>: Adjust call to Call_to_gnu.  Use load-modify
871         store sequence if required.
872         <N_Function_Call>: Adjust call to Call_to_gnu.
873         (extract_values): Adjust comment.
874         * gcc-interface/utils2.c (build_atomic_load): Add SYNC parameter and
875         use relaxed memory model if it is not set.
876         (build_atomic_store): Likewise.
877         (call_is_atomic_load): New predicate.
878         (build_load_modify_store): New function.
879         (build_binary_op) <MODIFY_EXPR>: Accept SAVE_EXPR on the LHS.
880         (gnat_stabilize_reference) <CALL_EXPR>: Deal with atomic loads.
882 2015-05-25  Eric Botcazou  <ebotcazou@adacore.com>
884         * gcc-interface/ada-tree.h (DECL_RENAMING_GLOBAL_P): Rename into...
885         (DECL_GLOBAL_NONCONSTANT_RENAMING_P): ...this.
886         * gcc-interface/gigi.h (record_global_renaming_pointer): Delete.
887         (invalidate_global_renaming_pointers): Likewise.
888         (record_global_nonconstant_renaming): New.
889         (invalidate_global_nonconstant_renamings): Likewise.
890         (get_inner_constant_reference): Likewise.
891         (gnat_constant_reference_p): Likewise.
892         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Adjust to above
893         and register the renaming pointer only if the object is non-constant.
894         (elaborate_expression_1): Call get_inner_constant_reference instead
895         of get_inner_reference.
896         * gcc-interface/trans.c (fold_constant_decl_in_expr): Minor tweak.
897         (Identifier_to_gnu): Adjust to above and do not recheck the renamed
898         object before substituting it.
899         (Compilation_Unit_to_gnu): Adjust to above renaming.  Minor tweaks.
900         (gnat_to_gnu) <N_Object_Renaming_Declaration>: Do not return the
901         result at the global level.
902         (N_Exception_Renaming_Declaration): Likewise.
903         * gcc-interface/utils.c (global_renaming_pointers): Rename into...
904         (global_nonconstant_renamings): ...this.
905         (destroy_gnat_utils): Adjust to above renaming.
906         (record_global_renaming_pointer): Rename into...
907         (record_global_nonconstant_renaming): ...this.
908         (invalidate_global_renaming_pointers): Rename into...
909         (invalidate_global_nonconstant_renamings): ...this and do not recheck
910         the renamed object before invalidating.
911         * gcc-interface/utils2.c (gnat_stabilize_reference): Minor tweak.
912         (get_inner_constant_reference): New public function.
913         (gnat_constant_reference_p): New predicate.
915 2015-05-25  Javier Miranda  <miranda@adacore.com>
917         * einfo.ads, einfo.adb (Has_Out_Or_In_Out_Parameter): This attribute
918         is now present in subprograms, generic subprograms, entries and
919         entry families.
920         * sem_ch6.adb (Set_Formal_Mode): Set As_Out_Or_In_Out_Parameter
921         on entries, entry families, subprograms and generic subprograms.
922         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration):
923         Minor code reorganization to ensure that the Ekind attribute
924         of the subprogram entity is set before its formals are
925         processed. Required to allow the use of the attribute
926         Has_Out_Or_In_Out_Parameter on the subprogram entity.
927         * sem_aggr.adb (Resolve_Aggregate, Resolve_Extension_Aggregate):
928         Perform the check on writable actuals only if the value of some
929         component of the aggregate involves calling a function with
930         out-mode parameters.
931         (Resolve_Record_Aggregate): Propagate the Check_Actuals flag to the
932         internally built aggregate.
933         * sem_ch3.adb (Build_Derived_Record_Type, Record_Type_Declaration):
934         Perform the check on writable actuals only if the initialization of
935         some component involves calling a function with out-mode parameters.
936         * sem_ch4.adb (Analyze_Arithmetic_Op, Analyze_Comparison_Op,
937         Analyze_Equality_Op, Analyze_Logical_Op, Analyze_Membership_Op,
938         Analyze_Range): Check writable actuals only if the
939         subtrees have a call to a function with out-mode parameters
940         (Analyze_Call.Check_Writable_Actuals): New subprogram. If the call
941         has out or in-out parameters then mark its outermost enclosing
942         construct as a node on which the writable actuals check must
943         be performed.
944         (Analyze_Call): Check if the flag must be set and if the outermost
945         enclosing construct.
946         * sem_util.adb (Check_Function_Writable_Actuals): Code cleanup
947         and reorganization. We skip processing aggregate discriminants
948         since their precise analysis involves two phases traversal.
949         * sem_res.adb (Resolve_Actuals, Resolve_Arithmetic_Op,
950         Resolve_Logical_Op, Resolve_Membership_Op): Remove call to
951         check_writable_actuals.
953 2015-05-22  Ed Schonberg  <schonberg@adacore.com>
955         * sem_ch3.adb (Constrain_Concurrent): If the context is a
956         type declaration, generate an Itype_Reference for the anonymous
957         subtype, to force elaboration at this point in gigi.
959 2015-05-22  Gary Dismukes  <dismukes@adacore.com>
961         * layout.adb, einfo.ads, sem_ch12.adb, freeze.adb, sem_util.ads,
962         exp_ch4.adb, sem_ch6.adb: Minor reformatting and typo fixes.
964 2015-05-22  Ed Schonberg  <schonberg@adacore.com>
966         * sem_res.adb (Resolve_Actuals): If the call is to an overridden
967         operation, replace the names of the actuals in named associations
968         with the names of the actuals of the subprogram that is eventually
969         executed. The names of the formals and the defaults can differ
970         between the two operations when they are operations of a formal
971         derived type.
973 2015-05-22  Bob Duff  <duff@adacore.com>
975         * a-convec.ads, a-convec.adb (Append): Check for fast path. Split
976         out slow path into separate procedure. Inline Append. Fast path
977         now avoids calling Insert.
978         (Finalize): Do the busy checking last, so the container gets emptied.
979         (Insert, Insert_Space): Remove redundancy.
981 2015-05-22  Robert Dewar  <dewar@adacore.com>
983         * switch-c.adb (Scan_Front_End_Switches): Insist on -gnatc
984         for -gnatd.V.
986 2015-05-22  Arnaud Charlet  <charlet@adacore.com>
988         * gnatvsn.ads: Minor code reorg to remember more easily to update
989         variables.
991 2015-05-22  Ed Schonberg  <schonberg@adacore.com>
993         * sem_ch10.adb (Analyze_With_Clause): In ASIS_Mode, a
994         limited_with clause on a predefined unit is not transformed into
995         a regular with_clause, to preserve the original tree structure.
996         * sinfo.ads (N_With_Clause): Add comment on handling of
997         Limited_With.
998         * sem_ch10.adb: Minor reformatting.
1000 2015-05-22  Ed Schonberg  <schonberg@adacore.com>
1002         * sem_ch8.adb (Freeze_Profile): A limited view of a type in
1003         the profile of a subprogram renaming does not require freezing,
1004         because it is declared in a different unit.
1006 2015-05-22  Ed Schonberg  <schonberg@adacore.com>
1008         * exp_aggr.adb (Get_Constraint_Association): If type (of ancestor
1009         composite type) is private, go to full view. This was previously
1010         done only in an instance context, but is happen whenever a chain
1011         of private extensions includes one inherited discriminant.
1013 2015-05-22  Robert Dewar  <dewar@adacore.com>
1015         * einfo.ads: Minor comment updates.
1016         * exp_unst.adb: Move Subps table to spec Don't remove old entries
1017         from table Add Last field to record last entry used.
1018         * exp_unst.ads: Move Subps table here from body So that Cprint
1019         can access saved values.
1021 2015-05-22  Bob Duff  <duff@adacore.com>
1023         * a-cdlili.adb, a-cdlili.ads, a-cohama.adb, a-cohama.ads,
1024         * a-cohase.adb, a-cohase.ads, a-convec.adb, a-convec.ads,
1025         * a-coorma.adb, a-coorma.ads, a-coorse.adb, a-coorse.ads:
1026         (Pseudo_Reference, Element_Access, Get_Element_Access): New
1027         declarations added for use by performance improvements in exp_ch5.adb.
1028         * snames.ads-tmpl: New names referenced by exp_ch5.adb.
1029         * exp_ch5.adb: Speed up "for ... of" loops for predefined containers.
1030         Instead of doing literally what the RM calls for, we do something
1031         equivalent that avoids expensive operations inside the loop. If the
1032         container package has appropriate Next, Pseudo_Reference,
1033         Element_Access, Get_Element_Access declarations, we invoke the
1034         optimization.
1035         * snames.ads-tmpl: Note speed improvement.
1037 2015-05-22  Eric Botcazou  <ebotcazou@adacore.com>
1039         * einfo.ads (Is_Atomic_Or_VFA): Move to XEINFO INLINES section.
1040         * xeinfo.adb: Replace a-einfo.h with einfo.h throughout.
1041         Add pattern to translate "or else" into "||".
1043 2015-05-22  Eric Botcazou  <ebotcazou@adacore.com>
1045         * einfo.ads (Has_Volatile_Full_Access): Rename into...
1046         (Is_Volatile_Full_Access): ...this.
1047         (Set_Has_Volatile_Full_Access): Rename into...
1048         (Set_Is_Volatile_Full_Access): ...this.
1049         * einfo.adb (Has_Volatile_Full_Access): Rename into...
1050         (Is_Volatile_Full_Access): ...this.
1051         (Set_Has_Volatile_Full_Access): Rename into...
1052         (Set_Is_Volatile_Full_Access): ...this.
1053         (Is_Atomic_Or_VFA): Adjust to above renaming.
1054         * errout.adb (Special_Msg_Delete): Likewise.
1055         * exp_pakd.adb (Install_PAT): Likewise.
1056         * freeze.adb (Freeze_Array_Type): Likewise.
1057         * sem_ch8.adb (Analyze_Object_Renaming): Likewise.
1058         * sem_ch13.adb (Inherit_Delayed_Rep_Aspects): Likewise.
1059         (Inherit_Aspects_At_Freeze_Point): Likewise.
1060         * sem_prag.adb (Set_Atomic_VFA): Likewise.
1061         (Process_Atomic_Independent_Shared_Volatile): Likewise.
1062         * sem_util.adb (Is_Atomic_Or_VFA_Object): Likewise.
1064 2015-05-22  Robert Dewar  <dewar@adacore.com>
1066         * exp_ch5.adb, layout.adb, einfo.adb, einfo.ads, sem_prag.adb,
1067         freeze.adb, freeze.ads, sem_util.adb, sem_util.ads, exp_ch2.adb,
1068         exp_ch4.adb, errout.adb, exp_aggr.adb, sem_ch13.adb: This is a general
1069         change that deals with the fact that most of the special coding for
1070         Atomic should also apply to the case of Volatile_Full_Access.
1071         A new attribute Is_Atomic_Or_VFA is introduced, and many of the
1072         references to Is_Atomic now use this new attribute.
1074 2015-05-22  Robert Dewar  <dewar@adacore.com>
1076         * exp_ch4.adb (Expand_N_Op_Eq): Introduce 'Machine for 'Result
1077         comparison.
1079 2015-05-22  Eric Botcazou  <ebotcazou@adacore.com>
1081         * sprint.adb (Source_Dump): When generating debug files, deal
1082         with the case of a stand-alone package instantiation by dumping
1083         together the spec and the body in the common debug file.
1085 2015-05-22  Robert Dewar  <dewar@adacore.com>
1087         * sem_ch13.adb (Minimum_Size): Size is zero for null range
1088         discrete subtype.
1090 2015-05-22  Hristian Kirtchev  <kirtchev@adacore.com>
1092         * einfo.adb (Anonymous_Master): This attribute now applies
1093         to package and subprogram bodies.
1094         (Set_Anonymous_Master): This attribute now applies to package and
1095         subprogram bodies.
1096         (Write_Field36_Name): Add output for package and subprogram bodies.
1097         * einfo.ads Update the documentation on attribute Anonymous_Master
1098         along with occurrences in entities.
1099         * exp_ch4.adb (Create_Anonymous_Master): Reimplemented to
1100         handle spec and body anonymous masters of the same unit.
1101         (Current_Anonymous_Master): Reimplemented. Handle a
1102         package instantiation that acts as a compilation unit.
1103         (Insert_And_Analyze): Reimplemented.
1105 2015-05-22  Ed Schonberg  <schonberg@adacore.com>
1107         * sem_ch10.adb (Analyze_With_Clause): A limited_with_clause on a
1108         predefined unit is treated as a regular with_clause.
1110 2015-05-22  Robert Dewar  <dewar@adacore.com>
1112         * sem_ch12.adb, prj.ads, makeutl.ads, sem_ch6.adb, prj-nmsc.adb,
1113         prj-conf.adb, sem_disp.adb: Minor reformatting.
1115 2015-05-22  Vincent Celier  <celier@adacore.com>
1117         * clean.adb (Parse_Cmd_Line): For native gnatclean, check
1118         for switch -P and, if found and gprclean is available, invoke
1119         silently gprclean.
1120         * make.adb (Initialize): For native gnatmake, check for switch -P
1121         and, if found and gprbuild is available, invoke silently gprbuild.
1123 2015-05-22  Eric Botcazou  <ebotcazou@adacore.com>
1125         * sem_ch13.adb (Validate_Unchecked_Conversions): Also issue
1126         specific warning for discrete types when the source is larger
1127         than the target.
1129 2015-05-22  Ed Schonberg  <schonberg@adacore.com>
1131         * einfo.ads, einfo.adb (Incomplete_Actuals): New attribute of
1132         package instantiations. Holds the list of actuals in the instance
1133         that are incomplete types, to determine where the corresponding
1134         instance body must be placed.
1135         * sem_ch6.adb (Conforming_Types): An incomplete type used as an
1136         actual in an instance matches an incomplete formal.
1137         * sem_disp.adb (Check_Dispatching_Call): Handle missing case of
1138         explicit dereference.
1139         (Inherited_Subprograms): In the presence of a limited view there
1140         are no subprograms to inherit.
1141         * sem_ch12.adb (Preanalyze_Actuals): Build list of incomplete
1142         actuals of instance, for later placement of instance body and
1143         freeze nodes for actuals.
1144         (Install_Body): In the presence of actuals that incomplete types
1145         from a limited view, the instance body cannot be placed after
1146         the declaration because full views have not been seen yet. Any
1147         use of the non-limited views in the instance body requires
1148         the presence of a regular with_clause in the enclosing unit,
1149         and will fail if this with_clause is missing.  We place the
1150         instance body at the beginning of the enclosing body, which is
1151         the unit being compiled, and ensure that freeze nodes for the
1152         full views of the incomplete types appear before the instance.
1154 2015-05-22  Pascal Obry  <obry@adacore.com>
1156         * makeutl.ads, prj-conf.adb, prj-nmsc.adb, prj.ads
1157         (In_Place_Option): Removed.
1158         (Relocate_Build_Tree_Option): New constant.
1159         (Root_Dir_Option): New constant.
1160         (Obj_Root_Dir): Removed.
1161         (Build_Tree_Dir): New variable.
1162         (Root_Src_Tree): Removed.
1163         (Root_Dir): New variable.
1164         * prj-conf.adb (Get_Or_Create_Configuration_File): Add check
1165         for improper relocation.
1166         * prj-nmsc.adb (Locate_Directory): Add check for improper
1167         relocation.
1169 2015-05-22  Hristian Kirtchev  <kirtchev@adacore.com>
1171         * einfo.adb (Default_Init_Cond_Procedure): Code cleanup. The
1172         attribute now applies to the base type.
1173         (Has_Default_Init_Cond): Now applies to the base type.
1174         (Has_Inherited_Default_Init_Cond): Now applies to the base type.
1175         (Set_Default_Init_Cond_Procedure): Code cleanup. The attribute now
1176         applies to the base type.
1177         (Set_Has_Default_Init_Cond): Now applies to the base type.
1178         (Set_Has_Inherited_Default_Init_Cond): Now applies to the base type.
1179         * exp_ch3.adb (Expand_N_Object_Declaration): No need to use the
1180         base type when adding a call to the Default_Initial_Condition.
1182 2015-05-22  Hristian Kirtchev  <kirtchev@adacore.com>
1184         * einfo.adb: Node36 is now used as Anonymous_Master. Flag253
1185         is now unused.
1186         (Anonymous_Master): New routine.
1187         (Has_Anonymous_Master): Removed.
1188         (Set_Anonymous_Master): New routine.
1189         (Set_Has_Anonymous_Master): Removed.
1190         (Write_Entity_Flags): Remove the output for Has_Anonymous_Maser.
1191         (Write_Field36_Name): Add output for Anonymous_Master.
1192         * einfo.ads Add new attribute Anonymous_Master along with
1193         occurrences in nodes. Remove attribute Has_Anonymous_Master along
1194         with occurrences in nodes.
1195         (Anonymous_Master): New routine along with pragma Inline.
1196         (Has_Anonymous_Master): Removed along with pragma Inline.
1197         (Set_Anonymous_Master): New routine along with pragma Inline.
1198         (Set_Has_Anonymous_Master): Removed along with pragma Inline.
1199         * exp_ch4.adb (Create_Anonymous_Master): New routine.
1200         (Current_Anonymous_Master): Reimplemented.
1202 2015-05-22  Bob Duff  <duff@adacore.com>
1204         * freeze.adb (Freeze_Profile): Suppress warning if imported
1205         subprogram is not at library level.
1207 2015-05-22  Robert Dewar  <dewar@adacore.com>
1209         * sem_ch8.adb (Analyze_Object_Renaming): Check for renaming
1210         component of an object to which Volatile_Full_Access applies.
1212 2015-05-22  Jerome Guitton  <guitton@adacore.com>
1214         * exp_dbug.ads: Add note about non bit-packed arrays.
1216 2015-05-22  Eric Botcazou  <ebotcazou@adacore.com>
1218         * sem_prag.adb: Fix typo.
1219         * einfo.ads: Grammar fixes in comments.
1221 2015-05-22  Bob Duff  <duff@adacore.com>
1223         * a-cborma.ads, a-cidlli.ads, a-cimutr.ads, a-ciormu.ads,
1224         * a-cihase.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
1225         * a-cborse.ads, a-comutr.ads, a-ciorma.ads, a-cobove.ads,
1226         * a-coormu.ads, a-convec.ads, a-cohase.ads, a-coinho.ads,
1227         * a-cbdlli.ads, a-cbmutr.ads, a-cbhase.ads, a-cdlili.ads,
1228         * a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
1229         * a-coinho-shared.ads (Constant_Reference_Type, Reference_Type):
1230         Add an initialization expression "raise Program_Error". See,
1231         for example, RM-A.18.2(148.4).
1233 2015-05-22  Robert Dewar  <dewar@adacore.com>
1235         * debug.adb: Update documentation.
1236         * einfo.ads, einfo.adb (Needs_Typedef): New flag
1237         * exp_unst.adb (Unnest_Subprogram): Mark AREC types as needing
1238         typedef's in C.
1239         * frontend.adb: Update comments.
1240         * gnat1drv.adb (Adjust_Global_Switches): Set all needed flags
1241         for -gnatd.V
1242         * opt.ads (Generate_C_Code): New switch.
1243         * osint-c.adb (Write_C_File_Info): Removed, not used
1244         (Write_H_File_Info): Removed, not used
1245         * osint-c.ads (Write_C_File_Info): Removed, not used
1246         (Write_H_File_Info): Removed, not used
1247         * osint.ads (Write_Info): Minor comment updates.
1248         (Output_FD): Moved from private part to public part of spec.
1249         * sem.adb (Semantics): Force expansion on if in Generate_C_Code
1250         mode.
1251         * atree.ads: minor typo in comment.
1252         * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
1253         Do not allow VFA on composite object with aliased component.
1255 2015-05-22  Arnaud Charlet  <charlet@adacore.com>
1257         * osint-c.adb, osint-c.ads (Set_File_Name): Move back to spec.
1259 2015-05-22  Pascal Obry  <obry@adacore.com>
1261         * prj-util.adb: Minor comment editing.
1263 2015-05-22  Pascal Obry  <obry@adacore.com>
1265         * makeutl.ads (In_Place_Option): New constant.
1266         * prj.ads (Obj_Root_Dir): New variable (absolute path to relocate
1267         objects).
1268         (Root_Src_Tree): New variable (absolute path of root source tree).
1269         * prj-conf.adb (Do_Autoconf): Take into account the object root
1270         directory (if defined) to generate configuration project.
1271         * prj-nmsc.adb (Get_Directories): Handle case where Obj_Root_Dir
1272         is defined.
1273         (Locate_Directory): Likewise.
1275 2015-05-22  Pascal Obry  <obry@adacore.com>
1277         * prj-util.ads, prj-util.adb (Relative_Path): New routine.
1279 2015-05-22  Bob Duff  <duff@adacore.com>
1281         * exp_utils.ads, exp_utils.adb (Find_Optional_Prim_Op): New
1282         interface to return Empty when not found, so we can avoid handling
1283         Program_Error in that case.
1284         (Find_Prim_Op): Fix latent bug: raise Program_Error when there are no
1285         primitives.
1286         * exp_ch7.adb, sem_util.adb: Use Find_Optional_Prim_Op when the
1287         code is expecting Empty.
1288         * sem_ch8.adb: Use Find_Optional_Prim_Op to avoid handling
1289         Program_Error.
1291 2015-05-22  Robert Dewar  <dewar@adacore.com>
1293         * sem_ch3.adb, sem_intr.adb, exp_ch4.adb, s-rannum.adb,
1294         sem_eval.adb, s-fatgen.adb, s-expmod.ads: Remove incorrect hyphen in
1295         non-binary.
1296         * exp_util.adb: Add comment.
1297         * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move from spec to
1298         body.
1299         (Set_File_Name): New name for the above.
1300         (Create_C_File, Create_H_File, Write_C_File_Info, Write_H_File_Info,
1301         Close_C_File, Close_H_File): New procedure.
1302         * osint.adb: Minor reformatting.
1303         * osint.ads: Minor comment updates.
1305 2015-05-22  Robert Dewar  <dewar@adacore.com>
1307         * exp_ch4.adb: Minor rewording.
1308         * exp_util.ads: Clarify that Find_Prim_Op is only for
1309         tagged types.
1311 2015-05-22  Robert Dewar  <dewar@adacore.com>
1313         * atree.adb, atree.ads, treepr.adb: Change name Needs_Actuals_Check to
1314         Check_Actuals.
1315         * exp_ch4.adb (Expand_N_Op_Expon): Optimize 2**x in modular
1316         and overflow cases.
1318 2015-05-22  Eric Botcazou  <ebotcazou@adacore.com>
1320         * exp_pakd.adb (Install_PAT): Propagate representation aspects
1321         from the original array type to the PAT.
1323 2015-05-22  Robert Dewar  <dewar@adacore.com>
1325         * treepr.adb (Print_Node_Header): Add output of Needs_Actuals_Check.
1327 2015-05-22  Robert Dewar  <dewar@adacore.com>
1329         * atree.adb, atree.ads (Needs_Actuals_Check): New flag.
1331 2015-05-22  Hristian Kirtchev  <kirtchev@adacore.com>
1333         * sem_prag.adb (Analyze_Pragma): Remove the detection
1334         of a useless Part_Of indicator when the related item is a constant.
1335         (Check_Matching_Constituent): Do not emit an error on a constant.
1336         (Check_Missing_Part_Of): Do not check for a missing Part_Of indicator
1337         when the related item is a constant.
1338         (Collect_Body_States): Code cleanup.
1339         (Collect_Visible_States): Code cleanup.
1340         (Report_Unused_States): Do not emit an error on a constant.
1341         * sem_util.ads, sem_util.adb (Has_Variable_Input): Removed.
1343 2015-05-22  Eric Botcazou  <ebotcazou@adacore.com>
1345         * sem_ch8.adb (Analyze_Object_Renaming): Copy
1346         Has_Volatile_Full_Access from renamed to renaming entities.
1347         * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
1348         Tidy up and remove redundant setting of Has_Volatile_Full_Access.
1350 2015-05-22  Hristian Kirtchev  <kirtchev@adacore.com>
1352         * ghost.adb (Check_Ghost_Completion): Update references to SPARK
1353         RM 6.9 rules.
1354         (Check_Ghost_Policy): Update references to SPARK RM 6.9 rules.
1355         * sem_ch3.adb (Analyze_Object_Declaration): Update references
1356         to SPARK RM 6.9 rules.
1357         (Check_Completion): Ghost entities do not require a special form of
1358         completion.
1359         * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Update references
1360         to SPARK RM 6.9 rules.
1361         (Analyze_Subprogram_Body_Helper): Update references to SPARK RM 6.9
1362         rules.
1363         * sem_ch7.adb (Analyze_Package_Body_Helper): Update references
1364         to SPARK RM 6.9 rules.
1365         (Requires_Completion_In_Body): Ghost entities do not require a special
1366         form of completion.
1368 2015-05-22  Robert Dewar  <dewar@adacore.com>
1370         * a-csquin.ads: Use Ada 2012 notation.
1371         * sem_ch8.adb: Minor reformatting.
1373 2015-05-22  Hristian Kirtchev  <kirtchev@adacore.com>
1375         * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect Import
1376         acts as a completion.
1378 2015-05-22  Ed Schonberg  <schonberg@adacore.com>
1380         * sem_ch13.adb: Minor reformatting.
1382 2015-05-22  Jose Ruiz  <ruiz@adacore.com>
1384         * a-reatim.adb: Minor change, fix typo.
1386 2015-05-22  Robert Dewar  <dewar@adacore.com>
1388         * sem_util.ads: Minor addition of ??? comment.
1389         * sem_prag.adb, sem_util.adb: Minor reformatting.
1390         * sem_ch13.adb: minor reformatting.
1392 2015-05-22  Robert Dewar  <dewar@adacore.com>
1394         * a-reatim.ads: Add Compile_Time_Error to ensure Duration
1395         is 64-bits.
1396         * sem_ch13.adb: Improve error message.
1397         * exp_ch4.adb: Minor reformatting.
1399 2015-05-22  Hristian Kirtchev  <kirtchev@adacore.com>
1401         * sem_prag.adb (Analyze_Pragma): Constants without variable
1402         input do not require indicator Part_Of.
1403         (Check_Missing_Part_Of): Constants without variable input do not
1404         requrie indicator Part_Of.
1405         (Collect_Visible_States): Constants without variable input are
1406         not part of the hidden state of a package.
1407         * sem_util.ads, sem_util.adb (Has_Variable_Input): New routine.
1409 2015-05-22  Robert Dewar  <dewar@adacore.com>
1411         * exp_util.adb (Activate_Atomic_Synchronization): Do not set
1412         Atomic_Sync_Required for an object renaming declaration.
1413         * sem_ch8.adb (Analyze_Object_Renaming): Copy Is_Atomic and
1414         Is_Independent to renaming object.
1416 2015-05-22  Ed Schonberg  <schonberg@adacore.com>
1418         * sem_ch5.adb (Analyze_Iterator_Specification): Diagnose
1419         various illegalities in iterators over arrays and containers:
1420         a) New function Get_Cursor_Type, to verify that the cursor is
1421         not a limited type at the point of iteration.
1422         b) If the container is a constant, an element_iterator is illegal
1423         if the container type does not have a Constant_Indexing aspect.
1424         c) If the iterate function has an in-out controlling parameter,
1425         the container cannot be a constant object.
1426         d) Reject additional cases of iterators over a
1427         discriminant-dependent component of a mutable object.
1429 2015-05-21  Hristian Kirtchev  <kirtchev@adacore.com>
1431         * einfo.adb (Contract): This attribute now applies to constants.
1432         (Set_Contract): This attribute now applies to constants.
1433         (Write_Field34_Name): Add output for constants.
1434         * einfo.ads Attribute Contract now applies to constants.
1435         * sem_ch3.adb (Analyze_Object_Contract): Constants now have
1436         their Part_Of indicator verified.
1437         * sem_prag.adb (Analyze_Constituent): A constant is now a valid
1438         constituent.
1439         (Analyze_Global_Item): A constant cannot act as an output.
1440         (Analyze_Initialization_Item): Constants are now a valid
1441         initialization item.
1442         (Analyze_Initializes_In_Decl_Part): Rename
1443         global variable States_And_Vars to States_And_Objs and update
1444         all its occurrences.
1445         (Analyze_Input_Item): Constants are now a
1446         valid initialization item. Remove SPARM RM references from error
1447         messages.
1448         (Analyze_Pragma): Indicator Part_Of can now apply to a constant.
1449         (Collect_Body_States): Collect both source constants
1450         and variables.
1451         (Collect_States_And_Objects): Collect both source constants and
1452         variables.
1453         (Collect_States_And_Variables): Rename
1454         to Collect_States_And_Objects and update all its occurrences.
1455         (Collect_Visible_States): Do not collect constants and variables
1456         used to map generic formals to actuals.
1457         (Find_Role): The role of a constant is that of an input. Separate the
1458         role of a variable from that of a constant.
1459         (Report_Unused_Constituents): Add specialized wording for constants.
1460         (Report_Unused_States): Add specialized wording for constants.
1461         * sem_util.adb (Add_Contract_Item): Add processing for constants.
1462         * sem_util.ads (Add_Contract_Item): Update the comment on usage.
1463         (Find_Placement_In_State_Space): Update the comment on usage.
1465 2015-05-21  Ed Schonberg  <schonberg@adacore.com>
1467         * sem_ch5.adb: minor reformatting.
1469 2015-05-21  Robert Dewar  <dewar@adacore.com>
1471         * freeze.adb (Freeze_Entity): Properly tag -gnatw.z messages.
1473 2015-05-21  Robert Dewar  <dewar@adacore.com>
1475         * freeze.adb: Minor reformatting.
1476         * cstand.adb (Print_Standard): Fix bad printing of Duration
1477         low bound.
1478         * a-reatim.adb (Time_Of): Complete rewrite to properly detect
1479         out of range args.
1481 2015-05-21  Ed Schonberg  <schonberg@adacore.com>
1483         * sem_ch5.adb: add (useless) initial value.
1484         * sem_ch3.adb (Replace_Anonymous_Access_To_Protected_Subprogram):
1485         Check whether the procedure has parameters before processing
1486         formals in ASIS mode.
1488 2015-05-21  Ed Schonberg  <schonberg@adacore.com>
1490         * sem_ch13.adb (Check_Iterator_Functions): Emit error on Iterator
1491         aspect as well when indexing function is illegal.
1492         (Valid_Default_Iterator): Handle properly somme illegal cases
1493         to prevent compilation abandoned messages.
1494         (Check_Primitive_Function): Verify that type and indexing function
1495         are in the same scope.
1496         * freeze.adb (Freeze_Record): Extend patch on the presence of
1497         indexing aspects to aspect Default_Iterator.
1499 2015-05-19  David Malcolm  <dmalcolm@redhat.com>
1501         * gcc-interface/trans.c (Sloc_to_locus1): Strenghthen local "map"
1502         from line_map * to line_map_ordinary *.
1504 2015-05-12  Jason Merrill  <jason@redhat.com>
1506         * sigtramp-vxworks.c: Add space between string literal and macro
1507         name.
1509 2015-05-12  Arnaud Charlet  <charlet@adacore.com>
1511         * gnat_rm.texi, gnat_ugn.texi, doc: Documentation updates and clean ups
1513 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
1515         * sem_ch5.adb (Analyze_Iterator_Specifications): Additional
1516         legality checks for array and container iterators:
1517         a) The domain of iteration cannot be a component that depends
1518         on discriminants of a mutable object. The check was recently
1519         added for element iterators.
1520         b) The cursor type cannot be a limited type at the point of the
1521         iteration, because the cursor will be assigned to in the body
1522         of the loop.
1524 2015-05-12  Robert Dewar  <dewar@adacore.com>
1526         * freeze.adb (Freeze_Record_Type): Make sure that if we have
1527         aspect Iterator_Element, then we have either Constant_Indexing
1528         or Variable_Indexing.
1530 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
1532         * a-coormu.ads, a-coormu.adb: Add Indexing aspect, Reference_Type,
1533         and Reference_Control_Type to support element iterators over
1534         ordered multisets.
1535         * a-ciormu.ads, a-ciormu.adb: Ditto for
1536         indefinite_ordered_multisets.
1538 2015-05-12  Hristian Kirtchev  <kirtchev@adacore.com>
1540         * exp_ch4.adb (Expand_N_Expression_With_Actions): Force
1541         the evaluation of the EWA expression.  Code cleanup.
1542         (Process_Transient_Object): Code cleanup.
1543         * exp_util.adb (Is_Aliased): Controlled transient objects found
1544         within EWA nodes are not aliased.
1545         (Is_Finalizable_Transient): Iterators are not finalizable transients.
1547 2015-05-12  Robert Dewar  <dewar@adacore.com>
1549         * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
1550         Don't allow Atomic and Volatile_Full_Access for the same entity.
1552 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
1554         * sem_ch5.adb (Analyze_Iterator_Specification): Implement new
1555         semantics and safety checks specified in AI12-0151.
1557 2015-05-12  Pierre-Marie de Rodat  <derodat@adacore.com>
1559         * sem_ch10.adb (Sem_Ch10.Analyze_Proper_Body): Generate SCOs
1560         for subunit in generic units.
1562 2015-05-12  Robert Dewar  <dewar@adacore.com>
1564         * sem_elab.adb (Check_A_Call): Avoid checking internal call
1565         from Valid_Scalars
1567 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
1569         * sem_ch6.adb (Process_Formals): An untagged incomplete type
1570         is legal in the profile of a null procedure.
1572 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
1574         * sem_ch12.adb (Validate_Derived_Type_Instance): Handle properly
1575         the checks on a derived formal whose parent type is a previous
1576         formal that is not a derived type.
1578 2015-05-12  Robert Dewar  <dewar@adacore.com>
1580         * aspects.ads, aspects.adb: Add entries for aspect Volatile_Full_Access
1581         * einfo.adb (Has_Volatile_Full_Access): New flag.
1582         (Has_Volatile_Full_Access): New flag.
1583         * einfo.ads (Has_Volatile_Full_Access): New flag.
1584         * par-prag.adb: Add dummy entry for Volatile_Full_Access.
1585         * sem_prag.adb (Analyze_Pragma, case Volatile_Full_Access):
1586         Implement new pragma.
1587         * snames.ads-tmpl: Add entries for pragma Volatile_Full_Access.
1589 2015-05-12  Robert Dewar  <dewar@adacore.com>
1591         * targparm.ads: Minor reformatting.
1593 2015-05-12  Robert Dewar  <dewar@adacore.com>
1595         * a-reatim.adb (Time_Of): Properly detect overflow when TS = 0.0.
1596         * a-reatim.ads: Minor reformatting.
1598 2015-05-12  Hristian Kirtchev  <kirtchev@adacore.com>
1600         * einfo.ads: Update the documentation of flags
1601         Has_Inherited_Default_Init_Cond and Has_Default_Init_Cond.
1603 2015-05-12  Robert Dewar  <dewar@adacore.com>
1605         * impunit.adb: Add entry for a-dhfina.ads
1606         * a-dhfina.ads: New file.
1608 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
1610         * exp_ch5.adb (Expand_Iterator_Loop_Over_Array): if the array
1611         type has convention Fortran, a multidimensional iterator varies
1612         the first dimension fastest.
1614 2015-05-12  Hristian Kirtchev  <kirtchev@adacore.com>
1616         * einfo.adb: Node32 is now used as Encapsulating_State.
1617         Node37 is now used as Associated_Entity.
1618         (Associated_Entity): New routine.
1619         (Encapsulating_State): Update the assertion guard to include constants.
1620         (Set_Associated_Entity): New routine.
1621         (Set_Encapsulating_State): Update the assertion guard to
1622         include constants.
1623         (Write_Field10_Name): Remove the output for Encapsulating_State.
1624         (Write_Field32_Name): Add output for Encapsulating_State.
1625         (Write_Field37_Name): Add output for Associated_Entity.
1626         * einfo.ads New attribute Associated_Entity along with placement
1627         in entities. Attribute Encapsulating_State now uses Node32.
1628         (Associated_Entity): New routine along with pragma Inline.
1629         (Set_Associated_Entity): New routine along with pragma Inline.
1630         * inline.ads Code reformatting.
1631         * sem_attr.adb (Analyze_Attribute): Correct the prefix of
1632         attribute 'Result when the context is a generic instantiation.
1633         (Analyze_Attribute_Old_Result): Pragmas Depends and
1634         Refined_Depends are a valid context for attribute 'Result.
1635         (Denote_Same_Function): Allow attribute 'Result to denote
1636         generic functions.
1637         * sem_ch3.adb Add with and use clauses for Sem_Ch12.
1638         (Analyze_Declarations): Capture global references within the
1639         contracts of packages, subprograms and their respective bodies.
1640         * sem_ch6.adb (Analyze_Aspects_On_Body_Or_Stub): Removed.
1641         (Analyze_Completion_Contract): Removed.
1642         (Analyze_Generic_Subprogram_Body): Enchange the aspects after
1643         creating the generic copy. Create a generic contract for the
1644         template. Analyze the aspects of the generic body. Analyze the
1645         contract of the generic body when it is a compilation unit and
1646         capture global references.
1647         (Analyze_Subprogram_Body_Contract): Code cleanup.
1648         (Analyze_Subprogram_Contract): Do not save global references here.
1649         (Save_Global_References_In_List): Removed.
1650         * sem_ch7.adb (Analyze_Package_Body_Contract): Code cleanup.
1651         (Analyze_Package_Body_Helper): Create a generic contract for
1652         the template.
1653         (Analyze_Package_Contract): Code cleanup.
1654         * sem_ch10.adb Add with and use clauses for Sem_Ch12.
1655         (Analyze_Compilation_Unit): Capture global references in a
1656         generic subprogram declaration that acts as a compilation unit.
1657         * sem_ch12.adb Add with and use clauses for Sem_Prag. Illustrate
1658         the implementation of generic contracts. Alphabetize various
1659         subprograms.
1660         (Analyze_Generic_Package_Declaration):
1661         Create a generic contract for the template.
1662         (Analyze_Generic_Subprogram_Declaration): Create a generic
1663         contract for the template.
1664         (Analyze_Subprogram_Instantiation): Instantiate the contract of the
1665         subprogram.
1666         (Copy_Generic_Node): Link defining entities of the generic template
1667         with the corresponding defining entities of the generic copy. Update
1668         the processing of pragmas.
1669         (Instantiate_Contract): Removed.
1670         (Instantiate_Subprogram_Contract): New routine.
1671         (Requires_Delayed_Save): New routine.
1672         (Save_Global_References): Rename formal parameter N to Templ. Various
1673         cleanups.
1674         (Save_Global_References_In_Aspects): Moved from the spec.
1675         (Save_Global_References_In_Contract): New routine.
1676         (Save_References_In_Aggregate): New routine.
1677         (Save_References_In_Char_Lit_Or_Op_Symbol): New routine.
1678         (Save_References_In_Descendants): New routine.
1679         (Save_References_In_Identifier): New routine.
1680         (Save_References_In_Operator): New routine.
1681         (Save_References_In_Pragma): New routine.
1682         * sem_ch12.ads (Save_Global_References): Rename formal
1683         parameter N to Templ. Update the comment on usage.
1684         (Save_Global_References_In_Aspects): Moved to the body.
1685         (Save_Global_References_In_Contract): New routine.
1686         * sem_ch13.adb (Analyze_Aspect_Specifications_On_Body_Or_Stub):
1687         New routine.
1688         * sem_ch13.ads (Analyze_Aspect_Specifications_On_Body_Or_Stub):
1689         New routine.
1690         * sem_prag.adb (Add_Item_To_Name_Buffer): Add support for
1691         generic parameters.
1692         (Analyze_Contract_Cases_In_Decl_Part): Code cleanup.
1693         (Analyze_Depends_Global): New routine.
1694         (Analyze_Depends_In_Decl_Part): Code cleanup.
1695         (Analyze_Global_In_Decl_Part): Code cleanup.
1696         (Analyze_Global_Item): Constants are now valid global items. Do
1697         not perform state-related checks in an instance. Change the way
1698         renamings are handled.  (Analyze_Initial_Condition_In_Decl_Part):
1699         Code cleanup.
1700         (Analyze_Initializes_In_Decl_Part): Code cleanup.
1701         (Analyze_Input_Output): The analysis of attribute 'Result in
1702         the context of pragmas Depends or Refined_Depends now reuses
1703         the existing attribute analysis machinery. Constants and
1704         generic parameters are now valid dependency items. Do not
1705         perform state-related checks in an instance. Change the way
1706         renamings are handled.  (Analyze_Pragma): Add a "characteristics"
1707         section for pragmas Abstract_State, Contract_Cases, Depends,
1708         Extensions_Visible, Global, Initial_Condition, Initializes,
1709         Post, Post_Class, Postcondition, Pre, Pre_Class, Precondition,
1710         Refined_Depends, Refined_Global, Refined_Post, Refined_State, Test_Case.
1711         (Analyze_Pre_Post_Condition): Do not create a generic
1712         template here.
1713         (Analyze_Pre_Post_Condition_In_Decl_Part): Code cleanup.
1714         (Analyze_Refined_Depends_Global_Post): New routine.
1715         (Analyze_Refined_Depends_In_Decl_Part): Code cleanup.
1716         (Analyze_Refined_Global_In_Decl_Part): Code cleanup.
1717         (Analyze_Refined_Pragma): Removed.
1718         (Analyze_Refined_State_In_Decl_Part): Code cleanup.
1719         (Analyze_Test_Case_In_Decl_Part): Code cleanup.
1720         (Check_Dependency_Clause): Do not perform this check in an instance.
1721         (Check_Function_Return): Add support for generic functions.
1722         (Check_In_Out_States): Do not perform this check in an instance.
1723         (Check_Input_States): Do not perform this check in an instance.
1724         (Check_Mode_Restriction_In_Function): Add support for generic functions.
1725         (Check_Output_States): Do not perform this check in an instance.
1726         (Check_Postcondition_Use_In_Inlined_Subprogram): Rename
1727         parameter Subp_Id to Spec_Id and update comment on usage.
1728         (Check_Proof_In_States): Do not perform this check in an instance.
1729         (Check_Refined_Global_Item): Add support for constants.
1730         (Check_Refined_Global_List): Do not perform this check in an instance.
1731         (Collect_Global_Items): Reimplemented.
1732         (Collect_Subprogram_Inputs_Outputs): Add support for generic parameters.
1733         (Create_Generic_Template): Removed.
1734         (Find_Related_Package_Or_Body): Moved to spec.
1735         (Find_Role): Add support for generic parameters and constants.
1736         (Get_Argument): Moved to spec. Rename parameter Spec_Id to Context_Id.
1737         (Match_Item): Add support for constants.
1738         (Preanalyze_Test_Case_Arg): Reimplemented.
1739         (Report_Extra_Clauses): Do not perform this check in an instance.
1740         (Report_Extra_Constituents): Do not perform this check in an instance.
1741         * sem_prag.ads (Collect_Subprogram_Inputs_Outputs): Update
1742         the comment on usage.
1743         (Find_Related_Package_Or_Body): Moved from body.
1744         (Get_Argument): Moved from body.
1745         * sem_util.adb Add with and use clauses for Sem_Ch12.
1746         (Corresponding_Spec_Of): Add support for packages and package bodies.
1747         (Create_Generic_Contract): New routine.
1748         (Is_Contract_Annotation): Reimplemented.
1749         (Is_Generic_Declaration_Or_Body): New routine.
1750         (Is_Package_Contract_Annotation): New routine.
1751         (Is_Subprogram_Contract_Annotation): New routine.
1752         * sem_util.ads (Corresponding_Spec_Of): Update the comment on usage.
1753         (Create_Generic_Contract): New routine.
1754         (Is_Generic_Declaration_Or_Body): New routine.
1755         (Is_Package_Contract_Annotation): New routine.
1756         (Is_Subprogram_Contract_Annotation): New routine.
1757         * sinfo.adb (Is_Generic_Contract_Pragma): New routine.
1758         (Set_Is_Generic_Contract_Pragma): New routine.
1759         * sinfo.ads Add new attribute Is_Generic_Contract_Pragma along
1760         with occurrences in nodes.
1761         (Is_Generic_Contract_Pragma): New routine along with pragma Inline.
1762         (Set_Is_Generic_Contract_Pragma): New routine along with pragma Inline.
1763         * treepr.adb (Print_Entity_Info): Output fields 36 to 41.
1765 2015-05-12  Robert Dewar  <dewar@adacore.com>
1767         * a-taster.ads: Minor comment fix: fix bad header, this is a
1768         pure RM unit.
1770 2015-05-12  Robert Dewar  <dewar@adacore.com>
1772         * sem_intr.adb: (Check_Shift): Diagnose bad modulus value.
1774 2015-05-12  Robert Dewar  <dewar@adacore.com>
1776         * gnat1drv.adb (Adjust_Global_Switches): Default to suppressing
1777         Alignment_Checks on non-strict alignment machine.
1778         * sem_ch13.adb (Validate_Address_Clauses): Don't give
1779         compile-time alignment warnings if run time Alignment_Check
1780         is suppressed.
1782 2015-05-12  Thomas Quinot  <quinot@adacore.com>
1784         * g-sercom.ads, g-sercom-linux.adb (GNAT.Serial_Communications.
1785         Data_Rate): New literals B75, B110, B150, B300, B600.
1787 2015-05-12  Doug Rupp  <rupp@adacore.com>
1789         * init.c (__gnat_init_float) [vxworks]: For e500v2,
1790         do nothing and leave the responsibility to install the handler
1791         and enable the exceptions to the BSP.
1793 2015-05-12  Robert Dewar  <dewar@adacore.com>
1795         * sem_ch9.adb, einfo.ads, exp_intr.adb: Minor reformatting.
1796         * sem_disp.adb: Minor code reorganization (remove junk redundant
1797         null statement).
1798         * exp_unst.adb (Unnest_Subprogram.Uplev_Refs): Ignore uplevel
1799         references to bounds of types coming from original type reference.
1800         * checks.ads: Minor reformatting.
1801         * checks.adb: Minor reformatting.
1802         * sem_prag.adb (Analyze_Pragma, case Check): If in ignored
1803         assertion, then make sure we do not drag in bignum stuff.
1805 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
1807         * sem_ch9.adb (Collect_Interfaces): Initialize
1808         Direct_Primitive_Operations for a tagged synchronized type,
1809         so it can used in ASIS mode.
1810         * sem_disp.adb (Check_Dispatching_Operation): If expansion is
1811         disabled, attach subprogram to list of Direct_Primitive_Operations
1812         of synchronized type itself, for ASIS use, because in this case
1813         Corresponding_Record_Type is not built.
1814         * einfo.ads: Indicate use of Direct_Primitive_Operations on
1815         synchronized type.
1817 2015-05-12  Pierre-Marie de Rodat  <derodat@adacore.com>
1819         * exp_pakd.adb: Make clearer the comment in exp_pakd.adb about
1820         ___XP suffixes.
1822 2015-05-12  Robert Dewar  <dewar@adacore.com>
1824         * sem_ch3.adb, sem_util.adb, sem_ch6.adb: Minor reformatting.
1826 2015-05-12  Robert Dewar  <dewar@adacore.com>
1828         * exp_unst.adb (Visit_Node): Deal with subprogram and package stubs.
1830 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
1832         * exp_intr.adb (Expand_Dispatching_Constructor_Call): The
1833         tag to be retrieved for the generated call is the first entry
1834         in the dispatch table for the return type of the instantiated
1835         constructor.
1837 2015-05-12  Bob Duff  <duff@adacore.com>
1839         * exp_ch7.adb, exp_ch7.ads, exp_intr.adb, exp_util.adb,
1840         exp_util.ads: Update comments.
1842 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
1844         * sem_ch3.adb (Add_Internal_Interface_Entities): Do no generate
1845         freeze nodes for these in ASIS mode, because they lead to
1846         elaoration order issues in gigi.
1848 2015-05-12  Hristian Kirtchev  <kirtchev@adacore.com>
1850         * sem_ch6.adb (Analyze_Expression_Function): Code
1851         cleanup. Use Copy_Subprogram_Spec to create a proper spec.
1852         (Analyze_Subprogram_Body_Helper): Code cleanup. Do not
1853         prepare a stand alone body for inlining in GNATprove mode
1854         when inside a generic.  (Body_Has_Contract): Reimplemented.
1855         (Build_Subprogram_Declaration): New routine.
1856         * sem_ch10.adb (Analyze_Compilation_Unit): Capture global
1857         references within generic bodies by loading them.
1858         * sem_util.adb (Copy_Parameter_List): Code cleanup.
1859         (Copy_Subprogram_Spec): New routine.
1860         (Is_Contract_Annotation): New routine.
1861         * sem_util.ads (Copy_Subprogram_Spec): New routine.
1862         (Is_Contract_Annotation): New routine.
1864 2015-05-12  Hristian Kirtchev  <kirtchev@adacore.com>
1866         * sem_attr.adb (Resolve_Attribute): Do not analyze the generated
1867         body of an expression function when the prefix of attribute
1868         'Access is the body.
1870 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
1872         * sem_ch3.adb (Build_Derived_Enumeration_Type): The anonymous base
1873         created for a derived enumeration type is not a first subtype,
1874         even though it is defined through a full type declaration.
1875         * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): Do not process
1876         aspects for the anonymous base type constructed for a derived
1877         scalar type, because they will be set when the first subtype
1878         is frozen.
1879         (Inherit_Aspects_At_Freeze_Point): Fix typos on handling of
1880         Default_Value and Default_Component_Value, that prevented the
1881         proper inheritance of these aspects.
1883 2015-05-12  Gary Dismukes  <dismukes@adacore.com>
1885         * exp_ch6.adb, exp_unst.adb: Minor typo fixes.
1887 2015-05-12  Robert Dewar  <dewar@adacore.com>
1889         * sem_ch3.adb: Minor reformatting.
1891 2015-05-12  Vincent Celier  <celier@adacore.com>
1893         * gnatcmd.adb: If we want to invoke gnatmake (gnatclean) with
1894         -P, then check if gprbuild (gprclean) is available; if it is,
1895         use gprbuild (gprclean) instead of gnatmake (gnatclean).
1897 2015-05-12  Robert Dewar  <dewar@adacore.com>
1899         * debug.adb: Add flag -gnatd.3 to output diagnostic info from
1900         Exp_Unst.
1901         * einfo.ad, einfo.adb: Reorganize (and remove most of) flags used by
1902         Exp_Unst.
1903         * exp_ch6.adb (Unest_Bodies): Table for delayed calls to
1904         Unnest_Subprogram (Expand_N_Subprogram_Body): Add entry to table
1905         for later call instead of calling Unnest_Subprogram directly
1906         (Initialize): New procedure (Unnest_Subprograms): New procedure
1907         * exp_ch6.ads (Add_Extra_Actual_To_Call): Move into proper
1908         alpha order.
1909         (Initialize): New procedure.
1910         (Unnest_Subprograms): New procedure.
1911         * exp_unst.adb (Unnest_Subprogram): Major rewrite, moving
1912         all processing to this routine which is now called late
1913         after instantiating bodies. Fully handles the case of generic
1914         instantiations now.
1915         * exp_unst.ads: Major rewrite, moving all processing to
1916         Unnest_Subprogram.
1917         * frontend.adb (Frontend): Add call to Exp_Ch6.Initialize.
1918         (Frontend): Add call to Unnest_Subprograms.
1919         * sem_ch8.adb (Find_Direct_Name): Back to old calling sequence
1920         for Check_Nested_Access.
1921         * sem_util.adb (Build_Default_Subtype): Minor reformatting
1922         (Check_Nested_Access): Back to original VM-only form (we
1923         now do all the processing for Unnest_Subprogram at the time
1924         it is called.
1925         (Denotes_Same_Object): Minor reformatting
1926         (Note_Possible_Modification): Old calling sequence for
1927         Check_Nested_Access.
1928         * sem_util.ads (Check_Nested_Access): Back to original VM-only
1929         form (we now do all the processing for Unnest_Subprogram at the
1930         time it is called.
1932 2015-05-12  Robert Dewar  <dewar@adacore.com>
1934         * sem_ch3.adb, freeze.adb, sem_ch6.adb: Minor reformatting.
1936 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
1938         * sem_ch3.adb (Analyze_Object_Declaration): New function
1939         Has_Delayed_Aspect, used to defer resolution of an aggregate
1940         expression when the object declaration carries aspects Address
1941         and/or Alignment.
1942         * freeze.adb (Freeze_Object_Declaration): New subsidiary procedure
1943         to Freeze_Entity.  In addition to the previous processing steps
1944         at the freeze point of an object, this procedure also handles
1945         aggregates in object declarations, when the declaration carries
1946         delayed aspects that require that the initialization of the
1947         object be attached to its freeze actions.
1949 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
1951         * sem_ch6.adb (Analyze_Subprogram_Declaration): Following
1952         AI12-0147, null procedures and expression functions are allowed
1953         in protected bodies.
1955 2015-05-12  Tristan Gingold  <gingold@adacore.com>
1957         * i-cpoint.adb (Copy_Terminated_Array): Copy nothing if Length is 0.
1959 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
1961         * sem_ch3.adb (Complete_Private_Subtype): Propagate
1962         Has_Delayed_Aspects flag from private to full view, to ensure
1963         that predicate functions are constructed.
1965 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
1967         * sem_ch6.adb (Process_Formals): If a tagged formal is an
1968         incomplete class-wide type, the subprogram must have a delayed
1969         freeze even though the opertation is not a primitive of the
1970         type. THis ensures that the backend can recover the full view
1971         when elaborating the subprogram declaration.
1973 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
1975         * exp_util.adb (Get_Current_Value_Condition): Nothing to be
1976         done if an elsif part has been rewritten so that it is not part
1977         of an enclosing if_statement.
1979 2015-05-12  Robert Dewar  <dewar@adacore.com>
1981         * sem_type.adb, sem_ch10.adb, freeze.adb, sem_ch6.adb, exp_disp.adb:
1982         Minor reformatting.
1984 2015-05-12  Bob Duff  <duff@adacore.com>
1986         * exp_attr.adb (Size): Remove unnecessary check for types with
1987         unknown discriminants.  That was causing the compiler to build
1988         a function call _size(T), where T is a type, not an object.
1990 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
1992         * sem_ch4.adb (Extended_Primitive_Ops): Exclude overriding
1993         primitive operations of a type extension declared in the package
1994         body, to prevent duplicates in extended list.
1996 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
1998         * sem_ch3.adb (Analyze_Component_Declaration): If the component is
1999         an unconstrained synchronized type with discriminants, create a
2000         constrained default subtype for it, so that the enclosing record
2001         can be given the proper size.
2002         * sem_util.adb (Build_Default_Subtype): If the subtype is created
2003         for a record discriminant, do not analyze the declarztion at
2004         once because it is added to the freezing actions of the enclosing
2005         record type.
2007 2015-05-12  Robert Dewar  <dewar@adacore.com>
2009         * exp_prag.adb (Expand_N_Pragma): Rewrite ignored pragma as
2010         Null statements.
2011         * namet.ads (Boolean3): Document this flag used for Ignore_Pragma.
2012         * par-prag.adb (Prag): Implement Ignore_Pragma.
2013         * sem_prag.adb: Implement Ignore_Pragma.
2014         * snames.ads-tmpl: Add entries for pragma Ignore_Pragma.
2016 2015-05-12  Javier Miranda  <miranda@adacore.com>
2018         * sem_ch10.adb (Build_Shadow_Entity): Link the class-wide shadow
2019         entity with its corresponding real entity.
2020         (Decorate_Type): Unconditionally build the class-wide shadow entity of
2021         tagged types.
2022         * einfo.ads, einfo.adb (Has_Non_Limited_View): New synthesized
2023         attribute.
2024         (Non_Limited_View): Moved from field 17 to field 19 be available
2025         in class-wide entities.
2026         * exp_attr.adb (Access_Cases): Code cleanup.
2027         * exp_disp.adb (Expand_Interface_Actuals): Ditto.
2028         * exp_util.adb (Non_Limited_Designated_Type): Ditto.
2029         * freeze.adb (Build_Renamed_Bdody): Ditto.
2030         * sem_aux.adb (Available_View): Ditto.
2031         * sem_ch4.adb (Analyze_Selected_Component): Ditto.
2032         (Try_One_Prefix_Interpretation): Ditto.
2033         * sem_ch5.adb (Analyze_Assignment): Ditto.
2034         * sem_ch6.adb (Detect_And_Exchange): Ditto.
2035         * sem_ch8.adb (Find_Expanded_Name): Ditto.
2036         * sem_disp.adb (Check_Controlling_Type): Ditto.
2037         * sem_res.adb (Resolve_Type_Conversion): Ditto.
2038         (Full_Designated_Type): Ditto.
2039         * sem_type.adb (Covers): Ditto.
2040         * sem_util.adb: Fix typo in comment.
2042 2015-05-12  Robert Dewar  <dewar@adacore.com>
2044         * exp_unst.adb (Get_Real_Subp): New subprogram.
2045         (Unnest_Subprogram): Use Get_Real_Subp.
2046         (Uplev_Refs_For_One_Subp): Skip if no ARECnU entity.
2047         (Uplev_Refs_For_One_Subp): Use actual subtype in unconstrained case.
2049 2015-05-12  Robert Dewar  <dewar@adacore.com>
2051         * a-reatim.adb ("/"): Add explicit check for Time_Span_First / -1.
2053 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
2055         * sem_ch4.adb (Extended_Primitive_Ops): New subprogram,
2056         auxiliary to Try_Primitive_Operation to handle properly prefixed
2057         calls where the operation is not a primitive of the type, but
2058         is declared in the package body that is in the immediate scope
2059         of the type.
2061 2015-05-12  Robert Dewar  <dewar@adacore.com>
2063         * sem_util.adb (Is_Variable): Allow X'Deref(Y) as a variable.
2065 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
2067         * sem_ch8.adb (Find_Expanded_Name): Handle properly a fully
2068         qualified name for an instance of a generic grand-child unit in
2069         the body its parent.
2071 2015-05-12  Robert Dewar  <dewar@adacore.com>
2073         * exp_unst.adb (Upref_Name): New subprogram.
2074         (Unnest_Subprogram): Use Upref_Name.
2075         (Unnest_Subprogram): Use new Deref attribute.
2076         * exp_unst.ads: Doc updates.
2078 2015-05-12  Thomas Quinot  <quinot@adacore.com>
2080         * adaint.c: Enable Large File Support in adaint so that __gnat_readdir
2081         can access files on filesystems mounted from servers that use large
2082         NFS file handles.
2084 2015-05-09  Eric Botcazou  <ebotcazou@adacore.com>
2086         * gcc-interface/utils.c (gnat_write_global_declarations): Use type_decl
2087         method instead of global_decl for TYPE_DECLs.
2089 2015-04-27  Jim Wilson  <jim.wilson@linaro.org>
2091         * gcc-interface/Makefile-lan.in (ada.mostlyclean): Remove gnatbind
2092         and gnat1.
2094 2015-04-13  Eric Botcazou  <ebotcazou@adacore.com>
2096         * gnatvsn.ads (Library_Version): Bump to 6.
2098 2015-04-09  Iain Sandoe  <iain@codesourcery.com>
2100         * gcc-interface/Makefile.in (darwin, powerpc): Enable atomics.
2102 2015-04-08  Eric Botcazou  <ebotcazou@adacore.com>
2104         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Do not make
2105         a function returning an unconstrained type 'const' for the middle-end.
2107         * gcc-interface/trans.c (Pragma_to_gnu) <case Pragma_Warning>: Use
2108         exact condition to detect Reason => "..." pattern.
2110 2015-03-31  Tom de Vries  <tom@codesourcery.com>
2112         PR ada/65490
2113         * terminals.c (child_setup_tty): Fix warning 'argument to sizeof in
2114         bzero call is the same expression as the destination'.
2116 2015-03-26  Eric Botcazou  <ebotcazou@adacore.com>
2118         * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Deref>: New case.
2120 2015-03-24  Gary Dismukes  <dismukes@adacore.com>
2122         * sem_ch3.adb: Minor typo fix (missing paren).
2124 2015-03-24  Robert Dewar  <dewar@adacore.com>
2126         * sinfo.ads: Update comment.
2128 2015-03-24  Robert Dewar  <dewar@adacore.com>
2130         * exp_attr.adb: Add entry for typ'Deref.
2131         * sem_attr.adb (Deref): New GNAT attribute.
2132         * sem_attr.ads: Add entry for new GNAT attribute Deref.
2133         * snames.ads-tmpl: Add entries for new attribute Deref.
2135 2015-03-24  Ed Schonberg  <schonberg@adacore.com>
2137         * sem_ch13.adb (Rep_Item_Too_Early): allow pragma Convention
2138         on generic type.
2140 2015-03-24  Gary Dismukes  <dismukes@adacore.com>
2142         * inline.adb: Minor typo fix.
2144 2015-03-24  Arnaud Charlet  <charlet@adacore.com>
2146         * doc/gnat_ugn/building_executable_programs_with_gnat.rst,
2147         doc/gnat_ugn/gnat_utility_programs.rst
2148         doc/gnat_rm/implementation_defined_attributes.rst
2149         doc/gnat_rm/implementation_defined_pragmas.rst
2150         doc/gnat_rm/representation_clauses_and_pragmas.rst
2151         doc/gnat_rm/about_this_guide.rst
2152         doc/gnat_rm/implementation_of_ada_2012_features.rst: Doc improvements.
2153         * gnat_rm.texi, gnat_ugn.texi: Regenerate.
2155 2015-03-23  Jakub Jelinek  <jakub@redhat.com>
2157         PR bootstrap/65522
2158         * adadecode.c (ada_demangle): Guard with IN_RTS instead of IN_GCC.
2160 2015-03-20  Eric Botcazou  <ebotcazou@adacore.com>
2162         PR ada/65451
2163         * gcc-interface/utils.c (gnat_pushdecl): Tidy up and improve comment.
2164         Make sure to chain only main variants through TYPE_NEXT_PTR_TO.
2166         * gcc-interface/trans.c (Attribute_to_gnu): Revert latest change.
2168 2015-03-16  Eric Botcazou  <ebotcazou@adacore.com>
2170         * gcc-interface/utils2.c (gnat_invariant_expr): Return null if the type
2171         of the expression ends up being composite.
2173 2015-03-16  Eric Botcazou  <ebotcazou@adacore.com>
2175         * gcc-interface/decl.c (is_from_limited_with_of_main): New predicate.
2176         (gnat_to_gnu_entity) <E_Subprogram_Type>: Invoke it on return and
2177         parameter types to detect circularities in ASIS mode.
2178         * gcc-interface/trans.c (Attribute_to_gnu): Mention AI05-0151.
2180 2015-03-16  Eric Botcazou  <ebotcazou@adacore.com>
2182         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Abstract_State>: Do not
2183         short-circuit the regular handling.
2185 2015-03-13  Robert Dewar  <dewar@adacore.com>
2187         * exp_unst.adb (Note_Uplevel_Reference): Eliminate duplicate
2188         references.
2189         (Actual_Ref): New function.
2190         (AREC_String): Minor reformatting.
2191         (Unnest_Subprogram): Use Actual_Ref.
2192         * frontend.adb (Frontend): Turn off Unnest_Subprogram_Mode
2193         before call to Instantiate_Bodies.
2195 2015-03-13  Ed Schonberg  <schonberg@adacore.com>
2197         * freeze.adb (Freeze_Profile): If the return type of a function
2198         being frozen is an untagged limited view and the function is
2199         abstract, mark the type as frozen because there is no later
2200         point at which the profile of the subprogram will be elaborated.
2202 2015-03-13  Robert Dewar  <dewar@adacore.com>
2204         * einfo.adb, einfo.ads, atree.adb, atree.ads, atree.h: Add seventh
2205         component to entities. Add new fields Field36-41 and Node36-41.
2207 2015-03-13  Claire Dross  <dross@adacore.com>
2209         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Rewrite after review.
2211 2015-03-13  Robert Dewar  <dewar@adacore.com>
2213         * exp_util.adb (Is_Volatile_Reference): Compile time known
2214         value is never considered to be a volatile reference.
2216 2015-03-13  Robert Dewar  <dewar@adacore.com>
2218         * sem_ch3.adb (Analyze_Object_Contract): Suppress "constant
2219         cannot be volatile" for internally generated object (such as
2220         FIRST and LAST constants).
2222 2015-03-13  Ed Schonberg  <schonberg@adacore.com>
2224         * sem_ch12.adb (Validate_Access_Subprogram_Instance): If a
2225         convention is specified for the formal parameter, verify that
2226         the actual has the same convention.
2227         * sem_prag.adb (Set_Convention_From_Pragma): Allow convention
2228         pragma to be set on a generic formal type.
2229         * sem_util.adb (Set_Convention): Ignore within an instance,
2230         as it has already been verified in the generic unit.
2232 2015-03-13  Claire Dross  <dross@adacore.com>
2234         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do not inline
2235         subprograms with unconstrained record parameters containing
2236         Itype declarations.
2237         * sinfo.ads Document GNATprove assumption that type should match
2238         in the AST.
2239         * sem_ch6.adb (Analyze_Subprogram_Body_Contract):
2240         Do not check for Refined_Depends and Refined_Globals contracts
2241         as they are optional.
2243 2015-03-13  Ed Schonberg  <schonberg@adacore.com>
2245         * sem_ch12.adb (Instantiate_Type): For a floating-point type,
2246         capture dimension info if any, because the generated subtype
2247         declaration does not come from source and will not process dimensions.
2248         * sem_dim,adb (Analyze_Dimension_Extension_Or_Record_Aggregate):
2249         Do not analyze expressions with an initialization procedure
2250         because aggregates will have been checked at the point of record
2251         declaration.
2253 2015-03-13  Robert Dewar  <dewar@adacore.com>
2255         * aspects.ads, aspects.adb: Add entries for aspect Unimplemented.
2256         * einfo.ads, einfo.adb (Is_Unimplemented): New flag.
2257         * sem_ch13.adb: Add dummy entry for aspect Unimplemented.
2258         * snames.ads-tmpl: Add entry for Name_Unimplemented.
2260 2015-03-13  Gary Dismukes  <dismukes@adacore.com>
2262         * style.adb (Missing_Overriding): Apply the
2263         Comes_From_Source test to the Original_Node of the subprogram
2264         node, to handle the case of a null procedure declaration that
2265         has been rewritten as an empty procedure body.
2267 2015-03-13  Robert Dewar  <dewar@adacore.com>
2269         * exp_util.ads: Minor fix to comment.
2270         * sem_ch3.adb (Constrain_Index): Correct pasto from previous
2271         change.
2273 2015-03-13  Robert Dewar  <dewar@adacore.com>
2275         * exp_util.ads, exp_util.adb (Force_Evaluation): Add Related_Id and
2276         Is_Low/High_Bound params.
2277         * sem_ch3.adb (Constrain_Index): Use new Force_Evaluation calling
2278         sequence to simplify generation of FIRST/LAST temps for bounds.
2280 2015-03-12  Olivier Hainque  <hainque@adacore.com>
2282         * gcc-interface/trans.c (Attribute_to_gnu) <Code_Address case>:
2283         On targets where a function symbol designates a function descriptor,
2284         fetch the function code address from the descriptor.
2285         (USE_RUNTIME_DESCRIPTORS): Provide a default definition.
2287 2015-03-04  Robert Dewar  <dewar@adacore.com>
2289         * sem_warn.adb: Minor reformatting.
2290         * init.c: Minor tweaks.
2292 2015-03-04  Dmitriy Anisimko  <anisimko@adacore.com>
2294         * a-coinho-shared.adb: Fix clear of already empty holder.
2296 2015-03-04  Robert Dewar  <dewar@adacore.com>
2298         * exp_unst.adb (Check_Dynamic_Type): Ignore library level types.
2299         (Check_Uplevel_Reference_To_Type): Ignore call inside generic.
2300         (Note_Uplevel_Reference): Ignore call inside generic.
2301         (Note_Uplevel_Reference): Fix check for no entity field.
2302         (Unnest_Subprogram): Ignore call inside generic.
2303         (Find_Current_Subprogram): Use Defining_Entity, not Defining_Unit_Name.
2304         (Visit_Node): Ignore calls to Imported subprograms.
2305         (Visit_Node): Fix problem in finding subprogram body in some cases.
2306         (Add_Form_To_Spec): Use Defining_Entity, not Defining_Unit_Name.
2308 2015-03-04  Robert Dewar  <dewar@adacore.com>
2310         * einfo.adb (Is_ARECnF_Entity): Removed.
2311         (Last_Formal): Remove special handling of Is_ARECnF_Entity.
2312         (Next_Formal): Remove special handling of Is_ARECnF_Entity.
2313         (Next_Formal_With_Extras): Remove special handling of Is_ARECnF_Entity.
2314         (Number_Entries): Minor reformatting.
2315         * einfo.ads (Is_ARECnF_Entity): Removed.
2316         * exp_unst.adb (Unnest_Subprogram): Remove setting of
2317         Is_ARECnF_Entity.
2318         (Add_Extra_Formal): Use normal Extra_Formal circuit.
2319         * sprint.adb (Write_Param_Specs): Properly handle case where
2320         there are no source formals, but we have at least one Extra_Formal
2321         present.
2323 2015-03-04  Ed Schonberg  <schonberg@adacore.com>
2325         * sem_aggr.adb (Resolve_Record_Aggregate,
2326         Add_Discriminant_Values): If the value is a reference to the
2327         current instance of an enclosing type, use its base type to check
2328         against prefix of attribute reference, because the target type
2329         may be otherwise constrained.
2331 2015-03-04  Robert Dewar  <dewar@adacore.com>
2333         * atree.h: Add entries for Flag287-Flag309.
2334         * einfo.adb: Add (unused) flags Flag287-Flag309.
2336 2015-03-04  Ed Schonberg  <schonberg@adacore.com>
2338         * sem_util.adb (Collect_Interfaces, Collect): When gathering
2339         interfaces of ancestors, handle properly a subtype of a private
2340         extension.
2342 2015-03-04  Robert Dewar  <dewar@adacore.com>
2344         * einfo.adb (Is_ARECnF_Entity): New flag (ARECnF is an extra formal).
2345         (Next_Formal): Don't return ARECnF formal.
2346         (Last_Formal): Don't consider ARECnF formal.
2347         (Next_Formal_With_Extras): Do consider ARECnF formal.
2348         * einfo.ads (Is_ARECnF_Entity): New flag (ARECnF is an extra formal).
2349         * exp_unst.adb (Create_Entities): Set Is_ARECnF_Entity flag.
2351 2015-03-04  Javier Miranda  <miranda@adacore.com>
2353         * exp_ch6.adb (Expand_Simple_Function_Return): When the returned
2354         object is a class-wide interface object and we generate the
2355         accessibility described in RM 6.5(8/3) then displace the pointer
2356         to the object to reference the base of the object (to get access
2357         to the TSD of the object).
2359 2015-03-04  Hristian Kirtchev  <kirtchev@adacore.com>
2361         * sem_prag.adb (Analyze_Abstract_State): Use routine
2362         Malformed_State_Error to issue general errors.
2363         (Analyze_Pragma): Diagnose a syntax error related to a state
2364         declaration with a simple option.
2365         (Malformed_State_Error): New routine.
2367 2015-03-04  Robert Dewar  <dewar@adacore.com>
2369         * a-strsup.adb (Super_Slice): Deal with super flat case.
2370         * einfo.ads: Minor reformatting.
2371         * s-imgdec.adb (Set_Decimal_Digits): Add comment about possibly
2372         redundant code.
2374 2015-03-04  Claire Dross  <dross@adacore.com>
2376         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
2377         a-cforse.ads, a-cofove.ads: Use Default_Initial_Condition on formal
2378         containers.
2380 2015-03-04  Ed Schonberg  <schonberg@adacore.com>
2382         * sem_warn.adb (Check_References): When checking for an unused
2383         in-out parameter of a class- wide type, use its type to determine
2384         whether it is private, in order to avoid a spurious warning when
2385         subprogram spec and body are in different units.
2387 2015-03-04  Yannick Moy  <moy@adacore.com>
2389         * sem_attr.adb: Improve warning messages.
2391 2015-03-04  Robert Dewar  <dewar@adacore.com>
2393         * exp_ch6.adb (Expand_N_Subprogram_Body): Avoid trying to unnest
2394         generic subprograms.
2395         * exp_unst.adb (Check_Dynamic_Type): Handle record types properly
2396         (Note_Uplevel_Reference): Ignore uplevel references to non-types
2397         (Get_Level): Consider only subprograms, not blocks.
2398         (Visit_Node): Set proper condition for generating ARECnF entity.
2399         Ignore indirect calls. Ignore calls to subprograms
2400         outside our nest.
2401         (Unnest_Subprogram): Minor changes in dealing with ARECnF entity.
2402         (Add_Form_To_Spec): Properly set Last_Entity field.
2403         (Unnest_Subprogram): Set current subprogram scope for analyze calls.
2404         Handle case of no uplevel refs in outer subprogram
2405         Don't mark uplevel entities as aliased.
2406         Don't deal with calls with no ARECnF requirement.
2408 2015-03-04  Robert Dewar  <dewar@adacore.com>
2410         * s-valrea.adb (Scan_Real): Remove redundant tests from scaling loops.
2411         * s-imgdec.adb (Set_Decimal_Digits): Remove redundant Max
2412         operation in computing LZ.
2413         * sem_attr.adb: Minor typo fix
2415 2015-03-04  Robert Dewar  <dewar@adacore.com>
2417         * exp_ch7.adb: Minor reformatting.
2418         * exp_unst.adb (Build_Tables): Fix minor glitch for no separate
2419         spec case.
2420         * erroutc.adb (Delete_Msg): add missing decrement of info msg counter.
2422 2015-03-04  Hristian Kirtchev  <kirtchev@adacore.com>
2424         * exp_ch6.adb (Build_Pragma_Check_Equivalent): Suppress
2425         references to formal parameters subject to pragma Unreferenced.
2426         (Suppress_Reference): New routine.
2427         * sem_attr.adb (Analyze_Attribute): Reimplement the analysis
2428         of attribute 'Old. Attributes 'Old and 'Result now share
2429         common processing.
2430         (Analyze_Old_Result_Attribute): New routine.
2431         (Check_Placement_In_Check): Removed.
2432         (Check_Placement_In_Contract_Cases): Removed.
2433         (Check_Placement_In_Test_Case): Removed.
2434         (Check_Use_In_Contract_Cases): Removed.
2435         (Check_Use_In_Test_Case): Removed.
2436         (In_Refined_Post): Removed.
2437         (Is_Within): Removed.
2438         * sem_warn.adb (Check_Low_Bound_Tested): Code cleanup.
2439         (Check_Low_Bound_Tested_For): New routine.
2441 2015-03-04  Hristian Kirtchev  <kirtchev@adacore.com>
2443         * exp_ch3.adb (Expand_N_Object_Declaration):
2444         Generate a runtime check to test the expression of pragma
2445         Default_Initial_Condition when the object is default initialized.
2447 2015-03-02  Robert Dewar  <dewar@adacore.com>
2449         * scng.adb (Scan): Ignore illegal character in relaxed
2450         semantics mode.
2452 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
2454         * sem_ch4.adb (Analyze_Set_Membership); Retain Overloaded flag
2455         on left operand, so it can be properly resolved with type of
2456         alternatives of right operand.
2457         * sem_res.adb (Resolve_Set_Membership): Handle properly an
2458         overloaded left-hand side when the alternatives on the right
2459         hand side are literals of some universal type.  Use first
2460         non-overloaded alternative to find expected type.
2462 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
2464         * exp_ch7.adb (Make_Set_Finalize_Address_Call): Use underlying
2465         type to retrieve designated type, because the purported access
2466         type may be a partial (private) view, when it is declared in
2467         the private part of a nested package, and finalization actions
2468         are generated when completing compilation of enclosing unit.
2470 2015-03-02  Robert Dewar  <dewar@adacore.com>
2472         * back_end.adb (Call_Back_End): Remove previous patch,
2473         the back end now gets to see the result of -gnatd.1
2474         (Unnest_Subprogram_Mode) processing.
2475         * elists.ads, elists.adb (List_Length): New function.
2476         * exp_unst.ads, exp_unst.adb: Major changes, first complete version.
2477         * sem_util.adb (Check_Nested_Access): Handle formals in
2478         Unnest_Subprogram_Mode.
2479         (Adjust_Named_Associations): Minor reformatting.
2480         * sprint.adb (Sprint_Node_Actual): Fix failure to print aliased
2481         for parameters.
2483 2015-03-02  Robert Dewar  <dewar@adacore.com>
2485         * atree.ads, atree.adb (Uint24): New function
2486         (Set_Uint24): New procedure.
2487         * atree.h (Uint24): New macro for field access.
2488         * back_end.adb (Call_Back_End): For now, don't call back end
2489         if unnesting subprogs.
2490         * einfo.adb (Activation_Record_Component): New field
2491         (Subps_Index): New field.
2492         * einfo.ads (Activation_Record_Component): New field
2493         (Subps_Index): New field Minor reordering of comments into alpha order.
2494         * exp_unst.ads, exp_unst.adb: Continued development.
2496 2015-03-02  Gary Dismukes  <dismukes@adacore.com>
2498         * exp_disp.ads: Minor reformatting.
2500 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
2502         * sem_ch8.adb (Chain_Use_Clause): Do not chain use clause from
2503         ancestor to list of use clauses active in descendant unit if we
2504         are within the private part of an intervening parent, to prevent
2505         circularities in use clause list.
2507 2015-03-02  Javier Miranda  <miranda@adacore.com>
2509         * exp_ch9.adb (Build_Corresponding_Record): Propagate type
2510         invariants to the corresponding record type.
2511         * exp_disp.ad[sb] (Set_DT_Position_Value): New subprogram
2512         which sets the value of the DTC_Entity associated with a given
2513         primitive of a tagged type and propagates the value to the
2514         wrapped subprogram.
2515         (Set_DTC_Entity_Value): Propagate the DTC
2516         value to the wrapped entity.
2517         * sem_ch13.adb (Build_Invariant_Procedure): Append the code
2518         associated with invariants of progenitors.
2519         * sem_ch3.adb (Build_Derived_Record_Type): Inherit type invariants
2520         of parents and progenitors.
2521         (Process_Full_View): Check hidden inheritance of class-wide type
2522         invariants.
2523         * sem_ch7.adb (Analyze_Package_Specification): Do not generate
2524         the invariant procedure for interface types; build the invariant
2525         procedure for tagged types inheriting invariants from their
2526         progenitors.
2527         * sem_prag.adb (Pragma_Invariant) Allow invariants in interface
2528         types but do not build their invariant procedure since their
2529         invariants will be propagated to the invariant procedure of
2530         types covering the interface.
2531         * exp_ch6.adb, exp_disp.adb, sem_ch3.adb, sem_ch7.adb,
2532         sem_ch8.adb, sem_disp.adb: Replace all calls to Set_DT_Position
2533         by calls to Set_DT_Position_Value.
2535 2015-03-02  Hristian Kirtchev  <kirtchev@adacore.com>
2537         * sem_attr.adb (Analyze_Attribute): Factor out heavily indented
2538         code in Denote_Same_Function.  Do not analyze attribute 'Result
2539         when it is inside procedure _Postconditions.  Remove a misplaced
2540         warning diagnostic. Code cleanup.
2541         (Denote_Same_Function): New routine.
2542         * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Code
2543         cleanup. Warn on pre/postconditions on an inlined subprogram.
2544         (Analyze_Pragma, Refined_Post case): Warn on pre/postconditions on
2545         an inlined subprogram.
2546         (Analyze_Pre_Post_Condition_In_Decl_Part): Code cleanup. Warn on
2547         pre/post condition on an inlined subprogram.
2548         (Analyze_Test_Case_In_Decl_Part): Code cleanup. Warn on
2549         pre/postconditions on an inlined subprogram.
2550         (Check_Postcondition_Use_In_Inlined_Subprogram): New routine.
2552 2015-03-02  Hristian Kirtchev  <kirtchev@adacore.com>
2554         * sem_prag.adb (Ensure_Aggregate_Form):
2555         Ensure that the name denoted by the Chars of a pragma argument
2556         association has the proper Sloc when converted into an aggregate.
2558 2015-03-02  Bob Duff  <duff@adacore.com>
2560         * sem_ch6.adb (Check_Private_Overriding): Capture
2561         Incomplete_Or_Partial_View in a constant. This is cleaner and
2562         more efficient.
2564 2015-03-02  Gary Dismukes  <dismukes@adacore.com>
2566         * einfo.ads, exp_unst.ads: Minor reformatting.
2568 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
2570         * a-strsea.adb (Find_Token): Ensure that the range of iteration
2571         does not perform any improper character access. This prevents
2572         erroneous access in the unusual case of an empty string target
2573         and a From parameter less than Source'First.
2575 2015-03-02  Robert Dewar  <dewar@adacore.com>
2577         * elists.adb (List_Length): Fix incorrect result.
2579 2015-03-02  Bob Duff  <duff@adacore.com>
2581         * sem_ch6.adb (Check_Private_Overriding): Refine the legality
2582         checks here. It used to check that the function is merely
2583         overriding SOMEthing. Now it checks that the function is
2584         overriding a corresponding public operation. This is a correction
2585         to the implementation of the rule in RM-3.9.3(10).
2587 2015-03-02  Robert Dewar  <dewar@adacore.com>
2589         * debug.adb: Document new debug flag -gnatd.1.
2590         * einfo.ads, einfo.adb (Has_Nested_Subprogram): New flag.
2591         (Has_Uplevel_Reference): New flag (Is_Static_Type): New flag.
2592         (Uplevel_Reference_Noted):New flag (Uplevel_References): New field.
2593         * elists.ads elists.adb (List_Length): New function.
2594         * exp_ch6.adb (Expand_N_Subprogram_Body): Call Unnest_Subprogram
2595         when appropriate (Process_Preconditions): Minor code
2596         reorganization and reformatting
2597         * exp_unst.ads, exp_unst.adb: New files.
2598         * gnat1drv.adb (Adjust_Global_Switches): Set
2599         Unnest_Subprogram_Mode if -gnatd.1
2600         * namet.ads, namet.adb (Name_Find_Str): New version of Name_Find with
2601         string argument.
2602         * opt.ads (Unnest_Subprogram_Mode): New flag.
2603         * par-ch3.adb (P_Identifier_Declarations): Fixes to -gnatd.2 handling.
2604         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set
2605         Has_Nested_Subprogram flag.
2606         * sem_ch8.adb (Find_Direct_Name): New calling sequence for
2607         Check_Nested_Access.
2608         (Find_Selected_Component): Minor comment addition.
2609         * sem_util.adb (Check_Nested_Access): New version for use with Exp_Unst.
2610         (Note_Possible_Modification): New calling sequence for
2611         Check_Nested_Access.
2612         * sem_util.ads (Check_Nested_Access): New version for use with Exp_Unst.
2613         * gcc-interface/Make-lang.in (GNAT1_OBJS): Add exp_unst.o
2615 2015-03-02  Pierre-Marie de Rodat  <derodat@adacore.com>
2617         * gcc-interface/utils.c (gnat_pushdecl): For non-artificial pointer
2618         types, preserve the original type and create copies just like the C
2619         front-end does.  For artificial ones, do not define a name for
2620         the original type.
2621         (create_type_decl): When gnat_pushdecl made the input type the
2622         original type for the new declaration, do not define a stub
2623         declaration for it.
2624         * gcc-interface/utils2.c (build_binary_op): Accept two different
2625         pointer types when they point to the same type.
2627 2015-03-02  Hristian Kirtchev  <kirtchev@adacore.com>
2629         * exp_util.adb (Possible_Bit_Aligned_Component): Do not process
2630         an unanalyzed node.
2631         * sem_util.adb (Kill_Current_Values): Do not invalidate and
2632         de-null a constant.
2634 2015-03-02  Robert Dewar  <dewar@adacore.com>
2636         * sem_ch3.adb, exp_attr.adb, checks.adb, exp_aggr.adb: Minor
2637         reformatting.
2639 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
2641         * sem_ch8.adb: extend use of Available_Subtype.
2643 2015-03-02  Hristian Kirtchev  <kirtchev@adacore.com>
2645         * sem_prag.adb (Duplication_Error): Remove the special handling
2646         of 'Class or _Class in the context of pre/postconditions.
2647         (Process_Class_Wide_Condition): Remove the special handling of
2648         'Class or _Class in the context of pre/postconditions.
2649         * sem_util.adb (Original_Aspect_Pragma_Name): Names Pre_Class
2650         and Post_Class no longer need to be converted to _Pre and _Post.
2651         * sem_util.ads (Original_Aspect_Pragma_Name): Update the comment
2652         on usage.
2654 2015-03-02  Hristian Kirtchev  <kirtchev@adacore.com>
2656         * exp_ch6.adb (Process_Preconditions): Modify the
2657         mechanism that find the first source declaration to correct exit
2658         the loop once it has been found.
2660 2015-03-02  Gary Dismukes  <dismukes@adacore.com>
2662         * a-strsea.adb: Minor typo fix.
2664 2015-03-02  Bob Duff  <duff@adacore.com>
2666         * einfo.ads: Minor comment fixes.
2668 2015-03-02  Gary Dismukes  <dismukes@adacore.com>
2670         * einfo.adb, checks.adb: Minor reformatting and typo fixes.
2672 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
2674         * exp_aggr.adb (Get_Assoc_Expr): If the Default_Component_Value
2675         is defined for the array type, use it instead of a Default_Value
2676         specified for the component type itself.
2678 2015-03-02  Thomas Quinot  <quinot@adacore.com>
2680         * exp_attr.adb (Expand_N_Attribute_Reference, case Input): When
2681         expanding a 'Input attribute reference for a class-wide type,
2682         do not generate a separate object declaration for the controlling
2683         tag dummy object; instead, generate the expression inline in the
2684         dispatching call. Otherwise, the declaration (which involves a
2685         call to String'Input, returning a dynamically sized value on the
2686         secondary stack) will be expanded outside of proper secondary
2687         stack mark/release operations, and will thus cause a secondary
2688         stack leak.
2690 2015-03-02  Hristian Kirtchev  <kirtchev@adacore.com>
2692         * checks.adb (Add_Validity_Check): Change the names of all
2693         formal parameters to better illustrate their purpose. Update
2694         the subprogram documentation. Update all occurrences of the
2695         formal parameters. Generate a pre/postcondition pragma by
2696         calling Build_Pre_Post_Condition.
2697         (Build_PPC_Pragma): Removed.
2698         (Build_Pre_Post_Condition): New routine.
2699         * einfo.adb Node8 is no longer used as Postcondition_Proc. Node14
2700         is now used as Postconditions_Proc. Flag240 is now renamed to
2701         Has_Expanded_Contract.  (First_Formal): The routine can now
2702         operate on generic subprograms.
2703         (First_Formal_With_Extras): The routine can now operate on generic
2704         subprograms.
2705         (Has_Expanded_Contract): New routine.
2706         (Has_Postconditions): Removed.
2707         (Postcondition_Proc): Removed.
2708         (Postconditions_Proc): New routine.
2709         (Set_Has_Expanded_Contract): New routine.
2710         (Set_Has_Postconditions): Removed.
2711         (Set_Postcondition_Proc): Removed.
2712         (Set_Postconditions_Proc): New routine.
2713         (Write_Entity_Flags): Remove the output of Has_Postconditions. Add
2714         the output of Has_Expanded_Contract.
2715         (Write_Field8_Name): Remove the output of Postcondition_Proc.
2716         (Write_Field14_Name): Add the output of Postconditions_Proc.
2717         * einfo.ads New attributes Has_Expanded_Contract and
2718         Postconditions_Proc along with occurrences in entities.
2719         Remove attributes Has_Postconditions and Postcondition_Proc
2720         along with occurrences in entities.
2721         (Has_Expanded_Contract): New routine along with pragma Inline.
2722         (Has_Postconditions): Removed along with pragma Inline.
2723         (Postcondition_Proc): Removed along with pragma Inline.
2724         (Postconditions_Proc): New routine along with pragma Inline.
2725         (Set_Has_Expanded_Contract): New routine along with pragma Inline.
2726         (Set_Has_Postconditions): Removed along with pragma Inline.
2727         (Set_Postcondition_Proc): Removed along with pragma Inline.
2728         (Set_Postconditions_Proc): New routine along with pragma Inline.
2729         * exp_ch6.adb (Add_Return): Code cleanup. Update the
2730         generation of the call to the _Postconditions routine of
2731         the procedure.  (Expand_Non_Function_Return): Reformat the
2732         comment on usage. Code cleanup.  Update the generation of
2733         the call to the _Postconditions routine of the procedure or
2734         entry [family].
2735         (Expand_Simple_Function_Return): Update the
2736         generation of the _Postconditions routine of the function.
2737         (Expand_Subprogram_Contract): Reimplemented.
2738         * exp_ch6.ads (Expand_Subprogram_Contract): Update the parameter
2739         profile along the comment on usage.
2740         * exp_ch9.adb (Build_PPC_Wrapper): Code cleanup.
2741         (Expand_N_Task_Type_Declaration): Generate pre/postconditions
2742         wrapper when the entry [family] has a contract with
2743         pre/postconditions.
2744         * exp_prag.adb (Expand_Attributes_In_Consequence): New routine.
2745         (Expand_Contract_Cases): This routine and its subsidiaries now
2746         analyze all generated code.
2747         (Expand_Old_In_Consequence): Removed.
2748         * sem_attr.adb Add with and use clause for Sem_Prag.
2749         (Analyze_Attribute): Reimplment the analysis of attribute 'Result.
2750         (Check_Use_In_Test_Case): Use routine Test_Case_Arg to obtain
2751         "Ensures".
2752         * sem_ch3.adb (Analyze_Declarations): Analyze the contract of
2753         a generic subprogram.
2754         (Analyze_Object_Declaration): Do not create a contract node.
2755         (Derive_Subprogram): Do not create a contract node.
2756         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Do
2757         not create a contract node.
2758         (Analyze_Completion_Contract): New routine.
2759         (Analyze_Function_Return): Alphabetize.
2760         (Analyze_Generic_Subprogram_Body): Alphabetize. Do not create a
2761         contract node.  Do not copy pre/postconditions to the original
2762         generic template.
2763         (Analyze_Null_Procedure): Do not create a contract node.
2764         (Analyze_Subprogram_Body_Contract): Reimplemented.
2765         (Analyze_Subprogram_Body_Helper): Do not mark the enclosing scope
2766         as having postconditions. Do not create a contract node. Analyze
2767         the subprogram body contract of a body that acts as a compilation
2768         unit. Expand the subprogram contract after the declarations have
2769         been analyzed.
2770         (Analyze_Subprogram_Contract): Reimplemented.
2771         (Analyze_Subprogram_Specification): Do not create a contract node.
2772         (List_Inherited_Pre_Post_Aspects): Code cleanup.
2773         * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Update the
2774         comment on usage.
2775         (Analyze_Subprogram_Contract): Update the
2776         parameter profile and the comment on usage.
2777         * sem_ch7.adb (Analyze_Package_Body_Helper): Do not create a
2778         contract node.
2779         (Analyze_Package_Declaration): Do not create a
2780         contract node.
2781         (Is_Subp_Or_Const_Ref): Ensure that the prefix has an entity.
2782         * sem_ch8.adb (Analyze_Subprogram_Renaming): Do not create a
2783         contract node.
2784         * sem_ch9.adb (Analyze_Entry_Declaration): Do not create a
2785         contract node.
2786         * sem_ch10.adb (Analyze_Compilation_Unit): Move local variables to
2787         their proper section and alphabetize them. Analyze the contract of
2788         a [generic] subprogram after all Pragmas_After have been analyzed.
2789         (Analyze_Subprogram_Body_Stub_Contract): Alphabetize.
2790         * sem_ch12.adb (Analyze_Generic_Package_Declaration): Do not
2791         create a contract node.
2792         (Analyze_Generic_Subprogram_Declaration):
2793         Alphabetize local variables. Do not create a contract
2794         node. Do not generate aspects out of pragmas for ASIS.
2795         (Analyze_Subprogram_Instantiation): Instantiate
2796         the contract of the subprogram.  Do not create a
2797         contract node.  (Instantiate_Contract): New routine.
2798         (Instantiate_Subprogram_Body): Alphabetize local variables.
2799         (Save_Global_References_In_Aspects): New routine.
2800         (Save_References): Do not save the global references found within
2801         the aspects of a generic subprogram.
2802         * sem_ch12.ads (Save_Global_References_In_Aspects): New routine.
2803         * sem_ch13.adb (Analyze_Aspect_Specifications): Do not use
2804         Original_Node for establishing linkages.
2805         (Insert_Pragma): Insertion in a subprogram body takes precedence over
2806         the case where the subprogram body is also a compilation unit.
2807         * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Use
2808         Get_Argument to obtain the proper expression. Install the generic
2809         formals when the related context is a generic subprogram.
2810         (Analyze_Depends_In_Decl_Part): Use Get_Argument to obtain
2811         the proper expression. Use Corresponding_Spec_Of to obtain
2812         the spec. Install the generic formal when the related context
2813         is a generic subprogram.
2814         (Analyze_Global_In_Decl_Part): Use Get_Argument to obtain the proper
2815         expression. Use Corresponding_Spec_Of to obtain the spec. Install the
2816         generic formal when the related context is a generic subprogram.
2817         (Analyze_Initial_Condition_In_Decl_Part): Use Get_Argument
2818         to obtain the proper expression. Remove the call to
2819         Check_SPARK_Aspect_For_ASIS as the analysis is now done
2820         automatically.
2821         (Analyze_Pragma): Update all occurrences
2822         to Original_Aspect_Name. Pragmas Contract_Cases, Depends,
2823         Extensions_Visible, Global, Postcondition, Precondition and
2824         Test_Case now carry generic templates when the related context
2825         is a generic subprogram. The same pragmas are no longer
2826         forcefully fully analyzed when the context is a subprogram
2827         that acts as a compilation unit. Pragmas Abstract_State,
2828         Initial_Condition, Initializes and Refined_State have been clean
2829         up. Pragmas Post, Post_Class, Postcondition, Pre, Pre_Class
2830         and Precondition now use the same routine for analysis. Pragma
2831         Refined_Post does not need to check the use of 'Result or
2832         the lack of a post-state in its expression. Reimplement the
2833         analysis of pragma Test_Case.
2834         (Analyze_Pre_Post_Condition): New routine.
2835         (Analyze_Pre_Post_Condition_In_Decl_Part):
2836         Reimplemented.
2837         (Analyze_Refined_Depends_In_Decl_Part): Use Get_Argument to obtain the
2838         proper expression.
2839         (Analyze_Refined_Global_In_Decl_Part): Use Get_Argument to obtain
2840         the proper expression.
2841         (Analyze_Test_Case_In_Decl_Part): Reimplemented.
2842         (Check_Pre_Post): Removed.
2843         (Check_Precondition_Postcondition): Removed.
2844         (Check_SPARK_Aspect_For_ASIS): Removed.
2845         (Check_Test_Case): Removed.
2846         (Collect_Subprogram_Inputs_Outputs): Use Get_Argument
2847         to obtain the proper expression. Use Corresponding_Spec_Of to
2848         find the proper spec.
2849         (Create_Generic_Template): New routine.
2850         (Duplication_Error): New routine.
2851         (Expression_Function_Error): New routine.
2852         (Find_Related_Subprogram_Or_Body): Moved to the spec
2853         of Sem_Prag. Emit precise error messages. Account for cases of
2854         rewritten expression functions, generic instantiations, handled
2855         sequence of statements and pragmas from aspects.
2856         (Get_Argument): New routine.
2857         (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Removed.
2858         (Preanalyze_CTC_Args): Removed.
2859         (Process_Class_Wide_Condition): New routine.
2860         * sem_prag.ads (Analyze_Test_Case_In_Decl_Part): Update
2861         the parameter profile along with the comment on usage.
2862         (Find_Related_Subprogram_Or_Body): Moved from the body of Sem_Prag.
2863         (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Removed.
2864         (Test_Case_Arg): New routine.
2865         * sem_util.adb Add with and use clauses for Sem_Ch6.
2866         (Add_Contract_Item): This routine now creates a contract
2867         node the first time an item is added. Remove the duplicate
2868         aspect/pragma checks.
2869         (Check_Result_And_Post_State): Reimplemented.
2870         (Corresponding_Spec_Of): New routine.
2871         (Get_Ensures_From_CTC_Pragma): Removed.
2872         (Get_Requires_From_CTC_Pragma): Removed.
2873         (Has_Significant_Contract): New routine.
2874         (Inherit_Subprogram_Contract): Inherit only if the source
2875         has a contract.
2876         (Install_Generic_Formals): New routine.
2877         (Original_Aspect_Name): Removed.
2878         (Original_Aspect_Pragma_Name): New routine.
2879         * sem_util.ads (Check_Result_And_Post_State): Reimplemented.
2880         (Corresponding_Spec_Of): New routine.
2881         (Get_Ensures_From_CTC_Pragma): Removed.
2882         (Get_Requires_From_CTC_Pragma): Removed.
2883         (Has_Significant_Contract): New routine.
2884         (Install_Generic_Formals): New routine.
2885         (Original_Aspect_Name): Removed.
2886         (Original_Aspect_Pragma_Name): New routine.
2887         * sem_warn.adb Add with and use clauses for Sem_Prag.
2888         (Within_Postcondition): Use Test_Case_Arg to extract "Ensures".
2890 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
2892         * sem_ch8.adb (Available_Subtype): Optimization in
2893         Find_Selected_Component: when safe, use existing subtype of
2894         array component, possibly discriminant-dependent, rather than
2895         creating new subtype declaration for it. In this fashion different
2896         occurrences of the component have the same subtype, rather than
2897         just equivalent ones. Simplifies value tracing in GNATProve.
2899 2015-03-01  Arnaud Charlet  <charlet@adacore.com>
2901         PR ada/65259
2903         * doc/gnat_ugn/gnat_project_manager.rst,
2904         doc/gnat_ugn/platform_specific_information.rst: Remove reference to
2905         image, too troublesome with texi format.
2906         * gnat_ugn.texi: Regenerate.
2908 2015-02-24  Thomas Schwinge  <thomas@codesourcery.com>
2910         PR libgomp/64625
2911         * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8): Remove.
2912         (DEF_FUNCTION_TYPE_VAR_12): Likewise.
2913         (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
2915 2015-02-23  Thomas Schwinge  <thomas@codesourcery.com>
2917         * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8): Fix number of
2918         arguments parameter.
2919         (DEF_FUNCTION_TYPE_VAR_12): Likewise.
2921 2015-02-22  Arnaud Charlet  <charlet@adacore.com>
2923         * doc/Makefile: postprocess texinfo files to update @dircategory
2924         and update texi files under gcc/ada.
2925         * gnat_ugn.texi, gnat_rm.texi: Regenerated.
2927 2015-02-22  Arnaud Charlet  <charlet@adacore.com>
2929         * doc/gnat_ugn/project-manager-figure.png,
2930         doc/gnat_ugn/rtlibrary-structure.png: New.
2932 2015-02-22  Tom de Vries  <tom@codesourcery.com>
2934         PR ada/65100
2935         * gnat-style.texi (@subsection Loop Statements): Replace @noindent by
2936         @item, and fix warning '@itemize has text but no @item'.
2938 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
2940         * sem_prag.adb (Analyze_Pragma, case Obsolescent): Pragma
2941         legally applies to an abstract subprogram declaration.
2942         * freeze.adb: Minor comment addition.
2944 2015-02-20  Robert Dewar  <dewar@adacore.com>
2946         * errout.ads: Document replacement of Name_uPre/Post/Type_Invariant.
2947         * erroutc.adb (Set_Msg_Str): Replace _xxx.
2948         (Pre/Post/Type_Invariant) by xxx'Class.
2949         * erroutc.ads (Set_Msg_Str): Replace _xxx.
2950         (Pre/Post/Type_Invariant) by xxx'Class.
2951         * sem_prag.adb (Fix_Error): Remove special casing of
2952         Name_uType_Invariant.
2953         (Analyze_Pre_Post_Condition_In_Decl_Part): Remove special casing of
2954         Name_uPre and Name_uPost in aspect case (done in Errout now).
2956 2015-02-20  Robert Dewar  <dewar@adacore.com>
2958         * g-alveop.adb: Minor style fixes.
2960 2015-02-20  Robert Dewar  <dewar@adacore.com>
2962         * freeze.adb (Warn_Overlay): Guard against blow up with address
2963         clause.
2965 2015-02-20  Bob Duff  <duff@adacore.com>
2967         * exp_attr.adb (May_Be_External_Call): Remove this. There is no need
2968         for the compiler to guess whether the call is internal or external --
2969         it is always external.
2970         (Expand_Access_To_Protected_Op): For P'Access, where P
2971         is a protected subprogram, always create a pointer to the
2972         External_Subprogram.
2974 2015-02-20  Robert Dewar  <dewar@adacore.com>
2976         * a-dispat.adb, a-stcoed.ads: Minor reformatting.
2978 2015-02-20  Robert Dewar  <dewar@adacore.com>
2980         * sem_ch13.adb (Build_Discrete_Static_Predicate): Allow static
2981         predicate for non-static subtype.
2982         (Build_Predicate_Functions): Do not assume subtype associated with a
2983         static predicate must be static.
2985 2015-02-20  Robert Dewar  <dewar@adacore.com>
2987         * errout.adb (Set_Msg_Node): Better handling of internal names
2988         (Set_Msg_Node): Kill message when we cannot eliminate internal name.
2989         * errout.ads: Document additional case of message deletion.
2990         * namet.adb (Is_Internal_Name): Refined to consider wide
2991         strings in brackets notation and character literals not to be
2992         internal names.
2993         * sem_ch8.adb (Find_Selected_Component): Give additional error
2994         when selector name is a subprogram whose first parameter has
2995         the same type as the prefix, but that type is untagged.
2997 2015-02-20  Robert Dewar  <dewar@adacore.com>
2999         * g-allein.ads, g-alveop.adb, g-alveop.ads, opt.ads: Minor reformatting
3001 2015-02-20  Tristan Gingold  <gingold@adacore.com>
3003         * opt.ads (GNAT_Mode_Config): New variable.
3004         * opt.adb (Set_Opt_Config_Switches): Consider GNAT_Mode_Config
3005         to set Assertions_Enabled.
3006         * switch-c.adb (Scan_Front_End_Switches): Set GNAT_Mode_Config
3007         for -gnatg.
3009 2015-02-20  Robert Dewar  <dewar@adacore.com>
3011         * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Add an additional
3012         comment regarding the handling of unterminated fixed-point
3013         constants.
3014         * s-valuns.ads (Scan_Raw_Unsigned): Add comments
3015         corresponding to those previously added for
3016         System.Val_LLU.Scan_Raw_Long_Long_Unsigned.
3018 2015-02-20  Olivier Hainque  <hainque@adacore.com>
3020         * g-allein.ads, g-alveop.ads, g-alveop.adb: Code clean ups.
3022 2015-02-20  Robert Dewar  <dewar@adacore.com>
3024         * sem_prag.adb: Minor comment clarification.
3026 2015-02-20  Olivier Hainque  <hainque@adacore.com>
3028         * g-allein.ads (vec_ctf, vec_vcsfx, vec_vcfux): Remove.
3029         * g-alleve.ads, g-alleva.adb (vcfux): Likewise.
3030         * g-alveop.ads (vec_vcfsx, vec_vcfux): Just rename the ll versions.
3031         (vec_ctf): Now renamings as well.
3033 2015-02-20  Robert Dewar  <dewar@adacore.com>
3035         * switch-c.adb, bindgen.adb: Minor reformatting.
3037 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
3039         * sem_prag.adb (Analyze_Pragma, case Type_Invariant):
3040         Invariant'class is allowed on an abstract type.
3042 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
3044         * sem_ch3.adb (Access_Definition): If the access definition is
3045         for a protected component and defines an access to protected
3046         subprogram, do not create an itype reference for it because a
3047         full type declaration will be built in order to generate the
3048         proper equivalent type.
3049         (Analyze_Subtype_Declaration): Add information of incomplete
3050         subtypes, for Ada 2012 extended uses of incomplete types.
3052 2015-02-20  Gary Dismukes  <dismukes@adacore.com>
3054         * sem_res.adb: Minor reformatting.
3056 2015-02-20  Vincent Celier  <celier@adacore.com>
3058         * switch-c.adb (Scan_Front_End_Switches): When comparing runtime
3059         path name for several switches --RTS, use the normalized path
3060         names.
3062 2015-02-20  Vincent Celier  <celier@adacore.com>
3064         * bindgen.adb: Minor reformatting and code reorganization.
3066 2015-02-20  Jose Ruiz  <ruiz@adacore.com>
3068         * a-stcoed.ads: Add spec for this package (Unimplemented_Unit).
3069         * impunit.adb (Non_Imp_File_Names_12): Mark unit a-stcoed.ads as
3070         defined by Ada 2012.
3072 2015-02-20  Arnaud Charlet  <charlet@adacore.com>
3074         * sysdep.c, expect.c, s-oscons-tmplt.c, gsocket.h, adaint.c: Remove
3075         obsolete references to RTX, nucleus, VMS.
3077 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
3079         * sem_prag.adb (Fix_Error): For an illegal Type_Invariant'Class
3080         aspect, use name that mentions Class explicitly, rather than
3081         compiler-internal name.
3083 2015-02-20  Robert Dewar  <dewar@adacore.com>
3085         * debug.adb: Add documentation for -gnatd.2 (allow statements
3086         in decl sequences).
3087         * par-ch3.adb (P_Identifier_Declarations): Handle
3088         statement appearing where declaration expected more cleanly.
3089         (Statement_When_Declaration_Expected): Implement debug flag
3090         -gnatd.2.
3092 2015-02-20  Jose Ruiz  <ruiz@adacore.com>
3094         * a-dinopr.ads: Add spec for this package (Unimplemented_Unit).
3095         * a-dispat.ads (Yield): Include procedure added in Ada 2012.
3096         * a-dispat.adb (Yield): Implement procedure added in Ada 2012.
3097         * impunit.adb (Non_Imp_File_Names_05): Mark unit a-dinopr.ads as
3098         defined by Ada 2005.
3099         * snames.ads-tmpl (Name_Non_Preemptive_FIFO_Within_Priorities):
3100         This is the correct name for the dispatching policy (FIFO was
3101         missing).
3103 2015-02-20  Javier Miranda  <miranda@adacore.com>
3105         * sem_res.adb (Resolve_Type_Conversion): If the type of the
3106         operand is the limited-view of a class-wide type then recover
3107         the class-wide type of the non-limited view.
3109 2015-02-20  Arnaud Charlet  <charlet@adacore.com>
3111         * gcc-interface/Makefile.in: Remove references to nucleus.
3112         * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Procedure): Set
3113         extern_flag to true for Inline_Always subprograms with
3114         Intrinsic convention.
3116 2015-02-20  Yannick Moy  <moy@adacore.com>
3118         * sem_prag.ads: Minor typo in comment.
3120 2015-02-20  Pascal Obry  <obry@adacore.com>
3122         * s-osprim-mingw.adb: Fix Get_Base_Time parameter mode.
3124 2015-02-20  Vincent Celier  <celier@adacore.com>
3126         * makeutl.adb (Get_Directories.Add_Dir): Add a directory only
3127         if it exists.
3129 2015-02-20  Robert Dewar  <dewar@adacore.com>
3131         * sem_eval.ads: Minor reformatting.
3133 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
3135         * freeze.adb (Size_Known): Do not set the packed size for
3136         independent type or component.
3137         (Freeze_Array_Type): Check for Independent[_Components] with packing
3138         or explicit component size clause.
3139         * gnat1drv.adb (Post_Compilation_Validation_Checks): Do the validation
3140         of independence pragmas only for non-GCC back-ends.
3141         * sem_ch13.adb (Initialize): Likewise for the initialization.
3142         * sem_prag.adb (Record_Independence_Check): New procedure to record an
3143         independence check in the table.
3144         (Analyze_Pragma): Use it throughout instead of doing it manually.
3145         * gcc-interface/decl.c (gnat_to_gnu_field): Add support for
3146         independent type or component.
3148 2015-02-20  Thomas Quinot  <quinot@adacore.com>
3150         * adaint.c (__gnat_readdir): For Solaris, use 64 bit variants of
3151         struct direct and readdir. This is required for NFS filesystems
3152         mounted from servers that use 64-bit cookies.
3154 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
3156         * sem_ch12.adb (Analyze_Subprogram_Instantiaion): New subprogram
3157         Build_Subprogram_Renaming, to create renaming of subprogram
3158         instance in the the declaration of the wrapper package rather
3159         than in its body, so that it is available for analysis of aspects
3160         propagated from generic to instantiation.
3161         (Check_Mismatch): An actual for a formal package that is an
3162         incomplete type matches a formal type that is incomplete.
3163         (Instantiate_Package_Body): Move code that builds subprogram
3164         renaming to Analyze_Subprogram_Instantiation.
3165         (Instantiate_Type): The generated subtype is a limited view if
3166         the actual is a limited view.
3167         (Load_Parent_Of_Generic): Retrieve instance declaration from
3168         its new position within wrapper package.
3170 2015-02-20  Arnaud Charlet  <charlet@adacore.com>
3172         * s-parame-vxworks.adb, s-os_lib.ads: Update comments.
3174 2015-02-20  Robert Dewar  <dewar@adacore.com>
3176         * s-osinte-vxworks.ads (To_Timespec): Add comment about the
3177         issue of negative arguments.
3179 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
3181         * gnat1drv.adb: Minor consistency fix.
3183 2015-02-20  Pascal Obry  <obry@adacore.com>
3185         * s-osprim-mingw.adb (Get_Base_Time): Properly release lock in all
3186         paths.
3188 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
3190         * inline.adb (Expand_Inlined_Call): Skip again calls to subprogram
3191         renamings.
3192         * exp_ch6.adb (Expand_Call): Use back-end inlining
3193         instead of expansion for simple subprogram renamings.
3195 2015-02-20  Robert Dewar  <dewar@adacore.com>
3197         * exp_util.adb: Minor reformatting.
3199 2015-02-20  Vincent Celier  <celier@adacore.com>
3201         * switch-c.adb (Scan_Front_End_Switches): Do not fail when --RTS=
3202         is specified several times with different values that indicates
3203         the same runtime directory.
3205 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
3207         * sem_attr.adb (Check_Not_Incomplete_Type): Clean up code to
3208         handle properly illegal uses of attributes on prefixes on an
3209         incomplete type, both when the type of the prefix is locally
3210         incomplete, and when it is a limited view of a type whose
3211         non-limited view is not available.
3212         (Analyze_Attribute): Add calls to Check_Not_Incomplete_Type for
3213         'Address and others.
3215 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
3217         * exp_ch6.adb: Fix minor typo in comment.
3219 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
3221         * sinfo.ads: Add comment.
3223 2015-02-20  Olivier Hainque  <hainque@adacore.com>
3225         * opt.ads: Replace Opt.Suppress_All_Inlining by two separate
3226         flags controlling the actual FE inlining out of pragma Inline
3227         and pragma Inline_Always.
3228         * adabkend.adb (Scan_Compiler_Arguments): Set both flags to True
3229         on -fno-inline, which disables all inlining in compilers with
3230         an Ada back-end and without back-end inlining support.
3231         * back_end.adb (Scan_Back_End_Switches): Set the Inline related
3232         flag to True on -fno-inline and leave Inline_Always alone for
3233         gcc back-ends.
3234         * back_end.ads (Scan_Compiler_Arguments): Adjust spec wrt the
3235         names of the Opt flags it sets.
3236         * gnat1drv.adb (Adjust_Global_Switches): Remove test on
3237         Opt.Suppress_All_Inlining in the Back_End_Inlining computation.
3238         * sem_prag.adb (Make_Inline): Remove early return conditioned
3239         on Opt.Suppress_All_Inlining.
3240         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Use the flags to
3241         disable the calls to Build_Body_To_Inline otherwise triggered
3242         by pragma Inline or Inline_Always. This will prevent actual
3243         front-end inlining of the subprogram on calls.
3245 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
3247         * exp_ch3.adb (Default_Initialize_Object): Call Add_Inlined_Body on the
3248         Abort_Undefer_Direct function.
3249         * exp_ch5.adb (Expand_N_Assignment_Statement): Likewise.
3250         * exp_intr.adb (Expand_Unc_Deallocation): Likewise.
3251         * exp_prag.adb (Expand_Pragma_Abort_Defer): Likewise.
3252         * exp_ch4.adb (Expand_N_Selected_Component): Adjust call to
3253         Add_Inlined_Body.
3254         * exp_ch6.adb (Expand_Call): Adjust calls to Add_Inlined_Body.
3255          Remove call to Register_Backend_Call and move code resetting
3256         Needs_Debug_Info on inlined subprograms to...
3257         * inline.ads (Add_Inlined_Body): Add N parameter.
3258         (Register_Backend_Call): Delete.
3259         * inline.adb (Add_Inlined_Body): ...here and simplify.
3260          Register the call with Backend_Calls directly.
3261         (Register_Backend_Call): Delete.
3262         * s-stalib.ads (Abort_Undefer_Direct): Restore pragma Inline.
3264 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
3266         * s-stalib.ads: Fix typo.
3268 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
3270         * exp_ch3.adb (Default_Initialize_Object): If the object has a
3271         delayed freeze, the actions associated with default initialization
3272         must be part of the freeze actions, rather that being inserted
3273         directly after the object declaration.
3275 2015-02-20  Robert Dewar  <dewar@adacore.com>
3277         * lib-load.adb: Minor comment update.
3279 2015-02-20  Vincent Celier  <celier@adacore.com>
3281         * prj-proc.adb (Process_Case_Construction): When there are
3282         incomplete withed projects and the case variable is unknown,
3283         skip the case construction.
3285 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
3287         * exp_ch6.adb (Expand_Actuals): Add caller-side invariant checks
3288         when an actual is a view conversion, either because the call is
3289         to an inherited operation, or because the actual is an explicit
3290         type conversion to an ancestor type.  Fixes ACATS 4.0D: C732001
3292 2015-02-20  Robert Dewar  <dewar@adacore.com>
3294         * einfo.ads: Minor comment updates Fix missing pragma Inline
3295         for Set_Partial_View_Has_Unknown_Discr.
3296         * einfo.adb (Write_Entity_Flags): Add missing entry for
3297         Partial_View_Has_Unknown_Discr.
3298         * sem_ch3.adb: Minor reformatting.
3300 2015-02-20  Vincent Celier  <celier@adacore.com>
3302         * opt.ads: Minor cleanup: remove mention of gprmake.
3303         * s-stalib.ads (Abort_Undefer_Direct): Do not inline.
3304         * s-tataat.adb: Do not call System.Tasking.Self but directly
3305         System.Task_Primitives.Operations.Self.
3307 2015-02-20  Arnaud Charlet  <charlet@adacore.com>
3309         * gnat_rm.texi, gnat_ugn.texi: Now automatically generated from
3310         sphinx in the doc directory.
3311         * doc: New directory containing sphinx versions of gnat_rm and gnat_ugn
3313 2015-02-20  Robert Dewar  <dewar@adacore.com>
3315         * sem_res.adb: Minor reformatting.
3316         * exp_ch9.adb (Build_Protected_Spec): Copy Aliased setting when
3317         building spec.
3318         * sem_ch13.adb (Analyze_Aspect_Specifications): Exclude Boolean
3319         aspects from circuitry setting delay required to false if the
3320         argument is an integer literal.
3322 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
3324         * einfo.ads. einfo.adb (Partial_View_Has_Unknown_Discr):  New flag
3325         on type entities, to enforce AI12-0133: default initialization
3326         of types whose partial view has unknown discriminants does not
3327         get an invariant check, because clients of the unit can never
3328         declare objects of such types.
3329         * sem_ch3.adb (Find_Type_Name); Set new flag
3330         Partial_View_Has_Unknown_Discr when needed.
3331         * exp_ch3.adb (Expand_N_Object_Declaration): Use flag to suppress
3332         generation of invariant call on default-initialized object.
3334 2015-02-08  Eric Botcazou  <ebotcazou@adacore.com>
3336         * gcc-interface/decl.c (gnat_to_gnu_param): Do not strip the padding
3337         if the parameter either is passed by reference or if the alignment
3338         would be lowered.
3340 2015-02-08  Eric Botcazou  <ebotcazou@adacore.com>
3342         * gcc-interface/decl.c (is_cplusplus_method): Use Is_Primitive flag to
3343         detect primitive operations of tagged and untagged types.
3345 2015-02-08  Eric Botcazou  <ebotcazou@adacore.com>
3347         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not bother about alias
3348         sets in presence of derivation for subprogram types.
3350 2015-02-08  Eric Botcazou  <ebotcazou@adacore.com>
3352         * gcc-interface/utils.c (begin_subprog_body): Assert that the body is
3353         present in the same context as the declaration.
3355 2015-02-07  Jakub Jelinek  <jakub@redhat.com>
3357         PR middle-end/64340
3358         * gcc-interface/trans.c (gigi): Recreate optimization_default_node
3359         and optimization_current_node after tweaking global_options.
3361 2015-02-05  Robert Dewar  <dewar@adacore.com>
3363         * prj-proc.adb, sem_aux.adb, exp_ch9.adb, errout.adb, prj-dect.adb,
3364         prj-nmsc.adb: Minor reformatting.
3366 2015-02-05  Ed Schonberg  <schonberg@adacore.com>
3368         * sem_type.adb (Covers): In ASIS_Mode the Corresponding_Record
3369         of a protected type may not be available, so to check conformance
3370         with an interface type, examine the interface list in the type
3371         declaration directly.
3372         (Write_Overloads): Improve information for indirect calls,
3373         for debugger use.
3375 2015-02-05  Ed Schonberg  <schonberg@adacore.com>
3377         * exp_ch3.adb (Make_Tag_Assignment): Do not perform this
3378         expansion activity in ASIS mode.
3380 2015-02-05  Javier Miranda  <miranda@adacore.com>
3382         * errout.adb (Error_Msg_PT): Add missing error.
3383         * sem_ch6.adb (Check_Synchronized_Overriding): Check the missing
3384         RM rule.  Code cleanup.
3385         * exp_ch9.adb (Build_Wrapper_Spec): Propagate "constant" in
3386         anonymous access types.  Found working on the tests. Code cleanup.
3388 2015-02-05  Vincent Celier  <celier@adacore.com>
3390         * prj-dect.adb (Parse_Attribute_Declaration): Continue scanning
3391         when there are incomplete withs.
3392         * prj-nmsc.adb (Process_Naming): Do not try to get the value
3393         of an element when it is nil.
3394         (Check_Naming): Do not check a nil suffix for illegality
3395         * prj-proc.adb (Expression): Do not process an empty term.
3396         * prj-strt.adb (Attribute_Reference): If attribute cannot be
3397         found, parse a possible index to avoid cascading errors.
3399 2015-02-05  Ed Schonberg  <schonberg@adacore.com>
3401         * sem_aux.adb (Is_Derived_Type): A subprogram_type generated
3402         for an access_to_subprogram declaration is not a derived type.
3404 2015-02-05  Robert Dewar  <dewar@adacore.com>
3406         * errout.adb (Error_Msg_Internal): For non-serious error set
3407         Fatal_Error to Ignored.
3408         * lib-load.adb (Load_Unit): Minor comment updates.
3409         * sem_ch10.adb (Analyze_With_Clause): Propagate Fatal_Error
3410         setting from with'ed unit to with'ing unit.
3411         * sem_prag.adb (Analyze_Pragma, case Warnings): Document handling
3412         of ambiguity.
3414 2015-02-05  Yannick Moy  <moy@adacore.com>
3416         * sem_prag.adb, par-prag.adb: Minor code clean up.
3418 2015-02-05  Yannick Moy  <moy@adacore.com>
3420         * par-prag.adb (Pragma_Warnings): Update for extended form
3421         of pragma Warnings. The "one" argument case may now have 2 or
3422         3 arguments.
3423         * sem_prag.adb (Analyze_Pragma/Pragma_Warnings): Update for
3424         extended form of pragma Warnings. Pragma with tool name is either
3425         rewritten as null or as an equivalent form without tool name,
3426         before reanalysis.
3427         * snames.ads-tmpl (Name_Gnatprove): New name.
3429 2015-02-05  Robert Dewar  <dewar@adacore.com>
3431         * sem_ch13.adb (Add_Invariants): Don't assume invariant is
3432         standard Boolean.
3433         * sem_prag.adb (Analyze_Pragma, case Check): Don't assume
3434         condition is standard Boolean, it can be non-standard derived
3435         Boolean.
3437 2015-02-05  Robert Dewar  <dewar@adacore.com>
3439         * checks.adb (Enable_Range_Check): Disconnect attempted
3440         optimization for the case of range check for subscript of
3441         unconstrained array.
3443 2015-02-05  Robert Dewar  <dewar@adacore.com>
3445         * par-ch13.adb (With_Present): New function
3446         (Aspect_Specifications_Present): Handle WHEN in place of WITH
3447         (Get_Aspect_Specifications): Comment update.
3448         * par.adb: Comment updates.
3450 2015-02-05  Robert Dewar  <dewar@adacore.com>
3452         * errout.adb (Handle_Serious_Error): New setting of Fatal_Error.
3453         * frontend.adb (Frontend): New setting of Fatal_Error.
3454         * lib-load.adb (Create_Dummy_Package_Unit): New setting of
3455         Fatal_Error.
3456         (Load_Main_Source): New setting of Fatal_Error
3457         (Load_Unit): New setting of Fatal_Error.
3458         * lib-writ.adb (Add_Preprocessing_Dependency): New setting of
3459         Fatal_Error.
3460         (Ensure_System_Dependency): New setting of Fatal_Error.
3461         * lib.adb (Fatal_Error): New setting of Fatal_Error
3462         (Set_Fatal_Error): New setting of Fatal_Error.
3463         * lib.ads: New definition of Fatal_Error and associated routines.
3464         * par-ch10.adb (P_Compilation_Unit): New setting of Fatal_Error.
3465         * par-load.adb (Load): New setting of Fatal_Error.
3466         * rtsfind.adb (Load_RTU): New setting of Fatal_Error.
3467         * sem_ch10.adb (Analyze_Compilation_Unit): New setting of
3468         Fatal_Error.
3469         (Optional_Subunit): New setting of Fatal_Error.
3470         (Analyze_Proper_Body): New setting of Fatal_Error.
3471         (Load_Needed_Body): New setting of Fatal_Error.
3473 2015-02-05  Ed Schonberg  <schonberg@adacore.com>
3475         * sem_res.adb (Resolve_Call): If the function being called has
3476         out parameters do not check for language version if the function
3477         comes from a predefined unit, as those are always compiled in
3478         Ada 2012 mode.
3480 2015-02-05  Ed Schonberg  <schonberg@adacore.com>
3482         * sem_ch3.adb (Process_Full_View): Verify that the full view
3483         of a type extension must carry an explicit limited keyword if
3484         the partial view does (RM 7.3 (10.1)).
3486 2015-02-05  Robert Dewar  <dewar@adacore.com>
3488         * g-rannum.adb, g-rannum.ads, s-rannum.adb, s-rannum.ads,
3489         sem_warn.ads: Minor reformatting.
3490         * exp_ch13.adb (Expand_N_Freeze_Entity): Add guard for aspect
3491         deleted by -gnatI.
3492         * sem_prag.adb (Analyze_Pragma, case Type_Invariant): Give
3493         error for abstract type.
3495 2015-02-05  Yannick Moy  <moy@adacore.com>
3497         * opt.ads (Warn_On_Suspicious_Contract): Update comment
3498         describing use.
3499         * sem_attr.adb (Analyze_Attribute/Attribute_Update): Warn on
3500         suspicious uses of 'Update.
3501         * sem_warn.adb, sem_warn.ads (Warn_On_Suspicious_Update): New
3502         function issues warning on suspicious uses of 'Update.
3503         * g-rannum.adb, g-rannum.ads, s-rannum.adb, s-rannum.ads: Mark
3504         package spec and body as SPARK_Mode Off.
3506 2015-02-05  Robert Dewar  <dewar@adacore.com>
3508         * sem_prag.adb (Set_Elab_Unit_Name): New name for Set_Unit_Name
3509         (Analyze_Pragma): Change Set_Unit_Name to Set_Elab_Unit_Name
3510         (Set_Elab_Unit_Name): Generate reference for Elaborate[_All]
3511         * sem_warn.adb (Warn_On_Unreferenced_Entity): Suppress warning
3512         for exported entity.
3514 2015-02-05  Hristian Kirtchev  <kirtchev@adacore.com>
3516         * sem_prag.adb (Check_Pragma_Conformance): Add
3517         local variable Arg. Ensure that all errors are associated with
3518         the pragma if it appears without an argument. Add comments on
3519         various cases.
3521 2015-02-05  Robert Dewar  <dewar@adacore.com>
3523         * lib-xref.adb: Minor reformatting.
3525 2015-02-05  Tristan Gingold  <gingold@adacore.com>
3527         PR ada/64349da/64349
3528         * env.c: Fix thinko: handle Darwin case before default one.
3530 2015-01-30  Robert Dewar  <dewar@adacore.com>
3532         * a-assert.adb: Minor reformatting.
3533         * sem_ch13.adb: Minor comment clarification.
3534         * types.ads: Minor comment update.
3535         * sem_eval.adb (Real_Or_String_Static_Predicate_Matches): Avoid blow up
3536         when we have a predicate that is nothing but an inherited dynamic
3537         predicate.
3539 2015-01-30  Jerome Guitton  <guitton@adacore.com>
3541         * gcc-interface/Makefile.in (x86-vxworks): Update GCC_SPEC_FILES to
3542         include cert link spec.
3544 2015-01-30  Robert Dewar  <dewar@adacore.com>
3546         * einfo.ads: Minor comment fix.
3547         * freeze.adb (Freeze_Profile): Add test for suspicious import
3548         in pure unit.
3549         * sem_prag.adb (Process_Import_Or_Interface): Test for suspicious
3550         use in Pure unit is now moved to Freeze (to properly catch
3551         Pure_Function exemption).
3553 2015-01-30  Bob Duff  <duff@adacore.com>
3555         * sem_res.ads: Minor comment fix.
3556         * sem_type.adb: sem_type.adb (Remove_Conversions): Need to
3557         check both operands of an operator.
3559 2015-01-30  Yannick Moy  <moy@adacore.com>
3561         * a-assert.ads, a-assert.adb: Mark package spec in SPARK. Set assertion
3562         policy for Pre to Ignore.
3563         (Assert): Add precondition.
3565 2015-01-30  Robert Dewar  <dewar@adacore.com>
3567         * sem_prag.adb (Process_Import_Or_Interface): Warn if used in
3568         Pure unit.
3569         * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Clarify
3570         documentation for some special cases of invalid attempts at
3571         based integers.
3573 2015-01-30  Gary Dismukes  <dismukes@adacore.com>
3575         * errout.ads: Minor reformatting.
3577 2015-01-30  Yannick Moy  <moy@adacore.com>
3579         * inline.adb (Process_Formals): Use the sloc of
3580         the inlined node instead of the sloc of the actual parameter,
3581         when replacing formal parameters by the actual one.
3583 2015-01-30  Arnaud Charlet  <charlet@adacore.com>
3585         * g-expect.adb (Get_Command_Output): Use infinite timeout when
3586         calling Expect.
3588 2015-01-30  Ed Schonberg  <schonberg@adacore.com>
3590         * sem_ch12.adb (Analyze_Associations): If an in-parameter is
3591         defaulted in an instantiation, add an entry in the list of actuals
3592         to indicate the default value of the formal (as is already done
3593         for defaulted subprograms).
3595 2015-01-30  Javier Miranda  <miranda@adacore.com>
3597         * errout.adb (Error_Msg_PT): Minor error phrasing update.
3599 2015-01-30  Robert Dewar  <dewar@adacore.com>
3601         * sem_warn.adb (Warn_On_Known_Condition): Improve error message
3602         for object case.
3604 2015-01-30  Pierre-Marie de Rodat  <derodat@adacore.com>
3606         * exp_dbug.adb (Get_Encoded_Name): When
3607         -fgnat-encodings=minimal, do not generate names for biased types.
3609 2015-01-30  Tristan Gingold  <gingold@adacore.com>
3611         PR ada/64349
3612         * env.c: Move vxworks and darwin includes out of #ifdef IN_RTS.
3614 2015-01-30  Gary Dismukes  <dismukes@adacore.com>
3616         * freeze.adb: Minor reformatting.
3618 2015-01-30  Javier Miranda  <miranda@adacore.com>
3620         * errout.ads (Error_Msg_PT): Replace Node_Id by Entity_Id and
3621         improve its documentation.
3622         * errout.adb (Error_Msg_PT): Improve the error message.
3623         * sem_ch6.adb (Check_Conformance): Update call to Error_Msg_PT.
3624         (Check_Synchronized_Overriding): Update call to Error_Msg_PT.
3625         * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup.
3627 2015-01-30  Robert Dewar  <dewar@adacore.com>
3629         * sem_warn.adb (Warn_On_Known_Condition): Do special casing of
3630         message for False case.
3632 2015-01-30  Doug Rupp  <rupp@adacore.com>
3634         * s-vxwext-kernel.ads (Task_Cont): Remove imported subprogram body.
3635         * s-vxwext-kernel.adb (Task_Cont): New subpprogram body specialized for
3636         kernel.
3638 2015-01-30  Gary Dismukes  <dismukes@adacore.com>
3640         * sem_attr.adb (Declared_Within_Generic_Unit):
3641         New function to test whether an entity is declared within the
3642         declarative region of a given generic unit.
3643         (Resolve_Attribute): For checking legality of subprogram'Access within
3644         a generic unit, call new Boolean function Declared_Within_Generic_Unit
3645         instead of simply comparing the results of Enclosing_Generic_Unit on
3646         the prefix and access type.  Correct minor comment typos.
3648 2015-01-30  Robert Dewar  <dewar@adacore.com>
3650         * freeze.adb, exp_util.ads: Update comment.
3651         * exp_util.adb, exp_ch3.adb: Minor code reorganization and reformatting.
3652         * sem_util.adb: Minor: fix typo.
3654 2015-01-30  Hristian Kirtchev  <kirtchev@adacore.com>
3656         * sem_attr.adb (Analyze_Attribute): Ensure that
3657         the check concerning Refined_Post takes precedence over the
3658         other cases.
3660 2015-01-30  Gary Dismukes  <dismukes@adacore.com>
3662         * sem_prag.adb: Minor typo fixes and reformatting.
3664 2015-01-30  Yannick Moy  <moy@adacore.com>
3666         * sem_attr.adb: Code clean up.
3668 2015-01-30  Robert Dewar  <dewar@adacore.com>
3670         * ali.adb (Scan_ALI): Set Serious_Errors flag in Unit record.
3671         * ali.ads (Unit_Record): Add new field Serious_Errors.
3672         * lib-writ.adb (Write_Unit_Information): Set SE (serious errors)
3673         attribute in U line.
3674         * lib-writ.ads: New attribute SE (serious erors) in unit line.
3676 2015-01-30  Hristian Kirtchev  <kirtchev@adacore.com>
3678         * einfo.adb Update the usage of attributes Entry_Bodies_Array,
3679         Lit_Indexes, Scale_Value, Storage_Size_Variable,
3680         String_Literal_Low_Bound along associated routines and
3681         Write_FieldX_Name.
3682         (Pending_Access_Types): New routine.
3683         (Set_Pending_Access_Types): New routine.
3684         (Write_Field15_Name): Add an entry for Pending_Access_Types.
3685         * einfo.ads Add new attribute Pending_Access_Types along
3686         with usage in nodes.  Update the usage of attributes
3687         Entry_Bodies_Array, Lit_Indexes, Scale_Value,
3688         Storage_Size_Variable, String_Literal_Low_Bound.
3689         (Pending_Access_Types): New routine along with pragma Inline.
3690         (Set_Pending_Access_Types): New routine along with pragma Inline.
3691         * exp_ch3.adb (Expand_Freeze_Array_Type): Add new local variable
3692         Ins_Node. Determine the insertion node for anonynous access type
3693         that acts as a component type of an array. Update the call to
3694         Build_Finalization_Master.
3695         (Expand_Freeze_Record_Type): Update
3696         the calls to Build_Finalization_Master.
3697         (Freeze_Type): Remove
3698         local variable RACW_Seen. Factor out the code that deals with
3699         remote access-to-class-wide types. Create a finalization master
3700         when the designated type contains a private component. Fully
3701         initialize all pending access types.
3702         (Process_RACW_Types): New routine.
3703         (Process_Pending_Access_Types): New routine.
3704         * exp_ch4.adb (Expand_Allocator_Expression): Allocation no longer
3705         needs to set primitive Finalize_Address.
3706         (Expand_N_Allocator): Allocation no longer sets primitive
3707         Finalize_Address.
3708         * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
3709         Update the call to Build_Finalization_Master.
3710         (Make_Build_In_Place_Call_In_Allocator): Allocation no longer
3711         needs to set primitive Finalize_Address.
3712         * exp_ch7.adb (Add_Pending_Access_Type): New routine.
3713         (Build_Finalization_Master): New parameter profile. Associate
3714         primitive Finalize_Address with the finalization master if the
3715         designated type has been frozen, otherwise treat the access
3716         type as pending. Simplify the insertion of the master and
3717         related initialization code.
3718         (Make_Finalize_Address_Body): Allow Finalize_Address for class-wide
3719         abstract types.
3720         (Make_Set_Finalize_Address_Call): Remove forlam parameter Typ.
3721         Simplify the implementation.
3722         * exp_ch7.ads (Build_Finalization_Master): New parameter profile
3723         along with comment on usage.
3724         (Make_Set_Finalize_Address_Call): Remove formal parameter Typ. Update
3725         the comment on usage.
3726         * exp_util.adb (Build_Allocate_Deallocate_Proc): Use routine
3727         Finalize_Address to retrieve the primitive.
3728         (Finalize_Address): New routine.
3729         (Find_Finalize_Address): Removed.
3730         * exp_util.ads (Finalize_Address): New routine.
3731         * freeze.adb (Freeze_All): Remove the generation of finalization
3732         masters.
3733         * sem_ch3.adb (Analyze_Full_Type_Declaration): Propagate any
3734         pending access types from the partial to the full view.
3736 2015-01-30  Robert Dewar  <dewar@adacore.com>
3738         * sem_disp.adb: Minor reformatting.
3739         * sem_disp.ads: Documentation update.
3741 2015-01-30  Ed Schonberg  <schonberg@adacore.com>
3743         * sem_disp.adb (Is_Dynamically_Tagged): when applied to an entity
3744         or a function call, return True if type is class-wide.
3745         * sem_res.adb (Resolve_Case_Expression, Resolve_If_Expression);
3746         Apply RM 4.5.7 (17/3): all or none of the dependent expression
3747         of a conditional expression must be dynamically tagged.
3749 2015-01-30  Ed Schonberg  <schonberg@adacore.com>
3751         * sem_ch6.adb (Analyze_Function_Return): In an extended return
3752         statement, apply accessibility check to result object when there
3753         is no initializing expression (Ada 2012 RM 6.5 (5.4/3))
3755 2015-01-30  Robert Dewar  <dewar@adacore.com>
3757         * sem_ch4.adb (Analyze_If_Expression): Allow for non-standard
3758         Boolean for case where ELSE is omitted.
3759         * sem_res.adb: Minor reformatting.
3761 2015-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3763         Fix build under cygwin/64.
3764         * adaint.h: Add check for __CYGWIN__.
3765         * mingw32.h: Prevent windows.h from including x86intrin.h in GCC.
3767 2015-01-19  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3769         PR ada/64640
3770         * adaint.c: Handle __CYGWIN__ like __MINGW32__ here.
3771         * mingw32.h: Don't include <tchar.h> under cygwin.
3772         (_O_U8TEXT, _O_U16TEXT, _O_WTEXT): Set to _O_TEXT if not yet defined.
3774 2015-01-15  Thomas Schwinge  <thomas@codesourcery.com>
3776         * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8)
3777         (DEF_FUNCTION_TYPE_VAR_12): New macros.
3779 2015-01-09  Michael Collison  <michael.collison@linaro.org>
3781         * gcc-interface/cuintp.c: Include hash-set.h, machmode.h,
3782         vec.h, double-int.h, input.h, alias.h, symtab.h,
3783         fold-const.h, wide-int.h, and inchash.h due to
3784         flattening of tree.h.
3785         * gcc-interface/decl.c: Ditto.
3786         * gcc-interface/misc.c: Ditto.
3787         * gcc-interface/targtyps.c: Include hash-set.h, machmode.h,
3788         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h,
3789         fold-const.h, wide-int.h, and inchash.h due to
3790         flattening of tree.h.
3791         * gcc-interface/trans.c: Include hash-set.h, machmode.h,
3792         vec.h, double-int.h, input.h, alias.h, symtab.h, real.h,
3793         fold-const.h, wide-int.h, inchash.h due to
3794         flattening of tree.h.
3795         * gcc-interface/utils.c: Include hash-set.h, machmode.h,
3796         vec.h, double-int.h, input.h, alias.h, symtab.h,
3797         fold-const.h, wide-int.h, and inchash.h due to
3798         flattening of tree.h.
3799         * gcc-interface/utils2.c: Ditto.
3801 2015-01-07  Robert Dewar  <dewar@adacore.com>
3803         * sem_warn.adb (Check_One_Unit): Don't give unused entities
3804         warning for a package which is used as a generic parameter.
3806 2015-01-07  Bob Duff  <duff@adacore.com>
3808         * usage.adb (Usage): Correct documentation of
3809         -gnatw.f switches.
3811 2015-01-07  Robert Dewar  <dewar@adacore.com>
3813         * s-fileio.adb: Minor reformatting.
3815 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
3817         * sem_ch12.adb (Instantiate_Object): If formal is an anonymous
3818         access to subprogram, replace its formals with new entities when
3819         building the object declaration, both if actual is present and
3820         when it is defaulted.
3822 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
3824         * sem_ch5.adb (Analyze_Assignment): If left-hand side is a view
3825         conversion and type of expression has invariant, apply invariant
3826         check on expression.
3828 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
3830         * sem_ch3.adb (Create_Constrained_Components): A call to
3831         Gather_Components may detect an error if an inherited discriminant
3832         that controls a variant is non-static.
3833         * sem_aggr.adb (Resolve_Record_Aggregate, Step 5): The call to
3834         Gather_Components may report an error if an inherited discriminant
3835         in a variant in non-static.
3836         * sem_util.adb (Gather_Components): If a non-static discriminant
3837         is inherited do not report error here, but let caller handle it.
3838         (Find_Actual): Small optimization.
3840 2015-01-07  Bob Duff  <duff@adacore.com>
3842         * usage.adb (Usage): Document -gnatw.f switch.
3844 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
3846         * sem_ch12.adb: Code clean up and minor reformatting.
3848 2015-01-07  Robert Dewar  <dewar@adacore.com>
3850         * exp_ch4.adb (Expand_N_Type_Conversion): Add guard for
3851         Raise_Accessibility_Error call.
3852         * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Add documentation
3853         on handling of invalid digits in based constants.
3854         * s-fatgen.ads: Minor reformatting.
3855         * sem_attr.adb (Analyze_Attribute, case Unrestricted_Access):
3856         Avoid noting bogus modification for Valid test.
3857         * snames.ads-tmpl (Name_Attr_Long_Float): New Name.
3858         * einfo.ads: Minor reformatting.
3859         * sem_warn.adb: Minor comment clarification.
3860         * sem_ch12.adb: Minor reformatting.
3862 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
3864         * exp_ch5.adb (Expand_Predicated_Loop): Handle properly loops
3865         over static predicates when the loop parameter specification
3866         carries a Reverse indicator.
3868 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
3870         * sem_ch12.adb (Instantiate_Object): If formal has a default,
3871         actual is missing and formal has an anonymous access type, copy
3872         access definition in full so that tree for instance is properly
3873         formatted for ASIS use.
3875 2015-01-07  Bob Duff  <duff@adacore.com>
3877         * sem_elab.adb (Check_Internal_Call_Continue): Give a warning
3878         for P'Access, where P is a subprogram in the same package as
3879         the P'Access, and the P'Access is evaluated at elaboration
3880         time, and occurs before the body of P. For example, "X : T :=
3881         P'Access;" would allow a subsequent call to X.all to be an
3882         access-before-elaboration error; hence the warning. This warning
3883         is enabled by the -gnatw.f switch.
3884         * opt.ads (Warn_On_Elab_Access): New flag for warning switch.
3885         * warnsw.adb (Set_Dot_Warning_Switch): Set Warn_On_Elab_Access.
3886         * gnat_ugn.texi: Document the new warning.
3888 2015-01-07  Johannes Kanig  <kanig@adacore.com>
3890         * lib-xref-spark_specific.adb (Collect_SPARK_Xrefs): Skip unneeded
3891         cross ref files.
3893 2015-01-07  Robert Dewar  <dewar@adacore.com>
3895         * s-taprop-linux.adb, clean.adb: Minor reformatting.
3897 2015-01-07  Arnaud Charlet  <charlet@adacore.com>
3899         * s-tassta.adb: Relax some overzealous assertions.
3901 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
3903         * sem_ch6.adb (Analyze_Return_Type): An call that returns a limited
3904         view of a type is legal when context is a thunk generated for
3905         operation inherited from an interface.
3906         * exp_ch6.adb (Expand_Simple_Function_Return): If context is
3907         a thunk and return type is an incomplete type do not continue
3908         expansion; thunk will be fully elaborated when generating code.
3910 2015-01-07  Doug Rupp  <rupp@adacore.com>
3912         * s-osinte-mingw.ads (LARGE_INTEGR): New subtype.
3913         (QueryPerformanceFrequency): New imported procedure.
3914         * s-taprop-mingw.adb (RT_Resolution): Call above and return
3915         resolution vice a hardcoded value.
3916         * s-taprop-solaris.adb (RT_Resolution): Call clock_getres and return
3917         resolution vice a hardcoded value.
3918         * s-linux-android.ads (clockid_t): New subtype.
3919         * s-osinte-aix.ads (clock_getres): New imported subprogram.
3920         * s-osinte-android.ads (clock_getres): Likewise.
3921         * s-osinte-freebsd.ads (clock_getres): Likewise.
3922         * s-osinte-solaris-posix.ads (clock_getres): Likewise.
3923         * s-osinte-darwin.ads (clock_getres): New subprogram.
3924         * s-osinte-darwin.adb (clock_getres): New subprogram.
3925         * thread.c (__gnat_clock_get_res) [__APPLE__]: New function.
3926         * s-taprop-posix.adb (RT_Resolution): Call clock_getres to
3927         calculate resolution vice hard coded value.
3929 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
3931         * exp_util.adb (Make_CW_Equivalent_Type): If root type is a
3932         limited view, use non-limited view when available to create
3933         equivalent record type.
3935 2015-01-07  Vincent Celier  <celier@adacore.com>
3937         * gnatcmd.adb: Remove command Sync and any data and processing
3938         related to this command. Remove project processing for gnatstack.
3939         * prj-attr.adb: Remove package Synchonize and its attributes.
3941 2015-01-07  Vincent Celier  <celier@adacore.com>
3943         * clean.adb: Minor error message change.
3945 2015-01-07  Tristan Gingold  <gingold@adacore.com>
3947         PR ada/64349  
3948         * env.c (__gnat_environ): Adjust for darwin9/darwin10.
3950 2015-01-07  Javier Miranda  <miranda@adacore.com>
3952         * sem_ch10.adb (Analyze_With_Clause): Compiling under -gnatq
3953         protect the frontend against never ending recursion caused by
3954         circularities in the sources.
3956 2015-01-07  Robert Dewar  <dewar@adacore.com>
3958         * a-reatim.adb, make.adb, exp_pakd.adb, i-cpoint.adb, sem_ch8.adb,
3959         exp_ch3.adb: Minor reformatting.
3961 2015-01-07  Doug Rupp  <rupp@adacore.com>
3963         * s-linux.ads (clockid_t): New subtype.
3964         * s-osinte-linux.ads (pragma Linker Options): Add -lrt.
3965         (clockid_t): New subtype.
3966         (clock_getres): Import system call.
3967         * s-taprop-linux.adb (System.OS_Constants): With and rename.
3968         (RT_Resolution): Remove
3969         hardcoded value and call clock_getres.
3970         * s-linux-sparc.ads, s-linux-mipsel.ads, s-linux-hppa.ads,
3971         s-linux-alpha.ads, s-linux-x32.ads (clockid_t): Add new subtype.
3973 2015-01-07  Robert Dewar  <dewar@adacore.com>
3975         * sem_warn.adb (Check_One_Unit): Guard against context item
3976         with no Entity field.
3978 2015-01-07  Vincent Celier  <celier@adacore.com>
3980         * clean.adb (Gnatclean): Warn that 'gnatclean -P' is obsolete.
3981         * make.adb (Initialize): Warn that 'gnatmake -P' is obsolete.
3983 2015-01-07  Vincent Celier  <celier@adacore.com>
3985         * prj-conf.adb (Parse_Project_And_Apply_Config): Always finalize
3986         errors/warnings in the first parsing of the project files,
3987         to display the warnings when there is no errors.
3989 2015-01-07  Tristan Gingold  <gingold@adacore.com>
3991         * i-cpoint.adb (Copy_Terminated_Array): Nicely handle null target.
3993 2015-01-07  Doug Rupp  <rupp@adacore.com>
3995         * s-taprop-vxworks.adb (Stop_All_Tasks): Pass return
3996         value from Int_Lock as parameter to Int_Unlock.
3997         * s-osinte-vxworks.ads (Int_Unlock): Add parameter.
3998         * s-vxwext.ads (Int_Unlock): Likewise.
3999         * s-vxwext-kernel.adb (intUnlock, Int_Unlock): Likewise.
4000         * s-vxwext-kernel.ads (Int_Unlock): Likewise.
4001         * s-vxwext-rtp.adb (Int_Unlock): Likewise.
4002         * s-vxwext-rtp.ads (Int_Unlock): Likewise.
4004 2015-01-07  Pierre-Marie de Rodat  <derodat@adacore.com>
4006         * exp_pakd.adb: Add a comment in exp_pakd.adb to explain why we
4007         keep ___XP suffixes
4009 2015-01-07  Tristan Gingold  <gingold@adacore.com>
4011         * i-cpoint.adb (Copy_Terminated_Array): Use Copy_Array to
4012         handle overlap.
4014 2015-01-07  Eric Botcazou  <ebotcazou@adacore.com>
4016         * sem_ch3.adb (Analyze_Full_Type_Declaration): Do not
4017         automatically set No_Strict_Aliasing on access types.
4018         * fe.h (No_Strict_Aliasing_CP): Declare.
4019         * gcc-interface/trans.c (gigi): Force flag_strict_aliasing to 0 if
4020         No_Strict_Aliasing_CP is set.
4022 2015-01-07  Johannes Kanig  <kanig@adacore.com>
4024         * sem_ch8.adb (Analyze_Subprogram_Renaming) do
4025         not build function wrapper in gnatprove mode when the package
4026         is externally axiomatized.
4028 2015-01-07  Jose Ruiz  <ruiz@adacore.com>
4030         * a-reatim.adb (Time_Of): Reduce the number of spurious overflows in
4031         intermediate computations when the parameters have different signs.
4033 2015-01-07  Javier Miranda  <miranda@adacore.com>
4035         * exp_ch3.adb (Build_Init_Procedure): For derived types,
4036         improve the code which takes care of identifying and moving to
4037         the beginning of the init-proc the call to the init-proc of the
4038         parent type.
4040 2015-01-07  Olivier Hainque  <hainque@adacore.com>
4042         * gcc-interface/trans.c (gnat_to_gnu, <N_Expression_With_Action>):
4043         Elaborate the expression as part of the same stmt group as the actions.
4045 2015-01-07  Robert Dewar  <dewar@adacore.com>
4047         * sem_ch3.adb: Minor error message change.
4049 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
4051         * sem_prag.adb (Analyze_Pragma, case Preelaborable_Initialization):
4052         Following AI05-028, the pragam applies legally to any composite type.
4054 2015-01-07  Arnaud Charlet  <charlet@adacore.com>
4056         * s-osinte-vxworks.adb, s-osinte-vxworks.ads
4057         (sigwait, sigwaitinfo): Removed, not needed after all on any
4058         VxWorks configurations.
4060 2015-01-07  Robert Dewar  <dewar@adacore.com>
4062         * sem_ch3.adb, freeze.adb, exp_disp.adb: Minor reformatting.
4064 2015-01-07  Javier Miranda  <miranda@adacore.com>
4066         * exp_disp.adb (Expand_Interface_Conversion): Adding missing
4067         generation of accessibility check.
4069 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
4071         * sem_ch3.adb (Derived_Type_Declaration): In the case of an
4072         illegal completion from a class- wide type, set etype of the
4073         derived type properly to prevent cascaded errors.
4075 2015-01-07  Robert Dewar  <dewar@adacore.com>
4077         * prj.ads, i-cpoint.adb, freeze.adb, ghost.adb, prj-err.adb: Minor
4078         reformatting.
4080 2015-01-07  Robert Dewar  <dewar@adacore.com>
4082         * restrict.adb (Check_Restriction_No_Use_Of_Attribute):
4083         New procedure.
4084         (OK_No_Use_Of_Entity_Name): New function.
4085         (Set_Restriction_No_Use_Of_Entity): New procedure.
4086         * restrict.ads (Check_Restriction_No_Use_Of_Attribute):
4087         New procedure.
4088         (OK_No_Use_Of_Entity_Name): New function.
4089         (Set_Restriction_No_Use_Of_Entity): New procedure.
4090         * sem_ch8.adb (Find_Direct_Name): Add check for violation of
4091         No_Use_Of_Entity.
4092         * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
4093         Add processing for new restriction No_Use_Of_Entity.
4095 2015-01-07  Eric Botcazou  <ebotcazou@adacore.com>
4097         * freeze.adb (Freeze_Array_Type): Apply same handling to Is_Atomic
4098         component type as to Has_Atomic_Components type.  Remove useless
4099         test on Is_Aliased component type.
4101 2015-01-07  Hristian Kirtchev  <kirtchev@adacore.com>
4103         * alloc.ads Alphabetize several declarations. Add constants
4104         Ignored_Ghost_Units_Initial and Ignored_Ghost_Units_Increment.
4105         * atree.adb Add with and use clauses for Opt.
4106         (Allocate_Initialize_Node): Mark a node as ignored Ghost
4107         if it is created in an ignored Ghost region.
4108         (Ekind_In): New variant.
4109         (Is_Ignored_Ghost_Node): New routine.
4110         (Set_Is_Ignored_Ghost_Node): New routine.
4111         * atree.adb Aplhabetize several subprograms declarations. Flag
4112         Spare0 is now known as Is_Ignored_Ghost_Node.
4113         (Ekind_In): New variant.
4114         (Is_Ignored_Ghost_Node): New routine.
4115         (Set_Is_Ignored_Ghost_Node): New routine.
4116         * einfo.adb: Flag 279 is now known as Contains_Ignored_Ghost_Code.
4117         (Contains_Ignored_Ghost_Code): New routine.
4118         (Set_Contains_Ignored_Ghost_Code): New routine.
4119         (Set_Is_Checked_Ghost_Entity, Set_Is_Ignored_Ghost_Entity):
4120         It is now possible to set this property on an unanalyzed entity.
4121         (Write_Entity_Flags): Output the status of flag
4122         Contains_Ignored_Ghost_Code.
4123         * einfo.ads New attribute Contains_Ignored_Ghost_Code along with
4124         usage in nodes.
4125         (Contains_Ignored_Ghost_Code): New routine
4126         along with pragma Inline.
4127         (Set_Contains_Ignored_Ghost_Code): New routine along with pragma Inline.
4128         * exp_ch3.adb Add with and use clauses for Ghost.
4129         (Freeze_Type): Capture/restore the value of Ghost_Mode on entry/exit.
4130         Set the Ghost_Mode in effect.
4131         (Restore_Globals): New routine.
4132         * exp_ch7.adb (Process_Declarations): Do not process a context
4133         that invoves an ignored Ghost entity.
4134         * exp_dbug.adb (Qualify_All_Entity_Names): Skip an ignored Ghost
4135         construct that has been rewritten as a null statement.
4136         * exp_disp.adb Add with and use clauses for Ghost.
4137         (Make_DT): Capture/restore the value of Ghost_Mode on entry/exit. Set
4138         the Ghost_Mode in effect.
4139         (Restore_Globals): New routine.
4140         * exp_util.adb (Requires_Cleanup_Actions): An ignored Ghost entity
4141         does not require any clean up. Add two missing cases that deal
4142         with block statements.
4143         * freeze.adb Add with and use clauses for Ghost.
4144         (Freeze_Entity): Capture/restore the value of Ghost_Mode on entry/exit.
4145         Set the Ghost_Mode in effect.
4146         (Restore_Globals): New routine.
4147         * frontend.adb Add with and use clauses for Ghost. Remove any
4148         ignored Ghost code from all units that qualify.
4149         * ghost.adb New unit.
4150         * ghost.ads New unit.
4151         * gnat1drv.adb Add with clause for Ghost. Initialize and lock
4152         the table in package Ghost.
4153         * lib.ads: Alphabetize several subprogram declarations.
4154         * lib-xref.adb (Output_References): Do not generate reference
4155         information for ignored Ghost entities.
4156         * opt.ads Add new type Ghost_Mode_Type and new global variable
4157         Ghost_Mode.
4158         * rtsfind.adb (Load_RTU): Provide a clean environment when
4159         loading a runtime unit.
4160         * sem.adb (Analyze): Capture/restore the value of Ghost_Mode on
4161         entry/exit as the node may set a different mode.
4162         (Do_Analyze):
4163         Capture/restore the value of Ghost_Mode on entry/exit as the
4164         unit may be withed from a unit with a different Ghost mode.
4165         * sem_ch3.adb Add with and use clauses for Ghost.
4166         (Analyze_Full_Type_Declaration, Analyze_Incomplete_Type_Decl,
4167         Analyze_Number_Declaration, Analyze_Private_Extension_Declaration,
4168         Analyze_Subtype_Declaration): Set the Ghost_Mode in effect. Mark
4169         the entity as Ghost when there is a Ghost_Mode in effect.
4170         (Array_Type_Declaration): The implicit base type inherits the
4171         "ghostness" from the array type.
4172         (Derive_Subprogram): The
4173         alias inherits the "ghostness" from the parent subprogram.
4174         (Make_Implicit_Base): The implicit base type inherits the
4175         "ghostness" from the parent type.
4176         * sem_ch5.adb Add with and use clauses for Ghost.
4177         (Analyze_Assignment): Set the Ghost_Mode in effect.
4178         * sem_ch6.adb Add with and use clauses for Ghost.
4179         (Analyze_Abstract_Subprogram_Declaration, Analyze_Procedure_Call,
4180         Analyze_Subprogram_Body_Helper, Analyze_Subprogram_Declaration):
4181         Set the Ghost_Mode in effect. Mark the entity as Ghost when
4182         there is a Ghost_Mode in effect.
4183         * sem_ch7.adb Add with and use clauses for Ghost.
4184         (Analyze_Package_Body_Helper, Analyze_Package_Declaration,
4185         Analyze_Private_Type_Declaration): Set the Ghost_Mode in
4186         effect. Mark the entity as Ghost when there is a Ghost_Mode
4187         in effect.
4188         * sem_ch8.adb Add with and use clauses for Ghost.
4189         (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
4190         Analyze_Object_Renaming, Analyze_Package_Renaming,
4191         Analyze_Subprogram_Renaming): Set the Ghost_Mode in effect. Mark
4192         the entity as Ghost when there is a Ghost_Mode in effect.
4193         (Find_Type): Check the Ghost context of a type.
4194         * sem_ch11.adb Add with and use clauses for Ghost.
4195         (Analyze_Exception_Declaration): Set the Ghost_Mode in
4196         effect. Mark the entity as Ghost when there is a Ghost_Mode
4197         in effect.
4198         * sem_ch12.adb Add with and use clauses for Ghost.
4199         (Analyze_Generic_Package_Declaration,
4200         Analyze_Generic_Subprogram_Declaration): Set the Ghost_Mode in effect.
4201         Mark the entity as Ghost when there is a Ghost_Mode in effect.
4202         * sem_prag.adb Add with and use clauses for Ghost.
4203         (Analyze_Pragma): Ghost-related checks are triggered when there
4204         is a Ghost mode in effect.
4205         (Create_Abstract_State): Mark the
4206         entity as Ghost when there is a Ghost_Mode in effect.
4207         * sem_res.adb Add with and use clauses for Ghost.
4208         (Check_Ghost_Context): Removed.
4209         * sem_util.adb (Check_Ghost_Completion): Removed.
4210         (Check_Ghost_Derivation): Removed.
4211         (Incomplete_Or_Partial_View):
4212         Add a guard in case the entity has not been analyzed yet
4213         and does carry a scope.
4214         (Is_Declaration): New routine.
4215         (Is_Ghost_Entity): Removed.
4216         (Is_Ghost_Statement_Or_Pragma):
4217         Removed.
4218         (Is_Subject_To_Ghost): Removed.
4219         (Set_Is_Ghost_Entity):
4220         Removed.
4221         (Within_Ghost_Scope): Removed.
4222         * sem_util.adb (Check_Ghost_Completion): Removed.
4223         (Check_Ghost_Derivation): Removed.
4224         (Is_Declaration): New routine.
4225         (Is_Ghost_Entity): Removed.
4226         (Is_Ghost_Statement_Or_Pragma): Removed.
4227         (Is_Subject_To_Ghost): Removed.
4228         (Set_Is_Ghost_Entity): Removed.
4229         (Within_Ghost_Scope): Removed.
4230         * sinfo.ads Add a section on Ghost mode.
4231         * treepr.adb (Print_Header_Flag): New routine.
4232         (Print_Node_Header): Factor out code. Output flag
4233         Is_Ignored_Ghost_Node.
4234         * gcc-interface/Make-lang.in: Add dependency for unit Ghost.
4236 2015-01-06  Eric Botcazou  <ebotcazou@adacore.com>
4238         * freeze.adb (Freeze_Array_Type) <Complain_CS>: Remove always
4239         true test and unreachable 'else' arm.
4241 2015-01-06  Vincent Celier  <celier@adacore.com>
4243         * prj-conf.adb (Check_Target): Improve error message when
4244         there are mismatched targets between the on in the configuration
4245         project file and the specified one, either in the main project
4246         file or in the --target= switch.
4248 2015-01-06  Pascal Obry  <obry@adacore.com>
4250         * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Mode and
4251         Install_Name attribute definitions.
4253 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
4255         * freeze.adb (Wrap_Imported_Subprogram): Indicate that the
4256         generated Import pragma for the internal imported procedure does
4257         not come from an aspect, so that Is_Imported can be properly
4258         set for it.
4260 2015-01-06  Gary Dismukes  <dismukes@adacore.com>
4262         * sem_ch12.adb (Might_Inline_Subp): Record whether
4263         any subprograms in the generic package are marked with
4264         pragma Inline_Always (setting flag Has_Inline_Always).
4265         (Analyze_Package_Instantiation): Add test of Has_Inline_Always
4266         alongside existing test of Front_End_Inlining as alternative
4267         conditions for setting Inline_Now. Also add test of
4268         Has_Inline_Always along with Front_End_Inlining test as an
4269         alternative condition for setting Needs_Body to False.
4271 2015-01-06  Tristan Gingold  <gingold@adacore.com>
4273         * i-cpoint.adb (Copy_Array): Handle overlap.
4275 2015-01-06  Pascal Obry  <obry@adacore.com>
4277         * bindgen.adb: Minor style fix.
4279 2015-01-06  Robert Dewar  <dewar@adacore.com>
4281         * sem_util.ads, sem_util.adb: Minor reformatting.
4283 2015-01-06  Vincent Celier  <celier@adacore.com>
4285         * prj-conf.adb (Parse_Project_And_Apply_Config): Reset incomplete
4286         with flags before parsing the projects.
4287         * prj-err.adb (Error_Msg): Do nothing if there are incomplete withs.
4288         * prj-part.adb (Post_Parse_Context_Clause): Set Incomplete_Withs
4289         to True in the flags, when Ignore_Missing_With is True and an
4290         imported project cannot be found.
4291         * prj-proc.adb (Expression): When there are incomplete withs and
4292         a variable or attribute is not found, set the variable/attribute
4293         to unknown.
4294         * prj.ads (Processing_Flags): New flag Incomplete_Withs,
4295         defaulted to False.
4297 2015-01-06  Vasiliy Fofanov  <fofanov@adacore.com>
4299         * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-conf.adb,
4300         prj-err.adb: Add new switch --no-command-line.
4302 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
4304         * sem_ch12.adb: Sloc of wrapper is that of instantiation.
4306 2015-01-06  Robert Dewar  <dewar@adacore.com>
4308         * sem_ch11.adb: Minor reformatting.
4310 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
4312         * exp_aggr.adb (Get_Assoc_Expr): New routine internal to
4313         Build_Array_Aggr_Code, used to initialized components covered
4314         by a box association. If the component type is scalar and has
4315         a default aspect, use it to initialize such components.
4317 2015-01-06  Pascal Obry  <obry@adacore.com>
4319         * rtinit.c (__gnat_runtime_initialize): Add a parameter to
4320         control the setup of the exception handler.
4321         * initialize.c: Remove unused declaration.
4322         * bindgen.adb: Always call __gnat_runtime_initialize and pass
4323         whether the exeception handler must be set or not.
4325 2015-01-06  Thomas Quinot  <quinot@adacore.com>
4327         * freeze.adb (Set_SSO_From_Defaults): When setting scalar storage
4328         order to native from default, make sure to also adjust bit order.
4329         * exp_aggr.adb: Minor reformatting.
4331 2015-01-06  Robert Dewar  <dewar@adacore.com>
4333         * s-valllu.adb, s-valllu.ads, s-valuti.ads, s-valuns.adb, s-valuns.ads,
4334         s-valrea.adb, s-valrea.ads: Add some additional guards for
4335         Str'Last = Positive'Last.
4337 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
4339         * sem_ch12.adb, sem_ch8.adb: Ongoing work for wrappers for actual
4340         subprograms.
4342 2015-01-06  Javier Miranda  <miranda@adacore.com>
4344         * exp_disp.adb (Expand_Interface_Conversion): Reapply patch.
4346 2015-01-06  Thomas Quinot  <quinot@adacore.com>
4348         * sem_util.ads: Minor reformatting.
4349         * sem_cat.adb (In_RCI_Visible_Declarations): Change back to...
4350         (In_RCI_Declaration) Return to old name, as proper checking of
4351         entity being in the visible part depends on entity kind and must
4352         be done by the caller.
4354 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
4356         * sem_ch12.adb, sem_ch12.ads, sem_ch8.adb: Ongoing work for wrappers
4357         for operators in SPARK.
4359 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
4361         * sem_aggr.adb (Get_Value): In ASIS mode, preanalyze the
4362         expression in an others association before making copies for
4363         separate resolution and accessibility checks. This ensures that
4364         the type of the expression is available to ASIS in all cases,
4365         in particular if the expression is itself an aggregate.
4367 2015-01-06  Eric Botcazou  <ebotcazou@adacore.com>
4369         * einfo.ads (Has_Independent_Components): Document extended
4370         usage.
4371         * einfo.adb (Has_Independent_Components): Remove obsolete assertion.
4372         (Set_Has_Independent_Components): Adjust assertion.
4373         * sem_prag.adb (Analyze_Pragma): Also set Has_Independent_Components
4374         for pragma Atomic_Components.  Set Has_Independent_Components
4375         on the object instead of the type for an object declaration with
4376         pragma Independent_Components.
4378 2015-01-06  Olivier Hainque  <hainque@adacore.com>
4380         * set_targ.adb (Read_Target_Dependent_Values): Set
4381         Long_Double_Index when "long double" is read.
4382         (elaboration code): Register_Back_End_Types only when not reading from
4383         config files. Doing otherwise is pointless and error prone.
4385 2015-01-06  Robert Dewar  <dewar@adacore.com>
4387         * s-valrea.adb (Value_Real): Check for Str'Last = Positive'Last
4389 2015-01-06  Robert Dewar  <dewar@adacore.com>
4391         * a-wtgeau.adb, a-ztgeau.adb, a-tigeau.adb (String_Skip): Raise PE if
4392         Str'Last = Positive'Last.
4394 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
4396         * sem_ch6.adb (Matches_Limited_View): Handle properly the case
4397         where the non-limited type is a generic actual and appears as
4398         a subtype of the non-limited view of the other.
4399         * freeze.adb (Build_Renamed_Body): If the return type of the
4400         declaration that is being completed is a limited view and the
4401         non-limited view is available, use it in the specification of
4402         the generated body.
4404 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
4406         * sem_ch3.adb (Find_Type_Name): If there is a previous tagged
4407         incomplete view, the type of the classwide type common to both
4408         views is the type being declared.
4410 2015-01-06  Eric Botcazou  <ebotcazou@adacore.com>
4412         * einfo.ads (Is_Independent): Further document extended usage.
4414 2015-01-06  Eric Botcazou  <ebotcazou@adacore.com>
4416         * einfo.ads (Is_Independent): Document extended usage.
4417         * einfo.adb (Is_Independent): Remove obsolete assertion.
4418         (Set_Is_Independent): Likewise.
4419         * sem_prag.adb (Process_Atomic_Shared_Volatile): Rename into...
4420         (Process_Atomic_Independent_Shared_Volatile): ...this.
4421         Deal with pragma Independent here.
4422         (Analyze_Pragma): Adjust
4423         to above renaming and also invoke it for pragma Independent.
4424         Adjust comment for Independent_Components.
4426 2015-01-06  Robert Dewar  <dewar@adacore.com>
4428         * snames.ads-tmpl: Remove entries for attribute Enum_Image.
4429         * exp_attr.adb: Remove reference to Attribute_Enum_Image.
4431 2015-01-06  Robert Dewar  <dewar@adacore.com>
4433         * s-vallli.adb (Value_Long_Long_Integer): Handle case of Str'Last
4434         = Positive'Last.
4435         * s-valllu.adb (Value_Long_Long_Unsigned): Handle case of
4436         Str'Last = Positive'Last.
4438 2015-01-06  Robert Dewar  <dewar@adacore.com>
4440         * sem_prag.adb (Process_Inline): Remove redundant construct
4441         warning (-gnatw.r) for an ineffective pragma Inline.
4443 2015-01-06  Robert Dewar  <dewar@adacore.com>
4445         * s-valint.adb: Fix typo in last checkin.
4446         * s-valuns.adb (Value_Unsigned): More efficient fix for
4447         Positive'Last case.
4448         * sem_attr.adb (Analyze_Attribute): Minor reformatting
4449         (Eval_Attribute): Static ervaluation of 'Img for enumeration types.
4451 2015-01-06  Robert Dewar  <dewar@adacore.com>
4453         * s-valint.adb, s-valuns.adb (Value_Integer): Deal with case where
4454         Str'Last = Positive'Last
4456 2015-01-06  Thomas Quinot  <quinot@adacore.com>
4458         * xoscons.adb: Display exception information and return non-zero
4459         exit status in top level exception handler.
4461 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
4463         * sem_ch8.adb: Code clean up.
4465 2015-01-06  Tristan Gingold  <gingold@adacore.com>
4467         * targparm.ads: Remove obsolete comment.
4469 2015-01-06  Olivier Hainque  <hainque@adacore.com>
4471         * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Variable): When
4472         constructing a ref to variable, update inner_const_flag from the
4473         variable TREE_READONLY attribute.
4474         * gcc-interface/targtyps.c (WIDEST_HARDWARE_FP_SIZE): Remove default
4475         definition.
4476         (get_target_float_size): Remove.
4477         (get_target_double_size): Remove.
4478         (get_target_long_double_size): Remove.
4480 2015-01-06  Pascal Obry  <obry@adacore.com>
4482         * adaint.c (ProcListEvt): Set to NULL.
4483         * rtinit.c: New file.
4484         (__gnat_rt_init_count): New reference counter set to 0.
4485         (__gnat_runtime_initialize): Move code here from __gnat_initialize when
4486         this code is actually needed for the runtime initialization. This
4487         routine returns immediately if the initialization has already been done.
4488         * final.c: Revert previous change.
4489         * rtfinal.c: New file.
4490         (__gnat_runtime_finalize)[Win32]: Add finalization of the critical
4491         section and event. The default version of this routine is empty (except
4492         for the reference counting code). This routine returns immediately if
4493         some others libraries are referencing the runtime.
4494         * bindgen.adb (Gen_Adainit): Generate call to Runtime_Initialize
4495         remove circuitry to initialize the signal handler as this is
4496         now done by the runtime initialization routine.
4497         (Gen_Adafinal): Generate call to Runtime_Finalize.
4498         * gnat_ugn.texi: Update documentation about concurrency and
4499         initialization/finalization of the run-time.
4500         * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Add
4501         references to rtfinal.o and rtinit.o
4503 2015-01-06  Robert Dewar  <dewar@adacore.com>
4505         * exp_attr.adb (Expand_N_Attribute_Reference): Add dummy entry
4506         for Enum_Image.
4507         * sem_attr.adb: Implement Enum_Image attribute.
4508         * snames.ads-tmpl: Add entries for Enum_Image attribute.
4510 2015-01-06  Robert Dewar  <dewar@adacore.com>
4512         * namet.ads: Document use of Boolean2 for No_Use_Of_Entity.
4513         * restrict.ads (No_Use_Of_Entity): New table.
4514         * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
4515         Ignore No_Use_Of_Entity (will be processed in parser).
4516         * snames.ads-tmpl: Add entry for Name_No_Use_Of_Entity.
4518 2015-01-06  Vincent Celier  <celier@adacore.com>
4520         * prj-tree.adb (Imported_Or_Extended_Project_Of): Do not try
4521         to check for an extended project, if a project does not have
4522         yet a project declaration.
4524 2015-01-06  Pierre-Marie Derodat  <derodat@adacore.com>
4526         * scos.ads: Update documentation about the SCO table build
4527         process and about table records format.
4528         * par_sco.ads (SCO_Record): Rename to SCO_Record_Raw.
4529         (SCO_Record_Filtered): New procedure.
4530         (Set_SCO_Logical_Operator): New procedure.
4531         (dsco): Update documentation.
4532         * par_sco.adb: Update library-level comments.
4533         (SCO_Generation_State_Type): New type.
4534         (SCO_Generation_State): New variable.
4535         (SCO_Raw_Table): New package instanciation.
4536         (Condition_Pragma_Hash_Table): Rename to SCO_Raw_Hash_Table.
4537         ("<"): New.
4538         (Tristate): New type.
4539         (Is_Logical_Operator): Return Tristate and update documentation.
4540         (Has_Decision): Update call to Is_Logical_Operator and complete
4541         documentation.
4542         (Set_Table_Entry): Rename to Set_Raw_Table_Entry, update
4543         comment, add an assertion for state checking and change
4544         references to SCO_Table into SCO_Raw_Table.
4545         (dsco): Refactor to dump the raw and the filtered tables.
4546         (Process_Decisions.Output_Decision_Operand): Handle putative
4547         short-circuit operators.
4548         (Process_Decisions.Output_Element): Update references
4549         to Set_Table_Entry and to Condition_Pragma_Hash_Table.
4550         (Process_Decisions.Process_Decision_Operand): Update call
4551         to Is_Logical_Operator.
4552         (Process_Decisions.Process_Node): Handle putative short-circuit
4553         operators and change references to
4554         SCO_Table into SCO_Raw_Table.
4555         (SCO_Output): Add an assertion
4556         for state checking and remove code that used to stamp out SCO entries.
4557         (SCO_Pragma_Disabled): Change reference to SCO_Table
4558         into SCO_Raw_Table.
4559         (SCO_Record): Rename to SCO_Record_Raw,
4560         add an assertion for state checking and change references
4561         to SCO_Table into SCO_Raw_Table.
4562         (Set_SCO_Condition): Add an assertion for state checking, update
4563         references to Condition_Pragma_Hash_Table and change references to
4564         SCO_Table into SCO_Raw_Table.
4565         (Set_SCO_Pragma_Enabled): Add an assertion for state checking and
4566         change references to SCO_Table into SCO_Raw_Table.
4567         (Set_SCO_Logical_Operator): New procedure.
4568         (Traverse_Declarations_Or_Statements.Set_Statement_Entry): Update
4569         references to Set_Table_Entry and to Condition_Pragma_Hash_Table.
4570         (SCO_Record_Fildered): New procedure.
4571         * gnat1drv.adb (Gnat1drv): Invoke the SCO filtering pass.
4572         * lib-writ.adb (Write_ALI): Invoke the SCO filtering pass and
4573         output SCOs.
4574         * par-load.adb (Load): Update reference to SCO_Record.
4575         * par.adb (Par): Update reference to SCO_Record.
4576         * put_scos.adb (Put_SCOs): Add an assertion to check that no
4577         putative SCO condition reaches this end.
4578         * sem_ch10.adb (Analyze_Proper_Body): Update reference to SCO_Record.
4579         * sem_res.adb (Resolve_Logical_Op): Validate putative SCOs
4580         when corresponding to an "and"/"or" operator affected by the
4581         Short_Circuit_And_Or pragma.
4583 2015-01-06  Robert Dewar  <dewar@adacore.com>
4585         * sem_ch8.adb (Analyze_Use_Package): Give more specific error
4586         msg for attempted USE of generic subprogram or subprogram.
4588 2015-01-06  Robert Dewar  <dewar@adacore.com>
4590         * s-valllu.adb, a-tiinau.adb, a-timoau.adb, a-ztinau.adb, a-ztmoau.adb,
4591         s-valuns.adb, s-valrea.adb, a-wtflau.adb, a-tiflau.adb, a-ztflau.adb,
4592         a-wtinau.adb, a-wtmoau.adb: Document recognition of : in place of #.
4594 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
4596         * sem_ch13.adb (Analyze_Aspect_Specifications): For aspects
4597         that specify stream subprograms, if the prefix is a class-wide
4598         type then the generated attribute definition clause must apply
4599         to the same class-wide type.
4600         (Default_Iterator): An iterator defined by an aspect of some
4601         container type T must have a first parameter of type T, T'class,
4602         or an access to such (from code reading RM 5.5.1 (2/3)).
4604 2015-01-06  Arnaud Charlet  <charlet@adacore.com>
4606         * gnat1drv.adb: Minor: complete previous change.
4608 2015-01-06  Olivier Hainque  <hainque@adacore.com>
4610         * set_targ.ads (C_Type_For): New function. Return the name of
4611         a C type supported by the back-end and suitable as a basis to
4612         construct the standard Ada floating point type identified by
4613         the T parameter. This is used as a common ground to feed both
4614         ttypes values and the GNAT tree nodes for the standard floating
4615         point types.
4616         * set_targ.adb (Long_Double_Index): The index at which "long
4617         double" gets registered in the FPT_Mode_Table. This is useful to
4618         know whether we have a "long double" available at all and get at
4619         it's characteristics without having to search the FPT_Mode_Table
4620         when we need to decide which C type should be used as the
4621         basis for Long_Long_Float in Ada.
4622         (Register_Float_Type): Fill Long_Double_Index.
4623         (FPT_Mode_Index_For): New function. Return the index in
4624         FPT_Mode_Table that designates the entry corresponding to the
4625         provided C type name.
4626         (FPT_Mode_Index_For): New function. Return the index in
4627         FPT_Mode_Table that designates the entry for a back-end type
4628         suitable as a basis to construct the standard Ada floating point
4629         type identified by the input T parameter.
4630         (elaboration code): Register_Back_End_Types unconditionally,
4631         so C_Type_For can operate regardless of -gnateT. Do it
4632         early so we can query it for the floating point sizes, via
4633         FPT_Mode_Index_For. Initialize Float_Size, Double_Size and
4634         Long_Double_Size from the FPT_Mode_Table, as cstand will do.
4635         * cstand.adb (Create_Float_Types): Use C_Type_For to determine
4636         which C type should be used as the basis for the construction
4637         of the Standard Ada floating point types.
4638         * get_targ.ads (Get_Float_Size, Get_Double_Size,
4639         Get_Long_Double_Size): Remove.
4640         * get_targ.adb: Likewise.
4642 2015-01-06  Thomas Quinot  <quinot@adacore.com>
4644         * sem_cat.adb (In_RCI_Declaration): Remove unnecessary
4645         parameter and rename to...
4646         (In_RCI_Visible_Declarations): Fix handling of private part of nested
4647         package.
4648         (Validate_RCI_Subprogram_Declaration): Reject illegal function
4649         returning anonymous access in RCI unit.
4651 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
4653         * sem_ch6.adb (New_Overloaded_Entity): In GNATprove mode, a
4654         function wrapper may be a homonym of another local declaration.
4655         * sem_ch8.adb (Analyze_Subprogram_Renaming): In GNATprove mode,
4656         build function and operator wrappers after the actual subprogram
4657         has been resolved, and replace the standard renaming declaration
4658         with the declaration of wrapper.
4659         * sem_ch12.ads (Build_Function_Wrapper, Build_Operator_Wraooer):
4660         make public for use elsewhere.
4661         * sem_ch12.adb (Build_Function_Wrapper, Build_Operator_Wraooer):
4662         rewrite, now that actual is fully resolved when wrapper is
4663         constructed.
4665 2015-01-06  Javier Miranda  <miranda@adacore.com>
4667         * exp_disp.adb: Revert previous change.
4669 2015-01-06  Robert Dewar  <dewar@adacore.com>
4671         * exp_util.adb: Change name Name_Table_Boolean to
4672         Name_Table_Boolean1.
4673         * namet.adb: Change name Name_Table_Boolean to Name_Table_Boolean1
4674         Introduce Name_Table_Boolean2/3.
4675         * namet.ads: Change name Name_Table_Boolean to Name_Table_Boolean1
4676         Introduce Name_Table_Boolean2/3.
4677         * par-ch13.adb: Change name Name_Table_Boolean to
4678         Name_Table_Boolean1.
4680 2015-01-06  Bob Duff  <duff@adacore.com>
4682         * gnat_rm.texi: Improve documentation regarding No_Task_Termination.
4684 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
4686         * sem_aggr.adb (Resolve_Record_Aggregte, Get_Value): For an
4687         others choice that covers multiple components, analyze each
4688         copy with the type of the component even in compile-only mode,
4689         to detect potential accessibility errors.
4691 2015-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
4693         * sem_res.adb (Is_Assignment_Or_Object_Expression): New routine.
4694         (Resolve_Actuals): An effectively volatile out
4695         parameter cannot act as an in or in out actual in a call.
4696         (Resolve_Entity_Name): An effectively volatile out parameter
4697         cannot be read.
4699 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
4701         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If the body is
4702         the expansion of an expression function it may be pre-analyzed
4703         if a 'access attribute is applied to the function, in which case
4704         last_entity may have been assigned already.
4706 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
4708         * sem_ch4.adb (Analyze_One_Call): If formal has an incomplete
4709         type and actual has the corresponding full view, there is no
4710         error, but a case of use of incomplete type in a predicate or
4711         invariant expression.
4713 2015-01-06  Vincent Celier  <celier@adacore.com>
4715         * makeutl.adb (Insert_No_Roots): Make sure that the same source
4716         in two different project tree is checked in both trees, if they
4717         are sources of two different projects, extended or not.
4719 2015-01-06  Arnaud Charlet  <charlet@adacore.com>
4721         * gnat1drv.adb: Minor code clean up.
4722         (Adjust_Global_Switches): Ignore gnatprove_mode in codepeer_mode.
4724 2015-01-06  Bob Duff  <duff@adacore.com>
4726         * osint.adb (Read_Source_File): Don't print out
4727         file name unless T = Source.
4729 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
4731         * sem_util.adb (Is_Variable, Is_OK_Variable_For_Out_Formal):
4732         recognize improper uses of constant_reference types as actuals
4733         for in-out parameters.
4734         (Check_Function_Call): Do not collect identifiers if function
4735         name is missing because of previous error.
4737 2015-01-06  Robert Dewar  <dewar@adacore.com>
4739         * ali-util.adb, sem_prag.adb, rtsfind.adb, sem_util.adb, sem_res.adb,
4740         ali.adb, binde.adb, namet.adb, namet.ads, gnatls.adb, bcheck.adb:
4741         Minor change of name Name_Table_Info => Name_Table_Int.
4743 2015-01-06  Robert Dewar  <dewar@adacore.com>
4745         * exp_strm.adb (Build_Elementary_Input_Call): Clarify comments
4746         in previous checkin.
4747         * freeze.adb (Freeze_Fixed_Point_Type): Add warning for shaving
4748         of bounds.
4749         * sem_prag.adb, sem_ch10.adb, sem_ch6.adb: Minor reformatting.
4751 2015-01-06  Vincent Celier  <celier@adacore.com>
4753         * a-strsup.adb (Times (Natural;String;Positive)): Raise
4754         Length_Error, not Index_Error, when the result is too long.
4756 2015-01-06  Thomas Quinot  <quinot@adacore.com>
4758         * a-direct.adb (Create_Path): Minor error handling and
4759         performance improvement.
4761 2015-01-06  Robert Dewar  <dewar@adacore.com>
4763         * checks.ads, sem_ch12.adb: Minor reformatting.
4764         * exp_ch4.adb (Expand_N_Op_Divide): Generate explicit divide by
4765         zero check for fixed-point case if Backend_Divide_Checks_On_Target
4766         is False.
4768 2015-01-06  Robert Dewar  <dewar@adacore.com>
4770         * sem_prag.adb (Analyze_Pragma, case No_Elaboration_Code_All):
4771         Do not set restriction No_Elaboration_Code unless the pragma
4772         appears in the main unit).
4774 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
4776         * sem_ch10.adb (Is_Regular_With_Clause): Add guard to verify
4777         that with clause has already been analyzed before checking kind
4778         of with_clause.
4780 2015-01-06  Robert Dewar  <dewar@adacore.com>
4782         * exp_strm.adb (Build_Elementary_Input_Call): Return base type
4783         (as required by RM).
4785 2015-01-06  Arnaud Charlet  <charlet@adacore.com>
4787         * a-reatim.adb ("/"): Add explicit pragma Unsuppress (Division_Check).
4789 2015-01-06  Robert Dewar  <dewar@adacore.com>
4791         * sem_prag.adb (Process_Suppress_Unsuppress): Add extra warning
4792         for ignoring pragma Suppress (Elaboration_Check) in SPARK mode.
4794 2015-01-06  Javier Miranda  <miranda@adacore.com>
4796         * exp_disp.adb (Expand_Interface_Conversion): No displacement
4797         of the pointer to the object needed when the type of the operand
4798         is not an interface type and the interface is one of its parent
4799         types (since they share the primary dispatch table).
4801 2015-01-06  Vincent Celier  <celier@adacore.com>
4803         * prj-env.adb: Minor comment update.
4805 2015-01-06  Javier Miranda  <miranda@adacore.com>
4807         * sem_res.adb (Valid_Conversion): Restrict the checks on anonymous
4808         access types whose target type is an interface type to operands
4809         that are access types; required to report an error when the
4810         operand is not an access type.
4812 2015-01-06  Bob Duff  <duff@adacore.com>
4814         * a-cfinve.adb (Copy): Set the discriminant to the Length when
4815         Capacity = 0.
4816         * a-cofove.ads (Capacity): Add a postcondition.
4817         * a-cfinve.ads (Capacity): Add a postcondition.
4818         (Reserve_Capacity): Correct the postcondition in the case where
4819         Capacity = 0; that means "Capacity => Length (Container)".
4820         * a-cofove.adb (Elems[c]): Add a comment
4821         explaining the dangers and how to avoid them.
4823 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
4825         * sem_ch12.adb: Code clean up.
4827 2015-01-06  Arnaud Charlet  <charlet@adacore.com>
4829         * gnatvsn.ads: Bump copyright year.
4831 2015-01-06  Robert Dewar  <dewar@adacore.com>
4833         * s-taskin.ads, s-traces.ads: Minor reformatting.
4834         * exp_util.adb: Minor typo fix.
4836 2015-01-06  Vincent Celier  <celier@adacore.com>
4838         * gnatls.adb (Search_RTS): Invoke Initialize_Default_Project_Path
4839         with the runtime name.
4840         * prj-env.adb (Initialize_Default_Project_Path): When both
4841         Target_Name and Runtime_Name are not empty string, add to the
4842         project path the two directories .../lib/gnat and .../share/gpr
4843         related to the runtime.
4844         * prj-env.ads (Initialize_Default_Project_Path): New String
4845         parameter Runtime_Name, defaulted to the empty string.
4847 2015-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
4849         * frontend.adb: Guard against the case where a configuration
4850         pragma may be split into multiple pragmas and the original
4851         rewritten as a null statement.
4852         * sem_prag.adb (Analyze_Pragma): Insert a brand new Check_Policy
4853         pragma using Insert_Before rather than Insert_Action. This
4854         takes care of the configuration pragma case where Insert_Action
4855         would fail.
4857 2015-01-06  Bob Duff  <duff@adacore.com>
4859         * a-coboho.ads (Element_Access): Add "pragma
4860         No_Strict_Aliasing (Element_Access);". This is needed because
4861         we are unchecked-converting from Address to Element_Access.
4862         * a-cofove.ads, a-cofove.adb (Elems,Elemsc): Fix bounds of the
4863         result to be 1.
4865 2015-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
4867         * sem_res.adb (Resolve_Actuals): Remove the
4868         restriction which prohibits volatile actual parameters with
4869         enabled external propery Async_Writers to act appear in procedure
4870         calls where the corresponding formal is of mode OUT.
4872 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
4874         * gnat_ugn.texi: Bump @copying's copyright year.
4876 2015-01-05  Eric Botcazou  <ebotcazou@adacore.com>
4878         PR ada/64492
4879         * gcc-interface/Makefile.in (../stamp-tools): Reinstate dropped code.
4881 2015-01-04  Uros Bizjak  <ubizjak@gmail.com>
4883         * gcc-interface/misc.c (internal_error_function): Use xasprintf instead
4884         of unchecked asprintf.
4887 Copyright (C) 2015 Free Software Foundation, Inc.
4889 Copying and distribution of this file, with or without modification,
4890 are permitted in any medium without royalty provided the copyright
4891 notice and this notice are preserved.