* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Make sure
[official-gcc.git] / gcc / ada / ChangeLog
blob639d5c8c81e2e41aa34215703e45a325118b1aa4
1 2015-06-19  Eric Botcazou  <ebotcazou@adacore.com>
3         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Make sure
4         the size of a padding type built around the return type is positive.
5         * gcc-interface/trans.c (gnat_to_gnu) <N_Simple_Return_Statement>:
6         Use INIT_EXPR instead of MODIFY_EXPR to assign to the return object.
8 2015-06-17  Andrew MacLeod  <amacleod@redhat.com>
10         * gcc-interface/cuintp.c: Do not include input.h, line-map.h or is-a.h.
11         * gcc-interface/decl.c: Likewise.
12         * gcc-interface/misc.c: Likewise.
13         * gcc-interface/targtyps.c: Likewise.
14         * gcc-interface/trans.c: Likewise.
15         * gcc-interface/utils.c: Likewise.
16         * gcc-interface/utils2.c: Likewise.
18 2015-06-11  Pierre-Marie de Rodat  <derodat@adacore.com>
20         * gcc-interface/utils.c (get_global_context): Register the main
21         translation unit through the new debug hook.
23 2015-06-09  Eric Botcazou  <ebotcazou@adacore.com>
25         * gcc-interface/misc.c: Remove duplicate include directives.
26         * gcc-interface/trans.c: Likewise.
27         * gcc-interface/utils.c: Likewise.
29 2015-06-08  Andrew MacLeod  <amacleod@redhat.com>
31         * gcc-interface/cuintp.c : Adjust include files.
32         * gcc-interface/decl.c : Likewise.
33         * gcc-interface/misc.c : Likewise.
34         * gcc-interface/targtyps.c : Likewise.
35         * gcc-interface/trans.c : Likewise.
36         * gcc-interface/utils.c : Likewise.
37         * gcc-interface/utils2.c : Likewise.
38         
39 2015-06-08  John Marino  <gnugcc@marino.st>
41         * a-intnam-dragonfly.ads: New.
42         * s-osinte-dragonfly.adb: Likewise.
43         * s-osinte-dragonfly.ads: Likewise.
44         * system-dragonfly-x86_64.ads: Likewise.
45         * adaint.c: Add BSD macros.
46         * cstreams.c: Likewise.
47         * gsocket.h: Likewise.
48         * link.c: Likewise.
49         * socket.c: Likewise.
50         * env.c: Add __DragonFly__, remove __FreeBSD__ macro.
51         * init.c: Add __DragonFly__, change __gnat_install_handler
52         prototype from empty to void.
53         * initialize.c: Add __DragonFly__.
54         * sysdep.c: Likewise.
55         * s-osinte-freebsd.adb: Use __get_errno instead of __error.
56         * tracebak.c: Set unwinder for i386 BSD.
57         * gcc-interface/Makefile.in: Add x86_64 DragonFly, tweak
58         x86_64 FreeBSD and x86 FreeBSD.
60 2015-06-06  Eric Botcazou  <ebotcazou@adacore.com>
62         * gcc-interface/utils.c (note_types_used_by_globals): Tweak comment.
63         * gcc-interface/decl.c (gnat_to_gnu_entity): Likewise.
65 2015-06-05  Aldy Hernandez  <aldyh@redhat.com>
67         * gcc-interface/gigi.h (note_types_used_by_globals): Rename from
68         gnat_write_global_declarations.
69         * gcc-interface/misc.c (gnat_parse_file): Call
70         note_types_used_by_globals.
71         Remove LANG_HOOKS_WRITE_GLOBALS.
72         * gcc-interface/utils.c: Rename global_decls to type_decls.
73         (gnat_write_global_declarations): Rename
74         to note_types_used_by_globals.
75         Remove call to finalize_compilation_unit.
76         Remove call to debug_hooks->global_decl for globals.
77         (gnat_pushdecls): Only insert into type_decls if TYPE_DECL.
79 2015-06-04  Andrew MacLeod  <amacleod@redhat.com>
81         * gcc-interface/cuintp.c: Adjust includes for restructured coretypes.h.
82         * gcc-interface/decl.c: Likewise.
83         * gcc-interface/misc.c: Likewise.
84         * gcc-interface/targtyps.c: Likewise.
85         * gcc-interface/trans.c: Likewise.
86         * gcc-interface/utils.c: Likewise.
87         * gcc-interface/utils2.c: Likewise.
89 2015-06-04  Pierre-Marie de Rodat  <derodat@adacore.com>
91         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: If
92         processing a definition, create definitions for padding types
93         around return types.
95 2015-06-03  Eric Botcazou  <ebotcazou@adacore.com>
97         * gcc-interface/utils.c (copy_type): Also set TYPE_CANONICAL.
99 2015-06-03  Eric Botcazou  <ebotcazou@adacore.com>
101         * gcc-interface/trans.c (gnat_to_gnu) <N_Simple_Return_Statement>: Fix
102         typo in latest change.
104 2015-06-01  Eric Botcazou  <ebotcazou@adacore.com>
106         * gcc-interface/Makefile.in: Fix ARM/Darwin configuration.
108 2015-06-01  Pierre-Marie de Rodat  <derodat@adacore.com>
110         * gcc-interface/utils.c (scale_by_factor_of): When handling a function
111         call expression, process the corresponding function body.  Also handle
112         potential addends.
114 2015-06-01  Pierre-Marie de Rodat  <derodat@adacore.com>
116         * gcc-interface/decl.c (gnat_to_gnu_entity): Replace pointer types with
117         references ones for functions that return references.
119 2015-06-01  Eric Botcazou  <ebotcazou@adacore.com>
121         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: For a
122         definition of a type coming from a limited_with, get to the full view
123         if it is not in the main code unit.
125 2015-06-01  Eric Botcazou  <ebotcazou@adacore.com>
127         * gcc-interface/utils.c (create_var_decl_1): If an assembler name is
128         specified, let the target mangle it before settting.
129         (create_subprog_decl): Likewise and move this treatment last.
131 2015-06-01  Eric Botcazou  <ebotcazou@adacore.com>
133         * gcc-interface/lang-specs.h (TARGET_VXWORKS_RTP): Move substitution to
134         before first -gnatez switch.  Simplify and add trailing space.
136 2015-06-01  Eric Botcazou  <ebotcazou@adacore.com>
138         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: If the
139         record has a parent field and a representation clause, make sure that
140         it is properly aligned.
142 2015-06-01  Eric Botcazou  <ebotcazou@adacore.com>
144         * gcc-interface/trans.c (lvalue_required_p) <N_Indexed_Component>: Deal
145         with character and enumeration literals as index values.
147 2015-06-01  Eric Botcazou  <ebotcazou@adacore.com>
149         * gcc-interface/gigi.h (build_simple_component_ref): Declare.
150         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Deal with
151         address clause on aliased object with unconstrained nominal subtype.
152         Mark the aligning variable as artificial, do not convert the address
153         expression immediately but mark it as constant instead.
154         * gcc-interface/utils.c (convert): If the target type contains a
155         template, be prepared for an empty array.
156         (maybe_unconstrained_array): Likewise.
157         * gcc-interface/utils2.c (known_alignment) <POINTER_PLUS_EXPR>: Deal
158         with the pattern built for aligning types.
159         <INTEGER_CST>: Do not cap the value at BIGGEST_ALIGNMENT.
160         (build_simple_component_ref): Make public.
161         If the base object is a constructor that contains a template, fold the
162         result field by field.
164 2015-05-31  Eric Botcazou  <ebotcazou@adacore.com>
166         * s-oscons-tmplt.c: Add explicit tests for Android alongside Linux.
168 2015-05-30  Eric Botcazou  <ebotcazou@adacore.com>
170         * adaint.c: Test for __linux__ instead of linux and __sun__ instead
171         of sun.  Add missing leading underscore to AIX.  Remove #elif 0.
172         * adaint.h: Likewise.
173         * cio.c: Likewise.
174         * cstreams.c: Likewise.
175         * env.c: Likewise.
176         * gsocket.h: Likewise.
177         * init.c: Likewise.  Test for __i386__ instead of i386.
178         * link.c: Likewise.
179         * s-oscons-tmplt.c: Likewise.
180         * sysdep.c: Likewise.
181         * terminals.c: Likewise.  Use BSD symbol instead of FREEBSD.
182         * tracebak.c: Likewise.  Test for __sparc__ instead of sparc.
184 2015-05-28  Eric Botcazou  <ebotcazou@adacore.com>
186         * gcc-interface/utils.c (max_size) <tcc_binary>: Add special code to
187         deal with the subtraction of a "negative" value in an unsigned type.
189 2015-05-28  Eric Botcazou  <ebotcazou@adacore.com>
191         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Do
192         not error out on a return type which has a size that overflows if the
193         return is done by invisible reference.
195 2015-05-28  Eric Botcazou  <ebotcazou@adacore.com>
197         * gcc-interface/utils.c (gnat_pushdecl): Reunify the handling of array
198         and pointer types wrt DECL_ORIGINAL_TYPE and adjust left and right.
200 2015-05-28  Eric Botcazou  <ebotcazou@adacore.com>
202         * gcc-interface/gigi.h (gnat_stabilize_reference): Adjust.
203         (rewrite_fn): Remove third parameter.
204         (type_is_padding_self_referential): New inline predicate.
205         (return_type_with_variable_size_p): Likewise.
206         * gcc-interface/decl.c (allocatable_size_p): More around.
207         (cannot_be_superflat_p): Rename into...
208         (cannot_be_superflat ): ...this.
209         (initial_value_needs_conversion): New predicate.
210         (gnat_to_gnu_entity): Invoke type_is_padding_self_referential,
211         initial_value_needs_conversion and adjust to above renaming.
212         For a renaming, force the materialization if the inner expression
213         is compound.  Adjust calls to elaborate_reference and build a
214         compound expression if needed.
215         (struct er_dat): Add N field.
216         (elaborate_reference_1): Remove N parameter and adjust.
217         (elaborate_reference): Add INIT parameter and pass it in the call to
218         gnat_rewrite_reference.  Adjust initial expression.
219         * gcc-interface/trans.c (Call_to_gnu): Treat renamings the same way as
220         regular object declarations when it comes to creating a temporary.
221         Adjust call to gnat_stabilize_reference and build a compound expression
222         if needed.  Invoke return_type_with_variable_size_p.
223         (gnat_to_gnu): Invoke type_is_padding_self_referential.  In case #4,
224         return a call to a function unmodified if it returns with variable size
225         and is also the initial expression in an object declaration.
226         * gcc-interface/utils2.c (build_binary_op) <INIT_EXPR>: Use the RHS'
227         type if it is a call to a function that returns with variable size.
228         (build_unary_op): Invoke type_is_padding_self_referential.
229         (gnat_stabilize_reference_1): Remove N parameter and adjust.
230         (gnat_stabilize_reference): Add INIT parameter and pass it in the call
231         to gnat_rewrite_reference.
232         (gnat_rewrite_reference):  Remove N, add INIT parameter and adjust.
233         <COMPOUND_EXPR>: New case.
235 2015-05-28  Ed Schonberg  <schonberg@adacore.com>
237         * sem_ch3.adb (Is_Visible_Component): Component is visible
238         in a derived type if inherited through an ancestor that has a
239         partial view of the original type holding the component, if the
240         full view of that original type is in scope.
241         * sem_util.ads (Get_Body_From_Stub): Works for all kinds of stubs.
243 2015-05-28  Bob Duff  <duff@adacore.com>
245         * sem_util.adb (Requires_Transient_Scope): For definite untagged
246         subtypes, we should never have to use the secondary stack. This moves
247         toward that goal. But there are still cases that don't work.
248         Here, we move the check for Is_Definite first, but add a
249         special-purpose check for Has_Discrim_Dep_Array.
251 2015-05-28  Bob Duff  <duff@adacore.com>
253         * sem_util.adb (Requires_Transient_Scope): Avoid returning
254         function results on the secondary stack in so many cases.
256 2015-05-28  Ed Schonberg  <schonberg@adacore.com>
258         * sem_util.adb (Wrong_Type): In any instance, do not emit error
259         if type of expression is the partial view of the expected type.
261 2015-05-28  Ed Schonberg  <schonberg@adacore.com>
263         * sem_res.adb (Resolve_Actuals): a)  The replacement of formal
264         names in named associations only needs to be done within an
265         instance, on a call to a primitive of a formal derived type,
266         where the actual subprogram may have different formal names than
267         those of the primitive operation of the formal type.
268         b) Defaulted parameters must be taken into account when obtaining
269         the names of the formals of the actual subprogram being called.
271 2015-05-28  Robert Dewar  <dewar@adacore.com>
273         * sem_ch13.adb, sem_disp.ads: Minor reformatting.
275 2015-05-28  Ed Schonberg  <schonberg@adacore.com>
277         * sem_util.adb (Set_Debug_Info_Needed): For a private type
278         whose full view is itself a derived private type, set flag on
279         underlying full view as well, for proper gdb display.
281 2015-05-28  Bob Duff  <duff@adacore.com>
283         * exp_tss.ads: Minor comment fix.
284         * exp_ch3.adb (Build_Array_Init_Proc, Build_Record_Init_Proc):
285         Inline init_procs when the type has controlled parts. Remove
286         obsolete comments about those init_procs -- init_procs for
287         such types are no longer complex. A typical init_proc just
288         initializes the 'Tag field, and calls the parent init_proc
289         (e.g. for Limited_Controlled), which calls the grandparent
290         (for Root_Controlled), which does nothing. This all boils down
291         to one instruction when inlined.
292         * exp_ch7.adb (Create_Finalizer): Inline the finalizer.
294 2015-05-28  Ed Schonberg  <schonberg@adacore.com>
296         * sem_ch4.adb (Analyze_Selected_Component): If the type to use
297         is a derived type and is a generic actual, the selected component
298         appears within an instance body, and the check over the type
299         has failed, examine ancestor types for the desired component.
300         (Find_Component_In_Instance): If record type is a derived type,
301         examine all ancestors in order to locate desired component.
303 2015-05-27  H.J. Lu  <hongjiu.lu@intel.com>
305         * gcc-interface/Makefile.in (TOOLS_LIBS): Add @NO_PIE_FLAG@.
307 2015-05-27  Eric Botcazou  <ebotcazou@adacore.com>
309         * gcc-interface/trans.c (elaborate_all_entities): Do not elaborate an
310         incomplete type coming from a limited_with and whose non-limited view
311         comes from the main unit.
313 2015-05-27  Eric Botcazou  <ebotcazou@adacore.com>
315         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Move down
316         code applying atomic checks to the object.
318 2015-05-27  Robert Dewar  <dewar@adacore.com>
320         * sem_aux.adb: Minor rewording.
322 2015-05-27  Bob Duff  <duff@adacore.com>
324         * exp_prag.adb (Expand_Pragma_Abort_Defer): Make
325         pragma Abort_Defer do nothing if Abort_Allowed is False.
327 2015-05-27  Arnaud Charlet  <charlet@adacore.com>
329         * exp_ch9.adb, sem_util.adb, sem_util.ads, s-stposu.adb, s-spsufi.ads,
330         sem_elab.ads, g-comlin.ads, errout.ads, exp_ch6.adb, sem_ch4.adb,
331         opt.ads, s-bignum.adb, output.ads, sem_ch13.adb, erroutc.ads,
332         sem_disp.ads, exp_ch3.adb: Minor fixes of duplicate words in comments.
334 2015-05-27  Doug Rupp  <rupp@adacore.com>
336         * adaint.c (__gnat_tmp_name) [vxworks]: Robustify and use for rtp as
337         well as kernel.
339 2015-05-27  Pierre-Marie de Rodat  <derodat@adacore.com>
341         * par_sco.adb (Process_Decision): Store sloc to
342         condition/pragmas SCOs associations into a temporary table before
343         moving them to the SCO_Raw_Hash_Table so that we can back them
344         out just like we do for SCO entries that are simple decisions
345         in an expression context.
347 2015-05-27  Ed Schonberg  <schonberg@adacore.com>
349         * sem_ch6.adb (Process_Formals): A non-private formal type that
350         is a limited view does not have a list of private dependents.
352 2015-05-27  Ed Schonberg  <schonberg@adacore.com>
354         * exp_ch5.adb (Expand_N_Case_Statement): If the expression in
355         the case statement is a compile-time known value, we look for a
356         corresponding alternative to optimize the case statement into a
357         single case. If the type has a static predicate and the expression
358         does not satisfy the predicate, there is no legal alternative and
359         this optimization is not applicable.  Excecution is erroneous,
360         or else if assertions are enabled, an exception will be raised
361         earlier, at the point the expression is elaborated.
363 2015-05-27  Robert Dewar  <dewar@adacore.com>
365         * sem_elab.adb (Check_Internal_Call_Continue): Suppress
366         warning on Finalize, Adjust, or Initialize if type involved has
367         Warnings_Off set.
369 2015-05-27  Ed Schonberg  <schonberg@adacore.com>
371         * sem_aux.adb, sem_aux.ads (First_Discriminant): Return empty when
372         applied to a type with no known discriminants.
374 2015-05-26  Robert Dewar  <dewar@adacore.com>
376         * errout.ads, sem_ch4.adb, sem_ch6.adb: Minor reformatting.
378 2015-05-26  Bob Duff  <duff@adacore.com>
380         * sem_elab.adb (Check_A_Call): In the case where we're
381         calling something in an instance of a generic package that is
382         within this same unit (as the call), make sure we treat it
383         as a call to an entity within the same unit. That is, call
384         Check_Internal_Call, rather than putting "Elaborate_All(X)"
385         on X, which would necessarily result in an elaboration cycle in
386         static-elaboration mode.
388 2015-05-26  Eric Botcazou  <ebotcazou@adacore.com>
390         * freeze.ads (Is_Atomic_VFA_Aggregate): Adjust profile.
391         * freeze.adb (Is_Atomic_VFA_Aggregate): Change Entity
392         parameter into Node parameter and remove Type parameter.
393         Look at Is_Atomic_Or_VFA both on the type and on the object.
394         (Freeze_Entity): Adjust call to Is_Atomic_VFA_Aggregate.
395         * exp_aggr.adb (Expand_Record_Aggregate): Likewise.
396         (Process_Atomic_Independent_Shared_Volatile): Remove code
397         propagating Atomic or VFA from object to locally-defined type.
399 2015-05-26  Bob Duff  <duff@adacore.com>
401         * exp_ch7.adb: Minor comment fix.
403 2015-05-26  Eric Botcazou  <ebotcazou@adacore.com>
405         * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Min/Attr_Max>: Do not
406         bother about NaN's if Machine_Overflows is true.
408 2015-05-26  Eric Botcazou  <ebotcazou@adacore.com>
410         * gcc-interface/trans.c (gnat_to_gnu) <N_Object_Declaration>: Really
411         force evaluation of the expression, if any, when the object has its
412         elaboration delayed.  Do not create a variable at global level.
414 2015-05-26  Eric Botcazou  <ebotcazou@adacore.com>
416         * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Machine>: Do not apply
417         extra-precision trick to literals.  Build SAVE_EXPR manually.
419         * gcc-interface/misc.c (enumerate_modes): Add bypass for x86/x86-64.
421 2015-05-26  Eric Botcazou  <ebotcazou@adacore.com>
423         * gcc-interface/ada-tree.h (DECL_GLOBAL_NONCONSTANT_RENAMING_P): Delete
424         (DECL_RENAMED_OBJECT): Adjust comment.
425         * gcc-interface/gigi.h (record_global_nonconstant_renaming): Delete.
426         (invalidate_global_nonconstant_renamings): Likewise.
427         (gnat_constant_reference_p): Likewise.
428         (rewrite_fn): New function type.
429         (gnat_rewrite_reference): Declare.
430         (call_is_atomic_load): New inline predicate.
431         * gcc-interface/decl.c (elaborate_reference_1): New function.
432         (elaborate_reference): Likewise.
433         (gnat_to_gnu_entity): Call elaborate_reference to elaborate renamings
434         and simplify associated code.  Set const_flag to true consistently in
435         conjunction with used_by_ref.
436         * gcc-interface/trans.c (Identifier_to_gnu): Always replace renaming
437         pointers by renamed objects.
438         (outer_atomic_access_required_p): Deal with renamings.
439         (Compilation_Unit_to_gnu): Do not call
440         invalidate_global_nonconstant_renamings.
441         (gnat_to_gnu) <N_Object_Renaming_Declaration>: Adjust comment.
442         (gnat_gimplify_expr): Deal with atomic loads.
443         * gcc-interface/utils.c (global_nonconstant_renamings): Delete.
444         (destroy_gnat_utils): Do not call
445         invalidate_global_nonconstant_renamings.
446         (record_global_nonconstant_renaming): Delete.
447         (invalidate_global_nonconstant_renamings): Likewise.
448         * gcc-interface/utils2.c (call_is_atomic_load): Move to gigi.h.
449         (build_load_modify_store): Build a copy of the destination.
450         (gnat_stabilize_reference_1): Adjust.
451         (gnat_stabilize_reference): Call gnat_stabilize_reference_1 through
452         gnat_rewrite_reference and move bulk of code to...
453         (gnat_rewrite_reference): ...here.  New global function.
454         (gnat_constant_reference_p): Delete.
456 2015-05-26  Eric Botcazou  <ebotcazou@adacore.com>
458         * gcc-interface/gigi.h (gnat_stabilize_reference): Adjust prototype.
459         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not rely on const_flag
460         to detect constant renamings.  Be prepared for specific pattern of
461         renamed object based on function calls.  Create a constant object
462         for the renaming of a NULL_EXPR or of a CONSTRUCTOR.  Adjust calls
463         to gnat_stabilize_reference and tidy up.  Remove redundant tests.
464         (elaborate_expression_1): Remove obsolete test and tidy up.
465         * gcc-interface/trans.c (Call_to_gnu): Do not stabilize In/Out or Out
466         parameters passed by reference.
467         (gnat_to_gnu) <N_Selected_Component>: Remove redundant protection again
468         side-effects.
469         Use gnat_protect_expr instead of gnat_stabilize_reference for general
470         protection against side-effects.
471         * gcc-interface/utils2.c (gnat_stable_expr_p): New predicate.
472         (gnat_save_expr): Invoke it.
473         (gnat_protect_expr): Likewise.
474         (gnat_stabilize_reference_1): Likewise.  Remove useless propagation
475         of TREE_THIS_NOTRAP.
476         (gnat_stabilize_reference): Remove parameter and adjust throughout.
477         Delete ADDR_EXDR, COMPOUND_EXPR and CONSTRUCTOR cases.
478         Restrict CALL_EXPR case to atomic loads and tweak ERROR_MARK case.
480 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
482         * sinfo.ads: Minor reformatting.
483         * sem_aux.ads: Clarify use of First_Discriminant.
484         * sem_ch4.adb (Analyze_Explicit_Dereference): The use of a limited
485         view is replaced with the non-limited view in an instance body,
486         where the enclosing unit must have a regular with_clause on the
487         relevant unit.
488         * sem_ch12.adb (Install_Body): Freeze instantation after its
489         body. Remove useless freeze nodes for incomplete actuals to
490         prevent multiple generation of internal operations.
491         (Instantiate_Package_Body): Set sloc of body appropriately when
492         there are incomplete actuals and the instance body is placed in
493         the body of the enclosing unit.
494         * errout.ads: Consistent punctuation, better alignment and trivial
495         typos in comments.
496         * err_vars.ads: Fix typo.
498 2015-05-26  Eric Botcazou  <ebotcazou@adacore.com>
500         * sem_ch8.adb (Analyze_Object_Renaming): Lift restriction on
501         components of Volatile_Full_Access objects.
503 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
505         * sem_ch6.adb (Is_Non_Overriding_Operation,
506         Get_Generic_Parent_Type): Handle properly the case of a derived
507         scalar type by using the first subtype rather than its generated
508         anonymous base type.
510 2015-05-26  Eric Botcazou  <ebotcazou@adacore.com>
512         * einfo.adb (Write_Field17_Name): Move E_Incomplete_Subtype
513         case to...
514         (Write_Field19_Name): ...here.
516 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
518         * sem_ch13.adb: sem_ch13.adb (Add_Predicates): Undo analysis
519         of original expression in ASIS mode: does not solve the ASIS
520         problem of a usable type information, and crashes the back-end
521         when performing type annotations.
523 2015-05-26  Robert Dewar  <dewar@adacore.com>
525         * sem_disp.adb (Inherited_Subprograms): Add One_Only parameter.
526         (Is_Overriding_Subprogram): Use One_Only_Parameter.
527         * sem_disp.ads (Inherited_Subprograms): Add One_Only parameter.
529 2015-05-26  Robert Dewar  <dewar@adacore.com>
531         * exp_prag.adb, sem_ch3.adb, sem_ch5.adb, exp_ch11.adb, ghost.adb,
532         exp_ch6.adb, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb, sem_ch13.adb,
533         exp_ch3.adb: Minor reformatting.
535 2015-05-26  Bob Duff  <duff@adacore.com>
537         * treepr.adb: Minor improvement to debugging routines (pp, pn)
538         robustness.  Rearrange the code so passing a nonexistent Node_Id
539         prints "No such node" rather than crashing, and causing gdb to
540         generate confusing messages.
542 2015-05-26  Gary Dismukes  <dismukes@adacore.com>
544         * sem_util.adb: Minor typo fix.
546 2015-05-26  Yannick Moy  <moy@adacore.com>
548         * sem_aux.adb (Subprogram_Body_Entity): Deal with subprogram stubs.
550 2015-05-26  Hristian Kirtchev  <kirtchev@adacore.com>
552         * exp_ch3.adb (Expand_N_Full_Type_Declaration): Capture, set and
553         restore the Ghost mode.
554         (Expand_N_Object_Declaration): Capture, set and restore the Ghost mode.
555         (Freeze_Type): Update the call to Set_Ghost_Mode.
556         (Restore_Globals): New routine.
557         * exp_ch5.adb Add with and use clauses for Ghost.
558         (Expand_N_Assignment_Statement): Capture, set and restore the
559         Ghost mode.
560         (Restore_Globals): New routine.
561         * exp_ch6.adb Add with and use clauses for Ghost.
562         (Expand_N_Procedure_Call_Statement): Capture, set and
563         restore the Ghost mode.
564         (Expand_N_Subprogram_Body):
565         Code cleanup. Capture, set and restore the Ghost mode.
566         (Expand_N_Subprogram_Declaration): Capture, set and restore the
567         Ghost mode.
568         (Restore_Globals): New routine.
569         * exp_ch7.adb Add with and use clauses for Ghost.
570         (Expand_N_Package_Body): Capture, set and restore the Ghost mode.
571         (Expand_N_Package_Declaration): Capture, set and restore the
572         Ghost mode.
573         (Wrap_HSS_In_Block): Create a proper identifier for the block.
574         * exp_ch8.adb Add with and use clauses for Ghost.
575         (Expand_N_Exception_Renaming_Declaration): Code
576         cleanup. Capture, set and restore the Ghost mode.
577         (Expand_N_Object_Renaming_Declaration): Capture, set and restore
578         the Ghost mode.
579         (Expand_N_Package_Renaming_Declaration): Capture, set and restore the
580         Ghost mode.
581         (Expand_N_Subprogram_Renaming_Declaration): Capture, set and
582         restore the Ghost mode.
583         * exp_ch11.adb (Expand_N_Exception_Declaration): Code
584         cleanup. Capture, set and restore the Ghost mode.
585         * exp_disp.adb (Make_DT): Update the call to Set_Ghost_Mode. Do
586         not initialize the dispatch table slot of a Ghost subprogram.
587         * exp_prag.adb Add with and use clauses for Ghost.
588         (Expand_Pragma_Check): Capture, set and restore the Ghost mode.
589         (Expand_Pragma_Contract_Cases): Capture, set and restore the
590         Ghost mode.
591         (Expand_Pragma_Initial_Condition): Capture, set and
592         restore the Ghost mode.
593         (Expand_Pragma_Loop_Variant): Capture,
594         set and restore the Ghost mode.
595         (Restore_Globals): New routine.
596         * exp_util.adb Add with and use clauses for Ghost.
597         (Make_Predicate_Call): Code cleanup. Capture, set and restore
598         the Ghost mode.
599         (Restore_Globals): New routine.
600         * freeze.adb (Freeze_Entity): Code cleanup. Update the call
601         to Set_Ghost_Mode.
602         * ghost.adb Add with and use clause for Sem_Prag.
603         (Check_Ghost_Completion): Code cleanup.
604         (Check_Ghost_Overriding): New routine.
605         (Check_Ghost_Policy): Code cleanup.
606         (Ghost_Entity): New routine.
607         (Is_Ghost_Declaration): Removed.
608         (Is_Ghost_Statement_Or_Pragma): Removed.
609         (Is_OK_Context): Reimplemented.
610         (Is_OK_Declaration): New routine.
611         (Is_OK_Pragma): New routine.
612         (Is_OK_Statement): New routine.
613         (Mark_Full_View_As_Ghost): New routine.
614         (Mark_Pragma_As_Ghost): New routine.
615         (Mark_Renaming_As_Ghost): New routine.
616         (Propagate_Ignored_Ghost_Code): Update the comment on usage.
617         (Set_From_Entity): New routine.
618         (Set_From_Policy): New routine.
619         (Set_Ghost_Mode): This routine now handles pragmas and freeze nodes.
620         (Set_Ghost_Mode_For_Freeze): Removed.
621         (Set_Ghost_Mode_From_Entity): New routine.
622         (Set_Ghost_Mode_From_Policy): Removed.
623         * ghost.ads (Check_Ghost_Overriding): New routine.
624         (Mark_Full_View_As_Ghost): New routine.
625         (Mark_Pragma_As_Ghost): New routine.
626         (Mark_Renaming_As_Ghost): New routine.
627         (Set_Ghost_Mode): Update the parameter profile. Update the
628         comment on usage.
629         (Set_Ghost_Mode_For_Freeze): Removed.
630         (Set_Ghost_Mode_From_Entity): New routine.
631         * sem_ch3.adb (Analyze_Full_Type_Declaration):
632         Capture and restore the Ghost mode. Mark a type
633         as Ghost regardless of whether it comes from source.
634         (Analyze_Incomplete_Type_Decl): Capture, set and restore the
635         Ghost mode.
636         (Analyze_Number_Declaration): Capture and restore the Ghost mode.
637         (Analyze_Object_Declaration): Capture and restore the Ghost mode.
638         (Analyze_Private_Extension_Declaration): Capture and
639         restore the Ghost mode.
640         (Analyze_Subtype_Declaration): Capture and restore the Ghost mode.
641         (Process_Full_View): The full view inherits all Ghost-related
642         attributes from the private view.
643         (Restore_Globals): New routine.
644         * sem_ch5.adb (Analyze_Assignment): Capture and restore the
645         Ghost mode.
646         (Restore_Globals): New routine.
647         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration):
648         Code cleanup. Capture and restore the Ghost mode. Mark a
649         subprogram as Ghost regarless of whether it comes from source.
650         (Analyze_Procedure_Call): Capture and restore the Ghost mode.
651         (Analyze_Subprogram_Body_Helper): Capture and restore the Ghost mode.
652         (Analyze_Subprogram_Declaration): Capture and restore the Ghost mode.
653         (New_Overloaded_Entity): Ensure that a
654         parent subprogram and an overriding subprogram have compatible
655         Ghost policies.
656         * sem_ch7.adb (Analyze_Package_Body_Helper): Capture and restore
657         the Ghost mode.
658         (Analyze_Package_Declaration): Capture and
659         restore the Ghost mode. Mark a package as Ghost when it is
660         declared in a Ghost region.
661         (Analyze_Private_Type_Declaration): Capture and restore the Ghost mode.
662         (Restore_Globals): New routine.
663         * sem_ch8.adb (Analyze_Exception_Renaming): Code
664         reformatting. Capture and restore the Ghost mode. A renaming
665         becomes Ghost when its name references a Ghost entity.
666         (Analyze_Generic_Renaming): Capture and restore the Ghost mode. A
667         renaming becomes Ghost when its name references a Ghost entity.
668         (Analyze_Object_Renaming): Capture and restore the Ghost mode. A
669         renaming becomes Ghost when its name references a Ghost entity.
670         (Analyze_Package_Renaming): Capture and restore the Ghost mode. A
671         renaming becomes Ghost when its name references a Ghost entity.
672         (Analyze_Subprogram_Renaming): Capture and restore the Ghost
673         mode. A renaming becomes Ghost when its name references a
674         Ghost entity.
675         * sem_ch11.adb (Analyze_Exception_Declaration): Capture, set
676         and restore the Ghost mode.
677         * sem_ch12.adb (Analyze_Generic_Package_Declaration): Capture and
678         restore the Ghost mode.
679         (Analyze_Generic_Subprogram_Declaration):
680         Capture and restore the Ghost mode.
681         * sem_ch13.adb Add with and use clauses for Ghost.
682         (Add_Invariant): New routine.
683         (Add_Invariants): Factor out code.
684         (Add_Predicate): New routine.
685         (Add_Predicates): Factor out code.
686         (Build_Invariant_Procedure_Declaration): Code cleanup. Capture,
687         set and restore the Ghost mode.
688         (Build_Invariant_Procedure): Code cleanup.
689         (Build_Predicate_Functions): Capture, set and
690         restore the Ghost mode. Mark the generated functions as Ghost.
691         * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
692         Capture, set and restore the Ghost mode.
693         (Analyze_External_Property_In_Decl_Part): Capture, set and restore
694         the Ghost mode.
695         (Analyze_Initial_Condition_In_Decl_Part):
696         Capture, set and restore the Ghost mode.
697         (Analyze_Pragma):
698         Code cleanup. Capture, set and restore the Ghost mode. Flag
699         pragmas Linker_Section, No_Return, Unmodified, Unreferenced and
700         Unreferenced_Objects as illegal when it applies to both Ghost
701         and living arguments. Pragma Ghost cannot apply to synchronized
702         objects.
703         (Check_Kind): Moved to the spec of Sem_Prag.
704         (Process_Inline): Flag the pragma as illegal when it applies to
705         both Ghost and living arguments.
706         (Restore_Globals): New routine.
707         * sem_prag.ads Add pragma Default_Initial_Condition
708         to table Assertion_Expression_Pragma. Add new table
709         Is_Aspect_Specifying_Pragma.
710         (Check_Kind): Moved from body of Sem_Prag.
711         * sem_util.adb Add with and use clauses for Ghost.
712         (Build_Default_Init_Cond_Procedure_Body): Capture, set and restore
713         the Ghost mode.
714         (Build_Default_Init_Cond_Procedure_Declaration):
715         Capture, set and restore the Ghost mode. Mark the default
716         initial condition procedure as Ghost when it is declared
717         in a Ghost region.
718         (Is_Renaming_Declaration): New routine.
719         (Policy_In_List): Account for the single argument version of
720         Check_Pragma.
721         * sem_util.ads (Is_Renaming_Declaration): New routine.
722         * sinfo.adb (Is_Ghost_Pragma): New routine.
723         (Set_Is_Ghost_Pragma): New routine.
724         * sinfo.ads New attribute Is_Ghost_Pragma.
725         (Is_Ghost_Pragma): New routine along with pragma Inline.
726         (Set_Is_Ghost_Pragma): New routine along with pragma Inline.
728 2015-05-26  Robert Dewar  <dewar@adacore.com>
730         * sem_ch3.adb, sem_aux.adb, sem_aux.ads, exp_ch6.adb, sprint.adb:
731         Minor reformatting.
733 2015-05-26  Gary Dismukes  <dismukes@adacore.com>
735         * gnat1drv.adb, targparm.adb, targparm.ads, restrict.adb: Minor
736         reformatting and typo fixes in comments.
738 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
740         * sem_ch7.adb (Swap_Private_Dependets): Set visibility of
741         the two views of a private dependent in two separate steps,
742         to ensure proper visibility in parent units analyzed for inlining.
744 2015-05-26  Yannick Moy  <moy@adacore.com>
746         * sem_aux.adb, sem_aux.ads (Get_Low_Bound): Use Type_Low_Bound.
747         (Package_Body, Package_Spec): New queries moved
748         here from GNATprove.
749         (Package_Specification): Simplify query to remove use of loop.
750         * sem_util.adb, sem_util.ads (Enclosing_Declaration,
751         Enclosing_Package_Or_Subprogram, Is_Attribute_Update): New
752         queries moved here from GNATprove.
754 2015-05-26  Bob Duff  <duff@adacore.com>
756         * einfo.adb, einfo.ads, sprint.adb, lib-xref.ads: Minor cleanup: Remove
757         obsolete Entity_Kinds E_String_Type and E_String_Subtype. Update
758         redundant assertions.
760 2015-05-26  Gary Dismukes  <dismukes@adacore.com>
762         * sem_util.adb, sem_util.ads, sem_ch13.adb: Minor typo fixes.
764 2015-05-26  Doug Rupp  <rupp@adacore.com>
766         * init.c [vxworks]: Refine previous checkin.
768 2015-05-26  Robert Dewar  <dewar@adacore.com>
770         * exp_ch4.adb (Wrap_MA): New function.
771         (Expand_N_Op_Expon): Use Wrap_MA.
773 2015-05-26  Bob Duff  <duff@adacore.com>
775         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
776         Do not use secondary stack to return limited records with
777         defaulted discriminants. This is an efficiency improvement.
778         * exp_ch6.adb, exp_dist.adb, sem_attr.adb, sem_aux.adb, sem_aux.ads,
779         sem_ch12.adb, sem_ch3.adb, sem_ch4.adb, sem_ch6.adb, sem_ch7.adb,
780         sem_util.adb: Change the sense of Is_Indefinite_Subtype to be
781         Is_Definite_Subtype. This is an improvement to readability (the double
782         negative in "not Is_Indefinite_Subtype" was slightly confusing). Also
783         disallow passing non-[sub]type entities, an unnecessary and slightly
784         bug-prone flexibility.
786 2015-05-26  Robert Dewar  <dewar@adacore.com>
788         * sem_aggr.adb (Resolve_Array_Aggregate): Defend against
789         bad bounds.
790         * debug.adb: Document -gnatd.k.
791         * erroutc.adb (Set_Msg_Insertion_Line_Number): Implement -gnatd.k.
793 2015-05-26  Robert Dewar  <dewar@adacore.com>
795         * gnat1drv.adb (Gnat1drv): Provide new arguments for
796         Get_Target_Parameters.
797         * restrict.adb (Set_Restriction_No_Specification_Of_Aspect):
798         new procedure.
799         (Set_Restriction_No_Use_Of_Attribute): new procedure.
800         * restrict.ads (Set_Restriction_No_Specification_Of_Aspect):
801         new procedure.
802         (Set_Restriction_No_Use_Of_Attribute): new procedure.
803         * s-rident.ads (Integer_Parameter_Restrictions): New subtype.
804         * targparm.adb (Get_Target_Parameters): Allow new restriction
805         pragmas No_Specification_Of_Aspect No_Use_Of_Attribute
806         No_Use_Of_Pragma.
807         * targparm.ads: New parameters for Get_Target_Parameters.
808         * tbuild.adb (Set_NOD): New name for Set_RND.
809         (Set_NSA): New procedure.
810         (Set_NUA): New procedure.
811         (Set_NUP): New procedure.
812         * tbuild.ads (Make_SC): Minor reformatting.
813         (Set_NOD): New name for Set_RND.
814         (Set_NSA, Set_NUA, Set_NUP): New procedure.
816 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
818         * a-stwise.adb (Find_Token): If source'first is not positive,
819         an exception must be raised, as specified by RM 2005 A.4.3
820         (68/1). This must be checked explicitly, given that run-time
821         files are normally compiled without constraint checks.
822         * a-stzsea.adb (Find_Token): Ditto.
824 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
826         * sem_util.ads sem_util.adb (Is_Current_Instance):  New predicate
827         to fully implement RM 8.6 (17/3). which earlier only applied
828         to synchronized types. Used to preanalyze aspects that include
829         current instances of types, such as Predicate and Invariant.
830         * sem_res.adb (Resolve_Entity_Name): Use Is_Current_Instance.
831         * sem_ch13.adb (Add_Predicates): In ASIS mode, preserve original
832         expression of aspect and analyze it to provide proper type
833         information.
835 2015-05-26  Robert Dewar  <dewar@adacore.com>
837         * rtsfind.ads: Add entries for RE_Exn[_Long]_Float.
838         * s-exnllf.adb (Exn_Float): New function.
839         (Exn_Long_Float): New function.
840         (Exn_Long_Long_Float): Rewritten interface.
841         (Exp): New name for what used to be Exn_Long_Long_Float.
842         * s-exnllf.ads (Exn_Float): New function.
843         (Exn_Long_Float): New function.
845 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
847         * sem_ch8.adb (Find_Selected_Component): Do not emit an error
848         on a selected component when the prefix is a type name that is
849         a Current_Instance.
850         * einfo.ads: Minor grammar fix.
852 2015-05-26  Doug Rupp  <rupp@adacore.com>
854         * init.c [vxworks] (sysLib.h): Only for x86.
856 2015-05-26  Doug Rupp  <rupp@adacore.com>
858         * init-vxsim.c (CPU): define as __VXSIM_CPU__
859         * sigtramp-vxworks-vxsim.c (CPU): Likewise.
860         sigtramp-vxworks-target.inc: Add check for SIMLINUX.
861         * sigtramp.h: Likewise.
863 2015-05-26  Robert Dewar  <dewar@adacore.com>
865         * sem_aux.adb, sem_disp.adb, sem_util.ads: Add comment.
866         * sem_util.adb: Minor reformatting
868 2015-05-26  Yannick Moy  <moy@adacore.com>
870         * inline.adb (Has_Initialized_Type): Adapt to new names.
871         * sem_aux.adb, sem_aux.ads (Get_Low_Bound, Number_Components,
872         Subprogram_Body, Subprogram_Body_Entity, Subprogram_Spec,
873         Subprogram_Specification): New query functions used in GNATprove.
874         * sem_disp.adb, sem_disp.ads (Is_Overriding_Subprogram): New
875         query functions used in GNATprove.
876         * sem_util.adb, sem_util.adso (Enclosing_Lib_Unit_Node,
877         Get_Cursor_Type, Get_Return_Object, Get_User_Defined_Eq,
878         Is_Double_Precision_Floating_Point_Type,
879         Is_Single_Precision_Floating_Point_Type): New query functions
880         used in GNATprove.
882 2015-05-26  Bob Duff  <duff@adacore.com>
884         * s-rpc.ads (Partition_ID): Increase maximum Partition_ID to
885         some huge number.
886         * a-except-2005.adb, a-except-2005.ads, a-except.adb,
887         a-except.ads, a-exexda.adb, a-exstat.adb: Minor comment fixes.
889 2015-05-26  Robert Dewar  <dewar@adacore.com>
891         * sinfo.adb: Minor comment addition.
892         * einfo.adb: Minor whitespace and punctuation fix.
893         * sem_util.adb: Minor editing of comments.
895 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
897         * sem_ch7.adb (Install_Private_Declarations,
898         Swap_Private_Dependents): Ensure that both views of the dependent
899         subtype are immediately visible if we are within their scope. This
900         may be needed when a procedure body is both the parent of an
901         instantiated child unit, and is itself used to inline a local
902         function.
904 2015-05-26  Gary Dismukes  <dismukes@adacore.com>
906         * exp_prag.adb, gnat1drv.adb: Minor reformatting.
908 2015-05-26  Eric Botcazou  <ebotcazou@adacore.com>
910         * exp_ch4.adb (Expand_N_Indexed_Component): In the circuit
911         detecting exceptions to the rewriting, deal with implicit
912         dereferences in the selected component case.
914 2015-05-26  Bob Duff  <duff@adacore.com>
916         * sem_ch13.adb (Analyze_One_Aspect): Do not
917         require the expression of the Disable_Controlled aspect to be
918         static in a generic template, because 'Enabled is not known
919         until the instance.
921 2015-05-26  Doug Rupp  <rupp@adacore.com>
923         * init-vxsim.c: New file for vxsim ZCX
924         * sigtramp-vxworks-vxsim.c: Likewise.
925         * sigtramp-vxworks.c: Factor out target dependent bits into ...
926         * sigtramp-vxworks-target.inc: ... here.
927         * sigtramp.h: Add vxsim zcx protos.
928         * init.c [vxworks...] (sysLib.h): Include.
929         (__gnat_map_signal): Make global.
930          [...i386] (__gnat_error_handler): Call __gnat_vxsim_error_handler if
931         on vxsim.
932         [...i386] (__gnat_install_handler): Test if on vxsim.
934 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
936         * sem_ch5.adb (Analyze_Iterator_Specification): For an element
937         iterator over an array, if the component is aliased, the loop
938         variable is aliased as well.
940 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
942         * exp_ch6.adb (Expand_Actuals): For a function call with in-out
943         parameters that is rewritten as an expression_with_actions,
944         we preserve the original function call node for further use by
945         the caller (typically Expand_Call). In the presence of validity
946         checks, that function call, though it is labelled Analyzed to
947         prevent an infinite recursion, may be rewritten as a temporary
948         by Remove_Side_Effects.  Ensure that the caller has access to
949         the original function call to continue expansion.
950         * atree.ads: Minor typo in comment.
952 2015-05-26  Javier Miranda  <miranda@adacore.com>
954         * sem_util.adb (Check_Function_Writable_Actuals):
955         Add missing support to check the violation of writable actuals
956         in array aggregates that have a nonstatic range.
958 2015-05-26  Hristian Kirtchev  <kirtchev@adacore.com>
960         * exp_ch6.adb (Process_Contract_Cases_For): Update the call to
961         Expand_Pragma_Contract_Cases.
962         * exp_prag.ads, exp_prag.adb (Expand_Contract_Cases): Rename to
963         Expand_Pragma_Contract_Cases.
964         * sem_ch13.adb (Add_Invariants): Use the original aspect name
965         when creating the arguments of pragma Check. This ensures that
966         'Class is properly recognized and handled.
968 2015-05-26  Arnaud Charlet  <charlet@adacore.com>
970         * gnat1drv.adb: Minor adjustments.
971         (Adjust_Global_Switches): Disable some related flags in CodePeer mode.
972         * sem_ch4.adb (Has_Arbitrary_Evaluation_Order,
973         Stop_Subtree_Climbind): Code cleanup.
974         * einfo.ads: Minor comment change.
976 2015-05-26  Javier Miranda  <miranda@adacore.com>
978         * sem_aggr.adb (Resolve_Aggregate, Resolve_Extension_Aggregate):
979         Code cleanup.
980         * sem_ch3.adb (Build_Derived_Record_Type,
981         Record_Type_Declaration): Code cleanup.
982         * sem_ch4.adb (Has_Arbitrary_Evaluation_Order,
983         Stop_Subtree_Climbind): Tables which speed up the identification
984         of dangerous calls to Ada 2012 functions with writable actuals
985         (AI05-0144).
986         (Analyze_Arithmetic_Op, Analyze_Call, Analyze_Comparison_Op,
987         Analyze_Equality_Op, Analyze_Logical_Op, Analyze_Membership_Op,
988         Analyze_Range): Code cleanup.
989         (Is_Arbitrary_Evaluation_Order_Construct): Removed.
990         (Check_Writable_Actuals): Code cleanup using the added tables.
991         * sem_util.adb (Check_Function_Writable_Actuals): Return
992         immediately if the node does not have the flag Check_Actuals
993         set to True.
995 2015-05-26  Eric Botcazou  <ebotcazou@adacore.com>
997         * exp_ch6.adb (Add_Call_By_Copy_Code): Remove restrictive
998         condition in the detection of the effects of Remove_Side_Effects.
999         * exp_util.ads (Remove_Side_Effects): Add general and historical note.
1000         * exp_util.adb (Is_Name_Reference): New predicate.
1001         (Remove_Side_Effects): Use it in lieu of Is_Object_Reference
1002         in order to decide whether to use the renaming to capture the
1003         side effects of the subexpression.
1004         (Side_Effect_Free): Remove obsolete test.
1006 2015-05-26  Robert Dewar  <dewar@adacore.com>
1008         * aspects.ads, aspects.adb: Add aspect Disable_Controlled.
1009         * einfo.ads, einfo.adb (Disable_Controlled): New flag.
1010         (Is_Controlled_Active): New function.
1011         * exp_ch3.adb (Expand_Freeze_Record_Type): Use
1012         Is_Controlled_Active.
1013         * exp_util.adb (Needs_Finalization): Finalization not needed
1014         if Disable_Controlled set.
1015         * freeze.adb (Freeze_Array_Type): Do not set
1016         Has_Controlled_Component if the component has Disable_Controlled.
1017         (Freeze_Record_Type): ditto.
1018         * sem_ch13.adb (Decorate): Minor reformatting.
1019         (Analyze_Aspect_Specifications): Implement Disable_Controlled.
1020         * sem_ch3.adb (Analyze_Object_Declaration): Handle
1021         Disable_Controlled.
1022         (Array_Type_Declaration): ditto.
1023         (Build_Derived_Private_Type): ditto.
1024         (Build_Derived_Type): ditto.
1025         (Record_Type_Definition): ditto.
1026         * snames.ads-tmpl: Add Name_Disable_Controlled.
1028 2015-05-26  Eric Botcazou  <ebotcazou@adacore.com>
1030         * exp_ch6.adb (Expand_Actuals): Use a constant declaration instead
1031         of a renaming to capture the return value of a function call.
1032         (Expand_Simple_Function_Return): Call Remove_Side_Effects
1033         instead of removing side effects manually before the call to
1034         _Postconditions.
1036 2015-05-26  Robert Dewar  <dewar@adacore.com>
1038         * exp_ch4.adb (Expand_N_Op_Expon): Deal with problem of wrong
1039         order in calling Duplicate_Subexpr.
1040         * einfo.ads: Fix documentation of Object/Value size for scalar types.
1042 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
1044         * exp_aggr.adb (Build_Array_Aggr_Code, Gen_Assign):
1045         If a component is default-initialized and its type has an
1046         invariant procedure, insert an invariant test after code for
1047         default-initialization of the component.
1049 2015-05-26  Gary Dismukes  <dismukes@adacore.com>
1051         * einfo.ads, sem_util.adb, sem_ch4.adb: Minor reformatting.
1053 2015-05-26  Robert Dewar  <dewar@adacore.com>
1055         * exp_unst.adb, exp_unst.ads: Change to using Subps table index for
1056         making AREC entity names unique.
1058 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
1060         * sem_cat.adb (Has_Stream_Attribute_Definition): If the type
1061         has aspect specifications, examine the corresponding list of
1062         representation items to determine whether there is a visible
1063         stream operation. The attribute definition clause generated from
1064         the aspect will be inserted at the freeze point of the type,
1065         which may be in the private part and not directly visible,
1066         but the aspect makes the operation available to a client.
1068 2015-05-26  Robert Dewar  <dewar@adacore.com>
1070         * sem_util.adb: Minor code reorganization.
1071         * sem_ch6.adb: Minor reformatting.
1073 2015-05-25  Eric Botcazou  <ebotcazou@adacore.com>
1075         * gcc-interface/utils.c (maybe_pad_type): Do not apply adjustment to
1076         original size for elementary types before issuing the size warning.
1078 2015-05-25  Eric Botcazou  <ebotcazou@adacore.com>
1080         * get_targ.adb (C_Get_Float_Words_BE): Adjust import name.
1081         (C_Get_Words_BE): Likewise.
1082         (C_Get_Bytes_BE): Likewise.
1083         (C_Get_Bits_BE): Likewise.
1084         (Width_From_Size): Remove superfluous space.
1085         * gcc-interface/targtyps.c (get_float_words_be): Rename into...
1086         (get_target_float_words_be): ...this.
1087         (get_words_be): Rename into...
1088         (get_target_words_be): ...this.
1089         (get_bytes_be): Rename into...
1090         (get_target_bytes_be): ...this.
1091         (get_bits_be): Rename into...
1092         (get_target_bits_be): ...this.
1093         * gcc-interface/gigi.h (standard_datatypes): Remove ADT_ptr_void_type.
1094         (ptr_void_type_node): Delete.
1095         (get_target_float_size): Likewise.
1096         (get_target_double_size): Likewise.
1097         (get_target_long_double_size): Likewise.
1098         (get_float_words_be): Likewise.
1099         (get_words_be): Likewise.
1100         (get_bytes_be): Likewise.
1101         (get_bits_be): Likewise.
1102         (get_target_float_words_be): Declare.
1103         (get_target_words_be): Likewise.
1104         (get_target_bytes_be): Likewise.
1105         (get_target_bits_be): Likewise.
1106         * gcc-interface/decl.c (gnat_to_gnu_entity): Replace ptr_void_type_node
1107         with ptr_type_node.
1108         (intrin_return_compatible_p): Likewise.
1109         * gcc-interface/trans.c (gigi): Likewise.
1110         * gcc-interface/utils2.c (maybe_wrap_malloc): Likewise.
1111         (maybe_wrap_free): Likewise.
1112         * gcc-interface/utils.c (maybe_pad_type): Remove superfluous space.
1113         * gcc-interface/misc.c (gnat_init): Do not set ptr_void_type_node.
1115 2015-05-25  Eric Botcazou  <ebotcazou@adacore.com>
1117         * gcc-interface/decl.c (elaborate_expression): Take a const string
1118         suffix instead of a tree.
1119         (elaborate_expression_1): Likewise.
1120         (elaborate_expression_2): Likewise.
1121         (gnat_to_gnu_entity): Adjust to above changes.
1122         (build_subst_list): Likewise.
1123         (get_entity_char): New static function.
1125 2015-05-25  Eric Botcazou  <ebotcazou@adacore.com>
1127         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: Move around.
1128         <E_Exception>: Merge with E_Variable case.
1129         <E_Variable>: Remove 'object' label.
1131 2015-05-25  Eric Botcazou  <ebotcazou@adacore.com>
1133         * gcc-interface/decl.c (gnat_to_gnu_entity): Minor tweak.
1134         * gcc-interface/trans.c (finalize_nrv_unc_r): Use CONSTRUCTOR_ELT.
1135         * gcc-interface/utils.c (convert): Likewise and simplify.
1136         (remove_conversions): Likewise.
1137         * gcc-interface/utils2.c (compare_fat_pointers): Likewise.
1138         (build_unary_op): Likewise and simplify.
1140 2015-05-25  Eric Botcazou  <ebotcazou@adacore.com>
1142         * gcc-interface/gigi.h (build_atomic_load): Adjust prototype.
1143         (build_atomic_store): Likewise.
1144         (build_load_modify_store): Declare.
1145         (VECTOR_TYPE_P): Delete.
1146         * gcc-interface/decl.c (gnat_to_gnu_entity): Replace Is_Atomic with
1147         Is_Atomic_Or_VFA throughout.
1148         <E_Array_Type>: Build a variant of the XUA type instead of forcing
1149         TYPE_VOLATILE on it.
1150         <E_Array_Subtype>: Use the main variant of the base type.
1151         Do not force TYPE_VOLATILE on the type being built.
1152         <E_Record_Type>: Likewise.
1153         <E_Array_Subtype>: Likewise.
1154         <E_Subprogram_Type>: Rename local variable.
1155         Add Atomic qualifier in conjunction with Volatile on types if needed.
1156         Force BLKmode for by-ref types only at the end of the processing.
1157         Change qualifiers only after changing the mode of the type.  Set
1158         TYPE_UNIVERSAL_ALIASING_P on the type directly.
1159         (check_ok_for_atomic_type): Issue specific error message for VFA.
1160         (gnat_to_gnu_component_type): Replace Is_Atomic with
1161         Is_Atomic_Or_VFA throughout.
1162         * gcc-interface/misc.c (gnat_get_alias_set): Test
1163         TYPE_UNIVERSAL_ALIASING_P on the type directly.
1164         * gcc-interface/trans.c (lvalue_required_p): Replace Is_Atomic with
1165         Is_Atomic_Or_VFA throughout.  Add missing guard.
1166         (node_is_atomic): New predicate.
1167         (node_has_volatile_full_access): Likewise.
1168         (gnat_strip_type_conversion): New function.
1169         (outer_atomic_access_required_p): New predicate.
1170         (atomic_sync_required_p): Rename into...
1171         (atomic_access_required_p): ...this.  Add SYNC parameter, scan the
1172         parent node first and then look for the atomic setting.  Add support
1173         for Volatile_Full_Access.
1174         (Call_to_gnu): Add atomic_access and outer_atomic_access parameters
1175         and adjusts calls to above functions.  Use load-modify-store sequence
1176         for updates of In/Out and Out parameters if required, as well as for
1177         moving the result to the target if required.  Add couple of missing
1178         guards.
1179         (gnat_to_gnu): Adjust calls to above functions.
1180         <N_Object_Renaming_Declaration>: If the renamed object has side-effects
1181         evaluate only its address.
1182         <N_Assignment_Statement>: Adjust call to Call_to_gnu.  Use load-modify
1183         store sequence if required.
1184         <N_Function_Call>: Adjust call to Call_to_gnu.
1185         (extract_values): Adjust comment.
1186         * gcc-interface/utils2.c (build_atomic_load): Add SYNC parameter and
1187         use relaxed memory model if it is not set.
1188         (build_atomic_store): Likewise.
1189         (call_is_atomic_load): New predicate.
1190         (build_load_modify_store): New function.
1191         (build_binary_op) <MODIFY_EXPR>: Accept SAVE_EXPR on the LHS.
1192         (gnat_stabilize_reference) <CALL_EXPR>: Deal with atomic loads.
1194 2015-05-25  Eric Botcazou  <ebotcazou@adacore.com>
1196         * gcc-interface/ada-tree.h (DECL_RENAMING_GLOBAL_P): Rename into...
1197         (DECL_GLOBAL_NONCONSTANT_RENAMING_P): ...this.
1198         * gcc-interface/gigi.h (record_global_renaming_pointer): Delete.
1199         (invalidate_global_renaming_pointers): Likewise.
1200         (record_global_nonconstant_renaming): New.
1201         (invalidate_global_nonconstant_renamings): Likewise.
1202         (get_inner_constant_reference): Likewise.
1203         (gnat_constant_reference_p): Likewise.
1204         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Adjust to above
1205         and register the renaming pointer only if the object is non-constant.
1206         (elaborate_expression_1): Call get_inner_constant_reference instead
1207         of get_inner_reference.
1208         * gcc-interface/trans.c (fold_constant_decl_in_expr): Minor tweak.
1209         (Identifier_to_gnu): Adjust to above and do not recheck the renamed
1210         object before substituting it.
1211         (Compilation_Unit_to_gnu): Adjust to above renaming.  Minor tweaks.
1212         (gnat_to_gnu) <N_Object_Renaming_Declaration>: Do not return the
1213         result at the global level.
1214         (N_Exception_Renaming_Declaration): Likewise.
1215         * gcc-interface/utils.c (global_renaming_pointers): Rename into...
1216         (global_nonconstant_renamings): ...this.
1217         (destroy_gnat_utils): Adjust to above renaming.
1218         (record_global_renaming_pointer): Rename into...
1219         (record_global_nonconstant_renaming): ...this.
1220         (invalidate_global_renaming_pointers): Rename into...
1221         (invalidate_global_nonconstant_renamings): ...this and do not recheck
1222         the renamed object before invalidating.
1223         * gcc-interface/utils2.c (gnat_stabilize_reference): Minor tweak.
1224         (get_inner_constant_reference): New public function.
1225         (gnat_constant_reference_p): New predicate.
1227 2015-05-25  Javier Miranda  <miranda@adacore.com>
1229         * einfo.ads, einfo.adb (Has_Out_Or_In_Out_Parameter): This attribute
1230         is now present in subprograms, generic subprograms, entries and
1231         entry families.
1232         * sem_ch6.adb (Set_Formal_Mode): Set As_Out_Or_In_Out_Parameter
1233         on entries, entry families, subprograms and generic subprograms.
1234         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration):
1235         Minor code reorganization to ensure that the Ekind attribute
1236         of the subprogram entity is set before its formals are
1237         processed. Required to allow the use of the attribute
1238         Has_Out_Or_In_Out_Parameter on the subprogram entity.
1239         * sem_aggr.adb (Resolve_Aggregate, Resolve_Extension_Aggregate):
1240         Perform the check on writable actuals only if the value of some
1241         component of the aggregate involves calling a function with
1242         out-mode parameters.
1243         (Resolve_Record_Aggregate): Propagate the Check_Actuals flag to the
1244         internally built aggregate.
1245         * sem_ch3.adb (Build_Derived_Record_Type, Record_Type_Declaration):
1246         Perform the check on writable actuals only if the initialization of
1247         some component involves calling a function with out-mode parameters.
1248         * sem_ch4.adb (Analyze_Arithmetic_Op, Analyze_Comparison_Op,
1249         Analyze_Equality_Op, Analyze_Logical_Op, Analyze_Membership_Op,
1250         Analyze_Range): Check writable actuals only if the
1251         subtrees have a call to a function with out-mode parameters
1252         (Analyze_Call.Check_Writable_Actuals): New subprogram. If the call
1253         has out or in-out parameters then mark its outermost enclosing
1254         construct as a node on which the writable actuals check must
1255         be performed.
1256         (Analyze_Call): Check if the flag must be set and if the outermost
1257         enclosing construct.
1258         * sem_util.adb (Check_Function_Writable_Actuals): Code cleanup
1259         and reorganization. We skip processing aggregate discriminants
1260         since their precise analysis involves two phases traversal.
1261         * sem_res.adb (Resolve_Actuals, Resolve_Arithmetic_Op,
1262         Resolve_Logical_Op, Resolve_Membership_Op): Remove call to
1263         check_writable_actuals.
1265 2015-05-22  Ed Schonberg  <schonberg@adacore.com>
1267         * sem_ch3.adb (Constrain_Concurrent): If the context is a
1268         type declaration, generate an Itype_Reference for the anonymous
1269         subtype, to force elaboration at this point in gigi.
1271 2015-05-22  Gary Dismukes  <dismukes@adacore.com>
1273         * layout.adb, einfo.ads, sem_ch12.adb, freeze.adb, sem_util.ads,
1274         exp_ch4.adb, sem_ch6.adb: Minor reformatting and typo fixes.
1276 2015-05-22  Ed Schonberg  <schonberg@adacore.com>
1278         * sem_res.adb (Resolve_Actuals): If the call is to an overridden
1279         operation, replace the names of the actuals in named associations
1280         with the names of the actuals of the subprogram that is eventually
1281         executed. The names of the formals and the defaults can differ
1282         between the two operations when they are operations of a formal
1283         derived type.
1285 2015-05-22  Bob Duff  <duff@adacore.com>
1287         * a-convec.ads, a-convec.adb (Append): Check for fast path. Split
1288         out slow path into separate procedure. Inline Append. Fast path
1289         now avoids calling Insert.
1290         (Finalize): Do the busy checking last, so the container gets emptied.
1291         (Insert, Insert_Space): Remove redundancy.
1293 2015-05-22  Robert Dewar  <dewar@adacore.com>
1295         * switch-c.adb (Scan_Front_End_Switches): Insist on -gnatc
1296         for -gnatd.V.
1298 2015-05-22  Arnaud Charlet  <charlet@adacore.com>
1300         * gnatvsn.ads: Minor code reorg to remember more easily to update
1301         variables.
1303 2015-05-22  Ed Schonberg  <schonberg@adacore.com>
1305         * sem_ch10.adb (Analyze_With_Clause): In ASIS_Mode, a
1306         limited_with clause on a predefined unit is not transformed into
1307         a regular with_clause, to preserve the original tree structure.
1308         * sinfo.ads (N_With_Clause): Add comment on handling of
1309         Limited_With.
1310         * sem_ch10.adb: Minor reformatting.
1312 2015-05-22  Ed Schonberg  <schonberg@adacore.com>
1314         * sem_ch8.adb (Freeze_Profile): A limited view of a type in
1315         the profile of a subprogram renaming does not require freezing,
1316         because it is declared in a different unit.
1318 2015-05-22  Ed Schonberg  <schonberg@adacore.com>
1320         * exp_aggr.adb (Get_Constraint_Association): If type (of ancestor
1321         composite type) is private, go to full view. This was previously
1322         done only in an instance context, but is happen whenever a chain
1323         of private extensions includes one inherited discriminant.
1325 2015-05-22  Robert Dewar  <dewar@adacore.com>
1327         * einfo.ads: Minor comment updates.
1328         * exp_unst.adb: Move Subps table to spec Don't remove old entries
1329         from table Add Last field to record last entry used.
1330         * exp_unst.ads: Move Subps table here from body So that Cprint
1331         can access saved values.
1333 2015-05-22  Bob Duff  <duff@adacore.com>
1335         * a-cdlili.adb, a-cdlili.ads, a-cohama.adb, a-cohama.ads,
1336         * a-cohase.adb, a-cohase.ads, a-convec.adb, a-convec.ads,
1337         * a-coorma.adb, a-coorma.ads, a-coorse.adb, a-coorse.ads:
1338         (Pseudo_Reference, Element_Access, Get_Element_Access): New
1339         declarations added for use by performance improvements in exp_ch5.adb.
1340         * snames.ads-tmpl: New names referenced by exp_ch5.adb.
1341         * exp_ch5.adb: Speed up "for ... of" loops for predefined containers.
1342         Instead of doing literally what the RM calls for, we do something
1343         equivalent that avoids expensive operations inside the loop. If the
1344         container package has appropriate Next, Pseudo_Reference,
1345         Element_Access, Get_Element_Access declarations, we invoke the
1346         optimization.
1347         * snames.ads-tmpl: Note speed improvement.
1349 2015-05-22  Eric Botcazou  <ebotcazou@adacore.com>
1351         * einfo.ads (Is_Atomic_Or_VFA): Move to XEINFO INLINES section.
1352         * xeinfo.adb: Replace a-einfo.h with einfo.h throughout.
1353         Add pattern to translate "or else" into "||".
1355 2015-05-22  Eric Botcazou  <ebotcazou@adacore.com>
1357         * einfo.ads (Has_Volatile_Full_Access): Rename into...
1358         (Is_Volatile_Full_Access): ...this.
1359         (Set_Has_Volatile_Full_Access): Rename into...
1360         (Set_Is_Volatile_Full_Access): ...this.
1361         * einfo.adb (Has_Volatile_Full_Access): Rename into...
1362         (Is_Volatile_Full_Access): ...this.
1363         (Set_Has_Volatile_Full_Access): Rename into...
1364         (Set_Is_Volatile_Full_Access): ...this.
1365         (Is_Atomic_Or_VFA): Adjust to above renaming.
1366         * errout.adb (Special_Msg_Delete): Likewise.
1367         * exp_pakd.adb (Install_PAT): Likewise.
1368         * freeze.adb (Freeze_Array_Type): Likewise.
1369         * sem_ch8.adb (Analyze_Object_Renaming): Likewise.
1370         * sem_ch13.adb (Inherit_Delayed_Rep_Aspects): Likewise.
1371         (Inherit_Aspects_At_Freeze_Point): Likewise.
1372         * sem_prag.adb (Set_Atomic_VFA): Likewise.
1373         (Process_Atomic_Independent_Shared_Volatile): Likewise.
1374         * sem_util.adb (Is_Atomic_Or_VFA_Object): Likewise.
1376 2015-05-22  Robert Dewar  <dewar@adacore.com>
1378         * exp_ch5.adb, layout.adb, einfo.adb, einfo.ads, sem_prag.adb,
1379         freeze.adb, freeze.ads, sem_util.adb, sem_util.ads, exp_ch2.adb,
1380         exp_ch4.adb, errout.adb, exp_aggr.adb, sem_ch13.adb: This is a general
1381         change that deals with the fact that most of the special coding for
1382         Atomic should also apply to the case of Volatile_Full_Access.
1383         A new attribute Is_Atomic_Or_VFA is introduced, and many of the
1384         references to Is_Atomic now use this new attribute.
1386 2015-05-22  Robert Dewar  <dewar@adacore.com>
1388         * exp_ch4.adb (Expand_N_Op_Eq): Introduce 'Machine for 'Result
1389         comparison.
1391 2015-05-22  Eric Botcazou  <ebotcazou@adacore.com>
1393         * sprint.adb (Source_Dump): When generating debug files, deal
1394         with the case of a stand-alone package instantiation by dumping
1395         together the spec and the body in the common debug file.
1397 2015-05-22  Robert Dewar  <dewar@adacore.com>
1399         * sem_ch13.adb (Minimum_Size): Size is zero for null range
1400         discrete subtype.
1402 2015-05-22  Hristian Kirtchev  <kirtchev@adacore.com>
1404         * einfo.adb (Anonymous_Master): This attribute now applies
1405         to package and subprogram bodies.
1406         (Set_Anonymous_Master): This attribute now applies to package and
1407         subprogram bodies.
1408         (Write_Field36_Name): Add output for package and subprogram bodies.
1409         * einfo.ads Update the documentation on attribute Anonymous_Master
1410         along with occurrences in entities.
1411         * exp_ch4.adb (Create_Anonymous_Master): Reimplemented to
1412         handle spec and body anonymous masters of the same unit.
1413         (Current_Anonymous_Master): Reimplemented. Handle a
1414         package instantiation that acts as a compilation unit.
1415         (Insert_And_Analyze): Reimplemented.
1417 2015-05-22  Ed Schonberg  <schonberg@adacore.com>
1419         * sem_ch10.adb (Analyze_With_Clause): A limited_with_clause on a
1420         predefined unit is treated as a regular with_clause.
1422 2015-05-22  Robert Dewar  <dewar@adacore.com>
1424         * sem_ch12.adb, prj.ads, makeutl.ads, sem_ch6.adb, prj-nmsc.adb,
1425         prj-conf.adb, sem_disp.adb: Minor reformatting.
1427 2015-05-22  Vincent Celier  <celier@adacore.com>
1429         * clean.adb (Parse_Cmd_Line): For native gnatclean, check
1430         for switch -P and, if found and gprclean is available, invoke
1431         silently gprclean.
1432         * make.adb (Initialize): For native gnatmake, check for switch -P
1433         and, if found and gprbuild is available, invoke silently gprbuild.
1435 2015-05-22  Eric Botcazou  <ebotcazou@adacore.com>
1437         * sem_ch13.adb (Validate_Unchecked_Conversions): Also issue
1438         specific warning for discrete types when the source is larger
1439         than the target.
1441 2015-05-22  Ed Schonberg  <schonberg@adacore.com>
1443         * einfo.ads, einfo.adb (Incomplete_Actuals): New attribute of
1444         package instantiations. Holds the list of actuals in the instance
1445         that are incomplete types, to determine where the corresponding
1446         instance body must be placed.
1447         * sem_ch6.adb (Conforming_Types): An incomplete type used as an
1448         actual in an instance matches an incomplete formal.
1449         * sem_disp.adb (Check_Dispatching_Call): Handle missing case of
1450         explicit dereference.
1451         (Inherited_Subprograms): In the presence of a limited view there
1452         are no subprograms to inherit.
1453         * sem_ch12.adb (Preanalyze_Actuals): Build list of incomplete
1454         actuals of instance, for later placement of instance body and
1455         freeze nodes for actuals.
1456         (Install_Body): In the presence of actuals that incomplete types
1457         from a limited view, the instance body cannot be placed after
1458         the declaration because full views have not been seen yet. Any
1459         use of the non-limited views in the instance body requires
1460         the presence of a regular with_clause in the enclosing unit,
1461         and will fail if this with_clause is missing.  We place the
1462         instance body at the beginning of the enclosing body, which is
1463         the unit being compiled, and ensure that freeze nodes for the
1464         full views of the incomplete types appear before the instance.
1466 2015-05-22  Pascal Obry  <obry@adacore.com>
1468         * makeutl.ads, prj-conf.adb, prj-nmsc.adb, prj.ads
1469         (In_Place_Option): Removed.
1470         (Relocate_Build_Tree_Option): New constant.
1471         (Root_Dir_Option): New constant.
1472         (Obj_Root_Dir): Removed.
1473         (Build_Tree_Dir): New variable.
1474         (Root_Src_Tree): Removed.
1475         (Root_Dir): New variable.
1476         * prj-conf.adb (Get_Or_Create_Configuration_File): Add check
1477         for improper relocation.
1478         * prj-nmsc.adb (Locate_Directory): Add check for improper
1479         relocation.
1481 2015-05-22  Hristian Kirtchev  <kirtchev@adacore.com>
1483         * einfo.adb (Default_Init_Cond_Procedure): Code cleanup. The
1484         attribute now applies to the base type.
1485         (Has_Default_Init_Cond): Now applies to the base type.
1486         (Has_Inherited_Default_Init_Cond): Now applies to the base type.
1487         (Set_Default_Init_Cond_Procedure): Code cleanup. The attribute now
1488         applies to the base type.
1489         (Set_Has_Default_Init_Cond): Now applies to the base type.
1490         (Set_Has_Inherited_Default_Init_Cond): Now applies to the base type.
1491         * exp_ch3.adb (Expand_N_Object_Declaration): No need to use the
1492         base type when adding a call to the Default_Initial_Condition.
1494 2015-05-22  Hristian Kirtchev  <kirtchev@adacore.com>
1496         * einfo.adb: Node36 is now used as Anonymous_Master. Flag253
1497         is now unused.
1498         (Anonymous_Master): New routine.
1499         (Has_Anonymous_Master): Removed.
1500         (Set_Anonymous_Master): New routine.
1501         (Set_Has_Anonymous_Master): Removed.
1502         (Write_Entity_Flags): Remove the output for Has_Anonymous_Maser.
1503         (Write_Field36_Name): Add output for Anonymous_Master.
1504         * einfo.ads Add new attribute Anonymous_Master along with
1505         occurrences in nodes. Remove attribute Has_Anonymous_Master along
1506         with occurrences in nodes.
1507         (Anonymous_Master): New routine along with pragma Inline.
1508         (Has_Anonymous_Master): Removed along with pragma Inline.
1509         (Set_Anonymous_Master): New routine along with pragma Inline.
1510         (Set_Has_Anonymous_Master): Removed along with pragma Inline.
1511         * exp_ch4.adb (Create_Anonymous_Master): New routine.
1512         (Current_Anonymous_Master): Reimplemented.
1514 2015-05-22  Bob Duff  <duff@adacore.com>
1516         * freeze.adb (Freeze_Profile): Suppress warning if imported
1517         subprogram is not at library level.
1519 2015-05-22  Robert Dewar  <dewar@adacore.com>
1521         * sem_ch8.adb (Analyze_Object_Renaming): Check for renaming
1522         component of an object to which Volatile_Full_Access applies.
1524 2015-05-22  Jerome Guitton  <guitton@adacore.com>
1526         * exp_dbug.ads: Add note about non bit-packed arrays.
1528 2015-05-22  Eric Botcazou  <ebotcazou@adacore.com>
1530         * sem_prag.adb: Fix typo.
1531         * einfo.ads: Grammar fixes in comments.
1533 2015-05-22  Bob Duff  <duff@adacore.com>
1535         * a-cborma.ads, a-cidlli.ads, a-cimutr.ads, a-ciormu.ads,
1536         * a-cihase.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
1537         * a-cborse.ads, a-comutr.ads, a-ciorma.ads, a-cobove.ads,
1538         * a-coormu.ads, a-convec.ads, a-cohase.ads, a-coinho.ads,
1539         * a-cbdlli.ads, a-cbmutr.ads, a-cbhase.ads, a-cdlili.ads,
1540         * a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
1541         * a-coinho-shared.ads (Constant_Reference_Type, Reference_Type):
1542         Add an initialization expression "raise Program_Error". See,
1543         for example, RM-A.18.2(148.4).
1545 2015-05-22  Robert Dewar  <dewar@adacore.com>
1547         * debug.adb: Update documentation.
1548         * einfo.ads, einfo.adb (Needs_Typedef): New flag
1549         * exp_unst.adb (Unnest_Subprogram): Mark AREC types as needing
1550         typedef's in C.
1551         * frontend.adb: Update comments.
1552         * gnat1drv.adb (Adjust_Global_Switches): Set all needed flags
1553         for -gnatd.V
1554         * opt.ads (Generate_C_Code): New switch.
1555         * osint-c.adb (Write_C_File_Info): Removed, not used
1556         (Write_H_File_Info): Removed, not used
1557         * osint-c.ads (Write_C_File_Info): Removed, not used
1558         (Write_H_File_Info): Removed, not used
1559         * osint.ads (Write_Info): Minor comment updates.
1560         (Output_FD): Moved from private part to public part of spec.
1561         * sem.adb (Semantics): Force expansion on if in Generate_C_Code
1562         mode.
1563         * atree.ads: minor typo in comment.
1564         * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
1565         Do not allow VFA on composite object with aliased component.
1567 2015-05-22  Arnaud Charlet  <charlet@adacore.com>
1569         * osint-c.adb, osint-c.ads (Set_File_Name): Move back to spec.
1571 2015-05-22  Pascal Obry  <obry@adacore.com>
1573         * prj-util.adb: Minor comment editing.
1575 2015-05-22  Pascal Obry  <obry@adacore.com>
1577         * makeutl.ads (In_Place_Option): New constant.
1578         * prj.ads (Obj_Root_Dir): New variable (absolute path to relocate
1579         objects).
1580         (Root_Src_Tree): New variable (absolute path of root source tree).
1581         * prj-conf.adb (Do_Autoconf): Take into account the object root
1582         directory (if defined) to generate configuration project.
1583         * prj-nmsc.adb (Get_Directories): Handle case where Obj_Root_Dir
1584         is defined.
1585         (Locate_Directory): Likewise.
1587 2015-05-22  Pascal Obry  <obry@adacore.com>
1589         * prj-util.ads, prj-util.adb (Relative_Path): New routine.
1591 2015-05-22  Bob Duff  <duff@adacore.com>
1593         * exp_utils.ads, exp_utils.adb (Find_Optional_Prim_Op): New
1594         interface to return Empty when not found, so we can avoid handling
1595         Program_Error in that case.
1596         (Find_Prim_Op): Fix latent bug: raise Program_Error when there are no
1597         primitives.
1598         * exp_ch7.adb, sem_util.adb: Use Find_Optional_Prim_Op when the
1599         code is expecting Empty.
1600         * sem_ch8.adb: Use Find_Optional_Prim_Op to avoid handling
1601         Program_Error.
1603 2015-05-22  Robert Dewar  <dewar@adacore.com>
1605         * sem_ch3.adb, sem_intr.adb, exp_ch4.adb, s-rannum.adb,
1606         sem_eval.adb, s-fatgen.adb, s-expmod.ads: Remove incorrect hyphen in
1607         non-binary.
1608         * exp_util.adb: Add comment.
1609         * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move from spec to
1610         body.
1611         (Set_File_Name): New name for the above.
1612         (Create_C_File, Create_H_File, Write_C_File_Info, Write_H_File_Info,
1613         Close_C_File, Close_H_File): New procedure.
1614         * osint.adb: Minor reformatting.
1615         * osint.ads: Minor comment updates.
1617 2015-05-22  Robert Dewar  <dewar@adacore.com>
1619         * exp_ch4.adb: Minor rewording.
1620         * exp_util.ads: Clarify that Find_Prim_Op is only for
1621         tagged types.
1623 2015-05-22  Robert Dewar  <dewar@adacore.com>
1625         * atree.adb, atree.ads, treepr.adb: Change name Needs_Actuals_Check to
1626         Check_Actuals.
1627         * exp_ch4.adb (Expand_N_Op_Expon): Optimize 2**x in modular
1628         and overflow cases.
1630 2015-05-22  Eric Botcazou  <ebotcazou@adacore.com>
1632         * exp_pakd.adb (Install_PAT): Propagate representation aspects
1633         from the original array type to the PAT.
1635 2015-05-22  Robert Dewar  <dewar@adacore.com>
1637         * treepr.adb (Print_Node_Header): Add output of Needs_Actuals_Check.
1639 2015-05-22  Robert Dewar  <dewar@adacore.com>
1641         * atree.adb, atree.ads (Needs_Actuals_Check): New flag.
1643 2015-05-22  Hristian Kirtchev  <kirtchev@adacore.com>
1645         * sem_prag.adb (Analyze_Pragma): Remove the detection
1646         of a useless Part_Of indicator when the related item is a constant.
1647         (Check_Matching_Constituent): Do not emit an error on a constant.
1648         (Check_Missing_Part_Of): Do not check for a missing Part_Of indicator
1649         when the related item is a constant.
1650         (Collect_Body_States): Code cleanup.
1651         (Collect_Visible_States): Code cleanup.
1652         (Report_Unused_States): Do not emit an error on a constant.
1653         * sem_util.ads, sem_util.adb (Has_Variable_Input): Removed.
1655 2015-05-22  Eric Botcazou  <ebotcazou@adacore.com>
1657         * sem_ch8.adb (Analyze_Object_Renaming): Copy
1658         Has_Volatile_Full_Access from renamed to renaming entities.
1659         * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
1660         Tidy up and remove redundant setting of Has_Volatile_Full_Access.
1662 2015-05-22  Hristian Kirtchev  <kirtchev@adacore.com>
1664         * ghost.adb (Check_Ghost_Completion): Update references to SPARK
1665         RM 6.9 rules.
1666         (Check_Ghost_Policy): Update references to SPARK RM 6.9 rules.
1667         * sem_ch3.adb (Analyze_Object_Declaration): Update references
1668         to SPARK RM 6.9 rules.
1669         (Check_Completion): Ghost entities do not require a special form of
1670         completion.
1671         * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Update references
1672         to SPARK RM 6.9 rules.
1673         (Analyze_Subprogram_Body_Helper): Update references to SPARK RM 6.9
1674         rules.
1675         * sem_ch7.adb (Analyze_Package_Body_Helper): Update references
1676         to SPARK RM 6.9 rules.
1677         (Requires_Completion_In_Body): Ghost entities do not require a special
1678         form of completion.
1680 2015-05-22  Robert Dewar  <dewar@adacore.com>
1682         * a-csquin.ads: Use Ada 2012 notation.
1683         * sem_ch8.adb: Minor reformatting.
1685 2015-05-22  Hristian Kirtchev  <kirtchev@adacore.com>
1687         * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect Import
1688         acts as a completion.
1690 2015-05-22  Ed Schonberg  <schonberg@adacore.com>
1692         * sem_ch13.adb: Minor reformatting.
1694 2015-05-22  Jose Ruiz  <ruiz@adacore.com>
1696         * a-reatim.adb: Minor change, fix typo.
1698 2015-05-22  Robert Dewar  <dewar@adacore.com>
1700         * sem_util.ads: Minor addition of ??? comment.
1701         * sem_prag.adb, sem_util.adb: Minor reformatting.
1702         * sem_ch13.adb: minor reformatting.
1704 2015-05-22  Robert Dewar  <dewar@adacore.com>
1706         * a-reatim.ads: Add Compile_Time_Error to ensure Duration
1707         is 64-bits.
1708         * sem_ch13.adb: Improve error message.
1709         * exp_ch4.adb: Minor reformatting.
1711 2015-05-22  Hristian Kirtchev  <kirtchev@adacore.com>
1713         * sem_prag.adb (Analyze_Pragma): Constants without variable
1714         input do not require indicator Part_Of.
1715         (Check_Missing_Part_Of): Constants without variable input do not
1716         requrie indicator Part_Of.
1717         (Collect_Visible_States): Constants without variable input are
1718         not part of the hidden state of a package.
1719         * sem_util.ads, sem_util.adb (Has_Variable_Input): New routine.
1721 2015-05-22  Robert Dewar  <dewar@adacore.com>
1723         * exp_util.adb (Activate_Atomic_Synchronization): Do not set
1724         Atomic_Sync_Required for an object renaming declaration.
1725         * sem_ch8.adb (Analyze_Object_Renaming): Copy Is_Atomic and
1726         Is_Independent to renaming object.
1728 2015-05-22  Ed Schonberg  <schonberg@adacore.com>
1730         * sem_ch5.adb (Analyze_Iterator_Specification): Diagnose
1731         various illegalities in iterators over arrays and containers:
1732         a) New function Get_Cursor_Type, to verify that the cursor is
1733         not a limited type at the point of iteration.
1734         b) If the container is a constant, an element_iterator is illegal
1735         if the container type does not have a Constant_Indexing aspect.
1736         c) If the iterate function has an in-out controlling parameter,
1737         the container cannot be a constant object.
1738         d) Reject additional cases of iterators over a
1739         discriminant-dependent component of a mutable object.
1741 2015-05-21  Hristian Kirtchev  <kirtchev@adacore.com>
1743         * einfo.adb (Contract): This attribute now applies to constants.
1744         (Set_Contract): This attribute now applies to constants.
1745         (Write_Field34_Name): Add output for constants.
1746         * einfo.ads Attribute Contract now applies to constants.
1747         * sem_ch3.adb (Analyze_Object_Contract): Constants now have
1748         their Part_Of indicator verified.
1749         * sem_prag.adb (Analyze_Constituent): A constant is now a valid
1750         constituent.
1751         (Analyze_Global_Item): A constant cannot act as an output.
1752         (Analyze_Initialization_Item): Constants are now a valid
1753         initialization item.
1754         (Analyze_Initializes_In_Decl_Part): Rename
1755         global variable States_And_Vars to States_And_Objs and update
1756         all its occurrences.
1757         (Analyze_Input_Item): Constants are now a
1758         valid initialization item. Remove SPARM RM references from error
1759         messages.
1760         (Analyze_Pragma): Indicator Part_Of can now apply to a constant.
1761         (Collect_Body_States): Collect both source constants
1762         and variables.
1763         (Collect_States_And_Objects): Collect both source constants and
1764         variables.
1765         (Collect_States_And_Variables): Rename
1766         to Collect_States_And_Objects and update all its occurrences.
1767         (Collect_Visible_States): Do not collect constants and variables
1768         used to map generic formals to actuals.
1769         (Find_Role): The role of a constant is that of an input. Separate the
1770         role of a variable from that of a constant.
1771         (Report_Unused_Constituents): Add specialized wording for constants.
1772         (Report_Unused_States): Add specialized wording for constants.
1773         * sem_util.adb (Add_Contract_Item): Add processing for constants.
1774         * sem_util.ads (Add_Contract_Item): Update the comment on usage.
1775         (Find_Placement_In_State_Space): Update the comment on usage.
1777 2015-05-21  Ed Schonberg  <schonberg@adacore.com>
1779         * sem_ch5.adb: minor reformatting.
1781 2015-05-21  Robert Dewar  <dewar@adacore.com>
1783         * freeze.adb (Freeze_Entity): Properly tag -gnatw.z messages.
1785 2015-05-21  Robert Dewar  <dewar@adacore.com>
1787         * freeze.adb: Minor reformatting.
1788         * cstand.adb (Print_Standard): Fix bad printing of Duration
1789         low bound.
1790         * a-reatim.adb (Time_Of): Complete rewrite to properly detect
1791         out of range args.
1793 2015-05-21  Ed Schonberg  <schonberg@adacore.com>
1795         * sem_ch5.adb: add (useless) initial value.
1796         * sem_ch3.adb (Replace_Anonymous_Access_To_Protected_Subprogram):
1797         Check whether the procedure has parameters before processing
1798         formals in ASIS mode.
1800 2015-05-21  Ed Schonberg  <schonberg@adacore.com>
1802         * sem_ch13.adb (Check_Iterator_Functions): Emit error on Iterator
1803         aspect as well when indexing function is illegal.
1804         (Valid_Default_Iterator): Handle properly somme illegal cases
1805         to prevent compilation abandoned messages.
1806         (Check_Primitive_Function): Verify that type and indexing function
1807         are in the same scope.
1808         * freeze.adb (Freeze_Record): Extend patch on the presence of
1809         indexing aspects to aspect Default_Iterator.
1811 2015-05-19  David Malcolm  <dmalcolm@redhat.com>
1813         * gcc-interface/trans.c (Sloc_to_locus1): Strenghthen local "map"
1814         from line_map * to line_map_ordinary *.
1816 2015-05-12  Jason Merrill  <jason@redhat.com>
1818         * sigtramp-vxworks.c: Add space between string literal and macro
1819         name.
1821 2015-05-12  Arnaud Charlet  <charlet@adacore.com>
1823         * gnat_rm.texi, gnat_ugn.texi, doc: Documentation updates and clean ups
1825 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
1827         * sem_ch5.adb (Analyze_Iterator_Specifications): Additional
1828         legality checks for array and container iterators:
1829         a) The domain of iteration cannot be a component that depends
1830         on discriminants of a mutable object. The check was recently
1831         added for element iterators.
1832         b) The cursor type cannot be a limited type at the point of the
1833         iteration, because the cursor will be assigned to in the body
1834         of the loop.
1836 2015-05-12  Robert Dewar  <dewar@adacore.com>
1838         * freeze.adb (Freeze_Record_Type): Make sure that if we have
1839         aspect Iterator_Element, then we have either Constant_Indexing
1840         or Variable_Indexing.
1842 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
1844         * a-coormu.ads, a-coormu.adb: Add Indexing aspect, Reference_Type,
1845         and Reference_Control_Type to support element iterators over
1846         ordered multisets.
1847         * a-ciormu.ads, a-ciormu.adb: Ditto for
1848         indefinite_ordered_multisets.
1850 2015-05-12  Hristian Kirtchev  <kirtchev@adacore.com>
1852         * exp_ch4.adb (Expand_N_Expression_With_Actions): Force
1853         the evaluation of the EWA expression.  Code cleanup.
1854         (Process_Transient_Object): Code cleanup.
1855         * exp_util.adb (Is_Aliased): Controlled transient objects found
1856         within EWA nodes are not aliased.
1857         (Is_Finalizable_Transient): Iterators are not finalizable transients.
1859 2015-05-12  Robert Dewar  <dewar@adacore.com>
1861         * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
1862         Don't allow Atomic and Volatile_Full_Access for the same entity.
1864 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
1866         * sem_ch5.adb (Analyze_Iterator_Specification): Implement new
1867         semantics and safety checks specified in AI12-0151.
1869 2015-05-12  Pierre-Marie de Rodat  <derodat@adacore.com>
1871         * sem_ch10.adb (Sem_Ch10.Analyze_Proper_Body): Generate SCOs
1872         for subunit in generic units.
1874 2015-05-12  Robert Dewar  <dewar@adacore.com>
1876         * sem_elab.adb (Check_A_Call): Avoid checking internal call
1877         from Valid_Scalars
1879 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
1881         * sem_ch6.adb (Process_Formals): An untagged incomplete type
1882         is legal in the profile of a null procedure.
1884 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
1886         * sem_ch12.adb (Validate_Derived_Type_Instance): Handle properly
1887         the checks on a derived formal whose parent type is a previous
1888         formal that is not a derived type.
1890 2015-05-12  Robert Dewar  <dewar@adacore.com>
1892         * aspects.ads, aspects.adb: Add entries for aspect Volatile_Full_Access
1893         * einfo.adb (Has_Volatile_Full_Access): New flag.
1894         (Has_Volatile_Full_Access): New flag.
1895         * einfo.ads (Has_Volatile_Full_Access): New flag.
1896         * par-prag.adb: Add dummy entry for Volatile_Full_Access.
1897         * sem_prag.adb (Analyze_Pragma, case Volatile_Full_Access):
1898         Implement new pragma.
1899         * snames.ads-tmpl: Add entries for pragma Volatile_Full_Access.
1901 2015-05-12  Robert Dewar  <dewar@adacore.com>
1903         * targparm.ads: Minor reformatting.
1905 2015-05-12  Robert Dewar  <dewar@adacore.com>
1907         * a-reatim.adb (Time_Of): Properly detect overflow when TS = 0.0.
1908         * a-reatim.ads: Minor reformatting.
1910 2015-05-12  Hristian Kirtchev  <kirtchev@adacore.com>
1912         * einfo.ads: Update the documentation of flags
1913         Has_Inherited_Default_Init_Cond and Has_Default_Init_Cond.
1915 2015-05-12  Robert Dewar  <dewar@adacore.com>
1917         * impunit.adb: Add entry for a-dhfina.ads
1918         * a-dhfina.ads: New file.
1920 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
1922         * exp_ch5.adb (Expand_Iterator_Loop_Over_Array): if the array
1923         type has convention Fortran, a multidimensional iterator varies
1924         the first dimension fastest.
1926 2015-05-12  Hristian Kirtchev  <kirtchev@adacore.com>
1928         * einfo.adb: Node32 is now used as Encapsulating_State.
1929         Node37 is now used as Associated_Entity.
1930         (Associated_Entity): New routine.
1931         (Encapsulating_State): Update the assertion guard to include constants.
1932         (Set_Associated_Entity): New routine.
1933         (Set_Encapsulating_State): Update the assertion guard to
1934         include constants.
1935         (Write_Field10_Name): Remove the output for Encapsulating_State.
1936         (Write_Field32_Name): Add output for Encapsulating_State.
1937         (Write_Field37_Name): Add output for Associated_Entity.
1938         * einfo.ads New attribute Associated_Entity along with placement
1939         in entities. Attribute Encapsulating_State now uses Node32.
1940         (Associated_Entity): New routine along with pragma Inline.
1941         (Set_Associated_Entity): New routine along with pragma Inline.
1942         * inline.ads Code reformatting.
1943         * sem_attr.adb (Analyze_Attribute): Correct the prefix of
1944         attribute 'Result when the context is a generic instantiation.
1945         (Analyze_Attribute_Old_Result): Pragmas Depends and
1946         Refined_Depends are a valid context for attribute 'Result.
1947         (Denote_Same_Function): Allow attribute 'Result to denote
1948         generic functions.
1949         * sem_ch3.adb Add with and use clauses for Sem_Ch12.
1950         (Analyze_Declarations): Capture global references within the
1951         contracts of packages, subprograms and their respective bodies.
1952         * sem_ch6.adb (Analyze_Aspects_On_Body_Or_Stub): Removed.
1953         (Analyze_Completion_Contract): Removed.
1954         (Analyze_Generic_Subprogram_Body): Enchange the aspects after
1955         creating the generic copy. Create a generic contract for the
1956         template. Analyze the aspects of the generic body. Analyze the
1957         contract of the generic body when it is a compilation unit and
1958         capture global references.
1959         (Analyze_Subprogram_Body_Contract): Code cleanup.
1960         (Analyze_Subprogram_Contract): Do not save global references here.
1961         (Save_Global_References_In_List): Removed.
1962         * sem_ch7.adb (Analyze_Package_Body_Contract): Code cleanup.
1963         (Analyze_Package_Body_Helper): Create a generic contract for
1964         the template.
1965         (Analyze_Package_Contract): Code cleanup.
1966         * sem_ch10.adb Add with and use clauses for Sem_Ch12.
1967         (Analyze_Compilation_Unit): Capture global references in a
1968         generic subprogram declaration that acts as a compilation unit.
1969         * sem_ch12.adb Add with and use clauses for Sem_Prag. Illustrate
1970         the implementation of generic contracts. Alphabetize various
1971         subprograms.
1972         (Analyze_Generic_Package_Declaration):
1973         Create a generic contract for the template.
1974         (Analyze_Generic_Subprogram_Declaration): Create a generic
1975         contract for the template.
1976         (Analyze_Subprogram_Instantiation): Instantiate the contract of the
1977         subprogram.
1978         (Copy_Generic_Node): Link defining entities of the generic template
1979         with the corresponding defining entities of the generic copy. Update
1980         the processing of pragmas.
1981         (Instantiate_Contract): Removed.
1982         (Instantiate_Subprogram_Contract): New routine.
1983         (Requires_Delayed_Save): New routine.
1984         (Save_Global_References): Rename formal parameter N to Templ. Various
1985         cleanups.
1986         (Save_Global_References_In_Aspects): Moved from the spec.
1987         (Save_Global_References_In_Contract): New routine.
1988         (Save_References_In_Aggregate): New routine.
1989         (Save_References_In_Char_Lit_Or_Op_Symbol): New routine.
1990         (Save_References_In_Descendants): New routine.
1991         (Save_References_In_Identifier): New routine.
1992         (Save_References_In_Operator): New routine.
1993         (Save_References_In_Pragma): New routine.
1994         * sem_ch12.ads (Save_Global_References): Rename formal
1995         parameter N to Templ. Update the comment on usage.
1996         (Save_Global_References_In_Aspects): Moved to the body.
1997         (Save_Global_References_In_Contract): New routine.
1998         * sem_ch13.adb (Analyze_Aspect_Specifications_On_Body_Or_Stub):
1999         New routine.
2000         * sem_ch13.ads (Analyze_Aspect_Specifications_On_Body_Or_Stub):
2001         New routine.
2002         * sem_prag.adb (Add_Item_To_Name_Buffer): Add support for
2003         generic parameters.
2004         (Analyze_Contract_Cases_In_Decl_Part): Code cleanup.
2005         (Analyze_Depends_Global): New routine.
2006         (Analyze_Depends_In_Decl_Part): Code cleanup.
2007         (Analyze_Global_In_Decl_Part): Code cleanup.
2008         (Analyze_Global_Item): Constants are now valid global items. Do
2009         not perform state-related checks in an instance. Change the way
2010         renamings are handled.  (Analyze_Initial_Condition_In_Decl_Part):
2011         Code cleanup.
2012         (Analyze_Initializes_In_Decl_Part): Code cleanup.
2013         (Analyze_Input_Output): The analysis of attribute 'Result in
2014         the context of pragmas Depends or Refined_Depends now reuses
2015         the existing attribute analysis machinery. Constants and
2016         generic parameters are now valid dependency items. Do not
2017         perform state-related checks in an instance. Change the way
2018         renamings are handled.  (Analyze_Pragma): Add a "characteristics"
2019         section for pragmas Abstract_State, Contract_Cases, Depends,
2020         Extensions_Visible, Global, Initial_Condition, Initializes,
2021         Post, Post_Class, Postcondition, Pre, Pre_Class, Precondition,
2022         Refined_Depends, Refined_Global, Refined_Post, Refined_State, Test_Case.
2023         (Analyze_Pre_Post_Condition): Do not create a generic
2024         template here.
2025         (Analyze_Pre_Post_Condition_In_Decl_Part): Code cleanup.
2026         (Analyze_Refined_Depends_Global_Post): New routine.
2027         (Analyze_Refined_Depends_In_Decl_Part): Code cleanup.
2028         (Analyze_Refined_Global_In_Decl_Part): Code cleanup.
2029         (Analyze_Refined_Pragma): Removed.
2030         (Analyze_Refined_State_In_Decl_Part): Code cleanup.
2031         (Analyze_Test_Case_In_Decl_Part): Code cleanup.
2032         (Check_Dependency_Clause): Do not perform this check in an instance.
2033         (Check_Function_Return): Add support for generic functions.
2034         (Check_In_Out_States): Do not perform this check in an instance.
2035         (Check_Input_States): Do not perform this check in an instance.
2036         (Check_Mode_Restriction_In_Function): Add support for generic functions.
2037         (Check_Output_States): Do not perform this check in an instance.
2038         (Check_Postcondition_Use_In_Inlined_Subprogram): Rename
2039         parameter Subp_Id to Spec_Id and update comment on usage.
2040         (Check_Proof_In_States): Do not perform this check in an instance.
2041         (Check_Refined_Global_Item): Add support for constants.
2042         (Check_Refined_Global_List): Do not perform this check in an instance.
2043         (Collect_Global_Items): Reimplemented.
2044         (Collect_Subprogram_Inputs_Outputs): Add support for generic parameters.
2045         (Create_Generic_Template): Removed.
2046         (Find_Related_Package_Or_Body): Moved to spec.
2047         (Find_Role): Add support for generic parameters and constants.
2048         (Get_Argument): Moved to spec. Rename parameter Spec_Id to Context_Id.
2049         (Match_Item): Add support for constants.
2050         (Preanalyze_Test_Case_Arg): Reimplemented.
2051         (Report_Extra_Clauses): Do not perform this check in an instance.
2052         (Report_Extra_Constituents): Do not perform this check in an instance.
2053         * sem_prag.ads (Collect_Subprogram_Inputs_Outputs): Update
2054         the comment on usage.
2055         (Find_Related_Package_Or_Body): Moved from body.
2056         (Get_Argument): Moved from body.
2057         * sem_util.adb Add with and use clauses for Sem_Ch12.
2058         (Corresponding_Spec_Of): Add support for packages and package bodies.
2059         (Create_Generic_Contract): New routine.
2060         (Is_Contract_Annotation): Reimplemented.
2061         (Is_Generic_Declaration_Or_Body): New routine.
2062         (Is_Package_Contract_Annotation): New routine.
2063         (Is_Subprogram_Contract_Annotation): New routine.
2064         * sem_util.ads (Corresponding_Spec_Of): Update the comment on usage.
2065         (Create_Generic_Contract): New routine.
2066         (Is_Generic_Declaration_Or_Body): New routine.
2067         (Is_Package_Contract_Annotation): New routine.
2068         (Is_Subprogram_Contract_Annotation): New routine.
2069         * sinfo.adb (Is_Generic_Contract_Pragma): New routine.
2070         (Set_Is_Generic_Contract_Pragma): New routine.
2071         * sinfo.ads Add new attribute Is_Generic_Contract_Pragma along
2072         with occurrences in nodes.
2073         (Is_Generic_Contract_Pragma): New routine along with pragma Inline.
2074         (Set_Is_Generic_Contract_Pragma): New routine along with pragma Inline.
2075         * treepr.adb (Print_Entity_Info): Output fields 36 to 41.
2077 2015-05-12  Robert Dewar  <dewar@adacore.com>
2079         * a-taster.ads: Minor comment fix: fix bad header, this is a
2080         pure RM unit.
2082 2015-05-12  Robert Dewar  <dewar@adacore.com>
2084         * sem_intr.adb: (Check_Shift): Diagnose bad modulus value.
2086 2015-05-12  Robert Dewar  <dewar@adacore.com>
2088         * gnat1drv.adb (Adjust_Global_Switches): Default to suppressing
2089         Alignment_Checks on non-strict alignment machine.
2090         * sem_ch13.adb (Validate_Address_Clauses): Don't give
2091         compile-time alignment warnings if run time Alignment_Check
2092         is suppressed.
2094 2015-05-12  Thomas Quinot  <quinot@adacore.com>
2096         * g-sercom.ads, g-sercom-linux.adb (GNAT.Serial_Communications.
2097         Data_Rate): New literals B75, B110, B150, B300, B600.
2099 2015-05-12  Doug Rupp  <rupp@adacore.com>
2101         * init.c (__gnat_init_float) [vxworks]: For e500v2,
2102         do nothing and leave the responsibility to install the handler
2103         and enable the exceptions to the BSP.
2105 2015-05-12  Robert Dewar  <dewar@adacore.com>
2107         * sem_ch9.adb, einfo.ads, exp_intr.adb: Minor reformatting.
2108         * sem_disp.adb: Minor code reorganization (remove junk redundant
2109         null statement).
2110         * exp_unst.adb (Unnest_Subprogram.Uplev_Refs): Ignore uplevel
2111         references to bounds of types coming from original type reference.
2112         * checks.ads: Minor reformatting.
2113         * checks.adb: Minor reformatting.
2114         * sem_prag.adb (Analyze_Pragma, case Check): If in ignored
2115         assertion, then make sure we do not drag in bignum stuff.
2117 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
2119         * sem_ch9.adb (Collect_Interfaces): Initialize
2120         Direct_Primitive_Operations for a tagged synchronized type,
2121         so it can used in ASIS mode.
2122         * sem_disp.adb (Check_Dispatching_Operation): If expansion is
2123         disabled, attach subprogram to list of Direct_Primitive_Operations
2124         of synchronized type itself, for ASIS use, because in this case
2125         Corresponding_Record_Type is not built.
2126         * einfo.ads: Indicate use of Direct_Primitive_Operations on
2127         synchronized type.
2129 2015-05-12  Pierre-Marie de Rodat  <derodat@adacore.com>
2131         * exp_pakd.adb: Make clearer the comment in exp_pakd.adb about
2132         ___XP suffixes.
2134 2015-05-12  Robert Dewar  <dewar@adacore.com>
2136         * sem_ch3.adb, sem_util.adb, sem_ch6.adb: Minor reformatting.
2138 2015-05-12  Robert Dewar  <dewar@adacore.com>
2140         * exp_unst.adb (Visit_Node): Deal with subprogram and package stubs.
2142 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
2144         * exp_intr.adb (Expand_Dispatching_Constructor_Call): The
2145         tag to be retrieved for the generated call is the first entry
2146         in the dispatch table for the return type of the instantiated
2147         constructor.
2149 2015-05-12  Bob Duff  <duff@adacore.com>
2151         * exp_ch7.adb, exp_ch7.ads, exp_intr.adb, exp_util.adb,
2152         exp_util.ads: Update comments.
2154 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
2156         * sem_ch3.adb (Add_Internal_Interface_Entities): Do no generate
2157         freeze nodes for these in ASIS mode, because they lead to
2158         elaoration order issues in gigi.
2160 2015-05-12  Hristian Kirtchev  <kirtchev@adacore.com>
2162         * sem_ch6.adb (Analyze_Expression_Function): Code
2163         cleanup. Use Copy_Subprogram_Spec to create a proper spec.
2164         (Analyze_Subprogram_Body_Helper): Code cleanup. Do not
2165         prepare a stand alone body for inlining in GNATprove mode
2166         when inside a generic.  (Body_Has_Contract): Reimplemented.
2167         (Build_Subprogram_Declaration): New routine.
2168         * sem_ch10.adb (Analyze_Compilation_Unit): Capture global
2169         references within generic bodies by loading them.
2170         * sem_util.adb (Copy_Parameter_List): Code cleanup.
2171         (Copy_Subprogram_Spec): New routine.
2172         (Is_Contract_Annotation): New routine.
2173         * sem_util.ads (Copy_Subprogram_Spec): New routine.
2174         (Is_Contract_Annotation): New routine.
2176 2015-05-12  Hristian Kirtchev  <kirtchev@adacore.com>
2178         * sem_attr.adb (Resolve_Attribute): Do not analyze the generated
2179         body of an expression function when the prefix of attribute
2180         'Access is the body.
2182 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
2184         * sem_ch3.adb (Build_Derived_Enumeration_Type): The anonymous base
2185         created for a derived enumeration type is not a first subtype,
2186         even though it is defined through a full type declaration.
2187         * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): Do not process
2188         aspects for the anonymous base type constructed for a derived
2189         scalar type, because they will be set when the first subtype
2190         is frozen.
2191         (Inherit_Aspects_At_Freeze_Point): Fix typos on handling of
2192         Default_Value and Default_Component_Value, that prevented the
2193         proper inheritance of these aspects.
2195 2015-05-12  Gary Dismukes  <dismukes@adacore.com>
2197         * exp_ch6.adb, exp_unst.adb: Minor typo fixes.
2199 2015-05-12  Robert Dewar  <dewar@adacore.com>
2201         * sem_ch3.adb: Minor reformatting.
2203 2015-05-12  Vincent Celier  <celier@adacore.com>
2205         * gnatcmd.adb: If we want to invoke gnatmake (gnatclean) with
2206         -P, then check if gprbuild (gprclean) is available; if it is,
2207         use gprbuild (gprclean) instead of gnatmake (gnatclean).
2209 2015-05-12  Robert Dewar  <dewar@adacore.com>
2211         * debug.adb: Add flag -gnatd.3 to output diagnostic info from
2212         Exp_Unst.
2213         * einfo.ad, einfo.adb: Reorganize (and remove most of) flags used by
2214         Exp_Unst.
2215         * exp_ch6.adb (Unest_Bodies): Table for delayed calls to
2216         Unnest_Subprogram (Expand_N_Subprogram_Body): Add entry to table
2217         for later call instead of calling Unnest_Subprogram directly
2218         (Initialize): New procedure (Unnest_Subprograms): New procedure
2219         * exp_ch6.ads (Add_Extra_Actual_To_Call): Move into proper
2220         alpha order.
2221         (Initialize): New procedure.
2222         (Unnest_Subprograms): New procedure.
2223         * exp_unst.adb (Unnest_Subprogram): Major rewrite, moving
2224         all processing to this routine which is now called late
2225         after instantiating bodies. Fully handles the case of generic
2226         instantiations now.
2227         * exp_unst.ads: Major rewrite, moving all processing to
2228         Unnest_Subprogram.
2229         * frontend.adb (Frontend): Add call to Exp_Ch6.Initialize.
2230         (Frontend): Add call to Unnest_Subprograms.
2231         * sem_ch8.adb (Find_Direct_Name): Back to old calling sequence
2232         for Check_Nested_Access.
2233         * sem_util.adb (Build_Default_Subtype): Minor reformatting
2234         (Check_Nested_Access): Back to original VM-only form (we
2235         now do all the processing for Unnest_Subprogram at the time
2236         it is called.
2237         (Denotes_Same_Object): Minor reformatting
2238         (Note_Possible_Modification): Old calling sequence for
2239         Check_Nested_Access.
2240         * sem_util.ads (Check_Nested_Access): Back to original VM-only
2241         form (we now do all the processing for Unnest_Subprogram at the
2242         time it is called.
2244 2015-05-12  Robert Dewar  <dewar@adacore.com>
2246         * sem_ch3.adb, freeze.adb, sem_ch6.adb: Minor reformatting.
2248 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
2250         * sem_ch3.adb (Analyze_Object_Declaration): New function
2251         Has_Delayed_Aspect, used to defer resolution of an aggregate
2252         expression when the object declaration carries aspects Address
2253         and/or Alignment.
2254         * freeze.adb (Freeze_Object_Declaration): New subsidiary procedure
2255         to Freeze_Entity.  In addition to the previous processing steps
2256         at the freeze point of an object, this procedure also handles
2257         aggregates in object declarations, when the declaration carries
2258         delayed aspects that require that the initialization of the
2259         object be attached to its freeze actions.
2261 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
2263         * sem_ch6.adb (Analyze_Subprogram_Declaration): Following
2264         AI12-0147, null procedures and expression functions are allowed
2265         in protected bodies.
2267 2015-05-12  Tristan Gingold  <gingold@adacore.com>
2269         * i-cpoint.adb (Copy_Terminated_Array): Copy nothing if Length is 0.
2271 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
2273         * sem_ch3.adb (Complete_Private_Subtype): Propagate
2274         Has_Delayed_Aspects flag from private to full view, to ensure
2275         that predicate functions are constructed.
2277 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
2279         * sem_ch6.adb (Process_Formals): If a tagged formal is an
2280         incomplete class-wide type, the subprogram must have a delayed
2281         freeze even though the opertation is not a primitive of the
2282         type. THis ensures that the backend can recover the full view
2283         when elaborating the subprogram declaration.
2285 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
2287         * exp_util.adb (Get_Current_Value_Condition): Nothing to be
2288         done if an elsif part has been rewritten so that it is not part
2289         of an enclosing if_statement.
2291 2015-05-12  Robert Dewar  <dewar@adacore.com>
2293         * sem_type.adb, sem_ch10.adb, freeze.adb, sem_ch6.adb, exp_disp.adb:
2294         Minor reformatting.
2296 2015-05-12  Bob Duff  <duff@adacore.com>
2298         * exp_attr.adb (Size): Remove unnecessary check for types with
2299         unknown discriminants.  That was causing the compiler to build
2300         a function call _size(T), where T is a type, not an object.
2302 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
2304         * sem_ch4.adb (Extended_Primitive_Ops): Exclude overriding
2305         primitive operations of a type extension declared in the package
2306         body, to prevent duplicates in extended list.
2308 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
2310         * sem_ch3.adb (Analyze_Component_Declaration): If the component is
2311         an unconstrained synchronized type with discriminants, create a
2312         constrained default subtype for it, so that the enclosing record
2313         can be given the proper size.
2314         * sem_util.adb (Build_Default_Subtype): If the subtype is created
2315         for a record discriminant, do not analyze the declarztion at
2316         once because it is added to the freezing actions of the enclosing
2317         record type.
2319 2015-05-12  Robert Dewar  <dewar@adacore.com>
2321         * exp_prag.adb (Expand_N_Pragma): Rewrite ignored pragma as
2322         Null statements.
2323         * namet.ads (Boolean3): Document this flag used for Ignore_Pragma.
2324         * par-prag.adb (Prag): Implement Ignore_Pragma.
2325         * sem_prag.adb: Implement Ignore_Pragma.
2326         * snames.ads-tmpl: Add entries for pragma Ignore_Pragma.
2328 2015-05-12  Javier Miranda  <miranda@adacore.com>
2330         * sem_ch10.adb (Build_Shadow_Entity): Link the class-wide shadow
2331         entity with its corresponding real entity.
2332         (Decorate_Type): Unconditionally build the class-wide shadow entity of
2333         tagged types.
2334         * einfo.ads, einfo.adb (Has_Non_Limited_View): New synthesized
2335         attribute.
2336         (Non_Limited_View): Moved from field 17 to field 19 be available
2337         in class-wide entities.
2338         * exp_attr.adb (Access_Cases): Code cleanup.
2339         * exp_disp.adb (Expand_Interface_Actuals): Ditto.
2340         * exp_util.adb (Non_Limited_Designated_Type): Ditto.
2341         * freeze.adb (Build_Renamed_Bdody): Ditto.
2342         * sem_aux.adb (Available_View): Ditto.
2343         * sem_ch4.adb (Analyze_Selected_Component): Ditto.
2344         (Try_One_Prefix_Interpretation): Ditto.
2345         * sem_ch5.adb (Analyze_Assignment): Ditto.
2346         * sem_ch6.adb (Detect_And_Exchange): Ditto.
2347         * sem_ch8.adb (Find_Expanded_Name): Ditto.
2348         * sem_disp.adb (Check_Controlling_Type): Ditto.
2349         * sem_res.adb (Resolve_Type_Conversion): Ditto.
2350         (Full_Designated_Type): Ditto.
2351         * sem_type.adb (Covers): Ditto.
2352         * sem_util.adb: Fix typo in comment.
2354 2015-05-12  Robert Dewar  <dewar@adacore.com>
2356         * exp_unst.adb (Get_Real_Subp): New subprogram.
2357         (Unnest_Subprogram): Use Get_Real_Subp.
2358         (Uplev_Refs_For_One_Subp): Skip if no ARECnU entity.
2359         (Uplev_Refs_For_One_Subp): Use actual subtype in unconstrained case.
2361 2015-05-12  Robert Dewar  <dewar@adacore.com>
2363         * a-reatim.adb ("/"): Add explicit check for Time_Span_First / -1.
2365 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
2367         * sem_ch4.adb (Extended_Primitive_Ops): New subprogram,
2368         auxiliary to Try_Primitive_Operation to handle properly prefixed
2369         calls where the operation is not a primitive of the type, but
2370         is declared in the package body that is in the immediate scope
2371         of the type.
2373 2015-05-12  Robert Dewar  <dewar@adacore.com>
2375         * sem_util.adb (Is_Variable): Allow X'Deref(Y) as a variable.
2377 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
2379         * sem_ch8.adb (Find_Expanded_Name): Handle properly a fully
2380         qualified name for an instance of a generic grand-child unit in
2381         the body its parent.
2383 2015-05-12  Robert Dewar  <dewar@adacore.com>
2385         * exp_unst.adb (Upref_Name): New subprogram.
2386         (Unnest_Subprogram): Use Upref_Name.
2387         (Unnest_Subprogram): Use new Deref attribute.
2388         * exp_unst.ads: Doc updates.
2390 2015-05-12  Thomas Quinot  <quinot@adacore.com>
2392         * adaint.c: Enable Large File Support in adaint so that __gnat_readdir
2393         can access files on filesystems mounted from servers that use large
2394         NFS file handles.
2396 2015-05-09  Eric Botcazou  <ebotcazou@adacore.com>
2398         * gcc-interface/utils.c (gnat_write_global_declarations): Use type_decl
2399         method instead of global_decl for TYPE_DECLs.
2401 2015-04-27  Jim Wilson  <jim.wilson@linaro.org>
2403         * gcc-interface/Makefile-lan.in (ada.mostlyclean): Remove gnatbind
2404         and gnat1.
2406 2015-04-13  Eric Botcazou  <ebotcazou@adacore.com>
2408         * gnatvsn.ads (Library_Version): Bump to 6.
2410 2015-04-09  Iain Sandoe  <iain@codesourcery.com>
2412         * gcc-interface/Makefile.in (darwin, powerpc): Enable atomics.
2414 2015-04-08  Eric Botcazou  <ebotcazou@adacore.com>
2416         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Do not make
2417         a function returning an unconstrained type 'const' for the middle-end.
2419         * gcc-interface/trans.c (Pragma_to_gnu) <case Pragma_Warning>: Use
2420         exact condition to detect Reason => "..." pattern.
2422 2015-03-31  Tom de Vries  <tom@codesourcery.com>
2424         PR ada/65490
2425         * terminals.c (child_setup_tty): Fix warning 'argument to sizeof in
2426         bzero call is the same expression as the destination'.
2428 2015-03-26  Eric Botcazou  <ebotcazou@adacore.com>
2430         * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Deref>: New case.
2432 2015-03-24  Gary Dismukes  <dismukes@adacore.com>
2434         * sem_ch3.adb: Minor typo fix (missing paren).
2436 2015-03-24  Robert Dewar  <dewar@adacore.com>
2438         * sinfo.ads: Update comment.
2440 2015-03-24  Robert Dewar  <dewar@adacore.com>
2442         * exp_attr.adb: Add entry for typ'Deref.
2443         * sem_attr.adb (Deref): New GNAT attribute.
2444         * sem_attr.ads: Add entry for new GNAT attribute Deref.
2445         * snames.ads-tmpl: Add entries for new attribute Deref.
2447 2015-03-24  Ed Schonberg  <schonberg@adacore.com>
2449         * sem_ch13.adb (Rep_Item_Too_Early): allow pragma Convention
2450         on generic type.
2452 2015-03-24  Gary Dismukes  <dismukes@adacore.com>
2454         * inline.adb: Minor typo fix.
2456 2015-03-24  Arnaud Charlet  <charlet@adacore.com>
2458         * doc/gnat_ugn/building_executable_programs_with_gnat.rst,
2459         doc/gnat_ugn/gnat_utility_programs.rst
2460         doc/gnat_rm/implementation_defined_attributes.rst
2461         doc/gnat_rm/implementation_defined_pragmas.rst
2462         doc/gnat_rm/representation_clauses_and_pragmas.rst
2463         doc/gnat_rm/about_this_guide.rst
2464         doc/gnat_rm/implementation_of_ada_2012_features.rst: Doc improvements.
2465         * gnat_rm.texi, gnat_ugn.texi: Regenerate.
2467 2015-03-23  Jakub Jelinek  <jakub@redhat.com>
2469         PR bootstrap/65522
2470         * adadecode.c (ada_demangle): Guard with IN_RTS instead of IN_GCC.
2472 2015-03-20  Eric Botcazou  <ebotcazou@adacore.com>
2474         PR ada/65451
2475         * gcc-interface/utils.c (gnat_pushdecl): Tidy up and improve comment.
2476         Make sure to chain only main variants through TYPE_NEXT_PTR_TO.
2478         * gcc-interface/trans.c (Attribute_to_gnu): Revert latest change.
2480 2015-03-16  Eric Botcazou  <ebotcazou@adacore.com>
2482         * gcc-interface/utils2.c (gnat_invariant_expr): Return null if the type
2483         of the expression ends up being composite.
2485 2015-03-16  Eric Botcazou  <ebotcazou@adacore.com>
2487         * gcc-interface/decl.c (is_from_limited_with_of_main): New predicate.
2488         (gnat_to_gnu_entity) <E_Subprogram_Type>: Invoke it on return and
2489         parameter types to detect circularities in ASIS mode.
2490         * gcc-interface/trans.c (Attribute_to_gnu): Mention AI05-0151.
2492 2015-03-16  Eric Botcazou  <ebotcazou@adacore.com>
2494         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Abstract_State>: Do not
2495         short-circuit the regular handling.
2497 2015-03-13  Robert Dewar  <dewar@adacore.com>
2499         * exp_unst.adb (Note_Uplevel_Reference): Eliminate duplicate
2500         references.
2501         (Actual_Ref): New function.
2502         (AREC_String): Minor reformatting.
2503         (Unnest_Subprogram): Use Actual_Ref.
2504         * frontend.adb (Frontend): Turn off Unnest_Subprogram_Mode
2505         before call to Instantiate_Bodies.
2507 2015-03-13  Ed Schonberg  <schonberg@adacore.com>
2509         * freeze.adb (Freeze_Profile): If the return type of a function
2510         being frozen is an untagged limited view and the function is
2511         abstract, mark the type as frozen because there is no later
2512         point at which the profile of the subprogram will be elaborated.
2514 2015-03-13  Robert Dewar  <dewar@adacore.com>
2516         * einfo.adb, einfo.ads, atree.adb, atree.ads, atree.h: Add seventh
2517         component to entities. Add new fields Field36-41 and Node36-41.
2519 2015-03-13  Claire Dross  <dross@adacore.com>
2521         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Rewrite after review.
2523 2015-03-13  Robert Dewar  <dewar@adacore.com>
2525         * exp_util.adb (Is_Volatile_Reference): Compile time known
2526         value is never considered to be a volatile reference.
2528 2015-03-13  Robert Dewar  <dewar@adacore.com>
2530         * sem_ch3.adb (Analyze_Object_Contract): Suppress "constant
2531         cannot be volatile" for internally generated object (such as
2532         FIRST and LAST constants).
2534 2015-03-13  Ed Schonberg  <schonberg@adacore.com>
2536         * sem_ch12.adb (Validate_Access_Subprogram_Instance): If a
2537         convention is specified for the formal parameter, verify that
2538         the actual has the same convention.
2539         * sem_prag.adb (Set_Convention_From_Pragma): Allow convention
2540         pragma to be set on a generic formal type.
2541         * sem_util.adb (Set_Convention): Ignore within an instance,
2542         as it has already been verified in the generic unit.
2544 2015-03-13  Claire Dross  <dross@adacore.com>
2546         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do not inline
2547         subprograms with unconstrained record parameters containing
2548         Itype declarations.
2549         * sinfo.ads Document GNATprove assumption that type should match
2550         in the AST.
2551         * sem_ch6.adb (Analyze_Subprogram_Body_Contract):
2552         Do not check for Refined_Depends and Refined_Globals contracts
2553         as they are optional.
2555 2015-03-13  Ed Schonberg  <schonberg@adacore.com>
2557         * sem_ch12.adb (Instantiate_Type): For a floating-point type,
2558         capture dimension info if any, because the generated subtype
2559         declaration does not come from source and will not process dimensions.
2560         * sem_dim,adb (Analyze_Dimension_Extension_Or_Record_Aggregate):
2561         Do not analyze expressions with an initialization procedure
2562         because aggregates will have been checked at the point of record
2563         declaration.
2565 2015-03-13  Robert Dewar  <dewar@adacore.com>
2567         * aspects.ads, aspects.adb: Add entries for aspect Unimplemented.
2568         * einfo.ads, einfo.adb (Is_Unimplemented): New flag.
2569         * sem_ch13.adb: Add dummy entry for aspect Unimplemented.
2570         * snames.ads-tmpl: Add entry for Name_Unimplemented.
2572 2015-03-13  Gary Dismukes  <dismukes@adacore.com>
2574         * style.adb (Missing_Overriding): Apply the
2575         Comes_From_Source test to the Original_Node of the subprogram
2576         node, to handle the case of a null procedure declaration that
2577         has been rewritten as an empty procedure body.
2579 2015-03-13  Robert Dewar  <dewar@adacore.com>
2581         * exp_util.ads: Minor fix to comment.
2582         * sem_ch3.adb (Constrain_Index): Correct pasto from previous
2583         change.
2585 2015-03-13  Robert Dewar  <dewar@adacore.com>
2587         * exp_util.ads, exp_util.adb (Force_Evaluation): Add Related_Id and
2588         Is_Low/High_Bound params.
2589         * sem_ch3.adb (Constrain_Index): Use new Force_Evaluation calling
2590         sequence to simplify generation of FIRST/LAST temps for bounds.
2592 2015-03-12  Olivier Hainque  <hainque@adacore.com>
2594         * gcc-interface/trans.c (Attribute_to_gnu) <Code_Address case>:
2595         On targets where a function symbol designates a function descriptor,
2596         fetch the function code address from the descriptor.
2597         (USE_RUNTIME_DESCRIPTORS): Provide a default definition.
2599 2015-03-04  Robert Dewar  <dewar@adacore.com>
2601         * sem_warn.adb: Minor reformatting.
2602         * init.c: Minor tweaks.
2604 2015-03-04  Dmitriy Anisimko  <anisimko@adacore.com>
2606         * a-coinho-shared.adb: Fix clear of already empty holder.
2608 2015-03-04  Robert Dewar  <dewar@adacore.com>
2610         * exp_unst.adb (Check_Dynamic_Type): Ignore library level types.
2611         (Check_Uplevel_Reference_To_Type): Ignore call inside generic.
2612         (Note_Uplevel_Reference): Ignore call inside generic.
2613         (Note_Uplevel_Reference): Fix check for no entity field.
2614         (Unnest_Subprogram): Ignore call inside generic.
2615         (Find_Current_Subprogram): Use Defining_Entity, not Defining_Unit_Name.
2616         (Visit_Node): Ignore calls to Imported subprograms.
2617         (Visit_Node): Fix problem in finding subprogram body in some cases.
2618         (Add_Form_To_Spec): Use Defining_Entity, not Defining_Unit_Name.
2620 2015-03-04  Robert Dewar  <dewar@adacore.com>
2622         * einfo.adb (Is_ARECnF_Entity): Removed.
2623         (Last_Formal): Remove special handling of Is_ARECnF_Entity.
2624         (Next_Formal): Remove special handling of Is_ARECnF_Entity.
2625         (Next_Formal_With_Extras): Remove special handling of Is_ARECnF_Entity.
2626         (Number_Entries): Minor reformatting.
2627         * einfo.ads (Is_ARECnF_Entity): Removed.
2628         * exp_unst.adb (Unnest_Subprogram): Remove setting of
2629         Is_ARECnF_Entity.
2630         (Add_Extra_Formal): Use normal Extra_Formal circuit.
2631         * sprint.adb (Write_Param_Specs): Properly handle case where
2632         there are no source formals, but we have at least one Extra_Formal
2633         present.
2635 2015-03-04  Ed Schonberg  <schonberg@adacore.com>
2637         * sem_aggr.adb (Resolve_Record_Aggregate,
2638         Add_Discriminant_Values): If the value is a reference to the
2639         current instance of an enclosing type, use its base type to check
2640         against prefix of attribute reference, because the target type
2641         may be otherwise constrained.
2643 2015-03-04  Robert Dewar  <dewar@adacore.com>
2645         * atree.h: Add entries for Flag287-Flag309.
2646         * einfo.adb: Add (unused) flags Flag287-Flag309.
2648 2015-03-04  Ed Schonberg  <schonberg@adacore.com>
2650         * sem_util.adb (Collect_Interfaces, Collect): When gathering
2651         interfaces of ancestors, handle properly a subtype of a private
2652         extension.
2654 2015-03-04  Robert Dewar  <dewar@adacore.com>
2656         * einfo.adb (Is_ARECnF_Entity): New flag (ARECnF is an extra formal).
2657         (Next_Formal): Don't return ARECnF formal.
2658         (Last_Formal): Don't consider ARECnF formal.
2659         (Next_Formal_With_Extras): Do consider ARECnF formal.
2660         * einfo.ads (Is_ARECnF_Entity): New flag (ARECnF is an extra formal).
2661         * exp_unst.adb (Create_Entities): Set Is_ARECnF_Entity flag.
2663 2015-03-04  Javier Miranda  <miranda@adacore.com>
2665         * exp_ch6.adb (Expand_Simple_Function_Return): When the returned
2666         object is a class-wide interface object and we generate the
2667         accessibility described in RM 6.5(8/3) then displace the pointer
2668         to the object to reference the base of the object (to get access
2669         to the TSD of the object).
2671 2015-03-04  Hristian Kirtchev  <kirtchev@adacore.com>
2673         * sem_prag.adb (Analyze_Abstract_State): Use routine
2674         Malformed_State_Error to issue general errors.
2675         (Analyze_Pragma): Diagnose a syntax error related to a state
2676         declaration with a simple option.
2677         (Malformed_State_Error): New routine.
2679 2015-03-04  Robert Dewar  <dewar@adacore.com>
2681         * a-strsup.adb (Super_Slice): Deal with super flat case.
2682         * einfo.ads: Minor reformatting.
2683         * s-imgdec.adb (Set_Decimal_Digits): Add comment about possibly
2684         redundant code.
2686 2015-03-04  Claire Dross  <dross@adacore.com>
2688         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
2689         a-cforse.ads, a-cofove.ads: Use Default_Initial_Condition on formal
2690         containers.
2692 2015-03-04  Ed Schonberg  <schonberg@adacore.com>
2694         * sem_warn.adb (Check_References): When checking for an unused
2695         in-out parameter of a class- wide type, use its type to determine
2696         whether it is private, in order to avoid a spurious warning when
2697         subprogram spec and body are in different units.
2699 2015-03-04  Yannick Moy  <moy@adacore.com>
2701         * sem_attr.adb: Improve warning messages.
2703 2015-03-04  Robert Dewar  <dewar@adacore.com>
2705         * exp_ch6.adb (Expand_N_Subprogram_Body): Avoid trying to unnest
2706         generic subprograms.
2707         * exp_unst.adb (Check_Dynamic_Type): Handle record types properly
2708         (Note_Uplevel_Reference): Ignore uplevel references to non-types
2709         (Get_Level): Consider only subprograms, not blocks.
2710         (Visit_Node): Set proper condition for generating ARECnF entity.
2711         Ignore indirect calls. Ignore calls to subprograms
2712         outside our nest.
2713         (Unnest_Subprogram): Minor changes in dealing with ARECnF entity.
2714         (Add_Form_To_Spec): Properly set Last_Entity field.
2715         (Unnest_Subprogram): Set current subprogram scope for analyze calls.
2716         Handle case of no uplevel refs in outer subprogram
2717         Don't mark uplevel entities as aliased.
2718         Don't deal with calls with no ARECnF requirement.
2720 2015-03-04  Robert Dewar  <dewar@adacore.com>
2722         * s-valrea.adb (Scan_Real): Remove redundant tests from scaling loops.
2723         * s-imgdec.adb (Set_Decimal_Digits): Remove redundant Max
2724         operation in computing LZ.
2725         * sem_attr.adb: Minor typo fix
2727 2015-03-04  Robert Dewar  <dewar@adacore.com>
2729         * exp_ch7.adb: Minor reformatting.
2730         * exp_unst.adb (Build_Tables): Fix minor glitch for no separate
2731         spec case.
2732         * erroutc.adb (Delete_Msg): add missing decrement of info msg counter.
2734 2015-03-04  Hristian Kirtchev  <kirtchev@adacore.com>
2736         * exp_ch6.adb (Build_Pragma_Check_Equivalent): Suppress
2737         references to formal parameters subject to pragma Unreferenced.
2738         (Suppress_Reference): New routine.
2739         * sem_attr.adb (Analyze_Attribute): Reimplement the analysis
2740         of attribute 'Old. Attributes 'Old and 'Result now share
2741         common processing.
2742         (Analyze_Old_Result_Attribute): New routine.
2743         (Check_Placement_In_Check): Removed.
2744         (Check_Placement_In_Contract_Cases): Removed.
2745         (Check_Placement_In_Test_Case): Removed.
2746         (Check_Use_In_Contract_Cases): Removed.
2747         (Check_Use_In_Test_Case): Removed.
2748         (In_Refined_Post): Removed.
2749         (Is_Within): Removed.
2750         * sem_warn.adb (Check_Low_Bound_Tested): Code cleanup.
2751         (Check_Low_Bound_Tested_For): New routine.
2753 2015-03-04  Hristian Kirtchev  <kirtchev@adacore.com>
2755         * exp_ch3.adb (Expand_N_Object_Declaration):
2756         Generate a runtime check to test the expression of pragma
2757         Default_Initial_Condition when the object is default initialized.
2759 2015-03-02  Robert Dewar  <dewar@adacore.com>
2761         * scng.adb (Scan): Ignore illegal character in relaxed
2762         semantics mode.
2764 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
2766         * sem_ch4.adb (Analyze_Set_Membership); Retain Overloaded flag
2767         on left operand, so it can be properly resolved with type of
2768         alternatives of right operand.
2769         * sem_res.adb (Resolve_Set_Membership): Handle properly an
2770         overloaded left-hand side when the alternatives on the right
2771         hand side are literals of some universal type.  Use first
2772         non-overloaded alternative to find expected type.
2774 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
2776         * exp_ch7.adb (Make_Set_Finalize_Address_Call): Use underlying
2777         type to retrieve designated type, because the purported access
2778         type may be a partial (private) view, when it is declared in
2779         the private part of a nested package, and finalization actions
2780         are generated when completing compilation of enclosing unit.
2782 2015-03-02  Robert Dewar  <dewar@adacore.com>
2784         * back_end.adb (Call_Back_End): Remove previous patch,
2785         the back end now gets to see the result of -gnatd.1
2786         (Unnest_Subprogram_Mode) processing.
2787         * elists.ads, elists.adb (List_Length): New function.
2788         * exp_unst.ads, exp_unst.adb: Major changes, first complete version.
2789         * sem_util.adb (Check_Nested_Access): Handle formals in
2790         Unnest_Subprogram_Mode.
2791         (Adjust_Named_Associations): Minor reformatting.
2792         * sprint.adb (Sprint_Node_Actual): Fix failure to print aliased
2793         for parameters.
2795 2015-03-02  Robert Dewar  <dewar@adacore.com>
2797         * atree.ads, atree.adb (Uint24): New function
2798         (Set_Uint24): New procedure.
2799         * atree.h (Uint24): New macro for field access.
2800         * back_end.adb (Call_Back_End): For now, don't call back end
2801         if unnesting subprogs.
2802         * einfo.adb (Activation_Record_Component): New field
2803         (Subps_Index): New field.
2804         * einfo.ads (Activation_Record_Component): New field
2805         (Subps_Index): New field Minor reordering of comments into alpha order.
2806         * exp_unst.ads, exp_unst.adb: Continued development.
2808 2015-03-02  Gary Dismukes  <dismukes@adacore.com>
2810         * exp_disp.ads: Minor reformatting.
2812 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
2814         * sem_ch8.adb (Chain_Use_Clause): Do not chain use clause from
2815         ancestor to list of use clauses active in descendant unit if we
2816         are within the private part of an intervening parent, to prevent
2817         circularities in use clause list.
2819 2015-03-02  Javier Miranda  <miranda@adacore.com>
2821         * exp_ch9.adb (Build_Corresponding_Record): Propagate type
2822         invariants to the corresponding record type.
2823         * exp_disp.ad[sb] (Set_DT_Position_Value): New subprogram
2824         which sets the value of the DTC_Entity associated with a given
2825         primitive of a tagged type and propagates the value to the
2826         wrapped subprogram.
2827         (Set_DTC_Entity_Value): Propagate the DTC
2828         value to the wrapped entity.
2829         * sem_ch13.adb (Build_Invariant_Procedure): Append the code
2830         associated with invariants of progenitors.
2831         * sem_ch3.adb (Build_Derived_Record_Type): Inherit type invariants
2832         of parents and progenitors.
2833         (Process_Full_View): Check hidden inheritance of class-wide type
2834         invariants.
2835         * sem_ch7.adb (Analyze_Package_Specification): Do not generate
2836         the invariant procedure for interface types; build the invariant
2837         procedure for tagged types inheriting invariants from their
2838         progenitors.
2839         * sem_prag.adb (Pragma_Invariant) Allow invariants in interface
2840         types but do not build their invariant procedure since their
2841         invariants will be propagated to the invariant procedure of
2842         types covering the interface.
2843         * exp_ch6.adb, exp_disp.adb, sem_ch3.adb, sem_ch7.adb,
2844         sem_ch8.adb, sem_disp.adb: Replace all calls to Set_DT_Position
2845         by calls to Set_DT_Position_Value.
2847 2015-03-02  Hristian Kirtchev  <kirtchev@adacore.com>
2849         * sem_attr.adb (Analyze_Attribute): Factor out heavily indented
2850         code in Denote_Same_Function.  Do not analyze attribute 'Result
2851         when it is inside procedure _Postconditions.  Remove a misplaced
2852         warning diagnostic. Code cleanup.
2853         (Denote_Same_Function): New routine.
2854         * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Code
2855         cleanup. Warn on pre/postconditions on an inlined subprogram.
2856         (Analyze_Pragma, Refined_Post case): Warn on pre/postconditions on
2857         an inlined subprogram.
2858         (Analyze_Pre_Post_Condition_In_Decl_Part): Code cleanup. Warn on
2859         pre/post condition on an inlined subprogram.
2860         (Analyze_Test_Case_In_Decl_Part): Code cleanup. Warn on
2861         pre/postconditions on an inlined subprogram.
2862         (Check_Postcondition_Use_In_Inlined_Subprogram): New routine.
2864 2015-03-02  Hristian Kirtchev  <kirtchev@adacore.com>
2866         * sem_prag.adb (Ensure_Aggregate_Form):
2867         Ensure that the name denoted by the Chars of a pragma argument
2868         association has the proper Sloc when converted into an aggregate.
2870 2015-03-02  Bob Duff  <duff@adacore.com>
2872         * sem_ch6.adb (Check_Private_Overriding): Capture
2873         Incomplete_Or_Partial_View in a constant. This is cleaner and
2874         more efficient.
2876 2015-03-02  Gary Dismukes  <dismukes@adacore.com>
2878         * einfo.ads, exp_unst.ads: Minor reformatting.
2880 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
2882         * a-strsea.adb (Find_Token): Ensure that the range of iteration
2883         does not perform any improper character access. This prevents
2884         erroneous access in the unusual case of an empty string target
2885         and a From parameter less than Source'First.
2887 2015-03-02  Robert Dewar  <dewar@adacore.com>
2889         * elists.adb (List_Length): Fix incorrect result.
2891 2015-03-02  Bob Duff  <duff@adacore.com>
2893         * sem_ch6.adb (Check_Private_Overriding): Refine the legality
2894         checks here. It used to check that the function is merely
2895         overriding SOMEthing. Now it checks that the function is
2896         overriding a corresponding public operation. This is a correction
2897         to the implementation of the rule in RM-3.9.3(10).
2899 2015-03-02  Robert Dewar  <dewar@adacore.com>
2901         * debug.adb: Document new debug flag -gnatd.1.
2902         * einfo.ads, einfo.adb (Has_Nested_Subprogram): New flag.
2903         (Has_Uplevel_Reference): New flag (Is_Static_Type): New flag.
2904         (Uplevel_Reference_Noted):New flag (Uplevel_References): New field.
2905         * elists.ads elists.adb (List_Length): New function.
2906         * exp_ch6.adb (Expand_N_Subprogram_Body): Call Unnest_Subprogram
2907         when appropriate (Process_Preconditions): Minor code
2908         reorganization and reformatting
2909         * exp_unst.ads, exp_unst.adb: New files.
2910         * gnat1drv.adb (Adjust_Global_Switches): Set
2911         Unnest_Subprogram_Mode if -gnatd.1
2912         * namet.ads, namet.adb (Name_Find_Str): New version of Name_Find with
2913         string argument.
2914         * opt.ads (Unnest_Subprogram_Mode): New flag.
2915         * par-ch3.adb (P_Identifier_Declarations): Fixes to -gnatd.2 handling.
2916         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set
2917         Has_Nested_Subprogram flag.
2918         * sem_ch8.adb (Find_Direct_Name): New calling sequence for
2919         Check_Nested_Access.
2920         (Find_Selected_Component): Minor comment addition.
2921         * sem_util.adb (Check_Nested_Access): New version for use with Exp_Unst.
2922         (Note_Possible_Modification): New calling sequence for
2923         Check_Nested_Access.
2924         * sem_util.ads (Check_Nested_Access): New version for use with Exp_Unst.
2925         * gcc-interface/Make-lang.in (GNAT1_OBJS): Add exp_unst.o
2927 2015-03-02  Pierre-Marie de Rodat  <derodat@adacore.com>
2929         * gcc-interface/utils.c (gnat_pushdecl): For non-artificial pointer
2930         types, preserve the original type and create copies just like the C
2931         front-end does.  For artificial ones, do not define a name for
2932         the original type.
2933         (create_type_decl): When gnat_pushdecl made the input type the
2934         original type for the new declaration, do not define a stub
2935         declaration for it.
2936         * gcc-interface/utils2.c (build_binary_op): Accept two different
2937         pointer types when they point to the same type.
2939 2015-03-02  Hristian Kirtchev  <kirtchev@adacore.com>
2941         * exp_util.adb (Possible_Bit_Aligned_Component): Do not process
2942         an unanalyzed node.
2943         * sem_util.adb (Kill_Current_Values): Do not invalidate and
2944         de-null a constant.
2946 2015-03-02  Robert Dewar  <dewar@adacore.com>
2948         * sem_ch3.adb, exp_attr.adb, checks.adb, exp_aggr.adb: Minor
2949         reformatting.
2951 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
2953         * sem_ch8.adb: extend use of Available_Subtype.
2955 2015-03-02  Hristian Kirtchev  <kirtchev@adacore.com>
2957         * sem_prag.adb (Duplication_Error): Remove the special handling
2958         of 'Class or _Class in the context of pre/postconditions.
2959         (Process_Class_Wide_Condition): Remove the special handling of
2960         'Class or _Class in the context of pre/postconditions.
2961         * sem_util.adb (Original_Aspect_Pragma_Name): Names Pre_Class
2962         and Post_Class no longer need to be converted to _Pre and _Post.
2963         * sem_util.ads (Original_Aspect_Pragma_Name): Update the comment
2964         on usage.
2966 2015-03-02  Hristian Kirtchev  <kirtchev@adacore.com>
2968         * exp_ch6.adb (Process_Preconditions): Modify the
2969         mechanism that find the first source declaration to correct exit
2970         the loop once it has been found.
2972 2015-03-02  Gary Dismukes  <dismukes@adacore.com>
2974         * a-strsea.adb: Minor typo fix.
2976 2015-03-02  Bob Duff  <duff@adacore.com>
2978         * einfo.ads: Minor comment fixes.
2980 2015-03-02  Gary Dismukes  <dismukes@adacore.com>
2982         * einfo.adb, checks.adb: Minor reformatting and typo fixes.
2984 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
2986         * exp_aggr.adb (Get_Assoc_Expr): If the Default_Component_Value
2987         is defined for the array type, use it instead of a Default_Value
2988         specified for the component type itself.
2990 2015-03-02  Thomas Quinot  <quinot@adacore.com>
2992         * exp_attr.adb (Expand_N_Attribute_Reference, case Input): When
2993         expanding a 'Input attribute reference for a class-wide type,
2994         do not generate a separate object declaration for the controlling
2995         tag dummy object; instead, generate the expression inline in the
2996         dispatching call. Otherwise, the declaration (which involves a
2997         call to String'Input, returning a dynamically sized value on the
2998         secondary stack) will be expanded outside of proper secondary
2999         stack mark/release operations, and will thus cause a secondary
3000         stack leak.
3002 2015-03-02  Hristian Kirtchev  <kirtchev@adacore.com>
3004         * checks.adb (Add_Validity_Check): Change the names of all
3005         formal parameters to better illustrate their purpose. Update
3006         the subprogram documentation. Update all occurrences of the
3007         formal parameters. Generate a pre/postcondition pragma by
3008         calling Build_Pre_Post_Condition.
3009         (Build_PPC_Pragma): Removed.
3010         (Build_Pre_Post_Condition): New routine.
3011         * einfo.adb Node8 is no longer used as Postcondition_Proc. Node14
3012         is now used as Postconditions_Proc. Flag240 is now renamed to
3013         Has_Expanded_Contract.  (First_Formal): The routine can now
3014         operate on generic subprograms.
3015         (First_Formal_With_Extras): The routine can now operate on generic
3016         subprograms.
3017         (Has_Expanded_Contract): New routine.
3018         (Has_Postconditions): Removed.
3019         (Postcondition_Proc): Removed.
3020         (Postconditions_Proc): New routine.
3021         (Set_Has_Expanded_Contract): New routine.
3022         (Set_Has_Postconditions): Removed.
3023         (Set_Postcondition_Proc): Removed.
3024         (Set_Postconditions_Proc): New routine.
3025         (Write_Entity_Flags): Remove the output of Has_Postconditions. Add
3026         the output of Has_Expanded_Contract.
3027         (Write_Field8_Name): Remove the output of Postcondition_Proc.
3028         (Write_Field14_Name): Add the output of Postconditions_Proc.
3029         * einfo.ads New attributes Has_Expanded_Contract and
3030         Postconditions_Proc along with occurrences in entities.
3031         Remove attributes Has_Postconditions and Postcondition_Proc
3032         along with occurrences in entities.
3033         (Has_Expanded_Contract): New routine along with pragma Inline.
3034         (Has_Postconditions): Removed along with pragma Inline.
3035         (Postcondition_Proc): Removed along with pragma Inline.
3036         (Postconditions_Proc): New routine along with pragma Inline.
3037         (Set_Has_Expanded_Contract): New routine along with pragma Inline.
3038         (Set_Has_Postconditions): Removed along with pragma Inline.
3039         (Set_Postcondition_Proc): Removed along with pragma Inline.
3040         (Set_Postconditions_Proc): New routine along with pragma Inline.
3041         * exp_ch6.adb (Add_Return): Code cleanup. Update the
3042         generation of the call to the _Postconditions routine of
3043         the procedure.  (Expand_Non_Function_Return): Reformat the
3044         comment on usage. Code cleanup.  Update the generation of
3045         the call to the _Postconditions routine of the procedure or
3046         entry [family].
3047         (Expand_Simple_Function_Return): Update the
3048         generation of the _Postconditions routine of the function.
3049         (Expand_Subprogram_Contract): Reimplemented.
3050         * exp_ch6.ads (Expand_Subprogram_Contract): Update the parameter
3051         profile along the comment on usage.
3052         * exp_ch9.adb (Build_PPC_Wrapper): Code cleanup.
3053         (Expand_N_Task_Type_Declaration): Generate pre/postconditions
3054         wrapper when the entry [family] has a contract with
3055         pre/postconditions.
3056         * exp_prag.adb (Expand_Attributes_In_Consequence): New routine.
3057         (Expand_Contract_Cases): This routine and its subsidiaries now
3058         analyze all generated code.
3059         (Expand_Old_In_Consequence): Removed.
3060         * sem_attr.adb Add with and use clause for Sem_Prag.
3061         (Analyze_Attribute): Reimplment the analysis of attribute 'Result.
3062         (Check_Use_In_Test_Case): Use routine Test_Case_Arg to obtain
3063         "Ensures".
3064         * sem_ch3.adb (Analyze_Declarations): Analyze the contract of
3065         a generic subprogram.
3066         (Analyze_Object_Declaration): Do not create a contract node.
3067         (Derive_Subprogram): Do not create a contract node.
3068         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Do
3069         not create a contract node.
3070         (Analyze_Completion_Contract): New routine.
3071         (Analyze_Function_Return): Alphabetize.
3072         (Analyze_Generic_Subprogram_Body): Alphabetize. Do not create a
3073         contract node.  Do not copy pre/postconditions to the original
3074         generic template.
3075         (Analyze_Null_Procedure): Do not create a contract node.
3076         (Analyze_Subprogram_Body_Contract): Reimplemented.
3077         (Analyze_Subprogram_Body_Helper): Do not mark the enclosing scope
3078         as having postconditions. Do not create a contract node. Analyze
3079         the subprogram body contract of a body that acts as a compilation
3080         unit. Expand the subprogram contract after the declarations have
3081         been analyzed.
3082         (Analyze_Subprogram_Contract): Reimplemented.
3083         (Analyze_Subprogram_Specification): Do not create a contract node.
3084         (List_Inherited_Pre_Post_Aspects): Code cleanup.
3085         * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Update the
3086         comment on usage.
3087         (Analyze_Subprogram_Contract): Update the
3088         parameter profile and the comment on usage.
3089         * sem_ch7.adb (Analyze_Package_Body_Helper): Do not create a
3090         contract node.
3091         (Analyze_Package_Declaration): Do not create a
3092         contract node.
3093         (Is_Subp_Or_Const_Ref): Ensure that the prefix has an entity.
3094         * sem_ch8.adb (Analyze_Subprogram_Renaming): Do not create a
3095         contract node.
3096         * sem_ch9.adb (Analyze_Entry_Declaration): Do not create a
3097         contract node.
3098         * sem_ch10.adb (Analyze_Compilation_Unit): Move local variables to
3099         their proper section and alphabetize them. Analyze the contract of
3100         a [generic] subprogram after all Pragmas_After have been analyzed.
3101         (Analyze_Subprogram_Body_Stub_Contract): Alphabetize.
3102         * sem_ch12.adb (Analyze_Generic_Package_Declaration): Do not
3103         create a contract node.
3104         (Analyze_Generic_Subprogram_Declaration):
3105         Alphabetize local variables. Do not create a contract
3106         node. Do not generate aspects out of pragmas for ASIS.
3107         (Analyze_Subprogram_Instantiation): Instantiate
3108         the contract of the subprogram.  Do not create a
3109         contract node.  (Instantiate_Contract): New routine.
3110         (Instantiate_Subprogram_Body): Alphabetize local variables.
3111         (Save_Global_References_In_Aspects): New routine.
3112         (Save_References): Do not save the global references found within
3113         the aspects of a generic subprogram.
3114         * sem_ch12.ads (Save_Global_References_In_Aspects): New routine.
3115         * sem_ch13.adb (Analyze_Aspect_Specifications): Do not use
3116         Original_Node for establishing linkages.
3117         (Insert_Pragma): Insertion in a subprogram body takes precedence over
3118         the case where the subprogram body is also a compilation unit.
3119         * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Use
3120         Get_Argument to obtain the proper expression. Install the generic
3121         formals when the related context is a generic subprogram.
3122         (Analyze_Depends_In_Decl_Part): Use Get_Argument to obtain
3123         the proper expression. Use Corresponding_Spec_Of to obtain
3124         the spec. Install the generic formal when the related context
3125         is a generic subprogram.
3126         (Analyze_Global_In_Decl_Part): Use Get_Argument to obtain the proper
3127         expression. Use Corresponding_Spec_Of to obtain the spec. Install the
3128         generic formal when the related context is a generic subprogram.
3129         (Analyze_Initial_Condition_In_Decl_Part): Use Get_Argument
3130         to obtain the proper expression. Remove the call to
3131         Check_SPARK_Aspect_For_ASIS as the analysis is now done
3132         automatically.
3133         (Analyze_Pragma): Update all occurrences
3134         to Original_Aspect_Name. Pragmas Contract_Cases, Depends,
3135         Extensions_Visible, Global, Postcondition, Precondition and
3136         Test_Case now carry generic templates when the related context
3137         is a generic subprogram. The same pragmas are no longer
3138         forcefully fully analyzed when the context is a subprogram
3139         that acts as a compilation unit. Pragmas Abstract_State,
3140         Initial_Condition, Initializes and Refined_State have been clean
3141         up. Pragmas Post, Post_Class, Postcondition, Pre, Pre_Class
3142         and Precondition now use the same routine for analysis. Pragma
3143         Refined_Post does not need to check the use of 'Result or
3144         the lack of a post-state in its expression. Reimplement the
3145         analysis of pragma Test_Case.
3146         (Analyze_Pre_Post_Condition): New routine.
3147         (Analyze_Pre_Post_Condition_In_Decl_Part):
3148         Reimplemented.
3149         (Analyze_Refined_Depends_In_Decl_Part): Use Get_Argument to obtain the
3150         proper expression.
3151         (Analyze_Refined_Global_In_Decl_Part): Use Get_Argument to obtain
3152         the proper expression.
3153         (Analyze_Test_Case_In_Decl_Part): Reimplemented.
3154         (Check_Pre_Post): Removed.
3155         (Check_Precondition_Postcondition): Removed.
3156         (Check_SPARK_Aspect_For_ASIS): Removed.
3157         (Check_Test_Case): Removed.
3158         (Collect_Subprogram_Inputs_Outputs): Use Get_Argument
3159         to obtain the proper expression. Use Corresponding_Spec_Of to
3160         find the proper spec.
3161         (Create_Generic_Template): New routine.
3162         (Duplication_Error): New routine.
3163         (Expression_Function_Error): New routine.
3164         (Find_Related_Subprogram_Or_Body): Moved to the spec
3165         of Sem_Prag. Emit precise error messages. Account for cases of
3166         rewritten expression functions, generic instantiations, handled
3167         sequence of statements and pragmas from aspects.
3168         (Get_Argument): New routine.
3169         (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Removed.
3170         (Preanalyze_CTC_Args): Removed.
3171         (Process_Class_Wide_Condition): New routine.
3172         * sem_prag.ads (Analyze_Test_Case_In_Decl_Part): Update
3173         the parameter profile along with the comment on usage.
3174         (Find_Related_Subprogram_Or_Body): Moved from the body of Sem_Prag.
3175         (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Removed.
3176         (Test_Case_Arg): New routine.
3177         * sem_util.adb Add with and use clauses for Sem_Ch6.
3178         (Add_Contract_Item): This routine now creates a contract
3179         node the first time an item is added. Remove the duplicate
3180         aspect/pragma checks.
3181         (Check_Result_And_Post_State): Reimplemented.
3182         (Corresponding_Spec_Of): New routine.
3183         (Get_Ensures_From_CTC_Pragma): Removed.
3184         (Get_Requires_From_CTC_Pragma): Removed.
3185         (Has_Significant_Contract): New routine.
3186         (Inherit_Subprogram_Contract): Inherit only if the source
3187         has a contract.
3188         (Install_Generic_Formals): New routine.
3189         (Original_Aspect_Name): Removed.
3190         (Original_Aspect_Pragma_Name): New routine.
3191         * sem_util.ads (Check_Result_And_Post_State): Reimplemented.
3192         (Corresponding_Spec_Of): New routine.
3193         (Get_Ensures_From_CTC_Pragma): Removed.
3194         (Get_Requires_From_CTC_Pragma): Removed.
3195         (Has_Significant_Contract): New routine.
3196         (Install_Generic_Formals): New routine.
3197         (Original_Aspect_Name): Removed.
3198         (Original_Aspect_Pragma_Name): New routine.
3199         * sem_warn.adb Add with and use clauses for Sem_Prag.
3200         (Within_Postcondition): Use Test_Case_Arg to extract "Ensures".
3202 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
3204         * sem_ch8.adb (Available_Subtype): Optimization in
3205         Find_Selected_Component: when safe, use existing subtype of
3206         array component, possibly discriminant-dependent, rather than
3207         creating new subtype declaration for it. In this fashion different
3208         occurrences of the component have the same subtype, rather than
3209         just equivalent ones. Simplifies value tracing in GNATProve.
3211 2015-03-01  Arnaud Charlet  <charlet@adacore.com>
3213         PR ada/65259
3215         * doc/gnat_ugn/gnat_project_manager.rst,
3216         doc/gnat_ugn/platform_specific_information.rst: Remove reference to
3217         image, too troublesome with texi format.
3218         * gnat_ugn.texi: Regenerate.
3220 2015-02-24  Thomas Schwinge  <thomas@codesourcery.com>
3222         PR libgomp/64625
3223         * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8): Remove.
3224         (DEF_FUNCTION_TYPE_VAR_12): Likewise.
3225         (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
3227 2015-02-23  Thomas Schwinge  <thomas@codesourcery.com>
3229         * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8): Fix number of
3230         arguments parameter.
3231         (DEF_FUNCTION_TYPE_VAR_12): Likewise.
3233 2015-02-22  Arnaud Charlet  <charlet@adacore.com>
3235         * doc/Makefile: postprocess texinfo files to update @dircategory
3236         and update texi files under gcc/ada.
3237         * gnat_ugn.texi, gnat_rm.texi: Regenerated.
3239 2015-02-22  Arnaud Charlet  <charlet@adacore.com>
3241         * doc/gnat_ugn/project-manager-figure.png,
3242         doc/gnat_ugn/rtlibrary-structure.png: New.
3244 2015-02-22  Tom de Vries  <tom@codesourcery.com>
3246         PR ada/65100
3247         * gnat-style.texi (@subsection Loop Statements): Replace @noindent by
3248         @item, and fix warning '@itemize has text but no @item'.
3250 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
3252         * sem_prag.adb (Analyze_Pragma, case Obsolescent): Pragma
3253         legally applies to an abstract subprogram declaration.
3254         * freeze.adb: Minor comment addition.
3256 2015-02-20  Robert Dewar  <dewar@adacore.com>
3258         * errout.ads: Document replacement of Name_uPre/Post/Type_Invariant.
3259         * erroutc.adb (Set_Msg_Str): Replace _xxx.
3260         (Pre/Post/Type_Invariant) by xxx'Class.
3261         * erroutc.ads (Set_Msg_Str): Replace _xxx.
3262         (Pre/Post/Type_Invariant) by xxx'Class.
3263         * sem_prag.adb (Fix_Error): Remove special casing of
3264         Name_uType_Invariant.
3265         (Analyze_Pre_Post_Condition_In_Decl_Part): Remove special casing of
3266         Name_uPre and Name_uPost in aspect case (done in Errout now).
3268 2015-02-20  Robert Dewar  <dewar@adacore.com>
3270         * g-alveop.adb: Minor style fixes.
3272 2015-02-20  Robert Dewar  <dewar@adacore.com>
3274         * freeze.adb (Warn_Overlay): Guard against blow up with address
3275         clause.
3277 2015-02-20  Bob Duff  <duff@adacore.com>
3279         * exp_attr.adb (May_Be_External_Call): Remove this. There is no need
3280         for the compiler to guess whether the call is internal or external --
3281         it is always external.
3282         (Expand_Access_To_Protected_Op): For P'Access, where P
3283         is a protected subprogram, always create a pointer to the
3284         External_Subprogram.
3286 2015-02-20  Robert Dewar  <dewar@adacore.com>
3288         * a-dispat.adb, a-stcoed.ads: Minor reformatting.
3290 2015-02-20  Robert Dewar  <dewar@adacore.com>
3292         * sem_ch13.adb (Build_Discrete_Static_Predicate): Allow static
3293         predicate for non-static subtype.
3294         (Build_Predicate_Functions): Do not assume subtype associated with a
3295         static predicate must be static.
3297 2015-02-20  Robert Dewar  <dewar@adacore.com>
3299         * errout.adb (Set_Msg_Node): Better handling of internal names
3300         (Set_Msg_Node): Kill message when we cannot eliminate internal name.
3301         * errout.ads: Document additional case of message deletion.
3302         * namet.adb (Is_Internal_Name): Refined to consider wide
3303         strings in brackets notation and character literals not to be
3304         internal names.
3305         * sem_ch8.adb (Find_Selected_Component): Give additional error
3306         when selector name is a subprogram whose first parameter has
3307         the same type as the prefix, but that type is untagged.
3309 2015-02-20  Robert Dewar  <dewar@adacore.com>
3311         * g-allein.ads, g-alveop.adb, g-alveop.ads, opt.ads: Minor reformatting
3313 2015-02-20  Tristan Gingold  <gingold@adacore.com>
3315         * opt.ads (GNAT_Mode_Config): New variable.
3316         * opt.adb (Set_Opt_Config_Switches): Consider GNAT_Mode_Config
3317         to set Assertions_Enabled.
3318         * switch-c.adb (Scan_Front_End_Switches): Set GNAT_Mode_Config
3319         for -gnatg.
3321 2015-02-20  Robert Dewar  <dewar@adacore.com>
3323         * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Add an additional
3324         comment regarding the handling of unterminated fixed-point
3325         constants.
3326         * s-valuns.ads (Scan_Raw_Unsigned): Add comments
3327         corresponding to those previously added for
3328         System.Val_LLU.Scan_Raw_Long_Long_Unsigned.
3330 2015-02-20  Olivier Hainque  <hainque@adacore.com>
3332         * g-allein.ads, g-alveop.ads, g-alveop.adb: Code clean ups.
3334 2015-02-20  Robert Dewar  <dewar@adacore.com>
3336         * sem_prag.adb: Minor comment clarification.
3338 2015-02-20  Olivier Hainque  <hainque@adacore.com>
3340         * g-allein.ads (vec_ctf, vec_vcsfx, vec_vcfux): Remove.
3341         * g-alleve.ads, g-alleva.adb (vcfux): Likewise.
3342         * g-alveop.ads (vec_vcfsx, vec_vcfux): Just rename the ll versions.
3343         (vec_ctf): Now renamings as well.
3345 2015-02-20  Robert Dewar  <dewar@adacore.com>
3347         * switch-c.adb, bindgen.adb: Minor reformatting.
3349 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
3351         * sem_prag.adb (Analyze_Pragma, case Type_Invariant):
3352         Invariant'class is allowed on an abstract type.
3354 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
3356         * sem_ch3.adb (Access_Definition): If the access definition is
3357         for a protected component and defines an access to protected
3358         subprogram, do not create an itype reference for it because a
3359         full type declaration will be built in order to generate the
3360         proper equivalent type.
3361         (Analyze_Subtype_Declaration): Add information of incomplete
3362         subtypes, for Ada 2012 extended uses of incomplete types.
3364 2015-02-20  Gary Dismukes  <dismukes@adacore.com>
3366         * sem_res.adb: Minor reformatting.
3368 2015-02-20  Vincent Celier  <celier@adacore.com>
3370         * switch-c.adb (Scan_Front_End_Switches): When comparing runtime
3371         path name for several switches --RTS, use the normalized path
3372         names.
3374 2015-02-20  Vincent Celier  <celier@adacore.com>
3376         * bindgen.adb: Minor reformatting and code reorganization.
3378 2015-02-20  Jose Ruiz  <ruiz@adacore.com>
3380         * a-stcoed.ads: Add spec for this package (Unimplemented_Unit).
3381         * impunit.adb (Non_Imp_File_Names_12): Mark unit a-stcoed.ads as
3382         defined by Ada 2012.
3384 2015-02-20  Arnaud Charlet  <charlet@adacore.com>
3386         * sysdep.c, expect.c, s-oscons-tmplt.c, gsocket.h, adaint.c: Remove
3387         obsolete references to RTX, nucleus, VMS.
3389 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
3391         * sem_prag.adb (Fix_Error): For an illegal Type_Invariant'Class
3392         aspect, use name that mentions Class explicitly, rather than
3393         compiler-internal name.
3395 2015-02-20  Robert Dewar  <dewar@adacore.com>
3397         * debug.adb: Add documentation for -gnatd.2 (allow statements
3398         in decl sequences).
3399         * par-ch3.adb (P_Identifier_Declarations): Handle
3400         statement appearing where declaration expected more cleanly.
3401         (Statement_When_Declaration_Expected): Implement debug flag
3402         -gnatd.2.
3404 2015-02-20  Jose Ruiz  <ruiz@adacore.com>
3406         * a-dinopr.ads: Add spec for this package (Unimplemented_Unit).
3407         * a-dispat.ads (Yield): Include procedure added in Ada 2012.
3408         * a-dispat.adb (Yield): Implement procedure added in Ada 2012.
3409         * impunit.adb (Non_Imp_File_Names_05): Mark unit a-dinopr.ads as
3410         defined by Ada 2005.
3411         * snames.ads-tmpl (Name_Non_Preemptive_FIFO_Within_Priorities):
3412         This is the correct name for the dispatching policy (FIFO was
3413         missing).
3415 2015-02-20  Javier Miranda  <miranda@adacore.com>
3417         * sem_res.adb (Resolve_Type_Conversion): If the type of the
3418         operand is the limited-view of a class-wide type then recover
3419         the class-wide type of the non-limited view.
3421 2015-02-20  Arnaud Charlet  <charlet@adacore.com>
3423         * gcc-interface/Makefile.in: Remove references to nucleus.
3424         * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Procedure): Set
3425         extern_flag to true for Inline_Always subprograms with
3426         Intrinsic convention.
3428 2015-02-20  Yannick Moy  <moy@adacore.com>
3430         * sem_prag.ads: Minor typo in comment.
3432 2015-02-20  Pascal Obry  <obry@adacore.com>
3434         * s-osprim-mingw.adb: Fix Get_Base_Time parameter mode.
3436 2015-02-20  Vincent Celier  <celier@adacore.com>
3438         * makeutl.adb (Get_Directories.Add_Dir): Add a directory only
3439         if it exists.
3441 2015-02-20  Robert Dewar  <dewar@adacore.com>
3443         * sem_eval.ads: Minor reformatting.
3445 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
3447         * freeze.adb (Size_Known): Do not set the packed size for
3448         independent type or component.
3449         (Freeze_Array_Type): Check for Independent[_Components] with packing
3450         or explicit component size clause.
3451         * gnat1drv.adb (Post_Compilation_Validation_Checks): Do the validation
3452         of independence pragmas only for non-GCC back-ends.
3453         * sem_ch13.adb (Initialize): Likewise for the initialization.
3454         * sem_prag.adb (Record_Independence_Check): New procedure to record an
3455         independence check in the table.
3456         (Analyze_Pragma): Use it throughout instead of doing it manually.
3457         * gcc-interface/decl.c (gnat_to_gnu_field): Add support for
3458         independent type or component.
3460 2015-02-20  Thomas Quinot  <quinot@adacore.com>
3462         * adaint.c (__gnat_readdir): For Solaris, use 64 bit variants of
3463         struct direct and readdir. This is required for NFS filesystems
3464         mounted from servers that use 64-bit cookies.
3466 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
3468         * sem_ch12.adb (Analyze_Subprogram_Instantiaion): New subprogram
3469         Build_Subprogram_Renaming, to create renaming of subprogram
3470         instance in the the declaration of the wrapper package rather
3471         than in its body, so that it is available for analysis of aspects
3472         propagated from generic to instantiation.
3473         (Check_Mismatch): An actual for a formal package that is an
3474         incomplete type matches a formal type that is incomplete.
3475         (Instantiate_Package_Body): Move code that builds subprogram
3476         renaming to Analyze_Subprogram_Instantiation.
3477         (Instantiate_Type): The generated subtype is a limited view if
3478         the actual is a limited view.
3479         (Load_Parent_Of_Generic): Retrieve instance declaration from
3480         its new position within wrapper package.
3482 2015-02-20  Arnaud Charlet  <charlet@adacore.com>
3484         * s-parame-vxworks.adb, s-os_lib.ads: Update comments.
3486 2015-02-20  Robert Dewar  <dewar@adacore.com>
3488         * s-osinte-vxworks.ads (To_Timespec): Add comment about the
3489         issue of negative arguments.
3491 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
3493         * gnat1drv.adb: Minor consistency fix.
3495 2015-02-20  Pascal Obry  <obry@adacore.com>
3497         * s-osprim-mingw.adb (Get_Base_Time): Properly release lock in all
3498         paths.
3500 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
3502         * inline.adb (Expand_Inlined_Call): Skip again calls to subprogram
3503         renamings.
3504         * exp_ch6.adb (Expand_Call): Use back-end inlining
3505         instead of expansion for simple subprogram renamings.
3507 2015-02-20  Robert Dewar  <dewar@adacore.com>
3509         * exp_util.adb: Minor reformatting.
3511 2015-02-20  Vincent Celier  <celier@adacore.com>
3513         * switch-c.adb (Scan_Front_End_Switches): Do not fail when --RTS=
3514         is specified several times with different values that indicates
3515         the same runtime directory.
3517 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
3519         * sem_attr.adb (Check_Not_Incomplete_Type): Clean up code to
3520         handle properly illegal uses of attributes on prefixes on an
3521         incomplete type, both when the type of the prefix is locally
3522         incomplete, and when it is a limited view of a type whose
3523         non-limited view is not available.
3524         (Analyze_Attribute): Add calls to Check_Not_Incomplete_Type for
3525         'Address and others.
3527 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
3529         * exp_ch6.adb: Fix minor typo in comment.
3531 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
3533         * sinfo.ads: Add comment.
3535 2015-02-20  Olivier Hainque  <hainque@adacore.com>
3537         * opt.ads: Replace Opt.Suppress_All_Inlining by two separate
3538         flags controlling the actual FE inlining out of pragma Inline
3539         and pragma Inline_Always.
3540         * adabkend.adb (Scan_Compiler_Arguments): Set both flags to True
3541         on -fno-inline, which disables all inlining in compilers with
3542         an Ada back-end and without back-end inlining support.
3543         * back_end.adb (Scan_Back_End_Switches): Set the Inline related
3544         flag to True on -fno-inline and leave Inline_Always alone for
3545         gcc back-ends.
3546         * back_end.ads (Scan_Compiler_Arguments): Adjust spec wrt the
3547         names of the Opt flags it sets.
3548         * gnat1drv.adb (Adjust_Global_Switches): Remove test on
3549         Opt.Suppress_All_Inlining in the Back_End_Inlining computation.
3550         * sem_prag.adb (Make_Inline): Remove early return conditioned
3551         on Opt.Suppress_All_Inlining.
3552         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Use the flags to
3553         disable the calls to Build_Body_To_Inline otherwise triggered
3554         by pragma Inline or Inline_Always. This will prevent actual
3555         front-end inlining of the subprogram on calls.
3557 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
3559         * exp_ch3.adb (Default_Initialize_Object): Call Add_Inlined_Body on the
3560         Abort_Undefer_Direct function.
3561         * exp_ch5.adb (Expand_N_Assignment_Statement): Likewise.
3562         * exp_intr.adb (Expand_Unc_Deallocation): Likewise.
3563         * exp_prag.adb (Expand_Pragma_Abort_Defer): Likewise.
3564         * exp_ch4.adb (Expand_N_Selected_Component): Adjust call to
3565         Add_Inlined_Body.
3566         * exp_ch6.adb (Expand_Call): Adjust calls to Add_Inlined_Body.
3567          Remove call to Register_Backend_Call and move code resetting
3568         Needs_Debug_Info on inlined subprograms to...
3569         * inline.ads (Add_Inlined_Body): Add N parameter.
3570         (Register_Backend_Call): Delete.
3571         * inline.adb (Add_Inlined_Body): ...here and simplify.
3572          Register the call with Backend_Calls directly.
3573         (Register_Backend_Call): Delete.
3574         * s-stalib.ads (Abort_Undefer_Direct): Restore pragma Inline.
3576 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
3578         * s-stalib.ads: Fix typo.
3580 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
3582         * exp_ch3.adb (Default_Initialize_Object): If the object has a
3583         delayed freeze, the actions associated with default initialization
3584         must be part of the freeze actions, rather that being inserted
3585         directly after the object declaration.
3587 2015-02-20  Robert Dewar  <dewar@adacore.com>
3589         * lib-load.adb: Minor comment update.
3591 2015-02-20  Vincent Celier  <celier@adacore.com>
3593         * prj-proc.adb (Process_Case_Construction): When there are
3594         incomplete withed projects and the case variable is unknown,
3595         skip the case construction.
3597 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
3599         * exp_ch6.adb (Expand_Actuals): Add caller-side invariant checks
3600         when an actual is a view conversion, either because the call is
3601         to an inherited operation, or because the actual is an explicit
3602         type conversion to an ancestor type.  Fixes ACATS 4.0D: C732001
3604 2015-02-20  Robert Dewar  <dewar@adacore.com>
3606         * einfo.ads: Minor comment updates Fix missing pragma Inline
3607         for Set_Partial_View_Has_Unknown_Discr.
3608         * einfo.adb (Write_Entity_Flags): Add missing entry for
3609         Partial_View_Has_Unknown_Discr.
3610         * sem_ch3.adb: Minor reformatting.
3612 2015-02-20  Vincent Celier  <celier@adacore.com>
3614         * opt.ads: Minor cleanup: remove mention of gprmake.
3615         * s-stalib.ads (Abort_Undefer_Direct): Do not inline.
3616         * s-tataat.adb: Do not call System.Tasking.Self but directly
3617         System.Task_Primitives.Operations.Self.
3619 2015-02-20  Arnaud Charlet  <charlet@adacore.com>
3621         * gnat_rm.texi, gnat_ugn.texi: Now automatically generated from
3622         sphinx in the doc directory.
3623         * doc: New directory containing sphinx versions of gnat_rm and gnat_ugn
3625 2015-02-20  Robert Dewar  <dewar@adacore.com>
3627         * sem_res.adb: Minor reformatting.
3628         * exp_ch9.adb (Build_Protected_Spec): Copy Aliased setting when
3629         building spec.
3630         * sem_ch13.adb (Analyze_Aspect_Specifications): Exclude Boolean
3631         aspects from circuitry setting delay required to false if the
3632         argument is an integer literal.
3634 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
3636         * einfo.ads. einfo.adb (Partial_View_Has_Unknown_Discr):  New flag
3637         on type entities, to enforce AI12-0133: default initialization
3638         of types whose partial view has unknown discriminants does not
3639         get an invariant check, because clients of the unit can never
3640         declare objects of such types.
3641         * sem_ch3.adb (Find_Type_Name); Set new flag
3642         Partial_View_Has_Unknown_Discr when needed.
3643         * exp_ch3.adb (Expand_N_Object_Declaration): Use flag to suppress
3644         generation of invariant call on default-initialized object.
3646 2015-02-08  Eric Botcazou  <ebotcazou@adacore.com>
3648         * gcc-interface/decl.c (gnat_to_gnu_param): Do not strip the padding
3649         if the parameter either is passed by reference or if the alignment
3650         would be lowered.
3652 2015-02-08  Eric Botcazou  <ebotcazou@adacore.com>
3654         * gcc-interface/decl.c (is_cplusplus_method): Use Is_Primitive flag to
3655         detect primitive operations of tagged and untagged types.
3657 2015-02-08  Eric Botcazou  <ebotcazou@adacore.com>
3659         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not bother about alias
3660         sets in presence of derivation for subprogram types.
3662 2015-02-08  Eric Botcazou  <ebotcazou@adacore.com>
3664         * gcc-interface/utils.c (begin_subprog_body): Assert that the body is
3665         present in the same context as the declaration.
3667 2015-02-07  Jakub Jelinek  <jakub@redhat.com>
3669         PR middle-end/64340
3670         * gcc-interface/trans.c (gigi): Recreate optimization_default_node
3671         and optimization_current_node after tweaking global_options.
3673 2015-02-05  Robert Dewar  <dewar@adacore.com>
3675         * prj-proc.adb, sem_aux.adb, exp_ch9.adb, errout.adb, prj-dect.adb,
3676         prj-nmsc.adb: Minor reformatting.
3678 2015-02-05  Ed Schonberg  <schonberg@adacore.com>
3680         * sem_type.adb (Covers): In ASIS_Mode the Corresponding_Record
3681         of a protected type may not be available, so to check conformance
3682         with an interface type, examine the interface list in the type
3683         declaration directly.
3684         (Write_Overloads): Improve information for indirect calls,
3685         for debugger use.
3687 2015-02-05  Ed Schonberg  <schonberg@adacore.com>
3689         * exp_ch3.adb (Make_Tag_Assignment): Do not perform this
3690         expansion activity in ASIS mode.
3692 2015-02-05  Javier Miranda  <miranda@adacore.com>
3694         * errout.adb (Error_Msg_PT): Add missing error.
3695         * sem_ch6.adb (Check_Synchronized_Overriding): Check the missing
3696         RM rule.  Code cleanup.
3697         * exp_ch9.adb (Build_Wrapper_Spec): Propagate "constant" in
3698         anonymous access types.  Found working on the tests. Code cleanup.
3700 2015-02-05  Vincent Celier  <celier@adacore.com>
3702         * prj-dect.adb (Parse_Attribute_Declaration): Continue scanning
3703         when there are incomplete withs.
3704         * prj-nmsc.adb (Process_Naming): Do not try to get the value
3705         of an element when it is nil.
3706         (Check_Naming): Do not check a nil suffix for illegality
3707         * prj-proc.adb (Expression): Do not process an empty term.
3708         * prj-strt.adb (Attribute_Reference): If attribute cannot be
3709         found, parse a possible index to avoid cascading errors.
3711 2015-02-05  Ed Schonberg  <schonberg@adacore.com>
3713         * sem_aux.adb (Is_Derived_Type): A subprogram_type generated
3714         for an access_to_subprogram declaration is not a derived type.
3716 2015-02-05  Robert Dewar  <dewar@adacore.com>
3718         * errout.adb (Error_Msg_Internal): For non-serious error set
3719         Fatal_Error to Ignored.
3720         * lib-load.adb (Load_Unit): Minor comment updates.
3721         * sem_ch10.adb (Analyze_With_Clause): Propagate Fatal_Error
3722         setting from with'ed unit to with'ing unit.
3723         * sem_prag.adb (Analyze_Pragma, case Warnings): Document handling
3724         of ambiguity.
3726 2015-02-05  Yannick Moy  <moy@adacore.com>
3728         * sem_prag.adb, par-prag.adb: Minor code clean up.
3730 2015-02-05  Yannick Moy  <moy@adacore.com>
3732         * par-prag.adb (Pragma_Warnings): Update for extended form
3733         of pragma Warnings. The "one" argument case may now have 2 or
3734         3 arguments.
3735         * sem_prag.adb (Analyze_Pragma/Pragma_Warnings): Update for
3736         extended form of pragma Warnings. Pragma with tool name is either
3737         rewritten as null or as an equivalent form without tool name,
3738         before reanalysis.
3739         * snames.ads-tmpl (Name_Gnatprove): New name.
3741 2015-02-05  Robert Dewar  <dewar@adacore.com>
3743         * sem_ch13.adb (Add_Invariants): Don't assume invariant is
3744         standard Boolean.
3745         * sem_prag.adb (Analyze_Pragma, case Check): Don't assume
3746         condition is standard Boolean, it can be non-standard derived
3747         Boolean.
3749 2015-02-05  Robert Dewar  <dewar@adacore.com>
3751         * checks.adb (Enable_Range_Check): Disconnect attempted
3752         optimization for the case of range check for subscript of
3753         unconstrained array.
3755 2015-02-05  Robert Dewar  <dewar@adacore.com>
3757         * par-ch13.adb (With_Present): New function
3758         (Aspect_Specifications_Present): Handle WHEN in place of WITH
3759         (Get_Aspect_Specifications): Comment update.
3760         * par.adb: Comment updates.
3762 2015-02-05  Robert Dewar  <dewar@adacore.com>
3764         * errout.adb (Handle_Serious_Error): New setting of Fatal_Error.
3765         * frontend.adb (Frontend): New setting of Fatal_Error.
3766         * lib-load.adb (Create_Dummy_Package_Unit): New setting of
3767         Fatal_Error.
3768         (Load_Main_Source): New setting of Fatal_Error
3769         (Load_Unit): New setting of Fatal_Error.
3770         * lib-writ.adb (Add_Preprocessing_Dependency): New setting of
3771         Fatal_Error.
3772         (Ensure_System_Dependency): New setting of Fatal_Error.
3773         * lib.adb (Fatal_Error): New setting of Fatal_Error
3774         (Set_Fatal_Error): New setting of Fatal_Error.
3775         * lib.ads: New definition of Fatal_Error and associated routines.
3776         * par-ch10.adb (P_Compilation_Unit): New setting of Fatal_Error.
3777         * par-load.adb (Load): New setting of Fatal_Error.
3778         * rtsfind.adb (Load_RTU): New setting of Fatal_Error.
3779         * sem_ch10.adb (Analyze_Compilation_Unit): New setting of
3780         Fatal_Error.
3781         (Optional_Subunit): New setting of Fatal_Error.
3782         (Analyze_Proper_Body): New setting of Fatal_Error.
3783         (Load_Needed_Body): New setting of Fatal_Error.
3785 2015-02-05  Ed Schonberg  <schonberg@adacore.com>
3787         * sem_res.adb (Resolve_Call): If the function being called has
3788         out parameters do not check for language version if the function
3789         comes from a predefined unit, as those are always compiled in
3790         Ada 2012 mode.
3792 2015-02-05  Ed Schonberg  <schonberg@adacore.com>
3794         * sem_ch3.adb (Process_Full_View): Verify that the full view
3795         of a type extension must carry an explicit limited keyword if
3796         the partial view does (RM 7.3 (10.1)).
3798 2015-02-05  Robert Dewar  <dewar@adacore.com>
3800         * g-rannum.adb, g-rannum.ads, s-rannum.adb, s-rannum.ads,
3801         sem_warn.ads: Minor reformatting.
3802         * exp_ch13.adb (Expand_N_Freeze_Entity): Add guard for aspect
3803         deleted by -gnatI.
3804         * sem_prag.adb (Analyze_Pragma, case Type_Invariant): Give
3805         error for abstract type.
3807 2015-02-05  Yannick Moy  <moy@adacore.com>
3809         * opt.ads (Warn_On_Suspicious_Contract): Update comment
3810         describing use.
3811         * sem_attr.adb (Analyze_Attribute/Attribute_Update): Warn on
3812         suspicious uses of 'Update.
3813         * sem_warn.adb, sem_warn.ads (Warn_On_Suspicious_Update): New
3814         function issues warning on suspicious uses of 'Update.
3815         * g-rannum.adb, g-rannum.ads, s-rannum.adb, s-rannum.ads: Mark
3816         package spec and body as SPARK_Mode Off.
3818 2015-02-05  Robert Dewar  <dewar@adacore.com>
3820         * sem_prag.adb (Set_Elab_Unit_Name): New name for Set_Unit_Name
3821         (Analyze_Pragma): Change Set_Unit_Name to Set_Elab_Unit_Name
3822         (Set_Elab_Unit_Name): Generate reference for Elaborate[_All]
3823         * sem_warn.adb (Warn_On_Unreferenced_Entity): Suppress warning
3824         for exported entity.
3826 2015-02-05  Hristian Kirtchev  <kirtchev@adacore.com>
3828         * sem_prag.adb (Check_Pragma_Conformance): Add
3829         local variable Arg. Ensure that all errors are associated with
3830         the pragma if it appears without an argument. Add comments on
3831         various cases.
3833 2015-02-05  Robert Dewar  <dewar@adacore.com>
3835         * lib-xref.adb: Minor reformatting.
3837 2015-02-05  Tristan Gingold  <gingold@adacore.com>
3839         PR ada/64349
3840         * env.c: Fix thinko: handle Darwin case before default one.
3842 2015-01-30  Robert Dewar  <dewar@adacore.com>
3844         * a-assert.adb: Minor reformatting.
3845         * sem_ch13.adb: Minor comment clarification.
3846         * types.ads: Minor comment update.
3847         * sem_eval.adb (Real_Or_String_Static_Predicate_Matches): Avoid blow up
3848         when we have a predicate that is nothing but an inherited dynamic
3849         predicate.
3851 2015-01-30  Jerome Guitton  <guitton@adacore.com>
3853         * gcc-interface/Makefile.in (x86-vxworks): Update GCC_SPEC_FILES to
3854         include cert link spec.
3856 2015-01-30  Robert Dewar  <dewar@adacore.com>
3858         * einfo.ads: Minor comment fix.
3859         * freeze.adb (Freeze_Profile): Add test for suspicious import
3860         in pure unit.
3861         * sem_prag.adb (Process_Import_Or_Interface): Test for suspicious
3862         use in Pure unit is now moved to Freeze (to properly catch
3863         Pure_Function exemption).
3865 2015-01-30  Bob Duff  <duff@adacore.com>
3867         * sem_res.ads: Minor comment fix.
3868         * sem_type.adb: sem_type.adb (Remove_Conversions): Need to
3869         check both operands of an operator.
3871 2015-01-30  Yannick Moy  <moy@adacore.com>
3873         * a-assert.ads, a-assert.adb: Mark package spec in SPARK. Set assertion
3874         policy for Pre to Ignore.
3875         (Assert): Add precondition.
3877 2015-01-30  Robert Dewar  <dewar@adacore.com>
3879         * sem_prag.adb (Process_Import_Or_Interface): Warn if used in
3880         Pure unit.
3881         * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Clarify
3882         documentation for some special cases of invalid attempts at
3883         based integers.
3885 2015-01-30  Gary Dismukes  <dismukes@adacore.com>
3887         * errout.ads: Minor reformatting.
3889 2015-01-30  Yannick Moy  <moy@adacore.com>
3891         * inline.adb (Process_Formals): Use the sloc of
3892         the inlined node instead of the sloc of the actual parameter,
3893         when replacing formal parameters by the actual one.
3895 2015-01-30  Arnaud Charlet  <charlet@adacore.com>
3897         * g-expect.adb (Get_Command_Output): Use infinite timeout when
3898         calling Expect.
3900 2015-01-30  Ed Schonberg  <schonberg@adacore.com>
3902         * sem_ch12.adb (Analyze_Associations): If an in-parameter is
3903         defaulted in an instantiation, add an entry in the list of actuals
3904         to indicate the default value of the formal (as is already done
3905         for defaulted subprograms).
3907 2015-01-30  Javier Miranda  <miranda@adacore.com>
3909         * errout.adb (Error_Msg_PT): Minor error phrasing update.
3911 2015-01-30  Robert Dewar  <dewar@adacore.com>
3913         * sem_warn.adb (Warn_On_Known_Condition): Improve error message
3914         for object case.
3916 2015-01-30  Pierre-Marie de Rodat  <derodat@adacore.com>
3918         * exp_dbug.adb (Get_Encoded_Name): When
3919         -fgnat-encodings=minimal, do not generate names for biased types.
3921 2015-01-30  Tristan Gingold  <gingold@adacore.com>
3923         PR ada/64349
3924         * env.c: Move vxworks and darwin includes out of #ifdef IN_RTS.
3926 2015-01-30  Gary Dismukes  <dismukes@adacore.com>
3928         * freeze.adb: Minor reformatting.
3930 2015-01-30  Javier Miranda  <miranda@adacore.com>
3932         * errout.ads (Error_Msg_PT): Replace Node_Id by Entity_Id and
3933         improve its documentation.
3934         * errout.adb (Error_Msg_PT): Improve the error message.
3935         * sem_ch6.adb (Check_Conformance): Update call to Error_Msg_PT.
3936         (Check_Synchronized_Overriding): Update call to Error_Msg_PT.
3937         * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup.
3939 2015-01-30  Robert Dewar  <dewar@adacore.com>
3941         * sem_warn.adb (Warn_On_Known_Condition): Do special casing of
3942         message for False case.
3944 2015-01-30  Doug Rupp  <rupp@adacore.com>
3946         * s-vxwext-kernel.ads (Task_Cont): Remove imported subprogram body.
3947         * s-vxwext-kernel.adb (Task_Cont): New subpprogram body specialized for
3948         kernel.
3950 2015-01-30  Gary Dismukes  <dismukes@adacore.com>
3952         * sem_attr.adb (Declared_Within_Generic_Unit):
3953         New function to test whether an entity is declared within the
3954         declarative region of a given generic unit.
3955         (Resolve_Attribute): For checking legality of subprogram'Access within
3956         a generic unit, call new Boolean function Declared_Within_Generic_Unit
3957         instead of simply comparing the results of Enclosing_Generic_Unit on
3958         the prefix and access type.  Correct minor comment typos.
3960 2015-01-30  Robert Dewar  <dewar@adacore.com>
3962         * freeze.adb, exp_util.ads: Update comment.
3963         * exp_util.adb, exp_ch3.adb: Minor code reorganization and reformatting.
3964         * sem_util.adb: Minor: fix typo.
3966 2015-01-30  Hristian Kirtchev  <kirtchev@adacore.com>
3968         * sem_attr.adb (Analyze_Attribute): Ensure that
3969         the check concerning Refined_Post takes precedence over the
3970         other cases.
3972 2015-01-30  Gary Dismukes  <dismukes@adacore.com>
3974         * sem_prag.adb: Minor typo fixes and reformatting.
3976 2015-01-30  Yannick Moy  <moy@adacore.com>
3978         * sem_attr.adb: Code clean up.
3980 2015-01-30  Robert Dewar  <dewar@adacore.com>
3982         * ali.adb (Scan_ALI): Set Serious_Errors flag in Unit record.
3983         * ali.ads (Unit_Record): Add new field Serious_Errors.
3984         * lib-writ.adb (Write_Unit_Information): Set SE (serious errors)
3985         attribute in U line.
3986         * lib-writ.ads: New attribute SE (serious erors) in unit line.
3988 2015-01-30  Hristian Kirtchev  <kirtchev@adacore.com>
3990         * einfo.adb Update the usage of attributes Entry_Bodies_Array,
3991         Lit_Indexes, Scale_Value, Storage_Size_Variable,
3992         String_Literal_Low_Bound along associated routines and
3993         Write_FieldX_Name.
3994         (Pending_Access_Types): New routine.
3995         (Set_Pending_Access_Types): New routine.
3996         (Write_Field15_Name): Add an entry for Pending_Access_Types.
3997         * einfo.ads Add new attribute Pending_Access_Types along
3998         with usage in nodes.  Update the usage of attributes
3999         Entry_Bodies_Array, Lit_Indexes, Scale_Value,
4000         Storage_Size_Variable, String_Literal_Low_Bound.
4001         (Pending_Access_Types): New routine along with pragma Inline.
4002         (Set_Pending_Access_Types): New routine along with pragma Inline.
4003         * exp_ch3.adb (Expand_Freeze_Array_Type): Add new local variable
4004         Ins_Node. Determine the insertion node for anonynous access type
4005         that acts as a component type of an array. Update the call to
4006         Build_Finalization_Master.
4007         (Expand_Freeze_Record_Type): Update
4008         the calls to Build_Finalization_Master.
4009         (Freeze_Type): Remove
4010         local variable RACW_Seen. Factor out the code that deals with
4011         remote access-to-class-wide types. Create a finalization master
4012         when the designated type contains a private component. Fully
4013         initialize all pending access types.
4014         (Process_RACW_Types): New routine.
4015         (Process_Pending_Access_Types): New routine.
4016         * exp_ch4.adb (Expand_Allocator_Expression): Allocation no longer
4017         needs to set primitive Finalize_Address.
4018         (Expand_N_Allocator): Allocation no longer sets primitive
4019         Finalize_Address.
4020         * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
4021         Update the call to Build_Finalization_Master.
4022         (Make_Build_In_Place_Call_In_Allocator): Allocation no longer
4023         needs to set primitive Finalize_Address.
4024         * exp_ch7.adb (Add_Pending_Access_Type): New routine.
4025         (Build_Finalization_Master): New parameter profile. Associate
4026         primitive Finalize_Address with the finalization master if the
4027         designated type has been frozen, otherwise treat the access
4028         type as pending. Simplify the insertion of the master and
4029         related initialization code.
4030         (Make_Finalize_Address_Body): Allow Finalize_Address for class-wide
4031         abstract types.
4032         (Make_Set_Finalize_Address_Call): Remove forlam parameter Typ.
4033         Simplify the implementation.
4034         * exp_ch7.ads (Build_Finalization_Master): New parameter profile
4035         along with comment on usage.
4036         (Make_Set_Finalize_Address_Call): Remove formal parameter Typ. Update
4037         the comment on usage.
4038         * exp_util.adb (Build_Allocate_Deallocate_Proc): Use routine
4039         Finalize_Address to retrieve the primitive.
4040         (Finalize_Address): New routine.
4041         (Find_Finalize_Address): Removed.
4042         * exp_util.ads (Finalize_Address): New routine.
4043         * freeze.adb (Freeze_All): Remove the generation of finalization
4044         masters.
4045         * sem_ch3.adb (Analyze_Full_Type_Declaration): Propagate any
4046         pending access types from the partial to the full view.
4048 2015-01-30  Robert Dewar  <dewar@adacore.com>
4050         * sem_disp.adb: Minor reformatting.
4051         * sem_disp.ads: Documentation update.
4053 2015-01-30  Ed Schonberg  <schonberg@adacore.com>
4055         * sem_disp.adb (Is_Dynamically_Tagged): when applied to an entity
4056         or a function call, return True if type is class-wide.
4057         * sem_res.adb (Resolve_Case_Expression, Resolve_If_Expression);
4058         Apply RM 4.5.7 (17/3): all or none of the dependent expression
4059         of a conditional expression must be dynamically tagged.
4061 2015-01-30  Ed Schonberg  <schonberg@adacore.com>
4063         * sem_ch6.adb (Analyze_Function_Return): In an extended return
4064         statement, apply accessibility check to result object when there
4065         is no initializing expression (Ada 2012 RM 6.5 (5.4/3))
4067 2015-01-30  Robert Dewar  <dewar@adacore.com>
4069         * sem_ch4.adb (Analyze_If_Expression): Allow for non-standard
4070         Boolean for case where ELSE is omitted.
4071         * sem_res.adb: Minor reformatting.
4073 2015-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4075         Fix build under cygwin/64.
4076         * adaint.h: Add check for __CYGWIN__.
4077         * mingw32.h: Prevent windows.h from including x86intrin.h in GCC.
4079 2015-01-19  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4081         PR ada/64640
4082         * adaint.c: Handle __CYGWIN__ like __MINGW32__ here.
4083         * mingw32.h: Don't include <tchar.h> under cygwin.
4084         (_O_U8TEXT, _O_U16TEXT, _O_WTEXT): Set to _O_TEXT if not yet defined.
4086 2015-01-15  Thomas Schwinge  <thomas@codesourcery.com>
4088         * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8)
4089         (DEF_FUNCTION_TYPE_VAR_12): New macros.
4091 2015-01-09  Michael Collison  <michael.collison@linaro.org>
4093         * gcc-interface/cuintp.c: Include hash-set.h, machmode.h,
4094         vec.h, double-int.h, input.h, alias.h, symtab.h,
4095         fold-const.h, wide-int.h, and inchash.h due to
4096         flattening of tree.h.
4097         * gcc-interface/decl.c: Ditto.
4098         * gcc-interface/misc.c: Ditto.
4099         * gcc-interface/targtyps.c: Include hash-set.h, machmode.h,
4100         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h,
4101         fold-const.h, wide-int.h, and inchash.h due to
4102         flattening of tree.h.
4103         * gcc-interface/trans.c: Include hash-set.h, machmode.h,
4104         vec.h, double-int.h, input.h, alias.h, symtab.h, real.h,
4105         fold-const.h, wide-int.h, inchash.h due to
4106         flattening of tree.h.
4107         * gcc-interface/utils.c: Include hash-set.h, machmode.h,
4108         vec.h, double-int.h, input.h, alias.h, symtab.h,
4109         fold-const.h, wide-int.h, and inchash.h due to
4110         flattening of tree.h.
4111         * gcc-interface/utils2.c: Ditto.
4113 2015-01-07  Robert Dewar  <dewar@adacore.com>
4115         * sem_warn.adb (Check_One_Unit): Don't give unused entities
4116         warning for a package which is used as a generic parameter.
4118 2015-01-07  Bob Duff  <duff@adacore.com>
4120         * usage.adb (Usage): Correct documentation of
4121         -gnatw.f switches.
4123 2015-01-07  Robert Dewar  <dewar@adacore.com>
4125         * s-fileio.adb: Minor reformatting.
4127 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
4129         * sem_ch12.adb (Instantiate_Object): If formal is an anonymous
4130         access to subprogram, replace its formals with new entities when
4131         building the object declaration, both if actual is present and
4132         when it is defaulted.
4134 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
4136         * sem_ch5.adb (Analyze_Assignment): If left-hand side is a view
4137         conversion and type of expression has invariant, apply invariant
4138         check on expression.
4140 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
4142         * sem_ch3.adb (Create_Constrained_Components): A call to
4143         Gather_Components may detect an error if an inherited discriminant
4144         that controls a variant is non-static.
4145         * sem_aggr.adb (Resolve_Record_Aggregate, Step 5): The call to
4146         Gather_Components may report an error if an inherited discriminant
4147         in a variant in non-static.
4148         * sem_util.adb (Gather_Components): If a non-static discriminant
4149         is inherited do not report error here, but let caller handle it.
4150         (Find_Actual): Small optimization.
4152 2015-01-07  Bob Duff  <duff@adacore.com>
4154         * usage.adb (Usage): Document -gnatw.f switch.
4156 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
4158         * sem_ch12.adb: Code clean up and minor reformatting.
4160 2015-01-07  Robert Dewar  <dewar@adacore.com>
4162         * exp_ch4.adb (Expand_N_Type_Conversion): Add guard for
4163         Raise_Accessibility_Error call.
4164         * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Add documentation
4165         on handling of invalid digits in based constants.
4166         * s-fatgen.ads: Minor reformatting.
4167         * sem_attr.adb (Analyze_Attribute, case Unrestricted_Access):
4168         Avoid noting bogus modification for Valid test.
4169         * snames.ads-tmpl (Name_Attr_Long_Float): New Name.
4170         * einfo.ads: Minor reformatting.
4171         * sem_warn.adb: Minor comment clarification.
4172         * sem_ch12.adb: Minor reformatting.
4174 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
4176         * exp_ch5.adb (Expand_Predicated_Loop): Handle properly loops
4177         over static predicates when the loop parameter specification
4178         carries a Reverse indicator.
4180 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
4182         * sem_ch12.adb (Instantiate_Object): If formal has a default,
4183         actual is missing and formal has an anonymous access type, copy
4184         access definition in full so that tree for instance is properly
4185         formatted for ASIS use.
4187 2015-01-07  Bob Duff  <duff@adacore.com>
4189         * sem_elab.adb (Check_Internal_Call_Continue): Give a warning
4190         for P'Access, where P is a subprogram in the same package as
4191         the P'Access, and the P'Access is evaluated at elaboration
4192         time, and occurs before the body of P. For example, "X : T :=
4193         P'Access;" would allow a subsequent call to X.all to be an
4194         access-before-elaboration error; hence the warning. This warning
4195         is enabled by the -gnatw.f switch.
4196         * opt.ads (Warn_On_Elab_Access): New flag for warning switch.
4197         * warnsw.adb (Set_Dot_Warning_Switch): Set Warn_On_Elab_Access.
4198         * gnat_ugn.texi: Document the new warning.
4200 2015-01-07  Johannes Kanig  <kanig@adacore.com>
4202         * lib-xref-spark_specific.adb (Collect_SPARK_Xrefs): Skip unneeded
4203         cross ref files.
4205 2015-01-07  Robert Dewar  <dewar@adacore.com>
4207         * s-taprop-linux.adb, clean.adb: Minor reformatting.
4209 2015-01-07  Arnaud Charlet  <charlet@adacore.com>
4211         * s-tassta.adb: Relax some overzealous assertions.
4213 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
4215         * sem_ch6.adb (Analyze_Return_Type): An call that returns a limited
4216         view of a type is legal when context is a thunk generated for
4217         operation inherited from an interface.
4218         * exp_ch6.adb (Expand_Simple_Function_Return): If context is
4219         a thunk and return type is an incomplete type do not continue
4220         expansion; thunk will be fully elaborated when generating code.
4222 2015-01-07  Doug Rupp  <rupp@adacore.com>
4224         * s-osinte-mingw.ads (LARGE_INTEGR): New subtype.
4225         (QueryPerformanceFrequency): New imported procedure.
4226         * s-taprop-mingw.adb (RT_Resolution): Call above and return
4227         resolution vice a hardcoded value.
4228         * s-taprop-solaris.adb (RT_Resolution): Call clock_getres and return
4229         resolution vice a hardcoded value.
4230         * s-linux-android.ads (clockid_t): New subtype.
4231         * s-osinte-aix.ads (clock_getres): New imported subprogram.
4232         * s-osinte-android.ads (clock_getres): Likewise.
4233         * s-osinte-freebsd.ads (clock_getres): Likewise.
4234         * s-osinte-solaris-posix.ads (clock_getres): Likewise.
4235         * s-osinte-darwin.ads (clock_getres): New subprogram.
4236         * s-osinte-darwin.adb (clock_getres): New subprogram.
4237         * thread.c (__gnat_clock_get_res) [__APPLE__]: New function.
4238         * s-taprop-posix.adb (RT_Resolution): Call clock_getres to
4239         calculate resolution vice hard coded value.
4241 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
4243         * exp_util.adb (Make_CW_Equivalent_Type): If root type is a
4244         limited view, use non-limited view when available to create
4245         equivalent record type.
4247 2015-01-07  Vincent Celier  <celier@adacore.com>
4249         * gnatcmd.adb: Remove command Sync and any data and processing
4250         related to this command. Remove project processing for gnatstack.
4251         * prj-attr.adb: Remove package Synchonize and its attributes.
4253 2015-01-07  Vincent Celier  <celier@adacore.com>
4255         * clean.adb: Minor error message change.
4257 2015-01-07  Tristan Gingold  <gingold@adacore.com>
4259         PR ada/64349  
4260         * env.c (__gnat_environ): Adjust for darwin9/darwin10.
4262 2015-01-07  Javier Miranda  <miranda@adacore.com>
4264         * sem_ch10.adb (Analyze_With_Clause): Compiling under -gnatq
4265         protect the frontend against never ending recursion caused by
4266         circularities in the sources.
4268 2015-01-07  Robert Dewar  <dewar@adacore.com>
4270         * a-reatim.adb, make.adb, exp_pakd.adb, i-cpoint.adb, sem_ch8.adb,
4271         exp_ch3.adb: Minor reformatting.
4273 2015-01-07  Doug Rupp  <rupp@adacore.com>
4275         * s-linux.ads (clockid_t): New subtype.
4276         * s-osinte-linux.ads (pragma Linker Options): Add -lrt.
4277         (clockid_t): New subtype.
4278         (clock_getres): Import system call.
4279         * s-taprop-linux.adb (System.OS_Constants): With and rename.
4280         (RT_Resolution): Remove
4281         hardcoded value and call clock_getres.
4282         * s-linux-sparc.ads, s-linux-mipsel.ads, s-linux-hppa.ads,
4283         s-linux-alpha.ads, s-linux-x32.ads (clockid_t): Add new subtype.
4285 2015-01-07  Robert Dewar  <dewar@adacore.com>
4287         * sem_warn.adb (Check_One_Unit): Guard against context item
4288         with no Entity field.
4290 2015-01-07  Vincent Celier  <celier@adacore.com>
4292         * clean.adb (Gnatclean): Warn that 'gnatclean -P' is obsolete.
4293         * make.adb (Initialize): Warn that 'gnatmake -P' is obsolete.
4295 2015-01-07  Vincent Celier  <celier@adacore.com>
4297         * prj-conf.adb (Parse_Project_And_Apply_Config): Always finalize
4298         errors/warnings in the first parsing of the project files,
4299         to display the warnings when there is no errors.
4301 2015-01-07  Tristan Gingold  <gingold@adacore.com>
4303         * i-cpoint.adb (Copy_Terminated_Array): Nicely handle null target.
4305 2015-01-07  Doug Rupp  <rupp@adacore.com>
4307         * s-taprop-vxworks.adb (Stop_All_Tasks): Pass return
4308         value from Int_Lock as parameter to Int_Unlock.
4309         * s-osinte-vxworks.ads (Int_Unlock): Add parameter.
4310         * s-vxwext.ads (Int_Unlock): Likewise.
4311         * s-vxwext-kernel.adb (intUnlock, Int_Unlock): Likewise.
4312         * s-vxwext-kernel.ads (Int_Unlock): Likewise.
4313         * s-vxwext-rtp.adb (Int_Unlock): Likewise.
4314         * s-vxwext-rtp.ads (Int_Unlock): Likewise.
4316 2015-01-07  Pierre-Marie de Rodat  <derodat@adacore.com>
4318         * exp_pakd.adb: Add a comment in exp_pakd.adb to explain why we
4319         keep ___XP suffixes
4321 2015-01-07  Tristan Gingold  <gingold@adacore.com>
4323         * i-cpoint.adb (Copy_Terminated_Array): Use Copy_Array to
4324         handle overlap.
4326 2015-01-07  Eric Botcazou  <ebotcazou@adacore.com>
4328         * sem_ch3.adb (Analyze_Full_Type_Declaration): Do not
4329         automatically set No_Strict_Aliasing on access types.
4330         * fe.h (No_Strict_Aliasing_CP): Declare.
4331         * gcc-interface/trans.c (gigi): Force flag_strict_aliasing to 0 if
4332         No_Strict_Aliasing_CP is set.
4334 2015-01-07  Johannes Kanig  <kanig@adacore.com>
4336         * sem_ch8.adb (Analyze_Subprogram_Renaming) do
4337         not build function wrapper in gnatprove mode when the package
4338         is externally axiomatized.
4340 2015-01-07  Jose Ruiz  <ruiz@adacore.com>
4342         * a-reatim.adb (Time_Of): Reduce the number of spurious overflows in
4343         intermediate computations when the parameters have different signs.
4345 2015-01-07  Javier Miranda  <miranda@adacore.com>
4347         * exp_ch3.adb (Build_Init_Procedure): For derived types,
4348         improve the code which takes care of identifying and moving to
4349         the beginning of the init-proc the call to the init-proc of the
4350         parent type.
4352 2015-01-07  Olivier Hainque  <hainque@adacore.com>
4354         * gcc-interface/trans.c (gnat_to_gnu, <N_Expression_With_Action>):
4355         Elaborate the expression as part of the same stmt group as the actions.
4357 2015-01-07  Robert Dewar  <dewar@adacore.com>
4359         * sem_ch3.adb: Minor error message change.
4361 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
4363         * sem_prag.adb (Analyze_Pragma, case Preelaborable_Initialization):
4364         Following AI05-028, the pragam applies legally to any composite type.
4366 2015-01-07  Arnaud Charlet  <charlet@adacore.com>
4368         * s-osinte-vxworks.adb, s-osinte-vxworks.ads
4369         (sigwait, sigwaitinfo): Removed, not needed after all on any
4370         VxWorks configurations.
4372 2015-01-07  Robert Dewar  <dewar@adacore.com>
4374         * sem_ch3.adb, freeze.adb, exp_disp.adb: Minor reformatting.
4376 2015-01-07  Javier Miranda  <miranda@adacore.com>
4378         * exp_disp.adb (Expand_Interface_Conversion): Adding missing
4379         generation of accessibility check.
4381 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
4383         * sem_ch3.adb (Derived_Type_Declaration): In the case of an
4384         illegal completion from a class- wide type, set etype of the
4385         derived type properly to prevent cascaded errors.
4387 2015-01-07  Robert Dewar  <dewar@adacore.com>
4389         * prj.ads, i-cpoint.adb, freeze.adb, ghost.adb, prj-err.adb: Minor
4390         reformatting.
4392 2015-01-07  Robert Dewar  <dewar@adacore.com>
4394         * restrict.adb (Check_Restriction_No_Use_Of_Attribute):
4395         New procedure.
4396         (OK_No_Use_Of_Entity_Name): New function.
4397         (Set_Restriction_No_Use_Of_Entity): New procedure.
4398         * restrict.ads (Check_Restriction_No_Use_Of_Attribute):
4399         New procedure.
4400         (OK_No_Use_Of_Entity_Name): New function.
4401         (Set_Restriction_No_Use_Of_Entity): New procedure.
4402         * sem_ch8.adb (Find_Direct_Name): Add check for violation of
4403         No_Use_Of_Entity.
4404         * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
4405         Add processing for new restriction No_Use_Of_Entity.
4407 2015-01-07  Eric Botcazou  <ebotcazou@adacore.com>
4409         * freeze.adb (Freeze_Array_Type): Apply same handling to Is_Atomic
4410         component type as to Has_Atomic_Components type.  Remove useless
4411         test on Is_Aliased component type.
4413 2015-01-07  Hristian Kirtchev  <kirtchev@adacore.com>
4415         * alloc.ads Alphabetize several declarations. Add constants
4416         Ignored_Ghost_Units_Initial and Ignored_Ghost_Units_Increment.
4417         * atree.adb Add with and use clauses for Opt.
4418         (Allocate_Initialize_Node): Mark a node as ignored Ghost
4419         if it is created in an ignored Ghost region.
4420         (Ekind_In): New variant.
4421         (Is_Ignored_Ghost_Node): New routine.
4422         (Set_Is_Ignored_Ghost_Node): New routine.
4423         * atree.adb Aplhabetize several subprograms declarations. Flag
4424         Spare0 is now known as Is_Ignored_Ghost_Node.
4425         (Ekind_In): New variant.
4426         (Is_Ignored_Ghost_Node): New routine.
4427         (Set_Is_Ignored_Ghost_Node): New routine.
4428         * einfo.adb: Flag 279 is now known as Contains_Ignored_Ghost_Code.
4429         (Contains_Ignored_Ghost_Code): New routine.
4430         (Set_Contains_Ignored_Ghost_Code): New routine.
4431         (Set_Is_Checked_Ghost_Entity, Set_Is_Ignored_Ghost_Entity):
4432         It is now possible to set this property on an unanalyzed entity.
4433         (Write_Entity_Flags): Output the status of flag
4434         Contains_Ignored_Ghost_Code.
4435         * einfo.ads New attribute Contains_Ignored_Ghost_Code along with
4436         usage in nodes.
4437         (Contains_Ignored_Ghost_Code): New routine
4438         along with pragma Inline.
4439         (Set_Contains_Ignored_Ghost_Code): New routine along with pragma Inline.
4440         * exp_ch3.adb Add with and use clauses for Ghost.
4441         (Freeze_Type): Capture/restore the value of Ghost_Mode on entry/exit.
4442         Set the Ghost_Mode in effect.
4443         (Restore_Globals): New routine.
4444         * exp_ch7.adb (Process_Declarations): Do not process a context
4445         that invoves an ignored Ghost entity.
4446         * exp_dbug.adb (Qualify_All_Entity_Names): Skip an ignored Ghost
4447         construct that has been rewritten as a null statement.
4448         * exp_disp.adb Add with and use clauses for Ghost.
4449         (Make_DT): Capture/restore the value of Ghost_Mode on entry/exit. Set
4450         the Ghost_Mode in effect.
4451         (Restore_Globals): New routine.
4452         * exp_util.adb (Requires_Cleanup_Actions): An ignored Ghost entity
4453         does not require any clean up. Add two missing cases that deal
4454         with block statements.
4455         * freeze.adb Add with and use clauses for Ghost.
4456         (Freeze_Entity): Capture/restore the value of Ghost_Mode on entry/exit.
4457         Set the Ghost_Mode in effect.
4458         (Restore_Globals): New routine.
4459         * frontend.adb Add with and use clauses for Ghost. Remove any
4460         ignored Ghost code from all units that qualify.
4461         * ghost.adb New unit.
4462         * ghost.ads New unit.
4463         * gnat1drv.adb Add with clause for Ghost. Initialize and lock
4464         the table in package Ghost.
4465         * lib.ads: Alphabetize several subprogram declarations.
4466         * lib-xref.adb (Output_References): Do not generate reference
4467         information for ignored Ghost entities.
4468         * opt.ads Add new type Ghost_Mode_Type and new global variable
4469         Ghost_Mode.
4470         * rtsfind.adb (Load_RTU): Provide a clean environment when
4471         loading a runtime unit.
4472         * sem.adb (Analyze): Capture/restore the value of Ghost_Mode on
4473         entry/exit as the node may set a different mode.
4474         (Do_Analyze):
4475         Capture/restore the value of Ghost_Mode on entry/exit as the
4476         unit may be withed from a unit with a different Ghost mode.
4477         * sem_ch3.adb Add with and use clauses for Ghost.
4478         (Analyze_Full_Type_Declaration, Analyze_Incomplete_Type_Decl,
4479         Analyze_Number_Declaration, Analyze_Private_Extension_Declaration,
4480         Analyze_Subtype_Declaration): Set the Ghost_Mode in effect. Mark
4481         the entity as Ghost when there is a Ghost_Mode in effect.
4482         (Array_Type_Declaration): The implicit base type inherits the
4483         "ghostness" from the array type.
4484         (Derive_Subprogram): The
4485         alias inherits the "ghostness" from the parent subprogram.
4486         (Make_Implicit_Base): The implicit base type inherits the
4487         "ghostness" from the parent type.
4488         * sem_ch5.adb Add with and use clauses for Ghost.
4489         (Analyze_Assignment): Set the Ghost_Mode in effect.
4490         * sem_ch6.adb Add with and use clauses for Ghost.
4491         (Analyze_Abstract_Subprogram_Declaration, Analyze_Procedure_Call,
4492         Analyze_Subprogram_Body_Helper, Analyze_Subprogram_Declaration):
4493         Set the Ghost_Mode in effect. Mark the entity as Ghost when
4494         there is a Ghost_Mode in effect.
4495         * sem_ch7.adb Add with and use clauses for Ghost.
4496         (Analyze_Package_Body_Helper, Analyze_Package_Declaration,
4497         Analyze_Private_Type_Declaration): Set the Ghost_Mode in
4498         effect. Mark the entity as Ghost when there is a Ghost_Mode
4499         in effect.
4500         * sem_ch8.adb Add with and use clauses for Ghost.
4501         (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
4502         Analyze_Object_Renaming, Analyze_Package_Renaming,
4503         Analyze_Subprogram_Renaming): Set the Ghost_Mode in effect. Mark
4504         the entity as Ghost when there is a Ghost_Mode in effect.
4505         (Find_Type): Check the Ghost context of a type.
4506         * sem_ch11.adb Add with and use clauses for Ghost.
4507         (Analyze_Exception_Declaration): Set the Ghost_Mode in
4508         effect. Mark the entity as Ghost when there is a Ghost_Mode
4509         in effect.
4510         * sem_ch12.adb Add with and use clauses for Ghost.
4511         (Analyze_Generic_Package_Declaration,
4512         Analyze_Generic_Subprogram_Declaration): Set the Ghost_Mode in effect.
4513         Mark the entity as Ghost when there is a Ghost_Mode in effect.
4514         * sem_prag.adb Add with and use clauses for Ghost.
4515         (Analyze_Pragma): Ghost-related checks are triggered when there
4516         is a Ghost mode in effect.
4517         (Create_Abstract_State): Mark the
4518         entity as Ghost when there is a Ghost_Mode in effect.
4519         * sem_res.adb Add with and use clauses for Ghost.
4520         (Check_Ghost_Context): Removed.
4521         * sem_util.adb (Check_Ghost_Completion): Removed.
4522         (Check_Ghost_Derivation): Removed.
4523         (Incomplete_Or_Partial_View):
4524         Add a guard in case the entity has not been analyzed yet
4525         and does carry a scope.
4526         (Is_Declaration): New routine.
4527         (Is_Ghost_Entity): Removed.
4528         (Is_Ghost_Statement_Or_Pragma):
4529         Removed.
4530         (Is_Subject_To_Ghost): Removed.
4531         (Set_Is_Ghost_Entity):
4532         Removed.
4533         (Within_Ghost_Scope): Removed.
4534         * sem_util.adb (Check_Ghost_Completion): Removed.
4535         (Check_Ghost_Derivation): Removed.
4536         (Is_Declaration): New routine.
4537         (Is_Ghost_Entity): Removed.
4538         (Is_Ghost_Statement_Or_Pragma): Removed.
4539         (Is_Subject_To_Ghost): Removed.
4540         (Set_Is_Ghost_Entity): Removed.
4541         (Within_Ghost_Scope): Removed.
4542         * sinfo.ads Add a section on Ghost mode.
4543         * treepr.adb (Print_Header_Flag): New routine.
4544         (Print_Node_Header): Factor out code. Output flag
4545         Is_Ignored_Ghost_Node.
4546         * gcc-interface/Make-lang.in: Add dependency for unit Ghost.
4548 2015-01-06  Eric Botcazou  <ebotcazou@adacore.com>
4550         * freeze.adb (Freeze_Array_Type) <Complain_CS>: Remove always
4551         true test and unreachable 'else' arm.
4553 2015-01-06  Vincent Celier  <celier@adacore.com>
4555         * prj-conf.adb (Check_Target): Improve error message when
4556         there are mismatched targets between the on in the configuration
4557         project file and the specified one, either in the main project
4558         file or in the --target= switch.
4560 2015-01-06  Pascal Obry  <obry@adacore.com>
4562         * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Mode and
4563         Install_Name attribute definitions.
4565 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
4567         * freeze.adb (Wrap_Imported_Subprogram): Indicate that the
4568         generated Import pragma for the internal imported procedure does
4569         not come from an aspect, so that Is_Imported can be properly
4570         set for it.
4572 2015-01-06  Gary Dismukes  <dismukes@adacore.com>
4574         * sem_ch12.adb (Might_Inline_Subp): Record whether
4575         any subprograms in the generic package are marked with
4576         pragma Inline_Always (setting flag Has_Inline_Always).
4577         (Analyze_Package_Instantiation): Add test of Has_Inline_Always
4578         alongside existing test of Front_End_Inlining as alternative
4579         conditions for setting Inline_Now. Also add test of
4580         Has_Inline_Always along with Front_End_Inlining test as an
4581         alternative condition for setting Needs_Body to False.
4583 2015-01-06  Tristan Gingold  <gingold@adacore.com>
4585         * i-cpoint.adb (Copy_Array): Handle overlap.
4587 2015-01-06  Pascal Obry  <obry@adacore.com>
4589         * bindgen.adb: Minor style fix.
4591 2015-01-06  Robert Dewar  <dewar@adacore.com>
4593         * sem_util.ads, sem_util.adb: Minor reformatting.
4595 2015-01-06  Vincent Celier  <celier@adacore.com>
4597         * prj-conf.adb (Parse_Project_And_Apply_Config): Reset incomplete
4598         with flags before parsing the projects.
4599         * prj-err.adb (Error_Msg): Do nothing if there are incomplete withs.
4600         * prj-part.adb (Post_Parse_Context_Clause): Set Incomplete_Withs
4601         to True in the flags, when Ignore_Missing_With is True and an
4602         imported project cannot be found.
4603         * prj-proc.adb (Expression): When there are incomplete withs and
4604         a variable or attribute is not found, set the variable/attribute
4605         to unknown.
4606         * prj.ads (Processing_Flags): New flag Incomplete_Withs,
4607         defaulted to False.
4609 2015-01-06  Vasiliy Fofanov  <fofanov@adacore.com>
4611         * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-conf.adb,
4612         prj-err.adb: Add new switch --no-command-line.
4614 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
4616         * sem_ch12.adb: Sloc of wrapper is that of instantiation.
4618 2015-01-06  Robert Dewar  <dewar@adacore.com>
4620         * sem_ch11.adb: Minor reformatting.
4622 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
4624         * exp_aggr.adb (Get_Assoc_Expr): New routine internal to
4625         Build_Array_Aggr_Code, used to initialized components covered
4626         by a box association. If the component type is scalar and has
4627         a default aspect, use it to initialize such components.
4629 2015-01-06  Pascal Obry  <obry@adacore.com>
4631         * rtinit.c (__gnat_runtime_initialize): Add a parameter to
4632         control the setup of the exception handler.
4633         * initialize.c: Remove unused declaration.
4634         * bindgen.adb: Always call __gnat_runtime_initialize and pass
4635         whether the exeception handler must be set or not.
4637 2015-01-06  Thomas Quinot  <quinot@adacore.com>
4639         * freeze.adb (Set_SSO_From_Defaults): When setting scalar storage
4640         order to native from default, make sure to also adjust bit order.
4641         * exp_aggr.adb: Minor reformatting.
4643 2015-01-06  Robert Dewar  <dewar@adacore.com>
4645         * s-valllu.adb, s-valllu.ads, s-valuti.ads, s-valuns.adb, s-valuns.ads,
4646         s-valrea.adb, s-valrea.ads: Add some additional guards for
4647         Str'Last = Positive'Last.
4649 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
4651         * sem_ch12.adb, sem_ch8.adb: Ongoing work for wrappers for actual
4652         subprograms.
4654 2015-01-06  Javier Miranda  <miranda@adacore.com>
4656         * exp_disp.adb (Expand_Interface_Conversion): Reapply patch.
4658 2015-01-06  Thomas Quinot  <quinot@adacore.com>
4660         * sem_util.ads: Minor reformatting.
4661         * sem_cat.adb (In_RCI_Visible_Declarations): Change back to...
4662         (In_RCI_Declaration) Return to old name, as proper checking of
4663         entity being in the visible part depends on entity kind and must
4664         be done by the caller.
4666 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
4668         * sem_ch12.adb, sem_ch12.ads, sem_ch8.adb: Ongoing work for wrappers
4669         for operators in SPARK.
4671 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
4673         * sem_aggr.adb (Get_Value): In ASIS mode, preanalyze the
4674         expression in an others association before making copies for
4675         separate resolution and accessibility checks. This ensures that
4676         the type of the expression is available to ASIS in all cases,
4677         in particular if the expression is itself an aggregate.
4679 2015-01-06  Eric Botcazou  <ebotcazou@adacore.com>
4681         * einfo.ads (Has_Independent_Components): Document extended
4682         usage.
4683         * einfo.adb (Has_Independent_Components): Remove obsolete assertion.
4684         (Set_Has_Independent_Components): Adjust assertion.
4685         * sem_prag.adb (Analyze_Pragma): Also set Has_Independent_Components
4686         for pragma Atomic_Components.  Set Has_Independent_Components
4687         on the object instead of the type for an object declaration with
4688         pragma Independent_Components.
4690 2015-01-06  Olivier Hainque  <hainque@adacore.com>
4692         * set_targ.adb (Read_Target_Dependent_Values): Set
4693         Long_Double_Index when "long double" is read.
4694         (elaboration code): Register_Back_End_Types only when not reading from
4695         config files. Doing otherwise is pointless and error prone.
4697 2015-01-06  Robert Dewar  <dewar@adacore.com>
4699         * s-valrea.adb (Value_Real): Check for Str'Last = Positive'Last
4701 2015-01-06  Robert Dewar  <dewar@adacore.com>
4703         * a-wtgeau.adb, a-ztgeau.adb, a-tigeau.adb (String_Skip): Raise PE if
4704         Str'Last = Positive'Last.
4706 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
4708         * sem_ch6.adb (Matches_Limited_View): Handle properly the case
4709         where the non-limited type is a generic actual and appears as
4710         a subtype of the non-limited view of the other.
4711         * freeze.adb (Build_Renamed_Body): If the return type of the
4712         declaration that is being completed is a limited view and the
4713         non-limited view is available, use it in the specification of
4714         the generated body.
4716 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
4718         * sem_ch3.adb (Find_Type_Name): If there is a previous tagged
4719         incomplete view, the type of the classwide type common to both
4720         views is the type being declared.
4722 2015-01-06  Eric Botcazou  <ebotcazou@adacore.com>
4724         * einfo.ads (Is_Independent): Further document extended usage.
4726 2015-01-06  Eric Botcazou  <ebotcazou@adacore.com>
4728         * einfo.ads (Is_Independent): Document extended usage.
4729         * einfo.adb (Is_Independent): Remove obsolete assertion.
4730         (Set_Is_Independent): Likewise.
4731         * sem_prag.adb (Process_Atomic_Shared_Volatile): Rename into...
4732         (Process_Atomic_Independent_Shared_Volatile): ...this.
4733         Deal with pragma Independent here.
4734         (Analyze_Pragma): Adjust
4735         to above renaming and also invoke it for pragma Independent.
4736         Adjust comment for Independent_Components.
4738 2015-01-06  Robert Dewar  <dewar@adacore.com>
4740         * snames.ads-tmpl: Remove entries for attribute Enum_Image.
4741         * exp_attr.adb: Remove reference to Attribute_Enum_Image.
4743 2015-01-06  Robert Dewar  <dewar@adacore.com>
4745         * s-vallli.adb (Value_Long_Long_Integer): Handle case of Str'Last
4746         = Positive'Last.
4747         * s-valllu.adb (Value_Long_Long_Unsigned): Handle case of
4748         Str'Last = Positive'Last.
4750 2015-01-06  Robert Dewar  <dewar@adacore.com>
4752         * sem_prag.adb (Process_Inline): Remove redundant construct
4753         warning (-gnatw.r) for an ineffective pragma Inline.
4755 2015-01-06  Robert Dewar  <dewar@adacore.com>
4757         * s-valint.adb: Fix typo in last checkin.
4758         * s-valuns.adb (Value_Unsigned): More efficient fix for
4759         Positive'Last case.
4760         * sem_attr.adb (Analyze_Attribute): Minor reformatting
4761         (Eval_Attribute): Static ervaluation of 'Img for enumeration types.
4763 2015-01-06  Robert Dewar  <dewar@adacore.com>
4765         * s-valint.adb, s-valuns.adb (Value_Integer): Deal with case where
4766         Str'Last = Positive'Last
4768 2015-01-06  Thomas Quinot  <quinot@adacore.com>
4770         * xoscons.adb: Display exception information and return non-zero
4771         exit status in top level exception handler.
4773 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
4775         * sem_ch8.adb: Code clean up.
4777 2015-01-06  Tristan Gingold  <gingold@adacore.com>
4779         * targparm.ads: Remove obsolete comment.
4781 2015-01-06  Olivier Hainque  <hainque@adacore.com>
4783         * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Variable): When
4784         constructing a ref to variable, update inner_const_flag from the
4785         variable TREE_READONLY attribute.
4786         * gcc-interface/targtyps.c (WIDEST_HARDWARE_FP_SIZE): Remove default
4787         definition.
4788         (get_target_float_size): Remove.
4789         (get_target_double_size): Remove.
4790         (get_target_long_double_size): Remove.
4792 2015-01-06  Pascal Obry  <obry@adacore.com>
4794         * adaint.c (ProcListEvt): Set to NULL.
4795         * rtinit.c: New file.
4796         (__gnat_rt_init_count): New reference counter set to 0.
4797         (__gnat_runtime_initialize): Move code here from __gnat_initialize when
4798         this code is actually needed for the runtime initialization. This
4799         routine returns immediately if the initialization has already been done.
4800         * final.c: Revert previous change.
4801         * rtfinal.c: New file.
4802         (__gnat_runtime_finalize)[Win32]: Add finalization of the critical
4803         section and event. The default version of this routine is empty (except
4804         for the reference counting code). This routine returns immediately if
4805         some others libraries are referencing the runtime.
4806         * bindgen.adb (Gen_Adainit): Generate call to Runtime_Initialize
4807         remove circuitry to initialize the signal handler as this is
4808         now done by the runtime initialization routine.
4809         (Gen_Adafinal): Generate call to Runtime_Finalize.
4810         * gnat_ugn.texi: Update documentation about concurrency and
4811         initialization/finalization of the run-time.
4812         * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Add
4813         references to rtfinal.o and rtinit.o
4815 2015-01-06  Robert Dewar  <dewar@adacore.com>
4817         * exp_attr.adb (Expand_N_Attribute_Reference): Add dummy entry
4818         for Enum_Image.
4819         * sem_attr.adb: Implement Enum_Image attribute.
4820         * snames.ads-tmpl: Add entries for Enum_Image attribute.
4822 2015-01-06  Robert Dewar  <dewar@adacore.com>
4824         * namet.ads: Document use of Boolean2 for No_Use_Of_Entity.
4825         * restrict.ads (No_Use_Of_Entity): New table.
4826         * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
4827         Ignore No_Use_Of_Entity (will be processed in parser).
4828         * snames.ads-tmpl: Add entry for Name_No_Use_Of_Entity.
4830 2015-01-06  Vincent Celier  <celier@adacore.com>
4832         * prj-tree.adb (Imported_Or_Extended_Project_Of): Do not try
4833         to check for an extended project, if a project does not have
4834         yet a project declaration.
4836 2015-01-06  Pierre-Marie Derodat  <derodat@adacore.com>
4838         * scos.ads: Update documentation about the SCO table build
4839         process and about table records format.
4840         * par_sco.ads (SCO_Record): Rename to SCO_Record_Raw.
4841         (SCO_Record_Filtered): New procedure.
4842         (Set_SCO_Logical_Operator): New procedure.
4843         (dsco): Update documentation.
4844         * par_sco.adb: Update library-level comments.
4845         (SCO_Generation_State_Type): New type.
4846         (SCO_Generation_State): New variable.
4847         (SCO_Raw_Table): New package instanciation.
4848         (Condition_Pragma_Hash_Table): Rename to SCO_Raw_Hash_Table.
4849         ("<"): New.
4850         (Tristate): New type.
4851         (Is_Logical_Operator): Return Tristate and update documentation.
4852         (Has_Decision): Update call to Is_Logical_Operator and complete
4853         documentation.
4854         (Set_Table_Entry): Rename to Set_Raw_Table_Entry, update
4855         comment, add an assertion for state checking and change
4856         references to SCO_Table into SCO_Raw_Table.
4857         (dsco): Refactor to dump the raw and the filtered tables.
4858         (Process_Decisions.Output_Decision_Operand): Handle putative
4859         short-circuit operators.
4860         (Process_Decisions.Output_Element): Update references
4861         to Set_Table_Entry and to Condition_Pragma_Hash_Table.
4862         (Process_Decisions.Process_Decision_Operand): Update call
4863         to Is_Logical_Operator.
4864         (Process_Decisions.Process_Node): Handle putative short-circuit
4865         operators and change references to
4866         SCO_Table into SCO_Raw_Table.
4867         (SCO_Output): Add an assertion
4868         for state checking and remove code that used to stamp out SCO entries.
4869         (SCO_Pragma_Disabled): Change reference to SCO_Table
4870         into SCO_Raw_Table.
4871         (SCO_Record): Rename to SCO_Record_Raw,
4872         add an assertion for state checking and change references
4873         to SCO_Table into SCO_Raw_Table.
4874         (Set_SCO_Condition): Add an assertion for state checking, update
4875         references to Condition_Pragma_Hash_Table and change references to
4876         SCO_Table into SCO_Raw_Table.
4877         (Set_SCO_Pragma_Enabled): Add an assertion for state checking and
4878         change references to SCO_Table into SCO_Raw_Table.
4879         (Set_SCO_Logical_Operator): New procedure.
4880         (Traverse_Declarations_Or_Statements.Set_Statement_Entry): Update
4881         references to Set_Table_Entry and to Condition_Pragma_Hash_Table.
4882         (SCO_Record_Fildered): New procedure.
4883         * gnat1drv.adb (Gnat1drv): Invoke the SCO filtering pass.
4884         * lib-writ.adb (Write_ALI): Invoke the SCO filtering pass and
4885         output SCOs.
4886         * par-load.adb (Load): Update reference to SCO_Record.
4887         * par.adb (Par): Update reference to SCO_Record.
4888         * put_scos.adb (Put_SCOs): Add an assertion to check that no
4889         putative SCO condition reaches this end.
4890         * sem_ch10.adb (Analyze_Proper_Body): Update reference to SCO_Record.
4891         * sem_res.adb (Resolve_Logical_Op): Validate putative SCOs
4892         when corresponding to an "and"/"or" operator affected by the
4893         Short_Circuit_And_Or pragma.
4895 2015-01-06  Robert Dewar  <dewar@adacore.com>
4897         * sem_ch8.adb (Analyze_Use_Package): Give more specific error
4898         msg for attempted USE of generic subprogram or subprogram.
4900 2015-01-06  Robert Dewar  <dewar@adacore.com>
4902         * s-valllu.adb, a-tiinau.adb, a-timoau.adb, a-ztinau.adb, a-ztmoau.adb,
4903         s-valuns.adb, s-valrea.adb, a-wtflau.adb, a-tiflau.adb, a-ztflau.adb,
4904         a-wtinau.adb, a-wtmoau.adb: Document recognition of : in place of #.
4906 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
4908         * sem_ch13.adb (Analyze_Aspect_Specifications): For aspects
4909         that specify stream subprograms, if the prefix is a class-wide
4910         type then the generated attribute definition clause must apply
4911         to the same class-wide type.
4912         (Default_Iterator): An iterator defined by an aspect of some
4913         container type T must have a first parameter of type T, T'class,
4914         or an access to such (from code reading RM 5.5.1 (2/3)).
4916 2015-01-06  Arnaud Charlet  <charlet@adacore.com>
4918         * gnat1drv.adb: Minor: complete previous change.
4920 2015-01-06  Olivier Hainque  <hainque@adacore.com>
4922         * set_targ.ads (C_Type_For): New function. Return the name of
4923         a C type supported by the back-end and suitable as a basis to
4924         construct the standard Ada floating point type identified by
4925         the T parameter. This is used as a common ground to feed both
4926         ttypes values and the GNAT tree nodes for the standard floating
4927         point types.
4928         * set_targ.adb (Long_Double_Index): The index at which "long
4929         double" gets registered in the FPT_Mode_Table. This is useful to
4930         know whether we have a "long double" available at all and get at
4931         it's characteristics without having to search the FPT_Mode_Table
4932         when we need to decide which C type should be used as the
4933         basis for Long_Long_Float in Ada.
4934         (Register_Float_Type): Fill Long_Double_Index.
4935         (FPT_Mode_Index_For): New function. Return the index in
4936         FPT_Mode_Table that designates the entry corresponding to the
4937         provided C type name.
4938         (FPT_Mode_Index_For): New function. Return the index in
4939         FPT_Mode_Table that designates the entry for a back-end type
4940         suitable as a basis to construct the standard Ada floating point
4941         type identified by the input T parameter.
4942         (elaboration code): Register_Back_End_Types unconditionally,
4943         so C_Type_For can operate regardless of -gnateT. Do it
4944         early so we can query it for the floating point sizes, via
4945         FPT_Mode_Index_For. Initialize Float_Size, Double_Size and
4946         Long_Double_Size from the FPT_Mode_Table, as cstand will do.
4947         * cstand.adb (Create_Float_Types): Use C_Type_For to determine
4948         which C type should be used as the basis for the construction
4949         of the Standard Ada floating point types.
4950         * get_targ.ads (Get_Float_Size, Get_Double_Size,
4951         Get_Long_Double_Size): Remove.
4952         * get_targ.adb: Likewise.
4954 2015-01-06  Thomas Quinot  <quinot@adacore.com>
4956         * sem_cat.adb (In_RCI_Declaration): Remove unnecessary
4957         parameter and rename to...
4958         (In_RCI_Visible_Declarations): Fix handling of private part of nested
4959         package.
4960         (Validate_RCI_Subprogram_Declaration): Reject illegal function
4961         returning anonymous access in RCI unit.
4963 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
4965         * sem_ch6.adb (New_Overloaded_Entity): In GNATprove mode, a
4966         function wrapper may be a homonym of another local declaration.
4967         * sem_ch8.adb (Analyze_Subprogram_Renaming): In GNATprove mode,
4968         build function and operator wrappers after the actual subprogram
4969         has been resolved, and replace the standard renaming declaration
4970         with the declaration of wrapper.
4971         * sem_ch12.ads (Build_Function_Wrapper, Build_Operator_Wraooer):
4972         make public for use elsewhere.
4973         * sem_ch12.adb (Build_Function_Wrapper, Build_Operator_Wraooer):
4974         rewrite, now that actual is fully resolved when wrapper is
4975         constructed.
4977 2015-01-06  Javier Miranda  <miranda@adacore.com>
4979         * exp_disp.adb: Revert previous change.
4981 2015-01-06  Robert Dewar  <dewar@adacore.com>
4983         * exp_util.adb: Change name Name_Table_Boolean to
4984         Name_Table_Boolean1.
4985         * namet.adb: Change name Name_Table_Boolean to Name_Table_Boolean1
4986         Introduce Name_Table_Boolean2/3.
4987         * namet.ads: Change name Name_Table_Boolean to Name_Table_Boolean1
4988         Introduce Name_Table_Boolean2/3.
4989         * par-ch13.adb: Change name Name_Table_Boolean to
4990         Name_Table_Boolean1.
4992 2015-01-06  Bob Duff  <duff@adacore.com>
4994         * gnat_rm.texi: Improve documentation regarding No_Task_Termination.
4996 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
4998         * sem_aggr.adb (Resolve_Record_Aggregte, Get_Value): For an
4999         others choice that covers multiple components, analyze each
5000         copy with the type of the component even in compile-only mode,
5001         to detect potential accessibility errors.
5003 2015-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
5005         * sem_res.adb (Is_Assignment_Or_Object_Expression): New routine.
5006         (Resolve_Actuals): An effectively volatile out
5007         parameter cannot act as an in or in out actual in a call.
5008         (Resolve_Entity_Name): An effectively volatile out parameter
5009         cannot be read.
5011 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
5013         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If the body is
5014         the expansion of an expression function it may be pre-analyzed
5015         if a 'access attribute is applied to the function, in which case
5016         last_entity may have been assigned already.
5018 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
5020         * sem_ch4.adb (Analyze_One_Call): If formal has an incomplete
5021         type and actual has the corresponding full view, there is no
5022         error, but a case of use of incomplete type in a predicate or
5023         invariant expression.
5025 2015-01-06  Vincent Celier  <celier@adacore.com>
5027         * makeutl.adb (Insert_No_Roots): Make sure that the same source
5028         in two different project tree is checked in both trees, if they
5029         are sources of two different projects, extended or not.
5031 2015-01-06  Arnaud Charlet  <charlet@adacore.com>
5033         * gnat1drv.adb: Minor code clean up.
5034         (Adjust_Global_Switches): Ignore gnatprove_mode in codepeer_mode.
5036 2015-01-06  Bob Duff  <duff@adacore.com>
5038         * osint.adb (Read_Source_File): Don't print out
5039         file name unless T = Source.
5041 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
5043         * sem_util.adb (Is_Variable, Is_OK_Variable_For_Out_Formal):
5044         recognize improper uses of constant_reference types as actuals
5045         for in-out parameters.
5046         (Check_Function_Call): Do not collect identifiers if function
5047         name is missing because of previous error.
5049 2015-01-06  Robert Dewar  <dewar@adacore.com>
5051         * ali-util.adb, sem_prag.adb, rtsfind.adb, sem_util.adb, sem_res.adb,
5052         ali.adb, binde.adb, namet.adb, namet.ads, gnatls.adb, bcheck.adb:
5053         Minor change of name Name_Table_Info => Name_Table_Int.
5055 2015-01-06  Robert Dewar  <dewar@adacore.com>
5057         * exp_strm.adb (Build_Elementary_Input_Call): Clarify comments
5058         in previous checkin.
5059         * freeze.adb (Freeze_Fixed_Point_Type): Add warning for shaving
5060         of bounds.
5061         * sem_prag.adb, sem_ch10.adb, sem_ch6.adb: Minor reformatting.
5063 2015-01-06  Vincent Celier  <celier@adacore.com>
5065         * a-strsup.adb (Times (Natural;String;Positive)): Raise
5066         Length_Error, not Index_Error, when the result is too long.
5068 2015-01-06  Thomas Quinot  <quinot@adacore.com>
5070         * a-direct.adb (Create_Path): Minor error handling and
5071         performance improvement.
5073 2015-01-06  Robert Dewar  <dewar@adacore.com>
5075         * checks.ads, sem_ch12.adb: Minor reformatting.
5076         * exp_ch4.adb (Expand_N_Op_Divide): Generate explicit divide by
5077         zero check for fixed-point case if Backend_Divide_Checks_On_Target
5078         is False.
5080 2015-01-06  Robert Dewar  <dewar@adacore.com>
5082         * sem_prag.adb (Analyze_Pragma, case No_Elaboration_Code_All):
5083         Do not set restriction No_Elaboration_Code unless the pragma
5084         appears in the main unit).
5086 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
5088         * sem_ch10.adb (Is_Regular_With_Clause): Add guard to verify
5089         that with clause has already been analyzed before checking kind
5090         of with_clause.
5092 2015-01-06  Robert Dewar  <dewar@adacore.com>
5094         * exp_strm.adb (Build_Elementary_Input_Call): Return base type
5095         (as required by RM).
5097 2015-01-06  Arnaud Charlet  <charlet@adacore.com>
5099         * a-reatim.adb ("/"): Add explicit pragma Unsuppress (Division_Check).
5101 2015-01-06  Robert Dewar  <dewar@adacore.com>
5103         * sem_prag.adb (Process_Suppress_Unsuppress): Add extra warning
5104         for ignoring pragma Suppress (Elaboration_Check) in SPARK mode.
5106 2015-01-06  Javier Miranda  <miranda@adacore.com>
5108         * exp_disp.adb (Expand_Interface_Conversion): No displacement
5109         of the pointer to the object needed when the type of the operand
5110         is not an interface type and the interface is one of its parent
5111         types (since they share the primary dispatch table).
5113 2015-01-06  Vincent Celier  <celier@adacore.com>
5115         * prj-env.adb: Minor comment update.
5117 2015-01-06  Javier Miranda  <miranda@adacore.com>
5119         * sem_res.adb (Valid_Conversion): Restrict the checks on anonymous
5120         access types whose target type is an interface type to operands
5121         that are access types; required to report an error when the
5122         operand is not an access type.
5124 2015-01-06  Bob Duff  <duff@adacore.com>
5126         * a-cfinve.adb (Copy): Set the discriminant to the Length when
5127         Capacity = 0.
5128         * a-cofove.ads (Capacity): Add a postcondition.
5129         * a-cfinve.ads (Capacity): Add a postcondition.
5130         (Reserve_Capacity): Correct the postcondition in the case where
5131         Capacity = 0; that means "Capacity => Length (Container)".
5132         * a-cofove.adb (Elems[c]): Add a comment
5133         explaining the dangers and how to avoid them.
5135 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
5137         * sem_ch12.adb: Code clean up.
5139 2015-01-06  Arnaud Charlet  <charlet@adacore.com>
5141         * gnatvsn.ads: Bump copyright year.
5143 2015-01-06  Robert Dewar  <dewar@adacore.com>
5145         * s-taskin.ads, s-traces.ads: Minor reformatting.
5146         * exp_util.adb: Minor typo fix.
5148 2015-01-06  Vincent Celier  <celier@adacore.com>
5150         * gnatls.adb (Search_RTS): Invoke Initialize_Default_Project_Path
5151         with the runtime name.
5152         * prj-env.adb (Initialize_Default_Project_Path): When both
5153         Target_Name and Runtime_Name are not empty string, add to the
5154         project path the two directories .../lib/gnat and .../share/gpr
5155         related to the runtime.
5156         * prj-env.ads (Initialize_Default_Project_Path): New String
5157         parameter Runtime_Name, defaulted to the empty string.
5159 2015-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
5161         * frontend.adb: Guard against the case where a configuration
5162         pragma may be split into multiple pragmas and the original
5163         rewritten as a null statement.
5164         * sem_prag.adb (Analyze_Pragma): Insert a brand new Check_Policy
5165         pragma using Insert_Before rather than Insert_Action. This
5166         takes care of the configuration pragma case where Insert_Action
5167         would fail.
5169 2015-01-06  Bob Duff  <duff@adacore.com>
5171         * a-coboho.ads (Element_Access): Add "pragma
5172         No_Strict_Aliasing (Element_Access);". This is needed because
5173         we are unchecked-converting from Address to Element_Access.
5174         * a-cofove.ads, a-cofove.adb (Elems,Elemsc): Fix bounds of the
5175         result to be 1.
5177 2015-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
5179         * sem_res.adb (Resolve_Actuals): Remove the
5180         restriction which prohibits volatile actual parameters with
5181         enabled external propery Async_Writers to act appear in procedure
5182         calls where the corresponding formal is of mode OUT.
5184 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
5186         * gnat_ugn.texi: Bump @copying's copyright year.
5188 2015-01-05  Eric Botcazou  <ebotcazou@adacore.com>
5190         PR ada/64492
5191         * gcc-interface/Makefile.in (../stamp-tools): Reinstate dropped code.
5193 2015-01-04  Uros Bizjak  <ubizjak@gmail.com>
5195         * gcc-interface/misc.c (internal_error_function): Use xasprintf instead
5196         of unchecked asprintf.
5199 Copyright (C) 2015 Free Software Foundation, Inc.
5201 Copying and distribution of this file, with or without modification,
5202 are permitted in any medium without royalty provided the copyright
5203 notice and this notice are preserved.