2015-05-22 Robert Dewar <dewar@adacore.com>
[official-gcc.git] / gcc / ada / ChangeLog
blob346fb54550b3fb57f4b2c7e3cee738c3e4bce3f5
1 2015-05-22  Robert Dewar  <dewar@adacore.com>
3         * atree.adb, atree.ads, treepr.adb: Change name Needs_Actuals_Check to
4         Check_Actuals.
5         * exp_ch4.adb (Expand_N_Op_Expon): Optimize 2**x in modular
6         and overflow cases.
8 2015-05-22  Eric Botcazou  <ebotcazou@adacore.com>
10         * exp_pakd.adb (Install_PAT): Propagate representation aspects
11         from the original array type to the PAT.
13 2015-05-22  Robert Dewar  <dewar@adacore.com>
15         * treepr.adb (Print_Node_Header): Add output of Needs_Actuals_Check.
17 2015-05-22  Robert Dewar  <dewar@adacore.com>
19         * atree.adb, atree.ads (Needs_Actuals_Check): New flag.
21 2015-05-22  Hristian Kirtchev  <kirtchev@adacore.com>
23         * sem_prag.adb (Analyze_Pragma): Remove the detection
24         of a useless Part_Of indicator when the related item is a constant.
25         (Check_Matching_Constituent): Do not emit an error on a constant.
26         (Check_Missing_Part_Of): Do not check for a missing Part_Of indicator
27         when the related item is a constant.
28         (Collect_Body_States): Code cleanup.
29         (Collect_Visible_States): Code cleanup.
30         (Report_Unused_States): Do not emit an error on a constant.
31         * sem_util.ads, sem_util.adb (Has_Variable_Input): Removed.
33 2015-05-22  Eric Botcazou  <ebotcazou@adacore.com>
35         * sem_ch8.adb (Analyze_Object_Renaming): Copy
36         Has_Volatile_Full_Access from renamed to renaming entities.
37         * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
38         Tidy up and remove redundant setting of Has_Volatile_Full_Access.
40 2015-05-22  Hristian Kirtchev  <kirtchev@adacore.com>
42         * ghost.adb (Check_Ghost_Completion): Update references to SPARK
43         RM 6.9 rules.
44         (Check_Ghost_Policy): Update references to SPARK RM 6.9 rules.
45         * sem_ch3.adb (Analyze_Object_Declaration): Update references
46         to SPARK RM 6.9 rules.
47         (Check_Completion): Ghost entities do not require a special form of
48         completion.
49         * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Update references
50         to SPARK RM 6.9 rules.
51         (Analyze_Subprogram_Body_Helper): Update references to SPARK RM 6.9
52         rules.
53         * sem_ch7.adb (Analyze_Package_Body_Helper): Update references
54         to SPARK RM 6.9 rules.
55         (Requires_Completion_In_Body): Ghost entities do not require a special
56         form of completion.
58 2015-05-22  Robert Dewar  <dewar@adacore.com>
60         * a-csquin.ads: Use Ada 2012 notation.
61         * sem_ch8.adb: Minor reformatting.
63 2015-05-22  Hristian Kirtchev  <kirtchev@adacore.com>
65         * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect Import
66         acts as a completion.
68 2015-05-22  Ed Schonberg  <schonberg@adacore.com>
70         * sem_ch13.adb: Minor reformatting.
72 2015-05-22  Jose Ruiz  <ruiz@adacore.com>
74         * a-reatim.adb: Minor change, fix typo.
76 2015-05-22  Robert Dewar  <dewar@adacore.com>
78         * sem_util.ads: Minor addition of ??? comment.
79         * sem_prag.adb, sem_util.adb: Minor reformatting.
80         * sem_ch13.adb: minor reformatting.
82 2015-05-22  Robert Dewar  <dewar@adacore.com>
84         * a-reatim.ads: Add Compile_Time_Error to ensure Duration
85         is 64-bits.
86         * sem_ch13.adb: Improve error message.
87         * exp_ch4.adb: Minor reformatting.
89 2015-05-22  Hristian Kirtchev  <kirtchev@adacore.com>
91         * sem_prag.adb (Analyze_Pragma): Constants without variable
92         input do not require indicator Part_Of.
93         (Check_Missing_Part_Of): Constants without variable input do not
94         requrie indicator Part_Of.
95         (Collect_Visible_States): Constants without variable input are
96         not part of the hidden state of a package.
97         * sem_util.ads, sem_util.adb (Has_Variable_Input): New routine.
99 2015-05-22  Robert Dewar  <dewar@adacore.com>
101         * exp_util.adb (Activate_Atomic_Synchronization): Do not set
102         Atomic_Sync_Required for an object renaming declaration.
103         * sem_ch8.adb (Analyze_Object_Renaming): Copy Is_Atomic and
104         Is_Independent to renaming object.
106 2015-05-22  Ed Schonberg  <schonberg@adacore.com>
108         * sem_ch5.adb (Analyze_Iterator_Specification): Diagnose
109         various illegalities in iterators over arrays and containers:
110         a) New function Get_Cursor_Type, to verify that the cursor is
111         not a limited type at the point of iteration.
112         b) If the container is a constant, an element_iterator is illegal
113         if the container type does not have a Constant_Indexing aspect.
114         c) If the iterate function has an in-out controlling parameter,
115         the container cannot be a constant object.
116         d) Reject additional cases of iterators over a
117         discriminant-dependent component of a mutable object.
119 2015-05-21  Hristian Kirtchev  <kirtchev@adacore.com>
121         * einfo.adb (Contract): This attribute now applies to constants.
122         (Set_Contract): This attribute now applies to constants.
123         (Write_Field34_Name): Add output for constants.
124         * einfo.ads Attribute Contract now applies to constants.
125         * sem_ch3.adb (Analyze_Object_Contract): Constants now have
126         their Part_Of indicator verified.
127         * sem_prag.adb (Analyze_Constituent): A constant is now a valid
128         constituent.
129         (Analyze_Global_Item): A constant cannot act as an output.
130         (Analyze_Initialization_Item): Constants are now a valid
131         initialization item.
132         (Analyze_Initializes_In_Decl_Part): Rename
133         global variable States_And_Vars to States_And_Objs and update
134         all its occurrences.
135         (Analyze_Input_Item): Constants are now a
136         valid initialization item. Remove SPARM RM references from error
137         messages.
138         (Analyze_Pragma): Indicator Part_Of can now apply to a constant.
139         (Collect_Body_States): Collect both source constants
140         and variables.
141         (Collect_States_And_Objects): Collect both source constants and
142         variables.
143         (Collect_States_And_Variables): Rename
144         to Collect_States_And_Objects and update all its occurrences.
145         (Collect_Visible_States): Do not collect constants and variables
146         used to map generic formals to actuals.
147         (Find_Role): The role of a constant is that of an input. Separate the
148         role of a variable from that of a constant.
149         (Report_Unused_Constituents): Add specialized wording for constants.
150         (Report_Unused_States): Add specialized wording for constants.
151         * sem_util.adb (Add_Contract_Item): Add processing for constants.
152         * sem_util.ads (Add_Contract_Item): Update the comment on usage.
153         (Find_Placement_In_State_Space): Update the comment on usage.
155 2015-05-21  Ed Schonberg  <schonberg@adacore.com>
157         * sem_ch5.adb: minor reformatting.
159 2015-05-21  Robert Dewar  <dewar@adacore.com>
161         * freeze.adb (Freeze_Entity): Properly tag -gnatw.z messages.
163 2015-05-21  Robert Dewar  <dewar@adacore.com>
165         * freeze.adb: Minor reformatting.
166         * cstand.adb (Print_Standard): Fix bad printing of Duration
167         low bound.
168         * a-reatim.adb (Time_Of): Complete rewrite to properly detect
169         out of range args.
171 2015-05-21  Ed Schonberg  <schonberg@adacore.com>
173         * sem_ch5.adb: add (useless) initial value.
174         * sem_ch3.adb (Replace_Anonymous_Access_To_Protected_Subprogram):
175         Check whether the procedure has parameters before processing
176         formals in ASIS mode.
178 2015-05-21  Ed Schonberg  <schonberg@adacore.com>
180         * sem_ch13.adb (Check_Iterator_Functions): Emit error on Iterator
181         aspect as well when indexing function is illegal.
182         (Valid_Default_Iterator): Handle properly somme illegal cases
183         to prevent compilation abandoned messages.
184         (Check_Primitive_Function): Verify that type and indexing function
185         are in the same scope.
186         * freeze.adb (Freeze_Record): Extend patch on the presence of
187         indexing aspects to aspect Default_Iterator.
189 2015-05-19  David Malcolm  <dmalcolm@redhat.com>
191         * gcc-interface/trans.c (Sloc_to_locus1): Strenghthen local "map"
192         from line_map * to line_map_ordinary *.
194 2015-05-12  Jason Merrill  <jason@redhat.com>
196         * sigtramp-vxworks.c: Add space between string literal and macro
197         name.
199 2015-05-12  Arnaud Charlet  <charlet@adacore.com>
201         * gnat_rm.texi, gnat_ugn.texi, doc: Documentation updates and clean ups
203 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
205         * sem_ch5.adb (Analyze_Iterator_Specifications): Additional
206         legality checks for array and container iterators:
207         a) The domain of iteration cannot be a component that depends
208         on discriminants of a mutable object. The check was recently
209         added for element iterators.
210         b) The cursor type cannot be a limited type at the point of the
211         iteration, because the cursor will be assigned to in the body
212         of the loop.
214 2015-05-12  Robert Dewar  <dewar@adacore.com>
216         * freeze.adb (Freeze_Record_Type): Make sure that if we have
217         aspect Iterator_Element, then we have either Constant_Indexing
218         or Variable_Indexing.
220 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
222         * a-coormu.ads, a-coormu.adb: Add Indexing aspect, Reference_Type,
223         and Reference_Control_Type to support element iterators over
224         ordered multisets.
225         * a-ciormu.ads, a-ciormu.adb: Ditto for
226         indefinite_ordered_multisets.
228 2015-05-12  Hristian Kirtchev  <kirtchev@adacore.com>
230         * exp_ch4.adb (Expand_N_Expression_With_Actions): Force
231         the evaluation of the EWA expression.  Code cleanup.
232         (Process_Transient_Object): Code cleanup.
233         * exp_util.adb (Is_Aliased): Controlled transient objects found
234         within EWA nodes are not aliased.
235         (Is_Finalizable_Transient): Iterators are not finalizable transients.
237 2015-05-12  Robert Dewar  <dewar@adacore.com>
239         * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
240         Don't allow Atomic and Volatile_Full_Access for the same entity.
242 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
244         * sem_ch5.adb (Analyze_Iterator_Specification): Implement new
245         semantics and safety checks specified in AI12-0151.
247 2015-05-12  Pierre-Marie de Rodat  <derodat@adacore.com>
249         * sem_ch10.adb (Sem_Ch10.Analyze_Proper_Body): Generate SCOs
250         for subunit in generic units.
252 2015-05-12  Robert Dewar  <dewar@adacore.com>
254         * sem_elab.adb (Check_A_Call): Avoid checking internal call
255         from Valid_Scalars
257 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
259         * sem_ch6.adb (Process_Formals): An untagged incomplete type
260         is legal in the profile of a null procedure.
262 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
264         * sem_ch12.adb (Validate_Derived_Type_Instance): Handle properly
265         the checks on a derived formal whose parent type is a previous
266         formal that is not a derived type.
268 2015-05-12  Robert Dewar  <dewar@adacore.com>
270         * aspects.ads, aspects.adb: Add entries for aspect Volatile_Full_Access
271         * einfo.adb (Has_Volatile_Full_Access): New flag.
272         (Has_Volatile_Full_Access): New flag.
273         * einfo.ads (Has_Volatile_Full_Access): New flag.
274         * par-prag.adb: Add dummy entry for Volatile_Full_Access.
275         * sem_prag.adb (Analyze_Pragma, case Volatile_Full_Access):
276         Implement new pragma.
277         * snames.ads-tmpl: Add entries for pragma Volatile_Full_Access.
279 2015-05-12  Robert Dewar  <dewar@adacore.com>
281         * targparm.ads: Minor reformatting.
283 2015-05-12  Robert Dewar  <dewar@adacore.com>
285         * a-reatim.adb (Time_Of): Properly detect overflow when TS = 0.0.
286         * a-reatim.ads: Minor reformatting.
288 2015-05-12  Hristian Kirtchev  <kirtchev@adacore.com>
290         * einfo.ads: Update the documentation of flags
291         Has_Inherited_Default_Init_Cond and Has_Default_Init_Cond.
293 2015-05-12  Robert Dewar  <dewar@adacore.com>
295         * impunit.adb: Add entry for a-dhfina.ads
296         * a-dhfina.ads: New file.
298 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
300         * exp_ch5.adb (Expand_Iterator_Loop_Over_Array): if the array
301         type has convention Fortran, a multidimensional iterator varies
302         the first dimension fastest.
304 2015-05-12  Hristian Kirtchev  <kirtchev@adacore.com>
306         * einfo.adb: Node32 is now used as Encapsulating_State.
307         Node37 is now used as Associated_Entity.
308         (Associated_Entity): New routine.
309         (Encapsulating_State): Update the assertion guard to include constants.
310         (Set_Associated_Entity): New routine.
311         (Set_Encapsulating_State): Update the assertion guard to
312         include constants.
313         (Write_Field10_Name): Remove the output for Encapsulating_State.
314         (Write_Field32_Name): Add output for Encapsulating_State.
315         (Write_Field37_Name): Add output for Associated_Entity.
316         * einfo.ads New attribute Associated_Entity along with placement
317         in entities. Attribute Encapsulating_State now uses Node32.
318         (Associated_Entity): New routine along with pragma Inline.
319         (Set_Associated_Entity): New routine along with pragma Inline.
320         * inline.ads Code reformatting.
321         * sem_attr.adb (Analyze_Attribute): Correct the prefix of
322         attribute 'Result when the context is a generic instantiation.
323         (Analyze_Attribute_Old_Result): Pragmas Depends and
324         Refined_Depends are a valid context for attribute 'Result.
325         (Denote_Same_Function): Allow attribute 'Result to denote
326         generic functions.
327         * sem_ch3.adb Add with and use clauses for Sem_Ch12.
328         (Analyze_Declarations): Capture global references within the
329         contracts of packages, subprograms and their respective bodies.
330         * sem_ch6.adb (Analyze_Aspects_On_Body_Or_Stub): Removed.
331         (Analyze_Completion_Contract): Removed.
332         (Analyze_Generic_Subprogram_Body): Enchange the aspects after
333         creating the generic copy. Create a generic contract for the
334         template. Analyze the aspects of the generic body. Analyze the
335         contract of the generic body when it is a compilation unit and
336         capture global references.
337         (Analyze_Subprogram_Body_Contract): Code cleanup.
338         (Analyze_Subprogram_Contract): Do not save global references here.
339         (Save_Global_References_In_List): Removed.
340         * sem_ch7.adb (Analyze_Package_Body_Contract): Code cleanup.
341         (Analyze_Package_Body_Helper): Create a generic contract for
342         the template.
343         (Analyze_Package_Contract): Code cleanup.
344         * sem_ch10.adb Add with and use clauses for Sem_Ch12.
345         (Analyze_Compilation_Unit): Capture global references in a
346         generic subprogram declaration that acts as a compilation unit.
347         * sem_ch12.adb Add with and use clauses for Sem_Prag. Illustrate
348         the implementation of generic contracts. Alphabetize various
349         subprograms.
350         (Analyze_Generic_Package_Declaration):
351         Create a generic contract for the template.
352         (Analyze_Generic_Subprogram_Declaration): Create a generic
353         contract for the template.
354         (Analyze_Subprogram_Instantiation): Instantiate the contract of the
355         subprogram.
356         (Copy_Generic_Node): Link defining entities of the generic template
357         with the corresponding defining entities of the generic copy. Update
358         the processing of pragmas.
359         (Instantiate_Contract): Removed.
360         (Instantiate_Subprogram_Contract): New routine.
361         (Requires_Delayed_Save): New routine.
362         (Save_Global_References): Rename formal parameter N to Templ. Various
363         cleanups.
364         (Save_Global_References_In_Aspects): Moved from the spec.
365         (Save_Global_References_In_Contract): New routine.
366         (Save_References_In_Aggregate): New routine.
367         (Save_References_In_Char_Lit_Or_Op_Symbol): New routine.
368         (Save_References_In_Descendants): New routine.
369         (Save_References_In_Identifier): New routine.
370         (Save_References_In_Operator): New routine.
371         (Save_References_In_Pragma): New routine.
372         * sem_ch12.ads (Save_Global_References): Rename formal
373         parameter N to Templ. Update the comment on usage.
374         (Save_Global_References_In_Aspects): Moved to the body.
375         (Save_Global_References_In_Contract): New routine.
376         * sem_ch13.adb (Analyze_Aspect_Specifications_On_Body_Or_Stub):
377         New routine.
378         * sem_ch13.ads (Analyze_Aspect_Specifications_On_Body_Or_Stub):
379         New routine.
380         * sem_prag.adb (Add_Item_To_Name_Buffer): Add support for
381         generic parameters.
382         (Analyze_Contract_Cases_In_Decl_Part): Code cleanup.
383         (Analyze_Depends_Global): New routine.
384         (Analyze_Depends_In_Decl_Part): Code cleanup.
385         (Analyze_Global_In_Decl_Part): Code cleanup.
386         (Analyze_Global_Item): Constants are now valid global items. Do
387         not perform state-related checks in an instance. Change the way
388         renamings are handled.  (Analyze_Initial_Condition_In_Decl_Part):
389         Code cleanup.
390         (Analyze_Initializes_In_Decl_Part): Code cleanup.
391         (Analyze_Input_Output): The analysis of attribute 'Result in
392         the context of pragmas Depends or Refined_Depends now reuses
393         the existing attribute analysis machinery. Constants and
394         generic parameters are now valid dependency items. Do not
395         perform state-related checks in an instance. Change the way
396         renamings are handled.  (Analyze_Pragma): Add a "characteristics"
397         section for pragmas Abstract_State, Contract_Cases, Depends,
398         Extensions_Visible, Global, Initial_Condition, Initializes,
399         Post, Post_Class, Postcondition, Pre, Pre_Class, Precondition,
400         Refined_Depends, Refined_Global, Refined_Post, Refined_State, Test_Case.
401         (Analyze_Pre_Post_Condition): Do not create a generic
402         template here.
403         (Analyze_Pre_Post_Condition_In_Decl_Part): Code cleanup.
404         (Analyze_Refined_Depends_Global_Post): New routine.
405         (Analyze_Refined_Depends_In_Decl_Part): Code cleanup.
406         (Analyze_Refined_Global_In_Decl_Part): Code cleanup.
407         (Analyze_Refined_Pragma): Removed.
408         (Analyze_Refined_State_In_Decl_Part): Code cleanup.
409         (Analyze_Test_Case_In_Decl_Part): Code cleanup.
410         (Check_Dependency_Clause): Do not perform this check in an instance.
411         (Check_Function_Return): Add support for generic functions.
412         (Check_In_Out_States): Do not perform this check in an instance.
413         (Check_Input_States): Do not perform this check in an instance.
414         (Check_Mode_Restriction_In_Function): Add support for generic functions.
415         (Check_Output_States): Do not perform this check in an instance.
416         (Check_Postcondition_Use_In_Inlined_Subprogram): Rename
417         parameter Subp_Id to Spec_Id and update comment on usage.
418         (Check_Proof_In_States): Do not perform this check in an instance.
419         (Check_Refined_Global_Item): Add support for constants.
420         (Check_Refined_Global_List): Do not perform this check in an instance.
421         (Collect_Global_Items): Reimplemented.
422         (Collect_Subprogram_Inputs_Outputs): Add support for generic parameters.
423         (Create_Generic_Template): Removed.
424         (Find_Related_Package_Or_Body): Moved to spec.
425         (Find_Role): Add support for generic parameters and constants.
426         (Get_Argument): Moved to spec. Rename parameter Spec_Id to Context_Id.
427         (Match_Item): Add support for constants.
428         (Preanalyze_Test_Case_Arg): Reimplemented.
429         (Report_Extra_Clauses): Do not perform this check in an instance.
430         (Report_Extra_Constituents): Do not perform this check in an instance.
431         * sem_prag.ads (Collect_Subprogram_Inputs_Outputs): Update
432         the comment on usage.
433         (Find_Related_Package_Or_Body): Moved from body.
434         (Get_Argument): Moved from body.
435         * sem_util.adb Add with and use clauses for Sem_Ch12.
436         (Corresponding_Spec_Of): Add support for packages and package bodies.
437         (Create_Generic_Contract): New routine.
438         (Is_Contract_Annotation): Reimplemented.
439         (Is_Generic_Declaration_Or_Body): New routine.
440         (Is_Package_Contract_Annotation): New routine.
441         (Is_Subprogram_Contract_Annotation): New routine.
442         * sem_util.ads (Corresponding_Spec_Of): Update the comment on usage.
443         (Create_Generic_Contract): New routine.
444         (Is_Generic_Declaration_Or_Body): New routine.
445         (Is_Package_Contract_Annotation): New routine.
446         (Is_Subprogram_Contract_Annotation): New routine.
447         * sinfo.adb (Is_Generic_Contract_Pragma): New routine.
448         (Set_Is_Generic_Contract_Pragma): New routine.
449         * sinfo.ads Add new attribute Is_Generic_Contract_Pragma along
450         with occurrences in nodes.
451         (Is_Generic_Contract_Pragma): New routine along with pragma Inline.
452         (Set_Is_Generic_Contract_Pragma): New routine along with pragma Inline.
453         * treepr.adb (Print_Entity_Info): Output fields 36 to 41.
455 2015-05-12  Robert Dewar  <dewar@adacore.com>
457         * a-taster.ads: Minor comment fix: fix bad header, this is a
458         pure RM unit.
460 2015-05-12  Robert Dewar  <dewar@adacore.com>
462         * sem_intr.adb: (Check_Shift): Diagnose bad modulus value.
464 2015-05-12  Robert Dewar  <dewar@adacore.com>
466         * gnat1drv.adb (Adjust_Global_Switches): Default to suppressing
467         Alignment_Checks on non-strict alignment machine.
468         * sem_ch13.adb (Validate_Address_Clauses): Don't give
469         compile-time alignment warnings if run time Alignment_Check
470         is suppressed.
472 2015-05-12  Thomas Quinot  <quinot@adacore.com>
474         * g-sercom.ads, g-sercom-linux.adb (GNAT.Serial_Communications.
475         Data_Rate): New literals B75, B110, B150, B300, B600.
477 2015-05-12  Doug Rupp  <rupp@adacore.com>
479         * init.c (__gnat_init_float) [vxworks]: For e500v2,
480         do nothing and leave the responsibility to install the handler
481         and enable the exceptions to the BSP.
483 2015-05-12  Robert Dewar  <dewar@adacore.com>
485         * sem_ch9.adb, einfo.ads, exp_intr.adb: Minor reformatting.
486         * sem_disp.adb: Minor code reorganization (remove junk redundant
487         null statement).
488         * exp_unst.adb (Unnest_Subprogram.Uplev_Refs): Ignore uplevel
489         references to bounds of types coming from original type reference.
490         * checks.ads: Minor reformatting.
491         * checks.adb: Minor reformatting.
492         * sem_prag.adb (Analyze_Pragma, case Check): If in ignored
493         assertion, then make sure we do not drag in bignum stuff.
495 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
497         * sem_ch9.adb (Collect_Interfaces): Initialize
498         Direct_Primitive_Operations for a tagged synchronized type,
499         so it can used in ASIS mode.
500         * sem_disp.adb (Check_Dispatching_Operation): If expansion is
501         disabled, attach subprogram to list of Direct_Primitive_Operations
502         of synchronized type itself, for ASIS use, because in this case
503         Corresponding_Record_Type is not built.
504         * einfo.ads: Indicate use of Direct_Primitive_Operations on
505         synchronized type.
507 2015-05-12  Pierre-Marie de Rodat  <derodat@adacore.com>
509         * exp_pakd.adb: Make clearer the comment in exp_pakd.adb about
510         ___XP suffixes.
512 2015-05-12  Robert Dewar  <dewar@adacore.com>
514         * sem_ch3.adb, sem_util.adb, sem_ch6.adb: Minor reformatting.
516 2015-05-12  Robert Dewar  <dewar@adacore.com>
518         * exp_unst.adb (Visit_Node): Deal with subprogram and package stubs.
520 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
522         * exp_intr.adb (Expand_Dispatching_Constructor_Call): The
523         tag to be retrieved for the generated call is the first entry
524         in the dispatch table for the return type of the instantiated
525         constructor.
527 2015-05-12  Bob Duff  <duff@adacore.com>
529         * exp_ch7.adb, exp_ch7.ads, exp_intr.adb, exp_util.adb,
530         exp_util.ads: Update comments.
532 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
534         * sem_ch3.adb (Add_Internal_Interface_Entities): Do no generate
535         freeze nodes for these in ASIS mode, because they lead to
536         elaoration order issues in gigi.
538 2015-05-12  Hristian Kirtchev  <kirtchev@adacore.com>
540         * sem_ch6.adb (Analyze_Expression_Function): Code
541         cleanup. Use Copy_Subprogram_Spec to create a proper spec.
542         (Analyze_Subprogram_Body_Helper): Code cleanup. Do not
543         prepare a stand alone body for inlining in GNATprove mode
544         when inside a generic.  (Body_Has_Contract): Reimplemented.
545         (Build_Subprogram_Declaration): New routine.
546         * sem_ch10.adb (Analyze_Compilation_Unit): Capture global
547         references within generic bodies by loading them.
548         * sem_util.adb (Copy_Parameter_List): Code cleanup.
549         (Copy_Subprogram_Spec): New routine.
550         (Is_Contract_Annotation): New routine.
551         * sem_util.ads (Copy_Subprogram_Spec): New routine.
552         (Is_Contract_Annotation): New routine.
554 2015-05-12  Hristian Kirtchev  <kirtchev@adacore.com>
556         * sem_attr.adb (Resolve_Attribute): Do not analyze the generated
557         body of an expression function when the prefix of attribute
558         'Access is the body.
560 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
562         * sem_ch3.adb (Build_Derived_Enumeration_Type): The anonymous base
563         created for a derived enumeration type is not a first subtype,
564         even though it is defined through a full type declaration.
565         * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): Do not process
566         aspects for the anonymous base type constructed for a derived
567         scalar type, because they will be set when the first subtype
568         is frozen.
569         (Inherit_Aspects_At_Freeze_Point): Fix typos on handling of
570         Default_Value and Default_Component_Value, that prevented the
571         proper inheritance of these aspects.
573 2015-05-12  Gary Dismukes  <dismukes@adacore.com>
575         * exp_ch6.adb, exp_unst.adb: Minor typo fixes.
577 2015-05-12  Robert Dewar  <dewar@adacore.com>
579         * sem_ch3.adb: Minor reformatting.
581 2015-05-12  Vincent Celier  <celier@adacore.com>
583         * gnatcmd.adb: If we want to invoke gnatmake (gnatclean) with
584         -P, then check if gprbuild (gprclean) is available; if it is,
585         use gprbuild (gprclean) instead of gnatmake (gnatclean).
587 2015-05-12  Robert Dewar  <dewar@adacore.com>
589         * debug.adb: Add flag -gnatd.3 to output diagnostic info from
590         Exp_Unst.
591         * einfo.ad, einfo.adb: Reorganize (and remove most of) flags used by
592         Exp_Unst.
593         * exp_ch6.adb (Unest_Bodies): Table for delayed calls to
594         Unnest_Subprogram (Expand_N_Subprogram_Body): Add entry to table
595         for later call instead of calling Unnest_Subprogram directly
596         (Initialize): New procedure (Unnest_Subprograms): New procedure
597         * exp_ch6.ads (Add_Extra_Actual_To_Call): Move into proper
598         alpha order.
599         (Initialize): New procedure.
600         (Unnest_Subprograms): New procedure.
601         * exp_unst.adb (Unnest_Subprogram): Major rewrite, moving
602         all processing to this routine which is now called late
603         after instantiating bodies. Fully handles the case of generic
604         instantiations now.
605         * exp_unst.ads: Major rewrite, moving all processing to
606         Unnest_Subprogram.
607         * frontend.adb (Frontend): Add call to Exp_Ch6.Initialize.
608         (Frontend): Add call to Unnest_Subprograms.
609         * sem_ch8.adb (Find_Direct_Name): Back to old calling sequence
610         for Check_Nested_Access.
611         * sem_util.adb (Build_Default_Subtype): Minor reformatting
612         (Check_Nested_Access): Back to original VM-only form (we
613         now do all the processing for Unnest_Subprogram at the time
614         it is called.
615         (Denotes_Same_Object): Minor reformatting
616         (Note_Possible_Modification): Old calling sequence for
617         Check_Nested_Access.
618         * sem_util.ads (Check_Nested_Access): Back to original VM-only
619         form (we now do all the processing for Unnest_Subprogram at the
620         time it is called.
622 2015-05-12  Robert Dewar  <dewar@adacore.com>
624         * sem_ch3.adb, freeze.adb, sem_ch6.adb: Minor reformatting.
626 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
628         * sem_ch3.adb (Analyze_Object_Declaration): New function
629         Has_Delayed_Aspect, used to defer resolution of an aggregate
630         expression when the object declaration carries aspects Address
631         and/or Alignment.
632         * freeze.adb (Freeze_Object_Declaration): New subsidiary procedure
633         to Freeze_Entity.  In addition to the previous processing steps
634         at the freeze point of an object, this procedure also handles
635         aggregates in object declarations, when the declaration carries
636         delayed aspects that require that the initialization of the
637         object be attached to its freeze actions.
639 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
641         * sem_ch6.adb (Analyze_Subprogram_Declaration): Following
642         AI12-0147, null procedures and expression functions are allowed
643         in protected bodies.
645 2015-05-12  Tristan Gingold  <gingold@adacore.com>
647         * i-cpoint.adb (Copy_Terminated_Array): Copy nothing if Length is 0.
649 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
651         * sem_ch3.adb (Complete_Private_Subtype): Propagate
652         Has_Delayed_Aspects flag from private to full view, to ensure
653         that predicate functions are constructed.
655 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
657         * sem_ch6.adb (Process_Formals): If a tagged formal is an
658         incomplete class-wide type, the subprogram must have a delayed
659         freeze even though the opertation is not a primitive of the
660         type. THis ensures that the backend can recover the full view
661         when elaborating the subprogram declaration.
663 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
665         * exp_util.adb (Get_Current_Value_Condition): Nothing to be
666         done if an elsif part has been rewritten so that it is not part
667         of an enclosing if_statement.
669 2015-05-12  Robert Dewar  <dewar@adacore.com>
671         * sem_type.adb, sem_ch10.adb, freeze.adb, sem_ch6.adb, exp_disp.adb:
672         Minor reformatting.
674 2015-05-12  Bob Duff  <duff@adacore.com>
676         * exp_attr.adb (Size): Remove unnecessary check for types with
677         unknown discriminants.  That was causing the compiler to build
678         a function call _size(T), where T is a type, not an object.
680 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
682         * sem_ch4.adb (Extended_Primitive_Ops): Exclude overriding
683         primitive operations of a type extension declared in the package
684         body, to prevent duplicates in extended list.
686 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
688         * sem_ch3.adb (Analyze_Component_Declaration): If the component is
689         an unconstrained synchronized type with discriminants, create a
690         constrained default subtype for it, so that the enclosing record
691         can be given the proper size.
692         * sem_util.adb (Build_Default_Subtype): If the subtype is created
693         for a record discriminant, do not analyze the declarztion at
694         once because it is added to the freezing actions of the enclosing
695         record type.
697 2015-05-12  Robert Dewar  <dewar@adacore.com>
699         * exp_prag.adb (Expand_N_Pragma): Rewrite ignored pragma as
700         Null statements.
701         * namet.ads (Boolean3): Document this flag used for Ignore_Pragma.
702         * par-prag.adb (Prag): Implement Ignore_Pragma.
703         * sem_prag.adb: Implement Ignore_Pragma.
704         * snames.ads-tmpl: Add entries for pragma Ignore_Pragma.
706 2015-05-12  Javier Miranda  <miranda@adacore.com>
708         * sem_ch10.adb (Build_Shadow_Entity): Link the class-wide shadow
709         entity with its corresponding real entity.
710         (Decorate_Type): Unconditionally build the class-wide shadow entity of
711         tagged types.
712         * einfo.ads, einfo.adb (Has_Non_Limited_View): New synthesized
713         attribute.
714         (Non_Limited_View): Moved from field 17 to field 19 be available
715         in class-wide entities.
716         * exp_attr.adb (Access_Cases): Code cleanup.
717         * exp_disp.adb (Expand_Interface_Actuals): Ditto.
718         * exp_util.adb (Non_Limited_Designated_Type): Ditto.
719         * freeze.adb (Build_Renamed_Bdody): Ditto.
720         * sem_aux.adb (Available_View): Ditto.
721         * sem_ch4.adb (Analyze_Selected_Component): Ditto.
722         (Try_One_Prefix_Interpretation): Ditto.
723         * sem_ch5.adb (Analyze_Assignment): Ditto.
724         * sem_ch6.adb (Detect_And_Exchange): Ditto.
725         * sem_ch8.adb (Find_Expanded_Name): Ditto.
726         * sem_disp.adb (Check_Controlling_Type): Ditto.
727         * sem_res.adb (Resolve_Type_Conversion): Ditto.
728         (Full_Designated_Type): Ditto.
729         * sem_type.adb (Covers): Ditto.
730         * sem_util.adb: Fix typo in comment.
732 2015-05-12  Robert Dewar  <dewar@adacore.com>
734         * exp_unst.adb (Get_Real_Subp): New subprogram.
735         (Unnest_Subprogram): Use Get_Real_Subp.
736         (Uplev_Refs_For_One_Subp): Skip if no ARECnU entity.
737         (Uplev_Refs_For_One_Subp): Use actual subtype in unconstrained case.
739 2015-05-12  Robert Dewar  <dewar@adacore.com>
741         * a-reatim.adb ("/"): Add explicit check for Time_Span_First / -1.
743 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
745         * sem_ch4.adb (Extended_Primitive_Ops): New subprogram,
746         auxiliary to Try_Primitive_Operation to handle properly prefixed
747         calls where the operation is not a primitive of the type, but
748         is declared in the package body that is in the immediate scope
749         of the type.
751 2015-05-12  Robert Dewar  <dewar@adacore.com>
753         * sem_util.adb (Is_Variable): Allow X'Deref(Y) as a variable.
755 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
757         * sem_ch8.adb (Find_Expanded_Name): Handle properly a fully
758         qualified name for an instance of a generic grand-child unit in
759         the body its parent.
761 2015-05-12  Robert Dewar  <dewar@adacore.com>
763         * exp_unst.adb (Upref_Name): New subprogram.
764         (Unnest_Subprogram): Use Upref_Name.
765         (Unnest_Subprogram): Use new Deref attribute.
766         * exp_unst.ads: Doc updates.
768 2015-05-12  Thomas Quinot  <quinot@adacore.com>
770         * adaint.c: Enable Large File Support in adaint so that __gnat_readdir
771         can access files on filesystems mounted from servers that use large
772         NFS file handles.
774 2015-05-09  Eric Botcazou  <ebotcazou@adacore.com>
776         * gcc-interface/utils.c (gnat_write_global_declarations): Use type_decl
777         method instead of global_decl for TYPE_DECLs.
779 2015-04-27  Jim Wilson  <jim.wilson@linaro.org>
781         * gcc-interface/Makefile-lan.in (ada.mostlyclean): Remove gnatbind
782         and gnat1.
784 2015-04-13  Eric Botcazou  <ebotcazou@adacore.com>
786         * gnatvsn.ads (Library_Version): Bump to 6.
788 2015-04-09  Iain Sandoe  <iain@codesourcery.com>
790         * gcc-interface/Makefile.in (darwin, powerpc): Enable atomics.
792 2015-04-08  Eric Botcazou  <ebotcazou@adacore.com>
794         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Do not make
795         a function returning an unconstrained type 'const' for the middle-end.
797         * gcc-interface/trans.c (Pragma_to_gnu) <case Pragma_Warning>: Use
798         exact condition to detect Reason => "..." pattern.
800 2015-03-31  Tom de Vries  <tom@codesourcery.com>
802         PR ada/65490
803         * terminals.c (child_setup_tty): Fix warning 'argument to sizeof in
804         bzero call is the same expression as the destination'.
806 2015-03-26  Eric Botcazou  <ebotcazou@adacore.com>
808         * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Deref>: New case.
810 2015-03-24  Gary Dismukes  <dismukes@adacore.com>
812         * sem_ch3.adb: Minor typo fix (missing paren).
814 2015-03-24  Robert Dewar  <dewar@adacore.com>
816         * sinfo.ads: Update comment.
818 2015-03-24  Robert Dewar  <dewar@adacore.com>
820         * exp_attr.adb: Add entry for typ'Deref.
821         * sem_attr.adb (Deref): New GNAT attribute.
822         * sem_attr.ads: Add entry for new GNAT attribute Deref.
823         * snames.ads-tmpl: Add entries for new attribute Deref.
825 2015-03-24  Ed Schonberg  <schonberg@adacore.com>
827         * sem_ch13.adb (Rep_Item_Too_Early): allow pragma Convention
828         on generic type.
830 2015-03-24  Gary Dismukes  <dismukes@adacore.com>
832         * inline.adb: Minor typo fix.
834 2015-03-24  Arnaud Charlet  <charlet@adacore.com>
836         * doc/gnat_ugn/building_executable_programs_with_gnat.rst,
837         doc/gnat_ugn/gnat_utility_programs.rst
838         doc/gnat_rm/implementation_defined_attributes.rst
839         doc/gnat_rm/implementation_defined_pragmas.rst
840         doc/gnat_rm/representation_clauses_and_pragmas.rst
841         doc/gnat_rm/about_this_guide.rst
842         doc/gnat_rm/implementation_of_ada_2012_features.rst: Doc improvements.
843         * gnat_rm.texi, gnat_ugn.texi: Regenerate.
845 2015-03-23  Jakub Jelinek  <jakub@redhat.com>
847         PR bootstrap/65522
848         * adadecode.c (ada_demangle): Guard with IN_RTS instead of IN_GCC.
850 2015-03-20  Eric Botcazou  <ebotcazou@adacore.com>
852         PR ada/65451
853         * gcc-interface/utils.c (gnat_pushdecl): Tidy up and improve comment.
854         Make sure to chain only main variants through TYPE_NEXT_PTR_TO.
856         * gcc-interface/trans.c (Attribute_to_gnu): Revert latest change.
858 2015-03-16  Eric Botcazou  <ebotcazou@adacore.com>
860         * gcc-interface/utils2.c (gnat_invariant_expr): Return null if the type
861         of the expression ends up being composite.
863 2015-03-16  Eric Botcazou  <ebotcazou@adacore.com>
865         * gcc-interface/decl.c (is_from_limited_with_of_main): New predicate.
866         (gnat_to_gnu_entity) <E_Subprogram_Type>: Invoke it on return and
867         parameter types to detect circularities in ASIS mode.
868         * gcc-interface/trans.c (Attribute_to_gnu): Mention AI05-0151.
870 2015-03-16  Eric Botcazou  <ebotcazou@adacore.com>
872         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Abstract_State>: Do not
873         short-circuit the regular handling.
875 2015-03-13  Robert Dewar  <dewar@adacore.com>
877         * exp_unst.adb (Note_Uplevel_Reference): Eliminate duplicate
878         references.
879         (Actual_Ref): New function.
880         (AREC_String): Minor reformatting.
881         (Unnest_Subprogram): Use Actual_Ref.
882         * frontend.adb (Frontend): Turn off Unnest_Subprogram_Mode
883         before call to Instantiate_Bodies.
885 2015-03-13  Ed Schonberg  <schonberg@adacore.com>
887         * freeze.adb (Freeze_Profile): If the return type of a function
888         being frozen is an untagged limited view and the function is
889         abstract, mark the type as frozen because there is no later
890         point at which the profile of the subprogram will be elaborated.
892 2015-03-13  Robert Dewar  <dewar@adacore.com>
894         * einfo.adb, einfo.ads, atree.adb, atree.ads, atree.h: Add seventh
895         component to entities. Add new fields Field36-41 and Node36-41.
897 2015-03-13  Claire Dross  <dross@adacore.com>
899         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Rewrite after review.
901 2015-03-13  Robert Dewar  <dewar@adacore.com>
903         * exp_util.adb (Is_Volatile_Reference): Compile time known
904         value is never considered to be a volatile reference.
906 2015-03-13  Robert Dewar  <dewar@adacore.com>
908         * sem_ch3.adb (Analyze_Object_Contract): Suppress "constant
909         cannot be volatile" for internally generated object (such as
910         FIRST and LAST constants).
912 2015-03-13  Ed Schonberg  <schonberg@adacore.com>
914         * sem_ch12.adb (Validate_Access_Subprogram_Instance): If a
915         convention is specified for the formal parameter, verify that
916         the actual has the same convention.
917         * sem_prag.adb (Set_Convention_From_Pragma): Allow convention
918         pragma to be set on a generic formal type.
919         * sem_util.adb (Set_Convention): Ignore within an instance,
920         as it has already been verified in the generic unit.
922 2015-03-13  Claire Dross  <dross@adacore.com>
924         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do not inline
925         subprograms with unconstrained record parameters containing
926         Itype declarations.
927         * sinfo.ads Document GNATprove assumption that type should match
928         in the AST.
929         * sem_ch6.adb (Analyze_Subprogram_Body_Contract):
930         Do not check for Refined_Depends and Refined_Globals contracts
931         as they are optional.
933 2015-03-13  Ed Schonberg  <schonberg@adacore.com>
935         * sem_ch12.adb (Instantiate_Type): For a floating-point type,
936         capture dimension info if any, because the generated subtype
937         declaration does not come from source and will not process dimensions.
938         * sem_dim,adb (Analyze_Dimension_Extension_Or_Record_Aggregate):
939         Do not analyze expressions with an initialization procedure
940         because aggregates will have been checked at the point of record
941         declaration.
943 2015-03-13  Robert Dewar  <dewar@adacore.com>
945         * aspects.ads, aspects.adb: Add entries for aspect Unimplemented.
946         * einfo.ads, einfo.adb (Is_Unimplemented): New flag.
947         * sem_ch13.adb: Add dummy entry for aspect Unimplemented.
948         * snames.ads-tmpl: Add entry for Name_Unimplemented.
950 2015-03-13  Gary Dismukes  <dismukes@adacore.com>
952         * style.adb (Missing_Overriding): Apply the
953         Comes_From_Source test to the Original_Node of the subprogram
954         node, to handle the case of a null procedure declaration that
955         has been rewritten as an empty procedure body.
957 2015-03-13  Robert Dewar  <dewar@adacore.com>
959         * exp_util.ads: Minor fix to comment.
960         * sem_ch3.adb (Constrain_Index): Correct pasto from previous
961         change.
963 2015-03-13  Robert Dewar  <dewar@adacore.com>
965         * exp_util.ads, exp_util.adb (Force_Evaluation): Add Related_Id and
966         Is_Low/High_Bound params.
967         * sem_ch3.adb (Constrain_Index): Use new Force_Evaluation calling
968         sequence to simplify generation of FIRST/LAST temps for bounds.
970 2015-03-12  Olivier Hainque  <hainque@adacore.com>
972         * gcc-interface/trans.c (Attribute_to_gnu) <Code_Address case>:
973         On targets where a function symbol designates a function descriptor,
974         fetch the function code address from the descriptor.
975         (USE_RUNTIME_DESCRIPTORS): Provide a default definition.
977 2015-03-04  Robert Dewar  <dewar@adacore.com>
979         * sem_warn.adb: Minor reformatting.
980         * init.c: Minor tweaks.
982 2015-03-04  Dmitriy Anisimko  <anisimko@adacore.com>
984         * a-coinho-shared.adb: Fix clear of already empty holder.
986 2015-03-04  Robert Dewar  <dewar@adacore.com>
988         * exp_unst.adb (Check_Dynamic_Type): Ignore library level types.
989         (Check_Uplevel_Reference_To_Type): Ignore call inside generic.
990         (Note_Uplevel_Reference): Ignore call inside generic.
991         (Note_Uplevel_Reference): Fix check for no entity field.
992         (Unnest_Subprogram): Ignore call inside generic.
993         (Find_Current_Subprogram): Use Defining_Entity, not Defining_Unit_Name.
994         (Visit_Node): Ignore calls to Imported subprograms.
995         (Visit_Node): Fix problem in finding subprogram body in some cases.
996         (Add_Form_To_Spec): Use Defining_Entity, not Defining_Unit_Name.
998 2015-03-04  Robert Dewar  <dewar@adacore.com>
1000         * einfo.adb (Is_ARECnF_Entity): Removed.
1001         (Last_Formal): Remove special handling of Is_ARECnF_Entity.
1002         (Next_Formal): Remove special handling of Is_ARECnF_Entity.
1003         (Next_Formal_With_Extras): Remove special handling of Is_ARECnF_Entity.
1004         (Number_Entries): Minor reformatting.
1005         * einfo.ads (Is_ARECnF_Entity): Removed.
1006         * exp_unst.adb (Unnest_Subprogram): Remove setting of
1007         Is_ARECnF_Entity.
1008         (Add_Extra_Formal): Use normal Extra_Formal circuit.
1009         * sprint.adb (Write_Param_Specs): Properly handle case where
1010         there are no source formals, but we have at least one Extra_Formal
1011         present.
1013 2015-03-04  Ed Schonberg  <schonberg@adacore.com>
1015         * sem_aggr.adb (Resolve_Record_Aggregate,
1016         Add_Discriminant_Values): If the value is a reference to the
1017         current instance of an enclosing type, use its base type to check
1018         against prefix of attribute reference, because the target type
1019         may be otherwise constrained.
1021 2015-03-04  Robert Dewar  <dewar@adacore.com>
1023         * atree.h: Add entries for Flag287-Flag309.
1024         * einfo.adb: Add (unused) flags Flag287-Flag309.
1026 2015-03-04  Ed Schonberg  <schonberg@adacore.com>
1028         * sem_util.adb (Collect_Interfaces, Collect): When gathering
1029         interfaces of ancestors, handle properly a subtype of a private
1030         extension.
1032 2015-03-04  Robert Dewar  <dewar@adacore.com>
1034         * einfo.adb (Is_ARECnF_Entity): New flag (ARECnF is an extra formal).
1035         (Next_Formal): Don't return ARECnF formal.
1036         (Last_Formal): Don't consider ARECnF formal.
1037         (Next_Formal_With_Extras): Do consider ARECnF formal.
1038         * einfo.ads (Is_ARECnF_Entity): New flag (ARECnF is an extra formal).
1039         * exp_unst.adb (Create_Entities): Set Is_ARECnF_Entity flag.
1041 2015-03-04  Javier Miranda  <miranda@adacore.com>
1043         * exp_ch6.adb (Expand_Simple_Function_Return): When the returned
1044         object is a class-wide interface object and we generate the
1045         accessibility described in RM 6.5(8/3) then displace the pointer
1046         to the object to reference the base of the object (to get access
1047         to the TSD of the object).
1049 2015-03-04  Hristian Kirtchev  <kirtchev@adacore.com>
1051         * sem_prag.adb (Analyze_Abstract_State): Use routine
1052         Malformed_State_Error to issue general errors.
1053         (Analyze_Pragma): Diagnose a syntax error related to a state
1054         declaration with a simple option.
1055         (Malformed_State_Error): New routine.
1057 2015-03-04  Robert Dewar  <dewar@adacore.com>
1059         * a-strsup.adb (Super_Slice): Deal with super flat case.
1060         * einfo.ads: Minor reformatting.
1061         * s-imgdec.adb (Set_Decimal_Digits): Add comment about possibly
1062         redundant code.
1064 2015-03-04  Claire Dross  <dross@adacore.com>
1066         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
1067         a-cforse.ads, a-cofove.ads: Use Default_Initial_Condition on formal
1068         containers.
1070 2015-03-04  Ed Schonberg  <schonberg@adacore.com>
1072         * sem_warn.adb (Check_References): When checking for an unused
1073         in-out parameter of a class- wide type, use its type to determine
1074         whether it is private, in order to avoid a spurious warning when
1075         subprogram spec and body are in different units.
1077 2015-03-04  Yannick Moy  <moy@adacore.com>
1079         * sem_attr.adb: Improve warning messages.
1081 2015-03-04  Robert Dewar  <dewar@adacore.com>
1083         * exp_ch6.adb (Expand_N_Subprogram_Body): Avoid trying to unnest
1084         generic subprograms.
1085         * exp_unst.adb (Check_Dynamic_Type): Handle record types properly
1086         (Note_Uplevel_Reference): Ignore uplevel references to non-types
1087         (Get_Level): Consider only subprograms, not blocks.
1088         (Visit_Node): Set proper condition for generating ARECnF entity.
1089         Ignore indirect calls. Ignore calls to subprograms
1090         outside our nest.
1091         (Unnest_Subprogram): Minor changes in dealing with ARECnF entity.
1092         (Add_Form_To_Spec): Properly set Last_Entity field.
1093         (Unnest_Subprogram): Set current subprogram scope for analyze calls.
1094         Handle case of no uplevel refs in outer subprogram
1095         Don't mark uplevel entities as aliased.
1096         Don't deal with calls with no ARECnF requirement.
1098 2015-03-04  Robert Dewar  <dewar@adacore.com>
1100         * s-valrea.adb (Scan_Real): Remove redundant tests from scaling loops.
1101         * s-imgdec.adb (Set_Decimal_Digits): Remove redundant Max
1102         operation in computing LZ.
1103         * sem_attr.adb: Minor typo fix
1105 2015-03-04  Robert Dewar  <dewar@adacore.com>
1107         * exp_ch7.adb: Minor reformatting.
1108         * exp_unst.adb (Build_Tables): Fix minor glitch for no separate
1109         spec case.
1110         * erroutc.adb (Delete_Msg): add missing decrement of info msg counter.
1112 2015-03-04  Hristian Kirtchev  <kirtchev@adacore.com>
1114         * exp_ch6.adb (Build_Pragma_Check_Equivalent): Suppress
1115         references to formal parameters subject to pragma Unreferenced.
1116         (Suppress_Reference): New routine.
1117         * sem_attr.adb (Analyze_Attribute): Reimplement the analysis
1118         of attribute 'Old. Attributes 'Old and 'Result now share
1119         common processing.
1120         (Analyze_Old_Result_Attribute): New routine.
1121         (Check_Placement_In_Check): Removed.
1122         (Check_Placement_In_Contract_Cases): Removed.
1123         (Check_Placement_In_Test_Case): Removed.
1124         (Check_Use_In_Contract_Cases): Removed.
1125         (Check_Use_In_Test_Case): Removed.
1126         (In_Refined_Post): Removed.
1127         (Is_Within): Removed.
1128         * sem_warn.adb (Check_Low_Bound_Tested): Code cleanup.
1129         (Check_Low_Bound_Tested_For): New routine.
1131 2015-03-04  Hristian Kirtchev  <kirtchev@adacore.com>
1133         * exp_ch3.adb (Expand_N_Object_Declaration):
1134         Generate a runtime check to test the expression of pragma
1135         Default_Initial_Condition when the object is default initialized.
1137 2015-03-02  Robert Dewar  <dewar@adacore.com>
1139         * scng.adb (Scan): Ignore illegal character in relaxed
1140         semantics mode.
1142 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
1144         * sem_ch4.adb (Analyze_Set_Membership); Retain Overloaded flag
1145         on left operand, so it can be properly resolved with type of
1146         alternatives of right operand.
1147         * sem_res.adb (Resolve_Set_Membership): Handle properly an
1148         overloaded left-hand side when the alternatives on the right
1149         hand side are literals of some universal type.  Use first
1150         non-overloaded alternative to find expected type.
1152 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
1154         * exp_ch7.adb (Make_Set_Finalize_Address_Call): Use underlying
1155         type to retrieve designated type, because the purported access
1156         type may be a partial (private) view, when it is declared in
1157         the private part of a nested package, and finalization actions
1158         are generated when completing compilation of enclosing unit.
1160 2015-03-02  Robert Dewar  <dewar@adacore.com>
1162         * back_end.adb (Call_Back_End): Remove previous patch,
1163         the back end now gets to see the result of -gnatd.1
1164         (Unnest_Subprogram_Mode) processing.
1165         * elists.ads, elists.adb (List_Length): New function.
1166         * exp_unst.ads, exp_unst.adb: Major changes, first complete version.
1167         * sem_util.adb (Check_Nested_Access): Handle formals in
1168         Unnest_Subprogram_Mode.
1169         (Adjust_Named_Associations): Minor reformatting.
1170         * sprint.adb (Sprint_Node_Actual): Fix failure to print aliased
1171         for parameters.
1173 2015-03-02  Robert Dewar  <dewar@adacore.com>
1175         * atree.ads, atree.adb (Uint24): New function
1176         (Set_Uint24): New procedure.
1177         * atree.h (Uint24): New macro for field access.
1178         * back_end.adb (Call_Back_End): For now, don't call back end
1179         if unnesting subprogs.
1180         * einfo.adb (Activation_Record_Component): New field
1181         (Subps_Index): New field.
1182         * einfo.ads (Activation_Record_Component): New field
1183         (Subps_Index): New field Minor reordering of comments into alpha order.
1184         * exp_unst.ads, exp_unst.adb: Continued development.
1186 2015-03-02  Gary Dismukes  <dismukes@adacore.com>
1188         * exp_disp.ads: Minor reformatting.
1190 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
1192         * sem_ch8.adb (Chain_Use_Clause): Do not chain use clause from
1193         ancestor to list of use clauses active in descendant unit if we
1194         are within the private part of an intervening parent, to prevent
1195         circularities in use clause list.
1197 2015-03-02  Javier Miranda  <miranda@adacore.com>
1199         * exp_ch9.adb (Build_Corresponding_Record): Propagate type
1200         invariants to the corresponding record type.
1201         * exp_disp.ad[sb] (Set_DT_Position_Value): New subprogram
1202         which sets the value of the DTC_Entity associated with a given
1203         primitive of a tagged type and propagates the value to the
1204         wrapped subprogram.
1205         (Set_DTC_Entity_Value): Propagate the DTC
1206         value to the wrapped entity.
1207         * sem_ch13.adb (Build_Invariant_Procedure): Append the code
1208         associated with invariants of progenitors.
1209         * sem_ch3.adb (Build_Derived_Record_Type): Inherit type invariants
1210         of parents and progenitors.
1211         (Process_Full_View): Check hidden inheritance of class-wide type
1212         invariants.
1213         * sem_ch7.adb (Analyze_Package_Specification): Do not generate
1214         the invariant procedure for interface types; build the invariant
1215         procedure for tagged types inheriting invariants from their
1216         progenitors.
1217         * sem_prag.adb (Pragma_Invariant) Allow invariants in interface
1218         types but do not build their invariant procedure since their
1219         invariants will be propagated to the invariant procedure of
1220         types covering the interface.
1221         * exp_ch6.adb, exp_disp.adb, sem_ch3.adb, sem_ch7.adb,
1222         sem_ch8.adb, sem_disp.adb: Replace all calls to Set_DT_Position
1223         by calls to Set_DT_Position_Value.
1225 2015-03-02  Hristian Kirtchev  <kirtchev@adacore.com>
1227         * sem_attr.adb (Analyze_Attribute): Factor out heavily indented
1228         code in Denote_Same_Function.  Do not analyze attribute 'Result
1229         when it is inside procedure _Postconditions.  Remove a misplaced
1230         warning diagnostic. Code cleanup.
1231         (Denote_Same_Function): New routine.
1232         * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Code
1233         cleanup. Warn on pre/postconditions on an inlined subprogram.
1234         (Analyze_Pragma, Refined_Post case): Warn on pre/postconditions on
1235         an inlined subprogram.
1236         (Analyze_Pre_Post_Condition_In_Decl_Part): Code cleanup. Warn on
1237         pre/post condition on an inlined subprogram.
1238         (Analyze_Test_Case_In_Decl_Part): Code cleanup. Warn on
1239         pre/postconditions on an inlined subprogram.
1240         (Check_Postcondition_Use_In_Inlined_Subprogram): New routine.
1242 2015-03-02  Hristian Kirtchev  <kirtchev@adacore.com>
1244         * sem_prag.adb (Ensure_Aggregate_Form):
1245         Ensure that the name denoted by the Chars of a pragma argument
1246         association has the proper Sloc when converted into an aggregate.
1248 2015-03-02  Bob Duff  <duff@adacore.com>
1250         * sem_ch6.adb (Check_Private_Overriding): Capture
1251         Incomplete_Or_Partial_View in a constant. This is cleaner and
1252         more efficient.
1254 2015-03-02  Gary Dismukes  <dismukes@adacore.com>
1256         * einfo.ads, exp_unst.ads: Minor reformatting.
1258 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
1260         * a-strsea.adb (Find_Token): Ensure that the range of iteration
1261         does not perform any improper character access. This prevents
1262         erroneous access in the unusual case of an empty string target
1263         and a From parameter less than Source'First.
1265 2015-03-02  Robert Dewar  <dewar@adacore.com>
1267         * elists.adb (List_Length): Fix incorrect result.
1269 2015-03-02  Bob Duff  <duff@adacore.com>
1271         * sem_ch6.adb (Check_Private_Overriding): Refine the legality
1272         checks here. It used to check that the function is merely
1273         overriding SOMEthing. Now it checks that the function is
1274         overriding a corresponding public operation. This is a correction
1275         to the implementation of the rule in RM-3.9.3(10).
1277 2015-03-02  Robert Dewar  <dewar@adacore.com>
1279         * debug.adb: Document new debug flag -gnatd.1.
1280         * einfo.ads, einfo.adb (Has_Nested_Subprogram): New flag.
1281         (Has_Uplevel_Reference): New flag (Is_Static_Type): New flag.
1282         (Uplevel_Reference_Noted):New flag (Uplevel_References): New field.
1283         * elists.ads elists.adb (List_Length): New function.
1284         * exp_ch6.adb (Expand_N_Subprogram_Body): Call Unnest_Subprogram
1285         when appropriate (Process_Preconditions): Minor code
1286         reorganization and reformatting
1287         * exp_unst.ads, exp_unst.adb: New files.
1288         * gnat1drv.adb (Adjust_Global_Switches): Set
1289         Unnest_Subprogram_Mode if -gnatd.1
1290         * namet.ads, namet.adb (Name_Find_Str): New version of Name_Find with
1291         string argument.
1292         * opt.ads (Unnest_Subprogram_Mode): New flag.
1293         * par-ch3.adb (P_Identifier_Declarations): Fixes to -gnatd.2 handling.
1294         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set
1295         Has_Nested_Subprogram flag.
1296         * sem_ch8.adb (Find_Direct_Name): New calling sequence for
1297         Check_Nested_Access.
1298         (Find_Selected_Component): Minor comment addition.
1299         * sem_util.adb (Check_Nested_Access): New version for use with Exp_Unst.
1300         (Note_Possible_Modification): New calling sequence for
1301         Check_Nested_Access.
1302         * sem_util.ads (Check_Nested_Access): New version for use with Exp_Unst.
1303         * gcc-interface/Make-lang.in (GNAT1_OBJS): Add exp_unst.o
1305 2015-03-02  Pierre-Marie de Rodat  <derodat@adacore.com>
1307         * gcc-interface/utils.c (gnat_pushdecl): For non-artificial pointer
1308         types, preserve the original type and create copies just like the C
1309         front-end does.  For artificial ones, do not define a name for
1310         the original type.
1311         (create_type_decl): When gnat_pushdecl made the input type the
1312         original type for the new declaration, do not define a stub
1313         declaration for it.
1314         * gcc-interface/utils2.c (build_binary_op): Accept two different
1315         pointer types when they point to the same type.
1317 2015-03-02  Hristian Kirtchev  <kirtchev@adacore.com>
1319         * exp_util.adb (Possible_Bit_Aligned_Component): Do not process
1320         an unanalyzed node.
1321         * sem_util.adb (Kill_Current_Values): Do not invalidate and
1322         de-null a constant.
1324 2015-03-02  Robert Dewar  <dewar@adacore.com>
1326         * sem_ch3.adb, exp_attr.adb, checks.adb, exp_aggr.adb: Minor
1327         reformatting.
1329 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
1331         * sem_ch8.adb: extend use of Available_Subtype.
1333 2015-03-02  Hristian Kirtchev  <kirtchev@adacore.com>
1335         * sem_prag.adb (Duplication_Error): Remove the special handling
1336         of 'Class or _Class in the context of pre/postconditions.
1337         (Process_Class_Wide_Condition): Remove the special handling of
1338         'Class or _Class in the context of pre/postconditions.
1339         * sem_util.adb (Original_Aspect_Pragma_Name): Names Pre_Class
1340         and Post_Class no longer need to be converted to _Pre and _Post.
1341         * sem_util.ads (Original_Aspect_Pragma_Name): Update the comment
1342         on usage.
1344 2015-03-02  Hristian Kirtchev  <kirtchev@adacore.com>
1346         * exp_ch6.adb (Process_Preconditions): Modify the
1347         mechanism that find the first source declaration to correct exit
1348         the loop once it has been found.
1350 2015-03-02  Gary Dismukes  <dismukes@adacore.com>
1352         * a-strsea.adb: Minor typo fix.
1354 2015-03-02  Bob Duff  <duff@adacore.com>
1356         * einfo.ads: Minor comment fixes.
1358 2015-03-02  Gary Dismukes  <dismukes@adacore.com>
1360         * einfo.adb, checks.adb: Minor reformatting and typo fixes.
1362 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
1364         * exp_aggr.adb (Get_Assoc_Expr): If the Default_Component_Value
1365         is defined for the array type, use it instead of a Default_Value
1366         specified for the component type itself.
1368 2015-03-02  Thomas Quinot  <quinot@adacore.com>
1370         * exp_attr.adb (Expand_N_Attribute_Reference, case Input): When
1371         expanding a 'Input attribute reference for a class-wide type,
1372         do not generate a separate object declaration for the controlling
1373         tag dummy object; instead, generate the expression inline in the
1374         dispatching call. Otherwise, the declaration (which involves a
1375         call to String'Input, returning a dynamically sized value on the
1376         secondary stack) will be expanded outside of proper secondary
1377         stack mark/release operations, and will thus cause a secondary
1378         stack leak.
1380 2015-03-02  Hristian Kirtchev  <kirtchev@adacore.com>
1382         * checks.adb (Add_Validity_Check): Change the names of all
1383         formal parameters to better illustrate their purpose. Update
1384         the subprogram documentation. Update all occurrences of the
1385         formal parameters. Generate a pre/postcondition pragma by
1386         calling Build_Pre_Post_Condition.
1387         (Build_PPC_Pragma): Removed.
1388         (Build_Pre_Post_Condition): New routine.
1389         * einfo.adb Node8 is no longer used as Postcondition_Proc. Node14
1390         is now used as Postconditions_Proc. Flag240 is now renamed to
1391         Has_Expanded_Contract.  (First_Formal): The routine can now
1392         operate on generic subprograms.
1393         (First_Formal_With_Extras): The routine can now operate on generic
1394         subprograms.
1395         (Has_Expanded_Contract): New routine.
1396         (Has_Postconditions): Removed.
1397         (Postcondition_Proc): Removed.
1398         (Postconditions_Proc): New routine.
1399         (Set_Has_Expanded_Contract): New routine.
1400         (Set_Has_Postconditions): Removed.
1401         (Set_Postcondition_Proc): Removed.
1402         (Set_Postconditions_Proc): New routine.
1403         (Write_Entity_Flags): Remove the output of Has_Postconditions. Add
1404         the output of Has_Expanded_Contract.
1405         (Write_Field8_Name): Remove the output of Postcondition_Proc.
1406         (Write_Field14_Name): Add the output of Postconditions_Proc.
1407         * einfo.ads New attributes Has_Expanded_Contract and
1408         Postconditions_Proc along with occurrences in entities.
1409         Remove attributes Has_Postconditions and Postcondition_Proc
1410         along with occurrences in entities.
1411         (Has_Expanded_Contract): New routine along with pragma Inline.
1412         (Has_Postconditions): Removed along with pragma Inline.
1413         (Postcondition_Proc): Removed along with pragma Inline.
1414         (Postconditions_Proc): New routine along with pragma Inline.
1415         (Set_Has_Expanded_Contract): New routine along with pragma Inline.
1416         (Set_Has_Postconditions): Removed along with pragma Inline.
1417         (Set_Postcondition_Proc): Removed along with pragma Inline.
1418         (Set_Postconditions_Proc): New routine along with pragma Inline.
1419         * exp_ch6.adb (Add_Return): Code cleanup. Update the
1420         generation of the call to the _Postconditions routine of
1421         the procedure.  (Expand_Non_Function_Return): Reformat the
1422         comment on usage. Code cleanup.  Update the generation of
1423         the call to the _Postconditions routine of the procedure or
1424         entry [family].
1425         (Expand_Simple_Function_Return): Update the
1426         generation of the _Postconditions routine of the function.
1427         (Expand_Subprogram_Contract): Reimplemented.
1428         * exp_ch6.ads (Expand_Subprogram_Contract): Update the parameter
1429         profile along the comment on usage.
1430         * exp_ch9.adb (Build_PPC_Wrapper): Code cleanup.
1431         (Expand_N_Task_Type_Declaration): Generate pre/postconditions
1432         wrapper when the entry [family] has a contract with
1433         pre/postconditions.
1434         * exp_prag.adb (Expand_Attributes_In_Consequence): New routine.
1435         (Expand_Contract_Cases): This routine and its subsidiaries now
1436         analyze all generated code.
1437         (Expand_Old_In_Consequence): Removed.
1438         * sem_attr.adb Add with and use clause for Sem_Prag.
1439         (Analyze_Attribute): Reimplment the analysis of attribute 'Result.
1440         (Check_Use_In_Test_Case): Use routine Test_Case_Arg to obtain
1441         "Ensures".
1442         * sem_ch3.adb (Analyze_Declarations): Analyze the contract of
1443         a generic subprogram.
1444         (Analyze_Object_Declaration): Do not create a contract node.
1445         (Derive_Subprogram): Do not create a contract node.
1446         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Do
1447         not create a contract node.
1448         (Analyze_Completion_Contract): New routine.
1449         (Analyze_Function_Return): Alphabetize.
1450         (Analyze_Generic_Subprogram_Body): Alphabetize. Do not create a
1451         contract node.  Do not copy pre/postconditions to the original
1452         generic template.
1453         (Analyze_Null_Procedure): Do not create a contract node.
1454         (Analyze_Subprogram_Body_Contract): Reimplemented.
1455         (Analyze_Subprogram_Body_Helper): Do not mark the enclosing scope
1456         as having postconditions. Do not create a contract node. Analyze
1457         the subprogram body contract of a body that acts as a compilation
1458         unit. Expand the subprogram contract after the declarations have
1459         been analyzed.
1460         (Analyze_Subprogram_Contract): Reimplemented.
1461         (Analyze_Subprogram_Specification): Do not create a contract node.
1462         (List_Inherited_Pre_Post_Aspects): Code cleanup.
1463         * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Update the
1464         comment on usage.
1465         (Analyze_Subprogram_Contract): Update the
1466         parameter profile and the comment on usage.
1467         * sem_ch7.adb (Analyze_Package_Body_Helper): Do not create a
1468         contract node.
1469         (Analyze_Package_Declaration): Do not create a
1470         contract node.
1471         (Is_Subp_Or_Const_Ref): Ensure that the prefix has an entity.
1472         * sem_ch8.adb (Analyze_Subprogram_Renaming): Do not create a
1473         contract node.
1474         * sem_ch9.adb (Analyze_Entry_Declaration): Do not create a
1475         contract node.
1476         * sem_ch10.adb (Analyze_Compilation_Unit): Move local variables to
1477         their proper section and alphabetize them. Analyze the contract of
1478         a [generic] subprogram after all Pragmas_After have been analyzed.
1479         (Analyze_Subprogram_Body_Stub_Contract): Alphabetize.
1480         * sem_ch12.adb (Analyze_Generic_Package_Declaration): Do not
1481         create a contract node.
1482         (Analyze_Generic_Subprogram_Declaration):
1483         Alphabetize local variables. Do not create a contract
1484         node. Do not generate aspects out of pragmas for ASIS.
1485         (Analyze_Subprogram_Instantiation): Instantiate
1486         the contract of the subprogram.  Do not create a
1487         contract node.  (Instantiate_Contract): New routine.
1488         (Instantiate_Subprogram_Body): Alphabetize local variables.
1489         (Save_Global_References_In_Aspects): New routine.
1490         (Save_References): Do not save the global references found within
1491         the aspects of a generic subprogram.
1492         * sem_ch12.ads (Save_Global_References_In_Aspects): New routine.
1493         * sem_ch13.adb (Analyze_Aspect_Specifications): Do not use
1494         Original_Node for establishing linkages.
1495         (Insert_Pragma): Insertion in a subprogram body takes precedence over
1496         the case where the subprogram body is also a compilation unit.
1497         * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Use
1498         Get_Argument to obtain the proper expression. Install the generic
1499         formals when the related context is a generic subprogram.
1500         (Analyze_Depends_In_Decl_Part): Use Get_Argument to obtain
1501         the proper expression. Use Corresponding_Spec_Of to obtain
1502         the spec. Install the generic formal when the related context
1503         is a generic subprogram.
1504         (Analyze_Global_In_Decl_Part): Use Get_Argument to obtain the proper
1505         expression. Use Corresponding_Spec_Of to obtain the spec. Install the
1506         generic formal when the related context is a generic subprogram.
1507         (Analyze_Initial_Condition_In_Decl_Part): Use Get_Argument
1508         to obtain the proper expression. Remove the call to
1509         Check_SPARK_Aspect_For_ASIS as the analysis is now done
1510         automatically.
1511         (Analyze_Pragma): Update all occurrences
1512         to Original_Aspect_Name. Pragmas Contract_Cases, Depends,
1513         Extensions_Visible, Global, Postcondition, Precondition and
1514         Test_Case now carry generic templates when the related context
1515         is a generic subprogram. The same pragmas are no longer
1516         forcefully fully analyzed when the context is a subprogram
1517         that acts as a compilation unit. Pragmas Abstract_State,
1518         Initial_Condition, Initializes and Refined_State have been clean
1519         up. Pragmas Post, Post_Class, Postcondition, Pre, Pre_Class
1520         and Precondition now use the same routine for analysis. Pragma
1521         Refined_Post does not need to check the use of 'Result or
1522         the lack of a post-state in its expression. Reimplement the
1523         analysis of pragma Test_Case.
1524         (Analyze_Pre_Post_Condition): New routine.
1525         (Analyze_Pre_Post_Condition_In_Decl_Part):
1526         Reimplemented.
1527         (Analyze_Refined_Depends_In_Decl_Part): Use Get_Argument to obtain the
1528         proper expression.
1529         (Analyze_Refined_Global_In_Decl_Part): Use Get_Argument to obtain
1530         the proper expression.
1531         (Analyze_Test_Case_In_Decl_Part): Reimplemented.
1532         (Check_Pre_Post): Removed.
1533         (Check_Precondition_Postcondition): Removed.
1534         (Check_SPARK_Aspect_For_ASIS): Removed.
1535         (Check_Test_Case): Removed.
1536         (Collect_Subprogram_Inputs_Outputs): Use Get_Argument
1537         to obtain the proper expression. Use Corresponding_Spec_Of to
1538         find the proper spec.
1539         (Create_Generic_Template): New routine.
1540         (Duplication_Error): New routine.
1541         (Expression_Function_Error): New routine.
1542         (Find_Related_Subprogram_Or_Body): Moved to the spec
1543         of Sem_Prag. Emit precise error messages. Account for cases of
1544         rewritten expression functions, generic instantiations, handled
1545         sequence of statements and pragmas from aspects.
1546         (Get_Argument): New routine.
1547         (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Removed.
1548         (Preanalyze_CTC_Args): Removed.
1549         (Process_Class_Wide_Condition): New routine.
1550         * sem_prag.ads (Analyze_Test_Case_In_Decl_Part): Update
1551         the parameter profile along with the comment on usage.
1552         (Find_Related_Subprogram_Or_Body): Moved from the body of Sem_Prag.
1553         (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Removed.
1554         (Test_Case_Arg): New routine.
1555         * sem_util.adb Add with and use clauses for Sem_Ch6.
1556         (Add_Contract_Item): This routine now creates a contract
1557         node the first time an item is added. Remove the duplicate
1558         aspect/pragma checks.
1559         (Check_Result_And_Post_State): Reimplemented.
1560         (Corresponding_Spec_Of): New routine.
1561         (Get_Ensures_From_CTC_Pragma): Removed.
1562         (Get_Requires_From_CTC_Pragma): Removed.
1563         (Has_Significant_Contract): New routine.
1564         (Inherit_Subprogram_Contract): Inherit only if the source
1565         has a contract.
1566         (Install_Generic_Formals): New routine.
1567         (Original_Aspect_Name): Removed.
1568         (Original_Aspect_Pragma_Name): New routine.
1569         * sem_util.ads (Check_Result_And_Post_State): Reimplemented.
1570         (Corresponding_Spec_Of): New routine.
1571         (Get_Ensures_From_CTC_Pragma): Removed.
1572         (Get_Requires_From_CTC_Pragma): Removed.
1573         (Has_Significant_Contract): New routine.
1574         (Install_Generic_Formals): New routine.
1575         (Original_Aspect_Name): Removed.
1576         (Original_Aspect_Pragma_Name): New routine.
1577         * sem_warn.adb Add with and use clauses for Sem_Prag.
1578         (Within_Postcondition): Use Test_Case_Arg to extract "Ensures".
1580 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
1582         * sem_ch8.adb (Available_Subtype): Optimization in
1583         Find_Selected_Component: when safe, use existing subtype of
1584         array component, possibly discriminant-dependent, rather than
1585         creating new subtype declaration for it. In this fashion different
1586         occurrences of the component have the same subtype, rather than
1587         just equivalent ones. Simplifies value tracing in GNATProve.
1589 2015-03-01  Arnaud Charlet  <charlet@adacore.com>
1591         PR ada/65259
1593         * doc/gnat_ugn/gnat_project_manager.rst,
1594         doc/gnat_ugn/platform_specific_information.rst: Remove reference to
1595         image, too troublesome with texi format.
1596         * gnat_ugn.texi: Regenerate.
1598 2015-02-24  Thomas Schwinge  <thomas@codesourcery.com>
1600         PR libgomp/64625
1601         * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8): Remove.
1602         (DEF_FUNCTION_TYPE_VAR_12): Likewise.
1603         (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
1605 2015-02-23  Thomas Schwinge  <thomas@codesourcery.com>
1607         * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8): Fix number of
1608         arguments parameter.
1609         (DEF_FUNCTION_TYPE_VAR_12): Likewise.
1611 2015-02-22  Arnaud Charlet  <charlet@adacore.com>
1613         * doc/Makefile: postprocess texinfo files to update @dircategory
1614         and update texi files under gcc/ada.
1615         * gnat_ugn.texi, gnat_rm.texi: Regenerated.
1617 2015-02-22  Arnaud Charlet  <charlet@adacore.com>
1619         * doc/gnat_ugn/project-manager-figure.png,
1620         doc/gnat_ugn/rtlibrary-structure.png: New.
1622 2015-02-22  Tom de Vries  <tom@codesourcery.com>
1624         PR ada/65100
1625         * gnat-style.texi (@subsection Loop Statements): Replace @noindent by
1626         @item, and fix warning '@itemize has text but no @item'.
1628 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
1630         * sem_prag.adb (Analyze_Pragma, case Obsolescent): Pragma
1631         legally applies to an abstract subprogram declaration.
1632         * freeze.adb: Minor comment addition.
1634 2015-02-20  Robert Dewar  <dewar@adacore.com>
1636         * errout.ads: Document replacement of Name_uPre/Post/Type_Invariant.
1637         * erroutc.adb (Set_Msg_Str): Replace _xxx.
1638         (Pre/Post/Type_Invariant) by xxx'Class.
1639         * erroutc.ads (Set_Msg_Str): Replace _xxx.
1640         (Pre/Post/Type_Invariant) by xxx'Class.
1641         * sem_prag.adb (Fix_Error): Remove special casing of
1642         Name_uType_Invariant.
1643         (Analyze_Pre_Post_Condition_In_Decl_Part): Remove special casing of
1644         Name_uPre and Name_uPost in aspect case (done in Errout now).
1646 2015-02-20  Robert Dewar  <dewar@adacore.com>
1648         * g-alveop.adb: Minor style fixes.
1650 2015-02-20  Robert Dewar  <dewar@adacore.com>
1652         * freeze.adb (Warn_Overlay): Guard against blow up with address
1653         clause.
1655 2015-02-20  Bob Duff  <duff@adacore.com>
1657         * exp_attr.adb (May_Be_External_Call): Remove this. There is no need
1658         for the compiler to guess whether the call is internal or external --
1659         it is always external.
1660         (Expand_Access_To_Protected_Op): For P'Access, where P
1661         is a protected subprogram, always create a pointer to the
1662         External_Subprogram.
1664 2015-02-20  Robert Dewar  <dewar@adacore.com>
1666         * a-dispat.adb, a-stcoed.ads: Minor reformatting.
1668 2015-02-20  Robert Dewar  <dewar@adacore.com>
1670         * sem_ch13.adb (Build_Discrete_Static_Predicate): Allow static
1671         predicate for non-static subtype.
1672         (Build_Predicate_Functions): Do not assume subtype associated with a
1673         static predicate must be static.
1675 2015-02-20  Robert Dewar  <dewar@adacore.com>
1677         * errout.adb (Set_Msg_Node): Better handling of internal names
1678         (Set_Msg_Node): Kill message when we cannot eliminate internal name.
1679         * errout.ads: Document additional case of message deletion.
1680         * namet.adb (Is_Internal_Name): Refined to consider wide
1681         strings in brackets notation and character literals not to be
1682         internal names.
1683         * sem_ch8.adb (Find_Selected_Component): Give additional error
1684         when selector name is a subprogram whose first parameter has
1685         the same type as the prefix, but that type is untagged.
1687 2015-02-20  Robert Dewar  <dewar@adacore.com>
1689         * g-allein.ads, g-alveop.adb, g-alveop.ads, opt.ads: Minor reformatting
1691 2015-02-20  Tristan Gingold  <gingold@adacore.com>
1693         * opt.ads (GNAT_Mode_Config): New variable.
1694         * opt.adb (Set_Opt_Config_Switches): Consider GNAT_Mode_Config
1695         to set Assertions_Enabled.
1696         * switch-c.adb (Scan_Front_End_Switches): Set GNAT_Mode_Config
1697         for -gnatg.
1699 2015-02-20  Robert Dewar  <dewar@adacore.com>
1701         * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Add an additional
1702         comment regarding the handling of unterminated fixed-point
1703         constants.
1704         * s-valuns.ads (Scan_Raw_Unsigned): Add comments
1705         corresponding to those previously added for
1706         System.Val_LLU.Scan_Raw_Long_Long_Unsigned.
1708 2015-02-20  Olivier Hainque  <hainque@adacore.com>
1710         * g-allein.ads, g-alveop.ads, g-alveop.adb: Code clean ups.
1712 2015-02-20  Robert Dewar  <dewar@adacore.com>
1714         * sem_prag.adb: Minor comment clarification.
1716 2015-02-20  Olivier Hainque  <hainque@adacore.com>
1718         * g-allein.ads (vec_ctf, vec_vcsfx, vec_vcfux): Remove.
1719         * g-alleve.ads, g-alleva.adb (vcfux): Likewise.
1720         * g-alveop.ads (vec_vcfsx, vec_vcfux): Just rename the ll versions.
1721         (vec_ctf): Now renamings as well.
1723 2015-02-20  Robert Dewar  <dewar@adacore.com>
1725         * switch-c.adb, bindgen.adb: Minor reformatting.
1727 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
1729         * sem_prag.adb (Analyze_Pragma, case Type_Invariant):
1730         Invariant'class is allowed on an abstract type.
1732 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
1734         * sem_ch3.adb (Access_Definition): If the access definition is
1735         for a protected component and defines an access to protected
1736         subprogram, do not create an itype reference for it because a
1737         full type declaration will be built in order to generate the
1738         proper equivalent type.
1739         (Analyze_Subtype_Declaration): Add information of incomplete
1740         subtypes, for Ada 2012 extended uses of incomplete types.
1742 2015-02-20  Gary Dismukes  <dismukes@adacore.com>
1744         * sem_res.adb: Minor reformatting.
1746 2015-02-20  Vincent Celier  <celier@adacore.com>
1748         * switch-c.adb (Scan_Front_End_Switches): When comparing runtime
1749         path name for several switches --RTS, use the normalized path
1750         names.
1752 2015-02-20  Vincent Celier  <celier@adacore.com>
1754         * bindgen.adb: Minor reformatting and code reorganization.
1756 2015-02-20  Jose Ruiz  <ruiz@adacore.com>
1758         * a-stcoed.ads: Add spec for this package (Unimplemented_Unit).
1759         * impunit.adb (Non_Imp_File_Names_12): Mark unit a-stcoed.ads as
1760         defined by Ada 2012.
1762 2015-02-20  Arnaud Charlet  <charlet@adacore.com>
1764         * sysdep.c, expect.c, s-oscons-tmplt.c, gsocket.h, adaint.c: Remove
1765         obsolete references to RTX, nucleus, VMS.
1767 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
1769         * sem_prag.adb (Fix_Error): For an illegal Type_Invariant'Class
1770         aspect, use name that mentions Class explicitly, rather than
1771         compiler-internal name.
1773 2015-02-20  Robert Dewar  <dewar@adacore.com>
1775         * debug.adb: Add documentation for -gnatd.2 (allow statements
1776         in decl sequences).
1777         * par-ch3.adb (P_Identifier_Declarations): Handle
1778         statement appearing where declaration expected more cleanly.
1779         (Statement_When_Declaration_Expected): Implement debug flag
1780         -gnatd.2.
1782 2015-02-20  Jose Ruiz  <ruiz@adacore.com>
1784         * a-dinopr.ads: Add spec for this package (Unimplemented_Unit).
1785         * a-dispat.ads (Yield): Include procedure added in Ada 2012.
1786         * a-dispat.adb (Yield): Implement procedure added in Ada 2012.
1787         * impunit.adb (Non_Imp_File_Names_05): Mark unit a-dinopr.ads as
1788         defined by Ada 2005.
1789         * snames.ads-tmpl (Name_Non_Preemptive_FIFO_Within_Priorities):
1790         This is the correct name for the dispatching policy (FIFO was
1791         missing).
1793 2015-02-20  Javier Miranda  <miranda@adacore.com>
1795         * sem_res.adb (Resolve_Type_Conversion): If the type of the
1796         operand is the limited-view of a class-wide type then recover
1797         the class-wide type of the non-limited view.
1799 2015-02-20  Arnaud Charlet  <charlet@adacore.com>
1801         * gcc-interface/Makefile.in: Remove references to nucleus.
1802         * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Procedure): Set
1803         extern_flag to true for Inline_Always subprograms with
1804         Intrinsic convention.
1806 2015-02-20  Yannick Moy  <moy@adacore.com>
1808         * sem_prag.ads: Minor typo in comment.
1810 2015-02-20  Pascal Obry  <obry@adacore.com>
1812         * s-osprim-mingw.adb: Fix Get_Base_Time parameter mode.
1814 2015-02-20  Vincent Celier  <celier@adacore.com>
1816         * makeutl.adb (Get_Directories.Add_Dir): Add a directory only
1817         if it exists.
1819 2015-02-20  Robert Dewar  <dewar@adacore.com>
1821         * sem_eval.ads: Minor reformatting.
1823 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
1825         * freeze.adb (Size_Known): Do not set the packed size for
1826         independent type or component.
1827         (Freeze_Array_Type): Check for Independent[_Components] with packing
1828         or explicit component size clause.
1829         * gnat1drv.adb (Post_Compilation_Validation_Checks): Do the validation
1830         of independence pragmas only for non-GCC back-ends.
1831         * sem_ch13.adb (Initialize): Likewise for the initialization.
1832         * sem_prag.adb (Record_Independence_Check): New procedure to record an
1833         independence check in the table.
1834         (Analyze_Pragma): Use it throughout instead of doing it manually.
1835         * gcc-interface/decl.c (gnat_to_gnu_field): Add support for
1836         independent type or component.
1838 2015-02-20  Thomas Quinot  <quinot@adacore.com>
1840         * adaint.c (__gnat_readdir): For Solaris, use 64 bit variants of
1841         struct direct and readdir. This is required for NFS filesystems
1842         mounted from servers that use 64-bit cookies.
1844 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
1846         * sem_ch12.adb (Analyze_Subprogram_Instantiaion): New subprogram
1847         Build_Subprogram_Renaming, to create renaming of subprogram
1848         instance in the the declaration of the wrapper package rather
1849         than in its body, so that it is available for analysis of aspects
1850         propagated from generic to instantiation.
1851         (Check_Mismatch): An actual for a formal package that is an
1852         incomplete type matches a formal type that is incomplete.
1853         (Instantiate_Package_Body): Move code that builds subprogram
1854         renaming to Analyze_Subprogram_Instantiation.
1855         (Instantiate_Type): The generated subtype is a limited view if
1856         the actual is a limited view.
1857         (Load_Parent_Of_Generic): Retrieve instance declaration from
1858         its new position within wrapper package.
1860 2015-02-20  Arnaud Charlet  <charlet@adacore.com>
1862         * s-parame-vxworks.adb, s-os_lib.ads: Update comments.
1864 2015-02-20  Robert Dewar  <dewar@adacore.com>
1866         * s-osinte-vxworks.ads (To_Timespec): Add comment about the
1867         issue of negative arguments.
1869 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
1871         * gnat1drv.adb: Minor consistency fix.
1873 2015-02-20  Pascal Obry  <obry@adacore.com>
1875         * s-osprim-mingw.adb (Get_Base_Time): Properly release lock in all
1876         paths.
1878 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
1880         * inline.adb (Expand_Inlined_Call): Skip again calls to subprogram
1881         renamings.
1882         * exp_ch6.adb (Expand_Call): Use back-end inlining
1883         instead of expansion for simple subprogram renamings.
1885 2015-02-20  Robert Dewar  <dewar@adacore.com>
1887         * exp_util.adb: Minor reformatting.
1889 2015-02-20  Vincent Celier  <celier@adacore.com>
1891         * switch-c.adb (Scan_Front_End_Switches): Do not fail when --RTS=
1892         is specified several times with different values that indicates
1893         the same runtime directory.
1895 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
1897         * sem_attr.adb (Check_Not_Incomplete_Type): Clean up code to
1898         handle properly illegal uses of attributes on prefixes on an
1899         incomplete type, both when the type of the prefix is locally
1900         incomplete, and when it is a limited view of a type whose
1901         non-limited view is not available.
1902         (Analyze_Attribute): Add calls to Check_Not_Incomplete_Type for
1903         'Address and others.
1905 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
1907         * exp_ch6.adb: Fix minor typo in comment.
1909 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
1911         * sinfo.ads: Add comment.
1913 2015-02-20  Olivier Hainque  <hainque@adacore.com>
1915         * opt.ads: Replace Opt.Suppress_All_Inlining by two separate
1916         flags controlling the actual FE inlining out of pragma Inline
1917         and pragma Inline_Always.
1918         * adabkend.adb (Scan_Compiler_Arguments): Set both flags to True
1919         on -fno-inline, which disables all inlining in compilers with
1920         an Ada back-end and without back-end inlining support.
1921         * back_end.adb (Scan_Back_End_Switches): Set the Inline related
1922         flag to True on -fno-inline and leave Inline_Always alone for
1923         gcc back-ends.
1924         * back_end.ads (Scan_Compiler_Arguments): Adjust spec wrt the
1925         names of the Opt flags it sets.
1926         * gnat1drv.adb (Adjust_Global_Switches): Remove test on
1927         Opt.Suppress_All_Inlining in the Back_End_Inlining computation.
1928         * sem_prag.adb (Make_Inline): Remove early return conditioned
1929         on Opt.Suppress_All_Inlining.
1930         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Use the flags to
1931         disable the calls to Build_Body_To_Inline otherwise triggered
1932         by pragma Inline or Inline_Always. This will prevent actual
1933         front-end inlining of the subprogram on calls.
1935 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
1937         * exp_ch3.adb (Default_Initialize_Object): Call Add_Inlined_Body on the
1938         Abort_Undefer_Direct function.
1939         * exp_ch5.adb (Expand_N_Assignment_Statement): Likewise.
1940         * exp_intr.adb (Expand_Unc_Deallocation): Likewise.
1941         * exp_prag.adb (Expand_Pragma_Abort_Defer): Likewise.
1942         * exp_ch4.adb (Expand_N_Selected_Component): Adjust call to
1943         Add_Inlined_Body.
1944         * exp_ch6.adb (Expand_Call): Adjust calls to Add_Inlined_Body.
1945          Remove call to Register_Backend_Call and move code resetting
1946         Needs_Debug_Info on inlined subprograms to...
1947         * inline.ads (Add_Inlined_Body): Add N parameter.
1948         (Register_Backend_Call): Delete.
1949         * inline.adb (Add_Inlined_Body): ...here and simplify.
1950          Register the call with Backend_Calls directly.
1951         (Register_Backend_Call): Delete.
1952         * s-stalib.ads (Abort_Undefer_Direct): Restore pragma Inline.
1954 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
1956         * s-stalib.ads: Fix typo.
1958 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
1960         * exp_ch3.adb (Default_Initialize_Object): If the object has a
1961         delayed freeze, the actions associated with default initialization
1962         must be part of the freeze actions, rather that being inserted
1963         directly after the object declaration.
1965 2015-02-20  Robert Dewar  <dewar@adacore.com>
1967         * lib-load.adb: Minor comment update.
1969 2015-02-20  Vincent Celier  <celier@adacore.com>
1971         * prj-proc.adb (Process_Case_Construction): When there are
1972         incomplete withed projects and the case variable is unknown,
1973         skip the case construction.
1975 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
1977         * exp_ch6.adb (Expand_Actuals): Add caller-side invariant checks
1978         when an actual is a view conversion, either because the call is
1979         to an inherited operation, or because the actual is an explicit
1980         type conversion to an ancestor type.  Fixes ACATS 4.0D: C732001
1982 2015-02-20  Robert Dewar  <dewar@adacore.com>
1984         * einfo.ads: Minor comment updates Fix missing pragma Inline
1985         for Set_Partial_View_Has_Unknown_Discr.
1986         * einfo.adb (Write_Entity_Flags): Add missing entry for
1987         Partial_View_Has_Unknown_Discr.
1988         * sem_ch3.adb: Minor reformatting.
1990 2015-02-20  Vincent Celier  <celier@adacore.com>
1992         * opt.ads: Minor cleanup: remove mention of gprmake.
1993         * s-stalib.ads (Abort_Undefer_Direct): Do not inline.
1994         * s-tataat.adb: Do not call System.Tasking.Self but directly
1995         System.Task_Primitives.Operations.Self.
1997 2015-02-20  Arnaud Charlet  <charlet@adacore.com>
1999         * gnat_rm.texi, gnat_ugn.texi: Now automatically generated from
2000         sphinx in the doc directory.
2001         * doc: New directory containing sphinx versions of gnat_rm and gnat_ugn
2003 2015-02-20  Robert Dewar  <dewar@adacore.com>
2005         * sem_res.adb: Minor reformatting.
2006         * exp_ch9.adb (Build_Protected_Spec): Copy Aliased setting when
2007         building spec.
2008         * sem_ch13.adb (Analyze_Aspect_Specifications): Exclude Boolean
2009         aspects from circuitry setting delay required to false if the
2010         argument is an integer literal.
2012 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
2014         * einfo.ads. einfo.adb (Partial_View_Has_Unknown_Discr):  New flag
2015         on type entities, to enforce AI12-0133: default initialization
2016         of types whose partial view has unknown discriminants does not
2017         get an invariant check, because clients of the unit can never
2018         declare objects of such types.
2019         * sem_ch3.adb (Find_Type_Name); Set new flag
2020         Partial_View_Has_Unknown_Discr when needed.
2021         * exp_ch3.adb (Expand_N_Object_Declaration): Use flag to suppress
2022         generation of invariant call on default-initialized object.
2024 2015-02-08  Eric Botcazou  <ebotcazou@adacore.com>
2026         * gcc-interface/decl.c (gnat_to_gnu_param): Do not strip the padding
2027         if the parameter either is passed by reference or if the alignment
2028         would be lowered.
2030 2015-02-08  Eric Botcazou  <ebotcazou@adacore.com>
2032         * gcc-interface/decl.c (is_cplusplus_method): Use Is_Primitive flag to
2033         detect primitive operations of tagged and untagged types.
2035 2015-02-08  Eric Botcazou  <ebotcazou@adacore.com>
2037         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not bother about alias
2038         sets in presence of derivation for subprogram types.
2040 2015-02-08  Eric Botcazou  <ebotcazou@adacore.com>
2042         * gcc-interface/utils.c (begin_subprog_body): Assert that the body is
2043         present in the same context as the declaration.
2045 2015-02-07  Jakub Jelinek  <jakub@redhat.com>
2047         PR middle-end/64340
2048         * gcc-interface/trans.c (gigi): Recreate optimization_default_node
2049         and optimization_current_node after tweaking global_options.
2051 2015-02-05  Robert Dewar  <dewar@adacore.com>
2053         * prj-proc.adb, sem_aux.adb, exp_ch9.adb, errout.adb, prj-dect.adb,
2054         prj-nmsc.adb: Minor reformatting.
2056 2015-02-05  Ed Schonberg  <schonberg@adacore.com>
2058         * sem_type.adb (Covers): In ASIS_Mode the Corresponding_Record
2059         of a protected type may not be available, so to check conformance
2060         with an interface type, examine the interface list in the type
2061         declaration directly.
2062         (Write_Overloads): Improve information for indirect calls,
2063         for debugger use.
2065 2015-02-05  Ed Schonberg  <schonberg@adacore.com>
2067         * exp_ch3.adb (Make_Tag_Assignment): Do not perform this
2068         expansion activity in ASIS mode.
2070 2015-02-05  Javier Miranda  <miranda@adacore.com>
2072         * errout.adb (Error_Msg_PT): Add missing error.
2073         * sem_ch6.adb (Check_Synchronized_Overriding): Check the missing
2074         RM rule.  Code cleanup.
2075         * exp_ch9.adb (Build_Wrapper_Spec): Propagate "constant" in
2076         anonymous access types.  Found working on the tests. Code cleanup.
2078 2015-02-05  Vincent Celier  <celier@adacore.com>
2080         * prj-dect.adb (Parse_Attribute_Declaration): Continue scanning
2081         when there are incomplete withs.
2082         * prj-nmsc.adb (Process_Naming): Do not try to get the value
2083         of an element when it is nil.
2084         (Check_Naming): Do not check a nil suffix for illegality
2085         * prj-proc.adb (Expression): Do not process an empty term.
2086         * prj-strt.adb (Attribute_Reference): If attribute cannot be
2087         found, parse a possible index to avoid cascading errors.
2089 2015-02-05  Ed Schonberg  <schonberg@adacore.com>
2091         * sem_aux.adb (Is_Derived_Type): A subprogram_type generated
2092         for an access_to_subprogram declaration is not a derived type.
2094 2015-02-05  Robert Dewar  <dewar@adacore.com>
2096         * errout.adb (Error_Msg_Internal): For non-serious error set
2097         Fatal_Error to Ignored.
2098         * lib-load.adb (Load_Unit): Minor comment updates.
2099         * sem_ch10.adb (Analyze_With_Clause): Propagate Fatal_Error
2100         setting from with'ed unit to with'ing unit.
2101         * sem_prag.adb (Analyze_Pragma, case Warnings): Document handling
2102         of ambiguity.
2104 2015-02-05  Yannick Moy  <moy@adacore.com>
2106         * sem_prag.adb, par-prag.adb: Minor code clean up.
2108 2015-02-05  Yannick Moy  <moy@adacore.com>
2110         * par-prag.adb (Pragma_Warnings): Update for extended form
2111         of pragma Warnings. The "one" argument case may now have 2 or
2112         3 arguments.
2113         * sem_prag.adb (Analyze_Pragma/Pragma_Warnings): Update for
2114         extended form of pragma Warnings. Pragma with tool name is either
2115         rewritten as null or as an equivalent form without tool name,
2116         before reanalysis.
2117         * snames.ads-tmpl (Name_Gnatprove): New name.
2119 2015-02-05  Robert Dewar  <dewar@adacore.com>
2121         * sem_ch13.adb (Add_Invariants): Don't assume invariant is
2122         standard Boolean.
2123         * sem_prag.adb (Analyze_Pragma, case Check): Don't assume
2124         condition is standard Boolean, it can be non-standard derived
2125         Boolean.
2127 2015-02-05  Robert Dewar  <dewar@adacore.com>
2129         * checks.adb (Enable_Range_Check): Disconnect attempted
2130         optimization for the case of range check for subscript of
2131         unconstrained array.
2133 2015-02-05  Robert Dewar  <dewar@adacore.com>
2135         * par-ch13.adb (With_Present): New function
2136         (Aspect_Specifications_Present): Handle WHEN in place of WITH
2137         (Get_Aspect_Specifications): Comment update.
2138         * par.adb: Comment updates.
2140 2015-02-05  Robert Dewar  <dewar@adacore.com>
2142         * errout.adb (Handle_Serious_Error): New setting of Fatal_Error.
2143         * frontend.adb (Frontend): New setting of Fatal_Error.
2144         * lib-load.adb (Create_Dummy_Package_Unit): New setting of
2145         Fatal_Error.
2146         (Load_Main_Source): New setting of Fatal_Error
2147         (Load_Unit): New setting of Fatal_Error.
2148         * lib-writ.adb (Add_Preprocessing_Dependency): New setting of
2149         Fatal_Error.
2150         (Ensure_System_Dependency): New setting of Fatal_Error.
2151         * lib.adb (Fatal_Error): New setting of Fatal_Error
2152         (Set_Fatal_Error): New setting of Fatal_Error.
2153         * lib.ads: New definition of Fatal_Error and associated routines.
2154         * par-ch10.adb (P_Compilation_Unit): New setting of Fatal_Error.
2155         * par-load.adb (Load): New setting of Fatal_Error.
2156         * rtsfind.adb (Load_RTU): New setting of Fatal_Error.
2157         * sem_ch10.adb (Analyze_Compilation_Unit): New setting of
2158         Fatal_Error.
2159         (Optional_Subunit): New setting of Fatal_Error.
2160         (Analyze_Proper_Body): New setting of Fatal_Error.
2161         (Load_Needed_Body): New setting of Fatal_Error.
2163 2015-02-05  Ed Schonberg  <schonberg@adacore.com>
2165         * sem_res.adb (Resolve_Call): If the function being called has
2166         out parameters do not check for language version if the function
2167         comes from a predefined unit, as those are always compiled in
2168         Ada 2012 mode.
2170 2015-02-05  Ed Schonberg  <schonberg@adacore.com>
2172         * sem_ch3.adb (Process_Full_View): Verify that the full view
2173         of a type extension must carry an explicit limited keyword if
2174         the partial view does (RM 7.3 (10.1)).
2176 2015-02-05  Robert Dewar  <dewar@adacore.com>
2178         * g-rannum.adb, g-rannum.ads, s-rannum.adb, s-rannum.ads,
2179         sem_warn.ads: Minor reformatting.
2180         * exp_ch13.adb (Expand_N_Freeze_Entity): Add guard for aspect
2181         deleted by -gnatI.
2182         * sem_prag.adb (Analyze_Pragma, case Type_Invariant): Give
2183         error for abstract type.
2185 2015-02-05  Yannick Moy  <moy@adacore.com>
2187         * opt.ads (Warn_On_Suspicious_Contract): Update comment
2188         describing use.
2189         * sem_attr.adb (Analyze_Attribute/Attribute_Update): Warn on
2190         suspicious uses of 'Update.
2191         * sem_warn.adb, sem_warn.ads (Warn_On_Suspicious_Update): New
2192         function issues warning on suspicious uses of 'Update.
2193         * g-rannum.adb, g-rannum.ads, s-rannum.adb, s-rannum.ads: Mark
2194         package spec and body as SPARK_Mode Off.
2196 2015-02-05  Robert Dewar  <dewar@adacore.com>
2198         * sem_prag.adb (Set_Elab_Unit_Name): New name for Set_Unit_Name
2199         (Analyze_Pragma): Change Set_Unit_Name to Set_Elab_Unit_Name
2200         (Set_Elab_Unit_Name): Generate reference for Elaborate[_All]
2201         * sem_warn.adb (Warn_On_Unreferenced_Entity): Suppress warning
2202         for exported entity.
2204 2015-02-05  Hristian Kirtchev  <kirtchev@adacore.com>
2206         * sem_prag.adb (Check_Pragma_Conformance): Add
2207         local variable Arg. Ensure that all errors are associated with
2208         the pragma if it appears without an argument. Add comments on
2209         various cases.
2211 2015-02-05  Robert Dewar  <dewar@adacore.com>
2213         * lib-xref.adb: Minor reformatting.
2215 2015-02-05  Tristan Gingold  <gingold@adacore.com>
2217         PR ada/64349da/64349
2218         * env.c: Fix thinko: handle Darwin case before default one.
2220 2015-01-30  Robert Dewar  <dewar@adacore.com>
2222         * a-assert.adb: Minor reformatting.
2223         * sem_ch13.adb: Minor comment clarification.
2224         * types.ads: Minor comment update.
2225         * sem_eval.adb (Real_Or_String_Static_Predicate_Matches): Avoid blow up
2226         when we have a predicate that is nothing but an inherited dynamic
2227         predicate.
2229 2015-01-30  Jerome Guitton  <guitton@adacore.com>
2231         * gcc-interface/Makefile.in (x86-vxworks): Update GCC_SPEC_FILES to
2232         include cert link spec.
2234 2015-01-30  Robert Dewar  <dewar@adacore.com>
2236         * einfo.ads: Minor comment fix.
2237         * freeze.adb (Freeze_Profile): Add test for suspicious import
2238         in pure unit.
2239         * sem_prag.adb (Process_Import_Or_Interface): Test for suspicious
2240         use in Pure unit is now moved to Freeze (to properly catch
2241         Pure_Function exemption).
2243 2015-01-30  Bob Duff  <duff@adacore.com>
2245         * sem_res.ads: Minor comment fix.
2246         * sem_type.adb: sem_type.adb (Remove_Conversions): Need to
2247         check both operands of an operator.
2249 2015-01-30  Yannick Moy  <moy@adacore.com>
2251         * a-assert.ads, a-assert.adb: Mark package spec in SPARK. Set assertion
2252         policy for Pre to Ignore.
2253         (Assert): Add precondition.
2255 2015-01-30  Robert Dewar  <dewar@adacore.com>
2257         * sem_prag.adb (Process_Import_Or_Interface): Warn if used in
2258         Pure unit.
2259         * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Clarify
2260         documentation for some special cases of invalid attempts at
2261         based integers.
2263 2015-01-30  Gary Dismukes  <dismukes@adacore.com>
2265         * errout.ads: Minor reformatting.
2267 2015-01-30  Yannick Moy  <moy@adacore.com>
2269         * inline.adb (Process_Formals): Use the sloc of
2270         the inlined node instead of the sloc of the actual parameter,
2271         when replacing formal parameters by the actual one.
2273 2015-01-30  Arnaud Charlet  <charlet@adacore.com>
2275         * g-expect.adb (Get_Command_Output): Use infinite timeout when
2276         calling Expect.
2278 2015-01-30  Ed Schonberg  <schonberg@adacore.com>
2280         * sem_ch12.adb (Analyze_Associations): If an in-parameter is
2281         defaulted in an instantiation, add an entry in the list of actuals
2282         to indicate the default value of the formal (as is already done
2283         for defaulted subprograms).
2285 2015-01-30  Javier Miranda  <miranda@adacore.com>
2287         * errout.adb (Error_Msg_PT): Minor error phrasing update.
2289 2015-01-30  Robert Dewar  <dewar@adacore.com>
2291         * sem_warn.adb (Warn_On_Known_Condition): Improve error message
2292         for object case.
2294 2015-01-30  Pierre-Marie de Rodat  <derodat@adacore.com>
2296         * exp_dbug.adb (Get_Encoded_Name): When
2297         -fgnat-encodings=minimal, do not generate names for biased types.
2299 2015-01-30  Tristan Gingold  <gingold@adacore.com>
2301         PR ada/64349
2302         * env.c: Move vxworks and darwin includes out of #ifdef IN_RTS.
2304 2015-01-30  Gary Dismukes  <dismukes@adacore.com>
2306         * freeze.adb: Minor reformatting.
2308 2015-01-30  Javier Miranda  <miranda@adacore.com>
2310         * errout.ads (Error_Msg_PT): Replace Node_Id by Entity_Id and
2311         improve its documentation.
2312         * errout.adb (Error_Msg_PT): Improve the error message.
2313         * sem_ch6.adb (Check_Conformance): Update call to Error_Msg_PT.
2314         (Check_Synchronized_Overriding): Update call to Error_Msg_PT.
2315         * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup.
2317 2015-01-30  Robert Dewar  <dewar@adacore.com>
2319         * sem_warn.adb (Warn_On_Known_Condition): Do special casing of
2320         message for False case.
2322 2015-01-30  Doug Rupp  <rupp@adacore.com>
2324         * s-vxwext-kernel.ads (Task_Cont): Remove imported subprogram body.
2325         * s-vxwext-kernel.adb (Task_Cont): New subpprogram body specialized for
2326         kernel.
2328 2015-01-30  Gary Dismukes  <dismukes@adacore.com>
2330         * sem_attr.adb (Declared_Within_Generic_Unit):
2331         New function to test whether an entity is declared within the
2332         declarative region of a given generic unit.
2333         (Resolve_Attribute): For checking legality of subprogram'Access within
2334         a generic unit, call new Boolean function Declared_Within_Generic_Unit
2335         instead of simply comparing the results of Enclosing_Generic_Unit on
2336         the prefix and access type.  Correct minor comment typos.
2338 2015-01-30  Robert Dewar  <dewar@adacore.com>
2340         * freeze.adb, exp_util.ads: Update comment.
2341         * exp_util.adb, exp_ch3.adb: Minor code reorganization and reformatting.
2342         * sem_util.adb: Minor: fix typo.
2344 2015-01-30  Hristian Kirtchev  <kirtchev@adacore.com>
2346         * sem_attr.adb (Analyze_Attribute): Ensure that
2347         the check concerning Refined_Post takes precedence over the
2348         other cases.
2350 2015-01-30  Gary Dismukes  <dismukes@adacore.com>
2352         * sem_prag.adb: Minor typo fixes and reformatting.
2354 2015-01-30  Yannick Moy  <moy@adacore.com>
2356         * sem_attr.adb: Code clean up.
2358 2015-01-30  Robert Dewar  <dewar@adacore.com>
2360         * ali.adb (Scan_ALI): Set Serious_Errors flag in Unit record.
2361         * ali.ads (Unit_Record): Add new field Serious_Errors.
2362         * lib-writ.adb (Write_Unit_Information): Set SE (serious errors)
2363         attribute in U line.
2364         * lib-writ.ads: New attribute SE (serious erors) in unit line.
2366 2015-01-30  Hristian Kirtchev  <kirtchev@adacore.com>
2368         * einfo.adb Update the usage of attributes Entry_Bodies_Array,
2369         Lit_Indexes, Scale_Value, Storage_Size_Variable,
2370         String_Literal_Low_Bound along associated routines and
2371         Write_FieldX_Name.
2372         (Pending_Access_Types): New routine.
2373         (Set_Pending_Access_Types): New routine.
2374         (Write_Field15_Name): Add an entry for Pending_Access_Types.
2375         * einfo.ads Add new attribute Pending_Access_Types along
2376         with usage in nodes.  Update the usage of attributes
2377         Entry_Bodies_Array, Lit_Indexes, Scale_Value,
2378         Storage_Size_Variable, String_Literal_Low_Bound.
2379         (Pending_Access_Types): New routine along with pragma Inline.
2380         (Set_Pending_Access_Types): New routine along with pragma Inline.
2381         * exp_ch3.adb (Expand_Freeze_Array_Type): Add new local variable
2382         Ins_Node. Determine the insertion node for anonynous access type
2383         that acts as a component type of an array. Update the call to
2384         Build_Finalization_Master.
2385         (Expand_Freeze_Record_Type): Update
2386         the calls to Build_Finalization_Master.
2387         (Freeze_Type): Remove
2388         local variable RACW_Seen. Factor out the code that deals with
2389         remote access-to-class-wide types. Create a finalization master
2390         when the designated type contains a private component. Fully
2391         initialize all pending access types.
2392         (Process_RACW_Types): New routine.
2393         (Process_Pending_Access_Types): New routine.
2394         * exp_ch4.adb (Expand_Allocator_Expression): Allocation no longer
2395         needs to set primitive Finalize_Address.
2396         (Expand_N_Allocator): Allocation no longer sets primitive
2397         Finalize_Address.
2398         * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
2399         Update the call to Build_Finalization_Master.
2400         (Make_Build_In_Place_Call_In_Allocator): Allocation no longer
2401         needs to set primitive Finalize_Address.
2402         * exp_ch7.adb (Add_Pending_Access_Type): New routine.
2403         (Build_Finalization_Master): New parameter profile. Associate
2404         primitive Finalize_Address with the finalization master if the
2405         designated type has been frozen, otherwise treat the access
2406         type as pending. Simplify the insertion of the master and
2407         related initialization code.
2408         (Make_Finalize_Address_Body): Allow Finalize_Address for class-wide
2409         abstract types.
2410         (Make_Set_Finalize_Address_Call): Remove forlam parameter Typ.
2411         Simplify the implementation.
2412         * exp_ch7.ads (Build_Finalization_Master): New parameter profile
2413         along with comment on usage.
2414         (Make_Set_Finalize_Address_Call): Remove formal parameter Typ. Update
2415         the comment on usage.
2416         * exp_util.adb (Build_Allocate_Deallocate_Proc): Use routine
2417         Finalize_Address to retrieve the primitive.
2418         (Finalize_Address): New routine.
2419         (Find_Finalize_Address): Removed.
2420         * exp_util.ads (Finalize_Address): New routine.
2421         * freeze.adb (Freeze_All): Remove the generation of finalization
2422         masters.
2423         * sem_ch3.adb (Analyze_Full_Type_Declaration): Propagate any
2424         pending access types from the partial to the full view.
2426 2015-01-30  Robert Dewar  <dewar@adacore.com>
2428         * sem_disp.adb: Minor reformatting.
2429         * sem_disp.ads: Documentation update.
2431 2015-01-30  Ed Schonberg  <schonberg@adacore.com>
2433         * sem_disp.adb (Is_Dynamically_Tagged): when applied to an entity
2434         or a function call, return True if type is class-wide.
2435         * sem_res.adb (Resolve_Case_Expression, Resolve_If_Expression);
2436         Apply RM 4.5.7 (17/3): all or none of the dependent expression
2437         of a conditional expression must be dynamically tagged.
2439 2015-01-30  Ed Schonberg  <schonberg@adacore.com>
2441         * sem_ch6.adb (Analyze_Function_Return): In an extended return
2442         statement, apply accessibility check to result object when there
2443         is no initializing expression (Ada 2012 RM 6.5 (5.4/3))
2445 2015-01-30  Robert Dewar  <dewar@adacore.com>
2447         * sem_ch4.adb (Analyze_If_Expression): Allow for non-standard
2448         Boolean for case where ELSE is omitted.
2449         * sem_res.adb: Minor reformatting.
2451 2015-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2453         Fix build under cygwin/64.
2454         * adaint.h: Add check for __CYGWIN__.
2455         * mingw32.h: Prevent windows.h from including x86intrin.h in GCC.
2457 2015-01-19  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2459         PR ada/64640
2460         * adaint.c: Handle __CYGWIN__ like __MINGW32__ here.
2461         * mingw32.h: Don't include <tchar.h> under cygwin.
2462         (_O_U8TEXT, _O_U16TEXT, _O_WTEXT): Set to _O_TEXT if not yet defined.
2464 2015-01-15  Thomas Schwinge  <thomas@codesourcery.com>
2466         * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8)
2467         (DEF_FUNCTION_TYPE_VAR_12): New macros.
2469 2015-01-09  Michael Collison  <michael.collison@linaro.org>
2471         * gcc-interface/cuintp.c: Include hash-set.h, machmode.h,
2472         vec.h, double-int.h, input.h, alias.h, symtab.h,
2473         fold-const.h, wide-int.h, and inchash.h due to
2474         flattening of tree.h.
2475         * gcc-interface/decl.c: Ditto.
2476         * gcc-interface/misc.c: Ditto.
2477         * gcc-interface/targtyps.c: Include hash-set.h, machmode.h,
2478         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h,
2479         fold-const.h, wide-int.h, and inchash.h due to
2480         flattening of tree.h.
2481         * gcc-interface/trans.c: Include hash-set.h, machmode.h,
2482         vec.h, double-int.h, input.h, alias.h, symtab.h, real.h,
2483         fold-const.h, wide-int.h, inchash.h due to
2484         flattening of tree.h.
2485         * gcc-interface/utils.c: Include hash-set.h, machmode.h,
2486         vec.h, double-int.h, input.h, alias.h, symtab.h,
2487         fold-const.h, wide-int.h, and inchash.h due to
2488         flattening of tree.h.
2489         * gcc-interface/utils2.c: Ditto.
2491 2015-01-07  Robert Dewar  <dewar@adacore.com>
2493         * sem_warn.adb (Check_One_Unit): Don't give unused entities
2494         warning for a package which is used as a generic parameter.
2496 2015-01-07  Bob Duff  <duff@adacore.com>
2498         * usage.adb (Usage): Correct documentation of
2499         -gnatw.f switches.
2501 2015-01-07  Robert Dewar  <dewar@adacore.com>
2503         * s-fileio.adb: Minor reformatting.
2505 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
2507         * sem_ch12.adb (Instantiate_Object): If formal is an anonymous
2508         access to subprogram, replace its formals with new entities when
2509         building the object declaration, both if actual is present and
2510         when it is defaulted.
2512 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
2514         * sem_ch5.adb (Analyze_Assignment): If left-hand side is a view
2515         conversion and type of expression has invariant, apply invariant
2516         check on expression.
2518 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
2520         * sem_ch3.adb (Create_Constrained_Components): A call to
2521         Gather_Components may detect an error if an inherited discriminant
2522         that controls a variant is non-static.
2523         * sem_aggr.adb (Resolve_Record_Aggregate, Step 5): The call to
2524         Gather_Components may report an error if an inherited discriminant
2525         in a variant in non-static.
2526         * sem_util.adb (Gather_Components): If a non-static discriminant
2527         is inherited do not report error here, but let caller handle it.
2528         (Find_Actual): Small optimization.
2530 2015-01-07  Bob Duff  <duff@adacore.com>
2532         * usage.adb (Usage): Document -gnatw.f switch.
2534 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
2536         * sem_ch12.adb: Code clean up and minor reformatting.
2538 2015-01-07  Robert Dewar  <dewar@adacore.com>
2540         * exp_ch4.adb (Expand_N_Type_Conversion): Add guard for
2541         Raise_Accessibility_Error call.
2542         * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Add documentation
2543         on handling of invalid digits in based constants.
2544         * s-fatgen.ads: Minor reformatting.
2545         * sem_attr.adb (Analyze_Attribute, case Unrestricted_Access):
2546         Avoid noting bogus modification for Valid test.
2547         * snames.ads-tmpl (Name_Attr_Long_Float): New Name.
2548         * einfo.ads: Minor reformatting.
2549         * sem_warn.adb: Minor comment clarification.
2550         * sem_ch12.adb: Minor reformatting.
2552 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
2554         * exp_ch5.adb (Expand_Predicated_Loop): Handle properly loops
2555         over static predicates when the loop parameter specification
2556         carries a Reverse indicator.
2558 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
2560         * sem_ch12.adb (Instantiate_Object): If formal has a default,
2561         actual is missing and formal has an anonymous access type, copy
2562         access definition in full so that tree for instance is properly
2563         formatted for ASIS use.
2565 2015-01-07  Bob Duff  <duff@adacore.com>
2567         * sem_elab.adb (Check_Internal_Call_Continue): Give a warning
2568         for P'Access, where P is a subprogram in the same package as
2569         the P'Access, and the P'Access is evaluated at elaboration
2570         time, and occurs before the body of P. For example, "X : T :=
2571         P'Access;" would allow a subsequent call to X.all to be an
2572         access-before-elaboration error; hence the warning. This warning
2573         is enabled by the -gnatw.f switch.
2574         * opt.ads (Warn_On_Elab_Access): New flag for warning switch.
2575         * warnsw.adb (Set_Dot_Warning_Switch): Set Warn_On_Elab_Access.
2576         * gnat_ugn.texi: Document the new warning.
2578 2015-01-07  Johannes Kanig  <kanig@adacore.com>
2580         * lib-xref-spark_specific.adb (Collect_SPARK_Xrefs): Skip unneeded
2581         cross ref files.
2583 2015-01-07  Robert Dewar  <dewar@adacore.com>
2585         * s-taprop-linux.adb, clean.adb: Minor reformatting.
2587 2015-01-07  Arnaud Charlet  <charlet@adacore.com>
2589         * s-tassta.adb: Relax some overzealous assertions.
2591 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
2593         * sem_ch6.adb (Analyze_Return_Type): An call that returns a limited
2594         view of a type is legal when context is a thunk generated for
2595         operation inherited from an interface.
2596         * exp_ch6.adb (Expand_Simple_Function_Return): If context is
2597         a thunk and return type is an incomplete type do not continue
2598         expansion; thunk will be fully elaborated when generating code.
2600 2015-01-07  Doug Rupp  <rupp@adacore.com>
2602         * s-osinte-mingw.ads (LARGE_INTEGR): New subtype.
2603         (QueryPerformanceFrequency): New imported procedure.
2604         * s-taprop-mingw.adb (RT_Resolution): Call above and return
2605         resolution vice a hardcoded value.
2606         * s-taprop-solaris.adb (RT_Resolution): Call clock_getres and return
2607         resolution vice a hardcoded value.
2608         * s-linux-android.ads (clockid_t): New subtype.
2609         * s-osinte-aix.ads (clock_getres): New imported subprogram.
2610         * s-osinte-android.ads (clock_getres): Likewise.
2611         * s-osinte-freebsd.ads (clock_getres): Likewise.
2612         * s-osinte-solaris-posix.ads (clock_getres): Likewise.
2613         * s-osinte-darwin.ads (clock_getres): New subprogram.
2614         * s-osinte-darwin.adb (clock_getres): New subprogram.
2615         * thread.c (__gnat_clock_get_res) [__APPLE__]: New function.
2616         * s-taprop-posix.adb (RT_Resolution): Call clock_getres to
2617         calculate resolution vice hard coded value.
2619 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
2621         * exp_util.adb (Make_CW_Equivalent_Type): If root type is a
2622         limited view, use non-limited view when available to create
2623         equivalent record type.
2625 2015-01-07  Vincent Celier  <celier@adacore.com>
2627         * gnatcmd.adb: Remove command Sync and any data and processing
2628         related to this command. Remove project processing for gnatstack.
2629         * prj-attr.adb: Remove package Synchonize and its attributes.
2631 2015-01-07  Vincent Celier  <celier@adacore.com>
2633         * clean.adb: Minor error message change.
2635 2015-01-07  Tristan Gingold  <gingold@adacore.com>
2637         PR ada/64349  
2638         * env.c (__gnat_environ): Adjust for darwin9/darwin10.
2640 2015-01-07  Javier Miranda  <miranda@adacore.com>
2642         * sem_ch10.adb (Analyze_With_Clause): Compiling under -gnatq
2643         protect the frontend against never ending recursion caused by
2644         circularities in the sources.
2646 2015-01-07  Robert Dewar  <dewar@adacore.com>
2648         * a-reatim.adb, make.adb, exp_pakd.adb, i-cpoint.adb, sem_ch8.adb,
2649         exp_ch3.adb: Minor reformatting.
2651 2015-01-07  Doug Rupp  <rupp@adacore.com>
2653         * s-linux.ads (clockid_t): New subtype.
2654         * s-osinte-linux.ads (pragma Linker Options): Add -lrt.
2655         (clockid_t): New subtype.
2656         (clock_getres): Import system call.
2657         * s-taprop-linux.adb (System.OS_Constants): With and rename.
2658         (RT_Resolution): Remove
2659         hardcoded value and call clock_getres.
2660         * s-linux-sparc.ads, s-linux-mipsel.ads, s-linux-hppa.ads,
2661         s-linux-alpha.ads, s-linux-x32.ads (clockid_t): Add new subtype.
2663 2015-01-07  Robert Dewar  <dewar@adacore.com>
2665         * sem_warn.adb (Check_One_Unit): Guard against context item
2666         with no Entity field.
2668 2015-01-07  Vincent Celier  <celier@adacore.com>
2670         * clean.adb (Gnatclean): Warn that 'gnatclean -P' is obsolete.
2671         * make.adb (Initialize): Warn that 'gnatmake -P' is obsolete.
2673 2015-01-07  Vincent Celier  <celier@adacore.com>
2675         * prj-conf.adb (Parse_Project_And_Apply_Config): Always finalize
2676         errors/warnings in the first parsing of the project files,
2677         to display the warnings when there is no errors.
2679 2015-01-07  Tristan Gingold  <gingold@adacore.com>
2681         * i-cpoint.adb (Copy_Terminated_Array): Nicely handle null target.
2683 2015-01-07  Doug Rupp  <rupp@adacore.com>
2685         * s-taprop-vxworks.adb (Stop_All_Tasks): Pass return
2686         value from Int_Lock as parameter to Int_Unlock.
2687         * s-osinte-vxworks.ads (Int_Unlock): Add parameter.
2688         * s-vxwext.ads (Int_Unlock): Likewise.
2689         * s-vxwext-kernel.adb (intUnlock, Int_Unlock): Likewise.
2690         * s-vxwext-kernel.ads (Int_Unlock): Likewise.
2691         * s-vxwext-rtp.adb (Int_Unlock): Likewise.
2692         * s-vxwext-rtp.ads (Int_Unlock): Likewise.
2694 2015-01-07  Pierre-Marie de Rodat  <derodat@adacore.com>
2696         * exp_pakd.adb: Add a comment in exp_pakd.adb to explain why we
2697         keep ___XP suffixes
2699 2015-01-07  Tristan Gingold  <gingold@adacore.com>
2701         * i-cpoint.adb (Copy_Terminated_Array): Use Copy_Array to
2702         handle overlap.
2704 2015-01-07  Eric Botcazou  <ebotcazou@adacore.com>
2706         * sem_ch3.adb (Analyze_Full_Type_Declaration): Do not
2707         automatically set No_Strict_Aliasing on access types.
2708         * fe.h (No_Strict_Aliasing_CP): Declare.
2709         * gcc-interface/trans.c (gigi): Force flag_strict_aliasing to 0 if
2710         No_Strict_Aliasing_CP is set.
2712 2015-01-07  Johannes Kanig  <kanig@adacore.com>
2714         * sem_ch8.adb (Analyze_Subprogram_Renaming) do
2715         not build function wrapper in gnatprove mode when the package
2716         is externally axiomatized.
2718 2015-01-07  Jose Ruiz  <ruiz@adacore.com>
2720         * a-reatim.adb (Time_Of): Reduce the number of spurious overflows in
2721         intermediate computations when the parameters have different signs.
2723 2015-01-07  Javier Miranda  <miranda@adacore.com>
2725         * exp_ch3.adb (Build_Init_Procedure): For derived types,
2726         improve the code which takes care of identifying and moving to
2727         the beginning of the init-proc the call to the init-proc of the
2728         parent type.
2730 2015-01-07  Olivier Hainque  <hainque@adacore.com>
2732         * gcc-interface/trans.c (gnat_to_gnu, <N_Expression_With_Action>):
2733         Elaborate the expression as part of the same stmt group as the actions.
2735 2015-01-07  Robert Dewar  <dewar@adacore.com>
2737         * sem_ch3.adb: Minor error message change.
2739 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
2741         * sem_prag.adb (Analyze_Pragma, case Preelaborable_Initialization):
2742         Following AI05-028, the pragam applies legally to any composite type.
2744 2015-01-07  Arnaud Charlet  <charlet@adacore.com>
2746         * s-osinte-vxworks.adb, s-osinte-vxworks.ads
2747         (sigwait, sigwaitinfo): Removed, not needed after all on any
2748         VxWorks configurations.
2750 2015-01-07  Robert Dewar  <dewar@adacore.com>
2752         * sem_ch3.adb, freeze.adb, exp_disp.adb: Minor reformatting.
2754 2015-01-07  Javier Miranda  <miranda@adacore.com>
2756         * exp_disp.adb (Expand_Interface_Conversion): Adding missing
2757         generation of accessibility check.
2759 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
2761         * sem_ch3.adb (Derived_Type_Declaration): In the case of an
2762         illegal completion from a class- wide type, set etype of the
2763         derived type properly to prevent cascaded errors.
2765 2015-01-07  Robert Dewar  <dewar@adacore.com>
2767         * prj.ads, i-cpoint.adb, freeze.adb, ghost.adb, prj-err.adb: Minor
2768         reformatting.
2770 2015-01-07  Robert Dewar  <dewar@adacore.com>
2772         * restrict.adb (Check_Restriction_No_Use_Of_Attribute):
2773         New procedure.
2774         (OK_No_Use_Of_Entity_Name): New function.
2775         (Set_Restriction_No_Use_Of_Entity): New procedure.
2776         * restrict.ads (Check_Restriction_No_Use_Of_Attribute):
2777         New procedure.
2778         (OK_No_Use_Of_Entity_Name): New function.
2779         (Set_Restriction_No_Use_Of_Entity): New procedure.
2780         * sem_ch8.adb (Find_Direct_Name): Add check for violation of
2781         No_Use_Of_Entity.
2782         * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
2783         Add processing for new restriction No_Use_Of_Entity.
2785 2015-01-07  Eric Botcazou  <ebotcazou@adacore.com>
2787         * freeze.adb (Freeze_Array_Type): Apply same handling to Is_Atomic
2788         component type as to Has_Atomic_Components type.  Remove useless
2789         test on Is_Aliased component type.
2791 2015-01-07  Hristian Kirtchev  <kirtchev@adacore.com>
2793         * alloc.ads Alphabetize several declarations. Add constants
2794         Ignored_Ghost_Units_Initial and Ignored_Ghost_Units_Increment.
2795         * atree.adb Add with and use clauses for Opt.
2796         (Allocate_Initialize_Node): Mark a node as ignored Ghost
2797         if it is created in an ignored Ghost region.
2798         (Ekind_In): New variant.
2799         (Is_Ignored_Ghost_Node): New routine.
2800         (Set_Is_Ignored_Ghost_Node): New routine.
2801         * atree.adb Aplhabetize several subprograms declarations. Flag
2802         Spare0 is now known as Is_Ignored_Ghost_Node.
2803         (Ekind_In): New variant.
2804         (Is_Ignored_Ghost_Node): New routine.
2805         (Set_Is_Ignored_Ghost_Node): New routine.
2806         * einfo.adb: Flag 279 is now known as Contains_Ignored_Ghost_Code.
2807         (Contains_Ignored_Ghost_Code): New routine.
2808         (Set_Contains_Ignored_Ghost_Code): New routine.
2809         (Set_Is_Checked_Ghost_Entity, Set_Is_Ignored_Ghost_Entity):
2810         It is now possible to set this property on an unanalyzed entity.
2811         (Write_Entity_Flags): Output the status of flag
2812         Contains_Ignored_Ghost_Code.
2813         * einfo.ads New attribute Contains_Ignored_Ghost_Code along with
2814         usage in nodes.
2815         (Contains_Ignored_Ghost_Code): New routine
2816         along with pragma Inline.
2817         (Set_Contains_Ignored_Ghost_Code): New routine along with pragma Inline.
2818         * exp_ch3.adb Add with and use clauses for Ghost.
2819         (Freeze_Type): Capture/restore the value of Ghost_Mode on entry/exit.
2820         Set the Ghost_Mode in effect.
2821         (Restore_Globals): New routine.
2822         * exp_ch7.adb (Process_Declarations): Do not process a context
2823         that invoves an ignored Ghost entity.
2824         * exp_dbug.adb (Qualify_All_Entity_Names): Skip an ignored Ghost
2825         construct that has been rewritten as a null statement.
2826         * exp_disp.adb Add with and use clauses for Ghost.
2827         (Make_DT): Capture/restore the value of Ghost_Mode on entry/exit. Set
2828         the Ghost_Mode in effect.
2829         (Restore_Globals): New routine.
2830         * exp_util.adb (Requires_Cleanup_Actions): An ignored Ghost entity
2831         does not require any clean up. Add two missing cases that deal
2832         with block statements.
2833         * freeze.adb Add with and use clauses for Ghost.
2834         (Freeze_Entity): Capture/restore the value of Ghost_Mode on entry/exit.
2835         Set the Ghost_Mode in effect.
2836         (Restore_Globals): New routine.
2837         * frontend.adb Add with and use clauses for Ghost. Remove any
2838         ignored Ghost code from all units that qualify.
2839         * ghost.adb New unit.
2840         * ghost.ads New unit.
2841         * gnat1drv.adb Add with clause for Ghost. Initialize and lock
2842         the table in package Ghost.
2843         * lib.ads: Alphabetize several subprogram declarations.
2844         * lib-xref.adb (Output_References): Do not generate reference
2845         information for ignored Ghost entities.
2846         * opt.ads Add new type Ghost_Mode_Type and new global variable
2847         Ghost_Mode.
2848         * rtsfind.adb (Load_RTU): Provide a clean environment when
2849         loading a runtime unit.
2850         * sem.adb (Analyze): Capture/restore the value of Ghost_Mode on
2851         entry/exit as the node may set a different mode.
2852         (Do_Analyze):
2853         Capture/restore the value of Ghost_Mode on entry/exit as the
2854         unit may be withed from a unit with a different Ghost mode.
2855         * sem_ch3.adb Add with and use clauses for Ghost.
2856         (Analyze_Full_Type_Declaration, Analyze_Incomplete_Type_Decl,
2857         Analyze_Number_Declaration, Analyze_Private_Extension_Declaration,
2858         Analyze_Subtype_Declaration): Set the Ghost_Mode in effect. Mark
2859         the entity as Ghost when there is a Ghost_Mode in effect.
2860         (Array_Type_Declaration): The implicit base type inherits the
2861         "ghostness" from the array type.
2862         (Derive_Subprogram): The
2863         alias inherits the "ghostness" from the parent subprogram.
2864         (Make_Implicit_Base): The implicit base type inherits the
2865         "ghostness" from the parent type.
2866         * sem_ch5.adb Add with and use clauses for Ghost.
2867         (Analyze_Assignment): Set the Ghost_Mode in effect.
2868         * sem_ch6.adb Add with and use clauses for Ghost.
2869         (Analyze_Abstract_Subprogram_Declaration, Analyze_Procedure_Call,
2870         Analyze_Subprogram_Body_Helper, Analyze_Subprogram_Declaration):
2871         Set the Ghost_Mode in effect. Mark the entity as Ghost when
2872         there is a Ghost_Mode in effect.
2873         * sem_ch7.adb Add with and use clauses for Ghost.
2874         (Analyze_Package_Body_Helper, Analyze_Package_Declaration,
2875         Analyze_Private_Type_Declaration): Set the Ghost_Mode in
2876         effect. Mark the entity as Ghost when there is a Ghost_Mode
2877         in effect.
2878         * sem_ch8.adb Add with and use clauses for Ghost.
2879         (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
2880         Analyze_Object_Renaming, Analyze_Package_Renaming,
2881         Analyze_Subprogram_Renaming): Set the Ghost_Mode in effect. Mark
2882         the entity as Ghost when there is a Ghost_Mode in effect.
2883         (Find_Type): Check the Ghost context of a type.
2884         * sem_ch11.adb Add with and use clauses for Ghost.
2885         (Analyze_Exception_Declaration): Set the Ghost_Mode in
2886         effect. Mark the entity as Ghost when there is a Ghost_Mode
2887         in effect.
2888         * sem_ch12.adb Add with and use clauses for Ghost.
2889         (Analyze_Generic_Package_Declaration,
2890         Analyze_Generic_Subprogram_Declaration): Set the Ghost_Mode in effect.
2891         Mark the entity as Ghost when there is a Ghost_Mode in effect.
2892         * sem_prag.adb Add with and use clauses for Ghost.
2893         (Analyze_Pragma): Ghost-related checks are triggered when there
2894         is a Ghost mode in effect.
2895         (Create_Abstract_State): Mark the
2896         entity as Ghost when there is a Ghost_Mode in effect.
2897         * sem_res.adb Add with and use clauses for Ghost.
2898         (Check_Ghost_Context): Removed.
2899         * sem_util.adb (Check_Ghost_Completion): Removed.
2900         (Check_Ghost_Derivation): Removed.
2901         (Incomplete_Or_Partial_View):
2902         Add a guard in case the entity has not been analyzed yet
2903         and does carry a scope.
2904         (Is_Declaration): New routine.
2905         (Is_Ghost_Entity): Removed.
2906         (Is_Ghost_Statement_Or_Pragma):
2907         Removed.
2908         (Is_Subject_To_Ghost): Removed.
2909         (Set_Is_Ghost_Entity):
2910         Removed.
2911         (Within_Ghost_Scope): Removed.
2912         * sem_util.adb (Check_Ghost_Completion): Removed.
2913         (Check_Ghost_Derivation): Removed.
2914         (Is_Declaration): New routine.
2915         (Is_Ghost_Entity): Removed.
2916         (Is_Ghost_Statement_Or_Pragma): Removed.
2917         (Is_Subject_To_Ghost): Removed.
2918         (Set_Is_Ghost_Entity): Removed.
2919         (Within_Ghost_Scope): Removed.
2920         * sinfo.ads Add a section on Ghost mode.
2921         * treepr.adb (Print_Header_Flag): New routine.
2922         (Print_Node_Header): Factor out code. Output flag
2923         Is_Ignored_Ghost_Node.
2924         * gcc-interface/Make-lang.in: Add dependency for unit Ghost.
2926 2015-01-06  Eric Botcazou  <ebotcazou@adacore.com>
2928         * freeze.adb (Freeze_Array_Type) <Complain_CS>: Remove always
2929         true test and unreachable 'else' arm.
2931 2015-01-06  Vincent Celier  <celier@adacore.com>
2933         * prj-conf.adb (Check_Target): Improve error message when
2934         there are mismatched targets between the on in the configuration
2935         project file and the specified one, either in the main project
2936         file or in the --target= switch.
2938 2015-01-06  Pascal Obry  <obry@adacore.com>
2940         * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Mode and
2941         Install_Name attribute definitions.
2943 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
2945         * freeze.adb (Wrap_Imported_Subprogram): Indicate that the
2946         generated Import pragma for the internal imported procedure does
2947         not come from an aspect, so that Is_Imported can be properly
2948         set for it.
2950 2015-01-06  Gary Dismukes  <dismukes@adacore.com>
2952         * sem_ch12.adb (Might_Inline_Subp): Record whether
2953         any subprograms in the generic package are marked with
2954         pragma Inline_Always (setting flag Has_Inline_Always).
2955         (Analyze_Package_Instantiation): Add test of Has_Inline_Always
2956         alongside existing test of Front_End_Inlining as alternative
2957         conditions for setting Inline_Now. Also add test of
2958         Has_Inline_Always along with Front_End_Inlining test as an
2959         alternative condition for setting Needs_Body to False.
2961 2015-01-06  Tristan Gingold  <gingold@adacore.com>
2963         * i-cpoint.adb (Copy_Array): Handle overlap.
2965 2015-01-06  Pascal Obry  <obry@adacore.com>
2967         * bindgen.adb: Minor style fix.
2969 2015-01-06  Robert Dewar  <dewar@adacore.com>
2971         * sem_util.ads, sem_util.adb: Minor reformatting.
2973 2015-01-06  Vincent Celier  <celier@adacore.com>
2975         * prj-conf.adb (Parse_Project_And_Apply_Config): Reset incomplete
2976         with flags before parsing the projects.
2977         * prj-err.adb (Error_Msg): Do nothing if there are incomplete withs.
2978         * prj-part.adb (Post_Parse_Context_Clause): Set Incomplete_Withs
2979         to True in the flags, when Ignore_Missing_With is True and an
2980         imported project cannot be found.
2981         * prj-proc.adb (Expression): When there are incomplete withs and
2982         a variable or attribute is not found, set the variable/attribute
2983         to unknown.
2984         * prj.ads (Processing_Flags): New flag Incomplete_Withs,
2985         defaulted to False.
2987 2015-01-06  Vasiliy Fofanov  <fofanov@adacore.com>
2989         * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-conf.adb,
2990         prj-err.adb: Add new switch --no-command-line.
2992 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
2994         * sem_ch12.adb: Sloc of wrapper is that of instantiation.
2996 2015-01-06  Robert Dewar  <dewar@adacore.com>
2998         * sem_ch11.adb: Minor reformatting.
3000 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
3002         * exp_aggr.adb (Get_Assoc_Expr): New routine internal to
3003         Build_Array_Aggr_Code, used to initialized components covered
3004         by a box association. If the component type is scalar and has
3005         a default aspect, use it to initialize such components.
3007 2015-01-06  Pascal Obry  <obry@adacore.com>
3009         * rtinit.c (__gnat_runtime_initialize): Add a parameter to
3010         control the setup of the exception handler.
3011         * initialize.c: Remove unused declaration.
3012         * bindgen.adb: Always call __gnat_runtime_initialize and pass
3013         whether the exeception handler must be set or not.
3015 2015-01-06  Thomas Quinot  <quinot@adacore.com>
3017         * freeze.adb (Set_SSO_From_Defaults): When setting scalar storage
3018         order to native from default, make sure to also adjust bit order.
3019         * exp_aggr.adb: Minor reformatting.
3021 2015-01-06  Robert Dewar  <dewar@adacore.com>
3023         * s-valllu.adb, s-valllu.ads, s-valuti.ads, s-valuns.adb, s-valuns.ads,
3024         s-valrea.adb, s-valrea.ads: Add some additional guards for
3025         Str'Last = Positive'Last.
3027 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
3029         * sem_ch12.adb, sem_ch8.adb: Ongoing work for wrappers for actual
3030         subprograms.
3032 2015-01-06  Javier Miranda  <miranda@adacore.com>
3034         * exp_disp.adb (Expand_Interface_Conversion): Reapply patch.
3036 2015-01-06  Thomas Quinot  <quinot@adacore.com>
3038         * sem_util.ads: Minor reformatting.
3039         * sem_cat.adb (In_RCI_Visible_Declarations): Change back to...
3040         (In_RCI_Declaration) Return to old name, as proper checking of
3041         entity being in the visible part depends on entity kind and must
3042         be done by the caller.
3044 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
3046         * sem_ch12.adb, sem_ch12.ads, sem_ch8.adb: Ongoing work for wrappers
3047         for operators in SPARK.
3049 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
3051         * sem_aggr.adb (Get_Value): In ASIS mode, preanalyze the
3052         expression in an others association before making copies for
3053         separate resolution and accessibility checks. This ensures that
3054         the type of the expression is available to ASIS in all cases,
3055         in particular if the expression is itself an aggregate.
3057 2015-01-06  Eric Botcazou  <ebotcazou@adacore.com>
3059         * einfo.ads (Has_Independent_Components): Document extended
3060         usage.
3061         * einfo.adb (Has_Independent_Components): Remove obsolete assertion.
3062         (Set_Has_Independent_Components): Adjust assertion.
3063         * sem_prag.adb (Analyze_Pragma): Also set Has_Independent_Components
3064         for pragma Atomic_Components.  Set Has_Independent_Components
3065         on the object instead of the type for an object declaration with
3066         pragma Independent_Components.
3068 2015-01-06  Olivier Hainque  <hainque@adacore.com>
3070         * set_targ.adb (Read_Target_Dependent_Values): Set
3071         Long_Double_Index when "long double" is read.
3072         (elaboration code): Register_Back_End_Types only when not reading from
3073         config files. Doing otherwise is pointless and error prone.
3075 2015-01-06  Robert Dewar  <dewar@adacore.com>
3077         * s-valrea.adb (Value_Real): Check for Str'Last = Positive'Last
3079 2015-01-06  Robert Dewar  <dewar@adacore.com>
3081         * a-wtgeau.adb, a-ztgeau.adb, a-tigeau.adb (String_Skip): Raise PE if
3082         Str'Last = Positive'Last.
3084 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
3086         * sem_ch6.adb (Matches_Limited_View): Handle properly the case
3087         where the non-limited type is a generic actual and appears as
3088         a subtype of the non-limited view of the other.
3089         * freeze.adb (Build_Renamed_Body): If the return type of the
3090         declaration that is being completed is a limited view and the
3091         non-limited view is available, use it in the specification of
3092         the generated body.
3094 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
3096         * sem_ch3.adb (Find_Type_Name): If there is a previous tagged
3097         incomplete view, the type of the classwide type common to both
3098         views is the type being declared.
3100 2015-01-06  Eric Botcazou  <ebotcazou@adacore.com>
3102         * einfo.ads (Is_Independent): Further document extended usage.
3104 2015-01-06  Eric Botcazou  <ebotcazou@adacore.com>
3106         * einfo.ads (Is_Independent): Document extended usage.
3107         * einfo.adb (Is_Independent): Remove obsolete assertion.
3108         (Set_Is_Independent): Likewise.
3109         * sem_prag.adb (Process_Atomic_Shared_Volatile): Rename into...
3110         (Process_Atomic_Independent_Shared_Volatile): ...this.
3111         Deal with pragma Independent here.
3112         (Analyze_Pragma): Adjust
3113         to above renaming and also invoke it for pragma Independent.
3114         Adjust comment for Independent_Components.
3116 2015-01-06  Robert Dewar  <dewar@adacore.com>
3118         * snames.ads-tmpl: Remove entries for attribute Enum_Image.
3119         * exp_attr.adb: Remove reference to Attribute_Enum_Image.
3121 2015-01-06  Robert Dewar  <dewar@adacore.com>
3123         * s-vallli.adb (Value_Long_Long_Integer): Handle case of Str'Last
3124         = Positive'Last.
3125         * s-valllu.adb (Value_Long_Long_Unsigned): Handle case of
3126         Str'Last = Positive'Last.
3128 2015-01-06  Robert Dewar  <dewar@adacore.com>
3130         * sem_prag.adb (Process_Inline): Remove redundant construct
3131         warning (-gnatw.r) for an ineffective pragma Inline.
3133 2015-01-06  Robert Dewar  <dewar@adacore.com>
3135         * s-valint.adb: Fix typo in last checkin.
3136         * s-valuns.adb (Value_Unsigned): More efficient fix for
3137         Positive'Last case.
3138         * sem_attr.adb (Analyze_Attribute): Minor reformatting
3139         (Eval_Attribute): Static ervaluation of 'Img for enumeration types.
3141 2015-01-06  Robert Dewar  <dewar@adacore.com>
3143         * s-valint.adb, s-valuns.adb (Value_Integer): Deal with case where
3144         Str'Last = Positive'Last
3146 2015-01-06  Thomas Quinot  <quinot@adacore.com>
3148         * xoscons.adb: Display exception information and return non-zero
3149         exit status in top level exception handler.
3151 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
3153         * sem_ch8.adb: Code clean up.
3155 2015-01-06  Tristan Gingold  <gingold@adacore.com>
3157         * targparm.ads: Remove obsolete comment.
3159 2015-01-06  Olivier Hainque  <hainque@adacore.com>
3161         * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Variable): When
3162         constructing a ref to variable, update inner_const_flag from the
3163         variable TREE_READONLY attribute.
3164         * gcc-interface/targtyps.c (WIDEST_HARDWARE_FP_SIZE): Remove default
3165         definition.
3166         (get_target_float_size): Remove.
3167         (get_target_double_size): Remove.
3168         (get_target_long_double_size): Remove.
3170 2015-01-06  Pascal Obry  <obry@adacore.com>
3172         * adaint.c (ProcListEvt): Set to NULL.
3173         * rtinit.c: New file.
3174         (__gnat_rt_init_count): New reference counter set to 0.
3175         (__gnat_runtime_initialize): Move code here from __gnat_initialize when
3176         this code is actually needed for the runtime initialization. This
3177         routine returns immediately if the initialization has already been done.
3178         * final.c: Revert previous change.
3179         * rtfinal.c: New file.
3180         (__gnat_runtime_finalize)[Win32]: Add finalization of the critical
3181         section and event. The default version of this routine is empty (except
3182         for the reference counting code). This routine returns immediately if
3183         some others libraries are referencing the runtime.
3184         * bindgen.adb (Gen_Adainit): Generate call to Runtime_Initialize
3185         remove circuitry to initialize the signal handler as this is
3186         now done by the runtime initialization routine.
3187         (Gen_Adafinal): Generate call to Runtime_Finalize.
3188         * gnat_ugn.texi: Update documentation about concurrency and
3189         initialization/finalization of the run-time.
3190         * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Add
3191         references to rtfinal.o and rtinit.o
3193 2015-01-06  Robert Dewar  <dewar@adacore.com>
3195         * exp_attr.adb (Expand_N_Attribute_Reference): Add dummy entry
3196         for Enum_Image.
3197         * sem_attr.adb: Implement Enum_Image attribute.
3198         * snames.ads-tmpl: Add entries for Enum_Image attribute.
3200 2015-01-06  Robert Dewar  <dewar@adacore.com>
3202         * namet.ads: Document use of Boolean2 for No_Use_Of_Entity.
3203         * restrict.ads (No_Use_Of_Entity): New table.
3204         * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
3205         Ignore No_Use_Of_Entity (will be processed in parser).
3206         * snames.ads-tmpl: Add entry for Name_No_Use_Of_Entity.
3208 2015-01-06  Vincent Celier  <celier@adacore.com>
3210         * prj-tree.adb (Imported_Or_Extended_Project_Of): Do not try
3211         to check for an extended project, if a project does not have
3212         yet a project declaration.
3214 2015-01-06  Pierre-Marie Derodat  <derodat@adacore.com>
3216         * scos.ads: Update documentation about the SCO table build
3217         process and about table records format.
3218         * par_sco.ads (SCO_Record): Rename to SCO_Record_Raw.
3219         (SCO_Record_Filtered): New procedure.
3220         (Set_SCO_Logical_Operator): New procedure.
3221         (dsco): Update documentation.
3222         * par_sco.adb: Update library-level comments.
3223         (SCO_Generation_State_Type): New type.
3224         (SCO_Generation_State): New variable.
3225         (SCO_Raw_Table): New package instanciation.
3226         (Condition_Pragma_Hash_Table): Rename to SCO_Raw_Hash_Table.
3227         ("<"): New.
3228         (Tristate): New type.
3229         (Is_Logical_Operator): Return Tristate and update documentation.
3230         (Has_Decision): Update call to Is_Logical_Operator and complete
3231         documentation.
3232         (Set_Table_Entry): Rename to Set_Raw_Table_Entry, update
3233         comment, add an assertion for state checking and change
3234         references to SCO_Table into SCO_Raw_Table.
3235         (dsco): Refactor to dump the raw and the filtered tables.
3236         (Process_Decisions.Output_Decision_Operand): Handle putative
3237         short-circuit operators.
3238         (Process_Decisions.Output_Element): Update references
3239         to Set_Table_Entry and to Condition_Pragma_Hash_Table.
3240         (Process_Decisions.Process_Decision_Operand): Update call
3241         to Is_Logical_Operator.
3242         (Process_Decisions.Process_Node): Handle putative short-circuit
3243         operators and change references to
3244         SCO_Table into SCO_Raw_Table.
3245         (SCO_Output): Add an assertion
3246         for state checking and remove code that used to stamp out SCO entries.
3247         (SCO_Pragma_Disabled): Change reference to SCO_Table
3248         into SCO_Raw_Table.
3249         (SCO_Record): Rename to SCO_Record_Raw,
3250         add an assertion for state checking and change references
3251         to SCO_Table into SCO_Raw_Table.
3252         (Set_SCO_Condition): Add an assertion for state checking, update
3253         references to Condition_Pragma_Hash_Table and change references to
3254         SCO_Table into SCO_Raw_Table.
3255         (Set_SCO_Pragma_Enabled): Add an assertion for state checking and
3256         change references to SCO_Table into SCO_Raw_Table.
3257         (Set_SCO_Logical_Operator): New procedure.
3258         (Traverse_Declarations_Or_Statements.Set_Statement_Entry): Update
3259         references to Set_Table_Entry and to Condition_Pragma_Hash_Table.
3260         (SCO_Record_Fildered): New procedure.
3261         * gnat1drv.adb (Gnat1drv): Invoke the SCO filtering pass.
3262         * lib-writ.adb (Write_ALI): Invoke the SCO filtering pass and
3263         output SCOs.
3264         * par-load.adb (Load): Update reference to SCO_Record.
3265         * par.adb (Par): Update reference to SCO_Record.
3266         * put_scos.adb (Put_SCOs): Add an assertion to check that no
3267         putative SCO condition reaches this end.
3268         * sem_ch10.adb (Analyze_Proper_Body): Update reference to SCO_Record.
3269         * sem_res.adb (Resolve_Logical_Op): Validate putative SCOs
3270         when corresponding to an "and"/"or" operator affected by the
3271         Short_Circuit_And_Or pragma.
3273 2015-01-06  Robert Dewar  <dewar@adacore.com>
3275         * sem_ch8.adb (Analyze_Use_Package): Give more specific error
3276         msg for attempted USE of generic subprogram or subprogram.
3278 2015-01-06  Robert Dewar  <dewar@adacore.com>
3280         * s-valllu.adb, a-tiinau.adb, a-timoau.adb, a-ztinau.adb, a-ztmoau.adb,
3281         s-valuns.adb, s-valrea.adb, a-wtflau.adb, a-tiflau.adb, a-ztflau.adb,
3282         a-wtinau.adb, a-wtmoau.adb: Document recognition of : in place of #.
3284 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
3286         * sem_ch13.adb (Analyze_Aspect_Specifications): For aspects
3287         that specify stream subprograms, if the prefix is a class-wide
3288         type then the generated attribute definition clause must apply
3289         to the same class-wide type.
3290         (Default_Iterator): An iterator defined by an aspect of some
3291         container type T must have a first parameter of type T, T'class,
3292         or an access to such (from code reading RM 5.5.1 (2/3)).
3294 2015-01-06  Arnaud Charlet  <charlet@adacore.com>
3296         * gnat1drv.adb: Minor: complete previous change.
3298 2015-01-06  Olivier Hainque  <hainque@adacore.com>
3300         * set_targ.ads (C_Type_For): New function. Return the name of
3301         a C type supported by the back-end and suitable as a basis to
3302         construct the standard Ada floating point type identified by
3303         the T parameter. This is used as a common ground to feed both
3304         ttypes values and the GNAT tree nodes for the standard floating
3305         point types.
3306         * set_targ.adb (Long_Double_Index): The index at which "long
3307         double" gets registered in the FPT_Mode_Table. This is useful to
3308         know whether we have a "long double" available at all and get at
3309         it's characteristics without having to search the FPT_Mode_Table
3310         when we need to decide which C type should be used as the
3311         basis for Long_Long_Float in Ada.
3312         (Register_Float_Type): Fill Long_Double_Index.
3313         (FPT_Mode_Index_For): New function. Return the index in
3314         FPT_Mode_Table that designates the entry corresponding to the
3315         provided C type name.
3316         (FPT_Mode_Index_For): New function. Return the index in
3317         FPT_Mode_Table that designates the entry for a back-end type
3318         suitable as a basis to construct the standard Ada floating point
3319         type identified by the input T parameter.
3320         (elaboration code): Register_Back_End_Types unconditionally,
3321         so C_Type_For can operate regardless of -gnateT. Do it
3322         early so we can query it for the floating point sizes, via
3323         FPT_Mode_Index_For. Initialize Float_Size, Double_Size and
3324         Long_Double_Size from the FPT_Mode_Table, as cstand will do.
3325         * cstand.adb (Create_Float_Types): Use C_Type_For to determine
3326         which C type should be used as the basis for the construction
3327         of the Standard Ada floating point types.
3328         * get_targ.ads (Get_Float_Size, Get_Double_Size,
3329         Get_Long_Double_Size): Remove.
3330         * get_targ.adb: Likewise.
3332 2015-01-06  Thomas Quinot  <quinot@adacore.com>
3334         * sem_cat.adb (In_RCI_Declaration): Remove unnecessary
3335         parameter and rename to...
3336         (In_RCI_Visible_Declarations): Fix handling of private part of nested
3337         package.
3338         (Validate_RCI_Subprogram_Declaration): Reject illegal function
3339         returning anonymous access in RCI unit.
3341 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
3343         * sem_ch6.adb (New_Overloaded_Entity): In GNATprove mode, a
3344         function wrapper may be a homonym of another local declaration.
3345         * sem_ch8.adb (Analyze_Subprogram_Renaming): In GNATprove mode,
3346         build function and operator wrappers after the actual subprogram
3347         has been resolved, and replace the standard renaming declaration
3348         with the declaration of wrapper.
3349         * sem_ch12.ads (Build_Function_Wrapper, Build_Operator_Wraooer):
3350         make public for use elsewhere.
3351         * sem_ch12.adb (Build_Function_Wrapper, Build_Operator_Wraooer):
3352         rewrite, now that actual is fully resolved when wrapper is
3353         constructed.
3355 2015-01-06  Javier Miranda  <miranda@adacore.com>
3357         * exp_disp.adb: Revert previous change.
3359 2015-01-06  Robert Dewar  <dewar@adacore.com>
3361         * exp_util.adb: Change name Name_Table_Boolean to
3362         Name_Table_Boolean1.
3363         * namet.adb: Change name Name_Table_Boolean to Name_Table_Boolean1
3364         Introduce Name_Table_Boolean2/3.
3365         * namet.ads: Change name Name_Table_Boolean to Name_Table_Boolean1
3366         Introduce Name_Table_Boolean2/3.
3367         * par-ch13.adb: Change name Name_Table_Boolean to
3368         Name_Table_Boolean1.
3370 2015-01-06  Bob Duff  <duff@adacore.com>
3372         * gnat_rm.texi: Improve documentation regarding No_Task_Termination.
3374 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
3376         * sem_aggr.adb (Resolve_Record_Aggregte, Get_Value): For an
3377         others choice that covers multiple components, analyze each
3378         copy with the type of the component even in compile-only mode,
3379         to detect potential accessibility errors.
3381 2015-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
3383         * sem_res.adb (Is_Assignment_Or_Object_Expression): New routine.
3384         (Resolve_Actuals): An effectively volatile out
3385         parameter cannot act as an in or in out actual in a call.
3386         (Resolve_Entity_Name): An effectively volatile out parameter
3387         cannot be read.
3389 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
3391         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If the body is
3392         the expansion of an expression function it may be pre-analyzed
3393         if a 'access attribute is applied to the function, in which case
3394         last_entity may have been assigned already.
3396 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
3398         * sem_ch4.adb (Analyze_One_Call): If formal has an incomplete
3399         type and actual has the corresponding full view, there is no
3400         error, but a case of use of incomplete type in a predicate or
3401         invariant expression.
3403 2015-01-06  Vincent Celier  <celier@adacore.com>
3405         * makeutl.adb (Insert_No_Roots): Make sure that the same source
3406         in two different project tree is checked in both trees, if they
3407         are sources of two different projects, extended or not.
3409 2015-01-06  Arnaud Charlet  <charlet@adacore.com>
3411         * gnat1drv.adb: Minor code clean up.
3412         (Adjust_Global_Switches): Ignore gnatprove_mode in codepeer_mode.
3414 2015-01-06  Bob Duff  <duff@adacore.com>
3416         * osint.adb (Read_Source_File): Don't print out
3417         file name unless T = Source.
3419 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
3421         * sem_util.adb (Is_Variable, Is_OK_Variable_For_Out_Formal):
3422         recognize improper uses of constant_reference types as actuals
3423         for in-out parameters.
3424         (Check_Function_Call): Do not collect identifiers if function
3425         name is missing because of previous error.
3427 2015-01-06  Robert Dewar  <dewar@adacore.com>
3429         * ali-util.adb, sem_prag.adb, rtsfind.adb, sem_util.adb, sem_res.adb,
3430         ali.adb, binde.adb, namet.adb, namet.ads, gnatls.adb, bcheck.adb:
3431         Minor change of name Name_Table_Info => Name_Table_Int.
3433 2015-01-06  Robert Dewar  <dewar@adacore.com>
3435         * exp_strm.adb (Build_Elementary_Input_Call): Clarify comments
3436         in previous checkin.
3437         * freeze.adb (Freeze_Fixed_Point_Type): Add warning for shaving
3438         of bounds.
3439         * sem_prag.adb, sem_ch10.adb, sem_ch6.adb: Minor reformatting.
3441 2015-01-06  Vincent Celier  <celier@adacore.com>
3443         * a-strsup.adb (Times (Natural;String;Positive)): Raise
3444         Length_Error, not Index_Error, when the result is too long.
3446 2015-01-06  Thomas Quinot  <quinot@adacore.com>
3448         * a-direct.adb (Create_Path): Minor error handling and
3449         performance improvement.
3451 2015-01-06  Robert Dewar  <dewar@adacore.com>
3453         * checks.ads, sem_ch12.adb: Minor reformatting.
3454         * exp_ch4.adb (Expand_N_Op_Divide): Generate explicit divide by
3455         zero check for fixed-point case if Backend_Divide_Checks_On_Target
3456         is False.
3458 2015-01-06  Robert Dewar  <dewar@adacore.com>
3460         * sem_prag.adb (Analyze_Pragma, case No_Elaboration_Code_All):
3461         Do not set restriction No_Elaboration_Code unless the pragma
3462         appears in the main unit).
3464 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
3466         * sem_ch10.adb (Is_Regular_With_Clause): Add guard to verify
3467         that with clause has already been analyzed before checking kind
3468         of with_clause.
3470 2015-01-06  Robert Dewar  <dewar@adacore.com>
3472         * exp_strm.adb (Build_Elementary_Input_Call): Return base type
3473         (as required by RM).
3475 2015-01-06  Arnaud Charlet  <charlet@adacore.com>
3477         * a-reatim.adb ("/"): Add explicit pragma Unsuppress (Division_Check).
3479 2015-01-06  Robert Dewar  <dewar@adacore.com>
3481         * sem_prag.adb (Process_Suppress_Unsuppress): Add extra warning
3482         for ignoring pragma Suppress (Elaboration_Check) in SPARK mode.
3484 2015-01-06  Javier Miranda  <miranda@adacore.com>
3486         * exp_disp.adb (Expand_Interface_Conversion): No displacement
3487         of the pointer to the object needed when the type of the operand
3488         is not an interface type and the interface is one of its parent
3489         types (since they share the primary dispatch table).
3491 2015-01-06  Vincent Celier  <celier@adacore.com>
3493         * prj-env.adb: Minor comment update.
3495 2015-01-06  Javier Miranda  <miranda@adacore.com>
3497         * sem_res.adb (Valid_Conversion): Restrict the checks on anonymous
3498         access types whose target type is an interface type to operands
3499         that are access types; required to report an error when the
3500         operand is not an access type.
3502 2015-01-06  Bob Duff  <duff@adacore.com>
3504         * a-cfinve.adb (Copy): Set the discriminant to the Length when
3505         Capacity = 0.
3506         * a-cofove.ads (Capacity): Add a postcondition.
3507         * a-cfinve.ads (Capacity): Add a postcondition.
3508         (Reserve_Capacity): Correct the postcondition in the case where
3509         Capacity = 0; that means "Capacity => Length (Container)".
3510         * a-cofove.adb (Elems[c]): Add a comment
3511         explaining the dangers and how to avoid them.
3513 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
3515         * sem_ch12.adb: Code clean up.
3517 2015-01-06  Arnaud Charlet  <charlet@adacore.com>
3519         * gnatvsn.ads: Bump copyright year.
3521 2015-01-06  Robert Dewar  <dewar@adacore.com>
3523         * s-taskin.ads, s-traces.ads: Minor reformatting.
3524         * exp_util.adb: Minor typo fix.
3526 2015-01-06  Vincent Celier  <celier@adacore.com>
3528         * gnatls.adb (Search_RTS): Invoke Initialize_Default_Project_Path
3529         with the runtime name.
3530         * prj-env.adb (Initialize_Default_Project_Path): When both
3531         Target_Name and Runtime_Name are not empty string, add to the
3532         project path the two directories .../lib/gnat and .../share/gpr
3533         related to the runtime.
3534         * prj-env.ads (Initialize_Default_Project_Path): New String
3535         parameter Runtime_Name, defaulted to the empty string.
3537 2015-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
3539         * frontend.adb: Guard against the case where a configuration
3540         pragma may be split into multiple pragmas and the original
3541         rewritten as a null statement.
3542         * sem_prag.adb (Analyze_Pragma): Insert a brand new Check_Policy
3543         pragma using Insert_Before rather than Insert_Action. This
3544         takes care of the configuration pragma case where Insert_Action
3545         would fail.
3547 2015-01-06  Bob Duff  <duff@adacore.com>
3549         * a-coboho.ads (Element_Access): Add "pragma
3550         No_Strict_Aliasing (Element_Access);". This is needed because
3551         we are unchecked-converting from Address to Element_Access.
3552         * a-cofove.ads, a-cofove.adb (Elems,Elemsc): Fix bounds of the
3553         result to be 1.
3555 2015-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
3557         * sem_res.adb (Resolve_Actuals): Remove the
3558         restriction which prohibits volatile actual parameters with
3559         enabled external propery Async_Writers to act appear in procedure
3560         calls where the corresponding formal is of mode OUT.
3562 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
3564         * gnat_ugn.texi: Bump @copying's copyright year.
3566 2015-01-05  Eric Botcazou  <ebotcazou@adacore.com>
3568         PR ada/64492
3569         * gcc-interface/Makefile.in (../stamp-tools): Reinstate dropped code.
3571 2015-01-04  Uros Bizjak  <ubizjak@gmail.com>
3573         * gcc-interface/misc.c (internal_error_function): Use xasprintf instead
3574         of unchecked asprintf.
3577 Copyright (C) 2015 Free Software Foundation, Inc.
3579 Copying and distribution of this file, with or without modification,
3580 are permitted in any medium without royalty provided the copyright
3581 notice and this notice are preserved.