2015-09-28 Paul Thomas <pault@gcc.gnu.org>
[official-gcc.git] / gcc / ada / ChangeLog
blobefb2d3a93b23c5b0dfe85859b0b1e42efeabc10a
1 2015-09-28  Tom de Vries  <tom@codesourcery.com>
3         * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_6): Define
5 2015-09-17  Eric Botcazou  <ebotcazou@adacore.com>
7         * gcc-interface/trans.c (emit_check): Do not touch TREE_SIDE_EFFECTS.
9 2015-09-14  Pierre-Marie de Rodat  <derodat@adacore.com>
11         * gcc-interface/misc.c (gnat_post_options): Issue a warning if
12         generating STABS debugging information when not the default.
14 2015-09-14  Eric Botcazou  <ebotcazou@adacore.com>
16         * gcc-interface/gigi.h (ref_filename): Delete.
17         (Sloc_to_locus): Add clean_column parameter defaulting to false.
18         (build_call_raise): Adjust comment.
19         (build_call_raise_range): Move around.
20         * gcc-interface/trans.c (ref_filename): Delete.
21         (gigi): Fix formatting.
22         (block_end_locus_sink): Delete.
23         (Sloc_to_locus1): Tidy up and reformat.  Rename into...
24         (Sloc_to_locus): ...this.  Add default for clean_colmun parameter.
25         (set_expr_location_from_node1): Rename into...
26         (set_expr_location_from_node): ...this.
27         (set_end_locus_from_node): Move around.  Adjust for renaming.
28         (Handled_Sequence_Of_Statements_to_gnu): Likewise.
29         (add_cleanup): Likewise.
30         * gcc-interface/utils2.c (expand_sloc): New static function.
31         (build_call_raise): Call it.
32         (build_call_raise_column): Likewise.
33         (build_call_raise_range): Likewise.  Move around.
35 2015-09-14  Eric Botcazou  <ebotcazou@adacore.com>
37         * gcc-interface/utils2.c (gnat_rewrite_reference) <COMPOUND_EXPR>: Add
38         another acceptable pattern for the RHS.
40 2015-07-24  Micahel Darling  <darlingm@gmail.com>
42         PR other/66259
43         * prj-nmsc.adb: Reflects renaming of configure.in to configure.ac
44         * gcc-interface/Makefile.in: Likewise
46 2015-07-12  Aldy Hernandez  <aldyh@redhat.com>
48         * gcc-interface/utils.c: Fix double word typos.
49         * gnat_ugn.texi: Same.
50         * init.c: Same.
51         * par.adb: Same.
52         * projects.texi: Same.
53         * sem_ch4.adb: Same.
54         * sem_ch6.adb: Same.
55         * sem_dim.adb: Same.
56         * sem_eval.adb: Same.
57         * sem_prag.adb: Same.
58         * sem_warn.adb: Same.
60 2015-07-07  Andrew MacLeod  <amacleod@redhat.com>
62         * gcc-interface/cuintp.c: Adjust includes.
63         * gcc-interface/decl.c: Likewise.
64         * gcc-interface/misc.c: Likewise.
65         * gcc-interface/targtyps.c: Likewise.
66         * gcc-interface/trans.c: Likewise.
67         * gcc-interface/utils.c: Likewise.
68         * gcc-interface/utils2.c: Likewise.
70 2015-07-06  John Marino  <gnugcc@marino.st>
72         * s-oscons-tmplt.c: Add support for DragonFly alongside FreeBSD.
74 2015-06-29  Eric Botcazou  <ebotcazou@adacore.com>
76         PR ada/63310
77         * gcc-interface/utils.c (gnat_write_global_declarations): Always
78         build the dummy global variable if code was generated.
80 2015-06-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
82         PR fortran/66605
83         * gcc-interface/misc.c (gnat_post_options): No need to disable
84         warn_unused_parameter anymore.
86 2015-06-26  Eric Botcazou  <ebotcazou@adacore.com>
88         * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): When
89         not optimizing the CFG, clear the DECL_DECLARED_INLINE_P flag on the
90         at-end procedures.
92 2015-06-26  Eric Botcazou  <ebotcazou@adacore.com>
94         * gcc-interface/gigi.h (note_types_used_by_globals): Delete.
95         (gnat_write_global_declarations): New prototype.
96         * gcc-interface/utils.c (type_decls): Rename back to...
97         (global_decls): ...this.
98         (gnat_pushdecls): Revert previous change.
99         (create_var_decl): Do not output global variables.
100         (note_types_used_by_globals): Rename back to...
101         (gnat_write_global_declarations): ...this.  Output variables on the
102         global_decls vector.
103         * gcc-interface/misc.c (gnat_parse_file): Adjust to above renaming.
105 2015-06-26  Eric Botcazou  <ebotcazou@adacore.com>
107         * gcc-interface/gigi.h (create_var_decl_1): Rename into...
108         (create_var_decl): ...this.  Add default value for last parameter.
109         (create_type_stub_decl): Adjust.
110         (create_type_decl): Likewise.
111         (create_field_decl): Likewise.
112         (create_param_decl): Likewise.
113         (create_label_decl): Likewise.
114         (create_subprog_decl): Likewise.
115         * gcc-interface/utils.c (create_var_decl_1): Rename into...
116         (create_var_decl): ...this.  Rename var_name into name and var_init
117         into init, move const_decl_allowed_p last and adjust accordingly.
118         (create_type_stub_decl): Rename type_name into name and adjust.
119         (create_type_decl): Likewise.
120         (create_field_decl): Likewise for field_name and field_type.
121         (create_param_decl): Likewise for param_name and param_type.
122         (create_label_decl): Likewise for label_name.
123         (create_subprog_decl): Likewise for subprog_name and subprog_type.
124         * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust couple of calls
125         to create_var_decl_1.
127 2015-06-26  Eric Botcazou  <ebotcazou@adacore.com>
129         * gcc-interface/trans.c (loop_info_d): Add low_bound, high_bound,
130         artificial, has_checks and warned_aggressive_loop_optimizations.
131         (gigi): Set warn_aggressive_loop_optimizations to 0.
132         (inside_loop_p): New inline predicate.
133         (push_range_check_info): Rename into...
134         (find_loop_for): ...this and do not push range_check_info_d object.
135         (Loop_Statement_to_gnu): Set artificial, low_bound and high_bound
136         fields of gnu_loop_info.  Adjust detection of checks enabled by
137         -funswitch-loops and adds one for -faggressive-loop-optimizations.
138         (gnat_to_gnu) <N_Indexed_Component>: If aggressive loop optimizations
139         are enabled, warn for loops overrunning an array of size 1 not at the
140         end of a record.
142 2015-06-25  Andrew MacLeod  <amacleod@redhat.com>
144         * gcc-interface/trans.c: Remove ipa-ref.h and plugin-api.h from include
145         list.
146         * gcc-interface/utils.c: Likewise.
148 2015-06-25  Richard Sandiford  <richard.sandiford@arm.com>
150         * gcc-interface/decl.c (value_annotation_hasher): Inherit from
151         ggc_cache_ptr_hash rather than ggc_cache_hasher.
152         * gcc-interface/utils.c (pad_type_hasher): Likewise.
154 2015-06-25  Richard Sandiford  <richard.sandiford@arm.com>
156         * gcc-interface/decl.c (value_annotation_hasher::handle_cache_entry):
157         Delete.
158         (value_annotation_hasher::keep_cache_entry): New function.
159         * gcc-interface/utils.c (pad_type_hasher::handle_cache_entry):
160         Delete.
161         (pad_type_hasher::keep_cache_entry): New function.
163 2015-06-25  Andrew MacLeod  <amacleod@redhat.com>
165         * gcc-interface/misc.c: Include calls.h not function.h.
167 2015-06-19  Eric Botcazou  <ebotcazou@adacore.com>
169         * gcc-interface/gigi.h (record_builtin_type): Adjust comment.
170         (tree create_type_decl): Likewise.
171         (create_var_decl_1): Add artificial_p and debug_info_p parameters.
172         (create_var_decl): Likewise.
173         (create_true_var_decl): Delete.
174         (create_subprog_decl): Add debug_info_p parameter.
175         * gcc-interface/decl.c (gnat_to_gnu_entity): Add artificial_p local
176         variable and use it throughout.  Remove DECL_ARTIFICIAL settings.
177         <E_Variable>: Adjust calls to create_var_decl and create_var_decl_1.
178         Remove DECL_IGNORED_P settings.
179         <E_Enumeration_Type>: Likewise.
180         <E_Record_Type>: Likewise.
181         <E_Subprogram_Type>: Likewise.  Remove artificial_flag local variable.
182         Adjust call to create_subprog_decl.
183         (get_minimal_subprog_decl): Likewise.
184         (elaborate_expression_1): Adjust call to create_var_decl.
185         * gcc-interface/trans.c (gigi): Adjust calls to create_var_decl and
186         create_subprog_decl.  Remove DECL_ARTIFICIAL & DECL_IGNORED_P settings.
187         * gcc-interface/utils.c (maybe_pad_type): Likewise.
188         (record_builtin_type): Adjust comment.
189         (create_type_stub_decl): Remove obsolete comment.
190         (create_var_decl_1): Add artificial_p and debug_info_p parameters.
191         Set DECL_ARTIFICIAL and DECL_IGNORED_P accordingly.
192         (create_subprog_decl): Add debug_info_p parameter.  Set DECL_IGNORED_P
193         accordingly.
195 2015-06-19  Eric Botcazou  <ebotcazou@adacore.com>
197         * gcc-interface/misc.c (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): Define.
199 2015-06-19  Eric Botcazou  <ebotcazou@adacore.com>
201         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Make sure
202         the size of a padding type built around the return type is positive.
203         * gcc-interface/trans.c (gnat_to_gnu) <N_Simple_Return_Statement>:
204         Use INIT_EXPR instead of MODIFY_EXPR to assign to the return object.
206 2015-06-17  Andrew MacLeod  <amacleod@redhat.com>
208         * gcc-interface/cuintp.c: Do not include input.h, line-map.h or is-a.h.
209         * gcc-interface/decl.c: Likewise.
210         * gcc-interface/misc.c: Likewise.
211         * gcc-interface/targtyps.c: Likewise.
212         * gcc-interface/trans.c: Likewise.
213         * gcc-interface/utils.c: Likewise.
214         * gcc-interface/utils2.c: Likewise.
216 2015-06-11  Pierre-Marie de Rodat  <derodat@adacore.com>
218         * gcc-interface/utils.c (get_global_context): Register the main
219         translation unit through the new debug hook.
221 2015-06-09  Eric Botcazou  <ebotcazou@adacore.com>
223         * gcc-interface/misc.c: Remove duplicate include directives.
224         * gcc-interface/trans.c: Likewise.
225         * gcc-interface/utils.c: Likewise.
227 2015-06-08  Andrew MacLeod  <amacleod@redhat.com>
229         * gcc-interface/cuintp.c : Adjust include files.
230         * gcc-interface/decl.c : Likewise.
231         * gcc-interface/misc.c : Likewise.
232         * gcc-interface/targtyps.c : Likewise.
233         * gcc-interface/trans.c : Likewise.
234         * gcc-interface/utils.c : Likewise.
235         * gcc-interface/utils2.c : Likewise.
236         
237 2015-06-08  John Marino  <gnugcc@marino.st>
239         * a-intnam-dragonfly.ads: New.
240         * s-osinte-dragonfly.adb: Likewise.
241         * s-osinte-dragonfly.ads: Likewise.
242         * system-dragonfly-x86_64.ads: Likewise.
243         * adaint.c: Add BSD macros.
244         * cstreams.c: Likewise.
245         * gsocket.h: Likewise.
246         * link.c: Likewise.
247         * socket.c: Likewise.
248         * env.c: Add __DragonFly__, remove __FreeBSD__ macro.
249         * init.c: Add __DragonFly__, change __gnat_install_handler
250         prototype from empty to void.
251         * initialize.c: Add __DragonFly__.
252         * sysdep.c: Likewise.
253         * s-osinte-freebsd.adb: Use __get_errno instead of __error.
254         * tracebak.c: Set unwinder for i386 BSD.
255         * gcc-interface/Makefile.in: Add x86_64 DragonFly, tweak
256         x86_64 FreeBSD and x86 FreeBSD.
258 2015-06-06  Eric Botcazou  <ebotcazou@adacore.com>
260         * gcc-interface/utils.c (note_types_used_by_globals): Tweak comment.
261         * gcc-interface/decl.c (gnat_to_gnu_entity): Likewise.
263 2015-06-05  Aldy Hernandez  <aldyh@redhat.com>
265         * gcc-interface/gigi.h (note_types_used_by_globals): Rename from
266         gnat_write_global_declarations.
267         * gcc-interface/misc.c (gnat_parse_file): Call
268         note_types_used_by_globals.
269         Remove LANG_HOOKS_WRITE_GLOBALS.
270         * gcc-interface/utils.c: Rename global_decls to type_decls.
271         (gnat_write_global_declarations): Rename
272         to note_types_used_by_globals.
273         Remove call to finalize_compilation_unit.
274         Remove call to debug_hooks->global_decl for globals.
275         (gnat_pushdecls): Only insert into type_decls if TYPE_DECL.
277 2015-06-04  Andrew MacLeod  <amacleod@redhat.com>
279         * gcc-interface/cuintp.c: Adjust includes for restructured coretypes.h.
280         * gcc-interface/decl.c: Likewise.
281         * gcc-interface/misc.c: Likewise.
282         * gcc-interface/targtyps.c: Likewise.
283         * gcc-interface/trans.c: Likewise.
284         * gcc-interface/utils.c: Likewise.
285         * gcc-interface/utils2.c: Likewise.
287 2015-06-04  Pierre-Marie de Rodat  <derodat@adacore.com>
289         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: If
290         processing a definition, create definitions for padding types
291         around return types.
293 2015-06-03  Eric Botcazou  <ebotcazou@adacore.com>
295         * gcc-interface/utils.c (copy_type): Also set TYPE_CANONICAL.
297 2015-06-03  Eric Botcazou  <ebotcazou@adacore.com>
299         * gcc-interface/trans.c (gnat_to_gnu) <N_Simple_Return_Statement>: Fix
300         typo in latest change.
302 2015-06-01  Eric Botcazou  <ebotcazou@adacore.com>
304         * gcc-interface/Makefile.in: Fix ARM/Darwin configuration.
306 2015-06-01  Pierre-Marie de Rodat  <derodat@adacore.com>
308         * gcc-interface/utils.c (scale_by_factor_of): When handling a function
309         call expression, process the corresponding function body.  Also handle
310         potential addends.
312 2015-06-01  Pierre-Marie de Rodat  <derodat@adacore.com>
314         * gcc-interface/decl.c (gnat_to_gnu_entity): Replace pointer types with
315         references ones for functions that return references.
317 2015-06-01  Eric Botcazou  <ebotcazou@adacore.com>
319         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: For a
320         definition of a type coming from a limited_with, get to the full view
321         if it is not in the main code unit.
323 2015-06-01  Eric Botcazou  <ebotcazou@adacore.com>
325         * gcc-interface/utils.c (create_var_decl_1): If an assembler name is
326         specified, let the target mangle it before settting.
327         (create_subprog_decl): Likewise and move this treatment last.
329 2015-06-01  Eric Botcazou  <ebotcazou@adacore.com>
331         * gcc-interface/lang-specs.h (TARGET_VXWORKS_RTP): Move substitution to
332         before first -gnatez switch.  Simplify and add trailing space.
334 2015-06-01  Eric Botcazou  <ebotcazou@adacore.com>
336         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: If the
337         record has a parent field and a representation clause, make sure that
338         it is properly aligned.
340 2015-06-01  Eric Botcazou  <ebotcazou@adacore.com>
342         * gcc-interface/trans.c (lvalue_required_p) <N_Indexed_Component>: Deal
343         with character and enumeration literals as index values.
345 2015-06-01  Eric Botcazou  <ebotcazou@adacore.com>
347         * gcc-interface/gigi.h (build_simple_component_ref): Declare.
348         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Deal with
349         address clause on aliased object with unconstrained nominal subtype.
350         Mark the aligning variable as artificial, do not convert the address
351         expression immediately but mark it as constant instead.
352         * gcc-interface/utils.c (convert): If the target type contains a
353         template, be prepared for an empty array.
354         (maybe_unconstrained_array): Likewise.
355         * gcc-interface/utils2.c (known_alignment) <POINTER_PLUS_EXPR>: Deal
356         with the pattern built for aligning types.
357         <INTEGER_CST>: Do not cap the value at BIGGEST_ALIGNMENT.
358         (build_simple_component_ref): Make public.
359         If the base object is a constructor that contains a template, fold the
360         result field by field.
362 2015-05-31  Eric Botcazou  <ebotcazou@adacore.com>
364         * s-oscons-tmplt.c: Add explicit tests for Android alongside Linux.
366 2015-05-30  Eric Botcazou  <ebotcazou@adacore.com>
368         * adaint.c: Test for __linux__ instead of linux and __sun__ instead
369         of sun.  Add missing leading underscore to AIX.  Remove #elif 0.
370         * adaint.h: Likewise.
371         * cio.c: Likewise.
372         * cstreams.c: Likewise.
373         * env.c: Likewise.
374         * gsocket.h: Likewise.
375         * init.c: Likewise.  Test for __i386__ instead of i386.
376         * link.c: Likewise.
377         * s-oscons-tmplt.c: Likewise.
378         * sysdep.c: Likewise.
379         * terminals.c: Likewise.  Use BSD symbol instead of FREEBSD.
380         * tracebak.c: Likewise.  Test for __sparc__ instead of sparc.
382 2015-05-28  Eric Botcazou  <ebotcazou@adacore.com>
384         * gcc-interface/utils.c (max_size) <tcc_binary>: Add special code to
385         deal with the subtraction of a "negative" value in an unsigned type.
387 2015-05-28  Eric Botcazou  <ebotcazou@adacore.com>
389         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Do
390         not error out on a return type which has a size that overflows if the
391         return is done by invisible reference.
393 2015-05-28  Eric Botcazou  <ebotcazou@adacore.com>
395         * gcc-interface/utils.c (gnat_pushdecl): Reunify the handling of array
396         and pointer types wrt DECL_ORIGINAL_TYPE and adjust left and right.
398 2015-05-28  Eric Botcazou  <ebotcazou@adacore.com>
400         * gcc-interface/gigi.h (gnat_stabilize_reference): Adjust.
401         (rewrite_fn): Remove third parameter.
402         (type_is_padding_self_referential): New inline predicate.
403         (return_type_with_variable_size_p): Likewise.
404         * gcc-interface/decl.c (allocatable_size_p): More around.
405         (cannot_be_superflat_p): Rename into...
406         (cannot_be_superflat ): ...this.
407         (initial_value_needs_conversion): New predicate.
408         (gnat_to_gnu_entity): Invoke type_is_padding_self_referential,
409         initial_value_needs_conversion and adjust to above renaming.
410         For a renaming, force the materialization if the inner expression
411         is compound.  Adjust calls to elaborate_reference and build a
412         compound expression if needed.
413         (struct er_dat): Add N field.
414         (elaborate_reference_1): Remove N parameter and adjust.
415         (elaborate_reference): Add INIT parameter and pass it in the call to
416         gnat_rewrite_reference.  Adjust initial expression.
417         * gcc-interface/trans.c (Call_to_gnu): Treat renamings the same way as
418         regular object declarations when it comes to creating a temporary.
419         Adjust call to gnat_stabilize_reference and build a compound expression
420         if needed.  Invoke return_type_with_variable_size_p.
421         (gnat_to_gnu): Invoke type_is_padding_self_referential.  In case #4,
422         return a call to a function unmodified if it returns with variable size
423         and is also the initial expression in an object declaration.
424         * gcc-interface/utils2.c (build_binary_op) <INIT_EXPR>: Use the RHS'
425         type if it is a call to a function that returns with variable size.
426         (build_unary_op): Invoke type_is_padding_self_referential.
427         (gnat_stabilize_reference_1): Remove N parameter and adjust.
428         (gnat_stabilize_reference): Add INIT parameter and pass it in the call
429         to gnat_rewrite_reference.
430         (gnat_rewrite_reference):  Remove N, add INIT parameter and adjust.
431         <COMPOUND_EXPR>: New case.
433 2015-05-28  Ed Schonberg  <schonberg@adacore.com>
435         * sem_ch3.adb (Is_Visible_Component): Component is visible
436         in a derived type if inherited through an ancestor that has a
437         partial view of the original type holding the component, if the
438         full view of that original type is in scope.
439         * sem_util.ads (Get_Body_From_Stub): Works for all kinds of stubs.
441 2015-05-28  Bob Duff  <duff@adacore.com>
443         * sem_util.adb (Requires_Transient_Scope): For definite untagged
444         subtypes, we should never have to use the secondary stack. This moves
445         toward that goal. But there are still cases that don't work.
446         Here, we move the check for Is_Definite first, but add a
447         special-purpose check for Has_Discrim_Dep_Array.
449 2015-05-28  Bob Duff  <duff@adacore.com>
451         * sem_util.adb (Requires_Transient_Scope): Avoid returning
452         function results on the secondary stack in so many cases.
454 2015-05-28  Ed Schonberg  <schonberg@adacore.com>
456         * sem_util.adb (Wrong_Type): In any instance, do not emit error
457         if type of expression is the partial view of the expected type.
459 2015-05-28  Ed Schonberg  <schonberg@adacore.com>
461         * sem_res.adb (Resolve_Actuals): a)  The replacement of formal
462         names in named associations only needs to be done within an
463         instance, on a call to a primitive of a formal derived type,
464         where the actual subprogram may have different formal names than
465         those of the primitive operation of the formal type.
466         b) Defaulted parameters must be taken into account when obtaining
467         the names of the formals of the actual subprogram being called.
469 2015-05-28  Robert Dewar  <dewar@adacore.com>
471         * sem_ch13.adb, sem_disp.ads: Minor reformatting.
473 2015-05-28  Ed Schonberg  <schonberg@adacore.com>
475         * sem_util.adb (Set_Debug_Info_Needed): For a private type
476         whose full view is itself a derived private type, set flag on
477         underlying full view as well, for proper gdb display.
479 2015-05-28  Bob Duff  <duff@adacore.com>
481         * exp_tss.ads: Minor comment fix.
482         * exp_ch3.adb (Build_Array_Init_Proc, Build_Record_Init_Proc):
483         Inline init_procs when the type has controlled parts. Remove
484         obsolete comments about those init_procs -- init_procs for
485         such types are no longer complex. A typical init_proc just
486         initializes the 'Tag field, and calls the parent init_proc
487         (e.g. for Limited_Controlled), which calls the grandparent
488         (for Root_Controlled), which does nothing. This all boils down
489         to one instruction when inlined.
490         * exp_ch7.adb (Create_Finalizer): Inline the finalizer.
492 2015-05-28  Ed Schonberg  <schonberg@adacore.com>
494         * sem_ch4.adb (Analyze_Selected_Component): If the type to use
495         is a derived type and is a generic actual, the selected component
496         appears within an instance body, and the check over the type
497         has failed, examine ancestor types for the desired component.
498         (Find_Component_In_Instance): If record type is a derived type,
499         examine all ancestors in order to locate desired component.
501 2015-05-27  H.J. Lu  <hongjiu.lu@intel.com>
503         * gcc-interface/Makefile.in (TOOLS_LIBS): Add @NO_PIE_FLAG@.
505 2015-05-27  Eric Botcazou  <ebotcazou@adacore.com>
507         * gcc-interface/trans.c (elaborate_all_entities): Do not elaborate an
508         incomplete type coming from a limited_with and whose non-limited view
509         comes from the main unit.
511 2015-05-27  Eric Botcazou  <ebotcazou@adacore.com>
513         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Move down
514         code applying atomic checks to the object.
516 2015-05-27  Robert Dewar  <dewar@adacore.com>
518         * sem_aux.adb: Minor rewording.
520 2015-05-27  Bob Duff  <duff@adacore.com>
522         * exp_prag.adb (Expand_Pragma_Abort_Defer): Make
523         pragma Abort_Defer do nothing if Abort_Allowed is False.
525 2015-05-27  Arnaud Charlet  <charlet@adacore.com>
527         * exp_ch9.adb, sem_util.adb, sem_util.ads, s-stposu.adb, s-spsufi.ads,
528         sem_elab.ads, g-comlin.ads, errout.ads, exp_ch6.adb, sem_ch4.adb,
529         opt.ads, s-bignum.adb, output.ads, sem_ch13.adb, erroutc.ads,
530         sem_disp.ads, exp_ch3.adb: Minor fixes of duplicate words in comments.
532 2015-05-27  Doug Rupp  <rupp@adacore.com>
534         * adaint.c (__gnat_tmp_name) [vxworks]: Robustify and use for rtp as
535         well as kernel.
537 2015-05-27  Pierre-Marie de Rodat  <derodat@adacore.com>
539         * par_sco.adb (Process_Decision): Store sloc to
540         condition/pragmas SCOs associations into a temporary table before
541         moving them to the SCO_Raw_Hash_Table so that we can back them
542         out just like we do for SCO entries that are simple decisions
543         in an expression context.
545 2015-05-27  Ed Schonberg  <schonberg@adacore.com>
547         * sem_ch6.adb (Process_Formals): A non-private formal type that
548         is a limited view does not have a list of private dependents.
550 2015-05-27  Ed Schonberg  <schonberg@adacore.com>
552         * exp_ch5.adb (Expand_N_Case_Statement): If the expression in
553         the case statement is a compile-time known value, we look for a
554         corresponding alternative to optimize the case statement into a
555         single case. If the type has a static predicate and the expression
556         does not satisfy the predicate, there is no legal alternative and
557         this optimization is not applicable.  Excecution is erroneous,
558         or else if assertions are enabled, an exception will be raised
559         earlier, at the point the expression is elaborated.
561 2015-05-27  Robert Dewar  <dewar@adacore.com>
563         * sem_elab.adb (Check_Internal_Call_Continue): Suppress
564         warning on Finalize, Adjust, or Initialize if type involved has
565         Warnings_Off set.
567 2015-05-27  Ed Schonberg  <schonberg@adacore.com>
569         * sem_aux.adb, sem_aux.ads (First_Discriminant): Return empty when
570         applied to a type with no known discriminants.
572 2015-05-26  Robert Dewar  <dewar@adacore.com>
574         * errout.ads, sem_ch4.adb, sem_ch6.adb: Minor reformatting.
576 2015-05-26  Bob Duff  <duff@adacore.com>
578         * sem_elab.adb (Check_A_Call): In the case where we're
579         calling something in an instance of a generic package that is
580         within this same unit (as the call), make sure we treat it
581         as a call to an entity within the same unit. That is, call
582         Check_Internal_Call, rather than putting "Elaborate_All(X)"
583         on X, which would necessarily result in an elaboration cycle in
584         static-elaboration mode.
586 2015-05-26  Eric Botcazou  <ebotcazou@adacore.com>
588         * freeze.ads (Is_Atomic_VFA_Aggregate): Adjust profile.
589         * freeze.adb (Is_Atomic_VFA_Aggregate): Change Entity
590         parameter into Node parameter and remove Type parameter.
591         Look at Is_Atomic_Or_VFA both on the type and on the object.
592         (Freeze_Entity): Adjust call to Is_Atomic_VFA_Aggregate.
593         * exp_aggr.adb (Expand_Record_Aggregate): Likewise.
594         (Process_Atomic_Independent_Shared_Volatile): Remove code
595         propagating Atomic or VFA from object to locally-defined type.
597 2015-05-26  Bob Duff  <duff@adacore.com>
599         * exp_ch7.adb: Minor comment fix.
601 2015-05-26  Eric Botcazou  <ebotcazou@adacore.com>
603         * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Min/Attr_Max>: Do not
604         bother about NaN's if Machine_Overflows is true.
606 2015-05-26  Eric Botcazou  <ebotcazou@adacore.com>
608         * gcc-interface/trans.c (gnat_to_gnu) <N_Object_Declaration>: Really
609         force evaluation of the expression, if any, when the object has its
610         elaboration delayed.  Do not create a variable at global level.
612 2015-05-26  Eric Botcazou  <ebotcazou@adacore.com>
614         * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Machine>: Do not apply
615         extra-precision trick to literals.  Build SAVE_EXPR manually.
617         * gcc-interface/misc.c (enumerate_modes): Add bypass for x86/x86-64.
619 2015-05-26  Eric Botcazou  <ebotcazou@adacore.com>
621         * gcc-interface/ada-tree.h (DECL_GLOBAL_NONCONSTANT_RENAMING_P): Delete
622         (DECL_RENAMED_OBJECT): Adjust comment.
623         * gcc-interface/gigi.h (record_global_nonconstant_renaming): Delete.
624         (invalidate_global_nonconstant_renamings): Likewise.
625         (gnat_constant_reference_p): Likewise.
626         (rewrite_fn): New function type.
627         (gnat_rewrite_reference): Declare.
628         (call_is_atomic_load): New inline predicate.
629         * gcc-interface/decl.c (elaborate_reference_1): New function.
630         (elaborate_reference): Likewise.
631         (gnat_to_gnu_entity): Call elaborate_reference to elaborate renamings
632         and simplify associated code.  Set const_flag to true consistently in
633         conjunction with used_by_ref.
634         * gcc-interface/trans.c (Identifier_to_gnu): Always replace renaming
635         pointers by renamed objects.
636         (outer_atomic_access_required_p): Deal with renamings.
637         (Compilation_Unit_to_gnu): Do not call
638         invalidate_global_nonconstant_renamings.
639         (gnat_to_gnu) <N_Object_Renaming_Declaration>: Adjust comment.
640         (gnat_gimplify_expr): Deal with atomic loads.
641         * gcc-interface/utils.c (global_nonconstant_renamings): Delete.
642         (destroy_gnat_utils): Do not call
643         invalidate_global_nonconstant_renamings.
644         (record_global_nonconstant_renaming): Delete.
645         (invalidate_global_nonconstant_renamings): Likewise.
646         * gcc-interface/utils2.c (call_is_atomic_load): Move to gigi.h.
647         (build_load_modify_store): Build a copy of the destination.
648         (gnat_stabilize_reference_1): Adjust.
649         (gnat_stabilize_reference): Call gnat_stabilize_reference_1 through
650         gnat_rewrite_reference and move bulk of code to...
651         (gnat_rewrite_reference): ...here.  New global function.
652         (gnat_constant_reference_p): Delete.
654 2015-05-26  Eric Botcazou  <ebotcazou@adacore.com>
656         * gcc-interface/gigi.h (gnat_stabilize_reference): Adjust prototype.
657         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not rely on const_flag
658         to detect constant renamings.  Be prepared for specific pattern of
659         renamed object based on function calls.  Create a constant object
660         for the renaming of a NULL_EXPR or of a CONSTRUCTOR.  Adjust calls
661         to gnat_stabilize_reference and tidy up.  Remove redundant tests.
662         (elaborate_expression_1): Remove obsolete test and tidy up.
663         * gcc-interface/trans.c (Call_to_gnu): Do not stabilize In/Out or Out
664         parameters passed by reference.
665         (gnat_to_gnu) <N_Selected_Component>: Remove redundant protection again
666         side-effects.
667         Use gnat_protect_expr instead of gnat_stabilize_reference for general
668         protection against side-effects.
669         * gcc-interface/utils2.c (gnat_stable_expr_p): New predicate.
670         (gnat_save_expr): Invoke it.
671         (gnat_protect_expr): Likewise.
672         (gnat_stabilize_reference_1): Likewise.  Remove useless propagation
673         of TREE_THIS_NOTRAP.
674         (gnat_stabilize_reference): Remove parameter and adjust throughout.
675         Delete ADDR_EXDR, COMPOUND_EXPR and CONSTRUCTOR cases.
676         Restrict CALL_EXPR case to atomic loads and tweak ERROR_MARK case.
678 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
680         * sinfo.ads: Minor reformatting.
681         * sem_aux.ads: Clarify use of First_Discriminant.
682         * sem_ch4.adb (Analyze_Explicit_Dereference): The use of a limited
683         view is replaced with the non-limited view in an instance body,
684         where the enclosing unit must have a regular with_clause on the
685         relevant unit.
686         * sem_ch12.adb (Install_Body): Freeze instantation after its
687         body. Remove useless freeze nodes for incomplete actuals to
688         prevent multiple generation of internal operations.
689         (Instantiate_Package_Body): Set sloc of body appropriately when
690         there are incomplete actuals and the instance body is placed in
691         the body of the enclosing unit.
692         * errout.ads: Consistent punctuation, better alignment and trivial
693         typos in comments.
694         * err_vars.ads: Fix typo.
696 2015-05-26  Eric Botcazou  <ebotcazou@adacore.com>
698         * sem_ch8.adb (Analyze_Object_Renaming): Lift restriction on
699         components of Volatile_Full_Access objects.
701 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
703         * sem_ch6.adb (Is_Non_Overriding_Operation,
704         Get_Generic_Parent_Type): Handle properly the case of a derived
705         scalar type by using the first subtype rather than its generated
706         anonymous base type.
708 2015-05-26  Eric Botcazou  <ebotcazou@adacore.com>
710         * einfo.adb (Write_Field17_Name): Move E_Incomplete_Subtype
711         case to...
712         (Write_Field19_Name): ...here.
714 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
716         * sem_ch13.adb: sem_ch13.adb (Add_Predicates): Undo analysis
717         of original expression in ASIS mode: does not solve the ASIS
718         problem of a usable type information, and crashes the back-end
719         when performing type annotations.
721 2015-05-26  Robert Dewar  <dewar@adacore.com>
723         * sem_disp.adb (Inherited_Subprograms): Add One_Only parameter.
724         (Is_Overriding_Subprogram): Use One_Only_Parameter.
725         * sem_disp.ads (Inherited_Subprograms): Add One_Only parameter.
727 2015-05-26  Robert Dewar  <dewar@adacore.com>
729         * exp_prag.adb, sem_ch3.adb, sem_ch5.adb, exp_ch11.adb, ghost.adb,
730         exp_ch6.adb, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb, sem_ch13.adb,
731         exp_ch3.adb: Minor reformatting.
733 2015-05-26  Bob Duff  <duff@adacore.com>
735         * treepr.adb: Minor improvement to debugging routines (pp, pn)
736         robustness.  Rearrange the code so passing a nonexistent Node_Id
737         prints "No such node" rather than crashing, and causing gdb to
738         generate confusing messages.
740 2015-05-26  Gary Dismukes  <dismukes@adacore.com>
742         * sem_util.adb: Minor typo fix.
744 2015-05-26  Yannick Moy  <moy@adacore.com>
746         * sem_aux.adb (Subprogram_Body_Entity): Deal with subprogram stubs.
748 2015-05-26  Hristian Kirtchev  <kirtchev@adacore.com>
750         * exp_ch3.adb (Expand_N_Full_Type_Declaration): Capture, set and
751         restore the Ghost mode.
752         (Expand_N_Object_Declaration): Capture, set and restore the Ghost mode.
753         (Freeze_Type): Update the call to Set_Ghost_Mode.
754         (Restore_Globals): New routine.
755         * exp_ch5.adb Add with and use clauses for Ghost.
756         (Expand_N_Assignment_Statement): Capture, set and restore the
757         Ghost mode.
758         (Restore_Globals): New routine.
759         * exp_ch6.adb Add with and use clauses for Ghost.
760         (Expand_N_Procedure_Call_Statement): Capture, set and
761         restore the Ghost mode.
762         (Expand_N_Subprogram_Body):
763         Code cleanup. Capture, set and restore the Ghost mode.
764         (Expand_N_Subprogram_Declaration): Capture, set and restore the
765         Ghost mode.
766         (Restore_Globals): New routine.
767         * exp_ch7.adb Add with and use clauses for Ghost.
768         (Expand_N_Package_Body): Capture, set and restore the Ghost mode.
769         (Expand_N_Package_Declaration): Capture, set and restore the
770         Ghost mode.
771         (Wrap_HSS_In_Block): Create a proper identifier for the block.
772         * exp_ch8.adb Add with and use clauses for Ghost.
773         (Expand_N_Exception_Renaming_Declaration): Code
774         cleanup. Capture, set and restore the Ghost mode.
775         (Expand_N_Object_Renaming_Declaration): Capture, set and restore
776         the Ghost mode.
777         (Expand_N_Package_Renaming_Declaration): Capture, set and restore the
778         Ghost mode.
779         (Expand_N_Subprogram_Renaming_Declaration): Capture, set and
780         restore the Ghost mode.
781         * exp_ch11.adb (Expand_N_Exception_Declaration): Code
782         cleanup. Capture, set and restore the Ghost mode.
783         * exp_disp.adb (Make_DT): Update the call to Set_Ghost_Mode. Do
784         not initialize the dispatch table slot of a Ghost subprogram.
785         * exp_prag.adb Add with and use clauses for Ghost.
786         (Expand_Pragma_Check): Capture, set and restore the Ghost mode.
787         (Expand_Pragma_Contract_Cases): Capture, set and restore the
788         Ghost mode.
789         (Expand_Pragma_Initial_Condition): Capture, set and
790         restore the Ghost mode.
791         (Expand_Pragma_Loop_Variant): Capture,
792         set and restore the Ghost mode.
793         (Restore_Globals): New routine.
794         * exp_util.adb Add with and use clauses for Ghost.
795         (Make_Predicate_Call): Code cleanup. Capture, set and restore
796         the Ghost mode.
797         (Restore_Globals): New routine.
798         * freeze.adb (Freeze_Entity): Code cleanup. Update the call
799         to Set_Ghost_Mode.
800         * ghost.adb Add with and use clause for Sem_Prag.
801         (Check_Ghost_Completion): Code cleanup.
802         (Check_Ghost_Overriding): New routine.
803         (Check_Ghost_Policy): Code cleanup.
804         (Ghost_Entity): New routine.
805         (Is_Ghost_Declaration): Removed.
806         (Is_Ghost_Statement_Or_Pragma): Removed.
807         (Is_OK_Context): Reimplemented.
808         (Is_OK_Declaration): New routine.
809         (Is_OK_Pragma): New routine.
810         (Is_OK_Statement): New routine.
811         (Mark_Full_View_As_Ghost): New routine.
812         (Mark_Pragma_As_Ghost): New routine.
813         (Mark_Renaming_As_Ghost): New routine.
814         (Propagate_Ignored_Ghost_Code): Update the comment on usage.
815         (Set_From_Entity): New routine.
816         (Set_From_Policy): New routine.
817         (Set_Ghost_Mode): This routine now handles pragmas and freeze nodes.
818         (Set_Ghost_Mode_For_Freeze): Removed.
819         (Set_Ghost_Mode_From_Entity): New routine.
820         (Set_Ghost_Mode_From_Policy): Removed.
821         * ghost.ads (Check_Ghost_Overriding): New routine.
822         (Mark_Full_View_As_Ghost): New routine.
823         (Mark_Pragma_As_Ghost): New routine.
824         (Mark_Renaming_As_Ghost): New routine.
825         (Set_Ghost_Mode): Update the parameter profile. Update the
826         comment on usage.
827         (Set_Ghost_Mode_For_Freeze): Removed.
828         (Set_Ghost_Mode_From_Entity): New routine.
829         * sem_ch3.adb (Analyze_Full_Type_Declaration):
830         Capture and restore the Ghost mode. Mark a type
831         as Ghost regardless of whether it comes from source.
832         (Analyze_Incomplete_Type_Decl): Capture, set and restore the
833         Ghost mode.
834         (Analyze_Number_Declaration): Capture and restore the Ghost mode.
835         (Analyze_Object_Declaration): Capture and restore the Ghost mode.
836         (Analyze_Private_Extension_Declaration): Capture and
837         restore the Ghost mode.
838         (Analyze_Subtype_Declaration): Capture and restore the Ghost mode.
839         (Process_Full_View): The full view inherits all Ghost-related
840         attributes from the private view.
841         (Restore_Globals): New routine.
842         * sem_ch5.adb (Analyze_Assignment): Capture and restore the
843         Ghost mode.
844         (Restore_Globals): New routine.
845         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration):
846         Code cleanup. Capture and restore the Ghost mode. Mark a
847         subprogram as Ghost regarless of whether it comes from source.
848         (Analyze_Procedure_Call): Capture and restore the Ghost mode.
849         (Analyze_Subprogram_Body_Helper): Capture and restore the Ghost mode.
850         (Analyze_Subprogram_Declaration): Capture and restore the Ghost mode.
851         (New_Overloaded_Entity): Ensure that a
852         parent subprogram and an overriding subprogram have compatible
853         Ghost policies.
854         * sem_ch7.adb (Analyze_Package_Body_Helper): Capture and restore
855         the Ghost mode.
856         (Analyze_Package_Declaration): Capture and
857         restore the Ghost mode. Mark a package as Ghost when it is
858         declared in a Ghost region.
859         (Analyze_Private_Type_Declaration): Capture and restore the Ghost mode.
860         (Restore_Globals): New routine.
861         * sem_ch8.adb (Analyze_Exception_Renaming): Code
862         reformatting. Capture and restore the Ghost mode. A renaming
863         becomes Ghost when its name references a Ghost entity.
864         (Analyze_Generic_Renaming): Capture and restore the Ghost mode. A
865         renaming becomes Ghost when its name references a Ghost entity.
866         (Analyze_Object_Renaming): Capture and restore the Ghost mode. A
867         renaming becomes Ghost when its name references a Ghost entity.
868         (Analyze_Package_Renaming): Capture and restore the Ghost mode. A
869         renaming becomes Ghost when its name references a Ghost entity.
870         (Analyze_Subprogram_Renaming): Capture and restore the Ghost
871         mode. A renaming becomes Ghost when its name references a
872         Ghost entity.
873         * sem_ch11.adb (Analyze_Exception_Declaration): Capture, set
874         and restore the Ghost mode.
875         * sem_ch12.adb (Analyze_Generic_Package_Declaration): Capture and
876         restore the Ghost mode.
877         (Analyze_Generic_Subprogram_Declaration):
878         Capture and restore the Ghost mode.
879         * sem_ch13.adb Add with and use clauses for Ghost.
880         (Add_Invariant): New routine.
881         (Add_Invariants): Factor out code.
882         (Add_Predicate): New routine.
883         (Add_Predicates): Factor out code.
884         (Build_Invariant_Procedure_Declaration): Code cleanup. Capture,
885         set and restore the Ghost mode.
886         (Build_Invariant_Procedure): Code cleanup.
887         (Build_Predicate_Functions): Capture, set and
888         restore the Ghost mode. Mark the generated functions as Ghost.
889         * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
890         Capture, set and restore the Ghost mode.
891         (Analyze_External_Property_In_Decl_Part): Capture, set and restore
892         the Ghost mode.
893         (Analyze_Initial_Condition_In_Decl_Part):
894         Capture, set and restore the Ghost mode.
895         (Analyze_Pragma):
896         Code cleanup. Capture, set and restore the Ghost mode. Flag
897         pragmas Linker_Section, No_Return, Unmodified, Unreferenced and
898         Unreferenced_Objects as illegal when it applies to both Ghost
899         and living arguments. Pragma Ghost cannot apply to synchronized
900         objects.
901         (Check_Kind): Moved to the spec of Sem_Prag.
902         (Process_Inline): Flag the pragma as illegal when it applies to
903         both Ghost and living arguments.
904         (Restore_Globals): New routine.
905         * sem_prag.ads Add pragma Default_Initial_Condition
906         to table Assertion_Expression_Pragma. Add new table
907         Is_Aspect_Specifying_Pragma.
908         (Check_Kind): Moved from body of Sem_Prag.
909         * sem_util.adb Add with and use clauses for Ghost.
910         (Build_Default_Init_Cond_Procedure_Body): Capture, set and restore
911         the Ghost mode.
912         (Build_Default_Init_Cond_Procedure_Declaration):
913         Capture, set and restore the Ghost mode. Mark the default
914         initial condition procedure as Ghost when it is declared
915         in a Ghost region.
916         (Is_Renaming_Declaration): New routine.
917         (Policy_In_List): Account for the single argument version of
918         Check_Pragma.
919         * sem_util.ads (Is_Renaming_Declaration): New routine.
920         * sinfo.adb (Is_Ghost_Pragma): New routine.
921         (Set_Is_Ghost_Pragma): New routine.
922         * sinfo.ads New attribute Is_Ghost_Pragma.
923         (Is_Ghost_Pragma): New routine along with pragma Inline.
924         (Set_Is_Ghost_Pragma): New routine along with pragma Inline.
926 2015-05-26  Robert Dewar  <dewar@adacore.com>
928         * sem_ch3.adb, sem_aux.adb, sem_aux.ads, exp_ch6.adb, sprint.adb:
929         Minor reformatting.
931 2015-05-26  Gary Dismukes  <dismukes@adacore.com>
933         * gnat1drv.adb, targparm.adb, targparm.ads, restrict.adb: Minor
934         reformatting and typo fixes in comments.
936 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
938         * sem_ch7.adb (Swap_Private_Dependets): Set visibility of
939         the two views of a private dependent in two separate steps,
940         to ensure proper visibility in parent units analyzed for inlining.
942 2015-05-26  Yannick Moy  <moy@adacore.com>
944         * sem_aux.adb, sem_aux.ads (Get_Low_Bound): Use Type_Low_Bound.
945         (Package_Body, Package_Spec): New queries moved
946         here from GNATprove.
947         (Package_Specification): Simplify query to remove use of loop.
948         * sem_util.adb, sem_util.ads (Enclosing_Declaration,
949         Enclosing_Package_Or_Subprogram, Is_Attribute_Update): New
950         queries moved here from GNATprove.
952 2015-05-26  Bob Duff  <duff@adacore.com>
954         * einfo.adb, einfo.ads, sprint.adb, lib-xref.ads: Minor cleanup: Remove
955         obsolete Entity_Kinds E_String_Type and E_String_Subtype. Update
956         redundant assertions.
958 2015-05-26  Gary Dismukes  <dismukes@adacore.com>
960         * sem_util.adb, sem_util.ads, sem_ch13.adb: Minor typo fixes.
962 2015-05-26  Doug Rupp  <rupp@adacore.com>
964         * init.c [vxworks]: Refine previous checkin.
966 2015-05-26  Robert Dewar  <dewar@adacore.com>
968         * exp_ch4.adb (Wrap_MA): New function.
969         (Expand_N_Op_Expon): Use Wrap_MA.
971 2015-05-26  Bob Duff  <duff@adacore.com>
973         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
974         Do not use secondary stack to return limited records with
975         defaulted discriminants. This is an efficiency improvement.
976         * exp_ch6.adb, exp_dist.adb, sem_attr.adb, sem_aux.adb, sem_aux.ads,
977         sem_ch12.adb, sem_ch3.adb, sem_ch4.adb, sem_ch6.adb, sem_ch7.adb,
978         sem_util.adb: Change the sense of Is_Indefinite_Subtype to be
979         Is_Definite_Subtype. This is an improvement to readability (the double
980         negative in "not Is_Indefinite_Subtype" was slightly confusing). Also
981         disallow passing non-[sub]type entities, an unnecessary and slightly
982         bug-prone flexibility.
984 2015-05-26  Robert Dewar  <dewar@adacore.com>
986         * sem_aggr.adb (Resolve_Array_Aggregate): Defend against
987         bad bounds.
988         * debug.adb: Document -gnatd.k.
989         * erroutc.adb (Set_Msg_Insertion_Line_Number): Implement -gnatd.k.
991 2015-05-26  Robert Dewar  <dewar@adacore.com>
993         * gnat1drv.adb (Gnat1drv): Provide new arguments for
994         Get_Target_Parameters.
995         * restrict.adb (Set_Restriction_No_Specification_Of_Aspect):
996         new procedure.
997         (Set_Restriction_No_Use_Of_Attribute): new procedure.
998         * restrict.ads (Set_Restriction_No_Specification_Of_Aspect):
999         new procedure.
1000         (Set_Restriction_No_Use_Of_Attribute): new procedure.
1001         * s-rident.ads (Integer_Parameter_Restrictions): New subtype.
1002         * targparm.adb (Get_Target_Parameters): Allow new restriction
1003         pragmas No_Specification_Of_Aspect No_Use_Of_Attribute
1004         No_Use_Of_Pragma.
1005         * targparm.ads: New parameters for Get_Target_Parameters.
1006         * tbuild.adb (Set_NOD): New name for Set_RND.
1007         (Set_NSA): New procedure.
1008         (Set_NUA): New procedure.
1009         (Set_NUP): New procedure.
1010         * tbuild.ads (Make_SC): Minor reformatting.
1011         (Set_NOD): New name for Set_RND.
1012         (Set_NSA, Set_NUA, Set_NUP): New procedure.
1014 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
1016         * a-stwise.adb (Find_Token): If source'first is not positive,
1017         an exception must be raised, as specified by RM 2005 A.4.3
1018         (68/1). This must be checked explicitly, given that run-time
1019         files are normally compiled without constraint checks.
1020         * a-stzsea.adb (Find_Token): Ditto.
1022 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
1024         * sem_util.ads sem_util.adb (Is_Current_Instance):  New predicate
1025         to fully implement RM 8.6 (17/3). which earlier only applied
1026         to synchronized types. Used to preanalyze aspects that include
1027         current instances of types, such as Predicate and Invariant.
1028         * sem_res.adb (Resolve_Entity_Name): Use Is_Current_Instance.
1029         * sem_ch13.adb (Add_Predicates): In ASIS mode, preserve original
1030         expression of aspect and analyze it to provide proper type
1031         information.
1033 2015-05-26  Robert Dewar  <dewar@adacore.com>
1035         * rtsfind.ads: Add entries for RE_Exn[_Long]_Float.
1036         * s-exnllf.adb (Exn_Float): New function.
1037         (Exn_Long_Float): New function.
1038         (Exn_Long_Long_Float): Rewritten interface.
1039         (Exp): New name for what used to be Exn_Long_Long_Float.
1040         * s-exnllf.ads (Exn_Float): New function.
1041         (Exn_Long_Float): New function.
1043 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
1045         * sem_ch8.adb (Find_Selected_Component): Do not emit an error
1046         on a selected component when the prefix is a type name that is
1047         a Current_Instance.
1048         * einfo.ads: Minor grammar fix.
1050 2015-05-26  Doug Rupp  <rupp@adacore.com>
1052         * init.c [vxworks] (sysLib.h): Only for x86.
1054 2015-05-26  Doug Rupp  <rupp@adacore.com>
1056         * init-vxsim.c (CPU): define as __VXSIM_CPU__
1057         * sigtramp-vxworks-vxsim.c (CPU): Likewise.
1058         sigtramp-vxworks-target.inc: Add check for SIMLINUX.
1059         * sigtramp.h: Likewise.
1061 2015-05-26  Robert Dewar  <dewar@adacore.com>
1063         * sem_aux.adb, sem_disp.adb, sem_util.ads: Add comment.
1064         * sem_util.adb: Minor reformatting
1066 2015-05-26  Yannick Moy  <moy@adacore.com>
1068         * inline.adb (Has_Initialized_Type): Adapt to new names.
1069         * sem_aux.adb, sem_aux.ads (Get_Low_Bound, Number_Components,
1070         Subprogram_Body, Subprogram_Body_Entity, Subprogram_Spec,
1071         Subprogram_Specification): New query functions used in GNATprove.
1072         * sem_disp.adb, sem_disp.ads (Is_Overriding_Subprogram): New
1073         query functions used in GNATprove.
1074         * sem_util.adb, sem_util.adso (Enclosing_Lib_Unit_Node,
1075         Get_Cursor_Type, Get_Return_Object, Get_User_Defined_Eq,
1076         Is_Double_Precision_Floating_Point_Type,
1077         Is_Single_Precision_Floating_Point_Type): New query functions
1078         used in GNATprove.
1080 2015-05-26  Bob Duff  <duff@adacore.com>
1082         * s-rpc.ads (Partition_ID): Increase maximum Partition_ID to
1083         some huge number.
1084         * a-except-2005.adb, a-except-2005.ads, a-except.adb,
1085         a-except.ads, a-exexda.adb, a-exstat.adb: Minor comment fixes.
1087 2015-05-26  Robert Dewar  <dewar@adacore.com>
1089         * sinfo.adb: Minor comment addition.
1090         * einfo.adb: Minor whitespace and punctuation fix.
1091         * sem_util.adb: Minor editing of comments.
1093 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
1095         * sem_ch7.adb (Install_Private_Declarations,
1096         Swap_Private_Dependents): Ensure that both views of the dependent
1097         subtype are immediately visible if we are within their scope. This
1098         may be needed when a procedure body is both the parent of an
1099         instantiated child unit, and is itself used to inline a local
1100         function.
1102 2015-05-26  Gary Dismukes  <dismukes@adacore.com>
1104         * exp_prag.adb, gnat1drv.adb: Minor reformatting.
1106 2015-05-26  Eric Botcazou  <ebotcazou@adacore.com>
1108         * exp_ch4.adb (Expand_N_Indexed_Component): In the circuit
1109         detecting exceptions to the rewriting, deal with implicit
1110         dereferences in the selected component case.
1112 2015-05-26  Bob Duff  <duff@adacore.com>
1114         * sem_ch13.adb (Analyze_One_Aspect): Do not
1115         require the expression of the Disable_Controlled aspect to be
1116         static in a generic template, because 'Enabled is not known
1117         until the instance.
1119 2015-05-26  Doug Rupp  <rupp@adacore.com>
1121         * init-vxsim.c: New file for vxsim ZCX
1122         * sigtramp-vxworks-vxsim.c: Likewise.
1123         * sigtramp-vxworks.c: Factor out target dependent bits into ...
1124         * sigtramp-vxworks-target.inc: ... here.
1125         * sigtramp.h: Add vxsim zcx protos.
1126         * init.c [vxworks...] (sysLib.h): Include.
1127         (__gnat_map_signal): Make global.
1128          [...i386] (__gnat_error_handler): Call __gnat_vxsim_error_handler if
1129         on vxsim.
1130         [...i386] (__gnat_install_handler): Test if on vxsim.
1132 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
1134         * sem_ch5.adb (Analyze_Iterator_Specification): For an element
1135         iterator over an array, if the component is aliased, the loop
1136         variable is aliased as well.
1138 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
1140         * exp_ch6.adb (Expand_Actuals): For a function call with in-out
1141         parameters that is rewritten as an expression_with_actions,
1142         we preserve the original function call node for further use by
1143         the caller (typically Expand_Call). In the presence of validity
1144         checks, that function call, though it is labelled Analyzed to
1145         prevent an infinite recursion, may be rewritten as a temporary
1146         by Remove_Side_Effects.  Ensure that the caller has access to
1147         the original function call to continue expansion.
1148         * atree.ads: Minor typo in comment.
1150 2015-05-26  Javier Miranda  <miranda@adacore.com>
1152         * sem_util.adb (Check_Function_Writable_Actuals):
1153         Add missing support to check the violation of writable actuals
1154         in array aggregates that have a nonstatic range.
1156 2015-05-26  Hristian Kirtchev  <kirtchev@adacore.com>
1158         * exp_ch6.adb (Process_Contract_Cases_For): Update the call to
1159         Expand_Pragma_Contract_Cases.
1160         * exp_prag.ads, exp_prag.adb (Expand_Contract_Cases): Rename to
1161         Expand_Pragma_Contract_Cases.
1162         * sem_ch13.adb (Add_Invariants): Use the original aspect name
1163         when creating the arguments of pragma Check. This ensures that
1164         'Class is properly recognized and handled.
1166 2015-05-26  Arnaud Charlet  <charlet@adacore.com>
1168         * gnat1drv.adb: Minor adjustments.
1169         (Adjust_Global_Switches): Disable some related flags in CodePeer mode.
1170         * sem_ch4.adb (Has_Arbitrary_Evaluation_Order,
1171         Stop_Subtree_Climbind): Code cleanup.
1172         * einfo.ads: Minor comment change.
1174 2015-05-26  Javier Miranda  <miranda@adacore.com>
1176         * sem_aggr.adb (Resolve_Aggregate, Resolve_Extension_Aggregate):
1177         Code cleanup.
1178         * sem_ch3.adb (Build_Derived_Record_Type,
1179         Record_Type_Declaration): Code cleanup.
1180         * sem_ch4.adb (Has_Arbitrary_Evaluation_Order,
1181         Stop_Subtree_Climbind): Tables which speed up the identification
1182         of dangerous calls to Ada 2012 functions with writable actuals
1183         (AI05-0144).
1184         (Analyze_Arithmetic_Op, Analyze_Call, Analyze_Comparison_Op,
1185         Analyze_Equality_Op, Analyze_Logical_Op, Analyze_Membership_Op,
1186         Analyze_Range): Code cleanup.
1187         (Is_Arbitrary_Evaluation_Order_Construct): Removed.
1188         (Check_Writable_Actuals): Code cleanup using the added tables.
1189         * sem_util.adb (Check_Function_Writable_Actuals): Return
1190         immediately if the node does not have the flag Check_Actuals
1191         set to True.
1193 2015-05-26  Eric Botcazou  <ebotcazou@adacore.com>
1195         * exp_ch6.adb (Add_Call_By_Copy_Code): Remove restrictive
1196         condition in the detection of the effects of Remove_Side_Effects.
1197         * exp_util.ads (Remove_Side_Effects): Add general and historical note.
1198         * exp_util.adb (Is_Name_Reference): New predicate.
1199         (Remove_Side_Effects): Use it in lieu of Is_Object_Reference
1200         in order to decide whether to use the renaming to capture the
1201         side effects of the subexpression.
1202         (Side_Effect_Free): Remove obsolete test.
1204 2015-05-26  Robert Dewar  <dewar@adacore.com>
1206         * aspects.ads, aspects.adb: Add aspect Disable_Controlled.
1207         * einfo.ads, einfo.adb (Disable_Controlled): New flag.
1208         (Is_Controlled_Active): New function.
1209         * exp_ch3.adb (Expand_Freeze_Record_Type): Use
1210         Is_Controlled_Active.
1211         * exp_util.adb (Needs_Finalization): Finalization not needed
1212         if Disable_Controlled set.
1213         * freeze.adb (Freeze_Array_Type): Do not set
1214         Has_Controlled_Component if the component has Disable_Controlled.
1215         (Freeze_Record_Type): ditto.
1216         * sem_ch13.adb (Decorate): Minor reformatting.
1217         (Analyze_Aspect_Specifications): Implement Disable_Controlled.
1218         * sem_ch3.adb (Analyze_Object_Declaration): Handle
1219         Disable_Controlled.
1220         (Array_Type_Declaration): ditto.
1221         (Build_Derived_Private_Type): ditto.
1222         (Build_Derived_Type): ditto.
1223         (Record_Type_Definition): ditto.
1224         * snames.ads-tmpl: Add Name_Disable_Controlled.
1226 2015-05-26  Eric Botcazou  <ebotcazou@adacore.com>
1228         * exp_ch6.adb (Expand_Actuals): Use a constant declaration instead
1229         of a renaming to capture the return value of a function call.
1230         (Expand_Simple_Function_Return): Call Remove_Side_Effects
1231         instead of removing side effects manually before the call to
1232         _Postconditions.
1234 2015-05-26  Robert Dewar  <dewar@adacore.com>
1236         * exp_ch4.adb (Expand_N_Op_Expon): Deal with problem of wrong
1237         order in calling Duplicate_Subexpr.
1238         * einfo.ads: Fix documentation of Object/Value size for scalar types.
1240 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
1242         * exp_aggr.adb (Build_Array_Aggr_Code, Gen_Assign):
1243         If a component is default-initialized and its type has an
1244         invariant procedure, insert an invariant test after code for
1245         default-initialization of the component.
1247 2015-05-26  Gary Dismukes  <dismukes@adacore.com>
1249         * einfo.ads, sem_util.adb, sem_ch4.adb: Minor reformatting.
1251 2015-05-26  Robert Dewar  <dewar@adacore.com>
1253         * exp_unst.adb, exp_unst.ads: Change to using Subps table index for
1254         making AREC entity names unique.
1256 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
1258         * sem_cat.adb (Has_Stream_Attribute_Definition): If the type
1259         has aspect specifications, examine the corresponding list of
1260         representation items to determine whether there is a visible
1261         stream operation. The attribute definition clause generated from
1262         the aspect will be inserted at the freeze point of the type,
1263         which may be in the private part and not directly visible,
1264         but the aspect makes the operation available to a client.
1266 2015-05-26  Robert Dewar  <dewar@adacore.com>
1268         * sem_util.adb: Minor code reorganization.
1269         * sem_ch6.adb: Minor reformatting.
1271 2015-05-25  Eric Botcazou  <ebotcazou@adacore.com>
1273         * gcc-interface/utils.c (maybe_pad_type): Do not apply adjustment to
1274         original size for elementary types before issuing the size warning.
1276 2015-05-25  Eric Botcazou  <ebotcazou@adacore.com>
1278         * get_targ.adb (C_Get_Float_Words_BE): Adjust import name.
1279         (C_Get_Words_BE): Likewise.
1280         (C_Get_Bytes_BE): Likewise.
1281         (C_Get_Bits_BE): Likewise.
1282         (Width_From_Size): Remove superfluous space.
1283         * gcc-interface/targtyps.c (get_float_words_be): Rename into...
1284         (get_target_float_words_be): ...this.
1285         (get_words_be): Rename into...
1286         (get_target_words_be): ...this.
1287         (get_bytes_be): Rename into...
1288         (get_target_bytes_be): ...this.
1289         (get_bits_be): Rename into...
1290         (get_target_bits_be): ...this.
1291         * gcc-interface/gigi.h (standard_datatypes): Remove ADT_ptr_void_type.
1292         (ptr_void_type_node): Delete.
1293         (get_target_float_size): Likewise.
1294         (get_target_double_size): Likewise.
1295         (get_target_long_double_size): Likewise.
1296         (get_float_words_be): Likewise.
1297         (get_words_be): Likewise.
1298         (get_bytes_be): Likewise.
1299         (get_bits_be): Likewise.
1300         (get_target_float_words_be): Declare.
1301         (get_target_words_be): Likewise.
1302         (get_target_bytes_be): Likewise.
1303         (get_target_bits_be): Likewise.
1304         * gcc-interface/decl.c (gnat_to_gnu_entity): Replace ptr_void_type_node
1305         with ptr_type_node.
1306         (intrin_return_compatible_p): Likewise.
1307         * gcc-interface/trans.c (gigi): Likewise.
1308         * gcc-interface/utils2.c (maybe_wrap_malloc): Likewise.
1309         (maybe_wrap_free): Likewise.
1310         * gcc-interface/utils.c (maybe_pad_type): Remove superfluous space.
1311         * gcc-interface/misc.c (gnat_init): Do not set ptr_void_type_node.
1313 2015-05-25  Eric Botcazou  <ebotcazou@adacore.com>
1315         * gcc-interface/decl.c (elaborate_expression): Take a const string
1316         suffix instead of a tree.
1317         (elaborate_expression_1): Likewise.
1318         (elaborate_expression_2): Likewise.
1319         (gnat_to_gnu_entity): Adjust to above changes.
1320         (build_subst_list): Likewise.
1321         (get_entity_char): New static function.
1323 2015-05-25  Eric Botcazou  <ebotcazou@adacore.com>
1325         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: Move around.
1326         <E_Exception>: Merge with E_Variable case.
1327         <E_Variable>: Remove 'object' label.
1329 2015-05-25  Eric Botcazou  <ebotcazou@adacore.com>
1331         * gcc-interface/decl.c (gnat_to_gnu_entity): Minor tweak.
1332         * gcc-interface/trans.c (finalize_nrv_unc_r): Use CONSTRUCTOR_ELT.
1333         * gcc-interface/utils.c (convert): Likewise and simplify.
1334         (remove_conversions): Likewise.
1335         * gcc-interface/utils2.c (compare_fat_pointers): Likewise.
1336         (build_unary_op): Likewise and simplify.
1338 2015-05-25  Eric Botcazou  <ebotcazou@adacore.com>
1340         * gcc-interface/gigi.h (build_atomic_load): Adjust prototype.
1341         (build_atomic_store): Likewise.
1342         (build_load_modify_store): Declare.
1343         (VECTOR_TYPE_P): Delete.
1344         * gcc-interface/decl.c (gnat_to_gnu_entity): Replace Is_Atomic with
1345         Is_Atomic_Or_VFA throughout.
1346         <E_Array_Type>: Build a variant of the XUA type instead of forcing
1347         TYPE_VOLATILE on it.
1348         <E_Array_Subtype>: Use the main variant of the base type.
1349         Do not force TYPE_VOLATILE on the type being built.
1350         <E_Record_Type>: Likewise.
1351         <E_Array_Subtype>: Likewise.
1352         <E_Subprogram_Type>: Rename local variable.
1353         Add Atomic qualifier in conjunction with Volatile on types if needed.
1354         Force BLKmode for by-ref types only at the end of the processing.
1355         Change qualifiers only after changing the mode of the type.  Set
1356         TYPE_UNIVERSAL_ALIASING_P on the type directly.
1357         (check_ok_for_atomic_type): Issue specific error message for VFA.
1358         (gnat_to_gnu_component_type): Replace Is_Atomic with
1359         Is_Atomic_Or_VFA throughout.
1360         * gcc-interface/misc.c (gnat_get_alias_set): Test
1361         TYPE_UNIVERSAL_ALIASING_P on the type directly.
1362         * gcc-interface/trans.c (lvalue_required_p): Replace Is_Atomic with
1363         Is_Atomic_Or_VFA throughout.  Add missing guard.
1364         (node_is_atomic): New predicate.
1365         (node_has_volatile_full_access): Likewise.
1366         (gnat_strip_type_conversion): New function.
1367         (outer_atomic_access_required_p): New predicate.
1368         (atomic_sync_required_p): Rename into...
1369         (atomic_access_required_p): ...this.  Add SYNC parameter, scan the
1370         parent node first and then look for the atomic setting.  Add support
1371         for Volatile_Full_Access.
1372         (Call_to_gnu): Add atomic_access and outer_atomic_access parameters
1373         and adjusts calls to above functions.  Use load-modify-store sequence
1374         for updates of In/Out and Out parameters if required, as well as for
1375         moving the result to the target if required.  Add couple of missing
1376         guards.
1377         (gnat_to_gnu): Adjust calls to above functions.
1378         <N_Object_Renaming_Declaration>: If the renamed object has side-effects
1379         evaluate only its address.
1380         <N_Assignment_Statement>: Adjust call to Call_to_gnu.  Use load-modify
1381         store sequence if required.
1382         <N_Function_Call>: Adjust call to Call_to_gnu.
1383         (extract_values): Adjust comment.
1384         * gcc-interface/utils2.c (build_atomic_load): Add SYNC parameter and
1385         use relaxed memory model if it is not set.
1386         (build_atomic_store): Likewise.
1387         (call_is_atomic_load): New predicate.
1388         (build_load_modify_store): New function.
1389         (build_binary_op) <MODIFY_EXPR>: Accept SAVE_EXPR on the LHS.
1390         (gnat_stabilize_reference) <CALL_EXPR>: Deal with atomic loads.
1392 2015-05-25  Eric Botcazou  <ebotcazou@adacore.com>
1394         * gcc-interface/ada-tree.h (DECL_RENAMING_GLOBAL_P): Rename into...
1395         (DECL_GLOBAL_NONCONSTANT_RENAMING_P): ...this.
1396         * gcc-interface/gigi.h (record_global_renaming_pointer): Delete.
1397         (invalidate_global_renaming_pointers): Likewise.
1398         (record_global_nonconstant_renaming): New.
1399         (invalidate_global_nonconstant_renamings): Likewise.
1400         (get_inner_constant_reference): Likewise.
1401         (gnat_constant_reference_p): Likewise.
1402         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Adjust to above
1403         and register the renaming pointer only if the object is non-constant.
1404         (elaborate_expression_1): Call get_inner_constant_reference instead
1405         of get_inner_reference.
1406         * gcc-interface/trans.c (fold_constant_decl_in_expr): Minor tweak.
1407         (Identifier_to_gnu): Adjust to above and do not recheck the renamed
1408         object before substituting it.
1409         (Compilation_Unit_to_gnu): Adjust to above renaming.  Minor tweaks.
1410         (gnat_to_gnu) <N_Object_Renaming_Declaration>: Do not return the
1411         result at the global level.
1412         (N_Exception_Renaming_Declaration): Likewise.
1413         * gcc-interface/utils.c (global_renaming_pointers): Rename into...
1414         (global_nonconstant_renamings): ...this.
1415         (destroy_gnat_utils): Adjust to above renaming.
1416         (record_global_renaming_pointer): Rename into...
1417         (record_global_nonconstant_renaming): ...this.
1418         (invalidate_global_renaming_pointers): Rename into...
1419         (invalidate_global_nonconstant_renamings): ...this and do not recheck
1420         the renamed object before invalidating.
1421         * gcc-interface/utils2.c (gnat_stabilize_reference): Minor tweak.
1422         (get_inner_constant_reference): New public function.
1423         (gnat_constant_reference_p): New predicate.
1425 2015-05-25  Javier Miranda  <miranda@adacore.com>
1427         * einfo.ads, einfo.adb (Has_Out_Or_In_Out_Parameter): This attribute
1428         is now present in subprograms, generic subprograms, entries and
1429         entry families.
1430         * sem_ch6.adb (Set_Formal_Mode): Set As_Out_Or_In_Out_Parameter
1431         on entries, entry families, subprograms and generic subprograms.
1432         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration):
1433         Minor code reorganization to ensure that the Ekind attribute
1434         of the subprogram entity is set before its formals are
1435         processed. Required to allow the use of the attribute
1436         Has_Out_Or_In_Out_Parameter on the subprogram entity.
1437         * sem_aggr.adb (Resolve_Aggregate, Resolve_Extension_Aggregate):
1438         Perform the check on writable actuals only if the value of some
1439         component of the aggregate involves calling a function with
1440         out-mode parameters.
1441         (Resolve_Record_Aggregate): Propagate the Check_Actuals flag to the
1442         internally built aggregate.
1443         * sem_ch3.adb (Build_Derived_Record_Type, Record_Type_Declaration):
1444         Perform the check on writable actuals only if the initialization of
1445         some component involves calling a function with out-mode parameters.
1446         * sem_ch4.adb (Analyze_Arithmetic_Op, Analyze_Comparison_Op,
1447         Analyze_Equality_Op, Analyze_Logical_Op, Analyze_Membership_Op,
1448         Analyze_Range): Check writable actuals only if the
1449         subtrees have a call to a function with out-mode parameters
1450         (Analyze_Call.Check_Writable_Actuals): New subprogram. If the call
1451         has out or in-out parameters then mark its outermost enclosing
1452         construct as a node on which the writable actuals check must
1453         be performed.
1454         (Analyze_Call): Check if the flag must be set and if the outermost
1455         enclosing construct.
1456         * sem_util.adb (Check_Function_Writable_Actuals): Code cleanup
1457         and reorganization. We skip processing aggregate discriminants
1458         since their precise analysis involves two phases traversal.
1459         * sem_res.adb (Resolve_Actuals, Resolve_Arithmetic_Op,
1460         Resolve_Logical_Op, Resolve_Membership_Op): Remove call to
1461         check_writable_actuals.
1463 2015-05-22  Ed Schonberg  <schonberg@adacore.com>
1465         * sem_ch3.adb (Constrain_Concurrent): If the context is a
1466         type declaration, generate an Itype_Reference for the anonymous
1467         subtype, to force elaboration at this point in gigi.
1469 2015-05-22  Gary Dismukes  <dismukes@adacore.com>
1471         * layout.adb, einfo.ads, sem_ch12.adb, freeze.adb, sem_util.ads,
1472         exp_ch4.adb, sem_ch6.adb: Minor reformatting and typo fixes.
1474 2015-05-22  Ed Schonberg  <schonberg@adacore.com>
1476         * sem_res.adb (Resolve_Actuals): If the call is to an overridden
1477         operation, replace the names of the actuals in named associations
1478         with the names of the actuals of the subprogram that is eventually
1479         executed. The names of the formals and the defaults can differ
1480         between the two operations when they are operations of a formal
1481         derived type.
1483 2015-05-22  Bob Duff  <duff@adacore.com>
1485         * a-convec.ads, a-convec.adb (Append): Check for fast path. Split
1486         out slow path into separate procedure. Inline Append. Fast path
1487         now avoids calling Insert.
1488         (Finalize): Do the busy checking last, so the container gets emptied.
1489         (Insert, Insert_Space): Remove redundancy.
1491 2015-05-22  Robert Dewar  <dewar@adacore.com>
1493         * switch-c.adb (Scan_Front_End_Switches): Insist on -gnatc
1494         for -gnatd.V.
1496 2015-05-22  Arnaud Charlet  <charlet@adacore.com>
1498         * gnatvsn.ads: Minor code reorg to remember more easily to update
1499         variables.
1501 2015-05-22  Ed Schonberg  <schonberg@adacore.com>
1503         * sem_ch10.adb (Analyze_With_Clause): In ASIS_Mode, a
1504         limited_with clause on a predefined unit is not transformed into
1505         a regular with_clause, to preserve the original tree structure.
1506         * sinfo.ads (N_With_Clause): Add comment on handling of
1507         Limited_With.
1508         * sem_ch10.adb: Minor reformatting.
1510 2015-05-22  Ed Schonberg  <schonberg@adacore.com>
1512         * sem_ch8.adb (Freeze_Profile): A limited view of a type in
1513         the profile of a subprogram renaming does not require freezing,
1514         because it is declared in a different unit.
1516 2015-05-22  Ed Schonberg  <schonberg@adacore.com>
1518         * exp_aggr.adb (Get_Constraint_Association): If type (of ancestor
1519         composite type) is private, go to full view. This was previously
1520         done only in an instance context, but is happen whenever a chain
1521         of private extensions includes one inherited discriminant.
1523 2015-05-22  Robert Dewar  <dewar@adacore.com>
1525         * einfo.ads: Minor comment updates.
1526         * exp_unst.adb: Move Subps table to spec Don't remove old entries
1527         from table Add Last field to record last entry used.
1528         * exp_unst.ads: Move Subps table here from body So that Cprint
1529         can access saved values.
1531 2015-05-22  Bob Duff  <duff@adacore.com>
1533         * a-cdlili.adb, a-cdlili.ads, a-cohama.adb, a-cohama.ads,
1534         * a-cohase.adb, a-cohase.ads, a-convec.adb, a-convec.ads,
1535         * a-coorma.adb, a-coorma.ads, a-coorse.adb, a-coorse.ads:
1536         (Pseudo_Reference, Element_Access, Get_Element_Access): New
1537         declarations added for use by performance improvements in exp_ch5.adb.
1538         * snames.ads-tmpl: New names referenced by exp_ch5.adb.
1539         * exp_ch5.adb: Speed up "for ... of" loops for predefined containers.
1540         Instead of doing literally what the RM calls for, we do something
1541         equivalent that avoids expensive operations inside the loop. If the
1542         container package has appropriate Next, Pseudo_Reference,
1543         Element_Access, Get_Element_Access declarations, we invoke the
1544         optimization.
1545         * snames.ads-tmpl: Note speed improvement.
1547 2015-05-22  Eric Botcazou  <ebotcazou@adacore.com>
1549         * einfo.ads (Is_Atomic_Or_VFA): Move to XEINFO INLINES section.
1550         * xeinfo.adb: Replace a-einfo.h with einfo.h throughout.
1551         Add pattern to translate "or else" into "||".
1553 2015-05-22  Eric Botcazou  <ebotcazou@adacore.com>
1555         * einfo.ads (Has_Volatile_Full_Access): Rename into...
1556         (Is_Volatile_Full_Access): ...this.
1557         (Set_Has_Volatile_Full_Access): Rename into...
1558         (Set_Is_Volatile_Full_Access): ...this.
1559         * einfo.adb (Has_Volatile_Full_Access): Rename into...
1560         (Is_Volatile_Full_Access): ...this.
1561         (Set_Has_Volatile_Full_Access): Rename into...
1562         (Set_Is_Volatile_Full_Access): ...this.
1563         (Is_Atomic_Or_VFA): Adjust to above renaming.
1564         * errout.adb (Special_Msg_Delete): Likewise.
1565         * exp_pakd.adb (Install_PAT): Likewise.
1566         * freeze.adb (Freeze_Array_Type): Likewise.
1567         * sem_ch8.adb (Analyze_Object_Renaming): Likewise.
1568         * sem_ch13.adb (Inherit_Delayed_Rep_Aspects): Likewise.
1569         (Inherit_Aspects_At_Freeze_Point): Likewise.
1570         * sem_prag.adb (Set_Atomic_VFA): Likewise.
1571         (Process_Atomic_Independent_Shared_Volatile): Likewise.
1572         * sem_util.adb (Is_Atomic_Or_VFA_Object): Likewise.
1574 2015-05-22  Robert Dewar  <dewar@adacore.com>
1576         * exp_ch5.adb, layout.adb, einfo.adb, einfo.ads, sem_prag.adb,
1577         freeze.adb, freeze.ads, sem_util.adb, sem_util.ads, exp_ch2.adb,
1578         exp_ch4.adb, errout.adb, exp_aggr.adb, sem_ch13.adb: This is a general
1579         change that deals with the fact that most of the special coding for
1580         Atomic should also apply to the case of Volatile_Full_Access.
1581         A new attribute Is_Atomic_Or_VFA is introduced, and many of the
1582         references to Is_Atomic now use this new attribute.
1584 2015-05-22  Robert Dewar  <dewar@adacore.com>
1586         * exp_ch4.adb (Expand_N_Op_Eq): Introduce 'Machine for 'Result
1587         comparison.
1589 2015-05-22  Eric Botcazou  <ebotcazou@adacore.com>
1591         * sprint.adb (Source_Dump): When generating debug files, deal
1592         with the case of a stand-alone package instantiation by dumping
1593         together the spec and the body in the common debug file.
1595 2015-05-22  Robert Dewar  <dewar@adacore.com>
1597         * sem_ch13.adb (Minimum_Size): Size is zero for null range
1598         discrete subtype.
1600 2015-05-22  Hristian Kirtchev  <kirtchev@adacore.com>
1602         * einfo.adb (Anonymous_Master): This attribute now applies
1603         to package and subprogram bodies.
1604         (Set_Anonymous_Master): This attribute now applies to package and
1605         subprogram bodies.
1606         (Write_Field36_Name): Add output for package and subprogram bodies.
1607         * einfo.ads Update the documentation on attribute Anonymous_Master
1608         along with occurrences in entities.
1609         * exp_ch4.adb (Create_Anonymous_Master): Reimplemented to
1610         handle spec and body anonymous masters of the same unit.
1611         (Current_Anonymous_Master): Reimplemented. Handle a
1612         package instantiation that acts as a compilation unit.
1613         (Insert_And_Analyze): Reimplemented.
1615 2015-05-22  Ed Schonberg  <schonberg@adacore.com>
1617         * sem_ch10.adb (Analyze_With_Clause): A limited_with_clause on a
1618         predefined unit is treated as a regular with_clause.
1620 2015-05-22  Robert Dewar  <dewar@adacore.com>
1622         * sem_ch12.adb, prj.ads, makeutl.ads, sem_ch6.adb, prj-nmsc.adb,
1623         prj-conf.adb, sem_disp.adb: Minor reformatting.
1625 2015-05-22  Vincent Celier  <celier@adacore.com>
1627         * clean.adb (Parse_Cmd_Line): For native gnatclean, check
1628         for switch -P and, if found and gprclean is available, invoke
1629         silently gprclean.
1630         * make.adb (Initialize): For native gnatmake, check for switch -P
1631         and, if found and gprbuild is available, invoke silently gprbuild.
1633 2015-05-22  Eric Botcazou  <ebotcazou@adacore.com>
1635         * sem_ch13.adb (Validate_Unchecked_Conversions): Also issue
1636         specific warning for discrete types when the source is larger
1637         than the target.
1639 2015-05-22  Ed Schonberg  <schonberg@adacore.com>
1641         * einfo.ads, einfo.adb (Incomplete_Actuals): New attribute of
1642         package instantiations. Holds the list of actuals in the instance
1643         that are incomplete types, to determine where the corresponding
1644         instance body must be placed.
1645         * sem_ch6.adb (Conforming_Types): An incomplete type used as an
1646         actual in an instance matches an incomplete formal.
1647         * sem_disp.adb (Check_Dispatching_Call): Handle missing case of
1648         explicit dereference.
1649         (Inherited_Subprograms): In the presence of a limited view there
1650         are no subprograms to inherit.
1651         * sem_ch12.adb (Preanalyze_Actuals): Build list of incomplete
1652         actuals of instance, for later placement of instance body and
1653         freeze nodes for actuals.
1654         (Install_Body): In the presence of actuals that incomplete types
1655         from a limited view, the instance body cannot be placed after
1656         the declaration because full views have not been seen yet. Any
1657         use of the non-limited views in the instance body requires
1658         the presence of a regular with_clause in the enclosing unit,
1659         and will fail if this with_clause is missing.  We place the
1660         instance body at the beginning of the enclosing body, which is
1661         the unit being compiled, and ensure that freeze nodes for the
1662         full views of the incomplete types appear before the instance.
1664 2015-05-22  Pascal Obry  <obry@adacore.com>
1666         * makeutl.ads, prj-conf.adb, prj-nmsc.adb, prj.ads
1667         (In_Place_Option): Removed.
1668         (Relocate_Build_Tree_Option): New constant.
1669         (Root_Dir_Option): New constant.
1670         (Obj_Root_Dir): Removed.
1671         (Build_Tree_Dir): New variable.
1672         (Root_Src_Tree): Removed.
1673         (Root_Dir): New variable.
1674         * prj-conf.adb (Get_Or_Create_Configuration_File): Add check
1675         for improper relocation.
1676         * prj-nmsc.adb (Locate_Directory): Add check for improper
1677         relocation.
1679 2015-05-22  Hristian Kirtchev  <kirtchev@adacore.com>
1681         * einfo.adb (Default_Init_Cond_Procedure): Code cleanup. The
1682         attribute now applies to the base type.
1683         (Has_Default_Init_Cond): Now applies to the base type.
1684         (Has_Inherited_Default_Init_Cond): Now applies to the base type.
1685         (Set_Default_Init_Cond_Procedure): Code cleanup. The attribute now
1686         applies to the base type.
1687         (Set_Has_Default_Init_Cond): Now applies to the base type.
1688         (Set_Has_Inherited_Default_Init_Cond): Now applies to the base type.
1689         * exp_ch3.adb (Expand_N_Object_Declaration): No need to use the
1690         base type when adding a call to the Default_Initial_Condition.
1692 2015-05-22  Hristian Kirtchev  <kirtchev@adacore.com>
1694         * einfo.adb: Node36 is now used as Anonymous_Master. Flag253
1695         is now unused.
1696         (Anonymous_Master): New routine.
1697         (Has_Anonymous_Master): Removed.
1698         (Set_Anonymous_Master): New routine.
1699         (Set_Has_Anonymous_Master): Removed.
1700         (Write_Entity_Flags): Remove the output for Has_Anonymous_Maser.
1701         (Write_Field36_Name): Add output for Anonymous_Master.
1702         * einfo.ads Add new attribute Anonymous_Master along with
1703         occurrences in nodes. Remove attribute Has_Anonymous_Master along
1704         with occurrences in nodes.
1705         (Anonymous_Master): New routine along with pragma Inline.
1706         (Has_Anonymous_Master): Removed along with pragma Inline.
1707         (Set_Anonymous_Master): New routine along with pragma Inline.
1708         (Set_Has_Anonymous_Master): Removed along with pragma Inline.
1709         * exp_ch4.adb (Create_Anonymous_Master): New routine.
1710         (Current_Anonymous_Master): Reimplemented.
1712 2015-05-22  Bob Duff  <duff@adacore.com>
1714         * freeze.adb (Freeze_Profile): Suppress warning if imported
1715         subprogram is not at library level.
1717 2015-05-22  Robert Dewar  <dewar@adacore.com>
1719         * sem_ch8.adb (Analyze_Object_Renaming): Check for renaming
1720         component of an object to which Volatile_Full_Access applies.
1722 2015-05-22  Jerome Guitton  <guitton@adacore.com>
1724         * exp_dbug.ads: Add note about non bit-packed arrays.
1726 2015-05-22  Eric Botcazou  <ebotcazou@adacore.com>
1728         * sem_prag.adb: Fix typo.
1729         * einfo.ads: Grammar fixes in comments.
1731 2015-05-22  Bob Duff  <duff@adacore.com>
1733         * a-cborma.ads, a-cidlli.ads, a-cimutr.ads, a-ciormu.ads,
1734         * a-cihase.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
1735         * a-cborse.ads, a-comutr.ads, a-ciorma.ads, a-cobove.ads,
1736         * a-coormu.ads, a-convec.ads, a-cohase.ads, a-coinho.ads,
1737         * a-cbdlli.ads, a-cbmutr.ads, a-cbhase.ads, a-cdlili.ads,
1738         * a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
1739         * a-coinho-shared.ads (Constant_Reference_Type, Reference_Type):
1740         Add an initialization expression "raise Program_Error". See,
1741         for example, RM-A.18.2(148.4).
1743 2015-05-22  Robert Dewar  <dewar@adacore.com>
1745         * debug.adb: Update documentation.
1746         * einfo.ads, einfo.adb (Needs_Typedef): New flag
1747         * exp_unst.adb (Unnest_Subprogram): Mark AREC types as needing
1748         typedef's in C.
1749         * frontend.adb: Update comments.
1750         * gnat1drv.adb (Adjust_Global_Switches): Set all needed flags
1751         for -gnatd.V
1752         * opt.ads (Generate_C_Code): New switch.
1753         * osint-c.adb (Write_C_File_Info): Removed, not used
1754         (Write_H_File_Info): Removed, not used
1755         * osint-c.ads (Write_C_File_Info): Removed, not used
1756         (Write_H_File_Info): Removed, not used
1757         * osint.ads (Write_Info): Minor comment updates.
1758         (Output_FD): Moved from private part to public part of spec.
1759         * sem.adb (Semantics): Force expansion on if in Generate_C_Code
1760         mode.
1761         * atree.ads: minor typo in comment.
1762         * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
1763         Do not allow VFA on composite object with aliased component.
1765 2015-05-22  Arnaud Charlet  <charlet@adacore.com>
1767         * osint-c.adb, osint-c.ads (Set_File_Name): Move back to spec.
1769 2015-05-22  Pascal Obry  <obry@adacore.com>
1771         * prj-util.adb: Minor comment editing.
1773 2015-05-22  Pascal Obry  <obry@adacore.com>
1775         * makeutl.ads (In_Place_Option): New constant.
1776         * prj.ads (Obj_Root_Dir): New variable (absolute path to relocate
1777         objects).
1778         (Root_Src_Tree): New variable (absolute path of root source tree).
1779         * prj-conf.adb (Do_Autoconf): Take into account the object root
1780         directory (if defined) to generate configuration project.
1781         * prj-nmsc.adb (Get_Directories): Handle case where Obj_Root_Dir
1782         is defined.
1783         (Locate_Directory): Likewise.
1785 2015-05-22  Pascal Obry  <obry@adacore.com>
1787         * prj-util.ads, prj-util.adb (Relative_Path): New routine.
1789 2015-05-22  Bob Duff  <duff@adacore.com>
1791         * exp_utils.ads, exp_utils.adb (Find_Optional_Prim_Op): New
1792         interface to return Empty when not found, so we can avoid handling
1793         Program_Error in that case.
1794         (Find_Prim_Op): Fix latent bug: raise Program_Error when there are no
1795         primitives.
1796         * exp_ch7.adb, sem_util.adb: Use Find_Optional_Prim_Op when the
1797         code is expecting Empty.
1798         * sem_ch8.adb: Use Find_Optional_Prim_Op to avoid handling
1799         Program_Error.
1801 2015-05-22  Robert Dewar  <dewar@adacore.com>
1803         * sem_ch3.adb, sem_intr.adb, exp_ch4.adb, s-rannum.adb,
1804         sem_eval.adb, s-fatgen.adb, s-expmod.ads: Remove incorrect hyphen in
1805         non-binary.
1806         * exp_util.adb: Add comment.
1807         * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move from spec to
1808         body.
1809         (Set_File_Name): New name for the above.
1810         (Create_C_File, Create_H_File, Write_C_File_Info, Write_H_File_Info,
1811         Close_C_File, Close_H_File): New procedure.
1812         * osint.adb: Minor reformatting.
1813         * osint.ads: Minor comment updates.
1815 2015-05-22  Robert Dewar  <dewar@adacore.com>
1817         * exp_ch4.adb: Minor rewording.
1818         * exp_util.ads: Clarify that Find_Prim_Op is only for
1819         tagged types.
1821 2015-05-22  Robert Dewar  <dewar@adacore.com>
1823         * atree.adb, atree.ads, treepr.adb: Change name Needs_Actuals_Check to
1824         Check_Actuals.
1825         * exp_ch4.adb (Expand_N_Op_Expon): Optimize 2**x in modular
1826         and overflow cases.
1828 2015-05-22  Eric Botcazou  <ebotcazou@adacore.com>
1830         * exp_pakd.adb (Install_PAT): Propagate representation aspects
1831         from the original array type to the PAT.
1833 2015-05-22  Robert Dewar  <dewar@adacore.com>
1835         * treepr.adb (Print_Node_Header): Add output of Needs_Actuals_Check.
1837 2015-05-22  Robert Dewar  <dewar@adacore.com>
1839         * atree.adb, atree.ads (Needs_Actuals_Check): New flag.
1841 2015-05-22  Hristian Kirtchev  <kirtchev@adacore.com>
1843         * sem_prag.adb (Analyze_Pragma): Remove the detection
1844         of a useless Part_Of indicator when the related item is a constant.
1845         (Check_Matching_Constituent): Do not emit an error on a constant.
1846         (Check_Missing_Part_Of): Do not check for a missing Part_Of indicator
1847         when the related item is a constant.
1848         (Collect_Body_States): Code cleanup.
1849         (Collect_Visible_States): Code cleanup.
1850         (Report_Unused_States): Do not emit an error on a constant.
1851         * sem_util.ads, sem_util.adb (Has_Variable_Input): Removed.
1853 2015-05-22  Eric Botcazou  <ebotcazou@adacore.com>
1855         * sem_ch8.adb (Analyze_Object_Renaming): Copy
1856         Has_Volatile_Full_Access from renamed to renaming entities.
1857         * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
1858         Tidy up and remove redundant setting of Has_Volatile_Full_Access.
1860 2015-05-22  Hristian Kirtchev  <kirtchev@adacore.com>
1862         * ghost.adb (Check_Ghost_Completion): Update references to SPARK
1863         RM 6.9 rules.
1864         (Check_Ghost_Policy): Update references to SPARK RM 6.9 rules.
1865         * sem_ch3.adb (Analyze_Object_Declaration): Update references
1866         to SPARK RM 6.9 rules.
1867         (Check_Completion): Ghost entities do not require a special form of
1868         completion.
1869         * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Update references
1870         to SPARK RM 6.9 rules.
1871         (Analyze_Subprogram_Body_Helper): Update references to SPARK RM 6.9
1872         rules.
1873         * sem_ch7.adb (Analyze_Package_Body_Helper): Update references
1874         to SPARK RM 6.9 rules.
1875         (Requires_Completion_In_Body): Ghost entities do not require a special
1876         form of completion.
1878 2015-05-22  Robert Dewar  <dewar@adacore.com>
1880         * a-csquin.ads: Use Ada 2012 notation.
1881         * sem_ch8.adb: Minor reformatting.
1883 2015-05-22  Hristian Kirtchev  <kirtchev@adacore.com>
1885         * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect Import
1886         acts as a completion.
1888 2015-05-22  Ed Schonberg  <schonberg@adacore.com>
1890         * sem_ch13.adb: Minor reformatting.
1892 2015-05-22  Jose Ruiz  <ruiz@adacore.com>
1894         * a-reatim.adb: Minor change, fix typo.
1896 2015-05-22  Robert Dewar  <dewar@adacore.com>
1898         * sem_util.ads: Minor addition of ??? comment.
1899         * sem_prag.adb, sem_util.adb: Minor reformatting.
1900         * sem_ch13.adb: minor reformatting.
1902 2015-05-22  Robert Dewar  <dewar@adacore.com>
1904         * a-reatim.ads: Add Compile_Time_Error to ensure Duration
1905         is 64-bits.
1906         * sem_ch13.adb: Improve error message.
1907         * exp_ch4.adb: Minor reformatting.
1909 2015-05-22  Hristian Kirtchev  <kirtchev@adacore.com>
1911         * sem_prag.adb (Analyze_Pragma): Constants without variable
1912         input do not require indicator Part_Of.
1913         (Check_Missing_Part_Of): Constants without variable input do not
1914         requrie indicator Part_Of.
1915         (Collect_Visible_States): Constants without variable input are
1916         not part of the hidden state of a package.
1917         * sem_util.ads, sem_util.adb (Has_Variable_Input): New routine.
1919 2015-05-22  Robert Dewar  <dewar@adacore.com>
1921         * exp_util.adb (Activate_Atomic_Synchronization): Do not set
1922         Atomic_Sync_Required for an object renaming declaration.
1923         * sem_ch8.adb (Analyze_Object_Renaming): Copy Is_Atomic and
1924         Is_Independent to renaming object.
1926 2015-05-22  Ed Schonberg  <schonberg@adacore.com>
1928         * sem_ch5.adb (Analyze_Iterator_Specification): Diagnose
1929         various illegalities in iterators over arrays and containers:
1930         a) New function Get_Cursor_Type, to verify that the cursor is
1931         not a limited type at the point of iteration.
1932         b) If the container is a constant, an element_iterator is illegal
1933         if the container type does not have a Constant_Indexing aspect.
1934         c) If the iterate function has an in-out controlling parameter,
1935         the container cannot be a constant object.
1936         d) Reject additional cases of iterators over a
1937         discriminant-dependent component of a mutable object.
1939 2015-05-21  Hristian Kirtchev  <kirtchev@adacore.com>
1941         * einfo.adb (Contract): This attribute now applies to constants.
1942         (Set_Contract): This attribute now applies to constants.
1943         (Write_Field34_Name): Add output for constants.
1944         * einfo.ads Attribute Contract now applies to constants.
1945         * sem_ch3.adb (Analyze_Object_Contract): Constants now have
1946         their Part_Of indicator verified.
1947         * sem_prag.adb (Analyze_Constituent): A constant is now a valid
1948         constituent.
1949         (Analyze_Global_Item): A constant cannot act as an output.
1950         (Analyze_Initialization_Item): Constants are now a valid
1951         initialization item.
1952         (Analyze_Initializes_In_Decl_Part): Rename
1953         global variable States_And_Vars to States_And_Objs and update
1954         all its occurrences.
1955         (Analyze_Input_Item): Constants are now a
1956         valid initialization item. Remove SPARM RM references from error
1957         messages.
1958         (Analyze_Pragma): Indicator Part_Of can now apply to a constant.
1959         (Collect_Body_States): Collect both source constants
1960         and variables.
1961         (Collect_States_And_Objects): Collect both source constants and
1962         variables.
1963         (Collect_States_And_Variables): Rename
1964         to Collect_States_And_Objects and update all its occurrences.
1965         (Collect_Visible_States): Do not collect constants and variables
1966         used to map generic formals to actuals.
1967         (Find_Role): The role of a constant is that of an input. Separate the
1968         role of a variable from that of a constant.
1969         (Report_Unused_Constituents): Add specialized wording for constants.
1970         (Report_Unused_States): Add specialized wording for constants.
1971         * sem_util.adb (Add_Contract_Item): Add processing for constants.
1972         * sem_util.ads (Add_Contract_Item): Update the comment on usage.
1973         (Find_Placement_In_State_Space): Update the comment on usage.
1975 2015-05-21  Ed Schonberg  <schonberg@adacore.com>
1977         * sem_ch5.adb: minor reformatting.
1979 2015-05-21  Robert Dewar  <dewar@adacore.com>
1981         * freeze.adb (Freeze_Entity): Properly tag -gnatw.z messages.
1983 2015-05-21  Robert Dewar  <dewar@adacore.com>
1985         * freeze.adb: Minor reformatting.
1986         * cstand.adb (Print_Standard): Fix bad printing of Duration
1987         low bound.
1988         * a-reatim.adb (Time_Of): Complete rewrite to properly detect
1989         out of range args.
1991 2015-05-21  Ed Schonberg  <schonberg@adacore.com>
1993         * sem_ch5.adb: add (useless) initial value.
1994         * sem_ch3.adb (Replace_Anonymous_Access_To_Protected_Subprogram):
1995         Check whether the procedure has parameters before processing
1996         formals in ASIS mode.
1998 2015-05-21  Ed Schonberg  <schonberg@adacore.com>
2000         * sem_ch13.adb (Check_Iterator_Functions): Emit error on Iterator
2001         aspect as well when indexing function is illegal.
2002         (Valid_Default_Iterator): Handle properly somme illegal cases
2003         to prevent compilation abandoned messages.
2004         (Check_Primitive_Function): Verify that type and indexing function
2005         are in the same scope.
2006         * freeze.adb (Freeze_Record): Extend patch on the presence of
2007         indexing aspects to aspect Default_Iterator.
2009 2015-05-19  David Malcolm  <dmalcolm@redhat.com>
2011         * gcc-interface/trans.c (Sloc_to_locus1): Strenghthen local "map"
2012         from line_map * to line_map_ordinary *.
2014 2015-05-12  Jason Merrill  <jason@redhat.com>
2016         * sigtramp-vxworks.c: Add space between string literal and macro
2017         name.
2019 2015-05-12  Arnaud Charlet  <charlet@adacore.com>
2021         * gnat_rm.texi, gnat_ugn.texi, doc: Documentation updates and clean ups
2023 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
2025         * sem_ch5.adb (Analyze_Iterator_Specifications): Additional
2026         legality checks for array and container iterators:
2027         a) The domain of iteration cannot be a component that depends
2028         on discriminants of a mutable object. The check was recently
2029         added for element iterators.
2030         b) The cursor type cannot be a limited type at the point of the
2031         iteration, because the cursor will be assigned to in the body
2032         of the loop.
2034 2015-05-12  Robert Dewar  <dewar@adacore.com>
2036         * freeze.adb (Freeze_Record_Type): Make sure that if we have
2037         aspect Iterator_Element, then we have either Constant_Indexing
2038         or Variable_Indexing.
2040 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
2042         * a-coormu.ads, a-coormu.adb: Add Indexing aspect, Reference_Type,
2043         and Reference_Control_Type to support element iterators over
2044         ordered multisets.
2045         * a-ciormu.ads, a-ciormu.adb: Ditto for
2046         indefinite_ordered_multisets.
2048 2015-05-12  Hristian Kirtchev  <kirtchev@adacore.com>
2050         * exp_ch4.adb (Expand_N_Expression_With_Actions): Force
2051         the evaluation of the EWA expression.  Code cleanup.
2052         (Process_Transient_Object): Code cleanup.
2053         * exp_util.adb (Is_Aliased): Controlled transient objects found
2054         within EWA nodes are not aliased.
2055         (Is_Finalizable_Transient): Iterators are not finalizable transients.
2057 2015-05-12  Robert Dewar  <dewar@adacore.com>
2059         * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
2060         Don't allow Atomic and Volatile_Full_Access for the same entity.
2062 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
2064         * sem_ch5.adb (Analyze_Iterator_Specification): Implement new
2065         semantics and safety checks specified in AI12-0151.
2067 2015-05-12  Pierre-Marie de Rodat  <derodat@adacore.com>
2069         * sem_ch10.adb (Sem_Ch10.Analyze_Proper_Body): Generate SCOs
2070         for subunit in generic units.
2072 2015-05-12  Robert Dewar  <dewar@adacore.com>
2074         * sem_elab.adb (Check_A_Call): Avoid checking internal call
2075         from Valid_Scalars
2077 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
2079         * sem_ch6.adb (Process_Formals): An untagged incomplete type
2080         is legal in the profile of a null procedure.
2082 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
2084         * sem_ch12.adb (Validate_Derived_Type_Instance): Handle properly
2085         the checks on a derived formal whose parent type is a previous
2086         formal that is not a derived type.
2088 2015-05-12  Robert Dewar  <dewar@adacore.com>
2090         * aspects.ads, aspects.adb: Add entries for aspect Volatile_Full_Access
2091         * einfo.adb (Has_Volatile_Full_Access): New flag.
2092         (Has_Volatile_Full_Access): New flag.
2093         * einfo.ads (Has_Volatile_Full_Access): New flag.
2094         * par-prag.adb: Add dummy entry for Volatile_Full_Access.
2095         * sem_prag.adb (Analyze_Pragma, case Volatile_Full_Access):
2096         Implement new pragma.
2097         * snames.ads-tmpl: Add entries for pragma Volatile_Full_Access.
2099 2015-05-12  Robert Dewar  <dewar@adacore.com>
2101         * targparm.ads: Minor reformatting.
2103 2015-05-12  Robert Dewar  <dewar@adacore.com>
2105         * a-reatim.adb (Time_Of): Properly detect overflow when TS = 0.0.
2106         * a-reatim.ads: Minor reformatting.
2108 2015-05-12  Hristian Kirtchev  <kirtchev@adacore.com>
2110         * einfo.ads: Update the documentation of flags
2111         Has_Inherited_Default_Init_Cond and Has_Default_Init_Cond.
2113 2015-05-12  Robert Dewar  <dewar@adacore.com>
2115         * impunit.adb: Add entry for a-dhfina.ads
2116         * a-dhfina.ads: New file.
2118 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
2120         * exp_ch5.adb (Expand_Iterator_Loop_Over_Array): if the array
2121         type has convention Fortran, a multidimensional iterator varies
2122         the first dimension fastest.
2124 2015-05-12  Hristian Kirtchev  <kirtchev@adacore.com>
2126         * einfo.adb: Node32 is now used as Encapsulating_State.
2127         Node37 is now used as Associated_Entity.
2128         (Associated_Entity): New routine.
2129         (Encapsulating_State): Update the assertion guard to include constants.
2130         (Set_Associated_Entity): New routine.
2131         (Set_Encapsulating_State): Update the assertion guard to
2132         include constants.
2133         (Write_Field10_Name): Remove the output for Encapsulating_State.
2134         (Write_Field32_Name): Add output for Encapsulating_State.
2135         (Write_Field37_Name): Add output for Associated_Entity.
2136         * einfo.ads New attribute Associated_Entity along with placement
2137         in entities. Attribute Encapsulating_State now uses Node32.
2138         (Associated_Entity): New routine along with pragma Inline.
2139         (Set_Associated_Entity): New routine along with pragma Inline.
2140         * inline.ads Code reformatting.
2141         * sem_attr.adb (Analyze_Attribute): Correct the prefix of
2142         attribute 'Result when the context is a generic instantiation.
2143         (Analyze_Attribute_Old_Result): Pragmas Depends and
2144         Refined_Depends are a valid context for attribute 'Result.
2145         (Denote_Same_Function): Allow attribute 'Result to denote
2146         generic functions.
2147         * sem_ch3.adb Add with and use clauses for Sem_Ch12.
2148         (Analyze_Declarations): Capture global references within the
2149         contracts of packages, subprograms and their respective bodies.
2150         * sem_ch6.adb (Analyze_Aspects_On_Body_Or_Stub): Removed.
2151         (Analyze_Completion_Contract): Removed.
2152         (Analyze_Generic_Subprogram_Body): Enchange the aspects after
2153         creating the generic copy. Create a generic contract for the
2154         template. Analyze the aspects of the generic body. Analyze the
2155         contract of the generic body when it is a compilation unit and
2156         capture global references.
2157         (Analyze_Subprogram_Body_Contract): Code cleanup.
2158         (Analyze_Subprogram_Contract): Do not save global references here.
2159         (Save_Global_References_In_List): Removed.
2160         * sem_ch7.adb (Analyze_Package_Body_Contract): Code cleanup.
2161         (Analyze_Package_Body_Helper): Create a generic contract for
2162         the template.
2163         (Analyze_Package_Contract): Code cleanup.
2164         * sem_ch10.adb Add with and use clauses for Sem_Ch12.
2165         (Analyze_Compilation_Unit): Capture global references in a
2166         generic subprogram declaration that acts as a compilation unit.
2167         * sem_ch12.adb Add with and use clauses for Sem_Prag. Illustrate
2168         the implementation of generic contracts. Alphabetize various
2169         subprograms.
2170         (Analyze_Generic_Package_Declaration):
2171         Create a generic contract for the template.
2172         (Analyze_Generic_Subprogram_Declaration): Create a generic
2173         contract for the template.
2174         (Analyze_Subprogram_Instantiation): Instantiate the contract of the
2175         subprogram.
2176         (Copy_Generic_Node): Link defining entities of the generic template
2177         with the corresponding defining entities of the generic copy. Update
2178         the processing of pragmas.
2179         (Instantiate_Contract): Removed.
2180         (Instantiate_Subprogram_Contract): New routine.
2181         (Requires_Delayed_Save): New routine.
2182         (Save_Global_References): Rename formal parameter N to Templ. Various
2183         cleanups.
2184         (Save_Global_References_In_Aspects): Moved from the spec.
2185         (Save_Global_References_In_Contract): New routine.
2186         (Save_References_In_Aggregate): New routine.
2187         (Save_References_In_Char_Lit_Or_Op_Symbol): New routine.
2188         (Save_References_In_Descendants): New routine.
2189         (Save_References_In_Identifier): New routine.
2190         (Save_References_In_Operator): New routine.
2191         (Save_References_In_Pragma): New routine.
2192         * sem_ch12.ads (Save_Global_References): Rename formal
2193         parameter N to Templ. Update the comment on usage.
2194         (Save_Global_References_In_Aspects): Moved to the body.
2195         (Save_Global_References_In_Contract): New routine.
2196         * sem_ch13.adb (Analyze_Aspect_Specifications_On_Body_Or_Stub):
2197         New routine.
2198         * sem_ch13.ads (Analyze_Aspect_Specifications_On_Body_Or_Stub):
2199         New routine.
2200         * sem_prag.adb (Add_Item_To_Name_Buffer): Add support for
2201         generic parameters.
2202         (Analyze_Contract_Cases_In_Decl_Part): Code cleanup.
2203         (Analyze_Depends_Global): New routine.
2204         (Analyze_Depends_In_Decl_Part): Code cleanup.
2205         (Analyze_Global_In_Decl_Part): Code cleanup.
2206         (Analyze_Global_Item): Constants are now valid global items. Do
2207         not perform state-related checks in an instance. Change the way
2208         renamings are handled.  (Analyze_Initial_Condition_In_Decl_Part):
2209         Code cleanup.
2210         (Analyze_Initializes_In_Decl_Part): Code cleanup.
2211         (Analyze_Input_Output): The analysis of attribute 'Result in
2212         the context of pragmas Depends or Refined_Depends now reuses
2213         the existing attribute analysis machinery. Constants and
2214         generic parameters are now valid dependency items. Do not
2215         perform state-related checks in an instance. Change the way
2216         renamings are handled.  (Analyze_Pragma): Add a "characteristics"
2217         section for pragmas Abstract_State, Contract_Cases, Depends,
2218         Extensions_Visible, Global, Initial_Condition, Initializes,
2219         Post, Post_Class, Postcondition, Pre, Pre_Class, Precondition,
2220         Refined_Depends, Refined_Global, Refined_Post, Refined_State, Test_Case.
2221         (Analyze_Pre_Post_Condition): Do not create a generic
2222         template here.
2223         (Analyze_Pre_Post_Condition_In_Decl_Part): Code cleanup.
2224         (Analyze_Refined_Depends_Global_Post): New routine.
2225         (Analyze_Refined_Depends_In_Decl_Part): Code cleanup.
2226         (Analyze_Refined_Global_In_Decl_Part): Code cleanup.
2227         (Analyze_Refined_Pragma): Removed.
2228         (Analyze_Refined_State_In_Decl_Part): Code cleanup.
2229         (Analyze_Test_Case_In_Decl_Part): Code cleanup.
2230         (Check_Dependency_Clause): Do not perform this check in an instance.
2231         (Check_Function_Return): Add support for generic functions.
2232         (Check_In_Out_States): Do not perform this check in an instance.
2233         (Check_Input_States): Do not perform this check in an instance.
2234         (Check_Mode_Restriction_In_Function): Add support for generic functions.
2235         (Check_Output_States): Do not perform this check in an instance.
2236         (Check_Postcondition_Use_In_Inlined_Subprogram): Rename
2237         parameter Subp_Id to Spec_Id and update comment on usage.
2238         (Check_Proof_In_States): Do not perform this check in an instance.
2239         (Check_Refined_Global_Item): Add support for constants.
2240         (Check_Refined_Global_List): Do not perform this check in an instance.
2241         (Collect_Global_Items): Reimplemented.
2242         (Collect_Subprogram_Inputs_Outputs): Add support for generic parameters.
2243         (Create_Generic_Template): Removed.
2244         (Find_Related_Package_Or_Body): Moved to spec.
2245         (Find_Role): Add support for generic parameters and constants.
2246         (Get_Argument): Moved to spec. Rename parameter Spec_Id to Context_Id.
2247         (Match_Item): Add support for constants.
2248         (Preanalyze_Test_Case_Arg): Reimplemented.
2249         (Report_Extra_Clauses): Do not perform this check in an instance.
2250         (Report_Extra_Constituents): Do not perform this check in an instance.
2251         * sem_prag.ads (Collect_Subprogram_Inputs_Outputs): Update
2252         the comment on usage.
2253         (Find_Related_Package_Or_Body): Moved from body.
2254         (Get_Argument): Moved from body.
2255         * sem_util.adb Add with and use clauses for Sem_Ch12.
2256         (Corresponding_Spec_Of): Add support for packages and package bodies.
2257         (Create_Generic_Contract): New routine.
2258         (Is_Contract_Annotation): Reimplemented.
2259         (Is_Generic_Declaration_Or_Body): New routine.
2260         (Is_Package_Contract_Annotation): New routine.
2261         (Is_Subprogram_Contract_Annotation): New routine.
2262         * sem_util.ads (Corresponding_Spec_Of): Update the comment on usage.
2263         (Create_Generic_Contract): New routine.
2264         (Is_Generic_Declaration_Or_Body): New routine.
2265         (Is_Package_Contract_Annotation): New routine.
2266         (Is_Subprogram_Contract_Annotation): New routine.
2267         * sinfo.adb (Is_Generic_Contract_Pragma): New routine.
2268         (Set_Is_Generic_Contract_Pragma): New routine.
2269         * sinfo.ads Add new attribute Is_Generic_Contract_Pragma along
2270         with occurrences in nodes.
2271         (Is_Generic_Contract_Pragma): New routine along with pragma Inline.
2272         (Set_Is_Generic_Contract_Pragma): New routine along with pragma Inline.
2273         * treepr.adb (Print_Entity_Info): Output fields 36 to 41.
2275 2015-05-12  Robert Dewar  <dewar@adacore.com>
2277         * a-taster.ads: Minor comment fix: fix bad header, this is a
2278         pure RM unit.
2280 2015-05-12  Robert Dewar  <dewar@adacore.com>
2282         * sem_intr.adb: (Check_Shift): Diagnose bad modulus value.
2284 2015-05-12  Robert Dewar  <dewar@adacore.com>
2286         * gnat1drv.adb (Adjust_Global_Switches): Default to suppressing
2287         Alignment_Checks on non-strict alignment machine.
2288         * sem_ch13.adb (Validate_Address_Clauses): Don't give
2289         compile-time alignment warnings if run time Alignment_Check
2290         is suppressed.
2292 2015-05-12  Thomas Quinot  <quinot@adacore.com>
2294         * g-sercom.ads, g-sercom-linux.adb (GNAT.Serial_Communications.
2295         Data_Rate): New literals B75, B110, B150, B300, B600.
2297 2015-05-12  Doug Rupp  <rupp@adacore.com>
2299         * init.c (__gnat_init_float) [vxworks]: For e500v2,
2300         do nothing and leave the responsibility to install the handler
2301         and enable the exceptions to the BSP.
2303 2015-05-12  Robert Dewar  <dewar@adacore.com>
2305         * sem_ch9.adb, einfo.ads, exp_intr.adb: Minor reformatting.
2306         * sem_disp.adb: Minor code reorganization (remove junk redundant
2307         null statement).
2308         * exp_unst.adb (Unnest_Subprogram.Uplev_Refs): Ignore uplevel
2309         references to bounds of types coming from original type reference.
2310         * checks.ads: Minor reformatting.
2311         * checks.adb: Minor reformatting.
2312         * sem_prag.adb (Analyze_Pragma, case Check): If in ignored
2313         assertion, then make sure we do not drag in bignum stuff.
2315 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
2317         * sem_ch9.adb (Collect_Interfaces): Initialize
2318         Direct_Primitive_Operations for a tagged synchronized type,
2319         so it can used in ASIS mode.
2320         * sem_disp.adb (Check_Dispatching_Operation): If expansion is
2321         disabled, attach subprogram to list of Direct_Primitive_Operations
2322         of synchronized type itself, for ASIS use, because in this case
2323         Corresponding_Record_Type is not built.
2324         * einfo.ads: Indicate use of Direct_Primitive_Operations on
2325         synchronized type.
2327 2015-05-12  Pierre-Marie de Rodat  <derodat@adacore.com>
2329         * exp_pakd.adb: Make clearer the comment in exp_pakd.adb about
2330         ___XP suffixes.
2332 2015-05-12  Robert Dewar  <dewar@adacore.com>
2334         * sem_ch3.adb, sem_util.adb, sem_ch6.adb: Minor reformatting.
2336 2015-05-12  Robert Dewar  <dewar@adacore.com>
2338         * exp_unst.adb (Visit_Node): Deal with subprogram and package stubs.
2340 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
2342         * exp_intr.adb (Expand_Dispatching_Constructor_Call): The
2343         tag to be retrieved for the generated call is the first entry
2344         in the dispatch table for the return type of the instantiated
2345         constructor.
2347 2015-05-12  Bob Duff  <duff@adacore.com>
2349         * exp_ch7.adb, exp_ch7.ads, exp_intr.adb, exp_util.adb,
2350         exp_util.ads: Update comments.
2352 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
2354         * sem_ch3.adb (Add_Internal_Interface_Entities): Do no generate
2355         freeze nodes for these in ASIS mode, because they lead to
2356         elaoration order issues in gigi.
2358 2015-05-12  Hristian Kirtchev  <kirtchev@adacore.com>
2360         * sem_ch6.adb (Analyze_Expression_Function): Code
2361         cleanup. Use Copy_Subprogram_Spec to create a proper spec.
2362         (Analyze_Subprogram_Body_Helper): Code cleanup. Do not
2363         prepare a stand alone body for inlining in GNATprove mode
2364         when inside a generic.  (Body_Has_Contract): Reimplemented.
2365         (Build_Subprogram_Declaration): New routine.
2366         * sem_ch10.adb (Analyze_Compilation_Unit): Capture global
2367         references within generic bodies by loading them.
2368         * sem_util.adb (Copy_Parameter_List): Code cleanup.
2369         (Copy_Subprogram_Spec): New routine.
2370         (Is_Contract_Annotation): New routine.
2371         * sem_util.ads (Copy_Subprogram_Spec): New routine.
2372         (Is_Contract_Annotation): New routine.
2374 2015-05-12  Hristian Kirtchev  <kirtchev@adacore.com>
2376         * sem_attr.adb (Resolve_Attribute): Do not analyze the generated
2377         body of an expression function when the prefix of attribute
2378         'Access is the body.
2380 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
2382         * sem_ch3.adb (Build_Derived_Enumeration_Type): The anonymous base
2383         created for a derived enumeration type is not a first subtype,
2384         even though it is defined through a full type declaration.
2385         * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): Do not process
2386         aspects for the anonymous base type constructed for a derived
2387         scalar type, because they will be set when the first subtype
2388         is frozen.
2389         (Inherit_Aspects_At_Freeze_Point): Fix typos on handling of
2390         Default_Value and Default_Component_Value, that prevented the
2391         proper inheritance of these aspects.
2393 2015-05-12  Gary Dismukes  <dismukes@adacore.com>
2395         * exp_ch6.adb, exp_unst.adb: Minor typo fixes.
2397 2015-05-12  Robert Dewar  <dewar@adacore.com>
2399         * sem_ch3.adb: Minor reformatting.
2401 2015-05-12  Vincent Celier  <celier@adacore.com>
2403         * gnatcmd.adb: If we want to invoke gnatmake (gnatclean) with
2404         -P, then check if gprbuild (gprclean) is available; if it is,
2405         use gprbuild (gprclean) instead of gnatmake (gnatclean).
2407 2015-05-12  Robert Dewar  <dewar@adacore.com>
2409         * debug.adb: Add flag -gnatd.3 to output diagnostic info from
2410         Exp_Unst.
2411         * einfo.ad, einfo.adb: Reorganize (and remove most of) flags used by
2412         Exp_Unst.
2413         * exp_ch6.adb (Unest_Bodies): Table for delayed calls to
2414         Unnest_Subprogram (Expand_N_Subprogram_Body): Add entry to table
2415         for later call instead of calling Unnest_Subprogram directly
2416         (Initialize): New procedure (Unnest_Subprograms): New procedure
2417         * exp_ch6.ads (Add_Extra_Actual_To_Call): Move into proper
2418         alpha order.
2419         (Initialize): New procedure.
2420         (Unnest_Subprograms): New procedure.
2421         * exp_unst.adb (Unnest_Subprogram): Major rewrite, moving
2422         all processing to this routine which is now called late
2423         after instantiating bodies. Fully handles the case of generic
2424         instantiations now.
2425         * exp_unst.ads: Major rewrite, moving all processing to
2426         Unnest_Subprogram.
2427         * frontend.adb (Frontend): Add call to Exp_Ch6.Initialize.
2428         (Frontend): Add call to Unnest_Subprograms.
2429         * sem_ch8.adb (Find_Direct_Name): Back to old calling sequence
2430         for Check_Nested_Access.
2431         * sem_util.adb (Build_Default_Subtype): Minor reformatting
2432         (Check_Nested_Access): Back to original VM-only form (we
2433         now do all the processing for Unnest_Subprogram at the time
2434         it is called.
2435         (Denotes_Same_Object): Minor reformatting
2436         (Note_Possible_Modification): Old calling sequence for
2437         Check_Nested_Access.
2438         * sem_util.ads (Check_Nested_Access): Back to original VM-only
2439         form (we now do all the processing for Unnest_Subprogram at the
2440         time it is called.
2442 2015-05-12  Robert Dewar  <dewar@adacore.com>
2444         * sem_ch3.adb, freeze.adb, sem_ch6.adb: Minor reformatting.
2446 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
2448         * sem_ch3.adb (Analyze_Object_Declaration): New function
2449         Has_Delayed_Aspect, used to defer resolution of an aggregate
2450         expression when the object declaration carries aspects Address
2451         and/or Alignment.
2452         * freeze.adb (Freeze_Object_Declaration): New subsidiary procedure
2453         to Freeze_Entity.  In addition to the previous processing steps
2454         at the freeze point of an object, this procedure also handles
2455         aggregates in object declarations, when the declaration carries
2456         delayed aspects that require that the initialization of the
2457         object be attached to its freeze actions.
2459 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
2461         * sem_ch6.adb (Analyze_Subprogram_Declaration): Following
2462         AI12-0147, null procedures and expression functions are allowed
2463         in protected bodies.
2465 2015-05-12  Tristan Gingold  <gingold@adacore.com>
2467         * i-cpoint.adb (Copy_Terminated_Array): Copy nothing if Length is 0.
2469 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
2471         * sem_ch3.adb (Complete_Private_Subtype): Propagate
2472         Has_Delayed_Aspects flag from private to full view, to ensure
2473         that predicate functions are constructed.
2475 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
2477         * sem_ch6.adb (Process_Formals): If a tagged formal is an
2478         incomplete class-wide type, the subprogram must have a delayed
2479         freeze even though the opertation is not a primitive of the
2480         type. THis ensures that the backend can recover the full view
2481         when elaborating the subprogram declaration.
2483 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
2485         * exp_util.adb (Get_Current_Value_Condition): Nothing to be
2486         done if an elsif part has been rewritten so that it is not part
2487         of an enclosing if_statement.
2489 2015-05-12  Robert Dewar  <dewar@adacore.com>
2491         * sem_type.adb, sem_ch10.adb, freeze.adb, sem_ch6.adb, exp_disp.adb:
2492         Minor reformatting.
2494 2015-05-12  Bob Duff  <duff@adacore.com>
2496         * exp_attr.adb (Size): Remove unnecessary check for types with
2497         unknown discriminants.  That was causing the compiler to build
2498         a function call _size(T), where T is a type, not an object.
2500 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
2502         * sem_ch4.adb (Extended_Primitive_Ops): Exclude overriding
2503         primitive operations of a type extension declared in the package
2504         body, to prevent duplicates in extended list.
2506 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
2508         * sem_ch3.adb (Analyze_Component_Declaration): If the component is
2509         an unconstrained synchronized type with discriminants, create a
2510         constrained default subtype for it, so that the enclosing record
2511         can be given the proper size.
2512         * sem_util.adb (Build_Default_Subtype): If the subtype is created
2513         for a record discriminant, do not analyze the declarztion at
2514         once because it is added to the freezing actions of the enclosing
2515         record type.
2517 2015-05-12  Robert Dewar  <dewar@adacore.com>
2519         * exp_prag.adb (Expand_N_Pragma): Rewrite ignored pragma as
2520         Null statements.
2521         * namet.ads (Boolean3): Document this flag used for Ignore_Pragma.
2522         * par-prag.adb (Prag): Implement Ignore_Pragma.
2523         * sem_prag.adb: Implement Ignore_Pragma.
2524         * snames.ads-tmpl: Add entries for pragma Ignore_Pragma.
2526 2015-05-12  Javier Miranda  <miranda@adacore.com>
2528         * sem_ch10.adb (Build_Shadow_Entity): Link the class-wide shadow
2529         entity with its corresponding real entity.
2530         (Decorate_Type): Unconditionally build the class-wide shadow entity of
2531         tagged types.
2532         * einfo.ads, einfo.adb (Has_Non_Limited_View): New synthesized
2533         attribute.
2534         (Non_Limited_View): Moved from field 17 to field 19 be available
2535         in class-wide entities.
2536         * exp_attr.adb (Access_Cases): Code cleanup.
2537         * exp_disp.adb (Expand_Interface_Actuals): Ditto.
2538         * exp_util.adb (Non_Limited_Designated_Type): Ditto.
2539         * freeze.adb (Build_Renamed_Bdody): Ditto.
2540         * sem_aux.adb (Available_View): Ditto.
2541         * sem_ch4.adb (Analyze_Selected_Component): Ditto.
2542         (Try_One_Prefix_Interpretation): Ditto.
2543         * sem_ch5.adb (Analyze_Assignment): Ditto.
2544         * sem_ch6.adb (Detect_And_Exchange): Ditto.
2545         * sem_ch8.adb (Find_Expanded_Name): Ditto.
2546         * sem_disp.adb (Check_Controlling_Type): Ditto.
2547         * sem_res.adb (Resolve_Type_Conversion): Ditto.
2548         (Full_Designated_Type): Ditto.
2549         * sem_type.adb (Covers): Ditto.
2550         * sem_util.adb: Fix typo in comment.
2552 2015-05-12  Robert Dewar  <dewar@adacore.com>
2554         * exp_unst.adb (Get_Real_Subp): New subprogram.
2555         (Unnest_Subprogram): Use Get_Real_Subp.
2556         (Uplev_Refs_For_One_Subp): Skip if no ARECnU entity.
2557         (Uplev_Refs_For_One_Subp): Use actual subtype in unconstrained case.
2559 2015-05-12  Robert Dewar  <dewar@adacore.com>
2561         * a-reatim.adb ("/"): Add explicit check for Time_Span_First / -1.
2563 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
2565         * sem_ch4.adb (Extended_Primitive_Ops): New subprogram,
2566         auxiliary to Try_Primitive_Operation to handle properly prefixed
2567         calls where the operation is not a primitive of the type, but
2568         is declared in the package body that is in the immediate scope
2569         of the type.
2571 2015-05-12  Robert Dewar  <dewar@adacore.com>
2573         * sem_util.adb (Is_Variable): Allow X'Deref(Y) as a variable.
2575 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
2577         * sem_ch8.adb (Find_Expanded_Name): Handle properly a fully
2578         qualified name for an instance of a generic grand-child unit in
2579         the body its parent.
2581 2015-05-12  Robert Dewar  <dewar@adacore.com>
2583         * exp_unst.adb (Upref_Name): New subprogram.
2584         (Unnest_Subprogram): Use Upref_Name.
2585         (Unnest_Subprogram): Use new Deref attribute.
2586         * exp_unst.ads: Doc updates.
2588 2015-05-12  Thomas Quinot  <quinot@adacore.com>
2590         * adaint.c: Enable Large File Support in adaint so that __gnat_readdir
2591         can access files on filesystems mounted from servers that use large
2592         NFS file handles.
2594 2015-05-09  Eric Botcazou  <ebotcazou@adacore.com>
2596         * gcc-interface/utils.c (gnat_write_global_declarations): Use type_decl
2597         method instead of global_decl for TYPE_DECLs.
2599 2015-04-27  Jim Wilson  <jim.wilson@linaro.org>
2601         * gcc-interface/Makefile-lan.in (ada.mostlyclean): Remove gnatbind
2602         and gnat1.
2604 2015-04-13  Eric Botcazou  <ebotcazou@adacore.com>
2606         * gnatvsn.ads (Library_Version): Bump to 6.
2608 2015-04-09  Iain Sandoe  <iain@codesourcery.com>
2610         * gcc-interface/Makefile.in (darwin, powerpc): Enable atomics.
2612 2015-04-08  Eric Botcazou  <ebotcazou@adacore.com>
2614         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Do not make
2615         a function returning an unconstrained type 'const' for the middle-end.
2617         * gcc-interface/trans.c (Pragma_to_gnu) <case Pragma_Warning>: Use
2618         exact condition to detect Reason => "..." pattern.
2620 2015-03-31  Tom de Vries  <tom@codesourcery.com>
2622         PR ada/65490
2623         * terminals.c (child_setup_tty): Fix warning 'argument to sizeof in
2624         bzero call is the same expression as the destination'.
2626 2015-03-26  Eric Botcazou  <ebotcazou@adacore.com>
2628         * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Deref>: New case.
2630 2015-03-24  Gary Dismukes  <dismukes@adacore.com>
2632         * sem_ch3.adb: Minor typo fix (missing paren).
2634 2015-03-24  Robert Dewar  <dewar@adacore.com>
2636         * sinfo.ads: Update comment.
2638 2015-03-24  Robert Dewar  <dewar@adacore.com>
2640         * exp_attr.adb: Add entry for typ'Deref.
2641         * sem_attr.adb (Deref): New GNAT attribute.
2642         * sem_attr.ads: Add entry for new GNAT attribute Deref.
2643         * snames.ads-tmpl: Add entries for new attribute Deref.
2645 2015-03-24  Ed Schonberg  <schonberg@adacore.com>
2647         * sem_ch13.adb (Rep_Item_Too_Early): allow pragma Convention
2648         on generic type.
2650 2015-03-24  Gary Dismukes  <dismukes@adacore.com>
2652         * inline.adb: Minor typo fix.
2654 2015-03-24  Arnaud Charlet  <charlet@adacore.com>
2656         * doc/gnat_ugn/building_executable_programs_with_gnat.rst,
2657         doc/gnat_ugn/gnat_utility_programs.rst
2658         doc/gnat_rm/implementation_defined_attributes.rst
2659         doc/gnat_rm/implementation_defined_pragmas.rst
2660         doc/gnat_rm/representation_clauses_and_pragmas.rst
2661         doc/gnat_rm/about_this_guide.rst
2662         doc/gnat_rm/implementation_of_ada_2012_features.rst: Doc improvements.
2663         * gnat_rm.texi, gnat_ugn.texi: Regenerate.
2665 2015-03-23  Jakub Jelinek  <jakub@redhat.com>
2667         PR bootstrap/65522
2668         * adadecode.c (ada_demangle): Guard with IN_RTS instead of IN_GCC.
2670 2015-03-20  Eric Botcazou  <ebotcazou@adacore.com>
2672         PR ada/65451
2673         * gcc-interface/utils.c (gnat_pushdecl): Tidy up and improve comment.
2674         Make sure to chain only main variants through TYPE_NEXT_PTR_TO.
2676         * gcc-interface/trans.c (Attribute_to_gnu): Revert latest change.
2678 2015-03-16  Eric Botcazou  <ebotcazou@adacore.com>
2680         * gcc-interface/utils2.c (gnat_invariant_expr): Return null if the type
2681         of the expression ends up being composite.
2683 2015-03-16  Eric Botcazou  <ebotcazou@adacore.com>
2685         * gcc-interface/decl.c (is_from_limited_with_of_main): New predicate.
2686         (gnat_to_gnu_entity) <E_Subprogram_Type>: Invoke it on return and
2687         parameter types to detect circularities in ASIS mode.
2688         * gcc-interface/trans.c (Attribute_to_gnu): Mention AI05-0151.
2690 2015-03-16  Eric Botcazou  <ebotcazou@adacore.com>
2692         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Abstract_State>: Do not
2693         short-circuit the regular handling.
2695 2015-03-13  Robert Dewar  <dewar@adacore.com>
2697         * exp_unst.adb (Note_Uplevel_Reference): Eliminate duplicate
2698         references.
2699         (Actual_Ref): New function.
2700         (AREC_String): Minor reformatting.
2701         (Unnest_Subprogram): Use Actual_Ref.
2702         * frontend.adb (Frontend): Turn off Unnest_Subprogram_Mode
2703         before call to Instantiate_Bodies.
2705 2015-03-13  Ed Schonberg  <schonberg@adacore.com>
2707         * freeze.adb (Freeze_Profile): If the return type of a function
2708         being frozen is an untagged limited view and the function is
2709         abstract, mark the type as frozen because there is no later
2710         point at which the profile of the subprogram will be elaborated.
2712 2015-03-13  Robert Dewar  <dewar@adacore.com>
2714         * einfo.adb, einfo.ads, atree.adb, atree.ads, atree.h: Add seventh
2715         component to entities. Add new fields Field36-41 and Node36-41.
2717 2015-03-13  Claire Dross  <dross@adacore.com>
2719         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Rewrite after review.
2721 2015-03-13  Robert Dewar  <dewar@adacore.com>
2723         * exp_util.adb (Is_Volatile_Reference): Compile time known
2724         value is never considered to be a volatile reference.
2726 2015-03-13  Robert Dewar  <dewar@adacore.com>
2728         * sem_ch3.adb (Analyze_Object_Contract): Suppress "constant
2729         cannot be volatile" for internally generated object (such as
2730         FIRST and LAST constants).
2732 2015-03-13  Ed Schonberg  <schonberg@adacore.com>
2734         * sem_ch12.adb (Validate_Access_Subprogram_Instance): If a
2735         convention is specified for the formal parameter, verify that
2736         the actual has the same convention.
2737         * sem_prag.adb (Set_Convention_From_Pragma): Allow convention
2738         pragma to be set on a generic formal type.
2739         * sem_util.adb (Set_Convention): Ignore within an instance,
2740         as it has already been verified in the generic unit.
2742 2015-03-13  Claire Dross  <dross@adacore.com>
2744         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do not inline
2745         subprograms with unconstrained record parameters containing
2746         Itype declarations.
2747         * sinfo.ads Document GNATprove assumption that type should match
2748         in the AST.
2749         * sem_ch6.adb (Analyze_Subprogram_Body_Contract):
2750         Do not check for Refined_Depends and Refined_Globals contracts
2751         as they are optional.
2753 2015-03-13  Ed Schonberg  <schonberg@adacore.com>
2755         * sem_ch12.adb (Instantiate_Type): For a floating-point type,
2756         capture dimension info if any, because the generated subtype
2757         declaration does not come from source and will not process dimensions.
2758         * sem_dim,adb (Analyze_Dimension_Extension_Or_Record_Aggregate):
2759         Do not analyze expressions with an initialization procedure
2760         because aggregates will have been checked at the point of record
2761         declaration.
2763 2015-03-13  Robert Dewar  <dewar@adacore.com>
2765         * aspects.ads, aspects.adb: Add entries for aspect Unimplemented.
2766         * einfo.ads, einfo.adb (Is_Unimplemented): New flag.
2767         * sem_ch13.adb: Add dummy entry for aspect Unimplemented.
2768         * snames.ads-tmpl: Add entry for Name_Unimplemented.
2770 2015-03-13  Gary Dismukes  <dismukes@adacore.com>
2772         * style.adb (Missing_Overriding): Apply the
2773         Comes_From_Source test to the Original_Node of the subprogram
2774         node, to handle the case of a null procedure declaration that
2775         has been rewritten as an empty procedure body.
2777 2015-03-13  Robert Dewar  <dewar@adacore.com>
2779         * exp_util.ads: Minor fix to comment.
2780         * sem_ch3.adb (Constrain_Index): Correct pasto from previous
2781         change.
2783 2015-03-13  Robert Dewar  <dewar@adacore.com>
2785         * exp_util.ads, exp_util.adb (Force_Evaluation): Add Related_Id and
2786         Is_Low/High_Bound params.
2787         * sem_ch3.adb (Constrain_Index): Use new Force_Evaluation calling
2788         sequence to simplify generation of FIRST/LAST temps for bounds.
2790 2015-03-12  Olivier Hainque  <hainque@adacore.com>
2792         * gcc-interface/trans.c (Attribute_to_gnu) <Code_Address case>:
2793         On targets where a function symbol designates a function descriptor,
2794         fetch the function code address from the descriptor.
2795         (USE_RUNTIME_DESCRIPTORS): Provide a default definition.
2797 2015-03-04  Robert Dewar  <dewar@adacore.com>
2799         * sem_warn.adb: Minor reformatting.
2800         * init.c: Minor tweaks.
2802 2015-03-04  Dmitriy Anisimko  <anisimko@adacore.com>
2804         * a-coinho-shared.adb: Fix clear of already empty holder.
2806 2015-03-04  Robert Dewar  <dewar@adacore.com>
2808         * exp_unst.adb (Check_Dynamic_Type): Ignore library level types.
2809         (Check_Uplevel_Reference_To_Type): Ignore call inside generic.
2810         (Note_Uplevel_Reference): Ignore call inside generic.
2811         (Note_Uplevel_Reference): Fix check for no entity field.
2812         (Unnest_Subprogram): Ignore call inside generic.
2813         (Find_Current_Subprogram): Use Defining_Entity, not Defining_Unit_Name.
2814         (Visit_Node): Ignore calls to Imported subprograms.
2815         (Visit_Node): Fix problem in finding subprogram body in some cases.
2816         (Add_Form_To_Spec): Use Defining_Entity, not Defining_Unit_Name.
2818 2015-03-04  Robert Dewar  <dewar@adacore.com>
2820         * einfo.adb (Is_ARECnF_Entity): Removed.
2821         (Last_Formal): Remove special handling of Is_ARECnF_Entity.
2822         (Next_Formal): Remove special handling of Is_ARECnF_Entity.
2823         (Next_Formal_With_Extras): Remove special handling of Is_ARECnF_Entity.
2824         (Number_Entries): Minor reformatting.
2825         * einfo.ads (Is_ARECnF_Entity): Removed.
2826         * exp_unst.adb (Unnest_Subprogram): Remove setting of
2827         Is_ARECnF_Entity.
2828         (Add_Extra_Formal): Use normal Extra_Formal circuit.
2829         * sprint.adb (Write_Param_Specs): Properly handle case where
2830         there are no source formals, but we have at least one Extra_Formal
2831         present.
2833 2015-03-04  Ed Schonberg  <schonberg@adacore.com>
2835         * sem_aggr.adb (Resolve_Record_Aggregate,
2836         Add_Discriminant_Values): If the value is a reference to the
2837         current instance of an enclosing type, use its base type to check
2838         against prefix of attribute reference, because the target type
2839         may be otherwise constrained.
2841 2015-03-04  Robert Dewar  <dewar@adacore.com>
2843         * atree.h: Add entries for Flag287-Flag309.
2844         * einfo.adb: Add (unused) flags Flag287-Flag309.
2846 2015-03-04  Ed Schonberg  <schonberg@adacore.com>
2848         * sem_util.adb (Collect_Interfaces, Collect): When gathering
2849         interfaces of ancestors, handle properly a subtype of a private
2850         extension.
2852 2015-03-04  Robert Dewar  <dewar@adacore.com>
2854         * einfo.adb (Is_ARECnF_Entity): New flag (ARECnF is an extra formal).
2855         (Next_Formal): Don't return ARECnF formal.
2856         (Last_Formal): Don't consider ARECnF formal.
2857         (Next_Formal_With_Extras): Do consider ARECnF formal.
2858         * einfo.ads (Is_ARECnF_Entity): New flag (ARECnF is an extra formal).
2859         * exp_unst.adb (Create_Entities): Set Is_ARECnF_Entity flag.
2861 2015-03-04  Javier Miranda  <miranda@adacore.com>
2863         * exp_ch6.adb (Expand_Simple_Function_Return): When the returned
2864         object is a class-wide interface object and we generate the
2865         accessibility described in RM 6.5(8/3) then displace the pointer
2866         to the object to reference the base of the object (to get access
2867         to the TSD of the object).
2869 2015-03-04  Hristian Kirtchev  <kirtchev@adacore.com>
2871         * sem_prag.adb (Analyze_Abstract_State): Use routine
2872         Malformed_State_Error to issue general errors.
2873         (Analyze_Pragma): Diagnose a syntax error related to a state
2874         declaration with a simple option.
2875         (Malformed_State_Error): New routine.
2877 2015-03-04  Robert Dewar  <dewar@adacore.com>
2879         * a-strsup.adb (Super_Slice): Deal with super flat case.
2880         * einfo.ads: Minor reformatting.
2881         * s-imgdec.adb (Set_Decimal_Digits): Add comment about possibly
2882         redundant code.
2884 2015-03-04  Claire Dross  <dross@adacore.com>
2886         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
2887         a-cforse.ads, a-cofove.ads: Use Default_Initial_Condition on formal
2888         containers.
2890 2015-03-04  Ed Schonberg  <schonberg@adacore.com>
2892         * sem_warn.adb (Check_References): When checking for an unused
2893         in-out parameter of a class- wide type, use its type to determine
2894         whether it is private, in order to avoid a spurious warning when
2895         subprogram spec and body are in different units.
2897 2015-03-04  Yannick Moy  <moy@adacore.com>
2899         * sem_attr.adb: Improve warning messages.
2901 2015-03-04  Robert Dewar  <dewar@adacore.com>
2903         * exp_ch6.adb (Expand_N_Subprogram_Body): Avoid trying to unnest
2904         generic subprograms.
2905         * exp_unst.adb (Check_Dynamic_Type): Handle record types properly
2906         (Note_Uplevel_Reference): Ignore uplevel references to non-types
2907         (Get_Level): Consider only subprograms, not blocks.
2908         (Visit_Node): Set proper condition for generating ARECnF entity.
2909         Ignore indirect calls. Ignore calls to subprograms
2910         outside our nest.
2911         (Unnest_Subprogram): Minor changes in dealing with ARECnF entity.
2912         (Add_Form_To_Spec): Properly set Last_Entity field.
2913         (Unnest_Subprogram): Set current subprogram scope for analyze calls.
2914         Handle case of no uplevel refs in outer subprogram
2915         Don't mark uplevel entities as aliased.
2916         Don't deal with calls with no ARECnF requirement.
2918 2015-03-04  Robert Dewar  <dewar@adacore.com>
2920         * s-valrea.adb (Scan_Real): Remove redundant tests from scaling loops.
2921         * s-imgdec.adb (Set_Decimal_Digits): Remove redundant Max
2922         operation in computing LZ.
2923         * sem_attr.adb: Minor typo fix
2925 2015-03-04  Robert Dewar  <dewar@adacore.com>
2927         * exp_ch7.adb: Minor reformatting.
2928         * exp_unst.adb (Build_Tables): Fix minor glitch for no separate
2929         spec case.
2930         * erroutc.adb (Delete_Msg): add missing decrement of info msg counter.
2932 2015-03-04  Hristian Kirtchev  <kirtchev@adacore.com>
2934         * exp_ch6.adb (Build_Pragma_Check_Equivalent): Suppress
2935         references to formal parameters subject to pragma Unreferenced.
2936         (Suppress_Reference): New routine.
2937         * sem_attr.adb (Analyze_Attribute): Reimplement the analysis
2938         of attribute 'Old. Attributes 'Old and 'Result now share
2939         common processing.
2940         (Analyze_Old_Result_Attribute): New routine.
2941         (Check_Placement_In_Check): Removed.
2942         (Check_Placement_In_Contract_Cases): Removed.
2943         (Check_Placement_In_Test_Case): Removed.
2944         (Check_Use_In_Contract_Cases): Removed.
2945         (Check_Use_In_Test_Case): Removed.
2946         (In_Refined_Post): Removed.
2947         (Is_Within): Removed.
2948         * sem_warn.adb (Check_Low_Bound_Tested): Code cleanup.
2949         (Check_Low_Bound_Tested_For): New routine.
2951 2015-03-04  Hristian Kirtchev  <kirtchev@adacore.com>
2953         * exp_ch3.adb (Expand_N_Object_Declaration):
2954         Generate a runtime check to test the expression of pragma
2955         Default_Initial_Condition when the object is default initialized.
2957 2015-03-02  Robert Dewar  <dewar@adacore.com>
2959         * scng.adb (Scan): Ignore illegal character in relaxed
2960         semantics mode.
2962 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
2964         * sem_ch4.adb (Analyze_Set_Membership); Retain Overloaded flag
2965         on left operand, so it can be properly resolved with type of
2966         alternatives of right operand.
2967         * sem_res.adb (Resolve_Set_Membership): Handle properly an
2968         overloaded left-hand side when the alternatives on the right
2969         hand side are literals of some universal type.  Use first
2970         non-overloaded alternative to find expected type.
2972 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
2974         * exp_ch7.adb (Make_Set_Finalize_Address_Call): Use underlying
2975         type to retrieve designated type, because the purported access
2976         type may be a partial (private) view, when it is declared in
2977         the private part of a nested package, and finalization actions
2978         are generated when completing compilation of enclosing unit.
2980 2015-03-02  Robert Dewar  <dewar@adacore.com>
2982         * back_end.adb (Call_Back_End): Remove previous patch,
2983         the back end now gets to see the result of -gnatd.1
2984         (Unnest_Subprogram_Mode) processing.
2985         * elists.ads, elists.adb (List_Length): New function.
2986         * exp_unst.ads, exp_unst.adb: Major changes, first complete version.
2987         * sem_util.adb (Check_Nested_Access): Handle formals in
2988         Unnest_Subprogram_Mode.
2989         (Adjust_Named_Associations): Minor reformatting.
2990         * sprint.adb (Sprint_Node_Actual): Fix failure to print aliased
2991         for parameters.
2993 2015-03-02  Robert Dewar  <dewar@adacore.com>
2995         * atree.ads, atree.adb (Uint24): New function
2996         (Set_Uint24): New procedure.
2997         * atree.h (Uint24): New macro for field access.
2998         * back_end.adb (Call_Back_End): For now, don't call back end
2999         if unnesting subprogs.
3000         * einfo.adb (Activation_Record_Component): New field
3001         (Subps_Index): New field.
3002         * einfo.ads (Activation_Record_Component): New field
3003         (Subps_Index): New field Minor reordering of comments into alpha order.
3004         * exp_unst.ads, exp_unst.adb: Continued development.
3006 2015-03-02  Gary Dismukes  <dismukes@adacore.com>
3008         * exp_disp.ads: Minor reformatting.
3010 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
3012         * sem_ch8.adb (Chain_Use_Clause): Do not chain use clause from
3013         ancestor to list of use clauses active in descendant unit if we
3014         are within the private part of an intervening parent, to prevent
3015         circularities in use clause list.
3017 2015-03-02  Javier Miranda  <miranda@adacore.com>
3019         * exp_ch9.adb (Build_Corresponding_Record): Propagate type
3020         invariants to the corresponding record type.
3021         * exp_disp.ad[sb] (Set_DT_Position_Value): New subprogram
3022         which sets the value of the DTC_Entity associated with a given
3023         primitive of a tagged type and propagates the value to the
3024         wrapped subprogram.
3025         (Set_DTC_Entity_Value): Propagate the DTC
3026         value to the wrapped entity.
3027         * sem_ch13.adb (Build_Invariant_Procedure): Append the code
3028         associated with invariants of progenitors.
3029         * sem_ch3.adb (Build_Derived_Record_Type): Inherit type invariants
3030         of parents and progenitors.
3031         (Process_Full_View): Check hidden inheritance of class-wide type
3032         invariants.
3033         * sem_ch7.adb (Analyze_Package_Specification): Do not generate
3034         the invariant procedure for interface types; build the invariant
3035         procedure for tagged types inheriting invariants from their
3036         progenitors.
3037         * sem_prag.adb (Pragma_Invariant) Allow invariants in interface
3038         types but do not build their invariant procedure since their
3039         invariants will be propagated to the invariant procedure of
3040         types covering the interface.
3041         * exp_ch6.adb, exp_disp.adb, sem_ch3.adb, sem_ch7.adb,
3042         sem_ch8.adb, sem_disp.adb: Replace all calls to Set_DT_Position
3043         by calls to Set_DT_Position_Value.
3045 2015-03-02  Hristian Kirtchev  <kirtchev@adacore.com>
3047         * sem_attr.adb (Analyze_Attribute): Factor out heavily indented
3048         code in Denote_Same_Function.  Do not analyze attribute 'Result
3049         when it is inside procedure _Postconditions.  Remove a misplaced
3050         warning diagnostic. Code cleanup.
3051         (Denote_Same_Function): New routine.
3052         * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Code
3053         cleanup. Warn on pre/postconditions on an inlined subprogram.
3054         (Analyze_Pragma, Refined_Post case): Warn on pre/postconditions on
3055         an inlined subprogram.
3056         (Analyze_Pre_Post_Condition_In_Decl_Part): Code cleanup. Warn on
3057         pre/post condition on an inlined subprogram.
3058         (Analyze_Test_Case_In_Decl_Part): Code cleanup. Warn on
3059         pre/postconditions on an inlined subprogram.
3060         (Check_Postcondition_Use_In_Inlined_Subprogram): New routine.
3062 2015-03-02  Hristian Kirtchev  <kirtchev@adacore.com>
3064         * sem_prag.adb (Ensure_Aggregate_Form):
3065         Ensure that the name denoted by the Chars of a pragma argument
3066         association has the proper Sloc when converted into an aggregate.
3068 2015-03-02  Bob Duff  <duff@adacore.com>
3070         * sem_ch6.adb (Check_Private_Overriding): Capture
3071         Incomplete_Or_Partial_View in a constant. This is cleaner and
3072         more efficient.
3074 2015-03-02  Gary Dismukes  <dismukes@adacore.com>
3076         * einfo.ads, exp_unst.ads: Minor reformatting.
3078 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
3080         * a-strsea.adb (Find_Token): Ensure that the range of iteration
3081         does not perform any improper character access. This prevents
3082         erroneous access in the unusual case of an empty string target
3083         and a From parameter less than Source'First.
3085 2015-03-02  Robert Dewar  <dewar@adacore.com>
3087         * elists.adb (List_Length): Fix incorrect result.
3089 2015-03-02  Bob Duff  <duff@adacore.com>
3091         * sem_ch6.adb (Check_Private_Overriding): Refine the legality
3092         checks here. It used to check that the function is merely
3093         overriding SOMEthing. Now it checks that the function is
3094         overriding a corresponding public operation. This is a correction
3095         to the implementation of the rule in RM-3.9.3(10).
3097 2015-03-02  Robert Dewar  <dewar@adacore.com>
3099         * debug.adb: Document new debug flag -gnatd.1.
3100         * einfo.ads, einfo.adb (Has_Nested_Subprogram): New flag.
3101         (Has_Uplevel_Reference): New flag (Is_Static_Type): New flag.
3102         (Uplevel_Reference_Noted):New flag (Uplevel_References): New field.
3103         * elists.ads elists.adb (List_Length): New function.
3104         * exp_ch6.adb (Expand_N_Subprogram_Body): Call Unnest_Subprogram
3105         when appropriate (Process_Preconditions): Minor code
3106         reorganization and reformatting
3107         * exp_unst.ads, exp_unst.adb: New files.
3108         * gnat1drv.adb (Adjust_Global_Switches): Set
3109         Unnest_Subprogram_Mode if -gnatd.1
3110         * namet.ads, namet.adb (Name_Find_Str): New version of Name_Find with
3111         string argument.
3112         * opt.ads (Unnest_Subprogram_Mode): New flag.
3113         * par-ch3.adb (P_Identifier_Declarations): Fixes to -gnatd.2 handling.
3114         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set
3115         Has_Nested_Subprogram flag.
3116         * sem_ch8.adb (Find_Direct_Name): New calling sequence for
3117         Check_Nested_Access.
3118         (Find_Selected_Component): Minor comment addition.
3119         * sem_util.adb (Check_Nested_Access): New version for use with Exp_Unst.
3120         (Note_Possible_Modification): New calling sequence for
3121         Check_Nested_Access.
3122         * sem_util.ads (Check_Nested_Access): New version for use with Exp_Unst.
3123         * gcc-interface/Make-lang.in (GNAT1_OBJS): Add exp_unst.o
3125 2015-03-02  Pierre-Marie de Rodat  <derodat@adacore.com>
3127         * gcc-interface/utils.c (gnat_pushdecl): For non-artificial pointer
3128         types, preserve the original type and create copies just like the C
3129         front-end does.  For artificial ones, do not define a name for
3130         the original type.
3131         (create_type_decl): When gnat_pushdecl made the input type the
3132         original type for the new declaration, do not define a stub
3133         declaration for it.
3134         * gcc-interface/utils2.c (build_binary_op): Accept two different
3135         pointer types when they point to the same type.
3137 2015-03-02  Hristian Kirtchev  <kirtchev@adacore.com>
3139         * exp_util.adb (Possible_Bit_Aligned_Component): Do not process
3140         an unanalyzed node.
3141         * sem_util.adb (Kill_Current_Values): Do not invalidate and
3142         de-null a constant.
3144 2015-03-02  Robert Dewar  <dewar@adacore.com>
3146         * sem_ch3.adb, exp_attr.adb, checks.adb, exp_aggr.adb: Minor
3147         reformatting.
3149 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
3151         * sem_ch8.adb: extend use of Available_Subtype.
3153 2015-03-02  Hristian Kirtchev  <kirtchev@adacore.com>
3155         * sem_prag.adb (Duplication_Error): Remove the special handling
3156         of 'Class or _Class in the context of pre/postconditions.
3157         (Process_Class_Wide_Condition): Remove the special handling of
3158         'Class or _Class in the context of pre/postconditions.
3159         * sem_util.adb (Original_Aspect_Pragma_Name): Names Pre_Class
3160         and Post_Class no longer need to be converted to _Pre and _Post.
3161         * sem_util.ads (Original_Aspect_Pragma_Name): Update the comment
3162         on usage.
3164 2015-03-02  Hristian Kirtchev  <kirtchev@adacore.com>
3166         * exp_ch6.adb (Process_Preconditions): Modify the
3167         mechanism that find the first source declaration to correct exit
3168         the loop once it has been found.
3170 2015-03-02  Gary Dismukes  <dismukes@adacore.com>
3172         * a-strsea.adb: Minor typo fix.
3174 2015-03-02  Bob Duff  <duff@adacore.com>
3176         * einfo.ads: Minor comment fixes.
3178 2015-03-02  Gary Dismukes  <dismukes@adacore.com>
3180         * einfo.adb, checks.adb: Minor reformatting and typo fixes.
3182 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
3184         * exp_aggr.adb (Get_Assoc_Expr): If the Default_Component_Value
3185         is defined for the array type, use it instead of a Default_Value
3186         specified for the component type itself.
3188 2015-03-02  Thomas Quinot  <quinot@adacore.com>
3190         * exp_attr.adb (Expand_N_Attribute_Reference, case Input): When
3191         expanding a 'Input attribute reference for a class-wide type,
3192         do not generate a separate object declaration for the controlling
3193         tag dummy object; instead, generate the expression inline in the
3194         dispatching call. Otherwise, the declaration (which involves a
3195         call to String'Input, returning a dynamically sized value on the
3196         secondary stack) will be expanded outside of proper secondary
3197         stack mark/release operations, and will thus cause a secondary
3198         stack leak.
3200 2015-03-02  Hristian Kirtchev  <kirtchev@adacore.com>
3202         * checks.adb (Add_Validity_Check): Change the names of all
3203         formal parameters to better illustrate their purpose. Update
3204         the subprogram documentation. Update all occurrences of the
3205         formal parameters. Generate a pre/postcondition pragma by
3206         calling Build_Pre_Post_Condition.
3207         (Build_PPC_Pragma): Removed.
3208         (Build_Pre_Post_Condition): New routine.
3209         * einfo.adb Node8 is no longer used as Postcondition_Proc. Node14
3210         is now used as Postconditions_Proc. Flag240 is now renamed to
3211         Has_Expanded_Contract.  (First_Formal): The routine can now
3212         operate on generic subprograms.
3213         (First_Formal_With_Extras): The routine can now operate on generic
3214         subprograms.
3215         (Has_Expanded_Contract): New routine.
3216         (Has_Postconditions): Removed.
3217         (Postcondition_Proc): Removed.
3218         (Postconditions_Proc): New routine.
3219         (Set_Has_Expanded_Contract): New routine.
3220         (Set_Has_Postconditions): Removed.
3221         (Set_Postcondition_Proc): Removed.
3222         (Set_Postconditions_Proc): New routine.
3223         (Write_Entity_Flags): Remove the output of Has_Postconditions. Add
3224         the output of Has_Expanded_Contract.
3225         (Write_Field8_Name): Remove the output of Postcondition_Proc.
3226         (Write_Field14_Name): Add the output of Postconditions_Proc.
3227         * einfo.ads New attributes Has_Expanded_Contract and
3228         Postconditions_Proc along with occurrences in entities.
3229         Remove attributes Has_Postconditions and Postcondition_Proc
3230         along with occurrences in entities.
3231         (Has_Expanded_Contract): New routine along with pragma Inline.
3232         (Has_Postconditions): Removed along with pragma Inline.
3233         (Postcondition_Proc): Removed along with pragma Inline.
3234         (Postconditions_Proc): New routine along with pragma Inline.
3235         (Set_Has_Expanded_Contract): New routine along with pragma Inline.
3236         (Set_Has_Postconditions): Removed along with pragma Inline.
3237         (Set_Postcondition_Proc): Removed along with pragma Inline.
3238         (Set_Postconditions_Proc): New routine along with pragma Inline.
3239         * exp_ch6.adb (Add_Return): Code cleanup. Update the
3240         generation of the call to the _Postconditions routine of
3241         the procedure.  (Expand_Non_Function_Return): Reformat the
3242         comment on usage. Code cleanup.  Update the generation of
3243         the call to the _Postconditions routine of the procedure or
3244         entry [family].
3245         (Expand_Simple_Function_Return): Update the
3246         generation of the _Postconditions routine of the function.
3247         (Expand_Subprogram_Contract): Reimplemented.
3248         * exp_ch6.ads (Expand_Subprogram_Contract): Update the parameter
3249         profile along the comment on usage.
3250         * exp_ch9.adb (Build_PPC_Wrapper): Code cleanup.
3251         (Expand_N_Task_Type_Declaration): Generate pre/postconditions
3252         wrapper when the entry [family] has a contract with
3253         pre/postconditions.
3254         * exp_prag.adb (Expand_Attributes_In_Consequence): New routine.
3255         (Expand_Contract_Cases): This routine and its subsidiaries now
3256         analyze all generated code.
3257         (Expand_Old_In_Consequence): Removed.
3258         * sem_attr.adb Add with and use clause for Sem_Prag.
3259         (Analyze_Attribute): Reimplment the analysis of attribute 'Result.
3260         (Check_Use_In_Test_Case): Use routine Test_Case_Arg to obtain
3261         "Ensures".
3262         * sem_ch3.adb (Analyze_Declarations): Analyze the contract of
3263         a generic subprogram.
3264         (Analyze_Object_Declaration): Do not create a contract node.
3265         (Derive_Subprogram): Do not create a contract node.
3266         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Do
3267         not create a contract node.
3268         (Analyze_Completion_Contract): New routine.
3269         (Analyze_Function_Return): Alphabetize.
3270         (Analyze_Generic_Subprogram_Body): Alphabetize. Do not create a
3271         contract node.  Do not copy pre/postconditions to the original
3272         generic template.
3273         (Analyze_Null_Procedure): Do not create a contract node.
3274         (Analyze_Subprogram_Body_Contract): Reimplemented.
3275         (Analyze_Subprogram_Body_Helper): Do not mark the enclosing scope
3276         as having postconditions. Do not create a contract node. Analyze
3277         the subprogram body contract of a body that acts as a compilation
3278         unit. Expand the subprogram contract after the declarations have
3279         been analyzed.
3280         (Analyze_Subprogram_Contract): Reimplemented.
3281         (Analyze_Subprogram_Specification): Do not create a contract node.
3282         (List_Inherited_Pre_Post_Aspects): Code cleanup.
3283         * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Update the
3284         comment on usage.
3285         (Analyze_Subprogram_Contract): Update the
3286         parameter profile and the comment on usage.
3287         * sem_ch7.adb (Analyze_Package_Body_Helper): Do not create a
3288         contract node.
3289         (Analyze_Package_Declaration): Do not create a
3290         contract node.
3291         (Is_Subp_Or_Const_Ref): Ensure that the prefix has an entity.
3292         * sem_ch8.adb (Analyze_Subprogram_Renaming): Do not create a
3293         contract node.
3294         * sem_ch9.adb (Analyze_Entry_Declaration): Do not create a
3295         contract node.
3296         * sem_ch10.adb (Analyze_Compilation_Unit): Move local variables to
3297         their proper section and alphabetize them. Analyze the contract of
3298         a [generic] subprogram after all Pragmas_After have been analyzed.
3299         (Analyze_Subprogram_Body_Stub_Contract): Alphabetize.
3300         * sem_ch12.adb (Analyze_Generic_Package_Declaration): Do not
3301         create a contract node.
3302         (Analyze_Generic_Subprogram_Declaration):
3303         Alphabetize local variables. Do not create a contract
3304         node. Do not generate aspects out of pragmas for ASIS.
3305         (Analyze_Subprogram_Instantiation): Instantiate
3306         the contract of the subprogram.  Do not create a
3307         contract node.  (Instantiate_Contract): New routine.
3308         (Instantiate_Subprogram_Body): Alphabetize local variables.
3309         (Save_Global_References_In_Aspects): New routine.
3310         (Save_References): Do not save the global references found within
3311         the aspects of a generic subprogram.
3312         * sem_ch12.ads (Save_Global_References_In_Aspects): New routine.
3313         * sem_ch13.adb (Analyze_Aspect_Specifications): Do not use
3314         Original_Node for establishing linkages.
3315         (Insert_Pragma): Insertion in a subprogram body takes precedence over
3316         the case where the subprogram body is also a compilation unit.
3317         * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Use
3318         Get_Argument to obtain the proper expression. Install the generic
3319         formals when the related context is a generic subprogram.
3320         (Analyze_Depends_In_Decl_Part): Use Get_Argument to obtain
3321         the proper expression. Use Corresponding_Spec_Of to obtain
3322         the spec. Install the generic formal when the related context
3323         is a generic subprogram.
3324         (Analyze_Global_In_Decl_Part): Use Get_Argument to obtain the proper
3325         expression. Use Corresponding_Spec_Of to obtain the spec. Install the
3326         generic formal when the related context is a generic subprogram.
3327         (Analyze_Initial_Condition_In_Decl_Part): Use Get_Argument
3328         to obtain the proper expression. Remove the call to
3329         Check_SPARK_Aspect_For_ASIS as the analysis is now done
3330         automatically.
3331         (Analyze_Pragma): Update all occurrences
3332         to Original_Aspect_Name. Pragmas Contract_Cases, Depends,
3333         Extensions_Visible, Global, Postcondition, Precondition and
3334         Test_Case now carry generic templates when the related context
3335         is a generic subprogram. The same pragmas are no longer
3336         forcefully fully analyzed when the context is a subprogram
3337         that acts as a compilation unit. Pragmas Abstract_State,
3338         Initial_Condition, Initializes and Refined_State have been clean
3339         up. Pragmas Post, Post_Class, Postcondition, Pre, Pre_Class
3340         and Precondition now use the same routine for analysis. Pragma
3341         Refined_Post does not need to check the use of 'Result or
3342         the lack of a post-state in its expression. Reimplement the
3343         analysis of pragma Test_Case.
3344         (Analyze_Pre_Post_Condition): New routine.
3345         (Analyze_Pre_Post_Condition_In_Decl_Part):
3346         Reimplemented.
3347         (Analyze_Refined_Depends_In_Decl_Part): Use Get_Argument to obtain the
3348         proper expression.
3349         (Analyze_Refined_Global_In_Decl_Part): Use Get_Argument to obtain
3350         the proper expression.
3351         (Analyze_Test_Case_In_Decl_Part): Reimplemented.
3352         (Check_Pre_Post): Removed.
3353         (Check_Precondition_Postcondition): Removed.
3354         (Check_SPARK_Aspect_For_ASIS): Removed.
3355         (Check_Test_Case): Removed.
3356         (Collect_Subprogram_Inputs_Outputs): Use Get_Argument
3357         to obtain the proper expression. Use Corresponding_Spec_Of to
3358         find the proper spec.
3359         (Create_Generic_Template): New routine.
3360         (Duplication_Error): New routine.
3361         (Expression_Function_Error): New routine.
3362         (Find_Related_Subprogram_Or_Body): Moved to the spec
3363         of Sem_Prag. Emit precise error messages. Account for cases of
3364         rewritten expression functions, generic instantiations, handled
3365         sequence of statements and pragmas from aspects.
3366         (Get_Argument): New routine.
3367         (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Removed.
3368         (Preanalyze_CTC_Args): Removed.
3369         (Process_Class_Wide_Condition): New routine.
3370         * sem_prag.ads (Analyze_Test_Case_In_Decl_Part): Update
3371         the parameter profile along with the comment on usage.
3372         (Find_Related_Subprogram_Or_Body): Moved from the body of Sem_Prag.
3373         (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Removed.
3374         (Test_Case_Arg): New routine.
3375         * sem_util.adb Add with and use clauses for Sem_Ch6.
3376         (Add_Contract_Item): This routine now creates a contract
3377         node the first time an item is added. Remove the duplicate
3378         aspect/pragma checks.
3379         (Check_Result_And_Post_State): Reimplemented.
3380         (Corresponding_Spec_Of): New routine.
3381         (Get_Ensures_From_CTC_Pragma): Removed.
3382         (Get_Requires_From_CTC_Pragma): Removed.
3383         (Has_Significant_Contract): New routine.
3384         (Inherit_Subprogram_Contract): Inherit only if the source
3385         has a contract.
3386         (Install_Generic_Formals): New routine.
3387         (Original_Aspect_Name): Removed.
3388         (Original_Aspect_Pragma_Name): New routine.
3389         * sem_util.ads (Check_Result_And_Post_State): Reimplemented.
3390         (Corresponding_Spec_Of): New routine.
3391         (Get_Ensures_From_CTC_Pragma): Removed.
3392         (Get_Requires_From_CTC_Pragma): Removed.
3393         (Has_Significant_Contract): New routine.
3394         (Install_Generic_Formals): New routine.
3395         (Original_Aspect_Name): Removed.
3396         (Original_Aspect_Pragma_Name): New routine.
3397         * sem_warn.adb Add with and use clauses for Sem_Prag.
3398         (Within_Postcondition): Use Test_Case_Arg to extract "Ensures".
3400 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
3402         * sem_ch8.adb (Available_Subtype): Optimization in
3403         Find_Selected_Component: when safe, use existing subtype of
3404         array component, possibly discriminant-dependent, rather than
3405         creating new subtype declaration for it. In this fashion different
3406         occurrences of the component have the same subtype, rather than
3407         just equivalent ones. Simplifies value tracing in GNATProve.
3409 2015-03-01  Arnaud Charlet  <charlet@adacore.com>
3411         PR ada/65259
3413         * doc/gnat_ugn/gnat_project_manager.rst,
3414         doc/gnat_ugn/platform_specific_information.rst: Remove reference to
3415         image, too troublesome with texi format.
3416         * gnat_ugn.texi: Regenerate.
3418 2015-02-24  Thomas Schwinge  <thomas@codesourcery.com>
3420         PR libgomp/64625
3421         * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8): Remove.
3422         (DEF_FUNCTION_TYPE_VAR_12): Likewise.
3423         (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
3425 2015-02-23  Thomas Schwinge  <thomas@codesourcery.com>
3427         * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8): Fix number of
3428         arguments parameter.
3429         (DEF_FUNCTION_TYPE_VAR_12): Likewise.
3431 2015-02-22  Arnaud Charlet  <charlet@adacore.com>
3433         * doc/Makefile: postprocess texinfo files to update @dircategory
3434         and update texi files under gcc/ada.
3435         * gnat_ugn.texi, gnat_rm.texi: Regenerated.
3437 2015-02-22  Arnaud Charlet  <charlet@adacore.com>
3439         * doc/gnat_ugn/project-manager-figure.png,
3440         doc/gnat_ugn/rtlibrary-structure.png: New.
3442 2015-02-22  Tom de Vries  <tom@codesourcery.com>
3444         PR ada/65100
3445         * gnat-style.texi (@subsection Loop Statements): Replace @noindent by
3446         @item, and fix warning '@itemize has text but no @item'.
3448 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
3450         * sem_prag.adb (Analyze_Pragma, case Obsolescent): Pragma
3451         legally applies to an abstract subprogram declaration.
3452         * freeze.adb: Minor comment addition.
3454 2015-02-20  Robert Dewar  <dewar@adacore.com>
3456         * errout.ads: Document replacement of Name_uPre/Post/Type_Invariant.
3457         * erroutc.adb (Set_Msg_Str): Replace _xxx.
3458         (Pre/Post/Type_Invariant) by xxx'Class.
3459         * erroutc.ads (Set_Msg_Str): Replace _xxx.
3460         (Pre/Post/Type_Invariant) by xxx'Class.
3461         * sem_prag.adb (Fix_Error): Remove special casing of
3462         Name_uType_Invariant.
3463         (Analyze_Pre_Post_Condition_In_Decl_Part): Remove special casing of
3464         Name_uPre and Name_uPost in aspect case (done in Errout now).
3466 2015-02-20  Robert Dewar  <dewar@adacore.com>
3468         * g-alveop.adb: Minor style fixes.
3470 2015-02-20  Robert Dewar  <dewar@adacore.com>
3472         * freeze.adb (Warn_Overlay): Guard against blow up with address
3473         clause.
3475 2015-02-20  Bob Duff  <duff@adacore.com>
3477         * exp_attr.adb (May_Be_External_Call): Remove this. There is no need
3478         for the compiler to guess whether the call is internal or external --
3479         it is always external.
3480         (Expand_Access_To_Protected_Op): For P'Access, where P
3481         is a protected subprogram, always create a pointer to the
3482         External_Subprogram.
3484 2015-02-20  Robert Dewar  <dewar@adacore.com>
3486         * a-dispat.adb, a-stcoed.ads: Minor reformatting.
3488 2015-02-20  Robert Dewar  <dewar@adacore.com>
3490         * sem_ch13.adb (Build_Discrete_Static_Predicate): Allow static
3491         predicate for non-static subtype.
3492         (Build_Predicate_Functions): Do not assume subtype associated with a
3493         static predicate must be static.
3495 2015-02-20  Robert Dewar  <dewar@adacore.com>
3497         * errout.adb (Set_Msg_Node): Better handling of internal names
3498         (Set_Msg_Node): Kill message when we cannot eliminate internal name.
3499         * errout.ads: Document additional case of message deletion.
3500         * namet.adb (Is_Internal_Name): Refined to consider wide
3501         strings in brackets notation and character literals not to be
3502         internal names.
3503         * sem_ch8.adb (Find_Selected_Component): Give additional error
3504         when selector name is a subprogram whose first parameter has
3505         the same type as the prefix, but that type is untagged.
3507 2015-02-20  Robert Dewar  <dewar@adacore.com>
3509         * g-allein.ads, g-alveop.adb, g-alveop.ads, opt.ads: Minor reformatting
3511 2015-02-20  Tristan Gingold  <gingold@adacore.com>
3513         * opt.ads (GNAT_Mode_Config): New variable.
3514         * opt.adb (Set_Opt_Config_Switches): Consider GNAT_Mode_Config
3515         to set Assertions_Enabled.
3516         * switch-c.adb (Scan_Front_End_Switches): Set GNAT_Mode_Config
3517         for -gnatg.
3519 2015-02-20  Robert Dewar  <dewar@adacore.com>
3521         * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Add an additional
3522         comment regarding the handling of unterminated fixed-point
3523         constants.
3524         * s-valuns.ads (Scan_Raw_Unsigned): Add comments
3525         corresponding to those previously added for
3526         System.Val_LLU.Scan_Raw_Long_Long_Unsigned.
3528 2015-02-20  Olivier Hainque  <hainque@adacore.com>
3530         * g-allein.ads, g-alveop.ads, g-alveop.adb: Code clean ups.
3532 2015-02-20  Robert Dewar  <dewar@adacore.com>
3534         * sem_prag.adb: Minor comment clarification.
3536 2015-02-20  Olivier Hainque  <hainque@adacore.com>
3538         * g-allein.ads (vec_ctf, vec_vcsfx, vec_vcfux): Remove.
3539         * g-alleve.ads, g-alleva.adb (vcfux): Likewise.
3540         * g-alveop.ads (vec_vcfsx, vec_vcfux): Just rename the ll versions.
3541         (vec_ctf): Now renamings as well.
3543 2015-02-20  Robert Dewar  <dewar@adacore.com>
3545         * switch-c.adb, bindgen.adb: Minor reformatting.
3547 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
3549         * sem_prag.adb (Analyze_Pragma, case Type_Invariant):
3550         Invariant'class is allowed on an abstract type.
3552 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
3554         * sem_ch3.adb (Access_Definition): If the access definition is
3555         for a protected component and defines an access to protected
3556         subprogram, do not create an itype reference for it because a
3557         full type declaration will be built in order to generate the
3558         proper equivalent type.
3559         (Analyze_Subtype_Declaration): Add information of incomplete
3560         subtypes, for Ada 2012 extended uses of incomplete types.
3562 2015-02-20  Gary Dismukes  <dismukes@adacore.com>
3564         * sem_res.adb: Minor reformatting.
3566 2015-02-20  Vincent Celier  <celier@adacore.com>
3568         * switch-c.adb (Scan_Front_End_Switches): When comparing runtime
3569         path name for several switches --RTS, use the normalized path
3570         names.
3572 2015-02-20  Vincent Celier  <celier@adacore.com>
3574         * bindgen.adb: Minor reformatting and code reorganization.
3576 2015-02-20  Jose Ruiz  <ruiz@adacore.com>
3578         * a-stcoed.ads: Add spec for this package (Unimplemented_Unit).
3579         * impunit.adb (Non_Imp_File_Names_12): Mark unit a-stcoed.ads as
3580         defined by Ada 2012.
3582 2015-02-20  Arnaud Charlet  <charlet@adacore.com>
3584         * sysdep.c, expect.c, s-oscons-tmplt.c, gsocket.h, adaint.c: Remove
3585         obsolete references to RTX, nucleus, VMS.
3587 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
3589         * sem_prag.adb (Fix_Error): For an illegal Type_Invariant'Class
3590         aspect, use name that mentions Class explicitly, rather than
3591         compiler-internal name.
3593 2015-02-20  Robert Dewar  <dewar@adacore.com>
3595         * debug.adb: Add documentation for -gnatd.2 (allow statements
3596         in decl sequences).
3597         * par-ch3.adb (P_Identifier_Declarations): Handle
3598         statement appearing where declaration expected more cleanly.
3599         (Statement_When_Declaration_Expected): Implement debug flag
3600         -gnatd.2.
3602 2015-02-20  Jose Ruiz  <ruiz@adacore.com>
3604         * a-dinopr.ads: Add spec for this package (Unimplemented_Unit).
3605         * a-dispat.ads (Yield): Include procedure added in Ada 2012.
3606         * a-dispat.adb (Yield): Implement procedure added in Ada 2012.
3607         * impunit.adb (Non_Imp_File_Names_05): Mark unit a-dinopr.ads as
3608         defined by Ada 2005.
3609         * snames.ads-tmpl (Name_Non_Preemptive_FIFO_Within_Priorities):
3610         This is the correct name for the dispatching policy (FIFO was
3611         missing).
3613 2015-02-20  Javier Miranda  <miranda@adacore.com>
3615         * sem_res.adb (Resolve_Type_Conversion): If the type of the
3616         operand is the limited-view of a class-wide type then recover
3617         the class-wide type of the non-limited view.
3619 2015-02-20  Arnaud Charlet  <charlet@adacore.com>
3621         * gcc-interface/Makefile.in: Remove references to nucleus.
3622         * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Procedure): Set
3623         extern_flag to true for Inline_Always subprograms with
3624         Intrinsic convention.
3626 2015-02-20  Yannick Moy  <moy@adacore.com>
3628         * sem_prag.ads: Minor typo in comment.
3630 2015-02-20  Pascal Obry  <obry@adacore.com>
3632         * s-osprim-mingw.adb: Fix Get_Base_Time parameter mode.
3634 2015-02-20  Vincent Celier  <celier@adacore.com>
3636         * makeutl.adb (Get_Directories.Add_Dir): Add a directory only
3637         if it exists.
3639 2015-02-20  Robert Dewar  <dewar@adacore.com>
3641         * sem_eval.ads: Minor reformatting.
3643 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
3645         * freeze.adb (Size_Known): Do not set the packed size for
3646         independent type or component.
3647         (Freeze_Array_Type): Check for Independent[_Components] with packing
3648         or explicit component size clause.
3649         * gnat1drv.adb (Post_Compilation_Validation_Checks): Do the validation
3650         of independence pragmas only for non-GCC back-ends.
3651         * sem_ch13.adb (Initialize): Likewise for the initialization.
3652         * sem_prag.adb (Record_Independence_Check): New procedure to record an
3653         independence check in the table.
3654         (Analyze_Pragma): Use it throughout instead of doing it manually.
3655         * gcc-interface/decl.c (gnat_to_gnu_field): Add support for
3656         independent type or component.
3658 2015-02-20  Thomas Quinot  <quinot@adacore.com>
3660         * adaint.c (__gnat_readdir): For Solaris, use 64 bit variants of
3661         struct direct and readdir. This is required for NFS filesystems
3662         mounted from servers that use 64-bit cookies.
3664 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
3666         * sem_ch12.adb (Analyze_Subprogram_Instantiaion): New subprogram
3667         Build_Subprogram_Renaming, to create renaming of subprogram
3668         instance in the the declaration of the wrapper package rather
3669         than in its body, so that it is available for analysis of aspects
3670         propagated from generic to instantiation.
3671         (Check_Mismatch): An actual for a formal package that is an
3672         incomplete type matches a formal type that is incomplete.
3673         (Instantiate_Package_Body): Move code that builds subprogram
3674         renaming to Analyze_Subprogram_Instantiation.
3675         (Instantiate_Type): The generated subtype is a limited view if
3676         the actual is a limited view.
3677         (Load_Parent_Of_Generic): Retrieve instance declaration from
3678         its new position within wrapper package.
3680 2015-02-20  Arnaud Charlet  <charlet@adacore.com>
3682         * s-parame-vxworks.adb, s-os_lib.ads: Update comments.
3684 2015-02-20  Robert Dewar  <dewar@adacore.com>
3686         * s-osinte-vxworks.ads (To_Timespec): Add comment about the
3687         issue of negative arguments.
3689 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
3691         * gnat1drv.adb: Minor consistency fix.
3693 2015-02-20  Pascal Obry  <obry@adacore.com>
3695         * s-osprim-mingw.adb (Get_Base_Time): Properly release lock in all
3696         paths.
3698 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
3700         * inline.adb (Expand_Inlined_Call): Skip again calls to subprogram
3701         renamings.
3702         * exp_ch6.adb (Expand_Call): Use back-end inlining
3703         instead of expansion for simple subprogram renamings.
3705 2015-02-20  Robert Dewar  <dewar@adacore.com>
3707         * exp_util.adb: Minor reformatting.
3709 2015-02-20  Vincent Celier  <celier@adacore.com>
3711         * switch-c.adb (Scan_Front_End_Switches): Do not fail when --RTS=
3712         is specified several times with different values that indicates
3713         the same runtime directory.
3715 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
3717         * sem_attr.adb (Check_Not_Incomplete_Type): Clean up code to
3718         handle properly illegal uses of attributes on prefixes on an
3719         incomplete type, both when the type of the prefix is locally
3720         incomplete, and when it is a limited view of a type whose
3721         non-limited view is not available.
3722         (Analyze_Attribute): Add calls to Check_Not_Incomplete_Type for
3723         'Address and others.
3725 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
3727         * exp_ch6.adb: Fix minor typo in comment.
3729 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
3731         * sinfo.ads: Add comment.
3733 2015-02-20  Olivier Hainque  <hainque@adacore.com>
3735         * opt.ads: Replace Opt.Suppress_All_Inlining by two separate
3736         flags controlling the actual FE inlining out of pragma Inline
3737         and pragma Inline_Always.
3738         * adabkend.adb (Scan_Compiler_Arguments): Set both flags to True
3739         on -fno-inline, which disables all inlining in compilers with
3740         an Ada back-end and without back-end inlining support.
3741         * back_end.adb (Scan_Back_End_Switches): Set the Inline related
3742         flag to True on -fno-inline and leave Inline_Always alone for
3743         gcc back-ends.
3744         * back_end.ads (Scan_Compiler_Arguments): Adjust spec wrt the
3745         names of the Opt flags it sets.
3746         * gnat1drv.adb (Adjust_Global_Switches): Remove test on
3747         Opt.Suppress_All_Inlining in the Back_End_Inlining computation.
3748         * sem_prag.adb (Make_Inline): Remove early return conditioned
3749         on Opt.Suppress_All_Inlining.
3750         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Use the flags to
3751         disable the calls to Build_Body_To_Inline otherwise triggered
3752         by pragma Inline or Inline_Always. This will prevent actual
3753         front-end inlining of the subprogram on calls.
3755 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
3757         * exp_ch3.adb (Default_Initialize_Object): Call Add_Inlined_Body on the
3758         Abort_Undefer_Direct function.
3759         * exp_ch5.adb (Expand_N_Assignment_Statement): Likewise.
3760         * exp_intr.adb (Expand_Unc_Deallocation): Likewise.
3761         * exp_prag.adb (Expand_Pragma_Abort_Defer): Likewise.
3762         * exp_ch4.adb (Expand_N_Selected_Component): Adjust call to
3763         Add_Inlined_Body.
3764         * exp_ch6.adb (Expand_Call): Adjust calls to Add_Inlined_Body.
3765          Remove call to Register_Backend_Call and move code resetting
3766         Needs_Debug_Info on inlined subprograms to...
3767         * inline.ads (Add_Inlined_Body): Add N parameter.
3768         (Register_Backend_Call): Delete.
3769         * inline.adb (Add_Inlined_Body): ...here and simplify.
3770          Register the call with Backend_Calls directly.
3771         (Register_Backend_Call): Delete.
3772         * s-stalib.ads (Abort_Undefer_Direct): Restore pragma Inline.
3774 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
3776         * s-stalib.ads: Fix typo.
3778 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
3780         * exp_ch3.adb (Default_Initialize_Object): If the object has a
3781         delayed freeze, the actions associated with default initialization
3782         must be part of the freeze actions, rather that being inserted
3783         directly after the object declaration.
3785 2015-02-20  Robert Dewar  <dewar@adacore.com>
3787         * lib-load.adb: Minor comment update.
3789 2015-02-20  Vincent Celier  <celier@adacore.com>
3791         * prj-proc.adb (Process_Case_Construction): When there are
3792         incomplete withed projects and the case variable is unknown,
3793         skip the case construction.
3795 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
3797         * exp_ch6.adb (Expand_Actuals): Add caller-side invariant checks
3798         when an actual is a view conversion, either because the call is
3799         to an inherited operation, or because the actual is an explicit
3800         type conversion to an ancestor type.  Fixes ACATS 4.0D: C732001
3802 2015-02-20  Robert Dewar  <dewar@adacore.com>
3804         * einfo.ads: Minor comment updates Fix missing pragma Inline
3805         for Set_Partial_View_Has_Unknown_Discr.
3806         * einfo.adb (Write_Entity_Flags): Add missing entry for
3807         Partial_View_Has_Unknown_Discr.
3808         * sem_ch3.adb: Minor reformatting.
3810 2015-02-20  Vincent Celier  <celier@adacore.com>
3812         * opt.ads: Minor cleanup: remove mention of gprmake.
3813         * s-stalib.ads (Abort_Undefer_Direct): Do not inline.
3814         * s-tataat.adb: Do not call System.Tasking.Self but directly
3815         System.Task_Primitives.Operations.Self.
3817 2015-02-20  Arnaud Charlet  <charlet@adacore.com>
3819         * gnat_rm.texi, gnat_ugn.texi: Now automatically generated from
3820         sphinx in the doc directory.
3821         * doc: New directory containing sphinx versions of gnat_rm and gnat_ugn
3823 2015-02-20  Robert Dewar  <dewar@adacore.com>
3825         * sem_res.adb: Minor reformatting.
3826         * exp_ch9.adb (Build_Protected_Spec): Copy Aliased setting when
3827         building spec.
3828         * sem_ch13.adb (Analyze_Aspect_Specifications): Exclude Boolean
3829         aspects from circuitry setting delay required to false if the
3830         argument is an integer literal.
3832 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
3834         * einfo.ads. einfo.adb (Partial_View_Has_Unknown_Discr):  New flag
3835         on type entities, to enforce AI12-0133: default initialization
3836         of types whose partial view has unknown discriminants does not
3837         get an invariant check, because clients of the unit can never
3838         declare objects of such types.
3839         * sem_ch3.adb (Find_Type_Name); Set new flag
3840         Partial_View_Has_Unknown_Discr when needed.
3841         * exp_ch3.adb (Expand_N_Object_Declaration): Use flag to suppress
3842         generation of invariant call on default-initialized object.
3844 2015-02-08  Eric Botcazou  <ebotcazou@adacore.com>
3846         * gcc-interface/decl.c (gnat_to_gnu_param): Do not strip the padding
3847         if the parameter either is passed by reference or if the alignment
3848         would be lowered.
3850 2015-02-08  Eric Botcazou  <ebotcazou@adacore.com>
3852         * gcc-interface/decl.c (is_cplusplus_method): Use Is_Primitive flag to
3853         detect primitive operations of tagged and untagged types.
3855 2015-02-08  Eric Botcazou  <ebotcazou@adacore.com>
3857         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not bother about alias
3858         sets in presence of derivation for subprogram types.
3860 2015-02-08  Eric Botcazou  <ebotcazou@adacore.com>
3862         * gcc-interface/utils.c (begin_subprog_body): Assert that the body is
3863         present in the same context as the declaration.
3865 2015-02-07  Jakub Jelinek  <jakub@redhat.com>
3867         PR middle-end/64340
3868         * gcc-interface/trans.c (gigi): Recreate optimization_default_node
3869         and optimization_current_node after tweaking global_options.
3871 2015-02-05  Robert Dewar  <dewar@adacore.com>
3873         * prj-proc.adb, sem_aux.adb, exp_ch9.adb, errout.adb, prj-dect.adb,
3874         prj-nmsc.adb: Minor reformatting.
3876 2015-02-05  Ed Schonberg  <schonberg@adacore.com>
3878         * sem_type.adb (Covers): In ASIS_Mode the Corresponding_Record
3879         of a protected type may not be available, so to check conformance
3880         with an interface type, examine the interface list in the type
3881         declaration directly.
3882         (Write_Overloads): Improve information for indirect calls,
3883         for debugger use.
3885 2015-02-05  Ed Schonberg  <schonberg@adacore.com>
3887         * exp_ch3.adb (Make_Tag_Assignment): Do not perform this
3888         expansion activity in ASIS mode.
3890 2015-02-05  Javier Miranda  <miranda@adacore.com>
3892         * errout.adb (Error_Msg_PT): Add missing error.
3893         * sem_ch6.adb (Check_Synchronized_Overriding): Check the missing
3894         RM rule.  Code cleanup.
3895         * exp_ch9.adb (Build_Wrapper_Spec): Propagate "constant" in
3896         anonymous access types.  Found working on the tests. Code cleanup.
3898 2015-02-05  Vincent Celier  <celier@adacore.com>
3900         * prj-dect.adb (Parse_Attribute_Declaration): Continue scanning
3901         when there are incomplete withs.
3902         * prj-nmsc.adb (Process_Naming): Do not try to get the value
3903         of an element when it is nil.
3904         (Check_Naming): Do not check a nil suffix for illegality
3905         * prj-proc.adb (Expression): Do not process an empty term.
3906         * prj-strt.adb (Attribute_Reference): If attribute cannot be
3907         found, parse a possible index to avoid cascading errors.
3909 2015-02-05  Ed Schonberg  <schonberg@adacore.com>
3911         * sem_aux.adb (Is_Derived_Type): A subprogram_type generated
3912         for an access_to_subprogram declaration is not a derived type.
3914 2015-02-05  Robert Dewar  <dewar@adacore.com>
3916         * errout.adb (Error_Msg_Internal): For non-serious error set
3917         Fatal_Error to Ignored.
3918         * lib-load.adb (Load_Unit): Minor comment updates.
3919         * sem_ch10.adb (Analyze_With_Clause): Propagate Fatal_Error
3920         setting from with'ed unit to with'ing unit.
3921         * sem_prag.adb (Analyze_Pragma, case Warnings): Document handling
3922         of ambiguity.
3924 2015-02-05  Yannick Moy  <moy@adacore.com>
3926         * sem_prag.adb, par-prag.adb: Minor code clean up.
3928 2015-02-05  Yannick Moy  <moy@adacore.com>
3930         * par-prag.adb (Pragma_Warnings): Update for extended form
3931         of pragma Warnings. The "one" argument case may now have 2 or
3932         3 arguments.
3933         * sem_prag.adb (Analyze_Pragma/Pragma_Warnings): Update for
3934         extended form of pragma Warnings. Pragma with tool name is either
3935         rewritten as null or as an equivalent form without tool name,
3936         before reanalysis.
3937         * snames.ads-tmpl (Name_Gnatprove): New name.
3939 2015-02-05  Robert Dewar  <dewar@adacore.com>
3941         * sem_ch13.adb (Add_Invariants): Don't assume invariant is
3942         standard Boolean.
3943         * sem_prag.adb (Analyze_Pragma, case Check): Don't assume
3944         condition is standard Boolean, it can be non-standard derived
3945         Boolean.
3947 2015-02-05  Robert Dewar  <dewar@adacore.com>
3949         * checks.adb (Enable_Range_Check): Disconnect attempted
3950         optimization for the case of range check for subscript of
3951         unconstrained array.
3953 2015-02-05  Robert Dewar  <dewar@adacore.com>
3955         * par-ch13.adb (With_Present): New function
3956         (Aspect_Specifications_Present): Handle WHEN in place of WITH
3957         (Get_Aspect_Specifications): Comment update.
3958         * par.adb: Comment updates.
3960 2015-02-05  Robert Dewar  <dewar@adacore.com>
3962         * errout.adb (Handle_Serious_Error): New setting of Fatal_Error.
3963         * frontend.adb (Frontend): New setting of Fatal_Error.
3964         * lib-load.adb (Create_Dummy_Package_Unit): New setting of
3965         Fatal_Error.
3966         (Load_Main_Source): New setting of Fatal_Error
3967         (Load_Unit): New setting of Fatal_Error.
3968         * lib-writ.adb (Add_Preprocessing_Dependency): New setting of
3969         Fatal_Error.
3970         (Ensure_System_Dependency): New setting of Fatal_Error.
3971         * lib.adb (Fatal_Error): New setting of Fatal_Error
3972         (Set_Fatal_Error): New setting of Fatal_Error.
3973         * lib.ads: New definition of Fatal_Error and associated routines.
3974         * par-ch10.adb (P_Compilation_Unit): New setting of Fatal_Error.
3975         * par-load.adb (Load): New setting of Fatal_Error.
3976         * rtsfind.adb (Load_RTU): New setting of Fatal_Error.
3977         * sem_ch10.adb (Analyze_Compilation_Unit): New setting of
3978         Fatal_Error.
3979         (Optional_Subunit): New setting of Fatal_Error.
3980         (Analyze_Proper_Body): New setting of Fatal_Error.
3981         (Load_Needed_Body): New setting of Fatal_Error.
3983 2015-02-05  Ed Schonberg  <schonberg@adacore.com>
3985         * sem_res.adb (Resolve_Call): If the function being called has
3986         out parameters do not check for language version if the function
3987         comes from a predefined unit, as those are always compiled in
3988         Ada 2012 mode.
3990 2015-02-05  Ed Schonberg  <schonberg@adacore.com>
3992         * sem_ch3.adb (Process_Full_View): Verify that the full view
3993         of a type extension must carry an explicit limited keyword if
3994         the partial view does (RM 7.3 (10.1)).
3996 2015-02-05  Robert Dewar  <dewar@adacore.com>
3998         * g-rannum.adb, g-rannum.ads, s-rannum.adb, s-rannum.ads,
3999         sem_warn.ads: Minor reformatting.
4000         * exp_ch13.adb (Expand_N_Freeze_Entity): Add guard for aspect
4001         deleted by -gnatI.
4002         * sem_prag.adb (Analyze_Pragma, case Type_Invariant): Give
4003         error for abstract type.
4005 2015-02-05  Yannick Moy  <moy@adacore.com>
4007         * opt.ads (Warn_On_Suspicious_Contract): Update comment
4008         describing use.
4009         * sem_attr.adb (Analyze_Attribute/Attribute_Update): Warn on
4010         suspicious uses of 'Update.
4011         * sem_warn.adb, sem_warn.ads (Warn_On_Suspicious_Update): New
4012         function issues warning on suspicious uses of 'Update.
4013         * g-rannum.adb, g-rannum.ads, s-rannum.adb, s-rannum.ads: Mark
4014         package spec and body as SPARK_Mode Off.
4016 2015-02-05  Robert Dewar  <dewar@adacore.com>
4018         * sem_prag.adb (Set_Elab_Unit_Name): New name for Set_Unit_Name
4019         (Analyze_Pragma): Change Set_Unit_Name to Set_Elab_Unit_Name
4020         (Set_Elab_Unit_Name): Generate reference for Elaborate[_All]
4021         * sem_warn.adb (Warn_On_Unreferenced_Entity): Suppress warning
4022         for exported entity.
4024 2015-02-05  Hristian Kirtchev  <kirtchev@adacore.com>
4026         * sem_prag.adb (Check_Pragma_Conformance): Add
4027         local variable Arg. Ensure that all errors are associated with
4028         the pragma if it appears without an argument. Add comments on
4029         various cases.
4031 2015-02-05  Robert Dewar  <dewar@adacore.com>
4033         * lib-xref.adb: Minor reformatting.
4035 2015-02-05  Tristan Gingold  <gingold@adacore.com>
4037         PR ada/64349
4038         * env.c: Fix thinko: handle Darwin case before default one.
4040 2015-01-30  Robert Dewar  <dewar@adacore.com>
4042         * a-assert.adb: Minor reformatting.
4043         * sem_ch13.adb: Minor comment clarification.
4044         * types.ads: Minor comment update.
4045         * sem_eval.adb (Real_Or_String_Static_Predicate_Matches): Avoid blow up
4046         when we have a predicate that is nothing but an inherited dynamic
4047         predicate.
4049 2015-01-30  Jerome Guitton  <guitton@adacore.com>
4051         * gcc-interface/Makefile.in (x86-vxworks): Update GCC_SPEC_FILES to
4052         include cert link spec.
4054 2015-01-30  Robert Dewar  <dewar@adacore.com>
4056         * einfo.ads: Minor comment fix.
4057         * freeze.adb (Freeze_Profile): Add test for suspicious import
4058         in pure unit.
4059         * sem_prag.adb (Process_Import_Or_Interface): Test for suspicious
4060         use in Pure unit is now moved to Freeze (to properly catch
4061         Pure_Function exemption).
4063 2015-01-30  Bob Duff  <duff@adacore.com>
4065         * sem_res.ads: Minor comment fix.
4066         * sem_type.adb: sem_type.adb (Remove_Conversions): Need to
4067         check both operands of an operator.
4069 2015-01-30  Yannick Moy  <moy@adacore.com>
4071         * a-assert.ads, a-assert.adb: Mark package spec in SPARK. Set assertion
4072         policy for Pre to Ignore.
4073         (Assert): Add precondition.
4075 2015-01-30  Robert Dewar  <dewar@adacore.com>
4077         * sem_prag.adb (Process_Import_Or_Interface): Warn if used in
4078         Pure unit.
4079         * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Clarify
4080         documentation for some special cases of invalid attempts at
4081         based integers.
4083 2015-01-30  Gary Dismukes  <dismukes@adacore.com>
4085         * errout.ads: Minor reformatting.
4087 2015-01-30  Yannick Moy  <moy@adacore.com>
4089         * inline.adb (Process_Formals): Use the sloc of
4090         the inlined node instead of the sloc of the actual parameter,
4091         when replacing formal parameters by the actual one.
4093 2015-01-30  Arnaud Charlet  <charlet@adacore.com>
4095         * g-expect.adb (Get_Command_Output): Use infinite timeout when
4096         calling Expect.
4098 2015-01-30  Ed Schonberg  <schonberg@adacore.com>
4100         * sem_ch12.adb (Analyze_Associations): If an in-parameter is
4101         defaulted in an instantiation, add an entry in the list of actuals
4102         to indicate the default value of the formal (as is already done
4103         for defaulted subprograms).
4105 2015-01-30  Javier Miranda  <miranda@adacore.com>
4107         * errout.adb (Error_Msg_PT): Minor error phrasing update.
4109 2015-01-30  Robert Dewar  <dewar@adacore.com>
4111         * sem_warn.adb (Warn_On_Known_Condition): Improve error message
4112         for object case.
4114 2015-01-30  Pierre-Marie de Rodat  <derodat@adacore.com>
4116         * exp_dbug.adb (Get_Encoded_Name): When
4117         -fgnat-encodings=minimal, do not generate names for biased types.
4119 2015-01-30  Tristan Gingold  <gingold@adacore.com>
4121         PR ada/64349
4122         * env.c: Move vxworks and darwin includes out of #ifdef IN_RTS.
4124 2015-01-30  Gary Dismukes  <dismukes@adacore.com>
4126         * freeze.adb: Minor reformatting.
4128 2015-01-30  Javier Miranda  <miranda@adacore.com>
4130         * errout.ads (Error_Msg_PT): Replace Node_Id by Entity_Id and
4131         improve its documentation.
4132         * errout.adb (Error_Msg_PT): Improve the error message.
4133         * sem_ch6.adb (Check_Conformance): Update call to Error_Msg_PT.
4134         (Check_Synchronized_Overriding): Update call to Error_Msg_PT.
4135         * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup.
4137 2015-01-30  Robert Dewar  <dewar@adacore.com>
4139         * sem_warn.adb (Warn_On_Known_Condition): Do special casing of
4140         message for False case.
4142 2015-01-30  Doug Rupp  <rupp@adacore.com>
4144         * s-vxwext-kernel.ads (Task_Cont): Remove imported subprogram body.
4145         * s-vxwext-kernel.adb (Task_Cont): New subpprogram body specialized for
4146         kernel.
4148 2015-01-30  Gary Dismukes  <dismukes@adacore.com>
4150         * sem_attr.adb (Declared_Within_Generic_Unit):
4151         New function to test whether an entity is declared within the
4152         declarative region of a given generic unit.
4153         (Resolve_Attribute): For checking legality of subprogram'Access within
4154         a generic unit, call new Boolean function Declared_Within_Generic_Unit
4155         instead of simply comparing the results of Enclosing_Generic_Unit on
4156         the prefix and access type.  Correct minor comment typos.
4158 2015-01-30  Robert Dewar  <dewar@adacore.com>
4160         * freeze.adb, exp_util.ads: Update comment.
4161         * exp_util.adb, exp_ch3.adb: Minor code reorganization and reformatting.
4162         * sem_util.adb: Minor: fix typo.
4164 2015-01-30  Hristian Kirtchev  <kirtchev@adacore.com>
4166         * sem_attr.adb (Analyze_Attribute): Ensure that
4167         the check concerning Refined_Post takes precedence over the
4168         other cases.
4170 2015-01-30  Gary Dismukes  <dismukes@adacore.com>
4172         * sem_prag.adb: Minor typo fixes and reformatting.
4174 2015-01-30  Yannick Moy  <moy@adacore.com>
4176         * sem_attr.adb: Code clean up.
4178 2015-01-30  Robert Dewar  <dewar@adacore.com>
4180         * ali.adb (Scan_ALI): Set Serious_Errors flag in Unit record.
4181         * ali.ads (Unit_Record): Add new field Serious_Errors.
4182         * lib-writ.adb (Write_Unit_Information): Set SE (serious errors)
4183         attribute in U line.
4184         * lib-writ.ads: New attribute SE (serious erors) in unit line.
4186 2015-01-30  Hristian Kirtchev  <kirtchev@adacore.com>
4188         * einfo.adb Update the usage of attributes Entry_Bodies_Array,
4189         Lit_Indexes, Scale_Value, Storage_Size_Variable,
4190         String_Literal_Low_Bound along associated routines and
4191         Write_FieldX_Name.
4192         (Pending_Access_Types): New routine.
4193         (Set_Pending_Access_Types): New routine.
4194         (Write_Field15_Name): Add an entry for Pending_Access_Types.
4195         * einfo.ads Add new attribute Pending_Access_Types along
4196         with usage in nodes.  Update the usage of attributes
4197         Entry_Bodies_Array, Lit_Indexes, Scale_Value,
4198         Storage_Size_Variable, String_Literal_Low_Bound.
4199         (Pending_Access_Types): New routine along with pragma Inline.
4200         (Set_Pending_Access_Types): New routine along with pragma Inline.
4201         * exp_ch3.adb (Expand_Freeze_Array_Type): Add new local variable
4202         Ins_Node. Determine the insertion node for anonynous access type
4203         that acts as a component type of an array. Update the call to
4204         Build_Finalization_Master.
4205         (Expand_Freeze_Record_Type): Update
4206         the calls to Build_Finalization_Master.
4207         (Freeze_Type): Remove
4208         local variable RACW_Seen. Factor out the code that deals with
4209         remote access-to-class-wide types. Create a finalization master
4210         when the designated type contains a private component. Fully
4211         initialize all pending access types.
4212         (Process_RACW_Types): New routine.
4213         (Process_Pending_Access_Types): New routine.
4214         * exp_ch4.adb (Expand_Allocator_Expression): Allocation no longer
4215         needs to set primitive Finalize_Address.
4216         (Expand_N_Allocator): Allocation no longer sets primitive
4217         Finalize_Address.
4218         * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
4219         Update the call to Build_Finalization_Master.
4220         (Make_Build_In_Place_Call_In_Allocator): Allocation no longer
4221         needs to set primitive Finalize_Address.
4222         * exp_ch7.adb (Add_Pending_Access_Type): New routine.
4223         (Build_Finalization_Master): New parameter profile. Associate
4224         primitive Finalize_Address with the finalization master if the
4225         designated type has been frozen, otherwise treat the access
4226         type as pending. Simplify the insertion of the master and
4227         related initialization code.
4228         (Make_Finalize_Address_Body): Allow Finalize_Address for class-wide
4229         abstract types.
4230         (Make_Set_Finalize_Address_Call): Remove forlam parameter Typ.
4231         Simplify the implementation.
4232         * exp_ch7.ads (Build_Finalization_Master): New parameter profile
4233         along with comment on usage.
4234         (Make_Set_Finalize_Address_Call): Remove formal parameter Typ. Update
4235         the comment on usage.
4236         * exp_util.adb (Build_Allocate_Deallocate_Proc): Use routine
4237         Finalize_Address to retrieve the primitive.
4238         (Finalize_Address): New routine.
4239         (Find_Finalize_Address): Removed.
4240         * exp_util.ads (Finalize_Address): New routine.
4241         * freeze.adb (Freeze_All): Remove the generation of finalization
4242         masters.
4243         * sem_ch3.adb (Analyze_Full_Type_Declaration): Propagate any
4244         pending access types from the partial to the full view.
4246 2015-01-30  Robert Dewar  <dewar@adacore.com>
4248         * sem_disp.adb: Minor reformatting.
4249         * sem_disp.ads: Documentation update.
4251 2015-01-30  Ed Schonberg  <schonberg@adacore.com>
4253         * sem_disp.adb (Is_Dynamically_Tagged): when applied to an entity
4254         or a function call, return True if type is class-wide.
4255         * sem_res.adb (Resolve_Case_Expression, Resolve_If_Expression);
4256         Apply RM 4.5.7 (17/3): all or none of the dependent expression
4257         of a conditional expression must be dynamically tagged.
4259 2015-01-30  Ed Schonberg  <schonberg@adacore.com>
4261         * sem_ch6.adb (Analyze_Function_Return): In an extended return
4262         statement, apply accessibility check to result object when there
4263         is no initializing expression (Ada 2012 RM 6.5 (5.4/3))
4265 2015-01-30  Robert Dewar  <dewar@adacore.com>
4267         * sem_ch4.adb (Analyze_If_Expression): Allow for non-standard
4268         Boolean for case where ELSE is omitted.
4269         * sem_res.adb: Minor reformatting.
4271 2015-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4273         Fix build under cygwin/64.
4274         * adaint.h: Add check for __CYGWIN__.
4275         * mingw32.h: Prevent windows.h from including x86intrin.h in GCC.
4277 2015-01-19  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4279         PR ada/64640
4280         * adaint.c: Handle __CYGWIN__ like __MINGW32__ here.
4281         * mingw32.h: Don't include <tchar.h> under cygwin.
4282         (_O_U8TEXT, _O_U16TEXT, _O_WTEXT): Set to _O_TEXT if not yet defined.
4284 2015-01-15  Thomas Schwinge  <thomas@codesourcery.com>
4286         * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8)
4287         (DEF_FUNCTION_TYPE_VAR_12): New macros.
4289 2015-01-09  Michael Collison  <michael.collison@linaro.org>
4291         * gcc-interface/cuintp.c: Include hash-set.h, machmode.h,
4292         vec.h, double-int.h, input.h, alias.h, symtab.h,
4293         fold-const.h, wide-int.h, and inchash.h due to
4294         flattening of tree.h.
4295         * gcc-interface/decl.c: Ditto.
4296         * gcc-interface/misc.c: Ditto.
4297         * gcc-interface/targtyps.c: Include hash-set.h, machmode.h,
4298         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h,
4299         fold-const.h, wide-int.h, and inchash.h due to
4300         flattening of tree.h.
4301         * gcc-interface/trans.c: Include hash-set.h, machmode.h,
4302         vec.h, double-int.h, input.h, alias.h, symtab.h, real.h,
4303         fold-const.h, wide-int.h, inchash.h due to
4304         flattening of tree.h.
4305         * gcc-interface/utils.c: Include hash-set.h, machmode.h,
4306         vec.h, double-int.h, input.h, alias.h, symtab.h,
4307         fold-const.h, wide-int.h, and inchash.h due to
4308         flattening of tree.h.
4309         * gcc-interface/utils2.c: Ditto.
4311 2015-01-07  Robert Dewar  <dewar@adacore.com>
4313         * sem_warn.adb (Check_One_Unit): Don't give unused entities
4314         warning for a package which is used as a generic parameter.
4316 2015-01-07  Bob Duff  <duff@adacore.com>
4318         * usage.adb (Usage): Correct documentation of
4319         -gnatw.f switches.
4321 2015-01-07  Robert Dewar  <dewar@adacore.com>
4323         * s-fileio.adb: Minor reformatting.
4325 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
4327         * sem_ch12.adb (Instantiate_Object): If formal is an anonymous
4328         access to subprogram, replace its formals with new entities when
4329         building the object declaration, both if actual is present and
4330         when it is defaulted.
4332 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
4334         * sem_ch5.adb (Analyze_Assignment): If left-hand side is a view
4335         conversion and type of expression has invariant, apply invariant
4336         check on expression.
4338 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
4340         * sem_ch3.adb (Create_Constrained_Components): A call to
4341         Gather_Components may detect an error if an inherited discriminant
4342         that controls a variant is non-static.
4343         * sem_aggr.adb (Resolve_Record_Aggregate, Step 5): The call to
4344         Gather_Components may report an error if an inherited discriminant
4345         in a variant in non-static.
4346         * sem_util.adb (Gather_Components): If a non-static discriminant
4347         is inherited do not report error here, but let caller handle it.
4348         (Find_Actual): Small optimization.
4350 2015-01-07  Bob Duff  <duff@adacore.com>
4352         * usage.adb (Usage): Document -gnatw.f switch.
4354 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
4356         * sem_ch12.adb: Code clean up and minor reformatting.
4358 2015-01-07  Robert Dewar  <dewar@adacore.com>
4360         * exp_ch4.adb (Expand_N_Type_Conversion): Add guard for
4361         Raise_Accessibility_Error call.
4362         * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Add documentation
4363         on handling of invalid digits in based constants.
4364         * s-fatgen.ads: Minor reformatting.
4365         * sem_attr.adb (Analyze_Attribute, case Unrestricted_Access):
4366         Avoid noting bogus modification for Valid test.
4367         * snames.ads-tmpl (Name_Attr_Long_Float): New Name.
4368         * einfo.ads: Minor reformatting.
4369         * sem_warn.adb: Minor comment clarification.
4370         * sem_ch12.adb: Minor reformatting.
4372 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
4374         * exp_ch5.adb (Expand_Predicated_Loop): Handle properly loops
4375         over static predicates when the loop parameter specification
4376         carries a Reverse indicator.
4378 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
4380         * sem_ch12.adb (Instantiate_Object): If formal has a default,
4381         actual is missing and formal has an anonymous access type, copy
4382         access definition in full so that tree for instance is properly
4383         formatted for ASIS use.
4385 2015-01-07  Bob Duff  <duff@adacore.com>
4387         * sem_elab.adb (Check_Internal_Call_Continue): Give a warning
4388         for P'Access, where P is a subprogram in the same package as
4389         the P'Access, and the P'Access is evaluated at elaboration
4390         time, and occurs before the body of P. For example, "X : T :=
4391         P'Access;" would allow a subsequent call to X.all to be an
4392         access-before-elaboration error; hence the warning. This warning
4393         is enabled by the -gnatw.f switch.
4394         * opt.ads (Warn_On_Elab_Access): New flag for warning switch.
4395         * warnsw.adb (Set_Dot_Warning_Switch): Set Warn_On_Elab_Access.
4396         * gnat_ugn.texi: Document the new warning.
4398 2015-01-07  Johannes Kanig  <kanig@adacore.com>
4400         * lib-xref-spark_specific.adb (Collect_SPARK_Xrefs): Skip unneeded
4401         cross ref files.
4403 2015-01-07  Robert Dewar  <dewar@adacore.com>
4405         * s-taprop-linux.adb, clean.adb: Minor reformatting.
4407 2015-01-07  Arnaud Charlet  <charlet@adacore.com>
4409         * s-tassta.adb: Relax some overzealous assertions.
4411 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
4413         * sem_ch6.adb (Analyze_Return_Type): An call that returns a limited
4414         view of a type is legal when context is a thunk generated for
4415         operation inherited from an interface.
4416         * exp_ch6.adb (Expand_Simple_Function_Return): If context is
4417         a thunk and return type is an incomplete type do not continue
4418         expansion; thunk will be fully elaborated when generating code.
4420 2015-01-07  Doug Rupp  <rupp@adacore.com>
4422         * s-osinte-mingw.ads (LARGE_INTEGR): New subtype.
4423         (QueryPerformanceFrequency): New imported procedure.
4424         * s-taprop-mingw.adb (RT_Resolution): Call above and return
4425         resolution vice a hardcoded value.
4426         * s-taprop-solaris.adb (RT_Resolution): Call clock_getres and return
4427         resolution vice a hardcoded value.
4428         * s-linux-android.ads (clockid_t): New subtype.
4429         * s-osinte-aix.ads (clock_getres): New imported subprogram.
4430         * s-osinte-android.ads (clock_getres): Likewise.
4431         * s-osinte-freebsd.ads (clock_getres): Likewise.
4432         * s-osinte-solaris-posix.ads (clock_getres): Likewise.
4433         * s-osinte-darwin.ads (clock_getres): New subprogram.
4434         * s-osinte-darwin.adb (clock_getres): New subprogram.
4435         * thread.c (__gnat_clock_get_res) [__APPLE__]: New function.
4436         * s-taprop-posix.adb (RT_Resolution): Call clock_getres to
4437         calculate resolution vice hard coded value.
4439 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
4441         * exp_util.adb (Make_CW_Equivalent_Type): If root type is a
4442         limited view, use non-limited view when available to create
4443         equivalent record type.
4445 2015-01-07  Vincent Celier  <celier@adacore.com>
4447         * gnatcmd.adb: Remove command Sync and any data and processing
4448         related to this command. Remove project processing for gnatstack.
4449         * prj-attr.adb: Remove package Synchonize and its attributes.
4451 2015-01-07  Vincent Celier  <celier@adacore.com>
4453         * clean.adb: Minor error message change.
4455 2015-01-07  Tristan Gingold  <gingold@adacore.com>
4457         PR ada/64349  
4458         * env.c (__gnat_environ): Adjust for darwin9/darwin10.
4460 2015-01-07  Javier Miranda  <miranda@adacore.com>
4462         * sem_ch10.adb (Analyze_With_Clause): Compiling under -gnatq
4463         protect the frontend against never ending recursion caused by
4464         circularities in the sources.
4466 2015-01-07  Robert Dewar  <dewar@adacore.com>
4468         * a-reatim.adb, make.adb, exp_pakd.adb, i-cpoint.adb, sem_ch8.adb,
4469         exp_ch3.adb: Minor reformatting.
4471 2015-01-07  Doug Rupp  <rupp@adacore.com>
4473         * s-linux.ads (clockid_t): New subtype.
4474         * s-osinte-linux.ads (pragma Linker Options): Add -lrt.
4475         (clockid_t): New subtype.
4476         (clock_getres): Import system call.
4477         * s-taprop-linux.adb (System.OS_Constants): With and rename.
4478         (RT_Resolution): Remove
4479         hardcoded value and call clock_getres.
4480         * s-linux-sparc.ads, s-linux-mipsel.ads, s-linux-hppa.ads,
4481         s-linux-alpha.ads, s-linux-x32.ads (clockid_t): Add new subtype.
4483 2015-01-07  Robert Dewar  <dewar@adacore.com>
4485         * sem_warn.adb (Check_One_Unit): Guard against context item
4486         with no Entity field.
4488 2015-01-07  Vincent Celier  <celier@adacore.com>
4490         * clean.adb (Gnatclean): Warn that 'gnatclean -P' is obsolete.
4491         * make.adb (Initialize): Warn that 'gnatmake -P' is obsolete.
4493 2015-01-07  Vincent Celier  <celier@adacore.com>
4495         * prj-conf.adb (Parse_Project_And_Apply_Config): Always finalize
4496         errors/warnings in the first parsing of the project files,
4497         to display the warnings when there is no errors.
4499 2015-01-07  Tristan Gingold  <gingold@adacore.com>
4501         * i-cpoint.adb (Copy_Terminated_Array): Nicely handle null target.
4503 2015-01-07  Doug Rupp  <rupp@adacore.com>
4505         * s-taprop-vxworks.adb (Stop_All_Tasks): Pass return
4506         value from Int_Lock as parameter to Int_Unlock.
4507         * s-osinte-vxworks.ads (Int_Unlock): Add parameter.
4508         * s-vxwext.ads (Int_Unlock): Likewise.
4509         * s-vxwext-kernel.adb (intUnlock, Int_Unlock): Likewise.
4510         * s-vxwext-kernel.ads (Int_Unlock): Likewise.
4511         * s-vxwext-rtp.adb (Int_Unlock): Likewise.
4512         * s-vxwext-rtp.ads (Int_Unlock): Likewise.
4514 2015-01-07  Pierre-Marie de Rodat  <derodat@adacore.com>
4516         * exp_pakd.adb: Add a comment in exp_pakd.adb to explain why we
4517         keep ___XP suffixes
4519 2015-01-07  Tristan Gingold  <gingold@adacore.com>
4521         * i-cpoint.adb (Copy_Terminated_Array): Use Copy_Array to
4522         handle overlap.
4524 2015-01-07  Eric Botcazou  <ebotcazou@adacore.com>
4526         * sem_ch3.adb (Analyze_Full_Type_Declaration): Do not
4527         automatically set No_Strict_Aliasing on access types.
4528         * fe.h (No_Strict_Aliasing_CP): Declare.
4529         * gcc-interface/trans.c (gigi): Force flag_strict_aliasing to 0 if
4530         No_Strict_Aliasing_CP is set.
4532 2015-01-07  Johannes Kanig  <kanig@adacore.com>
4534         * sem_ch8.adb (Analyze_Subprogram_Renaming) do
4535         not build function wrapper in gnatprove mode when the package
4536         is externally axiomatized.
4538 2015-01-07  Jose Ruiz  <ruiz@adacore.com>
4540         * a-reatim.adb (Time_Of): Reduce the number of spurious overflows in
4541         intermediate computations when the parameters have different signs.
4543 2015-01-07  Javier Miranda  <miranda@adacore.com>
4545         * exp_ch3.adb (Build_Init_Procedure): For derived types,
4546         improve the code which takes care of identifying and moving to
4547         the beginning of the init-proc the call to the init-proc of the
4548         parent type.
4550 2015-01-07  Olivier Hainque  <hainque@adacore.com>
4552         * gcc-interface/trans.c (gnat_to_gnu, <N_Expression_With_Action>):
4553         Elaborate the expression as part of the same stmt group as the actions.
4555 2015-01-07  Robert Dewar  <dewar@adacore.com>
4557         * sem_ch3.adb: Minor error message change.
4559 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
4561         * sem_prag.adb (Analyze_Pragma, case Preelaborable_Initialization):
4562         Following AI05-028, the pragam applies legally to any composite type.
4564 2015-01-07  Arnaud Charlet  <charlet@adacore.com>
4566         * s-osinte-vxworks.adb, s-osinte-vxworks.ads
4567         (sigwait, sigwaitinfo): Removed, not needed after all on any
4568         VxWorks configurations.
4570 2015-01-07  Robert Dewar  <dewar@adacore.com>
4572         * sem_ch3.adb, freeze.adb, exp_disp.adb: Minor reformatting.
4574 2015-01-07  Javier Miranda  <miranda@adacore.com>
4576         * exp_disp.adb (Expand_Interface_Conversion): Adding missing
4577         generation of accessibility check.
4579 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
4581         * sem_ch3.adb (Derived_Type_Declaration): In the case of an
4582         illegal completion from a class- wide type, set etype of the
4583         derived type properly to prevent cascaded errors.
4585 2015-01-07  Robert Dewar  <dewar@adacore.com>
4587         * prj.ads, i-cpoint.adb, freeze.adb, ghost.adb, prj-err.adb: Minor
4588         reformatting.
4590 2015-01-07  Robert Dewar  <dewar@adacore.com>
4592         * restrict.adb (Check_Restriction_No_Use_Of_Attribute):
4593         New procedure.
4594         (OK_No_Use_Of_Entity_Name): New function.
4595         (Set_Restriction_No_Use_Of_Entity): New procedure.
4596         * restrict.ads (Check_Restriction_No_Use_Of_Attribute):
4597         New procedure.
4598         (OK_No_Use_Of_Entity_Name): New function.
4599         (Set_Restriction_No_Use_Of_Entity): New procedure.
4600         * sem_ch8.adb (Find_Direct_Name): Add check for violation of
4601         No_Use_Of_Entity.
4602         * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
4603         Add processing for new restriction No_Use_Of_Entity.
4605 2015-01-07  Eric Botcazou  <ebotcazou@adacore.com>
4607         * freeze.adb (Freeze_Array_Type): Apply same handling to Is_Atomic
4608         component type as to Has_Atomic_Components type.  Remove useless
4609         test on Is_Aliased component type.
4611 2015-01-07  Hristian Kirtchev  <kirtchev@adacore.com>
4613         * alloc.ads Alphabetize several declarations. Add constants
4614         Ignored_Ghost_Units_Initial and Ignored_Ghost_Units_Increment.
4615         * atree.adb Add with and use clauses for Opt.
4616         (Allocate_Initialize_Node): Mark a node as ignored Ghost
4617         if it is created in an ignored Ghost region.
4618         (Ekind_In): New variant.
4619         (Is_Ignored_Ghost_Node): New routine.
4620         (Set_Is_Ignored_Ghost_Node): New routine.
4621         * atree.adb Aplhabetize several subprograms declarations. Flag
4622         Spare0 is now known as Is_Ignored_Ghost_Node.
4623         (Ekind_In): New variant.
4624         (Is_Ignored_Ghost_Node): New routine.
4625         (Set_Is_Ignored_Ghost_Node): New routine.
4626         * einfo.adb: Flag 279 is now known as Contains_Ignored_Ghost_Code.
4627         (Contains_Ignored_Ghost_Code): New routine.
4628         (Set_Contains_Ignored_Ghost_Code): New routine.
4629         (Set_Is_Checked_Ghost_Entity, Set_Is_Ignored_Ghost_Entity):
4630         It is now possible to set this property on an unanalyzed entity.
4631         (Write_Entity_Flags): Output the status of flag
4632         Contains_Ignored_Ghost_Code.
4633         * einfo.ads New attribute Contains_Ignored_Ghost_Code along with
4634         usage in nodes.
4635         (Contains_Ignored_Ghost_Code): New routine
4636         along with pragma Inline.
4637         (Set_Contains_Ignored_Ghost_Code): New routine along with pragma Inline.
4638         * exp_ch3.adb Add with and use clauses for Ghost.
4639         (Freeze_Type): Capture/restore the value of Ghost_Mode on entry/exit.
4640         Set the Ghost_Mode in effect.
4641         (Restore_Globals): New routine.
4642         * exp_ch7.adb (Process_Declarations): Do not process a context
4643         that invoves an ignored Ghost entity.
4644         * exp_dbug.adb (Qualify_All_Entity_Names): Skip an ignored Ghost
4645         construct that has been rewritten as a null statement.
4646         * exp_disp.adb Add with and use clauses for Ghost.
4647         (Make_DT): Capture/restore the value of Ghost_Mode on entry/exit. Set
4648         the Ghost_Mode in effect.
4649         (Restore_Globals): New routine.
4650         * exp_util.adb (Requires_Cleanup_Actions): An ignored Ghost entity
4651         does not require any clean up. Add two missing cases that deal
4652         with block statements.
4653         * freeze.adb Add with and use clauses for Ghost.
4654         (Freeze_Entity): Capture/restore the value of Ghost_Mode on entry/exit.
4655         Set the Ghost_Mode in effect.
4656         (Restore_Globals): New routine.
4657         * frontend.adb Add with and use clauses for Ghost. Remove any
4658         ignored Ghost code from all units that qualify.
4659         * ghost.adb New unit.
4660         * ghost.ads New unit.
4661         * gnat1drv.adb Add with clause for Ghost. Initialize and lock
4662         the table in package Ghost.
4663         * lib.ads: Alphabetize several subprogram declarations.
4664         * lib-xref.adb (Output_References): Do not generate reference
4665         information for ignored Ghost entities.
4666         * opt.ads Add new type Ghost_Mode_Type and new global variable
4667         Ghost_Mode.
4668         * rtsfind.adb (Load_RTU): Provide a clean environment when
4669         loading a runtime unit.
4670         * sem.adb (Analyze): Capture/restore the value of Ghost_Mode on
4671         entry/exit as the node may set a different mode.
4672         (Do_Analyze):
4673         Capture/restore the value of Ghost_Mode on entry/exit as the
4674         unit may be withed from a unit with a different Ghost mode.
4675         * sem_ch3.adb Add with and use clauses for Ghost.
4676         (Analyze_Full_Type_Declaration, Analyze_Incomplete_Type_Decl,
4677         Analyze_Number_Declaration, Analyze_Private_Extension_Declaration,
4678         Analyze_Subtype_Declaration): Set the Ghost_Mode in effect. Mark
4679         the entity as Ghost when there is a Ghost_Mode in effect.
4680         (Array_Type_Declaration): The implicit base type inherits the
4681         "ghostness" from the array type.
4682         (Derive_Subprogram): The
4683         alias inherits the "ghostness" from the parent subprogram.
4684         (Make_Implicit_Base): The implicit base type inherits the
4685         "ghostness" from the parent type.
4686         * sem_ch5.adb Add with and use clauses for Ghost.
4687         (Analyze_Assignment): Set the Ghost_Mode in effect.
4688         * sem_ch6.adb Add with and use clauses for Ghost.
4689         (Analyze_Abstract_Subprogram_Declaration, Analyze_Procedure_Call,
4690         Analyze_Subprogram_Body_Helper, Analyze_Subprogram_Declaration):
4691         Set the Ghost_Mode in effect. Mark the entity as Ghost when
4692         there is a Ghost_Mode in effect.
4693         * sem_ch7.adb Add with and use clauses for Ghost.
4694         (Analyze_Package_Body_Helper, Analyze_Package_Declaration,
4695         Analyze_Private_Type_Declaration): Set the Ghost_Mode in
4696         effect. Mark the entity as Ghost when there is a Ghost_Mode
4697         in effect.
4698         * sem_ch8.adb Add with and use clauses for Ghost.
4699         (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
4700         Analyze_Object_Renaming, Analyze_Package_Renaming,
4701         Analyze_Subprogram_Renaming): Set the Ghost_Mode in effect. Mark
4702         the entity as Ghost when there is a Ghost_Mode in effect.
4703         (Find_Type): Check the Ghost context of a type.
4704         * sem_ch11.adb Add with and use clauses for Ghost.
4705         (Analyze_Exception_Declaration): Set the Ghost_Mode in
4706         effect. Mark the entity as Ghost when there is a Ghost_Mode
4707         in effect.
4708         * sem_ch12.adb Add with and use clauses for Ghost.
4709         (Analyze_Generic_Package_Declaration,
4710         Analyze_Generic_Subprogram_Declaration): Set the Ghost_Mode in effect.
4711         Mark the entity as Ghost when there is a Ghost_Mode in effect.
4712         * sem_prag.adb Add with and use clauses for Ghost.
4713         (Analyze_Pragma): Ghost-related checks are triggered when there
4714         is a Ghost mode in effect.
4715         (Create_Abstract_State): Mark the
4716         entity as Ghost when there is a Ghost_Mode in effect.
4717         * sem_res.adb Add with and use clauses for Ghost.
4718         (Check_Ghost_Context): Removed.
4719         * sem_util.adb (Check_Ghost_Completion): Removed.
4720         (Check_Ghost_Derivation): Removed.
4721         (Incomplete_Or_Partial_View):
4722         Add a guard in case the entity has not been analyzed yet
4723         and does carry a scope.
4724         (Is_Declaration): New routine.
4725         (Is_Ghost_Entity): Removed.
4726         (Is_Ghost_Statement_Or_Pragma):
4727         Removed.
4728         (Is_Subject_To_Ghost): Removed.
4729         (Set_Is_Ghost_Entity):
4730         Removed.
4731         (Within_Ghost_Scope): Removed.
4732         * sem_util.adb (Check_Ghost_Completion): Removed.
4733         (Check_Ghost_Derivation): Removed.
4734         (Is_Declaration): New routine.
4735         (Is_Ghost_Entity): Removed.
4736         (Is_Ghost_Statement_Or_Pragma): Removed.
4737         (Is_Subject_To_Ghost): Removed.
4738         (Set_Is_Ghost_Entity): Removed.
4739         (Within_Ghost_Scope): Removed.
4740         * sinfo.ads Add a section on Ghost mode.
4741         * treepr.adb (Print_Header_Flag): New routine.
4742         (Print_Node_Header): Factor out code. Output flag
4743         Is_Ignored_Ghost_Node.
4744         * gcc-interface/Make-lang.in: Add dependency for unit Ghost.
4746 2015-01-06  Eric Botcazou  <ebotcazou@adacore.com>
4748         * freeze.adb (Freeze_Array_Type) <Complain_CS>: Remove always
4749         true test and unreachable 'else' arm.
4751 2015-01-06  Vincent Celier  <celier@adacore.com>
4753         * prj-conf.adb (Check_Target): Improve error message when
4754         there are mismatched targets between the on in the configuration
4755         project file and the specified one, either in the main project
4756         file or in the --target= switch.
4758 2015-01-06  Pascal Obry  <obry@adacore.com>
4760         * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Mode and
4761         Install_Name attribute definitions.
4763 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
4765         * freeze.adb (Wrap_Imported_Subprogram): Indicate that the
4766         generated Import pragma for the internal imported procedure does
4767         not come from an aspect, so that Is_Imported can be properly
4768         set for it.
4770 2015-01-06  Gary Dismukes  <dismukes@adacore.com>
4772         * sem_ch12.adb (Might_Inline_Subp): Record whether
4773         any subprograms in the generic package are marked with
4774         pragma Inline_Always (setting flag Has_Inline_Always).
4775         (Analyze_Package_Instantiation): Add test of Has_Inline_Always
4776         alongside existing test of Front_End_Inlining as alternative
4777         conditions for setting Inline_Now. Also add test of
4778         Has_Inline_Always along with Front_End_Inlining test as an
4779         alternative condition for setting Needs_Body to False.
4781 2015-01-06  Tristan Gingold  <gingold@adacore.com>
4783         * i-cpoint.adb (Copy_Array): Handle overlap.
4785 2015-01-06  Pascal Obry  <obry@adacore.com>
4787         * bindgen.adb: Minor style fix.
4789 2015-01-06  Robert Dewar  <dewar@adacore.com>
4791         * sem_util.ads, sem_util.adb: Minor reformatting.
4793 2015-01-06  Vincent Celier  <celier@adacore.com>
4795         * prj-conf.adb (Parse_Project_And_Apply_Config): Reset incomplete
4796         with flags before parsing the projects.
4797         * prj-err.adb (Error_Msg): Do nothing if there are incomplete withs.
4798         * prj-part.adb (Post_Parse_Context_Clause): Set Incomplete_Withs
4799         to True in the flags, when Ignore_Missing_With is True and an
4800         imported project cannot be found.
4801         * prj-proc.adb (Expression): When there are incomplete withs and
4802         a variable or attribute is not found, set the variable/attribute
4803         to unknown.
4804         * prj.ads (Processing_Flags): New flag Incomplete_Withs,
4805         defaulted to False.
4807 2015-01-06  Vasiliy Fofanov  <fofanov@adacore.com>
4809         * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-conf.adb,
4810         prj-err.adb: Add new switch --no-command-line.
4812 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
4814         * sem_ch12.adb: Sloc of wrapper is that of instantiation.
4816 2015-01-06  Robert Dewar  <dewar@adacore.com>
4818         * sem_ch11.adb: Minor reformatting.
4820 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
4822         * exp_aggr.adb (Get_Assoc_Expr): New routine internal to
4823         Build_Array_Aggr_Code, used to initialized components covered
4824         by a box association. If the component type is scalar and has
4825         a default aspect, use it to initialize such components.
4827 2015-01-06  Pascal Obry  <obry@adacore.com>
4829         * rtinit.c (__gnat_runtime_initialize): Add a parameter to
4830         control the setup of the exception handler.
4831         * initialize.c: Remove unused declaration.
4832         * bindgen.adb: Always call __gnat_runtime_initialize and pass
4833         whether the exeception handler must be set or not.
4835 2015-01-06  Thomas Quinot  <quinot@adacore.com>
4837         * freeze.adb (Set_SSO_From_Defaults): When setting scalar storage
4838         order to native from default, make sure to also adjust bit order.
4839         * exp_aggr.adb: Minor reformatting.
4841 2015-01-06  Robert Dewar  <dewar@adacore.com>
4843         * s-valllu.adb, s-valllu.ads, s-valuti.ads, s-valuns.adb, s-valuns.ads,
4844         s-valrea.adb, s-valrea.ads: Add some additional guards for
4845         Str'Last = Positive'Last.
4847 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
4849         * sem_ch12.adb, sem_ch8.adb: Ongoing work for wrappers for actual
4850         subprograms.
4852 2015-01-06  Javier Miranda  <miranda@adacore.com>
4854         * exp_disp.adb (Expand_Interface_Conversion): Reapply patch.
4856 2015-01-06  Thomas Quinot  <quinot@adacore.com>
4858         * sem_util.ads: Minor reformatting.
4859         * sem_cat.adb (In_RCI_Visible_Declarations): Change back to...
4860         (In_RCI_Declaration) Return to old name, as proper checking of
4861         entity being in the visible part depends on entity kind and must
4862         be done by the caller.
4864 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
4866         * sem_ch12.adb, sem_ch12.ads, sem_ch8.adb: Ongoing work for wrappers
4867         for operators in SPARK.
4869 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
4871         * sem_aggr.adb (Get_Value): In ASIS mode, preanalyze the
4872         expression in an others association before making copies for
4873         separate resolution and accessibility checks. This ensures that
4874         the type of the expression is available to ASIS in all cases,
4875         in particular if the expression is itself an aggregate.
4877 2015-01-06  Eric Botcazou  <ebotcazou@adacore.com>
4879         * einfo.ads (Has_Independent_Components): Document extended
4880         usage.
4881         * einfo.adb (Has_Independent_Components): Remove obsolete assertion.
4882         (Set_Has_Independent_Components): Adjust assertion.
4883         * sem_prag.adb (Analyze_Pragma): Also set Has_Independent_Components
4884         for pragma Atomic_Components.  Set Has_Independent_Components
4885         on the object instead of the type for an object declaration with
4886         pragma Independent_Components.
4888 2015-01-06  Olivier Hainque  <hainque@adacore.com>
4890         * set_targ.adb (Read_Target_Dependent_Values): Set
4891         Long_Double_Index when "long double" is read.
4892         (elaboration code): Register_Back_End_Types only when not reading from
4893         config files. Doing otherwise is pointless and error prone.
4895 2015-01-06  Robert Dewar  <dewar@adacore.com>
4897         * s-valrea.adb (Value_Real): Check for Str'Last = Positive'Last
4899 2015-01-06  Robert Dewar  <dewar@adacore.com>
4901         * a-wtgeau.adb, a-ztgeau.adb, a-tigeau.adb (String_Skip): Raise PE if
4902         Str'Last = Positive'Last.
4904 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
4906         * sem_ch6.adb (Matches_Limited_View): Handle properly the case
4907         where the non-limited type is a generic actual and appears as
4908         a subtype of the non-limited view of the other.
4909         * freeze.adb (Build_Renamed_Body): If the return type of the
4910         declaration that is being completed is a limited view and the
4911         non-limited view is available, use it in the specification of
4912         the generated body.
4914 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
4916         * sem_ch3.adb (Find_Type_Name): If there is a previous tagged
4917         incomplete view, the type of the classwide type common to both
4918         views is the type being declared.
4920 2015-01-06  Eric Botcazou  <ebotcazou@adacore.com>
4922         * einfo.ads (Is_Independent): Further document extended usage.
4924 2015-01-06  Eric Botcazou  <ebotcazou@adacore.com>
4926         * einfo.ads (Is_Independent): Document extended usage.
4927         * einfo.adb (Is_Independent): Remove obsolete assertion.
4928         (Set_Is_Independent): Likewise.
4929         * sem_prag.adb (Process_Atomic_Shared_Volatile): Rename into...
4930         (Process_Atomic_Independent_Shared_Volatile): ...this.
4931         Deal with pragma Independent here.
4932         (Analyze_Pragma): Adjust
4933         to above renaming and also invoke it for pragma Independent.
4934         Adjust comment for Independent_Components.
4936 2015-01-06  Robert Dewar  <dewar@adacore.com>
4938         * snames.ads-tmpl: Remove entries for attribute Enum_Image.
4939         * exp_attr.adb: Remove reference to Attribute_Enum_Image.
4941 2015-01-06  Robert Dewar  <dewar@adacore.com>
4943         * s-vallli.adb (Value_Long_Long_Integer): Handle case of Str'Last
4944         = Positive'Last.
4945         * s-valllu.adb (Value_Long_Long_Unsigned): Handle case of
4946         Str'Last = Positive'Last.
4948 2015-01-06  Robert Dewar  <dewar@adacore.com>
4950         * sem_prag.adb (Process_Inline): Remove redundant construct
4951         warning (-gnatw.r) for an ineffective pragma Inline.
4953 2015-01-06  Robert Dewar  <dewar@adacore.com>
4955         * s-valint.adb: Fix typo in last checkin.
4956         * s-valuns.adb (Value_Unsigned): More efficient fix for
4957         Positive'Last case.
4958         * sem_attr.adb (Analyze_Attribute): Minor reformatting
4959         (Eval_Attribute): Static ervaluation of 'Img for enumeration types.
4961 2015-01-06  Robert Dewar  <dewar@adacore.com>
4963         * s-valint.adb, s-valuns.adb (Value_Integer): Deal with case where
4964         Str'Last = Positive'Last
4966 2015-01-06  Thomas Quinot  <quinot@adacore.com>
4968         * xoscons.adb: Display exception information and return non-zero
4969         exit status in top level exception handler.
4971 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
4973         * sem_ch8.adb: Code clean up.
4975 2015-01-06  Tristan Gingold  <gingold@adacore.com>
4977         * targparm.ads: Remove obsolete comment.
4979 2015-01-06  Olivier Hainque  <hainque@adacore.com>
4981         * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Variable): When
4982         constructing a ref to variable, update inner_const_flag from the
4983         variable TREE_READONLY attribute.
4984         * gcc-interface/targtyps.c (WIDEST_HARDWARE_FP_SIZE): Remove default
4985         definition.
4986         (get_target_float_size): Remove.
4987         (get_target_double_size): Remove.
4988         (get_target_long_double_size): Remove.
4990 2015-01-06  Pascal Obry  <obry@adacore.com>
4992         * adaint.c (ProcListEvt): Set to NULL.
4993         * rtinit.c: New file.
4994         (__gnat_rt_init_count): New reference counter set to 0.
4995         (__gnat_runtime_initialize): Move code here from __gnat_initialize when
4996         this code is actually needed for the runtime initialization. This
4997         routine returns immediately if the initialization has already been done.
4998         * final.c: Revert previous change.
4999         * rtfinal.c: New file.
5000         (__gnat_runtime_finalize)[Win32]: Add finalization of the critical
5001         section and event. The default version of this routine is empty (except
5002         for the reference counting code). This routine returns immediately if
5003         some others libraries are referencing the runtime.
5004         * bindgen.adb (Gen_Adainit): Generate call to Runtime_Initialize
5005         remove circuitry to initialize the signal handler as this is
5006         now done by the runtime initialization routine.
5007         (Gen_Adafinal): Generate call to Runtime_Finalize.
5008         * gnat_ugn.texi: Update documentation about concurrency and
5009         initialization/finalization of the run-time.
5010         * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Add
5011         references to rtfinal.o and rtinit.o
5013 2015-01-06  Robert Dewar  <dewar@adacore.com>
5015         * exp_attr.adb (Expand_N_Attribute_Reference): Add dummy entry
5016         for Enum_Image.
5017         * sem_attr.adb: Implement Enum_Image attribute.
5018         * snames.ads-tmpl: Add entries for Enum_Image attribute.
5020 2015-01-06  Robert Dewar  <dewar@adacore.com>
5022         * namet.ads: Document use of Boolean2 for No_Use_Of_Entity.
5023         * restrict.ads (No_Use_Of_Entity): New table.
5024         * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
5025         Ignore No_Use_Of_Entity (will be processed in parser).
5026         * snames.ads-tmpl: Add entry for Name_No_Use_Of_Entity.
5028 2015-01-06  Vincent Celier  <celier@adacore.com>
5030         * prj-tree.adb (Imported_Or_Extended_Project_Of): Do not try
5031         to check for an extended project, if a project does not have
5032         yet a project declaration.
5034 2015-01-06  Pierre-Marie Derodat  <derodat@adacore.com>
5036         * scos.ads: Update documentation about the SCO table build
5037         process and about table records format.
5038         * par_sco.ads (SCO_Record): Rename to SCO_Record_Raw.
5039         (SCO_Record_Filtered): New procedure.
5040         (Set_SCO_Logical_Operator): New procedure.
5041         (dsco): Update documentation.
5042         * par_sco.adb: Update library-level comments.
5043         (SCO_Generation_State_Type): New type.
5044         (SCO_Generation_State): New variable.
5045         (SCO_Raw_Table): New package instanciation.
5046         (Condition_Pragma_Hash_Table): Rename to SCO_Raw_Hash_Table.
5047         ("<"): New.
5048         (Tristate): New type.
5049         (Is_Logical_Operator): Return Tristate and update documentation.
5050         (Has_Decision): Update call to Is_Logical_Operator and complete
5051         documentation.
5052         (Set_Table_Entry): Rename to Set_Raw_Table_Entry, update
5053         comment, add an assertion for state checking and change
5054         references to SCO_Table into SCO_Raw_Table.
5055         (dsco): Refactor to dump the raw and the filtered tables.
5056         (Process_Decisions.Output_Decision_Operand): Handle putative
5057         short-circuit operators.
5058         (Process_Decisions.Output_Element): Update references
5059         to Set_Table_Entry and to Condition_Pragma_Hash_Table.
5060         (Process_Decisions.Process_Decision_Operand): Update call
5061         to Is_Logical_Operator.
5062         (Process_Decisions.Process_Node): Handle putative short-circuit
5063         operators and change references to
5064         SCO_Table into SCO_Raw_Table.
5065         (SCO_Output): Add an assertion
5066         for state checking and remove code that used to stamp out SCO entries.
5067         (SCO_Pragma_Disabled): Change reference to SCO_Table
5068         into SCO_Raw_Table.
5069         (SCO_Record): Rename to SCO_Record_Raw,
5070         add an assertion for state checking and change references
5071         to SCO_Table into SCO_Raw_Table.
5072         (Set_SCO_Condition): Add an assertion for state checking, update
5073         references to Condition_Pragma_Hash_Table and change references to
5074         SCO_Table into SCO_Raw_Table.
5075         (Set_SCO_Pragma_Enabled): Add an assertion for state checking and
5076         change references to SCO_Table into SCO_Raw_Table.
5077         (Set_SCO_Logical_Operator): New procedure.
5078         (Traverse_Declarations_Or_Statements.Set_Statement_Entry): Update
5079         references to Set_Table_Entry and to Condition_Pragma_Hash_Table.
5080         (SCO_Record_Fildered): New procedure.
5081         * gnat1drv.adb (Gnat1drv): Invoke the SCO filtering pass.
5082         * lib-writ.adb (Write_ALI): Invoke the SCO filtering pass and
5083         output SCOs.
5084         * par-load.adb (Load): Update reference to SCO_Record.
5085         * par.adb (Par): Update reference to SCO_Record.
5086         * put_scos.adb (Put_SCOs): Add an assertion to check that no
5087         putative SCO condition reaches this end.
5088         * sem_ch10.adb (Analyze_Proper_Body): Update reference to SCO_Record.
5089         * sem_res.adb (Resolve_Logical_Op): Validate putative SCOs
5090         when corresponding to an "and"/"or" operator affected by the
5091         Short_Circuit_And_Or pragma.
5093 2015-01-06  Robert Dewar  <dewar@adacore.com>
5095         * sem_ch8.adb (Analyze_Use_Package): Give more specific error
5096         msg for attempted USE of generic subprogram or subprogram.
5098 2015-01-06  Robert Dewar  <dewar@adacore.com>
5100         * s-valllu.adb, a-tiinau.adb, a-timoau.adb, a-ztinau.adb, a-ztmoau.adb,
5101         s-valuns.adb, s-valrea.adb, a-wtflau.adb, a-tiflau.adb, a-ztflau.adb,
5102         a-wtinau.adb, a-wtmoau.adb: Document recognition of : in place of #.
5104 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
5106         * sem_ch13.adb (Analyze_Aspect_Specifications): For aspects
5107         that specify stream subprograms, if the prefix is a class-wide
5108         type then the generated attribute definition clause must apply
5109         to the same class-wide type.
5110         (Default_Iterator): An iterator defined by an aspect of some
5111         container type T must have a first parameter of type T, T'class,
5112         or an access to such (from code reading RM 5.5.1 (2/3)).
5114 2015-01-06  Arnaud Charlet  <charlet@adacore.com>
5116         * gnat1drv.adb: Minor: complete previous change.
5118 2015-01-06  Olivier Hainque  <hainque@adacore.com>
5120         * set_targ.ads (C_Type_For): New function. Return the name of
5121         a C type supported by the back-end and suitable as a basis to
5122         construct the standard Ada floating point type identified by
5123         the T parameter. This is used as a common ground to feed both
5124         ttypes values and the GNAT tree nodes for the standard floating
5125         point types.
5126         * set_targ.adb (Long_Double_Index): The index at which "long
5127         double" gets registered in the FPT_Mode_Table. This is useful to
5128         know whether we have a "long double" available at all and get at
5129         it's characteristics without having to search the FPT_Mode_Table
5130         when we need to decide which C type should be used as the
5131         basis for Long_Long_Float in Ada.
5132         (Register_Float_Type): Fill Long_Double_Index.
5133         (FPT_Mode_Index_For): New function. Return the index in
5134         FPT_Mode_Table that designates the entry corresponding to the
5135         provided C type name.
5136         (FPT_Mode_Index_For): New function. Return the index in
5137         FPT_Mode_Table that designates the entry for a back-end type
5138         suitable as a basis to construct the standard Ada floating point
5139         type identified by the input T parameter.
5140         (elaboration code): Register_Back_End_Types unconditionally,
5141         so C_Type_For can operate regardless of -gnateT. Do it
5142         early so we can query it for the floating point sizes, via
5143         FPT_Mode_Index_For. Initialize Float_Size, Double_Size and
5144         Long_Double_Size from the FPT_Mode_Table, as cstand will do.
5145         * cstand.adb (Create_Float_Types): Use C_Type_For to determine
5146         which C type should be used as the basis for the construction
5147         of the Standard Ada floating point types.
5148         * get_targ.ads (Get_Float_Size, Get_Double_Size,
5149         Get_Long_Double_Size): Remove.
5150         * get_targ.adb: Likewise.
5152 2015-01-06  Thomas Quinot  <quinot@adacore.com>
5154         * sem_cat.adb (In_RCI_Declaration): Remove unnecessary
5155         parameter and rename to...
5156         (In_RCI_Visible_Declarations): Fix handling of private part of nested
5157         package.
5158         (Validate_RCI_Subprogram_Declaration): Reject illegal function
5159         returning anonymous access in RCI unit.
5161 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
5163         * sem_ch6.adb (New_Overloaded_Entity): In GNATprove mode, a
5164         function wrapper may be a homonym of another local declaration.
5165         * sem_ch8.adb (Analyze_Subprogram_Renaming): In GNATprove mode,
5166         build function and operator wrappers after the actual subprogram
5167         has been resolved, and replace the standard renaming declaration
5168         with the declaration of wrapper.
5169         * sem_ch12.ads (Build_Function_Wrapper, Build_Operator_Wraooer):
5170         make public for use elsewhere.
5171         * sem_ch12.adb (Build_Function_Wrapper, Build_Operator_Wraooer):
5172         rewrite, now that actual is fully resolved when wrapper is
5173         constructed.
5175 2015-01-06  Javier Miranda  <miranda@adacore.com>
5177         * exp_disp.adb: Revert previous change.
5179 2015-01-06  Robert Dewar  <dewar@adacore.com>
5181         * exp_util.adb: Change name Name_Table_Boolean to
5182         Name_Table_Boolean1.
5183         * namet.adb: Change name Name_Table_Boolean to Name_Table_Boolean1
5184         Introduce Name_Table_Boolean2/3.
5185         * namet.ads: Change name Name_Table_Boolean to Name_Table_Boolean1
5186         Introduce Name_Table_Boolean2/3.
5187         * par-ch13.adb: Change name Name_Table_Boolean to
5188         Name_Table_Boolean1.
5190 2015-01-06  Bob Duff  <duff@adacore.com>
5192         * gnat_rm.texi: Improve documentation regarding No_Task_Termination.
5194 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
5196         * sem_aggr.adb (Resolve_Record_Aggregte, Get_Value): For an
5197         others choice that covers multiple components, analyze each
5198         copy with the type of the component even in compile-only mode,
5199         to detect potential accessibility errors.
5201 2015-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
5203         * sem_res.adb (Is_Assignment_Or_Object_Expression): New routine.
5204         (Resolve_Actuals): An effectively volatile out
5205         parameter cannot act as an in or in out actual in a call.
5206         (Resolve_Entity_Name): An effectively volatile out parameter
5207         cannot be read.
5209 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
5211         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If the body is
5212         the expansion of an expression function it may be pre-analyzed
5213         if a 'access attribute is applied to the function, in which case
5214         last_entity may have been assigned already.
5216 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
5218         * sem_ch4.adb (Analyze_One_Call): If formal has an incomplete
5219         type and actual has the corresponding full view, there is no
5220         error, but a case of use of incomplete type in a predicate or
5221         invariant expression.
5223 2015-01-06  Vincent Celier  <celier@adacore.com>
5225         * makeutl.adb (Insert_No_Roots): Make sure that the same source
5226         in two different project tree is checked in both trees, if they
5227         are sources of two different projects, extended or not.
5229 2015-01-06  Arnaud Charlet  <charlet@adacore.com>
5231         * gnat1drv.adb: Minor code clean up.
5232         (Adjust_Global_Switches): Ignore gnatprove_mode in codepeer_mode.
5234 2015-01-06  Bob Duff  <duff@adacore.com>
5236         * osint.adb (Read_Source_File): Don't print out
5237         file name unless T = Source.
5239 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
5241         * sem_util.adb (Is_Variable, Is_OK_Variable_For_Out_Formal):
5242         recognize improper uses of constant_reference types as actuals
5243         for in-out parameters.
5244         (Check_Function_Call): Do not collect identifiers if function
5245         name is missing because of previous error.
5247 2015-01-06  Robert Dewar  <dewar@adacore.com>
5249         * ali-util.adb, sem_prag.adb, rtsfind.adb, sem_util.adb, sem_res.adb,
5250         ali.adb, binde.adb, namet.adb, namet.ads, gnatls.adb, bcheck.adb:
5251         Minor change of name Name_Table_Info => Name_Table_Int.
5253 2015-01-06  Robert Dewar  <dewar@adacore.com>
5255         * exp_strm.adb (Build_Elementary_Input_Call): Clarify comments
5256         in previous checkin.
5257         * freeze.adb (Freeze_Fixed_Point_Type): Add warning for shaving
5258         of bounds.
5259         * sem_prag.adb, sem_ch10.adb, sem_ch6.adb: Minor reformatting.
5261 2015-01-06  Vincent Celier  <celier@adacore.com>
5263         * a-strsup.adb (Times (Natural;String;Positive)): Raise
5264         Length_Error, not Index_Error, when the result is too long.
5266 2015-01-06  Thomas Quinot  <quinot@adacore.com>
5268         * a-direct.adb (Create_Path): Minor error handling and
5269         performance improvement.
5271 2015-01-06  Robert Dewar  <dewar@adacore.com>
5273         * checks.ads, sem_ch12.adb: Minor reformatting.
5274         * exp_ch4.adb (Expand_N_Op_Divide): Generate explicit divide by
5275         zero check for fixed-point case if Backend_Divide_Checks_On_Target
5276         is False.
5278 2015-01-06  Robert Dewar  <dewar@adacore.com>
5280         * sem_prag.adb (Analyze_Pragma, case No_Elaboration_Code_All):
5281         Do not set restriction No_Elaboration_Code unless the pragma
5282         appears in the main unit).
5284 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
5286         * sem_ch10.adb (Is_Regular_With_Clause): Add guard to verify
5287         that with clause has already been analyzed before checking kind
5288         of with_clause.
5290 2015-01-06  Robert Dewar  <dewar@adacore.com>
5292         * exp_strm.adb (Build_Elementary_Input_Call): Return base type
5293         (as required by RM).
5295 2015-01-06  Arnaud Charlet  <charlet@adacore.com>
5297         * a-reatim.adb ("/"): Add explicit pragma Unsuppress (Division_Check).
5299 2015-01-06  Robert Dewar  <dewar@adacore.com>
5301         * sem_prag.adb (Process_Suppress_Unsuppress): Add extra warning
5302         for ignoring pragma Suppress (Elaboration_Check) in SPARK mode.
5304 2015-01-06  Javier Miranda  <miranda@adacore.com>
5306         * exp_disp.adb (Expand_Interface_Conversion): No displacement
5307         of the pointer to the object needed when the type of the operand
5308         is not an interface type and the interface is one of its parent
5309         types (since they share the primary dispatch table).
5311 2015-01-06  Vincent Celier  <celier@adacore.com>
5313         * prj-env.adb: Minor comment update.
5315 2015-01-06  Javier Miranda  <miranda@adacore.com>
5317         * sem_res.adb (Valid_Conversion): Restrict the checks on anonymous
5318         access types whose target type is an interface type to operands
5319         that are access types; required to report an error when the
5320         operand is not an access type.
5322 2015-01-06  Bob Duff  <duff@adacore.com>
5324         * a-cfinve.adb (Copy): Set the discriminant to the Length when
5325         Capacity = 0.
5326         * a-cofove.ads (Capacity): Add a postcondition.
5327         * a-cfinve.ads (Capacity): Add a postcondition.
5328         (Reserve_Capacity): Correct the postcondition in the case where
5329         Capacity = 0; that means "Capacity => Length (Container)".
5330         * a-cofove.adb (Elems[c]): Add a comment
5331         explaining the dangers and how to avoid them.
5333 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
5335         * sem_ch12.adb: Code clean up.
5337 2015-01-06  Arnaud Charlet  <charlet@adacore.com>
5339         * gnatvsn.ads: Bump copyright year.
5341 2015-01-06  Robert Dewar  <dewar@adacore.com>
5343         * s-taskin.ads, s-traces.ads: Minor reformatting.
5344         * exp_util.adb: Minor typo fix.
5346 2015-01-06  Vincent Celier  <celier@adacore.com>
5348         * gnatls.adb (Search_RTS): Invoke Initialize_Default_Project_Path
5349         with the runtime name.
5350         * prj-env.adb (Initialize_Default_Project_Path): When both
5351         Target_Name and Runtime_Name are not empty string, add to the
5352         project path the two directories .../lib/gnat and .../share/gpr
5353         related to the runtime.
5354         * prj-env.ads (Initialize_Default_Project_Path): New String
5355         parameter Runtime_Name, defaulted to the empty string.
5357 2015-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
5359         * frontend.adb: Guard against the case where a configuration
5360         pragma may be split into multiple pragmas and the original
5361         rewritten as a null statement.
5362         * sem_prag.adb (Analyze_Pragma): Insert a brand new Check_Policy
5363         pragma using Insert_Before rather than Insert_Action. This
5364         takes care of the configuration pragma case where Insert_Action
5365         would fail.
5367 2015-01-06  Bob Duff  <duff@adacore.com>
5369         * a-coboho.ads (Element_Access): Add "pragma
5370         No_Strict_Aliasing (Element_Access);". This is needed because
5371         we are unchecked-converting from Address to Element_Access.
5372         * a-cofove.ads, a-cofove.adb (Elems,Elemsc): Fix bounds of the
5373         result to be 1.
5375 2015-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
5377         * sem_res.adb (Resolve_Actuals): Remove the
5378         restriction which prohibits volatile actual parameters with
5379         enabled external propery Async_Writers to act appear in procedure
5380         calls where the corresponding formal is of mode OUT.
5382 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
5384         * gnat_ugn.texi: Bump @copying's copyright year.
5386 2015-01-05  Eric Botcazou  <ebotcazou@adacore.com>
5388         PR ada/64492
5389         * gcc-interface/Makefile.in (../stamp-tools): Reinstate dropped code.
5391 2015-01-04  Uros Bizjak  <ubizjak@gmail.com>
5393         * gcc-interface/misc.c (internal_error_function): Use xasprintf instead
5394         of unchecked asprintf.
5397 Copyright (C) 2015 Free Software Foundation, Inc.
5399 Copying and distribution of this file, with or without modification,
5400 are permitted in any medium without royalty provided the copyright
5401 notice and this notice are preserved.