utils2.c (build_binary_op): Tweak formatting.
[official-gcc.git] / gcc / ada / ChangeLog
blobbc01e68f48bcd304dec44793b40fd80c60a5778f
1 2015-10-24  Eric Botcazou  <ebotcazou@adacore.com>
3         * gcc-interface/utils2.c (build_binary_op): Tweak formatting.
4         (build_unary_op): Likewise.
6 2015-10-23  Arnaud Charlet  <charlet@adacore.com>
8         * gnat_rm.texi, gnat_ugn.texi: Regenerate.
9         * doc/share/ada_pygments.py, doc/gnat_ugn/gnat_project_manager.rst,
10         doc/gnat_ugn/building_executable_programs_with_gnat.rst,
11         doc/gnat_ugn/gnat_and_program_execution.rst,
12         doc/gnat_rm/implementation_defined_attributes.rst,
13         doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
14         doc/gnat_rm/representation_clauses_and_pragmas.rst,
15         doc/gnat_rm/implementation_defined_pragmas.rst,
16         doc/gnat_rm/about_this_guide.rst,
17         doc/gnat_rm/implementation_of_ada_2012_features.rst,
18         doc/gnat_rm/implementation_of_specific_ada_features.rst,
19         doc/gnat_rm/implementation_defined_aspects.rst,
20         doc/gnat_rm/implementation_advice.rst: Update documentation.
22 2015-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
24         * contracts.ads, contracts.adb: New unit.
25         * exp_ch6.adb Add with and use clauses for Contracts.
26         (Expand_Subprogram_Contract): Moved to Contracts.
27         * exp_ch6.ads (Expand_Subprogram_Contract): Moved to Contracts.
28         * sem_ch3.adb Add with and use clauses for Contracts.
29         (Analyze_Object_Contract): Moved to Contracts.
30         (Analyze_Declarations): Remove local variable Pack_Decl. Do not
31         capture global references in contracts. Check the hidden states
32         of a package body.
33         * sem_ch6.adb Add with and use clauses in Contracts.
34         (Analyze_Generic_Subprogram_Body): Do not capture global
35         references in contracts.
36         (Analyze_Subprogram_Body_Contract):
37         Moved to Contracts.
38         (Analyze_Subprogram_Body_Helper): Freeze the
39         contract of the nearest enclosing package body. Always analyze
40         the subprogram body contract. Do not expand the subprogram
41         body contract.
42         (Analyze_Subprogram_Contract): Moved to Contracts.
43         * sem_ch6.ads (Analyze_Subprogram_Body_Contract): Moved to Contracts.
44         (Analyze_Subprogram_Contract): Moved to Contracts.
45         * sem_ch7.adb Add with and use clauses for Contracts.
46         (Analyze_Package_Body_Contract): Moved to Contracts.
47         (Analyze_Package_Body_Helper): Freeze the contract of the
48         nearest enclosing package body.
49         (Analyze_Package_Contract): Moved to Contracts.
50         * sem_ch7.ads (Analyze_Package_Body_Contract): Moved to Contracts.
51         (Analyze_Package_Contract): Moved to Contracts.
52         * sem_ch10.adb Add with and use clauses for Contracts.
53         (Analyze_Compilation_Unit): Do not capture global references
54         in contracts.
55         (Analyze_Subprogram_Body_Stub_Contract): Moved to Contracts.
56         * sem_ch10.ads (Analyze_Subprogram_Body_Stub_Contract): Moved
57         to Contracts.
58         * sem_ch12.adb Add with and use clauses for Contracts.
59         (Analyze_Subprogram_Instantiation): Update the call to
60         Instantiate_Subprogram_Contract.
61         (Instantiate_Package_Body):
62         Do not copy the entity of the spec when creating an entity
63         for the body. Construct a brand new defining identifier for
64         the body and inherit the Comes_From_Source flag from the spec.
65         (Instantiate_Subprogram_Body): Remove Anon_Id to Act_Decl_Id
66         and update all occurrences. Construct a brand new defining
67         identifier for the body and inherit the Comes_From_Source
68         flag from the spec.
69         (Instantiate_Subprogram_Contract): Moved
70         to Contracts.
71         (Save_Global_References_In_Aspects): Moved to
72         the spec of Sem_Ch12.
73         (Save_Global_References_In_Contract):
74         Moved to Contracts.
75         * sem_ch12.ads (Save_Global_References_In_Aspects): Moved from
76         the body of Sem_Ch12.
77         (Save_Global_References_In_Contract):
78         Moved to Contracts.
79         * sem_prag.adb Add with and use clauses for Contracts.
80         (Add_Item): Removed. All references to this routine have been
81         replaced with calls to Append_New_Elmt.
82         (Analyze_Constituent):
83         Add special diagnostics for errors caused by freezing of
84         contracts.
85         (Analyze_Refined_State_In_Decl_Part): Add formal
86         parameter Freeze_Id. Add new global variable Freeze_Posted.
87         (Collect_Body_States): Removed.
88         (Report_Unused_States): Removed.
89         * sem_prag.ads (Analyze_Defined_State_In_Decl_Part): Add formal
90         parameter Freeze_Id and update comment on usage.
91         * sem_util.adb Remove with and use clauses for
92         Sem_Ch12.
93         (Add_Contract_Item): Moved to Contracts.
94         (Check_Unused_Body_States): New routine.
95         (Collect_Body_States):
96         New routine.
97         (Create_Generic_Contract): Moved to Contracts.
98         (Inherit_Subprogram_Contract): Moved to Contracts.
99         (Report_Unused_Body_States): New routine.
100         * sem_util.ads (Add_Contract_Item): Moved to Contracts.
101         (Check_Unused_Body_States): New routine.
102         (Collect_Body_States): New routine.
103         (Create_Generic_Contract): Moved to Contracts.
104         (Inherit_Subprogram_Contract): Moved to Contracts.
105         (Report_Unused_Body_States): New routine.
106         * sinfo.adb (Is_Expanded_Contract): New routine.
107         (Set_Is_Expanded_Contract): New routine.
108         * sinfo.ads New attribute Is_Expanded_Contract along with
109         placement in nodes.
110         (Is_Expanded_Contract): New routine along
111         with pragma Inline.
112         (Set_Is_Expanded_Contract): New routine
113         along with pragma Inline.
114         * gcc-interface/Make-lang.in: Add entry for contracts.o
116 2015-10-23  Bob Duff  <duff@adacore.com>
118         * bindgen.adb, init.c, opt.ads, switch-b.adb: Implement new -Ea and
119         -Es switches.
120         * switch-b.ads: Minor comment fix.
121         * bindusg.adb: Document new -Ea and -Es switches.
122         * s-exctra.ads: Use -Es instead of -E.
124 2015-10-23  Tristan Gingold  <gingold@adacore.com>
126         * gcc-interface/utils2.c (build_call_alloc_dealloc): Check no implicit
127         task and protected object restrictions.
129 2015-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
131         * sem_ch12.adb, exp_ch6.adb: Minor reformatting.
133 2015-10-23  Gary Dismukes  <dismukes@adacore.com>
135         * exp_ch6.adb: Minor reformatting.
137 2015-10-23  Ed Schonberg  <schonberg@adacore.com>
139         * sem_ch12.adb (Check_Formal_Packages): A formal package whose
140         actual part is (others => <>) os identical to a formal package
141         with an actual part written as (<>).
143 2015-10-23  Arnaud Charlet  <charlet@adacore.com>
145         * a-reatim.adb ("/"): For Time_Span division convert the operands
146         to integers and then use integer division, which conforms to
147         the rounding required by Ada RM.
149 2015-10-23  Ed Schonberg  <schonberg@adacore.com>
151         * sem_ch6.adb (Check_Missing_Return): Do not report a missing
152         return statement on a function body constructed to complete a
153         package body for a premature instantiation.
155 2015-10-23  Ed Schonberg  <schonberg@adacore.com>
157         * exp_ch6.adb (Build_Procedure_Body_Form): Replace body of
158         original function with that of generated procedure, to simplify
159         processing and avoid scoping problems with local declarations.
160         (Rewrite_Function_Call_For_C): Handle properly the case of a
161         parameterless function.
163 2015-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
165         * a-exextr.adb, sem_ch6.adb, sem_ch13.adb: Minor reformatting.
167 2015-10-23  Arnaud Charlet  <charlet@adacore.com>
169         * s-taskin.ads: Minor code clean up.
170         (Ada_Task_Control_Block): Move fixed size field before variable sized
171         ones.
172         * einfo.ads: Minor editing.
174 2015-10-23  Ed Schonberg  <schonberg@adacore.com>
176         * sem_ch6.adb (Check_Aggregate_Accessibility): Apply rule in RM
177         6.5 (8.3) to verify that access discriminants in an aggregate
178         in a return statement have the proper accessibility, i.e. do
179         not lead to dangling references.
181 2015-10-23  Eric Botcazou  <ebotcazou@adacore.com>
183         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Add missing
184         test on Address_Clause_Overlay_Warnings to the "constant overlays
185         variable" warning. For the reverse case, also issue a warning if
186         the modification is potentially made through the initialization
187         of the variable.
189 2015-10-23  Jose Ruiz  <ruiz@adacore.com>
191         * a-exetim-posix.adb (Clock): Use the pthread_getcpuclockid
192         function to have access to CPU clocks for tasks other than the
193         calling task.
195 2015-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
197         * debug.adb: Switch -gnatd.5 is no longer in use, remove the
198         associated documentation.
199         * exp_dbug.adb (Get_External_Name): Do not add a special prefix
200         for ignored Ghost entities or when switch -gnatd.5 is enabled.
201         * exp_dbug.ads Remove the documentation concerning the encoding
202         of ignored Ghost entities.
204 2015-10-23  Bob Duff  <duff@adacore.com>
206         * a-exextr.adb (Notify_Exception): For Unhandled_Raise_In_Main,
207         mimic the output from Ada.Exceptions.Last_Chance_Handler; don't
208         print "Exception raised".
209         * s-stalib.ads, s-exctra.ads, s-exctra.adb: Add
210         Unhandled_Raise_In_Main to types Exception_Trace_Kind/Trace_Kind.
212 2015-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
214         * exp_attr.adb, freeze.adb, sem_attr.adb, exp_aggr.adb,
215         gnatname.adb: Minor reformatting.
217 2015-10-23  Steve Baird  <baird@adacore.com>
219         * a-cbdlli.ads, a-cbhama.ads, a-cbhase.ads, a-cbmutr.ads,
220         a-cborma.ads, a-cborse.ads, a-cbprqu.ads, a-cbsyqu.ads,
221         a-cdlili.ads, a-cfdlli.ads, a-cfhama.ads, a-cfhase.ads,
222         a-cfinve.ads, a-cforma.ads, a-cforse.ads, a-cidlli.ads,
223         a-cihama.ads, a-cihase.ads, a-cimutr.ads, a-ciorma.ads,
224         a-ciormu.ads, a-ciorse.ads, a-coboho.ads, a-cobove.ads,
225         a-cofove.ads, a-cohama.ads, a-cohase.ads, a-coinho.ads,
226         a-coinho-shared.ads, a-coinve.ads, a-comutr.ads, a-conhel.ads,
227         a-convec.ads, a-coorma.ads, a-coormu.ads, a-coorse.ads,
228         a-cuprqu.ads, a-cusyqu.ads, a-rbtgbo.ads: Add spec Annotate
229         pragmas.
230         * a-cbdlli.adb, a-cbhama.adb, a-cbhase.adb, a-cbmutr.adb,
231         a-cborma.adb, a-cborse.adb, a-cbprqu.adb, a-cbsyqu.adb,
232         a-cdlili.adb, a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb,
233         a-cfinve.adb, a-cforma.adb, a-cforse.adb, a-cidlli.adb,
234         a-cihama.adb, a-cihase.adb, a-cimutr.adb, a-ciorma.adb,
235         a-ciormu.adb, a-ciorse.adb, a-coboho.adb, a-cobove.adb,
236         a-cofove.adb, a-cohama.adb, a-cohase.adb, a-coinho.adb,
237         a-coinho-shared.adb, a-coinve.adb, a-comutr.adb, a-conhel.adb,
238         a-convec.adb, a-coorma.adb, a-coormu.adb, a-coorse.adb,
239         a-cuprqu.adb, a-cusyqu.adb, a-rbtgbo.adb: Remove body Annotate
240         pragmas.
242 2015-10-23  Vincent Celier  <celier@adacore.com>
244         * gnatname.adb: When gnatname is invoked with a project file,
245         specified with switch -P, if gprname is available, gnatname will
246         invoke gprname, with the target if it is a cross gnatname.
248 2015-10-23  Arnaud Charlet  <charlet@adacore.com>
250         * exp_ch4.adb: Fix typo.
251         * exp_ch6.adb: Update comment.
252         * exp_attr.adb (Expand_Min_Max_Attribute): Simplify expansion.
253         * exp_aggr.adb (Convert_To_Positional): Only convert to
254         positional when generating C in case of an object declaration.
255         (In_Object_Declaration): New.
256         (Late_Expansion): Adapt to trees generated by Modify_Tree_For_C.
257         * sinfo.ads: Update documentation.
259 2015-10-23  Joel Brobecker  <brobecker@adacore.com brobecker>
261         * sigtramp.h (struct sigcontext, struct ucontext): Remove declarations,
262         and replace them by include of corresponding header file.
264 2015-10-23  Bob Duff  <duff@adacore.com>
266         * a-convec.adb (Copy): Make sure C is initialized
267         on all paths, including when Checks is False.
269 2015-10-23  Eric Botcazou  <ebotcazou@adacore.com>
271         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Remove
272         error as unreachable.
274 2015-10-23  Arnaud Charlet  <charlet@adacore.com>
276         * gnat1drv.adb (Adjust_Global_Switches): Adjust.
278 2015-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
280         * exp_dbug.ads, exp_dbug.adb (Get_External_Name): The special prefix for
281         ignored Ghost entities is now ___ghost_.
283 2015-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
285         * ghost.adb (Is_Subject_To_Ghost): Check the
286         original node when searching for pragma Ghost to catch cases
287         where a source construct has been rewritten into something else.
289 2015-10-23  Ed Schonberg  <schonberg@adacore.com>
291         * einfo.ads, einfo.adb (Rewritten_For_C): New flag on functions
292         that return a constrained array type.  When generating C these
293         functions are rewritten as procedures with an out parameter,
294         and calls to such functions are rewritten accordingly.
295         * exp_ch6.adb (Expand_N_Subprogram_Declaration): When
296         Modify_Tree_For_C is set and the function returns a constrained
297         array type, generate a procedure declaration with an additional
298         out parameter. Mark original function as Rewritten_For_C.
299         The new declaration is inserted in tree immediately after
300         current declaration.
301         (Expand_Subprogram_Body): If entity is marked Rewritten_For_C,
302         generate body of corresponding procedure using declarations
303         and statements for function body. Replace return statements
304         with assignments to the out parameter, followed by a simple
305         return statement.
306         (Rewrite_Function_Call_For_C): New procedure to replace a function
307         call that returns an array by a procedure call.
309 2015-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
311         * sem_util.adb (Denotes_Iterator): New routine.
312         (Is_Iterator): Code cleanup. Factor out the detection of a
313         predefined iterator.  As a result this fixes a missing case
314         where a tagged type implements interface Reversible_Iterator.
316 2015-10-23  Ed Schonberg  <schonberg@adacore.com>
318         * sem_attr.adb (Eval_Attribute): Constant-fold 'Enabled if
319         not within a generic unit, even if expander is not active, so
320         that instances of container packages remain preelaborable in
321         -gnatc mode.
323 2015-10-23  Tristan Gingold  <gingold@adacore.com>
325         * init.c (__gnat_sigtramp): New assembly function for arm64-darwin.
326         (__gnat_error_handler): Use trampoline for arm64.
328 2015-10-23  Ed Schonberg  <schonberg@adacore.com>
330         * exp_ch3.adb (Expand_N_Object_Declaration): if the type of the
331         object is a class-wide limited interface type, the expression
332         is not restricted to the forms specified for limited types.
334 2015-10-23  Vincent Celier  <celier@adacore.com>
336         * gnatname.adb: Code clean up.
337         * s-taasde.ads: Fix comment.
339 2015-10-23  Ed Schonberg  <schonberg@adacore.com>
341         * sem_util.adb (Is_Iterator, Is_Reversible_iterator): Use
342         root type to determine whether the type is a descendant of the
343         corresponding interface type, so take into account multiple
344         levels of subtypes and derivations.
346 2015-10-23  Olivier Hainque  <hainque@adacore.com>
348         * tracebak.c: Refine selection of GCC/GENERIC_UNWINDER for
349         tracebacks on x86 & x86_64.
350         (x86 & x86_64): If !SJLJ, always pick the
351         GCC_UNWINDER for x86_64 (not only on linux).
352         * sem_util.ads: Minor fix in comment.
354 2015-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
356         * sem_prag.adb (Analyze_Pragma): Pragma Volatile_Function should
357         not apply to a function instantiation.
358         * sem_util.adb (Has_Effectively_Volatile_Profile): New routine.
359         (Is_Volatile_Function): An instance of Ada.Unchecked_Conversion
360         is a volatile function when its profile contains an effectively
361         volatile type.
362         * sem_util.ads (Has_Effectively_Volatile_Profile): New routine.
364 2015-10-23  Arnaud Charlet  <charlet@adacore.com>
366         * exp_unst.adb (Unnest_Subprogram): Complete previous
367         change and update comments.
369 2015-10-23  Ed Schonberg  <schonberg@adacore.com>
371         * sem_util.ads, sem_util.adb (Check_Function_With_Address_Parameter):
372         A subprogram that has an Address parameter and is declared in a Pure
373         package is not considered Pure, because the parameter may be used as a
374         pointer and the referenced data may change even if the address value
375         itself does not.
376         * freeze.adb (Freeze_Subprogram): use it.
377         * exp_ch6.adb (Expand_N_Subprogram_Body): Use it.
379 2015-10-23  Olivier Hainque  <hainque@adacore.com>
381         * tracebak.c: Fallback to generic unwinder for gcc-sjlj on x86 &
382         x86_64 linux
383         * tracebak.c: Rework x86 & x86_64 sections to resort to the
384         generic unwinder if __USING_SJLJ_EXCEPTIONS__.
386 2015-10-23  Javier Miranda  <miranda@adacore.com>
388         * sem_util.adb (Check_Function_Writable_Actuals): For function
389         calls restrict the check to elementary types, as requested by
390         RM 6.4.1(6.15/3)
392 2015-10-23  Arnaud Charlet  <charlet@adacore.com>
394         * exp_unst.adb (Unnest_Subprogram): Suppress initialization on
395         Decl_ARECnT since we are taking care of all initializations in
396         the generated code.
398 2015-10-23  Ed Schonberg  <schonberg@adacore.com>
400         * sem_dim.adb (Analyze_Dimension_Extension_Or_Record_Aggregate):
401         Handle properly a box-initialized aggregate component.
403 2015-10-23  Yannick Moy  <moy@adacore.com>
405         * sem_prag.adb (Analyze_Pragma): Reject Volatile_Function not placed
406         on a function.
408 2015-10-23  Yannick Moy  <moy@adacore.com>
410         * a-extiin.ads, a-reatim.ads, a-interr.ads, a-exetim-mingw.ads,
411         a-exetim-default.ads, a-exetim.ads, a-taside.ads: Add "Global => null"
412         contract on subprograms.
413         * lib-xref-spark_specific.adb: collect scopes for stubs of
414         protected objects
416 2015-10-23  Arnaud Charlet  <charlet@adacore.com>
418         * gnat1drv.adb (Adjust_Global_Switches): Enable
419         Back_Annotate_Rep_Info to get size information from gigi.
420         (Gnat1drv): Code clean ups.
421         * frontend.adb (Frontend): Ditto.
423 2015-10-23  Arnaud Charlet  <charlet@adacore.com>
425         * gnat1drv.adb (Adjust_Global_Switches): Adjust settings.
426         * sem.adb (Semantics): Remove special case.
428 2015-10-23  Gary Dismukes  <dismukes@adacore.com>
430         * bindgen.adb, restrict.adb: Minor spelling/grammar fixes.
432 2015-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
434         * sem_res.adb (Resolve_Entity_Name): Code cleanup. Check for possible
435         elaboration issues in SPARK when the name denotes a source variable.
437 2015-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
439         * exp_ch7.adb (Process_Transient_Objects): Reimplement to properly
440         handle restriction No_Exception_Propagation.
441         * exp_ch11.adb (Expand_At_End_Handler): Update the parameter
442         profile and all references to Block.
443         * exp_ch11.ads (Expand_At_End_Handler): Update the parameter
444         profile and comment on usage.
445         * exp_intr.adb (Expand_Unc_Deallocation): Reimplement to properly
446         handle restriction No_Exception_Propagation.
447         * gnat1drv.adb, restrict.adb: Update comment.
449 2015-10-23  Bob Duff  <duff@adacore.com>
451         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Do not call
452         SS_Release for a block statement enclosing the return statement in the
453         case where a build-in-place function return is returning
454         the result on the secondary stack. This is accomplished by
455         setting the Sec_Stack_Needed_For_Return flag on such blocks.
456         It was already being set for the function itself, and it was
457         already set correctly for blocks in the non-build-in-place case
458         (in Expand_Simple_Function_Return).
459         (Set_Enclosing_Sec_Stack_Return): New procedure to perform
460         the Set_Sec_Stack_Needed_For_Return calls. Called in the
461         build-in-place and non-build-in-place cases.
462         (Expand_Simple_Function_Return): Call
463         Set_Enclosing_Sec_Stack_Return instead of performing the loop
464         in line.
466 2015-10-23  Bob Duff  <duff@adacore.com>
468         * scng.adb (Char_Literal_Case): If an apostrophe
469         follows a reserved word, treat it as a lone apostrophe, rather
470         than the start of a character literal. This was already done for
471         "all", but it needs to be done also for (e.g.) "Delta".
473 2015-10-23  Bob Duff  <duff@adacore.com>
475         * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): Use
476         Underlying_Type for B_Typ, in case the Typ is a subtype of a type with
477         unknown discriminants.
478         * g-awk.ads: Minor style fix in comment
480 2015-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
482         * debug.adb: Document the use of debug switch -gnatd.5.
483         * einfo.adb: Code reformatting. (Is_Ghost_Entity): Moved from ghost.adb.
484         * einfo.ads New synthesized attribute Is_Ghost_Enity along
485         with usage in nodes and pragma Inline.
486         (Is_Ghost_Entity: Moved from ghost.ads.
487         * exp_ch3.adb Code reformatting.
488         (Expand_Freeze_Array_Type): Capture, set and restore the Ghost mode.
489         (Expand_Freeze_Class_Wide_Type): Capture, set and restore the
490         Ghost mode.
491         (Expand_Freeze_Enumeration_Type): Capture, set and
492         restore the Ghost mode.
493         (Expand_Freeze_Record_Type): Capture, set and restore the Ghost mode.
494         * exp_ch6.adb (Expand_Subprogram_Contract): Do not expand the
495         contract of an ignored Ghost subprogram.
496         * exp_ch13.adb Add with and use clauses for Ghost.
497         (Expand_N_Freeze_Entity): Capture, set and restore the Ghost mode.
498         * exp_dbug.adb (Get_External_Name): Code reformatting. Add a
499         special prefix for ignored Ghost entities or when requested by
500         -gnatd.5 for any Ghost entity.
501         * exp_dbug.ads Document the use of prefix "_ghost_" for ignored
502         Ghost entities.
503         * exp_prag.adb (Expand_Pragma_Check): Capture, set and restore the
504         Ghost mode.
505         (Expand_Pragma_Loop_Variant): Use In_Assertion_Expr
506         to signal the original context.
507         * ghost.adb (Check_Ghost_Overriding): Code cleanup.
508         (Is_Ghost_Entity): Moved to einfo.adb.  (Is_OK_Declaration):
509         Move the assertion expression check to the outer level.
510         (Is_OK_Ghost_Context): An assertion expression is a valid Ghost
511         context.
512         * ghost.ads (Is_Ghost_Entity): Moved to einfo.ads.
513         * sem_ch3.adb (Analyze_Object_Contract): A source Ghost object
514         cannot be imported or exported. Mark internally generated objects
515         as Ghost when applicable.
516         (Make_Class_Wide_Type): Inherit the ghostness of the root tagged type.
517         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Mark
518         a stand alone subprogram body as Ghost when applicable.
519         (Analyze_Subprogram_Declaration): Mark internally generated
520         subprograms as Ghost when applicable.
521         * sem_ch7.adb: Code cleanup.
522         * sem_ch13.adb (Add_Invariants): Add various formal
523         parameters to break dependency on global variables.
524         (Build_Invariant_Procedure): Code cleanup. Capture, set and
525         restore the Ghost mode.
526         * sem_res.adb (Resolve_Actuals): The actual parameter of a source
527         Ghost subprogram whose formal is of mode IN OUT or OUT must be
528         a Ghost variable.
530 2015-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
532         * sem_ch8.adb Code cleanup.
533         (Find_Expanded_Name): Replace
534         the call to In_Pragmas_Depends_Or_Global with a call to
535         In_Abstract_View_Pragma.
536         (In_Abstract_View_Pragma): New routine.
537         (In_Pragmas_Depends_Or_Global): Removed.
538         * sem_prag.adb (Analyze_Part_Of): Catch a case where indicator
539         Part_Of denotes the abstract view of a variable.
541 2015-10-23  Arnaud Charlet  <charlet@adacore.com>
543         * sem_util.ads (Unique_Defining_Entity): Document the result
544         for tasks and entries.
545         * sem_util.adb (Unique_Entity): Return declaration entity for task and
546         entry bodies
548 2015-10-22  Mikhail Maltsev  <maltsevm@gmail.com>
550         * gcc-interface/decl.c (gnat_to_gnu_entity): Use gcc_checking_assert.
551         * gcc-interface/trans.c (assoc_to_constructor): Use flag_checking.
552         * gcc-interface/utils.c (relate_alias_sets): Likewise.
553         * gcc-interface/utils2.c (build_binary_op, build_unary_op): Use
554         gcc_checking_assert
556 2015-10-21  Martin Sebor  <msebor@redhat.com>
558         PR driver/68043
559         * gcc-interface/lang.opt: End each sentence that describes
560         an option with a period.
562 2015-10-20  Yannick Moy  <moy@adacore.com>
564         * fmap.adb, a-cihama.adb, sem_ch5.adb, make.adb, inline.adb,
565         a-cfhase.adb, scng.adb, sem_ch12.adb, freeze.adb, tempdir.adb,
566         sem_util.adb, sem_res.adb, s-regexp.adb, a-clrefi.adb: Fix coding
567         style for marking start of processing of subprograms.
569 2015-10-20  Yannick Moy  <moy@adacore.com>
571         * lib-xref-spark_specific.adb (Add_SPARK_File): Start traversal
572         by requesting info from stubs.  (Traverse_All_Compilation_Units):
573         Remove unused procedure.
574         (Traverse_Declarations_Or_Statements): Handle protected and task units.
575         * lib-xref.ads (Traverse_All_Compilation_Units): Remove unused
576         procedure.
577         * restrict.adb (Check_Restriction): Do not ignore
578         restrictions in GNATprove_Mode.
580 2015-10-20  Arnaud Charlet  <charlet@adacore.com>
582         * s-valllu.adb, sem_ch3.adb, layout.adb, a-crbtgo.adb, exp_ch9.adb,
583         make.adb, g-diopit.adb, s-valuns.adb, sem_ch9.adb, sem_ch10.adb,
584         sem_ch12.adb, a-tifiio.adb, g-dynhta.adb, uintp.adb,
585         sem_util.adb, sem_res.adb, s-htable.adb, exp_tss.adb, s-soflin.ads,
586         exp_ch6.adb, sem_ch6.adb, a-rbtgbo.adb, par-ch12.adb, sem_ch8.adb,
587         sem_eval.adb, mdll.adb, par-ch5.adb, s-poosiz.adb, sem_ch4.adb,
588         a-ngelfu.adb, s-taspri-solaris.ads, a-cforse.adb: Fix typos.
590 2015-10-20  Arnaud Charlet  <charlet@adacore.com>
592         * sem_aggr.adb, mlib-prj.adb, prep.adb, eval_fat.adb, rtsfind.adb,
593         freeze.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnatlink.adb,
594         par-ch6.adb, exp_tss.adb, exp_ch4.adb, s-shasto.adb, exp_fixd.adb,
595         sem_ch6.adb, clean.adb, sem_ch8.adb, sem_eval.adb, sem_ch9.adb: Fix
596         typos.
598 2015-10-20  Ed Schonberg  <schonberg@adacore.com>
600         * sem_ch11.adb (Analyze_Handled_Statements): If the scope is a
601         postcondition subprogram, do not check for useless assignments
602         because there are no source references in such a body, and the
603         call will lose deferred references from the enclosing subprogram.
605 2015-10-20  Ed Schonberg  <schonberg@adacore.com>
607         * sem_ch13.adb: nalyze_Attribute_Definition_Clause, case
608         'Address):  If either object is controlled the overlay is
609         erroneous, but analysis must be completed so that back-end sees
610         address clause and completes code generation.  Improve text
611         of warning.
613 2015-10-20  Thomas Quinot  <quinot@adacore.com>
615         * exp_ch4.adb: Minor reformatting.
617 2015-10-20  Bob Duff  <duff@adacore.com>
619         * s-mudido-affinity.adb (Create): Correct subranges of slices of CPU
620         arrays.
622 2015-10-20  Arnaud Charlet  <charlet@adacore.com>
624         * sinfo.ads, g-pehage.adb, par-ch12.adb,
625         layout.adb, exp_util.adb, sem_aux.adb, make.adb, checks.adb,
626         sem_ch12.adb, sem_res.adb, sem_attr.adb, a-ngelfu.adb, sem_ch4.adb,
627         switch-b.adb, sem_ch6.adb, prj-dect.adb, gnatxref.adb, sem_ch13.adb,
628         lib-xref.adb: Fix typos.
630 2015-10-20  Tristan Gingold  <gingold@adacore.com>
632         * exp_ch4.adb (Expand_Array_Comparison): Use
633         generic code if runtime routine is not available.
635 2015-10-20  Yannick Moy  <moy@adacore.com>
637         * a-sytaco.ads (Ada.Synchronous_Task_Control): Package
638         now withs System.Task_Identification. The visible part
639         of the spec has SPARK_Mode. The private part has pragma
640         SPARK_Mode (Off).
641         (Set_True): Added Global and Depends aspects
642         (Set_False): Added Global and Depends aspects (Current_State):
643         Added Volatile_Function aspect and added external state
644         Ada.Task_Identification.Tasking_State as a Global input.
645         (Suspend_Until_True): Added Global and Depends aspects
646         * a-sytaco.adb (Ada.Synchronous_Task_Control):
647         Package body has SPARK_Mode => Off
648         * a-extiin.ads (Ada.Execution_Time.Interrupts):
649         Package now withs Ada.Real_Time and has SPARK_Mode.
650         (Clock): Added Volatile_Function aspect and added external state
651         Ada.Real_Time.Clock_Time as a Global input.
652         * a-reatim.ads (Ada.Real_Time): The visible part of the spec has
653         SPARK_Mode. The private part has pragma SPARK_Mode (Off). The package
654         declares external state Clock_Time with properties Async_Readers and
655         Async_Writers.
656         (Clock): Added Volatile_Function aspect and
657         added external state Clock_Time as a Global input.
658         * a-reatim.adb (Ada.Real_Time): Package body has SPARK_Mode => Off
659         * a-exetim-default.ads, a-exetim-mingw.ads (Ada.Execution_Time):
660         The visible part of the spec has SPARK_Mode. The private part
661         has pragma SPARK_Mode (Off).
662         (Clock): Added Volatile_Function
663         aspect and added external state Clock_Time as a Global input.
664         (Clock_For_Interrupts): Added Volatile_Function aspect and added
665         external state Ada.Real_Time.Clock_Time as a Global input.
666         * a-exetim-mingw.adb (Ada.Execution_Time): Package body has
667         SPARK_Mode => Off
668         * a-interr.ads (Ada.Interrupts): Package now
669         withs Ada.Task_Identification (Is_Reserved): Added
670         SPARK_Mode, Volatile_Function and external state
671         Ada.Task_Identification.Tasking_State as a Global input.
672         (Is_Attached): Added SPARK_Mode, Volatile_Function and external
673         state Ada.Task_Identification.Tasking_State as a Global input.
674         (Attach_Handler): Added SPARK_Mode => Off (Exchange_Handler):
675         Added SPARK_Mode => Off (Detach_Handler): Added SPARK_Mode
676         and external state Ada.Task_Identification.Tasking_State as a
677         Global In_Out.  (Reference): Added SPARK_Mode => Off
678         * a-disedf.ads (Get_Deadline): Added SPARK_Mode, Volatile_Function
679         and external state Ada.Task_Identification.Tasking_State as a
680         Global input.
681         * a-taside.ads (Ada.Task_Identification): The visible part of
682         the spec has SPARK_Mode.  The private part has pragma SPARK_Mode
683         (Off). The package declares external state Tasking_State with
684         properties Async_Readers and Async_Writers.
685         (Current_Task): Added
686         Volatile_Function aspect and added external state Tasking_State
687         as a Global input.
688         (Environment_Task): Added SPARK_Mode => Off
689         (Is_Terminated): Added Volatile_Function aspect and added external
690         state Tasking_State as a Global input.  (Is_Callable): Added
691         Volatile_Function aspect and added external state Tasking_State as
692         a Global input.
693         (Activation_Is_Complete): Added Volatile_Function
694         aspect and added external state Tasking_State as a Global input.
695         * a-taside.adb (Ada.Task_Identification): Package body has
696         SPARK_Mode => Off.
698 2015-10-20  Ed Schonberg  <schonberg@adacore.com>
700         * atree.ads, atree.adb: Enable List38 and List39 on entities.
701         * einfo.ads, einfo.adb (Class_Wide_Preconds) new attribute defined
702         on subprograms. Holds the list of class-wide precondition
703         functions inherited from ancestors. Each such function is an
704         instantiation of the generic function generated from an explicit
705         aspect specification for a class-wide precondition. A type is
706         an ancestor of itself, and therefore a root type has such an
707         instance on its own list.
708         (Class_Wide_Postconds): ditto for postconditions.
710 2015-10-20  Vincent Celier  <celier@adacore.com>
712         * prj-attr.adb: Add packages Prove and GnatTest.
714 2015-10-20  Steve Baird  <baird@adacore.com>
716         * a-conhel.adb: Add an Annotate pragma to help suppress CodePeer's
717         analysis of internals of container generic instances. This pragma
718         has no other effect.
719         * a-conhel.adb (Generic_Implementation) Add "pragma Annotate
720         (CodePeer, Skip_Analysis);".
722 2015-10-20  Steve Baird  <baird@adacore.com>
724         * pprint.adb: Code clean up.
726 2015-10-20  Bob Duff  <duff@adacore.com>
728         * a-cfinve.ads, a-coboho.ads: Improve comments.
729         * a-coboho.adb (Size_In_Storage_Elements): Improve error message
730         in case of "Size is too big" exception.
732 2015-10-20  Bob Duff  <duff@adacore.com>
734         * a-contai.ads: Remove check names (moved to snames.ads-tmpl).
735         * snames.ads-tmpl: Add check names that were previously in
736         a-contai.ads, so they are now visible in configuration files.
737         * types.ads: Add checks corresponding to snames.ads-tmpl.
739 2015-10-20  Ed Schonberg  <schonberg@adacore.com>
741         * sem_ch5.adb (Analyze_Loop_Statement): Attach generated loop
742         identifier to the tree, because it may be the root of a tree
743         traversal in Pop_Scope when freeze actions are pending.
745 2015-10-20  Steve Baird  <baird@adacore.com>
747         * pprint.ads (Expression_Image) Add new generic formal flag
748         Hide_Parameter_Blocks.
749         * pprint.adb (Expression_Image) If new flag is set, then display
750         dereferences of parameter block components accordingly.
752 2015-10-20  Ed Schonberg  <schonberg@adacore.com>
754         * sem_prag.adb: Code clean up.
756 2015-10-20  Hristian Kirtchev  <kirtchev@adacore.com>
758         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Code cleanup.
759         (Make_Build_In_Place_Call_In_Object_Declaration): Update the
760         parameter profile.  Code cleanup. Request debug info for the
761         object renaming declaration.
762         (Move_Activation_Chain): Add new formal parameter and update the
763         comment on usage.
764         * exp_ch6.ads (Make_Build_In_Place_Call_In_Object_Declaration):
765         Update the parameter profile and comment on usage.
766         * sem_util.ads, sem_util.adb (Remove_Overloaded_Entity): New routine,
767         currently unused.
769 2015-10-20  Ed Schonberg  <schonberg@adacore.com>
771         * sem_ch13.adb (Analyze_One_Aspect, case
772         Aspect_Disable_Controlled): If expander is not active, pre-analyze
773         expression anyway for ASIS and other tools use.
774         * sem_prag.adb (Build_Generic_Class_Condition): Handle properly
775         anonymous access types in parameter specifications. Make the
776         formal type a formal derived type of the controlling type of
777         the subprogram.
779 2015-10-20  Tristan Gingold  <gingold@adacore.com>
781         * s-rident.ads: No_Task_At_Interrupt_Priority: New restriction.
782         * sem_prag.adb (Analyze_Pragma): Check the restriction.
783         * sem_ch13.adb (Analyze_Attribute_Definition_Clause):
784         Check the restriction (for aspects).
786 2015-10-20  Gary Dismukes  <dismukes@adacore.com>
788         * sem_prag.adb: Minor reformatting.
790 2015-10-20  Tristan Gingold  <gingold@adacore.com>
792         * sem_util.adb (Is_Protected_Self_Reference): Remove reference to
793         UET_Address in comment.
794         * sem_attr.adb (Check_Unit_Name): Adjust comment.
795         (Analyze_Attribute): Remove handling of UET_Address.
796         * sem_attr.ads (Attribute_Impl_Def): Remove Attribute_UET_Address.
797         * snames.ads-tmpl Remove Name_UET_Address, Attribute_UET_Address.
798         * exp_attr.adb (Expand_N_Attribute_Reference): Remove
799         Attribute_UET_Address.
801 2015-10-20  Bob Duff  <duff@adacore.com>
803         * a-cbdlli.adb, a-cdlili.adb, a-chtgop.adb, a-cidlli.adb,
804         * a-cobove.adb, a-coinve.adb, a-convec.adb, a-crbtgo.adb ("="): Avoid
805         modifying the tampering counts unnecessarily.
806         (Adjust): Zero tampering counts unconditionally.
808 2015-10-20  Jerome Lambourg  <lambourg@adacore.com>
810         * init.c: Fix build issue on arm-vx6 when building the RTP
811         run-time.
813 2015-10-20  Ed Schonberg  <schonberg@adacore.com>
815         * sem_ch3.adb (Analyze_Object_Declaration): If the expression
816         is an aggregate and compilation is in -gnatI mode (ignore rep
817         clauses) do not delay resolution of aggregate, to prevent freeze
818         actions out of order in the backend.
820 2015-10-20  Ed Schonberg  <schonberg@adacore.com>
822         * sem_prag.ads, sem_prag.adb (Build_Generic_Class_Condition):
823         New procedure to construct a generic function for a class-wide
824         precondition, to implement AI12-0113  concerning the new semantics
825         of class-wide preconditions for overriding uperations.
827 2015-10-20  Hristian Kirtchev  <kirtchev@adacore.com>
829         * sem_util.adb (Find_Actual): The routine is
830         now capable of operating on entry calls.
832 2015-10-20  Ed Schonberg  <schonberg@adacore.com>
834         * sem_res.adb: Remove redundant check.
836 2015-10-20  Jerome Lambourg  <lambourg@adacore.com>
838         * init.c (__gnat_vxsim_error_handler): Completely disable on
839         VxWorks-7 as the VSBs used to build gcc do not support vxsim
840         architecture.
842 2015-10-20  Claire Dross  <dross@adacore.com>
844         * a-cfdlli.ads, a-cfinve.ads, a-cofove.ads (Generic_Sorting): Explicit
845         SPARK_Mode.
846         * a-cfhase.ads, a-cforse.ads (Generic_Keys): Explicit SPARK_Mode.
848 2015-10-20  Tristan Gingold  <gingold@adacore.com>
850         * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
851         Check for No_Implicit_Protected_Object_Allocations.
852         * fe.h (Check_No_Implicit_Task_Alloc,
853         Check_No_Implicit_Protected_Alloc): Define and declare.
854         * restrict.ads, restrict.adb (Check_No_Implicit_Task_Alloc,
855         Check_No_Implicit_Protected_Alloc): New procedures to check the
856         restrictions.
857         * s-rident.ads (No_Implicit_Task_Allocations)
858         (No_Implicit_Protected_Object_Allocations): Declare new
859         restrictions.
861 2015-10-20  Yannick Moy  <moy@adacore.com>
863         * sem_res.adb (Resolve_Selected_Component): Only set flag
864         when component is defined in a variant part.
865         * sem_util.adb,
866         * sem_util.ads (Is_Declared_Within_Variant): Promote local query
867         as publicy visible one for use in Resolve_Selected_Component.
869 2015-10-20  Philippe Gil  <gil@adacore.com>
871         * g-debpoo.adb: allow instrumented System.Memory to use Debug_Pool
872         from foreign threads.
873         * g-debpoo.adb (Print_Traceback): NEW print traceback if available
874         added to support Stack_Trace_Depth = 0.
875         (Print_Address): NEW print System.Address without no secondary
876         stack use (Address_Image uses secondary stack)
878 2015-10-20  Yannick Moy  <moy@adacore.com>
880         * exp_ch9.adb (Expand_Entry_Barrier): Default initialize local variable
881         Func.
883 2015-10-20  Jerome Lambourg  <lambourg@adacore.com>
885         * init.c (__gnat_error_handler for vxworks): Force
886         SPE bit in the MSR when handling signals
888 2015-10-20  Arnaud Charlet  <charlet@adacore.com>
890         * einfo.ads, sem_ch12.adb, sem_ch6.adb, table.ads, s-stposu.ads,
891         g-table.ads, g-dyntab.ads, makeutl.ads, a-crdlli.ads: Fix typos.
893 2015-10-20  Ed Schonberg  <schonberg@adacore.com>
895         * sem_ch5.adb (Analyze_Loop_Statement): Element iterators
896         over multidimensional arrays create additional loops during
897         expansion. For such loops we create a label as a scope
898         name. Attach this label  properly to tree, for use in GNATProve
899         over such element iterators.
900         * sem_attr.adb (Analyze_Attribute, case Loop_Entry): The loop to
901         which the attribute applies comes from source, not from expansion
902         of an element iterator or a quantified expression.
903         * exp_attr.adb (Expand_N_Attribute_Reference): Ditto.
905 2015-10-20  Ed Schonberg  <schonberg@adacore.com>
907         * exp_ch6.adb (Expand_Call): Check for a call to a function
908         declared in a Dimension I/O package, to handle the new Image
909         function.
911 2015-10-20  Eric Botcazou  <ebotcazou@adacore.com>
913         * inline.ads: Minor comment fixes.
915 2015-10-20  Bob Duff  <duff@adacore.com>
917         * a-comutr.ads (Tree_Node_Access): Add No_Strict_Aliasing, because
918         we're doing unchecked conversions with this pointer.
920 2015-10-20  Ed Schonberg  <schonberg@adacore.com>
922         * exp_ch9.adb (Next_Protected_Operation): An expression function
923         used as a completion can be the next protected operation in a
924         protected body.
926 2015-10-20  Hristian Kirtchev  <kirtchev@adacore.com>
928         * sem_res.adb (Is_OK_Volatile_Context): Add a guard when checking a
929         possible call to an instance of Ada.Unchecked_Conversion to avoid
930         testing protected function calls. Allow references to protected objects
931         in prefixed protected calls.
932         (Is_Protected_Operation_Call): New routine.
934 2015-10-20  Yannick Moy  <moy@adacore.com>
936         * exp_ch5.adb, exp_ch5.ads (Expand_Iterator_Loop_Over_Array): Make
937         query public. Remove code handling with iterator loop over array
938         of the 'in' form, which is not allowed in Ada.  * exp_spark.adb
939         (Expand_SPARK): Expand loop statements that take the form of an
940         iterator over an array.
941         * sem_ch5.adb (Analyze_Loop_Statement): Do not analyze loop statements
942         that take the form of an iterator over an array, so that the rewritten
943         form gets analyzed instead.
944         * sem_util.adb, sem_util.ads (Is_Iterator_Over_Array): New query
945         to recognize iterators over arrays.
947 2015-10-20  Arnaud Charlet  <charlet@adacore.com>
949         * s-excdeb.ads, s-excdeb.adb (Debug_Raise_Exception): Add
950         parameter Message.
951         * a-except.adb (Raise_Current_Excep): Update call to
952         Debug_Raise_Exception.
953         * a-except-2005.adb (Complete_Occurrence): Ditto.
954         * sem_ch12.adb: Whitespace fix.
956 2015-10-20  Yannick Moy  <moy@adacore.com>
958         * sem_warn.adb (Is_OK_Fully_Initialized): Consider types with DIC as
959         fully default initialized.
960         * sem_ch6.adb: minor style fix in comment
962 2015-10-20  Ed Schonberg  <schonberg@adacore.com>
964         * s-diflio.ads, s-diflio.adb (Image): New function for dimensioned
965         quantities, to produce a string that includes the dimension
966         synbol for the quantity, or the vector of dimensions in standard
967         notation.
968         * sem_dim.adb (Expand_Put_Call_With_Symbol): Process new function
969         Image, to include dimension information in the generated string,
970         identical to the string produced by the Put procedure on a string
971         for a dimensioned quantity.
973 2015-10-20  Hristian Kirtchev  <kirtchev@adacore.com>
975         * exp_ch7.adb (Process_Declarations): A loop
976         parameter does not require finalization actions.
978 2015-10-20  Eric Botcazou  <ebotcazou@adacore.com>
980         * exp_ch6.adb (Expand_Simple_Function_Return): Do not create an
981         actual subtype for a mutable record return type if the expression
982         is itself a function call.
984 2015-10-20  Dmitriy Anisimkov  <anisimko@adacore.com>
986         * s-atocou.adb, s-atocou-builtin.adb: Fix implementation description
987         related to new type support.
989 2015-10-20  Ed Schonberg  <schonberg@adacore.com>
991         * sem_res.adb (Resolve_Explicit_Dererence): Call Analyze_Dimension
992         to propagate dimension information from prefix.
993         * sem_dim.adb (Analyze_Dimension): Handle Explicit_Dereference.
994         * inline.ads: minor whitespace fix in comment
995         * sem_ch6.adb: minor gramar fix in comment
997 2015-10-20  Hristian Kirtchev  <kirtchev@adacore.com>
999         * sem_ch3.adb (Analyze_Object_Contract):
1000         A protected type or a protected object is allowed to have a
1001         discriminated part.
1003 2015-10-20  Bob Duff  <duff@adacore.com>
1005         * sem_util.adb (Requires_Transient_Scope):
1006         Return true for mutable records if the maximum size is very large.
1008 2015-10-20  Eric Botcazou  <ebotcazou@adacore.com>
1010         * a-except-2005.adb (To_Stderr): Import Put_Char_Stderr with
1011         the same signature as in System.IO.Put.
1013 2015-10-20  Bob Duff  <duff@adacore.com>
1015         * a-cobove.adb (Set_Length): Restore previous logic, but with "Checks
1016         and then" on the check.
1018 2015-10-20  Ed Schonberg  <schonberg@adacore.com>
1020         * par-ch3.adb (P_Known_Discriminant_Part_Opt): Handle properly
1021         a misplaced "constant" keyword in a discriminant specification.
1023 2015-10-20  Steve Baird  <baird@adacore.com>
1025         * einfo.ads (Is_Param_Block_Component_Type): New function decl
1026         for querying the flag.
1027         (Set_Is_Param_Block_Component_Type): New procedure decl for setting
1028         the flag.
1029         * einfo.adb (Is_Param_Block_Component_Type): New function body.
1030         (Set_Is_Param_Block_Component_Type): New procedure body.
1031         (Write_Entity_Flags): Display the new flag.
1032         * exp_ch9.adb (Build_Parameter_Block): Set flag on parameter
1033         block component types.
1034         (Expand_N_Entry_Declaration): Set flag on parameter block component
1035         types.
1037 2015-10-20  Steve Baird  <baird@adacore.com>
1039         * sem_elab.adb: Do not pass an N_Attribute_Reference node to
1040         Sinfo.Set_No_Elaboration_Check.
1041         * sem_elab.adb (Check_Elab_Call) Do not pass a non-call
1042         node (specifically, an N_Attribute_Reference node) to
1043         Sinfo.Set_No_Elaboration_Check.
1045 2015-10-20  Tristan Gingold  <gingold@adacore.com>
1047         * adaint.c: File names are case sensitive on aarch64-ios.
1049 2015-10-20  Bob Duff  <duff@adacore.com>
1051         * a-cbdlli.ads, a-cbhase.ads, a-cbmutr.ads, a-cborse.ads,
1052         * a-cdlili.ads, a-cidlli.ads, a-cihase.ads, a-cimutr.ads,
1053         * a-ciorse.ads, a-cobove.ads, a-cohase.ads, a-coinve.ads,
1054         * a-comutr.ads, a-convec.ads, a-coorse.ads: Use non-private with clause.
1056 2015-10-20  Hristian Kirtchev  <kirtchev@adacore.com>
1058         * exp_util.adb (Requires_Cleanup_Actions): A loop parameter does not
1059         require finalization actions.
1061 2015-10-20  Ed Schonberg  <schonberg@adacore.com>
1063         * par-ch3.adb (P_Declarative_Items): In case of misplaced
1064         aspect specifications, ensure that flag Done is properly set to
1065         continue parse.
1067 2015-10-20  Hristian Kirtchev  <kirtchev@adacore.com>
1069         * rtsfind.ads Remove the entries for Ada.Synchronous_Task_Control
1070         and Suspension_Object from tables RE_Id, RE_Unit_Table and RTU_Id.
1071         * sem_util.adb (Is_Descendant_Of_Suspension_Object): Update
1072         the comment on usage. Use routine Is_Suspension_Object to detect
1073         whether a type matches Suspension_Object.
1074         (Is_Suspension_Object): New routine.
1075         * snames.ads-tmpl: Add predefined names for Suspension_Object
1076         and Synchronous_Task_Control.
1078 2015-10-20  Ed Schonberg  <schonberg@adacore.com>
1080         * sem_smem.adb (Check_Shared_Var): Clean up code that handles
1081         type declarations with discriminants, remove obsolete check.
1083 2015-10-20  Arnaud Charlet  <charlet@adacore.com>
1085         * par_sco.adb: Minor style fixes.
1087 2015-10-20  Vincent Celier  <celier@adacore.com>
1089         * debug.adb: Update documentation of -gnatdu.
1091 2015-10-20  Hristian Kirtchev  <kirtchev@adacore.com>
1093         * aspects.adb Add aspect Volatile_Function to table
1094         Canonical_Aspect.
1095         * aspect.ads Add aspect Volatile_Function to tables
1096         Aspect_Argument, Aspect_Delay, Aspect_Id, Aspect_Names
1097         and Implementation_Defined_Aspect.  Aspects Async_Readers,
1098         Async_Writers, Effective_Reads and Effective_Writes are no
1099         longer Boolean.
1100         * einfo.adb (Get_Pragma): Add an entry for pragma
1101         Volatile_Function.
1102         * par-prag.adb (Prag): Pragma Volatile_Function does not need
1103         special processing by the parser.
1104         * rtsfind.ads Add an entry for Ada.Synchronous_Task_Control in
1105         table RTU_Id. Add an entry for Suspension_Object in table RE_Id.
1106         * sem_ch3.adb Fix SPARK RM references.
1107         (Analyze_Object_Contract): Update the error guard.
1108         * sem_ch5.adb Fix SPARK RM references.
1109         * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Ensure
1110         that a non-volatile function does not contain an effectively
1111         volatile parameter.
1112         (Analyze_Subprogram_Contract): Ensure
1113         that a non-volatile function does not contain an effectively
1114         volatile parameter.
1115         * sem_ch12.adb (Instantiate_Object): Remove the reference to
1116         the SPARK RM from the error message.
1117         * sem_ch13.adb (Analyze_Aspect_Specifications): Add
1118         processing for aspects Async_Readers, Async_Writers,
1119         Effective_Reads, Effective_Writes and Volatile_Function.
1120         (Check_Aspect_At_Freeze_Point): Aspects Async_Readers,
1121         Async_Writers, Effective_Reads, Effective_Writes and
1122         Volatile_Function do not need special processing at the freeze
1123         point.
1124         * sem_prag.adb Add an entry for pragma Volatile_Function in
1125         table Sig_Flags.
1126         (Analyze_External_Property_In_Decl_Part):
1127         Reimplemented as Async_Readers, Async_Writers, Effective_Reads
1128         and Effective_Writes are no longer Boolean pragmas.
1129         (Analyze_Global_Item): An external state or effectively
1130         volatile object cannot appear as an item in pragma
1131         [Refined_]Global.
1132         (Analyze_Pragma): Change the implementation
1133         of Async_Readers, Async_Writers, Effective_Reads and
1134         Effective_Writes as these are no longer Boolean pragmas.
1135         Use routine Check_Static_Boolean_Expression to verify the
1136         optional Boolean expression of Async_Readers, Async_Writers,
1137         Constant_After_Elaboration, Effective_Reads, Effective_Writes,
1138         Extensions_Visible and Volatile_Function.  Add processing for
1139         pragma Volatile_Function.
1140         (Check_Static_Boolean_Expression): New routine.
1141         (Find_Related_Context): Update the comment on usage.
1142         (Is_Enabled_Pragma): New routine.
1143         * sem_prag.ads (Is_Enabled_Pragma): New routine.
1144         * sem_res.adb Fix SPARK RM references.
1145         (Is_OK_Volatile_Context): Add detection for return statements.
1146         (Resolve_Actuals): Remove the check concerning an effectively volatile
1147         OUT actual parameter as this is now done by the SPARK flow analyzer.
1148         (Resolve_Entity_Name): Remove the check concerning an effectively
1149         volatile OUT formal parameter as this is now done by the SPARK
1150         flow analyzer.  (Within_Volatile_Function): New routine.
1151         * sem_util.adb (Add_Contract_Item): Add processing for pragma
1152         Volatile_Function.
1153         (Check_Nonvolatile_Function_Profile): New routine.
1154         (Is_Descendant_Of_Suspension_Object): New routine.
1155         (Is_Effectively_Volatile): Protected types and descendants of
1156         Suspension_Object are now treated as effectively volatile.
1157         (Is_Enabled): The optional Boolean expression of pragmas
1158         Async_Readers, Async_Writers, Effective_Reads and Effective_Writes
1159         now appears as the first argument.
1160         (Is_Volatile_Function): New routine.
1161         * sem_util.ads Add SPARK RM references.
1162         (Add_Contract_Item): Update the comment on usage.
1163         (Check_Nonvolatile_Function_Profile): New routine.
1164         (Is_Effectively_Volatile): Update the comment on usage.
1165         (Is_Volatile_Function): New routine.
1166         * snames.ads-tmpl Add a predefined name and pragma id for
1167         Volatile_Function.
1169 2015-10-20  Arnaud Charlet  <charlet@adacore.com>
1171         * gnat_ugn.texi, gnat_rm.texi: Regenerate.
1172         * doc/gnat_ugn/gnat_project_manager.rst,
1173         doc/gnat_ugn/building_executable_programs_with_gnat.rst,
1174         doc/gnat_ugn/the_gnat_compilation_model.rst,
1175         doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
1176         doc/gnat_rm/implementation_defined_pragmas.rst,
1177         doc/gnat_rm/the_gnat_library.rst,
1178         doc/gnat_rm/implementation_defined_characteristics.rst: Update doc.
1180 2015-10-20  Arnaud Charlet  <charlet@adacore.com>
1182         * gcc-interface/Makefile.in: Update targets.
1184 2015-10-20  Bob Duff  <duff@adacore.com>
1186         * sem_ch13.adb (Analyze_One_Aspect): Avoid
1187         analyzing the expression in a 'Disable_Controlled attribute when
1188         Expander_Active is False, because otherwise, we get errors about
1189         nonstatic expressions in pragma-Preelaborate generic packages.
1190         * restrict.ads: minor whitespace cleanup in comment
1192 2015-10-20  Bob Duff  <duff@adacore.com>
1194         * a-conhel.adb: Remove "use SAC;", because otherwise the compiler
1195         complains about use clauses in run-time units. Use "use type"
1196         instead.
1197         * a-btgbso.adb, a-btgbso.ads, a-cbdlli.adb, a-cbdlli.ads,
1198         * a-cbhama.adb, a-cbhama.ads, a-cbhase.adb, a-cbhase.ads,
1199         * a-cbmutr.adb, a-cbmutr.ads, a-cborma.adb, a-cborma.ads,
1200         * a-cborse.adb, a-cborse.ads, a-cdlili.adb, a-cdlili.ads,
1201         * a-chtgbk.adb, a-chtgbk.ads, a-chtgbo.adb, a-chtgbo.ads,
1202         * a-chtgke.adb, a-chtgke.ads, a-chtgop.adb, a-chtgop.ads,
1203         * a-cidlli.adb, a-cidlli.ads, a-cihama.adb, a-cihama.ads,
1204         * a-cihase.adb, a-cihase.ads, a-cimutr.adb, a-cimutr.ads,
1205         * a-ciorma.adb, a-ciorma.ads, a-ciormu.adb, a-ciormu.ads,
1206         * a-ciorse.adb, a-ciorse.ads, a-cobove.adb, a-cobove.ads,
1207         * a-cohama.adb, a-cohama.ads, a-cohase.adb, a-cohase.ads,
1208         * a-cohata.ads, a-coinve.adb, a-comutr.adb, a-comutr.ads,
1209         * a-convec.adb, a-coorma.adb, a-coorma.ads, a-coormu.adb,
1210         * a-coormu.ads, a-coorse.adb, a-coorse.ads, a-crbltr.ads,
1211         * a-crbtgk.adb, a-crbtgk.ads, a-crbtgo.adb, a-crbtgo.ads,
1212         * a-rbtgbk.adb, a-rbtgbk.ads, a-rbtgbo.adb, a-rbtgbo.ads,
1213         * a-rbtgso.adb, a-rbtgso.ads: Change all the predefined containers
1214         to share the tampering machinery in Ada.Containers.Helpers. This
1215         reduces the amount of duplicated code, and takes advantage of
1216         efficiency improvements in Helpers.
1217         Protect all run-time checks and supporting machinery with "if
1218         Checks" or "if T_Check", so this code can be suppressed with
1219         pragma Suppress or -gnatp.
1220         Add Pseudo_Reference and Get_Element_Access to remaining
1221         containers, so that the compiler can optimize "for ... of" loops.
1223 2015-10-20  Bob Duff  <duff@adacore.com>
1225         * a-contai.adb, a-coinve.ads, a-contai.ads, a-conhel.adb, a-conhel.ads,
1226         Makefile.rtl, a-convec.ads: Move helper code from Ada.Containers to a
1227         new package Ada.Containers.Helpers, because otherwise it's not
1228         visible everywhere it needs to be (e.g. in the package
1229         Ada.Containers.Red_Black_Trees, Generic_Tree_Types wants to have
1230         a component of type Tamper_Counts).
1232 2015-10-20  Ed Schonberg  <schonberg@adacore.com>
1234         * sem_type.adb (Intersect_Types): Specialize error message when
1235         one operand is a limited view which is a priori incompatible
1236         with all other named types.
1237         * sem_prag.adb: minor fix in comment
1238         * sem_ch13.adb: Code clean up.
1240 2015-10-20  Eric Botcazou  <ebotcazou@adacore.com>
1242         * sem_ch12.adb (Need_Subprogram_Instance_Body): Also return true
1243         for a subprogram nested in an inlined subprogram.
1245 2015-10-20  Bob Duff  <duff@adacore.com>
1247         * a-coinve.adb, a-contai.adb: Update comments.
1248         * pprint.ads: Minor reformatting.
1250 2015-10-20  Tristan Gingold  <gingold@adacore.com>
1252         * env.c, init.c: Handle arm64-darwin like arm-darwin.
1253         * tracebak.c: Handle arm64-darwin.
1255 2015-10-20  Bob Duff  <duff@adacore.com>
1257         * s-trasym.adb (Symbolic_Traceback): When giving the traceback
1258         as hexadecimal code addresses, separate by blanks instead of LF.
1260 2015-10-20  Ed Schonberg  <schonberg@adacore.com>
1262         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Generate freeze
1263         node for subprogram in Compile_Only mode.
1265 2015-10-20  Dmitriy Anisimkov  <anisimko@adacore.com>
1267         * s-atocou.adb, s-atocou.ads, a-contai.adb, a-contai.ads,
1268         s-atocou-x86.adb, s-atocou-builtin.adb: Task safe over container
1269         iterations.
1271 2015-10-20  Philippe Gil  <gil@adacore.com>
1273         * g-debpoo.ads (Dump): NEW print Debug_Pool statistics & main
1274         contributors.
1275         (Dump_Stdout): NEW print to stdout Debug_Pool statistics &
1276         main contributors.
1277         (Reset): NEW reset counters to 0.
1278         (Get_Size): NEW return size allocated at parameter.
1279         (High_Water_Mark): NEW.
1280         (Current_Water_Mark): NEW.
1281         (System_Memory_Debug_Pool): NEW tell Debug_Pools that
1282         System.Memory uses it.
1283         * g-debpoo.adb (Traceback_Htable_Elem): add Frees, Total_Frees
1284         components.
1285         (Find_Or_Create_Traceback): don't manage in System.Memory
1286         Debug_Pool Deallocate Traceback's.
1287         (Validity): add optional Handled table when System.Memory asked
1288         for Allow_Unhandled_Memory.
1289         (Allocate): handle Allocate reentrancy occuring when System.Memory
1290         uses Debug_Pools.
1291         (Deallocate): handle when Allow_Unhandled_Memory
1292         is set deallocation of unhandled memory. Dont't check
1293         Size_In_Storage_Elements if equal to Storage_Count'Last. update
1294         Frees, Total_Frees new components.
1296 2015-10-20  Eric Botcazou  <ebotcazou@adacore.com>
1298         * fe.h: Minor tweak.
1300 2015-10-20  Vincent Celier  <celier@adacore.com>
1302         * sem_cat.adb (Check_Categorization_Dependencies): Do nothing
1303         when -gnatdu is specified.
1305 2015-10-20  Ed Schonberg  <schonberg@adacore.com>
1307         * sem_ch8.adb (analyze_Subprogram_Renaming): The actual for a
1308         formal abstract subprogram must have a controlling type.
1309         * stand.ads: Minor whitespace cleanup.
1311 2015-10-20  Gary Dismukes  <dismukes@adacore.com>
1313         * sem_ch13.adb: Minor reference change (RM => AARM).
1315 2015-10-20  Eric Botcazou  <ebotcazou@adacore.com>
1317         * make.adb (Check): Skip multilib switches reinstated by the
1318         compiler only when counting the number of switches, since it is
1319         what really matters in the regular operating mode.
1321 2015-10-20  Arnaud Charlet  <charlet@adacore.com>
1323         * einfo.adb: Add extra assertion for small clause.
1324         * cstand.adb: Minor style fix in comment.
1325         * debug.adb: Minor reformatting.
1326         * exp_util.adb: Fix minor typo.
1328 2015-10-20  Ed Schonberg  <schonberg@adacore.com>
1330         * sem_ch12.adb (Same_Instantiated_Function): New predicate in
1331         Check_Formal_Package_Instance, used to verify that the formal
1332         and the actual of an actual package match when both are functions
1333         given as attribute references.
1335 2015-10-20  Bob Duff  <duff@adacore.com>
1337         * a-coinve.ads, a-coinve.adb: Do the same efficiency
1338         improvements that were already done in the definite case
1339         (Ada.Containers.Vectors, i.e. a-convec). This includes the
1340         ability to suppress checks, the fast path for Append, inlining
1341         as appropriate, and special-casing of "for ... of" loops. Reuse
1342         the tampering machinery that is now in Ada.Containers. Simplify
1343         many operations.
1344         * a-convec.ads, a-convec.adb: Change the code to be more similar
1345         to a-coinve.
1346         * a-finali.ads, a-finali.adb: Expose the "null"-ness of the
1347         operations. This may enable optimizations in the future, and
1348         seems cleaner anyway.
1350 2015-10-20  Ed Schonberg  <schonberg@adacore.com>
1352         * sem_ch13.adb (Is_Operational_Item): Attributes related to
1353         Ada 2012 iterators are operational items, and can be specified
1354         on partial views.
1356 2015-10-20  Hristian Kirtchev  <kirtchev@adacore.com>
1358         * sem_prag.adb (Check_Usage): Update the calls to Usage_Error.
1359         (Usage_Error): Remove formal parameter Item. Emit a clearer message
1360         concerning a missing dependency item and place it on the related pragma.
1362 2015-10-20  Bob Duff  <duff@adacore.com>
1364         * debug.adb, expander.adb: Implement -gnatd.B switch, which
1365         triggers a bug box when an abort_statement is seen. This is
1366         useful for testing Comperr.Compiler_Abort.
1367         * gnat1drv.adb: Trigger bug box on all exceptions other than
1368         Unrecoverable_Error.
1370 2015-10-20  Thomas Quinot  <quinot@adacore.com>
1372         * Makefile.rtl: add the following...
1373         * g-binenv.ads, g-binenv.adb: New unit providing runtime access
1374         to bind time captured values ("bind environment")
1375         * init.c: declare new global variable __gl_bind_env_addr.
1376         * bindgen.ads, bindgen.adb (Set_Bind_Env): record a bind
1377         environment key=value pair.
1378         (Gen_Bind_Env_String): helper to produce the bind environment data
1379         called  in the binder generated file.
1380         (Gen_Output_File_Ada): Call the above (Gen_Adainit): Set
1381         __gl_bind_env_addr accordingly.
1382         * switch-b.adb: Support for command line switch -V (user interface
1383         to set a build environment key=value pair)
1384         * bindusg.adb: Document the above
1386 2015-10-20  Vincent Celier  <celier@adacore.com>
1388         * sem_prag.adb (Analyse_Pragma: Pragma Pure): Do not set the
1389         entity as Pure if Debug_Flag_U is set.
1391 2015-10-20  Bob Duff  <duff@adacore.com>
1393         * output.adb (Write_Int): Work with negative numbers in order to avoid
1394         negating Int'First and thereby causing overflow.
1395         * sem_util.adb: Minor comment fix.
1397 2015-10-20  Eric Botcazou  <ebotcazou@adacore.com>
1399         * make.adb (Check): Skip multilib switches reinstated by the
1400         compiler when doing the comparison with switches passed to
1401         gnatmake.
1403 2015-10-20  Yannick Moy  <moy@adacore.com>
1405         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Return
1406         False for procedures marked No_Return.
1407         * sem_util.ads (Enclosing_Declaration): Improve comment.
1408         * einfo.adb (Is_Completely_Hidden): Remove spurious assertion.
1410 2015-10-20  Thomas Quinot  <quinot@adacore.com>
1412         * types.ads: Minor reformatting.
1414 2015-10-20  Hristian Kirtchev  <kirtchev@adacore.com>
1416         * einfo.adb (Get_Pragma): Minor reformatting. Rename local constant
1417         Is_CDG to Is_CLS. Add pragma Constant_After_Elaboration to the list of
1418         classification pragmas.
1420 2015-10-20  Ed Schonberg  <schonberg@adacore.com>
1422         * sem_ch3.adb (Analyze_Declarations); At the of the visible part,
1423         perform name resolution on the expressions in aspects of visible
1424         entities.
1425         * sem_ch13.ads, sem_ch13.adb (Resolve_Aspect_Expressions): Resolve
1426         expressions in aspects independently of whether corresponding
1427         entity is frozen. Used to complete name resolution of aspect
1428         expressions for entities declared in the visible part of a
1429         package or generic package declaration.
1431 2015-10-20  Vincent Celier  <celier@adacore.com>
1433         * prj-attr.adb: Add package Codepeer and its attributes.
1435 2015-10-20  Thomas Quinot  <quinot@adacore.com>
1437         * sem_ch3.adb, sem_ch13.adb: Minor reformatting.
1439 2015-10-20  Eric Botcazou  <ebotcazou@adacore.com>
1441         * gnatlink.adb (Gnatlink): Do not translate --RTS switch
1442         for the linker and instead pass the switches that were
1443         reinstated by the compiler.
1445 2015-10-20  Bob Duff  <duff@adacore.com>
1447         * a-contai.ads, a-convec.ads: Move Count_Type_Last from
1448         a-convec.ads to a-contai.ads, so other containers can refer to it.
1450 2015-10-20  Ed Schonberg  <schonberg@adacore.com>
1452         * sem_ch3.adb (Check_Nonoverridable_Aspects): New procedure within
1453         Analyze_Full_Type_ Declaration, used to apply legality rules in
1454         13,1,1 (18.3.3) concerning aspects that cannot be overridden in
1455         a type extension.
1456         (Check_Duplicate_Aspects): It is not legal to specify the
1457         Implicit_Dereference aspect on a full view if partial view has
1458         known discriminants.
1459         * sem_ch13.adb (Analyze_Aspect_Implicit_Dereference): Verify that
1460         the specification of the aspect on a derived type confirms the
1461         value of the inherited one.
1462         * sem_util.adb (Reference_Discriminant): Return empty if none
1463         specified.
1465 2015-10-20  Thomas Quinot  <quinot@adacore.com>
1467         * exp_ch5.adb, sem_ch3.adb: Minor reformatting.
1469 2015-10-20  Vincent Celier  <celier@adacore.com>
1471         * a-strsup.adb (Super_Trim): Remove statements that put NUL
1472         characters in unused portion of the Data string.
1474 2015-10-16  Hristian Kirtchev  <kirtchev@adacore.com>
1476         * aspects.adb Add an entry for Constant_After_Elaboration in
1477         table Canonical_Aspect.
1478         * aspects.ads Add entries for Constant_After_Elaboration in
1479         tables Aspect_Argument, Aspect_Delay, Aspect_Id, Aspect_Names
1480         and Implementation_Defined_Aspect.
1481         * par-prag.adb Pragma Constant_After_Elaboration does not require
1482         special processing by the parser.
1483         * sem_ch13.adb Add an entry for Constant_After_Elaboration
1484         in table Sig_Flags.
1485         (Analyze_Aspect_Specifications):
1486         Add processing for aspect Constant_After_Elaboration.
1487         (Check_Aspect_At_Freeze_Point): Aspect Constant_After_Elaboration
1488         does not require special processing at freeze time.
1489         * sem_prag.adb (Analyze_Pragma): Add processing for pragma
1490         Constant_After_Elaboration. Use routine Find_Related_Context to
1491         retrieve the context of pragma Part_Of.
1492         (Duplication_Error): Update comment on usage.
1493         (Find_Related_Context): New routine.
1494         * sem_prag.ads Add an entry for Constant_After_Elaboration
1495         in table Aspect_Specifying_Pragma.
1496         (Analyze_Contract_Cases_In_Decl_Part): Update the comment on usage.
1497         * sem_util.adb (Add_Contract_Item): Add processing for pragma
1498         Constant_After_Elaboration.
1499         * sem_util.ads (Add_Contract_Item): Update the comment on usage.
1500         * snames.ads-tmpl Add new predefined name and aspect id for
1501         Constant_After_Elaboration.
1503 2015-10-16  Vincent Celier  <celier@adacore.com>
1505         * prj-pp.adb (Pretty_Print.Print): Correctly display extending
1506         packages, instead of making them renamed packages.
1508 2015-10-16  Hristian Kirtchev  <kirtchev@adacore.com>
1510         * sem_ch12.adb (Analyze_Package_Instantiation):
1511         Treat a missing SPARK_Mode annotation as having mode "Off".
1512         (Analyze_Subprogram_Instantiation): Treat a missing SPARK_Mode
1513         annotation as having mode "Off".
1514         (Instantiate_Package_Body): Code
1515         reformatting. Treat a missing SPARK_Mode annotation as having mode
1516         "Off".
1517         (Instantiate_Subprogram_Body): Code reformatting. Treat
1518         a missing SPARK_Mode annotation as having mode "Off".
1520 2015-10-16  Ed Schonberg  <schonberg@adacore.com>
1522         * exp_ch5.adb: Code clean up.
1523         * sem_ch13.adb: Minor fix in comment.
1525 2015-10-16  Bob Duff  <duff@adacore.com>
1527         * a-exexda.adb: Change format of Exception_Information to be
1528         more like what we print for unhandled exceptions.
1529         * a-exstat.adb: Parse new format.
1530         * a-except-2005.adb, a-except.adb: Document new format.
1532 2015-10-16  Javier Miranda  <miranda@adacore.com>
1534         * sem_ch5.adb (Analyze_Iterator_Specification): Associate a
1535         transient scope with the renaming object declararation.
1536         * exp_util.adb (Insert_Actions): if the enclosing interator
1537         loop is marked as requiring the secondary stack then attach the
1538         actions to the transient scope.
1540 2015-10-16  Bob Duff  <duff@adacore.com>
1542         * exp_ch7.adb: Minor spelling fixes.
1544 2015-10-16  Ed Schonberg  <schonberg@adacore.com>
1546         * sem_ch3.adb (Replace_Anonymous_Access_To_Protected_Subprogram):
1547         If anonymous type is component type of array type declaration,
1548         analyze its declaration in the current scope, not the enclosing
1549         one.
1551 2015-10-16  Gary Dismukes  <dismukes@adacore.com>
1553         * prj.adb, sem_util.adb, exp_ch6.adb: Minor reformatting.
1555 2015-10-16  Ed Schonberg  <schonberg@adacore.com>
1557         * exp_ch5.adb (Expand_Formal_Container_Element_Loop): Modify
1558         expansion to allow element iteration over formal containers
1559         whose elements are indefinite types.
1561 2015-10-16  Doug Rupp  <rupp@adacore.com>
1563         * s-taprop-linux.adb (Monotonic_Clock): Call clock_gettime
1564         instead of gettimeofday.
1565         * s-osinte-android.ads, s-osinte-android.adb, s-osinte-linux.ads
1566         (clock_gettime): New imported subprogram.
1568 2015-10-16  Hristian Kirtchev  <kirtchev@adacore.com>
1570         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
1571         Indefinite or limited library level objects are now returned on
1572         the heap.
1573         * exp_ch7.adb (Build_Finalization_Master): Add formal
1574         parameter For_Lib_Level. Add context specific insertion for a
1575         finalization master created for an access result type related
1576         to a build-in-place function call used to initialize a library
1577         level object.
1578         * exp_ch7.ads (Build_Finalization_Master): Add formal parameter
1579         For_Lib_Level. Update the comment on usage.
1580         * sem_util.adb (Mark_Coextensions): Code cleanup.
1582 2015-10-16  Emmanuel Briot  <briot@adacore.com>
1584         * prj.adb (For_Every_Project_Imported_Context): Fix handling
1585         of aggregated projects with duplicate names.
1586         * a-ngelfu.ads: Minor whitespace fix.
1588 2015-10-16  Ed Schonberg  <schonberg@adacore.com>
1590         * sem_ch13.adb (Build_Predicate_Functions): The expression for
1591         the predicate is side-effect free if it does not contain any
1592         variable references.
1594 2015-10-16  Bob Duff  <duff@adacore.com>
1596         * a-convec.adb ("="): Previous version depended
1597         on "=" composing, but that doesn't quite work -- we want the "="
1598         operator passed in to the generic. So we need a loop after all.
1600 2015-10-16  Yannick Moy  <moy@adacore.com>
1602         * sem_util.adb (Is_Object_Reference): Attribute 'Loop_Entry produces
1603         an object.
1604         * sem_ch6.adb: Minor fix in comment.
1606 2015-10-16  Bob Duff  <duff@adacore.com>
1608         * a-contai.ads: Add two check names: Container_Checks and
1609         Tampering_Check.  Move the tampering check machinery from
1610         Ada.Containers.Vectors to Ada.Containers. Later we can share it
1611         with other containers.
1612         Disable the tampering machinery in the presence of
1613         Suppress(Tampering_Check).
1614         Simplify the implementation of tampering checks. E.g. use RAII
1615         to make incrementing/decrementing of the counts more concise.
1616         * a-contai.adb: New package body, implementing the above.
1617         * a-convec.ads, a-convec.adb: Use tampering check machinery
1618         in Ada.Containers.
1619         Disable all checking code when checks are suppressed.
1620         Simplify many of the operations. Implement "&" in terms of Append,
1621         rather than "by hand".
1622         Remove: function "=" (L, R : Elements_Array) return Boolean is
1623         abstract; so we can call the predefined "=" on Elements_Array.
1624         For "=" on Vectors: Previously, we returned True immediately if
1625         Left'Address = Right'Address.  That seems like a non-optimization
1626         ("if X = X" is unusual), so removed that.  Simplify by using
1627         slice comparison ("=" on Element_Array will automatically call
1628         "=" on the components, even if user defined).
1630 2015-10-16  Ed Schonberg  <schonberg@adacore.com>
1632         * sem_ch13.adb (Chek_Record_Representation_Clause): When
1633         iterating over components, skip anonymous subtypes created for
1634         constrained array components.
1636 2015-10-16  Eric Botcazou  <ebotcazou@adacore.com>
1638         * a-tags.ads (Parent_Size): Remove obsolete pragma Export.
1639         * s-finmas.ads (Header_Offset): Delete.
1640         * s-finmas.adb (Header_Offset): Likewise.
1641         (Finalize): Call Header_Size instead of Header_Offset.
1642         * s-stposu.adb (Allocate_Any_Controlled): Likewise.
1643         (Deallocate_Any_Controlled): Likewise.
1645 2015-10-16  Arnaud Charlet  <charlet@adacore.com>
1647         * a-exetim.ads, a-exetim-mingw.ads, a-exetim-default.ads: Whitespace
1648         cleanup.
1649         * s-osprim-mingw.adb, einfo.ads, sem_util.adb, sem_util.ads,
1650         sem_ch4.adb, sem_ch13.adb, s-trasym.adb, s-trasym.ads,
1651         s-taprop-posix.adb: Minor reformatting.
1653 2015-10-16  Bob Duff  <duff@adacore.com>
1655         * adadecode.h, adadecode.c (ada_demangle): Remove
1656         ada_demangle, no longer used.
1657         * a-except-2005.adb: Bring System.Traceback.Symbolic into the
1658         closure.
1660 2015-10-16  Ed Schonberg  <schonberg@adacore.com>
1662         * sem_util.adb, sem_util.ads (Get_Reference_Discriminant): Utility to
1663         locate the access discriminant that supports implicit dereference on a
1664         record type.
1665         (Is_OK_Variable_For_Out_Parameter): Reject other illegal uses
1666         of Implicit_Dereference on an access_to_constant when actual
1667         parameter is a rewritten variable or function call.
1669 2015-10-16  Bob Duff  <duff@adacore.com>
1671         * a-tags.adb, s-trasym.adb, s-trasym.ads: Make sure we don't get
1672         elaboration circularities when polling is turned on.
1674 2015-10-16  Ed Schonberg  <schonberg@adacore.com>
1676         * sem_ch3.adb (Replace_Anonymous_Access_To_Protected_Subprogram):
1677         When creating a full declaration for a formal parameter, the
1678         entity is labelled as an Itype, so set Associated_Node_For_Itype
1679         accordingly.
1680         * einfo.ads: Clarify use of Associated_Node_For_Itype.
1682 2015-10-16  Bob Duff  <duff@adacore.com>
1684         * bindgen: Move pragmas Warnings earlier, otherwise
1685         we can get warnings on with_clauses.
1687 2015-10-16  Arnaud Charlet  <charlet@adacore.com>
1689         * s-osprim-mingw.adb, s-osprim-x32.adb, s-taprop-mingw.adb,
1690         s-taprop-posix.adb (Monotonic_Clock): Removed, not used.
1691         Remove remaining references to OS_Primitives.Monotonic_Clock.
1692         Keep it only on windows which is a special case.
1694 2015-10-16  Javier Miranda  <miranda@adacore.com>
1696         * a-textio.adb (Get_Line): Fix documentation.
1697         * einfo.ads (Interface_Name): Fix documentation.
1698         * exp_aggr.adb (Backend_Processing_Possible): Fix documentation.
1699         * exp_ch4.adb (Expand_N_In): Fix documentation.
1701 2015-10-16  Eric Botcazou  <ebotcazou@adacore.com>
1703         * inline.adb (Subp_Info): Remove Listed component.
1704         (Add_Inlined_Subprogram): Take an entity instead of an index.
1705         Do not set Listed component to True.
1706         (New_Entry): Do not initialize Listed component to False.
1707         (Analyze_Inlined_Bodies): Do not test Listed component
1708         (Must_Inline): Add calls not in the main unit only
1709         if they are in a subprogram that can be inlined outside its unit.
1710         (Add_Inlined_Body): Move test around and add comment.
1712 2015-10-16  Arnaud Charlet  <charlet@adacore.com>
1714         * sinfo.ads, einfo.ads: monir clean ups.
1716 2015-10-16  Arnaud Charlet  <charlet@adacore.com>
1718         * usage.adb, debug.adb, a-except.adb, a-except.ads, a-except-2005.adb,
1719         a-except-2005.ads, s-imgrea.adb: Minor code clean ups related to
1720         jgnat/dotnet removal.
1722 2015-10-16  Arnaud Charlet  <charlet@adacore.com>
1724         * s-osprim-vxworks.adb, s-osprim-darwin.adb, s-tadeca.adb,
1725         s-osprim-unix.adb, s-osprim-solaris.adb, s-osprim-posix.adb,
1726         s-osprim.ads (Monotonic_Clock): Removed, unused.
1728 2015-10-16  Ed Schonberg  <schonberg@adacore.com>
1730         * sem_ch4.adb (Try_Object_Operation, Try_One_Interpretation):
1731         Do not reset the Obj_Type of the prefix if an interpretation
1732         involves an untagged type, to prevent a crash when analyzing an
1733         illegal program in All_Errors mode.
1735 2015-10-16  Hristian Kirtchev  <kirtchev@adacore.com>
1737         * exp_ch4.adb (Expand_N_Expression_With_Actions):
1738         Force the evaluation of the expression when its type is Boolean.
1739         (Force_Boolean_Evaluation): New routine.
1741 2015-10-16  Bob Duff  <duff@adacore.com>
1743         * sem_util.adb (Has_Discrim_Dep_Array): Remove
1744         this function, and the call. No longer needed now that the back
1745         end can handle such things. Should result in further speedups
1746         in some cases.
1748 2015-10-16  Ed Schonberg  <schonberg@adacore.com>
1750         * sem_ch13.adb (Build_Predicate_Functions): If expression for
1751         predicate is side-effect free, indicate that the predicate
1752         function is pure, to allow for optimization of redundant
1753         predicate checks.
1755 2015-10-16  Arnaud Charlet  <charlet@adacore.com>
1757         * checks.adb: Fix typo.
1758         * s-osinte-linux.ads: Add header.
1759         * projects.texi: Removed, no longer used.
1760         * gcc-interface/Make-lang.in: Update dependencies
1761         * s-multip.adb: Minor: fix header.
1762         * sem_ch3.adb, exp_ch7.adb, g-dirope.ads, sinfo.ads, types.ads,
1763         a-textio.adb, s-exctra.adb, ali.adb, back_end.ads, exp_intr.adb,
1764         a-tigeli.adb, exp_ch3.adb, s-os_lib.ads: Remove further references to
1765         .NET.
1766         * gnatlink.adb, opt.ads, exp_aggr.adb, s-solita.adb: Minor comment
1767         updates.
1769 2015-10-16  Gary Dismukes  <dismukes@adacore.com>
1771         * exp_ch9.adb (Build_Simple_Entry_Call): Set_Is_Internal on
1772         the temporary object used for a by-copy entry parameter, to
1773         ensure that the object doesn't get its No_Initialization flag
1774         reset later in Default_Initialize_Object. Also, generate the
1775         assignment of the actual to the temporary in the additional case
1776         of a scalar out parameter whose type has a Default_Value aspect.
1777         * exp_ch3.adb: Fix minor typo in comment.
1779 2015-10-16  Hristian Kirtchev  <kirtchev@adacore.com>
1781         * exp_util.adb, sem_util.ads, sem_ch6.adb, sem_ch7.adb, sem_ch8.adb:
1782         Minor reformatting.
1783         * sem_ch12.adb (Analyze_Formal_Package_Declaration): Set the
1784         SPARK_Mode from the context.
1786 2015-10-16  Bob Duff  <duff@adacore.com>
1788         * sem_util.adb (Requires_Transient_Scope):
1789         If Typ is a generic formal incomplete type, look at the actual
1790         type. Otherwise, we don't notice that the actual type is tagged,
1791         has a variant part, etc, causing a mismatch of calling conventions
1792         between caller and callee.
1794 2015-10-16  Hristian Kirtchev  <kirtchev@adacore.com>
1796         * einfo.ads: Move the declaration of enumeration
1797         literal E_Abstract_State above E_Entry.  Update the upper bound
1798         of subtype Overloadable_Kind.
1800 2015-10-16  Gary Dismukes  <dismukes@adacore.com>
1802         * exp_attr.adb: Minor editorial changes.
1804 2015-10-16  Arnaud Charlet  <charlet@adacore.com>
1806         * exp_ch5.adb, sem_ch3.adb, frontend.adb, exp_ch7.adb, exp_ch7.ads,
1807         sem_ch5.adb, sem_type.adb, exp_util.adb, exp_util.ads, comperr.adb,
1808         exp_attr.adb, sinfo.ads, exp_ch9.adb, make.adb, usage.adb,
1809         lib-writ.adb, sem_ch9.adb, bindgen.adb, debug.adb, einfo.adb,
1810         einfo.ads, types.ads, checks.adb, sem_prag.adb, s-tasini.adb,
1811         rtsfind.ads, freeze.adb, sem_util.adb, sem_util.ads, exp_dbug.adb,
1812         gnatlink.adb, gnat1drv.adb, targparm.adb, targparm.ads, exp_ch4.adb,
1813         exp_ch11.adb, repinfo.adb, s-soflin.adb, s-soflin.ads, exp_ch6.adb,
1814         exp_ch13.adb, sem_mech.adb, sem_ch6.adb, par-prag.adb, exp_disp.adb,
1815         sem_ch8.adb, exp_disp.ads, snames.adb-tmpl, exp_aggr.adb, sem_eval.adb,
1816         exp_intr.adb, sem_ch13.adb, snames.ads-tmpl, sem_disp.adb, exp_ch3.adb:
1817         Code clean up: remove special handling for .NET and JVM.
1819 2015-10-16  Arnaud Charlet  <charlet@adacore.com>
1821         * sem_ch12.adb: Minor punctuation fix in comment
1822         * s-rident.ads: Minor consistency fix in comment
1823         * exp_attr.adb, g-spipat.ads: punctuation fixes in comments.
1824         * restrict.ads: Style fix in comments.
1825         * sem_prag.adb: Minor grammar fix in comment
1827 2015-10-16  Gary Dismukes  <dismukes@adacore.com>
1829         * sem_ch12.adb: Minor reformatting/rewording.
1831 2015-10-16  Arnaud Charlet  <charlet@adacore.com>
1833         * einfo.ads: Minor fix of duplicate words
1834         * rident.ads: Minor style fix in comment
1836 2015-10-16  Hristian Kirtchev  <kirtchev@adacore.com>
1838         * exp_ch3.adb (Expand_N_Full_Type_Declaration): Do not capture,
1839         set and restore the Ghost mode.
1840         (Expand_N_Object_Declaration): Do not capture, set and restore the
1841         Ghost mode.
1842         (Freeze_Type): Redo the capture and restore of the Ghost mode.
1843         (Restore_Globals): Removed.
1844         * exp_ch5.adb (Expand_N_Assignment_Statement): Redo the capture
1845         and restore of the Ghost mode.
1846         (Restore_Globals): Removed.
1847         * exp_ch6.adb (Expand_N_Procedure_Call_Statement):
1848         Redo the capture and restore of the Ghost mode.
1849         (Expand_N_Subprogram_Body): Redo the capture, set and restore
1850         of the Ghost mode.
1851         (Expand_N_Subprogram_Declaration): Do not
1852         capture, set and restore the Ghost mode.
1853         (Restore_Globals): Removed.
1854         * exp_ch7.adb (Expand_N_Package_Body): Redo the capture, set
1855         and restore of the Ghost mode.
1856         (Expand_N_Package_Declaration): Do not capture, set and restore the
1857         Ghost mode.
1858         * exp_ch8.adb (Expand_N_Exception_Renaming_Declaration):
1859         Redo the capture and restore of the Ghost mode.
1860         (Expand_N_Object_Renaming_Declaration): Redo
1861         the capture and restore of the Ghost mode.
1862         (Expand_N_Package_Renaming_Declaration):
1863         Redo the capture and restore of the Ghost mode.
1864         (Expand_N_Subprogram_Renaming_Declaration): Redo the capture
1865         and restore of the Ghost mode.
1866         * exp_ch11.adb Remove with and use clauses for Ghost.
1867         (Expand_N_Exception_Declaration): Do not capture, set and restore
1868         the Ghost mode.
1869         * exp_disp.adb (Make_DT): Redo the capture and restore of the
1870         Ghost mode.
1871         (Restore_Globals): Removed.
1872         * exp_prag.adb (Expand_Pragma_Check): Do not capture, set
1873         and restore the Ghost mode.
1874         (Expand_Pragma_Contract_Cases):
1875         Redo the capture and restore of the Ghost mode.  Preserve the
1876         original context of contract cases by setting / resetting the
1877         In_Assertion_Expr counter.
1878         (Expand_Pragma_Initial_Condition):
1879         Redo the capture and restore of the Ghost mode.
1880         (Expand_Pragma_Loop_Variant): Redo the capture and restore of
1881         the Ghost mode.
1882         (Restore_Globals): Removed.
1883         * exp_util.adb (Make_Predicate_Call): Redo the capture and
1884         restore of the Ghost mode.
1885         (Restore_Globals): Removed.
1886         * freeze.adb (Freeze_Entity): Redo the capture and restore of
1887         the Ghost mode.
1888         (Restore_Globals): Removed.
1889         * ghost.adb (Check_Ghost_Context): Remove the RM reference from
1890         the error message.
1891         (Is_OK_Statement): Account for statements
1892         that appear in assertion expressions.
1893         (Is_Subject_To_Ghost):
1894         Moved from spec.
1895         * ghost.ads (Is_Subject_To_Ghost): Moved to body.
1896         * rtsfind.ads (Load_RTU): Redo the capture and restore of the
1897         Ghost mode.
1898         * sem.adb Add with and use clauses for Ghost.
1899         (Analyze): Redo
1900         the capture and restore of the Ghost mode. Set the Ghost mode
1901         when analyzing a declaration.
1902         (Do_Analyze): Redo the capture
1903         and restore of the Ghost mode.
1904         * sem_ch3.adb (Analyze_Full_Type_Declaration): Do not capture, set
1905         and restore the Ghost mode.
1906         (Analyze_Incomplete_Type_Decl):
1907         Do not capture, set and restore the Ghost mode.
1908         (Analyze_Number_Declaration): Do not capture, set and restore the
1909         Ghost mode.
1910         (Analyze_Object_Declaration): Do not capture, set and
1911         restore the Ghost mode.
1912         (Analyze_Private_Extension_Declaration):
1913         Do not capture, set and restore the Ghost mode.
1914         (Analyze_Subtype_Declaration): Do not capture, set and restore
1915         the Ghost mode.
1916         (Restore_Globals): Removed.
1917         * sem_ch5.adb (Analyze_Assignment): Redo the capture and restore
1918         of the Ghost mode.
1919         (Restore_Globals): Removed.
1920         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration):
1921         Do not capture, set and restore the Ghost mode.
1922         (Analyze_Procedure_Call): Redo the capture and restore of the
1923         Ghost mode.
1924         (Analyze_Subprogram_Body_Helper): Redo the capture
1925         and restore of the Ghost mode.  (Analyze_Subprogram_Declaration):
1926         Do not capture, set and restore the Ghost mode.
1927         (Restore_Globals): Removed.
1928         * sem_ch7.adb (Analyze_Package_Body_Helper): Redo the capture and
1929         restore of the Ghost mode.
1930         (Analyze_Package_Declaration):
1931         Do not capture, set and restore the Ghost mode.
1932         (Analyze_Private_Type_Declaration): Do not capture, set and
1933         restore the Ghost mode.
1934         (Restore_Globals): Removed.
1935         * sem_ch8.adb (Analyze_Exception_Renaming): Do not capture,
1936         set and restore the Ghost mode.
1937         (Analyze_Generic_Renaming): Do not capture, set and restore the Ghost
1938         mode.
1939         (Analyze_Object_Renaming): Do not capture, set and restore the
1940         Ghost mode.
1941         (Analyze_Package_Renaming): Do not capture, set and restore the Ghost
1942         mode.
1943         (Analyze_Subprogram_Renaming): Do not capture, set and restore the
1944         Ghost mode.
1945         (Restore_Globals): Removed.
1946         * sem_ch11.adb (Analyze_Exception_Declaration): Do not capture,
1947         set and restore the Ghost mode.
1948         * sem_ch12.adb (Analyze_Generic_Package_Declaration):
1949         Do not capture, set and restore the Ghost mode.
1950         (Analyze_Generic_Subprogram_Declaration): Do not capture, set
1951         and restore the Ghost mode.
1952         * sem_ch13.adb (Build_Invariant_Procedure_Declaration): Redo
1953         the capture and restore of the Ghost mode.
1954         * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
1955         Redo the capture and restore of the Ghost mode.
1956         (Analyze_External_Property_In_Decl_Part):
1957         Redo the capture and restore of the Ghost mode.
1958         (Analyze_Initial_Condition_In_Decl_Part): Redo the
1959         capture and restore of the Ghost mode.  (Analyze_Pragma):
1960         Do not capture, set and restore the Ghost mode for Assert.
1961         Redo the capture and restore of the Ghost mode for Check. Do
1962         not capture and restore the Ghost mode for Invariant.
1963         (Analyze_Pre_Post_Condition_In_Decl_Part): Redo the capture and
1964         restore of the Ghost mode.
1965         * sem_res.adb (Resolve): Capture, set and restore the Ghost mode
1966         when resolving a declaration.
1967         * sem_util.adb (Build_Default_Init_Cond_Procedure_Body):
1968         Redo the capture and restore of the Ghost mode.
1969         (Build_Default_Init_Cond_Procedure_Declaration): Redo the capture
1970         and restore of the Ghost mode.
1972 2015-10-16  Bob Duff  <duff@adacore.com>
1974         * debug.adb: Document -gnatdQ switch.
1976 2015-10-16  Ed Schonberg  <schonberg@adacore.com>
1978         * sem_ch12.adb (Analyze_Formal_Subprogram): Implement rule that
1979         a formal abstract subprogram cannot have a null default: RM 12.6
1980         (4 1.2).
1982 2015-10-16  Bob Duff  <duff@adacore.com>
1984         * sem_util.ads, sinput.ads, bcheck.adb: Minor comment fixes.
1986 2015-10-16  Javier Miranda  <miranda@adacore.com>
1988         * inline.adb (Add_Inlined_Body): Ensure that
1989         Analyze_Inlined_Bodies will be invoked after completing the
1990         analysis of the current unit.
1992 2015-10-16  Arnaud Charlet  <charlet@adacore.com>
1994         * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order): Fix error
1995         message for bad last bit position.
1996         * sem_ch3.adb, sem_util.adb, sem_util.ads: Minor reformatting.
1998 2015-10-16  Ed Schonberg  <schonberg@adacore.com>
2000         * exp_ch5.adb (Expand_N_Case_Statement): If expression is
2001         compile-time known but does not obey a static predicate on
2002         its type, replace the case statement with a raise statement,
2003         as with other statically detected constraint violations.
2005 2015-10-16  Bob Duff  <duff@adacore.com>
2007         * s-traceb.adb, s-traceb.ads, s-traceb-hpux.adb, s-traceb-mastop.adb:
2008         Reinstate code.
2009         * opt.ads: Minor typo.
2011 2015-10-16  Ed Schonberg  <schonberg@adacore.com>
2013         * sem_util.adb (Gather_Components): When gathering components
2014         of a nested variant, the record type used in legality checks is
2015         the enclosing record type.
2017 2015-10-13  Jakub Jelinek  <jakub@redhat.com>
2019         * gcc-interface/utils.c (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
2020         DEF_FUNCTION_TYPE_11): Define.
2022 2015-10-09  Eric Botcazou  <ebotcazou@adacore.com>
2024         * gcc-interface/Make-lang.in: Make sure that GNAT1_OBJS and not just
2025         GNAT1_ADA_OBJS are compiled only after generated files are created.
2027 2015-10-05  Richard Sandiford  <richard.sandiford@arm.com>
2029         * gcc-interface/trans.c (convert_with_check): Use real_arithmetic
2030         instead of REAL_ARITHMETIC.
2032 2015-10-05  Richard Sandiford  <richard.sandiford@arm.com>
2034         * gcc-interface/trans.c (convert_with_check): Use real_less instead
2035         of REAL_VALUES_LESS.
2037 2015-10-02  Doug Rupp  <rupp@adacore.com>
2038             Olivier Hainque  <hainque@adacore.com>
2040         * gcc-interface/lang.opt (fbuiltin-printf): Accept.
2041         * gcc-interface/misc.c (gnat_handle_option): Ignore it.
2042         * gcc-interface/lang-specs.h (@ada, @adawhy, @adascil): Propagate -f*
2043         flags as -g* and -m* flags past -gnatez.
2045 2015-10-02  Eric Botcazou  <ebotcazou@adacore.com>
2047         * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Warnings>: Replace
2048         linear search with call to find_opt and issue warnings if the -W
2049         switch is not appropriate.
2051 2015-10-02  Eric Botcazou  <ebotcazou@adacore.com>
2053         * gcc-interface/ada-tree.h (DECL_RESTRICTED_ALIASING_P): New flag.
2054         * gcc-interface/decl.c (gnat_to_gnu_param): For parameters passed by
2055         reference but whose type isn't by-ref and whose mechanism hasn't been
2056         forced to by-ref, set the DECL_RESTRICTED_ALIASING_P flag directly on
2057         them instead of changing their type.
2058         * gcc-interface/trans.c (scan_rhs_r): New helper function.
2059         (independent_iterations_p): New predicate.
2060         (Loop_Statement_to_gnu): For a loop with an iteration scheme, set an
2061         ivdep pragma if the iterations are independent.
2063 2015-10-02  Eric Botcazou  <ebotcazou@adacore.com>
2065         * gcc-interface/trans.c (find_loop_for): Use FOR_EACH_VEC_ELT_REVERSE.
2066         (Loop_Statement_to_gnu): Use FOR_EACH_VEC_ELT.
2067         (finalize_nrv): Use FOR_EACH_VEC_SAFE_ELT and initialize field.
2068         (build_stmt_group): Add blank lines.
2070 2015-09-30  Thomas Schwinge  <thomas@codesourcery.com>
2072         * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_11): Don't define.
2074 2015-09-28  Tom de Vries  <tom@codesourcery.com>
2076         * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_6): Define.
2078 2015-09-17  Eric Botcazou  <ebotcazou@adacore.com>
2080         * gcc-interface/trans.c (emit_check): Do not touch TREE_SIDE_EFFECTS.
2082 2015-09-14  Pierre-Marie de Rodat  <derodat@adacore.com>
2084         * gcc-interface/misc.c (gnat_post_options): Issue a warning if
2085         generating STABS debugging information when not the default.
2087 2015-09-14  Eric Botcazou  <ebotcazou@adacore.com>
2089         * gcc-interface/gigi.h (ref_filename): Delete.
2090         (Sloc_to_locus): Add clean_column parameter defaulting to false.
2091         (build_call_raise): Adjust comment.
2092         (build_call_raise_range): Move around.
2093         * gcc-interface/trans.c (ref_filename): Delete.
2094         (gigi): Fix formatting.
2095         (block_end_locus_sink): Delete.
2096         (Sloc_to_locus1): Tidy up and reformat.  Rename into...
2097         (Sloc_to_locus): ...this.  Add default for clean_colmun parameter.
2098         (set_expr_location_from_node1): Rename into...
2099         (set_expr_location_from_node): ...this.
2100         (set_end_locus_from_node): Move around.  Adjust for renaming.
2101         (Handled_Sequence_Of_Statements_to_gnu): Likewise.
2102         (add_cleanup): Likewise.
2103         * gcc-interface/utils2.c (expand_sloc): New static function.
2104         (build_call_raise): Call it.
2105         (build_call_raise_column): Likewise.
2106         (build_call_raise_range): Likewise.  Move around.
2108 2015-09-14  Eric Botcazou  <ebotcazou@adacore.com>
2110         * gcc-interface/utils2.c (gnat_rewrite_reference) <COMPOUND_EXPR>: Add
2111         another acceptable pattern for the RHS.
2113 2015-07-24  Micahel Darling  <darlingm@gmail.com>
2115         PR other/66259
2116         * prj-nmsc.adb: Reflects renaming of configure.in to configure.ac
2117         * gcc-interface/Makefile.in: Likewise
2119 2015-07-12  Aldy Hernandez  <aldyh@redhat.com>
2121         * gcc-interface/utils.c: Fix double word typos.
2122         * gnat_ugn.texi: Same.
2123         * init.c: Same.
2124         * par.adb: Same.
2125         * projects.texi: Same.
2126         * sem_ch4.adb: Same.
2127         * sem_ch6.adb: Same.
2128         * sem_dim.adb: Same.
2129         * sem_eval.adb: Same.
2130         * sem_prag.adb: Same.
2131         * sem_warn.adb: Same.
2133 2015-07-07  Andrew MacLeod  <amacleod@redhat.com>
2135         * gcc-interface/cuintp.c: Adjust includes.
2136         * gcc-interface/decl.c: Likewise.
2137         * gcc-interface/misc.c: Likewise.
2138         * gcc-interface/targtyps.c: Likewise.
2139         * gcc-interface/trans.c: Likewise.
2140         * gcc-interface/utils.c: Likewise.
2141         * gcc-interface/utils2.c: Likewise.
2143 2015-07-06  John Marino  <gnugcc@marino.st>
2145         * s-oscons-tmplt.c: Add support for DragonFly alongside FreeBSD.
2147 2015-06-29  Eric Botcazou  <ebotcazou@adacore.com>
2149         PR ada/63310
2150         * gcc-interface/utils.c (gnat_write_global_declarations): Always
2151         build the dummy global variable if code was generated.
2153 2015-06-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
2155         PR fortran/66605
2156         * gcc-interface/misc.c (gnat_post_options): No need to disable
2157         warn_unused_parameter anymore.
2159 2015-06-26  Eric Botcazou  <ebotcazou@adacore.com>
2161         * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): When
2162         not optimizing the CFG, clear the DECL_DECLARED_INLINE_P flag on the
2163         at-end procedures.
2165 2015-06-26  Eric Botcazou  <ebotcazou@adacore.com>
2167         * gcc-interface/gigi.h (note_types_used_by_globals): Delete.
2168         (gnat_write_global_declarations): New prototype.
2169         * gcc-interface/utils.c (type_decls): Rename back to...
2170         (global_decls): ...this.
2171         (gnat_pushdecls): Revert previous change.
2172         (create_var_decl): Do not output global variables.
2173         (note_types_used_by_globals): Rename back to...
2174         (gnat_write_global_declarations): ...this.  Output variables on the
2175         global_decls vector.
2176         * gcc-interface/misc.c (gnat_parse_file): Adjust to above renaming.
2178 2015-06-26  Eric Botcazou  <ebotcazou@adacore.com>
2180         * gcc-interface/gigi.h (create_var_decl_1): Rename into...
2181         (create_var_decl): ...this.  Add default value for last parameter.
2182         (create_type_stub_decl): Adjust.
2183         (create_type_decl): Likewise.
2184         (create_field_decl): Likewise.
2185         (create_param_decl): Likewise.
2186         (create_label_decl): Likewise.
2187         (create_subprog_decl): Likewise.
2188         * gcc-interface/utils.c (create_var_decl_1): Rename into...
2189         (create_var_decl): ...this.  Rename var_name into name and var_init
2190         into init, move const_decl_allowed_p last and adjust accordingly.
2191         (create_type_stub_decl): Rename type_name into name and adjust.
2192         (create_type_decl): Likewise.
2193         (create_field_decl): Likewise for field_name and field_type.
2194         (create_param_decl): Likewise for param_name and param_type.
2195         (create_label_decl): Likewise for label_name.
2196         (create_subprog_decl): Likewise for subprog_name and subprog_type.
2197         * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust couple of calls
2198         to create_var_decl_1.
2200 2015-06-26  Eric Botcazou  <ebotcazou@adacore.com>
2202         * gcc-interface/trans.c (loop_info_d): Add low_bound, high_bound,
2203         artificial, has_checks and warned_aggressive_loop_optimizations.
2204         (gigi): Set warn_aggressive_loop_optimizations to 0.
2205         (inside_loop_p): New inline predicate.
2206         (push_range_check_info): Rename into...
2207         (find_loop_for): ...this and do not push range_check_info_d object.
2208         (Loop_Statement_to_gnu): Set artificial, low_bound and high_bound
2209         fields of gnu_loop_info.  Adjust detection of checks enabled by
2210         -funswitch-loops and adds one for -faggressive-loop-optimizations.
2211         (gnat_to_gnu) <N_Indexed_Component>: If aggressive loop optimizations
2212         are enabled, warn for loops overrunning an array of size 1 not at the
2213         end of a record.
2215 2015-06-25  Andrew MacLeod  <amacleod@redhat.com>
2217         * gcc-interface/trans.c: Remove ipa-ref.h and plugin-api.h from include
2218         list.
2219         * gcc-interface/utils.c: Likewise.
2221 2015-06-25  Richard Sandiford  <richard.sandiford@arm.com>
2223         * gcc-interface/decl.c (value_annotation_hasher): Inherit from
2224         ggc_cache_ptr_hash rather than ggc_cache_hasher.
2225         * gcc-interface/utils.c (pad_type_hasher): Likewise.
2227 2015-06-25  Richard Sandiford  <richard.sandiford@arm.com>
2229         * gcc-interface/decl.c (value_annotation_hasher::handle_cache_entry):
2230         Delete.
2231         (value_annotation_hasher::keep_cache_entry): New function.
2232         * gcc-interface/utils.c (pad_type_hasher::handle_cache_entry):
2233         Delete.
2234         (pad_type_hasher::keep_cache_entry): New function.
2236 2015-06-25  Andrew MacLeod  <amacleod@redhat.com>
2238         * gcc-interface/misc.c: Include calls.h not function.h.
2240 2015-06-19  Eric Botcazou  <ebotcazou@adacore.com>
2242         * gcc-interface/gigi.h (record_builtin_type): Adjust comment.
2243         (tree create_type_decl): Likewise.
2244         (create_var_decl_1): Add artificial_p and debug_info_p parameters.
2245         (create_var_decl): Likewise.
2246         (create_true_var_decl): Delete.
2247         (create_subprog_decl): Add debug_info_p parameter.
2248         * gcc-interface/decl.c (gnat_to_gnu_entity): Add artificial_p local
2249         variable and use it throughout.  Remove DECL_ARTIFICIAL settings.
2250         <E_Variable>: Adjust calls to create_var_decl and create_var_decl_1.
2251         Remove DECL_IGNORED_P settings.
2252         <E_Enumeration_Type>: Likewise.
2253         <E_Record_Type>: Likewise.
2254         <E_Subprogram_Type>: Likewise.  Remove artificial_flag local variable.
2255         Adjust call to create_subprog_decl.
2256         (get_minimal_subprog_decl): Likewise.
2257         (elaborate_expression_1): Adjust call to create_var_decl.
2258         * gcc-interface/trans.c (gigi): Adjust calls to create_var_decl and
2259         create_subprog_decl.  Remove DECL_ARTIFICIAL & DECL_IGNORED_P settings.
2260         * gcc-interface/utils.c (maybe_pad_type): Likewise.
2261         (record_builtin_type): Adjust comment.
2262         (create_type_stub_decl): Remove obsolete comment.
2263         (create_var_decl_1): Add artificial_p and debug_info_p parameters.
2264         Set DECL_ARTIFICIAL and DECL_IGNORED_P accordingly.
2265         (create_subprog_decl): Add debug_info_p parameter.  Set DECL_IGNORED_P
2266         accordingly.
2268 2015-06-19  Eric Botcazou  <ebotcazou@adacore.com>
2270         * gcc-interface/misc.c (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): Define.
2272 2015-06-19  Eric Botcazou  <ebotcazou@adacore.com>
2274         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Make sure
2275         the size of a padding type built around the return type is positive.
2276         * gcc-interface/trans.c (gnat_to_gnu) <N_Simple_Return_Statement>:
2277         Use INIT_EXPR instead of MODIFY_EXPR to assign to the return object.
2279 2015-06-17  Andrew MacLeod  <amacleod@redhat.com>
2281         * gcc-interface/cuintp.c: Do not include input.h, line-map.h or is-a.h.
2282         * gcc-interface/decl.c: Likewise.
2283         * gcc-interface/misc.c: Likewise.
2284         * gcc-interface/targtyps.c: Likewise.
2285         * gcc-interface/trans.c: Likewise.
2286         * gcc-interface/utils.c: Likewise.
2287         * gcc-interface/utils2.c: Likewise.
2289 2015-06-11  Pierre-Marie de Rodat  <derodat@adacore.com>
2291         * gcc-interface/utils.c (get_global_context): Register the main
2292         translation unit through the new debug hook.
2294 2015-06-09  Eric Botcazou  <ebotcazou@adacore.com>
2296         * gcc-interface/misc.c: Remove duplicate include directives.
2297         * gcc-interface/trans.c: Likewise.
2298         * gcc-interface/utils.c: Likewise.
2300 2015-06-08  Andrew MacLeod  <amacleod@redhat.com>
2302         * gcc-interface/cuintp.c : Adjust include files.
2303         * gcc-interface/decl.c : Likewise.
2304         * gcc-interface/misc.c : Likewise.
2305         * gcc-interface/targtyps.c : Likewise.
2306         * gcc-interface/trans.c : Likewise.
2307         * gcc-interface/utils.c : Likewise.
2308         * gcc-interface/utils2.c : Likewise.
2310 2015-06-08  John Marino  <gnugcc@marino.st>
2312         * a-intnam-dragonfly.ads: New.
2313         * s-osinte-dragonfly.adb: Likewise.
2314         * s-osinte-dragonfly.ads: Likewise.
2315         * system-dragonfly-x86_64.ads: Likewise.
2316         * adaint.c: Add BSD macros.
2317         * cstreams.c: Likewise.
2318         * gsocket.h: Likewise.
2319         * link.c: Likewise.
2320         * socket.c: Likewise.
2321         * env.c: Add __DragonFly__, remove __FreeBSD__ macro.
2322         * init.c: Add __DragonFly__, change __gnat_install_handler
2323         prototype from empty to void.
2324         * initialize.c: Add __DragonFly__.
2325         * sysdep.c: Likewise.
2326         * s-osinte-freebsd.adb: Use __get_errno instead of __error.
2327         * tracebak.c: Set unwinder for i386 BSD.
2328         * gcc-interface/Makefile.in: Add x86_64 DragonFly, tweak
2329         x86_64 FreeBSD and x86 FreeBSD.
2331 2015-06-06  Eric Botcazou  <ebotcazou@adacore.com>
2333         * gcc-interface/utils.c (note_types_used_by_globals): Tweak comment.
2334         * gcc-interface/decl.c (gnat_to_gnu_entity): Likewise.
2336 2015-06-05  Aldy Hernandez  <aldyh@redhat.com>
2338         * gcc-interface/gigi.h (note_types_used_by_globals): Rename from
2339         gnat_write_global_declarations.
2340         * gcc-interface/misc.c (gnat_parse_file): Call
2341         note_types_used_by_globals.
2342         Remove LANG_HOOKS_WRITE_GLOBALS.
2343         * gcc-interface/utils.c: Rename global_decls to type_decls.
2344         (gnat_write_global_declarations): Rename
2345         to note_types_used_by_globals.
2346         Remove call to finalize_compilation_unit.
2347         Remove call to debug_hooks->global_decl for globals.
2348         (gnat_pushdecls): Only insert into type_decls if TYPE_DECL.
2350 2015-06-04  Andrew MacLeod  <amacleod@redhat.com>
2352         * gcc-interface/cuintp.c: Adjust includes for restructured coretypes.h.
2353         * gcc-interface/decl.c: Likewise.
2354         * gcc-interface/misc.c: Likewise.
2355         * gcc-interface/targtyps.c: Likewise.
2356         * gcc-interface/trans.c: Likewise.
2357         * gcc-interface/utils.c: Likewise.
2358         * gcc-interface/utils2.c: Likewise.
2360 2015-06-04  Pierre-Marie de Rodat  <derodat@adacore.com>
2362         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: If
2363         processing a definition, create definitions for padding types
2364         around return types.
2366 2015-06-03  Eric Botcazou  <ebotcazou@adacore.com>
2368         * gcc-interface/utils.c (copy_type): Also set TYPE_CANONICAL.
2370 2015-06-03  Eric Botcazou  <ebotcazou@adacore.com>
2372         * gcc-interface/trans.c (gnat_to_gnu) <N_Simple_Return_Statement>: Fix
2373         typo in latest change.
2375 2015-06-01  Eric Botcazou  <ebotcazou@adacore.com>
2377         * gcc-interface/Makefile.in: Fix ARM/Darwin configuration.
2379 2015-06-01  Pierre-Marie de Rodat  <derodat@adacore.com>
2381         * gcc-interface/utils.c (scale_by_factor_of): When handling a function
2382         call expression, process the corresponding function body.  Also handle
2383         potential addends.
2385 2015-06-01  Pierre-Marie de Rodat  <derodat@adacore.com>
2387         * gcc-interface/decl.c (gnat_to_gnu_entity): Replace pointer types with
2388         references ones for functions that return references.
2390 2015-06-01  Eric Botcazou  <ebotcazou@adacore.com>
2392         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: For a
2393         definition of a type coming from a limited_with, get to the full view
2394         if it is not in the main code unit.
2396 2015-06-01  Eric Botcazou  <ebotcazou@adacore.com>
2398         * gcc-interface/utils.c (create_var_decl_1): If an assembler name is
2399         specified, let the target mangle it before settting.
2400         (create_subprog_decl): Likewise and move this treatment last.
2402 2015-06-01  Eric Botcazou  <ebotcazou@adacore.com>
2404         * gcc-interface/lang-specs.h (TARGET_VXWORKS_RTP): Move substitution to
2405         before first -gnatez switch.  Simplify and add trailing space.
2407 2015-06-01  Eric Botcazou  <ebotcazou@adacore.com>
2409         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: If the
2410         record has a parent field and a representation clause, make sure that
2411         it is properly aligned.
2413 2015-06-01  Eric Botcazou  <ebotcazou@adacore.com>
2415         * gcc-interface/trans.c (lvalue_required_p) <N_Indexed_Component>: Deal
2416         with character and enumeration literals as index values.
2418 2015-06-01  Eric Botcazou  <ebotcazou@adacore.com>
2420         * gcc-interface/gigi.h (build_simple_component_ref): Declare.
2421         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Deal with
2422         address clause on aliased object with unconstrained nominal subtype.
2423         Mark the aligning variable as artificial, do not convert the address
2424         expression immediately but mark it as constant instead.
2425         * gcc-interface/utils.c (convert): If the target type contains a
2426         template, be prepared for an empty array.
2427         (maybe_unconstrained_array): Likewise.
2428         * gcc-interface/utils2.c (known_alignment) <POINTER_PLUS_EXPR>: Deal
2429         with the pattern built for aligning types.
2430         <INTEGER_CST>: Do not cap the value at BIGGEST_ALIGNMENT.
2431         (build_simple_component_ref): Make public.
2432         If the base object is a constructor that contains a template, fold the
2433         result field by field.
2435 2015-05-31  Eric Botcazou  <ebotcazou@adacore.com>
2437         * s-oscons-tmplt.c: Add explicit tests for Android alongside Linux.
2439 2015-05-30  Eric Botcazou  <ebotcazou@adacore.com>
2441         * adaint.c: Test for __linux__ instead of linux and __sun__ instead
2442         of sun.  Add missing leading underscore to AIX.  Remove #elif 0.
2443         * adaint.h: Likewise.
2444         * cio.c: Likewise.
2445         * cstreams.c: Likewise.
2446         * env.c: Likewise.
2447         * gsocket.h: Likewise.
2448         * init.c: Likewise.  Test for __i386__ instead of i386.
2449         * link.c: Likewise.
2450         * s-oscons-tmplt.c: Likewise.
2451         * sysdep.c: Likewise.
2452         * terminals.c: Likewise.  Use BSD symbol instead of FREEBSD.
2453         * tracebak.c: Likewise.  Test for __sparc__ instead of sparc.
2455 2015-05-28  Eric Botcazou  <ebotcazou@adacore.com>
2457         * gcc-interface/utils.c (max_size) <tcc_binary>: Add special code to
2458         deal with the subtraction of a "negative" value in an unsigned type.
2460 2015-05-28  Eric Botcazou  <ebotcazou@adacore.com>
2462         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Do
2463         not error out on a return type which has a size that overflows if the
2464         return is done by invisible reference.
2466 2015-05-28  Eric Botcazou  <ebotcazou@adacore.com>
2468         * gcc-interface/utils.c (gnat_pushdecl): Reunify the handling of array
2469         and pointer types wrt DECL_ORIGINAL_TYPE and adjust left and right.
2471 2015-05-28  Eric Botcazou  <ebotcazou@adacore.com>
2473         * gcc-interface/gigi.h (gnat_stabilize_reference): Adjust.
2474         (rewrite_fn): Remove third parameter.
2475         (type_is_padding_self_referential): New inline predicate.
2476         (return_type_with_variable_size_p): Likewise.
2477         * gcc-interface/decl.c (allocatable_size_p): More around.
2478         (cannot_be_superflat_p): Rename into...
2479         (cannot_be_superflat ): ...this.
2480         (initial_value_needs_conversion): New predicate.
2481         (gnat_to_gnu_entity): Invoke type_is_padding_self_referential,
2482         initial_value_needs_conversion and adjust to above renaming.
2483         For a renaming, force the materialization if the inner expression
2484         is compound.  Adjust calls to elaborate_reference and build a
2485         compound expression if needed.
2486         (struct er_dat): Add N field.
2487         (elaborate_reference_1): Remove N parameter and adjust.
2488         (elaborate_reference): Add INIT parameter and pass it in the call to
2489         gnat_rewrite_reference.  Adjust initial expression.
2490         * gcc-interface/trans.c (Call_to_gnu): Treat renamings the same way as
2491         regular object declarations when it comes to creating a temporary.
2492         Adjust call to gnat_stabilize_reference and build a compound expression
2493         if needed.  Invoke return_type_with_variable_size_p.
2494         (gnat_to_gnu): Invoke type_is_padding_self_referential.  In case #4,
2495         return a call to a function unmodified if it returns with variable size
2496         and is also the initial expression in an object declaration.
2497         * gcc-interface/utils2.c (build_binary_op) <INIT_EXPR>: Use the RHS'
2498         type if it is a call to a function that returns with variable size.
2499         (build_unary_op): Invoke type_is_padding_self_referential.
2500         (gnat_stabilize_reference_1): Remove N parameter and adjust.
2501         (gnat_stabilize_reference): Add INIT parameter and pass it in the call
2502         to gnat_rewrite_reference.
2503         (gnat_rewrite_reference):  Remove N, add INIT parameter and adjust.
2504         <COMPOUND_EXPR>: New case.
2506 2015-05-28  Ed Schonberg  <schonberg@adacore.com>
2508         * sem_ch3.adb (Is_Visible_Component): Component is visible
2509         in a derived type if inherited through an ancestor that has a
2510         partial view of the original type holding the component, if the
2511         full view of that original type is in scope.
2512         * sem_util.ads (Get_Body_From_Stub): Works for all kinds of stubs.
2514 2015-05-28  Bob Duff  <duff@adacore.com>
2516         * sem_util.adb (Requires_Transient_Scope): For definite untagged
2517         subtypes, we should never have to use the secondary stack. This moves
2518         toward that goal. But there are still cases that don't work.
2519         Here, we move the check for Is_Definite first, but add a
2520         special-purpose check for Has_Discrim_Dep_Array.
2522 2015-05-28  Bob Duff  <duff@adacore.com>
2524         * sem_util.adb (Requires_Transient_Scope): Avoid returning
2525         function results on the secondary stack in so many cases.
2527 2015-05-28  Ed Schonberg  <schonberg@adacore.com>
2529         * sem_util.adb (Wrong_Type): In any instance, do not emit error
2530         if type of expression is the partial view of the expected type.
2532 2015-05-28  Ed Schonberg  <schonberg@adacore.com>
2534         * sem_res.adb (Resolve_Actuals): a)  The replacement of formal
2535         names in named associations only needs to be done within an
2536         instance, on a call to a primitive of a formal derived type,
2537         where the actual subprogram may have different formal names than
2538         those of the primitive operation of the formal type.
2539         b) Defaulted parameters must be taken into account when obtaining
2540         the names of the formals of the actual subprogram being called.
2542 2015-05-28  Robert Dewar  <dewar@adacore.com>
2544         * sem_ch13.adb, sem_disp.ads: Minor reformatting.
2546 2015-05-28  Ed Schonberg  <schonberg@adacore.com>
2548         * sem_util.adb (Set_Debug_Info_Needed): For a private type
2549         whose full view is itself a derived private type, set flag on
2550         underlying full view as well, for proper gdb display.
2552 2015-05-28  Bob Duff  <duff@adacore.com>
2554         * exp_tss.ads: Minor comment fix.
2555         * exp_ch3.adb (Build_Array_Init_Proc, Build_Record_Init_Proc):
2556         Inline init_procs when the type has controlled parts. Remove
2557         obsolete comments about those init_procs -- init_procs for
2558         such types are no longer complex. A typical init_proc just
2559         initializes the 'Tag field, and calls the parent init_proc
2560         (e.g. for Limited_Controlled), which calls the grandparent
2561         (for Root_Controlled), which does nothing. This all boils down
2562         to one instruction when inlined.
2563         * exp_ch7.adb (Create_Finalizer): Inline the finalizer.
2565 2015-05-28  Ed Schonberg  <schonberg@adacore.com>
2567         * sem_ch4.adb (Analyze_Selected_Component): If the type to use
2568         is a derived type and is a generic actual, the selected component
2569         appears within an instance body, and the check over the type
2570         has failed, examine ancestor types for the desired component.
2571         (Find_Component_In_Instance): If record type is a derived type,
2572         examine all ancestors in order to locate desired component.
2574 2015-05-27  H.J. Lu  <hongjiu.lu@intel.com>
2576         * gcc-interface/Makefile.in (TOOLS_LIBS): Add @NO_PIE_FLAG@.
2578 2015-05-27  Eric Botcazou  <ebotcazou@adacore.com>
2580         * gcc-interface/trans.c (elaborate_all_entities): Do not elaborate an
2581         incomplete type coming from a limited_with and whose non-limited view
2582         comes from the main unit.
2584 2015-05-27  Eric Botcazou  <ebotcazou@adacore.com>
2586         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Move down
2587         code applying atomic checks to the object.
2589 2015-05-27  Robert Dewar  <dewar@adacore.com>
2591         * sem_aux.adb: Minor rewording.
2593 2015-05-27  Bob Duff  <duff@adacore.com>
2595         * exp_prag.adb (Expand_Pragma_Abort_Defer): Make
2596         pragma Abort_Defer do nothing if Abort_Allowed is False.
2598 2015-05-27  Arnaud Charlet  <charlet@adacore.com>
2600         * exp_ch9.adb, sem_util.adb, sem_util.ads, s-stposu.adb, s-spsufi.ads,
2601         sem_elab.ads, g-comlin.ads, errout.ads, exp_ch6.adb, sem_ch4.adb,
2602         opt.ads, s-bignum.adb, output.ads, sem_ch13.adb, erroutc.ads,
2603         sem_disp.ads, exp_ch3.adb: Minor fixes of duplicate words in comments.
2605 2015-05-27  Doug Rupp  <rupp@adacore.com>
2607         * adaint.c (__gnat_tmp_name) [vxworks]: Robustify and use for rtp as
2608         well as kernel.
2610 2015-05-27  Pierre-Marie de Rodat  <derodat@adacore.com>
2612         * par_sco.adb (Process_Decision): Store sloc to
2613         condition/pragmas SCOs associations into a temporary table before
2614         moving them to the SCO_Raw_Hash_Table so that we can back them
2615         out just like we do for SCO entries that are simple decisions
2616         in an expression context.
2618 2015-05-27  Ed Schonberg  <schonberg@adacore.com>
2620         * sem_ch6.adb (Process_Formals): A non-private formal type that
2621         is a limited view does not have a list of private dependents.
2623 2015-05-27  Ed Schonberg  <schonberg@adacore.com>
2625         * exp_ch5.adb (Expand_N_Case_Statement): If the expression in
2626         the case statement is a compile-time known value, we look for a
2627         corresponding alternative to optimize the case statement into a
2628         single case. If the type has a static predicate and the expression
2629         does not satisfy the predicate, there is no legal alternative and
2630         this optimization is not applicable.  Excecution is erroneous,
2631         or else if assertions are enabled, an exception will be raised
2632         earlier, at the point the expression is elaborated.
2634 2015-05-27  Robert Dewar  <dewar@adacore.com>
2636         * sem_elab.adb (Check_Internal_Call_Continue): Suppress
2637         warning on Finalize, Adjust, or Initialize if type involved has
2638         Warnings_Off set.
2640 2015-05-27  Ed Schonberg  <schonberg@adacore.com>
2642         * sem_aux.adb, sem_aux.ads (First_Discriminant): Return empty when
2643         applied to a type with no known discriminants.
2645 2015-05-26  Robert Dewar  <dewar@adacore.com>
2647         * errout.ads, sem_ch4.adb, sem_ch6.adb: Minor reformatting.
2649 2015-05-26  Bob Duff  <duff@adacore.com>
2651         * sem_elab.adb (Check_A_Call): In the case where we're
2652         calling something in an instance of a generic package that is
2653         within this same unit (as the call), make sure we treat it
2654         as a call to an entity within the same unit. That is, call
2655         Check_Internal_Call, rather than putting "Elaborate_All(X)"
2656         on X, which would necessarily result in an elaboration cycle in
2657         static-elaboration mode.
2659 2015-05-26  Eric Botcazou  <ebotcazou@adacore.com>
2661         * freeze.ads (Is_Atomic_VFA_Aggregate): Adjust profile.
2662         * freeze.adb (Is_Atomic_VFA_Aggregate): Change Entity
2663         parameter into Node parameter and remove Type parameter.
2664         Look at Is_Atomic_Or_VFA both on the type and on the object.
2665         (Freeze_Entity): Adjust call to Is_Atomic_VFA_Aggregate.
2666         * exp_aggr.adb (Expand_Record_Aggregate): Likewise.
2667         (Process_Atomic_Independent_Shared_Volatile): Remove code
2668         propagating Atomic or VFA from object to locally-defined type.
2670 2015-05-26  Bob Duff  <duff@adacore.com>
2672         * exp_ch7.adb: Minor comment fix.
2674 2015-05-26  Eric Botcazou  <ebotcazou@adacore.com>
2676         * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Min/Attr_Max>: Do not
2677         bother about NaN's if Machine_Overflows is true.
2679 2015-05-26  Eric Botcazou  <ebotcazou@adacore.com>
2681         * gcc-interface/trans.c (gnat_to_gnu) <N_Object_Declaration>: Really
2682         force evaluation of the expression, if any, when the object has its
2683         elaboration delayed.  Do not create a variable at global level.
2685 2015-05-26  Eric Botcazou  <ebotcazou@adacore.com>
2687         * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Machine>: Do not apply
2688         extra-precision trick to literals.  Build SAVE_EXPR manually.
2690         * gcc-interface/misc.c (enumerate_modes): Add bypass for x86/x86-64.
2692 2015-05-26  Eric Botcazou  <ebotcazou@adacore.com>
2694         * gcc-interface/ada-tree.h (DECL_GLOBAL_NONCONSTANT_RENAMING_P): Delete
2695         (DECL_RENAMED_OBJECT): Adjust comment.
2696         * gcc-interface/gigi.h (record_global_nonconstant_renaming): Delete.
2697         (invalidate_global_nonconstant_renamings): Likewise.
2698         (gnat_constant_reference_p): Likewise.
2699         (rewrite_fn): New function type.
2700         (gnat_rewrite_reference): Declare.
2701         (call_is_atomic_load): New inline predicate.
2702         * gcc-interface/decl.c (elaborate_reference_1): New function.
2703         (elaborate_reference): Likewise.
2704         (gnat_to_gnu_entity): Call elaborate_reference to elaborate renamings
2705         and simplify associated code.  Set const_flag to true consistently in
2706         conjunction with used_by_ref.
2707         * gcc-interface/trans.c (Identifier_to_gnu): Always replace renaming
2708         pointers by renamed objects.
2709         (outer_atomic_access_required_p): Deal with renamings.
2710         (Compilation_Unit_to_gnu): Do not call
2711         invalidate_global_nonconstant_renamings.
2712         (gnat_to_gnu) <N_Object_Renaming_Declaration>: Adjust comment.
2713         (gnat_gimplify_expr): Deal with atomic loads.
2714         * gcc-interface/utils.c (global_nonconstant_renamings): Delete.
2715         (destroy_gnat_utils): Do not call
2716         invalidate_global_nonconstant_renamings.
2717         (record_global_nonconstant_renaming): Delete.
2718         (invalidate_global_nonconstant_renamings): Likewise.
2719         * gcc-interface/utils2.c (call_is_atomic_load): Move to gigi.h.
2720         (build_load_modify_store): Build a copy of the destination.
2721         (gnat_stabilize_reference_1): Adjust.
2722         (gnat_stabilize_reference): Call gnat_stabilize_reference_1 through
2723         gnat_rewrite_reference and move bulk of code to...
2724         (gnat_rewrite_reference): ...here.  New global function.
2725         (gnat_constant_reference_p): Delete.
2727 2015-05-26  Eric Botcazou  <ebotcazou@adacore.com>
2729         * gcc-interface/gigi.h (gnat_stabilize_reference): Adjust prototype.
2730         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not rely on const_flag
2731         to detect constant renamings.  Be prepared for specific pattern of
2732         renamed object based on function calls.  Create a constant object
2733         for the renaming of a NULL_EXPR or of a CONSTRUCTOR.  Adjust calls
2734         to gnat_stabilize_reference and tidy up.  Remove redundant tests.
2735         (elaborate_expression_1): Remove obsolete test and tidy up.
2736         * gcc-interface/trans.c (Call_to_gnu): Do not stabilize In/Out or Out
2737         parameters passed by reference.
2738         (gnat_to_gnu) <N_Selected_Component>: Remove redundant protection again
2739         side-effects.
2740         Use gnat_protect_expr instead of gnat_stabilize_reference for general
2741         protection against side-effects.
2742         * gcc-interface/utils2.c (gnat_stable_expr_p): New predicate.
2743         (gnat_save_expr): Invoke it.
2744         (gnat_protect_expr): Likewise.
2745         (gnat_stabilize_reference_1): Likewise.  Remove useless propagation
2746         of TREE_THIS_NOTRAP.
2747         (gnat_stabilize_reference): Remove parameter and adjust throughout.
2748         Delete ADDR_EXDR, COMPOUND_EXPR and CONSTRUCTOR cases.
2749         Restrict CALL_EXPR case to atomic loads and tweak ERROR_MARK case.
2751 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
2753         * sinfo.ads: Minor reformatting.
2754         * sem_aux.ads: Clarify use of First_Discriminant.
2755         * sem_ch4.adb (Analyze_Explicit_Dereference): The use of a limited
2756         view is replaced with the non-limited view in an instance body,
2757         where the enclosing unit must have a regular with_clause on the
2758         relevant unit.
2759         * sem_ch12.adb (Install_Body): Freeze instantation after its
2760         body. Remove useless freeze nodes for incomplete actuals to
2761         prevent multiple generation of internal operations.
2762         (Instantiate_Package_Body): Set sloc of body appropriately when
2763         there are incomplete actuals and the instance body is placed in
2764         the body of the enclosing unit.
2765         * errout.ads: Consistent punctuation, better alignment and trivial
2766         typos in comments.
2767         * err_vars.ads: Fix typo.
2769 2015-05-26  Eric Botcazou  <ebotcazou@adacore.com>
2771         * sem_ch8.adb (Analyze_Object_Renaming): Lift restriction on
2772         components of Volatile_Full_Access objects.
2774 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
2776         * sem_ch6.adb (Is_Non_Overriding_Operation,
2777         Get_Generic_Parent_Type): Handle properly the case of a derived
2778         scalar type by using the first subtype rather than its generated
2779         anonymous base type.
2781 2015-05-26  Eric Botcazou  <ebotcazou@adacore.com>
2783         * einfo.adb (Write_Field17_Name): Move E_Incomplete_Subtype
2784         case to...
2785         (Write_Field19_Name): ...here.
2787 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
2789         * sem_ch13.adb: sem_ch13.adb (Add_Predicates): Undo analysis
2790         of original expression in ASIS mode: does not solve the ASIS
2791         problem of a usable type information, and crashes the back-end
2792         when performing type annotations.
2794 2015-05-26  Robert Dewar  <dewar@adacore.com>
2796         * sem_disp.adb (Inherited_Subprograms): Add One_Only parameter.
2797         (Is_Overriding_Subprogram): Use One_Only_Parameter.
2798         * sem_disp.ads (Inherited_Subprograms): Add One_Only parameter.
2800 2015-05-26  Robert Dewar  <dewar@adacore.com>
2802         * exp_prag.adb, sem_ch3.adb, sem_ch5.adb, exp_ch11.adb, ghost.adb,
2803         exp_ch6.adb, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb, sem_ch13.adb,
2804         exp_ch3.adb: Minor reformatting.
2806 2015-05-26  Bob Duff  <duff@adacore.com>
2808         * treepr.adb: Minor improvement to debugging routines (pp, pn)
2809         robustness.  Rearrange the code so passing a nonexistent Node_Id
2810         prints "No such node" rather than crashing, and causing gdb to
2811         generate confusing messages.
2813 2015-05-26  Gary Dismukes  <dismukes@adacore.com>
2815         * sem_util.adb: Minor typo fix.
2817 2015-05-26  Yannick Moy  <moy@adacore.com>
2819         * sem_aux.adb (Subprogram_Body_Entity): Deal with subprogram stubs.
2821 2015-05-26  Hristian Kirtchev  <kirtchev@adacore.com>
2823         * exp_ch3.adb (Expand_N_Full_Type_Declaration): Capture, set and
2824         restore the Ghost mode.
2825         (Expand_N_Object_Declaration): Capture, set and restore the Ghost mode.
2826         (Freeze_Type): Update the call to Set_Ghost_Mode.
2827         (Restore_Globals): New routine.
2828         * exp_ch5.adb Add with and use clauses for Ghost.
2829         (Expand_N_Assignment_Statement): Capture, set and restore the
2830         Ghost mode.
2831         (Restore_Globals): New routine.
2832         * exp_ch6.adb Add with and use clauses for Ghost.
2833         (Expand_N_Procedure_Call_Statement): Capture, set and
2834         restore the Ghost mode.
2835         (Expand_N_Subprogram_Body):
2836         Code cleanup. Capture, set and restore the Ghost mode.
2837         (Expand_N_Subprogram_Declaration): Capture, set and restore the
2838         Ghost mode.
2839         (Restore_Globals): New routine.
2840         * exp_ch7.adb Add with and use clauses for Ghost.
2841         (Expand_N_Package_Body): Capture, set and restore the Ghost mode.
2842         (Expand_N_Package_Declaration): Capture, set and restore the
2843         Ghost mode.
2844         (Wrap_HSS_In_Block): Create a proper identifier for the block.
2845         * exp_ch8.adb Add with and use clauses for Ghost.
2846         (Expand_N_Exception_Renaming_Declaration): Code
2847         cleanup. Capture, set and restore the Ghost mode.
2848         (Expand_N_Object_Renaming_Declaration): Capture, set and restore
2849         the Ghost mode.
2850         (Expand_N_Package_Renaming_Declaration): Capture, set and restore the
2851         Ghost mode.
2852         (Expand_N_Subprogram_Renaming_Declaration): Capture, set and
2853         restore the Ghost mode.
2854         * exp_ch11.adb (Expand_N_Exception_Declaration): Code
2855         cleanup. Capture, set and restore the Ghost mode.
2856         * exp_disp.adb (Make_DT): Update the call to Set_Ghost_Mode. Do
2857         not initialize the dispatch table slot of a Ghost subprogram.
2858         * exp_prag.adb Add with and use clauses for Ghost.
2859         (Expand_Pragma_Check): Capture, set and restore the Ghost mode.
2860         (Expand_Pragma_Contract_Cases): Capture, set and restore the
2861         Ghost mode.
2862         (Expand_Pragma_Initial_Condition): Capture, set and
2863         restore the Ghost mode.
2864         (Expand_Pragma_Loop_Variant): Capture,
2865         set and restore the Ghost mode.
2866         (Restore_Globals): New routine.
2867         * exp_util.adb Add with and use clauses for Ghost.
2868         (Make_Predicate_Call): Code cleanup. Capture, set and restore
2869         the Ghost mode.
2870         (Restore_Globals): New routine.
2871         * freeze.adb (Freeze_Entity): Code cleanup. Update the call
2872         to Set_Ghost_Mode.
2873         * ghost.adb Add with and use clause for Sem_Prag.
2874         (Check_Ghost_Completion): Code cleanup.
2875         (Check_Ghost_Overriding): New routine.
2876         (Check_Ghost_Policy): Code cleanup.
2877         (Ghost_Entity): New routine.
2878         (Is_Ghost_Declaration): Removed.
2879         (Is_Ghost_Statement_Or_Pragma): Removed.
2880         (Is_OK_Context): Reimplemented.
2881         (Is_OK_Declaration): New routine.
2882         (Is_OK_Pragma): New routine.
2883         (Is_OK_Statement): New routine.
2884         (Mark_Full_View_As_Ghost): New routine.
2885         (Mark_Pragma_As_Ghost): New routine.
2886         (Mark_Renaming_As_Ghost): New routine.
2887         (Propagate_Ignored_Ghost_Code): Update the comment on usage.
2888         (Set_From_Entity): New routine.
2889         (Set_From_Policy): New routine.
2890         (Set_Ghost_Mode): This routine now handles pragmas and freeze nodes.
2891         (Set_Ghost_Mode_For_Freeze): Removed.
2892         (Set_Ghost_Mode_From_Entity): New routine.
2893         (Set_Ghost_Mode_From_Policy): Removed.
2894         * ghost.ads (Check_Ghost_Overriding): New routine.
2895         (Mark_Full_View_As_Ghost): New routine.
2896         (Mark_Pragma_As_Ghost): New routine.
2897         (Mark_Renaming_As_Ghost): New routine.
2898         (Set_Ghost_Mode): Update the parameter profile. Update the
2899         comment on usage.
2900         (Set_Ghost_Mode_For_Freeze): Removed.
2901         (Set_Ghost_Mode_From_Entity): New routine.
2902         * sem_ch3.adb (Analyze_Full_Type_Declaration):
2903         Capture and restore the Ghost mode. Mark a type
2904         as Ghost regardless of whether it comes from source.
2905         (Analyze_Incomplete_Type_Decl): Capture, set and restore the
2906         Ghost mode.
2907         (Analyze_Number_Declaration): Capture and restore the Ghost mode.
2908         (Analyze_Object_Declaration): Capture and restore the Ghost mode.
2909         (Analyze_Private_Extension_Declaration): Capture and
2910         restore the Ghost mode.
2911         (Analyze_Subtype_Declaration): Capture and restore the Ghost mode.
2912         (Process_Full_View): The full view inherits all Ghost-related
2913         attributes from the private view.
2914         (Restore_Globals): New routine.
2915         * sem_ch5.adb (Analyze_Assignment): Capture and restore the
2916         Ghost mode.
2917         (Restore_Globals): New routine.
2918         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration):
2919         Code cleanup. Capture and restore the Ghost mode. Mark a
2920         subprogram as Ghost regarless of whether it comes from source.
2921         (Analyze_Procedure_Call): Capture and restore the Ghost mode.
2922         (Analyze_Subprogram_Body_Helper): Capture and restore the Ghost mode.
2923         (Analyze_Subprogram_Declaration): Capture and restore the Ghost mode.
2924         (New_Overloaded_Entity): Ensure that a
2925         parent subprogram and an overriding subprogram have compatible
2926         Ghost policies.
2927         * sem_ch7.adb (Analyze_Package_Body_Helper): Capture and restore
2928         the Ghost mode.
2929         (Analyze_Package_Declaration): Capture and
2930         restore the Ghost mode. Mark a package as Ghost when it is
2931         declared in a Ghost region.
2932         (Analyze_Private_Type_Declaration): Capture and restore the Ghost mode.
2933         (Restore_Globals): New routine.
2934         * sem_ch8.adb (Analyze_Exception_Renaming): Code
2935         reformatting. Capture and restore the Ghost mode. A renaming
2936         becomes Ghost when its name references a Ghost entity.
2937         (Analyze_Generic_Renaming): Capture and restore the Ghost mode. A
2938         renaming becomes Ghost when its name references a Ghost entity.
2939         (Analyze_Object_Renaming): Capture and restore the Ghost mode. A
2940         renaming becomes Ghost when its name references a Ghost entity.
2941         (Analyze_Package_Renaming): Capture and restore the Ghost mode. A
2942         renaming becomes Ghost when its name references a Ghost entity.
2943         (Analyze_Subprogram_Renaming): Capture and restore the Ghost
2944         mode. A renaming becomes Ghost when its name references a
2945         Ghost entity.
2946         * sem_ch11.adb (Analyze_Exception_Declaration): Capture, set
2947         and restore the Ghost mode.
2948         * sem_ch12.adb (Analyze_Generic_Package_Declaration): Capture and
2949         restore the Ghost mode.
2950         (Analyze_Generic_Subprogram_Declaration):
2951         Capture and restore the Ghost mode.
2952         * sem_ch13.adb Add with and use clauses for Ghost.
2953         (Add_Invariant): New routine.
2954         (Add_Invariants): Factor out code.
2955         (Add_Predicate): New routine.
2956         (Add_Predicates): Factor out code.
2957         (Build_Invariant_Procedure_Declaration): Code cleanup. Capture,
2958         set and restore the Ghost mode.
2959         (Build_Invariant_Procedure): Code cleanup.
2960         (Build_Predicate_Functions): Capture, set and
2961         restore the Ghost mode. Mark the generated functions as Ghost.
2962         * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
2963         Capture, set and restore the Ghost mode.
2964         (Analyze_External_Property_In_Decl_Part): Capture, set and restore
2965         the Ghost mode.
2966         (Analyze_Initial_Condition_In_Decl_Part):
2967         Capture, set and restore the Ghost mode.
2968         (Analyze_Pragma):
2969         Code cleanup. Capture, set and restore the Ghost mode. Flag
2970         pragmas Linker_Section, No_Return, Unmodified, Unreferenced and
2971         Unreferenced_Objects as illegal when it applies to both Ghost
2972         and living arguments. Pragma Ghost cannot apply to synchronized
2973         objects.
2974         (Check_Kind): Moved to the spec of Sem_Prag.
2975         (Process_Inline): Flag the pragma as illegal when it applies to
2976         both Ghost and living arguments.
2977         (Restore_Globals): New routine.
2978         * sem_prag.ads Add pragma Default_Initial_Condition
2979         to table Assertion_Expression_Pragma. Add new table
2980         Is_Aspect_Specifying_Pragma.
2981         (Check_Kind): Moved from body of Sem_Prag.
2982         * sem_util.adb Add with and use clauses for Ghost.
2983         (Build_Default_Init_Cond_Procedure_Body): Capture, set and restore
2984         the Ghost mode.
2985         (Build_Default_Init_Cond_Procedure_Declaration):
2986         Capture, set and restore the Ghost mode. Mark the default
2987         initial condition procedure as Ghost when it is declared
2988         in a Ghost region.
2989         (Is_Renaming_Declaration): New routine.
2990         (Policy_In_List): Account for the single argument version of
2991         Check_Pragma.
2992         * sem_util.ads (Is_Renaming_Declaration): New routine.
2993         * sinfo.adb (Is_Ghost_Pragma): New routine.
2994         (Set_Is_Ghost_Pragma): New routine.
2995         * sinfo.ads New attribute Is_Ghost_Pragma.
2996         (Is_Ghost_Pragma): New routine along with pragma Inline.
2997         (Set_Is_Ghost_Pragma): New routine along with pragma Inline.
2999 2015-05-26  Robert Dewar  <dewar@adacore.com>
3001         * sem_ch3.adb, sem_aux.adb, sem_aux.ads, exp_ch6.adb, sprint.adb:
3002         Minor reformatting.
3004 2015-05-26  Gary Dismukes  <dismukes@adacore.com>
3006         * gnat1drv.adb, targparm.adb, targparm.ads, restrict.adb: Minor
3007         reformatting and typo fixes in comments.
3009 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
3011         * sem_ch7.adb (Swap_Private_Dependets): Set visibility of
3012         the two views of a private dependent in two separate steps,
3013         to ensure proper visibility in parent units analyzed for inlining.
3015 2015-05-26  Yannick Moy  <moy@adacore.com>
3017         * sem_aux.adb, sem_aux.ads (Get_Low_Bound): Use Type_Low_Bound.
3018         (Package_Body, Package_Spec): New queries moved
3019         here from GNATprove.
3020         (Package_Specification): Simplify query to remove use of loop.
3021         * sem_util.adb, sem_util.ads (Enclosing_Declaration,
3022         Enclosing_Package_Or_Subprogram, Is_Attribute_Update): New
3023         queries moved here from GNATprove.
3025 2015-05-26  Bob Duff  <duff@adacore.com>
3027         * einfo.adb, einfo.ads, sprint.adb, lib-xref.ads: Minor cleanup: Remove
3028         obsolete Entity_Kinds E_String_Type and E_String_Subtype. Update
3029         redundant assertions.
3031 2015-05-26  Gary Dismukes  <dismukes@adacore.com>
3033         * sem_util.adb, sem_util.ads, sem_ch13.adb: Minor typo fixes.
3035 2015-05-26  Doug Rupp  <rupp@adacore.com>
3037         * init.c [vxworks]: Refine previous checkin.
3039 2015-05-26  Robert Dewar  <dewar@adacore.com>
3041         * exp_ch4.adb (Wrap_MA): New function.
3042         (Expand_N_Op_Expon): Use Wrap_MA.
3044 2015-05-26  Bob Duff  <duff@adacore.com>
3046         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
3047         Do not use secondary stack to return limited records with
3048         defaulted discriminants. This is an efficiency improvement.
3049         * exp_ch6.adb, exp_dist.adb, sem_attr.adb, sem_aux.adb, sem_aux.ads,
3050         sem_ch12.adb, sem_ch3.adb, sem_ch4.adb, sem_ch6.adb, sem_ch7.adb,
3051         sem_util.adb: Change the sense of Is_Indefinite_Subtype to be
3052         Is_Definite_Subtype. This is an improvement to readability (the double
3053         negative in "not Is_Indefinite_Subtype" was slightly confusing). Also
3054         disallow passing non-[sub]type entities, an unnecessary and slightly
3055         bug-prone flexibility.
3057 2015-05-26  Robert Dewar  <dewar@adacore.com>
3059         * sem_aggr.adb (Resolve_Array_Aggregate): Defend against
3060         bad bounds.
3061         * debug.adb: Document -gnatd.k.
3062         * erroutc.adb (Set_Msg_Insertion_Line_Number): Implement -gnatd.k.
3064 2015-05-26  Robert Dewar  <dewar@adacore.com>
3066         * gnat1drv.adb (Gnat1drv): Provide new arguments for
3067         Get_Target_Parameters.
3068         * restrict.adb (Set_Restriction_No_Specification_Of_Aspect):
3069         new procedure.
3070         (Set_Restriction_No_Use_Of_Attribute): new procedure.
3071         * restrict.ads (Set_Restriction_No_Specification_Of_Aspect):
3072         new procedure.
3073         (Set_Restriction_No_Use_Of_Attribute): new procedure.
3074         * s-rident.ads (Integer_Parameter_Restrictions): New subtype.
3075         * targparm.adb (Get_Target_Parameters): Allow new restriction
3076         pragmas No_Specification_Of_Aspect No_Use_Of_Attribute
3077         No_Use_Of_Pragma.
3078         * targparm.ads: New parameters for Get_Target_Parameters.
3079         * tbuild.adb (Set_NOD): New name for Set_RND.
3080         (Set_NSA): New procedure.
3081         (Set_NUA): New procedure.
3082         (Set_NUP): New procedure.
3083         * tbuild.ads (Make_SC): Minor reformatting.
3084         (Set_NOD): New name for Set_RND.
3085         (Set_NSA, Set_NUA, Set_NUP): New procedure.
3087 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
3089         * a-stwise.adb (Find_Token): If source'first is not positive,
3090         an exception must be raised, as specified by RM 2005 A.4.3
3091         (68/1). This must be checked explicitly, given that run-time
3092         files are normally compiled without constraint checks.
3093         * a-stzsea.adb (Find_Token): Ditto.
3095 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
3097         * sem_util.ads sem_util.adb (Is_Current_Instance):  New predicate
3098         to fully implement RM 8.6 (17/3). which earlier only applied
3099         to synchronized types. Used to preanalyze aspects that include
3100         current instances of types, such as Predicate and Invariant.
3101         * sem_res.adb (Resolve_Entity_Name): Use Is_Current_Instance.
3102         * sem_ch13.adb (Add_Predicates): In ASIS mode, preserve original
3103         expression of aspect and analyze it to provide proper type
3104         information.
3106 2015-05-26  Robert Dewar  <dewar@adacore.com>
3108         * rtsfind.ads: Add entries for RE_Exn[_Long]_Float.
3109         * s-exnllf.adb (Exn_Float): New function.
3110         (Exn_Long_Float): New function.
3111         (Exn_Long_Long_Float): Rewritten interface.
3112         (Exp): New name for what used to be Exn_Long_Long_Float.
3113         * s-exnllf.ads (Exn_Float): New function.
3114         (Exn_Long_Float): New function.
3116 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
3118         * sem_ch8.adb (Find_Selected_Component): Do not emit an error
3119         on a selected component when the prefix is a type name that is
3120         a Current_Instance.
3121         * einfo.ads: Minor grammar fix.
3123 2015-05-26  Doug Rupp  <rupp@adacore.com>
3125         * init.c [vxworks] (sysLib.h): Only for x86.
3127 2015-05-26  Doug Rupp  <rupp@adacore.com>
3129         * init-vxsim.c (CPU): define as __VXSIM_CPU__
3130         * sigtramp-vxworks-vxsim.c (CPU): Likewise.
3131         sigtramp-vxworks-target.inc: Add check for SIMLINUX.
3132         * sigtramp.h: Likewise.
3134 2015-05-26  Robert Dewar  <dewar@adacore.com>
3136         * sem_aux.adb, sem_disp.adb, sem_util.ads: Add comment.
3137         * sem_util.adb: Minor reformatting
3139 2015-05-26  Yannick Moy  <moy@adacore.com>
3141         * inline.adb (Has_Initialized_Type): Adapt to new names.
3142         * sem_aux.adb, sem_aux.ads (Get_Low_Bound, Number_Components,
3143         Subprogram_Body, Subprogram_Body_Entity, Subprogram_Spec,
3144         Subprogram_Specification): New query functions used in GNATprove.
3145         * sem_disp.adb, sem_disp.ads (Is_Overriding_Subprogram): New
3146         query functions used in GNATprove.
3147         * sem_util.adb, sem_util.adso (Enclosing_Lib_Unit_Node,
3148         Get_Cursor_Type, Get_Return_Object, Get_User_Defined_Eq,
3149         Is_Double_Precision_Floating_Point_Type,
3150         Is_Single_Precision_Floating_Point_Type): New query functions
3151         used in GNATprove.
3153 2015-05-26  Bob Duff  <duff@adacore.com>
3155         * s-rpc.ads (Partition_ID): Increase maximum Partition_ID to
3156         some huge number.
3157         * a-except-2005.adb, a-except-2005.ads, a-except.adb,
3158         a-except.ads, a-exexda.adb, a-exstat.adb: Minor comment fixes.
3160 2015-05-26  Robert Dewar  <dewar@adacore.com>
3162         * sinfo.adb: Minor comment addition.
3163         * einfo.adb: Minor whitespace and punctuation fix.
3164         * sem_util.adb: Minor editing of comments.
3166 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
3168         * sem_ch7.adb (Install_Private_Declarations,
3169         Swap_Private_Dependents): Ensure that both views of the dependent
3170         subtype are immediately visible if we are within their scope. This
3171         may be needed when a procedure body is both the parent of an
3172         instantiated child unit, and is itself used to inline a local
3173         function.
3175 2015-05-26  Gary Dismukes  <dismukes@adacore.com>
3177         * exp_prag.adb, gnat1drv.adb: Minor reformatting.
3179 2015-05-26  Eric Botcazou  <ebotcazou@adacore.com>
3181         * exp_ch4.adb (Expand_N_Indexed_Component): In the circuit
3182         detecting exceptions to the rewriting, deal with implicit
3183         dereferences in the selected component case.
3185 2015-05-26  Bob Duff  <duff@adacore.com>
3187         * sem_ch13.adb (Analyze_One_Aspect): Do not
3188         require the expression of the Disable_Controlled aspect to be
3189         static in a generic template, because 'Enabled is not known
3190         until the instance.
3192 2015-05-26  Doug Rupp  <rupp@adacore.com>
3194         * init-vxsim.c: New file for vxsim ZCX
3195         * sigtramp-vxworks-vxsim.c: Likewise.
3196         * sigtramp-vxworks.c: Factor out target dependent bits into ...
3197         * sigtramp-vxworks-target.inc: ... here.
3198         * sigtramp.h: Add vxsim zcx protos.
3199         * init.c [vxworks...] (sysLib.h): Include.
3200         (__gnat_map_signal): Make global.
3201          [...i386] (__gnat_error_handler): Call __gnat_vxsim_error_handler if
3202         on vxsim.
3203         [...i386] (__gnat_install_handler): Test if on vxsim.
3205 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
3207         * sem_ch5.adb (Analyze_Iterator_Specification): For an element
3208         iterator over an array, if the component is aliased, the loop
3209         variable is aliased as well.
3211 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
3213         * exp_ch6.adb (Expand_Actuals): For a function call with in-out
3214         parameters that is rewritten as an expression_with_actions,
3215         we preserve the original function call node for further use by
3216         the caller (typically Expand_Call). In the presence of validity
3217         checks, that function call, though it is labelled Analyzed to
3218         prevent an infinite recursion, may be rewritten as a temporary
3219         by Remove_Side_Effects.  Ensure that the caller has access to
3220         the original function call to continue expansion.
3221         * atree.ads: Minor typo in comment.
3223 2015-05-26  Javier Miranda  <miranda@adacore.com>
3225         * sem_util.adb (Check_Function_Writable_Actuals):
3226         Add missing support to check the violation of writable actuals
3227         in array aggregates that have a nonstatic range.
3229 2015-05-26  Hristian Kirtchev  <kirtchev@adacore.com>
3231         * exp_ch6.adb (Process_Contract_Cases_For): Update the call to
3232         Expand_Pragma_Contract_Cases.
3233         * exp_prag.ads, exp_prag.adb (Expand_Contract_Cases): Rename to
3234         Expand_Pragma_Contract_Cases.
3235         * sem_ch13.adb (Add_Invariants): Use the original aspect name
3236         when creating the arguments of pragma Check. This ensures that
3237         'Class is properly recognized and handled.
3239 2015-05-26  Arnaud Charlet  <charlet@adacore.com>
3241         * gnat1drv.adb: Minor adjustments.
3242         (Adjust_Global_Switches): Disable some related flags in CodePeer mode.
3243         * sem_ch4.adb (Has_Arbitrary_Evaluation_Order,
3244         Stop_Subtree_Climbind): Code cleanup.
3245         * einfo.ads: Minor comment change.
3247 2015-05-26  Javier Miranda  <miranda@adacore.com>
3249         * sem_aggr.adb (Resolve_Aggregate, Resolve_Extension_Aggregate):
3250         Code cleanup.
3251         * sem_ch3.adb (Build_Derived_Record_Type,
3252         Record_Type_Declaration): Code cleanup.
3253         * sem_ch4.adb (Has_Arbitrary_Evaluation_Order,
3254         Stop_Subtree_Climbind): Tables which speed up the identification
3255         of dangerous calls to Ada 2012 functions with writable actuals
3256         (AI05-0144).
3257         (Analyze_Arithmetic_Op, Analyze_Call, Analyze_Comparison_Op,
3258         Analyze_Equality_Op, Analyze_Logical_Op, Analyze_Membership_Op,
3259         Analyze_Range): Code cleanup.
3260         (Is_Arbitrary_Evaluation_Order_Construct): Removed.
3261         (Check_Writable_Actuals): Code cleanup using the added tables.
3262         * sem_util.adb (Check_Function_Writable_Actuals): Return
3263         immediately if the node does not have the flag Check_Actuals
3264         set to True.
3266 2015-05-26  Eric Botcazou  <ebotcazou@adacore.com>
3268         * exp_ch6.adb (Add_Call_By_Copy_Code): Remove restrictive
3269         condition in the detection of the effects of Remove_Side_Effects.
3270         * exp_util.ads (Remove_Side_Effects): Add general and historical note.
3271         * exp_util.adb (Is_Name_Reference): New predicate.
3272         (Remove_Side_Effects): Use it in lieu of Is_Object_Reference
3273         in order to decide whether to use the renaming to capture the
3274         side effects of the subexpression.
3275         (Side_Effect_Free): Remove obsolete test.
3277 2015-05-26  Robert Dewar  <dewar@adacore.com>
3279         * aspects.ads, aspects.adb: Add aspect Disable_Controlled.
3280         * einfo.ads, einfo.adb (Disable_Controlled): New flag.
3281         (Is_Controlled_Active): New function.
3282         * exp_ch3.adb (Expand_Freeze_Record_Type): Use
3283         Is_Controlled_Active.
3284         * exp_util.adb (Needs_Finalization): Finalization not needed
3285         if Disable_Controlled set.
3286         * freeze.adb (Freeze_Array_Type): Do not set
3287         Has_Controlled_Component if the component has Disable_Controlled.
3288         (Freeze_Record_Type): ditto.
3289         * sem_ch13.adb (Decorate): Minor reformatting.
3290         (Analyze_Aspect_Specifications): Implement Disable_Controlled.
3291         * sem_ch3.adb (Analyze_Object_Declaration): Handle
3292         Disable_Controlled.
3293         (Array_Type_Declaration): ditto.
3294         (Build_Derived_Private_Type): ditto.
3295         (Build_Derived_Type): ditto.
3296         (Record_Type_Definition): ditto.
3297         * snames.ads-tmpl: Add Name_Disable_Controlled.
3299 2015-05-26  Eric Botcazou  <ebotcazou@adacore.com>
3301         * exp_ch6.adb (Expand_Actuals): Use a constant declaration instead
3302         of a renaming to capture the return value of a function call.
3303         (Expand_Simple_Function_Return): Call Remove_Side_Effects
3304         instead of removing side effects manually before the call to
3305         _Postconditions.
3307 2015-05-26  Robert Dewar  <dewar@adacore.com>
3309         * exp_ch4.adb (Expand_N_Op_Expon): Deal with problem of wrong
3310         order in calling Duplicate_Subexpr.
3311         * einfo.ads: Fix documentation of Object/Value size for scalar types.
3313 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
3315         * exp_aggr.adb (Build_Array_Aggr_Code, Gen_Assign):
3316         If a component is default-initialized and its type has an
3317         invariant procedure, insert an invariant test after code for
3318         default-initialization of the component.
3320 2015-05-26  Gary Dismukes  <dismukes@adacore.com>
3322         * einfo.ads, sem_util.adb, sem_ch4.adb: Minor reformatting.
3324 2015-05-26  Robert Dewar  <dewar@adacore.com>
3326         * exp_unst.adb, exp_unst.ads: Change to using Subps table index for
3327         making AREC entity names unique.
3329 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
3331         * sem_cat.adb (Has_Stream_Attribute_Definition): If the type
3332         has aspect specifications, examine the corresponding list of
3333         representation items to determine whether there is a visible
3334         stream operation. The attribute definition clause generated from
3335         the aspect will be inserted at the freeze point of the type,
3336         which may be in the private part and not directly visible,
3337         but the aspect makes the operation available to a client.
3339 2015-05-26  Robert Dewar  <dewar@adacore.com>
3341         * sem_util.adb: Minor code reorganization.
3342         * sem_ch6.adb: Minor reformatting.
3344 2015-05-25  Eric Botcazou  <ebotcazou@adacore.com>
3346         * gcc-interface/utils.c (maybe_pad_type): Do not apply adjustment to
3347         original size for elementary types before issuing the size warning.
3349 2015-05-25  Eric Botcazou  <ebotcazou@adacore.com>
3351         * get_targ.adb (C_Get_Float_Words_BE): Adjust import name.
3352         (C_Get_Words_BE): Likewise.
3353         (C_Get_Bytes_BE): Likewise.
3354         (C_Get_Bits_BE): Likewise.
3355         (Width_From_Size): Remove superfluous space.
3356         * gcc-interface/targtyps.c (get_float_words_be): Rename into...
3357         (get_target_float_words_be): ...this.
3358         (get_words_be): Rename into...
3359         (get_target_words_be): ...this.
3360         (get_bytes_be): Rename into...
3361         (get_target_bytes_be): ...this.
3362         (get_bits_be): Rename into...
3363         (get_target_bits_be): ...this.
3364         * gcc-interface/gigi.h (standard_datatypes): Remove ADT_ptr_void_type.
3365         (ptr_void_type_node): Delete.
3366         (get_target_float_size): Likewise.
3367         (get_target_double_size): Likewise.
3368         (get_target_long_double_size): Likewise.
3369         (get_float_words_be): Likewise.
3370         (get_words_be): Likewise.
3371         (get_bytes_be): Likewise.
3372         (get_bits_be): Likewise.
3373         (get_target_float_words_be): Declare.
3374         (get_target_words_be): Likewise.
3375         (get_target_bytes_be): Likewise.
3376         (get_target_bits_be): Likewise.
3377         * gcc-interface/decl.c (gnat_to_gnu_entity): Replace ptr_void_type_node
3378         with ptr_type_node.
3379         (intrin_return_compatible_p): Likewise.
3380         * gcc-interface/trans.c (gigi): Likewise.
3381         * gcc-interface/utils2.c (maybe_wrap_malloc): Likewise.
3382         (maybe_wrap_free): Likewise.
3383         * gcc-interface/utils.c (maybe_pad_type): Remove superfluous space.
3384         * gcc-interface/misc.c (gnat_init): Do not set ptr_void_type_node.
3386 2015-05-25  Eric Botcazou  <ebotcazou@adacore.com>
3388         * gcc-interface/decl.c (elaborate_expression): Take a const string
3389         suffix instead of a tree.
3390         (elaborate_expression_1): Likewise.
3391         (elaborate_expression_2): Likewise.
3392         (gnat_to_gnu_entity): Adjust to above changes.
3393         (build_subst_list): Likewise.
3394         (get_entity_char): New static function.
3396 2015-05-25  Eric Botcazou  <ebotcazou@adacore.com>
3398         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: Move around.
3399         <E_Exception>: Merge with E_Variable case.
3400         <E_Variable>: Remove 'object' label.
3402 2015-05-25  Eric Botcazou  <ebotcazou@adacore.com>
3404         * gcc-interface/decl.c (gnat_to_gnu_entity): Minor tweak.
3405         * gcc-interface/trans.c (finalize_nrv_unc_r): Use CONSTRUCTOR_ELT.
3406         * gcc-interface/utils.c (convert): Likewise and simplify.
3407         (remove_conversions): Likewise.
3408         * gcc-interface/utils2.c (compare_fat_pointers): Likewise.
3409         (build_unary_op): Likewise and simplify.
3411 2015-05-25  Eric Botcazou  <ebotcazou@adacore.com>
3413         * gcc-interface/gigi.h (build_atomic_load): Adjust prototype.
3414         (build_atomic_store): Likewise.
3415         (build_load_modify_store): Declare.
3416         (VECTOR_TYPE_P): Delete.
3417         * gcc-interface/decl.c (gnat_to_gnu_entity): Replace Is_Atomic with
3418         Is_Atomic_Or_VFA throughout.
3419         <E_Array_Type>: Build a variant of the XUA type instead of forcing
3420         TYPE_VOLATILE on it.
3421         <E_Array_Subtype>: Use the main variant of the base type.
3422         Do not force TYPE_VOLATILE on the type being built.
3423         <E_Record_Type>: Likewise.
3424         <E_Array_Subtype>: Likewise.
3425         <E_Subprogram_Type>: Rename local variable.
3426         Add Atomic qualifier in conjunction with Volatile on types if needed.
3427         Force BLKmode for by-ref types only at the end of the processing.
3428         Change qualifiers only after changing the mode of the type.  Set
3429         TYPE_UNIVERSAL_ALIASING_P on the type directly.
3430         (check_ok_for_atomic_type): Issue specific error message for VFA.
3431         (gnat_to_gnu_component_type): Replace Is_Atomic with
3432         Is_Atomic_Or_VFA throughout.
3433         * gcc-interface/misc.c (gnat_get_alias_set): Test
3434         TYPE_UNIVERSAL_ALIASING_P on the type directly.
3435         * gcc-interface/trans.c (lvalue_required_p): Replace Is_Atomic with
3436         Is_Atomic_Or_VFA throughout.  Add missing guard.
3437         (node_is_atomic): New predicate.
3438         (node_has_volatile_full_access): Likewise.
3439         (gnat_strip_type_conversion): New function.
3440         (outer_atomic_access_required_p): New predicate.
3441         (atomic_sync_required_p): Rename into...
3442         (atomic_access_required_p): ...this.  Add SYNC parameter, scan the
3443         parent node first and then look for the atomic setting.  Add support
3444         for Volatile_Full_Access.
3445         (Call_to_gnu): Add atomic_access and outer_atomic_access parameters
3446         and adjusts calls to above functions.  Use load-modify-store sequence
3447         for updates of In/Out and Out parameters if required, as well as for
3448         moving the result to the target if required.  Add couple of missing
3449         guards.
3450         (gnat_to_gnu): Adjust calls to above functions.
3451         <N_Object_Renaming_Declaration>: If the renamed object has side-effects
3452         evaluate only its address.
3453         <N_Assignment_Statement>: Adjust call to Call_to_gnu.  Use load-modify
3454         store sequence if required.
3455         <N_Function_Call>: Adjust call to Call_to_gnu.
3456         (extract_values): Adjust comment.
3457         * gcc-interface/utils2.c (build_atomic_load): Add SYNC parameter and
3458         use relaxed memory model if it is not set.
3459         (build_atomic_store): Likewise.
3460         (call_is_atomic_load): New predicate.
3461         (build_load_modify_store): New function.
3462         (build_binary_op) <MODIFY_EXPR>: Accept SAVE_EXPR on the LHS.
3463         (gnat_stabilize_reference) <CALL_EXPR>: Deal with atomic loads.
3465 2015-05-25  Eric Botcazou  <ebotcazou@adacore.com>
3467         * gcc-interface/ada-tree.h (DECL_RENAMING_GLOBAL_P): Rename into...
3468         (DECL_GLOBAL_NONCONSTANT_RENAMING_P): ...this.
3469         * gcc-interface/gigi.h (record_global_renaming_pointer): Delete.
3470         (invalidate_global_renaming_pointers): Likewise.
3471         (record_global_nonconstant_renaming): New.
3472         (invalidate_global_nonconstant_renamings): Likewise.
3473         (get_inner_constant_reference): Likewise.
3474         (gnat_constant_reference_p): Likewise.
3475         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Adjust to above
3476         and register the renaming pointer only if the object is non-constant.
3477         (elaborate_expression_1): Call get_inner_constant_reference instead
3478         of get_inner_reference.
3479         * gcc-interface/trans.c (fold_constant_decl_in_expr): Minor tweak.
3480         (Identifier_to_gnu): Adjust to above and do not recheck the renamed
3481         object before substituting it.
3482         (Compilation_Unit_to_gnu): Adjust to above renaming.  Minor tweaks.
3483         (gnat_to_gnu) <N_Object_Renaming_Declaration>: Do not return the
3484         result at the global level.
3485         (N_Exception_Renaming_Declaration): Likewise.
3486         * gcc-interface/utils.c (global_renaming_pointers): Rename into...
3487         (global_nonconstant_renamings): ...this.
3488         (destroy_gnat_utils): Adjust to above renaming.
3489         (record_global_renaming_pointer): Rename into...
3490         (record_global_nonconstant_renaming): ...this.
3491         (invalidate_global_renaming_pointers): Rename into...
3492         (invalidate_global_nonconstant_renamings): ...this and do not recheck
3493         the renamed object before invalidating.
3494         * gcc-interface/utils2.c (gnat_stabilize_reference): Minor tweak.
3495         (get_inner_constant_reference): New public function.
3496         (gnat_constant_reference_p): New predicate.
3498 2015-05-25  Javier Miranda  <miranda@adacore.com>
3500         * einfo.ads, einfo.adb (Has_Out_Or_In_Out_Parameter): This attribute
3501         is now present in subprograms, generic subprograms, entries and
3502         entry families.
3503         * sem_ch6.adb (Set_Formal_Mode): Set As_Out_Or_In_Out_Parameter
3504         on entries, entry families, subprograms and generic subprograms.
3505         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration):
3506         Minor code reorganization to ensure that the Ekind attribute
3507         of the subprogram entity is set before its formals are
3508         processed. Required to allow the use of the attribute
3509         Has_Out_Or_In_Out_Parameter on the subprogram entity.
3510         * sem_aggr.adb (Resolve_Aggregate, Resolve_Extension_Aggregate):
3511         Perform the check on writable actuals only if the value of some
3512         component of the aggregate involves calling a function with
3513         out-mode parameters.
3514         (Resolve_Record_Aggregate): Propagate the Check_Actuals flag to the
3515         internally built aggregate.
3516         * sem_ch3.adb (Build_Derived_Record_Type, Record_Type_Declaration):
3517         Perform the check on writable actuals only if the initialization of
3518         some component involves calling a function with out-mode parameters.
3519         * sem_ch4.adb (Analyze_Arithmetic_Op, Analyze_Comparison_Op,
3520         Analyze_Equality_Op, Analyze_Logical_Op, Analyze_Membership_Op,
3521         Analyze_Range): Check writable actuals only if the
3522         subtrees have a call to a function with out-mode parameters
3523         (Analyze_Call.Check_Writable_Actuals): New subprogram. If the call
3524         has out or in-out parameters then mark its outermost enclosing
3525         construct as a node on which the writable actuals check must
3526         be performed.
3527         (Analyze_Call): Check if the flag must be set and if the outermost
3528         enclosing construct.
3529         * sem_util.adb (Check_Function_Writable_Actuals): Code cleanup
3530         and reorganization. We skip processing aggregate discriminants
3531         since their precise analysis involves two phases traversal.
3532         * sem_res.adb (Resolve_Actuals, Resolve_Arithmetic_Op,
3533         Resolve_Logical_Op, Resolve_Membership_Op): Remove call to
3534         check_writable_actuals.
3536 2015-05-22  Ed Schonberg  <schonberg@adacore.com>
3538         * sem_ch3.adb (Constrain_Concurrent): If the context is a
3539         type declaration, generate an Itype_Reference for the anonymous
3540         subtype, to force elaboration at this point in gigi.
3542 2015-05-22  Gary Dismukes  <dismukes@adacore.com>
3544         * layout.adb, einfo.ads, sem_ch12.adb, freeze.adb, sem_util.ads,
3545         exp_ch4.adb, sem_ch6.adb: Minor reformatting and typo fixes.
3547 2015-05-22  Ed Schonberg  <schonberg@adacore.com>
3549         * sem_res.adb (Resolve_Actuals): If the call is to an overridden
3550         operation, replace the names of the actuals in named associations
3551         with the names of the actuals of the subprogram that is eventually
3552         executed. The names of the formals and the defaults can differ
3553         between the two operations when they are operations of a formal
3554         derived type.
3556 2015-05-22  Bob Duff  <duff@adacore.com>
3558         * a-convec.ads, a-convec.adb (Append): Check for fast path. Split
3559         out slow path into separate procedure. Inline Append. Fast path
3560         now avoids calling Insert.
3561         (Finalize): Do the busy checking last, so the container gets emptied.
3562         (Insert, Insert_Space): Remove redundancy.
3564 2015-05-22  Robert Dewar  <dewar@adacore.com>
3566         * switch-c.adb (Scan_Front_End_Switches): Insist on -gnatc
3567         for -gnatd.V.
3569 2015-05-22  Arnaud Charlet  <charlet@adacore.com>
3571         * gnatvsn.ads: Minor code reorg to remember more easily to update
3572         variables.
3574 2015-05-22  Ed Schonberg  <schonberg@adacore.com>
3576         * sem_ch10.adb (Analyze_With_Clause): In ASIS_Mode, a
3577         limited_with clause on a predefined unit is not transformed into
3578         a regular with_clause, to preserve the original tree structure.
3579         * sinfo.ads (N_With_Clause): Add comment on handling of
3580         Limited_With.
3581         * sem_ch10.adb: Minor reformatting.
3583 2015-05-22  Ed Schonberg  <schonberg@adacore.com>
3585         * sem_ch8.adb (Freeze_Profile): A limited view of a type in
3586         the profile of a subprogram renaming does not require freezing,
3587         because it is declared in a different unit.
3589 2015-05-22  Ed Schonberg  <schonberg@adacore.com>
3591         * exp_aggr.adb (Get_Constraint_Association): If type (of ancestor
3592         composite type) is private, go to full view. This was previously
3593         done only in an instance context, but is happen whenever a chain
3594         of private extensions includes one inherited discriminant.
3596 2015-05-22  Robert Dewar  <dewar@adacore.com>
3598         * einfo.ads: Minor comment updates.
3599         * exp_unst.adb: Move Subps table to spec Don't remove old entries
3600         from table Add Last field to record last entry used.
3601         * exp_unst.ads: Move Subps table here from body So that Cprint
3602         can access saved values.
3604 2015-05-22  Bob Duff  <duff@adacore.com>
3606         * a-cdlili.adb, a-cdlili.ads, a-cohama.adb, a-cohama.ads,
3607         * a-cohase.adb, a-cohase.ads, a-convec.adb, a-convec.ads,
3608         * a-coorma.adb, a-coorma.ads, a-coorse.adb, a-coorse.ads:
3609         (Pseudo_Reference, Element_Access, Get_Element_Access): New
3610         declarations added for use by performance improvements in exp_ch5.adb.
3611         * snames.ads-tmpl: New names referenced by exp_ch5.adb.
3612         * exp_ch5.adb: Speed up "for ... of" loops for predefined containers.
3613         Instead of doing literally what the RM calls for, we do something
3614         equivalent that avoids expensive operations inside the loop. If the
3615         container package has appropriate Next, Pseudo_Reference,
3616         Element_Access, Get_Element_Access declarations, we invoke the
3617         optimization.
3618         * snames.ads-tmpl: Note speed improvement.
3620 2015-05-22  Eric Botcazou  <ebotcazou@adacore.com>
3622         * einfo.ads (Is_Atomic_Or_VFA): Move to XEINFO INLINES section.
3623         * xeinfo.adb: Replace a-einfo.h with einfo.h throughout.
3624         Add pattern to translate "or else" into "||".
3626 2015-05-22  Eric Botcazou  <ebotcazou@adacore.com>
3628         * einfo.ads (Has_Volatile_Full_Access): Rename into...
3629         (Is_Volatile_Full_Access): ...this.
3630         (Set_Has_Volatile_Full_Access): Rename into...
3631         (Set_Is_Volatile_Full_Access): ...this.
3632         * einfo.adb (Has_Volatile_Full_Access): Rename into...
3633         (Is_Volatile_Full_Access): ...this.
3634         (Set_Has_Volatile_Full_Access): Rename into...
3635         (Set_Is_Volatile_Full_Access): ...this.
3636         (Is_Atomic_Or_VFA): Adjust to above renaming.
3637         * errout.adb (Special_Msg_Delete): Likewise.
3638         * exp_pakd.adb (Install_PAT): Likewise.
3639         * freeze.adb (Freeze_Array_Type): Likewise.
3640         * sem_ch8.adb (Analyze_Object_Renaming): Likewise.
3641         * sem_ch13.adb (Inherit_Delayed_Rep_Aspects): Likewise.
3642         (Inherit_Aspects_At_Freeze_Point): Likewise.
3643         * sem_prag.adb (Set_Atomic_VFA): Likewise.
3644         (Process_Atomic_Independent_Shared_Volatile): Likewise.
3645         * sem_util.adb (Is_Atomic_Or_VFA_Object): Likewise.
3647 2015-05-22  Robert Dewar  <dewar@adacore.com>
3649         * exp_ch5.adb, layout.adb, einfo.adb, einfo.ads, sem_prag.adb,
3650         freeze.adb, freeze.ads, sem_util.adb, sem_util.ads, exp_ch2.adb,
3651         exp_ch4.adb, errout.adb, exp_aggr.adb, sem_ch13.adb: This is a general
3652         change that deals with the fact that most of the special coding for
3653         Atomic should also apply to the case of Volatile_Full_Access.
3654         A new attribute Is_Atomic_Or_VFA is introduced, and many of the
3655         references to Is_Atomic now use this new attribute.
3657 2015-05-22  Robert Dewar  <dewar@adacore.com>
3659         * exp_ch4.adb (Expand_N_Op_Eq): Introduce 'Machine for 'Result
3660         comparison.
3662 2015-05-22  Eric Botcazou  <ebotcazou@adacore.com>
3664         * sprint.adb (Source_Dump): When generating debug files, deal
3665         with the case of a stand-alone package instantiation by dumping
3666         together the spec and the body in the common debug file.
3668 2015-05-22  Robert Dewar  <dewar@adacore.com>
3670         * sem_ch13.adb (Minimum_Size): Size is zero for null range
3671         discrete subtype.
3673 2015-05-22  Hristian Kirtchev  <kirtchev@adacore.com>
3675         * einfo.adb (Anonymous_Master): This attribute now applies
3676         to package and subprogram bodies.
3677         (Set_Anonymous_Master): This attribute now applies to package and
3678         subprogram bodies.
3679         (Write_Field36_Name): Add output for package and subprogram bodies.
3680         * einfo.ads Update the documentation on attribute Anonymous_Master
3681         along with occurrences in entities.
3682         * exp_ch4.adb (Create_Anonymous_Master): Reimplemented to
3683         handle spec and body anonymous masters of the same unit.
3684         (Current_Anonymous_Master): Reimplemented. Handle a
3685         package instantiation that acts as a compilation unit.
3686         (Insert_And_Analyze): Reimplemented.
3688 2015-05-22  Ed Schonberg  <schonberg@adacore.com>
3690         * sem_ch10.adb (Analyze_With_Clause): A limited_with_clause on a
3691         predefined unit is treated as a regular with_clause.
3693 2015-05-22  Robert Dewar  <dewar@adacore.com>
3695         * sem_ch12.adb, prj.ads, makeutl.ads, sem_ch6.adb, prj-nmsc.adb,
3696         prj-conf.adb, sem_disp.adb: Minor reformatting.
3698 2015-05-22  Vincent Celier  <celier@adacore.com>
3700         * clean.adb (Parse_Cmd_Line): For native gnatclean, check
3701         for switch -P and, if found and gprclean is available, invoke
3702         silently gprclean.
3703         * make.adb (Initialize): For native gnatmake, check for switch -P
3704         and, if found and gprbuild is available, invoke silently gprbuild.
3706 2015-05-22  Eric Botcazou  <ebotcazou@adacore.com>
3708         * sem_ch13.adb (Validate_Unchecked_Conversions): Also issue
3709         specific warning for discrete types when the source is larger
3710         than the target.
3712 2015-05-22  Ed Schonberg  <schonberg@adacore.com>
3714         * einfo.ads, einfo.adb (Incomplete_Actuals): New attribute of
3715         package instantiations. Holds the list of actuals in the instance
3716         that are incomplete types, to determine where the corresponding
3717         instance body must be placed.
3718         * sem_ch6.adb (Conforming_Types): An incomplete type used as an
3719         actual in an instance matches an incomplete formal.
3720         * sem_disp.adb (Check_Dispatching_Call): Handle missing case of
3721         explicit dereference.
3722         (Inherited_Subprograms): In the presence of a limited view there
3723         are no subprograms to inherit.
3724         * sem_ch12.adb (Preanalyze_Actuals): Build list of incomplete
3725         actuals of instance, for later placement of instance body and
3726         freeze nodes for actuals.
3727         (Install_Body): In the presence of actuals that incomplete types
3728         from a limited view, the instance body cannot be placed after
3729         the declaration because full views have not been seen yet. Any
3730         use of the non-limited views in the instance body requires
3731         the presence of a regular with_clause in the enclosing unit,
3732         and will fail if this with_clause is missing.  We place the
3733         instance body at the beginning of the enclosing body, which is
3734         the unit being compiled, and ensure that freeze nodes for the
3735         full views of the incomplete types appear before the instance.
3737 2015-05-22  Pascal Obry  <obry@adacore.com>
3739         * makeutl.ads, prj-conf.adb, prj-nmsc.adb, prj.ads
3740         (In_Place_Option): Removed.
3741         (Relocate_Build_Tree_Option): New constant.
3742         (Root_Dir_Option): New constant.
3743         (Obj_Root_Dir): Removed.
3744         (Build_Tree_Dir): New variable.
3745         (Root_Src_Tree): Removed.
3746         (Root_Dir): New variable.
3747         * prj-conf.adb (Get_Or_Create_Configuration_File): Add check
3748         for improper relocation.
3749         * prj-nmsc.adb (Locate_Directory): Add check for improper
3750         relocation.
3752 2015-05-22  Hristian Kirtchev  <kirtchev@adacore.com>
3754         * einfo.adb (Default_Init_Cond_Procedure): Code cleanup. The
3755         attribute now applies to the base type.
3756         (Has_Default_Init_Cond): Now applies to the base type.
3757         (Has_Inherited_Default_Init_Cond): Now applies to the base type.
3758         (Set_Default_Init_Cond_Procedure): Code cleanup. The attribute now
3759         applies to the base type.
3760         (Set_Has_Default_Init_Cond): Now applies to the base type.
3761         (Set_Has_Inherited_Default_Init_Cond): Now applies to the base type.
3762         * exp_ch3.adb (Expand_N_Object_Declaration): No need to use the
3763         base type when adding a call to the Default_Initial_Condition.
3765 2015-05-22  Hristian Kirtchev  <kirtchev@adacore.com>
3767         * einfo.adb: Node36 is now used as Anonymous_Master. Flag253
3768         is now unused.
3769         (Anonymous_Master): New routine.
3770         (Has_Anonymous_Master): Removed.
3771         (Set_Anonymous_Master): New routine.
3772         (Set_Has_Anonymous_Master): Removed.
3773         (Write_Entity_Flags): Remove the output for Has_Anonymous_Maser.
3774         (Write_Field36_Name): Add output for Anonymous_Master.
3775         * einfo.ads Add new attribute Anonymous_Master along with
3776         occurrences in nodes. Remove attribute Has_Anonymous_Master along
3777         with occurrences in nodes.
3778         (Anonymous_Master): New routine along with pragma Inline.
3779         (Has_Anonymous_Master): Removed along with pragma Inline.
3780         (Set_Anonymous_Master): New routine along with pragma Inline.
3781         (Set_Has_Anonymous_Master): Removed along with pragma Inline.
3782         * exp_ch4.adb (Create_Anonymous_Master): New routine.
3783         (Current_Anonymous_Master): Reimplemented.
3785 2015-05-22  Bob Duff  <duff@adacore.com>
3787         * freeze.adb (Freeze_Profile): Suppress warning if imported
3788         subprogram is not at library level.
3790 2015-05-22  Robert Dewar  <dewar@adacore.com>
3792         * sem_ch8.adb (Analyze_Object_Renaming): Check for renaming
3793         component of an object to which Volatile_Full_Access applies.
3795 2015-05-22  Jerome Guitton  <guitton@adacore.com>
3797         * exp_dbug.ads: Add note about non bit-packed arrays.
3799 2015-05-22  Eric Botcazou  <ebotcazou@adacore.com>
3801         * sem_prag.adb: Fix typo.
3802         * einfo.ads: Grammar fixes in comments.
3804 2015-05-22  Bob Duff  <duff@adacore.com>
3806         * a-cborma.ads, a-cidlli.ads, a-cimutr.ads, a-ciormu.ads,
3807         * a-cihase.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
3808         * a-cborse.ads, a-comutr.ads, a-ciorma.ads, a-cobove.ads,
3809         * a-coormu.ads, a-convec.ads, a-cohase.ads, a-coinho.ads,
3810         * a-cbdlli.ads, a-cbmutr.ads, a-cbhase.ads, a-cdlili.ads,
3811         * a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
3812         * a-coinho-shared.ads (Constant_Reference_Type, Reference_Type):
3813         Add an initialization expression "raise Program_Error". See,
3814         for example, RM-A.18.2(148.4).
3816 2015-05-22  Robert Dewar  <dewar@adacore.com>
3818         * debug.adb: Update documentation.
3819         * einfo.ads, einfo.adb (Needs_Typedef): New flag
3820         * exp_unst.adb (Unnest_Subprogram): Mark AREC types as needing
3821         typedef's in C.
3822         * frontend.adb: Update comments.
3823         * gnat1drv.adb (Adjust_Global_Switches): Set all needed flags
3824         for -gnatd.V
3825         * opt.ads (Generate_C_Code): New switch.
3826         * osint-c.adb (Write_C_File_Info): Removed, not used
3827         (Write_H_File_Info): Removed, not used
3828         * osint-c.ads (Write_C_File_Info): Removed, not used
3829         (Write_H_File_Info): Removed, not used
3830         * osint.ads (Write_Info): Minor comment updates.
3831         (Output_FD): Moved from private part to public part of spec.
3832         * sem.adb (Semantics): Force expansion on if in Generate_C_Code
3833         mode.
3834         * atree.ads: minor typo in comment.
3835         * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
3836         Do not allow VFA on composite object with aliased component.
3838 2015-05-22  Arnaud Charlet  <charlet@adacore.com>
3840         * osint-c.adb, osint-c.ads (Set_File_Name): Move back to spec.
3842 2015-05-22  Pascal Obry  <obry@adacore.com>
3844         * prj-util.adb: Minor comment editing.
3846 2015-05-22  Pascal Obry  <obry@adacore.com>
3848         * makeutl.ads (In_Place_Option): New constant.
3849         * prj.ads (Obj_Root_Dir): New variable (absolute path to relocate
3850         objects).
3851         (Root_Src_Tree): New variable (absolute path of root source tree).
3852         * prj-conf.adb (Do_Autoconf): Take into account the object root
3853         directory (if defined) to generate configuration project.
3854         * prj-nmsc.adb (Get_Directories): Handle case where Obj_Root_Dir
3855         is defined.
3856         (Locate_Directory): Likewise.
3858 2015-05-22  Pascal Obry  <obry@adacore.com>
3860         * prj-util.ads, prj-util.adb (Relative_Path): New routine.
3862 2015-05-22  Bob Duff  <duff@adacore.com>
3864         * exp_utils.ads, exp_utils.adb (Find_Optional_Prim_Op): New
3865         interface to return Empty when not found, so we can avoid handling
3866         Program_Error in that case.
3867         (Find_Prim_Op): Fix latent bug: raise Program_Error when there are no
3868         primitives.
3869         * exp_ch7.adb, sem_util.adb: Use Find_Optional_Prim_Op when the
3870         code is expecting Empty.
3871         * sem_ch8.adb: Use Find_Optional_Prim_Op to avoid handling
3872         Program_Error.
3874 2015-05-22  Robert Dewar  <dewar@adacore.com>
3876         * sem_ch3.adb, sem_intr.adb, exp_ch4.adb, s-rannum.adb,
3877         sem_eval.adb, s-fatgen.adb, s-expmod.ads: Remove incorrect hyphen in
3878         non-binary.
3879         * exp_util.adb: Add comment.
3880         * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move from spec to
3881         body.
3882         (Set_File_Name): New name for the above.
3883         (Create_C_File, Create_H_File, Write_C_File_Info, Write_H_File_Info,
3884         Close_C_File, Close_H_File): New procedure.
3885         * osint.adb: Minor reformatting.
3886         * osint.ads: Minor comment updates.
3888 2015-05-22  Robert Dewar  <dewar@adacore.com>
3890         * exp_ch4.adb: Minor rewording.
3891         * exp_util.ads: Clarify that Find_Prim_Op is only for
3892         tagged types.
3894 2015-05-22  Robert Dewar  <dewar@adacore.com>
3896         * atree.adb, atree.ads, treepr.adb: Change name Needs_Actuals_Check to
3897         Check_Actuals.
3898         * exp_ch4.adb (Expand_N_Op_Expon): Optimize 2**x in modular
3899         and overflow cases.
3901 2015-05-22  Eric Botcazou  <ebotcazou@adacore.com>
3903         * exp_pakd.adb (Install_PAT): Propagate representation aspects
3904         from the original array type to the PAT.
3906 2015-05-22  Robert Dewar  <dewar@adacore.com>
3908         * treepr.adb (Print_Node_Header): Add output of Needs_Actuals_Check.
3910 2015-05-22  Robert Dewar  <dewar@adacore.com>
3912         * atree.adb, atree.ads (Needs_Actuals_Check): New flag.
3914 2015-05-22  Hristian Kirtchev  <kirtchev@adacore.com>
3916         * sem_prag.adb (Analyze_Pragma): Remove the detection
3917         of a useless Part_Of indicator when the related item is a constant.
3918         (Check_Matching_Constituent): Do not emit an error on a constant.
3919         (Check_Missing_Part_Of): Do not check for a missing Part_Of indicator
3920         when the related item is a constant.
3921         (Collect_Body_States): Code cleanup.
3922         (Collect_Visible_States): Code cleanup.
3923         (Report_Unused_States): Do not emit an error on a constant.
3924         * sem_util.ads, sem_util.adb (Has_Variable_Input): Removed.
3926 2015-05-22  Eric Botcazou  <ebotcazou@adacore.com>
3928         * sem_ch8.adb (Analyze_Object_Renaming): Copy
3929         Has_Volatile_Full_Access from renamed to renaming entities.
3930         * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
3931         Tidy up and remove redundant setting of Has_Volatile_Full_Access.
3933 2015-05-22  Hristian Kirtchev  <kirtchev@adacore.com>
3935         * ghost.adb (Check_Ghost_Completion): Update references to SPARK
3936         RM 6.9 rules.
3937         (Check_Ghost_Policy): Update references to SPARK RM 6.9 rules.
3938         * sem_ch3.adb (Analyze_Object_Declaration): Update references
3939         to SPARK RM 6.9 rules.
3940         (Check_Completion): Ghost entities do not require a special form of
3941         completion.
3942         * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Update references
3943         to SPARK RM 6.9 rules.
3944         (Analyze_Subprogram_Body_Helper): Update references to SPARK RM 6.9
3945         rules.
3946         * sem_ch7.adb (Analyze_Package_Body_Helper): Update references
3947         to SPARK RM 6.9 rules.
3948         (Requires_Completion_In_Body): Ghost entities do not require a special
3949         form of completion.
3951 2015-05-22  Robert Dewar  <dewar@adacore.com>
3953         * a-csquin.ads: Use Ada 2012 notation.
3954         * sem_ch8.adb: Minor reformatting.
3956 2015-05-22  Hristian Kirtchev  <kirtchev@adacore.com>
3958         * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect Import
3959         acts as a completion.
3961 2015-05-22  Ed Schonberg  <schonberg@adacore.com>
3963         * sem_ch13.adb: Minor reformatting.
3965 2015-05-22  Jose Ruiz  <ruiz@adacore.com>
3967         * a-reatim.adb: Minor change, fix typo.
3969 2015-05-22  Robert Dewar  <dewar@adacore.com>
3971         * sem_util.ads: Minor addition of ??? comment.
3972         * sem_prag.adb, sem_util.adb: Minor reformatting.
3973         * sem_ch13.adb: minor reformatting.
3975 2015-05-22  Robert Dewar  <dewar@adacore.com>
3977         * a-reatim.ads: Add Compile_Time_Error to ensure Duration
3978         is 64-bits.
3979         * sem_ch13.adb: Improve error message.
3980         * exp_ch4.adb: Minor reformatting.
3982 2015-05-22  Hristian Kirtchev  <kirtchev@adacore.com>
3984         * sem_prag.adb (Analyze_Pragma): Constants without variable
3985         input do not require indicator Part_Of.
3986         (Check_Missing_Part_Of): Constants without variable input do not
3987         requrie indicator Part_Of.
3988         (Collect_Visible_States): Constants without variable input are
3989         not part of the hidden state of a package.
3990         * sem_util.ads, sem_util.adb (Has_Variable_Input): New routine.
3992 2015-05-22  Robert Dewar  <dewar@adacore.com>
3994         * exp_util.adb (Activate_Atomic_Synchronization): Do not set
3995         Atomic_Sync_Required for an object renaming declaration.
3996         * sem_ch8.adb (Analyze_Object_Renaming): Copy Is_Atomic and
3997         Is_Independent to renaming object.
3999 2015-05-22  Ed Schonberg  <schonberg@adacore.com>
4001         * sem_ch5.adb (Analyze_Iterator_Specification): Diagnose
4002         various illegalities in iterators over arrays and containers:
4003         a) New function Get_Cursor_Type, to verify that the cursor is
4004         not a limited type at the point of iteration.
4005         b) If the container is a constant, an element_iterator is illegal
4006         if the container type does not have a Constant_Indexing aspect.
4007         c) If the iterate function has an in-out controlling parameter,
4008         the container cannot be a constant object.
4009         d) Reject additional cases of iterators over a
4010         discriminant-dependent component of a mutable object.
4012 2015-05-21  Hristian Kirtchev  <kirtchev@adacore.com>
4014         * einfo.adb (Contract): This attribute now applies to constants.
4015         (Set_Contract): This attribute now applies to constants.
4016         (Write_Field34_Name): Add output for constants.
4017         * einfo.ads Attribute Contract now applies to constants.
4018         * sem_ch3.adb (Analyze_Object_Contract): Constants now have
4019         their Part_Of indicator verified.
4020         * sem_prag.adb (Analyze_Constituent): A constant is now a valid
4021         constituent.
4022         (Analyze_Global_Item): A constant cannot act as an output.
4023         (Analyze_Initialization_Item): Constants are now a valid
4024         initialization item.
4025         (Analyze_Initializes_In_Decl_Part): Rename
4026         global variable States_And_Vars to States_And_Objs and update
4027         all its occurrences.
4028         (Analyze_Input_Item): Constants are now a
4029         valid initialization item. Remove SPARM RM references from error
4030         messages.
4031         (Analyze_Pragma): Indicator Part_Of can now apply to a constant.
4032         (Collect_Body_States): Collect both source constants
4033         and variables.
4034         (Collect_States_And_Objects): Collect both source constants and
4035         variables.
4036         (Collect_States_And_Variables): Rename
4037         to Collect_States_And_Objects and update all its occurrences.
4038         (Collect_Visible_States): Do not collect constants and variables
4039         used to map generic formals to actuals.
4040         (Find_Role): The role of a constant is that of an input. Separate the
4041         role of a variable from that of a constant.
4042         (Report_Unused_Constituents): Add specialized wording for constants.
4043         (Report_Unused_States): Add specialized wording for constants.
4044         * sem_util.adb (Add_Contract_Item): Add processing for constants.
4045         * sem_util.ads (Add_Contract_Item): Update the comment on usage.
4046         (Find_Placement_In_State_Space): Update the comment on usage.
4048 2015-05-21  Ed Schonberg  <schonberg@adacore.com>
4050         * sem_ch5.adb: minor reformatting.
4052 2015-05-21  Robert Dewar  <dewar@adacore.com>
4054         * freeze.adb (Freeze_Entity): Properly tag -gnatw.z messages.
4056 2015-05-21  Robert Dewar  <dewar@adacore.com>
4058         * freeze.adb: Minor reformatting.
4059         * cstand.adb (Print_Standard): Fix bad printing of Duration
4060         low bound.
4061         * a-reatim.adb (Time_Of): Complete rewrite to properly detect
4062         out of range args.
4064 2015-05-21  Ed Schonberg  <schonberg@adacore.com>
4066         * sem_ch5.adb: add (useless) initial value.
4067         * sem_ch3.adb (Replace_Anonymous_Access_To_Protected_Subprogram):
4068         Check whether the procedure has parameters before processing
4069         formals in ASIS mode.
4071 2015-05-21  Ed Schonberg  <schonberg@adacore.com>
4073         * sem_ch13.adb (Check_Iterator_Functions): Emit error on Iterator
4074         aspect as well when indexing function is illegal.
4075         (Valid_Default_Iterator): Handle properly somme illegal cases
4076         to prevent compilation abandoned messages.
4077         (Check_Primitive_Function): Verify that type and indexing function
4078         are in the same scope.
4079         * freeze.adb (Freeze_Record): Extend patch on the presence of
4080         indexing aspects to aspect Default_Iterator.
4082 2015-05-19  David Malcolm  <dmalcolm@redhat.com>
4084         * gcc-interface/trans.c (Sloc_to_locus1): Strenghthen local "map"
4085         from line_map * to line_map_ordinary *.
4087 2015-05-12  Jason Merrill  <jason@redhat.com>
4089         * sigtramp-vxworks.c: Add space between string literal and macro
4090         name.
4092 2015-05-12  Arnaud Charlet  <charlet@adacore.com>
4094         * gnat_rm.texi, gnat_ugn.texi, doc: Documentation updates and clean ups
4096 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
4098         * sem_ch5.adb (Analyze_Iterator_Specifications): Additional
4099         legality checks for array and container iterators:
4100         a) The domain of iteration cannot be a component that depends
4101         on discriminants of a mutable object. The check was recently
4102         added for element iterators.
4103         b) The cursor type cannot be a limited type at the point of the
4104         iteration, because the cursor will be assigned to in the body
4105         of the loop.
4107 2015-05-12  Robert Dewar  <dewar@adacore.com>
4109         * freeze.adb (Freeze_Record_Type): Make sure that if we have
4110         aspect Iterator_Element, then we have either Constant_Indexing
4111         or Variable_Indexing.
4113 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
4115         * a-coormu.ads, a-coormu.adb: Add Indexing aspect, Reference_Type,
4116         and Reference_Control_Type to support element iterators over
4117         ordered multisets.
4118         * a-ciormu.ads, a-ciormu.adb: Ditto for
4119         indefinite_ordered_multisets.
4121 2015-05-12  Hristian Kirtchev  <kirtchev@adacore.com>
4123         * exp_ch4.adb (Expand_N_Expression_With_Actions): Force
4124         the evaluation of the EWA expression.  Code cleanup.
4125         (Process_Transient_Object): Code cleanup.
4126         * exp_util.adb (Is_Aliased): Controlled transient objects found
4127         within EWA nodes are not aliased.
4128         (Is_Finalizable_Transient): Iterators are not finalizable transients.
4130 2015-05-12  Robert Dewar  <dewar@adacore.com>
4132         * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
4133         Don't allow Atomic and Volatile_Full_Access for the same entity.
4135 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
4137         * sem_ch5.adb (Analyze_Iterator_Specification): Implement new
4138         semantics and safety checks specified in AI12-0151.
4140 2015-05-12  Pierre-Marie de Rodat  <derodat@adacore.com>
4142         * sem_ch10.adb (Sem_Ch10.Analyze_Proper_Body): Generate SCOs
4143         for subunit in generic units.
4145 2015-05-12  Robert Dewar  <dewar@adacore.com>
4147         * sem_elab.adb (Check_A_Call): Avoid checking internal call
4148         from Valid_Scalars
4150 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
4152         * sem_ch6.adb (Process_Formals): An untagged incomplete type
4153         is legal in the profile of a null procedure.
4155 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
4157         * sem_ch12.adb (Validate_Derived_Type_Instance): Handle properly
4158         the checks on a derived formal whose parent type is a previous
4159         formal that is not a derived type.
4161 2015-05-12  Robert Dewar  <dewar@adacore.com>
4163         * aspects.ads, aspects.adb: Add entries for aspect Volatile_Full_Access
4164         * einfo.adb (Has_Volatile_Full_Access): New flag.
4165         (Has_Volatile_Full_Access): New flag.
4166         * einfo.ads (Has_Volatile_Full_Access): New flag.
4167         * par-prag.adb: Add dummy entry for Volatile_Full_Access.
4168         * sem_prag.adb (Analyze_Pragma, case Volatile_Full_Access):
4169         Implement new pragma.
4170         * snames.ads-tmpl: Add entries for pragma Volatile_Full_Access.
4172 2015-05-12  Robert Dewar  <dewar@adacore.com>
4174         * targparm.ads: Minor reformatting.
4176 2015-05-12  Robert Dewar  <dewar@adacore.com>
4178         * a-reatim.adb (Time_Of): Properly detect overflow when TS = 0.0.
4179         * a-reatim.ads: Minor reformatting.
4181 2015-05-12  Hristian Kirtchev  <kirtchev@adacore.com>
4183         * einfo.ads: Update the documentation of flags
4184         Has_Inherited_Default_Init_Cond and Has_Default_Init_Cond.
4186 2015-05-12  Robert Dewar  <dewar@adacore.com>
4188         * impunit.adb: Add entry for a-dhfina.ads
4189         * a-dhfina.ads: New file.
4191 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
4193         * exp_ch5.adb (Expand_Iterator_Loop_Over_Array): if the array
4194         type has convention Fortran, a multidimensional iterator varies
4195         the first dimension fastest.
4197 2015-05-12  Hristian Kirtchev  <kirtchev@adacore.com>
4199         * einfo.adb: Node32 is now used as Encapsulating_State.
4200         Node37 is now used as Associated_Entity.
4201         (Associated_Entity): New routine.
4202         (Encapsulating_State): Update the assertion guard to include constants.
4203         (Set_Associated_Entity): New routine.
4204         (Set_Encapsulating_State): Update the assertion guard to
4205         include constants.
4206         (Write_Field10_Name): Remove the output for Encapsulating_State.
4207         (Write_Field32_Name): Add output for Encapsulating_State.
4208         (Write_Field37_Name): Add output for Associated_Entity.
4209         * einfo.ads New attribute Associated_Entity along with placement
4210         in entities. Attribute Encapsulating_State now uses Node32.
4211         (Associated_Entity): New routine along with pragma Inline.
4212         (Set_Associated_Entity): New routine along with pragma Inline.
4213         * inline.ads Code reformatting.
4214         * sem_attr.adb (Analyze_Attribute): Correct the prefix of
4215         attribute 'Result when the context is a generic instantiation.
4216         (Analyze_Attribute_Old_Result): Pragmas Depends and
4217         Refined_Depends are a valid context for attribute 'Result.
4218         (Denote_Same_Function): Allow attribute 'Result to denote
4219         generic functions.
4220         * sem_ch3.adb Add with and use clauses for Sem_Ch12.
4221         (Analyze_Declarations): Capture global references within the
4222         contracts of packages, subprograms and their respective bodies.
4223         * sem_ch6.adb (Analyze_Aspects_On_Body_Or_Stub): Removed.
4224         (Analyze_Completion_Contract): Removed.
4225         (Analyze_Generic_Subprogram_Body): Enchange the aspects after
4226         creating the generic copy. Create a generic contract for the
4227         template. Analyze the aspects of the generic body. Analyze the
4228         contract of the generic body when it is a compilation unit and
4229         capture global references.
4230         (Analyze_Subprogram_Body_Contract): Code cleanup.
4231         (Analyze_Subprogram_Contract): Do not save global references here.
4232         (Save_Global_References_In_List): Removed.
4233         * sem_ch7.adb (Analyze_Package_Body_Contract): Code cleanup.
4234         (Analyze_Package_Body_Helper): Create a generic contract for
4235         the template.
4236         (Analyze_Package_Contract): Code cleanup.
4237         * sem_ch10.adb Add with and use clauses for Sem_Ch12.
4238         (Analyze_Compilation_Unit): Capture global references in a
4239         generic subprogram declaration that acts as a compilation unit.
4240         * sem_ch12.adb Add with and use clauses for Sem_Prag. Illustrate
4241         the implementation of generic contracts. Alphabetize various
4242         subprograms.
4243         (Analyze_Generic_Package_Declaration):
4244         Create a generic contract for the template.
4245         (Analyze_Generic_Subprogram_Declaration): Create a generic
4246         contract for the template.
4247         (Analyze_Subprogram_Instantiation): Instantiate the contract of the
4248         subprogram.
4249         (Copy_Generic_Node): Link defining entities of the generic template
4250         with the corresponding defining entities of the generic copy. Update
4251         the processing of pragmas.
4252         (Instantiate_Contract): Removed.
4253         (Instantiate_Subprogram_Contract): New routine.
4254         (Requires_Delayed_Save): New routine.
4255         (Save_Global_References): Rename formal parameter N to Templ. Various
4256         cleanups.
4257         (Save_Global_References_In_Aspects): Moved from the spec.
4258         (Save_Global_References_In_Contract): New routine.
4259         (Save_References_In_Aggregate): New routine.
4260         (Save_References_In_Char_Lit_Or_Op_Symbol): New routine.
4261         (Save_References_In_Descendants): New routine.
4262         (Save_References_In_Identifier): New routine.
4263         (Save_References_In_Operator): New routine.
4264         (Save_References_In_Pragma): New routine.
4265         * sem_ch12.ads (Save_Global_References): Rename formal
4266         parameter N to Templ. Update the comment on usage.
4267         (Save_Global_References_In_Aspects): Moved to the body.
4268         (Save_Global_References_In_Contract): New routine.
4269         * sem_ch13.adb (Analyze_Aspect_Specifications_On_Body_Or_Stub):
4270         New routine.
4271         * sem_ch13.ads (Analyze_Aspect_Specifications_On_Body_Or_Stub):
4272         New routine.
4273         * sem_prag.adb (Add_Item_To_Name_Buffer): Add support for
4274         generic parameters.
4275         (Analyze_Contract_Cases_In_Decl_Part): Code cleanup.
4276         (Analyze_Depends_Global): New routine.
4277         (Analyze_Depends_In_Decl_Part): Code cleanup.
4278         (Analyze_Global_In_Decl_Part): Code cleanup.
4279         (Analyze_Global_Item): Constants are now valid global items. Do
4280         not perform state-related checks in an instance. Change the way
4281         renamings are handled.  (Analyze_Initial_Condition_In_Decl_Part):
4282         Code cleanup.
4283         (Analyze_Initializes_In_Decl_Part): Code cleanup.
4284         (Analyze_Input_Output): The analysis of attribute 'Result in
4285         the context of pragmas Depends or Refined_Depends now reuses
4286         the existing attribute analysis machinery. Constants and
4287         generic parameters are now valid dependency items. Do not
4288         perform state-related checks in an instance. Change the way
4289         renamings are handled.  (Analyze_Pragma): Add a "characteristics"
4290         section for pragmas Abstract_State, Contract_Cases, Depends,
4291         Extensions_Visible, Global, Initial_Condition, Initializes,
4292         Post, Post_Class, Postcondition, Pre, Pre_Class, Precondition,
4293         Refined_Depends, Refined_Global, Refined_Post, Refined_State, Test_Case.
4294         (Analyze_Pre_Post_Condition): Do not create a generic
4295         template here.
4296         (Analyze_Pre_Post_Condition_In_Decl_Part): Code cleanup.
4297         (Analyze_Refined_Depends_Global_Post): New routine.
4298         (Analyze_Refined_Depends_In_Decl_Part): Code cleanup.
4299         (Analyze_Refined_Global_In_Decl_Part): Code cleanup.
4300         (Analyze_Refined_Pragma): Removed.
4301         (Analyze_Refined_State_In_Decl_Part): Code cleanup.
4302         (Analyze_Test_Case_In_Decl_Part): Code cleanup.
4303         (Check_Dependency_Clause): Do not perform this check in an instance.
4304         (Check_Function_Return): Add support for generic functions.
4305         (Check_In_Out_States): Do not perform this check in an instance.
4306         (Check_Input_States): Do not perform this check in an instance.
4307         (Check_Mode_Restriction_In_Function): Add support for generic functions.
4308         (Check_Output_States): Do not perform this check in an instance.
4309         (Check_Postcondition_Use_In_Inlined_Subprogram): Rename
4310         parameter Subp_Id to Spec_Id and update comment on usage.
4311         (Check_Proof_In_States): Do not perform this check in an instance.
4312         (Check_Refined_Global_Item): Add support for constants.
4313         (Check_Refined_Global_List): Do not perform this check in an instance.
4314         (Collect_Global_Items): Reimplemented.
4315         (Collect_Subprogram_Inputs_Outputs): Add support for generic parameters.
4316         (Create_Generic_Template): Removed.
4317         (Find_Related_Package_Or_Body): Moved to spec.
4318         (Find_Role): Add support for generic parameters and constants.
4319         (Get_Argument): Moved to spec. Rename parameter Spec_Id to Context_Id.
4320         (Match_Item): Add support for constants.
4321         (Preanalyze_Test_Case_Arg): Reimplemented.
4322         (Report_Extra_Clauses): Do not perform this check in an instance.
4323         (Report_Extra_Constituents): Do not perform this check in an instance.
4324         * sem_prag.ads (Collect_Subprogram_Inputs_Outputs): Update
4325         the comment on usage.
4326         (Find_Related_Package_Or_Body): Moved from body.
4327         (Get_Argument): Moved from body.
4328         * sem_util.adb Add with and use clauses for Sem_Ch12.
4329         (Corresponding_Spec_Of): Add support for packages and package bodies.
4330         (Create_Generic_Contract): New routine.
4331         (Is_Contract_Annotation): Reimplemented.
4332         (Is_Generic_Declaration_Or_Body): New routine.
4333         (Is_Package_Contract_Annotation): New routine.
4334         (Is_Subprogram_Contract_Annotation): New routine.
4335         * sem_util.ads (Corresponding_Spec_Of): Update the comment on usage.
4336         (Create_Generic_Contract): New routine.
4337         (Is_Generic_Declaration_Or_Body): New routine.
4338         (Is_Package_Contract_Annotation): New routine.
4339         (Is_Subprogram_Contract_Annotation): New routine.
4340         * sinfo.adb (Is_Generic_Contract_Pragma): New routine.
4341         (Set_Is_Generic_Contract_Pragma): New routine.
4342         * sinfo.ads Add new attribute Is_Generic_Contract_Pragma along
4343         with occurrences in nodes.
4344         (Is_Generic_Contract_Pragma): New routine along with pragma Inline.
4345         (Set_Is_Generic_Contract_Pragma): New routine along with pragma Inline.
4346         * treepr.adb (Print_Entity_Info): Output fields 36 to 41.
4348 2015-05-12  Robert Dewar  <dewar@adacore.com>
4350         * a-taster.ads: Minor comment fix: fix bad header, this is a
4351         pure RM unit.
4353 2015-05-12  Robert Dewar  <dewar@adacore.com>
4355         * sem_intr.adb: (Check_Shift): Diagnose bad modulus value.
4357 2015-05-12  Robert Dewar  <dewar@adacore.com>
4359         * gnat1drv.adb (Adjust_Global_Switches): Default to suppressing
4360         Alignment_Checks on non-strict alignment machine.
4361         * sem_ch13.adb (Validate_Address_Clauses): Don't give
4362         compile-time alignment warnings if run time Alignment_Check
4363         is suppressed.
4365 2015-05-12  Thomas Quinot  <quinot@adacore.com>
4367         * g-sercom.ads, g-sercom-linux.adb (GNAT.Serial_Communications.
4368         Data_Rate): New literals B75, B110, B150, B300, B600.
4370 2015-05-12  Doug Rupp  <rupp@adacore.com>
4372         * init.c (__gnat_init_float) [vxworks]: For e500v2,
4373         do nothing and leave the responsibility to install the handler
4374         and enable the exceptions to the BSP.
4376 2015-05-12  Robert Dewar  <dewar@adacore.com>
4378         * sem_ch9.adb, einfo.ads, exp_intr.adb: Minor reformatting.
4379         * sem_disp.adb: Minor code reorganization (remove junk redundant
4380         null statement).
4381         * exp_unst.adb (Unnest_Subprogram.Uplev_Refs): Ignore uplevel
4382         references to bounds of types coming from original type reference.
4383         * checks.ads: Minor reformatting.
4384         * checks.adb: Minor reformatting.
4385         * sem_prag.adb (Analyze_Pragma, case Check): If in ignored
4386         assertion, then make sure we do not drag in bignum stuff.
4388 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
4390         * sem_ch9.adb (Collect_Interfaces): Initialize
4391         Direct_Primitive_Operations for a tagged synchronized type,
4392         so it can used in ASIS mode.
4393         * sem_disp.adb (Check_Dispatching_Operation): If expansion is
4394         disabled, attach subprogram to list of Direct_Primitive_Operations
4395         of synchronized type itself, for ASIS use, because in this case
4396         Corresponding_Record_Type is not built.
4397         * einfo.ads: Indicate use of Direct_Primitive_Operations on
4398         synchronized type.
4400 2015-05-12  Pierre-Marie de Rodat  <derodat@adacore.com>
4402         * exp_pakd.adb: Make clearer the comment in exp_pakd.adb about
4403         ___XP suffixes.
4405 2015-05-12  Robert Dewar  <dewar@adacore.com>
4407         * sem_ch3.adb, sem_util.adb, sem_ch6.adb: Minor reformatting.
4409 2015-05-12  Robert Dewar  <dewar@adacore.com>
4411         * exp_unst.adb (Visit_Node): Deal with subprogram and package stubs.
4413 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
4415         * exp_intr.adb (Expand_Dispatching_Constructor_Call): The
4416         tag to be retrieved for the generated call is the first entry
4417         in the dispatch table for the return type of the instantiated
4418         constructor.
4420 2015-05-12  Bob Duff  <duff@adacore.com>
4422         * exp_ch7.adb, exp_ch7.ads, exp_intr.adb, exp_util.adb,
4423         exp_util.ads: Update comments.
4425 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
4427         * sem_ch3.adb (Add_Internal_Interface_Entities): Do no generate
4428         freeze nodes for these in ASIS mode, because they lead to
4429         elaoration order issues in gigi.
4431 2015-05-12  Hristian Kirtchev  <kirtchev@adacore.com>
4433         * sem_ch6.adb (Analyze_Expression_Function): Code
4434         cleanup. Use Copy_Subprogram_Spec to create a proper spec.
4435         (Analyze_Subprogram_Body_Helper): Code cleanup. Do not
4436         prepare a stand alone body for inlining in GNATprove mode
4437         when inside a generic.  (Body_Has_Contract): Reimplemented.
4438         (Build_Subprogram_Declaration): New routine.
4439         * sem_ch10.adb (Analyze_Compilation_Unit): Capture global
4440         references within generic bodies by loading them.
4441         * sem_util.adb (Copy_Parameter_List): Code cleanup.
4442         (Copy_Subprogram_Spec): New routine.
4443         (Is_Contract_Annotation): New routine.
4444         * sem_util.ads (Copy_Subprogram_Spec): New routine.
4445         (Is_Contract_Annotation): New routine.
4447 2015-05-12  Hristian Kirtchev  <kirtchev@adacore.com>
4449         * sem_attr.adb (Resolve_Attribute): Do not analyze the generated
4450         body of an expression function when the prefix of attribute
4451         'Access is the body.
4453 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
4455         * sem_ch3.adb (Build_Derived_Enumeration_Type): The anonymous base
4456         created for a derived enumeration type is not a first subtype,
4457         even though it is defined through a full type declaration.
4458         * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): Do not process
4459         aspects for the anonymous base type constructed for a derived
4460         scalar type, because they will be set when the first subtype
4461         is frozen.
4462         (Inherit_Aspects_At_Freeze_Point): Fix typos on handling of
4463         Default_Value and Default_Component_Value, that prevented the
4464         proper inheritance of these aspects.
4466 2015-05-12  Gary Dismukes  <dismukes@adacore.com>
4468         * exp_ch6.adb, exp_unst.adb: Minor typo fixes.
4470 2015-05-12  Robert Dewar  <dewar@adacore.com>
4472         * sem_ch3.adb: Minor reformatting.
4474 2015-05-12  Vincent Celier  <celier@adacore.com>
4476         * gnatcmd.adb: If we want to invoke gnatmake (gnatclean) with
4477         -P, then check if gprbuild (gprclean) is available; if it is,
4478         use gprbuild (gprclean) instead of gnatmake (gnatclean).
4480 2015-05-12  Robert Dewar  <dewar@adacore.com>
4482         * debug.adb: Add flag -gnatd.3 to output diagnostic info from
4483         Exp_Unst.
4484         * einfo.ad, einfo.adb: Reorganize (and remove most of) flags used by
4485         Exp_Unst.
4486         * exp_ch6.adb (Unest_Bodies): Table for delayed calls to
4487         Unnest_Subprogram (Expand_N_Subprogram_Body): Add entry to table
4488         for later call instead of calling Unnest_Subprogram directly
4489         (Initialize): New procedure (Unnest_Subprograms): New procedure
4490         * exp_ch6.ads (Add_Extra_Actual_To_Call): Move into proper
4491         alpha order.
4492         (Initialize): New procedure.
4493         (Unnest_Subprograms): New procedure.
4494         * exp_unst.adb (Unnest_Subprogram): Major rewrite, moving
4495         all processing to this routine which is now called late
4496         after instantiating bodies. Fully handles the case of generic
4497         instantiations now.
4498         * exp_unst.ads: Major rewrite, moving all processing to
4499         Unnest_Subprogram.
4500         * frontend.adb (Frontend): Add call to Exp_Ch6.Initialize.
4501         (Frontend): Add call to Unnest_Subprograms.
4502         * sem_ch8.adb (Find_Direct_Name): Back to old calling sequence
4503         for Check_Nested_Access.
4504         * sem_util.adb (Build_Default_Subtype): Minor reformatting
4505         (Check_Nested_Access): Back to original VM-only form (we
4506         now do all the processing for Unnest_Subprogram at the time
4507         it is called.
4508         (Denotes_Same_Object): Minor reformatting
4509         (Note_Possible_Modification): Old calling sequence for
4510         Check_Nested_Access.
4511         * sem_util.ads (Check_Nested_Access): Back to original VM-only
4512         form (we now do all the processing for Unnest_Subprogram at the
4513         time it is called.
4515 2015-05-12  Robert Dewar  <dewar@adacore.com>
4517         * sem_ch3.adb, freeze.adb, sem_ch6.adb: Minor reformatting.
4519 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
4521         * sem_ch3.adb (Analyze_Object_Declaration): New function
4522         Has_Delayed_Aspect, used to defer resolution of an aggregate
4523         expression when the object declaration carries aspects Address
4524         and/or Alignment.
4525         * freeze.adb (Freeze_Object_Declaration): New subsidiary procedure
4526         to Freeze_Entity.  In addition to the previous processing steps
4527         at the freeze point of an object, this procedure also handles
4528         aggregates in object declarations, when the declaration carries
4529         delayed aspects that require that the initialization of the
4530         object be attached to its freeze actions.
4532 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
4534         * sem_ch6.adb (Analyze_Subprogram_Declaration): Following
4535         AI12-0147, null procedures and expression functions are allowed
4536         in protected bodies.
4538 2015-05-12  Tristan Gingold  <gingold@adacore.com>
4540         * i-cpoint.adb (Copy_Terminated_Array): Copy nothing if Length is 0.
4542 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
4544         * sem_ch3.adb (Complete_Private_Subtype): Propagate
4545         Has_Delayed_Aspects flag from private to full view, to ensure
4546         that predicate functions are constructed.
4548 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
4550         * sem_ch6.adb (Process_Formals): If a tagged formal is an
4551         incomplete class-wide type, the subprogram must have a delayed
4552         freeze even though the opertation is not a primitive of the
4553         type. THis ensures that the backend can recover the full view
4554         when elaborating the subprogram declaration.
4556 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
4558         * exp_util.adb (Get_Current_Value_Condition): Nothing to be
4559         done if an elsif part has been rewritten so that it is not part
4560         of an enclosing if_statement.
4562 2015-05-12  Robert Dewar  <dewar@adacore.com>
4564         * sem_type.adb, sem_ch10.adb, freeze.adb, sem_ch6.adb, exp_disp.adb:
4565         Minor reformatting.
4567 2015-05-12  Bob Duff  <duff@adacore.com>
4569         * exp_attr.adb (Size): Remove unnecessary check for types with
4570         unknown discriminants.  That was causing the compiler to build
4571         a function call _size(T), where T is a type, not an object.
4573 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
4575         * sem_ch4.adb (Extended_Primitive_Ops): Exclude overriding
4576         primitive operations of a type extension declared in the package
4577         body, to prevent duplicates in extended list.
4579 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
4581         * sem_ch3.adb (Analyze_Component_Declaration): If the component is
4582         an unconstrained synchronized type with discriminants, create a
4583         constrained default subtype for it, so that the enclosing record
4584         can be given the proper size.
4585         * sem_util.adb (Build_Default_Subtype): If the subtype is created
4586         for a record discriminant, do not analyze the declarztion at
4587         once because it is added to the freezing actions of the enclosing
4588         record type.
4590 2015-05-12  Robert Dewar  <dewar@adacore.com>
4592         * exp_prag.adb (Expand_N_Pragma): Rewrite ignored pragma as
4593         Null statements.
4594         * namet.ads (Boolean3): Document this flag used for Ignore_Pragma.
4595         * par-prag.adb (Prag): Implement Ignore_Pragma.
4596         * sem_prag.adb: Implement Ignore_Pragma.
4597         * snames.ads-tmpl: Add entries for pragma Ignore_Pragma.
4599 2015-05-12  Javier Miranda  <miranda@adacore.com>
4601         * sem_ch10.adb (Build_Shadow_Entity): Link the class-wide shadow
4602         entity with its corresponding real entity.
4603         (Decorate_Type): Unconditionally build the class-wide shadow entity of
4604         tagged types.
4605         * einfo.ads, einfo.adb (Has_Non_Limited_View): New synthesized
4606         attribute.
4607         (Non_Limited_View): Moved from field 17 to field 19 be available
4608         in class-wide entities.
4609         * exp_attr.adb (Access_Cases): Code cleanup.
4610         * exp_disp.adb (Expand_Interface_Actuals): Ditto.
4611         * exp_util.adb (Non_Limited_Designated_Type): Ditto.
4612         * freeze.adb (Build_Renamed_Bdody): Ditto.
4613         * sem_aux.adb (Available_View): Ditto.
4614         * sem_ch4.adb (Analyze_Selected_Component): Ditto.
4615         (Try_One_Prefix_Interpretation): Ditto.
4616         * sem_ch5.adb (Analyze_Assignment): Ditto.
4617         * sem_ch6.adb (Detect_And_Exchange): Ditto.
4618         * sem_ch8.adb (Find_Expanded_Name): Ditto.
4619         * sem_disp.adb (Check_Controlling_Type): Ditto.
4620         * sem_res.adb (Resolve_Type_Conversion): Ditto.
4621         (Full_Designated_Type): Ditto.
4622         * sem_type.adb (Covers): Ditto.
4623         * sem_util.adb: Fix typo in comment.
4625 2015-05-12  Robert Dewar  <dewar@adacore.com>
4627         * exp_unst.adb (Get_Real_Subp): New subprogram.
4628         (Unnest_Subprogram): Use Get_Real_Subp.
4629         (Uplev_Refs_For_One_Subp): Skip if no ARECnU entity.
4630         (Uplev_Refs_For_One_Subp): Use actual subtype in unconstrained case.
4632 2015-05-12  Robert Dewar  <dewar@adacore.com>
4634         * a-reatim.adb ("/"): Add explicit check for Time_Span_First / -1.
4636 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
4638         * sem_ch4.adb (Extended_Primitive_Ops): New subprogram,
4639         auxiliary to Try_Primitive_Operation to handle properly prefixed
4640         calls where the operation is not a primitive of the type, but
4641         is declared in the package body that is in the immediate scope
4642         of the type.
4644 2015-05-12  Robert Dewar  <dewar@adacore.com>
4646         * sem_util.adb (Is_Variable): Allow X'Deref(Y) as a variable.
4648 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
4650         * sem_ch8.adb (Find_Expanded_Name): Handle properly a fully
4651         qualified name for an instance of a generic grand-child unit in
4652         the body its parent.
4654 2015-05-12  Robert Dewar  <dewar@adacore.com>
4656         * exp_unst.adb (Upref_Name): New subprogram.
4657         (Unnest_Subprogram): Use Upref_Name.
4658         (Unnest_Subprogram): Use new Deref attribute.
4659         * exp_unst.ads: Doc updates.
4661 2015-05-12  Thomas Quinot  <quinot@adacore.com>
4663         * adaint.c: Enable Large File Support in adaint so that __gnat_readdir
4664         can access files on filesystems mounted from servers that use large
4665         NFS file handles.
4667 2015-05-09  Eric Botcazou  <ebotcazou@adacore.com>
4669         * gcc-interface/utils.c (gnat_write_global_declarations): Use type_decl
4670         method instead of global_decl for TYPE_DECLs.
4672 2015-04-27  Jim Wilson  <jim.wilson@linaro.org>
4674         * gcc-interface/Makefile-lan.in (ada.mostlyclean): Remove gnatbind
4675         and gnat1.
4677 2015-04-13  Eric Botcazou  <ebotcazou@adacore.com>
4679         * gnatvsn.ads (Library_Version): Bump to 6.
4681 2015-04-09  Iain Sandoe  <iain@codesourcery.com>
4683         * gcc-interface/Makefile.in (darwin, powerpc): Enable atomics.
4685 2015-04-08  Eric Botcazou  <ebotcazou@adacore.com>
4687         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Do not make
4688         a function returning an unconstrained type 'const' for the middle-end.
4690         * gcc-interface/trans.c (Pragma_to_gnu) <case Pragma_Warning>: Use
4691         exact condition to detect Reason => "..." pattern.
4693 2015-03-31  Tom de Vries  <tom@codesourcery.com>
4695         PR ada/65490
4696         * terminals.c (child_setup_tty): Fix warning 'argument to sizeof in
4697         bzero call is the same expression as the destination'.
4699 2015-03-26  Eric Botcazou  <ebotcazou@adacore.com>
4701         * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Deref>: New case.
4703 2015-03-24  Gary Dismukes  <dismukes@adacore.com>
4705         * sem_ch3.adb: Minor typo fix (missing paren).
4707 2015-03-24  Robert Dewar  <dewar@adacore.com>
4709         * sinfo.ads: Update comment.
4711 2015-03-24  Robert Dewar  <dewar@adacore.com>
4713         * exp_attr.adb: Add entry for typ'Deref.
4714         * sem_attr.adb (Deref): New GNAT attribute.
4715         * sem_attr.ads: Add entry for new GNAT attribute Deref.
4716         * snames.ads-tmpl: Add entries for new attribute Deref.
4718 2015-03-24  Ed Schonberg  <schonberg@adacore.com>
4720         * sem_ch13.adb (Rep_Item_Too_Early): allow pragma Convention
4721         on generic type.
4723 2015-03-24  Gary Dismukes  <dismukes@adacore.com>
4725         * inline.adb: Minor typo fix.
4727 2015-03-24  Arnaud Charlet  <charlet@adacore.com>
4729         * doc/gnat_ugn/building_executable_programs_with_gnat.rst,
4730         doc/gnat_ugn/gnat_utility_programs.rst
4731         doc/gnat_rm/implementation_defined_attributes.rst
4732         doc/gnat_rm/implementation_defined_pragmas.rst
4733         doc/gnat_rm/representation_clauses_and_pragmas.rst
4734         doc/gnat_rm/about_this_guide.rst
4735         doc/gnat_rm/implementation_of_ada_2012_features.rst: Doc improvements.
4736         * gnat_rm.texi, gnat_ugn.texi: Regenerate.
4738 2015-03-23  Jakub Jelinek  <jakub@redhat.com>
4740         PR bootstrap/65522
4741         * adadecode.c (ada_demangle): Guard with IN_RTS instead of IN_GCC.
4743 2015-03-20  Eric Botcazou  <ebotcazou@adacore.com>
4745         PR ada/65451
4746         * gcc-interface/utils.c (gnat_pushdecl): Tidy up and improve comment.
4747         Make sure to chain only main variants through TYPE_NEXT_PTR_TO.
4749         * gcc-interface/trans.c (Attribute_to_gnu): Revert latest change.
4751 2015-03-16  Eric Botcazou  <ebotcazou@adacore.com>
4753         * gcc-interface/utils2.c (gnat_invariant_expr): Return null if the type
4754         of the expression ends up being composite.
4756 2015-03-16  Eric Botcazou  <ebotcazou@adacore.com>
4758         * gcc-interface/decl.c (is_from_limited_with_of_main): New predicate.
4759         (gnat_to_gnu_entity) <E_Subprogram_Type>: Invoke it on return and
4760         parameter types to detect circularities in ASIS mode.
4761         * gcc-interface/trans.c (Attribute_to_gnu): Mention AI05-0151.
4763 2015-03-16  Eric Botcazou  <ebotcazou@adacore.com>
4765         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Abstract_State>: Do not
4766         short-circuit the regular handling.
4768 2015-03-13  Robert Dewar  <dewar@adacore.com>
4770         * exp_unst.adb (Note_Uplevel_Reference): Eliminate duplicate
4771         references.
4772         (Actual_Ref): New function.
4773         (AREC_String): Minor reformatting.
4774         (Unnest_Subprogram): Use Actual_Ref.
4775         * frontend.adb (Frontend): Turn off Unnest_Subprogram_Mode
4776         before call to Instantiate_Bodies.
4778 2015-03-13  Ed Schonberg  <schonberg@adacore.com>
4780         * freeze.adb (Freeze_Profile): If the return type of a function
4781         being frozen is an untagged limited view and the function is
4782         abstract, mark the type as frozen because there is no later
4783         point at which the profile of the subprogram will be elaborated.
4785 2015-03-13  Robert Dewar  <dewar@adacore.com>
4787         * einfo.adb, einfo.ads, atree.adb, atree.ads, atree.h: Add seventh
4788         component to entities. Add new fields Field36-41 and Node36-41.
4790 2015-03-13  Claire Dross  <dross@adacore.com>
4792         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Rewrite after review.
4794 2015-03-13  Robert Dewar  <dewar@adacore.com>
4796         * exp_util.adb (Is_Volatile_Reference): Compile time known
4797         value is never considered to be a volatile reference.
4799 2015-03-13  Robert Dewar  <dewar@adacore.com>
4801         * sem_ch3.adb (Analyze_Object_Contract): Suppress "constant
4802         cannot be volatile" for internally generated object (such as
4803         FIRST and LAST constants).
4805 2015-03-13  Ed Schonberg  <schonberg@adacore.com>
4807         * sem_ch12.adb (Validate_Access_Subprogram_Instance): If a
4808         convention is specified for the formal parameter, verify that
4809         the actual has the same convention.
4810         * sem_prag.adb (Set_Convention_From_Pragma): Allow convention
4811         pragma to be set on a generic formal type.
4812         * sem_util.adb (Set_Convention): Ignore within an instance,
4813         as it has already been verified in the generic unit.
4815 2015-03-13  Claire Dross  <dross@adacore.com>
4817         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do not inline
4818         subprograms with unconstrained record parameters containing
4819         Itype declarations.
4820         * sinfo.ads Document GNATprove assumption that type should match
4821         in the AST.
4822         * sem_ch6.adb (Analyze_Subprogram_Body_Contract):
4823         Do not check for Refined_Depends and Refined_Globals contracts
4824         as they are optional.
4826 2015-03-13  Ed Schonberg  <schonberg@adacore.com>
4828         * sem_ch12.adb (Instantiate_Type): For a floating-point type,
4829         capture dimension info if any, because the generated subtype
4830         declaration does not come from source and will not process dimensions.
4831         * sem_dim,adb (Analyze_Dimension_Extension_Or_Record_Aggregate):
4832         Do not analyze expressions with an initialization procedure
4833         because aggregates will have been checked at the point of record
4834         declaration.
4836 2015-03-13  Robert Dewar  <dewar@adacore.com>
4838         * aspects.ads, aspects.adb: Add entries for aspect Unimplemented.
4839         * einfo.ads, einfo.adb (Is_Unimplemented): New flag.
4840         * sem_ch13.adb: Add dummy entry for aspect Unimplemented.
4841         * snames.ads-tmpl: Add entry for Name_Unimplemented.
4843 2015-03-13  Gary Dismukes  <dismukes@adacore.com>
4845         * style.adb (Missing_Overriding): Apply the
4846         Comes_From_Source test to the Original_Node of the subprogram
4847         node, to handle the case of a null procedure declaration that
4848         has been rewritten as an empty procedure body.
4850 2015-03-13  Robert Dewar  <dewar@adacore.com>
4852         * exp_util.ads: Minor fix to comment.
4853         * sem_ch3.adb (Constrain_Index): Correct pasto from previous
4854         change.
4856 2015-03-13  Robert Dewar  <dewar@adacore.com>
4858         * exp_util.ads, exp_util.adb (Force_Evaluation): Add Related_Id and
4859         Is_Low/High_Bound params.
4860         * sem_ch3.adb (Constrain_Index): Use new Force_Evaluation calling
4861         sequence to simplify generation of FIRST/LAST temps for bounds.
4863 2015-03-12  Olivier Hainque  <hainque@adacore.com>
4865         * gcc-interface/trans.c (Attribute_to_gnu) <Code_Address case>:
4866         On targets where a function symbol designates a function descriptor,
4867         fetch the function code address from the descriptor.
4868         (USE_RUNTIME_DESCRIPTORS): Provide a default definition.
4870 2015-03-04  Robert Dewar  <dewar@adacore.com>
4872         * sem_warn.adb: Minor reformatting.
4873         * init.c: Minor tweaks.
4875 2015-03-04  Dmitriy Anisimko  <anisimko@adacore.com>
4877         * a-coinho-shared.adb: Fix clear of already empty holder.
4879 2015-03-04  Robert Dewar  <dewar@adacore.com>
4881         * exp_unst.adb (Check_Dynamic_Type): Ignore library level types.
4882         (Check_Uplevel_Reference_To_Type): Ignore call inside generic.
4883         (Note_Uplevel_Reference): Ignore call inside generic.
4884         (Note_Uplevel_Reference): Fix check for no entity field.
4885         (Unnest_Subprogram): Ignore call inside generic.
4886         (Find_Current_Subprogram): Use Defining_Entity, not Defining_Unit_Name.
4887         (Visit_Node): Ignore calls to Imported subprograms.
4888         (Visit_Node): Fix problem in finding subprogram body in some cases.
4889         (Add_Form_To_Spec): Use Defining_Entity, not Defining_Unit_Name.
4891 2015-03-04  Robert Dewar  <dewar@adacore.com>
4893         * einfo.adb (Is_ARECnF_Entity): Removed.
4894         (Last_Formal): Remove special handling of Is_ARECnF_Entity.
4895         (Next_Formal): Remove special handling of Is_ARECnF_Entity.
4896         (Next_Formal_With_Extras): Remove special handling of Is_ARECnF_Entity.
4897         (Number_Entries): Minor reformatting.
4898         * einfo.ads (Is_ARECnF_Entity): Removed.
4899         * exp_unst.adb (Unnest_Subprogram): Remove setting of
4900         Is_ARECnF_Entity.
4901         (Add_Extra_Formal): Use normal Extra_Formal circuit.
4902         * sprint.adb (Write_Param_Specs): Properly handle case where
4903         there are no source formals, but we have at least one Extra_Formal
4904         present.
4906 2015-03-04  Ed Schonberg  <schonberg@adacore.com>
4908         * sem_aggr.adb (Resolve_Record_Aggregate,
4909         Add_Discriminant_Values): If the value is a reference to the
4910         current instance of an enclosing type, use its base type to check
4911         against prefix of attribute reference, because the target type
4912         may be otherwise constrained.
4914 2015-03-04  Robert Dewar  <dewar@adacore.com>
4916         * atree.h: Add entries for Flag287-Flag309.
4917         * einfo.adb: Add (unused) flags Flag287-Flag309.
4919 2015-03-04  Ed Schonberg  <schonberg@adacore.com>
4921         * sem_util.adb (Collect_Interfaces, Collect): When gathering
4922         interfaces of ancestors, handle properly a subtype of a private
4923         extension.
4925 2015-03-04  Robert Dewar  <dewar@adacore.com>
4927         * einfo.adb (Is_ARECnF_Entity): New flag (ARECnF is an extra formal).
4928         (Next_Formal): Don't return ARECnF formal.
4929         (Last_Formal): Don't consider ARECnF formal.
4930         (Next_Formal_With_Extras): Do consider ARECnF formal.
4931         * einfo.ads (Is_ARECnF_Entity): New flag (ARECnF is an extra formal).
4932         * exp_unst.adb (Create_Entities): Set Is_ARECnF_Entity flag.
4934 2015-03-04  Javier Miranda  <miranda@adacore.com>
4936         * exp_ch6.adb (Expand_Simple_Function_Return): When the returned
4937         object is a class-wide interface object and we generate the
4938         accessibility described in RM 6.5(8/3) then displace the pointer
4939         to the object to reference the base of the object (to get access
4940         to the TSD of the object).
4942 2015-03-04  Hristian Kirtchev  <kirtchev@adacore.com>
4944         * sem_prag.adb (Analyze_Abstract_State): Use routine
4945         Malformed_State_Error to issue general errors.
4946         (Analyze_Pragma): Diagnose a syntax error related to a state
4947         declaration with a simple option.
4948         (Malformed_State_Error): New routine.
4950 2015-03-04  Robert Dewar  <dewar@adacore.com>
4952         * a-strsup.adb (Super_Slice): Deal with super flat case.
4953         * einfo.ads: Minor reformatting.
4954         * s-imgdec.adb (Set_Decimal_Digits): Add comment about possibly
4955         redundant code.
4957 2015-03-04  Claire Dross  <dross@adacore.com>
4959         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
4960         a-cforse.ads, a-cofove.ads: Use Default_Initial_Condition on formal
4961         containers.
4963 2015-03-04  Ed Schonberg  <schonberg@adacore.com>
4965         * sem_warn.adb (Check_References): When checking for an unused
4966         in-out parameter of a class- wide type, use its type to determine
4967         whether it is private, in order to avoid a spurious warning when
4968         subprogram spec and body are in different units.
4970 2015-03-04  Yannick Moy  <moy@adacore.com>
4972         * sem_attr.adb: Improve warning messages.
4974 2015-03-04  Robert Dewar  <dewar@adacore.com>
4976         * exp_ch6.adb (Expand_N_Subprogram_Body): Avoid trying to unnest
4977         generic subprograms.
4978         * exp_unst.adb (Check_Dynamic_Type): Handle record types properly
4979         (Note_Uplevel_Reference): Ignore uplevel references to non-types
4980         (Get_Level): Consider only subprograms, not blocks.
4981         (Visit_Node): Set proper condition for generating ARECnF entity.
4982         Ignore indirect calls. Ignore calls to subprograms
4983         outside our nest.
4984         (Unnest_Subprogram): Minor changes in dealing with ARECnF entity.
4985         (Add_Form_To_Spec): Properly set Last_Entity field.
4986         (Unnest_Subprogram): Set current subprogram scope for analyze calls.
4987         Handle case of no uplevel refs in outer subprogram
4988         Don't mark uplevel entities as aliased.
4989         Don't deal with calls with no ARECnF requirement.
4991 2015-03-04  Robert Dewar  <dewar@adacore.com>
4993         * s-valrea.adb (Scan_Real): Remove redundant tests from scaling loops.
4994         * s-imgdec.adb (Set_Decimal_Digits): Remove redundant Max
4995         operation in computing LZ.
4996         * sem_attr.adb: Minor typo fix
4998 2015-03-04  Robert Dewar  <dewar@adacore.com>
5000         * exp_ch7.adb: Minor reformatting.
5001         * exp_unst.adb (Build_Tables): Fix minor glitch for no separate
5002         spec case.
5003         * erroutc.adb (Delete_Msg): add missing decrement of info msg counter.
5005 2015-03-04  Hristian Kirtchev  <kirtchev@adacore.com>
5007         * exp_ch6.adb (Build_Pragma_Check_Equivalent): Suppress
5008         references to formal parameters subject to pragma Unreferenced.
5009         (Suppress_Reference): New routine.
5010         * sem_attr.adb (Analyze_Attribute): Reimplement the analysis
5011         of attribute 'Old. Attributes 'Old and 'Result now share
5012         common processing.
5013         (Analyze_Old_Result_Attribute): New routine.
5014         (Check_Placement_In_Check): Removed.
5015         (Check_Placement_In_Contract_Cases): Removed.
5016         (Check_Placement_In_Test_Case): Removed.
5017         (Check_Use_In_Contract_Cases): Removed.
5018         (Check_Use_In_Test_Case): Removed.
5019         (In_Refined_Post): Removed.
5020         (Is_Within): Removed.
5021         * sem_warn.adb (Check_Low_Bound_Tested): Code cleanup.
5022         (Check_Low_Bound_Tested_For): New routine.
5024 2015-03-04  Hristian Kirtchev  <kirtchev@adacore.com>
5026         * exp_ch3.adb (Expand_N_Object_Declaration):
5027         Generate a runtime check to test the expression of pragma
5028         Default_Initial_Condition when the object is default initialized.
5030 2015-03-02  Robert Dewar  <dewar@adacore.com>
5032         * scng.adb (Scan): Ignore illegal character in relaxed
5033         semantics mode.
5035 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
5037         * sem_ch4.adb (Analyze_Set_Membership); Retain Overloaded flag
5038         on left operand, so it can be properly resolved with type of
5039         alternatives of right operand.
5040         * sem_res.adb (Resolve_Set_Membership): Handle properly an
5041         overloaded left-hand side when the alternatives on the right
5042         hand side are literals of some universal type.  Use first
5043         non-overloaded alternative to find expected type.
5045 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
5047         * exp_ch7.adb (Make_Set_Finalize_Address_Call): Use underlying
5048         type to retrieve designated type, because the purported access
5049         type may be a partial (private) view, when it is declared in
5050         the private part of a nested package, and finalization actions
5051         are generated when completing compilation of enclosing unit.
5053 2015-03-02  Robert Dewar  <dewar@adacore.com>
5055         * back_end.adb (Call_Back_End): Remove previous patch,
5056         the back end now gets to see the result of -gnatd.1
5057         (Unnest_Subprogram_Mode) processing.
5058         * elists.ads, elists.adb (List_Length): New function.
5059         * exp_unst.ads, exp_unst.adb: Major changes, first complete version.
5060         * sem_util.adb (Check_Nested_Access): Handle formals in
5061         Unnest_Subprogram_Mode.
5062         (Adjust_Named_Associations): Minor reformatting.
5063         * sprint.adb (Sprint_Node_Actual): Fix failure to print aliased
5064         for parameters.
5066 2015-03-02  Robert Dewar  <dewar@adacore.com>
5068         * atree.ads, atree.adb (Uint24): New function
5069         (Set_Uint24): New procedure.
5070         * atree.h (Uint24): New macro for field access.
5071         * back_end.adb (Call_Back_End): For now, don't call back end
5072         if unnesting subprogs.
5073         * einfo.adb (Activation_Record_Component): New field
5074         (Subps_Index): New field.
5075         * einfo.ads (Activation_Record_Component): New field
5076         (Subps_Index): New field Minor reordering of comments into alpha order.
5077         * exp_unst.ads, exp_unst.adb: Continued development.
5079 2015-03-02  Gary Dismukes  <dismukes@adacore.com>
5081         * exp_disp.ads: Minor reformatting.
5083 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
5085         * sem_ch8.adb (Chain_Use_Clause): Do not chain use clause from
5086         ancestor to list of use clauses active in descendant unit if we
5087         are within the private part of an intervening parent, to prevent
5088         circularities in use clause list.
5090 2015-03-02  Javier Miranda  <miranda@adacore.com>
5092         * exp_ch9.adb (Build_Corresponding_Record): Propagate type
5093         invariants to the corresponding record type.
5094         * exp_disp.ad[sb] (Set_DT_Position_Value): New subprogram
5095         which sets the value of the DTC_Entity associated with a given
5096         primitive of a tagged type and propagates the value to the
5097         wrapped subprogram.
5098         (Set_DTC_Entity_Value): Propagate the DTC
5099         value to the wrapped entity.
5100         * sem_ch13.adb (Build_Invariant_Procedure): Append the code
5101         associated with invariants of progenitors.
5102         * sem_ch3.adb (Build_Derived_Record_Type): Inherit type invariants
5103         of parents and progenitors.
5104         (Process_Full_View): Check hidden inheritance of class-wide type
5105         invariants.
5106         * sem_ch7.adb (Analyze_Package_Specification): Do not generate
5107         the invariant procedure for interface types; build the invariant
5108         procedure for tagged types inheriting invariants from their
5109         progenitors.
5110         * sem_prag.adb (Pragma_Invariant) Allow invariants in interface
5111         types but do not build their invariant procedure since their
5112         invariants will be propagated to the invariant procedure of
5113         types covering the interface.
5114         * exp_ch6.adb, exp_disp.adb, sem_ch3.adb, sem_ch7.adb,
5115         sem_ch8.adb, sem_disp.adb: Replace all calls to Set_DT_Position
5116         by calls to Set_DT_Position_Value.
5118 2015-03-02  Hristian Kirtchev  <kirtchev@adacore.com>
5120         * sem_attr.adb (Analyze_Attribute): Factor out heavily indented
5121         code in Denote_Same_Function.  Do not analyze attribute 'Result
5122         when it is inside procedure _Postconditions.  Remove a misplaced
5123         warning diagnostic. Code cleanup.
5124         (Denote_Same_Function): New routine.
5125         * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Code
5126         cleanup. Warn on pre/postconditions on an inlined subprogram.
5127         (Analyze_Pragma, Refined_Post case): Warn on pre/postconditions on
5128         an inlined subprogram.
5129         (Analyze_Pre_Post_Condition_In_Decl_Part): Code cleanup. Warn on
5130         pre/post condition on an inlined subprogram.
5131         (Analyze_Test_Case_In_Decl_Part): Code cleanup. Warn on
5132         pre/postconditions on an inlined subprogram.
5133         (Check_Postcondition_Use_In_Inlined_Subprogram): New routine.
5135 2015-03-02  Hristian Kirtchev  <kirtchev@adacore.com>
5137         * sem_prag.adb (Ensure_Aggregate_Form):
5138         Ensure that the name denoted by the Chars of a pragma argument
5139         association has the proper Sloc when converted into an aggregate.
5141 2015-03-02  Bob Duff  <duff@adacore.com>
5143         * sem_ch6.adb (Check_Private_Overriding): Capture
5144         Incomplete_Or_Partial_View in a constant. This is cleaner and
5145         more efficient.
5147 2015-03-02  Gary Dismukes  <dismukes@adacore.com>
5149         * einfo.ads, exp_unst.ads: Minor reformatting.
5151 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
5153         * a-strsea.adb (Find_Token): Ensure that the range of iteration
5154         does not perform any improper character access. This prevents
5155         erroneous access in the unusual case of an empty string target
5156         and a From parameter less than Source'First.
5158 2015-03-02  Robert Dewar  <dewar@adacore.com>
5160         * elists.adb (List_Length): Fix incorrect result.
5162 2015-03-02  Bob Duff  <duff@adacore.com>
5164         * sem_ch6.adb (Check_Private_Overriding): Refine the legality
5165         checks here. It used to check that the function is merely
5166         overriding SOMEthing. Now it checks that the function is
5167         overriding a corresponding public operation. This is a correction
5168         to the implementation of the rule in RM-3.9.3(10).
5170 2015-03-02  Robert Dewar  <dewar@adacore.com>
5172         * debug.adb: Document new debug flag -gnatd.1.
5173         * einfo.ads, einfo.adb (Has_Nested_Subprogram): New flag.
5174         (Has_Uplevel_Reference): New flag (Is_Static_Type): New flag.
5175         (Uplevel_Reference_Noted):New flag (Uplevel_References): New field.
5176         * elists.ads elists.adb (List_Length): New function.
5177         * exp_ch6.adb (Expand_N_Subprogram_Body): Call Unnest_Subprogram
5178         when appropriate (Process_Preconditions): Minor code
5179         reorganization and reformatting
5180         * exp_unst.ads, exp_unst.adb: New files.
5181         * gnat1drv.adb (Adjust_Global_Switches): Set
5182         Unnest_Subprogram_Mode if -gnatd.1
5183         * namet.ads, namet.adb (Name_Find_Str): New version of Name_Find with
5184         string argument.
5185         * opt.ads (Unnest_Subprogram_Mode): New flag.
5186         * par-ch3.adb (P_Identifier_Declarations): Fixes to -gnatd.2 handling.
5187         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set
5188         Has_Nested_Subprogram flag.
5189         * sem_ch8.adb (Find_Direct_Name): New calling sequence for
5190         Check_Nested_Access.
5191         (Find_Selected_Component): Minor comment addition.
5192         * sem_util.adb (Check_Nested_Access): New version for use with Exp_Unst.
5193         (Note_Possible_Modification): New calling sequence for
5194         Check_Nested_Access.
5195         * sem_util.ads (Check_Nested_Access): New version for use with Exp_Unst.
5196         * gcc-interface/Make-lang.in (GNAT1_OBJS): Add exp_unst.o
5198 2015-03-02  Pierre-Marie de Rodat  <derodat@adacore.com>
5200         * gcc-interface/utils.c (gnat_pushdecl): For non-artificial pointer
5201         types, preserve the original type and create copies just like the C
5202         front-end does.  For artificial ones, do not define a name for
5203         the original type.
5204         (create_type_decl): When gnat_pushdecl made the input type the
5205         original type for the new declaration, do not define a stub
5206         declaration for it.
5207         * gcc-interface/utils2.c (build_binary_op): Accept two different
5208         pointer types when they point to the same type.
5210 2015-03-02  Hristian Kirtchev  <kirtchev@adacore.com>
5212         * exp_util.adb (Possible_Bit_Aligned_Component): Do not process
5213         an unanalyzed node.
5214         * sem_util.adb (Kill_Current_Values): Do not invalidate and
5215         de-null a constant.
5217 2015-03-02  Robert Dewar  <dewar@adacore.com>
5219         * sem_ch3.adb, exp_attr.adb, checks.adb, exp_aggr.adb: Minor
5220         reformatting.
5222 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
5224         * sem_ch8.adb: extend use of Available_Subtype.
5226 2015-03-02  Hristian Kirtchev  <kirtchev@adacore.com>
5228         * sem_prag.adb (Duplication_Error): Remove the special handling
5229         of 'Class or _Class in the context of pre/postconditions.
5230         (Process_Class_Wide_Condition): Remove the special handling of
5231         'Class or _Class in the context of pre/postconditions.
5232         * sem_util.adb (Original_Aspect_Pragma_Name): Names Pre_Class
5233         and Post_Class no longer need to be converted to _Pre and _Post.
5234         * sem_util.ads (Original_Aspect_Pragma_Name): Update the comment
5235         on usage.
5237 2015-03-02  Hristian Kirtchev  <kirtchev@adacore.com>
5239         * exp_ch6.adb (Process_Preconditions): Modify the
5240         mechanism that find the first source declaration to correct exit
5241         the loop once it has been found.
5243 2015-03-02  Gary Dismukes  <dismukes@adacore.com>
5245         * a-strsea.adb: Minor typo fix.
5247 2015-03-02  Bob Duff  <duff@adacore.com>
5249         * einfo.ads: Minor comment fixes.
5251 2015-03-02  Gary Dismukes  <dismukes@adacore.com>
5253         * einfo.adb, checks.adb: Minor reformatting and typo fixes.
5255 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
5257         * exp_aggr.adb (Get_Assoc_Expr): If the Default_Component_Value
5258         is defined for the array type, use it instead of a Default_Value
5259         specified for the component type itself.
5261 2015-03-02  Thomas Quinot  <quinot@adacore.com>
5263         * exp_attr.adb (Expand_N_Attribute_Reference, case Input): When
5264         expanding a 'Input attribute reference for a class-wide type,
5265         do not generate a separate object declaration for the controlling
5266         tag dummy object; instead, generate the expression inline in the
5267         dispatching call. Otherwise, the declaration (which involves a
5268         call to String'Input, returning a dynamically sized value on the
5269         secondary stack) will be expanded outside of proper secondary
5270         stack mark/release operations, and will thus cause a secondary
5271         stack leak.
5273 2015-03-02  Hristian Kirtchev  <kirtchev@adacore.com>
5275         * checks.adb (Add_Validity_Check): Change the names of all
5276         formal parameters to better illustrate their purpose. Update
5277         the subprogram documentation. Update all occurrences of the
5278         formal parameters. Generate a pre/postcondition pragma by
5279         calling Build_Pre_Post_Condition.
5280         (Build_PPC_Pragma): Removed.
5281         (Build_Pre_Post_Condition): New routine.
5282         * einfo.adb Node8 is no longer used as Postcondition_Proc. Node14
5283         is now used as Postconditions_Proc. Flag240 is now renamed to
5284         Has_Expanded_Contract.  (First_Formal): The routine can now
5285         operate on generic subprograms.
5286         (First_Formal_With_Extras): The routine can now operate on generic
5287         subprograms.
5288         (Has_Expanded_Contract): New routine.
5289         (Has_Postconditions): Removed.
5290         (Postcondition_Proc): Removed.
5291         (Postconditions_Proc): New routine.
5292         (Set_Has_Expanded_Contract): New routine.
5293         (Set_Has_Postconditions): Removed.
5294         (Set_Postcondition_Proc): Removed.
5295         (Set_Postconditions_Proc): New routine.
5296         (Write_Entity_Flags): Remove the output of Has_Postconditions. Add
5297         the output of Has_Expanded_Contract.
5298         (Write_Field8_Name): Remove the output of Postcondition_Proc.
5299         (Write_Field14_Name): Add the output of Postconditions_Proc.
5300         * einfo.ads New attributes Has_Expanded_Contract and
5301         Postconditions_Proc along with occurrences in entities.
5302         Remove attributes Has_Postconditions and Postcondition_Proc
5303         along with occurrences in entities.
5304         (Has_Expanded_Contract): New routine along with pragma Inline.
5305         (Has_Postconditions): Removed along with pragma Inline.
5306         (Postcondition_Proc): Removed along with pragma Inline.
5307         (Postconditions_Proc): New routine along with pragma Inline.
5308         (Set_Has_Expanded_Contract): New routine along with pragma Inline.
5309         (Set_Has_Postconditions): Removed along with pragma Inline.
5310         (Set_Postcondition_Proc): Removed along with pragma Inline.
5311         (Set_Postconditions_Proc): New routine along with pragma Inline.
5312         * exp_ch6.adb (Add_Return): Code cleanup. Update the
5313         generation of the call to the _Postconditions routine of
5314         the procedure.  (Expand_Non_Function_Return): Reformat the
5315         comment on usage. Code cleanup.  Update the generation of
5316         the call to the _Postconditions routine of the procedure or
5317         entry [family].
5318         (Expand_Simple_Function_Return): Update the
5319         generation of the _Postconditions routine of the function.
5320         (Expand_Subprogram_Contract): Reimplemented.
5321         * exp_ch6.ads (Expand_Subprogram_Contract): Update the parameter
5322         profile along the comment on usage.
5323         * exp_ch9.adb (Build_PPC_Wrapper): Code cleanup.
5324         (Expand_N_Task_Type_Declaration): Generate pre/postconditions
5325         wrapper when the entry [family] has a contract with
5326         pre/postconditions.
5327         * exp_prag.adb (Expand_Attributes_In_Consequence): New routine.
5328         (Expand_Contract_Cases): This routine and its subsidiaries now
5329         analyze all generated code.
5330         (Expand_Old_In_Consequence): Removed.
5331         * sem_attr.adb Add with and use clause for Sem_Prag.
5332         (Analyze_Attribute): Reimplment the analysis of attribute 'Result.
5333         (Check_Use_In_Test_Case): Use routine Test_Case_Arg to obtain
5334         "Ensures".
5335         * sem_ch3.adb (Analyze_Declarations): Analyze the contract of
5336         a generic subprogram.
5337         (Analyze_Object_Declaration): Do not create a contract node.
5338         (Derive_Subprogram): Do not create a contract node.
5339         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Do
5340         not create a contract node.
5341         (Analyze_Completion_Contract): New routine.
5342         (Analyze_Function_Return): Alphabetize.
5343         (Analyze_Generic_Subprogram_Body): Alphabetize. Do not create a
5344         contract node.  Do not copy pre/postconditions to the original
5345         generic template.
5346         (Analyze_Null_Procedure): Do not create a contract node.
5347         (Analyze_Subprogram_Body_Contract): Reimplemented.
5348         (Analyze_Subprogram_Body_Helper): Do not mark the enclosing scope
5349         as having postconditions. Do not create a contract node. Analyze
5350         the subprogram body contract of a body that acts as a compilation
5351         unit. Expand the subprogram contract after the declarations have
5352         been analyzed.
5353         (Analyze_Subprogram_Contract): Reimplemented.
5354         (Analyze_Subprogram_Specification): Do not create a contract node.
5355         (List_Inherited_Pre_Post_Aspects): Code cleanup.
5356         * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Update the
5357         comment on usage.
5358         (Analyze_Subprogram_Contract): Update the
5359         parameter profile and the comment on usage.
5360         * sem_ch7.adb (Analyze_Package_Body_Helper): Do not create a
5361         contract node.
5362         (Analyze_Package_Declaration): Do not create a
5363         contract node.
5364         (Is_Subp_Or_Const_Ref): Ensure that the prefix has an entity.
5365         * sem_ch8.adb (Analyze_Subprogram_Renaming): Do not create a
5366         contract node.
5367         * sem_ch9.adb (Analyze_Entry_Declaration): Do not create a
5368         contract node.
5369         * sem_ch10.adb (Analyze_Compilation_Unit): Move local variables to
5370         their proper section and alphabetize them. Analyze the contract of
5371         a [generic] subprogram after all Pragmas_After have been analyzed.
5372         (Analyze_Subprogram_Body_Stub_Contract): Alphabetize.
5373         * sem_ch12.adb (Analyze_Generic_Package_Declaration): Do not
5374         create a contract node.
5375         (Analyze_Generic_Subprogram_Declaration):
5376         Alphabetize local variables. Do not create a contract
5377         node. Do not generate aspects out of pragmas for ASIS.
5378         (Analyze_Subprogram_Instantiation): Instantiate
5379         the contract of the subprogram.  Do not create a
5380         contract node.  (Instantiate_Contract): New routine.
5381         (Instantiate_Subprogram_Body): Alphabetize local variables.
5382         (Save_Global_References_In_Aspects): New routine.
5383         (Save_References): Do not save the global references found within
5384         the aspects of a generic subprogram.
5385         * sem_ch12.ads (Save_Global_References_In_Aspects): New routine.
5386         * sem_ch13.adb (Analyze_Aspect_Specifications): Do not use
5387         Original_Node for establishing linkages.
5388         (Insert_Pragma): Insertion in a subprogram body takes precedence over
5389         the case where the subprogram body is also a compilation unit.
5390         * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Use
5391         Get_Argument to obtain the proper expression. Install the generic
5392         formals when the related context is a generic subprogram.
5393         (Analyze_Depends_In_Decl_Part): Use Get_Argument to obtain
5394         the proper expression. Use Corresponding_Spec_Of to obtain
5395         the spec. Install the generic formal when the related context
5396         is a generic subprogram.
5397         (Analyze_Global_In_Decl_Part): Use Get_Argument to obtain the proper
5398         expression. Use Corresponding_Spec_Of to obtain the spec. Install the
5399         generic formal when the related context is a generic subprogram.
5400         (Analyze_Initial_Condition_In_Decl_Part): Use Get_Argument
5401         to obtain the proper expression. Remove the call to
5402         Check_SPARK_Aspect_For_ASIS as the analysis is now done
5403         automatically.
5404         (Analyze_Pragma): Update all occurrences
5405         to Original_Aspect_Name. Pragmas Contract_Cases, Depends,
5406         Extensions_Visible, Global, Postcondition, Precondition and
5407         Test_Case now carry generic templates when the related context
5408         is a generic subprogram. The same pragmas are no longer
5409         forcefully fully analyzed when the context is a subprogram
5410         that acts as a compilation unit. Pragmas Abstract_State,
5411         Initial_Condition, Initializes and Refined_State have been clean
5412         up. Pragmas Post, Post_Class, Postcondition, Pre, Pre_Class
5413         and Precondition now use the same routine for analysis. Pragma
5414         Refined_Post does not need to check the use of 'Result or
5415         the lack of a post-state in its expression. Reimplement the
5416         analysis of pragma Test_Case.
5417         (Analyze_Pre_Post_Condition): New routine.
5418         (Analyze_Pre_Post_Condition_In_Decl_Part):
5419         Reimplemented.
5420         (Analyze_Refined_Depends_In_Decl_Part): Use Get_Argument to obtain the
5421         proper expression.
5422         (Analyze_Refined_Global_In_Decl_Part): Use Get_Argument to obtain
5423         the proper expression.
5424         (Analyze_Test_Case_In_Decl_Part): Reimplemented.
5425         (Check_Pre_Post): Removed.
5426         (Check_Precondition_Postcondition): Removed.
5427         (Check_SPARK_Aspect_For_ASIS): Removed.
5428         (Check_Test_Case): Removed.
5429         (Collect_Subprogram_Inputs_Outputs): Use Get_Argument
5430         to obtain the proper expression. Use Corresponding_Spec_Of to
5431         find the proper spec.
5432         (Create_Generic_Template): New routine.
5433         (Duplication_Error): New routine.
5434         (Expression_Function_Error): New routine.
5435         (Find_Related_Subprogram_Or_Body): Moved to the spec
5436         of Sem_Prag. Emit precise error messages. Account for cases of
5437         rewritten expression functions, generic instantiations, handled
5438         sequence of statements and pragmas from aspects.
5439         (Get_Argument): New routine.
5440         (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Removed.
5441         (Preanalyze_CTC_Args): Removed.
5442         (Process_Class_Wide_Condition): New routine.
5443         * sem_prag.ads (Analyze_Test_Case_In_Decl_Part): Update
5444         the parameter profile along with the comment on usage.
5445         (Find_Related_Subprogram_Or_Body): Moved from the body of Sem_Prag.
5446         (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Removed.
5447         (Test_Case_Arg): New routine.
5448         * sem_util.adb Add with and use clauses for Sem_Ch6.
5449         (Add_Contract_Item): This routine now creates a contract
5450         node the first time an item is added. Remove the duplicate
5451         aspect/pragma checks.
5452         (Check_Result_And_Post_State): Reimplemented.
5453         (Corresponding_Spec_Of): New routine.
5454         (Get_Ensures_From_CTC_Pragma): Removed.
5455         (Get_Requires_From_CTC_Pragma): Removed.
5456         (Has_Significant_Contract): New routine.
5457         (Inherit_Subprogram_Contract): Inherit only if the source
5458         has a contract.
5459         (Install_Generic_Formals): New routine.
5460         (Original_Aspect_Name): Removed.
5461         (Original_Aspect_Pragma_Name): New routine.
5462         * sem_util.ads (Check_Result_And_Post_State): Reimplemented.
5463         (Corresponding_Spec_Of): New routine.
5464         (Get_Ensures_From_CTC_Pragma): Removed.
5465         (Get_Requires_From_CTC_Pragma): Removed.
5466         (Has_Significant_Contract): New routine.
5467         (Install_Generic_Formals): New routine.
5468         (Original_Aspect_Name): Removed.
5469         (Original_Aspect_Pragma_Name): New routine.
5470         * sem_warn.adb Add with and use clauses for Sem_Prag.
5471         (Within_Postcondition): Use Test_Case_Arg to extract "Ensures".
5473 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
5475         * sem_ch8.adb (Available_Subtype): Optimization in
5476         Find_Selected_Component: when safe, use existing subtype of
5477         array component, possibly discriminant-dependent, rather than
5478         creating new subtype declaration for it. In this fashion different
5479         occurrences of the component have the same subtype, rather than
5480         just equivalent ones. Simplifies value tracing in GNATProve.
5482 2015-03-01  Arnaud Charlet  <charlet@adacore.com>
5484         PR ada/65259
5486         * doc/gnat_ugn/gnat_project_manager.rst,
5487         doc/gnat_ugn/platform_specific_information.rst: Remove reference to
5488         image, too troublesome with texi format.
5489         * gnat_ugn.texi: Regenerate.
5491 2015-02-24  Thomas Schwinge  <thomas@codesourcery.com>
5493         PR libgomp/64625
5494         * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8): Remove.
5495         (DEF_FUNCTION_TYPE_VAR_12): Likewise.
5496         (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
5498 2015-02-23  Thomas Schwinge  <thomas@codesourcery.com>
5500         * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8): Fix number of
5501         arguments parameter.
5502         (DEF_FUNCTION_TYPE_VAR_12): Likewise.
5504 2015-02-22  Arnaud Charlet  <charlet@adacore.com>
5506         * doc/Makefile: postprocess texinfo files to update @dircategory
5507         and update texi files under gcc/ada.
5508         * gnat_ugn.texi, gnat_rm.texi: Regenerated.
5510 2015-02-22  Arnaud Charlet  <charlet@adacore.com>
5512         * doc/gnat_ugn/project-manager-figure.png,
5513         doc/gnat_ugn/rtlibrary-structure.png: New.
5515 2015-02-22  Tom de Vries  <tom@codesourcery.com>
5517         PR ada/65100
5518         * gnat-style.texi (@subsection Loop Statements): Replace @noindent by
5519         @item, and fix warning '@itemize has text but no @item'.
5521 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
5523         * sem_prag.adb (Analyze_Pragma, case Obsolescent): Pragma
5524         legally applies to an abstract subprogram declaration.
5525         * freeze.adb: Minor comment addition.
5527 2015-02-20  Robert Dewar  <dewar@adacore.com>
5529         * errout.ads: Document replacement of Name_uPre/Post/Type_Invariant.
5530         * erroutc.adb (Set_Msg_Str): Replace _xxx.
5531         (Pre/Post/Type_Invariant) by xxx'Class.
5532         * erroutc.ads (Set_Msg_Str): Replace _xxx.
5533         (Pre/Post/Type_Invariant) by xxx'Class.
5534         * sem_prag.adb (Fix_Error): Remove special casing of
5535         Name_uType_Invariant.
5536         (Analyze_Pre_Post_Condition_In_Decl_Part): Remove special casing of
5537         Name_uPre and Name_uPost in aspect case (done in Errout now).
5539 2015-02-20  Robert Dewar  <dewar@adacore.com>
5541         * g-alveop.adb: Minor style fixes.
5543 2015-02-20  Robert Dewar  <dewar@adacore.com>
5545         * freeze.adb (Warn_Overlay): Guard against blow up with address
5546         clause.
5548 2015-02-20  Bob Duff  <duff@adacore.com>
5550         * exp_attr.adb (May_Be_External_Call): Remove this. There is no need
5551         for the compiler to guess whether the call is internal or external --
5552         it is always external.
5553         (Expand_Access_To_Protected_Op): For P'Access, where P
5554         is a protected subprogram, always create a pointer to the
5555         External_Subprogram.
5557 2015-02-20  Robert Dewar  <dewar@adacore.com>
5559         * a-dispat.adb, a-stcoed.ads: Minor reformatting.
5561 2015-02-20  Robert Dewar  <dewar@adacore.com>
5563         * sem_ch13.adb (Build_Discrete_Static_Predicate): Allow static
5564         predicate for non-static subtype.
5565         (Build_Predicate_Functions): Do not assume subtype associated with a
5566         static predicate must be static.
5568 2015-02-20  Robert Dewar  <dewar@adacore.com>
5570         * errout.adb (Set_Msg_Node): Better handling of internal names
5571         (Set_Msg_Node): Kill message when we cannot eliminate internal name.
5572         * errout.ads: Document additional case of message deletion.
5573         * namet.adb (Is_Internal_Name): Refined to consider wide
5574         strings in brackets notation and character literals not to be
5575         internal names.
5576         * sem_ch8.adb (Find_Selected_Component): Give additional error
5577         when selector name is a subprogram whose first parameter has
5578         the same type as the prefix, but that type is untagged.
5580 2015-02-20  Robert Dewar  <dewar@adacore.com>
5582         * g-allein.ads, g-alveop.adb, g-alveop.ads, opt.ads: Minor reformatting
5584 2015-02-20  Tristan Gingold  <gingold@adacore.com>
5586         * opt.ads (GNAT_Mode_Config): New variable.
5587         * opt.adb (Set_Opt_Config_Switches): Consider GNAT_Mode_Config
5588         to set Assertions_Enabled.
5589         * switch-c.adb (Scan_Front_End_Switches): Set GNAT_Mode_Config
5590         for -gnatg.
5592 2015-02-20  Robert Dewar  <dewar@adacore.com>
5594         * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Add an additional
5595         comment regarding the handling of unterminated fixed-point
5596         constants.
5597         * s-valuns.ads (Scan_Raw_Unsigned): Add comments
5598         corresponding to those previously added for
5599         System.Val_LLU.Scan_Raw_Long_Long_Unsigned.
5601 2015-02-20  Olivier Hainque  <hainque@adacore.com>
5603         * g-allein.ads, g-alveop.ads, g-alveop.adb: Code clean ups.
5605 2015-02-20  Robert Dewar  <dewar@adacore.com>
5607         * sem_prag.adb: Minor comment clarification.
5609 2015-02-20  Olivier Hainque  <hainque@adacore.com>
5611         * g-allein.ads (vec_ctf, vec_vcsfx, vec_vcfux): Remove.
5612         * g-alleve.ads, g-alleva.adb (vcfux): Likewise.
5613         * g-alveop.ads (vec_vcfsx, vec_vcfux): Just rename the ll versions.
5614         (vec_ctf): Now renamings as well.
5616 2015-02-20  Robert Dewar  <dewar@adacore.com>
5618         * switch-c.adb, bindgen.adb: Minor reformatting.
5620 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
5622         * sem_prag.adb (Analyze_Pragma, case Type_Invariant):
5623         Invariant'class is allowed on an abstract type.
5625 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
5627         * sem_ch3.adb (Access_Definition): If the access definition is
5628         for a protected component and defines an access to protected
5629         subprogram, do not create an itype reference for it because a
5630         full type declaration will be built in order to generate the
5631         proper equivalent type.
5632         (Analyze_Subtype_Declaration): Add information of incomplete
5633         subtypes, for Ada 2012 extended uses of incomplete types.
5635 2015-02-20  Gary Dismukes  <dismukes@adacore.com>
5637         * sem_res.adb: Minor reformatting.
5639 2015-02-20  Vincent Celier  <celier@adacore.com>
5641         * switch-c.adb (Scan_Front_End_Switches): When comparing runtime
5642         path name for several switches --RTS, use the normalized path
5643         names.
5645 2015-02-20  Vincent Celier  <celier@adacore.com>
5647         * bindgen.adb: Minor reformatting and code reorganization.
5649 2015-02-20  Jose Ruiz  <ruiz@adacore.com>
5651         * a-stcoed.ads: Add spec for this package (Unimplemented_Unit).
5652         * impunit.adb (Non_Imp_File_Names_12): Mark unit a-stcoed.ads as
5653         defined by Ada 2012.
5655 2015-02-20  Arnaud Charlet  <charlet@adacore.com>
5657         * sysdep.c, expect.c, s-oscons-tmplt.c, gsocket.h, adaint.c: Remove
5658         obsolete references to RTX, nucleus, VMS.
5660 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
5662         * sem_prag.adb (Fix_Error): For an illegal Type_Invariant'Class
5663         aspect, use name that mentions Class explicitly, rather than
5664         compiler-internal name.
5666 2015-02-20  Robert Dewar  <dewar@adacore.com>
5668         * debug.adb: Add documentation for -gnatd.2 (allow statements
5669         in decl sequences).
5670         * par-ch3.adb (P_Identifier_Declarations): Handle
5671         statement appearing where declaration expected more cleanly.
5672         (Statement_When_Declaration_Expected): Implement debug flag
5673         -gnatd.2.
5675 2015-02-20  Jose Ruiz  <ruiz@adacore.com>
5677         * a-dinopr.ads: Add spec for this package (Unimplemented_Unit).
5678         * a-dispat.ads (Yield): Include procedure added in Ada 2012.
5679         * a-dispat.adb (Yield): Implement procedure added in Ada 2012.
5680         * impunit.adb (Non_Imp_File_Names_05): Mark unit a-dinopr.ads as
5681         defined by Ada 2005.
5682         * snames.ads-tmpl (Name_Non_Preemptive_FIFO_Within_Priorities):
5683         This is the correct name for the dispatching policy (FIFO was
5684         missing).
5686 2015-02-20  Javier Miranda  <miranda@adacore.com>
5688         * sem_res.adb (Resolve_Type_Conversion): If the type of the
5689         operand is the limited-view of a class-wide type then recover
5690         the class-wide type of the non-limited view.
5692 2015-02-20  Arnaud Charlet  <charlet@adacore.com>
5694         * gcc-interface/Makefile.in: Remove references to nucleus.
5695         * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Procedure): Set
5696         extern_flag to true for Inline_Always subprograms with
5697         Intrinsic convention.
5699 2015-02-20  Yannick Moy  <moy@adacore.com>
5701         * sem_prag.ads: Minor typo in comment.
5703 2015-02-20  Pascal Obry  <obry@adacore.com>
5705         * s-osprim-mingw.adb: Fix Get_Base_Time parameter mode.
5707 2015-02-20  Vincent Celier  <celier@adacore.com>
5709         * makeutl.adb (Get_Directories.Add_Dir): Add a directory only
5710         if it exists.
5712 2015-02-20  Robert Dewar  <dewar@adacore.com>
5714         * sem_eval.ads: Minor reformatting.
5716 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
5718         * freeze.adb (Size_Known): Do not set the packed size for
5719         independent type or component.
5720         (Freeze_Array_Type): Check for Independent[_Components] with packing
5721         or explicit component size clause.
5722         * gnat1drv.adb (Post_Compilation_Validation_Checks): Do the validation
5723         of independence pragmas only for non-GCC back-ends.
5724         * sem_ch13.adb (Initialize): Likewise for the initialization.
5725         * sem_prag.adb (Record_Independence_Check): New procedure to record an
5726         independence check in the table.
5727         (Analyze_Pragma): Use it throughout instead of doing it manually.
5728         * gcc-interface/decl.c (gnat_to_gnu_field): Add support for
5729         independent type or component.
5731 2015-02-20  Thomas Quinot  <quinot@adacore.com>
5733         * adaint.c (__gnat_readdir): For Solaris, use 64 bit variants of
5734         struct direct and readdir. This is required for NFS filesystems
5735         mounted from servers that use 64-bit cookies.
5737 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
5739         * sem_ch12.adb (Analyze_Subprogram_Instantiaion): New subprogram
5740         Build_Subprogram_Renaming, to create renaming of subprogram
5741         instance in the the declaration of the wrapper package rather
5742         than in its body, so that it is available for analysis of aspects
5743         propagated from generic to instantiation.
5744         (Check_Mismatch): An actual for a formal package that is an
5745         incomplete type matches a formal type that is incomplete.
5746         (Instantiate_Package_Body): Move code that builds subprogram
5747         renaming to Analyze_Subprogram_Instantiation.
5748         (Instantiate_Type): The generated subtype is a limited view if
5749         the actual is a limited view.
5750         (Load_Parent_Of_Generic): Retrieve instance declaration from
5751         its new position within wrapper package.
5753 2015-02-20  Arnaud Charlet  <charlet@adacore.com>
5755         * s-parame-vxworks.adb, s-os_lib.ads: Update comments.
5757 2015-02-20  Robert Dewar  <dewar@adacore.com>
5759         * s-osinte-vxworks.ads (To_Timespec): Add comment about the
5760         issue of negative arguments.
5762 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
5764         * gnat1drv.adb: Minor consistency fix.
5766 2015-02-20  Pascal Obry  <obry@adacore.com>
5768         * s-osprim-mingw.adb (Get_Base_Time): Properly release lock in all
5769         paths.
5771 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
5773         * inline.adb (Expand_Inlined_Call): Skip again calls to subprogram
5774         renamings.
5775         * exp_ch6.adb (Expand_Call): Use back-end inlining
5776         instead of expansion for simple subprogram renamings.
5778 2015-02-20  Robert Dewar  <dewar@adacore.com>
5780         * exp_util.adb: Minor reformatting.
5782 2015-02-20  Vincent Celier  <celier@adacore.com>
5784         * switch-c.adb (Scan_Front_End_Switches): Do not fail when --RTS=
5785         is specified several times with different values that indicates
5786         the same runtime directory.
5788 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
5790         * sem_attr.adb (Check_Not_Incomplete_Type): Clean up code to
5791         handle properly illegal uses of attributes on prefixes on an
5792         incomplete type, both when the type of the prefix is locally
5793         incomplete, and when it is a limited view of a type whose
5794         non-limited view is not available.
5795         (Analyze_Attribute): Add calls to Check_Not_Incomplete_Type for
5796         'Address and others.
5798 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
5800         * exp_ch6.adb: Fix minor typo in comment.
5802 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
5804         * sinfo.ads: Add comment.
5806 2015-02-20  Olivier Hainque  <hainque@adacore.com>
5808         * opt.ads: Replace Opt.Suppress_All_Inlining by two separate
5809         flags controlling the actual FE inlining out of pragma Inline
5810         and pragma Inline_Always.
5811         * adabkend.adb (Scan_Compiler_Arguments): Set both flags to True
5812         on -fno-inline, which disables all inlining in compilers with
5813         an Ada back-end and without back-end inlining support.
5814         * back_end.adb (Scan_Back_End_Switches): Set the Inline related
5815         flag to True on -fno-inline and leave Inline_Always alone for
5816         gcc back-ends.
5817         * back_end.ads (Scan_Compiler_Arguments): Adjust spec wrt the
5818         names of the Opt flags it sets.
5819         * gnat1drv.adb (Adjust_Global_Switches): Remove test on
5820         Opt.Suppress_All_Inlining in the Back_End_Inlining computation.
5821         * sem_prag.adb (Make_Inline): Remove early return conditioned
5822         on Opt.Suppress_All_Inlining.
5823         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Use the flags to
5824         disable the calls to Build_Body_To_Inline otherwise triggered
5825         by pragma Inline or Inline_Always. This will prevent actual
5826         front-end inlining of the subprogram on calls.
5828 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
5830         * exp_ch3.adb (Default_Initialize_Object): Call Add_Inlined_Body on the
5831         Abort_Undefer_Direct function.
5832         * exp_ch5.adb (Expand_N_Assignment_Statement): Likewise.
5833         * exp_intr.adb (Expand_Unc_Deallocation): Likewise.
5834         * exp_prag.adb (Expand_Pragma_Abort_Defer): Likewise.
5835         * exp_ch4.adb (Expand_N_Selected_Component): Adjust call to
5836         Add_Inlined_Body.
5837         * exp_ch6.adb (Expand_Call): Adjust calls to Add_Inlined_Body.
5838          Remove call to Register_Backend_Call and move code resetting
5839         Needs_Debug_Info on inlined subprograms to...
5840         * inline.ads (Add_Inlined_Body): Add N parameter.
5841         (Register_Backend_Call): Delete.
5842         * inline.adb (Add_Inlined_Body): ...here and simplify.
5843          Register the call with Backend_Calls directly.
5844         (Register_Backend_Call): Delete.
5845         * s-stalib.ads (Abort_Undefer_Direct): Restore pragma Inline.
5847 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
5849         * s-stalib.ads: Fix typo.
5851 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
5853         * exp_ch3.adb (Default_Initialize_Object): If the object has a
5854         delayed freeze, the actions associated with default initialization
5855         must be part of the freeze actions, rather that being inserted
5856         directly after the object declaration.
5858 2015-02-20  Robert Dewar  <dewar@adacore.com>
5860         * lib-load.adb: Minor comment update.
5862 2015-02-20  Vincent Celier  <celier@adacore.com>
5864         * prj-proc.adb (Process_Case_Construction): When there are
5865         incomplete withed projects and the case variable is unknown,
5866         skip the case construction.
5868 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
5870         * exp_ch6.adb (Expand_Actuals): Add caller-side invariant checks
5871         when an actual is a view conversion, either because the call is
5872         to an inherited operation, or because the actual is an explicit
5873         type conversion to an ancestor type.  Fixes ACATS 4.0D: C732001
5875 2015-02-20  Robert Dewar  <dewar@adacore.com>
5877         * einfo.ads: Minor comment updates Fix missing pragma Inline
5878         for Set_Partial_View_Has_Unknown_Discr.
5879         * einfo.adb (Write_Entity_Flags): Add missing entry for
5880         Partial_View_Has_Unknown_Discr.
5881         * sem_ch3.adb: Minor reformatting.
5883 2015-02-20  Vincent Celier  <celier@adacore.com>
5885         * opt.ads: Minor cleanup: remove mention of gprmake.
5886         * s-stalib.ads (Abort_Undefer_Direct): Do not inline.
5887         * s-tataat.adb: Do not call System.Tasking.Self but directly
5888         System.Task_Primitives.Operations.Self.
5890 2015-02-20  Arnaud Charlet  <charlet@adacore.com>
5892         * gnat_rm.texi, gnat_ugn.texi: Now automatically generated from
5893         sphinx in the doc directory.
5894         * doc: New directory containing sphinx versions of gnat_rm and gnat_ugn
5896 2015-02-20  Robert Dewar  <dewar@adacore.com>
5898         * sem_res.adb: Minor reformatting.
5899         * exp_ch9.adb (Build_Protected_Spec): Copy Aliased setting when
5900         building spec.
5901         * sem_ch13.adb (Analyze_Aspect_Specifications): Exclude Boolean
5902         aspects from circuitry setting delay required to false if the
5903         argument is an integer literal.
5905 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
5907         * einfo.ads. einfo.adb (Partial_View_Has_Unknown_Discr):  New flag
5908         on type entities, to enforce AI12-0133: default initialization
5909         of types whose partial view has unknown discriminants does not
5910         get an invariant check, because clients of the unit can never
5911         declare objects of such types.
5912         * sem_ch3.adb (Find_Type_Name); Set new flag
5913         Partial_View_Has_Unknown_Discr when needed.
5914         * exp_ch3.adb (Expand_N_Object_Declaration): Use flag to suppress
5915         generation of invariant call on default-initialized object.
5917 2015-02-08  Eric Botcazou  <ebotcazou@adacore.com>
5919         * gcc-interface/decl.c (gnat_to_gnu_param): Do not strip the padding
5920         if the parameter either is passed by reference or if the alignment
5921         would be lowered.
5923 2015-02-08  Eric Botcazou  <ebotcazou@adacore.com>
5925         * gcc-interface/decl.c (is_cplusplus_method): Use Is_Primitive flag to
5926         detect primitive operations of tagged and untagged types.
5928 2015-02-08  Eric Botcazou  <ebotcazou@adacore.com>
5930         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not bother about alias
5931         sets in presence of derivation for subprogram types.
5933 2015-02-08  Eric Botcazou  <ebotcazou@adacore.com>
5935         * gcc-interface/utils.c (begin_subprog_body): Assert that the body is
5936         present in the same context as the declaration.
5938 2015-02-07  Jakub Jelinek  <jakub@redhat.com>
5940         PR middle-end/64340
5941         * gcc-interface/trans.c (gigi): Recreate optimization_default_node
5942         and optimization_current_node after tweaking global_options.
5944 2015-02-05  Robert Dewar  <dewar@adacore.com>
5946         * prj-proc.adb, sem_aux.adb, exp_ch9.adb, errout.adb, prj-dect.adb,
5947         prj-nmsc.adb: Minor reformatting.
5949 2015-02-05  Ed Schonberg  <schonberg@adacore.com>
5951         * sem_type.adb (Covers): In ASIS_Mode the Corresponding_Record
5952         of a protected type may not be available, so to check conformance
5953         with an interface type, examine the interface list in the type
5954         declaration directly.
5955         (Write_Overloads): Improve information for indirect calls,
5956         for debugger use.
5958 2015-02-05  Ed Schonberg  <schonberg@adacore.com>
5960         * exp_ch3.adb (Make_Tag_Assignment): Do not perform this
5961         expansion activity in ASIS mode.
5963 2015-02-05  Javier Miranda  <miranda@adacore.com>
5965         * errout.adb (Error_Msg_PT): Add missing error.
5966         * sem_ch6.adb (Check_Synchronized_Overriding): Check the missing
5967         RM rule.  Code cleanup.
5968         * exp_ch9.adb (Build_Wrapper_Spec): Propagate "constant" in
5969         anonymous access types.  Found working on the tests. Code cleanup.
5971 2015-02-05  Vincent Celier  <celier@adacore.com>
5973         * prj-dect.adb (Parse_Attribute_Declaration): Continue scanning
5974         when there are incomplete withs.
5975         * prj-nmsc.adb (Process_Naming): Do not try to get the value
5976         of an element when it is nil.
5977         (Check_Naming): Do not check a nil suffix for illegality
5978         * prj-proc.adb (Expression): Do not process an empty term.
5979         * prj-strt.adb (Attribute_Reference): If attribute cannot be
5980         found, parse a possible index to avoid cascading errors.
5982 2015-02-05  Ed Schonberg  <schonberg@adacore.com>
5984         * sem_aux.adb (Is_Derived_Type): A subprogram_type generated
5985         for an access_to_subprogram declaration is not a derived type.
5987 2015-02-05  Robert Dewar  <dewar@adacore.com>
5989         * errout.adb (Error_Msg_Internal): For non-serious error set
5990         Fatal_Error to Ignored.
5991         * lib-load.adb (Load_Unit): Minor comment updates.
5992         * sem_ch10.adb (Analyze_With_Clause): Propagate Fatal_Error
5993         setting from with'ed unit to with'ing unit.
5994         * sem_prag.adb (Analyze_Pragma, case Warnings): Document handling
5995         of ambiguity.
5997 2015-02-05  Yannick Moy  <moy@adacore.com>
5999         * sem_prag.adb, par-prag.adb: Minor code clean up.
6001 2015-02-05  Yannick Moy  <moy@adacore.com>
6003         * par-prag.adb (Pragma_Warnings): Update for extended form
6004         of pragma Warnings. The "one" argument case may now have 2 or
6005         3 arguments.
6006         * sem_prag.adb (Analyze_Pragma/Pragma_Warnings): Update for
6007         extended form of pragma Warnings. Pragma with tool name is either
6008         rewritten as null or as an equivalent form without tool name,
6009         before reanalysis.
6010         * snames.ads-tmpl (Name_Gnatprove): New name.
6012 2015-02-05  Robert Dewar  <dewar@adacore.com>
6014         * sem_ch13.adb (Add_Invariants): Don't assume invariant is
6015         standard Boolean.
6016         * sem_prag.adb (Analyze_Pragma, case Check): Don't assume
6017         condition is standard Boolean, it can be non-standard derived
6018         Boolean.
6020 2015-02-05  Robert Dewar  <dewar@adacore.com>
6022         * checks.adb (Enable_Range_Check): Disconnect attempted
6023         optimization for the case of range check for subscript of
6024         unconstrained array.
6026 2015-02-05  Robert Dewar  <dewar@adacore.com>
6028         * par-ch13.adb (With_Present): New function
6029         (Aspect_Specifications_Present): Handle WHEN in place of WITH
6030         (Get_Aspect_Specifications): Comment update.
6031         * par.adb: Comment updates.
6033 2015-02-05  Robert Dewar  <dewar@adacore.com>
6035         * errout.adb (Handle_Serious_Error): New setting of Fatal_Error.
6036         * frontend.adb (Frontend): New setting of Fatal_Error.
6037         * lib-load.adb (Create_Dummy_Package_Unit): New setting of
6038         Fatal_Error.
6039         (Load_Main_Source): New setting of Fatal_Error
6040         (Load_Unit): New setting of Fatal_Error.
6041         * lib-writ.adb (Add_Preprocessing_Dependency): New setting of
6042         Fatal_Error.
6043         (Ensure_System_Dependency): New setting of Fatal_Error.
6044         * lib.adb (Fatal_Error): New setting of Fatal_Error
6045         (Set_Fatal_Error): New setting of Fatal_Error.
6046         * lib.ads: New definition of Fatal_Error and associated routines.
6047         * par-ch10.adb (P_Compilation_Unit): New setting of Fatal_Error.
6048         * par-load.adb (Load): New setting of Fatal_Error.
6049         * rtsfind.adb (Load_RTU): New setting of Fatal_Error.
6050         * sem_ch10.adb (Analyze_Compilation_Unit): New setting of
6051         Fatal_Error.
6052         (Optional_Subunit): New setting of Fatal_Error.
6053         (Analyze_Proper_Body): New setting of Fatal_Error.
6054         (Load_Needed_Body): New setting of Fatal_Error.
6056 2015-02-05  Ed Schonberg  <schonberg@adacore.com>
6058         * sem_res.adb (Resolve_Call): If the function being called has
6059         out parameters do not check for language version if the function
6060         comes from a predefined unit, as those are always compiled in
6061         Ada 2012 mode.
6063 2015-02-05  Ed Schonberg  <schonberg@adacore.com>
6065         * sem_ch3.adb (Process_Full_View): Verify that the full view
6066         of a type extension must carry an explicit limited keyword if
6067         the partial view does (RM 7.3 (10.1)).
6069 2015-02-05  Robert Dewar  <dewar@adacore.com>
6071         * g-rannum.adb, g-rannum.ads, s-rannum.adb, s-rannum.ads,
6072         sem_warn.ads: Minor reformatting.
6073         * exp_ch13.adb (Expand_N_Freeze_Entity): Add guard for aspect
6074         deleted by -gnatI.
6075         * sem_prag.adb (Analyze_Pragma, case Type_Invariant): Give
6076         error for abstract type.
6078 2015-02-05  Yannick Moy  <moy@adacore.com>
6080         * opt.ads (Warn_On_Suspicious_Contract): Update comment
6081         describing use.
6082         * sem_attr.adb (Analyze_Attribute/Attribute_Update): Warn on
6083         suspicious uses of 'Update.
6084         * sem_warn.adb, sem_warn.ads (Warn_On_Suspicious_Update): New
6085         function issues warning on suspicious uses of 'Update.
6086         * g-rannum.adb, g-rannum.ads, s-rannum.adb, s-rannum.ads: Mark
6087         package spec and body as SPARK_Mode Off.
6089 2015-02-05  Robert Dewar  <dewar@adacore.com>
6091         * sem_prag.adb (Set_Elab_Unit_Name): New name for Set_Unit_Name
6092         (Analyze_Pragma): Change Set_Unit_Name to Set_Elab_Unit_Name
6093         (Set_Elab_Unit_Name): Generate reference for Elaborate[_All]
6094         * sem_warn.adb (Warn_On_Unreferenced_Entity): Suppress warning
6095         for exported entity.
6097 2015-02-05  Hristian Kirtchev  <kirtchev@adacore.com>
6099         * sem_prag.adb (Check_Pragma_Conformance): Add
6100         local variable Arg. Ensure that all errors are associated with
6101         the pragma if it appears without an argument. Add comments on
6102         various cases.
6104 2015-02-05  Robert Dewar  <dewar@adacore.com>
6106         * lib-xref.adb: Minor reformatting.
6108 2015-02-05  Tristan Gingold  <gingold@adacore.com>
6110         PR ada/64349
6111         * env.c: Fix thinko: handle Darwin case before default one.
6113 2015-01-30  Robert Dewar  <dewar@adacore.com>
6115         * a-assert.adb: Minor reformatting.
6116         * sem_ch13.adb: Minor comment clarification.
6117         * types.ads: Minor comment update.
6118         * sem_eval.adb (Real_Or_String_Static_Predicate_Matches): Avoid blow up
6119         when we have a predicate that is nothing but an inherited dynamic
6120         predicate.
6122 2015-01-30  Jerome Guitton  <guitton@adacore.com>
6124         * gcc-interface/Makefile.in (x86-vxworks): Update GCC_SPEC_FILES to
6125         include cert link spec.
6127 2015-01-30  Robert Dewar  <dewar@adacore.com>
6129         * einfo.ads: Minor comment fix.
6130         * freeze.adb (Freeze_Profile): Add test for suspicious import
6131         in pure unit.
6132         * sem_prag.adb (Process_Import_Or_Interface): Test for suspicious
6133         use in Pure unit is now moved to Freeze (to properly catch
6134         Pure_Function exemption).
6136 2015-01-30  Bob Duff  <duff@adacore.com>
6138         * sem_res.ads: Minor comment fix.
6139         * sem_type.adb: sem_type.adb (Remove_Conversions): Need to
6140         check both operands of an operator.
6142 2015-01-30  Yannick Moy  <moy@adacore.com>
6144         * a-assert.ads, a-assert.adb: Mark package spec in SPARK. Set assertion
6145         policy for Pre to Ignore.
6146         (Assert): Add precondition.
6148 2015-01-30  Robert Dewar  <dewar@adacore.com>
6150         * sem_prag.adb (Process_Import_Or_Interface): Warn if used in
6151         Pure unit.
6152         * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Clarify
6153         documentation for some special cases of invalid attempts at
6154         based integers.
6156 2015-01-30  Gary Dismukes  <dismukes@adacore.com>
6158         * errout.ads: Minor reformatting.
6160 2015-01-30  Yannick Moy  <moy@adacore.com>
6162         * inline.adb (Process_Formals): Use the sloc of
6163         the inlined node instead of the sloc of the actual parameter,
6164         when replacing formal parameters by the actual one.
6166 2015-01-30  Arnaud Charlet  <charlet@adacore.com>
6168         * g-expect.adb (Get_Command_Output): Use infinite timeout when
6169         calling Expect.
6171 2015-01-30  Ed Schonberg  <schonberg@adacore.com>
6173         * sem_ch12.adb (Analyze_Associations): If an in-parameter is
6174         defaulted in an instantiation, add an entry in the list of actuals
6175         to indicate the default value of the formal (as is already done
6176         for defaulted subprograms).
6178 2015-01-30  Javier Miranda  <miranda@adacore.com>
6180         * errout.adb (Error_Msg_PT): Minor error phrasing update.
6182 2015-01-30  Robert Dewar  <dewar@adacore.com>
6184         * sem_warn.adb (Warn_On_Known_Condition): Improve error message
6185         for object case.
6187 2015-01-30  Pierre-Marie de Rodat  <derodat@adacore.com>
6189         * exp_dbug.adb (Get_Encoded_Name): When
6190         -fgnat-encodings=minimal, do not generate names for biased types.
6192 2015-01-30  Tristan Gingold  <gingold@adacore.com>
6194         PR ada/64349
6195         * env.c: Move vxworks and darwin includes out of #ifdef IN_RTS.
6197 2015-01-30  Gary Dismukes  <dismukes@adacore.com>
6199         * freeze.adb: Minor reformatting.
6201 2015-01-30  Javier Miranda  <miranda@adacore.com>
6203         * errout.ads (Error_Msg_PT): Replace Node_Id by Entity_Id and
6204         improve its documentation.
6205         * errout.adb (Error_Msg_PT): Improve the error message.
6206         * sem_ch6.adb (Check_Conformance): Update call to Error_Msg_PT.
6207         (Check_Synchronized_Overriding): Update call to Error_Msg_PT.
6208         * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup.
6210 2015-01-30  Robert Dewar  <dewar@adacore.com>
6212         * sem_warn.adb (Warn_On_Known_Condition): Do special casing of
6213         message for False case.
6215 2015-01-30  Doug Rupp  <rupp@adacore.com>
6217         * s-vxwext-kernel.ads (Task_Cont): Remove imported subprogram body.
6218         * s-vxwext-kernel.adb (Task_Cont): New subpprogram body specialized for
6219         kernel.
6221 2015-01-30  Gary Dismukes  <dismukes@adacore.com>
6223         * sem_attr.adb (Declared_Within_Generic_Unit):
6224         New function to test whether an entity is declared within the
6225         declarative region of a given generic unit.
6226         (Resolve_Attribute): For checking legality of subprogram'Access within
6227         a generic unit, call new Boolean function Declared_Within_Generic_Unit
6228         instead of simply comparing the results of Enclosing_Generic_Unit on
6229         the prefix and access type.  Correct minor comment typos.
6231 2015-01-30  Robert Dewar  <dewar@adacore.com>
6233         * freeze.adb, exp_util.ads: Update comment.
6234         * exp_util.adb, exp_ch3.adb: Minor code reorganization and reformatting.
6235         * sem_util.adb: Minor: fix typo.
6237 2015-01-30  Hristian Kirtchev  <kirtchev@adacore.com>
6239         * sem_attr.adb (Analyze_Attribute): Ensure that
6240         the check concerning Refined_Post takes precedence over the
6241         other cases.
6243 2015-01-30  Gary Dismukes  <dismukes@adacore.com>
6245         * sem_prag.adb: Minor typo fixes and reformatting.
6247 2015-01-30  Yannick Moy  <moy@adacore.com>
6249         * sem_attr.adb: Code clean up.
6251 2015-01-30  Robert Dewar  <dewar@adacore.com>
6253         * ali.adb (Scan_ALI): Set Serious_Errors flag in Unit record.
6254         * ali.ads (Unit_Record): Add new field Serious_Errors.
6255         * lib-writ.adb (Write_Unit_Information): Set SE (serious errors)
6256         attribute in U line.
6257         * lib-writ.ads: New attribute SE (serious erors) in unit line.
6259 2015-01-30  Hristian Kirtchev  <kirtchev@adacore.com>
6261         * einfo.adb Update the usage of attributes Entry_Bodies_Array,
6262         Lit_Indexes, Scale_Value, Storage_Size_Variable,
6263         String_Literal_Low_Bound along associated routines and
6264         Write_FieldX_Name.
6265         (Pending_Access_Types): New routine.
6266         (Set_Pending_Access_Types): New routine.
6267         (Write_Field15_Name): Add an entry for Pending_Access_Types.
6268         * einfo.ads Add new attribute Pending_Access_Types along
6269         with usage in nodes.  Update the usage of attributes
6270         Entry_Bodies_Array, Lit_Indexes, Scale_Value,
6271         Storage_Size_Variable, String_Literal_Low_Bound.
6272         (Pending_Access_Types): New routine along with pragma Inline.
6273         (Set_Pending_Access_Types): New routine along with pragma Inline.
6274         * exp_ch3.adb (Expand_Freeze_Array_Type): Add new local variable
6275         Ins_Node. Determine the insertion node for anonynous access type
6276         that acts as a component type of an array. Update the call to
6277         Build_Finalization_Master.
6278         (Expand_Freeze_Record_Type): Update
6279         the calls to Build_Finalization_Master.
6280         (Freeze_Type): Remove
6281         local variable RACW_Seen. Factor out the code that deals with
6282         remote access-to-class-wide types. Create a finalization master
6283         when the designated type contains a private component. Fully
6284         initialize all pending access types.
6285         (Process_RACW_Types): New routine.
6286         (Process_Pending_Access_Types): New routine.
6287         * exp_ch4.adb (Expand_Allocator_Expression): Allocation no longer
6288         needs to set primitive Finalize_Address.
6289         (Expand_N_Allocator): Allocation no longer sets primitive
6290         Finalize_Address.
6291         * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
6292         Update the call to Build_Finalization_Master.
6293         (Make_Build_In_Place_Call_In_Allocator): Allocation no longer
6294         needs to set primitive Finalize_Address.
6295         * exp_ch7.adb (Add_Pending_Access_Type): New routine.
6296         (Build_Finalization_Master): New parameter profile. Associate
6297         primitive Finalize_Address with the finalization master if the
6298         designated type has been frozen, otherwise treat the access
6299         type as pending. Simplify the insertion of the master and
6300         related initialization code.
6301         (Make_Finalize_Address_Body): Allow Finalize_Address for class-wide
6302         abstract types.
6303         (Make_Set_Finalize_Address_Call): Remove forlam parameter Typ.
6304         Simplify the implementation.
6305         * exp_ch7.ads (Build_Finalization_Master): New parameter profile
6306         along with comment on usage.
6307         (Make_Set_Finalize_Address_Call): Remove formal parameter Typ. Update
6308         the comment on usage.
6309         * exp_util.adb (Build_Allocate_Deallocate_Proc): Use routine
6310         Finalize_Address to retrieve the primitive.
6311         (Finalize_Address): New routine.
6312         (Find_Finalize_Address): Removed.
6313         * exp_util.ads (Finalize_Address): New routine.
6314         * freeze.adb (Freeze_All): Remove the generation of finalization
6315         masters.
6316         * sem_ch3.adb (Analyze_Full_Type_Declaration): Propagate any
6317         pending access types from the partial to the full view.
6319 2015-01-30  Robert Dewar  <dewar@adacore.com>
6321         * sem_disp.adb: Minor reformatting.
6322         * sem_disp.ads: Documentation update.
6324 2015-01-30  Ed Schonberg  <schonberg@adacore.com>
6326         * sem_disp.adb (Is_Dynamically_Tagged): when applied to an entity
6327         or a function call, return True if type is class-wide.
6328         * sem_res.adb (Resolve_Case_Expression, Resolve_If_Expression);
6329         Apply RM 4.5.7 (17/3): all or none of the dependent expression
6330         of a conditional expression must be dynamically tagged.
6332 2015-01-30  Ed Schonberg  <schonberg@adacore.com>
6334         * sem_ch6.adb (Analyze_Function_Return): In an extended return
6335         statement, apply accessibility check to result object when there
6336         is no initializing expression (Ada 2012 RM 6.5 (5.4/3))
6338 2015-01-30  Robert Dewar  <dewar@adacore.com>
6340         * sem_ch4.adb (Analyze_If_Expression): Allow for non-standard
6341         Boolean for case where ELSE is omitted.
6342         * sem_res.adb: Minor reformatting.
6344 2015-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6346         Fix build under cygwin/64.
6347         * adaint.h: Add check for __CYGWIN__.
6348         * mingw32.h: Prevent windows.h from including x86intrin.h in GCC.
6350 2015-01-19  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6352         PR ada/64640
6353         * adaint.c: Handle __CYGWIN__ like __MINGW32__ here.
6354         * mingw32.h: Don't include <tchar.h> under cygwin.
6355         (_O_U8TEXT, _O_U16TEXT, _O_WTEXT): Set to _O_TEXT if not yet defined.
6357 2015-01-15  Thomas Schwinge  <thomas@codesourcery.com>
6359         * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8)
6360         (DEF_FUNCTION_TYPE_VAR_12): New macros.
6362 2015-01-09  Michael Collison  <michael.collison@linaro.org>
6364         * gcc-interface/cuintp.c: Include hash-set.h, machmode.h,
6365         vec.h, double-int.h, input.h, alias.h, symtab.h,
6366         fold-const.h, wide-int.h, and inchash.h due to
6367         flattening of tree.h.
6368         * gcc-interface/decl.c: Ditto.
6369         * gcc-interface/misc.c: Ditto.
6370         * gcc-interface/targtyps.c: Include hash-set.h, machmode.h,
6371         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h,
6372         fold-const.h, wide-int.h, and inchash.h due to
6373         flattening of tree.h.
6374         * gcc-interface/trans.c: Include hash-set.h, machmode.h,
6375         vec.h, double-int.h, input.h, alias.h, symtab.h, real.h,
6376         fold-const.h, wide-int.h, inchash.h due to
6377         flattening of tree.h.
6378         * gcc-interface/utils.c: Include hash-set.h, machmode.h,
6379         vec.h, double-int.h, input.h, alias.h, symtab.h,
6380         fold-const.h, wide-int.h, and inchash.h due to
6381         flattening of tree.h.
6382         * gcc-interface/utils2.c: Ditto.
6384 2015-01-07  Robert Dewar  <dewar@adacore.com>
6386         * sem_warn.adb (Check_One_Unit): Don't give unused entities
6387         warning for a package which is used as a generic parameter.
6389 2015-01-07  Bob Duff  <duff@adacore.com>
6391         * usage.adb (Usage): Correct documentation of
6392         -gnatw.f switches.
6394 2015-01-07  Robert Dewar  <dewar@adacore.com>
6396         * s-fileio.adb: Minor reformatting.
6398 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
6400         * sem_ch12.adb (Instantiate_Object): If formal is an anonymous
6401         access to subprogram, replace its formals with new entities when
6402         building the object declaration, both if actual is present and
6403         when it is defaulted.
6405 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
6407         * sem_ch5.adb (Analyze_Assignment): If left-hand side is a view
6408         conversion and type of expression has invariant, apply invariant
6409         check on expression.
6411 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
6413         * sem_ch3.adb (Create_Constrained_Components): A call to
6414         Gather_Components may detect an error if an inherited discriminant
6415         that controls a variant is non-static.
6416         * sem_aggr.adb (Resolve_Record_Aggregate, Step 5): The call to
6417         Gather_Components may report an error if an inherited discriminant
6418         in a variant in non-static.
6419         * sem_util.adb (Gather_Components): If a non-static discriminant
6420         is inherited do not report error here, but let caller handle it.
6421         (Find_Actual): Small optimization.
6423 2015-01-07  Bob Duff  <duff@adacore.com>
6425         * usage.adb (Usage): Document -gnatw.f switch.
6427 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
6429         * sem_ch12.adb: Code clean up and minor reformatting.
6431 2015-01-07  Robert Dewar  <dewar@adacore.com>
6433         * exp_ch4.adb (Expand_N_Type_Conversion): Add guard for
6434         Raise_Accessibility_Error call.
6435         * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Add documentation
6436         on handling of invalid digits in based constants.
6437         * s-fatgen.ads: Minor reformatting.
6438         * sem_attr.adb (Analyze_Attribute, case Unrestricted_Access):
6439         Avoid noting bogus modification for Valid test.
6440         * snames.ads-tmpl (Name_Attr_Long_Float): New Name.
6441         * einfo.ads: Minor reformatting.
6442         * sem_warn.adb: Minor comment clarification.
6443         * sem_ch12.adb: Minor reformatting.
6445 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
6447         * exp_ch5.adb (Expand_Predicated_Loop): Handle properly loops
6448         over static predicates when the loop parameter specification
6449         carries a Reverse indicator.
6451 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
6453         * sem_ch12.adb (Instantiate_Object): If formal has a default,
6454         actual is missing and formal has an anonymous access type, copy
6455         access definition in full so that tree for instance is properly
6456         formatted for ASIS use.
6458 2015-01-07  Bob Duff  <duff@adacore.com>
6460         * sem_elab.adb (Check_Internal_Call_Continue): Give a warning
6461         for P'Access, where P is a subprogram in the same package as
6462         the P'Access, and the P'Access is evaluated at elaboration
6463         time, and occurs before the body of P. For example, "X : T :=
6464         P'Access;" would allow a subsequent call to X.all to be an
6465         access-before-elaboration error; hence the warning. This warning
6466         is enabled by the -gnatw.f switch.
6467         * opt.ads (Warn_On_Elab_Access): New flag for warning switch.
6468         * warnsw.adb (Set_Dot_Warning_Switch): Set Warn_On_Elab_Access.
6469         * gnat_ugn.texi: Document the new warning.
6471 2015-01-07  Johannes Kanig  <kanig@adacore.com>
6473         * lib-xref-spark_specific.adb (Collect_SPARK_Xrefs): Skip unneeded
6474         cross ref files.
6476 2015-01-07  Robert Dewar  <dewar@adacore.com>
6478         * s-taprop-linux.adb, clean.adb: Minor reformatting.
6480 2015-01-07  Arnaud Charlet  <charlet@adacore.com>
6482         * s-tassta.adb: Relax some overzealous assertions.
6484 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
6486         * sem_ch6.adb (Analyze_Return_Type): An call that returns a limited
6487         view of a type is legal when context is a thunk generated for
6488         operation inherited from an interface.
6489         * exp_ch6.adb (Expand_Simple_Function_Return): If context is
6490         a thunk and return type is an incomplete type do not continue
6491         expansion; thunk will be fully elaborated when generating code.
6493 2015-01-07  Doug Rupp  <rupp@adacore.com>
6495         * s-osinte-mingw.ads (LARGE_INTEGR): New subtype.
6496         (QueryPerformanceFrequency): New imported procedure.
6497         * s-taprop-mingw.adb (RT_Resolution): Call above and return
6498         resolution vice a hardcoded value.
6499         * s-taprop-solaris.adb (RT_Resolution): Call clock_getres and return
6500         resolution vice a hardcoded value.
6501         * s-linux-android.ads (clockid_t): New subtype.
6502         * s-osinte-aix.ads (clock_getres): New imported subprogram.
6503         * s-osinte-android.ads (clock_getres): Likewise.
6504         * s-osinte-freebsd.ads (clock_getres): Likewise.
6505         * s-osinte-solaris-posix.ads (clock_getres): Likewise.
6506         * s-osinte-darwin.ads (clock_getres): New subprogram.
6507         * s-osinte-darwin.adb (clock_getres): New subprogram.
6508         * thread.c (__gnat_clock_get_res) [__APPLE__]: New function.
6509         * s-taprop-posix.adb (RT_Resolution): Call clock_getres to
6510         calculate resolution vice hard coded value.
6512 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
6514         * exp_util.adb (Make_CW_Equivalent_Type): If root type is a
6515         limited view, use non-limited view when available to create
6516         equivalent record type.
6518 2015-01-07  Vincent Celier  <celier@adacore.com>
6520         * gnatcmd.adb: Remove command Sync and any data and processing
6521         related to this command. Remove project processing for gnatstack.
6522         * prj-attr.adb: Remove package Synchonize and its attributes.
6524 2015-01-07  Vincent Celier  <celier@adacore.com>
6526         * clean.adb: Minor error message change.
6528 2015-01-07  Tristan Gingold  <gingold@adacore.com>
6530         PR ada/64349
6531         * env.c (__gnat_environ): Adjust for darwin9/darwin10.
6533 2015-01-07  Javier Miranda  <miranda@adacore.com>
6535         * sem_ch10.adb (Analyze_With_Clause): Compiling under -gnatq
6536         protect the frontend against never ending recursion caused by
6537         circularities in the sources.
6539 2015-01-07  Robert Dewar  <dewar@adacore.com>
6541         * a-reatim.adb, make.adb, exp_pakd.adb, i-cpoint.adb, sem_ch8.adb,
6542         exp_ch3.adb: Minor reformatting.
6544 2015-01-07  Doug Rupp  <rupp@adacore.com>
6546         * s-linux.ads (clockid_t): New subtype.
6547         * s-osinte-linux.ads (pragma Linker Options): Add -lrt.
6548         (clockid_t): New subtype.
6549         (clock_getres): Import system call.
6550         * s-taprop-linux.adb (System.OS_Constants): With and rename.
6551         (RT_Resolution): Remove
6552         hardcoded value and call clock_getres.
6553         * s-linux-sparc.ads, s-linux-mipsel.ads, s-linux-hppa.ads,
6554         s-linux-alpha.ads, s-linux-x32.ads (clockid_t): Add new subtype.
6556 2015-01-07  Robert Dewar  <dewar@adacore.com>
6558         * sem_warn.adb (Check_One_Unit): Guard against context item
6559         with no Entity field.
6561 2015-01-07  Vincent Celier  <celier@adacore.com>
6563         * clean.adb (Gnatclean): Warn that 'gnatclean -P' is obsolete.
6564         * make.adb (Initialize): Warn that 'gnatmake -P' is obsolete.
6566 2015-01-07  Vincent Celier  <celier@adacore.com>
6568         * prj-conf.adb (Parse_Project_And_Apply_Config): Always finalize
6569         errors/warnings in the first parsing of the project files,
6570         to display the warnings when there is no errors.
6572 2015-01-07  Tristan Gingold  <gingold@adacore.com>
6574         * i-cpoint.adb (Copy_Terminated_Array): Nicely handle null target.
6576 2015-01-07  Doug Rupp  <rupp@adacore.com>
6578         * s-taprop-vxworks.adb (Stop_All_Tasks): Pass return
6579         value from Int_Lock as parameter to Int_Unlock.
6580         * s-osinte-vxworks.ads (Int_Unlock): Add parameter.
6581         * s-vxwext.ads (Int_Unlock): Likewise.
6582         * s-vxwext-kernel.adb (intUnlock, Int_Unlock): Likewise.
6583         * s-vxwext-kernel.ads (Int_Unlock): Likewise.
6584         * s-vxwext-rtp.adb (Int_Unlock): Likewise.
6585         * s-vxwext-rtp.ads (Int_Unlock): Likewise.
6587 2015-01-07  Pierre-Marie de Rodat  <derodat@adacore.com>
6589         * exp_pakd.adb: Add a comment in exp_pakd.adb to explain why we
6590         keep ___XP suffixes
6592 2015-01-07  Tristan Gingold  <gingold@adacore.com>
6594         * i-cpoint.adb (Copy_Terminated_Array): Use Copy_Array to
6595         handle overlap.
6597 2015-01-07  Eric Botcazou  <ebotcazou@adacore.com>
6599         * sem_ch3.adb (Analyze_Full_Type_Declaration): Do not
6600         automatically set No_Strict_Aliasing on access types.
6601         * fe.h (No_Strict_Aliasing_CP): Declare.
6602         * gcc-interface/trans.c (gigi): Force flag_strict_aliasing to 0 if
6603         No_Strict_Aliasing_CP is set.
6605 2015-01-07  Johannes Kanig  <kanig@adacore.com>
6607         * sem_ch8.adb (Analyze_Subprogram_Renaming) do
6608         not build function wrapper in gnatprove mode when the package
6609         is externally axiomatized.
6611 2015-01-07  Jose Ruiz  <ruiz@adacore.com>
6613         * a-reatim.adb (Time_Of): Reduce the number of spurious overflows in
6614         intermediate computations when the parameters have different signs.
6616 2015-01-07  Javier Miranda  <miranda@adacore.com>
6618         * exp_ch3.adb (Build_Init_Procedure): For derived types,
6619         improve the code which takes care of identifying and moving to
6620         the beginning of the init-proc the call to the init-proc of the
6621         parent type.
6623 2015-01-07  Olivier Hainque  <hainque@adacore.com>
6625         * gcc-interface/trans.c (gnat_to_gnu, <N_Expression_With_Action>):
6626         Elaborate the expression as part of the same stmt group as the actions.
6628 2015-01-07  Robert Dewar  <dewar@adacore.com>
6630         * sem_ch3.adb: Minor error message change.
6632 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
6634         * sem_prag.adb (Analyze_Pragma, case Preelaborable_Initialization):
6635         Following AI05-028, the pragam applies legally to any composite type.
6637 2015-01-07  Arnaud Charlet  <charlet@adacore.com>
6639         * s-osinte-vxworks.adb, s-osinte-vxworks.ads
6640         (sigwait, sigwaitinfo): Removed, not needed after all on any
6641         VxWorks configurations.
6643 2015-01-07  Robert Dewar  <dewar@adacore.com>
6645         * sem_ch3.adb, freeze.adb, exp_disp.adb: Minor reformatting.
6647 2015-01-07  Javier Miranda  <miranda@adacore.com>
6649         * exp_disp.adb (Expand_Interface_Conversion): Adding missing
6650         generation of accessibility check.
6652 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
6654         * sem_ch3.adb (Derived_Type_Declaration): In the case of an
6655         illegal completion from a class- wide type, set etype of the
6656         derived type properly to prevent cascaded errors.
6658 2015-01-07  Robert Dewar  <dewar@adacore.com>
6660         * prj.ads, i-cpoint.adb, freeze.adb, ghost.adb, prj-err.adb: Minor
6661         reformatting.
6663 2015-01-07  Robert Dewar  <dewar@adacore.com>
6665         * restrict.adb (Check_Restriction_No_Use_Of_Attribute):
6666         New procedure.
6667         (OK_No_Use_Of_Entity_Name): New function.
6668         (Set_Restriction_No_Use_Of_Entity): New procedure.
6669         * restrict.ads (Check_Restriction_No_Use_Of_Attribute):
6670         New procedure.
6671         (OK_No_Use_Of_Entity_Name): New function.
6672         (Set_Restriction_No_Use_Of_Entity): New procedure.
6673         * sem_ch8.adb (Find_Direct_Name): Add check for violation of
6674         No_Use_Of_Entity.
6675         * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
6676         Add processing for new restriction No_Use_Of_Entity.
6678 2015-01-07  Eric Botcazou  <ebotcazou@adacore.com>
6680         * freeze.adb (Freeze_Array_Type): Apply same handling to Is_Atomic
6681         component type as to Has_Atomic_Components type.  Remove useless
6682         test on Is_Aliased component type.
6684 2015-01-07  Hristian Kirtchev  <kirtchev@adacore.com>
6686         * alloc.ads Alphabetize several declarations. Add constants
6687         Ignored_Ghost_Units_Initial and Ignored_Ghost_Units_Increment.
6688         * atree.adb Add with and use clauses for Opt.
6689         (Allocate_Initialize_Node): Mark a node as ignored Ghost
6690         if it is created in an ignored Ghost region.
6691         (Ekind_In): New variant.
6692         (Is_Ignored_Ghost_Node): New routine.
6693         (Set_Is_Ignored_Ghost_Node): New routine.
6694         * atree.adb Aplhabetize several subprograms declarations. Flag
6695         Spare0 is now known as Is_Ignored_Ghost_Node.
6696         (Ekind_In): New variant.
6697         (Is_Ignored_Ghost_Node): New routine.
6698         (Set_Is_Ignored_Ghost_Node): New routine.
6699         * einfo.adb: Flag 279 is now known as Contains_Ignored_Ghost_Code.
6700         (Contains_Ignored_Ghost_Code): New routine.
6701         (Set_Contains_Ignored_Ghost_Code): New routine.
6702         (Set_Is_Checked_Ghost_Entity, Set_Is_Ignored_Ghost_Entity):
6703         It is now possible to set this property on an unanalyzed entity.
6704         (Write_Entity_Flags): Output the status of flag
6705         Contains_Ignored_Ghost_Code.
6706         * einfo.ads New attribute Contains_Ignored_Ghost_Code along with
6707         usage in nodes.
6708         (Contains_Ignored_Ghost_Code): New routine
6709         along with pragma Inline.
6710         (Set_Contains_Ignored_Ghost_Code): New routine along with pragma Inline.
6711         * exp_ch3.adb Add with and use clauses for Ghost.
6712         (Freeze_Type): Capture/restore the value of Ghost_Mode on entry/exit.
6713         Set the Ghost_Mode in effect.
6714         (Restore_Globals): New routine.
6715         * exp_ch7.adb (Process_Declarations): Do not process a context
6716         that invoves an ignored Ghost entity.
6717         * exp_dbug.adb (Qualify_All_Entity_Names): Skip an ignored Ghost
6718         construct that has been rewritten as a null statement.
6719         * exp_disp.adb Add with and use clauses for Ghost.
6720         (Make_DT): Capture/restore the value of Ghost_Mode on entry/exit. Set
6721         the Ghost_Mode in effect.
6722         (Restore_Globals): New routine.
6723         * exp_util.adb (Requires_Cleanup_Actions): An ignored Ghost entity
6724         does not require any clean up. Add two missing cases that deal
6725         with block statements.
6726         * freeze.adb Add with and use clauses for Ghost.
6727         (Freeze_Entity): Capture/restore the value of Ghost_Mode on entry/exit.
6728         Set the Ghost_Mode in effect.
6729         (Restore_Globals): New routine.
6730         * frontend.adb Add with and use clauses for Ghost. Remove any
6731         ignored Ghost code from all units that qualify.
6732         * ghost.adb New unit.
6733         * ghost.ads New unit.
6734         * gnat1drv.adb Add with clause for Ghost. Initialize and lock
6735         the table in package Ghost.
6736         * lib.ads: Alphabetize several subprogram declarations.
6737         * lib-xref.adb (Output_References): Do not generate reference
6738         information for ignored Ghost entities.
6739         * opt.ads Add new type Ghost_Mode_Type and new global variable
6740         Ghost_Mode.
6741         * rtsfind.adb (Load_RTU): Provide a clean environment when
6742         loading a runtime unit.
6743         * sem.adb (Analyze): Capture/restore the value of Ghost_Mode on
6744         entry/exit as the node may set a different mode.
6745         (Do_Analyze):
6746         Capture/restore the value of Ghost_Mode on entry/exit as the
6747         unit may be withed from a unit with a different Ghost mode.
6748         * sem_ch3.adb Add with and use clauses for Ghost.
6749         (Analyze_Full_Type_Declaration, Analyze_Incomplete_Type_Decl,
6750         Analyze_Number_Declaration, Analyze_Private_Extension_Declaration,
6751         Analyze_Subtype_Declaration): Set the Ghost_Mode in effect. Mark
6752         the entity as Ghost when there is a Ghost_Mode in effect.
6753         (Array_Type_Declaration): The implicit base type inherits the
6754         "ghostness" from the array type.
6755         (Derive_Subprogram): The
6756         alias inherits the "ghostness" from the parent subprogram.
6757         (Make_Implicit_Base): The implicit base type inherits the
6758         "ghostness" from the parent type.
6759         * sem_ch5.adb Add with and use clauses for Ghost.
6760         (Analyze_Assignment): Set the Ghost_Mode in effect.
6761         * sem_ch6.adb Add with and use clauses for Ghost.
6762         (Analyze_Abstract_Subprogram_Declaration, Analyze_Procedure_Call,
6763         Analyze_Subprogram_Body_Helper, Analyze_Subprogram_Declaration):
6764         Set the Ghost_Mode in effect. Mark the entity as Ghost when
6765         there is a Ghost_Mode in effect.
6766         * sem_ch7.adb Add with and use clauses for Ghost.
6767         (Analyze_Package_Body_Helper, Analyze_Package_Declaration,
6768         Analyze_Private_Type_Declaration): Set the Ghost_Mode in
6769         effect. Mark the entity as Ghost when there is a Ghost_Mode
6770         in effect.
6771         * sem_ch8.adb Add with and use clauses for Ghost.
6772         (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
6773         Analyze_Object_Renaming, Analyze_Package_Renaming,
6774         Analyze_Subprogram_Renaming): Set the Ghost_Mode in effect. Mark
6775         the entity as Ghost when there is a Ghost_Mode in effect.
6776         (Find_Type): Check the Ghost context of a type.
6777         * sem_ch11.adb Add with and use clauses for Ghost.
6778         (Analyze_Exception_Declaration): Set the Ghost_Mode in
6779         effect. Mark the entity as Ghost when there is a Ghost_Mode
6780         in effect.
6781         * sem_ch12.adb Add with and use clauses for Ghost.
6782         (Analyze_Generic_Package_Declaration,
6783         Analyze_Generic_Subprogram_Declaration): Set the Ghost_Mode in effect.
6784         Mark the entity as Ghost when there is a Ghost_Mode in effect.
6785         * sem_prag.adb Add with and use clauses for Ghost.
6786         (Analyze_Pragma): Ghost-related checks are triggered when there
6787         is a Ghost mode in effect.
6788         (Create_Abstract_State): Mark the
6789         entity as Ghost when there is a Ghost_Mode in effect.
6790         * sem_res.adb Add with and use clauses for Ghost.
6791         (Check_Ghost_Context): Removed.
6792         * sem_util.adb (Check_Ghost_Completion): Removed.
6793         (Check_Ghost_Derivation): Removed.
6794         (Incomplete_Or_Partial_View):
6795         Add a guard in case the entity has not been analyzed yet
6796         and does carry a scope.
6797         (Is_Declaration): New routine.
6798         (Is_Ghost_Entity): Removed.
6799         (Is_Ghost_Statement_Or_Pragma):
6800         Removed.
6801         (Is_Subject_To_Ghost): Removed.
6802         (Set_Is_Ghost_Entity):
6803         Removed.
6804         (Within_Ghost_Scope): Removed.
6805         * sem_util.adb (Check_Ghost_Completion): Removed.
6806         (Check_Ghost_Derivation): Removed.
6807         (Is_Declaration): New routine.
6808         (Is_Ghost_Entity): Removed.
6809         (Is_Ghost_Statement_Or_Pragma): Removed.
6810         (Is_Subject_To_Ghost): Removed.
6811         (Set_Is_Ghost_Entity): Removed.
6812         (Within_Ghost_Scope): Removed.
6813         * sinfo.ads Add a section on Ghost mode.
6814         * treepr.adb (Print_Header_Flag): New routine.
6815         (Print_Node_Header): Factor out code. Output flag
6816         Is_Ignored_Ghost_Node.
6817         * gcc-interface/Make-lang.in: Add dependency for unit Ghost.
6819 2015-01-06  Eric Botcazou  <ebotcazou@adacore.com>
6821         * freeze.adb (Freeze_Array_Type) <Complain_CS>: Remove always
6822         true test and unreachable 'else' arm.
6824 2015-01-06  Vincent Celier  <celier@adacore.com>
6826         * prj-conf.adb (Check_Target): Improve error message when
6827         there are mismatched targets between the on in the configuration
6828         project file and the specified one, either in the main project
6829         file or in the --target= switch.
6831 2015-01-06  Pascal Obry  <obry@adacore.com>
6833         * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Mode and
6834         Install_Name attribute definitions.
6836 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
6838         * freeze.adb (Wrap_Imported_Subprogram): Indicate that the
6839         generated Import pragma for the internal imported procedure does
6840         not come from an aspect, so that Is_Imported can be properly
6841         set for it.
6843 2015-01-06  Gary Dismukes  <dismukes@adacore.com>
6845         * sem_ch12.adb (Might_Inline_Subp): Record whether
6846         any subprograms in the generic package are marked with
6847         pragma Inline_Always (setting flag Has_Inline_Always).
6848         (Analyze_Package_Instantiation): Add test of Has_Inline_Always
6849         alongside existing test of Front_End_Inlining as alternative
6850         conditions for setting Inline_Now. Also add test of
6851         Has_Inline_Always along with Front_End_Inlining test as an
6852         alternative condition for setting Needs_Body to False.
6854 2015-01-06  Tristan Gingold  <gingold@adacore.com>
6856         * i-cpoint.adb (Copy_Array): Handle overlap.
6858 2015-01-06  Pascal Obry  <obry@adacore.com>
6860         * bindgen.adb: Minor style fix.
6862 2015-01-06  Robert Dewar  <dewar@adacore.com>
6864         * sem_util.ads, sem_util.adb: Minor reformatting.
6866 2015-01-06  Vincent Celier  <celier@adacore.com>
6868         * prj-conf.adb (Parse_Project_And_Apply_Config): Reset incomplete
6869         with flags before parsing the projects.
6870         * prj-err.adb (Error_Msg): Do nothing if there are incomplete withs.
6871         * prj-part.adb (Post_Parse_Context_Clause): Set Incomplete_Withs
6872         to True in the flags, when Ignore_Missing_With is True and an
6873         imported project cannot be found.
6874         * prj-proc.adb (Expression): When there are incomplete withs and
6875         a variable or attribute is not found, set the variable/attribute
6876         to unknown.
6877         * prj.ads (Processing_Flags): New flag Incomplete_Withs,
6878         defaulted to False.
6880 2015-01-06  Vasiliy Fofanov  <fofanov@adacore.com>
6882         * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-conf.adb,
6883         prj-err.adb: Add new switch --no-command-line.
6885 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
6887         * sem_ch12.adb: Sloc of wrapper is that of instantiation.
6889 2015-01-06  Robert Dewar  <dewar@adacore.com>
6891         * sem_ch11.adb: Minor reformatting.
6893 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
6895         * exp_aggr.adb (Get_Assoc_Expr): New routine internal to
6896         Build_Array_Aggr_Code, used to initialized components covered
6897         by a box association. If the component type is scalar and has
6898         a default aspect, use it to initialize such components.
6900 2015-01-06  Pascal Obry  <obry@adacore.com>
6902         * rtinit.c (__gnat_runtime_initialize): Add a parameter to
6903         control the setup of the exception handler.
6904         * initialize.c: Remove unused declaration.
6905         * bindgen.adb: Always call __gnat_runtime_initialize and pass
6906         whether the exeception handler must be set or not.
6908 2015-01-06  Thomas Quinot  <quinot@adacore.com>
6910         * freeze.adb (Set_SSO_From_Defaults): When setting scalar storage
6911         order to native from default, make sure to also adjust bit order.
6912         * exp_aggr.adb: Minor reformatting.
6914 2015-01-06  Robert Dewar  <dewar@adacore.com>
6916         * s-valllu.adb, s-valllu.ads, s-valuti.ads, s-valuns.adb, s-valuns.ads,
6917         s-valrea.adb, s-valrea.ads: Add some additional guards for
6918         Str'Last = Positive'Last.
6920 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
6922         * sem_ch12.adb, sem_ch8.adb: Ongoing work for wrappers for actual
6923         subprograms.
6925 2015-01-06  Javier Miranda  <miranda@adacore.com>
6927         * exp_disp.adb (Expand_Interface_Conversion): Reapply patch.
6929 2015-01-06  Thomas Quinot  <quinot@adacore.com>
6931         * sem_util.ads: Minor reformatting.
6932         * sem_cat.adb (In_RCI_Visible_Declarations): Change back to...
6933         (In_RCI_Declaration) Return to old name, as proper checking of
6934         entity being in the visible part depends on entity kind and must
6935         be done by the caller.
6937 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
6939         * sem_ch12.adb, sem_ch12.ads, sem_ch8.adb: Ongoing work for wrappers
6940         for operators in SPARK.
6942 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
6944         * sem_aggr.adb (Get_Value): In ASIS mode, preanalyze the
6945         expression in an others association before making copies for
6946         separate resolution and accessibility checks. This ensures that
6947         the type of the expression is available to ASIS in all cases,
6948         in particular if the expression is itself an aggregate.
6950 2015-01-06  Eric Botcazou  <ebotcazou@adacore.com>
6952         * einfo.ads (Has_Independent_Components): Document extended
6953         usage.
6954         * einfo.adb (Has_Independent_Components): Remove obsolete assertion.
6955         (Set_Has_Independent_Components): Adjust assertion.
6956         * sem_prag.adb (Analyze_Pragma): Also set Has_Independent_Components
6957         for pragma Atomic_Components.  Set Has_Independent_Components
6958         on the object instead of the type for an object declaration with
6959         pragma Independent_Components.
6961 2015-01-06  Olivier Hainque  <hainque@adacore.com>
6963         * set_targ.adb (Read_Target_Dependent_Values): Set
6964         Long_Double_Index when "long double" is read.
6965         (elaboration code): Register_Back_End_Types only when not reading from
6966         config files. Doing otherwise is pointless and error prone.
6968 2015-01-06  Robert Dewar  <dewar@adacore.com>
6970         * s-valrea.adb (Value_Real): Check for Str'Last = Positive'Last
6972 2015-01-06  Robert Dewar  <dewar@adacore.com>
6974         * a-wtgeau.adb, a-ztgeau.adb, a-tigeau.adb (String_Skip): Raise PE if
6975         Str'Last = Positive'Last.
6977 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
6979         * sem_ch6.adb (Matches_Limited_View): Handle properly the case
6980         where the non-limited type is a generic actual and appears as
6981         a subtype of the non-limited view of the other.
6982         * freeze.adb (Build_Renamed_Body): If the return type of the
6983         declaration that is being completed is a limited view and the
6984         non-limited view is available, use it in the specification of
6985         the generated body.
6987 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
6989         * sem_ch3.adb (Find_Type_Name): If there is a previous tagged
6990         incomplete view, the type of the classwide type common to both
6991         views is the type being declared.
6993 2015-01-06  Eric Botcazou  <ebotcazou@adacore.com>
6995         * einfo.ads (Is_Independent): Further document extended usage.
6997 2015-01-06  Eric Botcazou  <ebotcazou@adacore.com>
6999         * einfo.ads (Is_Independent): Document extended usage.
7000         * einfo.adb (Is_Independent): Remove obsolete assertion.
7001         (Set_Is_Independent): Likewise.
7002         * sem_prag.adb (Process_Atomic_Shared_Volatile): Rename into...
7003         (Process_Atomic_Independent_Shared_Volatile): ...this.
7004         Deal with pragma Independent here.
7005         (Analyze_Pragma): Adjust
7006         to above renaming and also invoke it for pragma Independent.
7007         Adjust comment for Independent_Components.
7009 2015-01-06  Robert Dewar  <dewar@adacore.com>
7011         * snames.ads-tmpl: Remove entries for attribute Enum_Image.
7012         * exp_attr.adb: Remove reference to Attribute_Enum_Image.
7014 2015-01-06  Robert Dewar  <dewar@adacore.com>
7016         * s-vallli.adb (Value_Long_Long_Integer): Handle case of Str'Last
7017         = Positive'Last.
7018         * s-valllu.adb (Value_Long_Long_Unsigned): Handle case of
7019         Str'Last = Positive'Last.
7021 2015-01-06  Robert Dewar  <dewar@adacore.com>
7023         * sem_prag.adb (Process_Inline): Remove redundant construct
7024         warning (-gnatw.r) for an ineffective pragma Inline.
7026 2015-01-06  Robert Dewar  <dewar@adacore.com>
7028         * s-valint.adb: Fix typo in last checkin.
7029         * s-valuns.adb (Value_Unsigned): More efficient fix for
7030         Positive'Last case.
7031         * sem_attr.adb (Analyze_Attribute): Minor reformatting
7032         (Eval_Attribute): Static ervaluation of 'Img for enumeration types.
7034 2015-01-06  Robert Dewar  <dewar@adacore.com>
7036         * s-valint.adb, s-valuns.adb (Value_Integer): Deal with case where
7037         Str'Last = Positive'Last
7039 2015-01-06  Thomas Quinot  <quinot@adacore.com>
7041         * xoscons.adb: Display exception information and return non-zero
7042         exit status in top level exception handler.
7044 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
7046         * sem_ch8.adb: Code clean up.
7048 2015-01-06  Tristan Gingold  <gingold@adacore.com>
7050         * targparm.ads: Remove obsolete comment.
7052 2015-01-06  Olivier Hainque  <hainque@adacore.com>
7054         * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Variable): When
7055         constructing a ref to variable, update inner_const_flag from the
7056         variable TREE_READONLY attribute.
7057         * gcc-interface/targtyps.c (WIDEST_HARDWARE_FP_SIZE): Remove default
7058         definition.
7059         (get_target_float_size): Remove.
7060         (get_target_double_size): Remove.
7061         (get_target_long_double_size): Remove.
7063 2015-01-06  Pascal Obry  <obry@adacore.com>
7065         * adaint.c (ProcListEvt): Set to NULL.
7066         * rtinit.c: New file.
7067         (__gnat_rt_init_count): New reference counter set to 0.
7068         (__gnat_runtime_initialize): Move code here from __gnat_initialize when
7069         this code is actually needed for the runtime initialization. This
7070         routine returns immediately if the initialization has already been done.
7071         * final.c: Revert previous change.
7072         * rtfinal.c: New file.
7073         (__gnat_runtime_finalize)[Win32]: Add finalization of the critical
7074         section and event. The default version of this routine is empty (except
7075         for the reference counting code). This routine returns immediately if
7076         some others libraries are referencing the runtime.
7077         * bindgen.adb (Gen_Adainit): Generate call to Runtime_Initialize
7078         remove circuitry to initialize the signal handler as this is
7079         now done by the runtime initialization routine.
7080         (Gen_Adafinal): Generate call to Runtime_Finalize.
7081         * gnat_ugn.texi: Update documentation about concurrency and
7082         initialization/finalization of the run-time.
7083         * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Add
7084         references to rtfinal.o and rtinit.o
7086 2015-01-06  Robert Dewar  <dewar@adacore.com>
7088         * exp_attr.adb (Expand_N_Attribute_Reference): Add dummy entry
7089         for Enum_Image.
7090         * sem_attr.adb: Implement Enum_Image attribute.
7091         * snames.ads-tmpl: Add entries for Enum_Image attribute.
7093 2015-01-06  Robert Dewar  <dewar@adacore.com>
7095         * namet.ads: Document use of Boolean2 for No_Use_Of_Entity.
7096         * restrict.ads (No_Use_Of_Entity): New table.
7097         * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
7098         Ignore No_Use_Of_Entity (will be processed in parser).
7099         * snames.ads-tmpl: Add entry for Name_No_Use_Of_Entity.
7101 2015-01-06  Vincent Celier  <celier@adacore.com>
7103         * prj-tree.adb (Imported_Or_Extended_Project_Of): Do not try
7104         to check for an extended project, if a project does not have
7105         yet a project declaration.
7107 2015-01-06  Pierre-Marie Derodat  <derodat@adacore.com>
7109         * scos.ads: Update documentation about the SCO table build
7110         process and about table records format.
7111         * par_sco.ads (SCO_Record): Rename to SCO_Record_Raw.
7112         (SCO_Record_Filtered): New procedure.
7113         (Set_SCO_Logical_Operator): New procedure.
7114         (dsco): Update documentation.
7115         * par_sco.adb: Update library-level comments.
7116         (SCO_Generation_State_Type): New type.
7117         (SCO_Generation_State): New variable.
7118         (SCO_Raw_Table): New package instanciation.
7119         (Condition_Pragma_Hash_Table): Rename to SCO_Raw_Hash_Table.
7120         ("<"): New.
7121         (Tristate): New type.
7122         (Is_Logical_Operator): Return Tristate and update documentation.
7123         (Has_Decision): Update call to Is_Logical_Operator and complete
7124         documentation.
7125         (Set_Table_Entry): Rename to Set_Raw_Table_Entry, update
7126         comment, add an assertion for state checking and change
7127         references to SCO_Table into SCO_Raw_Table.
7128         (dsco): Refactor to dump the raw and the filtered tables.
7129         (Process_Decisions.Output_Decision_Operand): Handle putative
7130         short-circuit operators.
7131         (Process_Decisions.Output_Element): Update references
7132         to Set_Table_Entry and to Condition_Pragma_Hash_Table.
7133         (Process_Decisions.Process_Decision_Operand): Update call
7134         to Is_Logical_Operator.
7135         (Process_Decisions.Process_Node): Handle putative short-circuit
7136         operators and change references to
7137         SCO_Table into SCO_Raw_Table.
7138         (SCO_Output): Add an assertion
7139         for state checking and remove code that used to stamp out SCO entries.
7140         (SCO_Pragma_Disabled): Change reference to SCO_Table
7141         into SCO_Raw_Table.
7142         (SCO_Record): Rename to SCO_Record_Raw,
7143         add an assertion for state checking and change references
7144         to SCO_Table into SCO_Raw_Table.
7145         (Set_SCO_Condition): Add an assertion for state checking, update
7146         references to Condition_Pragma_Hash_Table and change references to
7147         SCO_Table into SCO_Raw_Table.
7148         (Set_SCO_Pragma_Enabled): Add an assertion for state checking and
7149         change references to SCO_Table into SCO_Raw_Table.
7150         (Set_SCO_Logical_Operator): New procedure.
7151         (Traverse_Declarations_Or_Statements.Set_Statement_Entry): Update
7152         references to Set_Table_Entry and to Condition_Pragma_Hash_Table.
7153         (SCO_Record_Fildered): New procedure.
7154         * gnat1drv.adb (Gnat1drv): Invoke the SCO filtering pass.
7155         * lib-writ.adb (Write_ALI): Invoke the SCO filtering pass and
7156         output SCOs.
7157         * par-load.adb (Load): Update reference to SCO_Record.
7158         * par.adb (Par): Update reference to SCO_Record.
7159         * put_scos.adb (Put_SCOs): Add an assertion to check that no
7160         putative SCO condition reaches this end.
7161         * sem_ch10.adb (Analyze_Proper_Body): Update reference to SCO_Record.
7162         * sem_res.adb (Resolve_Logical_Op): Validate putative SCOs
7163         when corresponding to an "and"/"or" operator affected by the
7164         Short_Circuit_And_Or pragma.
7166 2015-01-06  Robert Dewar  <dewar@adacore.com>
7168         * sem_ch8.adb (Analyze_Use_Package): Give more specific error
7169         msg for attempted USE of generic subprogram or subprogram.
7171 2015-01-06  Robert Dewar  <dewar@adacore.com>
7173         * s-valllu.adb, a-tiinau.adb, a-timoau.adb, a-ztinau.adb, a-ztmoau.adb,
7174         s-valuns.adb, s-valrea.adb, a-wtflau.adb, a-tiflau.adb, a-ztflau.adb,
7175         a-wtinau.adb, a-wtmoau.adb: Document recognition of : in place of #.
7177 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
7179         * sem_ch13.adb (Analyze_Aspect_Specifications): For aspects
7180         that specify stream subprograms, if the prefix is a class-wide
7181         type then the generated attribute definition clause must apply
7182         to the same class-wide type.
7183         (Default_Iterator): An iterator defined by an aspect of some
7184         container type T must have a first parameter of type T, T'class,
7185         or an access to such (from code reading RM 5.5.1 (2/3)).
7187 2015-01-06  Arnaud Charlet  <charlet@adacore.com>
7189         * gnat1drv.adb: Minor: complete previous change.
7191 2015-01-06  Olivier Hainque  <hainque@adacore.com>
7193         * set_targ.ads (C_Type_For): New function. Return the name of
7194         a C type supported by the back-end and suitable as a basis to
7195         construct the standard Ada floating point type identified by
7196         the T parameter. This is used as a common ground to feed both
7197         ttypes values and the GNAT tree nodes for the standard floating
7198         point types.
7199         * set_targ.adb (Long_Double_Index): The index at which "long
7200         double" gets registered in the FPT_Mode_Table. This is useful to
7201         know whether we have a "long double" available at all and get at
7202         it's characteristics without having to search the FPT_Mode_Table
7203         when we need to decide which C type should be used as the
7204         basis for Long_Long_Float in Ada.
7205         (Register_Float_Type): Fill Long_Double_Index.
7206         (FPT_Mode_Index_For): New function. Return the index in
7207         FPT_Mode_Table that designates the entry corresponding to the
7208         provided C type name.
7209         (FPT_Mode_Index_For): New function. Return the index in
7210         FPT_Mode_Table that designates the entry for a back-end type
7211         suitable as a basis to construct the standard Ada floating point
7212         type identified by the input T parameter.
7213         (elaboration code): Register_Back_End_Types unconditionally,
7214         so C_Type_For can operate regardless of -gnateT. Do it
7215         early so we can query it for the floating point sizes, via
7216         FPT_Mode_Index_For. Initialize Float_Size, Double_Size and
7217         Long_Double_Size from the FPT_Mode_Table, as cstand will do.
7218         * cstand.adb (Create_Float_Types): Use C_Type_For to determine
7219         which C type should be used as the basis for the construction
7220         of the Standard Ada floating point types.
7221         * get_targ.ads (Get_Float_Size, Get_Double_Size,
7222         Get_Long_Double_Size): Remove.
7223         * get_targ.adb: Likewise.
7225 2015-01-06  Thomas Quinot  <quinot@adacore.com>
7227         * sem_cat.adb (In_RCI_Declaration): Remove unnecessary
7228         parameter and rename to...
7229         (In_RCI_Visible_Declarations): Fix handling of private part of nested
7230         package.
7231         (Validate_RCI_Subprogram_Declaration): Reject illegal function
7232         returning anonymous access in RCI unit.
7234 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
7236         * sem_ch6.adb (New_Overloaded_Entity): In GNATprove mode, a
7237         function wrapper may be a homonym of another local declaration.
7238         * sem_ch8.adb (Analyze_Subprogram_Renaming): In GNATprove mode,
7239         build function and operator wrappers after the actual subprogram
7240         has been resolved, and replace the standard renaming declaration
7241         with the declaration of wrapper.
7242         * sem_ch12.ads (Build_Function_Wrapper, Build_Operator_Wraooer):
7243         make public for use elsewhere.
7244         * sem_ch12.adb (Build_Function_Wrapper, Build_Operator_Wraooer):
7245         rewrite, now that actual is fully resolved when wrapper is
7246         constructed.
7248 2015-01-06  Javier Miranda  <miranda@adacore.com>
7250         * exp_disp.adb: Revert previous change.
7252 2015-01-06  Robert Dewar  <dewar@adacore.com>
7254         * exp_util.adb: Change name Name_Table_Boolean to
7255         Name_Table_Boolean1.
7256         * namet.adb: Change name Name_Table_Boolean to Name_Table_Boolean1
7257         Introduce Name_Table_Boolean2/3.
7258         * namet.ads: Change name Name_Table_Boolean to Name_Table_Boolean1
7259         Introduce Name_Table_Boolean2/3.
7260         * par-ch13.adb: Change name Name_Table_Boolean to
7261         Name_Table_Boolean1.
7263 2015-01-06  Bob Duff  <duff@adacore.com>
7265         * gnat_rm.texi: Improve documentation regarding No_Task_Termination.
7267 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
7269         * sem_aggr.adb (Resolve_Record_Aggregte, Get_Value): For an
7270         others choice that covers multiple components, analyze each
7271         copy with the type of the component even in compile-only mode,
7272         to detect potential accessibility errors.
7274 2015-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
7276         * sem_res.adb (Is_Assignment_Or_Object_Expression): New routine.
7277         (Resolve_Actuals): An effectively volatile out
7278         parameter cannot act as an in or in out actual in a call.
7279         (Resolve_Entity_Name): An effectively volatile out parameter
7280         cannot be read.
7282 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
7284         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If the body is
7285         the expansion of an expression function it may be pre-analyzed
7286         if a 'access attribute is applied to the function, in which case
7287         last_entity may have been assigned already.
7289 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
7291         * sem_ch4.adb (Analyze_One_Call): If formal has an incomplete
7292         type and actual has the corresponding full view, there is no
7293         error, but a case of use of incomplete type in a predicate or
7294         invariant expression.
7296 2015-01-06  Vincent Celier  <celier@adacore.com>
7298         * makeutl.adb (Insert_No_Roots): Make sure that the same source
7299         in two different project tree is checked in both trees, if they
7300         are sources of two different projects, extended or not.
7302 2015-01-06  Arnaud Charlet  <charlet@adacore.com>
7304         * gnat1drv.adb: Minor code clean up.
7305         (Adjust_Global_Switches): Ignore gnatprove_mode in codepeer_mode.
7307 2015-01-06  Bob Duff  <duff@adacore.com>
7309         * osint.adb (Read_Source_File): Don't print out
7310         file name unless T = Source.
7312 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
7314         * sem_util.adb (Is_Variable, Is_OK_Variable_For_Out_Formal):
7315         recognize improper uses of constant_reference types as actuals
7316         for in-out parameters.
7317         (Check_Function_Call): Do not collect identifiers if function
7318         name is missing because of previous error.
7320 2015-01-06  Robert Dewar  <dewar@adacore.com>
7322         * ali-util.adb, sem_prag.adb, rtsfind.adb, sem_util.adb, sem_res.adb,
7323         ali.adb, binde.adb, namet.adb, namet.ads, gnatls.adb, bcheck.adb:
7324         Minor change of name Name_Table_Info => Name_Table_Int.
7326 2015-01-06  Robert Dewar  <dewar@adacore.com>
7328         * exp_strm.adb (Build_Elementary_Input_Call): Clarify comments
7329         in previous checkin.
7330         * freeze.adb (Freeze_Fixed_Point_Type): Add warning for shaving
7331         of bounds.
7332         * sem_prag.adb, sem_ch10.adb, sem_ch6.adb: Minor reformatting.
7334 2015-01-06  Vincent Celier  <celier@adacore.com>
7336         * a-strsup.adb (Times (Natural;String;Positive)): Raise
7337         Length_Error, not Index_Error, when the result is too long.
7339 2015-01-06  Thomas Quinot  <quinot@adacore.com>
7341         * a-direct.adb (Create_Path): Minor error handling and
7342         performance improvement.
7344 2015-01-06  Robert Dewar  <dewar@adacore.com>
7346         * checks.ads, sem_ch12.adb: Minor reformatting.
7347         * exp_ch4.adb (Expand_N_Op_Divide): Generate explicit divide by
7348         zero check for fixed-point case if Backend_Divide_Checks_On_Target
7349         is False.
7351 2015-01-06  Robert Dewar  <dewar@adacore.com>
7353         * sem_prag.adb (Analyze_Pragma, case No_Elaboration_Code_All):
7354         Do not set restriction No_Elaboration_Code unless the pragma
7355         appears in the main unit).
7357 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
7359         * sem_ch10.adb (Is_Regular_With_Clause): Add guard to verify
7360         that with clause has already been analyzed before checking kind
7361         of with_clause.
7363 2015-01-06  Robert Dewar  <dewar@adacore.com>
7365         * exp_strm.adb (Build_Elementary_Input_Call): Return base type
7366         (as required by RM).
7368 2015-01-06  Arnaud Charlet  <charlet@adacore.com>
7370         * a-reatim.adb ("/"): Add explicit pragma Unsuppress (Division_Check).
7372 2015-01-06  Robert Dewar  <dewar@adacore.com>
7374         * sem_prag.adb (Process_Suppress_Unsuppress): Add extra warning
7375         for ignoring pragma Suppress (Elaboration_Check) in SPARK mode.
7377 2015-01-06  Javier Miranda  <miranda@adacore.com>
7379         * exp_disp.adb (Expand_Interface_Conversion): No displacement
7380         of the pointer to the object needed when the type of the operand
7381         is not an interface type and the interface is one of its parent
7382         types (since they share the primary dispatch table).
7384 2015-01-06  Vincent Celier  <celier@adacore.com>
7386         * prj-env.adb: Minor comment update.
7388 2015-01-06  Javier Miranda  <miranda@adacore.com>
7390         * sem_res.adb (Valid_Conversion): Restrict the checks on anonymous
7391         access types whose target type is an interface type to operands
7392         that are access types; required to report an error when the
7393         operand is not an access type.
7395 2015-01-06  Bob Duff  <duff@adacore.com>
7397         * a-cfinve.adb (Copy): Set the discriminant to the Length when
7398         Capacity = 0.
7399         * a-cofove.ads (Capacity): Add a postcondition.
7400         * a-cfinve.ads (Capacity): Add a postcondition.
7401         (Reserve_Capacity): Correct the postcondition in the case where
7402         Capacity = 0; that means "Capacity => Length (Container)".
7403         * a-cofove.adb (Elems[c]): Add a comment
7404         explaining the dangers and how to avoid them.
7406 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
7408         * sem_ch12.adb: Code clean up.
7410 2015-01-06  Arnaud Charlet  <charlet@adacore.com>
7412         * gnatvsn.ads: Bump copyright year.
7414 2015-01-06  Robert Dewar  <dewar@adacore.com>
7416         * s-taskin.ads, s-traces.ads: Minor reformatting.
7417         * exp_util.adb: Minor typo fix.
7419 2015-01-06  Vincent Celier  <celier@adacore.com>
7421         * gnatls.adb (Search_RTS): Invoke Initialize_Default_Project_Path
7422         with the runtime name.
7423         * prj-env.adb (Initialize_Default_Project_Path): When both
7424         Target_Name and Runtime_Name are not empty string, add to the
7425         project path the two directories .../lib/gnat and .../share/gpr
7426         related to the runtime.
7427         * prj-env.ads (Initialize_Default_Project_Path): New String
7428         parameter Runtime_Name, defaulted to the empty string.
7430 2015-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
7432         * frontend.adb: Guard against the case where a configuration
7433         pragma may be split into multiple pragmas and the original
7434         rewritten as a null statement.
7435         * sem_prag.adb (Analyze_Pragma): Insert a brand new Check_Policy
7436         pragma using Insert_Before rather than Insert_Action. This
7437         takes care of the configuration pragma case where Insert_Action
7438         would fail.
7440 2015-01-06  Bob Duff  <duff@adacore.com>
7442         * a-coboho.ads (Element_Access): Add "pragma
7443         No_Strict_Aliasing (Element_Access);". This is needed because
7444         we are unchecked-converting from Address to Element_Access.
7445         * a-cofove.ads, a-cofove.adb (Elems,Elemsc): Fix bounds of the
7446         result to be 1.
7448 2015-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
7450         * sem_res.adb (Resolve_Actuals): Remove the
7451         restriction which prohibits volatile actual parameters with
7452         enabled external propery Async_Writers to act appear in procedure
7453         calls where the corresponding formal is of mode OUT.
7455 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
7457         * gnat_ugn.texi: Bump @copying's copyright year.
7459 2015-01-05  Eric Botcazou  <ebotcazou@adacore.com>
7461         PR ada/64492
7462         * gcc-interface/Makefile.in (../stamp-tools): Reinstate dropped code.
7464 2015-01-04  Uros Bizjak  <ubizjak@gmail.com>
7466         * gcc-interface/misc.c (internal_error_function): Use xasprintf instead
7467         of unchecked asprintf.
7470 Copyright (C) 2015 Free Software Foundation, Inc.
7472 Copying and distribution of this file, with or without modification,
7473 are permitted in any medium without royalty provided the copyright
7474 notice and this notice are preserved.