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