2015-03-04 Robert Dewar <dewar@adacore.com>
[official-gcc.git] / gcc / ada / ChangeLog
blobc48ea3fb80997f4468ae7090f66dcf7c02fa94dd
1 2015-03-04  Robert Dewar  <dewar@adacore.com>
3         * exp_ch7.adb: Minor reformatting.
4         * exp_unst.adb (Build_Tables): Fix minor glitch for no separate
5         spec case.
6         * erroutc.adb (Delete_Msg): add missing decrement of info msg counter.
8 2015-03-04  Hristian Kirtchev  <kirtchev@adacore.com>
10         * exp_ch6.adb (Build_Pragma_Check_Equivalent): Suppress
11         references to formal parameters subject to pragma Unreferenced.
12         (Suppress_Reference): New routine.
13         * sem_attr.adb (Analyze_Attribute): Reimplement the analysis
14         of attribute 'Old. Attributes 'Old and 'Result now share
15         common processing.
16         (Analyze_Old_Result_Attribute): New routine.
17         (Check_Placement_In_Check): Removed.
18         (Check_Placement_In_Contract_Cases): Removed.
19         (Check_Placement_In_Test_Case): Removed.
20         (Check_Use_In_Contract_Cases): Removed.
21         (Check_Use_In_Test_Case): Removed.
22         (In_Refined_Post): Removed.
23         (Is_Within): Removed.
24         * sem_warn.adb (Check_Low_Bound_Tested): Code cleanup.
25         (Check_Low_Bound_Tested_For): New routine.
27 2015-03-04  Hristian Kirtchev  <kirtchev@adacore.com>
29         * exp_ch3.adb (Expand_N_Object_Declaration):
30         Generate a runtime check to test the expression of pragma
31         Default_Initial_Condition when the object is default initialized.
33 2015-03-02  Robert Dewar  <dewar@adacore.com>
35         * scng.adb (Scan): Ignore illegal character in relaxed
36         semantics mode.
38 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
40         * sem_ch4.adb (Analyze_Set_Membership); Retain Overloaded flag
41         on left operand, so it can be properly resolved with type of
42         alternatives of right operand.
43         * sem_res.adb (Resolve_Set_Membership): Handle properly an
44         overloaded left-hand side when the alternatives on the right
45         hand side are literals of some universal type.  Use first
46         non-overloaded alternative to find expected type.
48 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
50         * exp_ch7.adb (Make_Set_Finalize_Address_Call): Use underlying
51         type to retrieve designated type, because the purported access
52         type may be a partial (private) view, when it is declared in
53         the private part of a nested package, and finalization actions
54         are generated when completing compilation of enclosing unit.
56 2015-03-02  Robert Dewar  <dewar@adacore.com>
58         * back_end.adb (Call_Back_End): Remove previous patch,
59         the back end now gets to see the result of -gnatd.1
60         (Unnest_Subprogram_Mode) processing.
61         * elists.ads, elists.adb (List_Length): New function.
62         * exp_unst.ads, exp_unst.adb: Major changes, first complete version.
63         * sem_util.adb (Check_Nested_Access): Handle formals in
64         Unnest_Subprogram_Mode.
65         (Adjust_Named_Associations): Minor reformatting.
66         * sprint.adb (Sprint_Node_Actual): Fix failure to print aliased
67         for parameters.
69 2015-03-02  Robert Dewar  <dewar@adacore.com>
71         * atree.ads, atree.adb (Uint24): New function
72         (Set_Uint24): New procedure.
73         * atree.h (Uint24): New macro for field access.
74         * back_end.adb (Call_Back_End): For now, don't call back end
75         if unnesting subprogs.
76         * einfo.adb (Activation_Record_Component): New field
77         (Subps_Index): New field.
78         * einfo.ads (Activation_Record_Component): New field
79         (Subps_Index): New field Minor reordering of comments into alpha order.
80         * exp_unst.ads, exp_unst.adb: Continued development.
82 2015-03-02  Gary Dismukes  <dismukes@adacore.com>
84         * exp_disp.ads: Minor reformatting.
86 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
88         * sem_ch8.adb (Chain_Use_Clause): Do not chain use clause from
89         ancestor to list of use clauses active in descendant unit if we
90         are within the private part of an intervening parent, to prevent
91         circularities in use clause list.
93 2015-03-02  Javier Miranda  <miranda@adacore.com>
95         * exp_ch9.adb (Build_Corresponding_Record): Propagate type
96         invariants to the corresponding record type.
97         * exp_disp.ad[sb] (Set_DT_Position_Value): New subprogram
98         which sets the value of the DTC_Entity associated with a given
99         primitive of a tagged type and propagates the value to the
100         wrapped subprogram.
101         (Set_DTC_Entity_Value): Propagate the DTC
102         value to the wrapped entity.
103         * sem_ch13.adb (Build_Invariant_Procedure): Append the code
104         associated with invariants of progenitors.
105         * sem_ch3.adb (Build_Derived_Record_Type): Inherit type invariants
106         of parents and progenitors.
107         (Process_Full_View): Check hidden inheritance of class-wide type
108         invariants.
109         * sem_ch7.adb (Analyze_Package_Specification): Do not generate
110         the invariant procedure for interface types; build the invariant
111         procedure for tagged types inheriting invariants from their
112         progenitors.
113         * sem_prag.adb (Pragma_Invariant) Allow invariants in interface
114         types but do not build their invariant procedure since their
115         invariants will be propagated to the invariant procedure of
116         types covering the interface.
117         * exp_ch6.adb, exp_disp.adb, sem_ch3.adb, sem_ch7.adb,
118         sem_ch8.adb, sem_disp.adb: Replace all calls to Set_DT_Position
119         by calls to Set_DT_Position_Value.
121 2015-03-02  Hristian Kirtchev  <kirtchev@adacore.com>
123         * sem_attr.adb (Analyze_Attribute): Factor out heavily indented
124         code in Denote_Same_Function.  Do not analyze attribute 'Result
125         when it is inside procedure _Postconditions.  Remove a misplaced
126         warning diagnostic. Code cleanup.
127         (Denote_Same_Function): New routine.
128         * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Code
129         cleanup. Warn on pre/postconditions on an inlined subprogram.
130         (Analyze_Pragma, Refined_Post case): Warn on pre/postconditions on
131         an inlined subprogram.
132         (Analyze_Pre_Post_Condition_In_Decl_Part): Code cleanup. Warn on
133         pre/post condition on an inlined subprogram.
134         (Analyze_Test_Case_In_Decl_Part): Code cleanup. Warn on
135         pre/postconditions on an inlined subprogram.
136         (Check_Postcondition_Use_In_Inlined_Subprogram): New routine.
138 2015-03-02  Hristian Kirtchev  <kirtchev@adacore.com>
140         * sem_prag.adb (Ensure_Aggregate_Form):
141         Ensure that the name denoted by the Chars of a pragma argument
142         association has the proper Sloc when converted into an aggregate.
144 2015-03-02  Bob Duff  <duff@adacore.com>
146         * sem_ch6.adb (Check_Private_Overriding): Capture
147         Incomplete_Or_Partial_View in a constant. This is cleaner and
148         more efficient.
150 2015-03-02  Gary Dismukes  <dismukes@adacore.com>
152         * einfo.ads, exp_unst.ads: Minor reformatting.
154 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
156         * a-strsea.adb (Find_Token): Ensure that the range of iteration
157         does not perform any improper character access. This prevents
158         erroneous access in the unusual case of an empty string target
159         and a From parameter less than Source'First.
161 2015-03-02  Robert Dewar  <dewar@adacore.com>
163         * elists.adb (List_Length): Fix incorrect result.
165 2015-03-02  Bob Duff  <duff@adacore.com>
167         * sem_ch6.adb (Check_Private_Overriding): Refine the legality
168         checks here. It used to check that the function is merely
169         overriding SOMEthing. Now it checks that the function is
170         overriding a corresponding public operation. This is a correction
171         to the implementation of the rule in RM-3.9.3(10).
173 2015-03-02  Robert Dewar  <dewar@adacore.com>
175         * debug.adb: Document new debug flag -gnatd.1.
176         * einfo.ads, einfo.adb (Has_Nested_Subprogram): New flag.
177         (Has_Uplevel_Reference): New flag (Is_Static_Type): New flag.
178         (Uplevel_Reference_Noted):New flag (Uplevel_References): New field.
179         * elists.ads elists.adb (List_Length): New function.
180         * exp_ch6.adb (Expand_N_Subprogram_Body): Call Unnest_Subprogram
181         when appropriate (Process_Preconditions): Minor code
182         reorganization and reformatting
183         * exp_unst.ads, exp_unst.adb: New files.
184         * gnat1drv.adb (Adjust_Global_Switches): Set
185         Unnest_Subprogram_Mode if -gnatd.1
186         * namet.ads, namet.adb (Name_Find_Str): New version of Name_Find with
187         string argument.
188         * opt.ads (Unnest_Subprogram_Mode): New flag.
189         * par-ch3.adb (P_Identifier_Declarations): Fixes to -gnatd.2 handling.
190         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set
191         Has_Nested_Subprogram flag.
192         * sem_ch8.adb (Find_Direct_Name): New calling sequence for
193         Check_Nested_Access.
194         (Find_Selected_Component): Minor comment addition.
195         * sem_util.adb (Check_Nested_Access): New version for use with Exp_Unst.
196         (Note_Possible_Modification): New calling sequence for
197         Check_Nested_Access.
198         * sem_util.ads (Check_Nested_Access): New version for use with Exp_Unst.
199         * gcc-interface/Make-lang.in (GNAT1_OBJS): Add exp_unst.o
201 2015-03-02  Pierre-Marie de Rodat  <derodat@adacore.com>
203         * gcc-interface/utils.c (gnat_pushdecl): For non-artificial pointer
204         types, preserve the original type and create copies just like the C
205         front-end does.  For artificial ones, do not define a name for
206         the original type.
207         (create_type_decl): When gnat_pushdecl made the input type the
208         original type for the new declaration, do not define a stub
209         declaration for it.
210         * gcc-interface/utils2.c (build_binary_op): Accept two different
211         pointer types when they point to the same type.
213 2015-03-02  Hristian Kirtchev  <kirtchev@adacore.com>
215         * exp_util.adb (Possible_Bit_Aligned_Component): Do not process
216         an unanalyzed node.
217         * sem_util.adb (Kill_Current_Values): Do not invalidate and
218         de-null a constant.
220 2015-03-02  Robert Dewar  <dewar@adacore.com>
222         * sem_ch3.adb, exp_attr.adb, checks.adb, exp_aggr.adb: Minor
223         reformatting.
225 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
227         * sem_ch8.adb: extend use of Available_Subtype.
229 2015-03-02  Hristian Kirtchev  <kirtchev@adacore.com>
231         * sem_prag.adb (Duplication_Error): Remove the special handling
232         of 'Class or _Class in the context of pre/postconditions.
233         (Process_Class_Wide_Condition): Remove the special handling of
234         'Class or _Class in the context of pre/postconditions.
235         * sem_util.adb (Original_Aspect_Pragma_Name): Names Pre_Class
236         and Post_Class no longer need to be converted to _Pre and _Post.
237         * sem_util.ads (Original_Aspect_Pragma_Name): Update the comment
238         on usage.
240 2015-03-02  Hristian Kirtchev  <kirtchev@adacore.com>
242         * exp_ch6.adb (Process_Preconditions): Modify the
243         mechanism that find the first source declaration to correct exit
244         the loop once it has been found.
246 2015-03-02  Gary Dismukes  <dismukes@adacore.com>
248         * a-strsea.adb: Minor typo fix.
250 2015-03-02  Bob Duff  <duff@adacore.com>
252         * einfo.ads: Minor comment fixes.
254 2015-03-02  Gary Dismukes  <dismukes@adacore.com>
256         * einfo.adb, checks.adb: Minor reformatting and typo fixes.
258 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
260         * exp_aggr.adb (Get_Assoc_Expr): If the Default_Component_Value
261         is defined for the array type, use it instead of a Default_Value
262         specified for the component type itself.
264 2015-03-02  Thomas Quinot  <quinot@adacore.com>
266         * exp_attr.adb (Expand_N_Attribute_Reference, case Input): When
267         expanding a 'Input attribute reference for a class-wide type,
268         do not generate a separate object declaration for the controlling
269         tag dummy object; instead, generate the expression inline in the
270         dispatching call. Otherwise, the declaration (which involves a
271         call to String'Input, returning a dynamically sized value on the
272         secondary stack) will be expanded outside of proper secondary
273         stack mark/release operations, and will thus cause a secondary
274         stack leak.
276 2015-03-02  Hristian Kirtchev  <kirtchev@adacore.com>
278         * checks.adb (Add_Validity_Check): Change the names of all
279         formal parameters to better illustrate their purpose. Update
280         the subprogram documentation. Update all occurrences of the
281         formal parameters. Generate a pre/postcondition pragma by
282         calling Build_Pre_Post_Condition.
283         (Build_PPC_Pragma): Removed.
284         (Build_Pre_Post_Condition): New routine.
285         * einfo.adb Node8 is no longer used as Postcondition_Proc. Node14
286         is now used as Postconditions_Proc. Flag240 is now renamed to
287         Has_Expanded_Contract.  (First_Formal): The routine can now
288         operate on generic subprograms.
289         (First_Formal_With_Extras): The routine can now operate on generic
290         subprograms.
291         (Has_Expanded_Contract): New routine.
292         (Has_Postconditions): Removed.
293         (Postcondition_Proc): Removed.
294         (Postconditions_Proc): New routine.
295         (Set_Has_Expanded_Contract): New routine.
296         (Set_Has_Postconditions): Removed.
297         (Set_Postcondition_Proc): Removed.
298         (Set_Postconditions_Proc): New routine.
299         (Write_Entity_Flags): Remove the output of Has_Postconditions. Add
300         the output of Has_Expanded_Contract.
301         (Write_Field8_Name): Remove the output of Postcondition_Proc.
302         (Write_Field14_Name): Add the output of Postconditions_Proc.
303         * einfo.ads New attributes Has_Expanded_Contract and
304         Postconditions_Proc along with occurrences in entities.
305         Remove attributes Has_Postconditions and Postcondition_Proc
306         along with occurrences in entities.
307         (Has_Expanded_Contract): New routine along with pragma Inline.
308         (Has_Postconditions): Removed along with pragma Inline.
309         (Postcondition_Proc): Removed along with pragma Inline.
310         (Postconditions_Proc): New routine along with pragma Inline.
311         (Set_Has_Expanded_Contract): New routine along with pragma Inline.
312         (Set_Has_Postconditions): Removed along with pragma Inline.
313         (Set_Postcondition_Proc): Removed along with pragma Inline.
314         (Set_Postconditions_Proc): New routine along with pragma Inline.
315         * exp_ch6.adb (Add_Return): Code cleanup. Update the
316         generation of the call to the _Postconditions routine of
317         the procedure.  (Expand_Non_Function_Return): Reformat the
318         comment on usage. Code cleanup.  Update the generation of
319         the call to the _Postconditions routine of the procedure or
320         entry [family].
321         (Expand_Simple_Function_Return): Update the
322         generation of the _Postconditions routine of the function.
323         (Expand_Subprogram_Contract): Reimplemented.
324         * exp_ch6.ads (Expand_Subprogram_Contract): Update the parameter
325         profile along the comment on usage.
326         * exp_ch9.adb (Build_PPC_Wrapper): Code cleanup.
327         (Expand_N_Task_Type_Declaration): Generate pre/postconditions
328         wrapper when the entry [family] has a contract with
329         pre/postconditions.
330         * exp_prag.adb (Expand_Attributes_In_Consequence): New routine.
331         (Expand_Contract_Cases): This routine and its subsidiaries now
332         analyze all generated code.
333         (Expand_Old_In_Consequence): Removed.
334         * sem_attr.adb Add with and use clause for Sem_Prag.
335         (Analyze_Attribute): Reimplment the analysis of attribute 'Result.
336         (Check_Use_In_Test_Case): Use routine Test_Case_Arg to obtain
337         "Ensures".
338         * sem_ch3.adb (Analyze_Declarations): Analyze the contract of
339         a generic subprogram.
340         (Analyze_Object_Declaration): Do not create a contract node.
341         (Derive_Subprogram): Do not create a contract node.
342         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Do
343         not create a contract node.
344         (Analyze_Completion_Contract): New routine.
345         (Analyze_Function_Return): Alphabetize.
346         (Analyze_Generic_Subprogram_Body): Alphabetize. Do not create a
347         contract node.  Do not copy pre/postconditions to the original
348         generic template.
349         (Analyze_Null_Procedure): Do not create a contract node.
350         (Analyze_Subprogram_Body_Contract): Reimplemented.
351         (Analyze_Subprogram_Body_Helper): Do not mark the enclosing scope
352         as having postconditions. Do not create a contract node. Analyze
353         the subprogram body contract of a body that acts as a compilation
354         unit. Expand the subprogram contract after the declarations have
355         been analyzed.
356         (Analyze_Subprogram_Contract): Reimplemented.
357         (Analyze_Subprogram_Specification): Do not create a contract node.
358         (List_Inherited_Pre_Post_Aspects): Code cleanup.
359         * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Update the
360         comment on usage.
361         (Analyze_Subprogram_Contract): Update the
362         parameter profile and the comment on usage.
363         * sem_ch7.adb (Analyze_Package_Body_Helper): Do not create a
364         contract node.
365         (Analyze_Package_Declaration): Do not create a
366         contract node.
367         (Is_Subp_Or_Const_Ref): Ensure that the prefix has an entity.
368         * sem_ch8.adb (Analyze_Subprogram_Renaming): Do not create a
369         contract node.
370         * sem_ch9.adb (Analyze_Entry_Declaration): Do not create a
371         contract node.
372         * sem_ch10.adb (Analyze_Compilation_Unit): Move local variables to
373         their proper section and alphabetize them. Analyze the contract of
374         a [generic] subprogram after all Pragmas_After have been analyzed.
375         (Analyze_Subprogram_Body_Stub_Contract): Alphabetize.
376         * sem_ch12.adb (Analyze_Generic_Package_Declaration): Do not
377         create a contract node.
378         (Analyze_Generic_Subprogram_Declaration):
379         Alphabetize local variables. Do not create a contract
380         node. Do not generate aspects out of pragmas for ASIS.
381         (Analyze_Subprogram_Instantiation): Instantiate
382         the contract of the subprogram.  Do not create a
383         contract node.  (Instantiate_Contract): New routine.
384         (Instantiate_Subprogram_Body): Alphabetize local variables.
385         (Save_Global_References_In_Aspects): New routine.
386         (Save_References): Do not save the global references found within
387         the aspects of a generic subprogram.
388         * sem_ch12.ads (Save_Global_References_In_Aspects): New routine.
389         * sem_ch13.adb (Analyze_Aspect_Specifications): Do not use
390         Original_Node for establishing linkages.
391         (Insert_Pragma): Insertion in a subprogram body takes precedence over
392         the case where the subprogram body is also a compilation unit.
393         * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Use
394         Get_Argument to obtain the proper expression. Install the generic
395         formals when the related context is a generic subprogram.
396         (Analyze_Depends_In_Decl_Part): Use Get_Argument to obtain
397         the proper expression. Use Corresponding_Spec_Of to obtain
398         the spec. Install the generic formal when the related context
399         is a generic subprogram.
400         (Analyze_Global_In_Decl_Part): Use Get_Argument to obtain the proper
401         expression. Use Corresponding_Spec_Of to obtain the spec. Install the
402         generic formal when the related context is a generic subprogram.
403         (Analyze_Initial_Condition_In_Decl_Part): Use Get_Argument
404         to obtain the proper expression. Remove the call to
405         Check_SPARK_Aspect_For_ASIS as the analysis is now done
406         automatically.
407         (Analyze_Pragma): Update all occurrences
408         to Original_Aspect_Name. Pragmas Contract_Cases, Depends,
409         Extensions_Visible, Global, Postcondition, Precondition and
410         Test_Case now carry generic templates when the related context
411         is a generic subprogram. The same pragmas are no longer
412         forcefully fully analyzed when the context is a subprogram
413         that acts as a compilation unit. Pragmas Abstract_State,
414         Initial_Condition, Initializes and Refined_State have been clean
415         up. Pragmas Post, Post_Class, Postcondition, Pre, Pre_Class
416         and Precondition now use the same routine for analysis. Pragma
417         Refined_Post does not need to check the use of 'Result or
418         the lack of a post-state in its expression. Reimplement the
419         analysis of pragma Test_Case.
420         (Analyze_Pre_Post_Condition): New routine.
421         (Analyze_Pre_Post_Condition_In_Decl_Part):
422         Reimplemented.
423         (Analyze_Refined_Depends_In_Decl_Part): Use Get_Argument to obtain the
424         proper expression.
425         (Analyze_Refined_Global_In_Decl_Part): Use Get_Argument to obtain
426         the proper expression.
427         (Analyze_Test_Case_In_Decl_Part): Reimplemented.
428         (Check_Pre_Post): Removed.
429         (Check_Precondition_Postcondition): Removed.
430         (Check_SPARK_Aspect_For_ASIS): Removed.
431         (Check_Test_Case): Removed.
432         (Collect_Subprogram_Inputs_Outputs): Use Get_Argument
433         to obtain the proper expression. Use Corresponding_Spec_Of to
434         find the proper spec.
435         (Create_Generic_Template): New routine.
436         (Duplication_Error): New routine.
437         (Expression_Function_Error): New routine.
438         (Find_Related_Subprogram_Or_Body): Moved to the spec
439         of Sem_Prag. Emit precise error messages. Account for cases of
440         rewritten expression functions, generic instantiations, handled
441         sequence of statements and pragmas from aspects.
442         (Get_Argument): New routine.
443         (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Removed.
444         (Preanalyze_CTC_Args): Removed.
445         (Process_Class_Wide_Condition): New routine.
446         * sem_prag.ads (Analyze_Test_Case_In_Decl_Part): Update
447         the parameter profile along with the comment on usage.
448         (Find_Related_Subprogram_Or_Body): Moved from the body of Sem_Prag.
449         (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Removed.
450         (Test_Case_Arg): New routine.
451         * sem_util.adb Add with and use clauses for Sem_Ch6.
452         (Add_Contract_Item): This routine now creates a contract
453         node the first time an item is added. Remove the duplicate
454         aspect/pragma checks.
455         (Check_Result_And_Post_State): Reimplemented.
456         (Corresponding_Spec_Of): New routine.
457         (Get_Ensures_From_CTC_Pragma): Removed.
458         (Get_Requires_From_CTC_Pragma): Removed.
459         (Has_Significant_Contract): New routine.
460         (Inherit_Subprogram_Contract): Inherit only if the source
461         has a contract.
462         (Install_Generic_Formals): New routine.
463         (Original_Aspect_Name): Removed.
464         (Original_Aspect_Pragma_Name): New routine.
465         * sem_util.ads (Check_Result_And_Post_State): Reimplemented.
466         (Corresponding_Spec_Of): New routine.
467         (Get_Ensures_From_CTC_Pragma): Removed.
468         (Get_Requires_From_CTC_Pragma): Removed.
469         (Has_Significant_Contract): New routine.
470         (Install_Generic_Formals): New routine.
471         (Original_Aspect_Name): Removed.
472         (Original_Aspect_Pragma_Name): New routine.
473         * sem_warn.adb Add with and use clauses for Sem_Prag.
474         (Within_Postcondition): Use Test_Case_Arg to extract "Ensures".
476 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
478         * sem_ch8.adb (Available_Subtype): Optimization in
479         Find_Selected_Component: when safe, use existing subtype of
480         array component, possibly discriminant-dependent, rather than
481         creating new subtype declaration for it. In this fashion different
482         occurrences of the component have the same subtype, rather than
483         just equivalent ones. Simplifies value tracing in GNATProve.
485 2015-03-01  Arnaud Charlet  <charlet@adacore.com>
487         PR ada/65259
489         * doc/gnat_ugn/gnat_project_manager.rst,
490         doc/gnat_ugn/platform_specific_information.rst: Remove reference to
491         image, too troublesome with texi format.
492         * gnat_ugn.texi: Regenerate.
494 2015-02-24  Thomas Schwinge  <thomas@codesourcery.com>
496         PR libgomp/64625
497         * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8): Remove.
498         (DEF_FUNCTION_TYPE_VAR_12): Likewise.
499         (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
501 2015-02-23  Thomas Schwinge  <thomas@codesourcery.com>
503         * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8): Fix number of
504         arguments parameter.
505         (DEF_FUNCTION_TYPE_VAR_12): Likewise.
507 2015-02-22  Arnaud Charlet  <charlet@adacore.com>
509         * doc/Makefile: postprocess texinfo files to update @dircategory
510         and update texi files under gcc/ada.
511         * gnat_ugn.texi, gnat_rm.texi: Regenerated.
513 2015-02-22  Arnaud Charlet  <charlet@adacore.com>
515         * doc/gnat_ugn/project-manager-figure.png,
516         doc/gnat_ugn/rtlibrary-structure.png: New.
518 2015-02-22  Tom de Vries  <tom@codesourcery.com>
520         PR ada/65100
521         * gnat-style.texi (@subsection Loop Statements): Replace @noindent by
522         @item, and fix warning '@itemize has text but no @item'.
524 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
526         * sem_prag.adb (Analyze_Pragma, case Obsolescent): Pragma
527         legally applies to an abstract subprogram declaration.
528         * freeze.adb: Minor comment addition.
530 2015-02-20  Robert Dewar  <dewar@adacore.com>
532         * errout.ads: Document replacement of Name_uPre/Post/Type_Invariant.
533         * erroutc.adb (Set_Msg_Str): Replace _xxx.
534         (Pre/Post/Type_Invariant) by xxx'Class.
535         * erroutc.ads (Set_Msg_Str): Replace _xxx.
536         (Pre/Post/Type_Invariant) by xxx'Class.
537         * sem_prag.adb (Fix_Error): Remove special casing of
538         Name_uType_Invariant.
539         (Analyze_Pre_Post_Condition_In_Decl_Part): Remove special casing of
540         Name_uPre and Name_uPost in aspect case (done in Errout now).
542 2015-02-20  Robert Dewar  <dewar@adacore.com>
544         * g-alveop.adb: Minor style fixes.
546 2015-02-20  Robert Dewar  <dewar@adacore.com>
548         * freeze.adb (Warn_Overlay): Guard against blow up with address
549         clause.
551 2015-02-20  Bob Duff  <duff@adacore.com>
553         * exp_attr.adb (May_Be_External_Call): Remove this. There is no need
554         for the compiler to guess whether the call is internal or external --
555         it is always external.
556         (Expand_Access_To_Protected_Op): For P'Access, where P
557         is a protected subprogram, always create a pointer to the
558         External_Subprogram.
560 2015-02-20  Robert Dewar  <dewar@adacore.com>
562         * a-dispat.adb, a-stcoed.ads: Minor reformatting.
564 2015-02-20  Robert Dewar  <dewar@adacore.com>
566         * sem_ch13.adb (Build_Discrete_Static_Predicate): Allow static
567         predicate for non-static subtype.
568         (Build_Predicate_Functions): Do not assume subtype associated with a
569         static predicate must be static.
571 2015-02-20  Robert Dewar  <dewar@adacore.com>
573         * errout.adb (Set_Msg_Node): Better handling of internal names
574         (Set_Msg_Node): Kill message when we cannot eliminate internal name.
575         * errout.ads: Document additional case of message deletion.
576         * namet.adb (Is_Internal_Name): Refined to consider wide
577         strings in brackets notation and character literals not to be
578         internal names.
579         * sem_ch8.adb (Find_Selected_Component): Give additional error
580         when selector name is a subprogram whose first parameter has
581         the same type as the prefix, but that type is untagged.
583 2015-02-20  Robert Dewar  <dewar@adacore.com>
585         * g-allein.ads, g-alveop.adb, g-alveop.ads, opt.ads: Minor reformatting
587 2015-02-20  Tristan Gingold  <gingold@adacore.com>
589         * opt.ads (GNAT_Mode_Config): New variable.
590         * opt.adb (Set_Opt_Config_Switches): Consider GNAT_Mode_Config
591         to set Assertions_Enabled.
592         * switch-c.adb (Scan_Front_End_Switches): Set GNAT_Mode_Config
593         for -gnatg.
595 2015-02-20  Robert Dewar  <dewar@adacore.com>
597         * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Add an additional
598         comment regarding the handling of unterminated fixed-point
599         constants.
600         * s-valuns.ads (Scan_Raw_Unsigned): Add comments
601         corresponding to those previously added for
602         System.Val_LLU.Scan_Raw_Long_Long_Unsigned.
604 2015-02-20  Olivier Hainque  <hainque@adacore.com>
606         * g-allein.ads, g-alveop.ads, g-alveop.adb: Code clean ups.
608 2015-02-20  Robert Dewar  <dewar@adacore.com>
610         * sem_prag.adb: Minor comment clarification.
612 2015-02-20  Olivier Hainque  <hainque@adacore.com>
614         * g-allein.ads (vec_ctf, vec_vcsfx, vec_vcfux): Remove.
615         * g-alleve.ads, g-alleva.adb (vcfux): Likewise.
616         * g-alveop.ads (vec_vcfsx, vec_vcfux): Just rename the ll versions.
617         (vec_ctf): Now renamings as well.
619 2015-02-20  Robert Dewar  <dewar@adacore.com>
621         * switch-c.adb, bindgen.adb: Minor reformatting.
623 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
625         * sem_prag.adb (Analyze_Pragma, case Type_Invariant):
626         Invariant'class is allowed on an abstract type.
628 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
630         * sem_ch3.adb (Access_Definition): If the access definition is
631         for a protected component and defines an access to protected
632         subprogram, do not create an itype reference for it because a
633         full type declaration will be built in order to generate the
634         proper equivalent type.
635         (Analyze_Subtype_Declaration): Add information of incomplete
636         subtypes, for Ada 2012 extended uses of incomplete types.
638 2015-02-20  Gary Dismukes  <dismukes@adacore.com>
640         * sem_res.adb: Minor reformatting.
642 2015-02-20  Vincent Celier  <celier@adacore.com>
644         * switch-c.adb (Scan_Front_End_Switches): When comparing runtime
645         path name for several switches --RTS, use the normalized path
646         names.
648 2015-02-20  Vincent Celier  <celier@adacore.com>
650         * bindgen.adb: Minor reformatting and code reorganization.
652 2015-02-20  Jose Ruiz  <ruiz@adacore.com>
654         * a-stcoed.ads: Add spec for this package (Unimplemented_Unit).
655         * impunit.adb (Non_Imp_File_Names_12): Mark unit a-stcoed.ads as
656         defined by Ada 2012.
658 2015-02-20  Arnaud Charlet  <charlet@adacore.com>
660         * sysdep.c, expect.c, s-oscons-tmplt.c, gsocket.h, adaint.c: Remove
661         obsolete references to RTX, nucleus, VMS.
663 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
665         * sem_prag.adb (Fix_Error): For an illegal Type_Invariant'Class
666         aspect, use name that mentions Class explicitly, rather than
667         compiler-internal name.
669 2015-02-20  Robert Dewar  <dewar@adacore.com>
671         * debug.adb: Add documentation for -gnatd.2 (allow statements
672         in decl sequences).
673         * par-ch3.adb (P_Identifier_Declarations): Handle
674         statement appearing where declaration expected more cleanly.
675         (Statement_When_Declaration_Expected): Implement debug flag
676         -gnatd.2.
678 2015-02-20  Jose Ruiz  <ruiz@adacore.com>
680         * a-dinopr.ads: Add spec for this package (Unimplemented_Unit).
681         * a-dispat.ads (Yield): Include procedure added in Ada 2012.
682         * a-dispat.adb (Yield): Implement procedure added in Ada 2012.
683         * impunit.adb (Non_Imp_File_Names_05): Mark unit a-dinopr.ads as
684         defined by Ada 2005.
685         * snames.ads-tmpl (Name_Non_Preemptive_FIFO_Within_Priorities):
686         This is the correct name for the dispatching policy (FIFO was
687         missing).
689 2015-02-20  Javier Miranda  <miranda@adacore.com>
691         * sem_res.adb (Resolve_Type_Conversion): If the type of the
692         operand is the limited-view of a class-wide type then recover
693         the class-wide type of the non-limited view.
695 2015-02-20  Arnaud Charlet  <charlet@adacore.com>
697         * gcc-interface/Makefile.in: Remove references to nucleus.
698         * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Procedure): Set
699         extern_flag to true for Inline_Always subprograms with
700         Intrinsic convention.
702 2015-02-20  Yannick Moy  <moy@adacore.com>
704         * sem_prag.ads: Minor typo in comment.
706 2015-02-20  Pascal Obry  <obry@adacore.com>
708         * s-osprim-mingw.adb: Fix Get_Base_Time parameter mode.
710 2015-02-20  Vincent Celier  <celier@adacore.com>
712         * makeutl.adb (Get_Directories.Add_Dir): Add a directory only
713         if it exists.
715 2015-02-20  Robert Dewar  <dewar@adacore.com>
717         * sem_eval.ads: Minor reformatting.
719 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
721         * freeze.adb (Size_Known): Do not set the packed size for
722         independent type or component.
723         (Freeze_Array_Type): Check for Independent[_Components] with packing
724         or explicit component size clause.
725         * gnat1drv.adb (Post_Compilation_Validation_Checks): Do the validation
726         of independence pragmas only for non-GCC back-ends.
727         * sem_ch13.adb (Initialize): Likewise for the initialization.
728         * sem_prag.adb (Record_Independence_Check): New procedure to record an
729         independence check in the table.
730         (Analyze_Pragma): Use it throughout instead of doing it manually.
731         * gcc-interface/decl.c (gnat_to_gnu_field): Add support for
732         independent type or component.
734 2015-02-20  Thomas Quinot  <quinot@adacore.com>
736         * adaint.c (__gnat_readdir): For Solaris, use 64 bit variants of
737         struct direct and readdir. This is required for NFS filesystems
738         mounted from servers that use 64-bit cookies.
740 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
742         * sem_ch12.adb (Analyze_Subprogram_Instantiaion): New subprogram
743         Build_Subprogram_Renaming, to create renaming of subprogram
744         instance in the the declaration of the wrapper package rather
745         than in its body, so that it is available for analysis of aspects
746         propagated from generic to instantiation.
747         (Check_Mismatch): An actual for a formal package that is an
748         incomplete type matches a formal type that is incomplete.
749         (Instantiate_Package_Body): Move code that builds subprogram
750         renaming to Analyze_Subprogram_Instantiation.
751         (Instantiate_Type): The generated subtype is a limited view if
752         the actual is a limited view.
753         (Load_Parent_Of_Generic): Retrieve instance declaration from
754         its new position within wrapper package.
756 2015-02-20  Arnaud Charlet  <charlet@adacore.com>
758         * s-parame-vxworks.adb, s-os_lib.ads: Update comments.
760 2015-02-20  Robert Dewar  <dewar@adacore.com>
762         * s-osinte-vxworks.ads (To_Timespec): Add comment about the
763         issue of negative arguments.
765 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
767         * gnat1drv.adb: Minor consistency fix.
769 2015-02-20  Pascal Obry  <obry@adacore.com>
771         * s-osprim-mingw.adb (Get_Base_Time): Properly release lock in all
772         paths.
774 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
776         * inline.adb (Expand_Inlined_Call): Skip again calls to subprogram
777         renamings.
778         * exp_ch6.adb (Expand_Call): Use back-end inlining
779         instead of expansion for simple subprogram renamings.
781 2015-02-20  Robert Dewar  <dewar@adacore.com>
783         * exp_util.adb: Minor reformatting.
785 2015-02-20  Vincent Celier  <celier@adacore.com>
787         * switch-c.adb (Scan_Front_End_Switches): Do not fail when --RTS=
788         is specified several times with different values that indicates
789         the same runtime directory.
791 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
793         * sem_attr.adb (Check_Not_Incomplete_Type): Clean up code to
794         handle properly illegal uses of attributes on prefixes on an
795         incomplete type, both when the type of the prefix is locally
796         incomplete, and when it is a limited view of a type whose
797         non-limited view is not available.
798         (Analyze_Attribute): Add calls to Check_Not_Incomplete_Type for
799         'Address and others.
801 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
803         * exp_ch6.adb: Fix minor typo in comment.
805 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
807         * sinfo.ads: Add comment.
809 2015-02-20  Olivier Hainque  <hainque@adacore.com>
811         * opt.ads: Replace Opt.Suppress_All_Inlining by two separate
812         flags controlling the actual FE inlining out of pragma Inline
813         and pragma Inline_Always.
814         * adabkend.adb (Scan_Compiler_Arguments): Set both flags to True
815         on -fno-inline, which disables all inlining in compilers with
816         an Ada back-end and without back-end inlining support.
817         * back_end.adb (Scan_Back_End_Switches): Set the Inline related
818         flag to True on -fno-inline and leave Inline_Always alone for
819         gcc back-ends.
820         * back_end.ads (Scan_Compiler_Arguments): Adjust spec wrt the
821         names of the Opt flags it sets.
822         * gnat1drv.adb (Adjust_Global_Switches): Remove test on
823         Opt.Suppress_All_Inlining in the Back_End_Inlining computation.
824         * sem_prag.adb (Make_Inline): Remove early return conditioned
825         on Opt.Suppress_All_Inlining.
826         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Use the flags to
827         disable the calls to Build_Body_To_Inline otherwise triggered
828         by pragma Inline or Inline_Always. This will prevent actual
829         front-end inlining of the subprogram on calls.
831 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
833         * exp_ch3.adb (Default_Initialize_Object): Call Add_Inlined_Body on the
834         Abort_Undefer_Direct function.
835         * exp_ch5.adb (Expand_N_Assignment_Statement): Likewise.
836         * exp_intr.adb (Expand_Unc_Deallocation): Likewise.
837         * exp_prag.adb (Expand_Pragma_Abort_Defer): Likewise.
838         * exp_ch4.adb (Expand_N_Selected_Component): Adjust call to
839         Add_Inlined_Body.
840         * exp_ch6.adb (Expand_Call): Adjust calls to Add_Inlined_Body.
841          Remove call to Register_Backend_Call and move code resetting
842         Needs_Debug_Info on inlined subprograms to...
843         * inline.ads (Add_Inlined_Body): Add N parameter.
844         (Register_Backend_Call): Delete.
845         * inline.adb (Add_Inlined_Body): ...here and simplify.
846          Register the call with Backend_Calls directly.
847         (Register_Backend_Call): Delete.
848         * s-stalib.ads (Abort_Undefer_Direct): Restore pragma Inline.
850 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
852         * s-stalib.ads: Fix typo.
854 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
856         * exp_ch3.adb (Default_Initialize_Object): If the object has a
857         delayed freeze, the actions associated with default initialization
858         must be part of the freeze actions, rather that being inserted
859         directly after the object declaration.
861 2015-02-20  Robert Dewar  <dewar@adacore.com>
863         * lib-load.adb: Minor comment update.
865 2015-02-20  Vincent Celier  <celier@adacore.com>
867         * prj-proc.adb (Process_Case_Construction): When there are
868         incomplete withed projects and the case variable is unknown,
869         skip the case construction.
871 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
873         * exp_ch6.adb (Expand_Actuals): Add caller-side invariant checks
874         when an actual is a view conversion, either because the call is
875         to an inherited operation, or because the actual is an explicit
876         type conversion to an ancestor type.  Fixes ACATS 4.0D: C732001
878 2015-02-20  Robert Dewar  <dewar@adacore.com>
880         * einfo.ads: Minor comment updates Fix missing pragma Inline
881         for Set_Partial_View_Has_Unknown_Discr.
882         * einfo.adb (Write_Entity_Flags): Add missing entry for
883         Partial_View_Has_Unknown_Discr.
884         * sem_ch3.adb: Minor reformatting.
886 2015-02-20  Vincent Celier  <celier@adacore.com>
888         * opt.ads: Minor cleanup: remove mention of gprmake.
889         * s-stalib.ads (Abort_Undefer_Direct): Do not inline.
890         * s-tataat.adb: Do not call System.Tasking.Self but directly
891         System.Task_Primitives.Operations.Self.
893 2015-02-20  Arnaud Charlet  <charlet@adacore.com>
895         * gnat_rm.texi, gnat_ugn.texi: Now automatically generated from
896         sphinx in the doc directory.
897         * doc: New directory containing sphinx versions of gnat_rm and gnat_ugn
899 2015-02-20  Robert Dewar  <dewar@adacore.com>
901         * sem_res.adb: Minor reformatting.
902         * exp_ch9.adb (Build_Protected_Spec): Copy Aliased setting when
903         building spec.
904         * sem_ch13.adb (Analyze_Aspect_Specifications): Exclude Boolean
905         aspects from circuitry setting delay required to false if the
906         argument is an integer literal.
908 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
910         * einfo.ads. einfo.adb (Partial_View_Has_Unknown_Discr):  New flag
911         on type entities, to enforce AI12-0133: default initialization
912         of types whose partial view has unknown discriminants does not
913         get an invariant check, because clients of the unit can never
914         declare objects of such types.
915         * sem_ch3.adb (Find_Type_Name); Set new flag
916         Partial_View_Has_Unknown_Discr when needed.
917         * exp_ch3.adb (Expand_N_Object_Declaration): Use flag to suppress
918         generation of invariant call on default-initialized object.
920 2015-02-08  Eric Botcazou  <ebotcazou@adacore.com>
922         * gcc-interface/decl.c (gnat_to_gnu_param): Do not strip the padding
923         if the parameter either is passed by reference or if the alignment
924         would be lowered.
926 2015-02-08  Eric Botcazou  <ebotcazou@adacore.com>
928         * gcc-interface/decl.c (is_cplusplus_method): Use Is_Primitive flag to
929         detect primitive operations of tagged and untagged types.
931 2015-02-08  Eric Botcazou  <ebotcazou@adacore.com>
933         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not bother about alias
934         sets in presence of derivation for subprogram types.
936 2015-02-08  Eric Botcazou  <ebotcazou@adacore.com>
938         * gcc-interface/utils.c (begin_subprog_body): Assert that the body is
939         present in the same context as the declaration.
941 2015-02-07  Jakub Jelinek  <jakub@redhat.com>
943         PR middle-end/64340
944         * gcc-interface/trans.c (gigi): Recreate optimization_default_node
945         and optimization_current_node after tweaking global_options.
947 2015-02-05  Robert Dewar  <dewar@adacore.com>
949         * prj-proc.adb, sem_aux.adb, exp_ch9.adb, errout.adb, prj-dect.adb,
950         prj-nmsc.adb: Minor reformatting.
952 2015-02-05  Ed Schonberg  <schonberg@adacore.com>
954         * sem_type.adb (Covers): In ASIS_Mode the Corresponding_Record
955         of a protected type may not be available, so to check conformance
956         with an interface type, examine the interface list in the type
957         declaration directly.
958         (Write_Overloads): Improve information for indirect calls,
959         for debugger use.
961 2015-02-05  Ed Schonberg  <schonberg@adacore.com>
963         * exp_ch3.adb (Make_Tag_Assignment): Do not perform this
964         expansion activity in ASIS mode.
966 2015-02-05  Javier Miranda  <miranda@adacore.com>
968         * errout.adb (Error_Msg_PT): Add missing error.
969         * sem_ch6.adb (Check_Synchronized_Overriding): Check the missing
970         RM rule.  Code cleanup.
971         * exp_ch9.adb (Build_Wrapper_Spec): Propagate "constant" in
972         anonymous access types.  Found working on the tests. Code cleanup.
974 2015-02-05  Vincent Celier  <celier@adacore.com>
976         * prj-dect.adb (Parse_Attribute_Declaration): Continue scanning
977         when there are incomplete withs.
978         * prj-nmsc.adb (Process_Naming): Do not try to get the value
979         of an element when it is nil.
980         (Check_Naming): Do not check a nil suffix for illegality
981         * prj-proc.adb (Expression): Do not process an empty term.
982         * prj-strt.adb (Attribute_Reference): If attribute cannot be
983         found, parse a possible index to avoid cascading errors.
985 2015-02-05  Ed Schonberg  <schonberg@adacore.com>
987         * sem_aux.adb (Is_Derived_Type): A subprogram_type generated
988         for an access_to_subprogram declaration is not a derived type.
990 2015-02-05  Robert Dewar  <dewar@adacore.com>
992         * errout.adb (Error_Msg_Internal): For non-serious error set
993         Fatal_Error to Ignored.
994         * lib-load.adb (Load_Unit): Minor comment updates.
995         * sem_ch10.adb (Analyze_With_Clause): Propagate Fatal_Error
996         setting from with'ed unit to with'ing unit.
997         * sem_prag.adb (Analyze_Pragma, case Warnings): Document handling
998         of ambiguity.
1000 2015-02-05  Yannick Moy  <moy@adacore.com>
1002         * sem_prag.adb, par-prag.adb: Minor code clean up.
1004 2015-02-05  Yannick Moy  <moy@adacore.com>
1006         * par-prag.adb (Pragma_Warnings): Update for extended form
1007         of pragma Warnings. The "one" argument case may now have 2 or
1008         3 arguments.
1009         * sem_prag.adb (Analyze_Pragma/Pragma_Warnings): Update for
1010         extended form of pragma Warnings. Pragma with tool name is either
1011         rewritten as null or as an equivalent form without tool name,
1012         before reanalysis.
1013         * snames.ads-tmpl (Name_Gnatprove): New name.
1015 2015-02-05  Robert Dewar  <dewar@adacore.com>
1017         * sem_ch13.adb (Add_Invariants): Don't assume invariant is
1018         standard Boolean.
1019         * sem_prag.adb (Analyze_Pragma, case Check): Don't assume
1020         condition is standard Boolean, it can be non-standard derived
1021         Boolean.
1023 2015-02-05  Robert Dewar  <dewar@adacore.com>
1025         * checks.adb (Enable_Range_Check): Disconnect attempted
1026         optimization for the case of range check for subscript of
1027         unconstrained array.
1029 2015-02-05  Robert Dewar  <dewar@adacore.com>
1031         * par-ch13.adb (With_Present): New function
1032         (Aspect_Specifications_Present): Handle WHEN in place of WITH
1033         (Get_Aspect_Specifications): Comment update.
1034         * par.adb: Comment updates.
1036 2015-02-05  Robert Dewar  <dewar@adacore.com>
1038         * errout.adb (Handle_Serious_Error): New setting of Fatal_Error.
1039         * frontend.adb (Frontend): New setting of Fatal_Error.
1040         * lib-load.adb (Create_Dummy_Package_Unit): New setting of
1041         Fatal_Error.
1042         (Load_Main_Source): New setting of Fatal_Error
1043         (Load_Unit): New setting of Fatal_Error.
1044         * lib-writ.adb (Add_Preprocessing_Dependency): New setting of
1045         Fatal_Error.
1046         (Ensure_System_Dependency): New setting of Fatal_Error.
1047         * lib.adb (Fatal_Error): New setting of Fatal_Error
1048         (Set_Fatal_Error): New setting of Fatal_Error.
1049         * lib.ads: New definition of Fatal_Error and associated routines.
1050         * par-ch10.adb (P_Compilation_Unit): New setting of Fatal_Error.
1051         * par-load.adb (Load): New setting of Fatal_Error.
1052         * rtsfind.adb (Load_RTU): New setting of Fatal_Error.
1053         * sem_ch10.adb (Analyze_Compilation_Unit): New setting of
1054         Fatal_Error.
1055         (Optional_Subunit): New setting of Fatal_Error.
1056         (Analyze_Proper_Body): New setting of Fatal_Error.
1057         (Load_Needed_Body): New setting of Fatal_Error.
1059 2015-02-05  Ed Schonberg  <schonberg@adacore.com>
1061         * sem_res.adb (Resolve_Call): If the function being called has
1062         out parameters do not check for language version if the function
1063         comes from a predefined unit, as those are always compiled in
1064         Ada 2012 mode.
1066 2015-02-05  Ed Schonberg  <schonberg@adacore.com>
1068         * sem_ch3.adb (Process_Full_View): Verify that the full view
1069         of a type extension must carry an explicit limited keyword if
1070         the partial view does (RM 7.3 (10.1)).
1072 2015-02-05  Robert Dewar  <dewar@adacore.com>
1074         * g-rannum.adb, g-rannum.ads, s-rannum.adb, s-rannum.ads,
1075         sem_warn.ads: Minor reformatting.
1076         * exp_ch13.adb (Expand_N_Freeze_Entity): Add guard for aspect
1077         deleted by -gnatI.
1078         * sem_prag.adb (Analyze_Pragma, case Type_Invariant): Give
1079         error for abstract type.
1081 2015-02-05  Yannick Moy  <moy@adacore.com>
1083         * opt.ads (Warn_On_Suspicious_Contract): Update comment
1084         describing use.
1085         * sem_attr.adb (Analyze_Attribute/Attribute_Update): Warn on
1086         suspicious uses of 'Update.
1087         * sem_warn.adb, sem_warn.ads (Warn_On_Suspicious_Update): New
1088         function issues warning on suspicious uses of 'Update.
1089         * g-rannum.adb, g-rannum.ads, s-rannum.adb, s-rannum.ads: Mark
1090         package spec and body as SPARK_Mode Off.
1092 2015-02-05  Robert Dewar  <dewar@adacore.com>
1094         * sem_prag.adb (Set_Elab_Unit_Name): New name for Set_Unit_Name
1095         (Analyze_Pragma): Change Set_Unit_Name to Set_Elab_Unit_Name
1096         (Set_Elab_Unit_Name): Generate reference for Elaborate[_All]
1097         * sem_warn.adb (Warn_On_Unreferenced_Entity): Suppress warning
1098         for exported entity.
1100 2015-02-05  Hristian Kirtchev  <kirtchev@adacore.com>
1102         * sem_prag.adb (Check_Pragma_Conformance): Add
1103         local variable Arg. Ensure that all errors are associated with
1104         the pragma if it appears without an argument. Add comments on
1105         various cases.
1107 2015-02-05  Robert Dewar  <dewar@adacore.com>
1109         * lib-xref.adb: Minor reformatting.
1111 2015-02-05  Tristan Gingold  <gingold@adacore.com>
1113         PR ada/64349da/64349
1114         * env.c: Fix thinko: handle Darwin case before default one.
1116 2015-01-30  Robert Dewar  <dewar@adacore.com>
1118         * a-assert.adb: Minor reformatting.
1119         * sem_ch13.adb: Minor comment clarification.
1120         * types.ads: Minor comment update.
1121         * sem_eval.adb (Real_Or_String_Static_Predicate_Matches): Avoid blow up
1122         when we have a predicate that is nothing but an inherited dynamic
1123         predicate.
1125 2015-01-30  Jerome Guitton  <guitton@adacore.com>
1127         * gcc-interface/Makefile.in (x86-vxworks): Update GCC_SPEC_FILES to
1128         include cert link spec.
1130 2015-01-30  Robert Dewar  <dewar@adacore.com>
1132         * einfo.ads: Minor comment fix.
1133         * freeze.adb (Freeze_Profile): Add test for suspicious import
1134         in pure unit.
1135         * sem_prag.adb (Process_Import_Or_Interface): Test for suspicious
1136         use in Pure unit is now moved to Freeze (to properly catch
1137         Pure_Function exemption).
1139 2015-01-30  Bob Duff  <duff@adacore.com>
1141         * sem_res.ads: Minor comment fix.
1142         * sem_type.adb: sem_type.adb (Remove_Conversions): Need to
1143         check both operands of an operator.
1145 2015-01-30  Yannick Moy  <moy@adacore.com>
1147         * a-assert.ads, a-assert.adb: Mark package spec in SPARK. Set assertion
1148         policy for Pre to Ignore.
1149         (Assert): Add precondition.
1151 2015-01-30  Robert Dewar  <dewar@adacore.com>
1153         * sem_prag.adb (Process_Import_Or_Interface): Warn if used in
1154         Pure unit.
1155         * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Clarify
1156         documentation for some special cases of invalid attempts at
1157         based integers.
1159 2015-01-30  Gary Dismukes  <dismukes@adacore.com>
1161         * errout.ads: Minor reformatting.
1163 2015-01-30  Yannick Moy  <moy@adacore.com>
1165         * inline.adb (Process_Formals): Use the sloc of
1166         the inlined node instead of the sloc of the actual parameter,
1167         when replacing formal parameters by the actual one.
1169 2015-01-30  Arnaud Charlet  <charlet@adacore.com>
1171         * g-expect.adb (Get_Command_Output): Use infinite timeout when
1172         calling Expect.
1174 2015-01-30  Ed Schonberg  <schonberg@adacore.com>
1176         * sem_ch12.adb (Analyze_Associations): If an in-parameter is
1177         defaulted in an instantiation, add an entry in the list of actuals
1178         to indicate the default value of the formal (as is already done
1179         for defaulted subprograms).
1181 2015-01-30  Javier Miranda  <miranda@adacore.com>
1183         * errout.adb (Error_Msg_PT): Minor error phrasing update.
1185 2015-01-30  Robert Dewar  <dewar@adacore.com>
1187         * sem_warn.adb (Warn_On_Known_Condition): Improve error message
1188         for object case.
1190 2015-01-30  Pierre-Marie de Rodat  <derodat@adacore.com>
1192         * exp_dbug.adb (Get_Encoded_Name): When
1193         -fgnat-encodings=minimal, do not generate names for biased types.
1195 2015-01-30  Tristan Gingold  <gingold@adacore.com>
1197         PR ada/64349
1198         * env.c: Move vxworks and darwin includes out of #ifdef IN_RTS.
1200 2015-01-30  Gary Dismukes  <dismukes@adacore.com>
1202         * freeze.adb: Minor reformatting.
1204 2015-01-30  Javier Miranda  <miranda@adacore.com>
1206         * errout.ads (Error_Msg_PT): Replace Node_Id by Entity_Id and
1207         improve its documentation.
1208         * errout.adb (Error_Msg_PT): Improve the error message.
1209         * sem_ch6.adb (Check_Conformance): Update call to Error_Msg_PT.
1210         (Check_Synchronized_Overriding): Update call to Error_Msg_PT.
1211         * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup.
1213 2015-01-30  Robert Dewar  <dewar@adacore.com>
1215         * sem_warn.adb (Warn_On_Known_Condition): Do special casing of
1216         message for False case.
1218 2015-01-30  Doug Rupp  <rupp@adacore.com>
1220         * s-vxwext-kernel.ads (Task_Cont): Remove imported subprogram body.
1221         * s-vxwext-kernel.adb (Task_Cont): New subpprogram body specialized for
1222         kernel.
1224 2015-01-30  Gary Dismukes  <dismukes@adacore.com>
1226         * sem_attr.adb (Declared_Within_Generic_Unit):
1227         New function to test whether an entity is declared within the
1228         declarative region of a given generic unit.
1229         (Resolve_Attribute): For checking legality of subprogram'Access within
1230         a generic unit, call new Boolean function Declared_Within_Generic_Unit
1231         instead of simply comparing the results of Enclosing_Generic_Unit on
1232         the prefix and access type.  Correct minor comment typos.
1234 2015-01-30  Robert Dewar  <dewar@adacore.com>
1236         * freeze.adb, exp_util.ads: Update comment.
1237         * exp_util.adb, exp_ch3.adb: Minor code reorganization and reformatting.
1238         * sem_util.adb: Minor: fix typo.
1240 2015-01-30  Hristian Kirtchev  <kirtchev@adacore.com>
1242         * sem_attr.adb (Analyze_Attribute): Ensure that
1243         the check concerning Refined_Post takes precedence over the
1244         other cases.
1246 2015-01-30  Gary Dismukes  <dismukes@adacore.com>
1248         * sem_prag.adb: Minor typo fixes and reformatting.
1250 2015-01-30  Yannick Moy  <moy@adacore.com>
1252         * sem_attr.adb: Code clean up.
1254 2015-01-30  Robert Dewar  <dewar@adacore.com>
1256         * ali.adb (Scan_ALI): Set Serious_Errors flag in Unit record.
1257         * ali.ads (Unit_Record): Add new field Serious_Errors.
1258         * lib-writ.adb (Write_Unit_Information): Set SE (serious errors)
1259         attribute in U line.
1260         * lib-writ.ads: New attribute SE (serious erors) in unit line.
1262 2015-01-30  Hristian Kirtchev  <kirtchev@adacore.com>
1264         * einfo.adb Update the usage of attributes Entry_Bodies_Array,
1265         Lit_Indexes, Scale_Value, Storage_Size_Variable,
1266         String_Literal_Low_Bound along associated routines and
1267         Write_FieldX_Name.
1268         (Pending_Access_Types): New routine.
1269         (Set_Pending_Access_Types): New routine.
1270         (Write_Field15_Name): Add an entry for Pending_Access_Types.
1271         * einfo.ads Add new attribute Pending_Access_Types along
1272         with usage in nodes.  Update the usage of attributes
1273         Entry_Bodies_Array, Lit_Indexes, Scale_Value,
1274         Storage_Size_Variable, String_Literal_Low_Bound.
1275         (Pending_Access_Types): New routine along with pragma Inline.
1276         (Set_Pending_Access_Types): New routine along with pragma Inline.
1277         * exp_ch3.adb (Expand_Freeze_Array_Type): Add new local variable
1278         Ins_Node. Determine the insertion node for anonynous access type
1279         that acts as a component type of an array. Update the call to
1280         Build_Finalization_Master.
1281         (Expand_Freeze_Record_Type): Update
1282         the calls to Build_Finalization_Master.
1283         (Freeze_Type): Remove
1284         local variable RACW_Seen. Factor out the code that deals with
1285         remote access-to-class-wide types. Create a finalization master
1286         when the designated type contains a private component. Fully
1287         initialize all pending access types.
1288         (Process_RACW_Types): New routine.
1289         (Process_Pending_Access_Types): New routine.
1290         * exp_ch4.adb (Expand_Allocator_Expression): Allocation no longer
1291         needs to set primitive Finalize_Address.
1292         (Expand_N_Allocator): Allocation no longer sets primitive
1293         Finalize_Address.
1294         * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
1295         Update the call to Build_Finalization_Master.
1296         (Make_Build_In_Place_Call_In_Allocator): Allocation no longer
1297         needs to set primitive Finalize_Address.
1298         * exp_ch7.adb (Add_Pending_Access_Type): New routine.
1299         (Build_Finalization_Master): New parameter profile. Associate
1300         primitive Finalize_Address with the finalization master if the
1301         designated type has been frozen, otherwise treat the access
1302         type as pending. Simplify the insertion of the master and
1303         related initialization code.
1304         (Make_Finalize_Address_Body): Allow Finalize_Address for class-wide
1305         abstract types.
1306         (Make_Set_Finalize_Address_Call): Remove forlam parameter Typ.
1307         Simplify the implementation.
1308         * exp_ch7.ads (Build_Finalization_Master): New parameter profile
1309         along with comment on usage.
1310         (Make_Set_Finalize_Address_Call): Remove formal parameter Typ. Update
1311         the comment on usage.
1312         * exp_util.adb (Build_Allocate_Deallocate_Proc): Use routine
1313         Finalize_Address to retrieve the primitive.
1314         (Finalize_Address): New routine.
1315         (Find_Finalize_Address): Removed.
1316         * exp_util.ads (Finalize_Address): New routine.
1317         * freeze.adb (Freeze_All): Remove the generation of finalization
1318         masters.
1319         * sem_ch3.adb (Analyze_Full_Type_Declaration): Propagate any
1320         pending access types from the partial to the full view.
1322 2015-01-30  Robert Dewar  <dewar@adacore.com>
1324         * sem_disp.adb: Minor reformatting.
1325         * sem_disp.ads: Documentation update.
1327 2015-01-30  Ed Schonberg  <schonberg@adacore.com>
1329         * sem_disp.adb (Is_Dynamically_Tagged): when applied to an entity
1330         or a function call, return True if type is class-wide.
1331         * sem_res.adb (Resolve_Case_Expression, Resolve_If_Expression);
1332         Apply RM 4.5.7 (17/3): all or none of the dependent expression
1333         of a conditional expression must be dynamically tagged.
1335 2015-01-30  Ed Schonberg  <schonberg@adacore.com>
1337         * sem_ch6.adb (Analyze_Function_Return): In an extended return
1338         statement, apply accessibility check to result object when there
1339         is no initializing expression (Ada 2012 RM 6.5 (5.4/3))
1341 2015-01-30  Robert Dewar  <dewar@adacore.com>
1343         * sem_ch4.adb (Analyze_If_Expression): Allow for non-standard
1344         Boolean for case where ELSE is omitted.
1345         * sem_res.adb: Minor reformatting.
1347 2015-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1349         Fix build under cygwin/64.
1350         * adaint.h: Add check for __CYGWIN__.
1351         * mingw32.h: Prevent windows.h from including x86intrin.h in GCC.
1353 2015-01-19  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1355         PR ada/64640
1356         * adaint.c: Handle __CYGWIN__ like __MINGW32__ here.
1357         * mingw32.h: Don't include <tchar.h> under cygwin.
1358         (_O_U8TEXT, _O_U16TEXT, _O_WTEXT): Set to _O_TEXT if not yet defined.
1360 2015-01-15  Thomas Schwinge  <thomas@codesourcery.com>
1362         * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8)
1363         (DEF_FUNCTION_TYPE_VAR_12): New macros.
1365 2015-01-09  Michael Collison  <michael.collison@linaro.org>
1367         * gcc-interface/cuintp.c: Include hash-set.h, machmode.h,
1368         vec.h, double-int.h, input.h, alias.h, symtab.h,
1369         fold-const.h, wide-int.h, and inchash.h due to
1370         flattening of tree.h.
1371         * gcc-interface/decl.c: Ditto.
1372         * gcc-interface/misc.c: Ditto.
1373         * gcc-interface/targtyps.c: Include hash-set.h, machmode.h,
1374         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h,
1375         fold-const.h, wide-int.h, and inchash.h due to
1376         flattening of tree.h.
1377         * gcc-interface/trans.c: Include hash-set.h, machmode.h,
1378         vec.h, double-int.h, input.h, alias.h, symtab.h, real.h,
1379         fold-const.h, wide-int.h, inchash.h due to
1380         flattening of tree.h.
1381         * gcc-interface/utils.c: Include hash-set.h, machmode.h,
1382         vec.h, double-int.h, input.h, alias.h, symtab.h,
1383         fold-const.h, wide-int.h, and inchash.h due to
1384         flattening of tree.h.
1385         * gcc-interface/utils2.c: Ditto.
1387 2015-01-07  Robert Dewar  <dewar@adacore.com>
1389         * sem_warn.adb (Check_One_Unit): Don't give unused entities
1390         warning for a package which is used as a generic parameter.
1392 2015-01-07  Bob Duff  <duff@adacore.com>
1394         * usage.adb (Usage): Correct documentation of
1395         -gnatw.f switches.
1397 2015-01-07  Robert Dewar  <dewar@adacore.com>
1399         * s-fileio.adb: Minor reformatting.
1401 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
1403         * sem_ch12.adb (Instantiate_Object): If formal is an anonymous
1404         access to subprogram, replace its formals with new entities when
1405         building the object declaration, both if actual is present and
1406         when it is defaulted.
1408 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
1410         * sem_ch5.adb (Analyze_Assignment): If left-hand side is a view
1411         conversion and type of expression has invariant, apply invariant
1412         check on expression.
1414 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
1416         * sem_ch3.adb (Create_Constrained_Components): A call to
1417         Gather_Components may detect an error if an inherited discriminant
1418         that controls a variant is non-static.
1419         * sem_aggr.adb (Resolve_Record_Aggregate, Step 5): The call to
1420         Gather_Components may report an error if an inherited discriminant
1421         in a variant in non-static.
1422         * sem_util.adb (Gather_Components): If a non-static discriminant
1423         is inherited do not report error here, but let caller handle it.
1424         (Find_Actual): Small optimization.
1426 2015-01-07  Bob Duff  <duff@adacore.com>
1428         * usage.adb (Usage): Document -gnatw.f switch.
1430 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
1432         * sem_ch12.adb: Code clean up and minor reformatting.
1434 2015-01-07  Robert Dewar  <dewar@adacore.com>
1436         * exp_ch4.adb (Expand_N_Type_Conversion): Add guard for
1437         Raise_Accessibility_Error call.
1438         * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Add documentation
1439         on handling of invalid digits in based constants.
1440         * s-fatgen.ads: Minor reformatting.
1441         * sem_attr.adb (Analyze_Attribute, case Unrestricted_Access):
1442         Avoid noting bogus modification for Valid test.
1443         * snames.ads-tmpl (Name_Attr_Long_Float): New Name.
1444         * einfo.ads: Minor reformatting.
1445         * sem_warn.adb: Minor comment clarification.
1446         * sem_ch12.adb: Minor reformatting.
1448 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
1450         * exp_ch5.adb (Expand_Predicated_Loop): Handle properly loops
1451         over static predicates when the loop parameter specification
1452         carries a Reverse indicator.
1454 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
1456         * sem_ch12.adb (Instantiate_Object): If formal has a default,
1457         actual is missing and formal has an anonymous access type, copy
1458         access definition in full so that tree for instance is properly
1459         formatted for ASIS use.
1461 2015-01-07  Bob Duff  <duff@adacore.com>
1463         * sem_elab.adb (Check_Internal_Call_Continue): Give a warning
1464         for P'Access, where P is a subprogram in the same package as
1465         the P'Access, and the P'Access is evaluated at elaboration
1466         time, and occurs before the body of P. For example, "X : T :=
1467         P'Access;" would allow a subsequent call to X.all to be an
1468         access-before-elaboration error; hence the warning. This warning
1469         is enabled by the -gnatw.f switch.
1470         * opt.ads (Warn_On_Elab_Access): New flag for warning switch.
1471         * warnsw.adb (Set_Dot_Warning_Switch): Set Warn_On_Elab_Access.
1472         * gnat_ugn.texi: Document the new warning.
1474 2015-01-07  Johannes Kanig  <kanig@adacore.com>
1476         * lib-xref-spark_specific.adb (Collect_SPARK_Xrefs): Skip unneeded
1477         cross ref files.
1479 2015-01-07  Robert Dewar  <dewar@adacore.com>
1481         * s-taprop-linux.adb, clean.adb: Minor reformatting.
1483 2015-01-07  Arnaud Charlet  <charlet@adacore.com>
1485         * s-tassta.adb: Relax some overzealous assertions.
1487 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
1489         * sem_ch6.adb (Analyze_Return_Type): An call that returns a limited
1490         view of a type is legal when context is a thunk generated for
1491         operation inherited from an interface.
1492         * exp_ch6.adb (Expand_Simple_Function_Return): If context is
1493         a thunk and return type is an incomplete type do not continue
1494         expansion; thunk will be fully elaborated when generating code.
1496 2015-01-07  Doug Rupp  <rupp@adacore.com>
1498         * s-osinte-mingw.ads (LARGE_INTEGR): New subtype.
1499         (QueryPerformanceFrequency): New imported procedure.
1500         * s-taprop-mingw.adb (RT_Resolution): Call above and return
1501         resolution vice a hardcoded value.
1502         * s-taprop-solaris.adb (RT_Resolution): Call clock_getres and return
1503         resolution vice a hardcoded value.
1504         * s-linux-android.ads (clockid_t): New subtype.
1505         * s-osinte-aix.ads (clock_getres): New imported subprogram.
1506         * s-osinte-android.ads (clock_getres): Likewise.
1507         * s-osinte-freebsd.ads (clock_getres): Likewise.
1508         * s-osinte-solaris-posix.ads (clock_getres): Likewise.
1509         * s-osinte-darwin.ads (clock_getres): New subprogram.
1510         * s-osinte-darwin.adb (clock_getres): New subprogram.
1511         * thread.c (__gnat_clock_get_res) [__APPLE__]: New function.
1512         * s-taprop-posix.adb (RT_Resolution): Call clock_getres to
1513         calculate resolution vice hard coded value.
1515 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
1517         * exp_util.adb (Make_CW_Equivalent_Type): If root type is a
1518         limited view, use non-limited view when available to create
1519         equivalent record type.
1521 2015-01-07  Vincent Celier  <celier@adacore.com>
1523         * gnatcmd.adb: Remove command Sync and any data and processing
1524         related to this command. Remove project processing for gnatstack.
1525         * prj-attr.adb: Remove package Synchonize and its attributes.
1527 2015-01-07  Vincent Celier  <celier@adacore.com>
1529         * clean.adb: Minor error message change.
1531 2015-01-07  Tristan Gingold  <gingold@adacore.com>
1533         PR ada/64349  
1534         * env.c (__gnat_environ): Adjust for darwin9/darwin10.
1536 2015-01-07  Javier Miranda  <miranda@adacore.com>
1538         * sem_ch10.adb (Analyze_With_Clause): Compiling under -gnatq
1539         protect the frontend against never ending recursion caused by
1540         circularities in the sources.
1542 2015-01-07  Robert Dewar  <dewar@adacore.com>
1544         * a-reatim.adb, make.adb, exp_pakd.adb, i-cpoint.adb, sem_ch8.adb,
1545         exp_ch3.adb: Minor reformatting.
1547 2015-01-07  Doug Rupp  <rupp@adacore.com>
1549         * s-linux.ads (clockid_t): New subtype.
1550         * s-osinte-linux.ads (pragma Linker Options): Add -lrt.
1551         (clockid_t): New subtype.
1552         (clock_getres): Import system call.
1553         * s-taprop-linux.adb (System.OS_Constants): With and rename.
1554         (RT_Resolution): Remove
1555         hardcoded value and call clock_getres.
1556         * s-linux-sparc.ads, s-linux-mipsel.ads, s-linux-hppa.ads,
1557         s-linux-alpha.ads, s-linux-x32.ads (clockid_t): Add new subtype.
1559 2015-01-07  Robert Dewar  <dewar@adacore.com>
1561         * sem_warn.adb (Check_One_Unit): Guard against context item
1562         with no Entity field.
1564 2015-01-07  Vincent Celier  <celier@adacore.com>
1566         * clean.adb (Gnatclean): Warn that 'gnatclean -P' is obsolete.
1567         * make.adb (Initialize): Warn that 'gnatmake -P' is obsolete.
1569 2015-01-07  Vincent Celier  <celier@adacore.com>
1571         * prj-conf.adb (Parse_Project_And_Apply_Config): Always finalize
1572         errors/warnings in the first parsing of the project files,
1573         to display the warnings when there is no errors.
1575 2015-01-07  Tristan Gingold  <gingold@adacore.com>
1577         * i-cpoint.adb (Copy_Terminated_Array): Nicely handle null target.
1579 2015-01-07  Doug Rupp  <rupp@adacore.com>
1581         * s-taprop-vxworks.adb (Stop_All_Tasks): Pass return
1582         value from Int_Lock as parameter to Int_Unlock.
1583         * s-osinte-vxworks.ads (Int_Unlock): Add parameter.
1584         * s-vxwext.ads (Int_Unlock): Likewise.
1585         * s-vxwext-kernel.adb (intUnlock, Int_Unlock): Likewise.
1586         * s-vxwext-kernel.ads (Int_Unlock): Likewise.
1587         * s-vxwext-rtp.adb (Int_Unlock): Likewise.
1588         * s-vxwext-rtp.ads (Int_Unlock): Likewise.
1590 2015-01-07  Pierre-Marie de Rodat  <derodat@adacore.com>
1592         * exp_pakd.adb: Add a comment in exp_pakd.adb to explain why we
1593         keep ___XP suffixes
1595 2015-01-07  Tristan Gingold  <gingold@adacore.com>
1597         * i-cpoint.adb (Copy_Terminated_Array): Use Copy_Array to
1598         handle overlap.
1600 2015-01-07  Eric Botcazou  <ebotcazou@adacore.com>
1602         * sem_ch3.adb (Analyze_Full_Type_Declaration): Do not
1603         automatically set No_Strict_Aliasing on access types.
1604         * fe.h (No_Strict_Aliasing_CP): Declare.
1605         * gcc-interface/trans.c (gigi): Force flag_strict_aliasing to 0 if
1606         No_Strict_Aliasing_CP is set.
1608 2015-01-07  Johannes Kanig  <kanig@adacore.com>
1610         * sem_ch8.adb (Analyze_Subprogram_Renaming) do
1611         not build function wrapper in gnatprove mode when the package
1612         is externally axiomatized.
1614 2015-01-07  Jose Ruiz  <ruiz@adacore.com>
1616         * a-reatim.adb (Time_Of): Reduce the number of spurious overflows in
1617         intermediate computations when the parameters have different signs.
1619 2015-01-07  Javier Miranda  <miranda@adacore.com>
1621         * exp_ch3.adb (Build_Init_Procedure): For derived types,
1622         improve the code which takes care of identifying and moving to
1623         the beginning of the init-proc the call to the init-proc of the
1624         parent type.
1626 2015-01-07  Olivier Hainque  <hainque@adacore.com>
1628         * gcc-interface/trans.c (gnat_to_gnu, <N_Expression_With_Action>):
1629         Elaborate the expression as part of the same stmt group as the actions.
1631 2015-01-07  Robert Dewar  <dewar@adacore.com>
1633         * sem_ch3.adb: Minor error message change.
1635 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
1637         * sem_prag.adb (Analyze_Pragma, case Preelaborable_Initialization):
1638         Following AI05-028, the pragam applies legally to any composite type.
1640 2015-01-07  Arnaud Charlet  <charlet@adacore.com>
1642         * s-osinte-vxworks.adb, s-osinte-vxworks.ads
1643         (sigwait, sigwaitinfo): Removed, not needed after all on any
1644         VxWorks configurations.
1646 2015-01-07  Robert Dewar  <dewar@adacore.com>
1648         * sem_ch3.adb, freeze.adb, exp_disp.adb: Minor reformatting.
1650 2015-01-07  Javier Miranda  <miranda@adacore.com>
1652         * exp_disp.adb (Expand_Interface_Conversion): Adding missing
1653         generation of accessibility check.
1655 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
1657         * sem_ch3.adb (Derived_Type_Declaration): In the case of an
1658         illegal completion from a class- wide type, set etype of the
1659         derived type properly to prevent cascaded errors.
1661 2015-01-07  Robert Dewar  <dewar@adacore.com>
1663         * prj.ads, i-cpoint.adb, freeze.adb, ghost.adb, prj-err.adb: Minor
1664         reformatting.
1666 2015-01-07  Robert Dewar  <dewar@adacore.com>
1668         * restrict.adb (Check_Restriction_No_Use_Of_Attribute):
1669         New procedure.
1670         (OK_No_Use_Of_Entity_Name): New function.
1671         (Set_Restriction_No_Use_Of_Entity): New procedure.
1672         * restrict.ads (Check_Restriction_No_Use_Of_Attribute):
1673         New procedure.
1674         (OK_No_Use_Of_Entity_Name): New function.
1675         (Set_Restriction_No_Use_Of_Entity): New procedure.
1676         * sem_ch8.adb (Find_Direct_Name): Add check for violation of
1677         No_Use_Of_Entity.
1678         * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
1679         Add processing for new restriction No_Use_Of_Entity.
1681 2015-01-07  Eric Botcazou  <ebotcazou@adacore.com>
1683         * freeze.adb (Freeze_Array_Type): Apply same handling to Is_Atomic
1684         component type as to Has_Atomic_Components type.  Remove useless
1685         test on Is_Aliased component type.
1687 2015-01-07  Hristian Kirtchev  <kirtchev@adacore.com>
1689         * alloc.ads Alphabetize several declarations. Add constants
1690         Ignored_Ghost_Units_Initial and Ignored_Ghost_Units_Increment.
1691         * atree.adb Add with and use clauses for Opt.
1692         (Allocate_Initialize_Node): Mark a node as ignored Ghost
1693         if it is created in an ignored Ghost region.
1694         (Ekind_In): New variant.
1695         (Is_Ignored_Ghost_Node): New routine.
1696         (Set_Is_Ignored_Ghost_Node): New routine.
1697         * atree.adb Aplhabetize several subprograms declarations. Flag
1698         Spare0 is now known as Is_Ignored_Ghost_Node.
1699         (Ekind_In): New variant.
1700         (Is_Ignored_Ghost_Node): New routine.
1701         (Set_Is_Ignored_Ghost_Node): New routine.
1702         * einfo.adb: Flag 279 is now known as Contains_Ignored_Ghost_Code.
1703         (Contains_Ignored_Ghost_Code): New routine.
1704         (Set_Contains_Ignored_Ghost_Code): New routine.
1705         (Set_Is_Checked_Ghost_Entity, Set_Is_Ignored_Ghost_Entity):
1706         It is now possible to set this property on an unanalyzed entity.
1707         (Write_Entity_Flags): Output the status of flag
1708         Contains_Ignored_Ghost_Code.
1709         * einfo.ads New attribute Contains_Ignored_Ghost_Code along with
1710         usage in nodes.
1711         (Contains_Ignored_Ghost_Code): New routine
1712         along with pragma Inline.
1713         (Set_Contains_Ignored_Ghost_Code): New routine along with pragma Inline.
1714         * exp_ch3.adb Add with and use clauses for Ghost.
1715         (Freeze_Type): Capture/restore the value of Ghost_Mode on entry/exit.
1716         Set the Ghost_Mode in effect.
1717         (Restore_Globals): New routine.
1718         * exp_ch7.adb (Process_Declarations): Do not process a context
1719         that invoves an ignored Ghost entity.
1720         * exp_dbug.adb (Qualify_All_Entity_Names): Skip an ignored Ghost
1721         construct that has been rewritten as a null statement.
1722         * exp_disp.adb Add with and use clauses for Ghost.
1723         (Make_DT): Capture/restore the value of Ghost_Mode on entry/exit. Set
1724         the Ghost_Mode in effect.
1725         (Restore_Globals): New routine.
1726         * exp_util.adb (Requires_Cleanup_Actions): An ignored Ghost entity
1727         does not require any clean up. Add two missing cases that deal
1728         with block statements.
1729         * freeze.adb Add with and use clauses for Ghost.
1730         (Freeze_Entity): Capture/restore the value of Ghost_Mode on entry/exit.
1731         Set the Ghost_Mode in effect.
1732         (Restore_Globals): New routine.
1733         * frontend.adb Add with and use clauses for Ghost. Remove any
1734         ignored Ghost code from all units that qualify.
1735         * ghost.adb New unit.
1736         * ghost.ads New unit.
1737         * gnat1drv.adb Add with clause for Ghost. Initialize and lock
1738         the table in package Ghost.
1739         * lib.ads: Alphabetize several subprogram declarations.
1740         * lib-xref.adb (Output_References): Do not generate reference
1741         information for ignored Ghost entities.
1742         * opt.ads Add new type Ghost_Mode_Type and new global variable
1743         Ghost_Mode.
1744         * rtsfind.adb (Load_RTU): Provide a clean environment when
1745         loading a runtime unit.
1746         * sem.adb (Analyze): Capture/restore the value of Ghost_Mode on
1747         entry/exit as the node may set a different mode.
1748         (Do_Analyze):
1749         Capture/restore the value of Ghost_Mode on entry/exit as the
1750         unit may be withed from a unit with a different Ghost mode.
1751         * sem_ch3.adb Add with and use clauses for Ghost.
1752         (Analyze_Full_Type_Declaration, Analyze_Incomplete_Type_Decl,
1753         Analyze_Number_Declaration, Analyze_Private_Extension_Declaration,
1754         Analyze_Subtype_Declaration): Set the Ghost_Mode in effect. Mark
1755         the entity as Ghost when there is a Ghost_Mode in effect.
1756         (Array_Type_Declaration): The implicit base type inherits the
1757         "ghostness" from the array type.
1758         (Derive_Subprogram): The
1759         alias inherits the "ghostness" from the parent subprogram.
1760         (Make_Implicit_Base): The implicit base type inherits the
1761         "ghostness" from the parent type.
1762         * sem_ch5.adb Add with and use clauses for Ghost.
1763         (Analyze_Assignment): Set the Ghost_Mode in effect.
1764         * sem_ch6.adb Add with and use clauses for Ghost.
1765         (Analyze_Abstract_Subprogram_Declaration, Analyze_Procedure_Call,
1766         Analyze_Subprogram_Body_Helper, Analyze_Subprogram_Declaration):
1767         Set the Ghost_Mode in effect. Mark the entity as Ghost when
1768         there is a Ghost_Mode in effect.
1769         * sem_ch7.adb Add with and use clauses for Ghost.
1770         (Analyze_Package_Body_Helper, Analyze_Package_Declaration,
1771         Analyze_Private_Type_Declaration): Set the Ghost_Mode in
1772         effect. Mark the entity as Ghost when there is a Ghost_Mode
1773         in effect.
1774         * sem_ch8.adb Add with and use clauses for Ghost.
1775         (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
1776         Analyze_Object_Renaming, Analyze_Package_Renaming,
1777         Analyze_Subprogram_Renaming): Set the Ghost_Mode in effect. Mark
1778         the entity as Ghost when there is a Ghost_Mode in effect.
1779         (Find_Type): Check the Ghost context of a type.
1780         * sem_ch11.adb Add with and use clauses for Ghost.
1781         (Analyze_Exception_Declaration): Set the Ghost_Mode in
1782         effect. Mark the entity as Ghost when there is a Ghost_Mode
1783         in effect.
1784         * sem_ch12.adb Add with and use clauses for Ghost.
1785         (Analyze_Generic_Package_Declaration,
1786         Analyze_Generic_Subprogram_Declaration): Set the Ghost_Mode in effect.
1787         Mark the entity as Ghost when there is a Ghost_Mode in effect.
1788         * sem_prag.adb Add with and use clauses for Ghost.
1789         (Analyze_Pragma): Ghost-related checks are triggered when there
1790         is a Ghost mode in effect.
1791         (Create_Abstract_State): Mark the
1792         entity as Ghost when there is a Ghost_Mode in effect.
1793         * sem_res.adb Add with and use clauses for Ghost.
1794         (Check_Ghost_Context): Removed.
1795         * sem_util.adb (Check_Ghost_Completion): Removed.
1796         (Check_Ghost_Derivation): Removed.
1797         (Incomplete_Or_Partial_View):
1798         Add a guard in case the entity has not been analyzed yet
1799         and does carry a scope.
1800         (Is_Declaration): New routine.
1801         (Is_Ghost_Entity): Removed.
1802         (Is_Ghost_Statement_Or_Pragma):
1803         Removed.
1804         (Is_Subject_To_Ghost): Removed.
1805         (Set_Is_Ghost_Entity):
1806         Removed.
1807         (Within_Ghost_Scope): Removed.
1808         * sem_util.adb (Check_Ghost_Completion): Removed.
1809         (Check_Ghost_Derivation): Removed.
1810         (Is_Declaration): New routine.
1811         (Is_Ghost_Entity): Removed.
1812         (Is_Ghost_Statement_Or_Pragma): Removed.
1813         (Is_Subject_To_Ghost): Removed.
1814         (Set_Is_Ghost_Entity): Removed.
1815         (Within_Ghost_Scope): Removed.
1816         * sinfo.ads Add a section on Ghost mode.
1817         * treepr.adb (Print_Header_Flag): New routine.
1818         (Print_Node_Header): Factor out code. Output flag
1819         Is_Ignored_Ghost_Node.
1820         * gcc-interface/Make-lang.in: Add dependency for unit Ghost.
1822 2015-01-06  Eric Botcazou  <ebotcazou@adacore.com>
1824         * freeze.adb (Freeze_Array_Type) <Complain_CS>: Remove always
1825         true test and unreachable 'else' arm.
1827 2015-01-06  Vincent Celier  <celier@adacore.com>
1829         * prj-conf.adb (Check_Target): Improve error message when
1830         there are mismatched targets between the on in the configuration
1831         project file and the specified one, either in the main project
1832         file or in the --target= switch.
1834 2015-01-06  Pascal Obry  <obry@adacore.com>
1836         * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Mode and
1837         Install_Name attribute definitions.
1839 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
1841         * freeze.adb (Wrap_Imported_Subprogram): Indicate that the
1842         generated Import pragma for the internal imported procedure does
1843         not come from an aspect, so that Is_Imported can be properly
1844         set for it.
1846 2015-01-06  Gary Dismukes  <dismukes@adacore.com>
1848         * sem_ch12.adb (Might_Inline_Subp): Record whether
1849         any subprograms in the generic package are marked with
1850         pragma Inline_Always (setting flag Has_Inline_Always).
1851         (Analyze_Package_Instantiation): Add test of Has_Inline_Always
1852         alongside existing test of Front_End_Inlining as alternative
1853         conditions for setting Inline_Now. Also add test of
1854         Has_Inline_Always along with Front_End_Inlining test as an
1855         alternative condition for setting Needs_Body to False.
1857 2015-01-06  Tristan Gingold  <gingold@adacore.com>
1859         * i-cpoint.adb (Copy_Array): Handle overlap.
1861 2015-01-06  Pascal Obry  <obry@adacore.com>
1863         * bindgen.adb: Minor style fix.
1865 2015-01-06  Robert Dewar  <dewar@adacore.com>
1867         * sem_util.ads, sem_util.adb: Minor reformatting.
1869 2015-01-06  Vincent Celier  <celier@adacore.com>
1871         * prj-conf.adb (Parse_Project_And_Apply_Config): Reset incomplete
1872         with flags before parsing the projects.
1873         * prj-err.adb (Error_Msg): Do nothing if there are incomplete withs.
1874         * prj-part.adb (Post_Parse_Context_Clause): Set Incomplete_Withs
1875         to True in the flags, when Ignore_Missing_With is True and an
1876         imported project cannot be found.
1877         * prj-proc.adb (Expression): When there are incomplete withs and
1878         a variable or attribute is not found, set the variable/attribute
1879         to unknown.
1880         * prj.ads (Processing_Flags): New flag Incomplete_Withs,
1881         defaulted to False.
1883 2015-01-06  Vasiliy Fofanov  <fofanov@adacore.com>
1885         * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-conf.adb,
1886         prj-err.adb: Add new switch --no-command-line.
1888 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
1890         * sem_ch12.adb: Sloc of wrapper is that of instantiation.
1892 2015-01-06  Robert Dewar  <dewar@adacore.com>
1894         * sem_ch11.adb: Minor reformatting.
1896 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
1898         * exp_aggr.adb (Get_Assoc_Expr): New routine internal to
1899         Build_Array_Aggr_Code, used to initialized components covered
1900         by a box association. If the component type is scalar and has
1901         a default aspect, use it to initialize such components.
1903 2015-01-06  Pascal Obry  <obry@adacore.com>
1905         * rtinit.c (__gnat_runtime_initialize): Add a parameter to
1906         control the setup of the exception handler.
1907         * initialize.c: Remove unused declaration.
1908         * bindgen.adb: Always call __gnat_runtime_initialize and pass
1909         whether the exeception handler must be set or not.
1911 2015-01-06  Thomas Quinot  <quinot@adacore.com>
1913         * freeze.adb (Set_SSO_From_Defaults): When setting scalar storage
1914         order to native from default, make sure to also adjust bit order.
1915         * exp_aggr.adb: Minor reformatting.
1917 2015-01-06  Robert Dewar  <dewar@adacore.com>
1919         * s-valllu.adb, s-valllu.ads, s-valuti.ads, s-valuns.adb, s-valuns.ads,
1920         s-valrea.adb, s-valrea.ads: Add some additional guards for
1921         Str'Last = Positive'Last.
1923 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
1925         * sem_ch12.adb, sem_ch8.adb: Ongoing work for wrappers for actual
1926         subprograms.
1928 2015-01-06  Javier Miranda  <miranda@adacore.com>
1930         * exp_disp.adb (Expand_Interface_Conversion): Reapply patch.
1932 2015-01-06  Thomas Quinot  <quinot@adacore.com>
1934         * sem_util.ads: Minor reformatting.
1935         * sem_cat.adb (In_RCI_Visible_Declarations): Change back to...
1936         (In_RCI_Declaration) Return to old name, as proper checking of
1937         entity being in the visible part depends on entity kind and must
1938         be done by the caller.
1940 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
1942         * sem_ch12.adb, sem_ch12.ads, sem_ch8.adb: Ongoing work for wrappers
1943         for operators in SPARK.
1945 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
1947         * sem_aggr.adb (Get_Value): In ASIS mode, preanalyze the
1948         expression in an others association before making copies for
1949         separate resolution and accessibility checks. This ensures that
1950         the type of the expression is available to ASIS in all cases,
1951         in particular if the expression is itself an aggregate.
1953 2015-01-06  Eric Botcazou  <ebotcazou@adacore.com>
1955         * einfo.ads (Has_Independent_Components): Document extended
1956         usage.
1957         * einfo.adb (Has_Independent_Components): Remove obsolete assertion.
1958         (Set_Has_Independent_Components): Adjust assertion.
1959         * sem_prag.adb (Analyze_Pragma): Also set Has_Independent_Components
1960         for pragma Atomic_Components.  Set Has_Independent_Components
1961         on the object instead of the type for an object declaration with
1962         pragma Independent_Components.
1964 2015-01-06  Olivier Hainque  <hainque@adacore.com>
1966         * set_targ.adb (Read_Target_Dependent_Values): Set
1967         Long_Double_Index when "long double" is read.
1968         (elaboration code): Register_Back_End_Types only when not reading from
1969         config files. Doing otherwise is pointless and error prone.
1971 2015-01-06  Robert Dewar  <dewar@adacore.com>
1973         * s-valrea.adb (Value_Real): Check for Str'Last = Positive'Last
1975 2015-01-06  Robert Dewar  <dewar@adacore.com>
1977         * a-wtgeau.adb, a-ztgeau.adb, a-tigeau.adb (String_Skip): Raise PE if
1978         Str'Last = Positive'Last.
1980 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
1982         * sem_ch6.adb (Matches_Limited_View): Handle properly the case
1983         where the non-limited type is a generic actual and appears as
1984         a subtype of the non-limited view of the other.
1985         * freeze.adb (Build_Renamed_Body): If the return type of the
1986         declaration that is being completed is a limited view and the
1987         non-limited view is available, use it in the specification of
1988         the generated body.
1990 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
1992         * sem_ch3.adb (Find_Type_Name): If there is a previous tagged
1993         incomplete view, the type of the classwide type common to both
1994         views is the type being declared.
1996 2015-01-06  Eric Botcazou  <ebotcazou@adacore.com>
1998         * einfo.ads (Is_Independent): Further document extended usage.
2000 2015-01-06  Eric Botcazou  <ebotcazou@adacore.com>
2002         * einfo.ads (Is_Independent): Document extended usage.
2003         * einfo.adb (Is_Independent): Remove obsolete assertion.
2004         (Set_Is_Independent): Likewise.
2005         * sem_prag.adb (Process_Atomic_Shared_Volatile): Rename into...
2006         (Process_Atomic_Independent_Shared_Volatile): ...this.
2007         Deal with pragma Independent here.
2008         (Analyze_Pragma): Adjust
2009         to above renaming and also invoke it for pragma Independent.
2010         Adjust comment for Independent_Components.
2012 2015-01-06  Robert Dewar  <dewar@adacore.com>
2014         * snames.ads-tmpl: Remove entries for attribute Enum_Image.
2015         * exp_attr.adb: Remove reference to Attribute_Enum_Image.
2017 2015-01-06  Robert Dewar  <dewar@adacore.com>
2019         * s-vallli.adb (Value_Long_Long_Integer): Handle case of Str'Last
2020         = Positive'Last.
2021         * s-valllu.adb (Value_Long_Long_Unsigned): Handle case of
2022         Str'Last = Positive'Last.
2024 2015-01-06  Robert Dewar  <dewar@adacore.com>
2026         * sem_prag.adb (Process_Inline): Remove redundant construct
2027         warning (-gnatw.r) for an ineffective pragma Inline.
2029 2015-01-06  Robert Dewar  <dewar@adacore.com>
2031         * s-valint.adb: Fix typo in last checkin.
2032         * s-valuns.adb (Value_Unsigned): More efficient fix for
2033         Positive'Last case.
2034         * sem_attr.adb (Analyze_Attribute): Minor reformatting
2035         (Eval_Attribute): Static ervaluation of 'Img for enumeration types.
2037 2015-01-06  Robert Dewar  <dewar@adacore.com>
2039         * s-valint.adb, s-valuns.adb (Value_Integer): Deal with case where
2040         Str'Last = Positive'Last
2042 2015-01-06  Thomas Quinot  <quinot@adacore.com>
2044         * xoscons.adb: Display exception information and return non-zero
2045         exit status in top level exception handler.
2047 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
2049         * sem_ch8.adb: Code clean up.
2051 2015-01-06  Tristan Gingold  <gingold@adacore.com>
2053         * targparm.ads: Remove obsolete comment.
2055 2015-01-06  Olivier Hainque  <hainque@adacore.com>
2057         * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Variable): When
2058         constructing a ref to variable, update inner_const_flag from the
2059         variable TREE_READONLY attribute.
2060         * gcc-interface/targtyps.c (WIDEST_HARDWARE_FP_SIZE): Remove default
2061         definition.
2062         (get_target_float_size): Remove.
2063         (get_target_double_size): Remove.
2064         (get_target_long_double_size): Remove.
2066 2015-01-06  Pascal Obry  <obry@adacore.com>
2068         * adaint.c (ProcListEvt): Set to NULL.
2069         * rtinit.c: New file.
2070         (__gnat_rt_init_count): New reference counter set to 0.
2071         (__gnat_runtime_initialize): Move code here from __gnat_initialize when
2072         this code is actually needed for the runtime initialization. This
2073         routine returns immediately if the initialization has already been done.
2074         * final.c: Revert previous change.
2075         * rtfinal.c: New file.
2076         (__gnat_runtime_finalize)[Win32]: Add finalization of the critical
2077         section and event. The default version of this routine is empty (except
2078         for the reference counting code). This routine returns immediately if
2079         some others libraries are referencing the runtime.
2080         * bindgen.adb (Gen_Adainit): Generate call to Runtime_Initialize
2081         remove circuitry to initialize the signal handler as this is
2082         now done by the runtime initialization routine.
2083         (Gen_Adafinal): Generate call to Runtime_Finalize.
2084         * gnat_ugn.texi: Update documentation about concurrency and
2085         initialization/finalization of the run-time.
2086         * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Add
2087         references to rtfinal.o and rtinit.o
2089 2015-01-06  Robert Dewar  <dewar@adacore.com>
2091         * exp_attr.adb (Expand_N_Attribute_Reference): Add dummy entry
2092         for Enum_Image.
2093         * sem_attr.adb: Implement Enum_Image attribute.
2094         * snames.ads-tmpl: Add entries for Enum_Image attribute.
2096 2015-01-06  Robert Dewar  <dewar@adacore.com>
2098         * namet.ads: Document use of Boolean2 for No_Use_Of_Entity.
2099         * restrict.ads (No_Use_Of_Entity): New table.
2100         * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
2101         Ignore No_Use_Of_Entity (will be processed in parser).
2102         * snames.ads-tmpl: Add entry for Name_No_Use_Of_Entity.
2104 2015-01-06  Vincent Celier  <celier@adacore.com>
2106         * prj-tree.adb (Imported_Or_Extended_Project_Of): Do not try
2107         to check for an extended project, if a project does not have
2108         yet a project declaration.
2110 2015-01-06  Pierre-Marie Derodat  <derodat@adacore.com>
2112         * scos.ads: Update documentation about the SCO table build
2113         process and about table records format.
2114         * par_sco.ads (SCO_Record): Rename to SCO_Record_Raw.
2115         (SCO_Record_Filtered): New procedure.
2116         (Set_SCO_Logical_Operator): New procedure.
2117         (dsco): Update documentation.
2118         * par_sco.adb: Update library-level comments.
2119         (SCO_Generation_State_Type): New type.
2120         (SCO_Generation_State): New variable.
2121         (SCO_Raw_Table): New package instanciation.
2122         (Condition_Pragma_Hash_Table): Rename to SCO_Raw_Hash_Table.
2123         ("<"): New.
2124         (Tristate): New type.
2125         (Is_Logical_Operator): Return Tristate and update documentation.
2126         (Has_Decision): Update call to Is_Logical_Operator and complete
2127         documentation.
2128         (Set_Table_Entry): Rename to Set_Raw_Table_Entry, update
2129         comment, add an assertion for state checking and change
2130         references to SCO_Table into SCO_Raw_Table.
2131         (dsco): Refactor to dump the raw and the filtered tables.
2132         (Process_Decisions.Output_Decision_Operand): Handle putative
2133         short-circuit operators.
2134         (Process_Decisions.Output_Element): Update references
2135         to Set_Table_Entry and to Condition_Pragma_Hash_Table.
2136         (Process_Decisions.Process_Decision_Operand): Update call
2137         to Is_Logical_Operator.
2138         (Process_Decisions.Process_Node): Handle putative short-circuit
2139         operators and change references to
2140         SCO_Table into SCO_Raw_Table.
2141         (SCO_Output): Add an assertion
2142         for state checking and remove code that used to stamp out SCO entries.
2143         (SCO_Pragma_Disabled): Change reference to SCO_Table
2144         into SCO_Raw_Table.
2145         (SCO_Record): Rename to SCO_Record_Raw,
2146         add an assertion for state checking and change references
2147         to SCO_Table into SCO_Raw_Table.
2148         (Set_SCO_Condition): Add an assertion for state checking, update
2149         references to Condition_Pragma_Hash_Table and change references to
2150         SCO_Table into SCO_Raw_Table.
2151         (Set_SCO_Pragma_Enabled): Add an assertion for state checking and
2152         change references to SCO_Table into SCO_Raw_Table.
2153         (Set_SCO_Logical_Operator): New procedure.
2154         (Traverse_Declarations_Or_Statements.Set_Statement_Entry): Update
2155         references to Set_Table_Entry and to Condition_Pragma_Hash_Table.
2156         (SCO_Record_Fildered): New procedure.
2157         * gnat1drv.adb (Gnat1drv): Invoke the SCO filtering pass.
2158         * lib-writ.adb (Write_ALI): Invoke the SCO filtering pass and
2159         output SCOs.
2160         * par-load.adb (Load): Update reference to SCO_Record.
2161         * par.adb (Par): Update reference to SCO_Record.
2162         * put_scos.adb (Put_SCOs): Add an assertion to check that no
2163         putative SCO condition reaches this end.
2164         * sem_ch10.adb (Analyze_Proper_Body): Update reference to SCO_Record.
2165         * sem_res.adb (Resolve_Logical_Op): Validate putative SCOs
2166         when corresponding to an "and"/"or" operator affected by the
2167         Short_Circuit_And_Or pragma.
2169 2015-01-06  Robert Dewar  <dewar@adacore.com>
2171         * sem_ch8.adb (Analyze_Use_Package): Give more specific error
2172         msg for attempted USE of generic subprogram or subprogram.
2174 2015-01-06  Robert Dewar  <dewar@adacore.com>
2176         * s-valllu.adb, a-tiinau.adb, a-timoau.adb, a-ztinau.adb, a-ztmoau.adb,
2177         s-valuns.adb, s-valrea.adb, a-wtflau.adb, a-tiflau.adb, a-ztflau.adb,
2178         a-wtinau.adb, a-wtmoau.adb: Document recognition of : in place of #.
2180 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
2182         * sem_ch13.adb (Analyze_Aspect_Specifications): For aspects
2183         that specify stream subprograms, if the prefix is a class-wide
2184         type then the generated attribute definition clause must apply
2185         to the same class-wide type.
2186         (Default_Iterator): An iterator defined by an aspect of some
2187         container type T must have a first parameter of type T, T'class,
2188         or an access to such (from code reading RM 5.5.1 (2/3)).
2190 2015-01-06  Arnaud Charlet  <charlet@adacore.com>
2192         * gnat1drv.adb: Minor: complete previous change.
2194 2015-01-06  Olivier Hainque  <hainque@adacore.com>
2196         * set_targ.ads (C_Type_For): New function. Return the name of
2197         a C type supported by the back-end and suitable as a basis to
2198         construct the standard Ada floating point type identified by
2199         the T parameter. This is used as a common ground to feed both
2200         ttypes values and the GNAT tree nodes for the standard floating
2201         point types.
2202         * set_targ.adb (Long_Double_Index): The index at which "long
2203         double" gets registered in the FPT_Mode_Table. This is useful to
2204         know whether we have a "long double" available at all and get at
2205         it's characteristics without having to search the FPT_Mode_Table
2206         when we need to decide which C type should be used as the
2207         basis for Long_Long_Float in Ada.
2208         (Register_Float_Type): Fill Long_Double_Index.
2209         (FPT_Mode_Index_For): New function. Return the index in
2210         FPT_Mode_Table that designates the entry corresponding to the
2211         provided C type name.
2212         (FPT_Mode_Index_For): New function. Return the index in
2213         FPT_Mode_Table that designates the entry for a back-end type
2214         suitable as a basis to construct the standard Ada floating point
2215         type identified by the input T parameter.
2216         (elaboration code): Register_Back_End_Types unconditionally,
2217         so C_Type_For can operate regardless of -gnateT. Do it
2218         early so we can query it for the floating point sizes, via
2219         FPT_Mode_Index_For. Initialize Float_Size, Double_Size and
2220         Long_Double_Size from the FPT_Mode_Table, as cstand will do.
2221         * cstand.adb (Create_Float_Types): Use C_Type_For to determine
2222         which C type should be used as the basis for the construction
2223         of the Standard Ada floating point types.
2224         * get_targ.ads (Get_Float_Size, Get_Double_Size,
2225         Get_Long_Double_Size): Remove.
2226         * get_targ.adb: Likewise.
2228 2015-01-06  Thomas Quinot  <quinot@adacore.com>
2230         * sem_cat.adb (In_RCI_Declaration): Remove unnecessary
2231         parameter and rename to...
2232         (In_RCI_Visible_Declarations): Fix handling of private part of nested
2233         package.
2234         (Validate_RCI_Subprogram_Declaration): Reject illegal function
2235         returning anonymous access in RCI unit.
2237 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
2239         * sem_ch6.adb (New_Overloaded_Entity): In GNATprove mode, a
2240         function wrapper may be a homonym of another local declaration.
2241         * sem_ch8.adb (Analyze_Subprogram_Renaming): In GNATprove mode,
2242         build function and operator wrappers after the actual subprogram
2243         has been resolved, and replace the standard renaming declaration
2244         with the declaration of wrapper.
2245         * sem_ch12.ads (Build_Function_Wrapper, Build_Operator_Wraooer):
2246         make public for use elsewhere.
2247         * sem_ch12.adb (Build_Function_Wrapper, Build_Operator_Wraooer):
2248         rewrite, now that actual is fully resolved when wrapper is
2249         constructed.
2251 2015-01-06  Javier Miranda  <miranda@adacore.com>
2253         * exp_disp.adb: Revert previous change.
2255 2015-01-06  Robert Dewar  <dewar@adacore.com>
2257         * exp_util.adb: Change name Name_Table_Boolean to
2258         Name_Table_Boolean1.
2259         * namet.adb: Change name Name_Table_Boolean to Name_Table_Boolean1
2260         Introduce Name_Table_Boolean2/3.
2261         * namet.ads: Change name Name_Table_Boolean to Name_Table_Boolean1
2262         Introduce Name_Table_Boolean2/3.
2263         * par-ch13.adb: Change name Name_Table_Boolean to
2264         Name_Table_Boolean1.
2266 2015-01-06  Bob Duff  <duff@adacore.com>
2268         * gnat_rm.texi: Improve documentation regarding No_Task_Termination.
2270 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
2272         * sem_aggr.adb (Resolve_Record_Aggregte, Get_Value): For an
2273         others choice that covers multiple components, analyze each
2274         copy with the type of the component even in compile-only mode,
2275         to detect potential accessibility errors.
2277 2015-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
2279         * sem_res.adb (Is_Assignment_Or_Object_Expression): New routine.
2280         (Resolve_Actuals): An effectively volatile out
2281         parameter cannot act as an in or in out actual in a call.
2282         (Resolve_Entity_Name): An effectively volatile out parameter
2283         cannot be read.
2285 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
2287         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If the body is
2288         the expansion of an expression function it may be pre-analyzed
2289         if a 'access attribute is applied to the function, in which case
2290         last_entity may have been assigned already.
2292 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
2294         * sem_ch4.adb (Analyze_One_Call): If formal has an incomplete
2295         type and actual has the corresponding full view, there is no
2296         error, but a case of use of incomplete type in a predicate or
2297         invariant expression.
2299 2015-01-06  Vincent Celier  <celier@adacore.com>
2301         * makeutl.adb (Insert_No_Roots): Make sure that the same source
2302         in two different project tree is checked in both trees, if they
2303         are sources of two different projects, extended or not.
2305 2015-01-06  Arnaud Charlet  <charlet@adacore.com>
2307         * gnat1drv.adb: Minor code clean up.
2308         (Adjust_Global_Switches): Ignore gnatprove_mode in codepeer_mode.
2310 2015-01-06  Bob Duff  <duff@adacore.com>
2312         * osint.adb (Read_Source_File): Don't print out
2313         file name unless T = Source.
2315 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
2317         * sem_util.adb (Is_Variable, Is_OK_Variable_For_Out_Formal):
2318         recognize improper uses of constant_reference types as actuals
2319         for in-out parameters.
2320         (Check_Function_Call): Do not collect identifiers if function
2321         name is missing because of previous error.
2323 2015-01-06  Robert Dewar  <dewar@adacore.com>
2325         * ali-util.adb, sem_prag.adb, rtsfind.adb, sem_util.adb, sem_res.adb,
2326         ali.adb, binde.adb, namet.adb, namet.ads, gnatls.adb, bcheck.adb:
2327         Minor change of name Name_Table_Info => Name_Table_Int.
2329 2015-01-06  Robert Dewar  <dewar@adacore.com>
2331         * exp_strm.adb (Build_Elementary_Input_Call): Clarify comments
2332         in previous checkin.
2333         * freeze.adb (Freeze_Fixed_Point_Type): Add warning for shaving
2334         of bounds.
2335         * sem_prag.adb, sem_ch10.adb, sem_ch6.adb: Minor reformatting.
2337 2015-01-06  Vincent Celier  <celier@adacore.com>
2339         * a-strsup.adb (Times (Natural;String;Positive)): Raise
2340         Length_Error, not Index_Error, when the result is too long.
2342 2015-01-06  Thomas Quinot  <quinot@adacore.com>
2344         * a-direct.adb (Create_Path): Minor error handling and
2345         performance improvement.
2347 2015-01-06  Robert Dewar  <dewar@adacore.com>
2349         * checks.ads, sem_ch12.adb: Minor reformatting.
2350         * exp_ch4.adb (Expand_N_Op_Divide): Generate explicit divide by
2351         zero check for fixed-point case if Backend_Divide_Checks_On_Target
2352         is False.
2354 2015-01-06  Robert Dewar  <dewar@adacore.com>
2356         * sem_prag.adb (Analyze_Pragma, case No_Elaboration_Code_All):
2357         Do not set restriction No_Elaboration_Code unless the pragma
2358         appears in the main unit).
2360 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
2362         * sem_ch10.adb (Is_Regular_With_Clause): Add guard to verify
2363         that with clause has already been analyzed before checking kind
2364         of with_clause.
2366 2015-01-06  Robert Dewar  <dewar@adacore.com>
2368         * exp_strm.adb (Build_Elementary_Input_Call): Return base type
2369         (as required by RM).
2371 2015-01-06  Arnaud Charlet  <charlet@adacore.com>
2373         * a-reatim.adb ("/"): Add explicit pragma Unsuppress (Division_Check).
2375 2015-01-06  Robert Dewar  <dewar@adacore.com>
2377         * sem_prag.adb (Process_Suppress_Unsuppress): Add extra warning
2378         for ignoring pragma Suppress (Elaboration_Check) in SPARK mode.
2380 2015-01-06  Javier Miranda  <miranda@adacore.com>
2382         * exp_disp.adb (Expand_Interface_Conversion): No displacement
2383         of the pointer to the object needed when the type of the operand
2384         is not an interface type and the interface is one of its parent
2385         types (since they share the primary dispatch table).
2387 2015-01-06  Vincent Celier  <celier@adacore.com>
2389         * prj-env.adb: Minor comment update.
2391 2015-01-06  Javier Miranda  <miranda@adacore.com>
2393         * sem_res.adb (Valid_Conversion): Restrict the checks on anonymous
2394         access types whose target type is an interface type to operands
2395         that are access types; required to report an error when the
2396         operand is not an access type.
2398 2015-01-06  Bob Duff  <duff@adacore.com>
2400         * a-cfinve.adb (Copy): Set the discriminant to the Length when
2401         Capacity = 0.
2402         * a-cofove.ads (Capacity): Add a postcondition.
2403         * a-cfinve.ads (Capacity): Add a postcondition.
2404         (Reserve_Capacity): Correct the postcondition in the case where
2405         Capacity = 0; that means "Capacity => Length (Container)".
2406         * a-cofove.adb (Elems[c]): Add a comment
2407         explaining the dangers and how to avoid them.
2409 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
2411         * sem_ch12.adb: Code clean up.
2413 2015-01-06  Arnaud Charlet  <charlet@adacore.com>
2415         * gnatvsn.ads: Bump copyright year.
2417 2015-01-06  Robert Dewar  <dewar@adacore.com>
2419         * s-taskin.ads, s-traces.ads: Minor reformatting.
2420         * exp_util.adb: Minor typo fix.
2422 2015-01-06  Vincent Celier  <celier@adacore.com>
2424         * gnatls.adb (Search_RTS): Invoke Initialize_Default_Project_Path
2425         with the runtime name.
2426         * prj-env.adb (Initialize_Default_Project_Path): When both
2427         Target_Name and Runtime_Name are not empty string, add to the
2428         project path the two directories .../lib/gnat and .../share/gpr
2429         related to the runtime.
2430         * prj-env.ads (Initialize_Default_Project_Path): New String
2431         parameter Runtime_Name, defaulted to the empty string.
2433 2015-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
2435         * frontend.adb: Guard against the case where a configuration
2436         pragma may be split into multiple pragmas and the original
2437         rewritten as a null statement.
2438         * sem_prag.adb (Analyze_Pragma): Insert a brand new Check_Policy
2439         pragma using Insert_Before rather than Insert_Action. This
2440         takes care of the configuration pragma case where Insert_Action
2441         would fail.
2443 2015-01-06  Bob Duff  <duff@adacore.com>
2445         * a-coboho.ads (Element_Access): Add "pragma
2446         No_Strict_Aliasing (Element_Access);". This is needed because
2447         we are unchecked-converting from Address to Element_Access.
2448         * a-cofove.ads, a-cofove.adb (Elems,Elemsc): Fix bounds of the
2449         result to be 1.
2451 2015-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
2453         * sem_res.adb (Resolve_Actuals): Remove the
2454         restriction which prohibits volatile actual parameters with
2455         enabled external propery Async_Writers to act appear in procedure
2456         calls where the corresponding formal is of mode OUT.
2458 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
2460         * gnat_ugn.texi: Bump @copying's copyright year.
2462 2015-01-05  Eric Botcazou  <ebotcazou@adacore.com>
2464         PR ada/64492
2465         * gcc-interface/Makefile.in (../stamp-tools): Reinstate dropped code.
2467 2015-01-04  Uros Bizjak  <ubizjak@gmail.com>
2469         * gcc-interface/misc.c (internal_error_function): Use xasprintf instead
2470         of unchecked asprintf.
2473 Copyright (C) 2015 Free Software Foundation, Inc.
2475 Copying and distribution of this file, with or without modification,
2476 are permitted in any medium without royalty provided the copyright
2477 notice and this notice are preserved.