2015-05-22 Robert Dewar <dewar@adacore.com>
[official-gcc.git] / gcc / ada / ChangeLog
blobe4320981b14daa28a5f7f4359d05fc0071fb54b9
1 2015-05-22  Robert Dewar  <dewar@adacore.com>
3         * a-reatim.ads: Add Compile_Time_Error to ensure Duration
4         is 64-bits.
5         * sem_ch13.adb: Improve error message.
6         * exp_ch4.adb: Minor reformatting.
8 2015-05-22  Hristian Kirtchev  <kirtchev@adacore.com>
10         * sem_prag.adb (Analyze_Pragma): Constants without variable
11         input do not require indicator Part_Of.
12         (Check_Missing_Part_Of): Constants without variable input do not
13         requrie indicator Part_Of.
14         (Collect_Visible_States): Constants without variable input are
15         not part of the hidden state of a package.
16         * sem_util.ads, sem_util.adb (Has_Variable_Input): New routine.
18 2015-05-22  Robert Dewar  <dewar@adacore.com>
20         * exp_util.adb (Activate_Atomic_Synchronization): Do not set
21         Atomic_Sync_Required for an object renaming declaration.
22         * sem_ch8.adb (Analyze_Object_Renaming): Copy Is_Atomic and
23         Is_Independent to renaming object.
25 2015-05-22  Ed Schonberg  <schonberg@adacore.com>
27         * sem_ch5.adb (Analyze_Iterator_Specification): Diagnose
28         various illegalities in iterators over arrays and containers:
29         a) New function Get_Cursor_Type, to verify that the cursor is
30         not a limited type at the point of iteration.
31         b) If the container is a constant, an element_iterator is illegal
32         if the container type does not have a Constant_Indexing aspect.
33         c) If the iterate function has an in-out controlling parameter,
34         the container cannot be a constant object.
35         d) Reject additional cases of iterators over a
36         discriminant-dependent component of a mutable object.
38 2015-05-21  Hristian Kirtchev  <kirtchev@adacore.com>
40         * einfo.adb (Contract): This attribute now applies to constants.
41         (Set_Contract): This attribute now applies to constants.
42         (Write_Field34_Name): Add output for constants.
43         * einfo.ads Attribute Contract now applies to constants.
44         * sem_ch3.adb (Analyze_Object_Contract): Constants now have
45         their Part_Of indicator verified.
46         * sem_prag.adb (Analyze_Constituent): A constant is now a valid
47         constituent.
48         (Analyze_Global_Item): A constant cannot act as an output.
49         (Analyze_Initialization_Item): Constants are now a valid
50         initialization item.
51         (Analyze_Initializes_In_Decl_Part): Rename
52         global variable States_And_Vars to States_And_Objs and update
53         all its occurrences.
54         (Analyze_Input_Item): Constants are now a
55         valid initialization item. Remove SPARM RM references from error
56         messages.
57         (Analyze_Pragma): Indicator Part_Of can now apply to a constant.
58         (Collect_Body_States): Collect both source constants
59         and variables.
60         (Collect_States_And_Objects): Collect both source constants and
61         variables.
62         (Collect_States_And_Variables): Rename
63         to Collect_States_And_Objects and update all its occurrences.
64         (Collect_Visible_States): Do not collect constants and variables
65         used to map generic formals to actuals.
66         (Find_Role): The role of a constant is that of an input. Separate the
67         role of a variable from that of a constant.
68         (Report_Unused_Constituents): Add specialized wording for constants.
69         (Report_Unused_States): Add specialized wording for constants.
70         * sem_util.adb (Add_Contract_Item): Add processing for constants.
71         * sem_util.ads (Add_Contract_Item): Update the comment on usage.
72         (Find_Placement_In_State_Space): Update the comment on usage.
74 2015-05-21  Ed Schonberg  <schonberg@adacore.com>
76         * sem_ch5.adb: minor reformatting.
78 2015-05-21  Robert Dewar  <dewar@adacore.com>
80         * freeze.adb (Freeze_Entity): Properly tag -gnatw.z messages.
82 2015-05-21  Robert Dewar  <dewar@adacore.com>
84         * freeze.adb: Minor reformatting.
85         * cstand.adb (Print_Standard): Fix bad printing of Duration
86         low bound.
87         * a-reatim.adb (Time_Of): Complete rewrite to properly detect
88         out of range args.
90 2015-05-21  Ed Schonberg  <schonberg@adacore.com>
92         * sem_ch5.adb: add (useless) initial value.
93         * sem_ch3.adb (Replace_Anonymous_Access_To_Protected_Subprogram):
94         Check whether the procedure has parameters before processing
95         formals in ASIS mode.
97 2015-05-21  Ed Schonberg  <schonberg@adacore.com>
99         * sem_ch13.adb (Check_Iterator_Functions): Emit error on Iterator
100         aspect as well when indexing function is illegal.
101         (Valid_Default_Iterator): Handle properly somme illegal cases
102         to prevent compilation abandoned messages.
103         (Check_Primitive_Function): Verify that type and indexing function
104         are in the same scope.
105         * freeze.adb (Freeze_Record): Extend patch on the presence of
106         indexing aspects to aspect Default_Iterator.
108 2015-05-19  David Malcolm  <dmalcolm@redhat.com>
110         * gcc-interface/trans.c (Sloc_to_locus1): Strenghthen local "map"
111         from line_map * to line_map_ordinary *.
113 2015-05-12  Jason Merrill  <jason@redhat.com>
115         * sigtramp-vxworks.c: Add space between string literal and macro
116         name.
118 2015-05-12  Arnaud Charlet  <charlet@adacore.com>
120         * gnat_rm.texi, gnat_ugn.texi, doc: Documentation updates and clean ups
122 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
124         * sem_ch5.adb (Analyze_Iterator_Specifications): Additional
125         legality checks for array and container iterators:
126         a) The domain of iteration cannot be a component that depends
127         on discriminants of a mutable object. The check was recently
128         added for element iterators.
129         b) The cursor type cannot be a limited type at the point of the
130         iteration, because the cursor will be assigned to in the body
131         of the loop.
133 2015-05-12  Robert Dewar  <dewar@adacore.com>
135         * freeze.adb (Freeze_Record_Type): Make sure that if we have
136         aspect Iterator_Element, then we have either Constant_Indexing
137         or Variable_Indexing.
139 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
141         * a-coormu.ads, a-coormu.adb: Add Indexing aspect, Reference_Type,
142         and Reference_Control_Type to support element iterators over
143         ordered multisets.
144         * a-ciormu.ads, a-ciormu.adb: Ditto for
145         indefinite_ordered_multisets.
147 2015-05-12  Hristian Kirtchev  <kirtchev@adacore.com>
149         * exp_ch4.adb (Expand_N_Expression_With_Actions): Force
150         the evaluation of the EWA expression.  Code cleanup.
151         (Process_Transient_Object): Code cleanup.
152         * exp_util.adb (Is_Aliased): Controlled transient objects found
153         within EWA nodes are not aliased.
154         (Is_Finalizable_Transient): Iterators are not finalizable transients.
156 2015-05-12  Robert Dewar  <dewar@adacore.com>
158         * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
159         Don't allow Atomic and Volatile_Full_Access for the same entity.
161 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
163         * sem_ch5.adb (Analyze_Iterator_Specification): Implement new
164         semantics and safety checks specified in AI12-0151.
166 2015-05-12  Pierre-Marie de Rodat  <derodat@adacore.com>
168         * sem_ch10.adb (Sem_Ch10.Analyze_Proper_Body): Generate SCOs
169         for subunit in generic units.
171 2015-05-12  Robert Dewar  <dewar@adacore.com>
173         * sem_elab.adb (Check_A_Call): Avoid checking internal call
174         from Valid_Scalars
176 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
178         * sem_ch6.adb (Process_Formals): An untagged incomplete type
179         is legal in the profile of a null procedure.
181 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
183         * sem_ch12.adb (Validate_Derived_Type_Instance): Handle properly
184         the checks on a derived formal whose parent type is a previous
185         formal that is not a derived type.
187 2015-05-12  Robert Dewar  <dewar@adacore.com>
189         * aspects.ads, aspects.adb: Add entries for aspect Volatile_Full_Access
190         * einfo.adb (Has_Volatile_Full_Access): New flag.
191         (Has_Volatile_Full_Access): New flag.
192         * einfo.ads (Has_Volatile_Full_Access): New flag.
193         * par-prag.adb: Add dummy entry for Volatile_Full_Access.
194         * sem_prag.adb (Analyze_Pragma, case Volatile_Full_Access):
195         Implement new pragma.
196         * snames.ads-tmpl: Add entries for pragma Volatile_Full_Access.
198 2015-05-12  Robert Dewar  <dewar@adacore.com>
200         * targparm.ads: Minor reformatting.
202 2015-05-12  Robert Dewar  <dewar@adacore.com>
204         * a-reatim.adb (Time_Of): Properly detect overflow when TS = 0.0.
205         * a-reatim.ads: Minor reformatting.
207 2015-05-12  Hristian Kirtchev  <kirtchev@adacore.com>
209         * einfo.ads: Update the documentation of flags
210         Has_Inherited_Default_Init_Cond and Has_Default_Init_Cond.
212 2015-05-12  Robert Dewar  <dewar@adacore.com>
214         * impunit.adb: Add entry for a-dhfina.ads
215         * a-dhfina.ads: New file.
217 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
219         * exp_ch5.adb (Expand_Iterator_Loop_Over_Array): if the array
220         type has convention Fortran, a multidimensional iterator varies
221         the first dimension fastest.
223 2015-05-12  Hristian Kirtchev  <kirtchev@adacore.com>
225         * einfo.adb: Node32 is now used as Encapsulating_State.
226         Node37 is now used as Associated_Entity.
227         (Associated_Entity): New routine.
228         (Encapsulating_State): Update the assertion guard to include constants.
229         (Set_Associated_Entity): New routine.
230         (Set_Encapsulating_State): Update the assertion guard to
231         include constants.
232         (Write_Field10_Name): Remove the output for Encapsulating_State.
233         (Write_Field32_Name): Add output for Encapsulating_State.
234         (Write_Field37_Name): Add output for Associated_Entity.
235         * einfo.ads New attribute Associated_Entity along with placement
236         in entities. Attribute Encapsulating_State now uses Node32.
237         (Associated_Entity): New routine along with pragma Inline.
238         (Set_Associated_Entity): New routine along with pragma Inline.
239         * inline.ads Code reformatting.
240         * sem_attr.adb (Analyze_Attribute): Correct the prefix of
241         attribute 'Result when the context is a generic instantiation.
242         (Analyze_Attribute_Old_Result): Pragmas Depends and
243         Refined_Depends are a valid context for attribute 'Result.
244         (Denote_Same_Function): Allow attribute 'Result to denote
245         generic functions.
246         * sem_ch3.adb Add with and use clauses for Sem_Ch12.
247         (Analyze_Declarations): Capture global references within the
248         contracts of packages, subprograms and their respective bodies.
249         * sem_ch6.adb (Analyze_Aspects_On_Body_Or_Stub): Removed.
250         (Analyze_Completion_Contract): Removed.
251         (Analyze_Generic_Subprogram_Body): Enchange the aspects after
252         creating the generic copy. Create a generic contract for the
253         template. Analyze the aspects of the generic body. Analyze the
254         contract of the generic body when it is a compilation unit and
255         capture global references.
256         (Analyze_Subprogram_Body_Contract): Code cleanup.
257         (Analyze_Subprogram_Contract): Do not save global references here.
258         (Save_Global_References_In_List): Removed.
259         * sem_ch7.adb (Analyze_Package_Body_Contract): Code cleanup.
260         (Analyze_Package_Body_Helper): Create a generic contract for
261         the template.
262         (Analyze_Package_Contract): Code cleanup.
263         * sem_ch10.adb Add with and use clauses for Sem_Ch12.
264         (Analyze_Compilation_Unit): Capture global references in a
265         generic subprogram declaration that acts as a compilation unit.
266         * sem_ch12.adb Add with and use clauses for Sem_Prag. Illustrate
267         the implementation of generic contracts. Alphabetize various
268         subprograms.
269         (Analyze_Generic_Package_Declaration):
270         Create a generic contract for the template.
271         (Analyze_Generic_Subprogram_Declaration): Create a generic
272         contract for the template.
273         (Analyze_Subprogram_Instantiation): Instantiate the contract of the
274         subprogram.
275         (Copy_Generic_Node): Link defining entities of the generic template
276         with the corresponding defining entities of the generic copy. Update
277         the processing of pragmas.
278         (Instantiate_Contract): Removed.
279         (Instantiate_Subprogram_Contract): New routine.
280         (Requires_Delayed_Save): New routine.
281         (Save_Global_References): Rename formal parameter N to Templ. Various
282         cleanups.
283         (Save_Global_References_In_Aspects): Moved from the spec.
284         (Save_Global_References_In_Contract): New routine.
285         (Save_References_In_Aggregate): New routine.
286         (Save_References_In_Char_Lit_Or_Op_Symbol): New routine.
287         (Save_References_In_Descendants): New routine.
288         (Save_References_In_Identifier): New routine.
289         (Save_References_In_Operator): New routine.
290         (Save_References_In_Pragma): New routine.
291         * sem_ch12.ads (Save_Global_References): Rename formal
292         parameter N to Templ. Update the comment on usage.
293         (Save_Global_References_In_Aspects): Moved to the body.
294         (Save_Global_References_In_Contract): New routine.
295         * sem_ch13.adb (Analyze_Aspect_Specifications_On_Body_Or_Stub):
296         New routine.
297         * sem_ch13.ads (Analyze_Aspect_Specifications_On_Body_Or_Stub):
298         New routine.
299         * sem_prag.adb (Add_Item_To_Name_Buffer): Add support for
300         generic parameters.
301         (Analyze_Contract_Cases_In_Decl_Part): Code cleanup.
302         (Analyze_Depends_Global): New routine.
303         (Analyze_Depends_In_Decl_Part): Code cleanup.
304         (Analyze_Global_In_Decl_Part): Code cleanup.
305         (Analyze_Global_Item): Constants are now valid global items. Do
306         not perform state-related checks in an instance. Change the way
307         renamings are handled.  (Analyze_Initial_Condition_In_Decl_Part):
308         Code cleanup.
309         (Analyze_Initializes_In_Decl_Part): Code cleanup.
310         (Analyze_Input_Output): The analysis of attribute 'Result in
311         the context of pragmas Depends or Refined_Depends now reuses
312         the existing attribute analysis machinery. Constants and
313         generic parameters are now valid dependency items. Do not
314         perform state-related checks in an instance. Change the way
315         renamings are handled.  (Analyze_Pragma): Add a "characteristics"
316         section for pragmas Abstract_State, Contract_Cases, Depends,
317         Extensions_Visible, Global, Initial_Condition, Initializes,
318         Post, Post_Class, Postcondition, Pre, Pre_Class, Precondition,
319         Refined_Depends, Refined_Global, Refined_Post, Refined_State, Test_Case.
320         (Analyze_Pre_Post_Condition): Do not create a generic
321         template here.
322         (Analyze_Pre_Post_Condition_In_Decl_Part): Code cleanup.
323         (Analyze_Refined_Depends_Global_Post): New routine.
324         (Analyze_Refined_Depends_In_Decl_Part): Code cleanup.
325         (Analyze_Refined_Global_In_Decl_Part): Code cleanup.
326         (Analyze_Refined_Pragma): Removed.
327         (Analyze_Refined_State_In_Decl_Part): Code cleanup.
328         (Analyze_Test_Case_In_Decl_Part): Code cleanup.
329         (Check_Dependency_Clause): Do not perform this check in an instance.
330         (Check_Function_Return): Add support for generic functions.
331         (Check_In_Out_States): Do not perform this check in an instance.
332         (Check_Input_States): Do not perform this check in an instance.
333         (Check_Mode_Restriction_In_Function): Add support for generic functions.
334         (Check_Output_States): Do not perform this check in an instance.
335         (Check_Postcondition_Use_In_Inlined_Subprogram): Rename
336         parameter Subp_Id to Spec_Id and update comment on usage.
337         (Check_Proof_In_States): Do not perform this check in an instance.
338         (Check_Refined_Global_Item): Add support for constants.
339         (Check_Refined_Global_List): Do not perform this check in an instance.
340         (Collect_Global_Items): Reimplemented.
341         (Collect_Subprogram_Inputs_Outputs): Add support for generic parameters.
342         (Create_Generic_Template): Removed.
343         (Find_Related_Package_Or_Body): Moved to spec.
344         (Find_Role): Add support for generic parameters and constants.
345         (Get_Argument): Moved to spec. Rename parameter Spec_Id to Context_Id.
346         (Match_Item): Add support for constants.
347         (Preanalyze_Test_Case_Arg): Reimplemented.
348         (Report_Extra_Clauses): Do not perform this check in an instance.
349         (Report_Extra_Constituents): Do not perform this check in an instance.
350         * sem_prag.ads (Collect_Subprogram_Inputs_Outputs): Update
351         the comment on usage.
352         (Find_Related_Package_Or_Body): Moved from body.
353         (Get_Argument): Moved from body.
354         * sem_util.adb Add with and use clauses for Sem_Ch12.
355         (Corresponding_Spec_Of): Add support for packages and package bodies.
356         (Create_Generic_Contract): New routine.
357         (Is_Contract_Annotation): Reimplemented.
358         (Is_Generic_Declaration_Or_Body): New routine.
359         (Is_Package_Contract_Annotation): New routine.
360         (Is_Subprogram_Contract_Annotation): New routine.
361         * sem_util.ads (Corresponding_Spec_Of): Update the comment on usage.
362         (Create_Generic_Contract): New routine.
363         (Is_Generic_Declaration_Or_Body): New routine.
364         (Is_Package_Contract_Annotation): New routine.
365         (Is_Subprogram_Contract_Annotation): New routine.
366         * sinfo.adb (Is_Generic_Contract_Pragma): New routine.
367         (Set_Is_Generic_Contract_Pragma): New routine.
368         * sinfo.ads Add new attribute Is_Generic_Contract_Pragma along
369         with occurrences in nodes.
370         (Is_Generic_Contract_Pragma): New routine along with pragma Inline.
371         (Set_Is_Generic_Contract_Pragma): New routine along with pragma Inline.
372         * treepr.adb (Print_Entity_Info): Output fields 36 to 41.
374 2015-05-12  Robert Dewar  <dewar@adacore.com>
376         * a-taster.ads: Minor comment fix: fix bad header, this is a
377         pure RM unit.
379 2015-05-12  Robert Dewar  <dewar@adacore.com>
381         * sem_intr.adb: (Check_Shift): Diagnose bad modulus value.
383 2015-05-12  Robert Dewar  <dewar@adacore.com>
385         * gnat1drv.adb (Adjust_Global_Switches): Default to suppressing
386         Alignment_Checks on non-strict alignment machine.
387         * sem_ch13.adb (Validate_Address_Clauses): Don't give
388         compile-time alignment warnings if run time Alignment_Check
389         is suppressed.
391 2015-05-12  Thomas Quinot  <quinot@adacore.com>
393         * g-sercom.ads, g-sercom-linux.adb (GNAT.Serial_Communications.
394         Data_Rate): New literals B75, B110, B150, B300, B600.
396 2015-05-12  Doug Rupp  <rupp@adacore.com>
398         * init.c (__gnat_init_float) [vxworks]: For e500v2,
399         do nothing and leave the responsibility to install the handler
400         and enable the exceptions to the BSP.
402 2015-05-12  Robert Dewar  <dewar@adacore.com>
404         * sem_ch9.adb, einfo.ads, exp_intr.adb: Minor reformatting.
405         * sem_disp.adb: Minor code reorganization (remove junk redundant
406         null statement).
407         * exp_unst.adb (Unnest_Subprogram.Uplev_Refs): Ignore uplevel
408         references to bounds of types coming from original type reference.
409         * checks.ads: Minor reformatting.
410         * checks.adb: Minor reformatting.
411         * sem_prag.adb (Analyze_Pragma, case Check): If in ignored
412         assertion, then make sure we do not drag in bignum stuff.
414 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
416         * sem_ch9.adb (Collect_Interfaces): Initialize
417         Direct_Primitive_Operations for a tagged synchronized type,
418         so it can used in ASIS mode.
419         * sem_disp.adb (Check_Dispatching_Operation): If expansion is
420         disabled, attach subprogram to list of Direct_Primitive_Operations
421         of synchronized type itself, for ASIS use, because in this case
422         Corresponding_Record_Type is not built.
423         * einfo.ads: Indicate use of Direct_Primitive_Operations on
424         synchronized type.
426 2015-05-12  Pierre-Marie de Rodat  <derodat@adacore.com>
428         * exp_pakd.adb: Make clearer the comment in exp_pakd.adb about
429         ___XP suffixes.
431 2015-05-12  Robert Dewar  <dewar@adacore.com>
433         * sem_ch3.adb, sem_util.adb, sem_ch6.adb: Minor reformatting.
435 2015-05-12  Robert Dewar  <dewar@adacore.com>
437         * exp_unst.adb (Visit_Node): Deal with subprogram and package stubs.
439 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
441         * exp_intr.adb (Expand_Dispatching_Constructor_Call): The
442         tag to be retrieved for the generated call is the first entry
443         in the dispatch table for the return type of the instantiated
444         constructor.
446 2015-05-12  Bob Duff  <duff@adacore.com>
448         * exp_ch7.adb, exp_ch7.ads, exp_intr.adb, exp_util.adb,
449         exp_util.ads: Update comments.
451 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
453         * sem_ch3.adb (Add_Internal_Interface_Entities): Do no generate
454         freeze nodes for these in ASIS mode, because they lead to
455         elaoration order issues in gigi.
457 2015-05-12  Hristian Kirtchev  <kirtchev@adacore.com>
459         * sem_ch6.adb (Analyze_Expression_Function): Code
460         cleanup. Use Copy_Subprogram_Spec to create a proper spec.
461         (Analyze_Subprogram_Body_Helper): Code cleanup. Do not
462         prepare a stand alone body for inlining in GNATprove mode
463         when inside a generic.  (Body_Has_Contract): Reimplemented.
464         (Build_Subprogram_Declaration): New routine.
465         * sem_ch10.adb (Analyze_Compilation_Unit): Capture global
466         references within generic bodies by loading them.
467         * sem_util.adb (Copy_Parameter_List): Code cleanup.
468         (Copy_Subprogram_Spec): New routine.
469         (Is_Contract_Annotation): New routine.
470         * sem_util.ads (Copy_Subprogram_Spec): New routine.
471         (Is_Contract_Annotation): New routine.
473 2015-05-12  Hristian Kirtchev  <kirtchev@adacore.com>
475         * sem_attr.adb (Resolve_Attribute): Do not analyze the generated
476         body of an expression function when the prefix of attribute
477         'Access is the body.
479 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
481         * sem_ch3.adb (Build_Derived_Enumeration_Type): The anonymous base
482         created for a derived enumeration type is not a first subtype,
483         even though it is defined through a full type declaration.
484         * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): Do not process
485         aspects for the anonymous base type constructed for a derived
486         scalar type, because they will be set when the first subtype
487         is frozen.
488         (Inherit_Aspects_At_Freeze_Point): Fix typos on handling of
489         Default_Value and Default_Component_Value, that prevented the
490         proper inheritance of these aspects.
492 2015-05-12  Gary Dismukes  <dismukes@adacore.com>
494         * exp_ch6.adb, exp_unst.adb: Minor typo fixes.
496 2015-05-12  Robert Dewar  <dewar@adacore.com>
498         * sem_ch3.adb: Minor reformatting.
500 2015-05-12  Vincent Celier  <celier@adacore.com>
502         * gnatcmd.adb: If we want to invoke gnatmake (gnatclean) with
503         -P, then check if gprbuild (gprclean) is available; if it is,
504         use gprbuild (gprclean) instead of gnatmake (gnatclean).
506 2015-05-12  Robert Dewar  <dewar@adacore.com>
508         * debug.adb: Add flag -gnatd.3 to output diagnostic info from
509         Exp_Unst.
510         * einfo.ad, einfo.adb: Reorganize (and remove most of) flags used by
511         Exp_Unst.
512         * exp_ch6.adb (Unest_Bodies): Table for delayed calls to
513         Unnest_Subprogram (Expand_N_Subprogram_Body): Add entry to table
514         for later call instead of calling Unnest_Subprogram directly
515         (Initialize): New procedure (Unnest_Subprograms): New procedure
516         * exp_ch6.ads (Add_Extra_Actual_To_Call): Move into proper
517         alpha order.
518         (Initialize): New procedure.
519         (Unnest_Subprograms): New procedure.
520         * exp_unst.adb (Unnest_Subprogram): Major rewrite, moving
521         all processing to this routine which is now called late
522         after instantiating bodies. Fully handles the case of generic
523         instantiations now.
524         * exp_unst.ads: Major rewrite, moving all processing to
525         Unnest_Subprogram.
526         * frontend.adb (Frontend): Add call to Exp_Ch6.Initialize.
527         (Frontend): Add call to Unnest_Subprograms.
528         * sem_ch8.adb (Find_Direct_Name): Back to old calling sequence
529         for Check_Nested_Access.
530         * sem_util.adb (Build_Default_Subtype): Minor reformatting
531         (Check_Nested_Access): Back to original VM-only form (we
532         now do all the processing for Unnest_Subprogram at the time
533         it is called.
534         (Denotes_Same_Object): Minor reformatting
535         (Note_Possible_Modification): Old calling sequence for
536         Check_Nested_Access.
537         * sem_util.ads (Check_Nested_Access): Back to original VM-only
538         form (we now do all the processing for Unnest_Subprogram at the
539         time it is called.
541 2015-05-12  Robert Dewar  <dewar@adacore.com>
543         * sem_ch3.adb, freeze.adb, sem_ch6.adb: Minor reformatting.
545 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
547         * sem_ch3.adb (Analyze_Object_Declaration): New function
548         Has_Delayed_Aspect, used to defer resolution of an aggregate
549         expression when the object declaration carries aspects Address
550         and/or Alignment.
551         * freeze.adb (Freeze_Object_Declaration): New subsidiary procedure
552         to Freeze_Entity.  In addition to the previous processing steps
553         at the freeze point of an object, this procedure also handles
554         aggregates in object declarations, when the declaration carries
555         delayed aspects that require that the initialization of the
556         object be attached to its freeze actions.
558 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
560         * sem_ch6.adb (Analyze_Subprogram_Declaration): Following
561         AI12-0147, null procedures and expression functions are allowed
562         in protected bodies.
564 2015-05-12  Tristan Gingold  <gingold@adacore.com>
566         * i-cpoint.adb (Copy_Terminated_Array): Copy nothing if Length is 0.
568 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
570         * sem_ch3.adb (Complete_Private_Subtype): Propagate
571         Has_Delayed_Aspects flag from private to full view, to ensure
572         that predicate functions are constructed.
574 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
576         * sem_ch6.adb (Process_Formals): If a tagged formal is an
577         incomplete class-wide type, the subprogram must have a delayed
578         freeze even though the opertation is not a primitive of the
579         type. THis ensures that the backend can recover the full view
580         when elaborating the subprogram declaration.
582 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
584         * exp_util.adb (Get_Current_Value_Condition): Nothing to be
585         done if an elsif part has been rewritten so that it is not part
586         of an enclosing if_statement.
588 2015-05-12  Robert Dewar  <dewar@adacore.com>
590         * sem_type.adb, sem_ch10.adb, freeze.adb, sem_ch6.adb, exp_disp.adb:
591         Minor reformatting.
593 2015-05-12  Bob Duff  <duff@adacore.com>
595         * exp_attr.adb (Size): Remove unnecessary check for types with
596         unknown discriminants.  That was causing the compiler to build
597         a function call _size(T), where T is a type, not an object.
599 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
601         * sem_ch4.adb (Extended_Primitive_Ops): Exclude overriding
602         primitive operations of a type extension declared in the package
603         body, to prevent duplicates in extended list.
605 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
607         * sem_ch3.adb (Analyze_Component_Declaration): If the component is
608         an unconstrained synchronized type with discriminants, create a
609         constrained default subtype for it, so that the enclosing record
610         can be given the proper size.
611         * sem_util.adb (Build_Default_Subtype): If the subtype is created
612         for a record discriminant, do not analyze the declarztion at
613         once because it is added to the freezing actions of the enclosing
614         record type.
616 2015-05-12  Robert Dewar  <dewar@adacore.com>
618         * exp_prag.adb (Expand_N_Pragma): Rewrite ignored pragma as
619         Null statements.
620         * namet.ads (Boolean3): Document this flag used for Ignore_Pragma.
621         * par-prag.adb (Prag): Implement Ignore_Pragma.
622         * sem_prag.adb: Implement Ignore_Pragma.
623         * snames.ads-tmpl: Add entries for pragma Ignore_Pragma.
625 2015-05-12  Javier Miranda  <miranda@adacore.com>
627         * sem_ch10.adb (Build_Shadow_Entity): Link the class-wide shadow
628         entity with its corresponding real entity.
629         (Decorate_Type): Unconditionally build the class-wide shadow entity of
630         tagged types.
631         * einfo.ads, einfo.adb (Has_Non_Limited_View): New synthesized
632         attribute.
633         (Non_Limited_View): Moved from field 17 to field 19 be available
634         in class-wide entities.
635         * exp_attr.adb (Access_Cases): Code cleanup.
636         * exp_disp.adb (Expand_Interface_Actuals): Ditto.
637         * exp_util.adb (Non_Limited_Designated_Type): Ditto.
638         * freeze.adb (Build_Renamed_Bdody): Ditto.
639         * sem_aux.adb (Available_View): Ditto.
640         * sem_ch4.adb (Analyze_Selected_Component): Ditto.
641         (Try_One_Prefix_Interpretation): Ditto.
642         * sem_ch5.adb (Analyze_Assignment): Ditto.
643         * sem_ch6.adb (Detect_And_Exchange): Ditto.
644         * sem_ch8.adb (Find_Expanded_Name): Ditto.
645         * sem_disp.adb (Check_Controlling_Type): Ditto.
646         * sem_res.adb (Resolve_Type_Conversion): Ditto.
647         (Full_Designated_Type): Ditto.
648         * sem_type.adb (Covers): Ditto.
649         * sem_util.adb: Fix typo in comment.
651 2015-05-12  Robert Dewar  <dewar@adacore.com>
653         * exp_unst.adb (Get_Real_Subp): New subprogram.
654         (Unnest_Subprogram): Use Get_Real_Subp.
655         (Uplev_Refs_For_One_Subp): Skip if no ARECnU entity.
656         (Uplev_Refs_For_One_Subp): Use actual subtype in unconstrained case.
658 2015-05-12  Robert Dewar  <dewar@adacore.com>
660         * a-reatim.adb ("/"): Add explicit check for Time_Span_First / -1.
662 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
664         * sem_ch4.adb (Extended_Primitive_Ops): New subprogram,
665         auxiliary to Try_Primitive_Operation to handle properly prefixed
666         calls where the operation is not a primitive of the type, but
667         is declared in the package body that is in the immediate scope
668         of the type.
670 2015-05-12  Robert Dewar  <dewar@adacore.com>
672         * sem_util.adb (Is_Variable): Allow X'Deref(Y) as a variable.
674 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
676         * sem_ch8.adb (Find_Expanded_Name): Handle properly a fully
677         qualified name for an instance of a generic grand-child unit in
678         the body its parent.
680 2015-05-12  Robert Dewar  <dewar@adacore.com>
682         * exp_unst.adb (Upref_Name): New subprogram.
683         (Unnest_Subprogram): Use Upref_Name.
684         (Unnest_Subprogram): Use new Deref attribute.
685         * exp_unst.ads: Doc updates.
687 2015-05-12  Thomas Quinot  <quinot@adacore.com>
689         * adaint.c: Enable Large File Support in adaint so that __gnat_readdir
690         can access files on filesystems mounted from servers that use large
691         NFS file handles.
693 2015-05-09  Eric Botcazou  <ebotcazou@adacore.com>
695         * gcc-interface/utils.c (gnat_write_global_declarations): Use type_decl
696         method instead of global_decl for TYPE_DECLs.
698 2015-04-27  Jim Wilson  <jim.wilson@linaro.org>
700         * gcc-interface/Makefile-lan.in (ada.mostlyclean): Remove gnatbind
701         and gnat1.
703 2015-04-13  Eric Botcazou  <ebotcazou@adacore.com>
705         * gnatvsn.ads (Library_Version): Bump to 6.
707 2015-04-09  Iain Sandoe  <iain@codesourcery.com>
709         * gcc-interface/Makefile.in (darwin, powerpc): Enable atomics.
711 2015-04-08  Eric Botcazou  <ebotcazou@adacore.com>
713         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Do not make
714         a function returning an unconstrained type 'const' for the middle-end.
716         * gcc-interface/trans.c (Pragma_to_gnu) <case Pragma_Warning>: Use
717         exact condition to detect Reason => "..." pattern.
719 2015-03-31  Tom de Vries  <tom@codesourcery.com>
721         PR ada/65490
722         * terminals.c (child_setup_tty): Fix warning 'argument to sizeof in
723         bzero call is the same expression as the destination'.
725 2015-03-26  Eric Botcazou  <ebotcazou@adacore.com>
727         * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Deref>: New case.
729 2015-03-24  Gary Dismukes  <dismukes@adacore.com>
731         * sem_ch3.adb: Minor typo fix (missing paren).
733 2015-03-24  Robert Dewar  <dewar@adacore.com>
735         * sinfo.ads: Update comment.
737 2015-03-24  Robert Dewar  <dewar@adacore.com>
739         * exp_attr.adb: Add entry for typ'Deref.
740         * sem_attr.adb (Deref): New GNAT attribute.
741         * sem_attr.ads: Add entry for new GNAT attribute Deref.
742         * snames.ads-tmpl: Add entries for new attribute Deref.
744 2015-03-24  Ed Schonberg  <schonberg@adacore.com>
746         * sem_ch13.adb (Rep_Item_Too_Early): allow pragma Convention
747         on generic type.
749 2015-03-24  Gary Dismukes  <dismukes@adacore.com>
751         * inline.adb: Minor typo fix.
753 2015-03-24  Arnaud Charlet  <charlet@adacore.com>
755         * doc/gnat_ugn/building_executable_programs_with_gnat.rst,
756         doc/gnat_ugn/gnat_utility_programs.rst
757         doc/gnat_rm/implementation_defined_attributes.rst
758         doc/gnat_rm/implementation_defined_pragmas.rst
759         doc/gnat_rm/representation_clauses_and_pragmas.rst
760         doc/gnat_rm/about_this_guide.rst
761         doc/gnat_rm/implementation_of_ada_2012_features.rst: Doc improvements.
762         * gnat_rm.texi, gnat_ugn.texi: Regenerate.
764 2015-03-23  Jakub Jelinek  <jakub@redhat.com>
766         PR bootstrap/65522
767         * adadecode.c (ada_demangle): Guard with IN_RTS instead of IN_GCC.
769 2015-03-20  Eric Botcazou  <ebotcazou@adacore.com>
771         PR ada/65451
772         * gcc-interface/utils.c (gnat_pushdecl): Tidy up and improve comment.
773         Make sure to chain only main variants through TYPE_NEXT_PTR_TO.
775         * gcc-interface/trans.c (Attribute_to_gnu): Revert latest change.
777 2015-03-16  Eric Botcazou  <ebotcazou@adacore.com>
779         * gcc-interface/utils2.c (gnat_invariant_expr): Return null if the type
780         of the expression ends up being composite.
782 2015-03-16  Eric Botcazou  <ebotcazou@adacore.com>
784         * gcc-interface/decl.c (is_from_limited_with_of_main): New predicate.
785         (gnat_to_gnu_entity) <E_Subprogram_Type>: Invoke it on return and
786         parameter types to detect circularities in ASIS mode.
787         * gcc-interface/trans.c (Attribute_to_gnu): Mention AI05-0151.
789 2015-03-16  Eric Botcazou  <ebotcazou@adacore.com>
791         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Abstract_State>: Do not
792         short-circuit the regular handling.
794 2015-03-13  Robert Dewar  <dewar@adacore.com>
796         * exp_unst.adb (Note_Uplevel_Reference): Eliminate duplicate
797         references.
798         (Actual_Ref): New function.
799         (AREC_String): Minor reformatting.
800         (Unnest_Subprogram): Use Actual_Ref.
801         * frontend.adb (Frontend): Turn off Unnest_Subprogram_Mode
802         before call to Instantiate_Bodies.
804 2015-03-13  Ed Schonberg  <schonberg@adacore.com>
806         * freeze.adb (Freeze_Profile): If the return type of a function
807         being frozen is an untagged limited view and the function is
808         abstract, mark the type as frozen because there is no later
809         point at which the profile of the subprogram will be elaborated.
811 2015-03-13  Robert Dewar  <dewar@adacore.com>
813         * einfo.adb, einfo.ads, atree.adb, atree.ads, atree.h: Add seventh
814         component to entities. Add new fields Field36-41 and Node36-41.
816 2015-03-13  Claire Dross  <dross@adacore.com>
818         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Rewrite after review.
820 2015-03-13  Robert Dewar  <dewar@adacore.com>
822         * exp_util.adb (Is_Volatile_Reference): Compile time known
823         value is never considered to be a volatile reference.
825 2015-03-13  Robert Dewar  <dewar@adacore.com>
827         * sem_ch3.adb (Analyze_Object_Contract): Suppress "constant
828         cannot be volatile" for internally generated object (such as
829         FIRST and LAST constants).
831 2015-03-13  Ed Schonberg  <schonberg@adacore.com>
833         * sem_ch12.adb (Validate_Access_Subprogram_Instance): If a
834         convention is specified for the formal parameter, verify that
835         the actual has the same convention.
836         * sem_prag.adb (Set_Convention_From_Pragma): Allow convention
837         pragma to be set on a generic formal type.
838         * sem_util.adb (Set_Convention): Ignore within an instance,
839         as it has already been verified in the generic unit.
841 2015-03-13  Claire Dross  <dross@adacore.com>
843         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do not inline
844         subprograms with unconstrained record parameters containing
845         Itype declarations.
846         * sinfo.ads Document GNATprove assumption that type should match
847         in the AST.
848         * sem_ch6.adb (Analyze_Subprogram_Body_Contract):
849         Do not check for Refined_Depends and Refined_Globals contracts
850         as they are optional.
852 2015-03-13  Ed Schonberg  <schonberg@adacore.com>
854         * sem_ch12.adb (Instantiate_Type): For a floating-point type,
855         capture dimension info if any, because the generated subtype
856         declaration does not come from source and will not process dimensions.
857         * sem_dim,adb (Analyze_Dimension_Extension_Or_Record_Aggregate):
858         Do not analyze expressions with an initialization procedure
859         because aggregates will have been checked at the point of record
860         declaration.
862 2015-03-13  Robert Dewar  <dewar@adacore.com>
864         * aspects.ads, aspects.adb: Add entries for aspect Unimplemented.
865         * einfo.ads, einfo.adb (Is_Unimplemented): New flag.
866         * sem_ch13.adb: Add dummy entry for aspect Unimplemented.
867         * snames.ads-tmpl: Add entry for Name_Unimplemented.
869 2015-03-13  Gary Dismukes  <dismukes@adacore.com>
871         * style.adb (Missing_Overriding): Apply the
872         Comes_From_Source test to the Original_Node of the subprogram
873         node, to handle the case of a null procedure declaration that
874         has been rewritten as an empty procedure body.
876 2015-03-13  Robert Dewar  <dewar@adacore.com>
878         * exp_util.ads: Minor fix to comment.
879         * sem_ch3.adb (Constrain_Index): Correct pasto from previous
880         change.
882 2015-03-13  Robert Dewar  <dewar@adacore.com>
884         * exp_util.ads, exp_util.adb (Force_Evaluation): Add Related_Id and
885         Is_Low/High_Bound params.
886         * sem_ch3.adb (Constrain_Index): Use new Force_Evaluation calling
887         sequence to simplify generation of FIRST/LAST temps for bounds.
889 2015-03-12  Olivier Hainque  <hainque@adacore.com>
891         * gcc-interface/trans.c (Attribute_to_gnu) <Code_Address case>:
892         On targets where a function symbol designates a function descriptor,
893         fetch the function code address from the descriptor.
894         (USE_RUNTIME_DESCRIPTORS): Provide a default definition.
896 2015-03-04  Robert Dewar  <dewar@adacore.com>
898         * sem_warn.adb: Minor reformatting.
899         * init.c: Minor tweaks.
901 2015-03-04  Dmitriy Anisimko  <anisimko@adacore.com>
903         * a-coinho-shared.adb: Fix clear of already empty holder.
905 2015-03-04  Robert Dewar  <dewar@adacore.com>
907         * exp_unst.adb (Check_Dynamic_Type): Ignore library level types.
908         (Check_Uplevel_Reference_To_Type): Ignore call inside generic.
909         (Note_Uplevel_Reference): Ignore call inside generic.
910         (Note_Uplevel_Reference): Fix check for no entity field.
911         (Unnest_Subprogram): Ignore call inside generic.
912         (Find_Current_Subprogram): Use Defining_Entity, not Defining_Unit_Name.
913         (Visit_Node): Ignore calls to Imported subprograms.
914         (Visit_Node): Fix problem in finding subprogram body in some cases.
915         (Add_Form_To_Spec): Use Defining_Entity, not Defining_Unit_Name.
917 2015-03-04  Robert Dewar  <dewar@adacore.com>
919         * einfo.adb (Is_ARECnF_Entity): Removed.
920         (Last_Formal): Remove special handling of Is_ARECnF_Entity.
921         (Next_Formal): Remove special handling of Is_ARECnF_Entity.
922         (Next_Formal_With_Extras): Remove special handling of Is_ARECnF_Entity.
923         (Number_Entries): Minor reformatting.
924         * einfo.ads (Is_ARECnF_Entity): Removed.
925         * exp_unst.adb (Unnest_Subprogram): Remove setting of
926         Is_ARECnF_Entity.
927         (Add_Extra_Formal): Use normal Extra_Formal circuit.
928         * sprint.adb (Write_Param_Specs): Properly handle case where
929         there are no source formals, but we have at least one Extra_Formal
930         present.
932 2015-03-04  Ed Schonberg  <schonberg@adacore.com>
934         * sem_aggr.adb (Resolve_Record_Aggregate,
935         Add_Discriminant_Values): If the value is a reference to the
936         current instance of an enclosing type, use its base type to check
937         against prefix of attribute reference, because the target type
938         may be otherwise constrained.
940 2015-03-04  Robert Dewar  <dewar@adacore.com>
942         * atree.h: Add entries for Flag287-Flag309.
943         * einfo.adb: Add (unused) flags Flag287-Flag309.
945 2015-03-04  Ed Schonberg  <schonberg@adacore.com>
947         * sem_util.adb (Collect_Interfaces, Collect): When gathering
948         interfaces of ancestors, handle properly a subtype of a private
949         extension.
951 2015-03-04  Robert Dewar  <dewar@adacore.com>
953         * einfo.adb (Is_ARECnF_Entity): New flag (ARECnF is an extra formal).
954         (Next_Formal): Don't return ARECnF formal.
955         (Last_Formal): Don't consider ARECnF formal.
956         (Next_Formal_With_Extras): Do consider ARECnF formal.
957         * einfo.ads (Is_ARECnF_Entity): New flag (ARECnF is an extra formal).
958         * exp_unst.adb (Create_Entities): Set Is_ARECnF_Entity flag.
960 2015-03-04  Javier Miranda  <miranda@adacore.com>
962         * exp_ch6.adb (Expand_Simple_Function_Return): When the returned
963         object is a class-wide interface object and we generate the
964         accessibility described in RM 6.5(8/3) then displace the pointer
965         to the object to reference the base of the object (to get access
966         to the TSD of the object).
968 2015-03-04  Hristian Kirtchev  <kirtchev@adacore.com>
970         * sem_prag.adb (Analyze_Abstract_State): Use routine
971         Malformed_State_Error to issue general errors.
972         (Analyze_Pragma): Diagnose a syntax error related to a state
973         declaration with a simple option.
974         (Malformed_State_Error): New routine.
976 2015-03-04  Robert Dewar  <dewar@adacore.com>
978         * a-strsup.adb (Super_Slice): Deal with super flat case.
979         * einfo.ads: Minor reformatting.
980         * s-imgdec.adb (Set_Decimal_Digits): Add comment about possibly
981         redundant code.
983 2015-03-04  Claire Dross  <dross@adacore.com>
985         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
986         a-cforse.ads, a-cofove.ads: Use Default_Initial_Condition on formal
987         containers.
989 2015-03-04  Ed Schonberg  <schonberg@adacore.com>
991         * sem_warn.adb (Check_References): When checking for an unused
992         in-out parameter of a class- wide type, use its type to determine
993         whether it is private, in order to avoid a spurious warning when
994         subprogram spec and body are in different units.
996 2015-03-04  Yannick Moy  <moy@adacore.com>
998         * sem_attr.adb: Improve warning messages.
1000 2015-03-04  Robert Dewar  <dewar@adacore.com>
1002         * exp_ch6.adb (Expand_N_Subprogram_Body): Avoid trying to unnest
1003         generic subprograms.
1004         * exp_unst.adb (Check_Dynamic_Type): Handle record types properly
1005         (Note_Uplevel_Reference): Ignore uplevel references to non-types
1006         (Get_Level): Consider only subprograms, not blocks.
1007         (Visit_Node): Set proper condition for generating ARECnF entity.
1008         Ignore indirect calls. Ignore calls to subprograms
1009         outside our nest.
1010         (Unnest_Subprogram): Minor changes in dealing with ARECnF entity.
1011         (Add_Form_To_Spec): Properly set Last_Entity field.
1012         (Unnest_Subprogram): Set current subprogram scope for analyze calls.
1013         Handle case of no uplevel refs in outer subprogram
1014         Don't mark uplevel entities as aliased.
1015         Don't deal with calls with no ARECnF requirement.
1017 2015-03-04  Robert Dewar  <dewar@adacore.com>
1019         * s-valrea.adb (Scan_Real): Remove redundant tests from scaling loops.
1020         * s-imgdec.adb (Set_Decimal_Digits): Remove redundant Max
1021         operation in computing LZ.
1022         * sem_attr.adb: Minor typo fix
1024 2015-03-04  Robert Dewar  <dewar@adacore.com>
1026         * exp_ch7.adb: Minor reformatting.
1027         * exp_unst.adb (Build_Tables): Fix minor glitch for no separate
1028         spec case.
1029         * erroutc.adb (Delete_Msg): add missing decrement of info msg counter.
1031 2015-03-04  Hristian Kirtchev  <kirtchev@adacore.com>
1033         * exp_ch6.adb (Build_Pragma_Check_Equivalent): Suppress
1034         references to formal parameters subject to pragma Unreferenced.
1035         (Suppress_Reference): New routine.
1036         * sem_attr.adb (Analyze_Attribute): Reimplement the analysis
1037         of attribute 'Old. Attributes 'Old and 'Result now share
1038         common processing.
1039         (Analyze_Old_Result_Attribute): New routine.
1040         (Check_Placement_In_Check): Removed.
1041         (Check_Placement_In_Contract_Cases): Removed.
1042         (Check_Placement_In_Test_Case): Removed.
1043         (Check_Use_In_Contract_Cases): Removed.
1044         (Check_Use_In_Test_Case): Removed.
1045         (In_Refined_Post): Removed.
1046         (Is_Within): Removed.
1047         * sem_warn.adb (Check_Low_Bound_Tested): Code cleanup.
1048         (Check_Low_Bound_Tested_For): New routine.
1050 2015-03-04  Hristian Kirtchev  <kirtchev@adacore.com>
1052         * exp_ch3.adb (Expand_N_Object_Declaration):
1053         Generate a runtime check to test the expression of pragma
1054         Default_Initial_Condition when the object is default initialized.
1056 2015-03-02  Robert Dewar  <dewar@adacore.com>
1058         * scng.adb (Scan): Ignore illegal character in relaxed
1059         semantics mode.
1061 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
1063         * sem_ch4.adb (Analyze_Set_Membership); Retain Overloaded flag
1064         on left operand, so it can be properly resolved with type of
1065         alternatives of right operand.
1066         * sem_res.adb (Resolve_Set_Membership): Handle properly an
1067         overloaded left-hand side when the alternatives on the right
1068         hand side are literals of some universal type.  Use first
1069         non-overloaded alternative to find expected type.
1071 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
1073         * exp_ch7.adb (Make_Set_Finalize_Address_Call): Use underlying
1074         type to retrieve designated type, because the purported access
1075         type may be a partial (private) view, when it is declared in
1076         the private part of a nested package, and finalization actions
1077         are generated when completing compilation of enclosing unit.
1079 2015-03-02  Robert Dewar  <dewar@adacore.com>
1081         * back_end.adb (Call_Back_End): Remove previous patch,
1082         the back end now gets to see the result of -gnatd.1
1083         (Unnest_Subprogram_Mode) processing.
1084         * elists.ads, elists.adb (List_Length): New function.
1085         * exp_unst.ads, exp_unst.adb: Major changes, first complete version.
1086         * sem_util.adb (Check_Nested_Access): Handle formals in
1087         Unnest_Subprogram_Mode.
1088         (Adjust_Named_Associations): Minor reformatting.
1089         * sprint.adb (Sprint_Node_Actual): Fix failure to print aliased
1090         for parameters.
1092 2015-03-02  Robert Dewar  <dewar@adacore.com>
1094         * atree.ads, atree.adb (Uint24): New function
1095         (Set_Uint24): New procedure.
1096         * atree.h (Uint24): New macro for field access.
1097         * back_end.adb (Call_Back_End): For now, don't call back end
1098         if unnesting subprogs.
1099         * einfo.adb (Activation_Record_Component): New field
1100         (Subps_Index): New field.
1101         * einfo.ads (Activation_Record_Component): New field
1102         (Subps_Index): New field Minor reordering of comments into alpha order.
1103         * exp_unst.ads, exp_unst.adb: Continued development.
1105 2015-03-02  Gary Dismukes  <dismukes@adacore.com>
1107         * exp_disp.ads: Minor reformatting.
1109 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
1111         * sem_ch8.adb (Chain_Use_Clause): Do not chain use clause from
1112         ancestor to list of use clauses active in descendant unit if we
1113         are within the private part of an intervening parent, to prevent
1114         circularities in use clause list.
1116 2015-03-02  Javier Miranda  <miranda@adacore.com>
1118         * exp_ch9.adb (Build_Corresponding_Record): Propagate type
1119         invariants to the corresponding record type.
1120         * exp_disp.ad[sb] (Set_DT_Position_Value): New subprogram
1121         which sets the value of the DTC_Entity associated with a given
1122         primitive of a tagged type and propagates the value to the
1123         wrapped subprogram.
1124         (Set_DTC_Entity_Value): Propagate the DTC
1125         value to the wrapped entity.
1126         * sem_ch13.adb (Build_Invariant_Procedure): Append the code
1127         associated with invariants of progenitors.
1128         * sem_ch3.adb (Build_Derived_Record_Type): Inherit type invariants
1129         of parents and progenitors.
1130         (Process_Full_View): Check hidden inheritance of class-wide type
1131         invariants.
1132         * sem_ch7.adb (Analyze_Package_Specification): Do not generate
1133         the invariant procedure for interface types; build the invariant
1134         procedure for tagged types inheriting invariants from their
1135         progenitors.
1136         * sem_prag.adb (Pragma_Invariant) Allow invariants in interface
1137         types but do not build their invariant procedure since their
1138         invariants will be propagated to the invariant procedure of
1139         types covering the interface.
1140         * exp_ch6.adb, exp_disp.adb, sem_ch3.adb, sem_ch7.adb,
1141         sem_ch8.adb, sem_disp.adb: Replace all calls to Set_DT_Position
1142         by calls to Set_DT_Position_Value.
1144 2015-03-02  Hristian Kirtchev  <kirtchev@adacore.com>
1146         * sem_attr.adb (Analyze_Attribute): Factor out heavily indented
1147         code in Denote_Same_Function.  Do not analyze attribute 'Result
1148         when it is inside procedure _Postconditions.  Remove a misplaced
1149         warning diagnostic. Code cleanup.
1150         (Denote_Same_Function): New routine.
1151         * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Code
1152         cleanup. Warn on pre/postconditions on an inlined subprogram.
1153         (Analyze_Pragma, Refined_Post case): Warn on pre/postconditions on
1154         an inlined subprogram.
1155         (Analyze_Pre_Post_Condition_In_Decl_Part): Code cleanup. Warn on
1156         pre/post condition on an inlined subprogram.
1157         (Analyze_Test_Case_In_Decl_Part): Code cleanup. Warn on
1158         pre/postconditions on an inlined subprogram.
1159         (Check_Postcondition_Use_In_Inlined_Subprogram): New routine.
1161 2015-03-02  Hristian Kirtchev  <kirtchev@adacore.com>
1163         * sem_prag.adb (Ensure_Aggregate_Form):
1164         Ensure that the name denoted by the Chars of a pragma argument
1165         association has the proper Sloc when converted into an aggregate.
1167 2015-03-02  Bob Duff  <duff@adacore.com>
1169         * sem_ch6.adb (Check_Private_Overriding): Capture
1170         Incomplete_Or_Partial_View in a constant. This is cleaner and
1171         more efficient.
1173 2015-03-02  Gary Dismukes  <dismukes@adacore.com>
1175         * einfo.ads, exp_unst.ads: Minor reformatting.
1177 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
1179         * a-strsea.adb (Find_Token): Ensure that the range of iteration
1180         does not perform any improper character access. This prevents
1181         erroneous access in the unusual case of an empty string target
1182         and a From parameter less than Source'First.
1184 2015-03-02  Robert Dewar  <dewar@adacore.com>
1186         * elists.adb (List_Length): Fix incorrect result.
1188 2015-03-02  Bob Duff  <duff@adacore.com>
1190         * sem_ch6.adb (Check_Private_Overriding): Refine the legality
1191         checks here. It used to check that the function is merely
1192         overriding SOMEthing. Now it checks that the function is
1193         overriding a corresponding public operation. This is a correction
1194         to the implementation of the rule in RM-3.9.3(10).
1196 2015-03-02  Robert Dewar  <dewar@adacore.com>
1198         * debug.adb: Document new debug flag -gnatd.1.
1199         * einfo.ads, einfo.adb (Has_Nested_Subprogram): New flag.
1200         (Has_Uplevel_Reference): New flag (Is_Static_Type): New flag.
1201         (Uplevel_Reference_Noted):New flag (Uplevel_References): New field.
1202         * elists.ads elists.adb (List_Length): New function.
1203         * exp_ch6.adb (Expand_N_Subprogram_Body): Call Unnest_Subprogram
1204         when appropriate (Process_Preconditions): Minor code
1205         reorganization and reformatting
1206         * exp_unst.ads, exp_unst.adb: New files.
1207         * gnat1drv.adb (Adjust_Global_Switches): Set
1208         Unnest_Subprogram_Mode if -gnatd.1
1209         * namet.ads, namet.adb (Name_Find_Str): New version of Name_Find with
1210         string argument.
1211         * opt.ads (Unnest_Subprogram_Mode): New flag.
1212         * par-ch3.adb (P_Identifier_Declarations): Fixes to -gnatd.2 handling.
1213         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set
1214         Has_Nested_Subprogram flag.
1215         * sem_ch8.adb (Find_Direct_Name): New calling sequence for
1216         Check_Nested_Access.
1217         (Find_Selected_Component): Minor comment addition.
1218         * sem_util.adb (Check_Nested_Access): New version for use with Exp_Unst.
1219         (Note_Possible_Modification): New calling sequence for
1220         Check_Nested_Access.
1221         * sem_util.ads (Check_Nested_Access): New version for use with Exp_Unst.
1222         * gcc-interface/Make-lang.in (GNAT1_OBJS): Add exp_unst.o
1224 2015-03-02  Pierre-Marie de Rodat  <derodat@adacore.com>
1226         * gcc-interface/utils.c (gnat_pushdecl): For non-artificial pointer
1227         types, preserve the original type and create copies just like the C
1228         front-end does.  For artificial ones, do not define a name for
1229         the original type.
1230         (create_type_decl): When gnat_pushdecl made the input type the
1231         original type for the new declaration, do not define a stub
1232         declaration for it.
1233         * gcc-interface/utils2.c (build_binary_op): Accept two different
1234         pointer types when they point to the same type.
1236 2015-03-02  Hristian Kirtchev  <kirtchev@adacore.com>
1238         * exp_util.adb (Possible_Bit_Aligned_Component): Do not process
1239         an unanalyzed node.
1240         * sem_util.adb (Kill_Current_Values): Do not invalidate and
1241         de-null a constant.
1243 2015-03-02  Robert Dewar  <dewar@adacore.com>
1245         * sem_ch3.adb, exp_attr.adb, checks.adb, exp_aggr.adb: Minor
1246         reformatting.
1248 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
1250         * sem_ch8.adb: extend use of Available_Subtype.
1252 2015-03-02  Hristian Kirtchev  <kirtchev@adacore.com>
1254         * sem_prag.adb (Duplication_Error): Remove the special handling
1255         of 'Class or _Class in the context of pre/postconditions.
1256         (Process_Class_Wide_Condition): Remove the special handling of
1257         'Class or _Class in the context of pre/postconditions.
1258         * sem_util.adb (Original_Aspect_Pragma_Name): Names Pre_Class
1259         and Post_Class no longer need to be converted to _Pre and _Post.
1260         * sem_util.ads (Original_Aspect_Pragma_Name): Update the comment
1261         on usage.
1263 2015-03-02  Hristian Kirtchev  <kirtchev@adacore.com>
1265         * exp_ch6.adb (Process_Preconditions): Modify the
1266         mechanism that find the first source declaration to correct exit
1267         the loop once it has been found.
1269 2015-03-02  Gary Dismukes  <dismukes@adacore.com>
1271         * a-strsea.adb: Minor typo fix.
1273 2015-03-02  Bob Duff  <duff@adacore.com>
1275         * einfo.ads: Minor comment fixes.
1277 2015-03-02  Gary Dismukes  <dismukes@adacore.com>
1279         * einfo.adb, checks.adb: Minor reformatting and typo fixes.
1281 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
1283         * exp_aggr.adb (Get_Assoc_Expr): If the Default_Component_Value
1284         is defined for the array type, use it instead of a Default_Value
1285         specified for the component type itself.
1287 2015-03-02  Thomas Quinot  <quinot@adacore.com>
1289         * exp_attr.adb (Expand_N_Attribute_Reference, case Input): When
1290         expanding a 'Input attribute reference for a class-wide type,
1291         do not generate a separate object declaration for the controlling
1292         tag dummy object; instead, generate the expression inline in the
1293         dispatching call. Otherwise, the declaration (which involves a
1294         call to String'Input, returning a dynamically sized value on the
1295         secondary stack) will be expanded outside of proper secondary
1296         stack mark/release operations, and will thus cause a secondary
1297         stack leak.
1299 2015-03-02  Hristian Kirtchev  <kirtchev@adacore.com>
1301         * checks.adb (Add_Validity_Check): Change the names of all
1302         formal parameters to better illustrate their purpose. Update
1303         the subprogram documentation. Update all occurrences of the
1304         formal parameters. Generate a pre/postcondition pragma by
1305         calling Build_Pre_Post_Condition.
1306         (Build_PPC_Pragma): Removed.
1307         (Build_Pre_Post_Condition): New routine.
1308         * einfo.adb Node8 is no longer used as Postcondition_Proc. Node14
1309         is now used as Postconditions_Proc. Flag240 is now renamed to
1310         Has_Expanded_Contract.  (First_Formal): The routine can now
1311         operate on generic subprograms.
1312         (First_Formal_With_Extras): The routine can now operate on generic
1313         subprograms.
1314         (Has_Expanded_Contract): New routine.
1315         (Has_Postconditions): Removed.
1316         (Postcondition_Proc): Removed.
1317         (Postconditions_Proc): New routine.
1318         (Set_Has_Expanded_Contract): New routine.
1319         (Set_Has_Postconditions): Removed.
1320         (Set_Postcondition_Proc): Removed.
1321         (Set_Postconditions_Proc): New routine.
1322         (Write_Entity_Flags): Remove the output of Has_Postconditions. Add
1323         the output of Has_Expanded_Contract.
1324         (Write_Field8_Name): Remove the output of Postcondition_Proc.
1325         (Write_Field14_Name): Add the output of Postconditions_Proc.
1326         * einfo.ads New attributes Has_Expanded_Contract and
1327         Postconditions_Proc along with occurrences in entities.
1328         Remove attributes Has_Postconditions and Postcondition_Proc
1329         along with occurrences in entities.
1330         (Has_Expanded_Contract): New routine along with pragma Inline.
1331         (Has_Postconditions): Removed along with pragma Inline.
1332         (Postcondition_Proc): Removed along with pragma Inline.
1333         (Postconditions_Proc): New routine along with pragma Inline.
1334         (Set_Has_Expanded_Contract): New routine along with pragma Inline.
1335         (Set_Has_Postconditions): Removed along with pragma Inline.
1336         (Set_Postcondition_Proc): Removed along with pragma Inline.
1337         (Set_Postconditions_Proc): New routine along with pragma Inline.
1338         * exp_ch6.adb (Add_Return): Code cleanup. Update the
1339         generation of the call to the _Postconditions routine of
1340         the procedure.  (Expand_Non_Function_Return): Reformat the
1341         comment on usage. Code cleanup.  Update the generation of
1342         the call to the _Postconditions routine of the procedure or
1343         entry [family].
1344         (Expand_Simple_Function_Return): Update the
1345         generation of the _Postconditions routine of the function.
1346         (Expand_Subprogram_Contract): Reimplemented.
1347         * exp_ch6.ads (Expand_Subprogram_Contract): Update the parameter
1348         profile along the comment on usage.
1349         * exp_ch9.adb (Build_PPC_Wrapper): Code cleanup.
1350         (Expand_N_Task_Type_Declaration): Generate pre/postconditions
1351         wrapper when the entry [family] has a contract with
1352         pre/postconditions.
1353         * exp_prag.adb (Expand_Attributes_In_Consequence): New routine.
1354         (Expand_Contract_Cases): This routine and its subsidiaries now
1355         analyze all generated code.
1356         (Expand_Old_In_Consequence): Removed.
1357         * sem_attr.adb Add with and use clause for Sem_Prag.
1358         (Analyze_Attribute): Reimplment the analysis of attribute 'Result.
1359         (Check_Use_In_Test_Case): Use routine Test_Case_Arg to obtain
1360         "Ensures".
1361         * sem_ch3.adb (Analyze_Declarations): Analyze the contract of
1362         a generic subprogram.
1363         (Analyze_Object_Declaration): Do not create a contract node.
1364         (Derive_Subprogram): Do not create a contract node.
1365         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Do
1366         not create a contract node.
1367         (Analyze_Completion_Contract): New routine.
1368         (Analyze_Function_Return): Alphabetize.
1369         (Analyze_Generic_Subprogram_Body): Alphabetize. Do not create a
1370         contract node.  Do not copy pre/postconditions to the original
1371         generic template.
1372         (Analyze_Null_Procedure): Do not create a contract node.
1373         (Analyze_Subprogram_Body_Contract): Reimplemented.
1374         (Analyze_Subprogram_Body_Helper): Do not mark the enclosing scope
1375         as having postconditions. Do not create a contract node. Analyze
1376         the subprogram body contract of a body that acts as a compilation
1377         unit. Expand the subprogram contract after the declarations have
1378         been analyzed.
1379         (Analyze_Subprogram_Contract): Reimplemented.
1380         (Analyze_Subprogram_Specification): Do not create a contract node.
1381         (List_Inherited_Pre_Post_Aspects): Code cleanup.
1382         * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Update the
1383         comment on usage.
1384         (Analyze_Subprogram_Contract): Update the
1385         parameter profile and the comment on usage.
1386         * sem_ch7.adb (Analyze_Package_Body_Helper): Do not create a
1387         contract node.
1388         (Analyze_Package_Declaration): Do not create a
1389         contract node.
1390         (Is_Subp_Or_Const_Ref): Ensure that the prefix has an entity.
1391         * sem_ch8.adb (Analyze_Subprogram_Renaming): Do not create a
1392         contract node.
1393         * sem_ch9.adb (Analyze_Entry_Declaration): Do not create a
1394         contract node.
1395         * sem_ch10.adb (Analyze_Compilation_Unit): Move local variables to
1396         their proper section and alphabetize them. Analyze the contract of
1397         a [generic] subprogram after all Pragmas_After have been analyzed.
1398         (Analyze_Subprogram_Body_Stub_Contract): Alphabetize.
1399         * sem_ch12.adb (Analyze_Generic_Package_Declaration): Do not
1400         create a contract node.
1401         (Analyze_Generic_Subprogram_Declaration):
1402         Alphabetize local variables. Do not create a contract
1403         node. Do not generate aspects out of pragmas for ASIS.
1404         (Analyze_Subprogram_Instantiation): Instantiate
1405         the contract of the subprogram.  Do not create a
1406         contract node.  (Instantiate_Contract): New routine.
1407         (Instantiate_Subprogram_Body): Alphabetize local variables.
1408         (Save_Global_References_In_Aspects): New routine.
1409         (Save_References): Do not save the global references found within
1410         the aspects of a generic subprogram.
1411         * sem_ch12.ads (Save_Global_References_In_Aspects): New routine.
1412         * sem_ch13.adb (Analyze_Aspect_Specifications): Do not use
1413         Original_Node for establishing linkages.
1414         (Insert_Pragma): Insertion in a subprogram body takes precedence over
1415         the case where the subprogram body is also a compilation unit.
1416         * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Use
1417         Get_Argument to obtain the proper expression. Install the generic
1418         formals when the related context is a generic subprogram.
1419         (Analyze_Depends_In_Decl_Part): Use Get_Argument to obtain
1420         the proper expression. Use Corresponding_Spec_Of to obtain
1421         the spec. Install the generic formal when the related context
1422         is a generic subprogram.
1423         (Analyze_Global_In_Decl_Part): Use Get_Argument to obtain the proper
1424         expression. Use Corresponding_Spec_Of to obtain the spec. Install the
1425         generic formal when the related context is a generic subprogram.
1426         (Analyze_Initial_Condition_In_Decl_Part): Use Get_Argument
1427         to obtain the proper expression. Remove the call to
1428         Check_SPARK_Aspect_For_ASIS as the analysis is now done
1429         automatically.
1430         (Analyze_Pragma): Update all occurrences
1431         to Original_Aspect_Name. Pragmas Contract_Cases, Depends,
1432         Extensions_Visible, Global, Postcondition, Precondition and
1433         Test_Case now carry generic templates when the related context
1434         is a generic subprogram. The same pragmas are no longer
1435         forcefully fully analyzed when the context is a subprogram
1436         that acts as a compilation unit. Pragmas Abstract_State,
1437         Initial_Condition, Initializes and Refined_State have been clean
1438         up. Pragmas Post, Post_Class, Postcondition, Pre, Pre_Class
1439         and Precondition now use the same routine for analysis. Pragma
1440         Refined_Post does not need to check the use of 'Result or
1441         the lack of a post-state in its expression. Reimplement the
1442         analysis of pragma Test_Case.
1443         (Analyze_Pre_Post_Condition): New routine.
1444         (Analyze_Pre_Post_Condition_In_Decl_Part):
1445         Reimplemented.
1446         (Analyze_Refined_Depends_In_Decl_Part): Use Get_Argument to obtain the
1447         proper expression.
1448         (Analyze_Refined_Global_In_Decl_Part): Use Get_Argument to obtain
1449         the proper expression.
1450         (Analyze_Test_Case_In_Decl_Part): Reimplemented.
1451         (Check_Pre_Post): Removed.
1452         (Check_Precondition_Postcondition): Removed.
1453         (Check_SPARK_Aspect_For_ASIS): Removed.
1454         (Check_Test_Case): Removed.
1455         (Collect_Subprogram_Inputs_Outputs): Use Get_Argument
1456         to obtain the proper expression. Use Corresponding_Spec_Of to
1457         find the proper spec.
1458         (Create_Generic_Template): New routine.
1459         (Duplication_Error): New routine.
1460         (Expression_Function_Error): New routine.
1461         (Find_Related_Subprogram_Or_Body): Moved to the spec
1462         of Sem_Prag. Emit precise error messages. Account for cases of
1463         rewritten expression functions, generic instantiations, handled
1464         sequence of statements and pragmas from aspects.
1465         (Get_Argument): New routine.
1466         (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Removed.
1467         (Preanalyze_CTC_Args): Removed.
1468         (Process_Class_Wide_Condition): New routine.
1469         * sem_prag.ads (Analyze_Test_Case_In_Decl_Part): Update
1470         the parameter profile along with the comment on usage.
1471         (Find_Related_Subprogram_Or_Body): Moved from the body of Sem_Prag.
1472         (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Removed.
1473         (Test_Case_Arg): New routine.
1474         * sem_util.adb Add with and use clauses for Sem_Ch6.
1475         (Add_Contract_Item): This routine now creates a contract
1476         node the first time an item is added. Remove the duplicate
1477         aspect/pragma checks.
1478         (Check_Result_And_Post_State): Reimplemented.
1479         (Corresponding_Spec_Of): New routine.
1480         (Get_Ensures_From_CTC_Pragma): Removed.
1481         (Get_Requires_From_CTC_Pragma): Removed.
1482         (Has_Significant_Contract): New routine.
1483         (Inherit_Subprogram_Contract): Inherit only if the source
1484         has a contract.
1485         (Install_Generic_Formals): New routine.
1486         (Original_Aspect_Name): Removed.
1487         (Original_Aspect_Pragma_Name): New routine.
1488         * sem_util.ads (Check_Result_And_Post_State): Reimplemented.
1489         (Corresponding_Spec_Of): New routine.
1490         (Get_Ensures_From_CTC_Pragma): Removed.
1491         (Get_Requires_From_CTC_Pragma): Removed.
1492         (Has_Significant_Contract): New routine.
1493         (Install_Generic_Formals): New routine.
1494         (Original_Aspect_Name): Removed.
1495         (Original_Aspect_Pragma_Name): New routine.
1496         * sem_warn.adb Add with and use clauses for Sem_Prag.
1497         (Within_Postcondition): Use Test_Case_Arg to extract "Ensures".
1499 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
1501         * sem_ch8.adb (Available_Subtype): Optimization in
1502         Find_Selected_Component: when safe, use existing subtype of
1503         array component, possibly discriminant-dependent, rather than
1504         creating new subtype declaration for it. In this fashion different
1505         occurrences of the component have the same subtype, rather than
1506         just equivalent ones. Simplifies value tracing in GNATProve.
1508 2015-03-01  Arnaud Charlet  <charlet@adacore.com>
1510         PR ada/65259
1512         * doc/gnat_ugn/gnat_project_manager.rst,
1513         doc/gnat_ugn/platform_specific_information.rst: Remove reference to
1514         image, too troublesome with texi format.
1515         * gnat_ugn.texi: Regenerate.
1517 2015-02-24  Thomas Schwinge  <thomas@codesourcery.com>
1519         PR libgomp/64625
1520         * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8): Remove.
1521         (DEF_FUNCTION_TYPE_VAR_12): Likewise.
1522         (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
1524 2015-02-23  Thomas Schwinge  <thomas@codesourcery.com>
1526         * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8): Fix number of
1527         arguments parameter.
1528         (DEF_FUNCTION_TYPE_VAR_12): Likewise.
1530 2015-02-22  Arnaud Charlet  <charlet@adacore.com>
1532         * doc/Makefile: postprocess texinfo files to update @dircategory
1533         and update texi files under gcc/ada.
1534         * gnat_ugn.texi, gnat_rm.texi: Regenerated.
1536 2015-02-22  Arnaud Charlet  <charlet@adacore.com>
1538         * doc/gnat_ugn/project-manager-figure.png,
1539         doc/gnat_ugn/rtlibrary-structure.png: New.
1541 2015-02-22  Tom de Vries  <tom@codesourcery.com>
1543         PR ada/65100
1544         * gnat-style.texi (@subsection Loop Statements): Replace @noindent by
1545         @item, and fix warning '@itemize has text but no @item'.
1547 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
1549         * sem_prag.adb (Analyze_Pragma, case Obsolescent): Pragma
1550         legally applies to an abstract subprogram declaration.
1551         * freeze.adb: Minor comment addition.
1553 2015-02-20  Robert Dewar  <dewar@adacore.com>
1555         * errout.ads: Document replacement of Name_uPre/Post/Type_Invariant.
1556         * erroutc.adb (Set_Msg_Str): Replace _xxx.
1557         (Pre/Post/Type_Invariant) by xxx'Class.
1558         * erroutc.ads (Set_Msg_Str): Replace _xxx.
1559         (Pre/Post/Type_Invariant) by xxx'Class.
1560         * sem_prag.adb (Fix_Error): Remove special casing of
1561         Name_uType_Invariant.
1562         (Analyze_Pre_Post_Condition_In_Decl_Part): Remove special casing of
1563         Name_uPre and Name_uPost in aspect case (done in Errout now).
1565 2015-02-20  Robert Dewar  <dewar@adacore.com>
1567         * g-alveop.adb: Minor style fixes.
1569 2015-02-20  Robert Dewar  <dewar@adacore.com>
1571         * freeze.adb (Warn_Overlay): Guard against blow up with address
1572         clause.
1574 2015-02-20  Bob Duff  <duff@adacore.com>
1576         * exp_attr.adb (May_Be_External_Call): Remove this. There is no need
1577         for the compiler to guess whether the call is internal or external --
1578         it is always external.
1579         (Expand_Access_To_Protected_Op): For P'Access, where P
1580         is a protected subprogram, always create a pointer to the
1581         External_Subprogram.
1583 2015-02-20  Robert Dewar  <dewar@adacore.com>
1585         * a-dispat.adb, a-stcoed.ads: Minor reformatting.
1587 2015-02-20  Robert Dewar  <dewar@adacore.com>
1589         * sem_ch13.adb (Build_Discrete_Static_Predicate): Allow static
1590         predicate for non-static subtype.
1591         (Build_Predicate_Functions): Do not assume subtype associated with a
1592         static predicate must be static.
1594 2015-02-20  Robert Dewar  <dewar@adacore.com>
1596         * errout.adb (Set_Msg_Node): Better handling of internal names
1597         (Set_Msg_Node): Kill message when we cannot eliminate internal name.
1598         * errout.ads: Document additional case of message deletion.
1599         * namet.adb (Is_Internal_Name): Refined to consider wide
1600         strings in brackets notation and character literals not to be
1601         internal names.
1602         * sem_ch8.adb (Find_Selected_Component): Give additional error
1603         when selector name is a subprogram whose first parameter has
1604         the same type as the prefix, but that type is untagged.
1606 2015-02-20  Robert Dewar  <dewar@adacore.com>
1608         * g-allein.ads, g-alveop.adb, g-alveop.ads, opt.ads: Minor reformatting
1610 2015-02-20  Tristan Gingold  <gingold@adacore.com>
1612         * opt.ads (GNAT_Mode_Config): New variable.
1613         * opt.adb (Set_Opt_Config_Switches): Consider GNAT_Mode_Config
1614         to set Assertions_Enabled.
1615         * switch-c.adb (Scan_Front_End_Switches): Set GNAT_Mode_Config
1616         for -gnatg.
1618 2015-02-20  Robert Dewar  <dewar@adacore.com>
1620         * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Add an additional
1621         comment regarding the handling of unterminated fixed-point
1622         constants.
1623         * s-valuns.ads (Scan_Raw_Unsigned): Add comments
1624         corresponding to those previously added for
1625         System.Val_LLU.Scan_Raw_Long_Long_Unsigned.
1627 2015-02-20  Olivier Hainque  <hainque@adacore.com>
1629         * g-allein.ads, g-alveop.ads, g-alveop.adb: Code clean ups.
1631 2015-02-20  Robert Dewar  <dewar@adacore.com>
1633         * sem_prag.adb: Minor comment clarification.
1635 2015-02-20  Olivier Hainque  <hainque@adacore.com>
1637         * g-allein.ads (vec_ctf, vec_vcsfx, vec_vcfux): Remove.
1638         * g-alleve.ads, g-alleva.adb (vcfux): Likewise.
1639         * g-alveop.ads (vec_vcfsx, vec_vcfux): Just rename the ll versions.
1640         (vec_ctf): Now renamings as well.
1642 2015-02-20  Robert Dewar  <dewar@adacore.com>
1644         * switch-c.adb, bindgen.adb: Minor reformatting.
1646 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
1648         * sem_prag.adb (Analyze_Pragma, case Type_Invariant):
1649         Invariant'class is allowed on an abstract type.
1651 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
1653         * sem_ch3.adb (Access_Definition): If the access definition is
1654         for a protected component and defines an access to protected
1655         subprogram, do not create an itype reference for it because a
1656         full type declaration will be built in order to generate the
1657         proper equivalent type.
1658         (Analyze_Subtype_Declaration): Add information of incomplete
1659         subtypes, for Ada 2012 extended uses of incomplete types.
1661 2015-02-20  Gary Dismukes  <dismukes@adacore.com>
1663         * sem_res.adb: Minor reformatting.
1665 2015-02-20  Vincent Celier  <celier@adacore.com>
1667         * switch-c.adb (Scan_Front_End_Switches): When comparing runtime
1668         path name for several switches --RTS, use the normalized path
1669         names.
1671 2015-02-20  Vincent Celier  <celier@adacore.com>
1673         * bindgen.adb: Minor reformatting and code reorganization.
1675 2015-02-20  Jose Ruiz  <ruiz@adacore.com>
1677         * a-stcoed.ads: Add spec for this package (Unimplemented_Unit).
1678         * impunit.adb (Non_Imp_File_Names_12): Mark unit a-stcoed.ads as
1679         defined by Ada 2012.
1681 2015-02-20  Arnaud Charlet  <charlet@adacore.com>
1683         * sysdep.c, expect.c, s-oscons-tmplt.c, gsocket.h, adaint.c: Remove
1684         obsolete references to RTX, nucleus, VMS.
1686 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
1688         * sem_prag.adb (Fix_Error): For an illegal Type_Invariant'Class
1689         aspect, use name that mentions Class explicitly, rather than
1690         compiler-internal name.
1692 2015-02-20  Robert Dewar  <dewar@adacore.com>
1694         * debug.adb: Add documentation for -gnatd.2 (allow statements
1695         in decl sequences).
1696         * par-ch3.adb (P_Identifier_Declarations): Handle
1697         statement appearing where declaration expected more cleanly.
1698         (Statement_When_Declaration_Expected): Implement debug flag
1699         -gnatd.2.
1701 2015-02-20  Jose Ruiz  <ruiz@adacore.com>
1703         * a-dinopr.ads: Add spec for this package (Unimplemented_Unit).
1704         * a-dispat.ads (Yield): Include procedure added in Ada 2012.
1705         * a-dispat.adb (Yield): Implement procedure added in Ada 2012.
1706         * impunit.adb (Non_Imp_File_Names_05): Mark unit a-dinopr.ads as
1707         defined by Ada 2005.
1708         * snames.ads-tmpl (Name_Non_Preemptive_FIFO_Within_Priorities):
1709         This is the correct name for the dispatching policy (FIFO was
1710         missing).
1712 2015-02-20  Javier Miranda  <miranda@adacore.com>
1714         * sem_res.adb (Resolve_Type_Conversion): If the type of the
1715         operand is the limited-view of a class-wide type then recover
1716         the class-wide type of the non-limited view.
1718 2015-02-20  Arnaud Charlet  <charlet@adacore.com>
1720         * gcc-interface/Makefile.in: Remove references to nucleus.
1721         * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Procedure): Set
1722         extern_flag to true for Inline_Always subprograms with
1723         Intrinsic convention.
1725 2015-02-20  Yannick Moy  <moy@adacore.com>
1727         * sem_prag.ads: Minor typo in comment.
1729 2015-02-20  Pascal Obry  <obry@adacore.com>
1731         * s-osprim-mingw.adb: Fix Get_Base_Time parameter mode.
1733 2015-02-20  Vincent Celier  <celier@adacore.com>
1735         * makeutl.adb (Get_Directories.Add_Dir): Add a directory only
1736         if it exists.
1738 2015-02-20  Robert Dewar  <dewar@adacore.com>
1740         * sem_eval.ads: Minor reformatting.
1742 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
1744         * freeze.adb (Size_Known): Do not set the packed size for
1745         independent type or component.
1746         (Freeze_Array_Type): Check for Independent[_Components] with packing
1747         or explicit component size clause.
1748         * gnat1drv.adb (Post_Compilation_Validation_Checks): Do the validation
1749         of independence pragmas only for non-GCC back-ends.
1750         * sem_ch13.adb (Initialize): Likewise for the initialization.
1751         * sem_prag.adb (Record_Independence_Check): New procedure to record an
1752         independence check in the table.
1753         (Analyze_Pragma): Use it throughout instead of doing it manually.
1754         * gcc-interface/decl.c (gnat_to_gnu_field): Add support for
1755         independent type or component.
1757 2015-02-20  Thomas Quinot  <quinot@adacore.com>
1759         * adaint.c (__gnat_readdir): For Solaris, use 64 bit variants of
1760         struct direct and readdir. This is required for NFS filesystems
1761         mounted from servers that use 64-bit cookies.
1763 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
1765         * sem_ch12.adb (Analyze_Subprogram_Instantiaion): New subprogram
1766         Build_Subprogram_Renaming, to create renaming of subprogram
1767         instance in the the declaration of the wrapper package rather
1768         than in its body, so that it is available for analysis of aspects
1769         propagated from generic to instantiation.
1770         (Check_Mismatch): An actual for a formal package that is an
1771         incomplete type matches a formal type that is incomplete.
1772         (Instantiate_Package_Body): Move code that builds subprogram
1773         renaming to Analyze_Subprogram_Instantiation.
1774         (Instantiate_Type): The generated subtype is a limited view if
1775         the actual is a limited view.
1776         (Load_Parent_Of_Generic): Retrieve instance declaration from
1777         its new position within wrapper package.
1779 2015-02-20  Arnaud Charlet  <charlet@adacore.com>
1781         * s-parame-vxworks.adb, s-os_lib.ads: Update comments.
1783 2015-02-20  Robert Dewar  <dewar@adacore.com>
1785         * s-osinte-vxworks.ads (To_Timespec): Add comment about the
1786         issue of negative arguments.
1788 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
1790         * gnat1drv.adb: Minor consistency fix.
1792 2015-02-20  Pascal Obry  <obry@adacore.com>
1794         * s-osprim-mingw.adb (Get_Base_Time): Properly release lock in all
1795         paths.
1797 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
1799         * inline.adb (Expand_Inlined_Call): Skip again calls to subprogram
1800         renamings.
1801         * exp_ch6.adb (Expand_Call): Use back-end inlining
1802         instead of expansion for simple subprogram renamings.
1804 2015-02-20  Robert Dewar  <dewar@adacore.com>
1806         * exp_util.adb: Minor reformatting.
1808 2015-02-20  Vincent Celier  <celier@adacore.com>
1810         * switch-c.adb (Scan_Front_End_Switches): Do not fail when --RTS=
1811         is specified several times with different values that indicates
1812         the same runtime directory.
1814 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
1816         * sem_attr.adb (Check_Not_Incomplete_Type): Clean up code to
1817         handle properly illegal uses of attributes on prefixes on an
1818         incomplete type, both when the type of the prefix is locally
1819         incomplete, and when it is a limited view of a type whose
1820         non-limited view is not available.
1821         (Analyze_Attribute): Add calls to Check_Not_Incomplete_Type for
1822         'Address and others.
1824 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
1826         * exp_ch6.adb: Fix minor typo in comment.
1828 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
1830         * sinfo.ads: Add comment.
1832 2015-02-20  Olivier Hainque  <hainque@adacore.com>
1834         * opt.ads: Replace Opt.Suppress_All_Inlining by two separate
1835         flags controlling the actual FE inlining out of pragma Inline
1836         and pragma Inline_Always.
1837         * adabkend.adb (Scan_Compiler_Arguments): Set both flags to True
1838         on -fno-inline, which disables all inlining in compilers with
1839         an Ada back-end and without back-end inlining support.
1840         * back_end.adb (Scan_Back_End_Switches): Set the Inline related
1841         flag to True on -fno-inline and leave Inline_Always alone for
1842         gcc back-ends.
1843         * back_end.ads (Scan_Compiler_Arguments): Adjust spec wrt the
1844         names of the Opt flags it sets.
1845         * gnat1drv.adb (Adjust_Global_Switches): Remove test on
1846         Opt.Suppress_All_Inlining in the Back_End_Inlining computation.
1847         * sem_prag.adb (Make_Inline): Remove early return conditioned
1848         on Opt.Suppress_All_Inlining.
1849         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Use the flags to
1850         disable the calls to Build_Body_To_Inline otherwise triggered
1851         by pragma Inline or Inline_Always. This will prevent actual
1852         front-end inlining of the subprogram on calls.
1854 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
1856         * exp_ch3.adb (Default_Initialize_Object): Call Add_Inlined_Body on the
1857         Abort_Undefer_Direct function.
1858         * exp_ch5.adb (Expand_N_Assignment_Statement): Likewise.
1859         * exp_intr.adb (Expand_Unc_Deallocation): Likewise.
1860         * exp_prag.adb (Expand_Pragma_Abort_Defer): Likewise.
1861         * exp_ch4.adb (Expand_N_Selected_Component): Adjust call to
1862         Add_Inlined_Body.
1863         * exp_ch6.adb (Expand_Call): Adjust calls to Add_Inlined_Body.
1864          Remove call to Register_Backend_Call and move code resetting
1865         Needs_Debug_Info on inlined subprograms to...
1866         * inline.ads (Add_Inlined_Body): Add N parameter.
1867         (Register_Backend_Call): Delete.
1868         * inline.adb (Add_Inlined_Body): ...here and simplify.
1869          Register the call with Backend_Calls directly.
1870         (Register_Backend_Call): Delete.
1871         * s-stalib.ads (Abort_Undefer_Direct): Restore pragma Inline.
1873 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
1875         * s-stalib.ads: Fix typo.
1877 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
1879         * exp_ch3.adb (Default_Initialize_Object): If the object has a
1880         delayed freeze, the actions associated with default initialization
1881         must be part of the freeze actions, rather that being inserted
1882         directly after the object declaration.
1884 2015-02-20  Robert Dewar  <dewar@adacore.com>
1886         * lib-load.adb: Minor comment update.
1888 2015-02-20  Vincent Celier  <celier@adacore.com>
1890         * prj-proc.adb (Process_Case_Construction): When there are
1891         incomplete withed projects and the case variable is unknown,
1892         skip the case construction.
1894 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
1896         * exp_ch6.adb (Expand_Actuals): Add caller-side invariant checks
1897         when an actual is a view conversion, either because the call is
1898         to an inherited operation, or because the actual is an explicit
1899         type conversion to an ancestor type.  Fixes ACATS 4.0D: C732001
1901 2015-02-20  Robert Dewar  <dewar@adacore.com>
1903         * einfo.ads: Minor comment updates Fix missing pragma Inline
1904         for Set_Partial_View_Has_Unknown_Discr.
1905         * einfo.adb (Write_Entity_Flags): Add missing entry for
1906         Partial_View_Has_Unknown_Discr.
1907         * sem_ch3.adb: Minor reformatting.
1909 2015-02-20  Vincent Celier  <celier@adacore.com>
1911         * opt.ads: Minor cleanup: remove mention of gprmake.
1912         * s-stalib.ads (Abort_Undefer_Direct): Do not inline.
1913         * s-tataat.adb: Do not call System.Tasking.Self but directly
1914         System.Task_Primitives.Operations.Self.
1916 2015-02-20  Arnaud Charlet  <charlet@adacore.com>
1918         * gnat_rm.texi, gnat_ugn.texi: Now automatically generated from
1919         sphinx in the doc directory.
1920         * doc: New directory containing sphinx versions of gnat_rm and gnat_ugn
1922 2015-02-20  Robert Dewar  <dewar@adacore.com>
1924         * sem_res.adb: Minor reformatting.
1925         * exp_ch9.adb (Build_Protected_Spec): Copy Aliased setting when
1926         building spec.
1927         * sem_ch13.adb (Analyze_Aspect_Specifications): Exclude Boolean
1928         aspects from circuitry setting delay required to false if the
1929         argument is an integer literal.
1931 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
1933         * einfo.ads. einfo.adb (Partial_View_Has_Unknown_Discr):  New flag
1934         on type entities, to enforce AI12-0133: default initialization
1935         of types whose partial view has unknown discriminants does not
1936         get an invariant check, because clients of the unit can never
1937         declare objects of such types.
1938         * sem_ch3.adb (Find_Type_Name); Set new flag
1939         Partial_View_Has_Unknown_Discr when needed.
1940         * exp_ch3.adb (Expand_N_Object_Declaration): Use flag to suppress
1941         generation of invariant call on default-initialized object.
1943 2015-02-08  Eric Botcazou  <ebotcazou@adacore.com>
1945         * gcc-interface/decl.c (gnat_to_gnu_param): Do not strip the padding
1946         if the parameter either is passed by reference or if the alignment
1947         would be lowered.
1949 2015-02-08  Eric Botcazou  <ebotcazou@adacore.com>
1951         * gcc-interface/decl.c (is_cplusplus_method): Use Is_Primitive flag to
1952         detect primitive operations of tagged and untagged types.
1954 2015-02-08  Eric Botcazou  <ebotcazou@adacore.com>
1956         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not bother about alias
1957         sets in presence of derivation for subprogram types.
1959 2015-02-08  Eric Botcazou  <ebotcazou@adacore.com>
1961         * gcc-interface/utils.c (begin_subprog_body): Assert that the body is
1962         present in the same context as the declaration.
1964 2015-02-07  Jakub Jelinek  <jakub@redhat.com>
1966         PR middle-end/64340
1967         * gcc-interface/trans.c (gigi): Recreate optimization_default_node
1968         and optimization_current_node after tweaking global_options.
1970 2015-02-05  Robert Dewar  <dewar@adacore.com>
1972         * prj-proc.adb, sem_aux.adb, exp_ch9.adb, errout.adb, prj-dect.adb,
1973         prj-nmsc.adb: Minor reformatting.
1975 2015-02-05  Ed Schonberg  <schonberg@adacore.com>
1977         * sem_type.adb (Covers): In ASIS_Mode the Corresponding_Record
1978         of a protected type may not be available, so to check conformance
1979         with an interface type, examine the interface list in the type
1980         declaration directly.
1981         (Write_Overloads): Improve information for indirect calls,
1982         for debugger use.
1984 2015-02-05  Ed Schonberg  <schonberg@adacore.com>
1986         * exp_ch3.adb (Make_Tag_Assignment): Do not perform this
1987         expansion activity in ASIS mode.
1989 2015-02-05  Javier Miranda  <miranda@adacore.com>
1991         * errout.adb (Error_Msg_PT): Add missing error.
1992         * sem_ch6.adb (Check_Synchronized_Overriding): Check the missing
1993         RM rule.  Code cleanup.
1994         * exp_ch9.adb (Build_Wrapper_Spec): Propagate "constant" in
1995         anonymous access types.  Found working on the tests. Code cleanup.
1997 2015-02-05  Vincent Celier  <celier@adacore.com>
1999         * prj-dect.adb (Parse_Attribute_Declaration): Continue scanning
2000         when there are incomplete withs.
2001         * prj-nmsc.adb (Process_Naming): Do not try to get the value
2002         of an element when it is nil.
2003         (Check_Naming): Do not check a nil suffix for illegality
2004         * prj-proc.adb (Expression): Do not process an empty term.
2005         * prj-strt.adb (Attribute_Reference): If attribute cannot be
2006         found, parse a possible index to avoid cascading errors.
2008 2015-02-05  Ed Schonberg  <schonberg@adacore.com>
2010         * sem_aux.adb (Is_Derived_Type): A subprogram_type generated
2011         for an access_to_subprogram declaration is not a derived type.
2013 2015-02-05  Robert Dewar  <dewar@adacore.com>
2015         * errout.adb (Error_Msg_Internal): For non-serious error set
2016         Fatal_Error to Ignored.
2017         * lib-load.adb (Load_Unit): Minor comment updates.
2018         * sem_ch10.adb (Analyze_With_Clause): Propagate Fatal_Error
2019         setting from with'ed unit to with'ing unit.
2020         * sem_prag.adb (Analyze_Pragma, case Warnings): Document handling
2021         of ambiguity.
2023 2015-02-05  Yannick Moy  <moy@adacore.com>
2025         * sem_prag.adb, par-prag.adb: Minor code clean up.
2027 2015-02-05  Yannick Moy  <moy@adacore.com>
2029         * par-prag.adb (Pragma_Warnings): Update for extended form
2030         of pragma Warnings. The "one" argument case may now have 2 or
2031         3 arguments.
2032         * sem_prag.adb (Analyze_Pragma/Pragma_Warnings): Update for
2033         extended form of pragma Warnings. Pragma with tool name is either
2034         rewritten as null or as an equivalent form without tool name,
2035         before reanalysis.
2036         * snames.ads-tmpl (Name_Gnatprove): New name.
2038 2015-02-05  Robert Dewar  <dewar@adacore.com>
2040         * sem_ch13.adb (Add_Invariants): Don't assume invariant is
2041         standard Boolean.
2042         * sem_prag.adb (Analyze_Pragma, case Check): Don't assume
2043         condition is standard Boolean, it can be non-standard derived
2044         Boolean.
2046 2015-02-05  Robert Dewar  <dewar@adacore.com>
2048         * checks.adb (Enable_Range_Check): Disconnect attempted
2049         optimization for the case of range check for subscript of
2050         unconstrained array.
2052 2015-02-05  Robert Dewar  <dewar@adacore.com>
2054         * par-ch13.adb (With_Present): New function
2055         (Aspect_Specifications_Present): Handle WHEN in place of WITH
2056         (Get_Aspect_Specifications): Comment update.
2057         * par.adb: Comment updates.
2059 2015-02-05  Robert Dewar  <dewar@adacore.com>
2061         * errout.adb (Handle_Serious_Error): New setting of Fatal_Error.
2062         * frontend.adb (Frontend): New setting of Fatal_Error.
2063         * lib-load.adb (Create_Dummy_Package_Unit): New setting of
2064         Fatal_Error.
2065         (Load_Main_Source): New setting of Fatal_Error
2066         (Load_Unit): New setting of Fatal_Error.
2067         * lib-writ.adb (Add_Preprocessing_Dependency): New setting of
2068         Fatal_Error.
2069         (Ensure_System_Dependency): New setting of Fatal_Error.
2070         * lib.adb (Fatal_Error): New setting of Fatal_Error
2071         (Set_Fatal_Error): New setting of Fatal_Error.
2072         * lib.ads: New definition of Fatal_Error and associated routines.
2073         * par-ch10.adb (P_Compilation_Unit): New setting of Fatal_Error.
2074         * par-load.adb (Load): New setting of Fatal_Error.
2075         * rtsfind.adb (Load_RTU): New setting of Fatal_Error.
2076         * sem_ch10.adb (Analyze_Compilation_Unit): New setting of
2077         Fatal_Error.
2078         (Optional_Subunit): New setting of Fatal_Error.
2079         (Analyze_Proper_Body): New setting of Fatal_Error.
2080         (Load_Needed_Body): New setting of Fatal_Error.
2082 2015-02-05  Ed Schonberg  <schonberg@adacore.com>
2084         * sem_res.adb (Resolve_Call): If the function being called has
2085         out parameters do not check for language version if the function
2086         comes from a predefined unit, as those are always compiled in
2087         Ada 2012 mode.
2089 2015-02-05  Ed Schonberg  <schonberg@adacore.com>
2091         * sem_ch3.adb (Process_Full_View): Verify that the full view
2092         of a type extension must carry an explicit limited keyword if
2093         the partial view does (RM 7.3 (10.1)).
2095 2015-02-05  Robert Dewar  <dewar@adacore.com>
2097         * g-rannum.adb, g-rannum.ads, s-rannum.adb, s-rannum.ads,
2098         sem_warn.ads: Minor reformatting.
2099         * exp_ch13.adb (Expand_N_Freeze_Entity): Add guard for aspect
2100         deleted by -gnatI.
2101         * sem_prag.adb (Analyze_Pragma, case Type_Invariant): Give
2102         error for abstract type.
2104 2015-02-05  Yannick Moy  <moy@adacore.com>
2106         * opt.ads (Warn_On_Suspicious_Contract): Update comment
2107         describing use.
2108         * sem_attr.adb (Analyze_Attribute/Attribute_Update): Warn on
2109         suspicious uses of 'Update.
2110         * sem_warn.adb, sem_warn.ads (Warn_On_Suspicious_Update): New
2111         function issues warning on suspicious uses of 'Update.
2112         * g-rannum.adb, g-rannum.ads, s-rannum.adb, s-rannum.ads: Mark
2113         package spec and body as SPARK_Mode Off.
2115 2015-02-05  Robert Dewar  <dewar@adacore.com>
2117         * sem_prag.adb (Set_Elab_Unit_Name): New name for Set_Unit_Name
2118         (Analyze_Pragma): Change Set_Unit_Name to Set_Elab_Unit_Name
2119         (Set_Elab_Unit_Name): Generate reference for Elaborate[_All]
2120         * sem_warn.adb (Warn_On_Unreferenced_Entity): Suppress warning
2121         for exported entity.
2123 2015-02-05  Hristian Kirtchev  <kirtchev@adacore.com>
2125         * sem_prag.adb (Check_Pragma_Conformance): Add
2126         local variable Arg. Ensure that all errors are associated with
2127         the pragma if it appears without an argument. Add comments on
2128         various cases.
2130 2015-02-05  Robert Dewar  <dewar@adacore.com>
2132         * lib-xref.adb: Minor reformatting.
2134 2015-02-05  Tristan Gingold  <gingold@adacore.com>
2136         PR ada/64349da/64349
2137         * env.c: Fix thinko: handle Darwin case before default one.
2139 2015-01-30  Robert Dewar  <dewar@adacore.com>
2141         * a-assert.adb: Minor reformatting.
2142         * sem_ch13.adb: Minor comment clarification.
2143         * types.ads: Minor comment update.
2144         * sem_eval.adb (Real_Or_String_Static_Predicate_Matches): Avoid blow up
2145         when we have a predicate that is nothing but an inherited dynamic
2146         predicate.
2148 2015-01-30  Jerome Guitton  <guitton@adacore.com>
2150         * gcc-interface/Makefile.in (x86-vxworks): Update GCC_SPEC_FILES to
2151         include cert link spec.
2153 2015-01-30  Robert Dewar  <dewar@adacore.com>
2155         * einfo.ads: Minor comment fix.
2156         * freeze.adb (Freeze_Profile): Add test for suspicious import
2157         in pure unit.
2158         * sem_prag.adb (Process_Import_Or_Interface): Test for suspicious
2159         use in Pure unit is now moved to Freeze (to properly catch
2160         Pure_Function exemption).
2162 2015-01-30  Bob Duff  <duff@adacore.com>
2164         * sem_res.ads: Minor comment fix.
2165         * sem_type.adb: sem_type.adb (Remove_Conversions): Need to
2166         check both operands of an operator.
2168 2015-01-30  Yannick Moy  <moy@adacore.com>
2170         * a-assert.ads, a-assert.adb: Mark package spec in SPARK. Set assertion
2171         policy for Pre to Ignore.
2172         (Assert): Add precondition.
2174 2015-01-30  Robert Dewar  <dewar@adacore.com>
2176         * sem_prag.adb (Process_Import_Or_Interface): Warn if used in
2177         Pure unit.
2178         * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Clarify
2179         documentation for some special cases of invalid attempts at
2180         based integers.
2182 2015-01-30  Gary Dismukes  <dismukes@adacore.com>
2184         * errout.ads: Minor reformatting.
2186 2015-01-30  Yannick Moy  <moy@adacore.com>
2188         * inline.adb (Process_Formals): Use the sloc of
2189         the inlined node instead of the sloc of the actual parameter,
2190         when replacing formal parameters by the actual one.
2192 2015-01-30  Arnaud Charlet  <charlet@adacore.com>
2194         * g-expect.adb (Get_Command_Output): Use infinite timeout when
2195         calling Expect.
2197 2015-01-30  Ed Schonberg  <schonberg@adacore.com>
2199         * sem_ch12.adb (Analyze_Associations): If an in-parameter is
2200         defaulted in an instantiation, add an entry in the list of actuals
2201         to indicate the default value of the formal (as is already done
2202         for defaulted subprograms).
2204 2015-01-30  Javier Miranda  <miranda@adacore.com>
2206         * errout.adb (Error_Msg_PT): Minor error phrasing update.
2208 2015-01-30  Robert Dewar  <dewar@adacore.com>
2210         * sem_warn.adb (Warn_On_Known_Condition): Improve error message
2211         for object case.
2213 2015-01-30  Pierre-Marie de Rodat  <derodat@adacore.com>
2215         * exp_dbug.adb (Get_Encoded_Name): When
2216         -fgnat-encodings=minimal, do not generate names for biased types.
2218 2015-01-30  Tristan Gingold  <gingold@adacore.com>
2220         PR ada/64349
2221         * env.c: Move vxworks and darwin includes out of #ifdef IN_RTS.
2223 2015-01-30  Gary Dismukes  <dismukes@adacore.com>
2225         * freeze.adb: Minor reformatting.
2227 2015-01-30  Javier Miranda  <miranda@adacore.com>
2229         * errout.ads (Error_Msg_PT): Replace Node_Id by Entity_Id and
2230         improve its documentation.
2231         * errout.adb (Error_Msg_PT): Improve the error message.
2232         * sem_ch6.adb (Check_Conformance): Update call to Error_Msg_PT.
2233         (Check_Synchronized_Overriding): Update call to Error_Msg_PT.
2234         * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup.
2236 2015-01-30  Robert Dewar  <dewar@adacore.com>
2238         * sem_warn.adb (Warn_On_Known_Condition): Do special casing of
2239         message for False case.
2241 2015-01-30  Doug Rupp  <rupp@adacore.com>
2243         * s-vxwext-kernel.ads (Task_Cont): Remove imported subprogram body.
2244         * s-vxwext-kernel.adb (Task_Cont): New subpprogram body specialized for
2245         kernel.
2247 2015-01-30  Gary Dismukes  <dismukes@adacore.com>
2249         * sem_attr.adb (Declared_Within_Generic_Unit):
2250         New function to test whether an entity is declared within the
2251         declarative region of a given generic unit.
2252         (Resolve_Attribute): For checking legality of subprogram'Access within
2253         a generic unit, call new Boolean function Declared_Within_Generic_Unit
2254         instead of simply comparing the results of Enclosing_Generic_Unit on
2255         the prefix and access type.  Correct minor comment typos.
2257 2015-01-30  Robert Dewar  <dewar@adacore.com>
2259         * freeze.adb, exp_util.ads: Update comment.
2260         * exp_util.adb, exp_ch3.adb: Minor code reorganization and reformatting.
2261         * sem_util.adb: Minor: fix typo.
2263 2015-01-30  Hristian Kirtchev  <kirtchev@adacore.com>
2265         * sem_attr.adb (Analyze_Attribute): Ensure that
2266         the check concerning Refined_Post takes precedence over the
2267         other cases.
2269 2015-01-30  Gary Dismukes  <dismukes@adacore.com>
2271         * sem_prag.adb: Minor typo fixes and reformatting.
2273 2015-01-30  Yannick Moy  <moy@adacore.com>
2275         * sem_attr.adb: Code clean up.
2277 2015-01-30  Robert Dewar  <dewar@adacore.com>
2279         * ali.adb (Scan_ALI): Set Serious_Errors flag in Unit record.
2280         * ali.ads (Unit_Record): Add new field Serious_Errors.
2281         * lib-writ.adb (Write_Unit_Information): Set SE (serious errors)
2282         attribute in U line.
2283         * lib-writ.ads: New attribute SE (serious erors) in unit line.
2285 2015-01-30  Hristian Kirtchev  <kirtchev@adacore.com>
2287         * einfo.adb Update the usage of attributes Entry_Bodies_Array,
2288         Lit_Indexes, Scale_Value, Storage_Size_Variable,
2289         String_Literal_Low_Bound along associated routines and
2290         Write_FieldX_Name.
2291         (Pending_Access_Types): New routine.
2292         (Set_Pending_Access_Types): New routine.
2293         (Write_Field15_Name): Add an entry for Pending_Access_Types.
2294         * einfo.ads Add new attribute Pending_Access_Types along
2295         with usage in nodes.  Update the usage of attributes
2296         Entry_Bodies_Array, Lit_Indexes, Scale_Value,
2297         Storage_Size_Variable, String_Literal_Low_Bound.
2298         (Pending_Access_Types): New routine along with pragma Inline.
2299         (Set_Pending_Access_Types): New routine along with pragma Inline.
2300         * exp_ch3.adb (Expand_Freeze_Array_Type): Add new local variable
2301         Ins_Node. Determine the insertion node for anonynous access type
2302         that acts as a component type of an array. Update the call to
2303         Build_Finalization_Master.
2304         (Expand_Freeze_Record_Type): Update
2305         the calls to Build_Finalization_Master.
2306         (Freeze_Type): Remove
2307         local variable RACW_Seen. Factor out the code that deals with
2308         remote access-to-class-wide types. Create a finalization master
2309         when the designated type contains a private component. Fully
2310         initialize all pending access types.
2311         (Process_RACW_Types): New routine.
2312         (Process_Pending_Access_Types): New routine.
2313         * exp_ch4.adb (Expand_Allocator_Expression): Allocation no longer
2314         needs to set primitive Finalize_Address.
2315         (Expand_N_Allocator): Allocation no longer sets primitive
2316         Finalize_Address.
2317         * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
2318         Update the call to Build_Finalization_Master.
2319         (Make_Build_In_Place_Call_In_Allocator): Allocation no longer
2320         needs to set primitive Finalize_Address.
2321         * exp_ch7.adb (Add_Pending_Access_Type): New routine.
2322         (Build_Finalization_Master): New parameter profile. Associate
2323         primitive Finalize_Address with the finalization master if the
2324         designated type has been frozen, otherwise treat the access
2325         type as pending. Simplify the insertion of the master and
2326         related initialization code.
2327         (Make_Finalize_Address_Body): Allow Finalize_Address for class-wide
2328         abstract types.
2329         (Make_Set_Finalize_Address_Call): Remove forlam parameter Typ.
2330         Simplify the implementation.
2331         * exp_ch7.ads (Build_Finalization_Master): New parameter profile
2332         along with comment on usage.
2333         (Make_Set_Finalize_Address_Call): Remove formal parameter Typ. Update
2334         the comment on usage.
2335         * exp_util.adb (Build_Allocate_Deallocate_Proc): Use routine
2336         Finalize_Address to retrieve the primitive.
2337         (Finalize_Address): New routine.
2338         (Find_Finalize_Address): Removed.
2339         * exp_util.ads (Finalize_Address): New routine.
2340         * freeze.adb (Freeze_All): Remove the generation of finalization
2341         masters.
2342         * sem_ch3.adb (Analyze_Full_Type_Declaration): Propagate any
2343         pending access types from the partial to the full view.
2345 2015-01-30  Robert Dewar  <dewar@adacore.com>
2347         * sem_disp.adb: Minor reformatting.
2348         * sem_disp.ads: Documentation update.
2350 2015-01-30  Ed Schonberg  <schonberg@adacore.com>
2352         * sem_disp.adb (Is_Dynamically_Tagged): when applied to an entity
2353         or a function call, return True if type is class-wide.
2354         * sem_res.adb (Resolve_Case_Expression, Resolve_If_Expression);
2355         Apply RM 4.5.7 (17/3): all or none of the dependent expression
2356         of a conditional expression must be dynamically tagged.
2358 2015-01-30  Ed Schonberg  <schonberg@adacore.com>
2360         * sem_ch6.adb (Analyze_Function_Return): In an extended return
2361         statement, apply accessibility check to result object when there
2362         is no initializing expression (Ada 2012 RM 6.5 (5.4/3))
2364 2015-01-30  Robert Dewar  <dewar@adacore.com>
2366         * sem_ch4.adb (Analyze_If_Expression): Allow for non-standard
2367         Boolean for case where ELSE is omitted.
2368         * sem_res.adb: Minor reformatting.
2370 2015-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2372         Fix build under cygwin/64.
2373         * adaint.h: Add check for __CYGWIN__.
2374         * mingw32.h: Prevent windows.h from including x86intrin.h in GCC.
2376 2015-01-19  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2378         PR ada/64640
2379         * adaint.c: Handle __CYGWIN__ like __MINGW32__ here.
2380         * mingw32.h: Don't include <tchar.h> under cygwin.
2381         (_O_U8TEXT, _O_U16TEXT, _O_WTEXT): Set to _O_TEXT if not yet defined.
2383 2015-01-15  Thomas Schwinge  <thomas@codesourcery.com>
2385         * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8)
2386         (DEF_FUNCTION_TYPE_VAR_12): New macros.
2388 2015-01-09  Michael Collison  <michael.collison@linaro.org>
2390         * gcc-interface/cuintp.c: Include hash-set.h, machmode.h,
2391         vec.h, double-int.h, input.h, alias.h, symtab.h,
2392         fold-const.h, wide-int.h, and inchash.h due to
2393         flattening of tree.h.
2394         * gcc-interface/decl.c: Ditto.
2395         * gcc-interface/misc.c: Ditto.
2396         * gcc-interface/targtyps.c: Include hash-set.h, machmode.h,
2397         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h,
2398         fold-const.h, wide-int.h, and inchash.h due to
2399         flattening of tree.h.
2400         * gcc-interface/trans.c: Include hash-set.h, machmode.h,
2401         vec.h, double-int.h, input.h, alias.h, symtab.h, real.h,
2402         fold-const.h, wide-int.h, inchash.h due to
2403         flattening of tree.h.
2404         * gcc-interface/utils.c: Include hash-set.h, machmode.h,
2405         vec.h, double-int.h, input.h, alias.h, symtab.h,
2406         fold-const.h, wide-int.h, and inchash.h due to
2407         flattening of tree.h.
2408         * gcc-interface/utils2.c: Ditto.
2410 2015-01-07  Robert Dewar  <dewar@adacore.com>
2412         * sem_warn.adb (Check_One_Unit): Don't give unused entities
2413         warning for a package which is used as a generic parameter.
2415 2015-01-07  Bob Duff  <duff@adacore.com>
2417         * usage.adb (Usage): Correct documentation of
2418         -gnatw.f switches.
2420 2015-01-07  Robert Dewar  <dewar@adacore.com>
2422         * s-fileio.adb: Minor reformatting.
2424 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
2426         * sem_ch12.adb (Instantiate_Object): If formal is an anonymous
2427         access to subprogram, replace its formals with new entities when
2428         building the object declaration, both if actual is present and
2429         when it is defaulted.
2431 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
2433         * sem_ch5.adb (Analyze_Assignment): If left-hand side is a view
2434         conversion and type of expression has invariant, apply invariant
2435         check on expression.
2437 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
2439         * sem_ch3.adb (Create_Constrained_Components): A call to
2440         Gather_Components may detect an error if an inherited discriminant
2441         that controls a variant is non-static.
2442         * sem_aggr.adb (Resolve_Record_Aggregate, Step 5): The call to
2443         Gather_Components may report an error if an inherited discriminant
2444         in a variant in non-static.
2445         * sem_util.adb (Gather_Components): If a non-static discriminant
2446         is inherited do not report error here, but let caller handle it.
2447         (Find_Actual): Small optimization.
2449 2015-01-07  Bob Duff  <duff@adacore.com>
2451         * usage.adb (Usage): Document -gnatw.f switch.
2453 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
2455         * sem_ch12.adb: Code clean up and minor reformatting.
2457 2015-01-07  Robert Dewar  <dewar@adacore.com>
2459         * exp_ch4.adb (Expand_N_Type_Conversion): Add guard for
2460         Raise_Accessibility_Error call.
2461         * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Add documentation
2462         on handling of invalid digits in based constants.
2463         * s-fatgen.ads: Minor reformatting.
2464         * sem_attr.adb (Analyze_Attribute, case Unrestricted_Access):
2465         Avoid noting bogus modification for Valid test.
2466         * snames.ads-tmpl (Name_Attr_Long_Float): New Name.
2467         * einfo.ads: Minor reformatting.
2468         * sem_warn.adb: Minor comment clarification.
2469         * sem_ch12.adb: Minor reformatting.
2471 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
2473         * exp_ch5.adb (Expand_Predicated_Loop): Handle properly loops
2474         over static predicates when the loop parameter specification
2475         carries a Reverse indicator.
2477 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
2479         * sem_ch12.adb (Instantiate_Object): If formal has a default,
2480         actual is missing and formal has an anonymous access type, copy
2481         access definition in full so that tree for instance is properly
2482         formatted for ASIS use.
2484 2015-01-07  Bob Duff  <duff@adacore.com>
2486         * sem_elab.adb (Check_Internal_Call_Continue): Give a warning
2487         for P'Access, where P is a subprogram in the same package as
2488         the P'Access, and the P'Access is evaluated at elaboration
2489         time, and occurs before the body of P. For example, "X : T :=
2490         P'Access;" would allow a subsequent call to X.all to be an
2491         access-before-elaboration error; hence the warning. This warning
2492         is enabled by the -gnatw.f switch.
2493         * opt.ads (Warn_On_Elab_Access): New flag for warning switch.
2494         * warnsw.adb (Set_Dot_Warning_Switch): Set Warn_On_Elab_Access.
2495         * gnat_ugn.texi: Document the new warning.
2497 2015-01-07  Johannes Kanig  <kanig@adacore.com>
2499         * lib-xref-spark_specific.adb (Collect_SPARK_Xrefs): Skip unneeded
2500         cross ref files.
2502 2015-01-07  Robert Dewar  <dewar@adacore.com>
2504         * s-taprop-linux.adb, clean.adb: Minor reformatting.
2506 2015-01-07  Arnaud Charlet  <charlet@adacore.com>
2508         * s-tassta.adb: Relax some overzealous assertions.
2510 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
2512         * sem_ch6.adb (Analyze_Return_Type): An call that returns a limited
2513         view of a type is legal when context is a thunk generated for
2514         operation inherited from an interface.
2515         * exp_ch6.adb (Expand_Simple_Function_Return): If context is
2516         a thunk and return type is an incomplete type do not continue
2517         expansion; thunk will be fully elaborated when generating code.
2519 2015-01-07  Doug Rupp  <rupp@adacore.com>
2521         * s-osinte-mingw.ads (LARGE_INTEGR): New subtype.
2522         (QueryPerformanceFrequency): New imported procedure.
2523         * s-taprop-mingw.adb (RT_Resolution): Call above and return
2524         resolution vice a hardcoded value.
2525         * s-taprop-solaris.adb (RT_Resolution): Call clock_getres and return
2526         resolution vice a hardcoded value.
2527         * s-linux-android.ads (clockid_t): New subtype.
2528         * s-osinte-aix.ads (clock_getres): New imported subprogram.
2529         * s-osinte-android.ads (clock_getres): Likewise.
2530         * s-osinte-freebsd.ads (clock_getres): Likewise.
2531         * s-osinte-solaris-posix.ads (clock_getres): Likewise.
2532         * s-osinte-darwin.ads (clock_getres): New subprogram.
2533         * s-osinte-darwin.adb (clock_getres): New subprogram.
2534         * thread.c (__gnat_clock_get_res) [__APPLE__]: New function.
2535         * s-taprop-posix.adb (RT_Resolution): Call clock_getres to
2536         calculate resolution vice hard coded value.
2538 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
2540         * exp_util.adb (Make_CW_Equivalent_Type): If root type is a
2541         limited view, use non-limited view when available to create
2542         equivalent record type.
2544 2015-01-07  Vincent Celier  <celier@adacore.com>
2546         * gnatcmd.adb: Remove command Sync and any data and processing
2547         related to this command. Remove project processing for gnatstack.
2548         * prj-attr.adb: Remove package Synchonize and its attributes.
2550 2015-01-07  Vincent Celier  <celier@adacore.com>
2552         * clean.adb: Minor error message change.
2554 2015-01-07  Tristan Gingold  <gingold@adacore.com>
2556         PR ada/64349  
2557         * env.c (__gnat_environ): Adjust for darwin9/darwin10.
2559 2015-01-07  Javier Miranda  <miranda@adacore.com>
2561         * sem_ch10.adb (Analyze_With_Clause): Compiling under -gnatq
2562         protect the frontend against never ending recursion caused by
2563         circularities in the sources.
2565 2015-01-07  Robert Dewar  <dewar@adacore.com>
2567         * a-reatim.adb, make.adb, exp_pakd.adb, i-cpoint.adb, sem_ch8.adb,
2568         exp_ch3.adb: Minor reformatting.
2570 2015-01-07  Doug Rupp  <rupp@adacore.com>
2572         * s-linux.ads (clockid_t): New subtype.
2573         * s-osinte-linux.ads (pragma Linker Options): Add -lrt.
2574         (clockid_t): New subtype.
2575         (clock_getres): Import system call.
2576         * s-taprop-linux.adb (System.OS_Constants): With and rename.
2577         (RT_Resolution): Remove
2578         hardcoded value and call clock_getres.
2579         * s-linux-sparc.ads, s-linux-mipsel.ads, s-linux-hppa.ads,
2580         s-linux-alpha.ads, s-linux-x32.ads (clockid_t): Add new subtype.
2582 2015-01-07  Robert Dewar  <dewar@adacore.com>
2584         * sem_warn.adb (Check_One_Unit): Guard against context item
2585         with no Entity field.
2587 2015-01-07  Vincent Celier  <celier@adacore.com>
2589         * clean.adb (Gnatclean): Warn that 'gnatclean -P' is obsolete.
2590         * make.adb (Initialize): Warn that 'gnatmake -P' is obsolete.
2592 2015-01-07  Vincent Celier  <celier@adacore.com>
2594         * prj-conf.adb (Parse_Project_And_Apply_Config): Always finalize
2595         errors/warnings in the first parsing of the project files,
2596         to display the warnings when there is no errors.
2598 2015-01-07  Tristan Gingold  <gingold@adacore.com>
2600         * i-cpoint.adb (Copy_Terminated_Array): Nicely handle null target.
2602 2015-01-07  Doug Rupp  <rupp@adacore.com>
2604         * s-taprop-vxworks.adb (Stop_All_Tasks): Pass return
2605         value from Int_Lock as parameter to Int_Unlock.
2606         * s-osinte-vxworks.ads (Int_Unlock): Add parameter.
2607         * s-vxwext.ads (Int_Unlock): Likewise.
2608         * s-vxwext-kernel.adb (intUnlock, Int_Unlock): Likewise.
2609         * s-vxwext-kernel.ads (Int_Unlock): Likewise.
2610         * s-vxwext-rtp.adb (Int_Unlock): Likewise.
2611         * s-vxwext-rtp.ads (Int_Unlock): Likewise.
2613 2015-01-07  Pierre-Marie de Rodat  <derodat@adacore.com>
2615         * exp_pakd.adb: Add a comment in exp_pakd.adb to explain why we
2616         keep ___XP suffixes
2618 2015-01-07  Tristan Gingold  <gingold@adacore.com>
2620         * i-cpoint.adb (Copy_Terminated_Array): Use Copy_Array to
2621         handle overlap.
2623 2015-01-07  Eric Botcazou  <ebotcazou@adacore.com>
2625         * sem_ch3.adb (Analyze_Full_Type_Declaration): Do not
2626         automatically set No_Strict_Aliasing on access types.
2627         * fe.h (No_Strict_Aliasing_CP): Declare.
2628         * gcc-interface/trans.c (gigi): Force flag_strict_aliasing to 0 if
2629         No_Strict_Aliasing_CP is set.
2631 2015-01-07  Johannes Kanig  <kanig@adacore.com>
2633         * sem_ch8.adb (Analyze_Subprogram_Renaming) do
2634         not build function wrapper in gnatprove mode when the package
2635         is externally axiomatized.
2637 2015-01-07  Jose Ruiz  <ruiz@adacore.com>
2639         * a-reatim.adb (Time_Of): Reduce the number of spurious overflows in
2640         intermediate computations when the parameters have different signs.
2642 2015-01-07  Javier Miranda  <miranda@adacore.com>
2644         * exp_ch3.adb (Build_Init_Procedure): For derived types,
2645         improve the code which takes care of identifying and moving to
2646         the beginning of the init-proc the call to the init-proc of the
2647         parent type.
2649 2015-01-07  Olivier Hainque  <hainque@adacore.com>
2651         * gcc-interface/trans.c (gnat_to_gnu, <N_Expression_With_Action>):
2652         Elaborate the expression as part of the same stmt group as the actions.
2654 2015-01-07  Robert Dewar  <dewar@adacore.com>
2656         * sem_ch3.adb: Minor error message change.
2658 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
2660         * sem_prag.adb (Analyze_Pragma, case Preelaborable_Initialization):
2661         Following AI05-028, the pragam applies legally to any composite type.
2663 2015-01-07  Arnaud Charlet  <charlet@adacore.com>
2665         * s-osinte-vxworks.adb, s-osinte-vxworks.ads
2666         (sigwait, sigwaitinfo): Removed, not needed after all on any
2667         VxWorks configurations.
2669 2015-01-07  Robert Dewar  <dewar@adacore.com>
2671         * sem_ch3.adb, freeze.adb, exp_disp.adb: Minor reformatting.
2673 2015-01-07  Javier Miranda  <miranda@adacore.com>
2675         * exp_disp.adb (Expand_Interface_Conversion): Adding missing
2676         generation of accessibility check.
2678 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
2680         * sem_ch3.adb (Derived_Type_Declaration): In the case of an
2681         illegal completion from a class- wide type, set etype of the
2682         derived type properly to prevent cascaded errors.
2684 2015-01-07  Robert Dewar  <dewar@adacore.com>
2686         * prj.ads, i-cpoint.adb, freeze.adb, ghost.adb, prj-err.adb: Minor
2687         reformatting.
2689 2015-01-07  Robert Dewar  <dewar@adacore.com>
2691         * restrict.adb (Check_Restriction_No_Use_Of_Attribute):
2692         New procedure.
2693         (OK_No_Use_Of_Entity_Name): New function.
2694         (Set_Restriction_No_Use_Of_Entity): New procedure.
2695         * restrict.ads (Check_Restriction_No_Use_Of_Attribute):
2696         New procedure.
2697         (OK_No_Use_Of_Entity_Name): New function.
2698         (Set_Restriction_No_Use_Of_Entity): New procedure.
2699         * sem_ch8.adb (Find_Direct_Name): Add check for violation of
2700         No_Use_Of_Entity.
2701         * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
2702         Add processing for new restriction No_Use_Of_Entity.
2704 2015-01-07  Eric Botcazou  <ebotcazou@adacore.com>
2706         * freeze.adb (Freeze_Array_Type): Apply same handling to Is_Atomic
2707         component type as to Has_Atomic_Components type.  Remove useless
2708         test on Is_Aliased component type.
2710 2015-01-07  Hristian Kirtchev  <kirtchev@adacore.com>
2712         * alloc.ads Alphabetize several declarations. Add constants
2713         Ignored_Ghost_Units_Initial and Ignored_Ghost_Units_Increment.
2714         * atree.adb Add with and use clauses for Opt.
2715         (Allocate_Initialize_Node): Mark a node as ignored Ghost
2716         if it is created in an ignored Ghost region.
2717         (Ekind_In): New variant.
2718         (Is_Ignored_Ghost_Node): New routine.
2719         (Set_Is_Ignored_Ghost_Node): New routine.
2720         * atree.adb Aplhabetize several subprograms declarations. Flag
2721         Spare0 is now known as Is_Ignored_Ghost_Node.
2722         (Ekind_In): New variant.
2723         (Is_Ignored_Ghost_Node): New routine.
2724         (Set_Is_Ignored_Ghost_Node): New routine.
2725         * einfo.adb: Flag 279 is now known as Contains_Ignored_Ghost_Code.
2726         (Contains_Ignored_Ghost_Code): New routine.
2727         (Set_Contains_Ignored_Ghost_Code): New routine.
2728         (Set_Is_Checked_Ghost_Entity, Set_Is_Ignored_Ghost_Entity):
2729         It is now possible to set this property on an unanalyzed entity.
2730         (Write_Entity_Flags): Output the status of flag
2731         Contains_Ignored_Ghost_Code.
2732         * einfo.ads New attribute Contains_Ignored_Ghost_Code along with
2733         usage in nodes.
2734         (Contains_Ignored_Ghost_Code): New routine
2735         along with pragma Inline.
2736         (Set_Contains_Ignored_Ghost_Code): New routine along with pragma Inline.
2737         * exp_ch3.adb Add with and use clauses for Ghost.
2738         (Freeze_Type): Capture/restore the value of Ghost_Mode on entry/exit.
2739         Set the Ghost_Mode in effect.
2740         (Restore_Globals): New routine.
2741         * exp_ch7.adb (Process_Declarations): Do not process a context
2742         that invoves an ignored Ghost entity.
2743         * exp_dbug.adb (Qualify_All_Entity_Names): Skip an ignored Ghost
2744         construct that has been rewritten as a null statement.
2745         * exp_disp.adb Add with and use clauses for Ghost.
2746         (Make_DT): Capture/restore the value of Ghost_Mode on entry/exit. Set
2747         the Ghost_Mode in effect.
2748         (Restore_Globals): New routine.
2749         * exp_util.adb (Requires_Cleanup_Actions): An ignored Ghost entity
2750         does not require any clean up. Add two missing cases that deal
2751         with block statements.
2752         * freeze.adb Add with and use clauses for Ghost.
2753         (Freeze_Entity): Capture/restore the value of Ghost_Mode on entry/exit.
2754         Set the Ghost_Mode in effect.
2755         (Restore_Globals): New routine.
2756         * frontend.adb Add with and use clauses for Ghost. Remove any
2757         ignored Ghost code from all units that qualify.
2758         * ghost.adb New unit.
2759         * ghost.ads New unit.
2760         * gnat1drv.adb Add with clause for Ghost. Initialize and lock
2761         the table in package Ghost.
2762         * lib.ads: Alphabetize several subprogram declarations.
2763         * lib-xref.adb (Output_References): Do not generate reference
2764         information for ignored Ghost entities.
2765         * opt.ads Add new type Ghost_Mode_Type and new global variable
2766         Ghost_Mode.
2767         * rtsfind.adb (Load_RTU): Provide a clean environment when
2768         loading a runtime unit.
2769         * sem.adb (Analyze): Capture/restore the value of Ghost_Mode on
2770         entry/exit as the node may set a different mode.
2771         (Do_Analyze):
2772         Capture/restore the value of Ghost_Mode on entry/exit as the
2773         unit may be withed from a unit with a different Ghost mode.
2774         * sem_ch3.adb Add with and use clauses for Ghost.
2775         (Analyze_Full_Type_Declaration, Analyze_Incomplete_Type_Decl,
2776         Analyze_Number_Declaration, Analyze_Private_Extension_Declaration,
2777         Analyze_Subtype_Declaration): Set the Ghost_Mode in effect. Mark
2778         the entity as Ghost when there is a Ghost_Mode in effect.
2779         (Array_Type_Declaration): The implicit base type inherits the
2780         "ghostness" from the array type.
2781         (Derive_Subprogram): The
2782         alias inherits the "ghostness" from the parent subprogram.
2783         (Make_Implicit_Base): The implicit base type inherits the
2784         "ghostness" from the parent type.
2785         * sem_ch5.adb Add with and use clauses for Ghost.
2786         (Analyze_Assignment): Set the Ghost_Mode in effect.
2787         * sem_ch6.adb Add with and use clauses for Ghost.
2788         (Analyze_Abstract_Subprogram_Declaration, Analyze_Procedure_Call,
2789         Analyze_Subprogram_Body_Helper, Analyze_Subprogram_Declaration):
2790         Set the Ghost_Mode in effect. Mark the entity as Ghost when
2791         there is a Ghost_Mode in effect.
2792         * sem_ch7.adb Add with and use clauses for Ghost.
2793         (Analyze_Package_Body_Helper, Analyze_Package_Declaration,
2794         Analyze_Private_Type_Declaration): Set the Ghost_Mode in
2795         effect. Mark the entity as Ghost when there is a Ghost_Mode
2796         in effect.
2797         * sem_ch8.adb Add with and use clauses for Ghost.
2798         (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
2799         Analyze_Object_Renaming, Analyze_Package_Renaming,
2800         Analyze_Subprogram_Renaming): Set the Ghost_Mode in effect. Mark
2801         the entity as Ghost when there is a Ghost_Mode in effect.
2802         (Find_Type): Check the Ghost context of a type.
2803         * sem_ch11.adb Add with and use clauses for Ghost.
2804         (Analyze_Exception_Declaration): Set the Ghost_Mode in
2805         effect. Mark the entity as Ghost when there is a Ghost_Mode
2806         in effect.
2807         * sem_ch12.adb Add with and use clauses for Ghost.
2808         (Analyze_Generic_Package_Declaration,
2809         Analyze_Generic_Subprogram_Declaration): Set the Ghost_Mode in effect.
2810         Mark the entity as Ghost when there is a Ghost_Mode in effect.
2811         * sem_prag.adb Add with and use clauses for Ghost.
2812         (Analyze_Pragma): Ghost-related checks are triggered when there
2813         is a Ghost mode in effect.
2814         (Create_Abstract_State): Mark the
2815         entity as Ghost when there is a Ghost_Mode in effect.
2816         * sem_res.adb Add with and use clauses for Ghost.
2817         (Check_Ghost_Context): Removed.
2818         * sem_util.adb (Check_Ghost_Completion): Removed.
2819         (Check_Ghost_Derivation): Removed.
2820         (Incomplete_Or_Partial_View):
2821         Add a guard in case the entity has not been analyzed yet
2822         and does carry a scope.
2823         (Is_Declaration): New routine.
2824         (Is_Ghost_Entity): Removed.
2825         (Is_Ghost_Statement_Or_Pragma):
2826         Removed.
2827         (Is_Subject_To_Ghost): Removed.
2828         (Set_Is_Ghost_Entity):
2829         Removed.
2830         (Within_Ghost_Scope): Removed.
2831         * sem_util.adb (Check_Ghost_Completion): Removed.
2832         (Check_Ghost_Derivation): Removed.
2833         (Is_Declaration): New routine.
2834         (Is_Ghost_Entity): Removed.
2835         (Is_Ghost_Statement_Or_Pragma): Removed.
2836         (Is_Subject_To_Ghost): Removed.
2837         (Set_Is_Ghost_Entity): Removed.
2838         (Within_Ghost_Scope): Removed.
2839         * sinfo.ads Add a section on Ghost mode.
2840         * treepr.adb (Print_Header_Flag): New routine.
2841         (Print_Node_Header): Factor out code. Output flag
2842         Is_Ignored_Ghost_Node.
2843         * gcc-interface/Make-lang.in: Add dependency for unit Ghost.
2845 2015-01-06  Eric Botcazou  <ebotcazou@adacore.com>
2847         * freeze.adb (Freeze_Array_Type) <Complain_CS>: Remove always
2848         true test and unreachable 'else' arm.
2850 2015-01-06  Vincent Celier  <celier@adacore.com>
2852         * prj-conf.adb (Check_Target): Improve error message when
2853         there are mismatched targets between the on in the configuration
2854         project file and the specified one, either in the main project
2855         file or in the --target= switch.
2857 2015-01-06  Pascal Obry  <obry@adacore.com>
2859         * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Mode and
2860         Install_Name attribute definitions.
2862 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
2864         * freeze.adb (Wrap_Imported_Subprogram): Indicate that the
2865         generated Import pragma for the internal imported procedure does
2866         not come from an aspect, so that Is_Imported can be properly
2867         set for it.
2869 2015-01-06  Gary Dismukes  <dismukes@adacore.com>
2871         * sem_ch12.adb (Might_Inline_Subp): Record whether
2872         any subprograms in the generic package are marked with
2873         pragma Inline_Always (setting flag Has_Inline_Always).
2874         (Analyze_Package_Instantiation): Add test of Has_Inline_Always
2875         alongside existing test of Front_End_Inlining as alternative
2876         conditions for setting Inline_Now. Also add test of
2877         Has_Inline_Always along with Front_End_Inlining test as an
2878         alternative condition for setting Needs_Body to False.
2880 2015-01-06  Tristan Gingold  <gingold@adacore.com>
2882         * i-cpoint.adb (Copy_Array): Handle overlap.
2884 2015-01-06  Pascal Obry  <obry@adacore.com>
2886         * bindgen.adb: Minor style fix.
2888 2015-01-06  Robert Dewar  <dewar@adacore.com>
2890         * sem_util.ads, sem_util.adb: Minor reformatting.
2892 2015-01-06  Vincent Celier  <celier@adacore.com>
2894         * prj-conf.adb (Parse_Project_And_Apply_Config): Reset incomplete
2895         with flags before parsing the projects.
2896         * prj-err.adb (Error_Msg): Do nothing if there are incomplete withs.
2897         * prj-part.adb (Post_Parse_Context_Clause): Set Incomplete_Withs
2898         to True in the flags, when Ignore_Missing_With is True and an
2899         imported project cannot be found.
2900         * prj-proc.adb (Expression): When there are incomplete withs and
2901         a variable or attribute is not found, set the variable/attribute
2902         to unknown.
2903         * prj.ads (Processing_Flags): New flag Incomplete_Withs,
2904         defaulted to False.
2906 2015-01-06  Vasiliy Fofanov  <fofanov@adacore.com>
2908         * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-conf.adb,
2909         prj-err.adb: Add new switch --no-command-line.
2911 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
2913         * sem_ch12.adb: Sloc of wrapper is that of instantiation.
2915 2015-01-06  Robert Dewar  <dewar@adacore.com>
2917         * sem_ch11.adb: Minor reformatting.
2919 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
2921         * exp_aggr.adb (Get_Assoc_Expr): New routine internal to
2922         Build_Array_Aggr_Code, used to initialized components covered
2923         by a box association. If the component type is scalar and has
2924         a default aspect, use it to initialize such components.
2926 2015-01-06  Pascal Obry  <obry@adacore.com>
2928         * rtinit.c (__gnat_runtime_initialize): Add a parameter to
2929         control the setup of the exception handler.
2930         * initialize.c: Remove unused declaration.
2931         * bindgen.adb: Always call __gnat_runtime_initialize and pass
2932         whether the exeception handler must be set or not.
2934 2015-01-06  Thomas Quinot  <quinot@adacore.com>
2936         * freeze.adb (Set_SSO_From_Defaults): When setting scalar storage
2937         order to native from default, make sure to also adjust bit order.
2938         * exp_aggr.adb: Minor reformatting.
2940 2015-01-06  Robert Dewar  <dewar@adacore.com>
2942         * s-valllu.adb, s-valllu.ads, s-valuti.ads, s-valuns.adb, s-valuns.ads,
2943         s-valrea.adb, s-valrea.ads: Add some additional guards for
2944         Str'Last = Positive'Last.
2946 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
2948         * sem_ch12.adb, sem_ch8.adb: Ongoing work for wrappers for actual
2949         subprograms.
2951 2015-01-06  Javier Miranda  <miranda@adacore.com>
2953         * exp_disp.adb (Expand_Interface_Conversion): Reapply patch.
2955 2015-01-06  Thomas Quinot  <quinot@adacore.com>
2957         * sem_util.ads: Minor reformatting.
2958         * sem_cat.adb (In_RCI_Visible_Declarations): Change back to...
2959         (In_RCI_Declaration) Return to old name, as proper checking of
2960         entity being in the visible part depends on entity kind and must
2961         be done by the caller.
2963 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
2965         * sem_ch12.adb, sem_ch12.ads, sem_ch8.adb: Ongoing work for wrappers
2966         for operators in SPARK.
2968 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
2970         * sem_aggr.adb (Get_Value): In ASIS mode, preanalyze the
2971         expression in an others association before making copies for
2972         separate resolution and accessibility checks. This ensures that
2973         the type of the expression is available to ASIS in all cases,
2974         in particular if the expression is itself an aggregate.
2976 2015-01-06  Eric Botcazou  <ebotcazou@adacore.com>
2978         * einfo.ads (Has_Independent_Components): Document extended
2979         usage.
2980         * einfo.adb (Has_Independent_Components): Remove obsolete assertion.
2981         (Set_Has_Independent_Components): Adjust assertion.
2982         * sem_prag.adb (Analyze_Pragma): Also set Has_Independent_Components
2983         for pragma Atomic_Components.  Set Has_Independent_Components
2984         on the object instead of the type for an object declaration with
2985         pragma Independent_Components.
2987 2015-01-06  Olivier Hainque  <hainque@adacore.com>
2989         * set_targ.adb (Read_Target_Dependent_Values): Set
2990         Long_Double_Index when "long double" is read.
2991         (elaboration code): Register_Back_End_Types only when not reading from
2992         config files. Doing otherwise is pointless and error prone.
2994 2015-01-06  Robert Dewar  <dewar@adacore.com>
2996         * s-valrea.adb (Value_Real): Check for Str'Last = Positive'Last
2998 2015-01-06  Robert Dewar  <dewar@adacore.com>
3000         * a-wtgeau.adb, a-ztgeau.adb, a-tigeau.adb (String_Skip): Raise PE if
3001         Str'Last = Positive'Last.
3003 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
3005         * sem_ch6.adb (Matches_Limited_View): Handle properly the case
3006         where the non-limited type is a generic actual and appears as
3007         a subtype of the non-limited view of the other.
3008         * freeze.adb (Build_Renamed_Body): If the return type of the
3009         declaration that is being completed is a limited view and the
3010         non-limited view is available, use it in the specification of
3011         the generated body.
3013 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
3015         * sem_ch3.adb (Find_Type_Name): If there is a previous tagged
3016         incomplete view, the type of the classwide type common to both
3017         views is the type being declared.
3019 2015-01-06  Eric Botcazou  <ebotcazou@adacore.com>
3021         * einfo.ads (Is_Independent): Further document extended usage.
3023 2015-01-06  Eric Botcazou  <ebotcazou@adacore.com>
3025         * einfo.ads (Is_Independent): Document extended usage.
3026         * einfo.adb (Is_Independent): Remove obsolete assertion.
3027         (Set_Is_Independent): Likewise.
3028         * sem_prag.adb (Process_Atomic_Shared_Volatile): Rename into...
3029         (Process_Atomic_Independent_Shared_Volatile): ...this.
3030         Deal with pragma Independent here.
3031         (Analyze_Pragma): Adjust
3032         to above renaming and also invoke it for pragma Independent.
3033         Adjust comment for Independent_Components.
3035 2015-01-06  Robert Dewar  <dewar@adacore.com>
3037         * snames.ads-tmpl: Remove entries for attribute Enum_Image.
3038         * exp_attr.adb: Remove reference to Attribute_Enum_Image.
3040 2015-01-06  Robert Dewar  <dewar@adacore.com>
3042         * s-vallli.adb (Value_Long_Long_Integer): Handle case of Str'Last
3043         = Positive'Last.
3044         * s-valllu.adb (Value_Long_Long_Unsigned): Handle case of
3045         Str'Last = Positive'Last.
3047 2015-01-06  Robert Dewar  <dewar@adacore.com>
3049         * sem_prag.adb (Process_Inline): Remove redundant construct
3050         warning (-gnatw.r) for an ineffective pragma Inline.
3052 2015-01-06  Robert Dewar  <dewar@adacore.com>
3054         * s-valint.adb: Fix typo in last checkin.
3055         * s-valuns.adb (Value_Unsigned): More efficient fix for
3056         Positive'Last case.
3057         * sem_attr.adb (Analyze_Attribute): Minor reformatting
3058         (Eval_Attribute): Static ervaluation of 'Img for enumeration types.
3060 2015-01-06  Robert Dewar  <dewar@adacore.com>
3062         * s-valint.adb, s-valuns.adb (Value_Integer): Deal with case where
3063         Str'Last = Positive'Last
3065 2015-01-06  Thomas Quinot  <quinot@adacore.com>
3067         * xoscons.adb: Display exception information and return non-zero
3068         exit status in top level exception handler.
3070 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
3072         * sem_ch8.adb: Code clean up.
3074 2015-01-06  Tristan Gingold  <gingold@adacore.com>
3076         * targparm.ads: Remove obsolete comment.
3078 2015-01-06  Olivier Hainque  <hainque@adacore.com>
3080         * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Variable): When
3081         constructing a ref to variable, update inner_const_flag from the
3082         variable TREE_READONLY attribute.
3083         * gcc-interface/targtyps.c (WIDEST_HARDWARE_FP_SIZE): Remove default
3084         definition.
3085         (get_target_float_size): Remove.
3086         (get_target_double_size): Remove.
3087         (get_target_long_double_size): Remove.
3089 2015-01-06  Pascal Obry  <obry@adacore.com>
3091         * adaint.c (ProcListEvt): Set to NULL.
3092         * rtinit.c: New file.
3093         (__gnat_rt_init_count): New reference counter set to 0.
3094         (__gnat_runtime_initialize): Move code here from __gnat_initialize when
3095         this code is actually needed for the runtime initialization. This
3096         routine returns immediately if the initialization has already been done.
3097         * final.c: Revert previous change.
3098         * rtfinal.c: New file.
3099         (__gnat_runtime_finalize)[Win32]: Add finalization of the critical
3100         section and event. The default version of this routine is empty (except
3101         for the reference counting code). This routine returns immediately if
3102         some others libraries are referencing the runtime.
3103         * bindgen.adb (Gen_Adainit): Generate call to Runtime_Initialize
3104         remove circuitry to initialize the signal handler as this is
3105         now done by the runtime initialization routine.
3106         (Gen_Adafinal): Generate call to Runtime_Finalize.
3107         * gnat_ugn.texi: Update documentation about concurrency and
3108         initialization/finalization of the run-time.
3109         * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Add
3110         references to rtfinal.o and rtinit.o
3112 2015-01-06  Robert Dewar  <dewar@adacore.com>
3114         * exp_attr.adb (Expand_N_Attribute_Reference): Add dummy entry
3115         for Enum_Image.
3116         * sem_attr.adb: Implement Enum_Image attribute.
3117         * snames.ads-tmpl: Add entries for Enum_Image attribute.
3119 2015-01-06  Robert Dewar  <dewar@adacore.com>
3121         * namet.ads: Document use of Boolean2 for No_Use_Of_Entity.
3122         * restrict.ads (No_Use_Of_Entity): New table.
3123         * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
3124         Ignore No_Use_Of_Entity (will be processed in parser).
3125         * snames.ads-tmpl: Add entry for Name_No_Use_Of_Entity.
3127 2015-01-06  Vincent Celier  <celier@adacore.com>
3129         * prj-tree.adb (Imported_Or_Extended_Project_Of): Do not try
3130         to check for an extended project, if a project does not have
3131         yet a project declaration.
3133 2015-01-06  Pierre-Marie Derodat  <derodat@adacore.com>
3135         * scos.ads: Update documentation about the SCO table build
3136         process and about table records format.
3137         * par_sco.ads (SCO_Record): Rename to SCO_Record_Raw.
3138         (SCO_Record_Filtered): New procedure.
3139         (Set_SCO_Logical_Operator): New procedure.
3140         (dsco): Update documentation.
3141         * par_sco.adb: Update library-level comments.
3142         (SCO_Generation_State_Type): New type.
3143         (SCO_Generation_State): New variable.
3144         (SCO_Raw_Table): New package instanciation.
3145         (Condition_Pragma_Hash_Table): Rename to SCO_Raw_Hash_Table.
3146         ("<"): New.
3147         (Tristate): New type.
3148         (Is_Logical_Operator): Return Tristate and update documentation.
3149         (Has_Decision): Update call to Is_Logical_Operator and complete
3150         documentation.
3151         (Set_Table_Entry): Rename to Set_Raw_Table_Entry, update
3152         comment, add an assertion for state checking and change
3153         references to SCO_Table into SCO_Raw_Table.
3154         (dsco): Refactor to dump the raw and the filtered tables.
3155         (Process_Decisions.Output_Decision_Operand): Handle putative
3156         short-circuit operators.
3157         (Process_Decisions.Output_Element): Update references
3158         to Set_Table_Entry and to Condition_Pragma_Hash_Table.
3159         (Process_Decisions.Process_Decision_Operand): Update call
3160         to Is_Logical_Operator.
3161         (Process_Decisions.Process_Node): Handle putative short-circuit
3162         operators and change references to
3163         SCO_Table into SCO_Raw_Table.
3164         (SCO_Output): Add an assertion
3165         for state checking and remove code that used to stamp out SCO entries.
3166         (SCO_Pragma_Disabled): Change reference to SCO_Table
3167         into SCO_Raw_Table.
3168         (SCO_Record): Rename to SCO_Record_Raw,
3169         add an assertion for state checking and change references
3170         to SCO_Table into SCO_Raw_Table.
3171         (Set_SCO_Condition): Add an assertion for state checking, update
3172         references to Condition_Pragma_Hash_Table and change references to
3173         SCO_Table into SCO_Raw_Table.
3174         (Set_SCO_Pragma_Enabled): Add an assertion for state checking and
3175         change references to SCO_Table into SCO_Raw_Table.
3176         (Set_SCO_Logical_Operator): New procedure.
3177         (Traverse_Declarations_Or_Statements.Set_Statement_Entry): Update
3178         references to Set_Table_Entry and to Condition_Pragma_Hash_Table.
3179         (SCO_Record_Fildered): New procedure.
3180         * gnat1drv.adb (Gnat1drv): Invoke the SCO filtering pass.
3181         * lib-writ.adb (Write_ALI): Invoke the SCO filtering pass and
3182         output SCOs.
3183         * par-load.adb (Load): Update reference to SCO_Record.
3184         * par.adb (Par): Update reference to SCO_Record.
3185         * put_scos.adb (Put_SCOs): Add an assertion to check that no
3186         putative SCO condition reaches this end.
3187         * sem_ch10.adb (Analyze_Proper_Body): Update reference to SCO_Record.
3188         * sem_res.adb (Resolve_Logical_Op): Validate putative SCOs
3189         when corresponding to an "and"/"or" operator affected by the
3190         Short_Circuit_And_Or pragma.
3192 2015-01-06  Robert Dewar  <dewar@adacore.com>
3194         * sem_ch8.adb (Analyze_Use_Package): Give more specific error
3195         msg for attempted USE of generic subprogram or subprogram.
3197 2015-01-06  Robert Dewar  <dewar@adacore.com>
3199         * s-valllu.adb, a-tiinau.adb, a-timoau.adb, a-ztinau.adb, a-ztmoau.adb,
3200         s-valuns.adb, s-valrea.adb, a-wtflau.adb, a-tiflau.adb, a-ztflau.adb,
3201         a-wtinau.adb, a-wtmoau.adb: Document recognition of : in place of #.
3203 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
3205         * sem_ch13.adb (Analyze_Aspect_Specifications): For aspects
3206         that specify stream subprograms, if the prefix is a class-wide
3207         type then the generated attribute definition clause must apply
3208         to the same class-wide type.
3209         (Default_Iterator): An iterator defined by an aspect of some
3210         container type T must have a first parameter of type T, T'class,
3211         or an access to such (from code reading RM 5.5.1 (2/3)).
3213 2015-01-06  Arnaud Charlet  <charlet@adacore.com>
3215         * gnat1drv.adb: Minor: complete previous change.
3217 2015-01-06  Olivier Hainque  <hainque@adacore.com>
3219         * set_targ.ads (C_Type_For): New function. Return the name of
3220         a C type supported by the back-end and suitable as a basis to
3221         construct the standard Ada floating point type identified by
3222         the T parameter. This is used as a common ground to feed both
3223         ttypes values and the GNAT tree nodes for the standard floating
3224         point types.
3225         * set_targ.adb (Long_Double_Index): The index at which "long
3226         double" gets registered in the FPT_Mode_Table. This is useful to
3227         know whether we have a "long double" available at all and get at
3228         it's characteristics without having to search the FPT_Mode_Table
3229         when we need to decide which C type should be used as the
3230         basis for Long_Long_Float in Ada.
3231         (Register_Float_Type): Fill Long_Double_Index.
3232         (FPT_Mode_Index_For): New function. Return the index in
3233         FPT_Mode_Table that designates the entry corresponding to the
3234         provided C type name.
3235         (FPT_Mode_Index_For): New function. Return the index in
3236         FPT_Mode_Table that designates the entry for a back-end type
3237         suitable as a basis to construct the standard Ada floating point
3238         type identified by the input T parameter.
3239         (elaboration code): Register_Back_End_Types unconditionally,
3240         so C_Type_For can operate regardless of -gnateT. Do it
3241         early so we can query it for the floating point sizes, via
3242         FPT_Mode_Index_For. Initialize Float_Size, Double_Size and
3243         Long_Double_Size from the FPT_Mode_Table, as cstand will do.
3244         * cstand.adb (Create_Float_Types): Use C_Type_For to determine
3245         which C type should be used as the basis for the construction
3246         of the Standard Ada floating point types.
3247         * get_targ.ads (Get_Float_Size, Get_Double_Size,
3248         Get_Long_Double_Size): Remove.
3249         * get_targ.adb: Likewise.
3251 2015-01-06  Thomas Quinot  <quinot@adacore.com>
3253         * sem_cat.adb (In_RCI_Declaration): Remove unnecessary
3254         parameter and rename to...
3255         (In_RCI_Visible_Declarations): Fix handling of private part of nested
3256         package.
3257         (Validate_RCI_Subprogram_Declaration): Reject illegal function
3258         returning anonymous access in RCI unit.
3260 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
3262         * sem_ch6.adb (New_Overloaded_Entity): In GNATprove mode, a
3263         function wrapper may be a homonym of another local declaration.
3264         * sem_ch8.adb (Analyze_Subprogram_Renaming): In GNATprove mode,
3265         build function and operator wrappers after the actual subprogram
3266         has been resolved, and replace the standard renaming declaration
3267         with the declaration of wrapper.
3268         * sem_ch12.ads (Build_Function_Wrapper, Build_Operator_Wraooer):
3269         make public for use elsewhere.
3270         * sem_ch12.adb (Build_Function_Wrapper, Build_Operator_Wraooer):
3271         rewrite, now that actual is fully resolved when wrapper is
3272         constructed.
3274 2015-01-06  Javier Miranda  <miranda@adacore.com>
3276         * exp_disp.adb: Revert previous change.
3278 2015-01-06  Robert Dewar  <dewar@adacore.com>
3280         * exp_util.adb: Change name Name_Table_Boolean to
3281         Name_Table_Boolean1.
3282         * namet.adb: Change name Name_Table_Boolean to Name_Table_Boolean1
3283         Introduce Name_Table_Boolean2/3.
3284         * namet.ads: Change name Name_Table_Boolean to Name_Table_Boolean1
3285         Introduce Name_Table_Boolean2/3.
3286         * par-ch13.adb: Change name Name_Table_Boolean to
3287         Name_Table_Boolean1.
3289 2015-01-06  Bob Duff  <duff@adacore.com>
3291         * gnat_rm.texi: Improve documentation regarding No_Task_Termination.
3293 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
3295         * sem_aggr.adb (Resolve_Record_Aggregte, Get_Value): For an
3296         others choice that covers multiple components, analyze each
3297         copy with the type of the component even in compile-only mode,
3298         to detect potential accessibility errors.
3300 2015-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
3302         * sem_res.adb (Is_Assignment_Or_Object_Expression): New routine.
3303         (Resolve_Actuals): An effectively volatile out
3304         parameter cannot act as an in or in out actual in a call.
3305         (Resolve_Entity_Name): An effectively volatile out parameter
3306         cannot be read.
3308 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
3310         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If the body is
3311         the expansion of an expression function it may be pre-analyzed
3312         if a 'access attribute is applied to the function, in which case
3313         last_entity may have been assigned already.
3315 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
3317         * sem_ch4.adb (Analyze_One_Call): If formal has an incomplete
3318         type and actual has the corresponding full view, there is no
3319         error, but a case of use of incomplete type in a predicate or
3320         invariant expression.
3322 2015-01-06  Vincent Celier  <celier@adacore.com>
3324         * makeutl.adb (Insert_No_Roots): Make sure that the same source
3325         in two different project tree is checked in both trees, if they
3326         are sources of two different projects, extended or not.
3328 2015-01-06  Arnaud Charlet  <charlet@adacore.com>
3330         * gnat1drv.adb: Minor code clean up.
3331         (Adjust_Global_Switches): Ignore gnatprove_mode in codepeer_mode.
3333 2015-01-06  Bob Duff  <duff@adacore.com>
3335         * osint.adb (Read_Source_File): Don't print out
3336         file name unless T = Source.
3338 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
3340         * sem_util.adb (Is_Variable, Is_OK_Variable_For_Out_Formal):
3341         recognize improper uses of constant_reference types as actuals
3342         for in-out parameters.
3343         (Check_Function_Call): Do not collect identifiers if function
3344         name is missing because of previous error.
3346 2015-01-06  Robert Dewar  <dewar@adacore.com>
3348         * ali-util.adb, sem_prag.adb, rtsfind.adb, sem_util.adb, sem_res.adb,
3349         ali.adb, binde.adb, namet.adb, namet.ads, gnatls.adb, bcheck.adb:
3350         Minor change of name Name_Table_Info => Name_Table_Int.
3352 2015-01-06  Robert Dewar  <dewar@adacore.com>
3354         * exp_strm.adb (Build_Elementary_Input_Call): Clarify comments
3355         in previous checkin.
3356         * freeze.adb (Freeze_Fixed_Point_Type): Add warning for shaving
3357         of bounds.
3358         * sem_prag.adb, sem_ch10.adb, sem_ch6.adb: Minor reformatting.
3360 2015-01-06  Vincent Celier  <celier@adacore.com>
3362         * a-strsup.adb (Times (Natural;String;Positive)): Raise
3363         Length_Error, not Index_Error, when the result is too long.
3365 2015-01-06  Thomas Quinot  <quinot@adacore.com>
3367         * a-direct.adb (Create_Path): Minor error handling and
3368         performance improvement.
3370 2015-01-06  Robert Dewar  <dewar@adacore.com>
3372         * checks.ads, sem_ch12.adb: Minor reformatting.
3373         * exp_ch4.adb (Expand_N_Op_Divide): Generate explicit divide by
3374         zero check for fixed-point case if Backend_Divide_Checks_On_Target
3375         is False.
3377 2015-01-06  Robert Dewar  <dewar@adacore.com>
3379         * sem_prag.adb (Analyze_Pragma, case No_Elaboration_Code_All):
3380         Do not set restriction No_Elaboration_Code unless the pragma
3381         appears in the main unit).
3383 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
3385         * sem_ch10.adb (Is_Regular_With_Clause): Add guard to verify
3386         that with clause has already been analyzed before checking kind
3387         of with_clause.
3389 2015-01-06  Robert Dewar  <dewar@adacore.com>
3391         * exp_strm.adb (Build_Elementary_Input_Call): Return base type
3392         (as required by RM).
3394 2015-01-06  Arnaud Charlet  <charlet@adacore.com>
3396         * a-reatim.adb ("/"): Add explicit pragma Unsuppress (Division_Check).
3398 2015-01-06  Robert Dewar  <dewar@adacore.com>
3400         * sem_prag.adb (Process_Suppress_Unsuppress): Add extra warning
3401         for ignoring pragma Suppress (Elaboration_Check) in SPARK mode.
3403 2015-01-06  Javier Miranda  <miranda@adacore.com>
3405         * exp_disp.adb (Expand_Interface_Conversion): No displacement
3406         of the pointer to the object needed when the type of the operand
3407         is not an interface type and the interface is one of its parent
3408         types (since they share the primary dispatch table).
3410 2015-01-06  Vincent Celier  <celier@adacore.com>
3412         * prj-env.adb: Minor comment update.
3414 2015-01-06  Javier Miranda  <miranda@adacore.com>
3416         * sem_res.adb (Valid_Conversion): Restrict the checks on anonymous
3417         access types whose target type is an interface type to operands
3418         that are access types; required to report an error when the
3419         operand is not an access type.
3421 2015-01-06  Bob Duff  <duff@adacore.com>
3423         * a-cfinve.adb (Copy): Set the discriminant to the Length when
3424         Capacity = 0.
3425         * a-cofove.ads (Capacity): Add a postcondition.
3426         * a-cfinve.ads (Capacity): Add a postcondition.
3427         (Reserve_Capacity): Correct the postcondition in the case where
3428         Capacity = 0; that means "Capacity => Length (Container)".
3429         * a-cofove.adb (Elems[c]): Add a comment
3430         explaining the dangers and how to avoid them.
3432 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
3434         * sem_ch12.adb: Code clean up.
3436 2015-01-06  Arnaud Charlet  <charlet@adacore.com>
3438         * gnatvsn.ads: Bump copyright year.
3440 2015-01-06  Robert Dewar  <dewar@adacore.com>
3442         * s-taskin.ads, s-traces.ads: Minor reformatting.
3443         * exp_util.adb: Minor typo fix.
3445 2015-01-06  Vincent Celier  <celier@adacore.com>
3447         * gnatls.adb (Search_RTS): Invoke Initialize_Default_Project_Path
3448         with the runtime name.
3449         * prj-env.adb (Initialize_Default_Project_Path): When both
3450         Target_Name and Runtime_Name are not empty string, add to the
3451         project path the two directories .../lib/gnat and .../share/gpr
3452         related to the runtime.
3453         * prj-env.ads (Initialize_Default_Project_Path): New String
3454         parameter Runtime_Name, defaulted to the empty string.
3456 2015-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
3458         * frontend.adb: Guard against the case where a configuration
3459         pragma may be split into multiple pragmas and the original
3460         rewritten as a null statement.
3461         * sem_prag.adb (Analyze_Pragma): Insert a brand new Check_Policy
3462         pragma using Insert_Before rather than Insert_Action. This
3463         takes care of the configuration pragma case where Insert_Action
3464         would fail.
3466 2015-01-06  Bob Duff  <duff@adacore.com>
3468         * a-coboho.ads (Element_Access): Add "pragma
3469         No_Strict_Aliasing (Element_Access);". This is needed because
3470         we are unchecked-converting from Address to Element_Access.
3471         * a-cofove.ads, a-cofove.adb (Elems,Elemsc): Fix bounds of the
3472         result to be 1.
3474 2015-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
3476         * sem_res.adb (Resolve_Actuals): Remove the
3477         restriction which prohibits volatile actual parameters with
3478         enabled external propery Async_Writers to act appear in procedure
3479         calls where the corresponding formal is of mode OUT.
3481 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
3483         * gnat_ugn.texi: Bump @copying's copyright year.
3485 2015-01-05  Eric Botcazou  <ebotcazou@adacore.com>
3487         PR ada/64492
3488         * gcc-interface/Makefile.in (../stamp-tools): Reinstate dropped code.
3490 2015-01-04  Uros Bizjak  <ubizjak@gmail.com>
3492         * gcc-interface/misc.c (internal_error_function): Use xasprintf instead
3493         of unchecked asprintf.
3496 Copyright (C) 2015 Free Software Foundation, Inc.
3498 Copying and distribution of this file, with or without modification,
3499 are permitted in any medium without royalty provided the copyright
3500 notice and this notice are preserved.