2016-06-16 Hristian Kirtchev <kirtchev@adacore.com>
[official-gcc.git] / gcc / ada / ChangeLog
blobd514eaff5bcf22716fdaed913440ec5447f2a958
1 2016-06-16  Hristian Kirtchev  <kirtchev@adacore.com>
3         * exp_attr.adb, inline.adb, sem_attr.adb, sem_elab.adb: Minor
4         reformatting.
6 2016-06-16  Bob Duff  <duff@adacore.com>
8         * sem_util.adb (Collect): Avoid Empty Full_T. Otherwise Etype
9         (Full_T) crashes when assertions are on.
10         * sem_ch12.adb (Matching_Actual): Correctly handle the case where
11         "others => <>" appears in a generic formal package, other than
12         by itself.
14 2016-06-16  Arnaud Charlet  <charlet@adacore.com>
16         * usage.adb: Remove confusing comment in usage line.
17         * bindgen.adb: Fix binder generated file in codepeer mode wrt
18         recent additions.
20 2016-06-16  Javier Miranda  <miranda@adacore.com>
22         * restrict.adb (Check_Restriction_No_Use_Of_Entity): Avoid
23         never-ending loop, code cleanup; adding also support for Text_IO.
24         * sem_ch8.adb (Find_Expanded_Name): Invoke
25         Check_Restriction_No_Use_Entity.
27 2016-06-16  Tristan Gingold  <gingold@adacore.com>
29         * exp_ch9.adb: Minor comment fix.
30         * einfo.ads (Has_Protected): Clarify comment.
31         * sem_ch9.adb (Analyze_Protected_Type_Declaration): Do not
32         consider private protected types declared in the runtime for
33         the No_Local_Protected_Types restriction.
35 2016-06-14  Ed Schonberg  <schonberg@adacore.com>
37         * sem_ch6.adb (Set_Actual_Subtypes): Do not generate actual
38         subtypes for unconstrained formals when analyzing the generated
39         body of an expression function, because it may lead to premature
40         and misplaced freezing of the types of formals.
42 2016-06-14  Gary Dismukes  <dismukes@adacore.com>
44         * sem_elab.adb, sem_ch4.adb: Minor reformatting and typo fix.
46 2016-06-14  Tristan Gingold  <gingold@adacore.com>
48         * einfo.adb (Set_Has_Timing_Event): Add assertion.
49         * sem_util.ads, sem_util.adb (Propagate_Concurrent_Flags): New
50         name for Propagate_Type_Has_Flags.
51         * exp_ch3.adb, sem_ch3.adb, sem_ch7.adb, sem_ch9.adb: Adjust after
52         renaming.
54 2016-06-14  Bob Duff  <duff@adacore.com>
56         * sem_elab.adb (Check_A_Call): Do nothing if the callee is
57         (or is in) an instance, and the caller is outside.  Misc cleanup.
59 2016-06-14  Javier Miranda  <miranda@adacore.com>
61         * sem_ch4.adb (Analyze_Quantified_Expression):
62         Generating C code avoid spurious warning on loop variable of
63         inlinined postconditions.
65 2016-06-14  Javier Miranda  <miranda@adacore.com>
67         * sem_attr.adb (Analyze_Attribute_Old_Result): Adding assertion.
68         (Analyze_Attribute [Attribute_Old]): Generating C handle
69         analysis of 'old in inlined postconditions.
70         (Analyze_Attribute [Attribute_Result]): Generating C handle analysis
71         of 'result in inlined postconditions.
72         * exp_attr.adb (Expand_N_Attribute_Reference [Attribute_Old]):
73         Generating C handle expansion of 'old in inlined postconditions.
74         * inline.adb (Declare_Postconditions_Result): New subprogram.
75         * sem_ch12.adb (Copy_Generic_Node): Copy pragmas generated from
76         aspects when generating C code since pre/post conditions are
77         inlined and the frontend inlining relies on this routine to
78         perform inlining.
79         * exp_ch6.adb (Inlined_Subprogram): Replace Generate_C_Code
80         by Modify_Tree_For_C.
81         * exp_unst.adb (Visit_Node): Searching for up-level references
82         skip entities defined in inlined subprograms.
84 2016-06-14  Hristian Kirtchev  <kirtchev@adacore.com>
86         * sem_ch7.adb, sem_ch12.adb, freeze.adb, lib-xref.ads, exp_ch3.adb:
87         Minor reformatting.
89 2016-06-14  Bob Duff  <duff@adacore.com>
91         * sem_elab.adb: Do nothing if the callee is intrinsic.
92         * sinfo.ads, einfo.ads: Minor comment fixes.
94 2016-06-14  Ed Schonberg  <schonberg@adacore.com>
96         * contracts.adb (Has_Null_Body): Move to sem_util, for general
97         availability.
98         * sem_util.ads, sem_util.adb (Has_Null_Body): Predicate to
99         determine when an internal procedure created for some assertion
100         checking (e.g. type invariant) is a null procedure. Used to
101         eliminate redundant calls to such procedures when they apply to
102         components of composite types.
103         * exp_ch3.adb (Build_Component_Invariant_Call): Do not add call
104         if invariant procedure has a null body.
106 2016-06-14  Thomas Quinot  <quinot@adacore.com>
108         * g-socket.ads (Check_Selector): Clarify effect on IN OUT socket
109         set parameters.
111 2016-06-14  Hristian Kirtchev  <kirtchev@adacore.com>
113         * exp_ch4.adb (Process_Action): Pass the action
114         list to Process_Transient_Object.
115         (Process_If_Case_Statements): Pass the action list to
116         Process_Transient_Object.
117         (Process_Transient_Object): Add new parameter Stmts and update the
118         comment on usage. When the context is a Boolean evaluation, insert
119         any finalization calls after the last statement of the construct.
121 2016-06-14  Tristan Gingold  <gingold@adacore.com>
123         * einfo.adb, einfo.ads (Has_Timing_Event,
124         Set_Has_Timing_Event): Add Has_Timing_Event flag.
125         (Write_Entity_Flags): Display * sem_util.ads, sem_util.adb:
126         (Propagate_Type_Has_Flags): New procedure to factorize code.
127         * exp_ch3.adb (Expand_Freeze_Array_Type,
128         Expand_Freeze_Record_Type): Call Propagate_Type_Has_Flags.
129         * sem_ch3.adb (Access_Type_Decalaration): Initialize
130         Has_Timing_Event flag.  (Analyze_Object_Declaration):
131         Move code that check No_Local_Timing_Events near
132         the code that check No_Local_Protected_Objects.
133         (Analyze_Private_Extension_Declaration, Array_Type_Declaration)
134         (Build_Derived_Type, Copy_Array_Base_Type_Attributes,
135         Process_Full_View) (Record_Type_Definition): Call
136         Propagate_Type_Has_Flags.
137         * sem_ch4.adb (Analyze_Allocator): Check No_Local_Timing_Events.
138         * sem_ch7.adb (New_Private_Type): Set Has_Timing_Event on the
139         Timing_Event type.
140         (Uninstall_Declaration): Call Propagate_Type_Has_Flags.
141         * sem_ch9.adb (Analyze_Protected_Definition): Call
142         Propagate_Type_Has_Flags.
144 2016-06-14  Arnaud Charlet  <charlet@adacore.com>
146         * sem.ads: Minor style fix.
148 2016-06-14  Ed Schonberg  <schonberg@adacore.com>
150         * sem_ch12.adb (Analyze_Associations): An actual parameter
151         with a box must be included in the count of actuals, to detect
152         possible superfluous named actuals that do not match any of the
153         formals of the generic unit in a formal package declaration.
155 2016-06-14  Justin Squirek  <squirek@adacore.com>
157         * sem_ch3.adb (Analyze_Object_Declaration): Fix formatting
158         of error output related to SPARK RM 6.1.7(3) and pragma
159         Extensions_Visible.
160         * sem_ch4.adb (Analyze_Type_Conversion): Fix formatting of error
161         output related to SPARK RM 6.1.7(3) and pragma Extensions_Visible.
162         * sem_prag.adb (Analyze_Pragma): Fix formatting of error output
163         related to SPARK RM 7.1.2(15) and pragma Volatile_Function
164         so that the values True and False are no longer surrounded by
165         double quotes.
166         * sem_res.adb (Resolve_Actuals): Fix formatting of error output
167         related to SPARK RM 6.1.7(3) and pragma Extensions_Visible.
169 2016-06-14  Arnaud Charlet  <charlet@adacore.com>
171         * gnat1drv.adb (Adjust_Global_Switches): Enable access checks
172         in codepeer mode.
173         * freeze.adb: Minor grammar fix in comment.
174 2016-06-14  Hristian Kirtchev  <kirtchev@adacore.com>
176         * lib.adb: Minor reformatting.
177         * sem_util.adb (Is_OK_Volatile_Context): Do
178         include Address in the supported attributes.
180 2016-06-14  Hristian Kirtchev  <kirtchev@adacore.com>
182         * exp_ch4.adb (Expand_N_Case_Expression):
183         Code cleanup. Finalize any transient controlled
184         objects on exit from a case expression alternative.
185         (Expand_N_If_Expression): Code cleanup.
186         (Process_Actions): Removed.
187         (Process_If_Case_Statements): New routine.
188         (Process_Transient_Object): Change the name of formal Rel_Node to
189         N and update all occurrences. Update the comment on usage. When
190         the type of the context is Boolean, the proper insertion point
191         for the finalization call is after the last declaration.
193 2016-06-14  Ed Schonberg  <schonberg@adacore.com>
195         * lib-xref.ads, lib-xref.adb (Has_Deferred_Reference): new
196         predicate to determine whether an entity appears in a context
197         for which a Deferred_Reference was created, because it is not
198         possible to determine when reference is analyzed whether it
199         appears in a context in which the entity is modified.
200         * sem_ch5.adb (Analyze_Statement): Do not emit a useless warning
201         on assignment for an entity that has a deferred_reference.
203 2016-06-14  Javier Miranda  <miranda@adacore.com>
205         * sem_res.adb (Resolve_Actuals): Generate a reference to actuals that
206         come from source. Previously the reference was generated only if the
207         call comes from source but the call may be rewritten by the expander
208         thus causing the notification of spurious warnings.
210 2016-06-14  Arnaud Charlet  <charlet@adacore.com>
212         * gnat1drv.adb: Remove further references to AAMP.
213         * checks.adb (Apply_Scalar_Range_Check): Take
214         Check_Float_Overflow info account.
215         * live.ads, live.adb Added subprogram headers and
216         start-of-processing-for comments.
217         * sem_ch12.adb (Instantiate_Package_Body): Do not suppress
218         checks when instantiating runtime units in CodePeer mode.
220 2016-06-14  Arnaud Charlet  <charlet@adacore.com>
222         * exp_ch3.adb (Expand_N_Object_Declaration): Only consider
223         nodes from sources.
225 2016-06-14  Arnaud Charlet  <charlet@adacore.com>
227         * switch-c.adb, gnat1drv.adb (Adjust_Global_Switches): Only disable
228         simple value propagation in CodePeer mode when warnings are disabled.
229         (Scan_Front_End_Switches): Enable relevant front-end switches
230         when using -gnateC.
232 2016-06-14  Hristian Kirtchev  <kirtchev@adacore.com>
234         * sem_util.adb (Is_OK_Volatile_Context): A
235         reference to a volatile object is considered OK if appears as
236         the prefix of attributes Address, Alignment, Component_Size,
237         First_Bit, Last_Bit, Position, Size, Storage_Size.
239 2016-06-14  Yannick Moy  <moy@adacore.com>
241         * lib-xref-spark_specific.adb (Add_SPARK_File): Do not traverse
242         subunits directly, as they are already traversed as part of the
243         top-level unit to which they belong.
244         (Add_SPARK_Xrefs): Add assertions to ensure correct sorting.
245         (Generate_Dereference): Use unique definition place for special
246         variable __HEAP, to ensure correct sorting of references.
247         * lib-xref.adb (Generate_Reference): Use top-level unit in case
248         of subunits.
249         * lib.adb, lib.ads (Get_Top_Level_Code_Unit): New functions that
250         compute the top-level code unit for a source location of AST node,
251         that go past subunits.
253 2016-06-13  Eric Botcazou  <ebotcazou@adacore.com>
255         * gcc-interface/decl.c (gnat_to_gnu_subprog_type): Build only a minimal
256         PARM_DECL when the parameter type is dummy.
257         * gcc-interface/trans.c (Call_to_gnu): Translate formal types before
258         formal objects.
260 2016-06-13  Eric Botcazou  <ebotcazou@adacore.com>
262         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Deal with
263         PLUS_EXPR in the expression of a renaming.
265 2016-06-13  Eric Botcazou  <ebotcazou@adacore.com>
267         * gcc-interface/utils2.c (known_alignment) <CALL_EXPR>: Deal specially
268         with calls to malloc.
270 2016-06-11  Eric Botcazou  <ebotcazou@adacore.com>
272         * gcc-interface/trans.c (build_binary_op_trapv): If no operand is a
273         constant, use the generic implementation of the middle-end; otherwise
274         turn the dynamic conditions into static conditions and simplify.
276 2016-06-11  Eric Botcazou  <ebotcazou@adacore.com>
278         * gcc-interface/trans.c (Case_Statement_to_gnu): Deal with characters.
280 2016-06-11  Pierre-Marie de Rodat  <derodat@adacore.com>
282         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not clobber
283         gnat_entity_name with temporary names for XUP and XUT types.
285 2016-06-10  Martin Sebor  <msebor@redhat.com>
287         PR c/71392
288         * gcc/ada/gcc-interface/utils.c (handle_nonnull_attribute): Accept
289         the nonnull attribute in type-generic builtins.
291 2016-06-06  Eric Botcazou  <ebotcazou@adacore.com>
293         * gcc-interface/decl.c (Gigi_Equivalent_Type): Make sure equivalent
294         types are present before returning them.  Remove final assertion.
295         (gnat_to_gnu_entity) <E_Access_Protected_Subprogram_Type>: Adjust to
296         above change.
297         <E_Protected_Type>: Likewise.
299 2016-06-06  Eric Botcazou  <ebotcazou@adacore.com>
301         * gcc-interface/trans.c (elaborate_all_entities_for_package): Also do
302         not elaborate Itypes.
304 2016-06-06  Eric Botcazou  <ebotcazou@adacore.com>
306         * gcc-interface/utils.c (gnat_internal_attribute_table): Add support
307         for noinline and noclone attributes.
308         (handle_noinline_attribute): New handler.
309         (handle_noclone_attribute): Likewise.
311 2016-06-06  Eric Botcazou  <ebotcazou@adacore.com>
313         * gcc-interface/trans.c (process_type): Beef up comment.
315 2016-06-06  Eric Botcazou  <ebotcazou@adacore.com>
317         * gcc-interface/utils2.c (build_call_alloc_dealloc): Do not substitute
318         placeholder expressions here but...
319         * gcc-interface/trans.c (gnat_to_gnu) <N_Free_Statement>: ...here.
320         Make an exception to the protection of a CALL_EXPR result with an
321         unconstrained type only in the same cases as Call_to_gnu.
323 2016-06-06  Eric Botcazou  <ebotcazou@adacore.com>
325         * gcc-interface/trans.c (gnat_to_gnu): Rework special code dealing
326         with boolean rvalues and set the location directly.  Do not set the
327         location in the other cases for a simple name.
328         (gnat_to_gnu_external): Clear the location on the expression.
330 2016-06-06  Eric Botcazou  <ebotcazou@adacore.com>
332         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Component>: Remove
333         useless 'else' statements and tidy up.
334         <E_Array_Subtype>: Fully deal with the declaration here.
335         <E_Incomplete_Type>: Use properly-typed constant.
336         Assert that we don't apply the special type treatment to dummy types.
337         Separate this treatment from the final back-annotation and simplify
338         the condition for the RM size.
339         (gnat_to_gnu_param): Add GNU_PARAM_TYPE parameter and adjust.
340         (gnat_to_gnu_subprog_type): Ajust call to gnat_to_gnu_param.
341         * gcc-interface/trans.c (gnat_to_gnu) <N_Subprogram_Declaration>: Add
342         comment.
343         (process_freeze_entity): Remove obsolete code.
344         (process_type): Minor tweaks.
346 2016-06-06  Eric Botcazou  <ebotcazou@adacore.com>
348         * einfo.ads (Returns_Limited_View): Remove.
349         (Set_Returns_Limited_View ): Likewise.
350         * einfo.adb (Returns_Limited_View): Likewise.
351         (Set_Returns_Limited_View ): Likewise.
352         * freeze.adb (Late_Freeze_Subprogram): Remove.
353         (Freeze_Entity): Do not defer the freezing of functions returning an
354         incomplete type coming from a limited context.
356 2016-06-06  Eric Botcazou  <ebotcazou@adacore.com>
358         * gcc-interface/gigi.h (finish_subprog_decl): Add ASM_NAME parameter.
359         * gcc-interface/decl.c (gnu_ext_name_for_subprog): New function.
360         (gnat_to_gnu_entity) <E_Subprogram_Type>: Do not check compatibility
361         of profiles for builtins here...  Call gnu_ext_name_for_subprog.
362         Also update profiles if pointers to limited_with'ed types are
363         updated.
364         (gnat_to_gnu_param): Restore the correct source location information
365         for vector ABI warnings.
366         (associate_subprog_with_dummy_type): Add comment about AI05-019.
367         Set TYPE_DUMMY_IN_PROFILE_P flag unconditionally.
368         (update_profile): Deal with builtin declarations.
369         Call gnu_ext_name_for_subprog.  Adjust call to finish_subprog_decl.
370         (update_profiles_with): Add comment.
371         (gnat_to_gnu_subprog_type): Reuse the return type if it is complete.
372         Likewise for parameter declarations in most cases.  Do not change
373         the return type for the CICO mechanism if the profile is incomplete.
374         ...but here instead.  Always reset the slot for the parameters.
375         * gcc-interface/utils.c (create_subprog_decl): Call
376         gnu_ext_name_for_subprog.  Do not set the assembler name here but...
377         (finish_subprog_decl): ...but here instead.  Add ASM_NAME parameter.
379 2016-06-06  Eric Botcazou  <ebotcazou@adacore.com>
381         * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Insert the
382         declaration of the corresponding record type before that of the
383         unprotected version of the subprograms that operate on it.
384         (Expand_Access_Protected_Subprogram_Type): Declare the Equivalent_Type
385         just before the original type.
386         * sem_ch3.adb (Handle_Late_Controlled_Primitive): Point the current
387         declaration to the newly created declaration for the primitive.
388         (Analyze_Subtype_Declaration): Remove obsolete code forcing the
389         freezing of the subtype before its declaration.
390         (Replace_Anonymous_Access_To_Protected_Subprogram): Insert the new
391         declaration in the nearest enclosing scope for formal parameters too.
392         (Build_Derived_Access_Type): Restore the status of the created Itype
393         after it is erased by Copy_Node.
394         * sem_ch6.adb (Exchange_Limited_Views): Remove guard on entry.
395         (Analyze_Subprogram_Body_Helper): Call Exchange_Limited_Views only if
396         the specification is present.
397         Move around the code changing the designated view of the return type
398         and save the original view.  Restore it on exit.
399         * sem_ch13.adb (Build_Predicate_Function_Declaration): Always insert
400         the declaration right after that of the type.
402 2016-06-01  Simon Wright  <simon@pushface.org>
404         PR ada/71358
405         * g-comlin.adb (Display_Section_Help): Do not dereference
406         Config.Switches if it's null.
407         (Getopt): Likewise.
409 2016-05-31  Eric Botcazou  <ebotcazou@adacore.com>
411         * s-osinte-kfreebsd-gnu.ads (clock_getres): Define.
412         (Get_Page_Size): Remove duplicate and return int.
414 2016-05-31  Jan Sommer  <soja-lists@aries.uberspace.de>
416         PR ada/71317
417         * s-osinte-rtems.ads (clock_getres): Define.
418         (Get_Page_Size): Remove duplicate and return int.
420 2016-05-20  Eric Botcazou  <ebotcazou@adacore.com>
422         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Signed_Integer_Subtype>:
423         Make same-sized subtypes of signed base types signed.
424         * gcc-interface/utils.c (make_type_from_size): Adjust to above change.
425         (unchecked_convert): Likewise.
427 2016-05-16  Eric Botcazou  <ebotcazou@adacore.com>
429         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Do not build
430         a specific type for the object if it is deemed a constant.
432 2016-05-16  Eric Botcazou  <ebotcazou@adacore.com>
434         * freeze.adb (Freeze_Record_Type): Extend pragma Implicit_Packing to
435         components of any elementary types and of composite types.
437 2016-05-16  Eric Botcazou  <ebotcazou@adacore.com>
439         * freeze.adb (Freeze_Array_Type): Call Addressable predicate instead
440         of testing for individual sizes.
441         (Freeze_Entity): Rework implementation of pragma Implicit_Packing for
442         array types, in particular test for suitable sizes upfront and do not
443         mimic the processing that will be redone later in Freeze_Array_Type.
445 2016-05-16  Eric Botcazou  <ebotcazou@adacore.com>
447         * gcc-interface/trans.c (elaborate_all_entities_for_package): Also skip
448         formal objects.
450 2016-05-16  Eric Botcazou  <ebotcazou@adacore.com>
452         * doc/gnat_rm/implementation_defined_attributes.rst
453         (Scalar_Storage_Order): Adjust restriction for packed array types.
454         * einfo.ads (Is_Bit_Packed_Array): Adjust description.
455         (Is_Packed): Likewise.
456         (Is_Packed_Array_Impl_Type): Likewise.
457         (Packed_Array_Impl_Type): Likewise.
458         * exp_ch4.adb (Expand_N_Indexed_Component): Do not do anything special
459         if the prefix is not a packed array implemented specially.
460         * exp_ch6.adb (Expand_Actuals): Expand indexed components only for
461         bit-packed array types.
462         * exp_pakd.adb (Install_PAT): Set Is_Packed_Array_Impl_Type flag on
463         the PAT before analyzing its declaration.
464         (Create_Packed_Array_Impl_Type): Remove redundant statements.
465         * freeze.adb (Check_Component_Storage_Order): Reject packed array
466         components only if they are bit packed.
467         (Freeze_Array_Type): Fix logic detecting bit packing and do not bit
468         pack for composite types whose size is multiple of a byte.
469         Create the implementation type for packed array types only when it is
470         needed, i.e. bit packing or packing because of holes in index types.
471         Make sure the Has_Non_Standard_Rep and Is_Packed flags agree.
472         * gcc-interface/gigi.h (make_packable_type): Add MAX_ALIGN parameter.
473         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Signed_Integer_Subtype>:
474         Call maybe_pad_type instead of building the padding type manually.
475         (gnat_to_gnu_entity) <E_Array_Subtype>: Do not assert that
476         Packed_Array_Impl_Type is present for packed arrays.
477         (gnat_to_gnu_component_type): Also handle known alignment for packed
478         types by passing it to make_packable_type.
479         * gcc-interface/utils.c (make_packable_type): Add MAX_ALIGN parameter
480         and deal with it in the array case.  Adjust recursive call.  Simplify
481         computation of new size and cap the alignment to BIGGEST_ALIGNMENT.
483 2016-05-16  Thomas Quinot  <quinot@adacore.com>
485         * freeze.adb (Check_Component_Storage_Order): Also get full view of
486         enclosing type.
488 2016-05-16  Eric Botcazou  <ebotcazou@adacore.com>
490         * exp_util.adb (Remove_Side_Effects): Also make a constant if we need
491         to capture the value for a small not by-reference record type.
492         * freeze.ads (Check_Compile_Time_Size): Adjust comment.
493         * freeze.adb (Set_Small_Size): Likewise.  Accept a size in the range
494         of 33 .. 64 bits.
495         (Check_Compile_Time_Size): Merge scalar and access type cases. Change
496         variable name in array type case.  For the computation of the packed
497         size, deal with record components and remove redundant test.
498         (Freeze_Array_Type): Also adjust packing status when the size of the
499         component type is in the range 33 .. 64 bits.
500         * doc/gnat_rm/representation_clauses_and_pragmas.rst: Turn primitive
501         into elementary type throughout.  Minor tweaks.
502         (Alignment Clauses): Document actual alignment of packed array types.
503         (Pragma Pack for Arrays): List only the 3 main cases and adjust.  Add
504         "simple" to the record case.  Document effect on non packable types.
505         (Pragma Pack for Records): Likewise.  Add record case and adjust.
507 2016-05-16  Eric Botcazou  <ebotcazou@adacore.com>
509         * gcc-interface/Make-lang.in (GNATMAKE_FOR_HOST): In the canadian
510         cross case, use host_noncanonical instead of host as prefix.
511         (GNATBIND_FOR_HOST): Likewise.
512         (GNATLINK_FOR_HOST): Likewise.
513         (GNATLS_FOR_HOST): Likewise.
515 2016-05-06  Eric Botcazou  <ebotcazou@adacore.com>
517         PR ada/70969
518         * system-darwin-ppc64.ads: Add pragma No_Elaboration_Code_All.
519         * system-linux-armeb.ads: Likewise.
520         * system-linux-mips64el.ads: Likewise.
521         * system-linux-mips.ads: Likewise.
522         * system-linux-mipsel.ads: Likewise.
523         * system-linux-ppc64.ads: Likewise.
524         * system-linux-sparcv9.ads: Likewise.
525         * system-rtems.ads: Likewise.
527 2016-05-04  Samuel Thibault  <samuel.thibault@ens-lyon.org>
529         * s-osinte-gnu.ads (Get_Page_Size): Return int and use getpagesize
530         instead of __getpagesize.
532 2016-05-02  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
534         * gcc-interface/Makefile.in (install-gcc-specs): Use foreach.
535         Honor DESTDIR.
537 2016-05-02  Tristan Gingold  <gingold@adacore.com>
539         * fname.adb (Is_Predefined_File_Name): Also consider non-krunched
540         i-* names.
542 2016-05-02  Ed Schonberg  <schonberg@adacore.com>
544         * sem_util.adb (Aggregate_Constraint_Checks): Separate
545         accessibility checks and non-null checks for aggregate components,
546         to prevent spurious accessibility errors.
548 2016-05-02  Ed Schonberg  <schonberg@adacore.com>
550         * sem_ch3.adb (OK_For_Limited_Init): A type conversion is not
551         always legal in the in-place initialization of a limited entity
552         (e.g. an allocator).
553         * sem_res.adb (Resolve_Allocator): Improve error message with RM
554         reference  when allocator expression is illegal.
556 2016-05-02  Ed Schonberg  <schonberg@adacore.com>
558         * exp_ch6.adb (Expand_Call): When inlining a call to a function
559         declared in a package instance, locate the instance node of the
560         package after the actual package declaration. skipping over
561         pragmas that may have been introduced when the generic unit
562         carries aspects that are transformed into pragmas.
564 2016-05-02  Bob Duff  <duff@adacore.com>
566         * s-memory.adb (Alloc, Realloc): Move checks
567         for Size = 0 or size_t'Last into the Result = System.Null_Address
568         path for efficiency. Improve comments (based on actual C language
569         requirements for malloc).
570         * exp_util.adb (Build_Allocate_Deallocate_Proc): Optimize the
571         case where we are using the default Global_Pool_Object, and we
572         don't need the heavy finalization machinery.
574 2016-05-02  Gary Dismukes  <dismukes@adacore.com>
576         * exp_util.ads, sem_ch12.adb: Minor reformatting.
578 2016-05-02  Javier Miranda  <miranda@adacore.com>
580         * exp_util.ads, exp_util.adb (Force_Evaluation): Adding new formal.
581         (Remove_Side_Effects): Adding a new formal.
582         * exp_ch6.adb (Expand_Simple_Function_Return): Generating the
583         call to the _Postconditions procedure ensure that side-effects
584         are unconditionally removed.
586 2016-05-02  Ed Schonberg  <schonberg@adacore.com>
588         * sem_ch12.adb (Check_Formal_Package_Instance, Check_Mismatch):
589         Use original node to determine whether the declaration is for
590         a formal type declaration, to take into account that formwl
591         private types are rewritten as private extension declarations
592         to simplify semantic analysis.
594 2016-05-02  Gary Dismukes  <dismukes@adacore.com>
596         * exp_ch9.adb, sem_ch6.adb, sem_ch6.ads: Minor reformatting and typo
597         fixes.
599 2016-05-02  Hristian Kirtchev  <kirtchev@adacore.com>
601         * sem_ch3.adb, exp_ch9.adb, einfo.adb, sem_ch4.adb, sem_ch6.adb: Minor
602         reformatting.
604 2016-05-02  Ed Schonberg  <schonberg@adacore.com>
606         * exp_ch4.adb (Expand_N_Allocator): If the designated type
607         is a private derived type with no discriminants, examine its
608         underlying_full_view to determine whether the full view has
609         defaulted discriminants, so their defaults can be used in the
610         call to the initialization procedure for the designated object.
612 2016-05-02  Hristian Kirtchev  <kirtchev@adacore.com>
614         * exp_prag.adb, comperr.adb: Minor reformatting.
616 2016-05-02  Ed Schonberg  <schonberg@adacore.com>
618         * exp_pakd.adb (Rj_Unchecked_Convert_To): Do not perform an
619         unchecked conversion if the source size is 0 (indicating that
620         its RM size is unknown). This will happen with packed arrays of
621         non-discrete types, in which case the component type is known
622         to match.
624 2016-05-02  Arnaud Charlet  <charlet@adacore.com>
626         * debug.adb: Reserve -gnatd.V.
628 2016-05-02  Javier Miranda  <miranda@adacore.com>
630         * sem_ch3.adb (Process_Full_View): Remove from visibility
631         wrappers of synchronized types to avoid spurious errors with
632         their wrapped entity.
633         * exp_ch9.adb (Build_Wrapper_Spec): Do not generate the wrapper
634         if no interface primitive is covered by the subprogram and this is
635         not a primitive declared between two views; see Process_Full_View.
636         (Build_Protected_Sub_Specification): Link the dispatching
637         subprogram with its original non-dispatching protected subprogram
638         since their names differ.
639         (Expand_N_Protected_Type_Declaration):
640         If a protected subprogram overrides an interface primitive then
641         do not build a wrapper if it was already built.
642         * einfo.ads, einfo.adb (Original_Protected_Subprogram): New attribute.
643         * sem_ch4.adb (Names_Match): New subprogram.
644         * sem_ch6.adb (Check_Synchronized_Overriding): Moved
645         to library level and defined in the public part of the
646         package to invoke it from Exp_Ch9.Build_Wrapper_Spec
647         (Has_Matching_Entry_Or_Subprogram): New subprogram.
648         (Report_Conflict): New subprogram.
650 2016-05-02  Jerome Lambourg  <lambourg@adacore.com>
652         * s-unstyp.ads: Code cleanups.
654 2016-05-02  Hristian Kirtchev  <kirtchev@adacore.com>
656         * sem_ch13.adb (Size_Too_Small_Error): Fix the error message format.
658 2016-05-02  Ed Schonberg  <schonberg@adacore.com>
660         * exp_prag.adb (Expand_attributes_In_Consequence,
661         Expand_Attributes): If the prefix of'Old is an unconstrained type,
662         for example an unconstrained formal of the enclosing subprogram,
663         create an object declaration with an expression to obtain the
664         actual subtype of the temporary.
666 2016-05-02  Arnaud Charlet  <charlet@adacore.com>
668         * comperr.adb (Delete_SCIL_Files): Add missing handling of
669         N_Subprogram_Declaration.
671 2016-05-02  Gary Dismukes  <dismukes@adacore.com>
673         * exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, checks.adb, sem_attr.adb,
674         gnat1drv.adb, sem_ch4.adb, sem_ch13.adb: Minor reformatting and typo
675         fixes.
676         * sem_prag.adb, sem_ch12.adb: Minor typo fixes.
678 2016-05-02  Ed Schonberg  <schonberg@adacore.com>
680         * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): The
681         function call may be wrapped in an explicit type conversion.
683 2016-05-02  Jerome Lambourg  <lambourg@adacore.com>
685         * interfac.ads: use pragma No_Elaboration_Code_All.
686         * s-unstyp.ads: s-unstyp.ads: use pragma No_Elaboration_Code_All.
688 2016-05-02  Ed Schonberg  <schonberg@adacore.com>
690         * sem.adb (Analyze: If node is an error node previously created
691         by the parser, disable expansion to prevent subsequent glitches
692         in error recovery.
694 2016-05-02  Hristian Kirtchev  <kirtchev@adacore.com>
696         * sem_ch13.adb (Alignment_Error): Removed.
697         (Get_Alignment_Value): Code cleanup.
699 2016-05-02  Tristan Gingold  <gingold@adacore.com>
701         * sem_ch3.adb (Analyze_Object_Declaration): Use Has_Protected
702         to check for the no local protected objects restriction.
704 2016-05-02  Hristian Kirtchev  <kirtchev@adacore.com>
706         * einfo.adb Anonymous_Master now uses Node35.
707         (Anonymous_Master): Update the assertion and node reference.
708         (Set_Anonymous_Master): Update the assertion and node reference.
709         (Write_Field35_Name): Add output for Anonymous_Master.
710         (Write_Field36_Name): The output is now undefined.
711         * einfo.ads Update the node and description of attribute
712         Anonymous_Master. Remove prior occurrences in entities as this
713         is now a type attribute.
714         * exp_ch3.adb (Expand_Freeze_Array_Type): Remove local variable
715         Ins_Node. Anonymous access- to-controlled component types no
716         longer need finalization masters. The master is now built when
717         a related allocator is expanded.
718         (Expand_Freeze_Record_Type): Remove local variable Has_AACC. Do not
719         detect whether the record type has at least one component of anonymous
720         access-to- controlled type. These types no longer need finalization
721         masters. The master is now built when a related allocator is expanded.
722         * exp_ch4.adb Remove with and use clauses for Lib and Sem_Ch8.
723         (Current_Anonymous_Master): Removed.
724         (Expand_N_Allocator): Call Build_Anonymous_Master to create a
725         finalization master for an anonymous access-to-controlled type.
726         * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
727         Call routine Build_Anonymous_Master to create a finalization master
728         for an anonymous access-to-controlled type.
729         * exp_ch7.adb (Allows_Finalization_Master): New routine.
730         (Build_Anonymous_Master): New routine.
731         (Build_Finalization_Master): Remove formal parameter
732         For_Anonymous. Use Allows_Finalization_Master to determine whether
733         circumstances warrant a finalization master. This routine no
734         longer creates masters for anonymous access-to-controlled types.
735         (In_Deallocation_Instance): Removed.
736         * exp_ch7.ads (Build_Anonymous_Master): New routine.
737         (Build_Finalization_Master): Remove formal parameter For_Anonymous
738         and update the comment on usage.
739         * sem_util.adb (Get_Qualified_Name): New routines.
740         (Output_Name): Reimplemented.
741         (Output_Scope): Removed.
742         * sem_util.ads (Get_Qualified_Name): New routines.
744 2016-05-02  Hristian Kirtchev  <kirtchev@adacore.com>
746         * debug.adb: Document the use of switch -gnatd.H.
747         * gnat1drv.adb (Adjust_Global_Switches): Set ASIS_GNSA mode when
748         -gnatd.H is present.
749         (Gnat1drv): Suppress the call to gigi when ASIS_GNSA mode is active.
750         * opt.ads: Add new option ASIS_GNSA_Mode.
751         * sem_ch13.adb (Alignment_Error): New routine.
752         (Analyze_Attribute_Definition_Clause): Suppress certain errors in
753         ASIS mode for attribute clause Alignment, Machine_Radix, Size, and
754         Stream_Size.
755         (Check_Size): Use routine Size_Too_Small_Error to
756         suppress certain errors in ASIS mode.
757         (Get_Alignment_Value): Use routine Alignment_Error to suppress certain
758         errors in ASIS mode.
759         (Size_Too_Small_Error): New routine.
761 2016-05-02  Arnaud Charlet  <charlet@adacore.com>
763         * spark_xrefs.ads Description of the spark cross-references
764         clarified; small style fixes.
765         * lib-xref-spark_specific.adb (Add_SPARK_Scope,
766         Detect_And_Add_SPARK_Scope): consider protected types and bodies
767         as yet another scopes.
768         (Enclosing_Subprogram_Or_Library_Package): refactored using
769         Hristian's suggestions; added support for scopes of protected
770         types and bodies; fix for entries to return the scope of the
771         enclosing concurrent type, which is consistent with what is
772         returned for protected subprograms.
773         * sem_intr.adb: Minor style fix in comment.
775 2016-05-02  Hristian Kirtchev  <kirtchev@adacore.com>
777         * lib-xref.ads, lib-xref-spark_specific.adb, get_spark_xrefs.adb,
778         put_spark_xrefs.adb: Minor reformatting.
780 2016-05-02  Doug Rupp  <rupp@adacore.com>
782         * g-traceb.ads: Document traceback for ARM.
784 2016-05-02  Javier Miranda  <miranda@adacore.com>
786         * exp_disp.adb (Make_Tags): Do not generate the
787         external name of interface tags adding the suffix counter since
788         it causes problems at link time when the IP routines are inlined
789         across units with optimization.
791 2016-05-02  Ed Schonberg  <schonberg@adacore.com>
793         * einfo.ads, einfo.adb (Predicates_Ignared): new flag to indicate
794         that predicate checking is disabled for predicated subtypes in
795         the context of an Assertion_Policy pragma.
796         * checks.adb (Apply_Predicate_Check): Do nothing if
797         Predicates_Ignored is true.
798         * exp_ch3.adb (Expand_Freeze_Enumeration_Type): If
799         Predicates_Ignores is true, the function Rep_To_Pos does raise
800         an exception for invalid data.
801         * exp_ch4.adb (Expand_N_Type_Conversion): IF target is a predicated
802         type do not apply check if Predicates_Ignored is true.
803         * exp_ch5.adb (Expand_N_Case_Statement): If Predicates_Ignored
804         is true, sem_prag.adb:
805         * sem_ch3.adb (Analyze_Object_Declaration): If Predicates_Ignored
806         is true do not emit predicate check on initializing expression.
808 2016-05-02  Arnaud Charlet  <charlet@adacore.com>
810         * get_spark_xrefs.adb (Get_Nat, Get_Name): Initialize variables when
811         they are declared; refine type of a counter from Integer to Natural.
812         * sem_ch5.adb, gnatcmd.adb, s-intman-posix.adb, eval_fat.adb,
813         prj.adb, sem_util.adb, s-intman-android.adb, prj-nmsc.adb, sem_ch8.adb,
814         exp_ch3.adb: Minor editing.
816 2016-05-02  Yannick Moy  <moy@adacore.com>
818         * a-tigeli.adb (Get_Line): Always set Last prior to returning.
820 2016-05-02  Yannick Moy  <moy@adacore.com>
822         * lib-xref.adb: Minor style fix in whitespace of declarations.
823         * put_spark_xrefs.adb (Put_SPARK_Xrefs): printing of strings
824         refactored without loops.
825         * put_spark_xrefs.ads (Write_Info_Str): new formal argument of
826         generic procedure.
827         * spark_xrefs.adb (Write_Info_Str): new actual in instantiation
828         of generic procedure.
830 2016-05-02  Arnaud Charlet  <charlet@adacore.com>
832         * lib-xref-spark_specific.adb (Add_SPARK_Scope): add task type scope.
833         (Detect_And_Add_SPARK_Scope): detect and add task type scope.
834         (Enclosing_Subprogram_Or_Package): Respect boundaries of task
835         and entry declarations.
836         * spark_xrefs.ads: minor typo in comment.
838 2016-05-02  Arnaud Charlet  <charlet@adacore.com>
840         * make.adb: Minor: avoid an exception when calling gnatmake with
841         no argument and gnatmake is built with checks on.
842         * lib-xref-spark_specific.adb: Minor code cleanup.
844 2016-05-02  Ed Schonberg  <schonberg@adacore.com>
846         * sem_util.adb (Normalize_Actuals): Take into account extra
847         actuals that may have been introduced previously. Normally extra
848         actuals are introduced when a call is expanded, but a validity
849         check may copy and reanalyze a call that carries an extra actual
850         (e.g. an accessibility parameter) before the call itself is
851         marked Analzyed, and the analysis of the copy has to be able to
852         cope with the added actual.
854 2016-05-02  Bob Duff  <duff@adacore.com>
856         * sem_ch10.adb (Analyze_Compilation_Unit): Preserve
857         treeishness. Previous version had Context_Items shared between
858         the spec and body.
860 2016-05-02  Ed Schonberg  <schonberg@adacore.com>
862         * sem_aggr.adb (Resolve_Aggr_Expression): For both array and
863         record cases, apply predicate check on component for expression
864         only if expression has been analyzed already. For expressions
865         that need to be duplicated when they cover multiple components,
866         resolution and predicate checking take place later.
868 2016-05-02  Olivier Hainque  <hainque@adacore.com>
870         * a-direct.adb (Delete_Tree): Use full names to designate subdirs
871         and files therein, instead of local names after a change of
872         current directory.
874 2016-05-02  Thomas Quinot  <quinot@adacore.com>
876         * freeze.adb (Check_Component_Storage_Order): Get full view of
877         component type.
879 2016-05-02  Hristian Kirtchev  <kirtchev@adacore.com>
881         * checks.adb, freeze.adb, sem_res.adb, s-stposu.adb, repinfo.adb:
882         Minor reformatting.
884 2016-05-02  Hristian Kirtchev  <kirtchev@adacore.com>
886         * sem_ch4.adb (Find_Indexing_Operations): Use the underlying type
887         of the container base type in case the container is a subtype.
888         * sem_ch5.adb (Analyze_Iterator_Specification): Ensure that
889         the selector has an entity when checking for a component of a
890         mutable object.
892 2016-05-02  Arnaud Charlet  <charlet@adacore.com>
894         Remove dead code.
895         * opt.ads (Latest_Ada_Only): New flag.
896         * sem_prag.adb, par-prag.adb: Ignore pragma Ada_xx under this flag.
897         * usage.adb, switch-c.adb: Disable support for -gnatxx under this flag.
898         * einfo.ads (Has_Predicates, Predicate_Function):
899         Clarify that Has_Predicates does not imply that Predicate_Function
900         will return a non-empty entity.
902 2016-05-02  Ed Schonberg  <schonberg@adacore.com>
904         * sem_res.adb (Resolve_Qualified_Expression): Generate a predicate
905         check if type requires it.
906         * checks.adb (Apply_Predicate_Check): Disable checks in the
907         object declaration created for an expression with side-effects
908         that requires a predicate check to prevent infinite recursion
909         during expansion.
911 2016-05-02  Ed Schonberg  <schonberg@adacore.com>
913         * sem_ch6.adb (Process_Formals): Check properly the type of a
914         formal to determine whether a given convention applies to it.
916 2016-05-02  Doug Rupp  <rupp@adacore.com>
918         * tracebak.c: Add incantations for arm-vxworks[67] traceback.
920 2016-05-02  Thomas Quinot  <quinot@adacore.com>
922         * freeze.adb (Check_Component_Storage_Order): Make it a warning, not an
923         error, to have a component with implicit SSO within a composite type
924         that has explicit SSO.
926 2016-05-02  Bob Duff  <duff@adacore.com>
928         * s-stposu.adb (Allocate_Any_Controlled): Don't lock/unlock twice.
930 2016-05-02  Ed Schonberg  <schonberg@adacore.com>
932         * repinfo.adb (List_Entities): Make procedure recursive, to
933         provide representation information for subprograms declared
934         within subprogram bodies.
936 2016-05-02  Arnaud Charlet  <charlet@adacore.com>
938         * exp_ch5.adb, layout.adb, gnatcmd.adb exp_attr.adb, make.adb,
939         bindgen.adb, debug.adb, exp_pakd.adb, freeze.adb, sem_util.adb,
940         gnatlink.adb, switch-m.adb, exp_ch4.adb, repinfo.adb, adabkend.adb,
941         osint.adb: Remove dead code.
943 2016-05-02  Yannick Moy  <moy@adacore.com>
945         * a-tigeli.adb (Get_Line): Fix bound for test to
946         decide when to compensate for character 0 added by call to fgets.
948 2016-05-02  Ed Schonberg  <schonberg@adacore.com>
950         * sem_ch4.adb (Analyze_Allocator): If the expression does not
951         have a subtype indication and the type is an unconstrained tagged
952         type with defaulted discriminants, create an explicit constraint
953         for it during analysis to prevent out-of-order freezing actions
954         on generated classwide types.
956 2016-05-02  Javier Miranda  <miranda@adacore.com>
958         * exp_ch5.adb (Expand_N_Assignment_Statement):
959         In the runtime check that ensures that the tags of source an
960         target match, add missing displacement of the pointer to the
961         objects if they cover interface types.
963 2016-05-02  Ed Schonberg  <schonberg@adacore.com>
965         * sem_attr.adb (Analyze_Attribute, case 'Old): Do not use
966         base type for attribute when type is discrete: transformation
967         is not needed for such types, and leads to spurious errors if
968         the context is a case construct.
970 2016-05-02  Eric Botcazou  <ebotcazou@adacore.com>
972         * gcc-interface/decl.c (elaborate_reference_1): Do not bother about
973         operand #2 for COMPONENT_REF.
974         * gcc-interface/utils2.c (gnat_save_expr): Likewise.
975         (gnat_protect_expr): Likewise.
976         (gnat_stabilize_reference_1): Likewise.
977         (gnat_rewrite_reference): Do not bother about operand #3 for ARRAY_REF.
978         (get_inner_constant_reference): Likewise.
979         (gnat_invariant_expr): Likewise.
980         * gcc-interface/trans.c (fold_constant_decl_in_expr): Likewise.
982 2016-05-02  Eric Botcazou  <ebotcazou@adacore.com>
984         * gcc-interface/trans.c (Range_to_gnu): New static function.
985         (Raise_Error_to_gnu) <N_In>: Call it to translate the range.
986         (gnat_to_gnu) <N_In>: Likewise.
988 2016-04-30  Eric Botcazou  <ebotcazou@adacore.com>
990         * gcc-interface/Make-lang.in (ACATSCMD): New variable.
991         (check-acats): Use it.
992         (check_acats_targets): Likewise.
994 2016-04-28  Eric Botcazou  <ebotcazou@adacore.com>
996         PR ada/70786
997         * a-textio.adb (Get_Immediate): Add missing 'not' in expression.
999 2016-04-27  Eric Botcazou  <ebotcazou@adacore.com>
1001         * sem_aux.adb (Is_By_Reference_Type): Also return true for a tagged
1002         incomplete type without full view.
1003         * sem_ch6.adb (Exchange_Limited_Views): Change into a function and
1004         return the list of changes.
1005         (Restore_Limited_Views): New procedure to undo the transformation made
1006         by Exchange_Limited_Views.
1007         (Analyze_Subprogram_Body_Helper): Adjust call to Exchange_Limited_Views
1008         and call Restore_Limited_Views at the end, if need be.
1009         (Possible_Freeze): Do not delay freezing because of incomplete types.
1010         (Process_Formals): Remove kludges for class-wide types.
1011         * types.h (By_Copy_Return): Delete.
1012         * gcc-interface/ada-tree.h (TYPE_MAX_ALIGN): Move around.
1013         (TYPE_DUMMY_IN_PROFILE_P): New macro.
1014         * gcc-interface/gigi.h (update_profiles_with): Declare.
1015         (finish_subprog_decl): Likewise.
1016         (get_minimal_subprog_decl): Delete.
1017         (create_subprog_type): Likewise.
1018         (create_param_decl): Adjust prototype.
1019         (create_subprog_decl): Likewise.
1020         * gcc-interface/decl.c (defer_limited_with): Rename into...
1021         (defer_limited_with_list): ...this.
1022         (gnat_to_gnu_entity): Adjust to above renaming.
1023         (finalize_from_limited_with): Likewise.
1024         (tree_entity_vec_map): New structure.
1025         (gt_pch_nx): New helpers.
1026         (dummy_to_subprog_map): New hash table.
1027         (gnat_to_gnu_param): Set the SLOC here.  Remove MECH parameter and
1028         add FIRST parameter.  Deal with the mechanism here instead of...
1029         Do not make read-only variant of types.  Simplify expressions.
1030         In the by-ref case, test the mechanism before must_pass_by_ref
1031         and also TYPE_IS_BY_REFERENCE_P before building the reference type.
1032         (gnat_to_gnu_subprog_type): New static function extracted from...
1033         Do not special-case the type_annotate_only mode.  Call
1034         gnat_to_gnu_profile_type instead of gnat_to_gnu_type on return type.
1035         Deal with dummy return types.  Likewise for parameter types.  Deal
1036         with by-reference types explicitly and add a kludge for null procedures
1037         with untagged incomplete types.  Remove assertion on the types and be
1038         prepared for multiple elaboration of the declarations.  Skip the whole
1039         CICO processing if the profile is incomplete.  Handle the completion of
1040         a previously incomplete profile.
1041         (gnat_to_gnu_entity) <E_Variable>: Rename local variable.
1042         Adjust couple of calls to create_param_decl.
1043         <E_Access_Subprogram_Type, E_Anonymous_Access_Subprogram_Type>:
1044         Remove specific deferring code.
1045         <E_Access_Type>: Also deal with E_Subprogram_Type designated type.
1046         Simplify handling of dummy types and remove obsolete comment.
1047         Constify a couple of variables.  Do not set TYPE_UNIVERSAL_ALIASING_P
1048         on dummy types.
1049         <E_Access_Subtype>: Tweak comment and simplify condition.
1050         <E_Subprogram_Type>: ...here.  Call it and clean up handling.  Remove
1051         obsolete comment and adjust call to gnat_to_gnu_param.  Adjust call to
1052         create_subprog_decl.
1053         <E_Incomplete_Type>: Add a couple of 'const' qualifiers and get rid of
1054         inner break statements.  Tidy up condition guarding direct use of the
1055         full view.
1056         (get_minimal_subprog_decl): Delete.
1057         (finalize_from_limited_with): Call update_profiles_with on dummy types
1058         with TYPE_DUMMY_IN_PROFILE_P set.
1059         (is_from_limited_with_of_main): Delete.
1060         (associate_subprog_with_dummy_type): New function.
1061         (update_profile): Likewise.
1062         (update_profiles_with): Likewise.
1063         (gnat_to_gnu_profile_type): Likewise.
1064         (init_gnat_decl): Initialize dummy_to_subprog_map.
1065         (destroy_gnat_decl): Destroy dummy_to_subprog_map.
1066         * gcc-interface/misc.c (gnat_get_alias_set): Add guard for accessing
1067         TYPE_UNIVERSAL_ALIASING_P.
1068         (gnat_get_array_descr_info): Minor tweak.
1069         * gcc-interface/trans.c (gigi): Adjust calls to create_subprog_decl.
1070         (build_raise_check): Likewise.
1071         (Compilation_Unit_to_gnu): Likewise.
1072         (Identifier_to_gnu): Accept mismatches coming from a limited context.
1073         (Attribute_to_gnu): Remove kludge for dispatch table entities.
1074         (process_freeze_entity): Do not retrieve old definition if there is an
1075         address clause on the entity.  Call update_profiles_with on dummy types
1076         with TYPE_DUMMY_IN_PROFILE_P set.
1077         * gcc-interface/utils.c (build_dummy_unc_pointer_types): Also set
1078         TYPE_REFERENCE_TO to the fat pointer type.
1079         (create_subprog_type): Delete.
1080         (create_param_decl): Remove READONLY parameter.
1081         (finish_subprog_decl): New function extracted from...
1082         (create_subprog_decl): ...here.  Call it.  Remove CONST_FLAG and
1083         VOLATILE_FLAG parameters and adjust.
1084         (update_pointer_to): Also clear TYPE_REFERENCE_TO in the unconstrained
1085         case.
1087 2016-04-27  Arnaud Charlet  <charlet@adacore.com>
1089         * aa_util.adb, aa_util.ads: Removed, no longer used.
1091 2016-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
1093         * sem_prag.adb (Analyze_Pragma): An object
1094         renaming declaration resulting from the expansion of an object
1095         declaration is a suitable context for pragma Ghost.
1097 2016-04-27  Doug Rupp  <rupp@adacore.com>
1099         * init.c: Refine last checkin so the only requirement is the
1100         signaling compilation unit is compiled with the same mode as
1101         the compilation unit containing the initial landing pad.
1103 2016-04-27  Ed Schonberg  <schonberg@adacore.com>
1105         * sem_ch13.adb (Valid_Default_Iterator): Better filter of illegal
1106         specifications for Default_Iterator, including overloaded cases
1107         where no interpretations are legal, and return types that are
1108         not iterator types.
1110 2016-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
1112         * exp_ch5.adb (Expand_N_Assignment_Statement): Do not install
1113         an accessibility check when the left hand side of the assignment
1114         denotes a container cursor.
1115         * exp_util.ads, exp_util.adb (Find_Primitive_Operations): Removed.
1116         * sem_ch4.adb (Find_Indexing_Operations): New routine.
1117         (Try_Container_Indexing): Code cleanup.
1119 2016-04-27  Arnaud Charlet  <charlet@adacore.com>
1121         * sem_ch10.adb, sem_case.adb: Mark messages udner -gnatwr when needed.
1123 2016-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
1125         * errout.adb, errutil.adb: Minor reformatting.
1127 2016-04-27  Ed Schonberg  <schonberg@adacore.com>
1129         * sem_ch13.adb (Analyze_Aspect_Specifications, case Pre/Post):
1130         Check that the classwide version is illegal when the prefix is
1131         an operation of an untagged synchronized type.
1133 2016-04-27  Arnaud Charlet  <charleT@adacore.com>
1135         * sinput-l.ads, sem_ch13.adb: Minor editing.
1137 2016-04-27  Doug Rupp  <rupp@adacore.com>
1139         * init.c (__gnat_adjust_context_for_raise) [arm-linux thumb]:
1140         Bump the pc so the lower order bit is set.
1142 2016-04-27  Ed Schonberg  <schonberg@adacore.com>
1144         * sem_case.adb, sem_case.ads (NO_Op): If appropriate warning is
1145         enabled, report an empty range in a case construct.
1147 2016-04-27  Arnaud Charlet  <charlet@adacore.com>
1149         * sinput.ads, a-cfdlli.adb, a-crbtgo.adb, a-chtgop.adb, a-cbhama.adb,
1150         a-rbtgbo.adb, a-crdlli.adb, a-chtgbo.adb: Minor editing.
1152 2016-04-27  Bob Duff  <duff@adacore.com>
1154         * a-chtgop.adb (Adjust): Zero the tampering counts on assignment,
1155         as is done for the other containers.
1157 2016-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
1159         * ghost.adb (In_Subprogram_Body_Profile): New routine.
1160         (Is_OK_Declaration): Treat an unanalyzed expression
1161         function as an OK context.  Treat a reference to a Ghost entity
1162         as OK when it appears within the profile of a subprogram body.
1164 2016-04-27  Bob Duff  <duff@adacore.com>
1166         * errout.ads: Document the fact that informational messages
1167         don't have to be warnings.
1168         * errout.adb (Error_Msg_Internal): In statistics counts, deal
1169         correctly with informational messages that are not warnings.
1170         (Error_Msg_NEL): Remove useless 'if' aroung Set_Posted, because
1171         Set_Posted already checks for errors and ignores others.
1172         * erroutc.adb (Prescan_Message): Set Is_Serious_Error to False
1173         if Is_Info_Msg; the previous code was assuming that Is_Info_Msg
1174         implies Is_Warning_Msg.
1175         * errutil.adb (Error_Msg): In statistics counts, deal correctly
1176         with informational messages that are not warnings.
1178 2016-04-27  Ed Schonberg  <schonberg@adacore.com>
1180         * sem_util.ads, sem_util.adb (Is_Null_Record_Type): New predicate
1181         to determine whether a record type is a null record.
1182         * sem_ch3.adb (Analyze_Object_Declaration): If the type is a
1183         null record and there is no expression in the declaration,
1184         no predicate check applies to the object.
1186 2016-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
1188         * sem_ch7.adb (Analyze_Package_Body_Helper): The body of an
1189         instantiated package should not cause freezing of previous contracts.
1191 2016-04-27  Ed Schonberg  <schonberg@adacore.com>
1193         * sem_dim.adb (Analyze_Dimension): Handle subtype declarations
1194         that do not come from source.
1195         (Analyze_Dimension_Subtype_Declaration): Allow confirming
1196         dimensions on subtype entity, either inherited from base type
1197         or provided by aspect specification.
1199 2016-04-27  Ed Schonberg  <schonberg@adacore.com>
1201         * s-gearop.ads (Matrix_Vector_Solution, Matrix_Matrix_Solution):
1202         Add scalar formal object Zero, to allow detection and report
1203         when the matrix is singular.
1204         * s-gearop.adb (Matrix_Vector_Solution, Matrix_Matrix_Solution):
1205         Raise Constraint_Error if the Forward_Eliminate pass has
1206         determined that determinant is Zero.o
1207         * s-ngrear.adb (Solve): Add actual for Zero in corresponding
1208         instantiations.
1209         * s-ngcoar.adb (Solve): Ditto.
1211 2016-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
1213         * sem_ch3.adb: Minor reformatting.
1215 2016-04-27  Ed Schonberg  <schonberg@adacore.com>
1217         * sem_dim.adb (Analyze_Dimension, case N_Identifier): Check
1218         that identifier has a usable type before analysis, to handle
1219         properly identifiers introduced after some lexical/syntactic
1220         recovery that created new identifiers.
1222 2016-04-27  Bob Duff  <duff@adacore.com>
1224         * a-coinve.adb, a-comutr.adb, a-conhel.adb, a-convec.adb,
1225         exp_util.adb: Remove assertions that can fail in obscure cases when
1226         assertions are turned on but tampering checks are turned off.
1228 2016-04-27  Javier Miranda  <miranda@adacore.com>
1230         * exp_ch6.adb (Add_Call_By_Copy_Code,
1231         Add_Simple_Call_By_Copy_Code, Expand_Actuals): Handle formals
1232         whose type comes from the limited view.
1234 2016-04-27  Yannick Moy  <moy@adacore.com>
1236         * a-textio.adb: Complete previous patch.
1238 2016-04-27  Yannick Moy  <moy@adacore.com>
1240         * inline.adb (Expand_Inlined_Call): Use Cannot_Inline instead of
1241         Error_Msg_N to issue message about impossibility to inline call,
1242         with slight change of message.
1244 2016-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
1246         * exp_spark.adb (Expand_Potential_Renaming): Removed.
1247         (Expand_SPARK): Update the call to expand a potential renaming.
1248         (Expand_SPARK_Potential_Renaming): New routine.
1249         * exp_spark.ads (Expand_SPARK_Potential_Renaming): New routine.
1250         * sem.adb Add with and use clauses for Exp_SPARK.
1251         (Analyze): Expand a non-overloaded potential renaming for SPARK.
1253 2016-04-27  Ed Schonberg  <schonberg@adacore.com>
1255         * sem_ch3.adb (Constrain_Discriminated_Type): In an instance,
1256         check full view for the presence of defaulted discriminants,
1257         even when the partial view of a private type has no visible and
1258         no unknown discriminants.
1260 2016-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
1262         * lib-xref.adb, exp_ch3.adb: Minor reformatting.
1264 2016-04-27  Nicolas Roche  <roche@adacore.com>
1266         * rtinit.c: Add weak symbol __gnat_do_argv_expansion.
1268 2016-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
1270         * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile): Code
1271         cleanup. Check the original node when trying to determine the node kind
1272         of pragma Volatile's argument to account for untagged derivations
1273         where the type is transformed into a constrained subtype.
1275 2016-04-27  Olivier Hainque  <hainque@adacore.com>
1277         * mkdir.c (__gnat_mkdir): Rework the vxworks section to use a
1278         consistent posix interface on the caller side.
1280 2016-04-27  Ed Schonberg  <schonberg@adacore.com>
1282         * sem_ch10.adb (Build_Limited_View, Decorate_Type): If this
1283         is a limited view of a type, initialize the Limited_Dependents
1284         field to catch misuses of the type in a client unit.
1286 2016-04-27  Thomas Quinot  <quinot@adacore.com>
1288         * a-strunb-shared.adb (Finalize): add missing Reference call.
1289         * s-strhas.adb: minor grammar fix and extension of comment
1290         * sem_ch8.adb: minor whitespace fixes
1292 2016-04-27  Ed Schonberg  <schonberg@adacore.com>
1294         * lib-xref.adb (Get_Type_Reference): Handle properly the case
1295         of an object declaration whose type definition is a class-wide
1296         subtype and whose expression is a function call that returns a
1297         classwide type.
1299 2016-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
1301         * sem_util.ads, sem_util.adb (Output_Entity): New routine.
1302         (Output_Name): New routine.
1304 2016-04-27  Bob Duff  <duff@adacore.com>
1306         * exp_ch3.adb (Rewrite_As_Renaming): Disable previous change for now.
1308 2016-04-27  Vincent Celier  <celier@adacore.com>
1310         * gnatcmd.adb: For "gnat ls -V -P", recognize switch
1311         --unchecked-shared-lib-imports and set the flag
1312         Opt.Unchecked_Shared_Lib_Imports accordingly.
1314 2016-04-27  Ed Schonberg  <schonberg@adacore.com>
1316         * sem_prag.adb (Analyze_Pre_Post_Condition_In_Decl_Part):
1317         A generic subprogram is never a primitive operation, and thus
1318         a classwide condition for it is not legal.
1320 2016-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
1322         * sem_aggr.adb, sem_dim.adb, sem_dim.ads, einfo.adb: Minor
1323         reformatting.
1325 2016-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
1327         * sem_res.adb (Flag_Effectively_Volatile_Objects): New routine.
1328         (Resolve_Actuals): Flag effectively volatile objects with enabled
1329         property Async_Writers or Effective_Reads as illegal.
1330         * sem_util.adb (Is_OK_Volatile_Context): Comment reformatting.
1332 2016-04-27  Javier Miranda  <miranda@adacore.com>
1334         * exp_ch3.adb (Make_Predefined_Primitive_Specs):
1335         Do not generate the profile of the equality operator if it has
1336         been explicitly defined as abstract in the parent type. Required
1337         to avoid reporting an spurious error.
1339 2016-04-27  Ed Schonberg  <schonberg@adacore.com>
1341         * sem_dim.ads, sem_dim.adb (Check_Expression_Dimensions): New
1342         procedure to compute the dimension vector of a scalar expression
1343         and compare it with the dimensions if its expected subtype. Used
1344         for the ultimate components of a multidimensional aggregate,
1345         whose components typically are themselves aggregates that are
1346         expanded separately. Previous to this patch, dimensionality
1347         checking on such aggregates generated spurious errors.
1348         * sem_aggr.adb (Resolve_Array_Aggregate): Use
1349         Check_Expression_Dimensions when needed.
1351 2016-04-27  Javier Miranda  <miranda@adacore.com>
1353         * einfo.ads, einfo.adb (Corresponding_Function): New attribute
1354         (applicable to E_Procedure).
1355         (Corresponding_Procedure): New attribute (applicable to E_Function).
1356         * exp_util.adb (Build_Procedure_Form): Link the function with
1357         its internally built proc and viceversa.
1358         * sem_ch6.adb (Build_Subprogram_Declaration): Propagate the
1359         attribute Rewritten_For_C and Corresponding_Procedure to the body.
1360         * exp_ch6.adb (Rewritten_For_C_Func_Id): Removed.
1361         (Rewritten_For_C_Proc_Id): Removed.
1362         * exp_unst.adb (Note_Uplevel_Ref): Use the new attribute to
1363         locate the corresponding procedure.
1365 2016-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
1367         * sem_ch13.adb (Analyze_Aspect_Export_Import): Signal that there is no
1368         corresponding pragma.
1370 2016-04-27  Bob Duff  <duff@adacore.com>
1372         * exp_ch3.adb: Minor comment improvement.
1374 2016-04-27  Ed Schonberg  <schonberg@adacore.com>
1376         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration): If the
1377         return type is an untagged limited record with only access
1378         discriminants and no controlled components, the return value does not
1379         need to use the secondary stack.
1381 2016-04-27  Javier Miranda  <miranda@adacore.com>
1383         * exp_util.adb (Remove_Side_Effects): When
1384         generating C code handle object declarations that have
1385         discriminants and are initialized by means of a call to a
1386         function.
1388 2016-04-27  Ed Schonberg  <schonberg@adacore.com>
1390         * a-textio.adb (Get_Line function): Handle properly the case of
1391         a line that has the same length as the buffer (or a multiple
1392         thereof) and there is no line terminator.
1393         * a-tigeli.adb (Get_Line procedure): Do not store an end_of_file
1394         in the string when there is no previous line terminator and we
1395         need at most one additional character.
1397 2016-04-27  Arnaud Charlet  <charlet@adacore.com>
1399         * s-rident.ads: Make No_Implicit_Loops non partition wide.
1401 2016-04-27  Arnaud Charlet  <charlet@adacore.com>
1403         * sem_ch11.adb (Analyze_Handled_Statements): check useless
1404         assignments also in entries and task bodies, not only in
1405         procedures and declaration blocks.
1406         * sem_ch5.adb (Analyze_Block_Statement): check useless
1407         assignements in declaration blocks as part of processing their
1408         handled statement sequence, just like it was done for procedures
1409         and now is also done for entries and task bodies.
1410         * sem_warn.adb (Warn_On_Useless_Assignment): detect boundries
1411         of entries and task bodies just like of procedures.
1413 2016-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
1415         * sem_util.adb (Is_Volatile_Function): Recognize
1416         a function declared within a protected type as well as the
1417         protected/unprotected version of a function.
1419 2016-04-27  Bob Duff  <duff@adacore.com>
1421         * exp_ch3.adb (Expand_N_Object_Declaration): Rewrite an object
1422         declaration of the form "X : T := Func (...);", where T is
1423         controlled, as a renaming.
1424         * a-strunb-shared.adb (Finalize): Set the Unbounded_String Object
1425         to be an empty string, instead of null-ing out the Reference.
1426         * exp_util.adb (Needs_Finalization): Remove redundant code.
1428 2016-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
1430         * aspects.ads Aspects Export and Import do not require delay. They
1431         were classified as delayed aspects, but treated as non-delayed
1432         by the analysis of aspects.
1433         * freeze.adb (Copy_Import_Pragma): New routine.
1434         (Wrap_Imported_Subprogram): Copy the import pragma by first
1435         resetting all semantic fields to avoid an infinite loop when
1436         performing the copy.
1437         * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): Add
1438         comment on the processing of aspects Export and Import
1439         at the freeze point.
1440         (Analyze_Aspect_Convention: New routine.
1441         (Analyze_Aspect_Export_Import): New routine.
1442         (Analyze_Aspect_External_Link_Name): New routine.
1443         (Analyze_Aspect_External_Or_Link_Name): Removed.
1444         (Analyze_Aspect_Specifications): Factor out the analysis of
1445         aspects Convention, Export, External_Name, Import, and Link_Name
1446         in their respective routines.  Aspects Export and Import should
1447         not generate a Boolean pragma because their corresponding pragmas
1448         have a very different syntax.
1449         (Build_Export_Import_Pragma): New routine.
1450         (Get_Interfacing_Aspects): New routine.
1452 2016-04-27  Eric Botcazou  <ebotcazou@adacore.com>
1454         * inline.adb (Add_Inlined_Body): Overhaul implementation,
1455         robustify handling of -gnatn1, add special treatment for
1456         expression functions.
1458 2016-04-27  Doug Rupp  <rupp@adacore.com>
1460         * g-traceb.ads: Update comment.
1461         * exp_ch2.adb: minor style fix in object declaration
1463 2016-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
1465         * sem_elab.adb (Check_Internal_Call): Do not
1466         consider a call when it appears within pragma Initial_Condition
1467         since the pragma is part of the elaboration statements of a
1468         package body and may only call external subprograms or subprograms
1469         whose body is already available.
1470         (Within_Initial_Condition): New routine.
1472 2016-04-27  Ed Schonberg  <schonberg@adacore.com>
1474         * exp_util.adb (Build_Procedure_Form): Prevent double generation
1475         of the procedure form when dealing with an expression function
1476         whose return type is an array.
1477         * sem_ch3.adb: Fix out-of order Has_Predicates setting.
1478         * exp_ch6.adb: Proper conversion for inherited operation in C.
1479         * sem_ch6.adb: Code cleanup.
1481 2016-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
1483         * lib-xref.ads, sem_ch10.adb: minor style fix in comment
1484         * g-socket.adb: Minor reformatting.
1485         * sinfo.ads: Minor comment correction.
1486         * sem_warn.ads: minor grammar fix in comment
1488 2016-04-27  Eric Botcazou  <ebotcazou@adacore.com>
1490         * gcc-interface/gigi.h (gnat_to_gnu_entity): Adjust prototype.
1491         (maybe_pad_type): Adjust comment.
1492         (finish_record_type): Likewise.
1493         (rest_of_record_type_compilation): Likewise.
1494         * gcc-interface/decl.c (gnat_to_gnu_entity): Change DEFINITION type
1495         parameter from integer to boolean.  Adjust recursive calls.
1496         <E_Subprogram_Type>: Use copy_type and remove redundant assignments.
1497         <E_Signed_Integer_Subtype>:  Adjust comment.  Remove call to
1498         rest_of_record_type_compilation.  Set TYPE_PADDING_P flag earlier.
1499         Pass false to finish_record_type.  Set the debug type later.
1500         <E_Record_Subtype>: Remove call to rest_of_record_type_compilation.
1501         (gnat_to_gnu_component_type): Fix formatting.
1502         (gnat_to_gnu_field_decl): Adjust call to gnat_to_gnu_entity.
1503         (gnat_to_gnu_type): Likewise.
1504         * gcc-interface/trans.c (Identifier_to_gnu): Likewise.
1505         (Loop_Statement_to_gnu): Likewise.
1506         (Subprogram_Body_to_gnu): Likewise.
1507         (Exception_Handler_to_gnu_fe_sjlj): Likewise.
1508         (Exception_Handler_to_gnu_gcc): Likewise.
1509         (Compilation_Unit_to_gnu): Likewise.
1510         (gnat_to_gnu): Likewise.
1511         (push_exception_label_stack): Likewise.
1512         (elaborate_all_entities_for_package): Likewise.
1513         (process_freeze_entity): Likewise.
1514         (process_decls): Likewise.
1515         (process_type): Likewise.
1516         * gcc-interface/utils.c (struct deferred_decl_context_node): Tweak.
1517         (maybe_pad_type): Adjust comments.  Set the debug type later.  Remove
1518         call to rest_of_record_type_compilation.
1519         (rest_of_record_type_compilation): Use copy_type.
1520         (copy_type): Use correctly typed constants.
1521         (gnat_signed_or_unsigned_type_for): Use copy_type.
1522         * gcc-interface/utils2.c (nonbinary_modular_operation): Likewise.
1523         (build_goto_raise): Adjust call tognat_to_gnu_entity.
1525 2016-04-27  Eric Botcazou  <ebotcazou@adacore.com>
1527         * gcc-interface/misc.c (gnat_init): Do not call
1528         internal_reference_types.
1530 2016-04-27  Svante Signell  <svante.signell@gmail.com>
1532         * gcc-interface/Makefile.in (x86 GNU/Hurd): Use s-osinte-gnu.adb.
1533         * s-osinte-gnu.ads: Small tweaks.
1534         * s-osinte-gnu.adb: New file.
1536 2016-04-21  Hristian Kirtchev  <kirtchev@adacore.com>
1538         * sem_prag.adb (Match_Constituent): Treat a constant as a legal
1539         constituent even if it is not to prevent spurious errors.
1541 2016-04-21  Gary Dismukes  <dismukes@adacore.com>
1543         * sem_ch4.adb: Minor typo fixes and reformatting.
1545 2016-04-21  Dmitriy Anisimkov  <anisimko@adacore.com>
1547         * g-calend.ads (No_Time): The same value in any timezone.
1548         * g-socket.adb (Raise_Host_Error): Remove ending
1549         dot from original error message before append colon delimited
1550         host name.
1552 2016-04-21  Hristian Kirtchev  <kirtchev@adacore.com>
1554         * sem_ch3.adb: Code cleanup.
1555         * sem_ch6.adb: Code cleanup.
1556         (Is_Matching_Limited_View): New routine.
1557         (Matches_Limited_With_View): Reimplemented.
1558         * sem_ch10.adb (Decorate_Type): Code cleanup.
1560 2016-04-21  Doug Rupp  <rupp@adacore.com>
1562         * tracebak.c (PPC ELF): Add macro defs for lynxos178e.
1564 2016-04-21  Ed Schonberg  <schonberg@adacore.com>
1566         * sem_ch4.adb (Try_Container_Indexing): If there are overloaded
1567         indexing functions, collect all overloadings of the call firts,
1568         and then transfer them to indexing node, to prevent interleaving
1569         of the set of interpretations of the nodes involved.
1570         * sem_res.adb (Resolve): Suppress cascaded errors that report
1571         ambiguities when one of the actuals in an overloaded generatlized
1572         indexing operation is illegal and has type Any_Type, as is done
1573         for similar cascaded errors in subprogram calls.
1574         (Valid_Tagged_Conversion): Cleanup conversion checks when one
1575         of the types involved is a class-wide subtype.
1577 2016-04-21  Ed Schonberg  <schonberg@adacore.com>
1579         * sem_ch12.adb (Load_Parent_Of_Generic): When looking for the
1580         subprogram declaration within a wrapper package, skip pragmas
1581         that may have been generated by aspect specifications on the
1582         generic instance.
1584 2016-04-21  Javier Miranda  <miranda@adacore.com>
1586         * exp_aggr.adb (Component_Not_OK_For_Backend): Generating C
1587         code return True for array identifiers since the backend needs
1588         to initialize such component by means of memcpy().
1590 2016-04-21  Arnaud Charlet  <charlet@adacore.com>
1592         * a-tasatt.adb, a-tasatt.ads (Fast_Path): Rewritten to avoid reading
1593         potentially uninitialized memory.
1594         * sem_ch3.adb: Minor style fix in comment.
1596 2016-04-21  Arnaud Charlet  <charlet@adacore.com>
1598         * gnat_rm.texi, gnat_ugn.texi,
1599         doc/gnat_ugn/gnat_project_manager.rst,
1600         doc/gnat_ugn/building_executable_programs_with_gnat.rst,
1601         doc/gnat_ugn/gnat_and_program_execution.rst,
1602         doc/gnat_ugn/gnat_utility_programs.rst,
1603         doc/gnat_ugn/the_gnat_compilation_model.rst,
1604         doc/gnat_rm/implementation_defined_attributes.rst,
1605         doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
1606         doc/gnat_rm/implementation_defined_pragmas.rst,
1607         doc/gnat_rm/the_gnat_library.rst,
1608         doc/gnat_rm/implementation_defined_aspects.rst: Update doc.
1609         * doc/Makefile: Cleanups.
1611 2016-04-21  Hristian Kirtchev  <kirtchev@adacore.com>
1613         * exp_pakd.adb, sem_ch13.adb: Minor reformatting.
1615 2016-04-21  Ed Schonberg  <schonberg@adacore.com>
1617         * exp_dbug.adb, exp_dbug.ads (Qualify_Entity_Name): Add suffixes to
1618         disambiguate local variables that may be hidden from inner visibility
1619         by nested block declarations or loop variables.
1621 2016-04-21  Jerome Lambourg  <lambourg@adacore.com>
1623         * s-soflin.adb: Initialize the Stack_Limit global variable.
1625 2016-04-21  Hristian Kirtchev  <kirtchev@adacore.com>
1627         * lib-writ.adb: Minor reformatting.
1629 2016-04-21  Ed Schonberg  <schonberg@adacore.com>
1631         * exp_pakd.adb (Compute_Number_Components): New function to
1632         build an expression that computes the number of a components of
1633         an array that may be multidimensional.
1634         (Expan_Packed_Eq): Use it.
1636 2016-04-21  Arnaud Charlet  <charlet@adacore.com>
1638         * g-traceb.ads: Update list of supported platforms.
1640 2016-04-21  Ed Schonberg  <schonberg@adacore.com>
1642         * sem_ch13.adb (Add_Predicates): if the type is declared in
1643         an inner package it may be frozen outside of the package, and
1644         the generated pragma has not been analyzed yet, the expression
1645         for the predicate must be captured and added to the predicate
1646         function at this point.
1648 2016-04-21  Hristian Kirtchev  <kirtchev@adacore.com>
1650         * contracts.adb (Analyze_Package_Body_Contract): Do not check
1651         for a missing package refinement because 1) packages do not have
1652         "refinement" and 2) the check for proper state refinement is
1653         performed in a different place.
1654         * einfo.adb (Has_Non_Null_Visible_Refinement): Reimplemented.
1655         (Has_Null_Visible_Refinement): Reimplemented.
1656         * sem_ch3.adb (Analyze_Declarations): Determine whether all
1657         abstract states have received a refinement and if not, emit
1658         errors.
1659         * sem_ch7.adb (Analyze_Package_Declaration): Code
1660         cleanup. Determine whether all abstract states of the
1661         package and any nested packages have received a refinement
1662         and if not, emit errors.
1663         (Requires_Completion_In_Body): Add new formal parameter
1664         Do_Abstract_States. Update the comment on usage. Propagate the
1665         Do_Abstract_States flag to all Unit_Requires_Body calls.
1666         (Unit_Requires_Body): Remove formal
1667         parameter Ignore_Abstract_States. Add new formal paramter
1668         Do_Abstract_States. Propagate the Do_Abstract_States flag to
1669         all Requires_Completion_In calls.
1670         * sem_ch7.ads (Unit_Requires_Body): Remove formal
1671         parameter Ignore_Abstract_States. Add new formal paramter
1672         Do_Abstract_States. Update the comment on usage.
1673         * sem_ch9.adb (Analyze_Single_Protected_Declaration): Do
1674         not initialize the constituent list as this is now done on a
1675         need-to-add-element basis.
1676         (Analyze_Single_Task_Declaration):
1677         Do not initialize the constituent list as this is now done on
1678         a need-to-add-element basis.
1679         * sem_ch10.adb (Decorate_State): Do not initialize the constituent
1680         lists as this is now done on a need-to-add-element basis.
1681         * sem_prag.adb (Analyze_Constituent): Set the
1682         refinement constituents when adding a new element.
1683         (Analyze_Part_Of_In_Decl_Part): Set the Part_Of constituents when
1684         adding a new element.
1685         (Analyze_Part_Of_Option): Set the Part_Of
1686         constituents when adding a new element.
1687         (Analyze_Pragma): Set the Part_Of constituents when adding a new
1688         element.
1689         (Check_Constituent_Usage (all versions)): Reimplemented.
1690         (Collect_Constituent): Set the refinement constituents when adding
1691         a new element.
1692         (Create_Abstract_State): Do not initialize the
1693         constituent lists as this is now done on a need-to-add-element basis.
1694         (Propagate_Part_Of): Set the Part_Of constituents when
1695         adding a new element.
1696         * sem_util.adb (Check_State_Refinements): New routine.
1697         (Has_Non_Null_Refinement): Reimplemented.
1698         (Has_Null_Refinement): Reimplemented.
1699         (Requires_State_Refinement): Removed.
1700         * sem_util.ads (Check_State_Refinements): New routine.
1701         (Requires_State_Refinement): Removed.
1703 2016-04-21  Hristian Kirtchev  <kirtchev@adacore.com>
1705         * lib-writ.adb, sem_ch6.adb: Minor reformatting and code cleanup.
1706         * sem.adb: Fix comment.
1708 2016-04-21  Ed Schonberg  <schonberg@adacore.com>
1710         * sem_ch3.adb (Analyze_Subtype_Declaration): A subtype
1711         declaration with no aspects, whose subtype_mark is a subtype
1712         with predicates, inherits the list of subprograms for the type.
1714 2016-04-21  Arnaud Charlet  <charlet@adacore.com>
1716         * exp_aggr.adb (Has_Per_Object_Constraint): Refine previous
1717         change.
1719 2016-04-21  Thomas Quinot  <quinot@adacore.com>
1721         * g-socket.adb (Raise_Host_Error): Include additional Name parameter.
1723 2016-04-21  Ed Schonberg  <schonberg@adacore.com>
1725         * lib-writ.adb (Write_ALI): Do not record in ali file units
1726         that are present in the files table but not analyzed. These
1727         units are present because they appear in the context of units
1728         named in limited_with clauses, and the unit being compiled does
1729         not depend semantically on them.
1731 2016-04-21  Ed Schonberg  <schonberg@adacore.com>
1733         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Simplify code to
1734         create the procedure body for an function returning an array type,
1735         when generating C code. Reuse the subprogram body rather than
1736         creating a new one, both as an efficiency measure and because
1737         in an instance the body may contain global references that must
1738         be preserved.
1740 2016-04-21  Hristian Kirtchev  <kirtchev@adacore.com>
1742         * sem_ch3.adb, exp_attr.adb, exp_ch6.adb, exp_aggr.adb: Minor
1743         reformatting.
1745 2016-04-21  Javier Miranda  <miranda@adacore.com>
1747         * exp_aggr.adb (Component_Check): Extend
1748         the check that verifies that the aggregate has no function
1749         calls to handle transformations performed by the frontend.
1750         (Ultimate_Original_Expression): New subprogram.
1752 2016-04-21  Philippe Gil  <gil@adacore.com>
1754         * krunch.adb (Krunch): Fix krunching of i-java.
1756 2016-04-21  Arnaud Charlet  <charlet@adacore.com>
1758         * exp_ch8.adb (Evaluation_Required): Always return
1759         True when Modify_Tree_For_C.
1761 2016-04-21  Eric Botcazou  <ebotcazou@adacore.com>
1763         * gnatlink.adb (Gnatlink): Robustify detection of Windows target.
1764         * alloc.ads: Minor comment fixes.
1765         * einfo.ads: Fix typo.
1767 2016-04-21  Arnaud Charlet  <charlet@adacore.com>
1769         * exp_aggr.adb (Component_Not_OK_For_Backend): Redo previous
1770         changes to handle all cases of components depending on the
1771         discriminant, not just string literals.
1773 2016-04-21  Ed Schonberg  <schonberg@adacore.com>
1775         * sem_ch3.adb (Analyze_Subtype_Declaration): If the subtype
1776         declaration is the generated declaration for a generic actual,
1777         inherit predicates from the actual if it is a predicated subtype.
1779 2016-04-21  Ed Schonberg  <schonberg@adacore.com>
1781         * exp_ch6.adb (Rewrite_Function_Call_For_C): If the function is
1782         inherited and its result is controlling,  introduce a conversion
1783         on the actual for the corresponding procedure call, to avoid
1784         spurious type errors.
1786 2016-04-21  Jerome Lambourg  <lambourg@adacore.com>
1788         * krunch.adb (Krunch): Fix krunching of i-vxworks.
1790 2016-04-21  Gary Dismukes  <dismukes@adacore.com>
1792         * exp_aggr.adb: Minor reformatting and code cleanup.
1794 2016-04-21  Ed Schonberg  <schonberg@adacore.com>
1796         * sem_ch13.adb (Resolve_Name): Omit quantified expressions from
1797         resolution, because they introduce local names. Full resolution
1798         will take place when predicate function is constructed.
1800 2016-04-21  Arnaud Charlet  <charlet@adacore.com>
1802         * exp_aggr.adb (Component_Not_OK_For_Backend): Refine previous
1803         change to take into account Per_Object_Constraint field rather
1804         than special casing strings.
1805         * exp_ch6.adb: Fix typo in Replace_Returns.
1807 2016-04-21  Hristian Kirtchev  <kirtchev@adacore.com>
1809         * sem_ch5.adb: Minor reformatting.
1811 2016-04-21  Arnaud Charlet  <charlet@adacore.com>
1813         * exp_aggr.adb (Backend_Processing_Possible): Return False
1814         when generating C and aggregate contains function calls.
1816 2016-04-21  Tristan Gingold  <gingold@adacore.com>
1818         * krunch.adb (Krunch): Only partially krunch children of
1819         Interfaces that aren't known.
1821 2016-04-21  Ed Schonberg  <schonberg@adacore.com>
1823         * sem_prag.adb (Make_Inline): Handle properly the instantiation
1824         of a generic subpprogram that carries an Inline aspect. Place
1825         inline info on the anonymous subprogram that is constructed in
1826         the wrapper package.
1827         (Analyze_Pragma, case Pure): Do not check placement if pragma
1828         appears within an instantiation, which can be nested at any level.
1829         * sem_ch12.adb (Analyze_Instance_And_Renamings): Do not copy Freeze
1830         node from anonymous subprogram to its visible renaming. The
1831         freeze node will be constructed if the subprogram carries
1832         delayed aspects.
1833         (Set_Global): Preserve dimension information if present (from
1834         code reading).
1836 2016-04-21  Vasiliy Fofanov  <fofanov@adacore.com>
1838         * gnatlink.adb: Change wording of the warning message on
1839         problematic filenames to be more neutral. Add a new substring
1840         "patch" introduced on Windows 10.
1842 2016-04-21  Philippe Gil  <gil@adacore.com>
1844         * tracebak.c (__gnat_backtrace): handle bad RIP values (win64 only)
1846 2016-04-21  Javier Miranda  <miranda@adacore.com>
1848         * exp_aggr.adb (Component_Not_OK_For_Backend): Return true for string
1849         literals.
1851 2016-04-21  Hristian Kirtchev  <kirtchev@adacore.com>
1853         * einfo.adb (Has_Non_Null_Abstract_State): New routine.
1854         * einfo.ads New synthesized attribute
1855         Has_Non_Null_Abstract_State along with occurrences in entities.
1856         (Has_Non_Null_Abstract_State): New routine.
1857         * sem_ch7.adb (Unit_Requires_Body): Add local variable
1858         Requires_Body. A package declaring an abstract state requires
1859         a body only when the state is non-null and the package contains
1860         at least one other construct that requires completion in a body.
1861         * sem_util.adb (Mode_Is_Off): Removed.
1862         (Requires_State_Refinement): Remove an obsolete check. Code
1863         cleanup.
1865 2016-04-21  Bob Duff  <duff@adacore.com>
1867         * sem_attr.adb (Analyze_Attribute): In processing
1868         the 'Old attribute, a warning is given for infinite recursion. Fix
1869         the code to not crash when the prefix of 'Old denotes a protected
1870         function.
1871         * sem_ch5.adb (Analyze_Iterator_Specification):
1872         Avoid calling Is_Dependent_Component_Of_Mutable_Object in cases
1873         where the parameter would not be an object.
1875 2016-04-21  Eric Botcazou  <ebotcazou@adacore.com>
1877         * sem_eval.adb (Compile_Time_Compare): Be prepared for an empty
1878         Etype or Underlying_Type of the operands.
1880 2016-04-21  Eric Botcazou  <ebotcazou@adacore.com>
1882         * atree.adb (Print_Statistics): Protect against overflows and
1883         print the memory consumption in bytes.
1884         * table.adb (Reallocate): Do the intermediate calculation of the new
1885         size using the Memory.size_t type.
1887 2016-04-21  Gary Dismukes  <dismukes@adacore.com>
1889         * exp_attr.adb (Is_Inline_Floating_Point_Attribute): Suppress
1890         expansion of Attribute_Machine and Attribute_Model for AAMP.
1892 2016-04-21  Ed Schonberg  <schonberg@adacore.com>
1894         * freeze.adb: Disable previous change for now.
1896 2016-04-21  Ed Schonberg  <schonberg@adacore.com>
1898         * sem_ch8.adb (Find_Selected_Component): If prefix has an
1899         access type and designated type is a limited view, introduce
1900         an explicit dereference before continuing the analysis, and
1901         set its type to the non-limited view of the designated type,
1902         if we are in context where it is available.
1904 2016-04-21  Ed Schonberg  <schonberg@adacore.com>
1906         * freeze.adb: Freeze profile in ASIS mode.
1908 2016-04-21  Hristian Kirtchev  <kirtchev@adacore.com>
1910         * sem_aux.ads, sem_aux.adb (Has_Rep_Item): New variant.
1911         * sem_util.adb (Inherit_Rep_Item_Chain): Reimplemented.
1913 2016-04-21  Hristian Kirtchev  <kirtchev@adacore.com>
1915         * exp_ch6.adb: Minor reformatting.
1917 2016-04-21  Ed Schonberg  <schonberg@adacore.com>
1919         * sem_ch13.adb: Minor comment update.
1921 2016-04-21  Ed Schonberg  <schonberg@adacore.com>
1923         * freeze.ads, freeze.adb (Freeze_Entity, Freeze_Before): Add
1924         boolean parameter to determine whether freezing an overloadable
1925         entity freezes its profile as well. This is required by
1926         AI05-019. The call to Freeze_Profile within Freeze_Entity is
1927         conditioned by the value of this flag, whose default is True.
1928         * sem_attr.adb (Resolve_Attribute, case 'Access): The attribute
1929         reference freezes the prefix, but it the prefix is a subprogram
1930         it does not freeze its profile.
1932 2016-04-21  Javier Miranda  <miranda@adacore.com>
1934         * exp_util.adb (Build_Procedure_Form): No action needed for
1935         subprogram renamings since the backend can generate the call
1936         using the renamed subprogram. This leaves the tree more clean
1937         to the backend.
1938         * exp_ch6.adb (Expand_Call): Extend previous patch for
1939         rewritten-for-c entities to handle subprogram renamings.
1940         (Rewrite_Function_Call_For_C): Handle subprogram renamings.
1942 2016-04-21  Ed Schonberg  <schonberg@adacore.com>
1944         * sem_ch13.adb: Code cleanup.
1946 2016-04-21  Ed Schonberg  <schonberg@adacore.com>
1948         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If the body is
1949         created for SPARK_To_C, the entity must remain invisible so it
1950         does not overload subsequent references to the original function.
1951         * exp_ch6.adb (Build_Procedure_Body_Form, Replace_Returns):
1952         Handle Extended_Return_Statements by replacing it with a block
1953         with assignments and a simple return statement.
1954         * exp_util.adb (Build_Procedure_Form): Make procedure entity
1955         invisible after analyzing declaration, to prevent improper
1956         overloading.
1958 2016-04-21  Javier Miranda  <miranda@adacore.com>
1960         * sem_ch6.adb (Build_Subprogram_Declaration): Propagate the
1961         attribute Rewritten_For_C to the body since since the expander
1962         may generate calls using that entity.
1963         * exp_ch6.adb (Expand_Call): For internally generated
1964         calls ensure that they reference the entity of the spec
1965         of the called function.
1966         (Rewritten_For_C_Func_Id): New subprogram.
1967         (Rewritten_For_C_Proc_Id): New subprogram.
1968         (Rewrite_Function_Call_For_C): Invoke the new subprogram to
1969         ensure that we skip freezing entities.
1970         * exp_util.adb (Build_Procedure_Form): No action needed if the
1971         procedure was already built.
1973 2016-04-21  Hristian Kirtchev  <kirtchev@adacore.com>
1975         * sem_ch3.adb, exp_util.adb, sem_ch13.adb, exp_unst.adb: Minor
1976         reformatting.
1978 2016-04-21  Ed Schonberg  <schonberg@adacore.com>
1980         * sem_util.adb (Denotes_Iterator): Use root type to determine
1981         whether the ultimate ancestor is the predefined iterator
1982         interface pakage.
1983         * exp_ch5.adb (Expand_Iterator_Over_Container): simplify code
1984         and avoid reuse of Pack local variable.
1986 2016-04-21  Olivier Hainque  <hainque@adacore.com>
1988         * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
1989         system-vxworks-ppc.ads, system-vxworks-m68k.ads,
1990         system-vxworks-mips.ads, system-vxworks-x86.ads: Define
1991         Executable_Extension to ".out".
1993 2016-04-21  Javier Miranda  <miranda@adacore.com>
1995         * frontend.adb: Update call to Unnest_Subprograms.
1996         * exp_ch6.ads, exp_ch6.adb, exp_unst.ads, exp_unst.adb
1997         (Unnest_Subprograms): Moved to package exp_unst.
1998         * exp_unst.ads (Unnest_Subprogram): Moved to the body of the
1999         package.
2000         * exp_dbug.adb (Qualify_Entity_Name): Enable qualification of
2001         enumeration literals when generating C code.
2003 2016-04-21  Javier Miranda  <miranda@adacore.com>
2005         * frontend.adb: Remove call to initialize Exp_Ch6.
2006         * exp_ch6.ads, exp_ch6.adb (Initialize): removed.
2007         (Unest_Entry/Unest_Bodies): Removed.
2008         (Unnest_Subprograms): Code cleanup.
2010 2016-04-21  Arnaud Charlet  <charlet@adacore.com>
2012         * set_targ.adb (Read_Target_Dependent_Values):
2013         close target description file once its contents is read.
2014         * s-os_lib.adb (Non_Blocking_Spawn, version with Stdout_File
2015         and Stderr_File): Close local file descriptors before spawning
2016         child process.
2017         * exp_util.adb (Containing_Package_With_Ext_Axioms): Limit scope of
2018         local variables to make the code easier to understand and avoid
2019         duplicated calls to Parent and Generic_Parent.
2021 2016-04-20  Bob Duff  <duff@adacore.com>
2023         * s-os_lib.ads: Minor comment fix.
2025 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
2027         * exp_ch5.adb (Expand_N_Assignment_Statement): Do no generate
2028         a discriminant check for a type whose partial view has unknown
2029         discriminants when the full view has discriminants with defaults.
2031 2016-04-20  Javier Miranda  <miranda@adacore.com>
2033         * exp_util.adb (Remove_Side_Effects): When generating C code
2034         remove side effect of type conversion of access to unconstrained
2035         array type.
2036         (Side_Effect_Free): Return false for the type
2037         conversion of access to unconstrained array type when generating
2038         C code.
2039         * sem_res.adb (Resolved_Type_Conversion): Remove side effects
2040         of access to unconstrained array type conversion when generating
2041         C code.
2043 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
2045         * sem_ch13.adb (Build_Predicate_Function_Declaration): New
2046         function, to construct the declaration of a predicate function
2047         at the end of the current declarative part rather than at the
2048         (possibly later) freeze point of the type. This also allows uses
2049         of a type with predicates in instantiations elsewhere.
2050         (Resolve_Aspect_Expression): New procedure to detect visiblity
2051         errors in aspect expressions, at the end of the declarative part
2052         that includes the type declaration.
2053         * sem_ch3.adb (Complete_Private_Subtype): Propagate properly the
2054         predicate function from private to full view.
2055         * einfo.adb (Predicate_Function): Refine search for predicate
2056         function when type has a full view and predicate function may
2057         be defined on either view.
2059 2016-04-20  Javier Miranda  <miranda@adacore.com>
2061         * frontend.adb: Passing the root of the tree to
2062         Unnest_Subprograms().
2063         * exp_ch6.adb (Expand_N_Subprogram_Body): Remove code that
2064         took care of adding subprograms to the Unest_Bodies table since
2065         performing such action too early disables the ability to process
2066         generic instantiations.
2067         (Unnest_Subprograms): Adding parameter.
2068         (Search_Unnesting_Subprograms): New subprogram.
2069         * exp_ch6.ads (Unnest_Subrograms): Update documentation.
2071 2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>
2073         * exp_util.adb, freeze.adb, sem_util.adb: Minor reformatting.
2075 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
2077         * exp_unst.adb (Check_Static_Type): For a private type, check
2078         full view.
2080 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
2082         * sem_attr.adb (Check_Type): Reject an attribute reference in
2083         an aspect expression, when the prefix of the reference is the
2084         current instance of the type to which the aspect applies.
2086 2016-04-20  Bob Duff  <duff@adacore.com>
2088         * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about
2089         hiding unless we're actually hiding something. The previous
2090         code would (for example) warn about a "<" on a record type
2091         because it incorrectly thought it was hiding the "<" on Boolean
2092         in Standard. We need to check that the homonym S is in fact a
2093         homograph of a predefined operator.
2095 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
2097         * exp_util.ads, exp_util.adb (Build_Procedure_Form): Moved here
2098         from exp_ch6.adb, for use in SPARK_To_C mode when creating the
2099         procedure equivalent to a function returning an array, when this
2100         construction is deferred to the freeze point of the function.
2101         * sem_util.adb (Is_Unchecked_Conversion_Instance): Include a
2102         function that renames an instance of Unchecked_Conversion.
2103         * freeze.adb (Freeze_Subprogram): Generate the proper procedure
2104         declaration for a function returning an array.
2105         * exp_ch6.adb (Build_Procedure_Form): Moved to exp_util.
2107 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
2109         * sem_util.ads, sem_util.adb (Is_Expanded_Priority_Attribute):
2110         New predicate to determine that in a context with full run-time,
2111         a function call is an expansion of a reference to attribute
2112         Priority.
2113         * sem_ch5.adb (Analyze_Function_Call): use it.
2114         * exp_ch5.adb (Expand_N_Subprogram_Call): use it.
2116 2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>
2118         * einfo.adb Flag286 is now used as Is_Exception_Handler.
2119         (Is_Exception_Handler): New routine.
2120         (Set_Is_Exception_Handler): New routine.
2121         (Write_Entity_Flags): Output the status of Is_Exception_Handler.
2122         * einfo.ads New attribute Is_Exception_Handler along with
2123         occurrences in entities.
2124         (Is_Exception_Handler): New routine along with pragma Inline.
2125         (Set_Is_Exception_Handler): New routine along with pragma Inline.
2126         * exp_ch7.adb (Make_Transient_Block): Ignore blocks generated
2127         for exception handlers with a choice parameter.
2128         * sem_ch11.adb (Analyze_Exception_Handlers): Mark the scope
2129         generated for a choice parameter as an exception handler.
2131 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
2133         * sem_ch3.adb (Build_Derived_Access_Type): Remove dead code.
2134         (Constrain_Discriminated_Type): In an instance, if the type has
2135         unknown discriminants, use its full view.
2136         (Process_Subtype): Check that the base type is private before
2137         adding subtype to Private_Dependents list.
2139 2016-04-20  Bob Duff  <duff@adacore.com>
2141         * sem_ch13.adb: Minor comment fix.
2143 2016-04-20  Yannick Moy  <moy@adacore.com>
2145         * sem_ch4.adb: Fix typos in comments.
2146         * sem_res.adb (Resolve_Case_Expression): Fix type of case alternatives.
2148 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
2150         * sem_ch4.adb (Analyze_Selected_Component): A reference to the
2151         current instance of a task type is legal if the prefix is an
2152         expression of that task type and the selector is an entry or
2153         entry family.
2155 2016-04-20  Arnaud Charlet  <charlet@adacore.com>
2157         * a-cfdlli.ads (List): Type is no longer tagged, not needed. Move
2158         varsize field at the end for efficiency.
2160 2016-04-20  Vincent Celier  <celier@adacore.com>
2162         * gnatcmd.adb: Do not invoke gprls when the invocation of "gnat
2163         ls" includes the switch -V.
2164         * clean.adb: "<target>-gnatclean -P" now calls "gprclean
2165         --target=<target>"
2166         * make.adb: "<target>-gnatmake -P" now calls "gprbuild
2167         --target=<target>"
2169 2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>
2171         * sem_ch12.adb (Qualify_Type): Do not perform
2172         partial qualification when the immediate scope is a generic unit.
2174 2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>
2176         * exp_unst.adb: Minor reformatting.
2178 2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>
2180         * exp_ch4.adb (Expand_Allocator_Expression): Ensure that the
2181         tag assignment and adjustment preceed the accessibility check.
2182         * exp_ch7.adb (Is_Subprogram_Call): Reimplemented.
2184 2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>
2186         * exp_prag.adb (Expand_Attributes): Ensure that
2187         the temporary used to capture the value of attribute 'Old's
2188         prefix is properly initialized.
2190 2016-04-20  Javier Miranda  <miranda@adacore.com>
2192         * exp_unst.ads, exp_unst.adb (Get_Level, Subp_Index): Moved to library
2193         level.
2195 2016-04-20  Arnaud Charlet  <charlet@adacore.com>
2197         * sem_ch9.adb (Analyze_Task_Type_Declaration): Shut down warning
2198         in codepeer mode.
2200 2016-04-20  Vincent Celier  <celier@adacore.com>
2202         * make.adb: Code cleanup.
2204 2016-04-20  Arnaud Charlet  <charlet@adacore.com>
2206         * exp_ch4.adb (Expand_Allocator_Expression): Help C code
2207         generation.
2209 2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>
2211         * sem_ch12.adb (Copy_Generic_Node): Handle the special
2212         qualification installed for universal literals that act as
2213         operands in binary or unary operators.  (Qualify_Operand): Mark
2214         the qualification to signal the instantiation mechanism how to
2215         handle global reference propagation.
2216         * sinfo.adb (Is_Qualified_Universal_Literal): New routine.
2217         (Set_Is_Qualified_Universal_Literal): New routine.
2218         * sinfo.ads New attribute Is_Qualified_Universal_Literal along
2219         with occurrences in nodes.
2220         (Is_Qualified_Universal_Literal):
2221         New routine along with pragma Inline.
2222         (Set_Is_Qualified_Universal_Literal): New routine along with
2223         pragma Inline.
2225 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
2227         * sem.adb (Do_Analyze): Save and restore Style_Max_Line_Length
2228         so that the corresponding checks are preserved across compilations
2229         that include System.Constants in their context.
2231 2016-04-20  Gary Dismukes  <dismukes@adacore.com>
2233         * sem_type.adb: Minor typo fix and reformatting.
2234         * a-conhel.ads: Update comment.
2236 2016-04-20  Bob Duff  <duff@adacore.com>
2238         * a-cihama.adb, a-cihase.adb, a-coinve.adb (Copy): Rewrite the
2239         code so it doesn't trigger an "uninit var" warning.
2241 2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>
2243         * sem_attr.ads Add new table Universal_Type_Attribute.
2244         * sem_util.adb (Yields_Universal_Type): Use a table lookup when
2245         checking attributes.
2247 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
2249         * exp_aggr.adb (Init_Stored_Discriminants,
2250         Init_Visible_Discriminants): New procedures, subsidiary of
2251         Build_Record_Aggr_Code, to handle properly the construction
2252         of aggregates for a derived type that constrains some parent
2253         discriminants and renames others.
2255 2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>
2257         * sem_ch12.adb (Qualify_Universal_Operands): New routine.
2258         (Save_References_In_Operator): Add explicit qualifications in
2259         the generic template for all operands of universal type.
2260         * sem_type.adb (Disambiguate): Update the call to Matches.
2261         (Matches): Reimplemented.
2262         * sem_util.ads, sem_util.adb (Yields_Universal_Type): New routine.
2264 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
2266         * sem_ch13.adb (Rep_Item_Too_Late): Better error message for
2267         an illegal aspect that freezes the entity to which it applies.
2269 2016-04-20  Bob Duff  <duff@adacore.com>
2271         * a-stwibo.ads, a-stzbou.ads
2272         ("="): Add overriding keyword before function to avoid crash when
2273         compiler is called with -gnatyO (check overriding indicators).
2275 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
2277         * sem_prag.adb (Analyze_Pragma, case Check_Policy):  If this
2278         is a configuration pragma and it uses the ARG syntax, insert
2279         the rewritten pragma after the current one rather than using
2280         Insert_Actions.
2282 2016-04-20  Arnaud Charlet  <charlet@adacore.com>
2284         * exp_aggr.adb (Backend_Processing_Possible): Add handling of
2285         C back-end.
2287 2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>
2289         * s-imgllu.adb, sem_util.adb, s-imgint.adb, s-imguns.adb,
2290         s-imglli.adb: Minor reformatting.
2292 2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>
2294         * sem_res.adb (Rewrite_Renamed_Operator): Do not rewrite the
2295         renamed operator when the associated node appears within a
2296         pre/postcondition.
2297         * sem_util.ads, sem_util.adb (In_Pre_Post_Condition): New routine.
2299 2016-04-20  Yannick Moy  <moy@adacore.com>
2301         * osint.adb (Relocate_Path): Fix test when Path is shorter than Prefix.
2302         * einfo.adb (Set_Overridden_Operation): Add assertion.
2303         * sem_util.adb (Unique_Entity): for renaming-as-body return the spec
2304         entity.
2306 2016-04-20  Javier Miranda  <miranda@adacore.com>
2308         * exp_unst.adb (Append_Unique_Call): New subprogram.
2309         (Unnest_Subprogram): Replace the unique occurrence
2310         of Call.Append() by Append_Unique_Call() which protects us from
2311         adding to the Calls table duplicated entries.
2313 2016-04-20  Arnaud Charlet  <charlet@adacore.com>
2315         * exp_attr.adb (Is_GCC_Target): Fix for C backend.
2316         * xref_lib.ads (Dependencies_Tables): instantiate
2317         Table package with types that guarantee its safe use.
2318         * s-imgllu.adb, s-imgint.adb, s-imguns.adb, s-imglli.adb: Avoid nested
2319         procedures.
2321 2016-04-20  Arnaud Charlet  <charlet@adacore.com>
2323         * exp_attr.adb (Expand_N_Attribute_Reference [Attribute_Valid]):
2324         Disable expansion when generating C code.
2325         * sinfo.ads, inline.ads: Minor editing.
2327 2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>
2329         * sem_util.adb, contracts.adb, ghost.adb, exp_ch6.adb: Minor
2330         reformatting.
2332 2016-04-20  Javier Miranda  <miranda@adacore.com>
2334         * contracts.adb (Build_Postconditions_Procedure): Code cleanup.
2335         * ghost.adb (Os_OK_Ghost_Context.Is_OK_Declaration): Handle the
2336         declaration of the internally built _postcondition procedure.
2338 2016-04-20  Arnaud Charlet  <charlet@adacore.com>
2340         * snames.ads-tmpl (Internal_Attribute_Id, Attribute_Class_Array): Fix
2341         indentation.
2342         * sem_util.adb (Is_Unchecked_Conversion_Instance):
2343         defense against library-level renamings of other functions,
2344         which are never instances of Unchecked_Conversion.
2345         * einfo.ads: minor fix of casing in comment
2347 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
2349         * exp_ch6.adb (Expand_N_Subprogram_Stub): Do not expand a body
2350         that has been analyzed and expanded already. Qualify the names
2351         in the proper body for use in the generation of C code.
2353 2016-04-20  Javier Miranda  <miranda@adacore.com>
2355         * contracts.adb (Build_Postconditions_Procedure): Force its
2356         inlining when generating C code.
2357         * sem_attr.adb (Analyze_Attribute_Old_Result): Handle inlined
2358         _postconditions when generating C code.
2359         * exp_ch6.adb (Inlined_Subprogram): Inline calls to
2360         _postconditions when generating C code.
2361         * sinfo.ads, sinfo.adb (Corresponding_Spec, Set_Corresponding_Spec):
2362         types of return value and argument changed from Node_Id to
2363         Entity_Id.
2365 2016-04-20  Vincent Celier  <celier@adacore.com>
2367         * make.adb, clean.adb, gnatname.adb: Revert previous change for now.
2369 2016-04-20  Eric Botcazou  <ebotcazou@adacore.com>
2371         * sem_ch12.adb (Analyze_Instance_And_Renamings): Do not reset
2372         the Has_Delayed_Freeze flag on the anonymous instance node.
2374 2016-04-20  Javier Miranda  <miranda@adacore.com>
2376         * sem_ch5.adb (Analyze_Iterator_Specification): Remove transient
2377         scope associated with the renaming object declaration.
2378         * exp_util.adb (Insert_Actions): Remove handling of iterator
2379         loop marked as requiring the secondary stack.
2381 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
2383         * sem_attr.adb (Analyze_Attribute, case 'Image): Implement
2384         AI12-0124, which extends the functionality of the attribute so it
2385         reflects the semantics of GNAT 'Img when applied to scalar types.
2386         * lib-xref.adb: minor whitespace layout fix.
2388 2016-04-20  Vincent Celier  <celier@adacore.com>
2390         * clean.adb (Gnatclean): Fail if project file specified and
2391         gprclean is not available.
2392         * gnatname.adb: Fail is -P is used and gprname is not available.
2393         * make.adb (Initialize): Fail if project file specified and
2394         gprbuild is not available.
2396 2016-04-20  Bob Duff  <duff@adacore.com>
2398         * sem_ch5.adb (Analyze_Iterator_Specification): Do not use secondary
2399         stack when possible.
2401 2016-04-20  Gary Dismukes  <dismukes@adacore.com>
2403         * par_sco.adb, sem_util.adb, sem_ch13.adb: Minor typo corrections and
2404         reformatting.
2406 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
2408         * sem_prag.adb (Analyze_Pragma, case Default_Storage_Pool):
2409         If the pragma comes from an aspect specification, verify that
2410         the aspect applies to an entity with a declarative part.
2411         * exp_ch5.adb: Code cleanup.
2413 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
2415         * sem_res.adb (Resolve_If_Expression): If first expression is
2416         universal, resolve subsequent ones with the corresponding class
2417         type (Any_Integer or Any_Real).
2419 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
2421         * sem_ch5.adb (Analyze_Iterator_Specification): If expansion is
2422         disabled, complete the analysis of the iterator name to ensure
2423         that reference for entities within are properly generated.
2425 2016-04-20  Arnaud Charlet  <charlet@adacore.com>
2427         * a-dispat.ads (Yield): add Global contract.
2428         * a-calend.ads, a-reatim.ads: Added Initializes => Clock_Time.
2429         * a-taside.adb: Added Initializes => Tasking_State.
2431 2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>
2433         * sem_ch13.adb (Build_Invariant_Procedure):
2434         Reimplement the invariant procedure spec and body insertion.
2436 2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>
2438         * sem_ch13.adb (Add_Invariant): Do not replace
2439         the saved expression of an invariatn aspect when inheriting
2440         a class-wide type invariant as this clobbers the existing
2441         expression. Do not use New_Copy_List as it is unnecessary
2442         and leaves the parent pointers referencing the wrong part of
2443         the tree. Do not replace the type references for ASIS when
2444         inheriting a class-wide type invariant as this clobbers the
2445         existing replacement.
2447 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
2449         * sem_util.adb (Build_Explicit_Dereference): If the designated
2450         expression is an entity name, generate reference to the entity
2451         because it will not be resolved again.
2453 2016-04-19  Arnaud Charlet  <charlet@adacore.com>
2455         * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
2456         gnat_rm.texi: Update documentation.
2458 2016-04-19  Olivier Hainque  <hainque@adacore.com>
2460         * par_sco.adb (Traverse_One, case N_Case_Statement):
2461         Skip pragmas before the first alternative.
2462         (Traverse_Handled_Statement_Sequence, Exception_Handlers): Likewise.
2464 2016-04-19  Tristan Gingold  <gingold@adacore.com>
2466         * adaint.c (__gnat_lwp_self): New function (for darwin).
2467         * s-osinte-darwin.ads, s-osinte-darwin.adb (lwp_self): Import
2468         of __gnat_lwp_self.
2470 2016-04-19  Olivier Hainque  <hainque@adacore.com>
2472         * sem_util.adb (Build_Elaboration_Entity): Always request an
2473         elab counter when preserving control-flow.
2475 2016-04-19  Olivier Hainque  <hainque@adacore.com>
2477         * sem_ch13.adb (Build_Invariant_Procedure_Declaration): Set
2478         Needs_Debug_Info when producing SCOs.
2479         * par_sco.adb (Traverse_Aspects): Fix categorization of
2480         Type_Invariant to match actual processing as activated depending
2481         on pragma Assertion_Policy.
2482         * sem_prag.adb (Analyze_Pragma): Remove special case for
2483         Name_Invariant regarding SCO generation, which completely disabled
2484         the production of SCOs for Invariant pragmas and aspects.
2486 2016-04-19  Hristian Kirtchev  <kirtchev@adacore.com>
2488         * checks.adb, sem_util.adb, sem_res.adb, sem_attr.adb: Minor
2489         reformatting.
2491 2016-04-19  Ed Schonberg  <schonberg@adacore.com>
2493         * freeze.adb (Freeze_Profile): Refine predicate that checks
2494         whether a function that returns a limited view is declared in
2495         another unit and cannot be frozen at this point.
2497 2016-04-19  Ed Schonberg  <schonberg@adacore.com>
2499         * exp_aggr.adb (Component_Count): Handle properly superflat
2500         arrays, i.e. empty arrays where Hi < Lo - 1, to ensure that the
2501         return value of the function is Natural, rather than leaving
2502         the handling of such arrays to the caller of this function.
2504 2016-04-19  Arnaud Charlet  <charlet@adacore.com>
2506         * sem_prag.adb, sem_attr.adb, par-prag.adb, exp_aggr.adb, sem_type.adb
2507         sem_ch12.adb, sem_ch3.adb, exp_ch7.adb, exp_ch9.adb: Code cleanup.
2508         * sem_res.adb, sem_util.ads, sem_util.adb (Is_OK_Volatile_Context):
2509         Promoted from being a nested subprogram in Sem_Res.Resolve_Entity_Name
2510         to publicly visible routine in Sem_Util.
2512 2016-04-19  Ed Schonberg  <schonberg@adacore.com>
2514         * checks.adb (Apply_Parameter_Aliasing_Checks): Do not apply
2515         the check if the type of the actual is By_Reference.
2517 2016-04-19  Arnaud Charlet  <charlet@adacore.com>
2519         * sem_res.adb (Within_Subprogram_Call): Detect
2520         also nodes that appear in entry calls.
2521         (Resolve_Actuals, Insert_Default): Propagate
2522         dimension information if any, from default expression to the
2523         copy that appears in the list of actuals.
2524         * uintp.ads: minor whitespace fix in comment.
2525         * sem_prag.adb, stringt.adb, inline.adb, lib-xref-spark_specific.adb:
2526         Minor code cleanup.
2527         * set_targ.adb (Set_Targ): convert directly from
2528         Natural to Pos, without intermediate conversion to Int.
2530 2016-04-19  Arnaud Charlet  <charlet@adacore.com>
2532         * sem_ch6.adb (Process_Formals): Mark suspicious reference to
2533         SPARK RM in comment.
2534         * sem_prag.adb (Analyze_Global_Item): Fix reference to SPARK RM
2535         in comment.
2536         * sem_res.adb (Property_Error, Resolve_Actuals): Fix reference
2537         to SPARK RM in both comment and error message.
2539 2016-04-19  Eric Botcazou  <ebotcazou@adacore.com>
2541         * sem_ch6.adb (Possible_Freeze): If the type is an incomplete
2542         CW type, then the subprogram must have a delayed freeze. This
2543         ensures that the backend can properly recover the full view when
2544         elaborating the access subprogram declaration.
2546 2016-04-19  Ed Schonberg  <schonberg@adacore.com>
2548         * sem_attr.adb (Resolve_Attribute, case 'Access): Freeze
2549         overloadable entity if originally overloaded.
2551 2016-04-19  Arnaud Charlet  <charlet@adacore.com>
2553         * exp_aggr.adb, exp_ch3.adb, exp_ch7.adb, exp_ch9.adb, exp_code.adb,
2554         exp_fixd.adb, namet.adb, osint.adb, osint.ads, par-ch2.adb,
2555         sem_ch10.adb, sem_ch12.adb, sem_disp.adb, sem_elab.adb, sem_elim.adb
2556         sem_util.adb, styleg.adb, styleg.ads, stylesw.ads: Minor code
2557         clean up.
2559 2016-04-19  Arnaud Charlet  <charlet@adacore.com>
2561         * sem_util.adb (Copy_Node_With_Replacement):
2562         use Set_Comes_From_Source instead of directly manipulating
2563         internals of the node table.
2564         * sem_util.adb (Within_Scope): refactored to remove duplicated code.
2565         * sem_aux.adb (Get_Rep_Pragma,
2566         Subprogram_Body_Entity, Subprogram_Spec): declare variables that
2567         do not change as constants and initialize them in the declaration.
2568         (Get_Rep_Pragma, Subprogram_Body_Entity, Subprogram_Spec): declare
2569         variables that do not change as constants and initialize them
2570         in the declaration.
2572 2016-04-19  Ed Schonberg  <schonberg@adacore.com>
2574         * sem_res.adb (Resolve_Entry_Call): If the entry has
2575         preconditions it is rewritten by means of a wrapper that
2576         incorporates the original call. Before rewriting generate a
2577         reference to the entry being called to prevent spurious warnings
2578         and provide correct cross-reference information.
2580 2016-04-19  Hristian Kirtchev  <kirtchev@adacore.com>
2582         * sem_disp.adb (Check_Dispatching_Context): Code cleanup. Add
2583         local constant Scop. Ignore any internally generated loops when
2584         performing the check concerning an abstract subprogram call
2585         without a controlling argument.
2586         * sem_util.ads, sem_util.adb (Current_Scope_No_Loops): New routine.
2588 2016-04-19  Bob Duff  <duff@adacore.com>
2590         * sem_elab.adb (Check_A_Call): There are cases where we have No
2591         (Ent) after the Alias loop, even when there was no previous error,
2592         so we can't assert that there was an error.
2594 2016-04-19  Ed Schonberg  <schonberg@adacore.com>
2596         * sem_attr.adb (Analyze_Access_Attribute, OK_Self_Reference):
2597         Reject use of type name as a prefix to 'access within an aggregate
2598         in a context that is not the declarative region of a type.
2600 2016-04-19  Vincent Celier  <celier@adacore.com>
2602         * gnatcmd.adb: Make "gnat ls -P" invoke gprls Make "gnat bind
2603         -P" invoke "gprbuild -b" Make "gnat link -P" invoke "gprbuild
2604         -l" Fail if the invocation is "gnat find -P" or "gnat xref -P"
2605         Remove anything related to project files
2606         * g-mbdira.adb: minor whitespace cleanup
2607         * g-spipat.adb: minor removal of extra spaces after closing paren
2609 2016-04-19  Ed Schonberg  <schonberg@adacore.com>
2611         * exp_ch6.adb (Expand_Actuals):  If post-statements are present
2612         and the enclosing context is a function call or indexing, build
2613         an Expression_With_Actions for the call.
2615 2016-04-19  Hristian Kirtchev  <kirtchev@adacore.com>
2617         * lib-writ.adb (Write_With_Lines): Code cleanup. Do not generate
2618         a with line for an ignored Ghost unit.
2619         * sem_ch7.adb (Analyze_Package_Declaration): Add local constant
2620         Par. A child package is Ghost when its parent is Ghost.
2621         * sem_prag.adb (Analyze_Pragma): Pragma Ghost can now apply to
2622         a subprogram declaration that acts as a compilation unit.
2624 2016-04-18  Michael Matz  <matz@suse.de>
2626         * gcc-interface/decl.c (gnat_to_gnu_entity): Use SET_TYPE_ALIGN.
2627         (gnat_to_gnu_field): Ditto.
2628         (components_to_record): Ditto.
2629         (create_variant_part_from): Ditto.
2630         (copy_and_substitute_in_size): Ditto.
2631         (substitute_in_type): Ditto.
2632         * gcc-interface/utils.c (make_aligning_type): Use SET_TYPE_ALIGN.
2633         (make_packable_type): Ditto.
2634         (maybe_pad_type): Ditto.
2635         (finish_fat_pointer_type): Ditto.
2636         (finish_record_type): Ditto and use SET_DECL_ALIGN.
2637         (rest_of_record_type_compilation): Use SET_TYPE_ALIGN.
2638         (create_field_decl): Use SET_DECL_ALIGN.
2640 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
2642         * einfo.adb (Overridden_Operation): assert that
2643         function is called for valid arguments.
2644         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, sem_type.adb,
2645         s-osinte-vxworks.ads, a-ngcefu.adb, sem_ch10.adb, einfo.ads,
2646         sem_prag.adb, sem_ch12.adb, sem.adb, i-cobol.ads, freeze.adb,
2647         sem_util.adb, a-chtgop.ads, s-rannum.adb, exp_ch6.adb, s-bignum.adb,
2648         s-osinte-freebsd.ads, par-ch5.adb, a-chtgbo.ads, a-cofove.adb:
2649         No space after closing parenthesis except where required for
2650         layout.
2651         * sem_res.adb: Minor reformatting.
2653 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
2655         * exp_ch4.adb (Expand_N_Case_Expression): Convert into a case
2656         statement when relevant.
2658 2016-04-18  Bob Duff  <duff@adacore.com>
2660         * a-cuprqu.adb (Enqueue): Properly handle the
2661         case where the new element has a unique priority.
2663 2016-04-18  Tristan Gingold  <gingold@adacore.com>
2665         * adaint.h: Define stat structures and functions for iOS
2666         simulator.
2668 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
2670         * sem_res.adb (Resolve_Entry_Call): reset
2671         Is_Overloaded flag after resolving calls to overloaded protected
2672         operations.
2673         * exp_spark.adb (Expand_SPARK): call
2674         Qualify_Entity_Names for tasking nodes, i.e. protected types,
2675         task types and entries.
2676         * exp_ch4.adb (Expand_N_If_Expression): Refine previous change
2677         in case of an unconstrained type.
2679 2016-04-18  Yannick Moy  <moy@adacore.com>
2681         * sem_eval.adb, sem_eval.ads (Check_Non_Static_Context): Add
2682         comment to document usage of subprogram in GNATprove.
2684 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
2686         * sem_prag.adb (Analyze_Pragma, case Test_Case): Improve error
2687         message for wrong placement of aspect Test_Case.
2689 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
2691         * einfo.ads: Update the documentation of attribute Renamed_Object.
2692         * exp_spark.adb (Expand_Potential_Renaming): Reimplemented.
2694 2016-04-18  Gary Dismukes  <dismukes@adacore.com>
2696         * exp_ch4.adb (Optimize_Length_Comparison): Return immediately
2697         in the case of AAMP (same as for use of the -gnatd.P switch) to
2698         suppress this optimization, which avoids creating a dependence
2699         on the 64-bit arithmetic package.
2701 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
2703         * exp_ch4.adb: Update comment.
2705 2016-04-18  Eric Botcazou  <ebotcazou@adacore.com>
2707         * exp_ch6.adb (Expand_Call): Make sure instantiations are
2708         registered only once as pending here.
2710 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
2712         * exp_ch4.adb, gnat1drv.adb, opt.ads, sem_res.adb
2713         (Minimize_Expression_With_Actions): New flag.
2714         (Adjust_Global_Switches): Set Minimize_Expression_With_Actions
2715         when generating C.
2716         (Resolve_Short_Circuit): Redo previous change
2717         using Minimize_Expression_With_Actions.
2718         (Expand_N_If_Expression,
2719         Expand_Short_Circuit_Operator): Restore old code to avoid
2720         Expression_With_Actions when Minimize_Expression_With_Actions
2721         is set.
2723 2016-04-18  Vincent Celier  <celier@adacore.com>
2725         * s-os_lib.adb (Non_Blocking_Spawn, version with Stdout_File and
2726         Stderr_File): Close local file descriptors when no longer needed.
2728 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
2730         * sem_ch5.adb (Analyze_Iterator_Specification): Remove SPARK
2731         mode check that the type of the cursor in an iteration over
2732         a formal container is not volatile. The proper check on the
2733         element type is done elsewhere.
2735 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
2737         * sem_ch6.adb (Process_Formals): Do not set a delay freeze on
2738         a subprogram that returns a class-wide type, if the subprogram
2739         is a compilation unit, because otherwise gigi will treat the
2740         subprogram as external, leading to link errors.
2742 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
2744         * sem_res.adb (Resolve_Short_Circuit): Do not use
2745         expression-with-actions when generating C.
2747 2016-04-18  Yannick Moy  <moy@adacore.com>
2749         * sem_util.adb (Apply_Compile_Time_Constraint_Error): Do not generate
2750         raise node in GNATprove mode.
2752 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
2754         * s-fileio.adb: Minor reformatting.
2755         * sem_prag.adb (Analyze_Input_Item): Add local
2756         variable Input_OK. Do not consider mappings of generic formal
2757         parameters to actuals.
2759 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
2761         * sem_ch5.adb (Get_Cursor_Type): If iterator type is a derived
2762         type, the cursor is declared in the scope of the parent type.
2763         (Analyze_Parameter_Specification): A qualified expression with an
2764         iterator type indicates an iteration over a container (explicit
2765         or implicit).
2767 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
2769         * osint-c.ads, osint-c.adb (Delete_C_File, Delete_H_File): New.
2770         * gnat1drv.adb (Gnat1drv): Delete old C files before regenerating them.
2771         * debug.adb: Reserve -gnatd.4 to force generation of C files.
2773 2016-04-18  Yannick Moy  <moy@adacore.com>
2775         * sem_eval.adb (Eval_Arithmetic_Op): Do not issue error on static
2776         division by zero, instead possibly issue a warning.
2777         * sem_res.adb (Resolve_Arithmetic_Op): Do not issue error on
2778         static division by zero, instead add check flag on original
2779         expression.
2780         * sem_util.adb, sem_util.ads (Compile_Time_Constraint_Error):
2781         Only issue error when both SPARK_Mode is On and Warn is False.
2783 2016-04-18  Yannick Moy  <moy@adacore.com>
2785         * checks.adb (Apply_Scalar_Range_Check): Force
2786         warning instead of error when SPARK_Mode is On, on index out of
2787         bounds, and set check flag for GNATprove.
2789 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
2791         * sem_prag.adb (Check_In_Out_States.Check_Constituent_Usage):
2792         Update the comment on usage.  Reimplemented.
2793         (Check_Input_States.Check_Constituent_Usage): Update the comment
2794         on usage. A Proof_In constituent can now refine an Input state
2795         as long as there is at least one Input constituent present.
2797 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
2799         * sem_ch6.adb (Check_Inline_Pragma): Use the Sloc of the
2800         body id as the sloc of the entity in the generated subprogram
2801         declaration, to avoid spurious conformance errors when style
2802         checks are enabled.
2804 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
2806         * sem_ch4.adb (Analyze_Selected_Component, Has_Dereference):
2807         Refine check on illegal calls to entities within a task body,
2808         when the entity is declared in an object of the same type. In
2809         a generic context there might be no explicit dereference but if
2810         the prefix includes an access type the construct is legal.
2812 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
2814         * rtsfind.ads, rtsfind.adb (RE_Id, RE_Unit_Table): add
2815         RE_Default_Priority.
2817 2016-04-18  Bob Duff  <duff@adacore.com>
2819         * sem_prag.adb (Check_Arg_Is_Local_Name): Don't do the check
2820         if the pragma came from an aspect specification.
2822 2016-04-18  Gary Dismukes  <dismukes@adacore.com>
2824         * gnat1drv.adb, contracts.adb: Minor reformatting and wording fixes.
2826 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
2828         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): To suppress
2829         superfluous conformance check on an inlined body with a previous
2830         spec, use the fact that the generated declaration does not come
2831         from source. We must treat the entity as coming from source to
2832         enable some back-end inlining when pragma appears after the body.
2834 2016-04-18  Gary Dismukes  <dismukes@adacore.com>
2836         * lib-xref-spark_specific.adb, par-ch2.adb, errout.ads,
2837         exp_intr.adb: Minor reformatting and typo corrections.
2839 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
2841         * sem_ch6.adb: Code cleanup.
2843 2016-04-18  Thomas Quinot  <quinot@adacore.com>
2845         * sem_ch13.adb: Minor reformatting and error message tweaking
2846         (remove extraneous spaces).
2848 2016-04-18  Johannes Kanig  <kanig@adacore.com>
2850         * gnat1drv.adb (Gnat1drv): Force loading of System unit for SPARK.
2852 2016-04-18  Bob Duff  <duff@adacore.com>
2854         * s-fileio.adb (Fopen_Mode): If Mode = Out_File, and the file
2855         exists, and it's a fifo, we use "w" as the open string instead of
2856         "r+". This is necessary to make a write to the fifo block until
2857         a reader is ready.
2859 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
2861         * sem_attr.adb (Denote_Same_Function): Account
2862         for a special case where a primitive of a tagged type inherits
2863         a class-wide postcondition from a parent type.
2865 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
2867         * par-ch2.adb (P_Expression_Or_Reserved_Word): New routine.
2868         (P_Pragma): Signal Scan_Pragma_Argument_Association when the use
2869         of reserved words is OK.
2870         (Scan_Pragma_Argument_Association):
2871         Add new formal Reserved_Words_OK and update the comment on
2872         usage. Code cleanup. Parse an expression or a reserved word in
2873         identifier form for pragmas Restriction_Warnings and Restrictions
2874         No_Use_Of_Attribute.
2875         * restrict.adb (Check_Restriction_No_Use_Of_Attribute):
2876         Reimplemented.  (Check_Restriction_No_Use_Of_Pragma): Code cleanup.
2877         (Set_Restriction_No_Specification_Of_Aspect): Properly set the warning
2878         flag for an aspect.
2879         (Set_Restriction_No_Use_Of_Attribute): Properly set the warning
2880         flag for an attribute.  (Set_Restriction_No_Use_Of_Entity):
2881         Update the parameter profile.
2882         (Set_Restriction_No_Use_Of_Pragma): Properly set the warning flag for
2883         a pragma.
2884         * restrict.ads (Check_Restriction_No_Use_Of_Attribute): Update
2885         the comment on usage.
2886         (Set_Restriction_No_Use_Of_Entity): Update the parameter profile.
2887         * sem_attr.adb (Analyze_Attribute): Check restriction
2888         No_Use_Of_Attribute.
2889         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Check
2890         restriction No_Use_Of_Attribute before any rewritings have
2891         taken place.
2892         * sem_prag.adb (Analyze_Pragma): Check restriction
2893         No_Use_Of_Pragma before any rewritings have taken place.
2895 2016-04-18  Bob Duff  <duff@adacore.com>
2897         * sem_ch6.adb (Is_Inline_Pragma): The pragma
2898         argument can be a selected component, which has no Chars field,
2899         so we need to deal with that case (use the Selector_Name).
2900         (Check_Inline_Pragma): We need to test Is_List_Member before
2901         calling In_Same_List, because in case of a library unit, they're
2902         not in lists, so In_Same_List fails an assertion.
2904 2016-04-18  Bob Duff  <duff@adacore.com>
2906         * namet.ads, namet.adb: Add an Append that appends a
2907         Bounded_String onto a Bounded_String. Probably a little more
2908         efficient than "Append(X, +Y);". Also minor cleanup.
2909         (Append_Decoded, Append_Decoded_With_Brackets, Append_Unqualified,
2910         Append_Unqualified_Decoded): Make sure these work with non-empty
2911         buffers.
2912         * casing.ads, casing.adb (Set_Casing): Pass a Bounded_String
2913         parameter, defaulting to Global_Name_Buffer.
2914         * errout.ads, errout.adb (Adjust_Name_Case): Pass a
2915         Bounded_String parameter, no default.
2916         * exp_ch11.adb (Expand_N_Raise_Statement): Use local
2917         Bounded_String instead of Global_Name_Buffer.
2918         * exp_intr.ads, exp_intr.adb (Write_Entity_Name): Rename it
2919         to Append_Entity_Name, and pass a Bounded_String parameter,
2920         instead of using globals.
2921         (Add_Source_Info): Pass a Bounded_String parameter, instead of
2922         using globals.
2923         (Expand_Source_Info): Use local instead of globals.
2924         * stringt.ads, stringt.adb (Append): Add an Append procedure
2925         for appending a String_Id onto a Bounded_String.
2926         (String_To_Name_Buffer, Add_String_To_Name_Buffer): Rewrite in
2927         terms of Append.
2928         * sem_prag.adb (Set_Error_Msg_To_Profile_Name): Adjust for new
2929         Adjust_Name_Case parameter.
2930         * erroutc.adb, uname.adb: Don't pass D => Mixed_Case to
2931         Set_Casing; that's the default.
2932         * lib-xref-spark_specific.adb (Add_SPARK_Scope): Pretend that calls to
2933         protected subprograms are entry calls; otherwise it is not possible to
2934         distinguish them from regular subprogram calls.
2936 2016-04-18  Gary Dismukes  <dismukes@adacore.com>
2938         * sem_ch13.adb (Has_Good_Profile): Improvement
2939         of error message. Now indicates subtype_mark of formal parameter
2940         rather than the formal's name, plus minor rewording.
2942 2016-04-18  Pascal Obry  <obry@adacore.com>
2944         * adaint.c, adaint.h, s-os_lib.ads: Add new routine Current_Process_Id.
2946 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
2948         * stringt.adb, exp_ch6.adb, sem_ch13.adb: Minor reformatting.
2950 2016-04-18  Gary Dismukes  <dismukes@adacore.com>
2952         * par-ch4.adb, sem_prag.adb: Minor reformatting.
2954 2016-04-18  Bob Duff  <duff@adacore.com>
2956         * sinput.ads, sinput.adb (Build_Location_String): Take a
2957         parameter instead of using a global variable.  The function
2958         version no longer destroys the Name_Buffer.
2959         * stringt.ads, stringt.adb (String_From_Name_Buffer): Take a
2960         parameter, which defaults to the Global_Name_Buffer, so some
2961         calls can avoid the global.
2962         * exp_ch11.adb, exp_intr.adb: Use new interfaces above
2963         to avoid using globals. All but one call to Build_Location_String
2964         avoids the global. Only one call to String_From_Name_Buffer
2965         avoids it.
2967 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
2969         * namet.adb, namet.ads, exp_unst.adb: Minor reformatting.
2971 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
2973         * sem_eval.adb (Choice_Matches): Check the expression
2974         against the predicate values when the choice denotes a
2975         subtype with a static predicate.
2976         (Eval_Membership_Op): Code cleanup. Remove the suspicious guard which
2977         tests for predicates.
2978         (Is_OK_Static_Subtype): A subtype with a dynamic predicate
2979         is not static.  (Is_Static_Subtype): A subtype with a dynamic
2980         predicate is not static.
2981         * sem_eval.ads (Is_OK_Static_Subtype): Update the comment on usage.
2982         (Is_Static_Subtype): Update the comment on usage.
2984 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
2986         * sem_prag.adb (Analyze_Input_Item): Allow
2987         generic formals to appear as initialization items.
2989 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
2991         * sem_ch13.adb (Analyze_Stream_TSS_Definition,
2992         Has_Good_Profile): Additional error message to indicate that
2993         the second parameter of the subprogram must be a first subtype.
2995 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
2997         * sem_ch6.adb (Analyze_Subprogram_Body_Helper, Is_Inline_Pragma):
2998         Use the pragma lookahead that determines whether a subprogram
2999         is to be inlined, when some level of backend optimization is
3000         required.
3001         * sem_ch12.ads, sem_ch12.adb (Add_Pending_Instantiation): Factorize
3002         code used to create an instance body when needed for inlining.
3003         * exp_ch6.adb (Expand_Call): When a call is to be inlined, and the
3004         call appears within an instantiation that is not a compilation
3005         unit, add a pending instantiation for the enclosing instance,
3006         so the backend can inline in turn the calls contained in the
3007         inlined body.
3009 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
3011         * sem_prag.adb (Build_Pragma_Check_Equivalent): The mapping
3012         that relates operations of the parent type to the operations of
3013         the derived type has three distinct sources:
3014         a) explicit operations of the derived type carry an
3015         Overridden_Operation that designates the operation in the
3016         ancestor.
3017         b) Implicit operations that are inherited by the derived type
3018         carry an alias that may be an explicit subprogram (in which case
3019         it may have an Overridden_ Operation indicator) or may also be
3020         inherited and carry its own alias.
3021         c) If the parent type is an interface, the operation of the
3022         derived type does not override, but the interface operation
3023         indicates the operation that implements it.
3024         * sem_prag.adb: Minor reformatting.
3025         * sem_prag.adb (Check_External_Property): Update
3026         the comment on usage. Reimplement.
3028 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
3030         * exp_ch5.adb (Expand_Assignment_Statement): In restricted
3031         profiles such as ZFP, ceiling priority is not available.
3033 2016-04-18  Bob Duff  <duff@adacore.com>
3035         * namet-sp.ads: Minor typo fix, ironically in 'Spelling_Checker'.
3037 2016-04-18  Bob Duff  <duff@adacore.com>
3039         * sem_elab.adb (Output_Calls): Use
3040         Get_Name_String, to clearly indicate that the global Name_Buffer
3041         is being used. The previous code used Is_Internal_Name, which
3042         returns a Boolean, but also has a side effect of setting the
3043         Name_Buffer. Then it called the other Is_Internal_Name, which uses
3044         the Name_Buffer for its input. And then it called Error_Msg_N,
3045         again using the Name_Buffer. We haven't eliminated the global
3046         usage here, but we've made it a bit clearer.
3047         This also allows us to have a side-effect-free version of
3048         Is_Internal_Name.
3049         * namet.ads, namet.adb: Provide a type Bounded_String, along with
3050         routines that can be used without using global variables. Provide
3051         Global_Name_Buffer so existing code can continue to use the
3052         global. Mark the routines that use globals as obsolete.  New code
3053         shouldn't call the obsolete ones, and we should clean up existing
3054         code from time to time.
3055         Name_Find_Str is renamed as Name_Find.
3056         * namet.h: Changed as necessary to interface to the new version
3057         of Namet.
3058         * bindgen.adb, exp_unst.adb: Name_Find_Str is renamed as
3059         Name_Find.
3061 2016-04-18  Yannick Moy  <moy@adacore.com>
3063         * sem_util.adb, sem_util.ads (Has_Full_Default_Initialization): used
3064         outside of GNATprove, hence it should not be removed.
3066 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
3068         * sem_prag.adb (Analyze_Refinement_Clause):
3069         The refinement of an external abstract state can now mention
3070         non-external constituents.
3071         (Check_External_Property): Update all SPARK RM references.
3073 2016-04-18  Bob Duff  <duff@adacore.com>
3075         * exp_intr.adb: Remove some duplicated code.
3077 2016-04-18  Yannick Moy  <moy@adacore.com>
3079         * a-nudira.adb, a-nudira.ads, a-nuflra.adb, a-nuflra.ads: Mark
3080         package spec and body out of SPARK.
3082 2016-04-18  Johannes Kanig  <kanig@adacore.com>
3084         * spark_xrefs.ads: Minor comment update.
3086 2016-04-18  Johannes Kanig  <kanig@adacore.com>
3088         * gnat1drv.adb (Gnat1drv): Force loading of System
3089         unit for SPARK.
3091 2016-04-18  Bob Duff  <duff@adacore.com>
3093         * a-cuprqu.adb: Correction to previous change. If a new node
3094         is inserted at the front of the queue (because it is higher
3095         priority than the previous front node), we need to update
3096         Header.Next_Unequal -- not just in the case where the queue was
3097         previously empty.
3099 2016-04-18  Bob Duff  <duff@adacore.com>
3101         * a-cuprqu.ads: Change the representation of List_Type from a
3102         singly-linked list to a doubly-linked list. In addition, add a
3103         pointer Next_Unequal, which points past a possibly-long chain
3104         of equal-priority items. This increases efficiency, especially
3105         in the case of many equal-priority items.
3106         * a-cuprqu.adb (Dequeue, Enqueue): Rewrite algorithms to take
3107         advantage of new data structure.
3108         (Finalize): Rewrite in terms of Dequeue, for simplicity.
3110 2016-04-18  Yannick Moy  <moy@adacore.com>
3112         * contracts.adb (Analyze_Object_Contract,
3113         Analyze_Protected_Contract): Remove tests performed in GNATprove.
3114         * sem_util.adb, sem_util.ads (Has_Full_Default_Initialization):
3115         Remove query for tests performed in GNATprove.
3117 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
3119         * sem_aggr.adb (Resolve_Record_Aggregate): If
3120         Warn_On_Redundant_Constructs is enabled, report a redundant box
3121         association that does not cover any components, as it done for
3122         redundant others associations in case statements.
3124 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
3126         * sem_prag.adb (Collect_Inherited_Class_Wide_Conditions):
3127         Analyze the generated Check pragma for an inherited condition so
3128         that it does not freeze the dispatching type of the primitive
3129         operation, because it is pre-analyzed at the point of the
3130         subprogram declaration (and not in the subprogram body, as is
3131         done during regular expansion).
3133 2016-04-18  Vincent Celier  <celier@adacore.com>
3135         * ali.ads: Increase the range of all _Id types to 100 millions.
3137 2016-04-18  Gary Dismukes  <dismukes@adacore.com>
3139         * sem_warn.adb (Check_References): Change warning to suggest
3140         using pragma Export rather than saying "volatile has no effect".
3142 2016-04-18  Bob Duff  <duff@adacore.com>
3144         * g-souinf.ads (Compilation_ISO_Date): New function to return
3145         the current date in ISO form.
3146         * exp_intr.adb (Expand_Source_Info, Add_Source_Info): Expand
3147         a call to Compilation_ISO_Date into a string literal containing
3148         the current date in ISO form.
3149         * exp_intr.ads (Add_Source_Info): Improve documentation.
3150         * sem_intr.adb (Check_Intrinsic_Subprogram): Recognize
3151         Compilation_ISO_Date.
3152         * snames.ads-tmpl (Name_Compilation_ISO_Date): New Name_Id.
3154 2016-04-18  Eric Botcazou  <ebotcazou@adacore.com>
3156         * layout.adb (Set_Elem_Alignment): Extend setting of alignment
3157         to subtypes that are not first subtypes.
3159 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
3161         * sem_prag.ads (Collect_Inherited_Class_Wide_Conditions):
3162         Simplify interface.
3163         * sem_prag.adb (Collect_Inherited_Class_Wide_Conditions): Insert
3164         generated pragmas after subprogram declaration, rather than in
3165         the corresponding subprogram body.
3166         * sem_ch6.adb (New_Overloaded_Entity): In GNATProve
3167         mode, if the operation is overridding, call
3168         Collect_Inherited_Class_Wide_Conditions to generate the
3169         corresponding pragmas immediately after the corresponding
3170         subprogram declaration.
3172 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
3174         * spark_xrefs.ads (Xref_Index, Scope_Index, File_Index): restrict
3175         type to natural numbers.
3176         (Stype): document code characters for concurrent entities.
3178 2016-04-18  Olivier Hainque  <hainque@adacore.com>
3180         * targparm.ads: Update the Frontend_Exceptions default internal
3181         value.
3182         (Frontend_Exceptions_On_Target): Change default value to True.
3184 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
3186         * sem_ch4.adb (Analyze_Selected_Component): Refine error
3187         detection when a selected component in the body of a synchronized
3188         type is a reference to an object of the same type declared
3189         elsewhere. The construct is legal if the prefix of the selected
3190         component includes an explicit dereference at any point.
3192 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
3194         * sem_ch3.adb (Analyze_Object_Declaration): Do not consider
3195         internally generated expressions when trying to determine whether
3196         a formal parameter of a tagged type subject to Extensions_Visible
3197         False is used to initialize an object.
3198         * sem_ch4.adb (Analyze_Type_Conversion): Do not consider
3199         internally generated expressions when trying to determine whether
3200         a formal parameter of a tagged type subject to Extensions_Visible
3201         False is used in a type conversion.
3203 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
3205         * sem_res.adb (Is_Protected_Operation_Call):
3206         Add guards to account for a non-decorated selected component.
3208 2016-04-18  Yannick Moy  <moy@adacore.com>
3210         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Improve
3211         implementation of Body_Has_SPARK_Mode_On.
3212         * sem_prag.adb, sem_prag.ads (Get_SPARK_Mode_From_Annotation):
3213         New function replacing previous Get_SPARK_Mode_From_Pragma, that
3214         deals also with aspects.
3215         (Get_SPARK_Mode_Type): Make function internal again.
3216         * inline.adb, sem_ch7.adb, sem_util.adb: Use new
3217         Get_SPARK_Mode_From_Annotation.
3219 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
3221         * contracts.adb (Analyze_Object_Contract): Update references to
3222         SPARK RM.
3223         * freeze.adb (Freeze_Entity): Update references to SPARK RM.
3224         * ghost.adb Add with and use clauses for Sem_Disp.
3225         (Check_Ghost_Derivation): Removed.
3226         (Check_Ghost_Overriding):
3227         Reimplemented.  (Check_Ghost_Policy): Update references to SPARK RM.
3228         (Check_Ghost_Primitive): New routine.
3229         (Check_Ghost_Refinement): New routine.  (Is_OK_Ghost_Context):
3230         Update references to SPARK RM.  (Is_OK_Pragma): Update references
3231         to SPARK RM. Predicates are now a valid context for references
3232         to Ghost entities.
3233         * ghost.ads (Check_Ghost_Derivation): Removed.
3234         (Check_Ghost_Overriding): Update the comment on usage.
3235         (Check_Ghost_Primitive): New routine.
3236         (Check_Ghost_Refinement): New routine.
3237         (Remove_Ignored_Ghost_Code): Update references to SPARK RM.
3238         * sem_ch3.adb (Process_Full_View): Remove the now obsolete check
3239         related to Ghost derivations
3240         * sem_ch6.adb (Check_Conformance): Remove now obsolete check
3241         related to the convention-like behavior of pragma Ghost.
3242         (Check_For_Primitive_Subprogram): Verify that the Ghost policy
3243         of a tagged type and its primitive agree.
3244         * sem_prag.adb (Analyze_Pragma): Update references to SPARK
3245         RM. Move the verification of pragma Assertion_Policy Ghost
3246         to the proper place. Remove the now obsolete check related
3247         to Ghost derivations.
3248         (Collect_Constituent): Add a call to Check_Ghost_Refinement.
3249         * sem_res.adb (Resolve_Actuals): Update references to SPARK RM.
3251 2016-04-18  Eric Botcazou  <ebotcazou@adacore.com>
3253         * layout.adb: Fix more minor typos in comments.
3255 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
3257         * a-calend.ads, sem_prag.adb, sem_ch6.adb: Minor reformatting.
3259 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
3261         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): In GNATprove
3262         mode, collect inherited class-wide conditions to generate the
3263         corresponding pragmas.
3264         * sem_prag.ads (Build_Pragma_Check_Equivalent): Moved from contracts
3265         * contracts.adb (Collect_Inherited_Class_Wide_Conditions): New
3266         procedure for overriding subprograms, used to generate the pragmas
3267         corresponding to an inherited class- wide pre- or postcondition.
3268         * sem_prag.adb (Build_Pragma_Check_Equivalent): moved here
3269         from contracts.adb (Replace_Condition_Entities): Subsidiary
3270         Build_Pragma_Check_Equivalent, to implement the proper semantics
3271         of inherited class-wide conditions, as given in AI12-0113.
3272         (Process_Class_Wide_Condition): Removed.
3273         (Collect_Inherited_Class_Wide_Conditions): Iterate over pragmas
3274         in contract of subprogram, to collect inherited class-wide
3275         conditions.
3276         (Build_Pragma_Check_Equivalent): Moved to sem_prag.adb
3278 2016-04-18  Yannick Moy  <moy@adacore.com>
3280         * a-calend.adb (Ada.Calendar): Mark package body as SPARK_Mode Off.
3281         * a-calend.ads (Ada.Calendar): Mark package spec as
3282         SPARK_Mode and add synchronous external abstract state Clock_Time.
3284 2016-04-18  Yannick Moy  <moy@adacore.com>
3286         * sem_res.adb (Resolve_Call): Prevent inlining of
3287         calls inside expression functions.  Factor previous code issuing
3288         errors to call Cannot_Inline instead, which does appropriate
3289         processing of message for GNATprove.
3291 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
3293         * einfo.ads, sem_ch3.adb, sem_ch8.adb, osint-l.adb, rtsfind.adb,
3294         osint-b.adb: Cleanups.
3296 2016-04-18  Yannick Moy  <moy@adacore.com>
3298         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Only create
3299         body to inline in GNATprove mode when SPARK_Mode On applies to
3300         subprogram body.
3301         * sem_prag.adb, sem_prag.ads (Get_SPARK_Mode_Type): Make function
3302         public.
3304 2016-04-18  Eric Botcazou  <ebotcazou@adacore.com>
3306         * layout.adb: Fix minor typo in comment.
3307         * inline.adb: Fix minor pasto.
3308         * sem_ch12.ads: Fix minor typos in comments.
3310 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
3312         * sem_disp.adb (Check_Dispatching_Call): Major rewriting to
3313         handle some complex cases of tag indeterminate calls that are
3314         actuals in other dispatching calls that are themselves tag
3315         indeterminate.
3316         (Check_Dispatching_Context): Add parameter to support recursive
3317         check for an enclosing construct that may provide a tag for a
3318         tag-indeterminate call.
3320 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
3322         * sem_prag.adb (Analyze_Depends_In_Decl_Part):
3323         Add global variables Task_Input_Seen and Task_Output_Seen.
3324         (Analyze_Global_Item): Detect an illegal use of the current
3325         instance of a single protected/task type in a global annotation.
3326         (Analyze_Input_Output): Inputs and output related to the current
3327         instance of a task unit are now tracked.
3328         (Check_Usage): Require
3329         the presence of the current instance of a task unit only when
3330         one input/output is available.  (Current_Task_Instance_Seen):
3331         New routine.
3332         (Is_CCT_Instance): New parameter profile. Update
3333         the comment on usage. The routine now properly recognizes several
3334         cases related to single protected/task types.
3336 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
3338         * freeze.adb (Freeze_Entity): Use New_Freeze_Node
3339         to create a brand new freeze node. This handles a case where an
3340         ignored Ghost context is freezing something which is not ignored
3341         Ghost and whose freeze node should not be removed from the tree.
3342         (New_Freeze_Node): New routine.
3344 2016-04-18  Jerome Lambourg  <lambourg@adacore.com>
3346         * sigtramp.h (__gnat_set_is_vxsim) New function to
3347         tell sigtramp-vxworks to handle vxsim signal contexts.  *
3348         sigtramp-vxworks.c (__gnat_sigtramp) Take into account the
3349         differences in the sigcontext structure between the expected
3350         regular x86 or x86_64 ones and the ones received in case of
3351         exexution on the vxworks simulator.
3352         * init.c: also compute is_vxsim in case of x86_64-vx7 target. Provide
3353         this information to sigtramp-vxworks.c. Remove the old mechanism for
3354         vxsim.
3355         * init-vxsim.c, sigtramp-vxworks-vxsim.c: remove, now obsolete.
3357 2016-04-18  Eric Botcazou  <ebotcazou@adacore.com>
3359         * exp_ch3.adb (Inline_Init_Proc): New function returning
3360         whether the initialization procedure of a type should be
3361         inlined.  Return again True for controlled type themselves.
3362         (Build_Array_Init_Proc): Call it to set Set_Is_Inlined on Init_Proc.
3363         (Build_Record_Init_Proc): Likewise.
3365 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
3367         * gnatvsn.ads (Library_Version): Bump to 7.
3369 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
3371         * sem_ch6.adb (Analyze_Expression_Function): Set Inlined flag
3372         on the entity of a subprogram declaration that is completed by
3373         an expression function.
3375 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
3377         * sem_util.adb (Is_Current_Instance): A entity given by a subtype
3378         declaration can appear in an aspect specification for a dynamic
3379         predicate, and a pragma for aspect Predicate_Failure.
3380         * exp_util.adb (Replace_Subtype_References): Replace current
3381         occurrences of the subtype to which a dynamic predicate applies,
3382         byt the expression that triggers a predicate check. Needed to
3383         implement new aspect Predicate_Failure.
3385 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
3387         * a-intsig.ads, a-intsig.adb: Removed, no longer used.
3388         * Makefile.rtl: update accordingly.
3390 2016-04-18  Eric Botcazou  <ebotcazou@adacore.com>
3392         * sem_type.adb (Disambiguate): Call Covers only when necessary
3393         for standard operators.
3395 2016-04-18  Eric Botcazou  <ebotcazou@adacore.com>
3397         * atree.ads (Num_Extension_Nodes): Add couple of figures
3398         to comment.
3399         * atree.adb: Add GNAT.Heap_Sort_G dependency.
3400         (Print_Statistics): New exported procedure to print statistics.
3402 2016-04-18  Eric Botcazou  <ebotcazou@adacore.com>
3404         * exp_ch3.adb (Build_Record_Init_Proc): Do not mark the procedure
3405         as to be inlined if the type needs finalization.
3407 2016-04-18  Jerome Lambourg  <lambourg@adacore.com>
3409         * sigtramp-vxworks-target.inc: sigtramp-vxworks: force the stack
3410         alignment for x86_64.
3411         * init.c: Better fix for guard page reset on x86_64-vx7.
3412         Do not try to retrieve the page that actually raised
3413         the signal as the probing mechanism used on x86_64 do not allow
3414         such retrieval. We thus just test if the guard page is active,
3415         and re-activate it if not.
3417 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
3419         * a-sytaco.adb (Suspension_Object): Aspect Default_Initial_Condition
3420         added.
3422 2016-04-18  Jerome Lambourg  <lambourg@adacore.com>
3424         * affinity.c: Use the proper type for task id.
3425         * init.c (__gnat_inum_to_ivec): ivec is a pointer.
3427 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
3429         * sem_prag.adb (Process_Convention): Relax rule on exporting
3430         Intrinsic types if Relaxed_RM_Semantics is True.
3432 2016-04-18  Vincent Celier  <celier@adacore.com>
3434         * sem_ch3.adb, lib.ads, sinfo.ads, sem_ch10.adb, einfo.adb, einfo.ads,
3435         checks.ads, sem_ch12.adb, sem.adb, sem_util.adb, sem_util.ads,
3436         sem_res.adb, sem_attr.adb, par.adb, exp_ch4.adb, errout.ads,
3437         sem_ch4.adb, atree.adb, atree.ads, sem_warn.adb, treepr.adb,
3438         exp_ch3.ads, exp_unst.adb: Change "descendent" to
3439         "descendant" in comments, error messages and identifiers.
3440         * gcc-interface/decl.c: Ditto.
3442 2016-04-18  Eric Botcazou  <ebotcazou@adacore.com>
3444         * sem_type.adb (Operator_Matches_Spec): Call First_Formal on
3445         New_S only once at the beginning of the function.
3447 2016-04-02  Eric Botcazou  <ebotcazou@adacore.com>
3449         * gcc-interface/decl.c (components_to_record): Restrict the previous
3450         change to fields with variable size.
3452 2016-03-27  Eric Botcazou  <ebotcazou@adacore.com>
3454         * gcc-interface/decl.c (components_to_record): Add special case for
3455         single field with representation clause at offset 0.
3457 2016-03-16  Svante Signell  <svante.signell@gmail.com>
3459         * gcc-interface/Makefile.in: Add support for x86 GNU/Hurd.
3460         * s-osinte-gnu.ads: New file.
3462 2016-03-13  Eric Botcazou  <ebotcazou@adacore.com>
3464         * system-vxworks-m68k.ads (Stack_Check_Probes): Set to True.
3465         (Stack_Check_Limits): Set to False.
3466         * system-vxworks-mips.ads (Stack_Check_Probes): Set to True.
3467         (Stack_Check_Limits): Set to False.
3468         * system-vxworks-ppc.ads (Stack_Check_Probes): Set to True.
3469         (Stack_Check_Limits): Set to False.
3470         * system-vxworks-sparcv9.ads (Stack_Check_Probes): Set to True.
3471         (Stack_Check_Limits): Set to False.
3472         * system-vxworks-x86.ads (Stack_Check_Probes): Set to True.
3473         (Stack_Check_Limits): Set to False.
3475 2016-03-07  Eric Botcazou  <ebotcazou@adacore.com>
3477         * gcc-interface/trans.c (statement_node_p): New predicate.
3478         (gnat_to_gnu): Invoke it to detect statement nodes.  In ASIS mode, do
3479         not return dummy results for expressions attached to packed array
3480         implementation types.
3482 2016-03-07  Eric Botcazou  <ebotcazou@adacore.com>
3484         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Always mark
3485         the expression of a renaming manually in case #3.
3487 2016-03-02  Dominik Vogt  <vogt@linux.vnet.ibm.com>
3489         * system-linux-s390.ads: Enable Stack_Check_Probes.
3490         * system-linux-s390.ads: Likewise.
3492 2016-02-29  Martin Liska  <mliska@suse.cz>
3494         * gcc-interface/utils.c (set_reverse_storage_order_on_pad_type):
3495         Replace ENABLE_CHECKING macro with flag_checking.
3497 2016-02-29  Eric Botcazou  <ebotcazou@adacore.com>
3499         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Retrofit
3500         handling of unconstrained array types as designated types into common
3501         processing.  Also handle array types as incomplete designated types.
3503 2016-02-29  Eric Botcazou  <ebotcazou@adacore.com>
3505         * gcc-interface/decl.c (gnat_to_gnu_entity) <Concurrent types>: In
3506         ASIS mode, fully lay out the minimal record type.
3508 2016-02-29  Eric Botcazou  <ebotcazou@adacore.com>
3510         * gcc-interface/trans.c (finalize_nrv_r): Remove obsolete code.
3511         (build_return_expr): Likewise.
3512         (Call_to_gnu): If this is a function call and there is no target,
3513         create a temporary for the return value for all aggregate types,
3514         but never create it for a return statement.  Push a binding level
3515         around the call in more cases.  Remove obsolete code.
3517 2016-02-29  Eric Botcazou  <ebotcazou@adacore.com>
3519         * gcc-interface/ada-tree.h (DECL_RETURN_VALUE_P): New macro.
3520         * gcc-interface/gigi.h (gigi): Remove useless attribute.
3521         (gnat_gimplify_expr): Likewise.
3522         (gnat_to_gnu_external): Declare.
3523         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: Factor out
3524         code dealing with the expression of external constants into...
3525         Invoke gnat_to_gnu_external instead.
3526         <E_Variable>: Invoke gnat_to_gnu_external to translate renamed objects
3527         when not for a definition.  Deal with COMPOUND_EXPR and variables with
3528         DECL_RETURN_VALUE_P set for renamings and with the case of a dangling
3529         'reference to a function call in a renaming.  Remove obsolete test and
3530         adjust associated comment.
3531         * gcc-interface/trans.c (Call_to_gnu): Set DECL_RETURN_VALUE_P on the
3532         temporaries created to hold the return value, if any.
3533         (gnat_to_gnu_external): ...this.  New function.
3534         * gcc-interface/utils.c (create_var_decl): Detect a constant created
3535         to hold 'reference to function call.
3536         * gcc-interface/utils2.c (build_unary_op) <ADDR_EXPR>: Add folding
3537         for COMPOUND_EXPR in the DECL_RETURN_VALUE_P case.
3539 2016-02-17  Eric Botcazou  <ebotcazou@adacore.com>
3541         * exp_ch4.adb (Expand_N_Indexed_Component): Activate synchronization if
3542         the prefix denotes an entity which Has_Atomic_Components.
3543         * gcc-interface/trans.c (node_is_atomic): Return true if the prefix
3544         denotes an entity which Has_Atomic_Components.
3546 2016-02-17  Eric Botcazou  <ebotcazou@adacore.com>
3548         * gcc-interface/utils2.c (gnat_protect_expr): Make a SAVE_EXPR only
3549         for fat pointer or scalar types.
3551 2016-02-16  Eric Botcazou  <ebotcazou@adacore.com>
3553         * gcc-interface/gigi.h (maybe_debug_type): New inline function.
3554         * gcc-interface/misc.c (gnat_get_array_descr_info): Use it.
3555         Call maybe_character_value on the array bounds.  Get to the base type
3556         of the index type and call maybe_debug_type on it.
3557         * gcc-interface/utils.c (finish_character_type): Add special treatment
3558         for char_type_node.
3560 2016-02-16  Eric Botcazou  <ebotcazou@adacore.com>
3562         * gcc-interface/misc.c (gnat_enum_underlying_base_type): New function.
3563         (LANG_HOOKS_ENUM_UNDERLYING_BASE_TYPE): Define to above.
3565 2016-02-12  Jakub Jelinek  <jakub@redhat.com>
3567         * prj-tree.ads: Spelling fixes - behaviour -> behavior and
3568         neighbour -> neighbor.
3569         * prep.adb: Likewise.
3570         * prj.ads: Likewise.
3571         * prepcomp.adb: Likewise.
3572         * g-socket.ads: Likewise.
3573         * s-imgrea.adb: Likewise.
3574         * a-calend.adb: Likewise.
3575         * exp_disp.adb: Likewise.
3576         * doc/gnat_ugn/gnat_utility_programs.rst: Likewise.
3577         * g-socket.adb: Likewise.
3578         * sem_ch12.adb: Likewise.
3579         * terminals.c: Likewise.
3581 2016-02-08  Bernd Schmidt  <bschmidt@redhat.com>
3583         * gcc-interface/misc.c (gnat_init): Remove second argument in call to
3584         build_common_tree_nodes.
3586 2016-02-08  Eric Botcazou  <ebotcazou@adacore.com>
3588         * gcc-interface/utils.c (create_var_decl): Set again DECL_COMMON and
3589         DECL_IGNORED_P last.
3591 2016-01-28  Eric Botcazou  <ebotcazou@adacore.com>
3593         * gcc-interface/gigi.h (enum attr_type): Rename into...
3594         (enum attrib_type): ...this.
3595         (struct attrib): Adjust.
3596         * gcc-interface/decl.c (prepend_one_attribute): Likewise.
3598 2016-01-20  Eric Botcazou  <ebotcazou@adacore.com>
3600         * exp_ch2.adb (Expand_Current_Value): Make an appropriate character
3601         literal if the entity is of a character type.
3602         * gcc-interface/lang.opt (fsigned-char): New option.
3603         * gcc-interface/misc.c (gnat_handle_option): Accept it.
3604         (gnat_init): Adjust comment.
3605         * gcc-interface/gigi.h (finish_character_type): New prototype.
3606         (maybe_character_type): New inline function.
3607         (maybe_character_value): Likewise.
3608         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Enumeration_Type>: For
3609         a character of CHAR_TYPE_SIZE, make a signed type if flag_signed_char.
3610         Set TYPE_ARTIFICIAL early and call finish_character_type on the type.
3611         <E_Enumeration_Subtype>: For a subtype of character with RM_Size and
3612         Esize equal to CHAR_TYPE_SIZE, make a signed type if flag_signed_char.
3613         Copy TYPE_STRING_FLAG from type to subtype.
3614         <E_Array_Type>: Deal with character index types.
3615         <E_Array_Subtype>: Likewise.
3616         * gcc-interface/trans.c (gigi): Replace unsigned_char_type_node with
3617         char_type_node throughout.
3618         (build_raise_check): Likewise.
3619         (get_type_length): Deal with character types.
3620         (Attribute_to_gnu) <Attr_Pos>: Likewise.  Remove obsolete range check
3621         code.  Minor tweak.
3622         <Attr_Pred>: Likewise.
3623         (Loop_Statement_to_gnu): Likewise.
3624         (Raise_Error_to_gnu): Likewise.
3625         <N_Indexed_Component>: Deal with character index types.  Remove
3626         obsolete code.
3627         <N_Slice>: Likewise.
3628         <N_Type_Conversion>: Deal with character types.  Minor tweak.
3629         <N_Unchecked_Type_Conversion>: Likewise.
3630         <N_In>: Likewise.
3631         <N_Op_Eq>: Likewise.
3632         (emit_index_check): Delete.
3633         * gcc-interface/utils.c (finish_character_type): New function.
3634         (gnat_signed_or_unsigned_type_for): Deal with built-in character types.
3635         * gcc-interface/utils2.c (expand_sloc): Replace unsigned_char_type_node
3636         with char_type_node.
3637         (build_call_raise): Likewise.
3638         (build_call_raise_column): Likewise.
3639         (build_call_raise_range): Likewise.
3641 2016-01-18  Eric Botcazou  <ebotcazou@adacore.com>
3643         * gcc-interface/gigi.h (build_call_raise_column): Adjust prototype.
3644         (build_call_raise_range): Likewise.
3645         (gnat_unsigned_type): Delete.
3646         (gnat_signed_type): Likewise.
3647         (gnat_signed_or_unsigned_type_for): New prototype.
3648         (gnat_unsigned_type_for): New inline function.
3649         (gnat_signed_type_for): Likewise.
3650         * gcc-interface/cuintp.c (build_cst_from_int): Call build_int_cst.
3651         * gcc-interface/decl.c (gnat_to_gnu_entity): Likewise.
3652         (gnat_to_gnu_entity) <E_Array_Type>: Always translate the index types
3653         and compute their base type from that.
3654         <E_Array_Subtype>: Remove duplicate declaration.
3655         * gcc-interface/misc.c (get_array_bit_stride): Call build_int_cst.
3656         * gcc-interface/trans.c (get_type_length): Likewise.
3657         (Attribute_to_gnu): Likewise.
3658         (Loop_Statement_to_gnu): Likewise.
3659         (Call_to_gnu): Likewise.
3660         (gnat_to_gnu): Call build_real, build_int_cst, gnat_unsigned_type_for
3661         and gnat_signed_type_for.  Minor tweaks.
3662         (build_binary_op_trapv): Likewise.
3663         (emit_check): Likewise.
3664         (convert_with_check): Likewise.
3665         (Raise_Error_to_gnu): Adjust calls to the build_call_raise family of
3666         functions.  Minor tweaks.
3667         (Case_Statement_to_gnu): Remove dead code.
3668         (gnat_to_gnu): Call gnat_unsigned_type_for and gnat_signed_type_for.
3669         (init_code_table): Minor reordering.
3670         * gcc-interface/utils.c (gnat_unsigned_type): Delete.
3671         (gnat_signed_type): Likewise.
3672         (gnat_signed_or_unsigned_type_for): New function.
3673         (unchecked_convert): Use directly the size in the test for precision
3674         vs size adjustments.
3675         (install_builtin_elementary_types): Call gnat_signed_type_for.
3676         * gcc-interface/utils2.c (nonbinary_modular_operation): Call
3677         build_int_cst.
3678         (build_goto_raise): New function taken from...
3679         (build_call_raise): ...here.  Call it.
3680         (build_call_raise_column): Add KIND parameter and call it.
3681         (build_call_raise_range): Likewise.
3683 2016-01-18  Eric Botcazou  <ebotcazou@adacore.com>
3685         * gcc-interface/ada-tree.h (TYPE_IMPLEMENTS_PACKED_ARRAY_P): Rename to
3686         (TYPE_IMPL_PACKED_ARRAY_P): ...this.
3687         (TYPE_CAN_HAVE_DEBUG_TYPE_P): Do not test TYPE_DEBUG_TYPE.
3688         * gcc-interface/decl.c (gnat_to_gnu_entity): Simplify NULL_TREE tests
3689         and tweak gnat_encodings tests throughout.
3690         (initial_value_needs_conversion): Likewise.
3691         (intrin_arglists_compatible_p): Likewise.
3692         * gcc-interface/misc.c (gnat_print_type): Likewise.
3693         (gnat_get_debug_type): Likewise.
3694         (gnat_get_fixed_point_type_info): Likewise.
3695         (gnat_get_array_descr_info): Likewise.
3696         (get_array_bit_stride): Likewise.
3697         (gnat_get_type_bias): Fix formatting.
3698         (enumerate_modes): Likewise.
3699         * gcc-interface/trans.c (gnat_to_gnu): Likewise.
3700         (add_decl_expr): Simplify NULL_TREE test.
3701         (end_stmt_group): Likewise.
3702         (build_binary_op_trapv): Fix formatting.
3703         (get_exception_label): Use switch statement.
3704         (init_code_table): Move around.
3705         * gcc-interface/utils.c (global_bindings_p): Simplify NULL_TREE test.
3706         (gnat_poplevel): Likewise.
3707         (gnat_set_type_context): Likewise.
3708         (defer_or_set_type_context): Fix formatting.
3709         (gnat_pushdecl): Simplify NULL_TREE test.
3710         (maybe_pad_type): Likewise.
3711         (add_parallel_type): Likewise.
3712         (create_range_type): Likewise.
3713         (process_deferred_decl_context): Likewise.
3714         (convert): Likewise.
3715         (def_builtin_1): Likewise.
3716         * gcc-interface/utils2.c (find_common_type): Likewise.
3717         (build_binary_op): Likewise.
3718         (gnat_rewrite_reference): Likewise.
3719         (get_inner_constant_reference): Likewise.
3721 2016-01-18  Eric Botcazou  <ebotcazou@adacore.com>
3723         PR ada/69219
3724         * gcc-interface/trans.c (check_inlining_for_nested_subprog): Consider
3725         the parent function instead of the current function in order to issue
3726         the warning or the error.  Add guard for ignored functions.
3728 2016-01-17  Jakub Jelinek  <jakub@redhat.com>
3730         * adaint.c (__gnat_killprocesstree): Avoid -Wparentheses warning.
3732 2016-01-15  Jakub Jelinek  <jakub@redhat.com>
3734         * adaint.c (__gnat_locate_exec_on_path): Use const char * instead
3735         of char * for path_val to avoid warnings.
3737 2016-01-06  Pierre-Marie de Rodat  <derodat@adacore.com>
3739         * gcc-interface/utils.c: Bump copyright year.
3740         (rest_of_record_type_compilation): Add XVE/XVU parallel types to
3741         the current lexical scope.
3743 2016-01-04  Jakub Jelinek  <jakub@redhat.com>
3745         * gnat_ugn.texi: Bump @copying's copyright year.
3746         * gnat_rm.texi: Likewise.
3748 2016-01-02  Eric Botcazou  <ebotcazou@adacore.com>
3750         * gnatvsn.ads: Bump copyright year.
3753 Copyright (C) 2016 Free Software Foundation, Inc.
3755 Copying and distribution of this file, with or without modification,
3756 are permitted in any medium without royalty provided the copyright
3757 notice and this notice are preserved.