* i386.c (has_dispatch): Disable for Ryzen.
[official-gcc.git] / gcc / ada / ChangeLog-2015
blob7226214dec51d5d227e7b6b09bbd32138734c3b8
1 2015-12-20  Eric Botcazou  <ebotcazou@adacore.com>
3         * gcc-interface/utils2.c (gnat_rewrite_reference) <REALPART_EXPR>: New
4         case identical to FLOAT_EXPR.
5         <IMAGPART_EXPR>: Likewise.
7 2015-12-20  Eric Botcazou  <ebotcazou@adacore.com>
9         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: During
10         layout in type_annotate_only mode, skip discriminants of derived
11         tagged types renaming those of the parent type.
12         In type_annotate_only mode, if the type is tagged, do not override a
13         size clause but take into account the alignment of the tag.
14         (annotate_rep): In type_annotate_only mode, deal with  discriminants
15         of derived tagged types renaming those of the parent type.
17 2015-12-20  Eric Botcazou  <ebotcazou@adacore.com>
19         * gcc-interface/utils.c (maybe_pad_type): In type_annotate_only mode,
20         retrieve the component type if this is an array and do not issue the
21         warning for concurrent types.
23 2015-12-18  Eric Botcazou  <ebotcazou@adacore.com>
25         * gcc-interface/ada-tree.h (TYPE_DEBUG_TYPE): Remove duplicate.
27 2015-12-17  Pierre-Marie de Rodat  <derodat@adacore.com>
29         * gcc-interface/ada-tree.h
30         (TYPE_IMPLEMENTS_PACKED_ARRAY_P, TYPE_CAN_HAVE_DEBUG_TYPE_P,
31         TYPE_ORIGINAL_PACKED_ARRAY, SET_TYPE_ORIGINAL_PACKED_ARRAY): New
32         macros.
33         * gcc-interface/decl.c (add_parallel_type_for_packed_array):
34         Rename to associate_original_type_to_packed_array.  When
35         -fgnat-encodings=minimal, set original packed array type as so
36         instead of as a parallel type to the implementation type.  In
37         this case, also rename the implementation type to the name of
38         the original array type.
39         (gnat_to_gnu_entity): Update invocations to
40         add_parallel_type_for_packed_array.  Tag ARRAY_TYPE nodes for
41         packed arrays with the TYPE_PACKED flag.
42         When -fgnat-encodings=minimal:
43           - strip ___XP suffixes in packed arrays' names;
44           - set the debug type for padding records around packed arrays
45             to the packed array;
46           - do not attach ___XUP types as parallel types of constrained
47             array types.
48         * gcc-interface/misc.c (gnat_print_type): Update to handle
49         orignal packed arrays.
50         (gnat_get_debug_type): Update to reject packed arrays
51         implementation types.
52         (get_array_bit_stride): New.
53         (gnat_get_array_descr_info): Add packed arrays handling.
54         * gcc-interface/utils.c (maybe_pad_type): When
55         -fgnat-encodings=minimal, set the name of the padding type to
56         the one of the original packed type, if any.  Fix TYPE_DECL
57         peeling around the name of the input type.
59 2015-12-17  Pierre-Marie de Rodat  <derodat@adacore.com>
61         * gcc-interface/misc.c (gnat_get_type_bias): New.
62         (LANG_HOOKS_GET_TYPE_BIAS): Redefine macro to implement the
63         get_type_bias language hook.
65 2015-12-17  Pierre-Marie de Rodat  <derodat@adacore.com>
67         * gcc-interface/misc.c (gnat_get_array_descr_info): When the
68         array has more dimensions than the language hook can handle,
69         fall back to a nested arrays description.  Handle context-less
70         array types.
72 2015-12-17  Pierre-Marie de Rodat  <derodat@adacore.com>
74         * gcc-interface/decl.c (gnat_to_gnu_entity): When
75         -fgnat-encodings-minimal, do not add ___XUP/XUT suffixes to type
76         names and do not generate ___XA parallel types.
77         * gcc-interface/misc.c (gnat_get_array_descr_info): Match fat
78         and thin pointers and generate the corresponding array type
79         descriptions.
81 2015-12-17  Pierre-Marie de Rodat  <derodat@adacore.com>
83         * gcc-interface/ada-tree.def (POWER_EXPR): New binary operation.
84         * gcc-interface/ada-tree.h (TYPE_FIXED_POINT_P): New macro.
85         (TYPE_IS_FIXED_POINT_P): New macro.
86         (TYPE_SCALE_FACTOR): New macro.
87         (SET_TYPE_SCALE_FACTOR): New macro.
88         * gcc-interface/decl.c: Include urealp.h
89         (gnat_to_gnu_entity): Attach trees to encode scale factors to
90         fixed-point types.
91         * gcc-interface/misc.c (gnat_print_type): Print scale factors
92         for fixed-point types.
93         (gnat_get_fixed_point_type_info): New.
94         (gnat_init_ts): Initialize data for the POWER_EXPR binary
95         operation.
96         (LANG_HOOKS_GET_FIXED_POINT_INFO): Redefine macro to implement
97         the get_fixed_point_type_info language hook.
99 2015-12-17  Pierre-Marie de Rodat  <derodat@adacore.com>
101         * gcc-interface/ada-tree.h (struct lang_type): Rename the t
102         field as t1 and add a t2 one.
103         (get_lang_specific): New.
104         (GET_TYPE_LANG_SPECIFIC): Refactor to use get_lang_specific.
105         (SET_TYPE_LANG_SPECIFIC): Likewise.
106         (GET_TYPE_LANG_SPECIFIC2): New macro.
107         (SET_TYPE_LANG_SPECIFIC2): New macro.
108         (TYPE_DEBUG_TYPE): New macro.
109         (SET_TYPE_DEBUG_TYPE): New macro.
110         * gcc-interface/decl.c (gnat_to_gnu_entity): When
111         -fgnat-encodings=minimal, set padding types' debug type to the
112         padded one (i.e. strip ___PAD GNAT encodings) and set
113         constrained record subtypes's debug type to the base type.
114         * gcc-interface/misc.c (gnat_print_type): Print debug types.
115         (gnat_get_debug_type): New.
116         (gnat_get_array_descr_info): When -fgnat-encodings=minimal, set
117         a byte stride for arrays that contain a type whose debug type
118         has variable length.
119         (LANG_HOOKS_GET_DEBUG_TYPE): Redefine macro to implement the
120         debug type language hook.
121         * gcc-interface/utils.c (maybe_pad_type): When
122         -fgnat-encodings=minimal, set padding types' debug type to the
123         padded one.  Restore XVZ variables creation when
124         -fgnat-encodings-minimal and use them to hold padding types'
125         byte size.  For library-level padding types, share this variable
126         across translation units.  Tag XVZ variables as artificial.
128 2015-12-17  Pierre-Marie de Rodat  <derodat@adacore.com>
130         * gcc-interface/decl.c (gnat_to_gnu_entity): Disable ___XVS GNAT
131         encodings when -fgnat-encodings=minimal.
132         (components_to_record): Disable ___XVE, ___XVN, ___XVU and
133         ___XVZ GNAT encodings when -fgnat-encodings=minimal.
134         * gcc-interface/utils.c (maybe_pad_type): Disable __XVS GNAT
135         encodings when -fgnat-encodings=minimal.
137 2015-12-17  Pierre-Marie de Rodat  <derodat@adacore.com>
139         * gcc-interface/misc.c (gnat_encodings): Undefine macro and
140         declare a global variable.
141         (gnat_post_options): Initialize this global from options.
143 2015-12-10  Eric Botcazou  <ebotcazou@adacore.com>
145         PR ada/48013
146         * gcc-interface/trans.c (empty_stmt_list_p): New predicate.
147         (gigi): Invoke it to compute the No_Elaboration_Code property.
148         (insert_code_for): Do not insert the code if it's empty.
150 2015-12-10  Eric Botcazou  <ebotcazou@adacore.com>
152         * gcc-interface/trans.c (Call_to_gnu): Remove guard for NULL_EXPR.
153         * gcc-interface/utils2.c (gnat_rewrite_reference) <ERROR_MARK>: Return
154         the reference unmodified.
155         <NULL_EXPR>: New case.  Likewise.
157 2015-12-10  Eric Botcazou  <ebotcazou@adacore.com>
159         * gcc-interface/gigi.h (create_var_decl): Adjust comment.
160         (create_subprog_decl): Likewise.
161         * gcc-interface/utils.c (create_var_decl): Likewise.
162         (create_subprog_decl): Likewise.
164 2015-12-10  Tom de Vries  <tom@codesourcery.com>
166         PR ada/65102
167         * gnat-style.texi: Set nodefaultgnufreedocumentationlicensenode and
168         define @node GNU Free Documentation License locally.
170 2015-12-09  Eric Botcazou  <ebotcazou@adacore.com>
172         PR ada/66526
173         * g-expect.adb (Set_Up_Child_Communications): Add matching condition
174         for uses of Input, Ouput and Error variables after the Execvp call.
176 2015-12-08  Jakub Jelinek  <jakub@redhat.com>
178         PR c/48088
179         PR c/68657
180         * gcc-interface/trans.c (Pragma_to_gnu): Adjust control_warning_option
181         caller.
183 2015-12-06  Piotr Trojanek  <piotr.trojanek@gmail.com>
185         PR ada/60164
186         * doc/gnat_ugn/gnat_and_program_execution.rst (gnatmem): Fix typo.
188 2015-12-06  Eric Botcazou  <ebotcazou@adacore.com>
190         PR ada/50048
191         * gcc-interface/Makefile.in (INCLUDES): Use -iquote.
193 2015-12-06  Eric Botcazou  <ebotcazou@adacore.com>
195         PR ada/56274
196         * s-osinte-kfreebsd-gnu.ads (pthread_rwlock_t): New subtype.
197         (pthread_rwlockattr_t): Likewise.
199 2015-12-06  Ludovic Brenta  <ludovic@ludovic-brenta.org>
201         PR ada/49944
202         * s-osinte-freebsd.ads: Minor reformatting.
203         (Stack_Base_Available): Correct comments.
204         * s-osinte-kfreebsd-gnu.ads (Time_Slice_Supported, nanosleep,
205         clock_id_t, clock_gettime, Stack_Base_Available, Get_Page_Size,
206         mprotect, pthread_mutexattr_setprotocol,pthread_mutexattr_getprotocol
207         pthread_mutexattr_setprioceiling, pthread_mutexattr_getprioceiling,
208         pthread_attr_setscope, pthread_attr_getscope,
209         pthread_attr_setinheritsched, pthread_attr_getinheritsched,
210         Time_Slice_Supported): Copy from s-osinte-freebsd.ads.
211         * gcc-interface/Makefile.in (x86/kfreebsd): Use the POSIX version of
212         the System.Task_Primitives.Operations package.
214 2015-12-06  Ludovic Brenta  <ludovic@ludovic-brenta.org>
216         PR ada/49940
217         * s-osinte-kfreebsd-gnu.ads (lwp_self): New imported function.
219 2015-12-01  Jan Sommer  <soja-lists@aries.uberspace.de>
221         PR ada/68169
222         * s-oscons-tmplt.c: Generate pthread constants for RTEMS
223         * s-osinte-rtems.ads: Declare pthread structs as opaque types in Ada
225 2015-12-01  Eric Botcazou  <ebotcazou@adacore.com>
227         * gcc-interface/Makefile.in (ADA_EXCLUDE_SRCS): Reorder.
229 2015-11-30  Eric Botcazou  <ebotcazou@adacore.com>
231         * gcc-interface/trans.c (gigi): Fix initialization order.
233 2015-11-30  Eric Botcazou  <ebotcazou@adacore.com>
235         * osint.adb: Add use type clause for CRTL.size_t.
236         (C_String_Length): Return CRTL.size_t instead of Integer.
237         (To_Path_String_Access): Take CRTL.size_t instead of Integer.
238         (Get_Libraries_From_Registry): Use CRTL throughout.
239         (To_Canonical_Dir_Spec): Use CRTL.size_t instead of Integer.
240         (To_Canonical_File_List): Likewise.
241         (To_Canonical_File_Spec): Likewise.
242         (To_Canonical_Path_Spec): Likewise.
243         (To_Host_Dir_Spec): Likewise.
244         (To_Host_File_Spec): Likewise.
245         (Update_Path): Use CRTL throughout.
246         * s-shasto.adb: Add with clause for System.CRTL.
247         (Initialize): Rename CRTL.strncpy instead of importing it manually.
249 2015-11-30  Eric Botcazou  <ebotcazou@adacore.com>
251         * gcc-interface/gigi.h (create_var_decl): Adjust prototype.
252         (create_subprog_decl): Likewise.
253         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Rename
254         static_p into static_flag and add volatile_flag local variable.
255         Do not locally change the type of a volatile object, except for the
256         pointed-to type if the object is handled by reference.  Adjust calls
257         to create_var_decl.
258         <E_Subprogram_Type>: Likewise for const and noreturn subprograms.
259         (get_minimal_subprog_decl): Adjust call to create_subprog_decl.
260         (elaborate_expression_1): Adjust call to create_var_decl.
261         (gnat_to_gnu_field): Minor tweak.
262         * gcc-interface/trans.c (gigi): Adjust calls to create_var_decl and
263         create_subprog_decl.
264         (build_raise_check): Likewise.
265         (Subprogram_Body_to_gnu): Likewise.
266         (create_temporary): Likewise.
267         (Handled_Sequence_Of_Statements_to_gnu): Likewise.
268         (Exception_Handler_to_gnu_gcc): Likewise.
269         (Compilation_Unit_to_gnu): Likewise.
270         (gnat_to_gnu): Likewise.
271         * gcc-interface/utils.c (maybe_pad_type): Likewise.
272         (create_var_decl): Add VOLATILE_FLAG parameter and handle it.
273         (create_subprog_decl): Add CONST_FLAG and VOLATILE_FLAG parameters and
274         handle them.
276 2015-11-30  Eric Botcazou  <ebotcazou@adacore.com>
278         * gcc-interface/gigi.h (is_simple_additive_expression): Declare.
279         * gcc-interface/trans.c (struct range_check_info_d): Add DISP and
280         NEG_P fields.
281         (find_loop_for): Add DISP and NEG_P parameters with default value.
282         Call is_simple_additive_expression to handle additive expressions.
283         (Loop_Statement_to_gnu): Deal with displacement in range checks.
284         (Raise_Error_to_gnu): Likewise.
285         (gnat_to_gnu): Add call to find_loop_for.
286         (is_simple_additive_expression): New function extracted from...
287         (gnat_invariant_expr): ...here.  Call it on the expression.
289 2015-11-30  Eric Botcazou  <ebotcazou@adacore.com>
291         * gcc-interface/utils2.c (gnat_invariant_expr): Add type conversions.
293 2015-11-30  Eric Botcazou  <ebotcazou@adacore.com>
295         * gcc-interface/ada-tree.h (TYPE_MAX_ALIGN): New macro.
296         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set PACKED to -2.
297         Remove obsolete code setting the alignment on some atomic types.
298         When the type has no alignment but needs strict alignment and has a
299         size clause, compute a maximum alignment and set it on the type.
300         (adjust_packed): Remove handling of -2 argument.  Deal with TYPE_ALIGN
301         and TYPE_MAX_ALIGN directly.
302         (gnat_to_gnu_field): Do not document -2 as argument.
303         (components_to_record): Likewise.
304         * gcc-interface/utils.c (finish_record_type): Do not bump alignment of
305         the record type beyond TYPE_MAX_ALIGN.  Reset the latter on exit.
307         * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): Move around.
308         (GNATLIBCFLAGS_FOR_C): Reformat.
309         (GCC_CFLAGS): Delete.
311 2015-11-29  Matthias Klose  <doko@ubuntu.com>
313         PR ada/68564
314         * gcc-interface/Makefile.in: Fix powerpc/powerpc64* and
315         mipsel/mips64el bitness detection.
316         Merge the mipsel/mips64el definitions into one.
318 2015-11-28  Matthias Klose  <doko@ubuntu.com>
320         PR ada/68564
321         * gcc-interface/Makefile.in: Fix sparc/sparc64 bitness detection.
323 2015-11-25  Arnaud Charlet  <charlet@adacore.com>
325         * lib-xref-spark_specific.adb
326         (Add_SPARK_Scope): Take entry families into account.
327         * a-exetim.ads, a-exetim-default.ads, a-exetim-mingw.ads (Clock,
328         Clock_For_Interrupts): preconditions added.
329         * a-extiin.ads (Clock): preconditions added.
330         * par-ch3.adb (P_Declarative_Items): In case of misplaced
331         aspect specifications, ensure that flag Done is properly set to
332         continue parsing.
334 2015-11-25  Arnaud Charlet  <charlet@adacore.com>
336         * exp_util.adb (Remove_Side_Effects): Minimize extra temporaries
337         and use of 'Reference when needed.
339 2015-11-25  Doug Rupp  <rupp@adacore.com>
341         * sigtramp-vxworks-target.inc (__x86_64__): Restore context for the
342         sake of uniformity.
343         * init.c (__gnat_inum_to_ivec): Add some casting to avoid
344         warnings when sizeof(long) != sizeof(int)
346 2015-11-25  Yannick Moy  <moy@adacore.com>
348         * lib-xref-spark_specific.adb (SPARK_Entities): Add entries for
349         consideration.
350         (Add_SPARK_Scope): Take tasks into account.
351         (Detect_And_Add_SPARK_Scope): Take tasks into account.
352         (Enclosing_Subprogram_Or_Library_Package): Take tasks into account.
354 2015-11-25  Bob Duff  <duff@adacore.com>
356         * sem_elab.adb (Check_Internal_Call_Continue): Code clean ups.
358 2015-11-25  Eric Botcazou  <ebotcazou@adacore.com>
360         * sem_util.ads (Has_Compatible_Alignment): Add Layout_Done
361         parameter.
362         * sem_util.adb (Has_Compatible_Alignment): Likewise.
363         (Has_Compatible_Alignment_Internal): Likewise.  Do not set the
364         result to Unknown for packed types if Layout_Done is true.
365         * checks.adb (Apply_Address_Clause_Check): Adjust call and
366         pass False to Has_Compatible_Alignment.
367         * sem_ch13.adb (Validate_Address_Clauses): Likewise but pass True.
369 2015-11-25  Vincent Celier  <celier@adacore.com>
371         * gnatcmd.adb: When <target>-gnat is called with switch -P
372         and a GPR tool is invoked, invoke the GPR tool with switch
373         --target=<target>.
375 2015-11-25  Hristian Kirtchev  <kirtchev@adacore.com>
377         * opt.adb, bcheck.adb: Minor reformatting.
379 2015-11-25  Jerome Lambourg  <lambourg@adacore.com>
381         * init.c: Enable the signal trampoline on x86_64-vx7
382         * sigtramp-vxworks-target.inc: Implement the signal trampoline
383         for x86_64
384         * tracebak.c: Remove the hook to use the generic
385         unwinder on x86_64-vx7.
387 2015-11-25  Vincent Celier  <celier@adacore.com>
389         * gnatcmd.adb: When "gnat name -P" is called, invoke gprname
390         directly if available.
392 2015-11-25  Tristan Gingold  <gingold@adacore.com>
394         * init.c (__gnat_is_stack_guard): Do not use mach calls for
395         IOS simulator.
397 2015-11-24  Pierre-Marie de Rodat  <derodat@adacore.com>
399         * gcc-interface/utils.c (gnat_write_global_declarations): Output
400         debugging information for top-level imported declarations.
402 2015-11-24  Gary Dismukes  <dismukes@adacore.com>
404         * sem_ch3.adb, sem_type.adb, sem_ch7.adb, sem_ch9.adb, checks.adb,
405         sem_prag.adb, contracts.adb, g-strhas.ads, sem_ch6.adb: Minor
406         reformatting, rewording, and typo corrections.
408 2015-11-24  Eric Botcazou  <ebotcazou@adacore.com>
410         * gcc-interface/decl.c (gnat_to_gnu_entity) <Concurrent types>: In
411         ASIS mode, do a minimal translation for root types with discriminants.
412         * gcc-interface/trans.c (gnat_to_gnu) <N_Subunit>: Move around.
413         <N_Entry_Body, N_Protected_Body, N_Task_Body>: Likewise.  In ASIS mode,
414         process the declarations attached to the body.
416 2015-11-24  Eric Botcazou  <ebotcazou@adacore.com>
418         * gcc-interface/trans.c (gnat_to_gnu): In type_annotate_only mode, do
419         not build a NULL_EXPR for an N_Expanded_Name.
421 2015-11-24  Eric Botcazou  <ebotcazou@adacore.com>
423         * gcc-interface/decl.c (is_cplusplus_method): Check that the type of
424         the first parameter (indirectly) has C++ convention too.
426 2015-11-23  Olivier Hainque  <hainque@adacore.com>
428         * system-aix.ads: Add Frontend_Exceptions flag.
429         * system-aix64.ads: Likewise.
430         * system-darwin-ppc.ads: Likewise.
431         * system-darwin-ppc64.ads: Likewise.
432         * system-darwin-x86.ads: Likewise.
433         * system-darwin-x86_64.ads: Likewise.
434         * system-dragonfly-x86_64.ads: Likewise.
435         * system-freebsd-x86.ads: Likewise.
436         * system-freebsd-x86_64.ads: Likewise.
437         * system-hpux-ia64.ads: Likewise.
438         * system-hpux.ads: Likewise.
439         * system-linux-alpha.ads: Likewise.
440         * system-linux-armeb.ads: Likewise.
441         * system-linux-armel.ads: Likewise.
442         * system-linux-hppa.ads: Likewise.
443         * system-linux-ia64.ads: Likewise.
444         * system-linux-mips.ads: Likewise.
445         * system-linux-mips64el.ads: Likewise.
446         * system-linux-mipsel.ads: Likewise.
447         * system-linux-ppc.ads: Likewise.
448         * system-linux-ppc64.ads: Likewise.
449         * system-linux-s390.ads: Likewise.
450         * system-linux-s390x.ads: Likewise.
451         * system-linux-sh4.ads: Likewise.
452         * system-linux-sparc.ads: Likewise.
453         * system-linux-sparcv9.ads: Likewise.
454         * system-linux-x86.ads: Likewise.
455         * system-linux-x86_64.ads: Likewise.
456         * system-mingw-x86_64.ads: Likewise.
457         * system-mingw.ads: Likewise.
458         * system-rtems.ads: Likewise.
459         * system-solaris-sparc.ads: Likewise.
460         * system-solaris-sparcv9.ads: Likewise.
461         * system-solaris-x86.ads: Likewise.
462         * system-solaris-x86_64.ads: Likewise.
463         * system-vxworks-arm.ads: Likewise.
464         * system-vxworks-m68k.ads: Likewise.
465         * system-vxworks-mips.ads: Likewise.
466         * system-vxworks-ppc.ads: Likewise.
467         * system-vxworks-sparcv9.ads: Likewise.
468         * system-vxworks-x86.ads: Likewise.
469         * system.ads: Likewise.
471 2015-11-23  Olivier Hainque  <hainque@adacore.com>
472             Eric Botcazou  <botcazou@adacore.com>
474         * opt.ads (Exception_Mechanism): Now three values: Front_End_SJLJ,
475         Back_End_SJLJ and Back_End_ZCX.
476         (Back_End_Exceptions, Front_End_Exceptions, ZCX_Exceptions,
477         SJLJ_Exceptions): New functions, reflecting properties of the current
478         Exception_Mechanism.
479         * opt.adb: Implement the new functions.
480         * fe.h: Bind the new Exception_Mechanism and helper functions for gigi.
482         * exp_ch11.adb (Expand_At_End_Handler): Replace test on mechanism by
483         use of property helper and update comments.
484         (Expand_Exception_Handlers): Replace tests on mechanism by use of
485         helper. Restrict Abort_Defer to ZCX specifically.
486         * exp_ch9.adb (Expand_N_Asynchronous_Select): Replace tests on
487         mechanism by calls to helper functions. Abort_Undefer for ZCX only,
488         paired with Expand_Exception_Handlers.
489         * exp_sel.adb (Build_Abort_Block_Handler): Replace tests on mechanism
490         by calls to helper functions. Abort_Undefer for ZCX only, paired with
491         Expand_Exception_Handlers.
493         * lib-writ.ads (P line documentation): Add entry for "FX",
494         representative of unit compiled with Frontend_Exceptions True.
495         * lib-writ.adb (Output_Main_Program_Line): Add "FX" on P line if
496         compiled with Frontend_Exceptions True.
498         * ali.ads (ALIs_Record): Ada a Frontend_Exceptions component, to reflect
499         whether the ALI file contained an "FX" indication on the P line.
500         (Frontend_Exceptions_Specified): New boolean, to keep track of whether
501         at least an FX ALI file is in the closure.
502         * ali.adb (Scan_ALI): Handle "FX" on the P line.
503         (Initialize_ALI): Initialize Frontend_Exceptions_Specified to False.
505         * targparm.ads: Update desription of exception schemes.
506         (Frontend_Exceptions_On_Target): New flag, reflect Frontend_Exceptions
507         set to True in system.ads, or not set at all.
508         * targparm.adb (Targparm_Tags): Add FEX to convey Frontend_Exceptions.
509         Rename ZCD to ZCX for consistency.
510         (FEX_Str, Targparm_Str, Get_Target_Parameters): Adjust accordingly.
512         * gnat1drv.adb (Adjust_Global_Switches): Adjust Exception_Mechanism
513         setting, now from combination of Frontend_Exceptions and ZCX_By_Default.
515         * bcheck.adb (Check_Consistent_Zero_Cost_Exception_Handling): Rename
516         as ...
517         (Check_Consistent_Exception_Handling): Check consistency of both
518         ZCX_By_Default and Frontend_Exceptions.
519         (Check_Configuration_Consistency): Check_Consistent_Exception_Handling
520         if either flag was set at least once.
522         * make.adb (Check): Remove processing of a possible -fsjlj coming from
523         lang-specs.h.
524         * gnatlink.adb (Gnatlin): Likewise.
526         * gcc-interface/Makefile.in (gnatlib-sjlj/zcx): Now set
527         both ZCX_By_Default and Frontend_Exceptions.
528         * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Variable):
529         Use eh property helper to test for back-end exceptions. Adjust
530         mechanism name when testing for front-end sjlj.
531         (case E_Procedure): Likewise.
532         * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu):
533         Likewise, and rename local variables.
534         (Exception_Handler_to_gnu_sjlj): Rename as
535         Exception_Handler_to_gnu_fe_sjlj.
536         (Exception_Handler_to_gnu_zcx): Rename as
537         Exception_Handler_to_gnu_gcc and adjust tests on eh mechanisms
538         to use property helpers or correct mechanism name.
540 2015-11-19  Bob Duff  <duff@adacore.com>
542         * sem_elab.adb (Check_Internal_Call_Continue): Correction to previous
543         change: correctly handle generic formals/actuals that look like
544         renamings.
546 2015-11-18  Eric Botcazou  <ebotcazou@adacore.com>
548         * gcc-interface/trans.c (elaborate_all_entities_for_package): New
549         function extracted from...  Recurse on packages.
550         (elaborate_all_entities): ...here.  Call it on packages.
552 2015-11-18  Eric Botcazou  <ebotcazou@adacore.com>
554         * gcc-interface/ada-tree.h (DECL_INVARIANT_P): New macro.
555         * gcc-interface/gigi.h (enum standard_datatypes): Remove
556         ADT_longjmp_decl and add ADT_not_handled_by_others_decl.
557         (longjmp_decl): Delete.
558         (not_handled_by_others_decl): New macro.
559         (build_simple_component_ref): Delete.
560         (build_component_ref): Adjust prototype.
561         * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust calls to
562         build_component_ref.
563         (gnat_to_gnu_field): Set DECL_INVARIANT_P on discriminants
564         without default value.
565         * gcc-interface/trans.c (gigi): Reorder initialization sequence
566         and add not_handled_by_others_decl.
567         (Attribute_to_gnu): Adjust calls to build_component_ref.
568         (Subprogram_Body_to_gnu): Likewise.
569         (Call_to_gnu): Likewise.
570         (Exception_Handler_to_gnu_sjlj): Likewise.
571         (gnat_to_gnu): Likewise.
572         (range_check_info_d): Add inserted_cond field.
573         (Loop_Statement_to_gnu): Make two passes on the recorded range checks.
574         (build_noreturn_cond): New static function.
575         (Raise_Error_to_gnu): Record range checks in loops at -O1 and above.
576         (make_invariant): New static function.
577         (Loop_Statement_to_gnu): Use it to compute invariant expressions for
578         the loop bounds if possible, but do not require it if loop unswitching
579         is enabled.
580         * gcc-interface/utils.c (convert_to_fat_pointer): Likewise.
581         (convert): Likewise.
582         (maybe_unconstrained_array): Likewise.  Call it instead of
583         build_simple_component_ref and add guard for CONSTRUCTORs.
584         (unchecked_convert): Likewise.
585         * gcc-interface/utils2.c (compare_fat_pointers): Likewise.
586         (build_simple_component_ref): Remove COMPONENT parameter, unify
587         code dealing with VIEW_CONVERT_EXPR and make it more general,
588         remove special treatment for CONSTRUCTORs of template types.
589         (build_component_ref): Remove COMPONENT parameter and adjust call
590         to build_simple_component_ref.
591         (maybe_wrap_malloc): Likewise.
592         (build_allocator): Likewise.
593         (gnat_invariant_expr): Look through overflow checks, deal with
594         addition and subtraction of constants and take into account
595         DECL_INVARIANT_P for the COMPONENT_REF case.
597 2015-11-18  Eric Botcazou  <ebotcazou@adacore.com>
599         * gcc-interface/misc.c: Move global variables to the top of the file.
600         (gnat_handle_option): Remove obsolete ATTRIBUTE_UNUSED markers.
601         (gnat_init_options): Minor tweak.
602         (gnat_post_options): Set -fstrict-overflow if not done by the user.
603         (internal_error_function): Minor reformatting.
605 2015-11-18  Eric Botcazou  <ebotcazou@adacore.com>
607         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Use case #1
608         for the renaming of an address.
610 2015-11-18  Eric Botcazou  <ebotcazou@adacore.com>
612         * gcc-interface/trans.c (fold_constant_decl_in_expr) <ARRAY_REF>: If
613         the index is not itself constant then bail out.
615 2015-11-18  Ed Schonberg  <schonberg@adacore.com>
617         * sem_ch4.adb (Try_Container_Indexing): When constructing the
618         parameter list for the potentially overloaded calls to indexing
619         functions, do not propagate overloadings if the actual is a named
620         association: overloadings appear directly on the expression in
621         the association.
623 2015-11-18  Ed Schonberg  <schonberg@adacore.com>
625         * sem_type.adb (Interface_Present_In_Ancestor): If the type is
626         incomplete, the list of ancestors is found either on the full
627         view or the non-limited view of the type.
629 2015-11-18  Nicolas Roche  <roche@adacore.com>
631         * sysdep.c (__gnat_localtime_tzoff): On Windows platform
632         GetTimeZoneInformation function is thread-safe. Thus there
633         is no need to lock the runtime in the implementation of
634         __gnat_localtime_tzoff on that platform.
636 2015-11-18  Eric Botcazou  <ebotcazou@adacore.com>
638         * s-arit64.adb (To_Neg_Int): Add a special case for 2**63 input.
640 2015-11-18  Hristian Kirtchev  <kirtchev@adacore.com>
642         * contracts.adb (Analyze_Contracts): New routine.
643         (Analyze_Enclosing_Package_Body_Contract): Removed.
644         (Analyze_Entry_Or_Subprogram_Contract): Add formal parameter
645         Freeze_Id.  Propagate the entity of the freezing body to vaious
646         analysis routines.
647         (Analyze_Initial_Declaration_Contract): Removed.
648         (Analyze_Object_Contract): Add formal parameter
649         Freeze_Id. Propagate the entity of the freezing body to vaious
650         analysis routines.
651         (Analyze_Previous_Contracts): New routine.
652         * contracts.ads (Analyze_Enclosing_Package_Body_Contract): Removed.
653         (Analyze_Contracts): New routine.
654         (Analyze_Entry_Or_Subprogram_Contract): Add formal
655         parameter Freeze_Id and update the comment on usage.
656         (Analyze_Initial_Declaration_Contract): Removed.
657         (Analyze_Object_Contract): Add formal parameter Freeze_Id and
658         update the comment on usage.
659         (Analyze_Previous_Contracts): New routine.
660         * sem_ch3.adb (Analyze_Declarations): Use Analyze_Contracts to
661         analyze all contracts of eligible constructs.
662         * sem_ch6.adb (Analyze_Generic_Subprogram_Body):
663         A body no longer freezes the contract of its initial
664         declaration. This effect is achieved through different means.
665         (Analyze_Subprogram_Body_Helper): A body now freezes the contracts
666         of all eligible constructs that precede it. A body no longer
667         freezes the contract of its initial declaration. This effect is
668         achieved through different means.
669         * sem_ch7.adb (Analyze_Package_Body_Helper): A body now freezes
670         the contracts of all eligible constructs that precede it. A body
671         no longer freezes the contract of its initial declaration. This
672         effect is achieved through different means.
673         * sem_ch9.adb (Analyze_Entry_Body): A body now freezes
674         the contracts of all eligible constructs that precede
675         it. A body no longer freezes the contract of its initial
676         declaration. This effect is achieved through different means.
677         (Analyze_Protected_Body): A body now freezes the contracts
678         of all eligible constructs that precede it. A body no longer
679         freezes the contract of its initial declaration. This effect
680         is achieved through different means.
681         (Analyze_Task_Body): A
682         body now freezes the contracts of all eligible constructs that
683         precede it. A body no longer freezes the contract of its initial
684         declaration. This effect is achieved through different means.
685         * sem_prag.adb (Add_Item_To_Name_Buffer): Single protected/task
686         objects now output their respective current instance of xxx
687         type messages.  (Analyze_Contract_Cases_In_Decl_Part): Add
688         formal parameter Freeze_Id. Emit a clarification message
689         when an undefined entity may the byproduct of contract
690         freezing.
691         (Analyze_Part_Of_In_Decl_Part): Add formal
692         parameter Freeze_Id. Emit a clarification message when an
693         undefined entity may the byproduct of contract freezing.
694         (Analyze_Pre_Post_Condition_In_Decl_Part): Add formal
695         parameter Freeze_Id. Emit a clarification message when an
696         undefined entity may the byproduct of contract freezing.
697         (Analyze_Refined_State_In_Decl_Part): Do not report unused body
698         states as constituents of single protected/task types may not
699         bave been identified yet.
700         (Collect_Subprogram_Inputs_Outputs):
701         Reimplemented.  (Contract_Freeze_Error): New routine.
702         (Process_Overloadable): Use predicate Is_Single_Task_Object.
703         * sem_prag.ads (Analyze_Contract_Cases_In_Decl_Part):
704         Add formal parameter Freeze_Id and update the comment
705         on usage.
706         (Analyze_Part_Of_In_Decl_Part): Add formal
707         parameter Freeze_Id and update the comment on usage.
708         (Analyze_Pre_Post_Condition_In_Decl_Part): Add formal parameter
709         Freeze_Id and update the comment on usage.
710         * sem_util.adb (Check_Unused_Body_States): Remove global
711         variable Legal_Constits. The routine now reports unused
712         body states regardless of whether constituents are
713         legal or not.
714         (Collect_Body_States): A constituent of a
715         single protected/task type is not a visible state of a
716         package body.
717         (Collect_Visible_States): A constituent
718         of a single protected/task type is not a visible
719         state of a package body.
720         (Has_Undefined_Reference): New routine.
721         (Is_Single_Concurrent_Object): Reimplemented.
722         (Is_Single_Protected_Object): New routine.
723         (Is_Single_Task_Object): New routine.
724         (Is_Visible_Object): New routine.
725         (Report_Unused_Body_States): Moved to Check_Unused_Body_States.
726         * sem_util.ads (Check_Unused_Body_States): Update the comment on usage.
727         (Has_Undefined_Reference): New routine.
728         (Is_Single_Protected_Object): New routine.
729         (Is_Single_Task_Object): New routine.
730         (Report_Unused_Body_States): Moved to Check_Unused_Body_States.
732 2015-11-18  Pierre-Marie de Rodat  <derodat@adacore.com>
734         * Makefile.rtl, impunit.adb: Add g-strhas.ads.
735         * g-strhas.ads: New file.
736         * s-strhas.ads: Add a comment to redirect users to g-strhas.ads.
738 2015-11-18  Bob Duff  <duff@adacore.com>
740         * sem_elab.adb (Check_Internal_Call_Continue): Fix the case
741         where the call in question is to a renaming of a subprogram that
742         can be safely called without ABE.
743         * checks.adb: Minor edits.
745 2015-11-18  Hristian Kirtchev  <kirtchev@adacore.com>
747         * atree.adb (Elist11): New routine.
748         (Set_Elist11): New routine.
749         * atree.ads (Elist11): New routine.
750         (Set_Elist11): New routine.
751         * atree.h: Define Elist11.
752         * contracts.adb (Analyze_Object_Contract): Verify the legality
753         of all references to a variable given that the variable is a
754         constituent of a single protected/task type.
755         * einfo.adb: Part_Of_References now utilizes Elist11.
756         (Part_Of_References): New routine.
757         (Set_Part_Of_References): New routine.
758         (Write_Field11_Name): Add output for Part_Of_References.
759         * einfo.ads New attribute Part_Of_References along with usage
760         in entities.
761         (Part_Of_References): New routine along with
762         pragma Inline.
763         (Set_Part_Of_References): New routine along with pragma Inline.
764         * sem_prag.adb (Analyze_Constituent): Record a possible
765         reference to a concurrent constituent.
766         (Analyze_Global_Item): Record a possible reference to a concurrent
767         constituent.
768         (Analyze_Input_Output): Record a possible reference to a
769         concurrent constituent.
770         * sem_res.adb (Resolve_Entity_Name): Record a possible reference
771         to a concurrent constituent.
772         * sem_util.adb (Check_Part_Of_Reference): New routine.
773         (Record_Possible_Part_Of_Reference): New routine.
774         * sem_util.ads (Check_Part_Of_Reference): New routine.
775         (Record_Possible_Part_Of_Reference): New routine.
777 2015-11-18  Ed Schonberg  <schonberg@adacore.com>
779         * checks.adb (Apply_Arithmetic_Overflow_Minimized_Eliminated):
780         An if_expression is the proper place to apply the overflow
781         minimization procedure if its context is not an enclosing
782         arithmetic expression.
784 2015-11-18  Arnaud Charlet  <charlet@adacore.com>
786         * gnat_ugn/gnat_project_manager.rst,
787         gnat_ugn/building_executable_programs_with_gnat.rst,
788         gnat_ugn/gnat_and_program_execution.rst,
789         gnat_ugn/the_gnat_compilation_model.rst,
790         gnat_rm/implementation_defined_pragmas.rst,
791         gnat_rm/standard_and_implementation_defined_restrictions.rst,
792         gnat_ugn.texi, gnat_rm.texi: Update doc.
794 2015-11-18  Hristian Kirtchev  <kirtchev@adacore.com>
796         * contracts.adb (Add_Contract_Item): Chain pragmas Attach_Handler
797         and Interrupt_Handler on the classifications list of a [generic]
798         procedure N_Contract node.
799         * contracts.ads (Add_Contract_Item): Update the comment on usage.
800         * einfo.adb (Get_Pragma): Pragmas Attach_Handler and
801         Interrupt_Handler are found on the classifications list of
802         N_Contract nodes.
803         * einfo.ads (Get_Pragma): Update the comment on usage.
804         * sem_prag.adb (Process_Interrupt_Or_Attach_Handler): Code
805         reformatting. Store the pragma as a contract item.
807 2015-11-18  Ed Schonberg  <schonberg@adacore.com>
809         * sem_ch8.adb (Available_Subtype): Use only in GNATprove
810         mode. When generating code it may be necessary to create itypes
811         at the point of use of a selected component, for example in the
812         expansion of a record equality operation.
814 2015-11-18  Vincent Celier  <celier@adacore.com>
816         * s-os_lib.adb (Normalize_Pathname.Get_Directory): When
817         invoking Normalize_Pathname, use the same values for parameters
818         Resolve_Links and Case_Sensitive as the parent Normalize_Pathname.
820 2015-11-18  Vincent Celier  <celier@adacore.com>
822         * a-direct.adb (Containing_Directory): Return "." when the result
823         is the current directory, not specified as an absolute path name.
825 2015-11-18  Hristian Kirtchev  <kirtchev@adacore.com>
827         * exp_aggr.adb (Is_Completely_Hidden_Discriminant): New routine.
828         (Init_Hidden_Discriminants): Code reformatting. Do not initialize
829         a completely hidden discriminant.
830         * a-interr.ads (Get_CPU): Added SPARK_Mode, Volatile_Function
831         and Global aspects on the function.
833 2015-11-18  Ed Schonberg  <schonberg@adacore.com>
835         * exp_intr.adb (Expand_Unc_Deallocation): If the designated
836         type is a concurrent type, the deallocation applies to the
837         corresponding record type, or to its class-wide type if the type
838         is tagged.
840 2015-11-18  Doug Rupp  <rupp@adacore.com>
842         * s-parame-vxworks.adb: Reduce default stack size for stack
843         limit check to a reasonable value
844         * s-tpopsp-vxworks.adb: Make Stack_Limit a task variable for vx5 and
845         vxmils.
847 2015-11-18  Ed Schonberg  <schonberg@adacore.com>
849         * sem_ch5.adb (Analyze_Assignment): Diagnose assignment where
850         left-hand side has a limited view of a class-wide type.
851         * sem_ch6.adb (Detected_And_Exchange): Do not install a non-limited
852         view if the scope of the type of the formal is visible through
853         a limited_with_clause, even if the non-limited view is available.
855 2015-11-18  Emmanuel Briot  <briot@adacore.com>
857         * s-pooglo.ads: Make Global_Pool_Object aliased.
859 2015-11-18  Ed Schonberg  <schonberg@adacore.com>
861         * sem_attr.adb (Analyze_Attribute, case 'Access): If the prefix
862         is an expression function, do not analyze the generated body if
863         the current scope is not the scope of the expression function,
864         as may happen if the attribute is an actual in an instantiation.
865         * sem_ch10.adb, sem_ch12.adb, a-stzmap.adb, s-soflin.adb,
866         a-stwima.adb: Fix typos.
868 2015-11-18  Arnaud Charlet  <charlet@adacore.com>
870         * exp_ch11.adb (Expand_N_Exception_Declaration): No-op when
871         generating C code.
873 2015-11-18  Hristian Kirtchev  <kirtchev@adacore.com>
875         PR ada/66242
876         * exp_ch3.adb (Default_Initialize_Object): Reimplemented. Abort
877         defer / undefer pairs are now encapsulated in a block with
878         an AT END handler. Partial finalization now takes restriction
879         No_Exception_Propagation into account when generating blocks.
880         * exp_ch7.adb Various reformattings.
881         (Create_Finalizer): Change
882         the generation of abort defer / undefer pairs and explain the
883         lack of an AT END handler.
884         (Process_Transient_Objects): Add generation of abort defer/undefer
885         pairs.
886         * exp_ch9.adb Various reformattings.
887         (Build_Protected_Subprogram_Body): Use
888         Build_Runtime_Call to construct a call to Abort_Defer.
889         (Build_Protected_Subprogram_Call_Cleanup): Use
890         Build_Runtime_Call to construct a call to Abort_Undefer.
891         (Expand_N_Asynchronous_Select): Use Build_Runtime_Call to
892         construct a call to Abort_Defer.
893         * exp_intr.adb (Expand_Unc_Deallocation): Abort defer
894         / undefer pairs are now encapsulated in a block with
895         an AT END handler. Finalization now takes restriction
896         No_Exception_Propagation into account when generating blocks.
897         * exp_util.ads, exp_util.adb (Wrap_Cleanup_Procedure): Removed.
899 2015-11-18  Vincent Celier  <celier@adacore.com>
901         * g-comlin.adb (Find_Longest_Matching_Switch): Do not take into
902         account a switch ending with '=' when the actual command line
903         switch is not followed with a space or '='.
905 2015-11-18  Ed Schonberg  <schonberg@adacore.com>
907         * sem_res.adb (Resolve_Explicit_Dereference): Do not add an access
908         check if the type of the prefix is known to exclude null.
909         * a-coinve.adb (Get_Element_Access): The function returns an
910         access type that excludes null, so add an explicit check for
911         a null element pointer, which is created when Insert_Spaces is
912         called on an indefinite vector container.
914 2015-11-18  Arnaud Charlet  <charlet@adacore.com>
916         * switch-c.adb (Scan_Front_End_Switches): Add a check requiring
917         -gnatc with -gnateg.
919 2015-11-18  Ed Schonberg  <schonberg@adacore.com>
921         * sem_ch7.adb (Uninstall_Declarations): Before swapping private
922         and full views, ensure that the potential use visbility of the
923         two views is consistent.
925 2015-11-18  Doug Rupp  <rupp@adacore.com>
927         * s-parame-vxworks.adb: Increase default stack size for targets
928         using stack limit checking.
930 2015-11-18  Jose Ruiz  <ruiz@adacore.com>
932         * a-interr.adb, a-interr.ads (Ada.Interrupts.Get_CPU): Add this
933         function that was added to Ada 2005 returning the processor where
934         interrupt handlers execute.
936 2015-11-18  Tristan Gingold  <gingold@adacore.com>
938         * exp_ch9.adb (Is_Pure_Barrier): Handle expanded component
939         declaration of a protected definition.
941 2015-11-18  Ed Falis  <falis@adacore.com>
943         * s-soflin.adb, s-stchop-vxworks.adb: Code clean ups.
945 2015-11-18  Gary Dismukes  <dismukes@adacore.com>
947         * bcheck.adb: Minor editorial changes.
949 2015-11-18  Arnaud Charlet  <charlet@adacore.com>
951         * interfac.ads (Unsigned_24): New type.
952         * sem_ch13.adb (Validate_Unchecked_Conversion): Disable error on
953         unconstrained arrays in Relaxed_RM_Semantics mode.
955 2015-11-18  Vincent Celier  <celier@adacore.com>
957         * bcheck.adb (Check_Consistent_Dynamic_Elaboration_Checking): No
958         warning is withed unit is the interface of a Stand-Alone Library.
960 2015-11-18  Thomas Quinot  <quinot@adacore.com>
962         * s-os_lib.ads, s-os_lib.adb(Normalize_Pathname): Support the case of
963         an unresolved Directory argument, by recursively resolving it
964         against the current dir.
966 2015-11-18  Ed Schonberg  <schonberg@adacore.com>
968         * sem_ch6.adb (Process_Formals): A function declaration that
969         returns a class-wide type must have freeing deferred, so that it
970         is not frozen before the class-wide type and its root type are
971         frozen. This is significant when there may be a limited view of
972         the class_wide type in another package.
974 2015-11-18  Hristian Kirtchev  <kirtchev@adacore.com>
976         * einfo.adb (Has_Non_Null_Refinement): Rename to
977         Has_Non_Null_Visible_Refinement.
978         (Has_Null_Refinement): Rename to Has_Null_Visible_Refinement.
979         * einfo.ads Update the documentation of
980         attribute Has_Non_Null_Refinement and attribute Has_Null_Refinement.
981         (Has_Non_Null_Refinement): Rename to Has_Non_Null_Visible_Refinement
982         and update occurrences in entities.
983         (Has_Null_Refinement): Rename to Has_Null_Visible_Refinement and update
984         occurrences in entities.
985         * sem_prag.adb (Check_In_Out_States): Update the calls to
986         Has_[Non_]Null_Refinement.
987         (Check_Input_States): Update the
988         calls to Has_[Non_]Null_Refinement.
989         (Check_Output_States): Update the calls to Has_[Non_]Null_Refinement.
990         (Check_Proof_In_States): Update the calls to Has_[Non_]Null_Refinement.
991         (Collect_Global_Item): Update the calls to Has_[Non_]Null_Refinement.
992         (Is_Null_Refined_State): Update the calls to Has_[Non_]Null_Refinement.
993         (Match_Item): Update the calls to Has_[Non_]Null_Refinement.
994         * sem_util.adb (Has_Non_Null_Refinement): New routine.
995         (Has_Null_Refinement): New routine.
996         * sem_util.ads (Has_Non_Null_Refinement): New routine.
997         (Has_Null_Refinement): New routine.
999 2015-11-18  Gary Dismukes  <dismukes@adacore.com>
1001         * exp_util.adb: Minor reformatting and typo fixes.
1003 2015-11-18  Hristian Kirtchev  <kirtchev@adacore.com>
1005         * sem_ch4.adb: Minor reformatting.
1007 2015-11-18  Hristian Kirtchev  <kirtchev@adacore.com>
1009         * exp_util.adb (Expand_Subtype_From_Expr): Add new formal
1010         parameter Related_Id and propagate it to Make_Subtype_From_Expr.
1011         (Make_Subtype_From_Expr): Add new formal parameter
1012         Related_Id. Create external entities when requested by the caller.
1013         * exp_util.ads (Expand_Subtype_From_Expr): Add new formal
1014         parameter Related_Id. Update the comment on usage.
1015         (Make_Subtype_From_Expr): Add new formal parameter
1016         Related_Id. Update the comment on usage.
1017         * sem_ch3.adb (Analyze_Object_Declaration): Add local variable
1018         Related_Id. Generate an external constrained subtype when the
1019         object is a public symbol.
1021 2015-11-18  Hristian Kirtchev  <kirtchev@adacore.com>
1023         * sem_prag.adb (Analyze_Pragma): Update the grammars of pragmas
1024         Abstract_State, Depends, Global, Initializes, Refined_Depends,
1025         Refined_Global and Refined_State.
1027 2015-11-18  Hristian Kirtchev  <kirtchev@adacore.com>
1029         * sem_util.adb (Has_Full_Default_Initialization):
1030         Perform the test for the presence of pragma
1031         Default_Initial_Condition prior to the specialized type
1032         checks. Add a missing case where the lack of a pragma argument
1033         yields full default initialization.
1035 2015-11-18  Hristian Kirtchev  <kirtchev@adacore.com>
1037         * sem_res.adb (Resolve_Entity_Name): Do not check
1038         for elaboration issues when a variable appears as the name of
1039         an object renaming declaration as this constitutes an aliasing,
1040         not a read.
1042 2015-11-18  Ed Schonberg  <schonberg@adacore.com>
1044         * checks.adb (Overlap_Check): An actual that is an aggregate
1045         cannot overlap with another actual, and no check should be
1046         generated for it.
1047         * targparm.ads: Fix typos.
1049 2015-11-18  Pascal Obry  <obry@adacore.com>
1051         * adaint.c: Routine __gnat_killprocesstree only implemented on
1052         Linux and Windows.
1054 2015-11-18  Pascal Obry  <obry@adacore.com>
1056         * g-ctrl_c.adb: Minor style fixes.
1058 2015-11-18  Pascal Obry  <obry@adacore.com>
1060         * adaint.c, s-os_lib.adb, s-os_lib.ads (Kill_Process_Tree): New.
1062 2015-11-18  Hristian Kirtchev  <kirtchev@adacore.com>
1064         * sem_util.adb (Check_Nonvolatile_Function_Profile): Place the error
1065         message concerning the return type on the result definition.
1066         (Is_Volatile_Function): A function with a parameter of a protected
1067         type is a protected function if it is defined within a protected
1068         definition.
1070 2015-11-18  Ed Schonberg  <schonberg@adacore.com>
1072         * sem_ch4.adb (Try_Container_Indexing): When building the
1073         parameter list for the function call on indexing functions,
1074         preserve overloading of the parameters, which may themselves be
1075         generalized indexing operations.
1077 2015-11-13  Arnaud Charlet  <charlet@adacore.com>
1079         PR ada/68345
1080         * s-osinte-dragonfly.ads (Get_Page_Size): C function returns an int.
1082 2015-11-13  David Malcolm  <dmalcolm@redhat.com>
1084         * gcc-interface/trans.c (Sloc_to_locus): Add line_table param when
1085         calling linemap_position_for_line_and_column.
1087 2015-11-13  Hristian Kirtchev  <kirtchev@adacore.com>
1089         * exp_attr.adb: Minor reformatting.
1091 2015-11-13  Pascal Obry  <obry@adacore.com>
1093         * adaint.c: Ensure that it is possible to get killed process
1094         status on Windows.
1096 2015-11-13  Arnaud Charlet  <charlet@adacore.com>
1098         * gnat_rm.texi, gnat_ugn.texi, doc/gnat_ugn/gnat_project_manager.rst
1099         doc/gnat_ugn/building_executable_programs_with_gnat.rst,
1100         doc/gnat_ugn/platform_specific_information.rst,
1101         doc/gnat_ugn/gnat_and_program_execution.rst,
1102         doc/gnat_ugn/gnat_utility_programs.rst,
1103         doc/gnat_ugn/the_gnat_compilation_model.rst,
1104         doc/gnat_rm/compatibility_and_porting_guide.rst,
1105         doc/gnat_rm/implementation_defined_pragmas.rst,
1106         doc/gnat_rm/representation_clauses_and_pragmas.rst,
1107         doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
1108         Update documentation.
1110 2015-11-13  Eric Botcazou  <ebotcazou@adacore.com>
1112         * sigtramp-ios.c, init.c: Minor cosmetic tweaks.
1114 2015-11-13  Hristian Kirtchev  <kirtchev@adacore.com>
1116         * s-gloloc.adb, g-debpoo.adb: Minor reformatting.
1118 2015-11-13  Ed Schonberg  <schonberg@adacore.com>
1120         * sem_ch5.adb (Analyze_Iterator_Specification): Improve error
1121         message for the case the iterable name (array or container)
1122         is a component that depends on a discriminant.
1124 2015-11-13  Ed Schonberg  <schonberg@adacore.com>
1126         * sem_ch4.adb (Indicate_Name_And_Type): If the analysis of
1127         one interpretation succeeds, set type of name in call, for
1128         completeness.
1129         (Try_Container_Indexing): If there are multiple indexing
1130         functions, collect possible interpretations that are compatible
1131         with given parameters, and add implicit dereference types when
1132         present.
1133         * sem_util.adb (Build_Explicit_Dereference): If the expression
1134         is an overloaded function call use the given discriminant to
1135         resolve the call, and set properly the type of the call and of
1136         the resulting dereference.
1138 2015-11-13  Hristian Kirtchev  <kirtchev@adacore.com>
1140         * sem_prag.adb (Analyze_Pragma): Pragma Constant_After_Elaboration can
1141         now apply to a variable without an initialization expression.
1143 2015-11-13  Hristian Kirtchev  <kirtchev@adacore.com>
1145         * exp_ch9.adb (Add_Matching_Formals): Parameter Actuals is now of mode
1146         IN OUT. Create a new list when list Actuals is not present.
1147         (Build_Contract_Wrapper): Create the wrapper
1148         only when the entry has at least on checked contract case or
1149         pre/postcondition. Ensure that the call to the original entry
1150         lacks an actual parameter list when the entry appears without
1151         formal parameters.
1152         (Expand_Entry_Declaration): Code cleanup.
1154 2015-11-13  Hristian Kirtchev  <kirtchev@adacore.com>
1156         * sem_ch13.adb (Analyze_Aspect_Specifications): Continue the analysis
1157         after encountering an illegal aspect Part_Of.
1159 2015-11-13  Ed Schonberg  <schonberg@adacore.com>
1161         * exp_attr.adb (Expand_N_Attribute_Reference, case
1162         Overlaps_Storage): Add copies for nodes that represent the integer
1163         addresses of the two actuals, to prevent identical nodes in the
1164         tree, which the backend cannot handle properly.
1166 2015-11-13  Bob Duff  <duff@adacore.com>
1168         * sem_ch6.adb (Check_Private_Overriding): Change
1169         name of Parent_Is_Private to be Overrides_Private_Part_Op,
1170         and use Unit_Declaration_Node.
1172 2015-11-13  Bob Duff  <duff@adacore.com>
1174         * sinfo.ads: Minor comment fix.
1175         * sem_ch6.adb: Minor reformatting.
1177 2015-11-13  Jerome Lambourg  <lambourg@adacore.com>
1179         * tracebak.c: Do not use the GCC Unwinder to retrieve traceback
1180         for x86_64-vx7.
1182 2015-11-13  Eric Botcazou  <ebotcazou@adacore.com>
1184         * init.c [Darwin/arm64]: Fix typo.
1185         * sigtramp-armios.c: Remove.
1186         * sigtramp-ios.c: New file.
1188 2015-11-13  Doug Rupp  <rupp@adacore.com>
1190         * s-stchop-vxworks.adb (Set_Stack_Limit_For_Current_Task): Set stack
1191         limit to 12000 decimal vice 12000 hexadecimal.
1193 2015-11-13  Hristian Kirtchev  <kirtchev@adacore.com>
1195         * exp_ch9.adb, exp_fixd.adb, exp_util.adb, g-debpoo.adb,
1196         impunit.adb, scos.ads, sem_ch4.adb, sem_prag.adb,
1197         s-stchop-vxworks.adb: Minor reformatting.
1199 2015-11-13  Tristan Gingold  <gingold@adacore.com>
1201         * s-rident.ads (Profile_Info): Enable Pure_Barriers for
1202         GNAT_Extended_Ravenscar.
1204 2015-11-13  Bob Duff  <duff@adacore.com>
1206         * sem_ch6.adb (Check_Private_Overriding): Detect the special
1207         case where the overriding subprogram is overriding a subprogram
1208         that was declared in the same private part.
1210 2015-11-13  Gary Dismukes  <dismukes@adacore.com>
1212         * exp_ch9.adb: Minor reformatting and typo fixes.
1214 2015-11-13  Eric Botcazou  <ebotcazou@adacore.com>
1216         * init.c [Darwin/arm64]: Move __gnat_sigtramp implementation to...
1217         (__gnat_map_signal): New function.
1218         (__gnat_error_handler):
1219         Adjust the context and call above function.
1220         * sigtramp-armios.c: ...here.  New file.
1222 2015-11-13  Arnaud Charlet  <charlet@adacore.com>
1224         * bcheck.adb (Check_Consistent_Restrictions): Do not check
1225         consistency of No_Dependence for runtime units.
1227 2015-11-13  Tristan Gingold  <gingold@adacore.com>
1229         * s-rident.ads (Restriction_Id): Add Pure_Barriers.
1230         * restrict.ads (Implementation_Restriction): Add Pure_Barriers.
1231         * exp_ch9.adb (Expand_Entry_Barrier): Create
1232         Is_Simple_Barrier_Name function, add Is_Pure_Barrier and
1233         Check_Pure_Barriers.
1235 2015-11-13  Ed Schonberg  <schonberg@adacore.com>
1237         * sem_util.adb (Get_Cursor_Type): To determine whether a function
1238         First is the proper Iterable primitive, use the base type of the
1239         first formal rather than the type. This is needed in the unusual
1240         case where the Iterable aspect is specified for an integer type.
1242 2015-11-13  Ed Schonberg  <schonberg@adacore.com>
1244         * sem_ch4.adb (Constant_Indexing_OK): If the indexing is the
1245         prefix of a procedure call assume that constant indexing is
1246         not chosen.
1248 2015-11-13  Eric Botcazou  <ebotcazou@adacore.com>
1250         * sigtramp.h: Fix formatting throughout, do not include other
1251         headers, add missing preprocessor condition and 'extern' keywords.
1252         * sigtramp-armdroid.c: Include <sys/ucontext.h>.
1253         * init.c [Android]: Likewise.
1255 2015-11-13  Eric Botcazou  <ebotcazou@adacore.com>
1257         * init.c [Darwin/arm64] (__gnat_sigtramp): Do not increment PC,
1258         fix CFI and add return sequence.
1260 2015-11-13  Ed Schonberg  <schonberg@adacore.com>
1262         * exp_fixd.adb (Expand_Convert_Float_To_Fixed): If the conversion
1263         comes from an attribute reference 'Round, the operation must
1264         round and not truncate.
1265         * sem_res.adb, sem_ch6.adb: Minor editing.
1267 2015-11-12  Philippe Gil  <gil@adacore.com>
1269         * g-debpoo.adb (Print_Address): print address in hexadecimal as
1270         in previous GNAT version (without secondary stack use)
1271         (Deallocate): Deallocate calling once Unlock_Task.all when it
1272         raise exception.
1274 2015-11-12  Ed Schonberg  <schonberg@adacore.com>
1276         * sem_ch3.adb (Analyze_Subtype_Declaration): Remove redundant
1277         copying of dimensions from parent type to subtype. This is
1278         properly done in Analyze_Dimension.
1279         * sem_dim.adb (Analyze_Dimension_Subtype_Declaration): Add entity
1280         to error message, so that reference to entity can be formatted
1281         properly.
1282         * opt.ads: Fix typo.
1284 2015-11-12  Bob Duff  <duff@adacore.com>
1286         * impunit.adb, lib-xref.ads, restrict.ads, scos.ads, sem_attr.ads,
1287         types.ads: Get rid of some global variables.
1288         * output.adb, output.ads: Move some global variables to the body.
1290 2015-11-12  Yannick Moy  <moy@adacore.com>
1292         * lib-xref-spark_specific.adb
1293         (Is_Constant_Object_Without_Variable_Input): Add special case
1294         for imported constants.
1296 2015-11-12  Philippe Gil  <gil@adacore.com>
1298         * g-debpoo.adb (Allocate): Avoid having allocations not handled.
1300 2015-11-12  Ed Schonberg  <schonberg@adacore.com>
1302         * checks.adb (Apply_Scalar_Range_Check): If the expression is
1303         a real literal and the context type has static bounds, remove
1304         range check when possible.
1306 2015-11-12  Ed Schonberg  <schonberg@adacore.com>
1308         * sem_util.adb (Collect_Primitive_Operations): If the type is
1309         derived from a type declared elsewhere that has an incomplete
1310         type declaration, the primitives are found in the scope of the
1311         type nat that of its ancestor.
1313 2015-11-12  Arnaud Charlet  <charlet@adacore.com>
1315         * switch-c.adb, debug.adb, osint-c.adb, gnat1drv.adb: Remove -gnatd.V
1316         debug switch.
1317         * exp_aggr.adb, exp_util.adb: Fix typos.
1319 2015-11-12  Jerome Lambourg  <lambourg@adacore.com>
1321         * init.c: Properly adjust PC values in case of signals.
1323 2015-11-12  Bob Duff  <duff@adacore.com>
1325         * sem_prag.adb (Check_Arg_Is_Library_Level_Local_Name): A
1326         pragma that comes from an aspect does not "come from source",
1327         so we need to test whether it comes from an aspect.
1329 2015-11-12  Arnaud Charlet  <charlet@adacore.com>
1331         * switch-c.adb, gnat1drv.adb, opt.ads: Reserve -gnateg for generation
1332         of C headers.
1334 2015-11-12  Arnaud Charlet  <charlet@adacore.com>
1336         * back_end.adb, opt.ads (Debugger_Level): Update comment.
1337         (Scan_Back_End_Switches): Set Debugger_Level.
1339 2015-11-12  Bob Duff  <duff@adacore.com>
1341         * fmap.adb, debug.ads, checks.adb, exp_ch11.adb: Minor edits.
1343 2015-11-12  Doug Rupp  <rupp@adacore.com>
1345         * s-stchop-vxworks.adb (Stack_Limit): Export vice Import.
1347 2015-11-12  Gary Dismukes  <dismukes@adacore.com>
1349         * sem_dim.adb: Minor reformatting.
1351 2015-11-12  Gary Dismukes  <dismukes@adacore.com>
1353         * gnat1drv.adb, opt.ads: Minor reformatting.
1355 2015-11-12  Ed Schonberg  <schonberg@adacore.com>
1357         * sem_ch3.adb (Analyze_Number_Declaration): Call Analyze_Dimension,
1358         to propagate dimension information from expression to named
1359         number.
1360         * sem_dim.ads: Documentation:  number declaration and explicit
1361         dereference can carry dimension information.
1362         * sem_dim.adb (Analyze_Dimension_Number_Declaration): New
1363         procedure, to propagate dimension information from expression
1364         of declaration to named number, whose type becomes one of the
1365         dimensioned base types rather than universal real.
1366         (Analyze_Dimension_Binary_Op):
1367         a) If one operand is a literal that is the value of a declared
1368         constant after constant-foloding, use the dimensions of the
1369         declared constant.
1370         b) If an operand is a literal that is a contant-folded expression,
1371         and expander is active, do not report a dimension mismatch if
1372         literal does not carry them, because dimension matching will
1373         have been checked previously.
1375 2015-11-12  Ed Schonberg  <schonberg@adacore.com>
1377         * sem_ch8.adb (Find_Selected_Component): In a synchronized
1378         body, a reference to an operation of an object of the same
1379         synchronized type was always interpreted as a reference to the
1380         current instance. This is not always the case, as the prefix of
1381         the reference may designate an object of the same type declared
1382         in the enclosing context prior to the body.
1384 2015-11-12  Arnaud Charlet  <charlet@adacore.com>
1386         * impunit.ads, impunit.adb (Get_Kind_Of_File): New. Cleaned up
1387         implementation from previous Get_Kind_Of_Unit.
1388         (Get_Kind_Of_Unit): Reimplemented using Get_Kind_Of_File.
1389         * debug.adb: Remove d.4 switch, no longer used.
1390         * opt.ads: Update doc on Debugger_Level.
1391         * gnat1drv.adb: Code clean ups.
1392         * sinput.ads: minor fix in comment
1394 2015-11-12  Bob Duff  <duff@adacore.com>
1396         * sinfo.adb, sinfo.ads, sem_ch6.adb, atree.ads: Add
1397         Was_Expression_Function flag, which is set in sem_ch6.adb when
1398         converting an Expression_Function into a Subprogram_Body.
1400 2015-11-12  Pascal Obry  <obry@adacore.com>
1402         * usage.adb: Update overflow checking documentation.
1404 2015-11-12  Tristan Gingold  <gingold@adacore.com>
1406         * snames.ads-tmpl: Name_Gnat_Extended_Ravenscar: New identifier.
1407         * s-rident.ads (Profile_Name): Add GNAT_Extended_Ravenscar.
1408         (Profile_Info): Add new entry for GNAT_Extended_Ravenscar.
1409         * sem_prag.adb (Set_Ravenscar_Profile): Add Profile parameter
1410         to handle various ravenscar profiles. Adjust error messages.
1411         (Analyze_Pragma): Handle GNAT_Extended_Ravenscar profile.
1412         * targparm.adb (Get_Target_Parameters): Handle
1413         GNAT_Extended_Ravenscar profile.
1415 2015-11-12  Ed Schonberg  <schonberg@adacore.com>
1417         * sem_warn.adb (Warn_On_Unreferenced_Entity): If the entity is an
1418         Out_Parameter the front-end does not emit any warning on it, so
1419         do not suppress warnings on the entity because the backend might
1420         be able to determine an uninitialized path and warn accordingly.
1422 2015-11-12  Ed Schonberg  <schonberg@adacore.com>
1424         * sem_ch4.adb (Analyze_Selected_Component): Diagnose an attempt
1425         to reference an internal entity from a synchronized type from
1426         within the body of that type, when the prefix of the selected
1427         component is not the current instance.
1429 2015-11-12  Ed Falis  <falis@adacore.com>
1431         * s-stchop-vxworks.adb: Clean up in stack checking code.
1433 2015-11-12  Gary Dismukes  <dismukes@adacore.com>
1435         * exp_ch6.adb (Is_Build_In_Place_Function_Call):
1436         Test Expression (N) in N_Type_Conversion cases as well,
1437         since conversions can occur in actual parameter contexts.
1438         (Make_Build_In_Place_Call_In_Anonymous_Context): Retrieve
1439         function call from Expression (Func_Call) when Nkind (Func_Call)
1440         is N_Type_Conversion, since conversions are allowed in "anonymous"
1441         contexts (specifically, as actual parameters).
1443 2015-11-12  Thomas Quinot  <quinot@adacore.com>
1445         * sem_ch4.adb (analyze_If_Expression): Reject IF-expression where
1446         THEN-expression is overloaded and none of its interpretation is
1447         compatible with the ELSE-expression.
1449 2015-11-12  Jerome Lambourg  <lambourg@adacore.com>
1451         * init.c: Do not try to mess with the MSR values in RTP mode:
1452         not needed and forbidden.
1454 2015-11-12  Ed Schonberg  <schonberg@adacore.com>
1456         * exp_attr.adb (Compile_Stream_Body_In_Scope): Do not install
1457         full view of a type that has pragma Stream_Convert, because
1458         this indicates special processing for the stream operations of
1459         the type.
1461 2015-11-12  Jerome Lambourg  <lambourg@adacore.com>
1463         * init.c: Do not try to mess with the MSR values in RTP mode:
1464         not needed and forbidden.
1466 2015-11-12  Ed Schonberg  <schonberg@adacore.com>
1468         * exp_attr.adb (Compile_Stream_Body_In_Scope): Do not install
1469         full view of a type that has pragma Stream_Convert, because
1470         this indicates special processing for the stream operations of
1471         the type.
1473 2015-11-12  Gary Dismukes  <dismukes@adacore.com>
1475         * exp_ch5.adb, sem_ch3.adb, exp_util.ads, inline.adb, freeze.adb,
1476         sem_util.adb, sem_util.ads, par-ch6.adb, sem_elab.adb: Minor
1477         reformatting and a typo fix.
1479 2015-11-12  Ed Schonberg  <schonberg@adacore.com>
1481         * sem_ch12.adb (Preanalyze_Actuals): Add guard on use of
1482         Incomplete_Actuals, which are only stored for a package
1483         instantiation, in order to place the instance in the body of
1484         the enclosing unit.
1486 2015-11-12  Ed Schonberg  <schonberg@adacore.com>
1488         * exp_intr.adb: Add legality checks on calls to a
1489         Generic_Dispatching_Constructor: the given tag must be defined,
1490         it cannot be the tag of an abstract type, and its accessibility
1491         level must not be greater than that of the constructor.
1493 2015-11-12  Ed Schonberg  <schonberg@adacore.com>
1495         * sem_ch4.adb (Try_Container_Indexing, Constant_Indexing_OK):   If
1496         the context is an overloaded call, assume that Constant_Indexing
1497         is not OK if an interpretation has an assignable parameter
1498         corresponding to the indexing expression.
1500 2015-11-12  Jerome Lambourg  <lambourg@adacore.com>
1502         * init.c (__gnat_error_handler): Force the SPE bit of the MSR
1503         when executing on e500v2 CPU.
1505 2015-11-12  Hristian Kirtchev  <kirtchev@adacore.com>
1507         * sem_prag.adb (Analyze_Constituent): Stop the
1508         analysis after detecting a misplaced constituent as this is a
1509         critical error.
1511 2015-11-12  Hristian Kirtchev  <kirtchev@adacore.com>
1513         * sem_ch10.adb, atree.adb: Minor reformatting.
1515 2015-11-12  Hristian Kirtchev  <kirtchev@adacore.com>
1517         * sem_elab.adb (Check_A_Call): Add new variable
1518         Is_DIC_Proc. Report elaboration issue in SPARK concerning calls
1519         to source subprograms or nontrivial Default_Initial_Condition
1520         procedures. Add specialized error message to avoid outputting
1521         the internal name of the Default_Initial_Condition procedure.
1522         * sem_util.ads, sem_util.adb
1523         (Is_Non_Trivial_Default_Init_Cond_Procedure): New routine.
1525 2015-11-12  Hristian Kirtchev  <kirtchev@adacore.com>
1527         * contracts.adb (Analyze_Entry_Or_Subprogram_Body_Contract):
1528         Remove the guard concerning entry bodies as it is spurious.
1529         (Analyze_Entry_Or_Subprogram_Contract): Skip the analysis of
1530         Contract_Cases when not annotating the tree.
1531         * einfo.adb: Node25 is now used as Contract_Wrapper.
1532         (Contract_Wrapper): New routine.
1533         (PPC_Wrapper): Removed.
1534         (Set_Contract_Wrapper): New routine.
1535         (Set_PPC_Wrapper): Removed.
1536         (Write_Field25_Name): Add output for Contract_Wrapper. Remove
1537         output for PPC_Wrapper.
1538         * einfo.ads: New attribute Contract_Wrapper along with usage
1539         in entities. Remove attribute PPC_Wrapper along with usage in nodes.
1540         (Contract_Wrapper): New routine along with pragma Inline.
1541         (PPC_Wrapper): Removed along with pragma Inline.
1542         (Set_Contract_Wrapper): New routine along with pragma Inline.
1543         (Set_PPC_Wrapper): Removed along with pragma Inline.
1544         * exp_ch9.adb (Build_Contract_Wrapper): New routine.
1545         (Build_PPC_Wrapper): Removed.
1546         (Build_Protected_Entry): Code cleanup.
1547         (Expand_Entry_Declaration): Create a contract wrapper
1548         which now verifies Contract_Cases along with pre/postconditions.
1549         (Expand_N_Task_Type_Declaration): There is no need to check
1550         whether an entry has pre/postconditions as this is now done
1551         in Build_Contract_Wrapper.
1552         * sem_ch13.adb (Analyze_Aspect_Specifications): Pragma
1553         Refined_Post is now properly inserted in entry bodies.
1554         (Insert_Pragma): Add circuitry to insert in an entry body. Redo
1555         the instance "header" circuitry. Remove the now obsolete special
1556         case of inserting pre- conditions.
1557         * sem_prag.adb (Analyze_Pragma): Pragma Contract_Cases now
1558         applies to entries.
1559         * sem_res.adb (Resolve_Entry_Call): Update the calls to
1560         PPC_Wrapper.
1562 2015-11-12  Hristian Kirtchev  <kirtchev@adacore.com>
1564         * exp_attr.adb, freeze.adb, sem_util.adb, sem_ch13.adb: Minor
1565         reformatting.
1567 2015-11-12  Ed Schonberg  <schonberg@adacore.com>
1569         * exp_attr.adb (Compile_Stream_Body_In_Scope): When compiling
1570         a stream operation for an array type, install the scope of the
1571         component type if it is private and not in scope, to prevent
1572         spurious errors if the full view of the component type has
1573         defaulted discriminants.
1575 2015-11-12  Eric Botcazou  <ebotcazou@adacore.com>
1577         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): For a
1578         variable, if this is not an overlay, set on Treat_As_Volatile on it.
1579         * gcc-interface/decl.c (E_Variable): Do not force the type to volatile
1580         for address clauses. Tweak and adjust various RM references.
1582 2015-11-12  Eric Botcazou  <ebotcazou@adacore.com>
1584         * checks.ads: Minor comment fix.
1586 2015-11-12  Arnaud Charlet  <charlet@adacore.com>
1588         * gnat_rm.texi, gnat_ugn.texi,
1589         doc/gnat_ugn/platform_specific_information.rst,
1590         doc/gnat_ugn/gnat_and_program_execution.rst,
1591         doc/gnat_ugn/the_gnat_compilation_model.rst,
1592         doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
1593         doc/gnat_rm/implementation_defined_pragmas.rst: Update documentation.
1595 2015-11-12  Eric Botcazou  <ebotcazou@adacore.com>
1597         * einfo.ads (Overlays_Constant): Document usage for E_Constant.
1598         * freeze.adb (Warn_Overlay): Small reformatting.
1599         (Check_Address_Clause): Deal specifically with deferred
1600         constants.  For a variable or a non-imported constant
1601         overlaying a constant object and with initialization value,
1602         either remove the initialization or issue a warning.  Fix a
1603         couple of typos.
1604         * sem_util.adb (Note_Possible_Modification): Overhaul the condition for
1605         the warning on modified constants and use Find_Overlaid_Entity instead
1606         of doing it manually.
1607         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Compute and
1608         set Overlays_Constant once on entry.  Do not treat the overlaid
1609         entity as volatile.  Do not issue the warning on modified
1610         constants here.
1611         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: Remove
1612         over-restrictive condition for the special treatment of deferred
1613         constants.
1614         <E_Variable>: Remove obsolete associated code.
1616 2015-11-12  Eric Botcazou  <ebotcazou@adacore.com>
1618         * gcc-interface/trans.c (gnat_to_gnu) <N_Subprogram_Renaming_Decl>: Do
1619         not materialize renamed subprograms if only annotating types.
1621 2015-11-12  Pierre-Marie de Rodat  <derodat@adacore.com>
1623         * gcc-interface/decl.c (gnat_to_gnu_entity): Create
1624         IMPORTED_DECL nodes to describe the subprogram renamings which
1625         are relevant at debug time.
1626         * gcc-interface/gigi.h (get_debug_scope): Add declaration.
1627         * gcc-interface/trans.c (Identifier_to_gnu): Consider
1628         N_Defining_Operator_Symbol as valid entities.
1629         (gnat_to_gnu): Handle N_Defining_Operator_Symbol the same way as
1630         other entities.  Introduce a specific handling for
1631         N_Subprogram_Renaming_Declaration: call gnat_to_gnu_entity on
1632         the entity defined for relevant ones.
1633         (process_decls): Process subprogram renaming declarations during
1634         the second pass only.
1635         * gcc-interface/utils.c (get_debug_scope): Make it external.
1636         Consider N_Defining_Operator_Symbol as valid entities.
1637         (gnat_write_global_declarations): Output debugging information
1638         for top-level imported declarations.
1640 2015-11-12  Emmanuel Briot  <briot@adacore.com>
1642         * s-os_lib.ads: Documentation update.
1644 2015-11-12  Arnaud Charlet  <charlet@adacore.com>
1646         * s-taprop-vxworks.adb, s-osinte-vxworks.ads: Use a single import of
1647         taskDelay to avoid confusion.
1649 2015-11-12  Ed Schonberg  <schonberg@adacore.com>
1651         * exp_ch6.adb (Expand_Simple_Function_Return): If the return
1652         type is class-wide and the expression is a view conversion,
1653         remove the conversion to prevent overriding of the tag, which
1654         must be that of the object being returned.
1656 2015-11-12  Tristan Gingold  <gingold@adacore.com>
1658         * bindgen.adb (Gen_Adainit): Code cleanup.
1660 2015-11-12  Hristian Kirtchev  <kirtchev@adacore.com>
1662         * s-stalib.ads: Code cleanup.
1664 2015-11-12  Ed Schonberg  <schonberg@adacore.com>
1666         * sem_ch3.adb (Analyze_Incomplete_Type_Decl): small optimization.
1667         (Analyze_Subtype_Declaration): For floating point types,
1668         inherit dimensions.
1669         (OK_For_Limited_Init_In_05): Handle properly a conditional
1670         expression whose condition is static, and is rewritten as the
1671         branch that will be executed.
1673 2015-11-12  Ed Schonberg  <schonberg@adacore.com>
1675         * sem_attr.adb (Resolve_Attribute, case 'Access): If the context
1676         type is an access constant type, do not mark the attribute
1677         reference as a possible modification of the prefix.
1679 2015-11-12  Steve Baird  <baird@adacore.com>
1681         * sem_ch6.adb (Analyze_Procedure_Call) If CodePeer_Mode is True,
1682         do not analyze the expression of a machine code insertion.
1683         * sem_ch13.adb (Analyze_Code_Statement) If CodePeer_Mode is True,
1684         mark the N_Code_Statement node as analyzed and do nothing else.
1686 2015-11-12  Ed Schonberg  <schonberg@adacore.com>
1688         * sem_ch6.adb (Check_Limited_Return): Make global to package
1689         for use elsewhere.
1690         (Analyze_Expression_Function): Remove duplicated code, pre-analyze
1691         expression to capture names and call Check_Limited_Return so
1692         that semantic checks are identical to those for regular functions
1693         returning limited types.
1695 2015-11-12  Gary Dismukes  <dismukes@adacore.com>
1697         * bindgen.adb: Fix typo.
1698         * sem_ch6.adb: Minor reformatting.
1700 2015-11-12  Emmanuel Briot  <briot@adacore.com>
1702         * s-os_lib.adb (Argument_String_To_List): fix handling of
1703         windows separators
1705 2015-11-11  Andrew MacLeod  <amacleod@redhat.com>
1707         * gcc-interface/decl.c: Remove unused header files.
1708         * gcc-interface/misc.c: Likewise.
1709         * gcc-interface/targtyps.c: Likewise.
1710         * gcc-interface/trans.c: Likewise.
1711         * gcc-interface/utils.c: Likewise.
1713 2015-11-08  Eric Botcazou  <ebotcazou@adacore.com>
1715         * gcc-interface/gigi.h (set_reverse_storage_order_on_pad_type):
1716         Declare.
1717         * gcc-interface/decl.c (gnat_to_gnu_entity) <discrete_type>: Set the
1718         storage order on the enclosing record for a packed array type.
1719         <E_Array_Type>: Set the storage order.
1720         <E_Array_Subtype>: Likewise.
1721         <E_Record_Type>: Likewise.
1722         <E_Record_Subtype>: Likewise.
1723         (gnat_to_gnu_component_type): Set the reverse storage order on a
1724         padded type built for a non-bit-packed array.
1725         (gnat_to_gnu_field): Likewise.
1726         (components_to_record): Deal with TYPE_REVERSE_STORAGE_ORDER.
1727         * gcc-interface/utils.c (make_packable_type): Likewise.
1728         (pad_type_hasher::equal): Likewise.
1729         (gnat_types_compatible_p): Likewise.
1730         (unchecked_convert): Likewise.
1731         (set_reverse_storage_order_on_pad_type): New public function.
1732         * gcc-interface/trans.c (Attribute_to_gnu): Adjust call to
1733         get_inner_reference.
1734         * gcc-interface/utils2.c (build_unary_op): Likewise.
1735         (gnat_build_constructor): Deal with TYPE_REVERSE_STORAGE_ORDER.
1736         (gnat_rewrite_reference): Propagate REF_REVERSE_STORAGE_ORDER.
1738 2015-11-07  Richard Sandiford  <richard.sandiford@arm.com>
1740         * gcc-interface/utils.c: Don't undef DEF_BUILTIN.
1742 2015-10-29  Andrew MacLeod  <amacleod@redhat.com>
1744         * gcc-interface/decl.c: Reorder #include's and remove duplicates.
1745         * gcc-interface/misc.c: Likewise.
1746         * gcc-interface/targtyps.c: Likewise.
1747         * gcc-interface/trans.c: Likewise.
1748         * gcc-interface/utils.c: Likewise.
1749         
1750 2015-10-27  Tristan Gingold  <gingold@adacore.com>
1752         * bindgen.adb (System_BB_CPU_Primitives_Multiprocessors_Used):
1753         New variable.
1754         (Gen_Adainit): Call Start_All_CPUs if the above
1755         variable is set to true.
1757 2015-10-27  Emmanuel Briot  <briot@adacore.com>
1759         * adaint.c, s-os_lib.adb, s-os_lib.ads (Copy_File_Attributes): New
1760         subprogram.
1762 2015-10-27  Hristian Kirtchev  <kirtchev@adacore.com>
1764         * namet.adb, namet.ads: Minor reformatting.
1766 2015-10-27  Ed Schonberg  <schonberg@adacore.com>
1768         * sem_ch4.adb (Analyze_Allocator): Do not perform legality check
1769         on allocators for limited objects in a qualified expression,
1770         because expression has not been resolved.
1771         * sem_res.adb (Resolve_Allocator): Perform check on legality of
1772         limited objects after resolution.  Add sem_ch3.adb to context.
1774 2015-10-27  Hristian Kirtchev  <kirtchev@adacore.com>
1776         * sem_prag.adb (Analyze_Refined_Global_In_Decl_Part): Add variable
1777         States.
1778         (Check_Refined_Global_Item): An object or state acts as a
1779         constituent only when the corresponding encapsulating state
1780         appears in pragma Global.
1781         (Collect_Global_Item): Add a state with non-null visible refinement to
1782         list States.
1784 2015-10-27  Gary Dismukes  <dismukes@adacore.com>
1786         * sem_util.ads, par.adb, sem_ch6.adb: Minor reformatting and a few
1787         typo corrections.
1789 2015-10-27  Pierre-Marie de Rodat  <derodat@adacore.com>
1791         * namet.ads, namet.adb (Name_Equals): New function.
1792         * namet.h (Name_Equals): New macro.
1794 2015-10-27  Arnaud Charlet  <charlet@adacore.com>
1796         * exp_ch6.adb (Build_Procedure_Form): Use 'RESULT' for the extra
1797         parameter, to avoid ambiguity when generating tmps using _xxx which
1798         might end up reusing _result.
1800 2015-10-27  Javier Miranda  <miranda@adacore.com>
1802         * sem_util.ads, sem_util.adb (Defining_Identifier): Adding a formal to
1803         indicate the needed behavior in case of nodes with errors.
1805 2015-10-27  Ed Schonberg  <schonberg@adacore.com>
1807         * sem_attr.adb (Eval_Attribute): If the prefix of attribute
1808         Enum_Rep is an object that is a generated loop variable for an
1809         element iterator, no folding is possible.
1810         * sem_res.adb (Resolve_Entity_Name): Do not check for a missing
1811         initialization in the case of a constant that is an object
1812         renaming.
1813         * exp_attr.adb (Expand_N_Attribute_Reference, case Enum_Rep):
1814         If the prefix is a constant that renames an expression there is
1815         nothing to evaluate statically.
1817 2015-10-27  Vincent Celier  <celier@adacore.com>
1819         * gnatlink.adb: Always delete the response file, even when the
1820         invocation of gcc to link failed.
1822 2015-10-27  Hristian Kirtchev  <kirtchev@adacore.com>
1824         * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
1825         Do not inherit the SPARK_Mode from the context if it has been
1826         set already.
1827         (Build_Subprogram_Declaration): Relocate relevant
1828         pragmas from the subprogram body to the generated corresponding
1829         spec. Do not copy aspect SPARK_Mode as this leads to circularity
1830         in Copy_Separate_Tree. Inherit the attributes that describe
1831         pragmas Ghost and SPARK_Mode.
1832         (Move_Pragmas): New routine.
1834 2015-10-27  Hristian Kirtchev  <kirtchev@adacore.com>
1836         * inline.adb (Is_Expression_Function): Removed.
1837         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): An internally
1838         generated subprogram body that completes an expression function
1839         inherits the SPARK_Mode from the spec.
1840         * sem_res.adb (Resolve_Call): Update all calls to
1841         Is_Expression_Function.
1842         * sem_util.ads, sem_util.adb (Is_Expression_Function): Reimplemented.
1843         (Is_Expression_Function_Or_Completion): New routine.
1845 2015-10-27  Hristian Kirtchev  <kirtchev@adacore.com>
1847         * lib-xref-spark_specific.adb, a-dirval-mingw.adb, exp_ch6.adb,
1848         sem_ch8.adb, s-os_lib.adb: Minor reformatting.
1850 2015-10-27  Yannick Moy  <moy@adacore.com>
1852         * lib-xref-spark_specific.adb
1853         (Enclosing_Subprogram_Or_Library_Package): detect library-level
1854         subprograms and handle entries as subprograms, i.e. now both
1855         library-level subprograms and entry bodies act as enclosing
1856         scopes.
1857         (Traverse_Declarations_Or_Statements): process entry bodies just
1858         like subprogram bodies.
1859         * lib-xref.ads (Enclosing_Subprogram_Or_Library_Package): comment
1860         simplified while keeping its the meaning and minor typo fixed
1861         ("of" -> "or").
1862         * spark_xrefs.ads (Xref Section): fix in description of the ALI
1863         line for subprogram calls; such lines start with captial "F"
1864         followed by a space.
1866 2015-10-27  Ed Schonberg  <schonberg@adacore.com>
1868         * sem_ch8.adb (Find_Direct_Name): A parameter association is
1869         a legal context for applying an implicit dereference.
1870         (Analyze_Expanded_Name): Minor code cleanup.
1872 2015-10-27  Arnaud Charlet  <charlet@adacore.com>
1874         * sinput.ads, spark_xrefs.ads, lib-xref.adb: Fix typos.
1876 2015-10-27  Pascal Obry  <obry@adacore.com>
1878         * a-dirval-mingw.adb: Remove some characters from Invalid_Character set.
1880 2015-10-27  Ed Schonberg  <schonberg@adacore.com>
1882         * exp_ch6.adb (Rewrite_Function_Call_For_C): Use a named
1883         associaion for the added actual in the call because previous
1884         actuals may also have been given by explicit associations.
1885         * lib-xref.adb: Minor style fixes.
1887 2015-10-27  Arnaud Charlet  <charlet@adacore.com>
1889         * gnat1drv.adb: Remove hard coded restrictions.
1891 2015-10-27  Pascal Obry  <obry@adacore.com>
1893         * a-dirval-mingw.adb: Minor reformatting.
1895 2015-10-27  Javier Miranda  <miranda@adacore.com>
1897         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Improve previous patch.
1899 2015-10-27  Hristian Kirtchev  <kirtchev@adacore.com>
1901         * sem_ch12.adb (Analyze_Formal_Package_Declaration): Code cleanup. Set
1902         and restore the value of global flag Ignore_Pragma_SPARK_Mode. A
1903         formal package declaration acts as a package instantation with
1904         respect to SPARK_Mode legality.
1906 2015-10-27  Hristian Kirtchev  <kirtchev@adacore.com>
1908         * sem_prag.adb (Check_Constituent_Usage): Use
1909         logical operators rather than short circuit operators. Emit an
1910         error when a state with visible refinement is not refined.
1911         * snames.ads-tmpl: Add names for detecting
1912         predefined potentially blocking subprograms.
1914 2015-10-27  Arnaud Charlet  <charlet@adacore.com>
1916         * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Revert previous
1917         change.
1918         (Expand_Array_Aggregate): Rewrite previous change here
1919         as done for other non GCC back-ends.
1920         (Build_Record_Aggr_Code): Add special case.
1922 2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>
1924         * sem_prag.adb (Add_Item_To_Name_Buffer): Update the comment on usage.
1925         Add an output string for loop parameters.
1926         (Analyze_Global_Items): Loop parameters are now a
1927         valid global item. The share the legality checks of constants.
1928         (Analyze_Input_Output): Loop parameters are now a valid dependency item.
1929         (Find_Role): Loop parameters share the role of constants.
1931 2015-10-26  Ed Schonberg  <schonberg@adacore.com>
1933         * sem_res.adb (Resolve_Generalized_Indexing): In ASIS mode,
1934         preserve the Generalized_ indexing link if the context is not
1935         a spec expression that will be analyzed anew.
1937 2015-10-26  Javier Miranda  <miranda@adacore.com>
1939         * exp_ch6.ads, exp_ch6.adb (Build_Procedure_Body_Form): Promote it to
1940         library level (to invoke this routine from the semantic analyzer).
1941         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): When generating
1942         C code, invoke Build_Procedure_Body_Form to transform a function
1943         that returns a constrained array type into a procedure with an
1944         out parameter that carries the return value.
1946 2015-10-26  Arnaud Charlet  <charlet@adacore.com>
1948         * a-reatim.ads: Add "Clock_Time with Synchronous" contract in package
1949         Ada.Real_Time.
1950         * a-taside.ads: Add "Tasking_State with Synchronous" contract in
1951         package Ada.Task_Identification.
1952         * sem_ch12.adb: minor typo in comment
1954 2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>
1956         * contracts.adb (Analyze_Object_Contract): Set and restore
1957         the SPARK_Mode for both constants and objects. Factor out the
1958         semantic checks concerning Ghost objects.
1959         * freeze.adb (Freeze_Array_Type): A Ghost array type cannot have a
1960         concurrent component type.
1961         (Freeze_Entity): A Ghost type cannot also be concurrent.
1962         (Freeze_Record_Type): A Ghost record type cannot have a concurrent
1963         component.
1964         * sem_prag.adb (Analyze_Abstract_State): A Ghost abstract
1965         state cannot also be synchronized.
1966         (Check_Ghost_Synchronous): New routine.
1967         * sem_util.adb (Yields_Synchronized_Object): Correct the case
1968         of record components to account for the case where the type has
1969         no component list.
1971 2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>
1973         * expander.adb (Expand): Expand a single protected declaration.
1974         * exp_ch9.ads, exp_ch9.adb (Expand_N_Single_Protected_Declaration): New
1975         routine.
1977 2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>
1979         * sem_res.adb (Is_OK_Volatile_Context): A volatile object may appear
1980         in an object declaration as long as it denotes the name.
1982 2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>
1984         * sem_ch9.adb (Analyze_Single_Protected_Declaration): The anonymous
1985         object no longer comes from source.
1986         (Analyze_Single_Task_Declaration): The anonymous object no longer
1987         comes from source.
1988         * sem_prag.adb (Analyze_Pragma): The analysis of pragma SPARK_Mode
1989         now recognizes the internal anonymous object created for a single
1990         concurren type as a valid context.
1991         (Find_Related_Context): The internal anonymous object created for a
1992         single concurrent type is now a valid context.
1993         (Find_Related_Declaration_Or_Body): The internal anonymous object
1994         created for a single concurrent type is now a valid context.
1996 2015-10-26  Ed Schonberg  <schonberg@adacore.com>
1998         * sem_util.adb (Inherit_Rep_Item_Chain): Another another guard
1999         to prevent circularities in the rep_item_chain of the full view
2000         of a type extension in a child unit that extends a private type
2001         from the parent.
2003 2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>
2005         * atree.ads, atree.adb (Ekind_In): New 10 and 11 parameter versions.
2006         * contracts.ads, contracts.adb (Analyze_Initial_Declaration_Contract):
2007         New routine.
2008         * sem_ch6.adb (Analyze_Generic_Subprogram_Body):
2009         Analyze the contract of the initial declaration.
2010         (Analyze_Subprogram_Body_Helper): Analyze the contract of the
2011         initial declaration.
2012         * sem_ch7.adb (Analyze_Package_Body_Helper): Analyze the contract
2013         of the initial declaration.
2014         * sem_ch9.adb (Analyze_Entry_Body): Analyze the contract of
2015         the initial declaration.
2016         (Analyze_Protected_Body): Analyze
2017         the contract of the initial declaration.
2018         (Analyze_Task_Body): Analyze the contract of the initial declaration.
2019         * sem_prag.adb (Add_Entity_To_Name_Buffer): Use "type" rather
2020         than "unit" as it makes the error messages sound better.
2021         (Add_Item_To_Name_Buffer): Update comment on usage. The routine
2022         now supports discriminants and current instances of concurrent
2023         types.
2024         (Analyze_Depends_In_Decl_Part): Install the discriminants
2025         of a task type.
2026         (Analyze_Global_In_Decl_Part): Install the discriminants of a task type.
2027         (Analyze_Global_Item): Add processing for current instances of
2028         concurrent types and include discriminants as valid global items.
2029         (Analyze_Input_Output): Discriminants and current instances of
2030         concurrent types are now valid items. Update various error messages.
2031         (Check_Usage): Current instances of protected and task types behaves
2032         as formal parameters.
2033         (Collect_Subprogram_Inputs_Outputs): There is
2034         no longer need to manually analyze [Refined_]Global thanks to
2035         freezing of initial declaration contracts.  Add processing for
2036         the current instance of a concurrent type.
2037         (Find_Role): Add categorizations for discriminants, protected and task
2038         types.
2039         (Is_CCT_Instance): New routine.
2040         (Match_Items): Update the comment on usage. Update internal comments.
2041         * sem_prag.ads (Collect_Subprogram_Inputs_Outputs): Update the
2042         comment on usage.
2043         * sem_util.adb (Entity_Of): Ensure that the entity is an object
2044         when traversing a potential renaming chain.
2045         (Fix_Msg): Use "type" rather than "unit" as it makes the error messages
2046         sound better.
2047         * sem_util.ads (Fix_Msg): Update the comment on usage.
2049 2015-10-26  Arnaud Charlet  <charlet@adacore.com>
2051         * par.adb (Par): Do not generate an error when generating
2052         SCIL for predefined units or new children of system and co.
2054 2015-10-26  Ed Schonberg  <schonberg@adacore.com>
2056         * einfo.adb: Access_Disp_Table applies to a private
2057         extension.
2059 2015-10-26  Ed Schonberg  <schonberg@adacore.com>
2061         * sem_res.adb (Resolve_Generalized_Indexing): In ASIS mode, when
2062         restoring original node, remove Generalized_Indexing operation
2063         so that it is recreated during re- analysis.
2065 2015-10-26  Javier Miranda  <miranda@adacore.com>
2067         * exp_unst.adb: (Unnest_Subprogram):
2068         Replace absolute references to 1 and 0 by their counterpart
2069         relative references through Subps_First.
2071 2015-10-26  Ed Schonberg  <schonberg@adacore.com>
2073         * par-ch3.adb (P_Declarative_Items): In case of misplaced
2074         aspect specifications, ensure that flag Done is properly set to
2075         continue parse.
2076         * sem_prag.adb, sem_prag.ads: Remove Build_Generic_Class_Condition,
2077         unused.
2079 2015-10-26  Emmanuel Briot  <briot@adacore.com>
2081         * s-os_lib.adb (Argument_String_To_List): Remove backslashes in
2082         argument value.
2084 2015-10-26  Javier Miranda  <miranda@adacore.com>
2086         * exp_unst.ads, exp_unst.adb (Is_Uplevel_Referenced): Removed.
2088 2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>
2090         * exp_util.adb, sem_aux.adb, exp_attr.adb, sem_eval.adb: Minor
2091         reformatting.
2092         * sem_util.adb, sem_ch5.adb: Minor reformatting.
2094 2015-10-26  Ed Schonberg  <schonberg@adacore.com>
2096         * exp_unst.adb (Unnest_Subprogram): Add guard to prevent compiler
2097         abort when handling a reference to a formal in an aspect of a
2098         nested subprogram declaration as an uplevel reference.
2100 2015-10-26  Bob Duff  <duff@adacore.com>
2102         * snames.ads-tmpl, aspects.adb, aspects.ads: Add the aspect and
2103         pragma names and enter into relevant tables.
2104         * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze aspect
2105         Predicate_Failure.
2106         * sem_prag.adb (Predicate_Failure): Analyze pragma Predicate_Failure.
2107         * exp_util.adb (Make_Predicate_Check): When building the Check
2108         pragma, if Predicate_Failure has been specified, add the relevant
2109         String argument to the pragma.
2110         * par-prag.adb (Prag): Add Predicate_Failure to list of pragmas
2111         handled during semantic analysis.
2113 2015-10-26  Ed Schonberg  <schonberg@adacore.com>
2115         * sem_ch5.adb (Analyze_Assignment): If the left-hand side
2116         is an indexed component with generalized indexing, discard
2117         interpretation that yields a reference type, which is not
2118         assignable. This prevent spurious ambiguities when the right-hand
2119         side is an aggregate which does not provide a target type.
2121 2015-10-26  Bob Duff  <duff@adacore.com>
2123         * exp_ch7.adb, exp_ch6.adb: Minor comment fix.
2125 2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>
2127         * aspects.adb (Move_Or_Merge_Aspects): Move all aspects related
2128         to a single concurrent type declaration to the declaration
2129         of the anonymous object if they qualify.
2130         (Relocate_Aspect): Update comment on usage.
2131         * aspects.ads Add new sectioon on aspect specifications on single
2132         concurrent types. Add new table Aspect_On_Anonymous_Object_OK.
2133         (Move_Or_Merge_Aspects): Udate the comment on usage.
2134         * atree.adb (Elist36): New routine.
2135         (Set_Elist36): New routine.
2136         * atree.ads (Elist36): New routine along with pragma Inline.
2137         (Set_Elist36): New routine along with pragma Inline.
2138         * atree.h: Elist36 is now an alias for Field36.
2139         * contracts.adb (Add_Contract_Item): Add processing
2140         for protected units and extra processing for variables.
2141         (Analyze_Object_Contract): Code cleanup. The processing of
2142         Part_Of now depends on wherer the object is a constant or
2143         a variable. Add processing for pragmas Depends and Global
2144         when they apply to a single concurrent object. Verify that a
2145         variable which is part of a single concurrent type has full
2146         default initialization. Set/restore the SPARK_Mode of a single
2147         concurrent object.
2148         (Analyze_Protected_Contract): New routine.
2149         * contracts.ads (Add_Contract_Item): Update the comment on usage.
2150         (Analyze_Object_Contract): Update the comment on usage.
2151         (Analyze_Protected_Contract): New routine.
2152         (Analyze_Task_Contract): Update the comment on usage.
2153         * einfo.adb Part_Of_Constituents now uses Elist10.
2154         (Anonymous_Object): New routine.
2155         (Contract): Code cleanup.
2156         (Has_Option): Remove the assumption that the only simple
2157         option is External.
2158         (Is_Synchronized_State): New routine.
2159         (Part_Of_Constituents): This attribute applies to
2160         variables and uses Elist10.
2161         (Set_Anonymous_Object): New routine.
2162         (Set_Contract): Code cleanup.
2163         (Set_Part_Of_Constituents): This attribute applies to variables and
2164         uses Elist10.
2165         (Set_SPARK_Aux_Pragma): Code cleanup.
2166         (Set_SPARK_Aux_Pragma_Inherited): Code cleanup.
2167         (Set_SPARK_Pragma): Code cleanup. This attribute applies to
2168         variables.
2169         (Set_SPARK_Pragma_Inherited): Code cleanup. This
2170         attribute applies to variables.
2171         (SPARK_Aux_Pragma): Code cleanup.
2172         (SPARK_Aux_Pragma_Inherited): Code cleanup.
2173         (SPARK_Pragma): Code cleanup. This attribute applies to variables.
2174         (SPARK_Pragma_Inherited): Code cleanup. This attribute applies
2175         to variables.
2176         (Write_Field9_Name): Remove the output for Part_Of_Constituents.
2177         (Write_Field10_Name): Add output for Part_Of_Constituents.
2178         (Write_Field30_Name): Add output for Anonymous_Object.
2179         (Write_Field34_Name): Output SPARK_Pragma
2180         for protected types and variables.
2181         * einfo.ads: New attributes Anonymous_Object and
2182         Is_Synchronized_State along with usage in entities. Update
2183         the documentation of attributes Contract Encapsulating_State
2184         Part_Of_Constituents SPARK_Aux_Pragma SPARK_Aux_Pragma_Inherited
2185         SPARK_Pragma SPARK_Pragma_Inherited (Anonymous_Object): New
2186         routine along with pragma Inline.
2187         (Is_Synchronized_State): New routine.
2188         (Set_Anonymous_Object): New routine along with pragma Inline.
2189         * freeze.adb (Freeze_Record_Type): Ensure that a non-synchronized
2190         record does not have synchronized components.
2191         * sem_ch3.adb (Analyze_Declarations): Code cleanup. Analyze the
2192         contract of protected units.
2193         * sem_ch9.adb Add with and use clauses for Sem_Prag. Code cleanup.
2194         (Analyze_Single_Protected_Declaration): Reimplemented.
2195         (Analyze_Single_Task_Declaration): Reimplemented.
2196         * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect Part_Of
2197         can now apply to a single concurrent type declaration. Rely on
2198         Insert_Pragma to place the pragma.  Update the error message on
2199         usage to reflect the new context.
2200         (Insert_Pragma): When inserting
2201         pragmas for a protected or task type, create a definition if
2202         the type lacks one.
2203         * sem_elab.adb (Check_A_Call): Code cleanup. Issue error message
2204         related to elaboration issues for SPARK when SPARK_Mode is "on"
2205         and the offending entity comes from source.
2206         * sem_prag.adb (Analyze_Abstract_State): Add new flag
2207         Synchronous_Seen. Update the analysis of simple options Externa,
2208         Ghost and Synchronous. Update various error messages to reflect
2209         the use of single concurrent types.
2210         (Analyze_Depends_Global): Pragmas Depends and Global can now apply to
2211         a single task type or a single concurrent object created for a task
2212         type.
2213         (Analyze_Depends_In_Decl_Part): Do not push a scope when the
2214         context is a single concurrent object.  (Analyze_Part_Of):
2215         Moved out of Analyze_Pragma. The routine has a new profile
2216         and comment on usage.
2217         (Analyze_Part_Of_In_Decl_Part): New routine.
2218         (Analyze_Part_Of_Option): Update the call to Analyze_Part_Of.
2219         (Analyze_Pragma): Pragma Abstract_State can
2220         now carry simple option Synchronous. Pragma Part_Of can now
2221         apply to a single concurrent type declaration. The analysis
2222         of pragma Part_Of is delayed when the context is a single
2223         concurrent object.
2224         (Analyze_Refined_Depends_In_Decl_Part): Use the anonymous object when
2225         the context is a single concurren type.
2226         (Analyze_Refined_Global_In_Decl_Part): Use the
2227         anonymous object when the context is a single concurren type.
2228         (Check_Ghost_Constituent): Removed.
2229         (Check_Matching_Constituent): Renamed to Match_Constituent.
2230         (Check_Matching_State): Renamed to Match_State.
2231         (Collect_Constituent): Update the comment
2232         on usage. Verify various legality rules related to ghost and
2233         synchronized entities.
2234         (Find_Related_Declaration_Or_Body): A single task declaration is no
2235         longer a valid context for a pragma.
2236         (Fix_Msg): Moved to Sem_Util.
2237         (Process_Overloadable): Add processing for single task objects.
2238         (Process_Visible_Part): Add processing for single concurrent
2239         types.
2240         (Relocate_Pragmas_To_Anonymous_Object): New routine.
2241         * sem_prag.ads Add new table Pragma_On_Anonymous_Object_OK.
2242         (Analyze_Part_Of_In_Decl_Part): New routine.
2243         (Relocate_Pragmas_To_Anonymous_Object): New routine.
2244         * sem_util.adb (Defining_Entity): Code cleanup.
2245         (Fix_Msg): Moved from Sem_Prag and augmented to handle
2246         mode replacements.
2247         (Has_Full_Default_Initialization): New routine.
2248         (Is_Descendant_Of_Suspension_Object): Moved out of
2249         Is_Effectively_Volatile.
2250         (Is_Single_Concurrent_Object): New routine.
2251         (Is_Single_Concurrent_Type): New routine.
2252         (Is_Single_Concurrent_Type_Declaration): New routine.
2253         (Is_Synchronized_Object): New routine.
2254         (Yields_Synchronized_Object): New routine.
2255         * sem_util.ads (Fix_Msg): Moved form Sem_Prag. Update the
2256         comment on usage.
2257         (Has_Full_Default_Initialization): New routine.
2258         (Is_Single_Concurrent_Object): New routine.
2259         (Is_Single_Concurrent_Type): New routine.
2260         (Is_Single_Concurrent_Type_Declaration): New routine.
2261         (Is_Synchronized_Object): New routine.
2262         (Yields_Synchronized_Object): New routine.
2263         * snames.ads-tmpl: Add name Synchronous.
2265 2015-10-26  Jerome Lambourg  <lambourg@adacore.com>
2267         * sysdep.c (__gnat_get_task_options): Refine the workaround for
2268         the VX_USR_TASK_OPTION bug in VxWorks 7, as we cannot check the
2269         value of VX_DEALLOC_TCB in RTP mode, the macro value not being
2270         defined in the headers.
2271         * g-arrspl.ads: Fix typo.
2273 2015-10-26  Jerome Lambourg  <lambourg@adacore.com>
2275         * sysdep.c (__gnat_get_task_options): Workaround a VxWorks
2276         bug where VX_DEALLOC_TCB task option is forbidden when calling
2277         taskCreate but allowed in VX_USR_TASK_OPTIONS.
2279 2015-10-26  Javier Miranda  <miranda@adacore.com>
2281         * exp_unst.ads, exp_unst.adb (Is_Uplevel_Referenced): New subprogram.
2283 2015-10-26  Ed Schonberg  <schonberg@adacore.com>
2285         * sem_ch4.adb (Constant_Indexing_OK): New predicate, subsidiary
2286         of Try_Container_Indexing, that implements the name resolution
2287         rules given in RM 4.1.6 (13-15).
2289 2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>
2291         * sem_ch3.adb, sem_util.adb: Minor reformatting.
2293 2015-10-26  Javier Miranda  <miranda@adacore.com>
2295         * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Return False when
2296         generating C code.
2297         * sem_ch3.adb: Fix typos.
2299 2015-10-26  Bob Duff  <duff@adacore.com>
2301         * sem_ch13.adb (Build_Predicate_Functions): Change the
2302         structure of the predicate functions to reflect the requirements
2303         of AI12-0071.
2304         (Add_Condition): New procedure to do the "and-then-ing" in Add_Call
2305         and Add_Predicates.
2306         * einfo.ads (Static_Real_Or_String_Predicate): Change the
2307         documentation to reflect the new structure.
2308         * sem_eval.adb (Real_Or_String_Static_Predicate_Matches):
2309         Change the walking of the predicate expression to reflect the
2310         new structure.
2311         * exp_util.adb: Minor comment fix.
2313 2015-10-26  Bob Duff  <duff@adacore.com>
2315         * s-rident.ads (No_Dynamic_Sized_Objects): New restriction name.
2316         * sem_util.ads, sem_util.adb (All_Composite_Constraints_Static):
2317         New function to check that all relevant constraints are static.
2318         * sem_aggr.adb (Resolve_Array_Aggregate): Call
2319         All_Composite_Constraints_Static on the bounds of named array
2320         aggregates.
2321         * sem_ch3.adb (Analyze_Subtype_Declaration): Call
2322         All_Composite_Constraints_Static if the type is composite and
2323         the subtype is constrained.
2325 2015-10-26  Javier Miranda  <miranda@adacore.com>
2327         * exp_ch6.adb (Expand_N_Subprogram_Declaration): Skip the frontend
2328         transformation of functions that return a constrained array into
2329         a procedure when they are unchecked_conversion instances.
2331 2015-10-26  Gary Dismukes  <dismukes@adacore.com>
2333         * s-os_lib.ads: Minor reformatting/rewording.
2335 2015-10-26  Arnaud Charlet  <charlet@adacore.com>
2337         * debug.adb: Introduce debug flag -gnatd.5.
2339 2015-10-26  Pascal Obry  <obry@adacore.com>
2341         * s-os_lib.ads, s-os_lib.adb (Kill): New routine. This routine
2342         makes visible support for killing processes in expect.c.
2343         * expect.c (__gnat_kill): Removed from here.
2344         * adaint.c (__gnat_kill): Added here to be usable in the compiler
2345         (System.OS_Lib).
2346         * make.adb (Sigint_Intercepted): Use the Kill routine from
2347         System.OS_Lib.
2349 2015-10-26  Arnaud Charlet  <charlet@adacore.com>
2351         * einfo.ads, einfo.adb, exp_unst.adb (Needs_Typedef,
2352         Set_Needs_Typedef): Removed, no longer used.
2354 2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>
2356         * einfo.adb (First_Component): Update the assertion to allow
2357         for concurrent types.
2358         (First_Component_Or_Discriminant): Update the assertion to allow for
2359         concurrent types.
2360         * einfo.ads: Update the documentation of attributes First_Component
2361         and First_Component_Or_Discriminant along with uses in entities.
2363 2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>
2365         * sem_res.adb (Resolve_Actuals): An effectively
2366         volatile object may act as an actual when the corresponding
2367         formal is of a non-scalar effectively volatile type, not just
2368         a non-scalar volatile type.
2370 2015-10-26  Bob Duff  <duff@adacore.com>
2372         * sinfo.ads, sem_util.ads: Update comments.
2374 2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>
2376         * sem_prag.adb (Analyze_Refined_Depends_Global_Post): When dealing with
2377         protected entries or protected subprograms, use the enclosing protected
2378         type to ensure that the protected type declaration is declared
2379         in a package spec. Remove an obsolete attempt to ensure the
2380         aggregate for of pragma Refined_State as this routine is never
2381         called in that case.
2383 2015-10-26  Ed Schonberg  <schonberg@adacore.com>
2385         * exp_ch5.adb (Expand_Iterator_Loop_Over_Container): For
2386         an element iterator loop, the element is a constant if the
2387         container object is a constant, even if the container type has
2388         a Variable_Indexing aspect.
2390 2015-10-26  Bob Duff  <duff@adacore.com>
2392         * s-fileio.adb (Fopen_Mode): Use "r+" for Out_File/Stream_IO,
2393         so the file won't be truncated on 'fopen', as required by
2394         AI95-00283-1.
2396 2015-10-26  Bob Duff  <duff@adacore.com>
2398         * gnat1drv.adb, prj.adb, sem_ch6.adb, s-regpat.adb,
2399         sem_prag.adb: Fix typos.
2400         * einfo.ads, restrict.ads: Minor comment fixes.
2401         * err_vars.ads, sem_util.adb, errout.ads: Code clean up.
2403 2015-10-26  Ed Schonberg  <schonberg@adacore.com>
2405         * sem_ch5.adb (Analyze_Assignment): Do not check that the
2406         Left-hand side is legal in an inlined body, check is done on
2407         the original template.
2409 2015-10-26  Ed Schonberg  <schonberg@adacore.com>
2411         * exp_util.ads, exp_util.adb (Find_Primitive_Operations): New
2412         subprogram to retrieve by name the possibly overloaded set of
2413         primitive operations of a type.
2414         * sem_ch4.adb (Try_Container_Indexing): Use
2415         Find_Primitive_Operations to handle overloaded indexing operations
2416         of a derived type.
2418 2015-10-26  Arnaud Charlet  <charlet@adacore.com>
2420         * osint-c.ads: Minor comment update.
2422 2015-10-26  Arnaud Charlet  <charlet@adacore.com>
2424         * s-osinte-hpux.ads, s-osinte-aix.ads, s-osinte-solaris-posix.ads,
2425         s-osinte-darwin.ads, s-osinte-android.ads, s-osinte-freebsd.ads,
2426         s-taprop-posix.adb (Get_Page_Size): C function returns an int. Adjust
2427         callers accordingly.
2429 2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>
2431         * exp_ch4.adb (Is_OK_Object_Reference): New routine.
2432         (Substitute_Valid_Check): Perform the 'Valid subsitution but do
2433         not suggest the use of the attribute if the left hand operand
2434         does not denote an object as it leads to illegal code.
2436 2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>
2438         * exp_unst.adb: Minor reformatting.
2440 2015-10-26  Ed Schonberg  <schonberg@adacore.com>
2442         * sem_ch6.adb: Improve error msg.
2444 2015-10-26  Ed Schonberg  <schonberg@adacore.com>
2446         * sem_disp.adb (Check_Controlling_Type): Handle properly the
2447         case of an incomplete type whose full view is tagged, when a
2448         primitive operation of the type is declared between the two views.
2450 2015-10-26  Bob Duff  <duff@adacore.com>
2452         * adaint.c (__gnat_locate_exec_on_path): If the PATH environment
2453         variable is not set, do not return NULL, because we can still find
2454         the executable if it includes a directory name.
2456 2015-10-26  Ed Schonberg  <schonberg@adacore.com>
2458         * sem_elab.adb (Elab_Warning): Under dynamic elaboration, when
2459         elaboration warnings are enabled, emit proper warning header
2460         when triggered by an access attribute.
2462 2015-10-26  Steve Baird  <baird@adacore.com>
2464         * exp_ch11.adb: If CodePeer_Mode is true, generate simplified
2465         SCIL for exception declarations.
2466         * exp_ch11.adb (Expand_N_Exception_Declaration) If CodePeer_Mode
2467         is True, initialize the Full_Name component of the exception
2468         record to null instead of to the result of an unchecked
2469         conversion.
2471 2015-10-26  Ed Schonberg  <schonberg@adacore.com>
2473         * exp_unst.adb (Note_Uplevel_Ref) : Handle properly a reference
2474         that denotes a function returning a constrained array, that has
2475         been rewritten as a procedure.
2476         * makeutl.ads: Minor edit.
2478 2015-10-26  Yannick Moy  <moy@adacore.com>
2480         * lib-xref-spark_specific.adb (Traverse_Protected_Declaration): New
2481         procedure for traversal.
2482         (Add_SPARK_Xrefs): Remove debugging code.
2483         (Traverse_Declaration_Or_Statement): Call the new traversal
2484         procedure.
2486 2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>
2488         * sem_prag.adb (Analyze_Pragma): Pragma
2489         Extensions_Visible can now appear on an abstract subprogram
2490         declaration.
2492 2015-10-26  Yannick Moy  <moy@adacore.com>
2494         * lib-xref-spark_specific.adb (Add_SPARK_Xrefs): Use character 'r' to
2495         denote a reference to a constant which may have variable input, and
2496         thus may be treated as a variable in GNATprove, instead of the
2497         character 'c' used for constants.
2499 2015-10-26  Ed Schonberg  <schonberg@adacore.com>
2501         * sem_util.adb (Object_Access_Level): Only aliased formals of
2502         functions have the accessibility level of the point of call;
2503         aliased formals of procedures have the same level as unaliased
2504         formals.
2505         (New_Copy_Tree): Add guard on copying itypes. From code reading.
2507 2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>
2509         * inline.adb: Minor reformatting.
2511 2015-10-26  Yannick Moy  <moy@adacore.com>
2513         * get_spark_xrefs.adb (get_SPARK_Xrefs): Remove obsolete
2514         assertion.
2515         * lib-xref-spark_specific.adb (Traverse_Declaration_Or_Statement):
2516         New procedure to factor duplicated code and add
2517         treatment of protected entries.
2518         (Add_SPARK_Scope, Traverse_Declarations_Or_Statements): Call the new
2519         procedure Traverse_Declaration_Or_Statement. Use same character used in
2520         normal xrefs for SPARK xrefs, for a given entity used as scope.
2521         * spark_xrefs.ads Document character used for entries.
2522         * sem_prag.adb (Check_Loop_Pragma_Placement): Account for possible
2523         introduction of declarations and statements by the expansion, between
2524         two otherwise consecutive loop pragmas.
2525         * sem_util.ads, sem_util.adb (Is_Suspension_Object): Lifted from nested
2526         function.
2527         (Is_Descendant_Of_Suspension_Object): nested function lifted.
2529 2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>
2531         * sem_attr.adb (Eval_Attribute): Attribute 'Enum_Rep can be folded
2532         when its prefix denotes a constant, an enumeration literal or
2533         an enumeration type. Use the expression of the attribute in the
2534         enumeration type form, otherwise use the prefix to fold.
2536 2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>
2538         * aspects.adb Add an entry for entry bodies in table
2539         Has_Aspect_Specifications_Flag.
2540         (Aspects_On_Body_Or_Stub_OK): Entry bodies now allow for certain
2541         aspects.
2542         * contracts.adb (Add_Contract_Items): Code cleanup. Add
2543         processing for entry bodies, entry declarations and task units.
2544         (Analyze_Subprogram_Body_Contract): Renamed
2545         to Analyze_Entry_Or_Subprogram_Body_Contract. Do not
2546         analyze the contract of an entry body unless annotating the
2547         original tree.
2548         (Analyze_Subprogram_Contract): Renamed to
2549         Analyze_Entry_Or_Subprogram_Contract.  Do not analyze the contract
2550         of an entry declaration unless annotating the original tree.
2551         (Analyze_Task_Contract): New routine.
2552         * contracts.ads (Add_Contract_Item): Update the comment on usage.
2553         (Analyze_Package_Body_Contract): Update comment on usage.
2554         (Analyze_Package_Contract): Update the comment on usage.
2555         (Analyze_Subprogram_Body_Contract): Renamed to
2556         Analyze_Entry_Or_Subprogram_Body_Contract.
2557         (Analyze_Subprogram_Body_Stub_Contract): Update the comment on usage.
2558         (Analyze_Subprogram_Contract): Renamed to
2559         Analyze_Entry_Or_Subprogram_Contract.
2560         (Analyze_Task_Contract): New routine.
2561         * einfo.adb (Contract): Restructure the assertion to include
2562         entries and task units.
2563         (SPARK_Pragma): This attribute now applies to operators.
2564         (SPARK_Pragma_Inherited): This flag now applies to operators.
2565         (Set_Contract): Restructure the assertion to include entries and task
2566         units.
2567         (Set_SPARK_Pragma): This attribute now applies to operators.
2568         (Set_SPARK_Pragma_Inherited): This flag now applies to operators.
2569         (Write_Field34_Name): Write out all Ekinds that have a contract.
2570         (Write_Field40_Name): SPARK_Pragma now applies to operators.
2571         * einfo.ads: Update the documentation of attribute Contract along
2572         with usage in nodes.  Update the documentation of attributes
2573         SPARK_Pragma and SPARK_Pragma_Inherited.
2574         * exp_ch6.adb (Freeze_Subprogram): Update the call to
2575         Analyze_Subprogram_Contract.
2576         * par-ch9.adb (P_Entry_Barrier): Do not parse keyword "is" as it
2577         is not part of the entry barrier production.
2578         (P_Entry_Body): Parse the optional aspect specifications. Diagnose
2579         misplaced aspects.
2580         * sem_attr.adb (Analyze_Attribute_Old_Result): Update the call
2581         to Find_Related_Subprogram_Or_Body.
2582         * sem_aux.adb (Unit_Declaration_Node) Add an entry for entry
2583         declarations and bodies.
2584         * sem_ch3.adb (Analyze_Declarations): Analyze the contracts of
2585         entry declarations, entry bodies and task units.
2586         * sem_ch6.adb (Analyze_Generic_Subprogram_Body):
2587         Update the call to Analyze_Subprogram_Body_Contract.
2588         (Analyze_Subprogram_Body_Helper): Update the call to
2589         Analyze_Subprogram_Body_Contract.
2590         * sem_ch9.adb (Analyze_Entry_Body): Analyze the aspect
2591         specifications and the contract.
2592         * sem_ch10.adb (Analyze_Compilation_Unit): Update the call to
2593         Analyze_Subprogram_Contract.
2594         * sem_ch12.adb (Save_References_In_Pragma): Update the call to
2595         Find_Related_Subprogram_Or_Body.
2596         * sem_ch13.adb (Analyze_Aspects_On_Body_Or_Stub): Use
2597         Unique_Defining_Entity rather than rummaging around in nodes.
2598         (Diagnose_Misplaced_Aspects): Update comment on usage. Update the
2599         error messages to accomondate the increasing number of contexts.
2600         * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
2601         Update the call to Find_Related_Subprogram_Or_Body.
2602         (Analyze_Depends_Global): Update the call to
2603         Find_Related_Subprogram_Or_Body. Add processing for entry
2604         declarations.
2605         (Analyze_Depends_In_Decl_Part): Update the call
2606         to Find_Related_Subprogram_Or_Body. Task units have no formal
2607         parameters to install.  (Analyze_Global_In_Decl_Part): Update
2608         the call to Find_Related_Subprogram_Or_Body. Task units have no
2609         formal parameters to install.
2610         (Analyze_Global_Item): Use Fix_Msg to handle the increasing number of
2611         contexts.
2612         (Analyze_Pragma): Update the call to Find_Related_Subprogram_Or_Body.
2613         Perform full analysis when various pragmas appear in an entry body.
2614         (Analyze_Pre_Post_Condition): Update the call to
2615         Find_Related_Subprogram_Or_Body. Perform full analysis when the pragma
2616         appears in an entry body.
2617         (Analyze_Pre_Post_Condition_In_Decl_Part): Update the call to
2618         Find_Related_Subprogram_Or_Body.
2619         (Analyze_Refined_Depends_Global_Post): Update
2620         the call to Find_Related_Subprogram_Or_Body. Use
2621         Fix_Msg to handle the increasing number of contexts.
2622         (Analyze_Refined_Depends_In_Decl_Part): Update
2623         the call to Find_Related_Subprogram_Or_Body. Use
2624         Unique_Defining_Entity to obtain the entity of the
2625         spec. Use Fix_Msg to handle the increasing number of contexts.
2626         (Analyze_Refined_Global_In_Decl_Part): Update the call to
2627         Find_Related_Subprogram_Or_Body. Use Unique_Defining_Entity to obtain
2628         the entity of the spec. Use Fix_Msg to handle the increasing number of
2629         contexts.
2630         (Analyze_Test_Case_In_Decl_Part): Update the call to
2631         Find_Related_Subprogram_Or_Body.
2632         (Check_Dependency_Clause): Use Fix_Msg to handle the increasing number
2633         of contexts.
2634         (Check_Mode_Restriction_In_Enclosing_Context): Use
2635         Fix_Msg to handle the increasing number of contexts.
2636         (Collect_Subprogram_Inputs_Outputs): Use the refined
2637         versions of the pragmas when the context is an entry body or
2638         a task body.
2639         (Find_Related_Subprogram_Or_Body): Renamed to
2640         Find_Related_Declaration_Or_Body.  Add processing for entries
2641         and task units.
2642         (Fix_Msg): New routine.
2643         (Role_Error): Use Fix_Msg to handle the increasing number of contexts.
2644         * sem_prag.ads (Find_Related_Subprogram_Or_Body): Renamed to
2645         Find_Related_Declaration_Or_Body.  Update the comment on usage.
2646         * sem_util.adb (Is_Entry_Body): New routine.
2647         (Is_Entry_Declaration): New routine.
2648         * sem_util.ads (Is_Entry_Body): New routine.
2649         (Is_Entry_Declaration): New routine.
2651 2015-10-26  Ed Schonberg  <schonberg@adacore.com>
2653         * inline.adb (Has_Excluded_Declaration): A subtype declaration
2654         with a predicate aspect generates a subprogram, and therefore
2655         prevents the inlining of the enclosing subprogram.
2656         * osint.ads: Fix typo.
2659 2015-10-26  Ed Schonberg  <schonberg@adacore.com>
2661         * sem_case.adb (Check_Choice_Set): Choose initial choice range
2662         below low bound of type, to prevent spurious errors on case
2663         statements whose expressions have an integer subtype with a
2664         static predicate.
2665         * sem_util.ads: Fix typo.
2667 2015-10-26  Ed Schonberg  <schonberg@adacore.com>
2669         * exp_ch4.adb (Expand_N_Case_Expression): In the scope of a
2670         predicate function, delay the expansion of the expression only
2671         if the target type has a specified Static_ Predicate aspect,
2672         because the expression is processed later. A dynamic predicate
2673         must be expanded in standard fashion.
2675 2015-10-26  Claire Dross  <dross@adacore.com>
2677         * a-nudira.ads: Remove SPARK_Mode as it currently causes an error.
2679 2015-10-26  Arnaud Charlet  <charlet@adacore.com>
2681         * sem_aggr.adb, sem_type.adb, sem_ch12.adb, sem_res.adb, sem_ch4.adb,
2682         sem_ch8.adb, exp_aggr.adb, sem_eval.adb, s-fatgen.adb, a-tienio.adb:
2683         Fix typos.
2685 2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>
2687         * sem_ch13.adb (Analyze_Aspect_Specifications): The processing
2688         for aspects Abstract_State, Ghost, Initial_Condition, Initializes
2689         and Refined_State no longer have to take SPARK_Mode into account.
2690         (Insert_After_SPARK_Mode): Removed.
2691         (Insert_Pragma): Update profile and comment on usage. The routine can
2692         now insert a pragma after the "header" of an instance.
2693         * sem_prag.adb (Analyze_If_Available): New routine.
2694         (Analyze_Pragma): Do not reset the Analyzed flag of various
2695         SPARK pragmas as they use the Is_Analyzed_Pragma attribute to
2696         avoid reanalysis. Various pragmas now trigger the analysis
2697         of related pragmas that depend on or are dependent on the
2698         current pragma. Remove the declaration order checks related
2699         to pragmas Abstract_State, Initial_Condition and Initializes.
2700         (Analyze_Pre_Post_Condition): Analyze pragmas SPARK_Mode and
2701         Volatile_Function prior to analyzing the pre/postcondition.
2702         (Check_Declaration_Order): Removed.
2703         (Check_Distinct_Name): Ensure that a potentially duplicated pragma
2704         Test_Case is not the pragma being analyzed.
2705         (Is_Followed_By_Pragma): Removed.
2707 2015-10-26  Ed Schonberg  <schonberg@adacore.com>
2709         * sem_ch6.adb: Handle subprogram bodies without previous specs.
2711 2015-10-26  Claire Dross  <dross@adacore.com>
2713         * a-nudira.ads: Specify appropriate SPARK_Mode so that the unit
2714         can be used in SPARK code.
2716 2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>
2718         * contracts.adb (Analyze_Subprogram_Body_Contract): Do not analyze
2719         pragmas Refined_Global and Refined_Depends because these pragmas
2720         are now fully analyzed when encountered.
2721         (Inherit_Pragma): Update the call to attribute Is_Inherited.
2722         * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Add a guard
2723         to prevent reanalysis. Mark the pragma as analyzed at the end of
2724         the processing.
2725         (Analyze_Depends_Global): New parameter profile
2726         and comment on usage. Do not fully analyze the pragma, this is
2727         now done at the outer level.
2728         (Analyze_Depends_In_Decl_Part): Add a guard to prevent reanalysis.
2729         Mark the pragma as analyzed at the end of the processing.
2730         (Analyze_External_Property_In_Decl_Part): Add a guard to prevent
2731         reanalysis.  Mark the pragma as analyzed at the end of the processing.
2732         (Analyze_Global_In_Decl_Part): Add a guard to prevent reanalysis. Mark
2733         the pragma as analyzed at the end of the processing.
2734         (Analyze_Initial_Condition_In_Decl_Part): Add a guard to prevent
2735         reanalysis.  Mark the pragma as analyzed at the end of the processing.
2736         (Analyze_Initializes_In_Decl_Part): Add a guard to prevent reanalysis.
2737         Mark the pragma as analyzed at the end of the processing.
2738         (Analyze_Pragma): Reset the Analyzed flag on various pragmas that
2739         require delayed full analysis. Contract_Cases is now analyzed
2740         immediately when it applies to a subprogram body stub. Pragmas Depends,
2741         Global, Refined_Depends and Refined_Global are now analyzed
2742         in pairs when they appear in a subprogram body [stub].
2743         (Analyze_Pre_Post_Condition_In_Decl_Part): Add a guard to
2744         prevent reanalysis.  Mark the pragma as analyzed at the end of
2745         the processing.
2746         (Analyze_Refined_Depends_Global_Post): Update the comment on usage.
2747         (Analyze_Refined_Depends_In_Decl_Part): Add a guard to prevent
2748         reanalysis. Mark the pragma as analyzed at the end of the processing.
2749         (Analyze_Refined_Global_In_Decl_Part): Add a guard to prevent
2750         reanalysis. Mark the pragma as analyzed at the end of the processing.
2751         (Analyze_Refined_State_In_Decl_Part): Add a guard to prevent
2752         reanalysis. Mark the pragma as analyzed at the end of the processing.
2753         (Analyze_Test_Case_In_Decl_Part): Add a guard to prevent reanalysis.
2754         Mark the pragma as analyzed at the end of the processing.
2755         (Is_Followed_By_Pragma): New routine.
2756         * sinfo.adb (Is_Analyzed_Pragma): New routine.
2757         (Is_Inherited): Renamed to Is_Inherited_Pragma.
2758         (Set_Is_Analyzed_Pragma): New routine.
2759         (Set_Is_Inherited): Renamed to Set_Is_Inherited_Pragma.
2760         * sinfo.ads Rename attribute Is_Inherited to Is_Inherited_Pragma
2761         and update occurrences in nodes.
2762         (Is_Analyzed_Pragma): New routine along with pragma Inline.
2763         (Is_Inherited): Renamed to Is_Inherited_Pragma along with pragma Inline.
2764         (Set_Is_Analyzed_Pragma): New routine along with pragma Inline.
2765         (Set_Is_Inherited): Renamed to Set_Is_Inherited_Pragma along
2766         with pragma Inline.
2768 2015-10-26  Ed Schonberg  <schonberg@adacore.com>
2770         * par-ch3.adb (P_Component_Items): When style checks are enabled,
2771         apply them to component declarations in a record type declaration
2772         or extension.
2774 2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>
2776         * sem_util.adb (Is_Suspension_Object): Ensure that the scope of "Ada"
2777         is Standard_Standard.
2779 2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>
2781         * sem_res.adb (Is_OK_Volatile_Context): A subprogram call is an OK
2782         context for a reference to an effectively volatile object.
2783         (Resolve_Actuals): Add references to SPARK RM.
2784         (Within_Procedure_Call): Removed.
2785         (Within_Subprogram_Call): New routine.
2787 2015-10-26  Ed Schonberg  <schonberg@adacore.com>
2789         * sem_ch6.adb (Check_Aggregate_Accessibility): A reference to a
2790         formal parameter in an aggregate does not need an accesibility
2791         check only if the formal is aliased.
2793 2015-10-26  Claire Dross  <dross@adacore.com>
2795         * sem_aux.ads (Number_Components): Can return 0 when called on
2796         an empty record.
2798 2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>
2800         * contracts.adb (Analyze_Subprogram_Body_Contract): Use
2801         Unique_Defining_Entity instead of Corresponding_Spec_Of.
2802         * einfo.adb SPARK_Pragma and SPARK_Aux_Pragma are now Node40 and
2803         Node41 respectively.
2804         (SPARK_Aux_Pragma): Update the assertion and node querry.
2805         (SPARK_Aux_Pragma_Inherited): Update the assertion and node query.
2806         (SPARK_Pragma): Update the assertion and node query.
2807         (SPARK_Pragma_Inherited): Update the assertion and node query.
2808         (Set_SPARK_Aux_Pragma): Update the assertion and node setting.
2809         (Set_SPARK_Aux_Pragma_Inherited): Update the assertion and node setting.
2810         (Set_SPARK_Pragma): Update the assertion and node setting.
2811         (Set_SPARK_Pragma_Inherited): Update the assertion and node setting.
2812         (Write_Field32_Name): Remove the output for SPARK_Pragma.
2813         (Write_Field33_Name): Remove the output for SPARK_Aux_Pragma.
2814         (Write_Field40_Name): Add output for SPARK_Pragma.
2815         (Write_Field41_Name): Add output for SPARK_Aux_Pragma.
2816         * einfo.ads Rewrite the documentation on attributes
2817         SPARK_Pragma, SPARK_Aux_Pragma, SPARK_Pragma_Inherited and
2818         SPARK_Aux_Pragma_Inherited. Update their uses in nodes.
2819         * exp_ch4.adb (Create_Anonymous_Master): Use
2820         Unique_Defining_Entity instead of Corresponding_Spec_Of.
2821         * exp_ch9.adb (Expand_Entry_Declaration): Mark the barrier
2822         function as such.
2823         (Expand_N_Task_Body): Mark the task body as such.
2824         (Expand_N_Task_Type_Declaration): Mark the task body as such.
2825         * exp_unst.adb (Visit_Node): Use Unique_Defining_Entity instead
2826         of Corresponding_Spec_Of.
2827         * sem_attr.adb (Analyze_Attribute_Old_Result): Use
2828         Unique_Defining_Entity instead of Corresponding_Spec_Of.
2829         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Entry barrier
2830         functions do not inherit the SPARK_Mode from the context.
2831         (Build_Subprogram_Declaration): The matching spec is now marked
2832         as a source construct to mimic the original stand alone body.
2833         * sem_ch7.adb (Analyze_Package_Body_Helper): Code cleanup.
2834         * sem_ch9.adb Add with and use clauses for Contracts.
2835         (Analyze_Entry_Body): An entry body freezes the contract of
2836         the nearest enclosing package body. The entry body now inherits
2837         the SPARK_Mode from the context.
2838         (Analyze_Entry_Declaration): A protected entry declaration now inherits
2839         the SPARK_Mode from the context.
2840         (Analyze_Protected_Body): A protected body freezes
2841         the contract of the nearest enclosing package body. Set the
2842         Etype of a protected body as this is neede for proper aspect
2843         analysis. Protected bodies can now carry meaningful aspects and
2844         those are now analyzed.
2845         (Analyze_Protected_Type_Declaration): A protected type now inherits the
2846         SPARK_Mode from the context.
2847         (Analyze_Task_Body): A task body freezes the contract of the
2848         nearest enclosing package body. Set the Etype of a task body
2849         as this is needed for proper aspect analysis. A task body
2850         now inherits the SPARK_Mode from the context.  Task bodies
2851         can now carry meaningful aspects and those are now analyzed.
2852         (Analyze_Task_Type_Declaration): A task type declaration now
2853         inherits the SPARK_Mode of from the context.
2854         * sem_ch10.adb (Analyze_Protected_Body_Stub): Protected body
2855         stubs can now carry meaningful aspects.
2856         (Analyze_Task_Body_Stub): Task body stubs can now carry meaningful
2857         aspects.
2858         * sem_ch13.adb (Analyze_Aspect_Specifications): Aspects SPARK_Mode
2859         Warnings now use routine Insert_Pragma as means of insertion into
2860         the tree.
2861         (Insert_After_SPARK_Mode): Clean up documentation.
2862         (Insert_Pragma): Clean up documentation. The routine is now
2863         capable of operating on synchronized units.
2864         * sem_prag.adb (Add_Entity_To_Name_Buffer): New routine.
2865         (Analyze_Contract_Cases_In_Decl_Part): Use
2866         Unique_Defining_Entity instead of Corresponding_Spec_Of.
2867         (Analyze_Depends_Global): Use Unique_Defining_Entity instead
2868         of Corresponding_Spec_Of.
2869         (Analyze_Depends_In_Decl_Part): Use Unique_Defining_Entity instead of
2870         Corresponding_Spec_Of.
2871         (Analyze_Global_In_Decl_Part): Use Unique_Defining_Entity instead of
2872         Corresponding_Spec_Of.
2873         (Analyze_Pragma): Use Unique_Defining_Entity instead of
2874         Corresponding_Spec_Of.
2875         Update the detection of an illegal pragma Ghost when it applies
2876         to a task or protected unit. Reimplement the handling of
2877         pragma SPARK_Mode.
2878         (Analyze_Pre_Post_Condition_In_Decl_Part): Use Unique_Defining_Entity
2879         instead of Corresponding_Spec_Of.
2880         (Analyze_Test_Case_In_Decl_Part): Use Unique_Defining_Entity instead of
2881         Corresponding_Spec_Of.
2882         (Check_Library_Level_Entity): Update the comment on usage.
2883         Reimplemented to offer a more specialized errror context.
2884         (Check_Pragma_Conformance): Update profile and comment on usage.
2885         Handle error message output on single protected or task units.
2886         (Collect_Subprogram_Inputs_Outputs): Use Unique_Defining_Entity
2887         instead of Corresponding_Spec_Of.
2888         (Process_Body): New routine.
2889         (Process_Overloadable): New routine.
2890         (Process_Private_Part): New routine.
2891         (Process_Statement_Part): New routine.
2892         (Process_Visible_Part): New routine.
2893         (Set_SPARK_Context): New routine.
2894         (Set_SPARK_Flags): Removed.
2895         * sem_util.adb (Corresponding_Spec_Of): Removed.
2896         (Unique_Entity): Reimplemented to handle many more cases.
2897         * sem_util.ads (Corresponding_Spec_Of): Removed.
2898         (Unique_Defining_Entity): Update the comment on usage.
2899         * sinfo.ads (Is_Entry_Barrier_Function): Update the assertion.
2900         (Is_Task_Body_Procedure): New routine.
2901         (Set_Is_Entry_Barrier_Function): Update the assertion.
2902         (Set_Is_Task_Body_Procedure): New routine.
2903         * sinfo.adb Update the documentation of attribute
2904         Is_Entry_Barrier_Function along with use in nodes. Add new
2905         attribute Is_Task_Body_Procedure along with use in nodes.
2906         (Is_Task_Body_Procedure): New routine along with pragma Inline.
2907         (Set_Is_Task_Body_Procedure): New routine along with pragma Inline.
2909 2015-10-26  Gary Dismukes  <dismukes@adacore.com>
2911         * sem_ch13.adb: Minor reformatting.
2913 2015-10-26  Steve Baird  <baird@adacore.com>
2915         * exp_disp.adb: Omit most dispatch table initialization code
2916         if Generate_SCIL is true.
2918 2015-10-26  Arnaud Charlet  <charlet@adacore.com>
2920         * sinfo.ads, exp_ch3.adb: Revert previous change.
2921         (Build_Record_Init_Proc): Do not build an aggregate if
2922         Modify_Tree_For_C.
2924 2015-10-26  Ed Schonberg  <schonberg@adacore.com>
2926         * sem_ch6.adb (Find_Corresponding_Spec): Reject a subprogram
2927         body whose signature is type conformant with a previous expression
2928         function.
2930 2015-10-26  Bob Duff  <duff@adacore.com>
2932         * treepr.adb: Code clean up.
2934 2015-10-26  Eric Botcazou  <ebotcazou@adacore.com>
2936         * freeze.adb (Check_Component_Storage_Order): Skip a record
2937         component if it has Complex_Representation.
2938         (Freeze_Record_Type): If the type has Complex_Representation, skip the
2939         regular treatment of Scalar_Storage_Order attribute and instead issue
2940         a warning if it is present.
2942 2015-10-26  Bob Duff  <duff@adacore.com>
2944         * sem_ch13.adb (Check_Iterator_Functions): For a Default_Iterator
2945         aspect, make sure an implicitly declared interpretation is
2946         overridden by an explicit one.
2947         * sem_util.ads: Update comment.
2949 2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>
2951         * sem_ch7.adb, sem_ch6.adb (Analyze_Subprogram_Body_Helper): Only source
2952         bodies should "freeze" the contract of the nearest enclosing
2953         package body.
2955 2015-10-26  Joel Brobecker  <brobecker@adacore.com brobecker>
2957         * adaint.c (__gnat_lwp_self): Replace current implementation re-using
2958         the Linux one, which uses an __NR_gettid syscall rather than
2959         pthread_self.
2961 2015-10-26  Arnaud Charlet  <charlet@adacore.com>
2963         * sinfo.ads, exp_ch3.adb (Build_Array_Init_Proc,
2964         Build_Record_Init_Proc): Do not inline init procs when
2965         Modify_Tree_For_C is True.
2967 2015-10-26  Bob Duff  <duff@adacore.com>
2969         * errout.ads: Minor comment fix.
2970         * einfo.ads: Minor style fix.
2972 2015-10-26  Bob Duff  <duff@adacore.com>
2974         * sem_ch3.adb (Derive_Interface_Subprogram): Fix
2975         Is_Abstract_Subprogram, which might have been calculated
2976         incorrectly, because we're passing Ultimate_Alias (Subp) (and
2977         its dispatching type) to Derive_Subprogram, instead of the true
2978         parent subprogram and type.
2980 2015-10-26  Bob Duff  <duff@adacore.com>
2982         * sem_ch13.adb (Check_Iterator_Functions): When
2983         printing the "default iterator must be unique" error message,
2984         also print references to the places where the duplicates are
2985         declared. This makes the message clearer.
2987 2015-10-26  Ed Schonberg  <schonberg@adacore.com>
2989         * sem_ch12.adb (Analyze_Formal_Package_Declaration): Do not set
2990         Box_Present when the formal part is (others => <>) even though
2991         it is equivalent to a formal part (<>), because ASIS tools depend
2992         on the syntactic setting of this flag.
2994 2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>
2996         * sem_ch13.adb: Minor reformatting.
2997         * einfo.ads: Minor typo.
2999 2015-10-26  Joel Brobecker  <brobecker@adacore.com brobecker>
3001         * adaint.c (__gnat_open_new_temp): Use mkstemp on Android.
3003 2015-10-26  Ed Schonberg  <schonberg@adacore.com>
3005         * sem_ch12.adb (Analyze_Formal_Package_Declaration): Code clean up.
3006         * sem_ch13.adb (Check_Inherited_Indexing): New inner procedure
3007         of Check_Indexing_Functions, to verify that a derived type with an
3008         Indexing aspect is not inheriting such an aspect from an ancestor.
3009         (Check_Indexing_Functions): Call Check_Inherited_Indexing within
3010         an instance.
3012 2015-10-26  Gary Dismukes  <dismukes@adacore.com>
3014         * a-reatim.adb, contracts.adb, contracts.ads: Minor reformatting and
3015         typo corrections.
3017 2015-10-26  Ed Schonberg  <schonberg@adacore.com>
3019         * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Do not
3020         recheck the consistency betwen the freeze point and the end of
3021         declarations for the expression in an aspect specification,
3022         because it was done already in the analysis of the generic.
3023         Furthermore, the delayed analysis of an aspect of the instance
3024         may produce spurious errors when the generic is a child unit
3025         that references entities in the parent (which might not be in
3026         scope at the freeze point of the instance).
3028 2015-10-26  Yannick Moy  <moy@adacore.com>
3030         * sem_res.adb (Resolve_Call): Issue info message
3031         instead of warning when call cannot be inlined in GNATprove mode.
3033 2015-10-26  Arnaud Charlet  <charlet@adacore.com>
3035         * exp_ch6.adb (Build_Procedure_Form): Use _result as the
3036         name of the extra parameter, cleaner than a random temp name.
3037         * gnat1drv.adb (Gnat1drv): Code clean up.
3039 2015-10-24  Eric Botcazou  <ebotcazou@adacore.com>
3041         * gcc-interface/utils2.c (build_binary_op): Tweak formatting.
3042         (build_unary_op): Likewise.
3044 2015-10-23  Arnaud Charlet  <charlet@adacore.com>
3046         * gnat_rm.texi, gnat_ugn.texi: Regenerate.
3047         * doc/share/ada_pygments.py, doc/gnat_ugn/gnat_project_manager.rst,
3048         doc/gnat_ugn/building_executable_programs_with_gnat.rst,
3049         doc/gnat_ugn/gnat_and_program_execution.rst,
3050         doc/gnat_rm/implementation_defined_attributes.rst,
3051         doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
3052         doc/gnat_rm/representation_clauses_and_pragmas.rst,
3053         doc/gnat_rm/implementation_defined_pragmas.rst,
3054         doc/gnat_rm/about_this_guide.rst,
3055         doc/gnat_rm/implementation_of_ada_2012_features.rst,
3056         doc/gnat_rm/implementation_of_specific_ada_features.rst,
3057         doc/gnat_rm/implementation_defined_aspects.rst,
3058         doc/gnat_rm/implementation_advice.rst: Update documentation.
3060 2015-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
3062         * contracts.ads, contracts.adb: New unit.
3063         * exp_ch6.adb Add with and use clauses for Contracts.
3064         (Expand_Subprogram_Contract): Moved to Contracts.
3065         * exp_ch6.ads (Expand_Subprogram_Contract): Moved to Contracts.
3066         * sem_ch3.adb Add with and use clauses for Contracts.
3067         (Analyze_Object_Contract): Moved to Contracts.
3068         (Analyze_Declarations): Remove local variable Pack_Decl. Do not
3069         capture global references in contracts. Check the hidden states
3070         of a package body.
3071         * sem_ch6.adb Add with and use clauses in Contracts.
3072         (Analyze_Generic_Subprogram_Body): Do not capture global
3073         references in contracts.
3074         (Analyze_Subprogram_Body_Contract):
3075         Moved to Contracts.
3076         (Analyze_Subprogram_Body_Helper): Freeze the
3077         contract of the nearest enclosing package body. Always analyze
3078         the subprogram body contract. Do not expand the subprogram
3079         body contract.
3080         (Analyze_Subprogram_Contract): Moved to Contracts.
3081         * sem_ch6.ads (Analyze_Subprogram_Body_Contract): Moved to Contracts.
3082         (Analyze_Subprogram_Contract): Moved to Contracts.
3083         * sem_ch7.adb Add with and use clauses for Contracts.
3084         (Analyze_Package_Body_Contract): Moved to Contracts.
3085         (Analyze_Package_Body_Helper): Freeze the contract of the
3086         nearest enclosing package body.
3087         (Analyze_Package_Contract): Moved to Contracts.
3088         * sem_ch7.ads (Analyze_Package_Body_Contract): Moved to Contracts.
3089         (Analyze_Package_Contract): Moved to Contracts.
3090         * sem_ch10.adb Add with and use clauses for Contracts.
3091         (Analyze_Compilation_Unit): Do not capture global references
3092         in contracts.
3093         (Analyze_Subprogram_Body_Stub_Contract): Moved to Contracts.
3094         * sem_ch10.ads (Analyze_Subprogram_Body_Stub_Contract): Moved
3095         to Contracts.
3096         * sem_ch12.adb Add with and use clauses for Contracts.
3097         (Analyze_Subprogram_Instantiation): Update the call to
3098         Instantiate_Subprogram_Contract.
3099         (Instantiate_Package_Body):
3100         Do not copy the entity of the spec when creating an entity
3101         for the body. Construct a brand new defining identifier for
3102         the body and inherit the Comes_From_Source flag from the spec.
3103         (Instantiate_Subprogram_Body): Remove Anon_Id to Act_Decl_Id
3104         and update all occurrences. Construct a brand new defining
3105         identifier for the body and inherit the Comes_From_Source
3106         flag from the spec.
3107         (Instantiate_Subprogram_Contract): Moved
3108         to Contracts.
3109         (Save_Global_References_In_Aspects): Moved to
3110         the spec of Sem_Ch12.
3111         (Save_Global_References_In_Contract):
3112         Moved to Contracts.
3113         * sem_ch12.ads (Save_Global_References_In_Aspects): Moved from
3114         the body of Sem_Ch12.
3115         (Save_Global_References_In_Contract):
3116         Moved to Contracts.
3117         * sem_prag.adb Add with and use clauses for Contracts.
3118         (Add_Item): Removed. All references to this routine have been
3119         replaced with calls to Append_New_Elmt.
3120         (Analyze_Constituent):
3121         Add special diagnostics for errors caused by freezing of
3122         contracts.
3123         (Analyze_Refined_State_In_Decl_Part): Add formal
3124         parameter Freeze_Id. Add new global variable Freeze_Posted.
3125         (Collect_Body_States): Removed.
3126         (Report_Unused_States): Removed.
3127         * sem_prag.ads (Analyze_Defined_State_In_Decl_Part): Add formal
3128         parameter Freeze_Id and update comment on usage.
3129         * sem_util.adb Remove with and use clauses for
3130         Sem_Ch12.
3131         (Add_Contract_Item): Moved to Contracts.
3132         (Check_Unused_Body_States): New routine.
3133         (Collect_Body_States):
3134         New routine.
3135         (Create_Generic_Contract): Moved to Contracts.
3136         (Inherit_Subprogram_Contract): Moved to Contracts.
3137         (Report_Unused_Body_States): New routine.
3138         * sem_util.ads (Add_Contract_Item): Moved to Contracts.
3139         (Check_Unused_Body_States): New routine.
3140         (Collect_Body_States): New routine.
3141         (Create_Generic_Contract): Moved to Contracts.
3142         (Inherit_Subprogram_Contract): Moved to Contracts.
3143         (Report_Unused_Body_States): New routine.
3144         * sinfo.adb (Is_Expanded_Contract): New routine.
3145         (Set_Is_Expanded_Contract): New routine.
3146         * sinfo.ads New attribute Is_Expanded_Contract along with
3147         placement in nodes.
3148         (Is_Expanded_Contract): New routine along
3149         with pragma Inline.
3150         (Set_Is_Expanded_Contract): New routine
3151         along with pragma Inline.
3152         * gcc-interface/Make-lang.in: Add entry for contracts.o
3154 2015-10-23  Bob Duff  <duff@adacore.com>
3156         * bindgen.adb, init.c, opt.ads, switch-b.adb: Implement new -Ea and
3157         -Es switches.
3158         * switch-b.ads: Minor comment fix.
3159         * bindusg.adb: Document new -Ea and -Es switches.
3160         * s-exctra.ads: Use -Es instead of -E.
3162 2015-10-23  Tristan Gingold  <gingold@adacore.com>
3164         * gcc-interface/utils2.c (build_call_alloc_dealloc): Check no implicit
3165         task and protected object restrictions.
3167 2015-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
3169         * sem_ch12.adb, exp_ch6.adb: Minor reformatting.
3171 2015-10-23  Gary Dismukes  <dismukes@adacore.com>
3173         * exp_ch6.adb: Minor reformatting.
3175 2015-10-23  Ed Schonberg  <schonberg@adacore.com>
3177         * sem_ch12.adb (Check_Formal_Packages): A formal package whose
3178         actual part is (others => <>) os identical to a formal package
3179         with an actual part written as (<>).
3181 2015-10-23  Arnaud Charlet  <charlet@adacore.com>
3183         * a-reatim.adb ("/"): For Time_Span division convert the operands
3184         to integers and then use integer division, which conforms to
3185         the rounding required by Ada RM.
3187 2015-10-23  Ed Schonberg  <schonberg@adacore.com>
3189         * sem_ch6.adb (Check_Missing_Return): Do not report a missing
3190         return statement on a function body constructed to complete a
3191         package body for a premature instantiation.
3193 2015-10-23  Ed Schonberg  <schonberg@adacore.com>
3195         * exp_ch6.adb (Build_Procedure_Body_Form): Replace body of
3196         original function with that of generated procedure, to simplify
3197         processing and avoid scoping problems with local declarations.
3198         (Rewrite_Function_Call_For_C): Handle properly the case of a
3199         parameterless function.
3201 2015-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
3203         * a-exextr.adb, sem_ch6.adb, sem_ch13.adb: Minor reformatting.
3205 2015-10-23  Arnaud Charlet  <charlet@adacore.com>
3207         * s-taskin.ads: Minor code clean up.
3208         (Ada_Task_Control_Block): Move fixed size field before variable sized
3209         ones.
3210         * einfo.ads: Minor editing.
3212 2015-10-23  Ed Schonberg  <schonberg@adacore.com>
3214         * sem_ch6.adb (Check_Aggregate_Accessibility): Apply rule in RM
3215         6.5 (8.3) to verify that access discriminants in an aggregate
3216         in a return statement have the proper accessibility, i.e. do
3217         not lead to dangling references.
3219 2015-10-23  Eric Botcazou  <ebotcazou@adacore.com>
3221         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Add missing
3222         test on Address_Clause_Overlay_Warnings to the "constant overlays
3223         variable" warning. For the reverse case, also issue a warning if
3224         the modification is potentially made through the initialization
3225         of the variable.
3227 2015-10-23  Jose Ruiz  <ruiz@adacore.com>
3229         * a-exetim-posix.adb (Clock): Use the pthread_getcpuclockid
3230         function to have access to CPU clocks for tasks other than the
3231         calling task.
3233 2015-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
3235         * debug.adb: Switch -gnatd.5 is no longer in use, remove the
3236         associated documentation.
3237         * exp_dbug.adb (Get_External_Name): Do not add a special prefix
3238         for ignored Ghost entities or when switch -gnatd.5 is enabled.
3239         * exp_dbug.ads Remove the documentation concerning the encoding
3240         of ignored Ghost entities.
3242 2015-10-23  Bob Duff  <duff@adacore.com>
3244         * a-exextr.adb (Notify_Exception): For Unhandled_Raise_In_Main,
3245         mimic the output from Ada.Exceptions.Last_Chance_Handler; don't
3246         print "Exception raised".
3247         * s-stalib.ads, s-exctra.ads, s-exctra.adb: Add
3248         Unhandled_Raise_In_Main to types Exception_Trace_Kind/Trace_Kind.
3250 2015-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
3252         * exp_attr.adb, freeze.adb, sem_attr.adb, exp_aggr.adb,
3253         gnatname.adb: Minor reformatting.
3255 2015-10-23  Steve Baird  <baird@adacore.com>
3257         * a-cbdlli.ads, a-cbhama.ads, a-cbhase.ads, a-cbmutr.ads,
3258         a-cborma.ads, a-cborse.ads, a-cbprqu.ads, a-cbsyqu.ads,
3259         a-cdlili.ads, a-cfdlli.ads, a-cfhama.ads, a-cfhase.ads,
3260         a-cfinve.ads, a-cforma.ads, a-cforse.ads, a-cidlli.ads,
3261         a-cihama.ads, a-cihase.ads, a-cimutr.ads, a-ciorma.ads,
3262         a-ciormu.ads, a-ciorse.ads, a-coboho.ads, a-cobove.ads,
3263         a-cofove.ads, a-cohama.ads, a-cohase.ads, a-coinho.ads,
3264         a-coinho-shared.ads, a-coinve.ads, a-comutr.ads, a-conhel.ads,
3265         a-convec.ads, a-coorma.ads, a-coormu.ads, a-coorse.ads,
3266         a-cuprqu.ads, a-cusyqu.ads, a-rbtgbo.ads: Add spec Annotate
3267         pragmas.
3268         * a-cbdlli.adb, a-cbhama.adb, a-cbhase.adb, a-cbmutr.adb,
3269         a-cborma.adb, a-cborse.adb, a-cbprqu.adb, a-cbsyqu.adb,
3270         a-cdlili.adb, a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb,
3271         a-cfinve.adb, a-cforma.adb, a-cforse.adb, a-cidlli.adb,
3272         a-cihama.adb, a-cihase.adb, a-cimutr.adb, a-ciorma.adb,
3273         a-ciormu.adb, a-ciorse.adb, a-coboho.adb, a-cobove.adb,
3274         a-cofove.adb, a-cohama.adb, a-cohase.adb, a-coinho.adb,
3275         a-coinho-shared.adb, a-coinve.adb, a-comutr.adb, a-conhel.adb,
3276         a-convec.adb, a-coorma.adb, a-coormu.adb, a-coorse.adb,
3277         a-cuprqu.adb, a-cusyqu.adb, a-rbtgbo.adb: Remove body Annotate
3278         pragmas.
3280 2015-10-23  Vincent Celier  <celier@adacore.com>
3282         * gnatname.adb: When gnatname is invoked with a project file,
3283         specified with switch -P, if gprname is available, gnatname will
3284         invoke gprname, with the target if it is a cross gnatname.
3286 2015-10-23  Arnaud Charlet  <charlet@adacore.com>
3288         * exp_ch4.adb: Fix typo.
3289         * exp_ch6.adb: Update comment.
3290         * exp_attr.adb (Expand_Min_Max_Attribute): Simplify expansion.
3291         * exp_aggr.adb (Convert_To_Positional): Only convert to
3292         positional when generating C in case of an object declaration.
3293         (In_Object_Declaration): New.
3294         (Late_Expansion): Adapt to trees generated by Modify_Tree_For_C.
3295         * sinfo.ads: Update documentation.
3297 2015-10-23  Joel Brobecker  <brobecker@adacore.com brobecker>
3299         * sigtramp.h (struct sigcontext, struct ucontext): Remove declarations,
3300         and replace them by include of corresponding header file.
3302 2015-10-23  Bob Duff  <duff@adacore.com>
3304         * a-convec.adb (Copy): Make sure C is initialized
3305         on all paths, including when Checks is False.
3307 2015-10-23  Eric Botcazou  <ebotcazou@adacore.com>
3309         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Remove
3310         error as unreachable.
3312 2015-10-23  Arnaud Charlet  <charlet@adacore.com>
3314         * gnat1drv.adb (Adjust_Global_Switches): Adjust.
3316 2015-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
3318         * exp_dbug.ads, exp_dbug.adb (Get_External_Name): The special prefix for
3319         ignored Ghost entities is now ___ghost_.
3321 2015-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
3323         * ghost.adb (Is_Subject_To_Ghost): Check the
3324         original node when searching for pragma Ghost to catch cases
3325         where a source construct has been rewritten into something else.
3327 2015-10-23  Ed Schonberg  <schonberg@adacore.com>
3329         * einfo.ads, einfo.adb (Rewritten_For_C): New flag on functions
3330         that return a constrained array type.  When generating C these
3331         functions are rewritten as procedures with an out parameter,
3332         and calls to such functions are rewritten accordingly.
3333         * exp_ch6.adb (Expand_N_Subprogram_Declaration): When
3334         Modify_Tree_For_C is set and the function returns a constrained
3335         array type, generate a procedure declaration with an additional
3336         out parameter. Mark original function as Rewritten_For_C.
3337         The new declaration is inserted in tree immediately after
3338         current declaration.
3339         (Expand_Subprogram_Body): If entity is marked Rewritten_For_C,
3340         generate body of corresponding procedure using declarations
3341         and statements for function body. Replace return statements
3342         with assignments to the out parameter, followed by a simple
3343         return statement.
3344         (Rewrite_Function_Call_For_C): New procedure to replace a function
3345         call that returns an array by a procedure call.
3347 2015-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
3349         * sem_util.adb (Denotes_Iterator): New routine.
3350         (Is_Iterator): Code cleanup. Factor out the detection of a
3351         predefined iterator.  As a result this fixes a missing case
3352         where a tagged type implements interface Reversible_Iterator.
3354 2015-10-23  Ed Schonberg  <schonberg@adacore.com>
3356         * sem_attr.adb (Eval_Attribute): Constant-fold 'Enabled if
3357         not within a generic unit, even if expander is not active, so
3358         that instances of container packages remain preelaborable in
3359         -gnatc mode.
3361 2015-10-23  Tristan Gingold  <gingold@adacore.com>
3363         * init.c (__gnat_sigtramp): New assembly function for arm64-darwin.
3364         (__gnat_error_handler): Use trampoline for arm64.
3366 2015-10-23  Ed Schonberg  <schonberg@adacore.com>
3368         * exp_ch3.adb (Expand_N_Object_Declaration): if the type of the
3369         object is a class-wide limited interface type, the expression
3370         is not restricted to the forms specified for limited types.
3372 2015-10-23  Vincent Celier  <celier@adacore.com>
3374         * gnatname.adb: Code clean up.
3375         * s-taasde.ads: Fix comment.
3377 2015-10-23  Ed Schonberg  <schonberg@adacore.com>
3379         * sem_util.adb (Is_Iterator, Is_Reversible_iterator): Use
3380         root type to determine whether the type is a descendant of the
3381         corresponding interface type, so take into account multiple
3382         levels of subtypes and derivations.
3384 2015-10-23  Olivier Hainque  <hainque@adacore.com>
3386         * tracebak.c: Refine selection of GCC/GENERIC_UNWINDER for
3387         tracebacks on x86 & x86_64.
3388         (x86 & x86_64): If !SJLJ, always pick the
3389         GCC_UNWINDER for x86_64 (not only on linux).
3390         * sem_util.ads: Minor fix in comment.
3392 2015-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
3394         * sem_prag.adb (Analyze_Pragma): Pragma Volatile_Function should
3395         not apply to a function instantiation.
3396         * sem_util.adb (Has_Effectively_Volatile_Profile): New routine.
3397         (Is_Volatile_Function): An instance of Ada.Unchecked_Conversion
3398         is a volatile function when its profile contains an effectively
3399         volatile type.
3400         * sem_util.ads (Has_Effectively_Volatile_Profile): New routine.
3402 2015-10-23  Arnaud Charlet  <charlet@adacore.com>
3404         * exp_unst.adb (Unnest_Subprogram): Complete previous
3405         change and update comments.
3407 2015-10-23  Ed Schonberg  <schonberg@adacore.com>
3409         * sem_util.ads, sem_util.adb (Check_Function_With_Address_Parameter):
3410         A subprogram that has an Address parameter and is declared in a Pure
3411         package is not considered Pure, because the parameter may be used as a
3412         pointer and the referenced data may change even if the address value
3413         itself does not.
3414         * freeze.adb (Freeze_Subprogram): use it.
3415         * exp_ch6.adb (Expand_N_Subprogram_Body): Use it.
3417 2015-10-23  Olivier Hainque  <hainque@adacore.com>
3419         * tracebak.c: Fallback to generic unwinder for gcc-sjlj on x86 &
3420         x86_64 linux
3421         * tracebak.c: Rework x86 & x86_64 sections to resort to the
3422         generic unwinder if __USING_SJLJ_EXCEPTIONS__.
3424 2015-10-23  Javier Miranda  <miranda@adacore.com>
3426         * sem_util.adb (Check_Function_Writable_Actuals): For function
3427         calls restrict the check to elementary types, as requested by
3428         RM 6.4.1(6.15/3)
3430 2015-10-23  Arnaud Charlet  <charlet@adacore.com>
3432         * exp_unst.adb (Unnest_Subprogram): Suppress initialization on
3433         Decl_ARECnT since we are taking care of all initializations in
3434         the generated code.
3436 2015-10-23  Ed Schonberg  <schonberg@adacore.com>
3438         * sem_dim.adb (Analyze_Dimension_Extension_Or_Record_Aggregate):
3439         Handle properly a box-initialized aggregate component.
3441 2015-10-23  Yannick Moy  <moy@adacore.com>
3443         * sem_prag.adb (Analyze_Pragma): Reject Volatile_Function not placed
3444         on a function.
3446 2015-10-23  Yannick Moy  <moy@adacore.com>
3448         * a-extiin.ads, a-reatim.ads, a-interr.ads, a-exetim-mingw.ads,
3449         a-exetim-default.ads, a-exetim.ads, a-taside.ads: Add "Global => null"
3450         contract on subprograms.
3451         * lib-xref-spark_specific.adb: collect scopes for stubs of
3452         protected objects
3454 2015-10-23  Arnaud Charlet  <charlet@adacore.com>
3456         * gnat1drv.adb (Adjust_Global_Switches): Enable
3457         Back_Annotate_Rep_Info to get size information from gigi.
3458         (Gnat1drv): Code clean ups.
3459         * frontend.adb (Frontend): Ditto.
3461 2015-10-23  Arnaud Charlet  <charlet@adacore.com>
3463         * gnat1drv.adb (Adjust_Global_Switches): Adjust settings.
3464         * sem.adb (Semantics): Remove special case.
3466 2015-10-23  Gary Dismukes  <dismukes@adacore.com>
3468         * bindgen.adb, restrict.adb: Minor spelling/grammar fixes.
3470 2015-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
3472         * sem_res.adb (Resolve_Entity_Name): Code cleanup. Check for possible
3473         elaboration issues in SPARK when the name denotes a source variable.
3475 2015-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
3477         * exp_ch7.adb (Process_Transient_Objects): Reimplement to properly
3478         handle restriction No_Exception_Propagation.
3479         * exp_ch11.adb (Expand_At_End_Handler): Update the parameter
3480         profile and all references to Block.
3481         * exp_ch11.ads (Expand_At_End_Handler): Update the parameter
3482         profile and comment on usage.
3483         * exp_intr.adb (Expand_Unc_Deallocation): Reimplement to properly
3484         handle restriction No_Exception_Propagation.
3485         * gnat1drv.adb, restrict.adb: Update comment.
3487 2015-10-23  Bob Duff  <duff@adacore.com>
3489         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Do not call
3490         SS_Release for a block statement enclosing the return statement in the
3491         case where a build-in-place function return is returning
3492         the result on the secondary stack. This is accomplished by
3493         setting the Sec_Stack_Needed_For_Return flag on such blocks.
3494         It was already being set for the function itself, and it was
3495         already set correctly for blocks in the non-build-in-place case
3496         (in Expand_Simple_Function_Return).
3497         (Set_Enclosing_Sec_Stack_Return): New procedure to perform
3498         the Set_Sec_Stack_Needed_For_Return calls. Called in the
3499         build-in-place and non-build-in-place cases.
3500         (Expand_Simple_Function_Return): Call
3501         Set_Enclosing_Sec_Stack_Return instead of performing the loop
3502         in line.
3504 2015-10-23  Bob Duff  <duff@adacore.com>
3506         * scng.adb (Char_Literal_Case): If an apostrophe
3507         follows a reserved word, treat it as a lone apostrophe, rather
3508         than the start of a character literal. This was already done for
3509         "all", but it needs to be done also for (e.g.) "Delta".
3511 2015-10-23  Bob Duff  <duff@adacore.com>
3513         * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): Use
3514         Underlying_Type for B_Typ, in case the Typ is a subtype of a type with
3515         unknown discriminants.
3516         * g-awk.ads: Minor style fix in comment
3518 2015-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
3520         * debug.adb: Document the use of debug switch -gnatd.5.
3521         * einfo.adb: Code reformatting. (Is_Ghost_Entity): Moved from ghost.adb.
3522         * einfo.ads New synthesized attribute Is_Ghost_Enity along
3523         with usage in nodes and pragma Inline.
3524         (Is_Ghost_Entity: Moved from ghost.ads.
3525         * exp_ch3.adb Code reformatting.
3526         (Expand_Freeze_Array_Type): Capture, set and restore the Ghost mode.
3527         (Expand_Freeze_Class_Wide_Type): Capture, set and restore the
3528         Ghost mode.
3529         (Expand_Freeze_Enumeration_Type): Capture, set and
3530         restore the Ghost mode.
3531         (Expand_Freeze_Record_Type): Capture, set and restore the Ghost mode.
3532         * exp_ch6.adb (Expand_Subprogram_Contract): Do not expand the
3533         contract of an ignored Ghost subprogram.
3534         * exp_ch13.adb Add with and use clauses for Ghost.
3535         (Expand_N_Freeze_Entity): Capture, set and restore the Ghost mode.
3536         * exp_dbug.adb (Get_External_Name): Code reformatting. Add a
3537         special prefix for ignored Ghost entities or when requested by
3538         -gnatd.5 for any Ghost entity.
3539         * exp_dbug.ads Document the use of prefix "_ghost_" for ignored
3540         Ghost entities.
3541         * exp_prag.adb (Expand_Pragma_Check): Capture, set and restore the
3542         Ghost mode.
3543         (Expand_Pragma_Loop_Variant): Use In_Assertion_Expr
3544         to signal the original context.
3545         * ghost.adb (Check_Ghost_Overriding): Code cleanup.
3546         (Is_Ghost_Entity): Moved to einfo.adb.  (Is_OK_Declaration):
3547         Move the assertion expression check to the outer level.
3548         (Is_OK_Ghost_Context): An assertion expression is a valid Ghost
3549         context.
3550         * ghost.ads (Is_Ghost_Entity): Moved to einfo.ads.
3551         * sem_ch3.adb (Analyze_Object_Contract): A source Ghost object
3552         cannot be imported or exported. Mark internally generated objects
3553         as Ghost when applicable.
3554         (Make_Class_Wide_Type): Inherit the ghostness of the root tagged type.
3555         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Mark
3556         a stand alone subprogram body as Ghost when applicable.
3557         (Analyze_Subprogram_Declaration): Mark internally generated
3558         subprograms as Ghost when applicable.
3559         * sem_ch7.adb: Code cleanup.
3560         * sem_ch13.adb (Add_Invariants): Add various formal
3561         parameters to break dependency on global variables.
3562         (Build_Invariant_Procedure): Code cleanup. Capture, set and
3563         restore the Ghost mode.
3564         * sem_res.adb (Resolve_Actuals): The actual parameter of a source
3565         Ghost subprogram whose formal is of mode IN OUT or OUT must be
3566         a Ghost variable.
3568 2015-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
3570         * sem_ch8.adb Code cleanup.
3571         (Find_Expanded_Name): Replace
3572         the call to In_Pragmas_Depends_Or_Global with a call to
3573         In_Abstract_View_Pragma.
3574         (In_Abstract_View_Pragma): New routine.
3575         (In_Pragmas_Depends_Or_Global): Removed.
3576         * sem_prag.adb (Analyze_Part_Of): Catch a case where indicator
3577         Part_Of denotes the abstract view of a variable.
3579 2015-10-23  Arnaud Charlet  <charlet@adacore.com>
3581         * sem_util.ads (Unique_Defining_Entity): Document the result
3582         for tasks and entries.
3583         * sem_util.adb (Unique_Entity): Return declaration entity for task and
3584         entry bodies
3586 2015-10-22  Mikhail Maltsev  <maltsevm@gmail.com>
3588         * gcc-interface/decl.c (gnat_to_gnu_entity): Use gcc_checking_assert.
3589         * gcc-interface/trans.c (assoc_to_constructor): Use flag_checking.
3590         * gcc-interface/utils.c (relate_alias_sets): Likewise.
3591         * gcc-interface/utils2.c (build_binary_op, build_unary_op): Use
3592         gcc_checking_assert
3594 2015-10-21  Martin Sebor  <msebor@redhat.com>
3596         PR driver/68043
3597         * gcc-interface/lang.opt: End each sentence that describes
3598         an option with a period.
3600 2015-10-20  Yannick Moy  <moy@adacore.com>
3602         * fmap.adb, a-cihama.adb, sem_ch5.adb, make.adb, inline.adb,
3603         a-cfhase.adb, scng.adb, sem_ch12.adb, freeze.adb, tempdir.adb,
3604         sem_util.adb, sem_res.adb, s-regexp.adb, a-clrefi.adb: Fix coding
3605         style for marking start of processing of subprograms.
3607 2015-10-20  Yannick Moy  <moy@adacore.com>
3609         * lib-xref-spark_specific.adb (Add_SPARK_File): Start traversal
3610         by requesting info from stubs.  (Traverse_All_Compilation_Units):
3611         Remove unused procedure.
3612         (Traverse_Declarations_Or_Statements): Handle protected and task units.
3613         * lib-xref.ads (Traverse_All_Compilation_Units): Remove unused
3614         procedure.
3615         * restrict.adb (Check_Restriction): Do not ignore
3616         restrictions in GNATprove_Mode.
3618 2015-10-20  Arnaud Charlet  <charlet@adacore.com>
3620         * s-valllu.adb, sem_ch3.adb, layout.adb, a-crbtgo.adb, exp_ch9.adb,
3621         make.adb, g-diopit.adb, s-valuns.adb, sem_ch9.adb, sem_ch10.adb,
3622         sem_ch12.adb, a-tifiio.adb, g-dynhta.adb, uintp.adb,
3623         sem_util.adb, sem_res.adb, s-htable.adb, exp_tss.adb, s-soflin.ads,
3624         exp_ch6.adb, sem_ch6.adb, a-rbtgbo.adb, par-ch12.adb, sem_ch8.adb,
3625         sem_eval.adb, mdll.adb, par-ch5.adb, s-poosiz.adb, sem_ch4.adb,
3626         a-ngelfu.adb, s-taspri-solaris.ads, a-cforse.adb: Fix typos.
3628 2015-10-20  Arnaud Charlet  <charlet@adacore.com>
3630         * sem_aggr.adb, mlib-prj.adb, prep.adb, eval_fat.adb, rtsfind.adb,
3631         freeze.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnatlink.adb,
3632         par-ch6.adb, exp_tss.adb, exp_ch4.adb, s-shasto.adb, exp_fixd.adb,
3633         sem_ch6.adb, clean.adb, sem_ch8.adb, sem_eval.adb, sem_ch9.adb: Fix
3634         typos.
3636 2015-10-20  Ed Schonberg  <schonberg@adacore.com>
3638         * sem_ch11.adb (Analyze_Handled_Statements): If the scope is a
3639         postcondition subprogram, do not check for useless assignments
3640         because there are no source references in such a body, and the
3641         call will lose deferred references from the enclosing subprogram.
3643 2015-10-20  Ed Schonberg  <schonberg@adacore.com>
3645         * sem_ch13.adb: nalyze_Attribute_Definition_Clause, case
3646         'Address):  If either object is controlled the overlay is
3647         erroneous, but analysis must be completed so that back-end sees
3648         address clause and completes code generation.  Improve text
3649         of warning.
3651 2015-10-20  Thomas Quinot  <quinot@adacore.com>
3653         * exp_ch4.adb: Minor reformatting.
3655 2015-10-20  Bob Duff  <duff@adacore.com>
3657         * s-mudido-affinity.adb (Create): Correct subranges of slices of CPU
3658         arrays.
3660 2015-10-20  Arnaud Charlet  <charlet@adacore.com>
3662         * sinfo.ads, g-pehage.adb, par-ch12.adb,
3663         layout.adb, exp_util.adb, sem_aux.adb, make.adb, checks.adb,
3664         sem_ch12.adb, sem_res.adb, sem_attr.adb, a-ngelfu.adb, sem_ch4.adb,
3665         switch-b.adb, sem_ch6.adb, prj-dect.adb, gnatxref.adb, sem_ch13.adb,
3666         lib-xref.adb: Fix typos.
3668 2015-10-20  Tristan Gingold  <gingold@adacore.com>
3670         * exp_ch4.adb (Expand_Array_Comparison): Use
3671         generic code if runtime routine is not available.
3673 2015-10-20  Yannick Moy  <moy@adacore.com>
3675         * a-sytaco.ads (Ada.Synchronous_Task_Control): Package
3676         now withs System.Task_Identification. The visible part
3677         of the spec has SPARK_Mode. The private part has pragma
3678         SPARK_Mode (Off).
3679         (Set_True): Added Global and Depends aspects
3680         (Set_False): Added Global and Depends aspects (Current_State):
3681         Added Volatile_Function aspect and added external state
3682         Ada.Task_Identification.Tasking_State as a Global input.
3683         (Suspend_Until_True): Added Global and Depends aspects
3684         * a-sytaco.adb (Ada.Synchronous_Task_Control):
3685         Package body has SPARK_Mode => Off
3686         * a-extiin.ads (Ada.Execution_Time.Interrupts):
3687         Package now withs Ada.Real_Time and has SPARK_Mode.
3688         (Clock): Added Volatile_Function aspect and added external state
3689         Ada.Real_Time.Clock_Time as a Global input.
3690         * a-reatim.ads (Ada.Real_Time): The visible part of the spec has
3691         SPARK_Mode. The private part has pragma SPARK_Mode (Off). The package
3692         declares external state Clock_Time with properties Async_Readers and
3693         Async_Writers.
3694         (Clock): Added Volatile_Function aspect and
3695         added external state Clock_Time as a Global input.
3696         * a-reatim.adb (Ada.Real_Time): Package body has SPARK_Mode => Off
3697         * a-exetim-default.ads, a-exetim-mingw.ads (Ada.Execution_Time):
3698         The visible part of the spec has SPARK_Mode. The private part
3699         has pragma SPARK_Mode (Off).
3700         (Clock): Added Volatile_Function
3701         aspect and added external state Clock_Time as a Global input.
3702         (Clock_For_Interrupts): Added Volatile_Function aspect and added
3703         external state Ada.Real_Time.Clock_Time as a Global input.
3704         * a-exetim-mingw.adb (Ada.Execution_Time): Package body has
3705         SPARK_Mode => Off
3706         * a-interr.ads (Ada.Interrupts): Package now
3707         withs Ada.Task_Identification (Is_Reserved): Added
3708         SPARK_Mode, Volatile_Function and external state
3709         Ada.Task_Identification.Tasking_State as a Global input.
3710         (Is_Attached): Added SPARK_Mode, Volatile_Function and external
3711         state Ada.Task_Identification.Tasking_State as a Global input.
3712         (Attach_Handler): Added SPARK_Mode => Off (Exchange_Handler):
3713         Added SPARK_Mode => Off (Detach_Handler): Added SPARK_Mode
3714         and external state Ada.Task_Identification.Tasking_State as a
3715         Global In_Out.  (Reference): Added SPARK_Mode => Off
3716         * a-disedf.ads (Get_Deadline): Added SPARK_Mode, Volatile_Function
3717         and external state Ada.Task_Identification.Tasking_State as a
3718         Global input.
3719         * a-taside.ads (Ada.Task_Identification): The visible part of
3720         the spec has SPARK_Mode.  The private part has pragma SPARK_Mode
3721         (Off). The package declares external state Tasking_State with
3722         properties Async_Readers and Async_Writers.
3723         (Current_Task): Added
3724         Volatile_Function aspect and added external state Tasking_State
3725         as a Global input.
3726         (Environment_Task): Added SPARK_Mode => Off
3727         (Is_Terminated): Added Volatile_Function aspect and added external
3728         state Tasking_State as a Global input.  (Is_Callable): Added
3729         Volatile_Function aspect and added external state Tasking_State as
3730         a Global input.
3731         (Activation_Is_Complete): Added Volatile_Function
3732         aspect and added external state Tasking_State as a Global input.
3733         * a-taside.adb (Ada.Task_Identification): Package body has
3734         SPARK_Mode => Off.
3736 2015-10-20  Ed Schonberg  <schonberg@adacore.com>
3738         * atree.ads, atree.adb: Enable List38 and List39 on entities.
3739         * einfo.ads, einfo.adb (Class_Wide_Preconds) new attribute defined
3740         on subprograms. Holds the list of class-wide precondition
3741         functions inherited from ancestors. Each such function is an
3742         instantiation of the generic function generated from an explicit
3743         aspect specification for a class-wide precondition. A type is
3744         an ancestor of itself, and therefore a root type has such an
3745         instance on its own list.
3746         (Class_Wide_Postconds): ditto for postconditions.
3748 2015-10-20  Vincent Celier  <celier@adacore.com>
3750         * prj-attr.adb: Add packages Prove and GnatTest.
3752 2015-10-20  Steve Baird  <baird@adacore.com>
3754         * a-conhel.adb: Add an Annotate pragma to help suppress CodePeer's
3755         analysis of internals of container generic instances. This pragma
3756         has no other effect.
3757         * a-conhel.adb (Generic_Implementation) Add "pragma Annotate
3758         (CodePeer, Skip_Analysis);".
3760 2015-10-20  Steve Baird  <baird@adacore.com>
3762         * pprint.adb: Code clean up.
3764 2015-10-20  Bob Duff  <duff@adacore.com>
3766         * a-cfinve.ads, a-coboho.ads: Improve comments.
3767         * a-coboho.adb (Size_In_Storage_Elements): Improve error message
3768         in case of "Size is too big" exception.
3770 2015-10-20  Bob Duff  <duff@adacore.com>
3772         * a-contai.ads: Remove check names (moved to snames.ads-tmpl).
3773         * snames.ads-tmpl: Add check names that were previously in
3774         a-contai.ads, so they are now visible in configuration files.
3775         * types.ads: Add checks corresponding to snames.ads-tmpl.
3777 2015-10-20  Ed Schonberg  <schonberg@adacore.com>
3779         * sem_ch5.adb (Analyze_Loop_Statement): Attach generated loop
3780         identifier to the tree, because it may be the root of a tree
3781         traversal in Pop_Scope when freeze actions are pending.
3783 2015-10-20  Steve Baird  <baird@adacore.com>
3785         * pprint.ads (Expression_Image) Add new generic formal flag
3786         Hide_Parameter_Blocks.
3787         * pprint.adb (Expression_Image) If new flag is set, then display
3788         dereferences of parameter block components accordingly.
3790 2015-10-20  Ed Schonberg  <schonberg@adacore.com>
3792         * sem_prag.adb: Code clean up.
3794 2015-10-20  Hristian Kirtchev  <kirtchev@adacore.com>
3796         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Code cleanup.
3797         (Make_Build_In_Place_Call_In_Object_Declaration): Update the
3798         parameter profile.  Code cleanup. Request debug info for the
3799         object renaming declaration.
3800         (Move_Activation_Chain): Add new formal parameter and update the
3801         comment on usage.
3802         * exp_ch6.ads (Make_Build_In_Place_Call_In_Object_Declaration):
3803         Update the parameter profile and comment on usage.
3804         * sem_util.ads, sem_util.adb (Remove_Overloaded_Entity): New routine,
3805         currently unused.
3807 2015-10-20  Ed Schonberg  <schonberg@adacore.com>
3809         * sem_ch13.adb (Analyze_One_Aspect, case
3810         Aspect_Disable_Controlled): If expander is not active, pre-analyze
3811         expression anyway for ASIS and other tools use.
3812         * sem_prag.adb (Build_Generic_Class_Condition): Handle properly
3813         anonymous access types in parameter specifications. Make the
3814         formal type a formal derived type of the controlling type of
3815         the subprogram.
3817 2015-10-20  Tristan Gingold  <gingold@adacore.com>
3819         * s-rident.ads: No_Task_At_Interrupt_Priority: New restriction.
3820         * sem_prag.adb (Analyze_Pragma): Check the restriction.
3821         * sem_ch13.adb (Analyze_Attribute_Definition_Clause):
3822         Check the restriction (for aspects).
3824 2015-10-20  Gary Dismukes  <dismukes@adacore.com>
3826         * sem_prag.adb: Minor reformatting.
3828 2015-10-20  Tristan Gingold  <gingold@adacore.com>
3830         * sem_util.adb (Is_Protected_Self_Reference): Remove reference to
3831         UET_Address in comment.
3832         * sem_attr.adb (Check_Unit_Name): Adjust comment.
3833         (Analyze_Attribute): Remove handling of UET_Address.
3834         * sem_attr.ads (Attribute_Impl_Def): Remove Attribute_UET_Address.
3835         * snames.ads-tmpl Remove Name_UET_Address, Attribute_UET_Address.
3836         * exp_attr.adb (Expand_N_Attribute_Reference): Remove
3837         Attribute_UET_Address.
3839 2015-10-20  Bob Duff  <duff@adacore.com>
3841         * a-cbdlli.adb, a-cdlili.adb, a-chtgop.adb, a-cidlli.adb,
3842         * a-cobove.adb, a-coinve.adb, a-convec.adb, a-crbtgo.adb ("="): Avoid
3843         modifying the tampering counts unnecessarily.
3844         (Adjust): Zero tampering counts unconditionally.
3846 2015-10-20  Jerome Lambourg  <lambourg@adacore.com>
3848         * init.c: Fix build issue on arm-vx6 when building the RTP
3849         run-time.
3851 2015-10-20  Ed Schonberg  <schonberg@adacore.com>
3853         * sem_ch3.adb (Analyze_Object_Declaration): If the expression
3854         is an aggregate and compilation is in -gnatI mode (ignore rep
3855         clauses) do not delay resolution of aggregate, to prevent freeze
3856         actions out of order in the backend.
3858 2015-10-20  Ed Schonberg  <schonberg@adacore.com>
3860         * sem_prag.ads, sem_prag.adb (Build_Generic_Class_Condition):
3861         New procedure to construct a generic function for a class-wide
3862         precondition, to implement AI12-0113  concerning the new semantics
3863         of class-wide preconditions for overriding uperations.
3865 2015-10-20  Hristian Kirtchev  <kirtchev@adacore.com>
3867         * sem_util.adb (Find_Actual): The routine is
3868         now capable of operating on entry calls.
3870 2015-10-20  Ed Schonberg  <schonberg@adacore.com>
3872         * sem_res.adb: Remove redundant check.
3874 2015-10-20  Jerome Lambourg  <lambourg@adacore.com>
3876         * init.c (__gnat_vxsim_error_handler): Completely disable on
3877         VxWorks-7 as the VSBs used to build gcc do not support vxsim
3878         architecture.
3880 2015-10-20  Claire Dross  <dross@adacore.com>
3882         * a-cfdlli.ads, a-cfinve.ads, a-cofove.ads (Generic_Sorting): Explicit
3883         SPARK_Mode.
3884         * a-cfhase.ads, a-cforse.ads (Generic_Keys): Explicit SPARK_Mode.
3886 2015-10-20  Tristan Gingold  <gingold@adacore.com>
3888         * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
3889         Check for No_Implicit_Protected_Object_Allocations.
3890         * fe.h (Check_No_Implicit_Task_Alloc,
3891         Check_No_Implicit_Protected_Alloc): Define and declare.
3892         * restrict.ads, restrict.adb (Check_No_Implicit_Task_Alloc,
3893         Check_No_Implicit_Protected_Alloc): New procedures to check the
3894         restrictions.
3895         * s-rident.ads (No_Implicit_Task_Allocations)
3896         (No_Implicit_Protected_Object_Allocations): Declare new
3897         restrictions.
3899 2015-10-20  Yannick Moy  <moy@adacore.com>
3901         * sem_res.adb (Resolve_Selected_Component): Only set flag
3902         when component is defined in a variant part.
3903         * sem_util.adb,
3904         * sem_util.ads (Is_Declared_Within_Variant): Promote local query
3905         as publicy visible one for use in Resolve_Selected_Component.
3907 2015-10-20  Philippe Gil  <gil@adacore.com>
3909         * g-debpoo.adb: allow instrumented System.Memory to use Debug_Pool
3910         from foreign threads.
3911         * g-debpoo.adb (Print_Traceback): NEW print traceback if available
3912         added to support Stack_Trace_Depth = 0.
3913         (Print_Address): NEW print System.Address without no secondary
3914         stack use (Address_Image uses secondary stack)
3916 2015-10-20  Yannick Moy  <moy@adacore.com>
3918         * exp_ch9.adb (Expand_Entry_Barrier): Default initialize local variable
3919         Func.
3921 2015-10-20  Jerome Lambourg  <lambourg@adacore.com>
3923         * init.c (__gnat_error_handler for vxworks): Force
3924         SPE bit in the MSR when handling signals
3926 2015-10-20  Arnaud Charlet  <charlet@adacore.com>
3928         * einfo.ads, sem_ch12.adb, sem_ch6.adb, table.ads, s-stposu.ads,
3929         g-table.ads, g-dyntab.ads, makeutl.ads, a-crdlli.ads: Fix typos.
3931 2015-10-20  Ed Schonberg  <schonberg@adacore.com>
3933         * sem_ch5.adb (Analyze_Loop_Statement): Element iterators
3934         over multidimensional arrays create additional loops during
3935         expansion. For such loops we create a label as a scope
3936         name. Attach this label  properly to tree, for use in GNATProve
3937         over such element iterators.
3938         * sem_attr.adb (Analyze_Attribute, case Loop_Entry): The loop to
3939         which the attribute applies comes from source, not from expansion
3940         of an element iterator or a quantified expression.
3941         * exp_attr.adb (Expand_N_Attribute_Reference): Ditto.
3943 2015-10-20  Ed Schonberg  <schonberg@adacore.com>
3945         * exp_ch6.adb (Expand_Call): Check for a call to a function
3946         declared in a Dimension I/O package, to handle the new Image
3947         function.
3949 2015-10-20  Eric Botcazou  <ebotcazou@adacore.com>
3951         * inline.ads: Minor comment fixes.
3953 2015-10-20  Bob Duff  <duff@adacore.com>
3955         * a-comutr.ads (Tree_Node_Access): Add No_Strict_Aliasing, because
3956         we're doing unchecked conversions with this pointer.
3958 2015-10-20  Ed Schonberg  <schonberg@adacore.com>
3960         * exp_ch9.adb (Next_Protected_Operation): An expression function
3961         used as a completion can be the next protected operation in a
3962         protected body.
3964 2015-10-20  Hristian Kirtchev  <kirtchev@adacore.com>
3966         * sem_res.adb (Is_OK_Volatile_Context): Add a guard when checking a
3967         possible call to an instance of Ada.Unchecked_Conversion to avoid
3968         testing protected function calls. Allow references to protected objects
3969         in prefixed protected calls.
3970         (Is_Protected_Operation_Call): New routine.
3972 2015-10-20  Yannick Moy  <moy@adacore.com>
3974         * exp_ch5.adb, exp_ch5.ads (Expand_Iterator_Loop_Over_Array): Make
3975         query public. Remove code handling with iterator loop over array
3976         of the 'in' form, which is not allowed in Ada.  * exp_spark.adb
3977         (Expand_SPARK): Expand loop statements that take the form of an
3978         iterator over an array.
3979         * sem_ch5.adb (Analyze_Loop_Statement): Do not analyze loop statements
3980         that take the form of an iterator over an array, so that the rewritten
3981         form gets analyzed instead.
3982         * sem_util.adb, sem_util.ads (Is_Iterator_Over_Array): New query
3983         to recognize iterators over arrays.
3985 2015-10-20  Arnaud Charlet  <charlet@adacore.com>
3987         * s-excdeb.ads, s-excdeb.adb (Debug_Raise_Exception): Add
3988         parameter Message.
3989         * a-except.adb (Raise_Current_Excep): Update call to
3990         Debug_Raise_Exception.
3991         * a-except-2005.adb (Complete_Occurrence): Ditto.
3992         * sem_ch12.adb: Whitespace fix.
3994 2015-10-20  Yannick Moy  <moy@adacore.com>
3996         * sem_warn.adb (Is_OK_Fully_Initialized): Consider types with DIC as
3997         fully default initialized.
3998         * sem_ch6.adb: minor style fix in comment
4000 2015-10-20  Ed Schonberg  <schonberg@adacore.com>
4002         * s-diflio.ads, s-diflio.adb (Image): New function for dimensioned
4003         quantities, to produce a string that includes the dimension
4004         synbol for the quantity, or the vector of dimensions in standard
4005         notation.
4006         * sem_dim.adb (Expand_Put_Call_With_Symbol): Process new function
4007         Image, to include dimension information in the generated string,
4008         identical to the string produced by the Put procedure on a string
4009         for a dimensioned quantity.
4011 2015-10-20  Hristian Kirtchev  <kirtchev@adacore.com>
4013         * exp_ch7.adb (Process_Declarations): A loop
4014         parameter does not require finalization actions.
4016 2015-10-20  Eric Botcazou  <ebotcazou@adacore.com>
4018         * exp_ch6.adb (Expand_Simple_Function_Return): Do not create an
4019         actual subtype for a mutable record return type if the expression
4020         is itself a function call.
4022 2015-10-20  Dmitriy Anisimkov  <anisimko@adacore.com>
4024         * s-atocou.adb, s-atocou-builtin.adb: Fix implementation description
4025         related to new type support.
4027 2015-10-20  Ed Schonberg  <schonberg@adacore.com>
4029         * sem_res.adb (Resolve_Explicit_Dererence): Call Analyze_Dimension
4030         to propagate dimension information from prefix.
4031         * sem_dim.adb (Analyze_Dimension): Handle Explicit_Dereference.
4032         * inline.ads: minor whitespace fix in comment
4033         * sem_ch6.adb: minor gramar fix in comment
4035 2015-10-20  Hristian Kirtchev  <kirtchev@adacore.com>
4037         * sem_ch3.adb (Analyze_Object_Contract):
4038         A protected type or a protected object is allowed to have a
4039         discriminated part.
4041 2015-10-20  Bob Duff  <duff@adacore.com>
4043         * sem_util.adb (Requires_Transient_Scope):
4044         Return true for mutable records if the maximum size is very large.
4046 2015-10-20  Eric Botcazou  <ebotcazou@adacore.com>
4048         * a-except-2005.adb (To_Stderr): Import Put_Char_Stderr with
4049         the same signature as in System.IO.Put.
4051 2015-10-20  Bob Duff  <duff@adacore.com>
4053         * a-cobove.adb (Set_Length): Restore previous logic, but with "Checks
4054         and then" on the check.
4056 2015-10-20  Ed Schonberg  <schonberg@adacore.com>
4058         * par-ch3.adb (P_Known_Discriminant_Part_Opt): Handle properly
4059         a misplaced "constant" keyword in a discriminant specification.
4061 2015-10-20  Steve Baird  <baird@adacore.com>
4063         * einfo.ads (Is_Param_Block_Component_Type): New function decl
4064         for querying the flag.
4065         (Set_Is_Param_Block_Component_Type): New procedure decl for setting
4066         the flag.
4067         * einfo.adb (Is_Param_Block_Component_Type): New function body.
4068         (Set_Is_Param_Block_Component_Type): New procedure body.
4069         (Write_Entity_Flags): Display the new flag.
4070         * exp_ch9.adb (Build_Parameter_Block): Set flag on parameter
4071         block component types.
4072         (Expand_N_Entry_Declaration): Set flag on parameter block component
4073         types.
4075 2015-10-20  Steve Baird  <baird@adacore.com>
4077         * sem_elab.adb: Do not pass an N_Attribute_Reference node to
4078         Sinfo.Set_No_Elaboration_Check.
4079         * sem_elab.adb (Check_Elab_Call) Do not pass a non-call
4080         node (specifically, an N_Attribute_Reference node) to
4081         Sinfo.Set_No_Elaboration_Check.
4083 2015-10-20  Tristan Gingold  <gingold@adacore.com>
4085         * adaint.c: File names are case sensitive on aarch64-ios.
4087 2015-10-20  Bob Duff  <duff@adacore.com>
4089         * a-cbdlli.ads, a-cbhase.ads, a-cbmutr.ads, a-cborse.ads,
4090         * a-cdlili.ads, a-cidlli.ads, a-cihase.ads, a-cimutr.ads,
4091         * a-ciorse.ads, a-cobove.ads, a-cohase.ads, a-coinve.ads,
4092         * a-comutr.ads, a-convec.ads, a-coorse.ads: Use non-private with clause.
4094 2015-10-20  Hristian Kirtchev  <kirtchev@adacore.com>
4096         * exp_util.adb (Requires_Cleanup_Actions): A loop parameter does not
4097         require finalization actions.
4099 2015-10-20  Ed Schonberg  <schonberg@adacore.com>
4101         * par-ch3.adb (P_Declarative_Items): In case of misplaced
4102         aspect specifications, ensure that flag Done is properly set to
4103         continue parse.
4105 2015-10-20  Hristian Kirtchev  <kirtchev@adacore.com>
4107         * rtsfind.ads Remove the entries for Ada.Synchronous_Task_Control
4108         and Suspension_Object from tables RE_Id, RE_Unit_Table and RTU_Id.
4109         * sem_util.adb (Is_Descendant_Of_Suspension_Object): Update
4110         the comment on usage. Use routine Is_Suspension_Object to detect
4111         whether a type matches Suspension_Object.
4112         (Is_Suspension_Object): New routine.
4113         * snames.ads-tmpl: Add predefined names for Suspension_Object
4114         and Synchronous_Task_Control.
4116 2015-10-20  Ed Schonberg  <schonberg@adacore.com>
4118         * sem_smem.adb (Check_Shared_Var): Clean up code that handles
4119         type declarations with discriminants, remove obsolete check.
4121 2015-10-20  Arnaud Charlet  <charlet@adacore.com>
4123         * par_sco.adb: Minor style fixes.
4125 2015-10-20  Vincent Celier  <celier@adacore.com>
4127         * debug.adb: Update documentation of -gnatdu.
4129 2015-10-20  Hristian Kirtchev  <kirtchev@adacore.com>
4131         * aspects.adb Add aspect Volatile_Function to table
4132         Canonical_Aspect.
4133         * aspect.ads Add aspect Volatile_Function to tables
4134         Aspect_Argument, Aspect_Delay, Aspect_Id, Aspect_Names
4135         and Implementation_Defined_Aspect.  Aspects Async_Readers,
4136         Async_Writers, Effective_Reads and Effective_Writes are no
4137         longer Boolean.
4138         * einfo.adb (Get_Pragma): Add an entry for pragma
4139         Volatile_Function.
4140         * par-prag.adb (Prag): Pragma Volatile_Function does not need
4141         special processing by the parser.
4142         * rtsfind.ads Add an entry for Ada.Synchronous_Task_Control in
4143         table RTU_Id. Add an entry for Suspension_Object in table RE_Id.
4144         * sem_ch3.adb Fix SPARK RM references.
4145         (Analyze_Object_Contract): Update the error guard.
4146         * sem_ch5.adb Fix SPARK RM references.
4147         * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Ensure
4148         that a non-volatile function does not contain an effectively
4149         volatile parameter.
4150         (Analyze_Subprogram_Contract): Ensure
4151         that a non-volatile function does not contain an effectively
4152         volatile parameter.
4153         * sem_ch12.adb (Instantiate_Object): Remove the reference to
4154         the SPARK RM from the error message.
4155         * sem_ch13.adb (Analyze_Aspect_Specifications): Add
4156         processing for aspects Async_Readers, Async_Writers,
4157         Effective_Reads, Effective_Writes and Volatile_Function.
4158         (Check_Aspect_At_Freeze_Point): Aspects Async_Readers,
4159         Async_Writers, Effective_Reads, Effective_Writes and
4160         Volatile_Function do not need special processing at the freeze
4161         point.
4162         * sem_prag.adb Add an entry for pragma Volatile_Function in
4163         table Sig_Flags.
4164         (Analyze_External_Property_In_Decl_Part):
4165         Reimplemented as Async_Readers, Async_Writers, Effective_Reads
4166         and Effective_Writes are no longer Boolean pragmas.
4167         (Analyze_Global_Item): An external state or effectively
4168         volatile object cannot appear as an item in pragma
4169         [Refined_]Global.
4170         (Analyze_Pragma): Change the implementation
4171         of Async_Readers, Async_Writers, Effective_Reads and
4172         Effective_Writes as these are no longer Boolean pragmas.
4173         Use routine Check_Static_Boolean_Expression to verify the
4174         optional Boolean expression of Async_Readers, Async_Writers,
4175         Constant_After_Elaboration, Effective_Reads, Effective_Writes,
4176         Extensions_Visible and Volatile_Function.  Add processing for
4177         pragma Volatile_Function.
4178         (Check_Static_Boolean_Expression): New routine.
4179         (Find_Related_Context): Update the comment on usage.
4180         (Is_Enabled_Pragma): New routine.
4181         * sem_prag.ads (Is_Enabled_Pragma): New routine.
4182         * sem_res.adb Fix SPARK RM references.
4183         (Is_OK_Volatile_Context): Add detection for return statements.
4184         (Resolve_Actuals): Remove the check concerning an effectively volatile
4185         OUT actual parameter as this is now done by the SPARK flow analyzer.
4186         (Resolve_Entity_Name): Remove the check concerning an effectively
4187         volatile OUT formal parameter as this is now done by the SPARK
4188         flow analyzer.  (Within_Volatile_Function): New routine.
4189         * sem_util.adb (Add_Contract_Item): Add processing for pragma
4190         Volatile_Function.
4191         (Check_Nonvolatile_Function_Profile): New routine.
4192         (Is_Descendant_Of_Suspension_Object): New routine.
4193         (Is_Effectively_Volatile): Protected types and descendants of
4194         Suspension_Object are now treated as effectively volatile.
4195         (Is_Enabled): The optional Boolean expression of pragmas
4196         Async_Readers, Async_Writers, Effective_Reads and Effective_Writes
4197         now appears as the first argument.
4198         (Is_Volatile_Function): New routine.
4199         * sem_util.ads Add SPARK RM references.
4200         (Add_Contract_Item): Update the comment on usage.
4201         (Check_Nonvolatile_Function_Profile): New routine.
4202         (Is_Effectively_Volatile): Update the comment on usage.
4203         (Is_Volatile_Function): New routine.
4204         * snames.ads-tmpl Add a predefined name and pragma id for
4205         Volatile_Function.
4207 2015-10-20  Arnaud Charlet  <charlet@adacore.com>
4209         * gnat_ugn.texi, gnat_rm.texi: Regenerate.
4210         * doc/gnat_ugn/gnat_project_manager.rst,
4211         doc/gnat_ugn/building_executable_programs_with_gnat.rst,
4212         doc/gnat_ugn/the_gnat_compilation_model.rst,
4213         doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
4214         doc/gnat_rm/implementation_defined_pragmas.rst,
4215         doc/gnat_rm/the_gnat_library.rst,
4216         doc/gnat_rm/implementation_defined_characteristics.rst: Update doc.
4218 2015-10-20  Arnaud Charlet  <charlet@adacore.com>
4220         * gcc-interface/Makefile.in: Update targets.
4222 2015-10-20  Bob Duff  <duff@adacore.com>
4224         * sem_ch13.adb (Analyze_One_Aspect): Avoid
4225         analyzing the expression in a 'Disable_Controlled attribute when
4226         Expander_Active is False, because otherwise, we get errors about
4227         nonstatic expressions in pragma-Preelaborate generic packages.
4228         * restrict.ads: minor whitespace cleanup in comment
4230 2015-10-20  Bob Duff  <duff@adacore.com>
4232         * a-conhel.adb: Remove "use SAC;", because otherwise the compiler
4233         complains about use clauses in run-time units. Use "use type"
4234         instead.
4235         * a-btgbso.adb, a-btgbso.ads, a-cbdlli.adb, a-cbdlli.ads,
4236         * a-cbhama.adb, a-cbhama.ads, a-cbhase.adb, a-cbhase.ads,
4237         * a-cbmutr.adb, a-cbmutr.ads, a-cborma.adb, a-cborma.ads,
4238         * a-cborse.adb, a-cborse.ads, a-cdlili.adb, a-cdlili.ads,
4239         * a-chtgbk.adb, a-chtgbk.ads, a-chtgbo.adb, a-chtgbo.ads,
4240         * a-chtgke.adb, a-chtgke.ads, a-chtgop.adb, a-chtgop.ads,
4241         * a-cidlli.adb, a-cidlli.ads, a-cihama.adb, a-cihama.ads,
4242         * a-cihase.adb, a-cihase.ads, a-cimutr.adb, a-cimutr.ads,
4243         * a-ciorma.adb, a-ciorma.ads, a-ciormu.adb, a-ciormu.ads,
4244         * a-ciorse.adb, a-ciorse.ads, a-cobove.adb, a-cobove.ads,
4245         * a-cohama.adb, a-cohama.ads, a-cohase.adb, a-cohase.ads,
4246         * a-cohata.ads, a-coinve.adb, a-comutr.adb, a-comutr.ads,
4247         * a-convec.adb, a-coorma.adb, a-coorma.ads, a-coormu.adb,
4248         * a-coormu.ads, a-coorse.adb, a-coorse.ads, a-crbltr.ads,
4249         * a-crbtgk.adb, a-crbtgk.ads, a-crbtgo.adb, a-crbtgo.ads,
4250         * a-rbtgbk.adb, a-rbtgbk.ads, a-rbtgbo.adb, a-rbtgbo.ads,
4251         * a-rbtgso.adb, a-rbtgso.ads: Change all the predefined containers
4252         to share the tampering machinery in Ada.Containers.Helpers. This
4253         reduces the amount of duplicated code, and takes advantage of
4254         efficiency improvements in Helpers.
4255         Protect all run-time checks and supporting machinery with "if
4256         Checks" or "if T_Check", so this code can be suppressed with
4257         pragma Suppress or -gnatp.
4258         Add Pseudo_Reference and Get_Element_Access to remaining
4259         containers, so that the compiler can optimize "for ... of" loops.
4261 2015-10-20  Bob Duff  <duff@adacore.com>
4263         * a-contai.adb, a-coinve.ads, a-contai.ads, a-conhel.adb, a-conhel.ads,
4264         Makefile.rtl, a-convec.ads: Move helper code from Ada.Containers to a
4265         new package Ada.Containers.Helpers, because otherwise it's not
4266         visible everywhere it needs to be (e.g. in the package
4267         Ada.Containers.Red_Black_Trees, Generic_Tree_Types wants to have
4268         a component of type Tamper_Counts).
4270 2015-10-20  Ed Schonberg  <schonberg@adacore.com>
4272         * sem_type.adb (Intersect_Types): Specialize error message when
4273         one operand is a limited view which is a priori incompatible
4274         with all other named types.
4275         * sem_prag.adb: minor fix in comment
4276         * sem_ch13.adb: Code clean up.
4278 2015-10-20  Eric Botcazou  <ebotcazou@adacore.com>
4280         * sem_ch12.adb (Need_Subprogram_Instance_Body): Also return true
4281         for a subprogram nested in an inlined subprogram.
4283 2015-10-20  Bob Duff  <duff@adacore.com>
4285         * a-coinve.adb, a-contai.adb: Update comments.
4286         * pprint.ads: Minor reformatting.
4288 2015-10-20  Tristan Gingold  <gingold@adacore.com>
4290         * env.c, init.c: Handle arm64-darwin like arm-darwin.
4291         * tracebak.c: Handle arm64-darwin.
4293 2015-10-20  Bob Duff  <duff@adacore.com>
4295         * s-trasym.adb (Symbolic_Traceback): When giving the traceback
4296         as hexadecimal code addresses, separate by blanks instead of LF.
4298 2015-10-20  Ed Schonberg  <schonberg@adacore.com>
4300         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Generate freeze
4301         node for subprogram in Compile_Only mode.
4303 2015-10-20  Dmitriy Anisimkov  <anisimko@adacore.com>
4305         * s-atocou.adb, s-atocou.ads, a-contai.adb, a-contai.ads,
4306         s-atocou-x86.adb, s-atocou-builtin.adb: Task safe over container
4307         iterations.
4309 2015-10-20  Philippe Gil  <gil@adacore.com>
4311         * g-debpoo.ads (Dump): NEW print Debug_Pool statistics & main
4312         contributors.
4313         (Dump_Stdout): NEW print to stdout Debug_Pool statistics &
4314         main contributors.
4315         (Reset): NEW reset counters to 0.
4316         (Get_Size): NEW return size allocated at parameter.
4317         (High_Water_Mark): NEW.
4318         (Current_Water_Mark): NEW.
4319         (System_Memory_Debug_Pool): NEW tell Debug_Pools that
4320         System.Memory uses it.
4321         * g-debpoo.adb (Traceback_Htable_Elem): add Frees, Total_Frees
4322         components.
4323         (Find_Or_Create_Traceback): don't manage in System.Memory
4324         Debug_Pool Deallocate Traceback's.
4325         (Validity): add optional Handled table when System.Memory asked
4326         for Allow_Unhandled_Memory.
4327         (Allocate): handle Allocate reentrancy occuring when System.Memory
4328         uses Debug_Pools.
4329         (Deallocate): handle when Allow_Unhandled_Memory
4330         is set deallocation of unhandled memory. Dont't check
4331         Size_In_Storage_Elements if equal to Storage_Count'Last. update
4332         Frees, Total_Frees new components.
4334 2015-10-20  Eric Botcazou  <ebotcazou@adacore.com>
4336         * fe.h: Minor tweak.
4338 2015-10-20  Vincent Celier  <celier@adacore.com>
4340         * sem_cat.adb (Check_Categorization_Dependencies): Do nothing
4341         when -gnatdu is specified.
4343 2015-10-20  Ed Schonberg  <schonberg@adacore.com>
4345         * sem_ch8.adb (analyze_Subprogram_Renaming): The actual for a
4346         formal abstract subprogram must have a controlling type.
4347         * stand.ads: Minor whitespace cleanup.
4349 2015-10-20  Gary Dismukes  <dismukes@adacore.com>
4351         * sem_ch13.adb: Minor reference change (RM => AARM).
4353 2015-10-20  Eric Botcazou  <ebotcazou@adacore.com>
4355         * make.adb (Check): Skip multilib switches reinstated by the
4356         compiler only when counting the number of switches, since it is
4357         what really matters in the regular operating mode.
4359 2015-10-20  Arnaud Charlet  <charlet@adacore.com>
4361         * einfo.adb: Add extra assertion for small clause.
4362         * cstand.adb: Minor style fix in comment.
4363         * debug.adb: Minor reformatting.
4364         * exp_util.adb: Fix minor typo.
4366 2015-10-20  Ed Schonberg  <schonberg@adacore.com>
4368         * sem_ch12.adb (Same_Instantiated_Function): New predicate in
4369         Check_Formal_Package_Instance, used to verify that the formal
4370         and the actual of an actual package match when both are functions
4371         given as attribute references.
4373 2015-10-20  Bob Duff  <duff@adacore.com>
4375         * a-coinve.ads, a-coinve.adb: Do the same efficiency
4376         improvements that were already done in the definite case
4377         (Ada.Containers.Vectors, i.e. a-convec). This includes the
4378         ability to suppress checks, the fast path for Append, inlining
4379         as appropriate, and special-casing of "for ... of" loops. Reuse
4380         the tampering machinery that is now in Ada.Containers. Simplify
4381         many operations.
4382         * a-convec.ads, a-convec.adb: Change the code to be more similar
4383         to a-coinve.
4384         * a-finali.ads, a-finali.adb: Expose the "null"-ness of the
4385         operations. This may enable optimizations in the future, and
4386         seems cleaner anyway.
4388 2015-10-20  Ed Schonberg  <schonberg@adacore.com>
4390         * sem_ch13.adb (Is_Operational_Item): Attributes related to
4391         Ada 2012 iterators are operational items, and can be specified
4392         on partial views.
4394 2015-10-20  Hristian Kirtchev  <kirtchev@adacore.com>
4396         * sem_prag.adb (Check_Usage): Update the calls to Usage_Error.
4397         (Usage_Error): Remove formal parameter Item. Emit a clearer message
4398         concerning a missing dependency item and place it on the related pragma.
4400 2015-10-20  Bob Duff  <duff@adacore.com>
4402         * debug.adb, expander.adb: Implement -gnatd.B switch, which
4403         triggers a bug box when an abort_statement is seen. This is
4404         useful for testing Comperr.Compiler_Abort.
4405         * gnat1drv.adb: Trigger bug box on all exceptions other than
4406         Unrecoverable_Error.
4408 2015-10-20  Thomas Quinot  <quinot@adacore.com>
4410         * Makefile.rtl: add the following...
4411         * g-binenv.ads, g-binenv.adb: New unit providing runtime access
4412         to bind time captured values ("bind environment")
4413         * init.c: declare new global variable __gl_bind_env_addr.
4414         * bindgen.ads, bindgen.adb (Set_Bind_Env): record a bind
4415         environment key=value pair.
4416         (Gen_Bind_Env_String): helper to produce the bind environment data
4417         called  in the binder generated file.
4418         (Gen_Output_File_Ada): Call the above (Gen_Adainit): Set
4419         __gl_bind_env_addr accordingly.
4420         * switch-b.adb: Support for command line switch -V (user interface
4421         to set a build environment key=value pair)
4422         * bindusg.adb: Document the above
4424 2015-10-20  Vincent Celier  <celier@adacore.com>
4426         * sem_prag.adb (Analyse_Pragma: Pragma Pure): Do not set the
4427         entity as Pure if Debug_Flag_U is set.
4429 2015-10-20  Bob Duff  <duff@adacore.com>
4431         * output.adb (Write_Int): Work with negative numbers in order to avoid
4432         negating Int'First and thereby causing overflow.
4433         * sem_util.adb: Minor comment fix.
4435 2015-10-20  Eric Botcazou  <ebotcazou@adacore.com>
4437         * make.adb (Check): Skip multilib switches reinstated by the
4438         compiler when doing the comparison with switches passed to
4439         gnatmake.
4441 2015-10-20  Yannick Moy  <moy@adacore.com>
4443         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Return
4444         False for procedures marked No_Return.
4445         * sem_util.ads (Enclosing_Declaration): Improve comment.
4446         * einfo.adb (Is_Completely_Hidden): Remove spurious assertion.
4448 2015-10-20  Thomas Quinot  <quinot@adacore.com>
4450         * types.ads: Minor reformatting.
4452 2015-10-20  Hristian Kirtchev  <kirtchev@adacore.com>
4454         * einfo.adb (Get_Pragma): Minor reformatting. Rename local constant
4455         Is_CDG to Is_CLS. Add pragma Constant_After_Elaboration to the list of
4456         classification pragmas.
4458 2015-10-20  Ed Schonberg  <schonberg@adacore.com>
4460         * sem_ch3.adb (Analyze_Declarations); At the of the visible part,
4461         perform name resolution on the expressions in aspects of visible
4462         entities.
4463         * sem_ch13.ads, sem_ch13.adb (Resolve_Aspect_Expressions): Resolve
4464         expressions in aspects independently of whether corresponding
4465         entity is frozen. Used to complete name resolution of aspect
4466         expressions for entities declared in the visible part of a
4467         package or generic package declaration.
4469 2015-10-20  Vincent Celier  <celier@adacore.com>
4471         * prj-attr.adb: Add package Codepeer and its attributes.
4473 2015-10-20  Thomas Quinot  <quinot@adacore.com>
4475         * sem_ch3.adb, sem_ch13.adb: Minor reformatting.
4477 2015-10-20  Eric Botcazou  <ebotcazou@adacore.com>
4479         * gnatlink.adb (Gnatlink): Do not translate --RTS switch
4480         for the linker and instead pass the switches that were
4481         reinstated by the compiler.
4483 2015-10-20  Bob Duff  <duff@adacore.com>
4485         * a-contai.ads, a-convec.ads: Move Count_Type_Last from
4486         a-convec.ads to a-contai.ads, so other containers can refer to it.
4488 2015-10-20  Ed Schonberg  <schonberg@adacore.com>
4490         * sem_ch3.adb (Check_Nonoverridable_Aspects): New procedure within
4491         Analyze_Full_Type_ Declaration, used to apply legality rules in
4492         13,1,1 (18.3.3) concerning aspects that cannot be overridden in
4493         a type extension.
4494         (Check_Duplicate_Aspects): It is not legal to specify the
4495         Implicit_Dereference aspect on a full view if partial view has
4496         known discriminants.
4497         * sem_ch13.adb (Analyze_Aspect_Implicit_Dereference): Verify that
4498         the specification of the aspect on a derived type confirms the
4499         value of the inherited one.
4500         * sem_util.adb (Reference_Discriminant): Return empty if none
4501         specified.
4503 2015-10-20  Thomas Quinot  <quinot@adacore.com>
4505         * exp_ch5.adb, sem_ch3.adb: Minor reformatting.
4507 2015-10-20  Vincent Celier  <celier@adacore.com>
4509         * a-strsup.adb (Super_Trim): Remove statements that put NUL
4510         characters in unused portion of the Data string.
4512 2015-10-16  Hristian Kirtchev  <kirtchev@adacore.com>
4514         * aspects.adb Add an entry for Constant_After_Elaboration in
4515         table Canonical_Aspect.
4516         * aspects.ads Add entries for Constant_After_Elaboration in
4517         tables Aspect_Argument, Aspect_Delay, Aspect_Id, Aspect_Names
4518         and Implementation_Defined_Aspect.
4519         * par-prag.adb Pragma Constant_After_Elaboration does not require
4520         special processing by the parser.
4521         * sem_ch13.adb Add an entry for Constant_After_Elaboration
4522         in table Sig_Flags.
4523         (Analyze_Aspect_Specifications):
4524         Add processing for aspect Constant_After_Elaboration.
4525         (Check_Aspect_At_Freeze_Point): Aspect Constant_After_Elaboration
4526         does not require special processing at freeze time.
4527         * sem_prag.adb (Analyze_Pragma): Add processing for pragma
4528         Constant_After_Elaboration. Use routine Find_Related_Context to
4529         retrieve the context of pragma Part_Of.
4530         (Duplication_Error): Update comment on usage.
4531         (Find_Related_Context): New routine.
4532         * sem_prag.ads Add an entry for Constant_After_Elaboration
4533         in table Aspect_Specifying_Pragma.
4534         (Analyze_Contract_Cases_In_Decl_Part): Update the comment on usage.
4535         * sem_util.adb (Add_Contract_Item): Add processing for pragma
4536         Constant_After_Elaboration.
4537         * sem_util.ads (Add_Contract_Item): Update the comment on usage.
4538         * snames.ads-tmpl Add new predefined name and aspect id for
4539         Constant_After_Elaboration.
4541 2015-10-16  Vincent Celier  <celier@adacore.com>
4543         * prj-pp.adb (Pretty_Print.Print): Correctly display extending
4544         packages, instead of making them renamed packages.
4546 2015-10-16  Hristian Kirtchev  <kirtchev@adacore.com>
4548         * sem_ch12.adb (Analyze_Package_Instantiation):
4549         Treat a missing SPARK_Mode annotation as having mode "Off".
4550         (Analyze_Subprogram_Instantiation): Treat a missing SPARK_Mode
4551         annotation as having mode "Off".
4552         (Instantiate_Package_Body): Code
4553         reformatting. Treat a missing SPARK_Mode annotation as having mode
4554         "Off".
4555         (Instantiate_Subprogram_Body): Code reformatting. Treat
4556         a missing SPARK_Mode annotation as having mode "Off".
4558 2015-10-16  Ed Schonberg  <schonberg@adacore.com>
4560         * exp_ch5.adb: Code clean up.
4561         * sem_ch13.adb: Minor fix in comment.
4563 2015-10-16  Bob Duff  <duff@adacore.com>
4565         * a-exexda.adb: Change format of Exception_Information to be
4566         more like what we print for unhandled exceptions.
4567         * a-exstat.adb: Parse new format.
4568         * a-except-2005.adb, a-except.adb: Document new format.
4570 2015-10-16  Javier Miranda  <miranda@adacore.com>
4572         * sem_ch5.adb (Analyze_Iterator_Specification): Associate a
4573         transient scope with the renaming object declararation.
4574         * exp_util.adb (Insert_Actions): if the enclosing interator
4575         loop is marked as requiring the secondary stack then attach the
4576         actions to the transient scope.
4578 2015-10-16  Bob Duff  <duff@adacore.com>
4580         * exp_ch7.adb: Minor spelling fixes.
4582 2015-10-16  Ed Schonberg  <schonberg@adacore.com>
4584         * sem_ch3.adb (Replace_Anonymous_Access_To_Protected_Subprogram):
4585         If anonymous type is component type of array type declaration,
4586         analyze its declaration in the current scope, not the enclosing
4587         one.
4589 2015-10-16  Gary Dismukes  <dismukes@adacore.com>
4591         * prj.adb, sem_util.adb, exp_ch6.adb: Minor reformatting.
4593 2015-10-16  Ed Schonberg  <schonberg@adacore.com>
4595         * exp_ch5.adb (Expand_Formal_Container_Element_Loop): Modify
4596         expansion to allow element iteration over formal containers
4597         whose elements are indefinite types.
4599 2015-10-16  Doug Rupp  <rupp@adacore.com>
4601         * s-taprop-linux.adb (Monotonic_Clock): Call clock_gettime
4602         instead of gettimeofday.
4603         * s-osinte-android.ads, s-osinte-android.adb, s-osinte-linux.ads
4604         (clock_gettime): New imported subprogram.
4606 2015-10-16  Hristian Kirtchev  <kirtchev@adacore.com>
4608         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
4609         Indefinite or limited library level objects are now returned on
4610         the heap.
4611         * exp_ch7.adb (Build_Finalization_Master): Add formal
4612         parameter For_Lib_Level. Add context specific insertion for a
4613         finalization master created for an access result type related
4614         to a build-in-place function call used to initialize a library
4615         level object.
4616         * exp_ch7.ads (Build_Finalization_Master): Add formal parameter
4617         For_Lib_Level. Update the comment on usage.
4618         * sem_util.adb (Mark_Coextensions): Code cleanup.
4620 2015-10-16  Emmanuel Briot  <briot@adacore.com>
4622         * prj.adb (For_Every_Project_Imported_Context): Fix handling
4623         of aggregated projects with duplicate names.
4624         * a-ngelfu.ads: Minor whitespace fix.
4626 2015-10-16  Ed Schonberg  <schonberg@adacore.com>
4628         * sem_ch13.adb (Build_Predicate_Functions): The expression for
4629         the predicate is side-effect free if it does not contain any
4630         variable references.
4632 2015-10-16  Bob Duff  <duff@adacore.com>
4634         * a-convec.adb ("="): Previous version depended
4635         on "=" composing, but that doesn't quite work -- we want the "="
4636         operator passed in to the generic. So we need a loop after all.
4638 2015-10-16  Yannick Moy  <moy@adacore.com>
4640         * sem_util.adb (Is_Object_Reference): Attribute 'Loop_Entry produces
4641         an object.
4642         * sem_ch6.adb: Minor fix in comment.
4644 2015-10-16  Bob Duff  <duff@adacore.com>
4646         * a-contai.ads: Add two check names: Container_Checks and
4647         Tampering_Check.  Move the tampering check machinery from
4648         Ada.Containers.Vectors to Ada.Containers. Later we can share it
4649         with other containers.
4650         Disable the tampering machinery in the presence of
4651         Suppress(Tampering_Check).
4652         Simplify the implementation of tampering checks. E.g. use RAII
4653         to make incrementing/decrementing of the counts more concise.
4654         * a-contai.adb: New package body, implementing the above.
4655         * a-convec.ads, a-convec.adb: Use tampering check machinery
4656         in Ada.Containers.
4657         Disable all checking code when checks are suppressed.
4658         Simplify many of the operations. Implement "&" in terms of Append,
4659         rather than "by hand".
4660         Remove: function "=" (L, R : Elements_Array) return Boolean is
4661         abstract; so we can call the predefined "=" on Elements_Array.
4662         For "=" on Vectors: Previously, we returned True immediately if
4663         Left'Address = Right'Address.  That seems like a non-optimization
4664         ("if X = X" is unusual), so removed that.  Simplify by using
4665         slice comparison ("=" on Element_Array will automatically call
4666         "=" on the components, even if user defined).
4668 2015-10-16  Ed Schonberg  <schonberg@adacore.com>
4670         * sem_ch13.adb (Chek_Record_Representation_Clause): When
4671         iterating over components, skip anonymous subtypes created for
4672         constrained array components.
4674 2015-10-16  Eric Botcazou  <ebotcazou@adacore.com>
4676         * a-tags.ads (Parent_Size): Remove obsolete pragma Export.
4677         * s-finmas.ads (Header_Offset): Delete.
4678         * s-finmas.adb (Header_Offset): Likewise.
4679         (Finalize): Call Header_Size instead of Header_Offset.
4680         * s-stposu.adb (Allocate_Any_Controlled): Likewise.
4681         (Deallocate_Any_Controlled): Likewise.
4683 2015-10-16  Arnaud Charlet  <charlet@adacore.com>
4685         * a-exetim.ads, a-exetim-mingw.ads, a-exetim-default.ads: Whitespace
4686         cleanup.
4687         * s-osprim-mingw.adb, einfo.ads, sem_util.adb, sem_util.ads,
4688         sem_ch4.adb, sem_ch13.adb, s-trasym.adb, s-trasym.ads,
4689         s-taprop-posix.adb: Minor reformatting.
4691 2015-10-16  Bob Duff  <duff@adacore.com>
4693         * adadecode.h, adadecode.c (ada_demangle): Remove
4694         ada_demangle, no longer used.
4695         * a-except-2005.adb: Bring System.Traceback.Symbolic into the
4696         closure.
4698 2015-10-16  Ed Schonberg  <schonberg@adacore.com>
4700         * sem_util.adb, sem_util.ads (Get_Reference_Discriminant): Utility to
4701         locate the access discriminant that supports implicit dereference on a
4702         record type.
4703         (Is_OK_Variable_For_Out_Parameter): Reject other illegal uses
4704         of Implicit_Dereference on an access_to_constant when actual
4705         parameter is a rewritten variable or function call.
4707 2015-10-16  Bob Duff  <duff@adacore.com>
4709         * a-tags.adb, s-trasym.adb, s-trasym.ads: Make sure we don't get
4710         elaboration circularities when polling is turned on.
4712 2015-10-16  Ed Schonberg  <schonberg@adacore.com>
4714         * sem_ch3.adb (Replace_Anonymous_Access_To_Protected_Subprogram):
4715         When creating a full declaration for a formal parameter, the
4716         entity is labelled as an Itype, so set Associated_Node_For_Itype
4717         accordingly.
4718         * einfo.ads: Clarify use of Associated_Node_For_Itype.
4720 2015-10-16  Bob Duff  <duff@adacore.com>
4722         * bindgen: Move pragmas Warnings earlier, otherwise
4723         we can get warnings on with_clauses.
4725 2015-10-16  Arnaud Charlet  <charlet@adacore.com>
4727         * s-osprim-mingw.adb, s-osprim-x32.adb, s-taprop-mingw.adb,
4728         s-taprop-posix.adb (Monotonic_Clock): Removed, not used.
4729         Remove remaining references to OS_Primitives.Monotonic_Clock.
4730         Keep it only on windows which is a special case.
4732 2015-10-16  Javier Miranda  <miranda@adacore.com>
4734         * a-textio.adb (Get_Line): Fix documentation.
4735         * einfo.ads (Interface_Name): Fix documentation.
4736         * exp_aggr.adb (Backend_Processing_Possible): Fix documentation.
4737         * exp_ch4.adb (Expand_N_In): Fix documentation.
4739 2015-10-16  Eric Botcazou  <ebotcazou@adacore.com>
4741         * inline.adb (Subp_Info): Remove Listed component.
4742         (Add_Inlined_Subprogram): Take an entity instead of an index.
4743         Do not set Listed component to True.
4744         (New_Entry): Do not initialize Listed component to False.
4745         (Analyze_Inlined_Bodies): Do not test Listed component
4746         (Must_Inline): Add calls not in the main unit only
4747         if they are in a subprogram that can be inlined outside its unit.
4748         (Add_Inlined_Body): Move test around and add comment.
4750 2015-10-16  Arnaud Charlet  <charlet@adacore.com>
4752         * sinfo.ads, einfo.ads: monir clean ups.
4754 2015-10-16  Arnaud Charlet  <charlet@adacore.com>
4756         * usage.adb, debug.adb, a-except.adb, a-except.ads, a-except-2005.adb,
4757         a-except-2005.ads, s-imgrea.adb: Minor code clean ups related to
4758         jgnat/dotnet removal.
4760 2015-10-16  Arnaud Charlet  <charlet@adacore.com>
4762         * s-osprim-vxworks.adb, s-osprim-darwin.adb, s-tadeca.adb,
4763         s-osprim-unix.adb, s-osprim-solaris.adb, s-osprim-posix.adb,
4764         s-osprim.ads (Monotonic_Clock): Removed, unused.
4766 2015-10-16  Ed Schonberg  <schonberg@adacore.com>
4768         * sem_ch4.adb (Try_Object_Operation, Try_One_Interpretation):
4769         Do not reset the Obj_Type of the prefix if an interpretation
4770         involves an untagged type, to prevent a crash when analyzing an
4771         illegal program in All_Errors mode.
4773 2015-10-16  Hristian Kirtchev  <kirtchev@adacore.com>
4775         * exp_ch4.adb (Expand_N_Expression_With_Actions):
4776         Force the evaluation of the expression when its type is Boolean.
4777         (Force_Boolean_Evaluation): New routine.
4779 2015-10-16  Bob Duff  <duff@adacore.com>
4781         * sem_util.adb (Has_Discrim_Dep_Array): Remove
4782         this function, and the call. No longer needed now that the back
4783         end can handle such things. Should result in further speedups
4784         in some cases.
4786 2015-10-16  Ed Schonberg  <schonberg@adacore.com>
4788         * sem_ch13.adb (Build_Predicate_Functions): If expression for
4789         predicate is side-effect free, indicate that the predicate
4790         function is pure, to allow for optimization of redundant
4791         predicate checks.
4793 2015-10-16  Arnaud Charlet  <charlet@adacore.com>
4795         * checks.adb: Fix typo.
4796         * s-osinte-linux.ads: Add header.
4797         * projects.texi: Removed, no longer used.
4798         * gcc-interface/Make-lang.in: Update dependencies
4799         * s-multip.adb: Minor: fix header.
4800         * sem_ch3.adb, exp_ch7.adb, g-dirope.ads, sinfo.ads, types.ads,
4801         a-textio.adb, s-exctra.adb, ali.adb, back_end.ads, exp_intr.adb,
4802         a-tigeli.adb, exp_ch3.adb, s-os_lib.ads: Remove further references to
4803         .NET.
4804         * gnatlink.adb, opt.ads, exp_aggr.adb, s-solita.adb: Minor comment
4805         updates.
4807 2015-10-16  Gary Dismukes  <dismukes@adacore.com>
4809         * exp_ch9.adb (Build_Simple_Entry_Call): Set_Is_Internal on
4810         the temporary object used for a by-copy entry parameter, to
4811         ensure that the object doesn't get its No_Initialization flag
4812         reset later in Default_Initialize_Object. Also, generate the
4813         assignment of the actual to the temporary in the additional case
4814         of a scalar out parameter whose type has a Default_Value aspect.
4815         * exp_ch3.adb: Fix minor typo in comment.
4817 2015-10-16  Hristian Kirtchev  <kirtchev@adacore.com>
4819         * exp_util.adb, sem_util.ads, sem_ch6.adb, sem_ch7.adb, sem_ch8.adb:
4820         Minor reformatting.
4821         * sem_ch12.adb (Analyze_Formal_Package_Declaration): Set the
4822         SPARK_Mode from the context.
4824 2015-10-16  Bob Duff  <duff@adacore.com>
4826         * sem_util.adb (Requires_Transient_Scope):
4827         If Typ is a generic formal incomplete type, look at the actual
4828         type. Otherwise, we don't notice that the actual type is tagged,
4829         has a variant part, etc, causing a mismatch of calling conventions
4830         between caller and callee.
4832 2015-10-16  Hristian Kirtchev  <kirtchev@adacore.com>
4834         * einfo.ads: Move the declaration of enumeration
4835         literal E_Abstract_State above E_Entry.  Update the upper bound
4836         of subtype Overloadable_Kind.
4838 2015-10-16  Gary Dismukes  <dismukes@adacore.com>
4840         * exp_attr.adb: Minor editorial changes.
4842 2015-10-16  Arnaud Charlet  <charlet@adacore.com>
4844         * exp_ch5.adb, sem_ch3.adb, frontend.adb, exp_ch7.adb, exp_ch7.ads,
4845         sem_ch5.adb, sem_type.adb, exp_util.adb, exp_util.ads, comperr.adb,
4846         exp_attr.adb, sinfo.ads, exp_ch9.adb, make.adb, usage.adb,
4847         lib-writ.adb, sem_ch9.adb, bindgen.adb, debug.adb, einfo.adb,
4848         einfo.ads, types.ads, checks.adb, sem_prag.adb, s-tasini.adb,
4849         rtsfind.ads, freeze.adb, sem_util.adb, sem_util.ads, exp_dbug.adb,
4850         gnatlink.adb, gnat1drv.adb, targparm.adb, targparm.ads, exp_ch4.adb,
4851         exp_ch11.adb, repinfo.adb, s-soflin.adb, s-soflin.ads, exp_ch6.adb,
4852         exp_ch13.adb, sem_mech.adb, sem_ch6.adb, par-prag.adb, exp_disp.adb,
4853         sem_ch8.adb, exp_disp.ads, snames.adb-tmpl, exp_aggr.adb, sem_eval.adb,
4854         exp_intr.adb, sem_ch13.adb, snames.ads-tmpl, sem_disp.adb, exp_ch3.adb:
4855         Code clean up: remove special handling for .NET and JVM.
4857 2015-10-16  Arnaud Charlet  <charlet@adacore.com>
4859         * sem_ch12.adb: Minor punctuation fix in comment
4860         * s-rident.ads: Minor consistency fix in comment
4861         * exp_attr.adb, g-spipat.ads: punctuation fixes in comments.
4862         * restrict.ads: Style fix in comments.
4863         * sem_prag.adb: Minor grammar fix in comment
4865 2015-10-16  Gary Dismukes  <dismukes@adacore.com>
4867         * sem_ch12.adb: Minor reformatting/rewording.
4869 2015-10-16  Arnaud Charlet  <charlet@adacore.com>
4871         * einfo.ads: Minor fix of duplicate words
4872         * rident.ads: Minor style fix in comment
4874 2015-10-16  Hristian Kirtchev  <kirtchev@adacore.com>
4876         * exp_ch3.adb (Expand_N_Full_Type_Declaration): Do not capture,
4877         set and restore the Ghost mode.
4878         (Expand_N_Object_Declaration): Do not capture, set and restore the
4879         Ghost mode.
4880         (Freeze_Type): Redo the capture and restore of the Ghost mode.
4881         (Restore_Globals): Removed.
4882         * exp_ch5.adb (Expand_N_Assignment_Statement): Redo the capture
4883         and restore of the Ghost mode.
4884         (Restore_Globals): Removed.
4885         * exp_ch6.adb (Expand_N_Procedure_Call_Statement):
4886         Redo the capture and restore of the Ghost mode.
4887         (Expand_N_Subprogram_Body): Redo the capture, set and restore
4888         of the Ghost mode.
4889         (Expand_N_Subprogram_Declaration): Do not
4890         capture, set and restore the Ghost mode.
4891         (Restore_Globals): Removed.
4892         * exp_ch7.adb (Expand_N_Package_Body): Redo the capture, set
4893         and restore of the Ghost mode.
4894         (Expand_N_Package_Declaration): Do not capture, set and restore the
4895         Ghost mode.
4896         * exp_ch8.adb (Expand_N_Exception_Renaming_Declaration):
4897         Redo the capture and restore of the Ghost mode.
4898         (Expand_N_Object_Renaming_Declaration): Redo
4899         the capture and restore of the Ghost mode.
4900         (Expand_N_Package_Renaming_Declaration):
4901         Redo the capture and restore of the Ghost mode.
4902         (Expand_N_Subprogram_Renaming_Declaration): Redo the capture
4903         and restore of the Ghost mode.
4904         * exp_ch11.adb Remove with and use clauses for Ghost.
4905         (Expand_N_Exception_Declaration): Do not capture, set and restore
4906         the Ghost mode.
4907         * exp_disp.adb (Make_DT): Redo the capture and restore of the
4908         Ghost mode.
4909         (Restore_Globals): Removed.
4910         * exp_prag.adb (Expand_Pragma_Check): Do not capture, set
4911         and restore the Ghost mode.
4912         (Expand_Pragma_Contract_Cases):
4913         Redo the capture and restore of the Ghost mode.  Preserve the
4914         original context of contract cases by setting / resetting the
4915         In_Assertion_Expr counter.
4916         (Expand_Pragma_Initial_Condition):
4917         Redo the capture and restore of the Ghost mode.
4918         (Expand_Pragma_Loop_Variant): Redo the capture and restore of
4919         the Ghost mode.
4920         (Restore_Globals): Removed.
4921         * exp_util.adb (Make_Predicate_Call): Redo the capture and
4922         restore of the Ghost mode.
4923         (Restore_Globals): Removed.
4924         * freeze.adb (Freeze_Entity): Redo the capture and restore of
4925         the Ghost mode.
4926         (Restore_Globals): Removed.
4927         * ghost.adb (Check_Ghost_Context): Remove the RM reference from
4928         the error message.
4929         (Is_OK_Statement): Account for statements
4930         that appear in assertion expressions.
4931         (Is_Subject_To_Ghost):
4932         Moved from spec.
4933         * ghost.ads (Is_Subject_To_Ghost): Moved to body.
4934         * rtsfind.ads (Load_RTU): Redo the capture and restore of the
4935         Ghost mode.
4936         * sem.adb Add with and use clauses for Ghost.
4937         (Analyze): Redo
4938         the capture and restore of the Ghost mode. Set the Ghost mode
4939         when analyzing a declaration.
4940         (Do_Analyze): Redo the capture
4941         and restore of the Ghost mode.
4942         * sem_ch3.adb (Analyze_Full_Type_Declaration): Do not capture, set
4943         and restore the Ghost mode.
4944         (Analyze_Incomplete_Type_Decl):
4945         Do not capture, set and restore the Ghost mode.
4946         (Analyze_Number_Declaration): Do not capture, set and restore the
4947         Ghost mode.
4948         (Analyze_Object_Declaration): Do not capture, set and
4949         restore the Ghost mode.
4950         (Analyze_Private_Extension_Declaration):
4951         Do not capture, set and restore the Ghost mode.
4952         (Analyze_Subtype_Declaration): Do not capture, set and restore
4953         the Ghost mode.
4954         (Restore_Globals): Removed.
4955         * sem_ch5.adb (Analyze_Assignment): Redo the capture and restore
4956         of the Ghost mode.
4957         (Restore_Globals): Removed.
4958         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration):
4959         Do not capture, set and restore the Ghost mode.
4960         (Analyze_Procedure_Call): Redo the capture and restore of the
4961         Ghost mode.
4962         (Analyze_Subprogram_Body_Helper): Redo the capture
4963         and restore of the Ghost mode.  (Analyze_Subprogram_Declaration):
4964         Do not capture, set and restore the Ghost mode.
4965         (Restore_Globals): Removed.
4966         * sem_ch7.adb (Analyze_Package_Body_Helper): Redo the capture and
4967         restore of the Ghost mode.
4968         (Analyze_Package_Declaration):
4969         Do not capture, set and restore the Ghost mode.
4970         (Analyze_Private_Type_Declaration): Do not capture, set and
4971         restore the Ghost mode.
4972         (Restore_Globals): Removed.
4973         * sem_ch8.adb (Analyze_Exception_Renaming): Do not capture,
4974         set and restore the Ghost mode.
4975         (Analyze_Generic_Renaming): Do not capture, set and restore the Ghost
4976         mode.
4977         (Analyze_Object_Renaming): Do not capture, set and restore the
4978         Ghost mode.
4979         (Analyze_Package_Renaming): Do not capture, set and restore the Ghost
4980         mode.
4981         (Analyze_Subprogram_Renaming): Do not capture, set and restore the
4982         Ghost mode.
4983         (Restore_Globals): Removed.
4984         * sem_ch11.adb (Analyze_Exception_Declaration): Do not capture,
4985         set and restore the Ghost mode.
4986         * sem_ch12.adb (Analyze_Generic_Package_Declaration):
4987         Do not capture, set and restore the Ghost mode.
4988         (Analyze_Generic_Subprogram_Declaration): Do not capture, set
4989         and restore the Ghost mode.
4990         * sem_ch13.adb (Build_Invariant_Procedure_Declaration): Redo
4991         the capture and restore of the Ghost mode.
4992         * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
4993         Redo the capture and restore of the Ghost mode.
4994         (Analyze_External_Property_In_Decl_Part):
4995         Redo the capture and restore of the Ghost mode.
4996         (Analyze_Initial_Condition_In_Decl_Part): Redo the
4997         capture and restore of the Ghost mode.  (Analyze_Pragma):
4998         Do not capture, set and restore the Ghost mode for Assert.
4999         Redo the capture and restore of the Ghost mode for Check. Do
5000         not capture and restore the Ghost mode for Invariant.
5001         (Analyze_Pre_Post_Condition_In_Decl_Part): Redo the capture and
5002         restore of the Ghost mode.
5003         * sem_res.adb (Resolve): Capture, set and restore the Ghost mode
5004         when resolving a declaration.
5005         * sem_util.adb (Build_Default_Init_Cond_Procedure_Body):
5006         Redo the capture and restore of the Ghost mode.
5007         (Build_Default_Init_Cond_Procedure_Declaration): Redo the capture
5008         and restore of the Ghost mode.
5010 2015-10-16  Bob Duff  <duff@adacore.com>
5012         * debug.adb: Document -gnatdQ switch.
5014 2015-10-16  Ed Schonberg  <schonberg@adacore.com>
5016         * sem_ch12.adb (Analyze_Formal_Subprogram): Implement rule that
5017         a formal abstract subprogram cannot have a null default: RM 12.6
5018         (4 1.2).
5020 2015-10-16  Bob Duff  <duff@adacore.com>
5022         * sem_util.ads, sinput.ads, bcheck.adb: Minor comment fixes.
5024 2015-10-16  Javier Miranda  <miranda@adacore.com>
5026         * inline.adb (Add_Inlined_Body): Ensure that
5027         Analyze_Inlined_Bodies will be invoked after completing the
5028         analysis of the current unit.
5030 2015-10-16  Arnaud Charlet  <charlet@adacore.com>
5032         * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order): Fix error
5033         message for bad last bit position.
5034         * sem_ch3.adb, sem_util.adb, sem_util.ads: Minor reformatting.
5036 2015-10-16  Ed Schonberg  <schonberg@adacore.com>
5038         * exp_ch5.adb (Expand_N_Case_Statement): If expression is
5039         compile-time known but does not obey a static predicate on
5040         its type, replace the case statement with a raise statement,
5041         as with other statically detected constraint violations.
5043 2015-10-16  Bob Duff  <duff@adacore.com>
5045         * s-traceb.adb, s-traceb.ads, s-traceb-hpux.adb, s-traceb-mastop.adb:
5046         Reinstate code.
5047         * opt.ads: Minor typo.
5049 2015-10-16  Ed Schonberg  <schonberg@adacore.com>
5051         * sem_util.adb (Gather_Components): When gathering components
5052         of a nested variant, the record type used in legality checks is
5053         the enclosing record type.
5055 2015-10-13  Jakub Jelinek  <jakub@redhat.com>
5057         * gcc-interface/utils.c (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
5058         DEF_FUNCTION_TYPE_11): Define.
5060 2015-10-09  Eric Botcazou  <ebotcazou@adacore.com>
5062         * gcc-interface/Make-lang.in: Make sure that GNAT1_OBJS and not just
5063         GNAT1_ADA_OBJS are compiled only after generated files are created.
5065 2015-10-05  Richard Sandiford  <richard.sandiford@arm.com>
5067         * gcc-interface/trans.c (convert_with_check): Use real_arithmetic
5068         instead of REAL_ARITHMETIC.
5070 2015-10-05  Richard Sandiford  <richard.sandiford@arm.com>
5072         * gcc-interface/trans.c (convert_with_check): Use real_less instead
5073         of REAL_VALUES_LESS.
5075 2015-10-02  Doug Rupp  <rupp@adacore.com>
5076             Olivier Hainque  <hainque@adacore.com>
5078         * gcc-interface/lang.opt (fbuiltin-printf): Accept.
5079         * gcc-interface/misc.c (gnat_handle_option): Ignore it.
5080         * gcc-interface/lang-specs.h (@ada, @adawhy, @adascil): Propagate -f*
5081         flags as -g* and -m* flags past -gnatez.
5083 2015-10-02  Eric Botcazou  <ebotcazou@adacore.com>
5085         * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Warnings>: Replace
5086         linear search with call to find_opt and issue warnings if the -W
5087         switch is not appropriate.
5089 2015-10-02  Eric Botcazou  <ebotcazou@adacore.com>
5091         * gcc-interface/ada-tree.h (DECL_RESTRICTED_ALIASING_P): New flag.
5092         * gcc-interface/decl.c (gnat_to_gnu_param): For parameters passed by
5093         reference but whose type isn't by-ref and whose mechanism hasn't been
5094         forced to by-ref, set the DECL_RESTRICTED_ALIASING_P flag directly on
5095         them instead of changing their type.
5096         * gcc-interface/trans.c (scan_rhs_r): New helper function.
5097         (independent_iterations_p): New predicate.
5098         (Loop_Statement_to_gnu): For a loop with an iteration scheme, set an
5099         ivdep pragma if the iterations are independent.
5101 2015-10-02  Eric Botcazou  <ebotcazou@adacore.com>
5103         * gcc-interface/trans.c (find_loop_for): Use FOR_EACH_VEC_ELT_REVERSE.
5104         (Loop_Statement_to_gnu): Use FOR_EACH_VEC_ELT.
5105         (finalize_nrv): Use FOR_EACH_VEC_SAFE_ELT and initialize field.
5106         (build_stmt_group): Add blank lines.
5108 2015-09-30  Thomas Schwinge  <thomas@codesourcery.com>
5110         * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_11): Don't define.
5112 2015-09-28  Tom de Vries  <tom@codesourcery.com>
5114         * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_6): Define.
5116 2015-09-17  Eric Botcazou  <ebotcazou@adacore.com>
5118         * gcc-interface/trans.c (emit_check): Do not touch TREE_SIDE_EFFECTS.
5120 2015-09-14  Pierre-Marie de Rodat  <derodat@adacore.com>
5122         * gcc-interface/misc.c (gnat_post_options): Issue a warning if
5123         generating STABS debugging information when not the default.
5125 2015-09-14  Eric Botcazou  <ebotcazou@adacore.com>
5127         * gcc-interface/gigi.h (ref_filename): Delete.
5128         (Sloc_to_locus): Add clean_column parameter defaulting to false.
5129         (build_call_raise): Adjust comment.
5130         (build_call_raise_range): Move around.
5131         * gcc-interface/trans.c (ref_filename): Delete.
5132         (gigi): Fix formatting.
5133         (block_end_locus_sink): Delete.
5134         (Sloc_to_locus1): Tidy up and reformat.  Rename into...
5135         (Sloc_to_locus): ...this.  Add default for clean_colmun parameter.
5136         (set_expr_location_from_node1): Rename into...
5137         (set_expr_location_from_node): ...this.
5138         (set_end_locus_from_node): Move around.  Adjust for renaming.
5139         (Handled_Sequence_Of_Statements_to_gnu): Likewise.
5140         (add_cleanup): Likewise.
5141         * gcc-interface/utils2.c (expand_sloc): New static function.
5142         (build_call_raise): Call it.
5143         (build_call_raise_column): Likewise.
5144         (build_call_raise_range): Likewise.  Move around.
5146 2015-09-14  Eric Botcazou  <ebotcazou@adacore.com>
5148         * gcc-interface/utils2.c (gnat_rewrite_reference) <COMPOUND_EXPR>: Add
5149         another acceptable pattern for the RHS.
5151 2015-07-24  Micahel Darling  <darlingm@gmail.com>
5153         PR other/66259
5154         * prj-nmsc.adb: Reflects renaming of configure.in to configure.ac
5155         * gcc-interface/Makefile.in: Likewise
5157 2015-07-12  Aldy Hernandez  <aldyh@redhat.com>
5159         * gcc-interface/utils.c: Fix double word typos.
5160         * gnat_ugn.texi: Same.
5161         * init.c: Same.
5162         * par.adb: Same.
5163         * projects.texi: Same.
5164         * sem_ch4.adb: Same.
5165         * sem_ch6.adb: Same.
5166         * sem_dim.adb: Same.
5167         * sem_eval.adb: Same.
5168         * sem_prag.adb: Same.
5169         * sem_warn.adb: Same.
5171 2015-07-07  Andrew MacLeod  <amacleod@redhat.com>
5173         * gcc-interface/cuintp.c: Adjust includes.
5174         * gcc-interface/decl.c: Likewise.
5175         * gcc-interface/misc.c: Likewise.
5176         * gcc-interface/targtyps.c: Likewise.
5177         * gcc-interface/trans.c: Likewise.
5178         * gcc-interface/utils.c: Likewise.
5179         * gcc-interface/utils2.c: Likewise.
5181 2015-07-06  John Marino  <gnugcc@marino.st>
5183         * s-oscons-tmplt.c: Add support for DragonFly alongside FreeBSD.
5185 2015-06-29  Eric Botcazou  <ebotcazou@adacore.com>
5187         PR ada/63310
5188         * gcc-interface/utils.c (gnat_write_global_declarations): Always
5189         build the dummy global variable if code was generated.
5191 2015-06-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
5193         PR fortran/66605
5194         * gcc-interface/misc.c (gnat_post_options): No need to disable
5195         warn_unused_parameter anymore.
5197 2015-06-26  Eric Botcazou  <ebotcazou@adacore.com>
5199         * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): When
5200         not optimizing the CFG, clear the DECL_DECLARED_INLINE_P flag on the
5201         at-end procedures.
5203 2015-06-26  Eric Botcazou  <ebotcazou@adacore.com>
5205         * gcc-interface/gigi.h (note_types_used_by_globals): Delete.
5206         (gnat_write_global_declarations): New prototype.
5207         * gcc-interface/utils.c (type_decls): Rename back to...
5208         (global_decls): ...this.
5209         (gnat_pushdecls): Revert previous change.
5210         (create_var_decl): Do not output global variables.
5211         (note_types_used_by_globals): Rename back to...
5212         (gnat_write_global_declarations): ...this.  Output variables on the
5213         global_decls vector.
5214         * gcc-interface/misc.c (gnat_parse_file): Adjust to above renaming.
5216 2015-06-26  Eric Botcazou  <ebotcazou@adacore.com>
5218         * gcc-interface/gigi.h (create_var_decl_1): Rename into...
5219         (create_var_decl): ...this.  Add default value for last parameter.
5220         (create_type_stub_decl): Adjust.
5221         (create_type_decl): Likewise.
5222         (create_field_decl): Likewise.
5223         (create_param_decl): Likewise.
5224         (create_label_decl): Likewise.
5225         (create_subprog_decl): Likewise.
5226         * gcc-interface/utils.c (create_var_decl_1): Rename into...
5227         (create_var_decl): ...this.  Rename var_name into name and var_init
5228         into init, move const_decl_allowed_p last and adjust accordingly.
5229         (create_type_stub_decl): Rename type_name into name and adjust.
5230         (create_type_decl): Likewise.
5231         (create_field_decl): Likewise for field_name and field_type.
5232         (create_param_decl): Likewise for param_name and param_type.
5233         (create_label_decl): Likewise for label_name.
5234         (create_subprog_decl): Likewise for subprog_name and subprog_type.
5235         * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust couple of calls
5236         to create_var_decl_1.
5238 2015-06-26  Eric Botcazou  <ebotcazou@adacore.com>
5240         * gcc-interface/trans.c (loop_info_d): Add low_bound, high_bound,
5241         artificial, has_checks and warned_aggressive_loop_optimizations.
5242         (gigi): Set warn_aggressive_loop_optimizations to 0.
5243         (inside_loop_p): New inline predicate.
5244         (push_range_check_info): Rename into...
5245         (find_loop_for): ...this and do not push range_check_info_d object.
5246         (Loop_Statement_to_gnu): Set artificial, low_bound and high_bound
5247         fields of gnu_loop_info.  Adjust detection of checks enabled by
5248         -funswitch-loops and adds one for -faggressive-loop-optimizations.
5249         (gnat_to_gnu) <N_Indexed_Component>: If aggressive loop optimizations
5250         are enabled, warn for loops overrunning an array of size 1 not at the
5251         end of a record.
5253 2015-06-25  Andrew MacLeod  <amacleod@redhat.com>
5255         * gcc-interface/trans.c: Remove ipa-ref.h and plugin-api.h from include
5256         list.
5257         * gcc-interface/utils.c: Likewise.
5259 2015-06-25  Richard Sandiford  <richard.sandiford@arm.com>
5261         * gcc-interface/decl.c (value_annotation_hasher): Inherit from
5262         ggc_cache_ptr_hash rather than ggc_cache_hasher.
5263         * gcc-interface/utils.c (pad_type_hasher): Likewise.
5265 2015-06-25  Richard Sandiford  <richard.sandiford@arm.com>
5267         * gcc-interface/decl.c (value_annotation_hasher::handle_cache_entry):
5268         Delete.
5269         (value_annotation_hasher::keep_cache_entry): New function.
5270         * gcc-interface/utils.c (pad_type_hasher::handle_cache_entry):
5271         Delete.
5272         (pad_type_hasher::keep_cache_entry): New function.
5274 2015-06-25  Andrew MacLeod  <amacleod@redhat.com>
5276         * gcc-interface/misc.c: Include calls.h not function.h.
5278 2015-06-19  Eric Botcazou  <ebotcazou@adacore.com>
5280         * gcc-interface/gigi.h (record_builtin_type): Adjust comment.
5281         (tree create_type_decl): Likewise.
5282         (create_var_decl_1): Add artificial_p and debug_info_p parameters.
5283         (create_var_decl): Likewise.
5284         (create_true_var_decl): Delete.
5285         (create_subprog_decl): Add debug_info_p parameter.
5286         * gcc-interface/decl.c (gnat_to_gnu_entity): Add artificial_p local
5287         variable and use it throughout.  Remove DECL_ARTIFICIAL settings.
5288         <E_Variable>: Adjust calls to create_var_decl and create_var_decl_1.
5289         Remove DECL_IGNORED_P settings.
5290         <E_Enumeration_Type>: Likewise.
5291         <E_Record_Type>: Likewise.
5292         <E_Subprogram_Type>: Likewise.  Remove artificial_flag local variable.
5293         Adjust call to create_subprog_decl.
5294         (get_minimal_subprog_decl): Likewise.
5295         (elaborate_expression_1): Adjust call to create_var_decl.
5296         * gcc-interface/trans.c (gigi): Adjust calls to create_var_decl and
5297         create_subprog_decl.  Remove DECL_ARTIFICIAL & DECL_IGNORED_P settings.
5298         * gcc-interface/utils.c (maybe_pad_type): Likewise.
5299         (record_builtin_type): Adjust comment.
5300         (create_type_stub_decl): Remove obsolete comment.
5301         (create_var_decl_1): Add artificial_p and debug_info_p parameters.
5302         Set DECL_ARTIFICIAL and DECL_IGNORED_P accordingly.
5303         (create_subprog_decl): Add debug_info_p parameter.  Set DECL_IGNORED_P
5304         accordingly.
5306 2015-06-19  Eric Botcazou  <ebotcazou@adacore.com>
5308         * gcc-interface/misc.c (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): Define.
5310 2015-06-19  Eric Botcazou  <ebotcazou@adacore.com>
5312         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Make sure
5313         the size of a padding type built around the return type is positive.
5314         * gcc-interface/trans.c (gnat_to_gnu) <N_Simple_Return_Statement>:
5315         Use INIT_EXPR instead of MODIFY_EXPR to assign to the return object.
5317 2015-06-17  Andrew MacLeod  <amacleod@redhat.com>
5319         * gcc-interface/cuintp.c: Do not include input.h, line-map.h or is-a.h.
5320         * gcc-interface/decl.c: Likewise.
5321         * gcc-interface/misc.c: Likewise.
5322         * gcc-interface/targtyps.c: Likewise.
5323         * gcc-interface/trans.c: Likewise.
5324         * gcc-interface/utils.c: Likewise.
5325         * gcc-interface/utils2.c: Likewise.
5327 2015-06-11  Pierre-Marie de Rodat  <derodat@adacore.com>
5329         * gcc-interface/utils.c (get_global_context): Register the main
5330         translation unit through the new debug hook.
5332 2015-06-09  Eric Botcazou  <ebotcazou@adacore.com>
5334         * gcc-interface/misc.c: Remove duplicate include directives.
5335         * gcc-interface/trans.c: Likewise.
5336         * gcc-interface/utils.c: Likewise.
5338 2015-06-08  Andrew MacLeod  <amacleod@redhat.com>
5340         * gcc-interface/cuintp.c : Adjust include files.
5341         * gcc-interface/decl.c : Likewise.
5342         * gcc-interface/misc.c : Likewise.
5343         * gcc-interface/targtyps.c : Likewise.
5344         * gcc-interface/trans.c : Likewise.
5345         * gcc-interface/utils.c : Likewise.
5346         * gcc-interface/utils2.c : Likewise.
5348 2015-06-08  John Marino  <gnugcc@marino.st>
5350         * a-intnam-dragonfly.ads: New.
5351         * s-osinte-dragonfly.adb: Likewise.
5352         * s-osinte-dragonfly.ads: Likewise.
5353         * system-dragonfly-x86_64.ads: Likewise.
5354         * adaint.c: Add BSD macros.
5355         * cstreams.c: Likewise.
5356         * gsocket.h: Likewise.
5357         * link.c: Likewise.
5358         * socket.c: Likewise.
5359         * env.c: Add __DragonFly__, remove __FreeBSD__ macro.
5360         * init.c: Add __DragonFly__, change __gnat_install_handler
5361         prototype from empty to void.
5362         * initialize.c: Add __DragonFly__.
5363         * sysdep.c: Likewise.
5364         * s-osinte-freebsd.adb: Use __get_errno instead of __error.
5365         * tracebak.c: Set unwinder for i386 BSD.
5366         * gcc-interface/Makefile.in: Add x86_64 DragonFly, tweak
5367         x86_64 FreeBSD and x86 FreeBSD.
5369 2015-06-06  Eric Botcazou  <ebotcazou@adacore.com>
5371         * gcc-interface/utils.c (note_types_used_by_globals): Tweak comment.
5372         * gcc-interface/decl.c (gnat_to_gnu_entity): Likewise.
5374 2015-06-05  Aldy Hernandez  <aldyh@redhat.com>
5376         * gcc-interface/gigi.h (note_types_used_by_globals): Rename from
5377         gnat_write_global_declarations.
5378         * gcc-interface/misc.c (gnat_parse_file): Call
5379         note_types_used_by_globals.
5380         Remove LANG_HOOKS_WRITE_GLOBALS.
5381         * gcc-interface/utils.c: Rename global_decls to type_decls.
5382         (gnat_write_global_declarations): Rename
5383         to note_types_used_by_globals.
5384         Remove call to finalize_compilation_unit.
5385         Remove call to debug_hooks->global_decl for globals.
5386         (gnat_pushdecls): Only insert into type_decls if TYPE_DECL.
5388 2015-06-04  Andrew MacLeod  <amacleod@redhat.com>
5390         * gcc-interface/cuintp.c: Adjust includes for restructured coretypes.h.
5391         * gcc-interface/decl.c: Likewise.
5392         * gcc-interface/misc.c: Likewise.
5393         * gcc-interface/targtyps.c: Likewise.
5394         * gcc-interface/trans.c: Likewise.
5395         * gcc-interface/utils.c: Likewise.
5396         * gcc-interface/utils2.c: Likewise.
5398 2015-06-04  Pierre-Marie de Rodat  <derodat@adacore.com>
5400         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: If
5401         processing a definition, create definitions for padding types
5402         around return types.
5404 2015-06-03  Eric Botcazou  <ebotcazou@adacore.com>
5406         * gcc-interface/utils.c (copy_type): Also set TYPE_CANONICAL.
5408 2015-06-03  Eric Botcazou  <ebotcazou@adacore.com>
5410         * gcc-interface/trans.c (gnat_to_gnu) <N_Simple_Return_Statement>: Fix
5411         typo in latest change.
5413 2015-06-01  Eric Botcazou  <ebotcazou@adacore.com>
5415         * gcc-interface/Makefile.in: Fix ARM/Darwin configuration.
5417 2015-06-01  Pierre-Marie de Rodat  <derodat@adacore.com>
5419         * gcc-interface/utils.c (scale_by_factor_of): When handling a function
5420         call expression, process the corresponding function body.  Also handle
5421         potential addends.
5423 2015-06-01  Pierre-Marie de Rodat  <derodat@adacore.com>
5425         * gcc-interface/decl.c (gnat_to_gnu_entity): Replace pointer types with
5426         references ones for functions that return references.
5428 2015-06-01  Eric Botcazou  <ebotcazou@adacore.com>
5430         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: For a
5431         definition of a type coming from a limited_with, get to the full view
5432         if it is not in the main code unit.
5434 2015-06-01  Eric Botcazou  <ebotcazou@adacore.com>
5436         * gcc-interface/utils.c (create_var_decl_1): If an assembler name is
5437         specified, let the target mangle it before settting.
5438         (create_subprog_decl): Likewise and move this treatment last.
5440 2015-06-01  Eric Botcazou  <ebotcazou@adacore.com>
5442         * gcc-interface/lang-specs.h (TARGET_VXWORKS_RTP): Move substitution to
5443         before first -gnatez switch.  Simplify and add trailing space.
5445 2015-06-01  Eric Botcazou  <ebotcazou@adacore.com>
5447         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: If the
5448         record has a parent field and a representation clause, make sure that
5449         it is properly aligned.
5451 2015-06-01  Eric Botcazou  <ebotcazou@adacore.com>
5453         * gcc-interface/trans.c (lvalue_required_p) <N_Indexed_Component>: Deal
5454         with character and enumeration literals as index values.
5456 2015-06-01  Eric Botcazou  <ebotcazou@adacore.com>
5458         * gcc-interface/gigi.h (build_simple_component_ref): Declare.
5459         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Deal with
5460         address clause on aliased object with unconstrained nominal subtype.
5461         Mark the aligning variable as artificial, do not convert the address
5462         expression immediately but mark it as constant instead.
5463         * gcc-interface/utils.c (convert): If the target type contains a
5464         template, be prepared for an empty array.
5465         (maybe_unconstrained_array): Likewise.
5466         * gcc-interface/utils2.c (known_alignment) <POINTER_PLUS_EXPR>: Deal
5467         with the pattern built for aligning types.
5468         <INTEGER_CST>: Do not cap the value at BIGGEST_ALIGNMENT.
5469         (build_simple_component_ref): Make public.
5470         If the base object is a constructor that contains a template, fold the
5471         result field by field.
5473 2015-05-31  Eric Botcazou  <ebotcazou@adacore.com>
5475         * s-oscons-tmplt.c: Add explicit tests for Android alongside Linux.
5477 2015-05-30  Eric Botcazou  <ebotcazou@adacore.com>
5479         * adaint.c: Test for __linux__ instead of linux and __sun__ instead
5480         of sun.  Add missing leading underscore to AIX.  Remove #elif 0.
5481         * adaint.h: Likewise.
5482         * cio.c: Likewise.
5483         * cstreams.c: Likewise.
5484         * env.c: Likewise.
5485         * gsocket.h: Likewise.
5486         * init.c: Likewise.  Test for __i386__ instead of i386.
5487         * link.c: Likewise.
5488         * s-oscons-tmplt.c: Likewise.
5489         * sysdep.c: Likewise.
5490         * terminals.c: Likewise.  Use BSD symbol instead of FREEBSD.
5491         * tracebak.c: Likewise.  Test for __sparc__ instead of sparc.
5493 2015-05-28  Eric Botcazou  <ebotcazou@adacore.com>
5495         * gcc-interface/utils.c (max_size) <tcc_binary>: Add special code to
5496         deal with the subtraction of a "negative" value in an unsigned type.
5498 2015-05-28  Eric Botcazou  <ebotcazou@adacore.com>
5500         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Do
5501         not error out on a return type which has a size that overflows if the
5502         return is done by invisible reference.
5504 2015-05-28  Eric Botcazou  <ebotcazou@adacore.com>
5506         * gcc-interface/utils.c (gnat_pushdecl): Reunify the handling of array
5507         and pointer types wrt DECL_ORIGINAL_TYPE and adjust left and right.
5509 2015-05-28  Eric Botcazou  <ebotcazou@adacore.com>
5511         * gcc-interface/gigi.h (gnat_stabilize_reference): Adjust.
5512         (rewrite_fn): Remove third parameter.
5513         (type_is_padding_self_referential): New inline predicate.
5514         (return_type_with_variable_size_p): Likewise.
5515         * gcc-interface/decl.c (allocatable_size_p): More around.
5516         (cannot_be_superflat_p): Rename into...
5517         (cannot_be_superflat ): ...this.
5518         (initial_value_needs_conversion): New predicate.
5519         (gnat_to_gnu_entity): Invoke type_is_padding_self_referential,
5520         initial_value_needs_conversion and adjust to above renaming.
5521         For a renaming, force the materialization if the inner expression
5522         is compound.  Adjust calls to elaborate_reference and build a
5523         compound expression if needed.
5524         (struct er_dat): Add N field.
5525         (elaborate_reference_1): Remove N parameter and adjust.
5526         (elaborate_reference): Add INIT parameter and pass it in the call to
5527         gnat_rewrite_reference.  Adjust initial expression.
5528         * gcc-interface/trans.c (Call_to_gnu): Treat renamings the same way as
5529         regular object declarations when it comes to creating a temporary.
5530         Adjust call to gnat_stabilize_reference and build a compound expression
5531         if needed.  Invoke return_type_with_variable_size_p.
5532         (gnat_to_gnu): Invoke type_is_padding_self_referential.  In case #4,
5533         return a call to a function unmodified if it returns with variable size
5534         and is also the initial expression in an object declaration.
5535         * gcc-interface/utils2.c (build_binary_op) <INIT_EXPR>: Use the RHS'
5536         type if it is a call to a function that returns with variable size.
5537         (build_unary_op): Invoke type_is_padding_self_referential.
5538         (gnat_stabilize_reference_1): Remove N parameter and adjust.
5539         (gnat_stabilize_reference): Add INIT parameter and pass it in the call
5540         to gnat_rewrite_reference.
5541         (gnat_rewrite_reference):  Remove N, add INIT parameter and adjust.
5542         <COMPOUND_EXPR>: New case.
5544 2015-05-28  Ed Schonberg  <schonberg@adacore.com>
5546         * sem_ch3.adb (Is_Visible_Component): Component is visible
5547         in a derived type if inherited through an ancestor that has a
5548         partial view of the original type holding the component, if the
5549         full view of that original type is in scope.
5550         * sem_util.ads (Get_Body_From_Stub): Works for all kinds of stubs.
5552 2015-05-28  Bob Duff  <duff@adacore.com>
5554         * sem_util.adb (Requires_Transient_Scope): For definite untagged
5555         subtypes, we should never have to use the secondary stack. This moves
5556         toward that goal. But there are still cases that don't work.
5557         Here, we move the check for Is_Definite first, but add a
5558         special-purpose check for Has_Discrim_Dep_Array.
5560 2015-05-28  Bob Duff  <duff@adacore.com>
5562         * sem_util.adb (Requires_Transient_Scope): Avoid returning
5563         function results on the secondary stack in so many cases.
5565 2015-05-28  Ed Schonberg  <schonberg@adacore.com>
5567         * sem_util.adb (Wrong_Type): In any instance, do not emit error
5568         if type of expression is the partial view of the expected type.
5570 2015-05-28  Ed Schonberg  <schonberg@adacore.com>
5572         * sem_res.adb (Resolve_Actuals): a)  The replacement of formal
5573         names in named associations only needs to be done within an
5574         instance, on a call to a primitive of a formal derived type,
5575         where the actual subprogram may have different formal names than
5576         those of the primitive operation of the formal type.
5577         b) Defaulted parameters must be taken into account when obtaining
5578         the names of the formals of the actual subprogram being called.
5580 2015-05-28  Robert Dewar  <dewar@adacore.com>
5582         * sem_ch13.adb, sem_disp.ads: Minor reformatting.
5584 2015-05-28  Ed Schonberg  <schonberg@adacore.com>
5586         * sem_util.adb (Set_Debug_Info_Needed): For a private type
5587         whose full view is itself a derived private type, set flag on
5588         underlying full view as well, for proper gdb display.
5590 2015-05-28  Bob Duff  <duff@adacore.com>
5592         * exp_tss.ads: Minor comment fix.
5593         * exp_ch3.adb (Build_Array_Init_Proc, Build_Record_Init_Proc):
5594         Inline init_procs when the type has controlled parts. Remove
5595         obsolete comments about those init_procs -- init_procs for
5596         such types are no longer complex. A typical init_proc just
5597         initializes the 'Tag field, and calls the parent init_proc
5598         (e.g. for Limited_Controlled), which calls the grandparent
5599         (for Root_Controlled), which does nothing. This all boils down
5600         to one instruction when inlined.
5601         * exp_ch7.adb (Create_Finalizer): Inline the finalizer.
5603 2015-05-28  Ed Schonberg  <schonberg@adacore.com>
5605         * sem_ch4.adb (Analyze_Selected_Component): If the type to use
5606         is a derived type and is a generic actual, the selected component
5607         appears within an instance body, and the check over the type
5608         has failed, examine ancestor types for the desired component.
5609         (Find_Component_In_Instance): If record type is a derived type,
5610         examine all ancestors in order to locate desired component.
5612 2015-05-27  H.J. Lu  <hongjiu.lu@intel.com>
5614         * gcc-interface/Makefile.in (TOOLS_LIBS): Add @NO_PIE_FLAG@.
5616 2015-05-27  Eric Botcazou  <ebotcazou@adacore.com>
5618         * gcc-interface/trans.c (elaborate_all_entities): Do not elaborate an
5619         incomplete type coming from a limited_with and whose non-limited view
5620         comes from the main unit.
5622 2015-05-27  Eric Botcazou  <ebotcazou@adacore.com>
5624         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Move down
5625         code applying atomic checks to the object.
5627 2015-05-27  Robert Dewar  <dewar@adacore.com>
5629         * sem_aux.adb: Minor rewording.
5631 2015-05-27  Bob Duff  <duff@adacore.com>
5633         * exp_prag.adb (Expand_Pragma_Abort_Defer): Make
5634         pragma Abort_Defer do nothing if Abort_Allowed is False.
5636 2015-05-27  Arnaud Charlet  <charlet@adacore.com>
5638         * exp_ch9.adb, sem_util.adb, sem_util.ads, s-stposu.adb, s-spsufi.ads,
5639         sem_elab.ads, g-comlin.ads, errout.ads, exp_ch6.adb, sem_ch4.adb,
5640         opt.ads, s-bignum.adb, output.ads, sem_ch13.adb, erroutc.ads,
5641         sem_disp.ads, exp_ch3.adb: Minor fixes of duplicate words in comments.
5643 2015-05-27  Doug Rupp  <rupp@adacore.com>
5645         * adaint.c (__gnat_tmp_name) [vxworks]: Robustify and use for rtp as
5646         well as kernel.
5648 2015-05-27  Pierre-Marie de Rodat  <derodat@adacore.com>
5650         * par_sco.adb (Process_Decision): Store sloc to
5651         condition/pragmas SCOs associations into a temporary table before
5652         moving them to the SCO_Raw_Hash_Table so that we can back them
5653         out just like we do for SCO entries that are simple decisions
5654         in an expression context.
5656 2015-05-27  Ed Schonberg  <schonberg@adacore.com>
5658         * sem_ch6.adb (Process_Formals): A non-private formal type that
5659         is a limited view does not have a list of private dependents.
5661 2015-05-27  Ed Schonberg  <schonberg@adacore.com>
5663         * exp_ch5.adb (Expand_N_Case_Statement): If the expression in
5664         the case statement is a compile-time known value, we look for a
5665         corresponding alternative to optimize the case statement into a
5666         single case. If the type has a static predicate and the expression
5667         does not satisfy the predicate, there is no legal alternative and
5668         this optimization is not applicable.  Excecution is erroneous,
5669         or else if assertions are enabled, an exception will be raised
5670         earlier, at the point the expression is elaborated.
5672 2015-05-27  Robert Dewar  <dewar@adacore.com>
5674         * sem_elab.adb (Check_Internal_Call_Continue): Suppress
5675         warning on Finalize, Adjust, or Initialize if type involved has
5676         Warnings_Off set.
5678 2015-05-27  Ed Schonberg  <schonberg@adacore.com>
5680         * sem_aux.adb, sem_aux.ads (First_Discriminant): Return empty when
5681         applied to a type with no known discriminants.
5683 2015-05-26  Robert Dewar  <dewar@adacore.com>
5685         * errout.ads, sem_ch4.adb, sem_ch6.adb: Minor reformatting.
5687 2015-05-26  Bob Duff  <duff@adacore.com>
5689         * sem_elab.adb (Check_A_Call): In the case where we're
5690         calling something in an instance of a generic package that is
5691         within this same unit (as the call), make sure we treat it
5692         as a call to an entity within the same unit. That is, call
5693         Check_Internal_Call, rather than putting "Elaborate_All(X)"
5694         on X, which would necessarily result in an elaboration cycle in
5695         static-elaboration mode.
5697 2015-05-26  Eric Botcazou  <ebotcazou@adacore.com>
5699         * freeze.ads (Is_Atomic_VFA_Aggregate): Adjust profile.
5700         * freeze.adb (Is_Atomic_VFA_Aggregate): Change Entity
5701         parameter into Node parameter and remove Type parameter.
5702         Look at Is_Atomic_Or_VFA both on the type and on the object.
5703         (Freeze_Entity): Adjust call to Is_Atomic_VFA_Aggregate.
5704         * exp_aggr.adb (Expand_Record_Aggregate): Likewise.
5705         (Process_Atomic_Independent_Shared_Volatile): Remove code
5706         propagating Atomic or VFA from object to locally-defined type.
5708 2015-05-26  Bob Duff  <duff@adacore.com>
5710         * exp_ch7.adb: Minor comment fix.
5712 2015-05-26  Eric Botcazou  <ebotcazou@adacore.com>
5714         * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Min/Attr_Max>: Do not
5715         bother about NaN's if Machine_Overflows is true.
5717 2015-05-26  Eric Botcazou  <ebotcazou@adacore.com>
5719         * gcc-interface/trans.c (gnat_to_gnu) <N_Object_Declaration>: Really
5720         force evaluation of the expression, if any, when the object has its
5721         elaboration delayed.  Do not create a variable at global level.
5723 2015-05-26  Eric Botcazou  <ebotcazou@adacore.com>
5725         * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Machine>: Do not apply
5726         extra-precision trick to literals.  Build SAVE_EXPR manually.
5728         * gcc-interface/misc.c (enumerate_modes): Add bypass for x86/x86-64.
5730 2015-05-26  Eric Botcazou  <ebotcazou@adacore.com>
5732         * gcc-interface/ada-tree.h (DECL_GLOBAL_NONCONSTANT_RENAMING_P): Delete
5733         (DECL_RENAMED_OBJECT): Adjust comment.
5734         * gcc-interface/gigi.h (record_global_nonconstant_renaming): Delete.
5735         (invalidate_global_nonconstant_renamings): Likewise.
5736         (gnat_constant_reference_p): Likewise.
5737         (rewrite_fn): New function type.
5738         (gnat_rewrite_reference): Declare.
5739         (call_is_atomic_load): New inline predicate.
5740         * gcc-interface/decl.c (elaborate_reference_1): New function.
5741         (elaborate_reference): Likewise.
5742         (gnat_to_gnu_entity): Call elaborate_reference to elaborate renamings
5743         and simplify associated code.  Set const_flag to true consistently in
5744         conjunction with used_by_ref.
5745         * gcc-interface/trans.c (Identifier_to_gnu): Always replace renaming
5746         pointers by renamed objects.
5747         (outer_atomic_access_required_p): Deal with renamings.
5748         (Compilation_Unit_to_gnu): Do not call
5749         invalidate_global_nonconstant_renamings.
5750         (gnat_to_gnu) <N_Object_Renaming_Declaration>: Adjust comment.
5751         (gnat_gimplify_expr): Deal with atomic loads.
5752         * gcc-interface/utils.c (global_nonconstant_renamings): Delete.
5753         (destroy_gnat_utils): Do not call
5754         invalidate_global_nonconstant_renamings.
5755         (record_global_nonconstant_renaming): Delete.
5756         (invalidate_global_nonconstant_renamings): Likewise.
5757         * gcc-interface/utils2.c (call_is_atomic_load): Move to gigi.h.
5758         (build_load_modify_store): Build a copy of the destination.
5759         (gnat_stabilize_reference_1): Adjust.
5760         (gnat_stabilize_reference): Call gnat_stabilize_reference_1 through
5761         gnat_rewrite_reference and move bulk of code to...
5762         (gnat_rewrite_reference): ...here.  New global function.
5763         (gnat_constant_reference_p): Delete.
5765 2015-05-26  Eric Botcazou  <ebotcazou@adacore.com>
5767         * gcc-interface/gigi.h (gnat_stabilize_reference): Adjust prototype.
5768         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not rely on const_flag
5769         to detect constant renamings.  Be prepared for specific pattern of
5770         renamed object based on function calls.  Create a constant object
5771         for the renaming of a NULL_EXPR or of a CONSTRUCTOR.  Adjust calls
5772         to gnat_stabilize_reference and tidy up.  Remove redundant tests.
5773         (elaborate_expression_1): Remove obsolete test and tidy up.
5774         * gcc-interface/trans.c (Call_to_gnu): Do not stabilize In/Out or Out
5775         parameters passed by reference.
5776         (gnat_to_gnu) <N_Selected_Component>: Remove redundant protection again
5777         side-effects.
5778         Use gnat_protect_expr instead of gnat_stabilize_reference for general
5779         protection against side-effects.
5780         * gcc-interface/utils2.c (gnat_stable_expr_p): New predicate.
5781         (gnat_save_expr): Invoke it.
5782         (gnat_protect_expr): Likewise.
5783         (gnat_stabilize_reference_1): Likewise.  Remove useless propagation
5784         of TREE_THIS_NOTRAP.
5785         (gnat_stabilize_reference): Remove parameter and adjust throughout.
5786         Delete ADDR_EXDR, COMPOUND_EXPR and CONSTRUCTOR cases.
5787         Restrict CALL_EXPR case to atomic loads and tweak ERROR_MARK case.
5789 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
5791         * sinfo.ads: Minor reformatting.
5792         * sem_aux.ads: Clarify use of First_Discriminant.
5793         * sem_ch4.adb (Analyze_Explicit_Dereference): The use of a limited
5794         view is replaced with the non-limited view in an instance body,
5795         where the enclosing unit must have a regular with_clause on the
5796         relevant unit.
5797         * sem_ch12.adb (Install_Body): Freeze instantation after its
5798         body. Remove useless freeze nodes for incomplete actuals to
5799         prevent multiple generation of internal operations.
5800         (Instantiate_Package_Body): Set sloc of body appropriately when
5801         there are incomplete actuals and the instance body is placed in
5802         the body of the enclosing unit.
5803         * errout.ads: Consistent punctuation, better alignment and trivial
5804         typos in comments.
5805         * err_vars.ads: Fix typo.
5807 2015-05-26  Eric Botcazou  <ebotcazou@adacore.com>
5809         * sem_ch8.adb (Analyze_Object_Renaming): Lift restriction on
5810         components of Volatile_Full_Access objects.
5812 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
5814         * sem_ch6.adb (Is_Non_Overriding_Operation,
5815         Get_Generic_Parent_Type): Handle properly the case of a derived
5816         scalar type by using the first subtype rather than its generated
5817         anonymous base type.
5819 2015-05-26  Eric Botcazou  <ebotcazou@adacore.com>
5821         * einfo.adb (Write_Field17_Name): Move E_Incomplete_Subtype
5822         case to...
5823         (Write_Field19_Name): ...here.
5825 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
5827         * sem_ch13.adb: sem_ch13.adb (Add_Predicates): Undo analysis
5828         of original expression in ASIS mode: does not solve the ASIS
5829         problem of a usable type information, and crashes the back-end
5830         when performing type annotations.
5832 2015-05-26  Robert Dewar  <dewar@adacore.com>
5834         * sem_disp.adb (Inherited_Subprograms): Add One_Only parameter.
5835         (Is_Overriding_Subprogram): Use One_Only_Parameter.
5836         * sem_disp.ads (Inherited_Subprograms): Add One_Only parameter.
5838 2015-05-26  Robert Dewar  <dewar@adacore.com>
5840         * exp_prag.adb, sem_ch3.adb, sem_ch5.adb, exp_ch11.adb, ghost.adb,
5841         exp_ch6.adb, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb, sem_ch13.adb,
5842         exp_ch3.adb: Minor reformatting.
5844 2015-05-26  Bob Duff  <duff@adacore.com>
5846         * treepr.adb: Minor improvement to debugging routines (pp, pn)
5847         robustness.  Rearrange the code so passing a nonexistent Node_Id
5848         prints "No such node" rather than crashing, and causing gdb to
5849         generate confusing messages.
5851 2015-05-26  Gary Dismukes  <dismukes@adacore.com>
5853         * sem_util.adb: Minor typo fix.
5855 2015-05-26  Yannick Moy  <moy@adacore.com>
5857         * sem_aux.adb (Subprogram_Body_Entity): Deal with subprogram stubs.
5859 2015-05-26  Hristian Kirtchev  <kirtchev@adacore.com>
5861         * exp_ch3.adb (Expand_N_Full_Type_Declaration): Capture, set and
5862         restore the Ghost mode.
5863         (Expand_N_Object_Declaration): Capture, set and restore the Ghost mode.
5864         (Freeze_Type): Update the call to Set_Ghost_Mode.
5865         (Restore_Globals): New routine.
5866         * exp_ch5.adb Add with and use clauses for Ghost.
5867         (Expand_N_Assignment_Statement): Capture, set and restore the
5868         Ghost mode.
5869         (Restore_Globals): New routine.
5870         * exp_ch6.adb Add with and use clauses for Ghost.
5871         (Expand_N_Procedure_Call_Statement): Capture, set and
5872         restore the Ghost mode.
5873         (Expand_N_Subprogram_Body):
5874         Code cleanup. Capture, set and restore the Ghost mode.
5875         (Expand_N_Subprogram_Declaration): Capture, set and restore the
5876         Ghost mode.
5877         (Restore_Globals): New routine.
5878         * exp_ch7.adb Add with and use clauses for Ghost.
5879         (Expand_N_Package_Body): Capture, set and restore the Ghost mode.
5880         (Expand_N_Package_Declaration): Capture, set and restore the
5881         Ghost mode.
5882         (Wrap_HSS_In_Block): Create a proper identifier for the block.
5883         * exp_ch8.adb Add with and use clauses for Ghost.
5884         (Expand_N_Exception_Renaming_Declaration): Code
5885         cleanup. Capture, set and restore the Ghost mode.
5886         (Expand_N_Object_Renaming_Declaration): Capture, set and restore
5887         the Ghost mode.
5888         (Expand_N_Package_Renaming_Declaration): Capture, set and restore the
5889         Ghost mode.
5890         (Expand_N_Subprogram_Renaming_Declaration): Capture, set and
5891         restore the Ghost mode.
5892         * exp_ch11.adb (Expand_N_Exception_Declaration): Code
5893         cleanup. Capture, set and restore the Ghost mode.
5894         * exp_disp.adb (Make_DT): Update the call to Set_Ghost_Mode. Do
5895         not initialize the dispatch table slot of a Ghost subprogram.
5896         * exp_prag.adb Add with and use clauses for Ghost.
5897         (Expand_Pragma_Check): Capture, set and restore the Ghost mode.
5898         (Expand_Pragma_Contract_Cases): Capture, set and restore the
5899         Ghost mode.
5900         (Expand_Pragma_Initial_Condition): Capture, set and
5901         restore the Ghost mode.
5902         (Expand_Pragma_Loop_Variant): Capture,
5903         set and restore the Ghost mode.
5904         (Restore_Globals): New routine.
5905         * exp_util.adb Add with and use clauses for Ghost.
5906         (Make_Predicate_Call): Code cleanup. Capture, set and restore
5907         the Ghost mode.
5908         (Restore_Globals): New routine.
5909         * freeze.adb (Freeze_Entity): Code cleanup. Update the call
5910         to Set_Ghost_Mode.
5911         * ghost.adb Add with and use clause for Sem_Prag.
5912         (Check_Ghost_Completion): Code cleanup.
5913         (Check_Ghost_Overriding): New routine.
5914         (Check_Ghost_Policy): Code cleanup.
5915         (Ghost_Entity): New routine.
5916         (Is_Ghost_Declaration): Removed.
5917         (Is_Ghost_Statement_Or_Pragma): Removed.
5918         (Is_OK_Context): Reimplemented.
5919         (Is_OK_Declaration): New routine.
5920         (Is_OK_Pragma): New routine.
5921         (Is_OK_Statement): New routine.
5922         (Mark_Full_View_As_Ghost): New routine.
5923         (Mark_Pragma_As_Ghost): New routine.
5924         (Mark_Renaming_As_Ghost): New routine.
5925         (Propagate_Ignored_Ghost_Code): Update the comment on usage.
5926         (Set_From_Entity): New routine.
5927         (Set_From_Policy): New routine.
5928         (Set_Ghost_Mode): This routine now handles pragmas and freeze nodes.
5929         (Set_Ghost_Mode_For_Freeze): Removed.
5930         (Set_Ghost_Mode_From_Entity): New routine.
5931         (Set_Ghost_Mode_From_Policy): Removed.
5932         * ghost.ads (Check_Ghost_Overriding): New routine.
5933         (Mark_Full_View_As_Ghost): New routine.
5934         (Mark_Pragma_As_Ghost): New routine.
5935         (Mark_Renaming_As_Ghost): New routine.
5936         (Set_Ghost_Mode): Update the parameter profile. Update the
5937         comment on usage.
5938         (Set_Ghost_Mode_For_Freeze): Removed.
5939         (Set_Ghost_Mode_From_Entity): New routine.
5940         * sem_ch3.adb (Analyze_Full_Type_Declaration):
5941         Capture and restore the Ghost mode. Mark a type
5942         as Ghost regardless of whether it comes from source.
5943         (Analyze_Incomplete_Type_Decl): Capture, set and restore the
5944         Ghost mode.
5945         (Analyze_Number_Declaration): Capture and restore the Ghost mode.
5946         (Analyze_Object_Declaration): Capture and restore the Ghost mode.
5947         (Analyze_Private_Extension_Declaration): Capture and
5948         restore the Ghost mode.
5949         (Analyze_Subtype_Declaration): Capture and restore the Ghost mode.
5950         (Process_Full_View): The full view inherits all Ghost-related
5951         attributes from the private view.
5952         (Restore_Globals): New routine.
5953         * sem_ch5.adb (Analyze_Assignment): Capture and restore the
5954         Ghost mode.
5955         (Restore_Globals): New routine.
5956         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration):
5957         Code cleanup. Capture and restore the Ghost mode. Mark a
5958         subprogram as Ghost regarless of whether it comes from source.
5959         (Analyze_Procedure_Call): Capture and restore the Ghost mode.
5960         (Analyze_Subprogram_Body_Helper): Capture and restore the Ghost mode.
5961         (Analyze_Subprogram_Declaration): Capture and restore the Ghost mode.
5962         (New_Overloaded_Entity): Ensure that a
5963         parent subprogram and an overriding subprogram have compatible
5964         Ghost policies.
5965         * sem_ch7.adb (Analyze_Package_Body_Helper): Capture and restore
5966         the Ghost mode.
5967         (Analyze_Package_Declaration): Capture and
5968         restore the Ghost mode. Mark a package as Ghost when it is
5969         declared in a Ghost region.
5970         (Analyze_Private_Type_Declaration): Capture and restore the Ghost mode.
5971         (Restore_Globals): New routine.
5972         * sem_ch8.adb (Analyze_Exception_Renaming): Code
5973         reformatting. Capture and restore the Ghost mode. A renaming
5974         becomes Ghost when its name references a Ghost entity.
5975         (Analyze_Generic_Renaming): Capture and restore the Ghost mode. A
5976         renaming becomes Ghost when its name references a Ghost entity.
5977         (Analyze_Object_Renaming): Capture and restore the Ghost mode. A
5978         renaming becomes Ghost when its name references a Ghost entity.
5979         (Analyze_Package_Renaming): Capture and restore the Ghost mode. A
5980         renaming becomes Ghost when its name references a Ghost entity.
5981         (Analyze_Subprogram_Renaming): Capture and restore the Ghost
5982         mode. A renaming becomes Ghost when its name references a
5983         Ghost entity.
5984         * sem_ch11.adb (Analyze_Exception_Declaration): Capture, set
5985         and restore the Ghost mode.
5986         * sem_ch12.adb (Analyze_Generic_Package_Declaration): Capture and
5987         restore the Ghost mode.
5988         (Analyze_Generic_Subprogram_Declaration):
5989         Capture and restore the Ghost mode.
5990         * sem_ch13.adb Add with and use clauses for Ghost.
5991         (Add_Invariant): New routine.
5992         (Add_Invariants): Factor out code.
5993         (Add_Predicate): New routine.
5994         (Add_Predicates): Factor out code.
5995         (Build_Invariant_Procedure_Declaration): Code cleanup. Capture,
5996         set and restore the Ghost mode.
5997         (Build_Invariant_Procedure): Code cleanup.
5998         (Build_Predicate_Functions): Capture, set and
5999         restore the Ghost mode. Mark the generated functions as Ghost.
6000         * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
6001         Capture, set and restore the Ghost mode.
6002         (Analyze_External_Property_In_Decl_Part): Capture, set and restore
6003         the Ghost mode.
6004         (Analyze_Initial_Condition_In_Decl_Part):
6005         Capture, set and restore the Ghost mode.
6006         (Analyze_Pragma):
6007         Code cleanup. Capture, set and restore the Ghost mode. Flag
6008         pragmas Linker_Section, No_Return, Unmodified, Unreferenced and
6009         Unreferenced_Objects as illegal when it applies to both Ghost
6010         and living arguments. Pragma Ghost cannot apply to synchronized
6011         objects.
6012         (Check_Kind): Moved to the spec of Sem_Prag.
6013         (Process_Inline): Flag the pragma as illegal when it applies to
6014         both Ghost and living arguments.
6015         (Restore_Globals): New routine.
6016         * sem_prag.ads Add pragma Default_Initial_Condition
6017         to table Assertion_Expression_Pragma. Add new table
6018         Is_Aspect_Specifying_Pragma.
6019         (Check_Kind): Moved from body of Sem_Prag.
6020         * sem_util.adb Add with and use clauses for Ghost.
6021         (Build_Default_Init_Cond_Procedure_Body): Capture, set and restore
6022         the Ghost mode.
6023         (Build_Default_Init_Cond_Procedure_Declaration):
6024         Capture, set and restore the Ghost mode. Mark the default
6025         initial condition procedure as Ghost when it is declared
6026         in a Ghost region.
6027         (Is_Renaming_Declaration): New routine.
6028         (Policy_In_List): Account for the single argument version of
6029         Check_Pragma.
6030         * sem_util.ads (Is_Renaming_Declaration): New routine.
6031         * sinfo.adb (Is_Ghost_Pragma): New routine.
6032         (Set_Is_Ghost_Pragma): New routine.
6033         * sinfo.ads New attribute Is_Ghost_Pragma.
6034         (Is_Ghost_Pragma): New routine along with pragma Inline.
6035         (Set_Is_Ghost_Pragma): New routine along with pragma Inline.
6037 2015-05-26  Robert Dewar  <dewar@adacore.com>
6039         * sem_ch3.adb, sem_aux.adb, sem_aux.ads, exp_ch6.adb, sprint.adb:
6040         Minor reformatting.
6042 2015-05-26  Gary Dismukes  <dismukes@adacore.com>
6044         * gnat1drv.adb, targparm.adb, targparm.ads, restrict.adb: Minor
6045         reformatting and typo fixes in comments.
6047 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
6049         * sem_ch7.adb (Swap_Private_Dependets): Set visibility of
6050         the two views of a private dependent in two separate steps,
6051         to ensure proper visibility in parent units analyzed for inlining.
6053 2015-05-26  Yannick Moy  <moy@adacore.com>
6055         * sem_aux.adb, sem_aux.ads (Get_Low_Bound): Use Type_Low_Bound.
6056         (Package_Body, Package_Spec): New queries moved
6057         here from GNATprove.
6058         (Package_Specification): Simplify query to remove use of loop.
6059         * sem_util.adb, sem_util.ads (Enclosing_Declaration,
6060         Enclosing_Package_Or_Subprogram, Is_Attribute_Update): New
6061         queries moved here from GNATprove.
6063 2015-05-26  Bob Duff  <duff@adacore.com>
6065         * einfo.adb, einfo.ads, sprint.adb, lib-xref.ads: Minor cleanup: Remove
6066         obsolete Entity_Kinds E_String_Type and E_String_Subtype. Update
6067         redundant assertions.
6069 2015-05-26  Gary Dismukes  <dismukes@adacore.com>
6071         * sem_util.adb, sem_util.ads, sem_ch13.adb: Minor typo fixes.
6073 2015-05-26  Doug Rupp  <rupp@adacore.com>
6075         * init.c [vxworks]: Refine previous checkin.
6077 2015-05-26  Robert Dewar  <dewar@adacore.com>
6079         * exp_ch4.adb (Wrap_MA): New function.
6080         (Expand_N_Op_Expon): Use Wrap_MA.
6082 2015-05-26  Bob Duff  <duff@adacore.com>
6084         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
6085         Do not use secondary stack to return limited records with
6086         defaulted discriminants. This is an efficiency improvement.
6087         * exp_ch6.adb, exp_dist.adb, sem_attr.adb, sem_aux.adb, sem_aux.ads,
6088         sem_ch12.adb, sem_ch3.adb, sem_ch4.adb, sem_ch6.adb, sem_ch7.adb,
6089         sem_util.adb: Change the sense of Is_Indefinite_Subtype to be
6090         Is_Definite_Subtype. This is an improvement to readability (the double
6091         negative in "not Is_Indefinite_Subtype" was slightly confusing). Also
6092         disallow passing non-[sub]type entities, an unnecessary and slightly
6093         bug-prone flexibility.
6095 2015-05-26  Robert Dewar  <dewar@adacore.com>
6097         * sem_aggr.adb (Resolve_Array_Aggregate): Defend against
6098         bad bounds.
6099         * debug.adb: Document -gnatd.k.
6100         * erroutc.adb (Set_Msg_Insertion_Line_Number): Implement -gnatd.k.
6102 2015-05-26  Robert Dewar  <dewar@adacore.com>
6104         * gnat1drv.adb (Gnat1drv): Provide new arguments for
6105         Get_Target_Parameters.
6106         * restrict.adb (Set_Restriction_No_Specification_Of_Aspect):
6107         new procedure.
6108         (Set_Restriction_No_Use_Of_Attribute): new procedure.
6109         * restrict.ads (Set_Restriction_No_Specification_Of_Aspect):
6110         new procedure.
6111         (Set_Restriction_No_Use_Of_Attribute): new procedure.
6112         * s-rident.ads (Integer_Parameter_Restrictions): New subtype.
6113         * targparm.adb (Get_Target_Parameters): Allow new restriction
6114         pragmas No_Specification_Of_Aspect No_Use_Of_Attribute
6115         No_Use_Of_Pragma.
6116         * targparm.ads: New parameters for Get_Target_Parameters.
6117         * tbuild.adb (Set_NOD): New name for Set_RND.
6118         (Set_NSA): New procedure.
6119         (Set_NUA): New procedure.
6120         (Set_NUP): New procedure.
6121         * tbuild.ads (Make_SC): Minor reformatting.
6122         (Set_NOD): New name for Set_RND.
6123         (Set_NSA, Set_NUA, Set_NUP): New procedure.
6125 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
6127         * a-stwise.adb (Find_Token): If source'first is not positive,
6128         an exception must be raised, as specified by RM 2005 A.4.3
6129         (68/1). This must be checked explicitly, given that run-time
6130         files are normally compiled without constraint checks.
6131         * a-stzsea.adb (Find_Token): Ditto.
6133 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
6135         * sem_util.ads sem_util.adb (Is_Current_Instance):  New predicate
6136         to fully implement RM 8.6 (17/3). which earlier only applied
6137         to synchronized types. Used to preanalyze aspects that include
6138         current instances of types, such as Predicate and Invariant.
6139         * sem_res.adb (Resolve_Entity_Name): Use Is_Current_Instance.
6140         * sem_ch13.adb (Add_Predicates): In ASIS mode, preserve original
6141         expression of aspect and analyze it to provide proper type
6142         information.
6144 2015-05-26  Robert Dewar  <dewar@adacore.com>
6146         * rtsfind.ads: Add entries for RE_Exn[_Long]_Float.
6147         * s-exnllf.adb (Exn_Float): New function.
6148         (Exn_Long_Float): New function.
6149         (Exn_Long_Long_Float): Rewritten interface.
6150         (Exp): New name for what used to be Exn_Long_Long_Float.
6151         * s-exnllf.ads (Exn_Float): New function.
6152         (Exn_Long_Float): New function.
6154 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
6156         * sem_ch8.adb (Find_Selected_Component): Do not emit an error
6157         on a selected component when the prefix is a type name that is
6158         a Current_Instance.
6159         * einfo.ads: Minor grammar fix.
6161 2015-05-26  Doug Rupp  <rupp@adacore.com>
6163         * init.c [vxworks] (sysLib.h): Only for x86.
6165 2015-05-26  Doug Rupp  <rupp@adacore.com>
6167         * init-vxsim.c (CPU): define as __VXSIM_CPU__
6168         * sigtramp-vxworks-vxsim.c (CPU): Likewise.
6169         sigtramp-vxworks-target.inc: Add check for SIMLINUX.
6170         * sigtramp.h: Likewise.
6172 2015-05-26  Robert Dewar  <dewar@adacore.com>
6174         * sem_aux.adb, sem_disp.adb, sem_util.ads: Add comment.
6175         * sem_util.adb: Minor reformatting
6177 2015-05-26  Yannick Moy  <moy@adacore.com>
6179         * inline.adb (Has_Initialized_Type): Adapt to new names.
6180         * sem_aux.adb, sem_aux.ads (Get_Low_Bound, Number_Components,
6181         Subprogram_Body, Subprogram_Body_Entity, Subprogram_Spec,
6182         Subprogram_Specification): New query functions used in GNATprove.
6183         * sem_disp.adb, sem_disp.ads (Is_Overriding_Subprogram): New
6184         query functions used in GNATprove.
6185         * sem_util.adb, sem_util.adso (Enclosing_Lib_Unit_Node,
6186         Get_Cursor_Type, Get_Return_Object, Get_User_Defined_Eq,
6187         Is_Double_Precision_Floating_Point_Type,
6188         Is_Single_Precision_Floating_Point_Type): New query functions
6189         used in GNATprove.
6191 2015-05-26  Bob Duff  <duff@adacore.com>
6193         * s-rpc.ads (Partition_ID): Increase maximum Partition_ID to
6194         some huge number.
6195         * a-except-2005.adb, a-except-2005.ads, a-except.adb,
6196         a-except.ads, a-exexda.adb, a-exstat.adb: Minor comment fixes.
6198 2015-05-26  Robert Dewar  <dewar@adacore.com>
6200         * sinfo.adb: Minor comment addition.
6201         * einfo.adb: Minor whitespace and punctuation fix.
6202         * sem_util.adb: Minor editing of comments.
6204 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
6206         * sem_ch7.adb (Install_Private_Declarations,
6207         Swap_Private_Dependents): Ensure that both views of the dependent
6208         subtype are immediately visible if we are within their scope. This
6209         may be needed when a procedure body is both the parent of an
6210         instantiated child unit, and is itself used to inline a local
6211         function.
6213 2015-05-26  Gary Dismukes  <dismukes@adacore.com>
6215         * exp_prag.adb, gnat1drv.adb: Minor reformatting.
6217 2015-05-26  Eric Botcazou  <ebotcazou@adacore.com>
6219         * exp_ch4.adb (Expand_N_Indexed_Component): In the circuit
6220         detecting exceptions to the rewriting, deal with implicit
6221         dereferences in the selected component case.
6223 2015-05-26  Bob Duff  <duff@adacore.com>
6225         * sem_ch13.adb (Analyze_One_Aspect): Do not
6226         require the expression of the Disable_Controlled aspect to be
6227         static in a generic template, because 'Enabled is not known
6228         until the instance.
6230 2015-05-26  Doug Rupp  <rupp@adacore.com>
6232         * init-vxsim.c: New file for vxsim ZCX
6233         * sigtramp-vxworks-vxsim.c: Likewise.
6234         * sigtramp-vxworks.c: Factor out target dependent bits into ...
6235         * sigtramp-vxworks-target.inc: ... here.
6236         * sigtramp.h: Add vxsim zcx protos.
6237         * init.c [vxworks...] (sysLib.h): Include.
6238         (__gnat_map_signal): Make global.
6239          [...i386] (__gnat_error_handler): Call __gnat_vxsim_error_handler if
6240         on vxsim.
6241         [...i386] (__gnat_install_handler): Test if on vxsim.
6243 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
6245         * sem_ch5.adb (Analyze_Iterator_Specification): For an element
6246         iterator over an array, if the component is aliased, the loop
6247         variable is aliased as well.
6249 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
6251         * exp_ch6.adb (Expand_Actuals): For a function call with in-out
6252         parameters that is rewritten as an expression_with_actions,
6253         we preserve the original function call node for further use by
6254         the caller (typically Expand_Call). In the presence of validity
6255         checks, that function call, though it is labelled Analyzed to
6256         prevent an infinite recursion, may be rewritten as a temporary
6257         by Remove_Side_Effects.  Ensure that the caller has access to
6258         the original function call to continue expansion.
6259         * atree.ads: Minor typo in comment.
6261 2015-05-26  Javier Miranda  <miranda@adacore.com>
6263         * sem_util.adb (Check_Function_Writable_Actuals):
6264         Add missing support to check the violation of writable actuals
6265         in array aggregates that have a nonstatic range.
6267 2015-05-26  Hristian Kirtchev  <kirtchev@adacore.com>
6269         * exp_ch6.adb (Process_Contract_Cases_For): Update the call to
6270         Expand_Pragma_Contract_Cases.
6271         * exp_prag.ads, exp_prag.adb (Expand_Contract_Cases): Rename to
6272         Expand_Pragma_Contract_Cases.
6273         * sem_ch13.adb (Add_Invariants): Use the original aspect name
6274         when creating the arguments of pragma Check. This ensures that
6275         'Class is properly recognized and handled.
6277 2015-05-26  Arnaud Charlet  <charlet@adacore.com>
6279         * gnat1drv.adb: Minor adjustments.
6280         (Adjust_Global_Switches): Disable some related flags in CodePeer mode.
6281         * sem_ch4.adb (Has_Arbitrary_Evaluation_Order,
6282         Stop_Subtree_Climbind): Code cleanup.
6283         * einfo.ads: Minor comment change.
6285 2015-05-26  Javier Miranda  <miranda@adacore.com>
6287         * sem_aggr.adb (Resolve_Aggregate, Resolve_Extension_Aggregate):
6288         Code cleanup.
6289         * sem_ch3.adb (Build_Derived_Record_Type,
6290         Record_Type_Declaration): Code cleanup.
6291         * sem_ch4.adb (Has_Arbitrary_Evaluation_Order,
6292         Stop_Subtree_Climbind): Tables which speed up the identification
6293         of dangerous calls to Ada 2012 functions with writable actuals
6294         (AI05-0144).
6295         (Analyze_Arithmetic_Op, Analyze_Call, Analyze_Comparison_Op,
6296         Analyze_Equality_Op, Analyze_Logical_Op, Analyze_Membership_Op,
6297         Analyze_Range): Code cleanup.
6298         (Is_Arbitrary_Evaluation_Order_Construct): Removed.
6299         (Check_Writable_Actuals): Code cleanup using the added tables.
6300         * sem_util.adb (Check_Function_Writable_Actuals): Return
6301         immediately if the node does not have the flag Check_Actuals
6302         set to True.
6304 2015-05-26  Eric Botcazou  <ebotcazou@adacore.com>
6306         * exp_ch6.adb (Add_Call_By_Copy_Code): Remove restrictive
6307         condition in the detection of the effects of Remove_Side_Effects.
6308         * exp_util.ads (Remove_Side_Effects): Add general and historical note.
6309         * exp_util.adb (Is_Name_Reference): New predicate.
6310         (Remove_Side_Effects): Use it in lieu of Is_Object_Reference
6311         in order to decide whether to use the renaming to capture the
6312         side effects of the subexpression.
6313         (Side_Effect_Free): Remove obsolete test.
6315 2015-05-26  Robert Dewar  <dewar@adacore.com>
6317         * aspects.ads, aspects.adb: Add aspect Disable_Controlled.
6318         * einfo.ads, einfo.adb (Disable_Controlled): New flag.
6319         (Is_Controlled_Active): New function.
6320         * exp_ch3.adb (Expand_Freeze_Record_Type): Use
6321         Is_Controlled_Active.
6322         * exp_util.adb (Needs_Finalization): Finalization not needed
6323         if Disable_Controlled set.
6324         * freeze.adb (Freeze_Array_Type): Do not set
6325         Has_Controlled_Component if the component has Disable_Controlled.
6326         (Freeze_Record_Type): ditto.
6327         * sem_ch13.adb (Decorate): Minor reformatting.
6328         (Analyze_Aspect_Specifications): Implement Disable_Controlled.
6329         * sem_ch3.adb (Analyze_Object_Declaration): Handle
6330         Disable_Controlled.
6331         (Array_Type_Declaration): ditto.
6332         (Build_Derived_Private_Type): ditto.
6333         (Build_Derived_Type): ditto.
6334         (Record_Type_Definition): ditto.
6335         * snames.ads-tmpl: Add Name_Disable_Controlled.
6337 2015-05-26  Eric Botcazou  <ebotcazou@adacore.com>
6339         * exp_ch6.adb (Expand_Actuals): Use a constant declaration instead
6340         of a renaming to capture the return value of a function call.
6341         (Expand_Simple_Function_Return): Call Remove_Side_Effects
6342         instead of removing side effects manually before the call to
6343         _Postconditions.
6345 2015-05-26  Robert Dewar  <dewar@adacore.com>
6347         * exp_ch4.adb (Expand_N_Op_Expon): Deal with problem of wrong
6348         order in calling Duplicate_Subexpr.
6349         * einfo.ads: Fix documentation of Object/Value size for scalar types.
6351 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
6353         * exp_aggr.adb (Build_Array_Aggr_Code, Gen_Assign):
6354         If a component is default-initialized and its type has an
6355         invariant procedure, insert an invariant test after code for
6356         default-initialization of the component.
6358 2015-05-26  Gary Dismukes  <dismukes@adacore.com>
6360         * einfo.ads, sem_util.adb, sem_ch4.adb: Minor reformatting.
6362 2015-05-26  Robert Dewar  <dewar@adacore.com>
6364         * exp_unst.adb, exp_unst.ads: Change to using Subps table index for
6365         making AREC entity names unique.
6367 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
6369         * sem_cat.adb (Has_Stream_Attribute_Definition): If the type
6370         has aspect specifications, examine the corresponding list of
6371         representation items to determine whether there is a visible
6372         stream operation. The attribute definition clause generated from
6373         the aspect will be inserted at the freeze point of the type,
6374         which may be in the private part and not directly visible,
6375         but the aspect makes the operation available to a client.
6377 2015-05-26  Robert Dewar  <dewar@adacore.com>
6379         * sem_util.adb: Minor code reorganization.
6380         * sem_ch6.adb: Minor reformatting.
6382 2015-05-25  Eric Botcazou  <ebotcazou@adacore.com>
6384         * gcc-interface/utils.c (maybe_pad_type): Do not apply adjustment to
6385         original size for elementary types before issuing the size warning.
6387 2015-05-25  Eric Botcazou  <ebotcazou@adacore.com>
6389         * get_targ.adb (C_Get_Float_Words_BE): Adjust import name.
6390         (C_Get_Words_BE): Likewise.
6391         (C_Get_Bytes_BE): Likewise.
6392         (C_Get_Bits_BE): Likewise.
6393         (Width_From_Size): Remove superfluous space.
6394         * gcc-interface/targtyps.c (get_float_words_be): Rename into...
6395         (get_target_float_words_be): ...this.
6396         (get_words_be): Rename into...
6397         (get_target_words_be): ...this.
6398         (get_bytes_be): Rename into...
6399         (get_target_bytes_be): ...this.
6400         (get_bits_be): Rename into...
6401         (get_target_bits_be): ...this.
6402         * gcc-interface/gigi.h (standard_datatypes): Remove ADT_ptr_void_type.
6403         (ptr_void_type_node): Delete.
6404         (get_target_float_size): Likewise.
6405         (get_target_double_size): Likewise.
6406         (get_target_long_double_size): Likewise.
6407         (get_float_words_be): Likewise.
6408         (get_words_be): Likewise.
6409         (get_bytes_be): Likewise.
6410         (get_bits_be): Likewise.
6411         (get_target_float_words_be): Declare.
6412         (get_target_words_be): Likewise.
6413         (get_target_bytes_be): Likewise.
6414         (get_target_bits_be): Likewise.
6415         * gcc-interface/decl.c (gnat_to_gnu_entity): Replace ptr_void_type_node
6416         with ptr_type_node.
6417         (intrin_return_compatible_p): Likewise.
6418         * gcc-interface/trans.c (gigi): Likewise.
6419         * gcc-interface/utils2.c (maybe_wrap_malloc): Likewise.
6420         (maybe_wrap_free): Likewise.
6421         * gcc-interface/utils.c (maybe_pad_type): Remove superfluous space.
6422         * gcc-interface/misc.c (gnat_init): Do not set ptr_void_type_node.
6424 2015-05-25  Eric Botcazou  <ebotcazou@adacore.com>
6426         * gcc-interface/decl.c (elaborate_expression): Take a const string
6427         suffix instead of a tree.
6428         (elaborate_expression_1): Likewise.
6429         (elaborate_expression_2): Likewise.
6430         (gnat_to_gnu_entity): Adjust to above changes.
6431         (build_subst_list): Likewise.
6432         (get_entity_char): New static function.
6434 2015-05-25  Eric Botcazou  <ebotcazou@adacore.com>
6436         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: Move around.
6437         <E_Exception>: Merge with E_Variable case.
6438         <E_Variable>: Remove 'object' label.
6440 2015-05-25  Eric Botcazou  <ebotcazou@adacore.com>
6442         * gcc-interface/decl.c (gnat_to_gnu_entity): Minor tweak.
6443         * gcc-interface/trans.c (finalize_nrv_unc_r): Use CONSTRUCTOR_ELT.
6444         * gcc-interface/utils.c (convert): Likewise and simplify.
6445         (remove_conversions): Likewise.
6446         * gcc-interface/utils2.c (compare_fat_pointers): Likewise.
6447         (build_unary_op): Likewise and simplify.
6449 2015-05-25  Eric Botcazou  <ebotcazou@adacore.com>
6451         * gcc-interface/gigi.h (build_atomic_load): Adjust prototype.
6452         (build_atomic_store): Likewise.
6453         (build_load_modify_store): Declare.
6454         (VECTOR_TYPE_P): Delete.
6455         * gcc-interface/decl.c (gnat_to_gnu_entity): Replace Is_Atomic with
6456         Is_Atomic_Or_VFA throughout.
6457         <E_Array_Type>: Build a variant of the XUA type instead of forcing
6458         TYPE_VOLATILE on it.
6459         <E_Array_Subtype>: Use the main variant of the base type.
6460         Do not force TYPE_VOLATILE on the type being built.
6461         <E_Record_Type>: Likewise.
6462         <E_Array_Subtype>: Likewise.
6463         <E_Subprogram_Type>: Rename local variable.
6464         Add Atomic qualifier in conjunction with Volatile on types if needed.
6465         Force BLKmode for by-ref types only at the end of the processing.
6466         Change qualifiers only after changing the mode of the type.  Set
6467         TYPE_UNIVERSAL_ALIASING_P on the type directly.
6468         (check_ok_for_atomic_type): Issue specific error message for VFA.
6469         (gnat_to_gnu_component_type): Replace Is_Atomic with
6470         Is_Atomic_Or_VFA throughout.
6471         * gcc-interface/misc.c (gnat_get_alias_set): Test
6472         TYPE_UNIVERSAL_ALIASING_P on the type directly.
6473         * gcc-interface/trans.c (lvalue_required_p): Replace Is_Atomic with
6474         Is_Atomic_Or_VFA throughout.  Add missing guard.
6475         (node_is_atomic): New predicate.
6476         (node_has_volatile_full_access): Likewise.
6477         (gnat_strip_type_conversion): New function.
6478         (outer_atomic_access_required_p): New predicate.
6479         (atomic_sync_required_p): Rename into...
6480         (atomic_access_required_p): ...this.  Add SYNC parameter, scan the
6481         parent node first and then look for the atomic setting.  Add support
6482         for Volatile_Full_Access.
6483         (Call_to_gnu): Add atomic_access and outer_atomic_access parameters
6484         and adjusts calls to above functions.  Use load-modify-store sequence
6485         for updates of In/Out and Out parameters if required, as well as for
6486         moving the result to the target if required.  Add couple of missing
6487         guards.
6488         (gnat_to_gnu): Adjust calls to above functions.
6489         <N_Object_Renaming_Declaration>: If the renamed object has side-effects
6490         evaluate only its address.
6491         <N_Assignment_Statement>: Adjust call to Call_to_gnu.  Use load-modify
6492         store sequence if required.
6493         <N_Function_Call>: Adjust call to Call_to_gnu.
6494         (extract_values): Adjust comment.
6495         * gcc-interface/utils2.c (build_atomic_load): Add SYNC parameter and
6496         use relaxed memory model if it is not set.
6497         (build_atomic_store): Likewise.
6498         (call_is_atomic_load): New predicate.
6499         (build_load_modify_store): New function.
6500         (build_binary_op) <MODIFY_EXPR>: Accept SAVE_EXPR on the LHS.
6501         (gnat_stabilize_reference) <CALL_EXPR>: Deal with atomic loads.
6503 2015-05-25  Eric Botcazou  <ebotcazou@adacore.com>
6505         * gcc-interface/ada-tree.h (DECL_RENAMING_GLOBAL_P): Rename into...
6506         (DECL_GLOBAL_NONCONSTANT_RENAMING_P): ...this.
6507         * gcc-interface/gigi.h (record_global_renaming_pointer): Delete.
6508         (invalidate_global_renaming_pointers): Likewise.
6509         (record_global_nonconstant_renaming): New.
6510         (invalidate_global_nonconstant_renamings): Likewise.
6511         (get_inner_constant_reference): Likewise.
6512         (gnat_constant_reference_p): Likewise.
6513         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Adjust to above
6514         and register the renaming pointer only if the object is non-constant.
6515         (elaborate_expression_1): Call get_inner_constant_reference instead
6516         of get_inner_reference.
6517         * gcc-interface/trans.c (fold_constant_decl_in_expr): Minor tweak.
6518         (Identifier_to_gnu): Adjust to above and do not recheck the renamed
6519         object before substituting it.
6520         (Compilation_Unit_to_gnu): Adjust to above renaming.  Minor tweaks.
6521         (gnat_to_gnu) <N_Object_Renaming_Declaration>: Do not return the
6522         result at the global level.
6523         (N_Exception_Renaming_Declaration): Likewise.
6524         * gcc-interface/utils.c (global_renaming_pointers): Rename into...
6525         (global_nonconstant_renamings): ...this.
6526         (destroy_gnat_utils): Adjust to above renaming.
6527         (record_global_renaming_pointer): Rename into...
6528         (record_global_nonconstant_renaming): ...this.
6529         (invalidate_global_renaming_pointers): Rename into...
6530         (invalidate_global_nonconstant_renamings): ...this and do not recheck
6531         the renamed object before invalidating.
6532         * gcc-interface/utils2.c (gnat_stabilize_reference): Minor tweak.
6533         (get_inner_constant_reference): New public function.
6534         (gnat_constant_reference_p): New predicate.
6536 2015-05-25  Javier Miranda  <miranda@adacore.com>
6538         * einfo.ads, einfo.adb (Has_Out_Or_In_Out_Parameter): This attribute
6539         is now present in subprograms, generic subprograms, entries and
6540         entry families.
6541         * sem_ch6.adb (Set_Formal_Mode): Set As_Out_Or_In_Out_Parameter
6542         on entries, entry families, subprograms and generic subprograms.
6543         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration):
6544         Minor code reorganization to ensure that the Ekind attribute
6545         of the subprogram entity is set before its formals are
6546         processed. Required to allow the use of the attribute
6547         Has_Out_Or_In_Out_Parameter on the subprogram entity.
6548         * sem_aggr.adb (Resolve_Aggregate, Resolve_Extension_Aggregate):
6549         Perform the check on writable actuals only if the value of some
6550         component of the aggregate involves calling a function with
6551         out-mode parameters.
6552         (Resolve_Record_Aggregate): Propagate the Check_Actuals flag to the
6553         internally built aggregate.
6554         * sem_ch3.adb (Build_Derived_Record_Type, Record_Type_Declaration):
6555         Perform the check on writable actuals only if the initialization of
6556         some component involves calling a function with out-mode parameters.
6557         * sem_ch4.adb (Analyze_Arithmetic_Op, Analyze_Comparison_Op,
6558         Analyze_Equality_Op, Analyze_Logical_Op, Analyze_Membership_Op,
6559         Analyze_Range): Check writable actuals only if the
6560         subtrees have a call to a function with out-mode parameters
6561         (Analyze_Call.Check_Writable_Actuals): New subprogram. If the call
6562         has out or in-out parameters then mark its outermost enclosing
6563         construct as a node on which the writable actuals check must
6564         be performed.
6565         (Analyze_Call): Check if the flag must be set and if the outermost
6566         enclosing construct.
6567         * sem_util.adb (Check_Function_Writable_Actuals): Code cleanup
6568         and reorganization. We skip processing aggregate discriminants
6569         since their precise analysis involves two phases traversal.
6570         * sem_res.adb (Resolve_Actuals, Resolve_Arithmetic_Op,
6571         Resolve_Logical_Op, Resolve_Membership_Op): Remove call to
6572         check_writable_actuals.
6574 2015-05-22  Ed Schonberg  <schonberg@adacore.com>
6576         * sem_ch3.adb (Constrain_Concurrent): If the context is a
6577         type declaration, generate an Itype_Reference for the anonymous
6578         subtype, to force elaboration at this point in gigi.
6580 2015-05-22  Gary Dismukes  <dismukes@adacore.com>
6582         * layout.adb, einfo.ads, sem_ch12.adb, freeze.adb, sem_util.ads,
6583         exp_ch4.adb, sem_ch6.adb: Minor reformatting and typo fixes.
6585 2015-05-22  Ed Schonberg  <schonberg@adacore.com>
6587         * sem_res.adb (Resolve_Actuals): If the call is to an overridden
6588         operation, replace the names of the actuals in named associations
6589         with the names of the actuals of the subprogram that is eventually
6590         executed. The names of the formals and the defaults can differ
6591         between the two operations when they are operations of a formal
6592         derived type.
6594 2015-05-22  Bob Duff  <duff@adacore.com>
6596         * a-convec.ads, a-convec.adb (Append): Check for fast path. Split
6597         out slow path into separate procedure. Inline Append. Fast path
6598         now avoids calling Insert.
6599         (Finalize): Do the busy checking last, so the container gets emptied.
6600         (Insert, Insert_Space): Remove redundancy.
6602 2015-05-22  Robert Dewar  <dewar@adacore.com>
6604         * switch-c.adb (Scan_Front_End_Switches): Insist on -gnatc
6605         for -gnatd.V.
6607 2015-05-22  Arnaud Charlet  <charlet@adacore.com>
6609         * gnatvsn.ads: Minor code reorg to remember more easily to update
6610         variables.
6612 2015-05-22  Ed Schonberg  <schonberg@adacore.com>
6614         * sem_ch10.adb (Analyze_With_Clause): In ASIS_Mode, a
6615         limited_with clause on a predefined unit is not transformed into
6616         a regular with_clause, to preserve the original tree structure.
6617         * sinfo.ads (N_With_Clause): Add comment on handling of
6618         Limited_With.
6619         * sem_ch10.adb: Minor reformatting.
6621 2015-05-22  Ed Schonberg  <schonberg@adacore.com>
6623         * sem_ch8.adb (Freeze_Profile): A limited view of a type in
6624         the profile of a subprogram renaming does not require freezing,
6625         because it is declared in a different unit.
6627 2015-05-22  Ed Schonberg  <schonberg@adacore.com>
6629         * exp_aggr.adb (Get_Constraint_Association): If type (of ancestor
6630         composite type) is private, go to full view. This was previously
6631         done only in an instance context, but is happen whenever a chain
6632         of private extensions includes one inherited discriminant.
6634 2015-05-22  Robert Dewar  <dewar@adacore.com>
6636         * einfo.ads: Minor comment updates.
6637         * exp_unst.adb: Move Subps table to spec Don't remove old entries
6638         from table Add Last field to record last entry used.
6639         * exp_unst.ads: Move Subps table here from body So that Cprint
6640         can access saved values.
6642 2015-05-22  Bob Duff  <duff@adacore.com>
6644         * a-cdlili.adb, a-cdlili.ads, a-cohama.adb, a-cohama.ads,
6645         * a-cohase.adb, a-cohase.ads, a-convec.adb, a-convec.ads,
6646         * a-coorma.adb, a-coorma.ads, a-coorse.adb, a-coorse.ads:
6647         (Pseudo_Reference, Element_Access, Get_Element_Access): New
6648         declarations added for use by performance improvements in exp_ch5.adb.
6649         * snames.ads-tmpl: New names referenced by exp_ch5.adb.
6650         * exp_ch5.adb: Speed up "for ... of" loops for predefined containers.
6651         Instead of doing literally what the RM calls for, we do something
6652         equivalent that avoids expensive operations inside the loop. If the
6653         container package has appropriate Next, Pseudo_Reference,
6654         Element_Access, Get_Element_Access declarations, we invoke the
6655         optimization.
6656         * snames.ads-tmpl: Note speed improvement.
6658 2015-05-22  Eric Botcazou  <ebotcazou@adacore.com>
6660         * einfo.ads (Is_Atomic_Or_VFA): Move to XEINFO INLINES section.
6661         * xeinfo.adb: Replace a-einfo.h with einfo.h throughout.
6662         Add pattern to translate "or else" into "||".
6664 2015-05-22  Eric Botcazou  <ebotcazou@adacore.com>
6666         * einfo.ads (Has_Volatile_Full_Access): Rename into...
6667         (Is_Volatile_Full_Access): ...this.
6668         (Set_Has_Volatile_Full_Access): Rename into...
6669         (Set_Is_Volatile_Full_Access): ...this.
6670         * einfo.adb (Has_Volatile_Full_Access): Rename into...
6671         (Is_Volatile_Full_Access): ...this.
6672         (Set_Has_Volatile_Full_Access): Rename into...
6673         (Set_Is_Volatile_Full_Access): ...this.
6674         (Is_Atomic_Or_VFA): Adjust to above renaming.
6675         * errout.adb (Special_Msg_Delete): Likewise.
6676         * exp_pakd.adb (Install_PAT): Likewise.
6677         * freeze.adb (Freeze_Array_Type): Likewise.
6678         * sem_ch8.adb (Analyze_Object_Renaming): Likewise.
6679         * sem_ch13.adb (Inherit_Delayed_Rep_Aspects): Likewise.
6680         (Inherit_Aspects_At_Freeze_Point): Likewise.
6681         * sem_prag.adb (Set_Atomic_VFA): Likewise.
6682         (Process_Atomic_Independent_Shared_Volatile): Likewise.
6683         * sem_util.adb (Is_Atomic_Or_VFA_Object): Likewise.
6685 2015-05-22  Robert Dewar  <dewar@adacore.com>
6687         * exp_ch5.adb, layout.adb, einfo.adb, einfo.ads, sem_prag.adb,
6688         freeze.adb, freeze.ads, sem_util.adb, sem_util.ads, exp_ch2.adb,
6689         exp_ch4.adb, errout.adb, exp_aggr.adb, sem_ch13.adb: This is a general
6690         change that deals with the fact that most of the special coding for
6691         Atomic should also apply to the case of Volatile_Full_Access.
6692         A new attribute Is_Atomic_Or_VFA is introduced, and many of the
6693         references to Is_Atomic now use this new attribute.
6695 2015-05-22  Robert Dewar  <dewar@adacore.com>
6697         * exp_ch4.adb (Expand_N_Op_Eq): Introduce 'Machine for 'Result
6698         comparison.
6700 2015-05-22  Eric Botcazou  <ebotcazou@adacore.com>
6702         * sprint.adb (Source_Dump): When generating debug files, deal
6703         with the case of a stand-alone package instantiation by dumping
6704         together the spec and the body in the common debug file.
6706 2015-05-22  Robert Dewar  <dewar@adacore.com>
6708         * sem_ch13.adb (Minimum_Size): Size is zero for null range
6709         discrete subtype.
6711 2015-05-22  Hristian Kirtchev  <kirtchev@adacore.com>
6713         * einfo.adb (Anonymous_Master): This attribute now applies
6714         to package and subprogram bodies.
6715         (Set_Anonymous_Master): This attribute now applies to package and
6716         subprogram bodies.
6717         (Write_Field36_Name): Add output for package and subprogram bodies.
6718         * einfo.ads Update the documentation on attribute Anonymous_Master
6719         along with occurrences in entities.
6720         * exp_ch4.adb (Create_Anonymous_Master): Reimplemented to
6721         handle spec and body anonymous masters of the same unit.
6722         (Current_Anonymous_Master): Reimplemented. Handle a
6723         package instantiation that acts as a compilation unit.
6724         (Insert_And_Analyze): Reimplemented.
6726 2015-05-22  Ed Schonberg  <schonberg@adacore.com>
6728         * sem_ch10.adb (Analyze_With_Clause): A limited_with_clause on a
6729         predefined unit is treated as a regular with_clause.
6731 2015-05-22  Robert Dewar  <dewar@adacore.com>
6733         * sem_ch12.adb, prj.ads, makeutl.ads, sem_ch6.adb, prj-nmsc.adb,
6734         prj-conf.adb, sem_disp.adb: Minor reformatting.
6736 2015-05-22  Vincent Celier  <celier@adacore.com>
6738         * clean.adb (Parse_Cmd_Line): For native gnatclean, check
6739         for switch -P and, if found and gprclean is available, invoke
6740         silently gprclean.
6741         * make.adb (Initialize): For native gnatmake, check for switch -P
6742         and, if found and gprbuild is available, invoke silently gprbuild.
6744 2015-05-22  Eric Botcazou  <ebotcazou@adacore.com>
6746         * sem_ch13.adb (Validate_Unchecked_Conversions): Also issue
6747         specific warning for discrete types when the source is larger
6748         than the target.
6750 2015-05-22  Ed Schonberg  <schonberg@adacore.com>
6752         * einfo.ads, einfo.adb (Incomplete_Actuals): New attribute of
6753         package instantiations. Holds the list of actuals in the instance
6754         that are incomplete types, to determine where the corresponding
6755         instance body must be placed.
6756         * sem_ch6.adb (Conforming_Types): An incomplete type used as an
6757         actual in an instance matches an incomplete formal.
6758         * sem_disp.adb (Check_Dispatching_Call): Handle missing case of
6759         explicit dereference.
6760         (Inherited_Subprograms): In the presence of a limited view there
6761         are no subprograms to inherit.
6762         * sem_ch12.adb (Preanalyze_Actuals): Build list of incomplete
6763         actuals of instance, for later placement of instance body and
6764         freeze nodes for actuals.
6765         (Install_Body): In the presence of actuals that incomplete types
6766         from a limited view, the instance body cannot be placed after
6767         the declaration because full views have not been seen yet. Any
6768         use of the non-limited views in the instance body requires
6769         the presence of a regular with_clause in the enclosing unit,
6770         and will fail if this with_clause is missing.  We place the
6771         instance body at the beginning of the enclosing body, which is
6772         the unit being compiled, and ensure that freeze nodes for the
6773         full views of the incomplete types appear before the instance.
6775 2015-05-22  Pascal Obry  <obry@adacore.com>
6777         * makeutl.ads, prj-conf.adb, prj-nmsc.adb, prj.ads
6778         (In_Place_Option): Removed.
6779         (Relocate_Build_Tree_Option): New constant.
6780         (Root_Dir_Option): New constant.
6781         (Obj_Root_Dir): Removed.
6782         (Build_Tree_Dir): New variable.
6783         (Root_Src_Tree): Removed.
6784         (Root_Dir): New variable.
6785         * prj-conf.adb (Get_Or_Create_Configuration_File): Add check
6786         for improper relocation.
6787         * prj-nmsc.adb (Locate_Directory): Add check for improper
6788         relocation.
6790 2015-05-22  Hristian Kirtchev  <kirtchev@adacore.com>
6792         * einfo.adb (Default_Init_Cond_Procedure): Code cleanup. The
6793         attribute now applies to the base type.
6794         (Has_Default_Init_Cond): Now applies to the base type.
6795         (Has_Inherited_Default_Init_Cond): Now applies to the base type.
6796         (Set_Default_Init_Cond_Procedure): Code cleanup. The attribute now
6797         applies to the base type.
6798         (Set_Has_Default_Init_Cond): Now applies to the base type.
6799         (Set_Has_Inherited_Default_Init_Cond): Now applies to the base type.
6800         * exp_ch3.adb (Expand_N_Object_Declaration): No need to use the
6801         base type when adding a call to the Default_Initial_Condition.
6803 2015-05-22  Hristian Kirtchev  <kirtchev@adacore.com>
6805         * einfo.adb: Node36 is now used as Anonymous_Master. Flag253
6806         is now unused.
6807         (Anonymous_Master): New routine.
6808         (Has_Anonymous_Master): Removed.
6809         (Set_Anonymous_Master): New routine.
6810         (Set_Has_Anonymous_Master): Removed.
6811         (Write_Entity_Flags): Remove the output for Has_Anonymous_Maser.
6812         (Write_Field36_Name): Add output for Anonymous_Master.
6813         * einfo.ads Add new attribute Anonymous_Master along with
6814         occurrences in nodes. Remove attribute Has_Anonymous_Master along
6815         with occurrences in nodes.
6816         (Anonymous_Master): New routine along with pragma Inline.
6817         (Has_Anonymous_Master): Removed along with pragma Inline.
6818         (Set_Anonymous_Master): New routine along with pragma Inline.
6819         (Set_Has_Anonymous_Master): Removed along with pragma Inline.
6820         * exp_ch4.adb (Create_Anonymous_Master): New routine.
6821         (Current_Anonymous_Master): Reimplemented.
6823 2015-05-22  Bob Duff  <duff@adacore.com>
6825         * freeze.adb (Freeze_Profile): Suppress warning if imported
6826         subprogram is not at library level.
6828 2015-05-22  Robert Dewar  <dewar@adacore.com>
6830         * sem_ch8.adb (Analyze_Object_Renaming): Check for renaming
6831         component of an object to which Volatile_Full_Access applies.
6833 2015-05-22  Jerome Guitton  <guitton@adacore.com>
6835         * exp_dbug.ads: Add note about non bit-packed arrays.
6837 2015-05-22  Eric Botcazou  <ebotcazou@adacore.com>
6839         * sem_prag.adb: Fix typo.
6840         * einfo.ads: Grammar fixes in comments.
6842 2015-05-22  Bob Duff  <duff@adacore.com>
6844         * a-cborma.ads, a-cidlli.ads, a-cimutr.ads, a-ciormu.ads,
6845         * a-cihase.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
6846         * a-cborse.ads, a-comutr.ads, a-ciorma.ads, a-cobove.ads,
6847         * a-coormu.ads, a-convec.ads, a-cohase.ads, a-coinho.ads,
6848         * a-cbdlli.ads, a-cbmutr.ads, a-cbhase.ads, a-cdlili.ads,
6849         * a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
6850         * a-coinho-shared.ads (Constant_Reference_Type, Reference_Type):
6851         Add an initialization expression "raise Program_Error". See,
6852         for example, RM-A.18.2(148.4).
6854 2015-05-22  Robert Dewar  <dewar@adacore.com>
6856         * debug.adb: Update documentation.
6857         * einfo.ads, einfo.adb (Needs_Typedef): New flag
6858         * exp_unst.adb (Unnest_Subprogram): Mark AREC types as needing
6859         typedef's in C.
6860         * frontend.adb: Update comments.
6861         * gnat1drv.adb (Adjust_Global_Switches): Set all needed flags
6862         for -gnatd.V
6863         * opt.ads (Generate_C_Code): New switch.
6864         * osint-c.adb (Write_C_File_Info): Removed, not used
6865         (Write_H_File_Info): Removed, not used
6866         * osint-c.ads (Write_C_File_Info): Removed, not used
6867         (Write_H_File_Info): Removed, not used
6868         * osint.ads (Write_Info): Minor comment updates.
6869         (Output_FD): Moved from private part to public part of spec.
6870         * sem.adb (Semantics): Force expansion on if in Generate_C_Code
6871         mode.
6872         * atree.ads: minor typo in comment.
6873         * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
6874         Do not allow VFA on composite object with aliased component.
6876 2015-05-22  Arnaud Charlet  <charlet@adacore.com>
6878         * osint-c.adb, osint-c.ads (Set_File_Name): Move back to spec.
6880 2015-05-22  Pascal Obry  <obry@adacore.com>
6882         * prj-util.adb: Minor comment editing.
6884 2015-05-22  Pascal Obry  <obry@adacore.com>
6886         * makeutl.ads (In_Place_Option): New constant.
6887         * prj.ads (Obj_Root_Dir): New variable (absolute path to relocate
6888         objects).
6889         (Root_Src_Tree): New variable (absolute path of root source tree).
6890         * prj-conf.adb (Do_Autoconf): Take into account the object root
6891         directory (if defined) to generate configuration project.
6892         * prj-nmsc.adb (Get_Directories): Handle case where Obj_Root_Dir
6893         is defined.
6894         (Locate_Directory): Likewise.
6896 2015-05-22  Pascal Obry  <obry@adacore.com>
6898         * prj-util.ads, prj-util.adb (Relative_Path): New routine.
6900 2015-05-22  Bob Duff  <duff@adacore.com>
6902         * exp_utils.ads, exp_utils.adb (Find_Optional_Prim_Op): New
6903         interface to return Empty when not found, so we can avoid handling
6904         Program_Error in that case.
6905         (Find_Prim_Op): Fix latent bug: raise Program_Error when there are no
6906         primitives.
6907         * exp_ch7.adb, sem_util.adb: Use Find_Optional_Prim_Op when the
6908         code is expecting Empty.
6909         * sem_ch8.adb: Use Find_Optional_Prim_Op to avoid handling
6910         Program_Error.
6912 2015-05-22  Robert Dewar  <dewar@adacore.com>
6914         * sem_ch3.adb, sem_intr.adb, exp_ch4.adb, s-rannum.adb,
6915         sem_eval.adb, s-fatgen.adb, s-expmod.ads: Remove incorrect hyphen in
6916         non-binary.
6917         * exp_util.adb: Add comment.
6918         * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move from spec to
6919         body.
6920         (Set_File_Name): New name for the above.
6921         (Create_C_File, Create_H_File, Write_C_File_Info, Write_H_File_Info,
6922         Close_C_File, Close_H_File): New procedure.
6923         * osint.adb: Minor reformatting.
6924         * osint.ads: Minor comment updates.
6926 2015-05-22  Robert Dewar  <dewar@adacore.com>
6928         * exp_ch4.adb: Minor rewording.
6929         * exp_util.ads: Clarify that Find_Prim_Op is only for
6930         tagged types.
6932 2015-05-22  Robert Dewar  <dewar@adacore.com>
6934         * atree.adb, atree.ads, treepr.adb: Change name Needs_Actuals_Check to
6935         Check_Actuals.
6936         * exp_ch4.adb (Expand_N_Op_Expon): Optimize 2**x in modular
6937         and overflow cases.
6939 2015-05-22  Eric Botcazou  <ebotcazou@adacore.com>
6941         * exp_pakd.adb (Install_PAT): Propagate representation aspects
6942         from the original array type to the PAT.
6944 2015-05-22  Robert Dewar  <dewar@adacore.com>
6946         * treepr.adb (Print_Node_Header): Add output of Needs_Actuals_Check.
6948 2015-05-22  Robert Dewar  <dewar@adacore.com>
6950         * atree.adb, atree.ads (Needs_Actuals_Check): New flag.
6952 2015-05-22  Hristian Kirtchev  <kirtchev@adacore.com>
6954         * sem_prag.adb (Analyze_Pragma): Remove the detection
6955         of a useless Part_Of indicator when the related item is a constant.
6956         (Check_Matching_Constituent): Do not emit an error on a constant.
6957         (Check_Missing_Part_Of): Do not check for a missing Part_Of indicator
6958         when the related item is a constant.
6959         (Collect_Body_States): Code cleanup.
6960         (Collect_Visible_States): Code cleanup.
6961         (Report_Unused_States): Do not emit an error on a constant.
6962         * sem_util.ads, sem_util.adb (Has_Variable_Input): Removed.
6964 2015-05-22  Eric Botcazou  <ebotcazou@adacore.com>
6966         * sem_ch8.adb (Analyze_Object_Renaming): Copy
6967         Has_Volatile_Full_Access from renamed to renaming entities.
6968         * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
6969         Tidy up and remove redundant setting of Has_Volatile_Full_Access.
6971 2015-05-22  Hristian Kirtchev  <kirtchev@adacore.com>
6973         * ghost.adb (Check_Ghost_Completion): Update references to SPARK
6974         RM 6.9 rules.
6975         (Check_Ghost_Policy): Update references to SPARK RM 6.9 rules.
6976         * sem_ch3.adb (Analyze_Object_Declaration): Update references
6977         to SPARK RM 6.9 rules.
6978         (Check_Completion): Ghost entities do not require a special form of
6979         completion.
6980         * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Update references
6981         to SPARK RM 6.9 rules.
6982         (Analyze_Subprogram_Body_Helper): Update references to SPARK RM 6.9
6983         rules.
6984         * sem_ch7.adb (Analyze_Package_Body_Helper): Update references
6985         to SPARK RM 6.9 rules.
6986         (Requires_Completion_In_Body): Ghost entities do not require a special
6987         form of completion.
6989 2015-05-22  Robert Dewar  <dewar@adacore.com>
6991         * a-csquin.ads: Use Ada 2012 notation.
6992         * sem_ch8.adb: Minor reformatting.
6994 2015-05-22  Hristian Kirtchev  <kirtchev@adacore.com>
6996         * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect Import
6997         acts as a completion.
6999 2015-05-22  Ed Schonberg  <schonberg@adacore.com>
7001         * sem_ch13.adb: Minor reformatting.
7003 2015-05-22  Jose Ruiz  <ruiz@adacore.com>
7005         * a-reatim.adb: Minor change, fix typo.
7007 2015-05-22  Robert Dewar  <dewar@adacore.com>
7009         * sem_util.ads: Minor addition of ??? comment.
7010         * sem_prag.adb, sem_util.adb: Minor reformatting.
7011         * sem_ch13.adb: minor reformatting.
7013 2015-05-22  Robert Dewar  <dewar@adacore.com>
7015         * a-reatim.ads: Add Compile_Time_Error to ensure Duration
7016         is 64-bits.
7017         * sem_ch13.adb: Improve error message.
7018         * exp_ch4.adb: Minor reformatting.
7020 2015-05-22  Hristian Kirtchev  <kirtchev@adacore.com>
7022         * sem_prag.adb (Analyze_Pragma): Constants without variable
7023         input do not require indicator Part_Of.
7024         (Check_Missing_Part_Of): Constants without variable input do not
7025         requrie indicator Part_Of.
7026         (Collect_Visible_States): Constants without variable input are
7027         not part of the hidden state of a package.
7028         * sem_util.ads, sem_util.adb (Has_Variable_Input): New routine.
7030 2015-05-22  Robert Dewar  <dewar@adacore.com>
7032         * exp_util.adb (Activate_Atomic_Synchronization): Do not set
7033         Atomic_Sync_Required for an object renaming declaration.
7034         * sem_ch8.adb (Analyze_Object_Renaming): Copy Is_Atomic and
7035         Is_Independent to renaming object.
7037 2015-05-22  Ed Schonberg  <schonberg@adacore.com>
7039         * sem_ch5.adb (Analyze_Iterator_Specification): Diagnose
7040         various illegalities in iterators over arrays and containers:
7041         a) New function Get_Cursor_Type, to verify that the cursor is
7042         not a limited type at the point of iteration.
7043         b) If the container is a constant, an element_iterator is illegal
7044         if the container type does not have a Constant_Indexing aspect.
7045         c) If the iterate function has an in-out controlling parameter,
7046         the container cannot be a constant object.
7047         d) Reject additional cases of iterators over a
7048         discriminant-dependent component of a mutable object.
7050 2015-05-21  Hristian Kirtchev  <kirtchev@adacore.com>
7052         * einfo.adb (Contract): This attribute now applies to constants.
7053         (Set_Contract): This attribute now applies to constants.
7054         (Write_Field34_Name): Add output for constants.
7055         * einfo.ads Attribute Contract now applies to constants.
7056         * sem_ch3.adb (Analyze_Object_Contract): Constants now have
7057         their Part_Of indicator verified.
7058         * sem_prag.adb (Analyze_Constituent): A constant is now a valid
7059         constituent.
7060         (Analyze_Global_Item): A constant cannot act as an output.
7061         (Analyze_Initialization_Item): Constants are now a valid
7062         initialization item.
7063         (Analyze_Initializes_In_Decl_Part): Rename
7064         global variable States_And_Vars to States_And_Objs and update
7065         all its occurrences.
7066         (Analyze_Input_Item): Constants are now a
7067         valid initialization item. Remove SPARM RM references from error
7068         messages.
7069         (Analyze_Pragma): Indicator Part_Of can now apply to a constant.
7070         (Collect_Body_States): Collect both source constants
7071         and variables.
7072         (Collect_States_And_Objects): Collect both source constants and
7073         variables.
7074         (Collect_States_And_Variables): Rename
7075         to Collect_States_And_Objects and update all its occurrences.
7076         (Collect_Visible_States): Do not collect constants and variables
7077         used to map generic formals to actuals.
7078         (Find_Role): The role of a constant is that of an input. Separate the
7079         role of a variable from that of a constant.
7080         (Report_Unused_Constituents): Add specialized wording for constants.
7081         (Report_Unused_States): Add specialized wording for constants.
7082         * sem_util.adb (Add_Contract_Item): Add processing for constants.
7083         * sem_util.ads (Add_Contract_Item): Update the comment on usage.
7084         (Find_Placement_In_State_Space): Update the comment on usage.
7086 2015-05-21  Ed Schonberg  <schonberg@adacore.com>
7088         * sem_ch5.adb: minor reformatting.
7090 2015-05-21  Robert Dewar  <dewar@adacore.com>
7092         * freeze.adb (Freeze_Entity): Properly tag -gnatw.z messages.
7094 2015-05-21  Robert Dewar  <dewar@adacore.com>
7096         * freeze.adb: Minor reformatting.
7097         * cstand.adb (Print_Standard): Fix bad printing of Duration
7098         low bound.
7099         * a-reatim.adb (Time_Of): Complete rewrite to properly detect
7100         out of range args.
7102 2015-05-21  Ed Schonberg  <schonberg@adacore.com>
7104         * sem_ch5.adb: add (useless) initial value.
7105         * sem_ch3.adb (Replace_Anonymous_Access_To_Protected_Subprogram):
7106         Check whether the procedure has parameters before processing
7107         formals in ASIS mode.
7109 2015-05-21  Ed Schonberg  <schonberg@adacore.com>
7111         * sem_ch13.adb (Check_Iterator_Functions): Emit error on Iterator
7112         aspect as well when indexing function is illegal.
7113         (Valid_Default_Iterator): Handle properly somme illegal cases
7114         to prevent compilation abandoned messages.
7115         (Check_Primitive_Function): Verify that type and indexing function
7116         are in the same scope.
7117         * freeze.adb (Freeze_Record): Extend patch on the presence of
7118         indexing aspects to aspect Default_Iterator.
7120 2015-05-19  David Malcolm  <dmalcolm@redhat.com>
7122         * gcc-interface/trans.c (Sloc_to_locus1): Strenghthen local "map"
7123         from line_map * to line_map_ordinary *.
7125 2015-05-12  Jason Merrill  <jason@redhat.com>
7127         * sigtramp-vxworks.c: Add space between string literal and macro
7128         name.
7130 2015-05-12  Arnaud Charlet  <charlet@adacore.com>
7132         * gnat_rm.texi, gnat_ugn.texi, doc: Documentation updates and clean ups
7134 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
7136         * sem_ch5.adb (Analyze_Iterator_Specifications): Additional
7137         legality checks for array and container iterators:
7138         a) The domain of iteration cannot be a component that depends
7139         on discriminants of a mutable object. The check was recently
7140         added for element iterators.
7141         b) The cursor type cannot be a limited type at the point of the
7142         iteration, because the cursor will be assigned to in the body
7143         of the loop.
7145 2015-05-12  Robert Dewar  <dewar@adacore.com>
7147         * freeze.adb (Freeze_Record_Type): Make sure that if we have
7148         aspect Iterator_Element, then we have either Constant_Indexing
7149         or Variable_Indexing.
7151 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
7153         * a-coormu.ads, a-coormu.adb: Add Indexing aspect, Reference_Type,
7154         and Reference_Control_Type to support element iterators over
7155         ordered multisets.
7156         * a-ciormu.ads, a-ciormu.adb: Ditto for
7157         indefinite_ordered_multisets.
7159 2015-05-12  Hristian Kirtchev  <kirtchev@adacore.com>
7161         * exp_ch4.adb (Expand_N_Expression_With_Actions): Force
7162         the evaluation of the EWA expression.  Code cleanup.
7163         (Process_Transient_Object): Code cleanup.
7164         * exp_util.adb (Is_Aliased): Controlled transient objects found
7165         within EWA nodes are not aliased.
7166         (Is_Finalizable_Transient): Iterators are not finalizable transients.
7168 2015-05-12  Robert Dewar  <dewar@adacore.com>
7170         * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
7171         Don't allow Atomic and Volatile_Full_Access for the same entity.
7173 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
7175         * sem_ch5.adb (Analyze_Iterator_Specification): Implement new
7176         semantics and safety checks specified in AI12-0151.
7178 2015-05-12  Pierre-Marie de Rodat  <derodat@adacore.com>
7180         * sem_ch10.adb (Sem_Ch10.Analyze_Proper_Body): Generate SCOs
7181         for subunit in generic units.
7183 2015-05-12  Robert Dewar  <dewar@adacore.com>
7185         * sem_elab.adb (Check_A_Call): Avoid checking internal call
7186         from Valid_Scalars
7188 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
7190         * sem_ch6.adb (Process_Formals): An untagged incomplete type
7191         is legal in the profile of a null procedure.
7193 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
7195         * sem_ch12.adb (Validate_Derived_Type_Instance): Handle properly
7196         the checks on a derived formal whose parent type is a previous
7197         formal that is not a derived type.
7199 2015-05-12  Robert Dewar  <dewar@adacore.com>
7201         * aspects.ads, aspects.adb: Add entries for aspect Volatile_Full_Access
7202         * einfo.adb (Has_Volatile_Full_Access): New flag.
7203         (Has_Volatile_Full_Access): New flag.
7204         * einfo.ads (Has_Volatile_Full_Access): New flag.
7205         * par-prag.adb: Add dummy entry for Volatile_Full_Access.
7206         * sem_prag.adb (Analyze_Pragma, case Volatile_Full_Access):
7207         Implement new pragma.
7208         * snames.ads-tmpl: Add entries for pragma Volatile_Full_Access.
7210 2015-05-12  Robert Dewar  <dewar@adacore.com>
7212         * targparm.ads: Minor reformatting.
7214 2015-05-12  Robert Dewar  <dewar@adacore.com>
7216         * a-reatim.adb (Time_Of): Properly detect overflow when TS = 0.0.
7217         * a-reatim.ads: Minor reformatting.
7219 2015-05-12  Hristian Kirtchev  <kirtchev@adacore.com>
7221         * einfo.ads: Update the documentation of flags
7222         Has_Inherited_Default_Init_Cond and Has_Default_Init_Cond.
7224 2015-05-12  Robert Dewar  <dewar@adacore.com>
7226         * impunit.adb: Add entry for a-dhfina.ads
7227         * a-dhfina.ads: New file.
7229 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
7231         * exp_ch5.adb (Expand_Iterator_Loop_Over_Array): if the array
7232         type has convention Fortran, a multidimensional iterator varies
7233         the first dimension fastest.
7235 2015-05-12  Hristian Kirtchev  <kirtchev@adacore.com>
7237         * einfo.adb: Node32 is now used as Encapsulating_State.
7238         Node37 is now used as Associated_Entity.
7239         (Associated_Entity): New routine.
7240         (Encapsulating_State): Update the assertion guard to include constants.
7241         (Set_Associated_Entity): New routine.
7242         (Set_Encapsulating_State): Update the assertion guard to
7243         include constants.
7244         (Write_Field10_Name): Remove the output for Encapsulating_State.
7245         (Write_Field32_Name): Add output for Encapsulating_State.
7246         (Write_Field37_Name): Add output for Associated_Entity.
7247         * einfo.ads New attribute Associated_Entity along with placement
7248         in entities. Attribute Encapsulating_State now uses Node32.
7249         (Associated_Entity): New routine along with pragma Inline.
7250         (Set_Associated_Entity): New routine along with pragma Inline.
7251         * inline.ads Code reformatting.
7252         * sem_attr.adb (Analyze_Attribute): Correct the prefix of
7253         attribute 'Result when the context is a generic instantiation.
7254         (Analyze_Attribute_Old_Result): Pragmas Depends and
7255         Refined_Depends are a valid context for attribute 'Result.
7256         (Denote_Same_Function): Allow attribute 'Result to denote
7257         generic functions.
7258         * sem_ch3.adb Add with and use clauses for Sem_Ch12.
7259         (Analyze_Declarations): Capture global references within the
7260         contracts of packages, subprograms and their respective bodies.
7261         * sem_ch6.adb (Analyze_Aspects_On_Body_Or_Stub): Removed.
7262         (Analyze_Completion_Contract): Removed.
7263         (Analyze_Generic_Subprogram_Body): Enchange the aspects after
7264         creating the generic copy. Create a generic contract for the
7265         template. Analyze the aspects of the generic body. Analyze the
7266         contract of the generic body when it is a compilation unit and
7267         capture global references.
7268         (Analyze_Subprogram_Body_Contract): Code cleanup.
7269         (Analyze_Subprogram_Contract): Do not save global references here.
7270         (Save_Global_References_In_List): Removed.
7271         * sem_ch7.adb (Analyze_Package_Body_Contract): Code cleanup.
7272         (Analyze_Package_Body_Helper): Create a generic contract for
7273         the template.
7274         (Analyze_Package_Contract): Code cleanup.
7275         * sem_ch10.adb Add with and use clauses for Sem_Ch12.
7276         (Analyze_Compilation_Unit): Capture global references in a
7277         generic subprogram declaration that acts as a compilation unit.
7278         * sem_ch12.adb Add with and use clauses for Sem_Prag. Illustrate
7279         the implementation of generic contracts. Alphabetize various
7280         subprograms.
7281         (Analyze_Generic_Package_Declaration):
7282         Create a generic contract for the template.
7283         (Analyze_Generic_Subprogram_Declaration): Create a generic
7284         contract for the template.
7285         (Analyze_Subprogram_Instantiation): Instantiate the contract of the
7286         subprogram.
7287         (Copy_Generic_Node): Link defining entities of the generic template
7288         with the corresponding defining entities of the generic copy. Update
7289         the processing of pragmas.
7290         (Instantiate_Contract): Removed.
7291         (Instantiate_Subprogram_Contract): New routine.
7292         (Requires_Delayed_Save): New routine.
7293         (Save_Global_References): Rename formal parameter N to Templ. Various
7294         cleanups.
7295         (Save_Global_References_In_Aspects): Moved from the spec.
7296         (Save_Global_References_In_Contract): New routine.
7297         (Save_References_In_Aggregate): New routine.
7298         (Save_References_In_Char_Lit_Or_Op_Symbol): New routine.
7299         (Save_References_In_Descendants): New routine.
7300         (Save_References_In_Identifier): New routine.
7301         (Save_References_In_Operator): New routine.
7302         (Save_References_In_Pragma): New routine.
7303         * sem_ch12.ads (Save_Global_References): Rename formal
7304         parameter N to Templ. Update the comment on usage.
7305         (Save_Global_References_In_Aspects): Moved to the body.
7306         (Save_Global_References_In_Contract): New routine.
7307         * sem_ch13.adb (Analyze_Aspect_Specifications_On_Body_Or_Stub):
7308         New routine.
7309         * sem_ch13.ads (Analyze_Aspect_Specifications_On_Body_Or_Stub):
7310         New routine.
7311         * sem_prag.adb (Add_Item_To_Name_Buffer): Add support for
7312         generic parameters.
7313         (Analyze_Contract_Cases_In_Decl_Part): Code cleanup.
7314         (Analyze_Depends_Global): New routine.
7315         (Analyze_Depends_In_Decl_Part): Code cleanup.
7316         (Analyze_Global_In_Decl_Part): Code cleanup.
7317         (Analyze_Global_Item): Constants are now valid global items. Do
7318         not perform state-related checks in an instance. Change the way
7319         renamings are handled.  (Analyze_Initial_Condition_In_Decl_Part):
7320         Code cleanup.
7321         (Analyze_Initializes_In_Decl_Part): Code cleanup.
7322         (Analyze_Input_Output): The analysis of attribute 'Result in
7323         the context of pragmas Depends or Refined_Depends now reuses
7324         the existing attribute analysis machinery. Constants and
7325         generic parameters are now valid dependency items. Do not
7326         perform state-related checks in an instance. Change the way
7327         renamings are handled.  (Analyze_Pragma): Add a "characteristics"
7328         section for pragmas Abstract_State, Contract_Cases, Depends,
7329         Extensions_Visible, Global, Initial_Condition, Initializes,
7330         Post, Post_Class, Postcondition, Pre, Pre_Class, Precondition,
7331         Refined_Depends, Refined_Global, Refined_Post, Refined_State, Test_Case.
7332         (Analyze_Pre_Post_Condition): Do not create a generic
7333         template here.
7334         (Analyze_Pre_Post_Condition_In_Decl_Part): Code cleanup.
7335         (Analyze_Refined_Depends_Global_Post): New routine.
7336         (Analyze_Refined_Depends_In_Decl_Part): Code cleanup.
7337         (Analyze_Refined_Global_In_Decl_Part): Code cleanup.
7338         (Analyze_Refined_Pragma): Removed.
7339         (Analyze_Refined_State_In_Decl_Part): Code cleanup.
7340         (Analyze_Test_Case_In_Decl_Part): Code cleanup.
7341         (Check_Dependency_Clause): Do not perform this check in an instance.
7342         (Check_Function_Return): Add support for generic functions.
7343         (Check_In_Out_States): Do not perform this check in an instance.
7344         (Check_Input_States): Do not perform this check in an instance.
7345         (Check_Mode_Restriction_In_Function): Add support for generic functions.
7346         (Check_Output_States): Do not perform this check in an instance.
7347         (Check_Postcondition_Use_In_Inlined_Subprogram): Rename
7348         parameter Subp_Id to Spec_Id and update comment on usage.
7349         (Check_Proof_In_States): Do not perform this check in an instance.
7350         (Check_Refined_Global_Item): Add support for constants.
7351         (Check_Refined_Global_List): Do not perform this check in an instance.
7352         (Collect_Global_Items): Reimplemented.
7353         (Collect_Subprogram_Inputs_Outputs): Add support for generic parameters.
7354         (Create_Generic_Template): Removed.
7355         (Find_Related_Package_Or_Body): Moved to spec.
7356         (Find_Role): Add support for generic parameters and constants.
7357         (Get_Argument): Moved to spec. Rename parameter Spec_Id to Context_Id.
7358         (Match_Item): Add support for constants.
7359         (Preanalyze_Test_Case_Arg): Reimplemented.
7360         (Report_Extra_Clauses): Do not perform this check in an instance.
7361         (Report_Extra_Constituents): Do not perform this check in an instance.
7362         * sem_prag.ads (Collect_Subprogram_Inputs_Outputs): Update
7363         the comment on usage.
7364         (Find_Related_Package_Or_Body): Moved from body.
7365         (Get_Argument): Moved from body.
7366         * sem_util.adb Add with and use clauses for Sem_Ch12.
7367         (Corresponding_Spec_Of): Add support for packages and package bodies.
7368         (Create_Generic_Contract): New routine.
7369         (Is_Contract_Annotation): Reimplemented.
7370         (Is_Generic_Declaration_Or_Body): New routine.
7371         (Is_Package_Contract_Annotation): New routine.
7372         (Is_Subprogram_Contract_Annotation): New routine.
7373         * sem_util.ads (Corresponding_Spec_Of): Update the comment on usage.
7374         (Create_Generic_Contract): New routine.
7375         (Is_Generic_Declaration_Or_Body): New routine.
7376         (Is_Package_Contract_Annotation): New routine.
7377         (Is_Subprogram_Contract_Annotation): New routine.
7378         * sinfo.adb (Is_Generic_Contract_Pragma): New routine.
7379         (Set_Is_Generic_Contract_Pragma): New routine.
7380         * sinfo.ads Add new attribute Is_Generic_Contract_Pragma along
7381         with occurrences in nodes.
7382         (Is_Generic_Contract_Pragma): New routine along with pragma Inline.
7383         (Set_Is_Generic_Contract_Pragma): New routine along with pragma Inline.
7384         * treepr.adb (Print_Entity_Info): Output fields 36 to 41.
7386 2015-05-12  Robert Dewar  <dewar@adacore.com>
7388         * a-taster.ads: Minor comment fix: fix bad header, this is a
7389         pure RM unit.
7391 2015-05-12  Robert Dewar  <dewar@adacore.com>
7393         * sem_intr.adb: (Check_Shift): Diagnose bad modulus value.
7395 2015-05-12  Robert Dewar  <dewar@adacore.com>
7397         * gnat1drv.adb (Adjust_Global_Switches): Default to suppressing
7398         Alignment_Checks on non-strict alignment machine.
7399         * sem_ch13.adb (Validate_Address_Clauses): Don't give
7400         compile-time alignment warnings if run time Alignment_Check
7401         is suppressed.
7403 2015-05-12  Thomas Quinot  <quinot@adacore.com>
7405         * g-sercom.ads, g-sercom-linux.adb (GNAT.Serial_Communications.
7406         Data_Rate): New literals B75, B110, B150, B300, B600.
7408 2015-05-12  Doug Rupp  <rupp@adacore.com>
7410         * init.c (__gnat_init_float) [vxworks]: For e500v2,
7411         do nothing and leave the responsibility to install the handler
7412         and enable the exceptions to the BSP.
7414 2015-05-12  Robert Dewar  <dewar@adacore.com>
7416         * sem_ch9.adb, einfo.ads, exp_intr.adb: Minor reformatting.
7417         * sem_disp.adb: Minor code reorganization (remove junk redundant
7418         null statement).
7419         * exp_unst.adb (Unnest_Subprogram.Uplev_Refs): Ignore uplevel
7420         references to bounds of types coming from original type reference.
7421         * checks.ads: Minor reformatting.
7422         * checks.adb: Minor reformatting.
7423         * sem_prag.adb (Analyze_Pragma, case Check): If in ignored
7424         assertion, then make sure we do not drag in bignum stuff.
7426 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
7428         * sem_ch9.adb (Collect_Interfaces): Initialize
7429         Direct_Primitive_Operations for a tagged synchronized type,
7430         so it can used in ASIS mode.
7431         * sem_disp.adb (Check_Dispatching_Operation): If expansion is
7432         disabled, attach subprogram to list of Direct_Primitive_Operations
7433         of synchronized type itself, for ASIS use, because in this case
7434         Corresponding_Record_Type is not built.
7435         * einfo.ads: Indicate use of Direct_Primitive_Operations on
7436         synchronized type.
7438 2015-05-12  Pierre-Marie de Rodat  <derodat@adacore.com>
7440         * exp_pakd.adb: Make clearer the comment in exp_pakd.adb about
7441         ___XP suffixes.
7443 2015-05-12  Robert Dewar  <dewar@adacore.com>
7445         * sem_ch3.adb, sem_util.adb, sem_ch6.adb: Minor reformatting.
7447 2015-05-12  Robert Dewar  <dewar@adacore.com>
7449         * exp_unst.adb (Visit_Node): Deal with subprogram and package stubs.
7451 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
7453         * exp_intr.adb (Expand_Dispatching_Constructor_Call): The
7454         tag to be retrieved for the generated call is the first entry
7455         in the dispatch table for the return type of the instantiated
7456         constructor.
7458 2015-05-12  Bob Duff  <duff@adacore.com>
7460         * exp_ch7.adb, exp_ch7.ads, exp_intr.adb, exp_util.adb,
7461         exp_util.ads: Update comments.
7463 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
7465         * sem_ch3.adb (Add_Internal_Interface_Entities): Do no generate
7466         freeze nodes for these in ASIS mode, because they lead to
7467         elaoration order issues in gigi.
7469 2015-05-12  Hristian Kirtchev  <kirtchev@adacore.com>
7471         * sem_ch6.adb (Analyze_Expression_Function): Code
7472         cleanup. Use Copy_Subprogram_Spec to create a proper spec.
7473         (Analyze_Subprogram_Body_Helper): Code cleanup. Do not
7474         prepare a stand alone body for inlining in GNATprove mode
7475         when inside a generic.  (Body_Has_Contract): Reimplemented.
7476         (Build_Subprogram_Declaration): New routine.
7477         * sem_ch10.adb (Analyze_Compilation_Unit): Capture global
7478         references within generic bodies by loading them.
7479         * sem_util.adb (Copy_Parameter_List): Code cleanup.
7480         (Copy_Subprogram_Spec): New routine.
7481         (Is_Contract_Annotation): New routine.
7482         * sem_util.ads (Copy_Subprogram_Spec): New routine.
7483         (Is_Contract_Annotation): New routine.
7485 2015-05-12  Hristian Kirtchev  <kirtchev@adacore.com>
7487         * sem_attr.adb (Resolve_Attribute): Do not analyze the generated
7488         body of an expression function when the prefix of attribute
7489         'Access is the body.
7491 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
7493         * sem_ch3.adb (Build_Derived_Enumeration_Type): The anonymous base
7494         created for a derived enumeration type is not a first subtype,
7495         even though it is defined through a full type declaration.
7496         * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): Do not process
7497         aspects for the anonymous base type constructed for a derived
7498         scalar type, because they will be set when the first subtype
7499         is frozen.
7500         (Inherit_Aspects_At_Freeze_Point): Fix typos on handling of
7501         Default_Value and Default_Component_Value, that prevented the
7502         proper inheritance of these aspects.
7504 2015-05-12  Gary Dismukes  <dismukes@adacore.com>
7506         * exp_ch6.adb, exp_unst.adb: Minor typo fixes.
7508 2015-05-12  Robert Dewar  <dewar@adacore.com>
7510         * sem_ch3.adb: Minor reformatting.
7512 2015-05-12  Vincent Celier  <celier@adacore.com>
7514         * gnatcmd.adb: If we want to invoke gnatmake (gnatclean) with
7515         -P, then check if gprbuild (gprclean) is available; if it is,
7516         use gprbuild (gprclean) instead of gnatmake (gnatclean).
7518 2015-05-12  Robert Dewar  <dewar@adacore.com>
7520         * debug.adb: Add flag -gnatd.3 to output diagnostic info from
7521         Exp_Unst.
7522         * einfo.ad, einfo.adb: Reorganize (and remove most of) flags used by
7523         Exp_Unst.
7524         * exp_ch6.adb (Unest_Bodies): Table for delayed calls to
7525         Unnest_Subprogram (Expand_N_Subprogram_Body): Add entry to table
7526         for later call instead of calling Unnest_Subprogram directly
7527         (Initialize): New procedure (Unnest_Subprograms): New procedure
7528         * exp_ch6.ads (Add_Extra_Actual_To_Call): Move into proper
7529         alpha order.
7530         (Initialize): New procedure.
7531         (Unnest_Subprograms): New procedure.
7532         * exp_unst.adb (Unnest_Subprogram): Major rewrite, moving
7533         all processing to this routine which is now called late
7534         after instantiating bodies. Fully handles the case of generic
7535         instantiations now.
7536         * exp_unst.ads: Major rewrite, moving all processing to
7537         Unnest_Subprogram.
7538         * frontend.adb (Frontend): Add call to Exp_Ch6.Initialize.
7539         (Frontend): Add call to Unnest_Subprograms.
7540         * sem_ch8.adb (Find_Direct_Name): Back to old calling sequence
7541         for Check_Nested_Access.
7542         * sem_util.adb (Build_Default_Subtype): Minor reformatting
7543         (Check_Nested_Access): Back to original VM-only form (we
7544         now do all the processing for Unnest_Subprogram at the time
7545         it is called.
7546         (Denotes_Same_Object): Minor reformatting
7547         (Note_Possible_Modification): Old calling sequence for
7548         Check_Nested_Access.
7549         * sem_util.ads (Check_Nested_Access): Back to original VM-only
7550         form (we now do all the processing for Unnest_Subprogram at the
7551         time it is called.
7553 2015-05-12  Robert Dewar  <dewar@adacore.com>
7555         * sem_ch3.adb, freeze.adb, sem_ch6.adb: Minor reformatting.
7557 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
7559         * sem_ch3.adb (Analyze_Object_Declaration): New function
7560         Has_Delayed_Aspect, used to defer resolution of an aggregate
7561         expression when the object declaration carries aspects Address
7562         and/or Alignment.
7563         * freeze.adb (Freeze_Object_Declaration): New subsidiary procedure
7564         to Freeze_Entity.  In addition to the previous processing steps
7565         at the freeze point of an object, this procedure also handles
7566         aggregates in object declarations, when the declaration carries
7567         delayed aspects that require that the initialization of the
7568         object be attached to its freeze actions.
7570 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
7572         * sem_ch6.adb (Analyze_Subprogram_Declaration): Following
7573         AI12-0147, null procedures and expression functions are allowed
7574         in protected bodies.
7576 2015-05-12  Tristan Gingold  <gingold@adacore.com>
7578         * i-cpoint.adb (Copy_Terminated_Array): Copy nothing if Length is 0.
7580 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
7582         * sem_ch3.adb (Complete_Private_Subtype): Propagate
7583         Has_Delayed_Aspects flag from private to full view, to ensure
7584         that predicate functions are constructed.
7586 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
7588         * sem_ch6.adb (Process_Formals): If a tagged formal is an
7589         incomplete class-wide type, the subprogram must have a delayed
7590         freeze even though the opertation is not a primitive of the
7591         type. THis ensures that the backend can recover the full view
7592         when elaborating the subprogram declaration.
7594 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
7596         * exp_util.adb (Get_Current_Value_Condition): Nothing to be
7597         done if an elsif part has been rewritten so that it is not part
7598         of an enclosing if_statement.
7600 2015-05-12  Robert Dewar  <dewar@adacore.com>
7602         * sem_type.adb, sem_ch10.adb, freeze.adb, sem_ch6.adb, exp_disp.adb:
7603         Minor reformatting.
7605 2015-05-12  Bob Duff  <duff@adacore.com>
7607         * exp_attr.adb (Size): Remove unnecessary check for types with
7608         unknown discriminants.  That was causing the compiler to build
7609         a function call _size(T), where T is a type, not an object.
7611 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
7613         * sem_ch4.adb (Extended_Primitive_Ops): Exclude overriding
7614         primitive operations of a type extension declared in the package
7615         body, to prevent duplicates in extended list.
7617 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
7619         * sem_ch3.adb (Analyze_Component_Declaration): If the component is
7620         an unconstrained synchronized type with discriminants, create a
7621         constrained default subtype for it, so that the enclosing record
7622         can be given the proper size.
7623         * sem_util.adb (Build_Default_Subtype): If the subtype is created
7624         for a record discriminant, do not analyze the declarztion at
7625         once because it is added to the freezing actions of the enclosing
7626         record type.
7628 2015-05-12  Robert Dewar  <dewar@adacore.com>
7630         * exp_prag.adb (Expand_N_Pragma): Rewrite ignored pragma as
7631         Null statements.
7632         * namet.ads (Boolean3): Document this flag used for Ignore_Pragma.
7633         * par-prag.adb (Prag): Implement Ignore_Pragma.
7634         * sem_prag.adb: Implement Ignore_Pragma.
7635         * snames.ads-tmpl: Add entries for pragma Ignore_Pragma.
7637 2015-05-12  Javier Miranda  <miranda@adacore.com>
7639         * sem_ch10.adb (Build_Shadow_Entity): Link the class-wide shadow
7640         entity with its corresponding real entity.
7641         (Decorate_Type): Unconditionally build the class-wide shadow entity of
7642         tagged types.
7643         * einfo.ads, einfo.adb (Has_Non_Limited_View): New synthesized
7644         attribute.
7645         (Non_Limited_View): Moved from field 17 to field 19 be available
7646         in class-wide entities.
7647         * exp_attr.adb (Access_Cases): Code cleanup.
7648         * exp_disp.adb (Expand_Interface_Actuals): Ditto.
7649         * exp_util.adb (Non_Limited_Designated_Type): Ditto.
7650         * freeze.adb (Build_Renamed_Bdody): Ditto.
7651         * sem_aux.adb (Available_View): Ditto.
7652         * sem_ch4.adb (Analyze_Selected_Component): Ditto.
7653         (Try_One_Prefix_Interpretation): Ditto.
7654         * sem_ch5.adb (Analyze_Assignment): Ditto.
7655         * sem_ch6.adb (Detect_And_Exchange): Ditto.
7656         * sem_ch8.adb (Find_Expanded_Name): Ditto.
7657         * sem_disp.adb (Check_Controlling_Type): Ditto.
7658         * sem_res.adb (Resolve_Type_Conversion): Ditto.
7659         (Full_Designated_Type): Ditto.
7660         * sem_type.adb (Covers): Ditto.
7661         * sem_util.adb: Fix typo in comment.
7663 2015-05-12  Robert Dewar  <dewar@adacore.com>
7665         * exp_unst.adb (Get_Real_Subp): New subprogram.
7666         (Unnest_Subprogram): Use Get_Real_Subp.
7667         (Uplev_Refs_For_One_Subp): Skip if no ARECnU entity.
7668         (Uplev_Refs_For_One_Subp): Use actual subtype in unconstrained case.
7670 2015-05-12  Robert Dewar  <dewar@adacore.com>
7672         * a-reatim.adb ("/"): Add explicit check for Time_Span_First / -1.
7674 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
7676         * sem_ch4.adb (Extended_Primitive_Ops): New subprogram,
7677         auxiliary to Try_Primitive_Operation to handle properly prefixed
7678         calls where the operation is not a primitive of the type, but
7679         is declared in the package body that is in the immediate scope
7680         of the type.
7682 2015-05-12  Robert Dewar  <dewar@adacore.com>
7684         * sem_util.adb (Is_Variable): Allow X'Deref(Y) as a variable.
7686 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
7688         * sem_ch8.adb (Find_Expanded_Name): Handle properly a fully
7689         qualified name for an instance of a generic grand-child unit in
7690         the body its parent.
7692 2015-05-12  Robert Dewar  <dewar@adacore.com>
7694         * exp_unst.adb (Upref_Name): New subprogram.
7695         (Unnest_Subprogram): Use Upref_Name.
7696         (Unnest_Subprogram): Use new Deref attribute.
7697         * exp_unst.ads: Doc updates.
7699 2015-05-12  Thomas Quinot  <quinot@adacore.com>
7701         * adaint.c: Enable Large File Support in adaint so that __gnat_readdir
7702         can access files on filesystems mounted from servers that use large
7703         NFS file handles.
7705 2015-05-09  Eric Botcazou  <ebotcazou@adacore.com>
7707         * gcc-interface/utils.c (gnat_write_global_declarations): Use type_decl
7708         method instead of global_decl for TYPE_DECLs.
7710 2015-04-27  Jim Wilson  <jim.wilson@linaro.org>
7712         * gcc-interface/Makefile-lan.in (ada.mostlyclean): Remove gnatbind
7713         and gnat1.
7715 2015-04-13  Eric Botcazou  <ebotcazou@adacore.com>
7717         * gnatvsn.ads (Library_Version): Bump to 6.
7719 2015-04-09  Iain Sandoe  <iain@codesourcery.com>
7721         * gcc-interface/Makefile.in (darwin, powerpc): Enable atomics.
7723 2015-04-08  Eric Botcazou  <ebotcazou@adacore.com>
7725         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Do not make
7726         a function returning an unconstrained type 'const' for the middle-end.
7728         * gcc-interface/trans.c (Pragma_to_gnu) <case Pragma_Warning>: Use
7729         exact condition to detect Reason => "..." pattern.
7731 2015-03-31  Tom de Vries  <tom@codesourcery.com>
7733         PR ada/65490
7734         * terminals.c (child_setup_tty): Fix warning 'argument to sizeof in
7735         bzero call is the same expression as the destination'.
7737 2015-03-26  Eric Botcazou  <ebotcazou@adacore.com>
7739         * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Deref>: New case.
7741 2015-03-24  Gary Dismukes  <dismukes@adacore.com>
7743         * sem_ch3.adb: Minor typo fix (missing paren).
7745 2015-03-24  Robert Dewar  <dewar@adacore.com>
7747         * sinfo.ads: Update comment.
7749 2015-03-24  Robert Dewar  <dewar@adacore.com>
7751         * exp_attr.adb: Add entry for typ'Deref.
7752         * sem_attr.adb (Deref): New GNAT attribute.
7753         * sem_attr.ads: Add entry for new GNAT attribute Deref.
7754         * snames.ads-tmpl: Add entries for new attribute Deref.
7756 2015-03-24  Ed Schonberg  <schonberg@adacore.com>
7758         * sem_ch13.adb (Rep_Item_Too_Early): allow pragma Convention
7759         on generic type.
7761 2015-03-24  Gary Dismukes  <dismukes@adacore.com>
7763         * inline.adb: Minor typo fix.
7765 2015-03-24  Arnaud Charlet  <charlet@adacore.com>
7767         * doc/gnat_ugn/building_executable_programs_with_gnat.rst,
7768         doc/gnat_ugn/gnat_utility_programs.rst
7769         doc/gnat_rm/implementation_defined_attributes.rst
7770         doc/gnat_rm/implementation_defined_pragmas.rst
7771         doc/gnat_rm/representation_clauses_and_pragmas.rst
7772         doc/gnat_rm/about_this_guide.rst
7773         doc/gnat_rm/implementation_of_ada_2012_features.rst: Doc improvements.
7774         * gnat_rm.texi, gnat_ugn.texi: Regenerate.
7776 2015-03-23  Jakub Jelinek  <jakub@redhat.com>
7778         PR bootstrap/65522
7779         * adadecode.c (ada_demangle): Guard with IN_RTS instead of IN_GCC.
7781 2015-03-20  Eric Botcazou  <ebotcazou@adacore.com>
7783         PR ada/65451
7784         * gcc-interface/utils.c (gnat_pushdecl): Tidy up and improve comment.
7785         Make sure to chain only main variants through TYPE_NEXT_PTR_TO.
7787         * gcc-interface/trans.c (Attribute_to_gnu): Revert latest change.
7789 2015-03-16  Eric Botcazou  <ebotcazou@adacore.com>
7791         * gcc-interface/utils2.c (gnat_invariant_expr): Return null if the type
7792         of the expression ends up being composite.
7794 2015-03-16  Eric Botcazou  <ebotcazou@adacore.com>
7796         * gcc-interface/decl.c (is_from_limited_with_of_main): New predicate.
7797         (gnat_to_gnu_entity) <E_Subprogram_Type>: Invoke it on return and
7798         parameter types to detect circularities in ASIS mode.
7799         * gcc-interface/trans.c (Attribute_to_gnu): Mention AI05-0151.
7801 2015-03-16  Eric Botcazou  <ebotcazou@adacore.com>
7803         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Abstract_State>: Do not
7804         short-circuit the regular handling.
7806 2015-03-13  Robert Dewar  <dewar@adacore.com>
7808         * exp_unst.adb (Note_Uplevel_Reference): Eliminate duplicate
7809         references.
7810         (Actual_Ref): New function.
7811         (AREC_String): Minor reformatting.
7812         (Unnest_Subprogram): Use Actual_Ref.
7813         * frontend.adb (Frontend): Turn off Unnest_Subprogram_Mode
7814         before call to Instantiate_Bodies.
7816 2015-03-13  Ed Schonberg  <schonberg@adacore.com>
7818         * freeze.adb (Freeze_Profile): If the return type of a function
7819         being frozen is an untagged limited view and the function is
7820         abstract, mark the type as frozen because there is no later
7821         point at which the profile of the subprogram will be elaborated.
7823 2015-03-13  Robert Dewar  <dewar@adacore.com>
7825         * einfo.adb, einfo.ads, atree.adb, atree.ads, atree.h: Add seventh
7826         component to entities. Add new fields Field36-41 and Node36-41.
7828 2015-03-13  Claire Dross  <dross@adacore.com>
7830         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Rewrite after review.
7832 2015-03-13  Robert Dewar  <dewar@adacore.com>
7834         * exp_util.adb (Is_Volatile_Reference): Compile time known
7835         value is never considered to be a volatile reference.
7837 2015-03-13  Robert Dewar  <dewar@adacore.com>
7839         * sem_ch3.adb (Analyze_Object_Contract): Suppress "constant
7840         cannot be volatile" for internally generated object (such as
7841         FIRST and LAST constants).
7843 2015-03-13  Ed Schonberg  <schonberg@adacore.com>
7845         * sem_ch12.adb (Validate_Access_Subprogram_Instance): If a
7846         convention is specified for the formal parameter, verify that
7847         the actual has the same convention.
7848         * sem_prag.adb (Set_Convention_From_Pragma): Allow convention
7849         pragma to be set on a generic formal type.
7850         * sem_util.adb (Set_Convention): Ignore within an instance,
7851         as it has already been verified in the generic unit.
7853 2015-03-13  Claire Dross  <dross@adacore.com>
7855         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do not inline
7856         subprograms with unconstrained record parameters containing
7857         Itype declarations.
7858         * sinfo.ads Document GNATprove assumption that type should match
7859         in the AST.
7860         * sem_ch6.adb (Analyze_Subprogram_Body_Contract):
7861         Do not check for Refined_Depends and Refined_Globals contracts
7862         as they are optional.
7864 2015-03-13  Ed Schonberg  <schonberg@adacore.com>
7866         * sem_ch12.adb (Instantiate_Type): For a floating-point type,
7867         capture dimension info if any, because the generated subtype
7868         declaration does not come from source and will not process dimensions.
7869         * sem_dim,adb (Analyze_Dimension_Extension_Or_Record_Aggregate):
7870         Do not analyze expressions with an initialization procedure
7871         because aggregates will have been checked at the point of record
7872         declaration.
7874 2015-03-13  Robert Dewar  <dewar@adacore.com>
7876         * aspects.ads, aspects.adb: Add entries for aspect Unimplemented.
7877         * einfo.ads, einfo.adb (Is_Unimplemented): New flag.
7878         * sem_ch13.adb: Add dummy entry for aspect Unimplemented.
7879         * snames.ads-tmpl: Add entry for Name_Unimplemented.
7881 2015-03-13  Gary Dismukes  <dismukes@adacore.com>
7883         * style.adb (Missing_Overriding): Apply the
7884         Comes_From_Source test to the Original_Node of the subprogram
7885         node, to handle the case of a null procedure declaration that
7886         has been rewritten as an empty procedure body.
7888 2015-03-13  Robert Dewar  <dewar@adacore.com>
7890         * exp_util.ads: Minor fix to comment.
7891         * sem_ch3.adb (Constrain_Index): Correct pasto from previous
7892         change.
7894 2015-03-13  Robert Dewar  <dewar@adacore.com>
7896         * exp_util.ads, exp_util.adb (Force_Evaluation): Add Related_Id and
7897         Is_Low/High_Bound params.
7898         * sem_ch3.adb (Constrain_Index): Use new Force_Evaluation calling
7899         sequence to simplify generation of FIRST/LAST temps for bounds.
7901 2015-03-12  Olivier Hainque  <hainque@adacore.com>
7903         * gcc-interface/trans.c (Attribute_to_gnu) <Code_Address case>:
7904         On targets where a function symbol designates a function descriptor,
7905         fetch the function code address from the descriptor.
7906         (USE_RUNTIME_DESCRIPTORS): Provide a default definition.
7908 2015-03-04  Robert Dewar  <dewar@adacore.com>
7910         * sem_warn.adb: Minor reformatting.
7911         * init.c: Minor tweaks.
7913 2015-03-04  Dmitriy Anisimko  <anisimko@adacore.com>
7915         * a-coinho-shared.adb: Fix clear of already empty holder.
7917 2015-03-04  Robert Dewar  <dewar@adacore.com>
7919         * exp_unst.adb (Check_Dynamic_Type): Ignore library level types.
7920         (Check_Uplevel_Reference_To_Type): Ignore call inside generic.
7921         (Note_Uplevel_Reference): Ignore call inside generic.
7922         (Note_Uplevel_Reference): Fix check for no entity field.
7923         (Unnest_Subprogram): Ignore call inside generic.
7924         (Find_Current_Subprogram): Use Defining_Entity, not Defining_Unit_Name.
7925         (Visit_Node): Ignore calls to Imported subprograms.
7926         (Visit_Node): Fix problem in finding subprogram body in some cases.
7927         (Add_Form_To_Spec): Use Defining_Entity, not Defining_Unit_Name.
7929 2015-03-04  Robert Dewar  <dewar@adacore.com>
7931         * einfo.adb (Is_ARECnF_Entity): Removed.
7932         (Last_Formal): Remove special handling of Is_ARECnF_Entity.
7933         (Next_Formal): Remove special handling of Is_ARECnF_Entity.
7934         (Next_Formal_With_Extras): Remove special handling of Is_ARECnF_Entity.
7935         (Number_Entries): Minor reformatting.
7936         * einfo.ads (Is_ARECnF_Entity): Removed.
7937         * exp_unst.adb (Unnest_Subprogram): Remove setting of
7938         Is_ARECnF_Entity.
7939         (Add_Extra_Formal): Use normal Extra_Formal circuit.
7940         * sprint.adb (Write_Param_Specs): Properly handle case where
7941         there are no source formals, but we have at least one Extra_Formal
7942         present.
7944 2015-03-04  Ed Schonberg  <schonberg@adacore.com>
7946         * sem_aggr.adb (Resolve_Record_Aggregate,
7947         Add_Discriminant_Values): If the value is a reference to the
7948         current instance of an enclosing type, use its base type to check
7949         against prefix of attribute reference, because the target type
7950         may be otherwise constrained.
7952 2015-03-04  Robert Dewar  <dewar@adacore.com>
7954         * atree.h: Add entries for Flag287-Flag309.
7955         * einfo.adb: Add (unused) flags Flag287-Flag309.
7957 2015-03-04  Ed Schonberg  <schonberg@adacore.com>
7959         * sem_util.adb (Collect_Interfaces, Collect): When gathering
7960         interfaces of ancestors, handle properly a subtype of a private
7961         extension.
7963 2015-03-04  Robert Dewar  <dewar@adacore.com>
7965         * einfo.adb (Is_ARECnF_Entity): New flag (ARECnF is an extra formal).
7966         (Next_Formal): Don't return ARECnF formal.
7967         (Last_Formal): Don't consider ARECnF formal.
7968         (Next_Formal_With_Extras): Do consider ARECnF formal.
7969         * einfo.ads (Is_ARECnF_Entity): New flag (ARECnF is an extra formal).
7970         * exp_unst.adb (Create_Entities): Set Is_ARECnF_Entity flag.
7972 2015-03-04  Javier Miranda  <miranda@adacore.com>
7974         * exp_ch6.adb (Expand_Simple_Function_Return): When the returned
7975         object is a class-wide interface object and we generate the
7976         accessibility described in RM 6.5(8/3) then displace the pointer
7977         to the object to reference the base of the object (to get access
7978         to the TSD of the object).
7980 2015-03-04  Hristian Kirtchev  <kirtchev@adacore.com>
7982         * sem_prag.adb (Analyze_Abstract_State): Use routine
7983         Malformed_State_Error to issue general errors.
7984         (Analyze_Pragma): Diagnose a syntax error related to a state
7985         declaration with a simple option.
7986         (Malformed_State_Error): New routine.
7988 2015-03-04  Robert Dewar  <dewar@adacore.com>
7990         * a-strsup.adb (Super_Slice): Deal with super flat case.
7991         * einfo.ads: Minor reformatting.
7992         * s-imgdec.adb (Set_Decimal_Digits): Add comment about possibly
7993         redundant code.
7995 2015-03-04  Claire Dross  <dross@adacore.com>
7997         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
7998         a-cforse.ads, a-cofove.ads: Use Default_Initial_Condition on formal
7999         containers.
8001 2015-03-04  Ed Schonberg  <schonberg@adacore.com>
8003         * sem_warn.adb (Check_References): When checking for an unused
8004         in-out parameter of a class- wide type, use its type to determine
8005         whether it is private, in order to avoid a spurious warning when
8006         subprogram spec and body are in different units.
8008 2015-03-04  Yannick Moy  <moy@adacore.com>
8010         * sem_attr.adb: Improve warning messages.
8012 2015-03-04  Robert Dewar  <dewar@adacore.com>
8014         * exp_ch6.adb (Expand_N_Subprogram_Body): Avoid trying to unnest
8015         generic subprograms.
8016         * exp_unst.adb (Check_Dynamic_Type): Handle record types properly
8017         (Note_Uplevel_Reference): Ignore uplevel references to non-types
8018         (Get_Level): Consider only subprograms, not blocks.
8019         (Visit_Node): Set proper condition for generating ARECnF entity.
8020         Ignore indirect calls. Ignore calls to subprograms
8021         outside our nest.
8022         (Unnest_Subprogram): Minor changes in dealing with ARECnF entity.
8023         (Add_Form_To_Spec): Properly set Last_Entity field.
8024         (Unnest_Subprogram): Set current subprogram scope for analyze calls.
8025         Handle case of no uplevel refs in outer subprogram
8026         Don't mark uplevel entities as aliased.
8027         Don't deal with calls with no ARECnF requirement.
8029 2015-03-04  Robert Dewar  <dewar@adacore.com>
8031         * s-valrea.adb (Scan_Real): Remove redundant tests from scaling loops.
8032         * s-imgdec.adb (Set_Decimal_Digits): Remove redundant Max
8033         operation in computing LZ.
8034         * sem_attr.adb: Minor typo fix
8036 2015-03-04  Robert Dewar  <dewar@adacore.com>
8038         * exp_ch7.adb: Minor reformatting.
8039         * exp_unst.adb (Build_Tables): Fix minor glitch for no separate
8040         spec case.
8041         * erroutc.adb (Delete_Msg): add missing decrement of info msg counter.
8043 2015-03-04  Hristian Kirtchev  <kirtchev@adacore.com>
8045         * exp_ch6.adb (Build_Pragma_Check_Equivalent): Suppress
8046         references to formal parameters subject to pragma Unreferenced.
8047         (Suppress_Reference): New routine.
8048         * sem_attr.adb (Analyze_Attribute): Reimplement the analysis
8049         of attribute 'Old. Attributes 'Old and 'Result now share
8050         common processing.
8051         (Analyze_Old_Result_Attribute): New routine.
8052         (Check_Placement_In_Check): Removed.
8053         (Check_Placement_In_Contract_Cases): Removed.
8054         (Check_Placement_In_Test_Case): Removed.
8055         (Check_Use_In_Contract_Cases): Removed.
8056         (Check_Use_In_Test_Case): Removed.
8057         (In_Refined_Post): Removed.
8058         (Is_Within): Removed.
8059         * sem_warn.adb (Check_Low_Bound_Tested): Code cleanup.
8060         (Check_Low_Bound_Tested_For): New routine.
8062 2015-03-04  Hristian Kirtchev  <kirtchev@adacore.com>
8064         * exp_ch3.adb (Expand_N_Object_Declaration):
8065         Generate a runtime check to test the expression of pragma
8066         Default_Initial_Condition when the object is default initialized.
8068 2015-03-02  Robert Dewar  <dewar@adacore.com>
8070         * scng.adb (Scan): Ignore illegal character in relaxed
8071         semantics mode.
8073 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
8075         * sem_ch4.adb (Analyze_Set_Membership); Retain Overloaded flag
8076         on left operand, so it can be properly resolved with type of
8077         alternatives of right operand.
8078         * sem_res.adb (Resolve_Set_Membership): Handle properly an
8079         overloaded left-hand side when the alternatives on the right
8080         hand side are literals of some universal type.  Use first
8081         non-overloaded alternative to find expected type.
8083 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
8085         * exp_ch7.adb (Make_Set_Finalize_Address_Call): Use underlying
8086         type to retrieve designated type, because the purported access
8087         type may be a partial (private) view, when it is declared in
8088         the private part of a nested package, and finalization actions
8089         are generated when completing compilation of enclosing unit.
8091 2015-03-02  Robert Dewar  <dewar@adacore.com>
8093         * back_end.adb (Call_Back_End): Remove previous patch,
8094         the back end now gets to see the result of -gnatd.1
8095         (Unnest_Subprogram_Mode) processing.
8096         * elists.ads, elists.adb (List_Length): New function.
8097         * exp_unst.ads, exp_unst.adb: Major changes, first complete version.
8098         * sem_util.adb (Check_Nested_Access): Handle formals in
8099         Unnest_Subprogram_Mode.
8100         (Adjust_Named_Associations): Minor reformatting.
8101         * sprint.adb (Sprint_Node_Actual): Fix failure to print aliased
8102         for parameters.
8104 2015-03-02  Robert Dewar  <dewar@adacore.com>
8106         * atree.ads, atree.adb (Uint24): New function
8107         (Set_Uint24): New procedure.
8108         * atree.h (Uint24): New macro for field access.
8109         * back_end.adb (Call_Back_End): For now, don't call back end
8110         if unnesting subprogs.
8111         * einfo.adb (Activation_Record_Component): New field
8112         (Subps_Index): New field.
8113         * einfo.ads (Activation_Record_Component): New field
8114         (Subps_Index): New field Minor reordering of comments into alpha order.
8115         * exp_unst.ads, exp_unst.adb: Continued development.
8117 2015-03-02  Gary Dismukes  <dismukes@adacore.com>
8119         * exp_disp.ads: Minor reformatting.
8121 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
8123         * sem_ch8.adb (Chain_Use_Clause): Do not chain use clause from
8124         ancestor to list of use clauses active in descendant unit if we
8125         are within the private part of an intervening parent, to prevent
8126         circularities in use clause list.
8128 2015-03-02  Javier Miranda  <miranda@adacore.com>
8130         * exp_ch9.adb (Build_Corresponding_Record): Propagate type
8131         invariants to the corresponding record type.
8132         * exp_disp.ad[sb] (Set_DT_Position_Value): New subprogram
8133         which sets the value of the DTC_Entity associated with a given
8134         primitive of a tagged type and propagates the value to the
8135         wrapped subprogram.
8136         (Set_DTC_Entity_Value): Propagate the DTC
8137         value to the wrapped entity.
8138         * sem_ch13.adb (Build_Invariant_Procedure): Append the code
8139         associated with invariants of progenitors.
8140         * sem_ch3.adb (Build_Derived_Record_Type): Inherit type invariants
8141         of parents and progenitors.
8142         (Process_Full_View): Check hidden inheritance of class-wide type
8143         invariants.
8144         * sem_ch7.adb (Analyze_Package_Specification): Do not generate
8145         the invariant procedure for interface types; build the invariant
8146         procedure for tagged types inheriting invariants from their
8147         progenitors.
8148         * sem_prag.adb (Pragma_Invariant) Allow invariants in interface
8149         types but do not build their invariant procedure since their
8150         invariants will be propagated to the invariant procedure of
8151         types covering the interface.
8152         * exp_ch6.adb, exp_disp.adb, sem_ch3.adb, sem_ch7.adb,
8153         sem_ch8.adb, sem_disp.adb: Replace all calls to Set_DT_Position
8154         by calls to Set_DT_Position_Value.
8156 2015-03-02  Hristian Kirtchev  <kirtchev@adacore.com>
8158         * sem_attr.adb (Analyze_Attribute): Factor out heavily indented
8159         code in Denote_Same_Function.  Do not analyze attribute 'Result
8160         when it is inside procedure _Postconditions.  Remove a misplaced
8161         warning diagnostic. Code cleanup.
8162         (Denote_Same_Function): New routine.
8163         * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Code
8164         cleanup. Warn on pre/postconditions on an inlined subprogram.
8165         (Analyze_Pragma, Refined_Post case): Warn on pre/postconditions on
8166         an inlined subprogram.
8167         (Analyze_Pre_Post_Condition_In_Decl_Part): Code cleanup. Warn on
8168         pre/post condition on an inlined subprogram.
8169         (Analyze_Test_Case_In_Decl_Part): Code cleanup. Warn on
8170         pre/postconditions on an inlined subprogram.
8171         (Check_Postcondition_Use_In_Inlined_Subprogram): New routine.
8173 2015-03-02  Hristian Kirtchev  <kirtchev@adacore.com>
8175         * sem_prag.adb (Ensure_Aggregate_Form):
8176         Ensure that the name denoted by the Chars of a pragma argument
8177         association has the proper Sloc when converted into an aggregate.
8179 2015-03-02  Bob Duff  <duff@adacore.com>
8181         * sem_ch6.adb (Check_Private_Overriding): Capture
8182         Incomplete_Or_Partial_View in a constant. This is cleaner and
8183         more efficient.
8185 2015-03-02  Gary Dismukes  <dismukes@adacore.com>
8187         * einfo.ads, exp_unst.ads: Minor reformatting.
8189 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
8191         * a-strsea.adb (Find_Token): Ensure that the range of iteration
8192         does not perform any improper character access. This prevents
8193         erroneous access in the unusual case of an empty string target
8194         and a From parameter less than Source'First.
8196 2015-03-02  Robert Dewar  <dewar@adacore.com>
8198         * elists.adb (List_Length): Fix incorrect result.
8200 2015-03-02  Bob Duff  <duff@adacore.com>
8202         * sem_ch6.adb (Check_Private_Overriding): Refine the legality
8203         checks here. It used to check that the function is merely
8204         overriding SOMEthing. Now it checks that the function is
8205         overriding a corresponding public operation. This is a correction
8206         to the implementation of the rule in RM-3.9.3(10).
8208 2015-03-02  Robert Dewar  <dewar@adacore.com>
8210         * debug.adb: Document new debug flag -gnatd.1.
8211         * einfo.ads, einfo.adb (Has_Nested_Subprogram): New flag.
8212         (Has_Uplevel_Reference): New flag (Is_Static_Type): New flag.
8213         (Uplevel_Reference_Noted):New flag (Uplevel_References): New field.
8214         * elists.ads elists.adb (List_Length): New function.
8215         * exp_ch6.adb (Expand_N_Subprogram_Body): Call Unnest_Subprogram
8216         when appropriate (Process_Preconditions): Minor code
8217         reorganization and reformatting
8218         * exp_unst.ads, exp_unst.adb: New files.
8219         * gnat1drv.adb (Adjust_Global_Switches): Set
8220         Unnest_Subprogram_Mode if -gnatd.1
8221         * namet.ads, namet.adb (Name_Find_Str): New version of Name_Find with
8222         string argument.
8223         * opt.ads (Unnest_Subprogram_Mode): New flag.
8224         * par-ch3.adb (P_Identifier_Declarations): Fixes to -gnatd.2 handling.
8225         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set
8226         Has_Nested_Subprogram flag.
8227         * sem_ch8.adb (Find_Direct_Name): New calling sequence for
8228         Check_Nested_Access.
8229         (Find_Selected_Component): Minor comment addition.
8230         * sem_util.adb (Check_Nested_Access): New version for use with Exp_Unst.
8231         (Note_Possible_Modification): New calling sequence for
8232         Check_Nested_Access.
8233         * sem_util.ads (Check_Nested_Access): New version for use with Exp_Unst.
8234         * gcc-interface/Make-lang.in (GNAT1_OBJS): Add exp_unst.o
8236 2015-03-02  Pierre-Marie de Rodat  <derodat@adacore.com>
8238         * gcc-interface/utils.c (gnat_pushdecl): For non-artificial pointer
8239         types, preserve the original type and create copies just like the C
8240         front-end does.  For artificial ones, do not define a name for
8241         the original type.
8242         (create_type_decl): When gnat_pushdecl made the input type the
8243         original type for the new declaration, do not define a stub
8244         declaration for it.
8245         * gcc-interface/utils2.c (build_binary_op): Accept two different
8246         pointer types when they point to the same type.
8248 2015-03-02  Hristian Kirtchev  <kirtchev@adacore.com>
8250         * exp_util.adb (Possible_Bit_Aligned_Component): Do not process
8251         an unanalyzed node.
8252         * sem_util.adb (Kill_Current_Values): Do not invalidate and
8253         de-null a constant.
8255 2015-03-02  Robert Dewar  <dewar@adacore.com>
8257         * sem_ch3.adb, exp_attr.adb, checks.adb, exp_aggr.adb: Minor
8258         reformatting.
8260 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
8262         * sem_ch8.adb: extend use of Available_Subtype.
8264 2015-03-02  Hristian Kirtchev  <kirtchev@adacore.com>
8266         * sem_prag.adb (Duplication_Error): Remove the special handling
8267         of 'Class or _Class in the context of pre/postconditions.
8268         (Process_Class_Wide_Condition): Remove the special handling of
8269         'Class or _Class in the context of pre/postconditions.
8270         * sem_util.adb (Original_Aspect_Pragma_Name): Names Pre_Class
8271         and Post_Class no longer need to be converted to _Pre and _Post.
8272         * sem_util.ads (Original_Aspect_Pragma_Name): Update the comment
8273         on usage.
8275 2015-03-02  Hristian Kirtchev  <kirtchev@adacore.com>
8277         * exp_ch6.adb (Process_Preconditions): Modify the
8278         mechanism that find the first source declaration to correct exit
8279         the loop once it has been found.
8281 2015-03-02  Gary Dismukes  <dismukes@adacore.com>
8283         * a-strsea.adb: Minor typo fix.
8285 2015-03-02  Bob Duff  <duff@adacore.com>
8287         * einfo.ads: Minor comment fixes.
8289 2015-03-02  Gary Dismukes  <dismukes@adacore.com>
8291         * einfo.adb, checks.adb: Minor reformatting and typo fixes.
8293 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
8295         * exp_aggr.adb (Get_Assoc_Expr): If the Default_Component_Value
8296         is defined for the array type, use it instead of a Default_Value
8297         specified for the component type itself.
8299 2015-03-02  Thomas Quinot  <quinot@adacore.com>
8301         * exp_attr.adb (Expand_N_Attribute_Reference, case Input): When
8302         expanding a 'Input attribute reference for a class-wide type,
8303         do not generate a separate object declaration for the controlling
8304         tag dummy object; instead, generate the expression inline in the
8305         dispatching call. Otherwise, the declaration (which involves a
8306         call to String'Input, returning a dynamically sized value on the
8307         secondary stack) will be expanded outside of proper secondary
8308         stack mark/release operations, and will thus cause a secondary
8309         stack leak.
8311 2015-03-02  Hristian Kirtchev  <kirtchev@adacore.com>
8313         * checks.adb (Add_Validity_Check): Change the names of all
8314         formal parameters to better illustrate their purpose. Update
8315         the subprogram documentation. Update all occurrences of the
8316         formal parameters. Generate a pre/postcondition pragma by
8317         calling Build_Pre_Post_Condition.
8318         (Build_PPC_Pragma): Removed.
8319         (Build_Pre_Post_Condition): New routine.
8320         * einfo.adb Node8 is no longer used as Postcondition_Proc. Node14
8321         is now used as Postconditions_Proc. Flag240 is now renamed to
8322         Has_Expanded_Contract.  (First_Formal): The routine can now
8323         operate on generic subprograms.
8324         (First_Formal_With_Extras): The routine can now operate on generic
8325         subprograms.
8326         (Has_Expanded_Contract): New routine.
8327         (Has_Postconditions): Removed.
8328         (Postcondition_Proc): Removed.
8329         (Postconditions_Proc): New routine.
8330         (Set_Has_Expanded_Contract): New routine.
8331         (Set_Has_Postconditions): Removed.
8332         (Set_Postcondition_Proc): Removed.
8333         (Set_Postconditions_Proc): New routine.
8334         (Write_Entity_Flags): Remove the output of Has_Postconditions. Add
8335         the output of Has_Expanded_Contract.
8336         (Write_Field8_Name): Remove the output of Postcondition_Proc.
8337         (Write_Field14_Name): Add the output of Postconditions_Proc.
8338         * einfo.ads New attributes Has_Expanded_Contract and
8339         Postconditions_Proc along with occurrences in entities.
8340         Remove attributes Has_Postconditions and Postcondition_Proc
8341         along with occurrences in entities.
8342         (Has_Expanded_Contract): New routine along with pragma Inline.
8343         (Has_Postconditions): Removed along with pragma Inline.
8344         (Postcondition_Proc): Removed along with pragma Inline.
8345         (Postconditions_Proc): New routine along with pragma Inline.
8346         (Set_Has_Expanded_Contract): New routine along with pragma Inline.
8347         (Set_Has_Postconditions): Removed along with pragma Inline.
8348         (Set_Postcondition_Proc): Removed along with pragma Inline.
8349         (Set_Postconditions_Proc): New routine along with pragma Inline.
8350         * exp_ch6.adb (Add_Return): Code cleanup. Update the
8351         generation of the call to the _Postconditions routine of
8352         the procedure.  (Expand_Non_Function_Return): Reformat the
8353         comment on usage. Code cleanup.  Update the generation of
8354         the call to the _Postconditions routine of the procedure or
8355         entry [family].
8356         (Expand_Simple_Function_Return): Update the
8357         generation of the _Postconditions routine of the function.
8358         (Expand_Subprogram_Contract): Reimplemented.
8359         * exp_ch6.ads (Expand_Subprogram_Contract): Update the parameter
8360         profile along the comment on usage.
8361         * exp_ch9.adb (Build_PPC_Wrapper): Code cleanup.
8362         (Expand_N_Task_Type_Declaration): Generate pre/postconditions
8363         wrapper when the entry [family] has a contract with
8364         pre/postconditions.
8365         * exp_prag.adb (Expand_Attributes_In_Consequence): New routine.
8366         (Expand_Contract_Cases): This routine and its subsidiaries now
8367         analyze all generated code.
8368         (Expand_Old_In_Consequence): Removed.
8369         * sem_attr.adb Add with and use clause for Sem_Prag.
8370         (Analyze_Attribute): Reimplment the analysis of attribute 'Result.
8371         (Check_Use_In_Test_Case): Use routine Test_Case_Arg to obtain
8372         "Ensures".
8373         * sem_ch3.adb (Analyze_Declarations): Analyze the contract of
8374         a generic subprogram.
8375         (Analyze_Object_Declaration): Do not create a contract node.
8376         (Derive_Subprogram): Do not create a contract node.
8377         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Do
8378         not create a contract node.
8379         (Analyze_Completion_Contract): New routine.
8380         (Analyze_Function_Return): Alphabetize.
8381         (Analyze_Generic_Subprogram_Body): Alphabetize. Do not create a
8382         contract node.  Do not copy pre/postconditions to the original
8383         generic template.
8384         (Analyze_Null_Procedure): Do not create a contract node.
8385         (Analyze_Subprogram_Body_Contract): Reimplemented.
8386         (Analyze_Subprogram_Body_Helper): Do not mark the enclosing scope
8387         as having postconditions. Do not create a contract node. Analyze
8388         the subprogram body contract of a body that acts as a compilation
8389         unit. Expand the subprogram contract after the declarations have
8390         been analyzed.
8391         (Analyze_Subprogram_Contract): Reimplemented.
8392         (Analyze_Subprogram_Specification): Do not create a contract node.
8393         (List_Inherited_Pre_Post_Aspects): Code cleanup.
8394         * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Update the
8395         comment on usage.
8396         (Analyze_Subprogram_Contract): Update the
8397         parameter profile and the comment on usage.
8398         * sem_ch7.adb (Analyze_Package_Body_Helper): Do not create a
8399         contract node.
8400         (Analyze_Package_Declaration): Do not create a
8401         contract node.
8402         (Is_Subp_Or_Const_Ref): Ensure that the prefix has an entity.
8403         * sem_ch8.adb (Analyze_Subprogram_Renaming): Do not create a
8404         contract node.
8405         * sem_ch9.adb (Analyze_Entry_Declaration): Do not create a
8406         contract node.
8407         * sem_ch10.adb (Analyze_Compilation_Unit): Move local variables to
8408         their proper section and alphabetize them. Analyze the contract of
8409         a [generic] subprogram after all Pragmas_After have been analyzed.
8410         (Analyze_Subprogram_Body_Stub_Contract): Alphabetize.
8411         * sem_ch12.adb (Analyze_Generic_Package_Declaration): Do not
8412         create a contract node.
8413         (Analyze_Generic_Subprogram_Declaration):
8414         Alphabetize local variables. Do not create a contract
8415         node. Do not generate aspects out of pragmas for ASIS.
8416         (Analyze_Subprogram_Instantiation): Instantiate
8417         the contract of the subprogram.  Do not create a
8418         contract node.  (Instantiate_Contract): New routine.
8419         (Instantiate_Subprogram_Body): Alphabetize local variables.
8420         (Save_Global_References_In_Aspects): New routine.
8421         (Save_References): Do not save the global references found within
8422         the aspects of a generic subprogram.
8423         * sem_ch12.ads (Save_Global_References_In_Aspects): New routine.
8424         * sem_ch13.adb (Analyze_Aspect_Specifications): Do not use
8425         Original_Node for establishing linkages.
8426         (Insert_Pragma): Insertion in a subprogram body takes precedence over
8427         the case where the subprogram body is also a compilation unit.
8428         * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Use
8429         Get_Argument to obtain the proper expression. Install the generic
8430         formals when the related context is a generic subprogram.
8431         (Analyze_Depends_In_Decl_Part): Use Get_Argument to obtain
8432         the proper expression. Use Corresponding_Spec_Of to obtain
8433         the spec. Install the generic formal when the related context
8434         is a generic subprogram.
8435         (Analyze_Global_In_Decl_Part): Use Get_Argument to obtain the proper
8436         expression. Use Corresponding_Spec_Of to obtain the spec. Install the
8437         generic formal when the related context is a generic subprogram.
8438         (Analyze_Initial_Condition_In_Decl_Part): Use Get_Argument
8439         to obtain the proper expression. Remove the call to
8440         Check_SPARK_Aspect_For_ASIS as the analysis is now done
8441         automatically.
8442         (Analyze_Pragma): Update all occurrences
8443         to Original_Aspect_Name. Pragmas Contract_Cases, Depends,
8444         Extensions_Visible, Global, Postcondition, Precondition and
8445         Test_Case now carry generic templates when the related context
8446         is a generic subprogram. The same pragmas are no longer
8447         forcefully fully analyzed when the context is a subprogram
8448         that acts as a compilation unit. Pragmas Abstract_State,
8449         Initial_Condition, Initializes and Refined_State have been clean
8450         up. Pragmas Post, Post_Class, Postcondition, Pre, Pre_Class
8451         and Precondition now use the same routine for analysis. Pragma
8452         Refined_Post does not need to check the use of 'Result or
8453         the lack of a post-state in its expression. Reimplement the
8454         analysis of pragma Test_Case.
8455         (Analyze_Pre_Post_Condition): New routine.
8456         (Analyze_Pre_Post_Condition_In_Decl_Part):
8457         Reimplemented.
8458         (Analyze_Refined_Depends_In_Decl_Part): Use Get_Argument to obtain the
8459         proper expression.
8460         (Analyze_Refined_Global_In_Decl_Part): Use Get_Argument to obtain
8461         the proper expression.
8462         (Analyze_Test_Case_In_Decl_Part): Reimplemented.
8463         (Check_Pre_Post): Removed.
8464         (Check_Precondition_Postcondition): Removed.
8465         (Check_SPARK_Aspect_For_ASIS): Removed.
8466         (Check_Test_Case): Removed.
8467         (Collect_Subprogram_Inputs_Outputs): Use Get_Argument
8468         to obtain the proper expression. Use Corresponding_Spec_Of to
8469         find the proper spec.
8470         (Create_Generic_Template): New routine.
8471         (Duplication_Error): New routine.
8472         (Expression_Function_Error): New routine.
8473         (Find_Related_Subprogram_Or_Body): Moved to the spec
8474         of Sem_Prag. Emit precise error messages. Account for cases of
8475         rewritten expression functions, generic instantiations, handled
8476         sequence of statements and pragmas from aspects.
8477         (Get_Argument): New routine.
8478         (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Removed.
8479         (Preanalyze_CTC_Args): Removed.
8480         (Process_Class_Wide_Condition): New routine.
8481         * sem_prag.ads (Analyze_Test_Case_In_Decl_Part): Update
8482         the parameter profile along with the comment on usage.
8483         (Find_Related_Subprogram_Or_Body): Moved from the body of Sem_Prag.
8484         (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Removed.
8485         (Test_Case_Arg): New routine.
8486         * sem_util.adb Add with and use clauses for Sem_Ch6.
8487         (Add_Contract_Item): This routine now creates a contract
8488         node the first time an item is added. Remove the duplicate
8489         aspect/pragma checks.
8490         (Check_Result_And_Post_State): Reimplemented.
8491         (Corresponding_Spec_Of): New routine.
8492         (Get_Ensures_From_CTC_Pragma): Removed.
8493         (Get_Requires_From_CTC_Pragma): Removed.
8494         (Has_Significant_Contract): New routine.
8495         (Inherit_Subprogram_Contract): Inherit only if the source
8496         has a contract.
8497         (Install_Generic_Formals): New routine.
8498         (Original_Aspect_Name): Removed.
8499         (Original_Aspect_Pragma_Name): New routine.
8500         * sem_util.ads (Check_Result_And_Post_State): Reimplemented.
8501         (Corresponding_Spec_Of): New routine.
8502         (Get_Ensures_From_CTC_Pragma): Removed.
8503         (Get_Requires_From_CTC_Pragma): Removed.
8504         (Has_Significant_Contract): New routine.
8505         (Install_Generic_Formals): New routine.
8506         (Original_Aspect_Name): Removed.
8507         (Original_Aspect_Pragma_Name): New routine.
8508         * sem_warn.adb Add with and use clauses for Sem_Prag.
8509         (Within_Postcondition): Use Test_Case_Arg to extract "Ensures".
8511 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
8513         * sem_ch8.adb (Available_Subtype): Optimization in
8514         Find_Selected_Component: when safe, use existing subtype of
8515         array component, possibly discriminant-dependent, rather than
8516         creating new subtype declaration for it. In this fashion different
8517         occurrences of the component have the same subtype, rather than
8518         just equivalent ones. Simplifies value tracing in GNATProve.
8520 2015-03-01  Arnaud Charlet  <charlet@adacore.com>
8522         PR ada/65259
8523         * doc/gnat_ugn/gnat_project_manager.rst,
8524         doc/gnat_ugn/platform_specific_information.rst: Remove reference to
8525         image, too troublesome with texi format.
8526         * gnat_ugn.texi: Regenerate.
8528 2015-02-24  Thomas Schwinge  <thomas@codesourcery.com>
8530         PR libgomp/64625
8531         * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8): Remove.
8532         (DEF_FUNCTION_TYPE_VAR_12): Likewise.
8533         (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
8535 2015-02-23  Thomas Schwinge  <thomas@codesourcery.com>
8537         * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8): Fix number of
8538         arguments parameter.
8539         (DEF_FUNCTION_TYPE_VAR_12): Likewise.
8541 2015-02-22  Arnaud Charlet  <charlet@adacore.com>
8543         * doc/Makefile: postprocess texinfo files to update @dircategory
8544         and update texi files under gcc/ada.
8545         * gnat_ugn.texi, gnat_rm.texi: Regenerated.
8547 2015-02-22  Arnaud Charlet  <charlet@adacore.com>
8549         * doc/gnat_ugn/project-manager-figure.png,
8550         doc/gnat_ugn/rtlibrary-structure.png: New.
8552 2015-02-22  Tom de Vries  <tom@codesourcery.com>
8554         PR ada/65100
8555         * gnat-style.texi (@subsection Loop Statements): Replace @noindent by
8556         @item, and fix warning '@itemize has text but no @item'.
8558 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
8560         * sem_prag.adb (Analyze_Pragma, case Obsolescent): Pragma
8561         legally applies to an abstract subprogram declaration.
8562         * freeze.adb: Minor comment addition.
8564 2015-02-20  Robert Dewar  <dewar@adacore.com>
8566         * errout.ads: Document replacement of Name_uPre/Post/Type_Invariant.
8567         * erroutc.adb (Set_Msg_Str): Replace _xxx.
8568         (Pre/Post/Type_Invariant) by xxx'Class.
8569         * erroutc.ads (Set_Msg_Str): Replace _xxx.
8570         (Pre/Post/Type_Invariant) by xxx'Class.
8571         * sem_prag.adb (Fix_Error): Remove special casing of
8572         Name_uType_Invariant.
8573         (Analyze_Pre_Post_Condition_In_Decl_Part): Remove special casing of
8574         Name_uPre and Name_uPost in aspect case (done in Errout now).
8576 2015-02-20  Robert Dewar  <dewar@adacore.com>
8578         * g-alveop.adb: Minor style fixes.
8580 2015-02-20  Robert Dewar  <dewar@adacore.com>
8582         * freeze.adb (Warn_Overlay): Guard against blow up with address
8583         clause.
8585 2015-02-20  Bob Duff  <duff@adacore.com>
8587         * exp_attr.adb (May_Be_External_Call): Remove this. There is no need
8588         for the compiler to guess whether the call is internal or external --
8589         it is always external.
8590         (Expand_Access_To_Protected_Op): For P'Access, where P
8591         is a protected subprogram, always create a pointer to the
8592         External_Subprogram.
8594 2015-02-20  Robert Dewar  <dewar@adacore.com>
8596         * a-dispat.adb, a-stcoed.ads: Minor reformatting.
8598 2015-02-20  Robert Dewar  <dewar@adacore.com>
8600         * sem_ch13.adb (Build_Discrete_Static_Predicate): Allow static
8601         predicate for non-static subtype.
8602         (Build_Predicate_Functions): Do not assume subtype associated with a
8603         static predicate must be static.
8605 2015-02-20  Robert Dewar  <dewar@adacore.com>
8607         * errout.adb (Set_Msg_Node): Better handling of internal names
8608         (Set_Msg_Node): Kill message when we cannot eliminate internal name.
8609         * errout.ads: Document additional case of message deletion.
8610         * namet.adb (Is_Internal_Name): Refined to consider wide
8611         strings in brackets notation and character literals not to be
8612         internal names.
8613         * sem_ch8.adb (Find_Selected_Component): Give additional error
8614         when selector name is a subprogram whose first parameter has
8615         the same type as the prefix, but that type is untagged.
8617 2015-02-20  Robert Dewar  <dewar@adacore.com>
8619         * g-allein.ads, g-alveop.adb, g-alveop.ads, opt.ads: Minor reformatting
8621 2015-02-20  Tristan Gingold  <gingold@adacore.com>
8623         * opt.ads (GNAT_Mode_Config): New variable.
8624         * opt.adb (Set_Opt_Config_Switches): Consider GNAT_Mode_Config
8625         to set Assertions_Enabled.
8626         * switch-c.adb (Scan_Front_End_Switches): Set GNAT_Mode_Config
8627         for -gnatg.
8629 2015-02-20  Robert Dewar  <dewar@adacore.com>
8631         * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Add an additional
8632         comment regarding the handling of unterminated fixed-point
8633         constants.
8634         * s-valuns.ads (Scan_Raw_Unsigned): Add comments
8635         corresponding to those previously added for
8636         System.Val_LLU.Scan_Raw_Long_Long_Unsigned.
8638 2015-02-20  Olivier Hainque  <hainque@adacore.com>
8640         * g-allein.ads, g-alveop.ads, g-alveop.adb: Code clean ups.
8642 2015-02-20  Robert Dewar  <dewar@adacore.com>
8644         * sem_prag.adb: Minor comment clarification.
8646 2015-02-20  Olivier Hainque  <hainque@adacore.com>
8648         * g-allein.ads (vec_ctf, vec_vcsfx, vec_vcfux): Remove.
8649         * g-alleve.ads, g-alleva.adb (vcfux): Likewise.
8650         * g-alveop.ads (vec_vcfsx, vec_vcfux): Just rename the ll versions.
8651         (vec_ctf): Now renamings as well.
8653 2015-02-20  Robert Dewar  <dewar@adacore.com>
8655         * switch-c.adb, bindgen.adb: Minor reformatting.
8657 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
8659         * sem_prag.adb (Analyze_Pragma, case Type_Invariant):
8660         Invariant'class is allowed on an abstract type.
8662 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
8664         * sem_ch3.adb (Access_Definition): If the access definition is
8665         for a protected component and defines an access to protected
8666         subprogram, do not create an itype reference for it because a
8667         full type declaration will be built in order to generate the
8668         proper equivalent type.
8669         (Analyze_Subtype_Declaration): Add information of incomplete
8670         subtypes, for Ada 2012 extended uses of incomplete types.
8672 2015-02-20  Gary Dismukes  <dismukes@adacore.com>
8674         * sem_res.adb: Minor reformatting.
8676 2015-02-20  Vincent Celier  <celier@adacore.com>
8678         * switch-c.adb (Scan_Front_End_Switches): When comparing runtime
8679         path name for several switches --RTS, use the normalized path
8680         names.
8682 2015-02-20  Vincent Celier  <celier@adacore.com>
8684         * bindgen.adb: Minor reformatting and code reorganization.
8686 2015-02-20  Jose Ruiz  <ruiz@adacore.com>
8688         * a-stcoed.ads: Add spec for this package (Unimplemented_Unit).
8689         * impunit.adb (Non_Imp_File_Names_12): Mark unit a-stcoed.ads as
8690         defined by Ada 2012.
8692 2015-02-20  Arnaud Charlet  <charlet@adacore.com>
8694         * sysdep.c, expect.c, s-oscons-tmplt.c, gsocket.h, adaint.c: Remove
8695         obsolete references to RTX, nucleus, VMS.
8697 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
8699         * sem_prag.adb (Fix_Error): For an illegal Type_Invariant'Class
8700         aspect, use name that mentions Class explicitly, rather than
8701         compiler-internal name.
8703 2015-02-20  Robert Dewar  <dewar@adacore.com>
8705         * debug.adb: Add documentation for -gnatd.2 (allow statements
8706         in decl sequences).
8707         * par-ch3.adb (P_Identifier_Declarations): Handle
8708         statement appearing where declaration expected more cleanly.
8709         (Statement_When_Declaration_Expected): Implement debug flag
8710         -gnatd.2.
8712 2015-02-20  Jose Ruiz  <ruiz@adacore.com>
8714         * a-dinopr.ads: Add spec for this package (Unimplemented_Unit).
8715         * a-dispat.ads (Yield): Include procedure added in Ada 2012.
8716         * a-dispat.adb (Yield): Implement procedure added in Ada 2012.
8717         * impunit.adb (Non_Imp_File_Names_05): Mark unit a-dinopr.ads as
8718         defined by Ada 2005.
8719         * snames.ads-tmpl (Name_Non_Preemptive_FIFO_Within_Priorities):
8720         This is the correct name for the dispatching policy (FIFO was
8721         missing).
8723 2015-02-20  Javier Miranda  <miranda@adacore.com>
8725         * sem_res.adb (Resolve_Type_Conversion): If the type of the
8726         operand is the limited-view of a class-wide type then recover
8727         the class-wide type of the non-limited view.
8729 2015-02-20  Arnaud Charlet  <charlet@adacore.com>
8731         * gcc-interface/Makefile.in: Remove references to nucleus.
8732         * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Procedure): Set
8733         extern_flag to true for Inline_Always subprograms with
8734         Intrinsic convention.
8736 2015-02-20  Yannick Moy  <moy@adacore.com>
8738         * sem_prag.ads: Minor typo in comment.
8740 2015-02-20  Pascal Obry  <obry@adacore.com>
8742         * s-osprim-mingw.adb: Fix Get_Base_Time parameter mode.
8744 2015-02-20  Vincent Celier  <celier@adacore.com>
8746         * makeutl.adb (Get_Directories.Add_Dir): Add a directory only
8747         if it exists.
8749 2015-02-20  Robert Dewar  <dewar@adacore.com>
8751         * sem_eval.ads: Minor reformatting.
8753 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
8755         * freeze.adb (Size_Known): Do not set the packed size for
8756         independent type or component.
8757         (Freeze_Array_Type): Check for Independent[_Components] with packing
8758         or explicit component size clause.
8759         * gnat1drv.adb (Post_Compilation_Validation_Checks): Do the validation
8760         of independence pragmas only for non-GCC back-ends.
8761         * sem_ch13.adb (Initialize): Likewise for the initialization.
8762         * sem_prag.adb (Record_Independence_Check): New procedure to record an
8763         independence check in the table.
8764         (Analyze_Pragma): Use it throughout instead of doing it manually.
8765         * gcc-interface/decl.c (gnat_to_gnu_field): Add support for
8766         independent type or component.
8768 2015-02-20  Thomas Quinot  <quinot@adacore.com>
8770         * adaint.c (__gnat_readdir): For Solaris, use 64 bit variants of
8771         struct direct and readdir. This is required for NFS filesystems
8772         mounted from servers that use 64-bit cookies.
8774 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
8776         * sem_ch12.adb (Analyze_Subprogram_Instantiaion): New subprogram
8777         Build_Subprogram_Renaming, to create renaming of subprogram
8778         instance in the the declaration of the wrapper package rather
8779         than in its body, so that it is available for analysis of aspects
8780         propagated from generic to instantiation.
8781         (Check_Mismatch): An actual for a formal package that is an
8782         incomplete type matches a formal type that is incomplete.
8783         (Instantiate_Package_Body): Move code that builds subprogram
8784         renaming to Analyze_Subprogram_Instantiation.
8785         (Instantiate_Type): The generated subtype is a limited view if
8786         the actual is a limited view.
8787         (Load_Parent_Of_Generic): Retrieve instance declaration from
8788         its new position within wrapper package.
8790 2015-02-20  Arnaud Charlet  <charlet@adacore.com>
8792         * s-parame-vxworks.adb, s-os_lib.ads: Update comments.
8794 2015-02-20  Robert Dewar  <dewar@adacore.com>
8796         * s-osinte-vxworks.ads (To_Timespec): Add comment about the
8797         issue of negative arguments.
8799 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
8801         * gnat1drv.adb: Minor consistency fix.
8803 2015-02-20  Pascal Obry  <obry@adacore.com>
8805         * s-osprim-mingw.adb (Get_Base_Time): Properly release lock in all
8806         paths.
8808 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
8810         * inline.adb (Expand_Inlined_Call): Skip again calls to subprogram
8811         renamings.
8812         * exp_ch6.adb (Expand_Call): Use back-end inlining
8813         instead of expansion for simple subprogram renamings.
8815 2015-02-20  Robert Dewar  <dewar@adacore.com>
8817         * exp_util.adb: Minor reformatting.
8819 2015-02-20  Vincent Celier  <celier@adacore.com>
8821         * switch-c.adb (Scan_Front_End_Switches): Do not fail when --RTS=
8822         is specified several times with different values that indicates
8823         the same runtime directory.
8825 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
8827         * sem_attr.adb (Check_Not_Incomplete_Type): Clean up code to
8828         handle properly illegal uses of attributes on prefixes on an
8829         incomplete type, both when the type of the prefix is locally
8830         incomplete, and when it is a limited view of a type whose
8831         non-limited view is not available.
8832         (Analyze_Attribute): Add calls to Check_Not_Incomplete_Type for
8833         'Address and others.
8835 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
8837         * exp_ch6.adb: Fix minor typo in comment.
8839 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
8841         * sinfo.ads: Add comment.
8843 2015-02-20  Olivier Hainque  <hainque@adacore.com>
8845         * opt.ads: Replace Opt.Suppress_All_Inlining by two separate
8846         flags controlling the actual FE inlining out of pragma Inline
8847         and pragma Inline_Always.
8848         * adabkend.adb (Scan_Compiler_Arguments): Set both flags to True
8849         on -fno-inline, which disables all inlining in compilers with
8850         an Ada back-end and without back-end inlining support.
8851         * back_end.adb (Scan_Back_End_Switches): Set the Inline related
8852         flag to True on -fno-inline and leave Inline_Always alone for
8853         gcc back-ends.
8854         * back_end.ads (Scan_Compiler_Arguments): Adjust spec wrt the
8855         names of the Opt flags it sets.
8856         * gnat1drv.adb (Adjust_Global_Switches): Remove test on
8857         Opt.Suppress_All_Inlining in the Back_End_Inlining computation.
8858         * sem_prag.adb (Make_Inline): Remove early return conditioned
8859         on Opt.Suppress_All_Inlining.
8860         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Use the flags to
8861         disable the calls to Build_Body_To_Inline otherwise triggered
8862         by pragma Inline or Inline_Always. This will prevent actual
8863         front-end inlining of the subprogram on calls.
8865 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
8867         * exp_ch3.adb (Default_Initialize_Object): Call Add_Inlined_Body on the
8868         Abort_Undefer_Direct function.
8869         * exp_ch5.adb (Expand_N_Assignment_Statement): Likewise.
8870         * exp_intr.adb (Expand_Unc_Deallocation): Likewise.
8871         * exp_prag.adb (Expand_Pragma_Abort_Defer): Likewise.
8872         * exp_ch4.adb (Expand_N_Selected_Component): Adjust call to
8873         Add_Inlined_Body.
8874         * exp_ch6.adb (Expand_Call): Adjust calls to Add_Inlined_Body.
8875          Remove call to Register_Backend_Call and move code resetting
8876         Needs_Debug_Info on inlined subprograms to...
8877         * inline.ads (Add_Inlined_Body): Add N parameter.
8878         (Register_Backend_Call): Delete.
8879         * inline.adb (Add_Inlined_Body): ...here and simplify.
8880          Register the call with Backend_Calls directly.
8881         (Register_Backend_Call): Delete.
8882         * s-stalib.ads (Abort_Undefer_Direct): Restore pragma Inline.
8884 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
8886         * s-stalib.ads: Fix typo.
8888 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
8890         * exp_ch3.adb (Default_Initialize_Object): If the object has a
8891         delayed freeze, the actions associated with default initialization
8892         must be part of the freeze actions, rather that being inserted
8893         directly after the object declaration.
8895 2015-02-20  Robert Dewar  <dewar@adacore.com>
8897         * lib-load.adb: Minor comment update.
8899 2015-02-20  Vincent Celier  <celier@adacore.com>
8901         * prj-proc.adb (Process_Case_Construction): When there are
8902         incomplete withed projects and the case variable is unknown,
8903         skip the case construction.
8905 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
8907         * exp_ch6.adb (Expand_Actuals): Add caller-side invariant checks
8908         when an actual is a view conversion, either because the call is
8909         to an inherited operation, or because the actual is an explicit
8910         type conversion to an ancestor type.  Fixes ACATS 4.0D: C732001
8912 2015-02-20  Robert Dewar  <dewar@adacore.com>
8914         * einfo.ads: Minor comment updates Fix missing pragma Inline
8915         for Set_Partial_View_Has_Unknown_Discr.
8916         * einfo.adb (Write_Entity_Flags): Add missing entry for
8917         Partial_View_Has_Unknown_Discr.
8918         * sem_ch3.adb: Minor reformatting.
8920 2015-02-20  Vincent Celier  <celier@adacore.com>
8922         * opt.ads: Minor cleanup: remove mention of gprmake.
8923         * s-stalib.ads (Abort_Undefer_Direct): Do not inline.
8924         * s-tataat.adb: Do not call System.Tasking.Self but directly
8925         System.Task_Primitives.Operations.Self.
8927 2015-02-20  Arnaud Charlet  <charlet@adacore.com>
8929         * gnat_rm.texi, gnat_ugn.texi: Now automatically generated from
8930         sphinx in the doc directory.
8931         * doc: New directory containing sphinx versions of gnat_rm and gnat_ugn
8933 2015-02-20  Robert Dewar  <dewar@adacore.com>
8935         * sem_res.adb: Minor reformatting.
8936         * exp_ch9.adb (Build_Protected_Spec): Copy Aliased setting when
8937         building spec.
8938         * sem_ch13.adb (Analyze_Aspect_Specifications): Exclude Boolean
8939         aspects from circuitry setting delay required to false if the
8940         argument is an integer literal.
8942 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
8944         * einfo.ads. einfo.adb (Partial_View_Has_Unknown_Discr):  New flag
8945         on type entities, to enforce AI12-0133: default initialization
8946         of types whose partial view has unknown discriminants does not
8947         get an invariant check, because clients of the unit can never
8948         declare objects of such types.
8949         * sem_ch3.adb (Find_Type_Name); Set new flag
8950         Partial_View_Has_Unknown_Discr when needed.
8951         * exp_ch3.adb (Expand_N_Object_Declaration): Use flag to suppress
8952         generation of invariant call on default-initialized object.
8954 2015-02-08  Eric Botcazou  <ebotcazou@adacore.com>
8956         * gcc-interface/decl.c (gnat_to_gnu_param): Do not strip the padding
8957         if the parameter either is passed by reference or if the alignment
8958         would be lowered.
8960 2015-02-08  Eric Botcazou  <ebotcazou@adacore.com>
8962         * gcc-interface/decl.c (is_cplusplus_method): Use Is_Primitive flag to
8963         detect primitive operations of tagged and untagged types.
8965 2015-02-08  Eric Botcazou  <ebotcazou@adacore.com>
8967         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not bother about alias
8968         sets in presence of derivation for subprogram types.
8970 2015-02-08  Eric Botcazou  <ebotcazou@adacore.com>
8972         * gcc-interface/utils.c (begin_subprog_body): Assert that the body is
8973         present in the same context as the declaration.
8975 2015-02-07  Jakub Jelinek  <jakub@redhat.com>
8977         PR middle-end/64340
8978         * gcc-interface/trans.c (gigi): Recreate optimization_default_node
8979         and optimization_current_node after tweaking global_options.
8981 2015-02-05  Robert Dewar  <dewar@adacore.com>
8983         * prj-proc.adb, sem_aux.adb, exp_ch9.adb, errout.adb, prj-dect.adb,
8984         prj-nmsc.adb: Minor reformatting.
8986 2015-02-05  Ed Schonberg  <schonberg@adacore.com>
8988         * sem_type.adb (Covers): In ASIS_Mode the Corresponding_Record
8989         of a protected type may not be available, so to check conformance
8990         with an interface type, examine the interface list in the type
8991         declaration directly.
8992         (Write_Overloads): Improve information for indirect calls,
8993         for debugger use.
8995 2015-02-05  Ed Schonberg  <schonberg@adacore.com>
8997         * exp_ch3.adb (Make_Tag_Assignment): Do not perform this
8998         expansion activity in ASIS mode.
9000 2015-02-05  Javier Miranda  <miranda@adacore.com>
9002         * errout.adb (Error_Msg_PT): Add missing error.
9003         * sem_ch6.adb (Check_Synchronized_Overriding): Check the missing
9004         RM rule.  Code cleanup.
9005         * exp_ch9.adb (Build_Wrapper_Spec): Propagate "constant" in
9006         anonymous access types.  Found working on the tests. Code cleanup.
9008 2015-02-05  Vincent Celier  <celier@adacore.com>
9010         * prj-dect.adb (Parse_Attribute_Declaration): Continue scanning
9011         when there are incomplete withs.
9012         * prj-nmsc.adb (Process_Naming): Do not try to get the value
9013         of an element when it is nil.
9014         (Check_Naming): Do not check a nil suffix for illegality
9015         * prj-proc.adb (Expression): Do not process an empty term.
9016         * prj-strt.adb (Attribute_Reference): If attribute cannot be
9017         found, parse a possible index to avoid cascading errors.
9019 2015-02-05  Ed Schonberg  <schonberg@adacore.com>
9021         * sem_aux.adb (Is_Derived_Type): A subprogram_type generated
9022         for an access_to_subprogram declaration is not a derived type.
9024 2015-02-05  Robert Dewar  <dewar@adacore.com>
9026         * errout.adb (Error_Msg_Internal): For non-serious error set
9027         Fatal_Error to Ignored.
9028         * lib-load.adb (Load_Unit): Minor comment updates.
9029         * sem_ch10.adb (Analyze_With_Clause): Propagate Fatal_Error
9030         setting from with'ed unit to with'ing unit.
9031         * sem_prag.adb (Analyze_Pragma, case Warnings): Document handling
9032         of ambiguity.
9034 2015-02-05  Yannick Moy  <moy@adacore.com>
9036         * sem_prag.adb, par-prag.adb: Minor code clean up.
9038 2015-02-05  Yannick Moy  <moy@adacore.com>
9040         * par-prag.adb (Pragma_Warnings): Update for extended form
9041         of pragma Warnings. The "one" argument case may now have 2 or
9042         3 arguments.
9043         * sem_prag.adb (Analyze_Pragma/Pragma_Warnings): Update for
9044         extended form of pragma Warnings. Pragma with tool name is either
9045         rewritten as null or as an equivalent form without tool name,
9046         before reanalysis.
9047         * snames.ads-tmpl (Name_Gnatprove): New name.
9049 2015-02-05  Robert Dewar  <dewar@adacore.com>
9051         * sem_ch13.adb (Add_Invariants): Don't assume invariant is
9052         standard Boolean.
9053         * sem_prag.adb (Analyze_Pragma, case Check): Don't assume
9054         condition is standard Boolean, it can be non-standard derived
9055         Boolean.
9057 2015-02-05  Robert Dewar  <dewar@adacore.com>
9059         * checks.adb (Enable_Range_Check): Disconnect attempted
9060         optimization for the case of range check for subscript of
9061         unconstrained array.
9063 2015-02-05  Robert Dewar  <dewar@adacore.com>
9065         * par-ch13.adb (With_Present): New function
9066         (Aspect_Specifications_Present): Handle WHEN in place of WITH
9067         (Get_Aspect_Specifications): Comment update.
9068         * par.adb: Comment updates.
9070 2015-02-05  Robert Dewar  <dewar@adacore.com>
9072         * errout.adb (Handle_Serious_Error): New setting of Fatal_Error.
9073         * frontend.adb (Frontend): New setting of Fatal_Error.
9074         * lib-load.adb (Create_Dummy_Package_Unit): New setting of
9075         Fatal_Error.
9076         (Load_Main_Source): New setting of Fatal_Error
9077         (Load_Unit): New setting of Fatal_Error.
9078         * lib-writ.adb (Add_Preprocessing_Dependency): New setting of
9079         Fatal_Error.
9080         (Ensure_System_Dependency): New setting of Fatal_Error.
9081         * lib.adb (Fatal_Error): New setting of Fatal_Error
9082         (Set_Fatal_Error): New setting of Fatal_Error.
9083         * lib.ads: New definition of Fatal_Error and associated routines.
9084         * par-ch10.adb (P_Compilation_Unit): New setting of Fatal_Error.
9085         * par-load.adb (Load): New setting of Fatal_Error.
9086         * rtsfind.adb (Load_RTU): New setting of Fatal_Error.
9087         * sem_ch10.adb (Analyze_Compilation_Unit): New setting of
9088         Fatal_Error.
9089         (Optional_Subunit): New setting of Fatal_Error.
9090         (Analyze_Proper_Body): New setting of Fatal_Error.
9091         (Load_Needed_Body): New setting of Fatal_Error.
9093 2015-02-05  Ed Schonberg  <schonberg@adacore.com>
9095         * sem_res.adb (Resolve_Call): If the function being called has
9096         out parameters do not check for language version if the function
9097         comes from a predefined unit, as those are always compiled in
9098         Ada 2012 mode.
9100 2015-02-05  Ed Schonberg  <schonberg@adacore.com>
9102         * sem_ch3.adb (Process_Full_View): Verify that the full view
9103         of a type extension must carry an explicit limited keyword if
9104         the partial view does (RM 7.3 (10.1)).
9106 2015-02-05  Robert Dewar  <dewar@adacore.com>
9108         * g-rannum.adb, g-rannum.ads, s-rannum.adb, s-rannum.ads,
9109         sem_warn.ads: Minor reformatting.
9110         * exp_ch13.adb (Expand_N_Freeze_Entity): Add guard for aspect
9111         deleted by -gnatI.
9112         * sem_prag.adb (Analyze_Pragma, case Type_Invariant): Give
9113         error for abstract type.
9115 2015-02-05  Yannick Moy  <moy@adacore.com>
9117         * opt.ads (Warn_On_Suspicious_Contract): Update comment
9118         describing use.
9119         * sem_attr.adb (Analyze_Attribute/Attribute_Update): Warn on
9120         suspicious uses of 'Update.
9121         * sem_warn.adb, sem_warn.ads (Warn_On_Suspicious_Update): New
9122         function issues warning on suspicious uses of 'Update.
9123         * g-rannum.adb, g-rannum.ads, s-rannum.adb, s-rannum.ads: Mark
9124         package spec and body as SPARK_Mode Off.
9126 2015-02-05  Robert Dewar  <dewar@adacore.com>
9128         * sem_prag.adb (Set_Elab_Unit_Name): New name for Set_Unit_Name
9129         (Analyze_Pragma): Change Set_Unit_Name to Set_Elab_Unit_Name
9130         (Set_Elab_Unit_Name): Generate reference for Elaborate[_All]
9131         * sem_warn.adb (Warn_On_Unreferenced_Entity): Suppress warning
9132         for exported entity.
9134 2015-02-05  Hristian Kirtchev  <kirtchev@adacore.com>
9136         * sem_prag.adb (Check_Pragma_Conformance): Add
9137         local variable Arg. Ensure that all errors are associated with
9138         the pragma if it appears without an argument. Add comments on
9139         various cases.
9141 2015-02-05  Robert Dewar  <dewar@adacore.com>
9143         * lib-xref.adb: Minor reformatting.
9145 2015-02-05  Tristan Gingold  <gingold@adacore.com>
9147         PR ada/64349
9148         * env.c: Fix thinko: handle Darwin case before default one.
9150 2015-01-30  Robert Dewar  <dewar@adacore.com>
9152         * a-assert.adb: Minor reformatting.
9153         * sem_ch13.adb: Minor comment clarification.
9154         * types.ads: Minor comment update.
9155         * sem_eval.adb (Real_Or_String_Static_Predicate_Matches): Avoid blow up
9156         when we have a predicate that is nothing but an inherited dynamic
9157         predicate.
9159 2015-01-30  Jerome Guitton  <guitton@adacore.com>
9161         * gcc-interface/Makefile.in (x86-vxworks): Update GCC_SPEC_FILES to
9162         include cert link spec.
9164 2015-01-30  Robert Dewar  <dewar@adacore.com>
9166         * einfo.ads: Minor comment fix.
9167         * freeze.adb (Freeze_Profile): Add test for suspicious import
9168         in pure unit.
9169         * sem_prag.adb (Process_Import_Or_Interface): Test for suspicious
9170         use in Pure unit is now moved to Freeze (to properly catch
9171         Pure_Function exemption).
9173 2015-01-30  Bob Duff  <duff@adacore.com>
9175         * sem_res.ads: Minor comment fix.
9176         * sem_type.adb: sem_type.adb (Remove_Conversions): Need to
9177         check both operands of an operator.
9179 2015-01-30  Yannick Moy  <moy@adacore.com>
9181         * a-assert.ads, a-assert.adb: Mark package spec in SPARK. Set assertion
9182         policy for Pre to Ignore.
9183         (Assert): Add precondition.
9185 2015-01-30  Robert Dewar  <dewar@adacore.com>
9187         * sem_prag.adb (Process_Import_Or_Interface): Warn if used in
9188         Pure unit.
9189         * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Clarify
9190         documentation for some special cases of invalid attempts at
9191         based integers.
9193 2015-01-30  Gary Dismukes  <dismukes@adacore.com>
9195         * errout.ads: Minor reformatting.
9197 2015-01-30  Yannick Moy  <moy@adacore.com>
9199         * inline.adb (Process_Formals): Use the sloc of
9200         the inlined node instead of the sloc of the actual parameter,
9201         when replacing formal parameters by the actual one.
9203 2015-01-30  Arnaud Charlet  <charlet@adacore.com>
9205         * g-expect.adb (Get_Command_Output): Use infinite timeout when
9206         calling Expect.
9208 2015-01-30  Ed Schonberg  <schonberg@adacore.com>
9210         * sem_ch12.adb (Analyze_Associations): If an in-parameter is
9211         defaulted in an instantiation, add an entry in the list of actuals
9212         to indicate the default value of the formal (as is already done
9213         for defaulted subprograms).
9215 2015-01-30  Javier Miranda  <miranda@adacore.com>
9217         * errout.adb (Error_Msg_PT): Minor error phrasing update.
9219 2015-01-30  Robert Dewar  <dewar@adacore.com>
9221         * sem_warn.adb (Warn_On_Known_Condition): Improve error message
9222         for object case.
9224 2015-01-30  Pierre-Marie de Rodat  <derodat@adacore.com>
9226         * exp_dbug.adb (Get_Encoded_Name): When
9227         -fgnat-encodings=minimal, do not generate names for biased types.
9229 2015-01-30  Tristan Gingold  <gingold@adacore.com>
9231         PR ada/64349
9232         * env.c: Move vxworks and darwin includes out of #ifdef IN_RTS.
9234 2015-01-30  Gary Dismukes  <dismukes@adacore.com>
9236         * freeze.adb: Minor reformatting.
9238 2015-01-30  Javier Miranda  <miranda@adacore.com>
9240         * errout.ads (Error_Msg_PT): Replace Node_Id by Entity_Id and
9241         improve its documentation.
9242         * errout.adb (Error_Msg_PT): Improve the error message.
9243         * sem_ch6.adb (Check_Conformance): Update call to Error_Msg_PT.
9244         (Check_Synchronized_Overriding): Update call to Error_Msg_PT.
9245         * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup.
9247 2015-01-30  Robert Dewar  <dewar@adacore.com>
9249         * sem_warn.adb (Warn_On_Known_Condition): Do special casing of
9250         message for False case.
9252 2015-01-30  Doug Rupp  <rupp@adacore.com>
9254         * s-vxwext-kernel.ads (Task_Cont): Remove imported subprogram body.
9255         * s-vxwext-kernel.adb (Task_Cont): New subpprogram body specialized for
9256         kernel.
9258 2015-01-30  Gary Dismukes  <dismukes@adacore.com>
9260         * sem_attr.adb (Declared_Within_Generic_Unit):
9261         New function to test whether an entity is declared within the
9262         declarative region of a given generic unit.
9263         (Resolve_Attribute): For checking legality of subprogram'Access within
9264         a generic unit, call new Boolean function Declared_Within_Generic_Unit
9265         instead of simply comparing the results of Enclosing_Generic_Unit on
9266         the prefix and access type.  Correct minor comment typos.
9268 2015-01-30  Robert Dewar  <dewar@adacore.com>
9270         * freeze.adb, exp_util.ads: Update comment.
9271         * exp_util.adb, exp_ch3.adb: Minor code reorganization and reformatting.
9272         * sem_util.adb: Minor: fix typo.
9274 2015-01-30  Hristian Kirtchev  <kirtchev@adacore.com>
9276         * sem_attr.adb (Analyze_Attribute): Ensure that
9277         the check concerning Refined_Post takes precedence over the
9278         other cases.
9280 2015-01-30  Gary Dismukes  <dismukes@adacore.com>
9282         * sem_prag.adb: Minor typo fixes and reformatting.
9284 2015-01-30  Yannick Moy  <moy@adacore.com>
9286         * sem_attr.adb: Code clean up.
9288 2015-01-30  Robert Dewar  <dewar@adacore.com>
9290         * ali.adb (Scan_ALI): Set Serious_Errors flag in Unit record.
9291         * ali.ads (Unit_Record): Add new field Serious_Errors.
9292         * lib-writ.adb (Write_Unit_Information): Set SE (serious errors)
9293         attribute in U line.
9294         * lib-writ.ads: New attribute SE (serious erors) in unit line.
9296 2015-01-30  Hristian Kirtchev  <kirtchev@adacore.com>
9298         * einfo.adb Update the usage of attributes Entry_Bodies_Array,
9299         Lit_Indexes, Scale_Value, Storage_Size_Variable,
9300         String_Literal_Low_Bound along associated routines and
9301         Write_FieldX_Name.
9302         (Pending_Access_Types): New routine.
9303         (Set_Pending_Access_Types): New routine.
9304         (Write_Field15_Name): Add an entry for Pending_Access_Types.
9305         * einfo.ads Add new attribute Pending_Access_Types along
9306         with usage in nodes.  Update the usage of attributes
9307         Entry_Bodies_Array, Lit_Indexes, Scale_Value,
9308         Storage_Size_Variable, String_Literal_Low_Bound.
9309         (Pending_Access_Types): New routine along with pragma Inline.
9310         (Set_Pending_Access_Types): New routine along with pragma Inline.
9311         * exp_ch3.adb (Expand_Freeze_Array_Type): Add new local variable
9312         Ins_Node. Determine the insertion node for anonynous access type
9313         that acts as a component type of an array. Update the call to
9314         Build_Finalization_Master.
9315         (Expand_Freeze_Record_Type): Update
9316         the calls to Build_Finalization_Master.
9317         (Freeze_Type): Remove
9318         local variable RACW_Seen. Factor out the code that deals with
9319         remote access-to-class-wide types. Create a finalization master
9320         when the designated type contains a private component. Fully
9321         initialize all pending access types.
9322         (Process_RACW_Types): New routine.
9323         (Process_Pending_Access_Types): New routine.
9324         * exp_ch4.adb (Expand_Allocator_Expression): Allocation no longer
9325         needs to set primitive Finalize_Address.
9326         (Expand_N_Allocator): Allocation no longer sets primitive
9327         Finalize_Address.
9328         * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
9329         Update the call to Build_Finalization_Master.
9330         (Make_Build_In_Place_Call_In_Allocator): Allocation no longer
9331         needs to set primitive Finalize_Address.
9332         * exp_ch7.adb (Add_Pending_Access_Type): New routine.
9333         (Build_Finalization_Master): New parameter profile. Associate
9334         primitive Finalize_Address with the finalization master if the
9335         designated type has been frozen, otherwise treat the access
9336         type as pending. Simplify the insertion of the master and
9337         related initialization code.
9338         (Make_Finalize_Address_Body): Allow Finalize_Address for class-wide
9339         abstract types.
9340         (Make_Set_Finalize_Address_Call): Remove forlam parameter Typ.
9341         Simplify the implementation.
9342         * exp_ch7.ads (Build_Finalization_Master): New parameter profile
9343         along with comment on usage.
9344         (Make_Set_Finalize_Address_Call): Remove formal parameter Typ. Update
9345         the comment on usage.
9346         * exp_util.adb (Build_Allocate_Deallocate_Proc): Use routine
9347         Finalize_Address to retrieve the primitive.
9348         (Finalize_Address): New routine.
9349         (Find_Finalize_Address): Removed.
9350         * exp_util.ads (Finalize_Address): New routine.
9351         * freeze.adb (Freeze_All): Remove the generation of finalization
9352         masters.
9353         * sem_ch3.adb (Analyze_Full_Type_Declaration): Propagate any
9354         pending access types from the partial to the full view.
9356 2015-01-30  Robert Dewar  <dewar@adacore.com>
9358         * sem_disp.adb: Minor reformatting.
9359         * sem_disp.ads: Documentation update.
9361 2015-01-30  Ed Schonberg  <schonberg@adacore.com>
9363         * sem_disp.adb (Is_Dynamically_Tagged): when applied to an entity
9364         or a function call, return True if type is class-wide.
9365         * sem_res.adb (Resolve_Case_Expression, Resolve_If_Expression);
9366         Apply RM 4.5.7 (17/3): all or none of the dependent expression
9367         of a conditional expression must be dynamically tagged.
9369 2015-01-30  Ed Schonberg  <schonberg@adacore.com>
9371         * sem_ch6.adb (Analyze_Function_Return): In an extended return
9372         statement, apply accessibility check to result object when there
9373         is no initializing expression (Ada 2012 RM 6.5 (5.4/3))
9375 2015-01-30  Robert Dewar  <dewar@adacore.com>
9377         * sem_ch4.adb (Analyze_If_Expression): Allow for non-standard
9378         Boolean for case where ELSE is omitted.
9379         * sem_res.adb: Minor reformatting.
9381 2015-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9383         Fix build under cygwin/64.
9384         * adaint.h: Add check for __CYGWIN__.
9385         * mingw32.h: Prevent windows.h from including x86intrin.h in GCC.
9387 2015-01-19  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9389         PR ada/64640
9390         * adaint.c: Handle __CYGWIN__ like __MINGW32__ here.
9391         * mingw32.h: Don't include <tchar.h> under cygwin.
9392         (_O_U8TEXT, _O_U16TEXT, _O_WTEXT): Set to _O_TEXT if not yet defined.
9394 2015-01-15  Thomas Schwinge  <thomas@codesourcery.com>
9396         * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8)
9397         (DEF_FUNCTION_TYPE_VAR_12): New macros.
9399 2015-01-09  Michael Collison  <michael.collison@linaro.org>
9401         * gcc-interface/cuintp.c: Include hash-set.h, machmode.h,
9402         vec.h, double-int.h, input.h, alias.h, symtab.h,
9403         fold-const.h, wide-int.h, and inchash.h due to
9404         flattening of tree.h.
9405         * gcc-interface/decl.c: Ditto.
9406         * gcc-interface/misc.c: Ditto.
9407         * gcc-interface/targtyps.c: Include hash-set.h, machmode.h,
9408         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h,
9409         fold-const.h, wide-int.h, and inchash.h due to
9410         flattening of tree.h.
9411         * gcc-interface/trans.c: Include hash-set.h, machmode.h,
9412         vec.h, double-int.h, input.h, alias.h, symtab.h, real.h,
9413         fold-const.h, wide-int.h, inchash.h due to
9414         flattening of tree.h.
9415         * gcc-interface/utils.c: Include hash-set.h, machmode.h,
9416         vec.h, double-int.h, input.h, alias.h, symtab.h,
9417         fold-const.h, wide-int.h, and inchash.h due to
9418         flattening of tree.h.
9419         * gcc-interface/utils2.c: Ditto.
9421 2015-01-07  Robert Dewar  <dewar@adacore.com>
9423         * sem_warn.adb (Check_One_Unit): Don't give unused entities
9424         warning for a package which is used as a generic parameter.
9426 2015-01-07  Bob Duff  <duff@adacore.com>
9428         * usage.adb (Usage): Correct documentation of
9429         -gnatw.f switches.
9431 2015-01-07  Robert Dewar  <dewar@adacore.com>
9433         * s-fileio.adb: Minor reformatting.
9435 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
9437         * sem_ch12.adb (Instantiate_Object): If formal is an anonymous
9438         access to subprogram, replace its formals with new entities when
9439         building the object declaration, both if actual is present and
9440         when it is defaulted.
9442 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
9444         * sem_ch5.adb (Analyze_Assignment): If left-hand side is a view
9445         conversion and type of expression has invariant, apply invariant
9446         check on expression.
9448 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
9450         * sem_ch3.adb (Create_Constrained_Components): A call to
9451         Gather_Components may detect an error if an inherited discriminant
9452         that controls a variant is non-static.
9453         * sem_aggr.adb (Resolve_Record_Aggregate, Step 5): The call to
9454         Gather_Components may report an error if an inherited discriminant
9455         in a variant in non-static.
9456         * sem_util.adb (Gather_Components): If a non-static discriminant
9457         is inherited do not report error here, but let caller handle it.
9458         (Find_Actual): Small optimization.
9460 2015-01-07  Bob Duff  <duff@adacore.com>
9462         * usage.adb (Usage): Document -gnatw.f switch.
9464 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
9466         * sem_ch12.adb: Code clean up and minor reformatting.
9468 2015-01-07  Robert Dewar  <dewar@adacore.com>
9470         * exp_ch4.adb (Expand_N_Type_Conversion): Add guard for
9471         Raise_Accessibility_Error call.
9472         * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Add documentation
9473         on handling of invalid digits in based constants.
9474         * s-fatgen.ads: Minor reformatting.
9475         * sem_attr.adb (Analyze_Attribute, case Unrestricted_Access):
9476         Avoid noting bogus modification for Valid test.
9477         * snames.ads-tmpl (Name_Attr_Long_Float): New Name.
9478         * einfo.ads: Minor reformatting.
9479         * sem_warn.adb: Minor comment clarification.
9480         * sem_ch12.adb: Minor reformatting.
9482 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
9484         * exp_ch5.adb (Expand_Predicated_Loop): Handle properly loops
9485         over static predicates when the loop parameter specification
9486         carries a Reverse indicator.
9488 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
9490         * sem_ch12.adb (Instantiate_Object): If formal has a default,
9491         actual is missing and formal has an anonymous access type, copy
9492         access definition in full so that tree for instance is properly
9493         formatted for ASIS use.
9495 2015-01-07  Bob Duff  <duff@adacore.com>
9497         * sem_elab.adb (Check_Internal_Call_Continue): Give a warning
9498         for P'Access, where P is a subprogram in the same package as
9499         the P'Access, and the P'Access is evaluated at elaboration
9500         time, and occurs before the body of P. For example, "X : T :=
9501         P'Access;" would allow a subsequent call to X.all to be an
9502         access-before-elaboration error; hence the warning. This warning
9503         is enabled by the -gnatw.f switch.
9504         * opt.ads (Warn_On_Elab_Access): New flag for warning switch.
9505         * warnsw.adb (Set_Dot_Warning_Switch): Set Warn_On_Elab_Access.
9506         * gnat_ugn.texi: Document the new warning.
9508 2015-01-07  Johannes Kanig  <kanig@adacore.com>
9510         * lib-xref-spark_specific.adb (Collect_SPARK_Xrefs): Skip unneeded
9511         cross ref files.
9513 2015-01-07  Robert Dewar  <dewar@adacore.com>
9515         * s-taprop-linux.adb, clean.adb: Minor reformatting.
9517 2015-01-07  Arnaud Charlet  <charlet@adacore.com>
9519         * s-tassta.adb: Relax some overzealous assertions.
9521 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
9523         * sem_ch6.adb (Analyze_Return_Type): An call that returns a limited
9524         view of a type is legal when context is a thunk generated for
9525         operation inherited from an interface.
9526         * exp_ch6.adb (Expand_Simple_Function_Return): If context is
9527         a thunk and return type is an incomplete type do not continue
9528         expansion; thunk will be fully elaborated when generating code.
9530 2015-01-07  Doug Rupp  <rupp@adacore.com>
9532         * s-osinte-mingw.ads (LARGE_INTEGR): New subtype.
9533         (QueryPerformanceFrequency): New imported procedure.
9534         * s-taprop-mingw.adb (RT_Resolution): Call above and return
9535         resolution vice a hardcoded value.
9536         * s-taprop-solaris.adb (RT_Resolution): Call clock_getres and return
9537         resolution vice a hardcoded value.
9538         * s-linux-android.ads (clockid_t): New subtype.
9539         * s-osinte-aix.ads (clock_getres): New imported subprogram.
9540         * s-osinte-android.ads (clock_getres): Likewise.
9541         * s-osinte-freebsd.ads (clock_getres): Likewise.
9542         * s-osinte-solaris-posix.ads (clock_getres): Likewise.
9543         * s-osinte-darwin.ads (clock_getres): New subprogram.
9544         * s-osinte-darwin.adb (clock_getres): New subprogram.
9545         * thread.c (__gnat_clock_get_res) [__APPLE__]: New function.
9546         * s-taprop-posix.adb (RT_Resolution): Call clock_getres to
9547         calculate resolution vice hard coded value.
9549 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
9551         * exp_util.adb (Make_CW_Equivalent_Type): If root type is a
9552         limited view, use non-limited view when available to create
9553         equivalent record type.
9555 2015-01-07  Vincent Celier  <celier@adacore.com>
9557         * gnatcmd.adb: Remove command Sync and any data and processing
9558         related to this command. Remove project processing for gnatstack.
9559         * prj-attr.adb: Remove package Synchonize and its attributes.
9561 2015-01-07  Vincent Celier  <celier@adacore.com>
9563         * clean.adb: Minor error message change.
9565 2015-01-07  Tristan Gingold  <gingold@adacore.com>
9567         PR ada/64349
9568         * env.c (__gnat_environ): Adjust for darwin9/darwin10.
9570 2015-01-07  Javier Miranda  <miranda@adacore.com>
9572         * sem_ch10.adb (Analyze_With_Clause): Compiling under -gnatq
9573         protect the frontend against never ending recursion caused by
9574         circularities in the sources.
9576 2015-01-07  Robert Dewar  <dewar@adacore.com>
9578         * a-reatim.adb, make.adb, exp_pakd.adb, i-cpoint.adb, sem_ch8.adb,
9579         exp_ch3.adb: Minor reformatting.
9581 2015-01-07  Doug Rupp  <rupp@adacore.com>
9583         * s-linux.ads (clockid_t): New subtype.
9584         * s-osinte-linux.ads (pragma Linker Options): Add -lrt.
9585         (clockid_t): New subtype.
9586         (clock_getres): Import system call.
9587         * s-taprop-linux.adb (System.OS_Constants): With and rename.
9588         (RT_Resolution): Remove
9589         hardcoded value and call clock_getres.
9590         * s-linux-sparc.ads, s-linux-mipsel.ads, s-linux-hppa.ads,
9591         s-linux-alpha.ads, s-linux-x32.ads (clockid_t): Add new subtype.
9593 2015-01-07  Robert Dewar  <dewar@adacore.com>
9595         * sem_warn.adb (Check_One_Unit): Guard against context item
9596         with no Entity field.
9598 2015-01-07  Vincent Celier  <celier@adacore.com>
9600         * clean.adb (Gnatclean): Warn that 'gnatclean -P' is obsolete.
9601         * make.adb (Initialize): Warn that 'gnatmake -P' is obsolete.
9603 2015-01-07  Vincent Celier  <celier@adacore.com>
9605         * prj-conf.adb (Parse_Project_And_Apply_Config): Always finalize
9606         errors/warnings in the first parsing of the project files,
9607         to display the warnings when there is no errors.
9609 2015-01-07  Tristan Gingold  <gingold@adacore.com>
9611         * i-cpoint.adb (Copy_Terminated_Array): Nicely handle null target.
9613 2015-01-07  Doug Rupp  <rupp@adacore.com>
9615         * s-taprop-vxworks.adb (Stop_All_Tasks): Pass return
9616         value from Int_Lock as parameter to Int_Unlock.
9617         * s-osinte-vxworks.ads (Int_Unlock): Add parameter.
9618         * s-vxwext.ads (Int_Unlock): Likewise.
9619         * s-vxwext-kernel.adb (intUnlock, Int_Unlock): Likewise.
9620         * s-vxwext-kernel.ads (Int_Unlock): Likewise.
9621         * s-vxwext-rtp.adb (Int_Unlock): Likewise.
9622         * s-vxwext-rtp.ads (Int_Unlock): Likewise.
9624 2015-01-07  Pierre-Marie de Rodat  <derodat@adacore.com>
9626         * exp_pakd.adb: Add a comment in exp_pakd.adb to explain why we
9627         keep ___XP suffixes
9629 2015-01-07  Tristan Gingold  <gingold@adacore.com>
9631         * i-cpoint.adb (Copy_Terminated_Array): Use Copy_Array to
9632         handle overlap.
9634 2015-01-07  Eric Botcazou  <ebotcazou@adacore.com>
9636         * sem_ch3.adb (Analyze_Full_Type_Declaration): Do not
9637         automatically set No_Strict_Aliasing on access types.
9638         * fe.h (No_Strict_Aliasing_CP): Declare.
9639         * gcc-interface/trans.c (gigi): Force flag_strict_aliasing to 0 if
9640         No_Strict_Aliasing_CP is set.
9642 2015-01-07  Johannes Kanig  <kanig@adacore.com>
9644         * sem_ch8.adb (Analyze_Subprogram_Renaming) do
9645         not build function wrapper in gnatprove mode when the package
9646         is externally axiomatized.
9648 2015-01-07  Jose Ruiz  <ruiz@adacore.com>
9650         * a-reatim.adb (Time_Of): Reduce the number of spurious overflows in
9651         intermediate computations when the parameters have different signs.
9653 2015-01-07  Javier Miranda  <miranda@adacore.com>
9655         * exp_ch3.adb (Build_Init_Procedure): For derived types,
9656         improve the code which takes care of identifying and moving to
9657         the beginning of the init-proc the call to the init-proc of the
9658         parent type.
9660 2015-01-07  Olivier Hainque  <hainque@adacore.com>
9662         * gcc-interface/trans.c (gnat_to_gnu, <N_Expression_With_Action>):
9663         Elaborate the expression as part of the same stmt group as the actions.
9665 2015-01-07  Robert Dewar  <dewar@adacore.com>
9667         * sem_ch3.adb: Minor error message change.
9669 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
9671         * sem_prag.adb (Analyze_Pragma, case Preelaborable_Initialization):
9672         Following AI05-028, the pragam applies legally to any composite type.
9674 2015-01-07  Arnaud Charlet  <charlet@adacore.com>
9676         * s-osinte-vxworks.adb, s-osinte-vxworks.ads
9677         (sigwait, sigwaitinfo): Removed, not needed after all on any
9678         VxWorks configurations.
9680 2015-01-07  Robert Dewar  <dewar@adacore.com>
9682         * sem_ch3.adb, freeze.adb, exp_disp.adb: Minor reformatting.
9684 2015-01-07  Javier Miranda  <miranda@adacore.com>
9686         * exp_disp.adb (Expand_Interface_Conversion): Adding missing
9687         generation of accessibility check.
9689 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
9691         * sem_ch3.adb (Derived_Type_Declaration): In the case of an
9692         illegal completion from a class- wide type, set etype of the
9693         derived type properly to prevent cascaded errors.
9695 2015-01-07  Robert Dewar  <dewar@adacore.com>
9697         * prj.ads, i-cpoint.adb, freeze.adb, ghost.adb, prj-err.adb: Minor
9698         reformatting.
9700 2015-01-07  Robert Dewar  <dewar@adacore.com>
9702         * restrict.adb (Check_Restriction_No_Use_Of_Attribute):
9703         New procedure.
9704         (OK_No_Use_Of_Entity_Name): New function.
9705         (Set_Restriction_No_Use_Of_Entity): New procedure.
9706         * restrict.ads (Check_Restriction_No_Use_Of_Attribute):
9707         New procedure.
9708         (OK_No_Use_Of_Entity_Name): New function.
9709         (Set_Restriction_No_Use_Of_Entity): New procedure.
9710         * sem_ch8.adb (Find_Direct_Name): Add check for violation of
9711         No_Use_Of_Entity.
9712         * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
9713         Add processing for new restriction No_Use_Of_Entity.
9715 2015-01-07  Eric Botcazou  <ebotcazou@adacore.com>
9717         * freeze.adb (Freeze_Array_Type): Apply same handling to Is_Atomic
9718         component type as to Has_Atomic_Components type.  Remove useless
9719         test on Is_Aliased component type.
9721 2015-01-07  Hristian Kirtchev  <kirtchev@adacore.com>
9723         * alloc.ads Alphabetize several declarations. Add constants
9724         Ignored_Ghost_Units_Initial and Ignored_Ghost_Units_Increment.
9725         * atree.adb Add with and use clauses for Opt.
9726         (Allocate_Initialize_Node): Mark a node as ignored Ghost
9727         if it is created in an ignored Ghost region.
9728         (Ekind_In): New variant.
9729         (Is_Ignored_Ghost_Node): New routine.
9730         (Set_Is_Ignored_Ghost_Node): New routine.
9731         * atree.adb Aplhabetize several subprograms declarations. Flag
9732         Spare0 is now known as Is_Ignored_Ghost_Node.
9733         (Ekind_In): New variant.
9734         (Is_Ignored_Ghost_Node): New routine.
9735         (Set_Is_Ignored_Ghost_Node): New routine.
9736         * einfo.adb: Flag 279 is now known as Contains_Ignored_Ghost_Code.
9737         (Contains_Ignored_Ghost_Code): New routine.
9738         (Set_Contains_Ignored_Ghost_Code): New routine.
9739         (Set_Is_Checked_Ghost_Entity, Set_Is_Ignored_Ghost_Entity):
9740         It is now possible to set this property on an unanalyzed entity.
9741         (Write_Entity_Flags): Output the status of flag
9742         Contains_Ignored_Ghost_Code.
9743         * einfo.ads New attribute Contains_Ignored_Ghost_Code along with
9744         usage in nodes.
9745         (Contains_Ignored_Ghost_Code): New routine
9746         along with pragma Inline.
9747         (Set_Contains_Ignored_Ghost_Code): New routine along with pragma Inline.
9748         * exp_ch3.adb Add with and use clauses for Ghost.
9749         (Freeze_Type): Capture/restore the value of Ghost_Mode on entry/exit.
9750         Set the Ghost_Mode in effect.
9751         (Restore_Globals): New routine.
9752         * exp_ch7.adb (Process_Declarations): Do not process a context
9753         that invoves an ignored Ghost entity.
9754         * exp_dbug.adb (Qualify_All_Entity_Names): Skip an ignored Ghost
9755         construct that has been rewritten as a null statement.
9756         * exp_disp.adb Add with and use clauses for Ghost.
9757         (Make_DT): Capture/restore the value of Ghost_Mode on entry/exit. Set
9758         the Ghost_Mode in effect.
9759         (Restore_Globals): New routine.
9760         * exp_util.adb (Requires_Cleanup_Actions): An ignored Ghost entity
9761         does not require any clean up. Add two missing cases that deal
9762         with block statements.
9763         * freeze.adb Add with and use clauses for Ghost.
9764         (Freeze_Entity): Capture/restore the value of Ghost_Mode on entry/exit.
9765         Set the Ghost_Mode in effect.
9766         (Restore_Globals): New routine.
9767         * frontend.adb Add with and use clauses for Ghost. Remove any
9768         ignored Ghost code from all units that qualify.
9769         * ghost.adb New unit.
9770         * ghost.ads New unit.
9771         * gnat1drv.adb Add with clause for Ghost. Initialize and lock
9772         the table in package Ghost.
9773         * lib.ads: Alphabetize several subprogram declarations.
9774         * lib-xref.adb (Output_References): Do not generate reference
9775         information for ignored Ghost entities.
9776         * opt.ads Add new type Ghost_Mode_Type and new global variable
9777         Ghost_Mode.
9778         * rtsfind.adb (Load_RTU): Provide a clean environment when
9779         loading a runtime unit.
9780         * sem.adb (Analyze): Capture/restore the value of Ghost_Mode on
9781         entry/exit as the node may set a different mode.
9782         (Do_Analyze):
9783         Capture/restore the value of Ghost_Mode on entry/exit as the
9784         unit may be withed from a unit with a different Ghost mode.
9785         * sem_ch3.adb Add with and use clauses for Ghost.
9786         (Analyze_Full_Type_Declaration, Analyze_Incomplete_Type_Decl,
9787         Analyze_Number_Declaration, Analyze_Private_Extension_Declaration,
9788         Analyze_Subtype_Declaration): Set the Ghost_Mode in effect. Mark
9789         the entity as Ghost when there is a Ghost_Mode in effect.
9790         (Array_Type_Declaration): The implicit base type inherits the
9791         "ghostness" from the array type.
9792         (Derive_Subprogram): The
9793         alias inherits the "ghostness" from the parent subprogram.
9794         (Make_Implicit_Base): The implicit base type inherits the
9795         "ghostness" from the parent type.
9796         * sem_ch5.adb Add with and use clauses for Ghost.
9797         (Analyze_Assignment): Set the Ghost_Mode in effect.
9798         * sem_ch6.adb Add with and use clauses for Ghost.
9799         (Analyze_Abstract_Subprogram_Declaration, Analyze_Procedure_Call,
9800         Analyze_Subprogram_Body_Helper, Analyze_Subprogram_Declaration):
9801         Set the Ghost_Mode in effect. Mark the entity as Ghost when
9802         there is a Ghost_Mode in effect.
9803         * sem_ch7.adb Add with and use clauses for Ghost.
9804         (Analyze_Package_Body_Helper, Analyze_Package_Declaration,
9805         Analyze_Private_Type_Declaration): Set the Ghost_Mode in
9806         effect. Mark the entity as Ghost when there is a Ghost_Mode
9807         in effect.
9808         * sem_ch8.adb Add with and use clauses for Ghost.
9809         (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
9810         Analyze_Object_Renaming, Analyze_Package_Renaming,
9811         Analyze_Subprogram_Renaming): Set the Ghost_Mode in effect. Mark
9812         the entity as Ghost when there is a Ghost_Mode in effect.
9813         (Find_Type): Check the Ghost context of a type.
9814         * sem_ch11.adb Add with and use clauses for Ghost.
9815         (Analyze_Exception_Declaration): Set the Ghost_Mode in
9816         effect. Mark the entity as Ghost when there is a Ghost_Mode
9817         in effect.
9818         * sem_ch12.adb Add with and use clauses for Ghost.
9819         (Analyze_Generic_Package_Declaration,
9820         Analyze_Generic_Subprogram_Declaration): Set the Ghost_Mode in effect.
9821         Mark the entity as Ghost when there is a Ghost_Mode in effect.
9822         * sem_prag.adb Add with and use clauses for Ghost.
9823         (Analyze_Pragma): Ghost-related checks are triggered when there
9824         is a Ghost mode in effect.
9825         (Create_Abstract_State): Mark the
9826         entity as Ghost when there is a Ghost_Mode in effect.
9827         * sem_res.adb Add with and use clauses for Ghost.
9828         (Check_Ghost_Context): Removed.
9829         * sem_util.adb (Check_Ghost_Completion): Removed.
9830         (Check_Ghost_Derivation): Removed.
9831         (Incomplete_Or_Partial_View):
9832         Add a guard in case the entity has not been analyzed yet
9833         and does carry a scope.
9834         (Is_Declaration): New routine.
9835         (Is_Ghost_Entity): Removed.
9836         (Is_Ghost_Statement_Or_Pragma):
9837         Removed.
9838         (Is_Subject_To_Ghost): Removed.
9839         (Set_Is_Ghost_Entity):
9840         Removed.
9841         (Within_Ghost_Scope): Removed.
9842         * sem_util.adb (Check_Ghost_Completion): Removed.
9843         (Check_Ghost_Derivation): Removed.
9844         (Is_Declaration): New routine.
9845         (Is_Ghost_Entity): Removed.
9846         (Is_Ghost_Statement_Or_Pragma): Removed.
9847         (Is_Subject_To_Ghost): Removed.
9848         (Set_Is_Ghost_Entity): Removed.
9849         (Within_Ghost_Scope): Removed.
9850         * sinfo.ads Add a section on Ghost mode.
9851         * treepr.adb (Print_Header_Flag): New routine.
9852         (Print_Node_Header): Factor out code. Output flag
9853         Is_Ignored_Ghost_Node.
9854         * gcc-interface/Make-lang.in: Add dependency for unit Ghost.
9856 2015-01-06  Eric Botcazou  <ebotcazou@adacore.com>
9858         * freeze.adb (Freeze_Array_Type) <Complain_CS>: Remove always
9859         true test and unreachable 'else' arm.
9861 2015-01-06  Vincent Celier  <celier@adacore.com>
9863         * prj-conf.adb (Check_Target): Improve error message when
9864         there are mismatched targets between the on in the configuration
9865         project file and the specified one, either in the main project
9866         file or in the --target= switch.
9868 2015-01-06  Pascal Obry  <obry@adacore.com>
9870         * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Mode and
9871         Install_Name attribute definitions.
9873 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
9875         * freeze.adb (Wrap_Imported_Subprogram): Indicate that the
9876         generated Import pragma for the internal imported procedure does
9877         not come from an aspect, so that Is_Imported can be properly
9878         set for it.
9880 2015-01-06  Gary Dismukes  <dismukes@adacore.com>
9882         * sem_ch12.adb (Might_Inline_Subp): Record whether
9883         any subprograms in the generic package are marked with
9884         pragma Inline_Always (setting flag Has_Inline_Always).
9885         (Analyze_Package_Instantiation): Add test of Has_Inline_Always
9886         alongside existing test of Front_End_Inlining as alternative
9887         conditions for setting Inline_Now. Also add test of
9888         Has_Inline_Always along with Front_End_Inlining test as an
9889         alternative condition for setting Needs_Body to False.
9891 2015-01-06  Tristan Gingold  <gingold@adacore.com>
9893         * i-cpoint.adb (Copy_Array): Handle overlap.
9895 2015-01-06  Pascal Obry  <obry@adacore.com>
9897         * bindgen.adb: Minor style fix.
9899 2015-01-06  Robert Dewar  <dewar@adacore.com>
9901         * sem_util.ads, sem_util.adb: Minor reformatting.
9903 2015-01-06  Vincent Celier  <celier@adacore.com>
9905         * prj-conf.adb (Parse_Project_And_Apply_Config): Reset incomplete
9906         with flags before parsing the projects.
9907         * prj-err.adb (Error_Msg): Do nothing if there are incomplete withs.
9908         * prj-part.adb (Post_Parse_Context_Clause): Set Incomplete_Withs
9909         to True in the flags, when Ignore_Missing_With is True and an
9910         imported project cannot be found.
9911         * prj-proc.adb (Expression): When there are incomplete withs and
9912         a variable or attribute is not found, set the variable/attribute
9913         to unknown.
9914         * prj.ads (Processing_Flags): New flag Incomplete_Withs,
9915         defaulted to False.
9917 2015-01-06  Vasiliy Fofanov  <fofanov@adacore.com>
9919         * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-conf.adb,
9920         prj-err.adb: Add new switch --no-command-line.
9922 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
9924         * sem_ch12.adb: Sloc of wrapper is that of instantiation.
9926 2015-01-06  Robert Dewar  <dewar@adacore.com>
9928         * sem_ch11.adb: Minor reformatting.
9930 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
9932         * exp_aggr.adb (Get_Assoc_Expr): New routine internal to
9933         Build_Array_Aggr_Code, used to initialized components covered
9934         by a box association. If the component type is scalar and has
9935         a default aspect, use it to initialize such components.
9937 2015-01-06  Pascal Obry  <obry@adacore.com>
9939         * rtinit.c (__gnat_runtime_initialize): Add a parameter to
9940         control the setup of the exception handler.
9941         * initialize.c: Remove unused declaration.
9942         * bindgen.adb: Always call __gnat_runtime_initialize and pass
9943         whether the exeception handler must be set or not.
9945 2015-01-06  Thomas Quinot  <quinot@adacore.com>
9947         * freeze.adb (Set_SSO_From_Defaults): When setting scalar storage
9948         order to native from default, make sure to also adjust bit order.
9949         * exp_aggr.adb: Minor reformatting.
9951 2015-01-06  Robert Dewar  <dewar@adacore.com>
9953         * s-valllu.adb, s-valllu.ads, s-valuti.ads, s-valuns.adb, s-valuns.ads,
9954         s-valrea.adb, s-valrea.ads: Add some additional guards for
9955         Str'Last = Positive'Last.
9957 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
9959         * sem_ch12.adb, sem_ch8.adb: Ongoing work for wrappers for actual
9960         subprograms.
9962 2015-01-06  Javier Miranda  <miranda@adacore.com>
9964         * exp_disp.adb (Expand_Interface_Conversion): Reapply patch.
9966 2015-01-06  Thomas Quinot  <quinot@adacore.com>
9968         * sem_util.ads: Minor reformatting.
9969         * sem_cat.adb (In_RCI_Visible_Declarations): Change back to...
9970         (In_RCI_Declaration) Return to old name, as proper checking of
9971         entity being in the visible part depends on entity kind and must
9972         be done by the caller.
9974 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
9976         * sem_ch12.adb, sem_ch12.ads, sem_ch8.adb: Ongoing work for wrappers
9977         for operators in SPARK.
9979 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
9981         * sem_aggr.adb (Get_Value): In ASIS mode, preanalyze the
9982         expression in an others association before making copies for
9983         separate resolution and accessibility checks. This ensures that
9984         the type of the expression is available to ASIS in all cases,
9985         in particular if the expression is itself an aggregate.
9987 2015-01-06  Eric Botcazou  <ebotcazou@adacore.com>
9989         * einfo.ads (Has_Independent_Components): Document extended
9990         usage.
9991         * einfo.adb (Has_Independent_Components): Remove obsolete assertion.
9992         (Set_Has_Independent_Components): Adjust assertion.
9993         * sem_prag.adb (Analyze_Pragma): Also set Has_Independent_Components
9994         for pragma Atomic_Components.  Set Has_Independent_Components
9995         on the object instead of the type for an object declaration with
9996         pragma Independent_Components.
9998 2015-01-06  Olivier Hainque  <hainque@adacore.com>
10000         * set_targ.adb (Read_Target_Dependent_Values): Set
10001         Long_Double_Index when "long double" is read.
10002         (elaboration code): Register_Back_End_Types only when not reading from
10003         config files. Doing otherwise is pointless and error prone.
10005 2015-01-06  Robert Dewar  <dewar@adacore.com>
10007         * s-valrea.adb (Value_Real): Check for Str'Last = Positive'Last
10009 2015-01-06  Robert Dewar  <dewar@adacore.com>
10011         * a-wtgeau.adb, a-ztgeau.adb, a-tigeau.adb (String_Skip): Raise PE if
10012         Str'Last = Positive'Last.
10014 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
10016         * sem_ch6.adb (Matches_Limited_View): Handle properly the case
10017         where the non-limited type is a generic actual and appears as
10018         a subtype of the non-limited view of the other.
10019         * freeze.adb (Build_Renamed_Body): If the return type of the
10020         declaration that is being completed is a limited view and the
10021         non-limited view is available, use it in the specification of
10022         the generated body.
10024 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
10026         * sem_ch3.adb (Find_Type_Name): If there is a previous tagged
10027         incomplete view, the type of the classwide type common to both
10028         views is the type being declared.
10030 2015-01-06  Eric Botcazou  <ebotcazou@adacore.com>
10032         * einfo.ads (Is_Independent): Further document extended usage.
10034 2015-01-06  Eric Botcazou  <ebotcazou@adacore.com>
10036         * einfo.ads (Is_Independent): Document extended usage.
10037         * einfo.adb (Is_Independent): Remove obsolete assertion.
10038         (Set_Is_Independent): Likewise.
10039         * sem_prag.adb (Process_Atomic_Shared_Volatile): Rename into...
10040         (Process_Atomic_Independent_Shared_Volatile): ...this.
10041         Deal with pragma Independent here.
10042         (Analyze_Pragma): Adjust
10043         to above renaming and also invoke it for pragma Independent.
10044         Adjust comment for Independent_Components.
10046 2015-01-06  Robert Dewar  <dewar@adacore.com>
10048         * snames.ads-tmpl: Remove entries for attribute Enum_Image.
10049         * exp_attr.adb: Remove reference to Attribute_Enum_Image.
10051 2015-01-06  Robert Dewar  <dewar@adacore.com>
10053         * s-vallli.adb (Value_Long_Long_Integer): Handle case of Str'Last
10054         = Positive'Last.
10055         * s-valllu.adb (Value_Long_Long_Unsigned): Handle case of
10056         Str'Last = Positive'Last.
10058 2015-01-06  Robert Dewar  <dewar@adacore.com>
10060         * sem_prag.adb (Process_Inline): Remove redundant construct
10061         warning (-gnatw.r) for an ineffective pragma Inline.
10063 2015-01-06  Robert Dewar  <dewar@adacore.com>
10065         * s-valint.adb: Fix typo in last checkin.
10066         * s-valuns.adb (Value_Unsigned): More efficient fix for
10067         Positive'Last case.
10068         * sem_attr.adb (Analyze_Attribute): Minor reformatting
10069         (Eval_Attribute): Static ervaluation of 'Img for enumeration types.
10071 2015-01-06  Robert Dewar  <dewar@adacore.com>
10073         * s-valint.adb, s-valuns.adb (Value_Integer): Deal with case where
10074         Str'Last = Positive'Last
10076 2015-01-06  Thomas Quinot  <quinot@adacore.com>
10078         * xoscons.adb: Display exception information and return non-zero
10079         exit status in top level exception handler.
10081 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
10083         * sem_ch8.adb: Code clean up.
10085 2015-01-06  Tristan Gingold  <gingold@adacore.com>
10087         * targparm.ads: Remove obsolete comment.
10089 2015-01-06  Olivier Hainque  <hainque@adacore.com>
10091         * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Variable): When
10092         constructing a ref to variable, update inner_const_flag from the
10093         variable TREE_READONLY attribute.
10094         * gcc-interface/targtyps.c (WIDEST_HARDWARE_FP_SIZE): Remove default
10095         definition.
10096         (get_target_float_size): Remove.
10097         (get_target_double_size): Remove.
10098         (get_target_long_double_size): Remove.
10100 2015-01-06  Pascal Obry  <obry@adacore.com>
10102         * adaint.c (ProcListEvt): Set to NULL.
10103         * rtinit.c: New file.
10104         (__gnat_rt_init_count): New reference counter set to 0.
10105         (__gnat_runtime_initialize): Move code here from __gnat_initialize when
10106         this code is actually needed for the runtime initialization. This
10107         routine returns immediately if the initialization has already been done.
10108         * final.c: Revert previous change.
10109         * rtfinal.c: New file.
10110         (__gnat_runtime_finalize)[Win32]: Add finalization of the critical
10111         section and event. The default version of this routine is empty (except
10112         for the reference counting code). This routine returns immediately if
10113         some others libraries are referencing the runtime.
10114         * bindgen.adb (Gen_Adainit): Generate call to Runtime_Initialize
10115         remove circuitry to initialize the signal handler as this is
10116         now done by the runtime initialization routine.
10117         (Gen_Adafinal): Generate call to Runtime_Finalize.
10118         * gnat_ugn.texi: Update documentation about concurrency and
10119         initialization/finalization of the run-time.
10120         * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Add
10121         references to rtfinal.o and rtinit.o
10123 2015-01-06  Robert Dewar  <dewar@adacore.com>
10125         * exp_attr.adb (Expand_N_Attribute_Reference): Add dummy entry
10126         for Enum_Image.
10127         * sem_attr.adb: Implement Enum_Image attribute.
10128         * snames.ads-tmpl: Add entries for Enum_Image attribute.
10130 2015-01-06  Robert Dewar  <dewar@adacore.com>
10132         * namet.ads: Document use of Boolean2 for No_Use_Of_Entity.
10133         * restrict.ads (No_Use_Of_Entity): New table.
10134         * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
10135         Ignore No_Use_Of_Entity (will be processed in parser).
10136         * snames.ads-tmpl: Add entry for Name_No_Use_Of_Entity.
10138 2015-01-06  Vincent Celier  <celier@adacore.com>
10140         * prj-tree.adb (Imported_Or_Extended_Project_Of): Do not try
10141         to check for an extended project, if a project does not have
10142         yet a project declaration.
10144 2015-01-06  Pierre-Marie Derodat  <derodat@adacore.com>
10146         * scos.ads: Update documentation about the SCO table build
10147         process and about table records format.
10148         * par_sco.ads (SCO_Record): Rename to SCO_Record_Raw.
10149         (SCO_Record_Filtered): New procedure.
10150         (Set_SCO_Logical_Operator): New procedure.
10151         (dsco): Update documentation.
10152         * par_sco.adb: Update library-level comments.
10153         (SCO_Generation_State_Type): New type.
10154         (SCO_Generation_State): New variable.
10155         (SCO_Raw_Table): New package instanciation.
10156         (Condition_Pragma_Hash_Table): Rename to SCO_Raw_Hash_Table.
10157         ("<"): New.
10158         (Tristate): New type.
10159         (Is_Logical_Operator): Return Tristate and update documentation.
10160         (Has_Decision): Update call to Is_Logical_Operator and complete
10161         documentation.
10162         (Set_Table_Entry): Rename to Set_Raw_Table_Entry, update
10163         comment, add an assertion for state checking and change
10164         references to SCO_Table into SCO_Raw_Table.
10165         (dsco): Refactor to dump the raw and the filtered tables.
10166         (Process_Decisions.Output_Decision_Operand): Handle putative
10167         short-circuit operators.
10168         (Process_Decisions.Output_Element): Update references
10169         to Set_Table_Entry and to Condition_Pragma_Hash_Table.
10170         (Process_Decisions.Process_Decision_Operand): Update call
10171         to Is_Logical_Operator.
10172         (Process_Decisions.Process_Node): Handle putative short-circuit
10173         operators and change references to
10174         SCO_Table into SCO_Raw_Table.
10175         (SCO_Output): Add an assertion
10176         for state checking and remove code that used to stamp out SCO entries.
10177         (SCO_Pragma_Disabled): Change reference to SCO_Table
10178         into SCO_Raw_Table.
10179         (SCO_Record): Rename to SCO_Record_Raw,
10180         add an assertion for state checking and change references
10181         to SCO_Table into SCO_Raw_Table.
10182         (Set_SCO_Condition): Add an assertion for state checking, update
10183         references to Condition_Pragma_Hash_Table and change references to
10184         SCO_Table into SCO_Raw_Table.
10185         (Set_SCO_Pragma_Enabled): Add an assertion for state checking and
10186         change references to SCO_Table into SCO_Raw_Table.
10187         (Set_SCO_Logical_Operator): New procedure.
10188         (Traverse_Declarations_Or_Statements.Set_Statement_Entry): Update
10189         references to Set_Table_Entry and to Condition_Pragma_Hash_Table.
10190         (SCO_Record_Fildered): New procedure.
10191         * gnat1drv.adb (Gnat1drv): Invoke the SCO filtering pass.
10192         * lib-writ.adb (Write_ALI): Invoke the SCO filtering pass and
10193         output SCOs.
10194         * par-load.adb (Load): Update reference to SCO_Record.
10195         * par.adb (Par): Update reference to SCO_Record.
10196         * put_scos.adb (Put_SCOs): Add an assertion to check that no
10197         putative SCO condition reaches this end.
10198         * sem_ch10.adb (Analyze_Proper_Body): Update reference to SCO_Record.
10199         * sem_res.adb (Resolve_Logical_Op): Validate putative SCOs
10200         when corresponding to an "and"/"or" operator affected by the
10201         Short_Circuit_And_Or pragma.
10203 2015-01-06  Robert Dewar  <dewar@adacore.com>
10205         * sem_ch8.adb (Analyze_Use_Package): Give more specific error
10206         msg for attempted USE of generic subprogram or subprogram.
10208 2015-01-06  Robert Dewar  <dewar@adacore.com>
10210         * s-valllu.adb, a-tiinau.adb, a-timoau.adb, a-ztinau.adb, a-ztmoau.adb,
10211         s-valuns.adb, s-valrea.adb, a-wtflau.adb, a-tiflau.adb, a-ztflau.adb,
10212         a-wtinau.adb, a-wtmoau.adb: Document recognition of : in place of #.
10214 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
10216         * sem_ch13.adb (Analyze_Aspect_Specifications): For aspects
10217         that specify stream subprograms, if the prefix is a class-wide
10218         type then the generated attribute definition clause must apply
10219         to the same class-wide type.
10220         (Default_Iterator): An iterator defined by an aspect of some
10221         container type T must have a first parameter of type T, T'class,
10222         or an access to such (from code reading RM 5.5.1 (2/3)).
10224 2015-01-06  Arnaud Charlet  <charlet@adacore.com>
10226         * gnat1drv.adb: Minor: complete previous change.
10228 2015-01-06  Olivier Hainque  <hainque@adacore.com>
10230         * set_targ.ads (C_Type_For): New function. Return the name of
10231         a C type supported by the back-end and suitable as a basis to
10232         construct the standard Ada floating point type identified by
10233         the T parameter. This is used as a common ground to feed both
10234         ttypes values and the GNAT tree nodes for the standard floating
10235         point types.
10236         * set_targ.adb (Long_Double_Index): The index at which "long
10237         double" gets registered in the FPT_Mode_Table. This is useful to
10238         know whether we have a "long double" available at all and get at
10239         it's characteristics without having to search the FPT_Mode_Table
10240         when we need to decide which C type should be used as the
10241         basis for Long_Long_Float in Ada.
10242         (Register_Float_Type): Fill Long_Double_Index.
10243         (FPT_Mode_Index_For): New function. Return the index in
10244         FPT_Mode_Table that designates the entry corresponding to the
10245         provided C type name.
10246         (FPT_Mode_Index_For): New function. Return the index in
10247         FPT_Mode_Table that designates the entry for a back-end type
10248         suitable as a basis to construct the standard Ada floating point
10249         type identified by the input T parameter.
10250         (elaboration code): Register_Back_End_Types unconditionally,
10251         so C_Type_For can operate regardless of -gnateT. Do it
10252         early so we can query it for the floating point sizes, via
10253         FPT_Mode_Index_For. Initialize Float_Size, Double_Size and
10254         Long_Double_Size from the FPT_Mode_Table, as cstand will do.
10255         * cstand.adb (Create_Float_Types): Use C_Type_For to determine
10256         which C type should be used as the basis for the construction
10257         of the Standard Ada floating point types.
10258         * get_targ.ads (Get_Float_Size, Get_Double_Size,
10259         Get_Long_Double_Size): Remove.
10260         * get_targ.adb: Likewise.
10262 2015-01-06  Thomas Quinot  <quinot@adacore.com>
10264         * sem_cat.adb (In_RCI_Declaration): Remove unnecessary
10265         parameter and rename to...
10266         (In_RCI_Visible_Declarations): Fix handling of private part of nested
10267         package.
10268         (Validate_RCI_Subprogram_Declaration): Reject illegal function
10269         returning anonymous access in RCI unit.
10271 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
10273         * sem_ch6.adb (New_Overloaded_Entity): In GNATprove mode, a
10274         function wrapper may be a homonym of another local declaration.
10275         * sem_ch8.adb (Analyze_Subprogram_Renaming): In GNATprove mode,
10276         build function and operator wrappers after the actual subprogram
10277         has been resolved, and replace the standard renaming declaration
10278         with the declaration of wrapper.
10279         * sem_ch12.ads (Build_Function_Wrapper, Build_Operator_Wraooer):
10280         make public for use elsewhere.
10281         * sem_ch12.adb (Build_Function_Wrapper, Build_Operator_Wraooer):
10282         rewrite, now that actual is fully resolved when wrapper is
10283         constructed.
10285 2015-01-06  Javier Miranda  <miranda@adacore.com>
10287         * exp_disp.adb: Revert previous change.
10289 2015-01-06  Robert Dewar  <dewar@adacore.com>
10291         * exp_util.adb: Change name Name_Table_Boolean to
10292         Name_Table_Boolean1.
10293         * namet.adb: Change name Name_Table_Boolean to Name_Table_Boolean1
10294         Introduce Name_Table_Boolean2/3.
10295         * namet.ads: Change name Name_Table_Boolean to Name_Table_Boolean1
10296         Introduce Name_Table_Boolean2/3.
10297         * par-ch13.adb: Change name Name_Table_Boolean to
10298         Name_Table_Boolean1.
10300 2015-01-06  Bob Duff  <duff@adacore.com>
10302         * gnat_rm.texi: Improve documentation regarding No_Task_Termination.
10304 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
10306         * sem_aggr.adb (Resolve_Record_Aggregte, Get_Value): For an
10307         others choice that covers multiple components, analyze each
10308         copy with the type of the component even in compile-only mode,
10309         to detect potential accessibility errors.
10311 2015-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
10313         * sem_res.adb (Is_Assignment_Or_Object_Expression): New routine.
10314         (Resolve_Actuals): An effectively volatile out
10315         parameter cannot act as an in or in out actual in a call.
10316         (Resolve_Entity_Name): An effectively volatile out parameter
10317         cannot be read.
10319 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
10321         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If the body is
10322         the expansion of an expression function it may be pre-analyzed
10323         if a 'access attribute is applied to the function, in which case
10324         last_entity may have been assigned already.
10326 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
10328         * sem_ch4.adb (Analyze_One_Call): If formal has an incomplete
10329         type and actual has the corresponding full view, there is no
10330         error, but a case of use of incomplete type in a predicate or
10331         invariant expression.
10333 2015-01-06  Vincent Celier  <celier@adacore.com>
10335         * makeutl.adb (Insert_No_Roots): Make sure that the same source
10336         in two different project tree is checked in both trees, if they
10337         are sources of two different projects, extended or not.
10339 2015-01-06  Arnaud Charlet  <charlet@adacore.com>
10341         * gnat1drv.adb: Minor code clean up.
10342         (Adjust_Global_Switches): Ignore gnatprove_mode in codepeer_mode.
10344 2015-01-06  Bob Duff  <duff@adacore.com>
10346         * osint.adb (Read_Source_File): Don't print out
10347         file name unless T = Source.
10349 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
10351         * sem_util.adb (Is_Variable, Is_OK_Variable_For_Out_Formal):
10352         recognize improper uses of constant_reference types as actuals
10353         for in-out parameters.
10354         (Check_Function_Call): Do not collect identifiers if function
10355         name is missing because of previous error.
10357 2015-01-06  Robert Dewar  <dewar@adacore.com>
10359         * ali-util.adb, sem_prag.adb, rtsfind.adb, sem_util.adb, sem_res.adb,
10360         ali.adb, binde.adb, namet.adb, namet.ads, gnatls.adb, bcheck.adb:
10361         Minor change of name Name_Table_Info => Name_Table_Int.
10363 2015-01-06  Robert Dewar  <dewar@adacore.com>
10365         * exp_strm.adb (Build_Elementary_Input_Call): Clarify comments
10366         in previous checkin.
10367         * freeze.adb (Freeze_Fixed_Point_Type): Add warning for shaving
10368         of bounds.
10369         * sem_prag.adb, sem_ch10.adb, sem_ch6.adb: Minor reformatting.
10371 2015-01-06  Vincent Celier  <celier@adacore.com>
10373         * a-strsup.adb (Times (Natural;String;Positive)): Raise
10374         Length_Error, not Index_Error, when the result is too long.
10376 2015-01-06  Thomas Quinot  <quinot@adacore.com>
10378         * a-direct.adb (Create_Path): Minor error handling and
10379         performance improvement.
10381 2015-01-06  Robert Dewar  <dewar@adacore.com>
10383         * checks.ads, sem_ch12.adb: Minor reformatting.
10384         * exp_ch4.adb (Expand_N_Op_Divide): Generate explicit divide by
10385         zero check for fixed-point case if Backend_Divide_Checks_On_Target
10386         is False.
10388 2015-01-06  Robert Dewar  <dewar@adacore.com>
10390         * sem_prag.adb (Analyze_Pragma, case No_Elaboration_Code_All):
10391         Do not set restriction No_Elaboration_Code unless the pragma
10392         appears in the main unit).
10394 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
10396         * sem_ch10.adb (Is_Regular_With_Clause): Add guard to verify
10397         that with clause has already been analyzed before checking kind
10398         of with_clause.
10400 2015-01-06  Robert Dewar  <dewar@adacore.com>
10402         * exp_strm.adb (Build_Elementary_Input_Call): Return base type
10403         (as required by RM).
10405 2015-01-06  Arnaud Charlet  <charlet@adacore.com>
10407         * a-reatim.adb ("/"): Add explicit pragma Unsuppress (Division_Check).
10409 2015-01-06  Robert Dewar  <dewar@adacore.com>
10411         * sem_prag.adb (Process_Suppress_Unsuppress): Add extra warning
10412         for ignoring pragma Suppress (Elaboration_Check) in SPARK mode.
10414 2015-01-06  Javier Miranda  <miranda@adacore.com>
10416         * exp_disp.adb (Expand_Interface_Conversion): No displacement
10417         of the pointer to the object needed when the type of the operand
10418         is not an interface type and the interface is one of its parent
10419         types (since they share the primary dispatch table).
10421 2015-01-06  Vincent Celier  <celier@adacore.com>
10423         * prj-env.adb: Minor comment update.
10425 2015-01-06  Javier Miranda  <miranda@adacore.com>
10427         * sem_res.adb (Valid_Conversion): Restrict the checks on anonymous
10428         access types whose target type is an interface type to operands
10429         that are access types; required to report an error when the
10430         operand is not an access type.
10432 2015-01-06  Bob Duff  <duff@adacore.com>
10434         * a-cfinve.adb (Copy): Set the discriminant to the Length when
10435         Capacity = 0.
10436         * a-cofove.ads (Capacity): Add a postcondition.
10437         * a-cfinve.ads (Capacity): Add a postcondition.
10438         (Reserve_Capacity): Correct the postcondition in the case where
10439         Capacity = 0; that means "Capacity => Length (Container)".
10440         * a-cofove.adb (Elems[c]): Add a comment
10441         explaining the dangers and how to avoid them.
10443 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
10445         * sem_ch12.adb: Code clean up.
10447 2015-01-06  Arnaud Charlet  <charlet@adacore.com>
10449         * gnatvsn.ads: Bump copyright year.
10451 2015-01-06  Robert Dewar  <dewar@adacore.com>
10453         * s-taskin.ads, s-traces.ads: Minor reformatting.
10454         * exp_util.adb: Minor typo fix.
10456 2015-01-06  Vincent Celier  <celier@adacore.com>
10458         * gnatls.adb (Search_RTS): Invoke Initialize_Default_Project_Path
10459         with the runtime name.
10460         * prj-env.adb (Initialize_Default_Project_Path): When both
10461         Target_Name and Runtime_Name are not empty string, add to the
10462         project path the two directories .../lib/gnat and .../share/gpr
10463         related to the runtime.
10464         * prj-env.ads (Initialize_Default_Project_Path): New String
10465         parameter Runtime_Name, defaulted to the empty string.
10467 2015-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
10469         * frontend.adb: Guard against the case where a configuration
10470         pragma may be split into multiple pragmas and the original
10471         rewritten as a null statement.
10472         * sem_prag.adb (Analyze_Pragma): Insert a brand new Check_Policy
10473         pragma using Insert_Before rather than Insert_Action. This
10474         takes care of the configuration pragma case where Insert_Action
10475         would fail.
10477 2015-01-06  Bob Duff  <duff@adacore.com>
10479         * a-coboho.ads (Element_Access): Add "pragma
10480         No_Strict_Aliasing (Element_Access);". This is needed because
10481         we are unchecked-converting from Address to Element_Access.
10482         * a-cofove.ads, a-cofove.adb (Elems,Elemsc): Fix bounds of the
10483         result to be 1.
10485 2015-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
10487         * sem_res.adb (Resolve_Actuals): Remove the
10488         restriction which prohibits volatile actual parameters with
10489         enabled external propery Async_Writers to act appear in procedure
10490         calls where the corresponding formal is of mode OUT.
10492 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
10494         * gnat_ugn.texi: Bump @copying's copyright year.
10496 2015-01-05  Eric Botcazou  <ebotcazou@adacore.com>
10498         PR ada/64492
10499         * gcc-interface/Makefile.in (../stamp-tools): Reinstate dropped code.
10501 2015-01-04  Uros Bizjak  <ubizjak@gmail.com>
10503         * gcc-interface/misc.c (internal_error_function): Use xasprintf instead
10504         of unchecked asprintf.
10507 Copyright (C) 2015 Free Software Foundation, Inc.
10509 Copying and distribution of this file, with or without modification,
10510 are permitted in any medium without royalty provided the copyright
10511 notice and this notice are preserved.