2016-06-16 Gary Dismukes <dismukes@adacore.com>
[official-gcc.git] / gcc / ada / ChangeLog
blobb661d38e5d45c24a9d9cabd6c137c5302285095d
1 2016-06-16  Gary Dismukes  <dismukes@adacore.com>
3         * sem_util.adb: Minor typo fix.
5 2016-06-16  Emmanuel Briot  <briot@adacore.com>
7         * s-regpat.adb: Further fix for invalid index in GNAT.Regexp.
9 2016-06-16  Eric Botcazou  <ebotcazou@adacore.com>
11         * sem_ch13.adb (Validate_Address_Clauses): Use the same logic to
12         issue the warning on the offset for the size as for the alignment
13         and tweak the wording for the sake of consistency.
15 2016-06-16  Ed Schonberg  <schonberg@adacore.com>
17         * sem_prag.adb (Check_Class_Wide_COndition): New procedure,
18         subsidiary of Analyze_Pre_Post_ Condition_In_Decl_Part, to
19         check legality rules that follow from the revised semantics of
20         class-wide pre/postconditions described in AI12-0113.
21         (Build_Pragma_Check_Equivalent): Abstract subprogram declarations
22         must be included in list of overriding primitives of a derived
23         type.
25 2016-06-16  Ed Schonberg  <schonberg@adacore.com>
27         * sem_util.adb (May_Be_Lvalue): An actual in an unexpanded
28         attribute reference 'Read is an assignment and must be considered
29         a modification of the object.
31 2016-06-16  Gary Dismukes  <dismukes@adacore.com>
33         * einfo.adb: Minor editorial.
35 2016-06-16  Ed Schonberg  <schonberg@adacore.com>
37         * sem_prag.adb (Overridden_Ancestor): Clean up code to use
38         controlling type of desired primitive rather than its scope,
39         because the primitive that inherits the classwide condition may
40         comes from several derivation steps.
42 2016-06-16  Javier Miranda  <miranda@adacore.com>
44         * einfo.adb (Set_Default_Init_Cond_Procedure): Allow calls setting
45         this attribute to Empty (only if the attribute has not been set).
46         * sem_util.adb (Build_Default_Init_Cond_Procedure_Body):
47         No action needed if the spec was not built.
48         (Build_Default_Init_Cond_Procedure_Declaration): The spec is
49         not built if DIC is set to NULL or no condition was specified.
50         * exp_ch3.adb (Expand_N_Object_Declaration): Check availability
51         of the Init_Cond procedure before generating code to call it.
53 2016-06-16  Emmanuel Briot  <briot@adacore.com>
55         * s-regpat.adb: Fix invalid index check when matching end-of-line
56         on substrings.
58 2016-06-16  Arnaud Charlet  <charlet@adacore.com>
60         * gnat1drv.adb: Minor reformatting.
62 2016-06-16  Ed Schonberg  <schonberg@adacore.com>
64         * sem_ch3.adb (Check_Entry_Contracts): New procedure, subsidiary
65         of Analyze_Declarations, that performs pre-analysis of
66         pre/postconditions on entry declarations before full analysis
67         is performed after entries have been converted into procedures.
68         Done solely to capture semantic errors.
69         * sem_attr.adb (Analyze_Attribute, case 'Result): Add guard to
70         call to Denote_Same_Function.
72 2016-06-16  Emmanuel Briot  <briot@adacore.com>
74         * g-comlin.adb: Fix minor memory leak in GNAT.Command_Line.
76 2016-06-16  Hristian Kirtchev  <kirtchev@adacore.com>
78         * exp_ch7.adb (Find_Last_Init): Remove obsolete code. The
79         logic is now performed by Process_Object_Declaration.
80         (Process_Declarations): Recognize a controlled deferred
81         constant which is in fact initialized by means of a
82         build-in-place function call as needing finalization actions.
83         (Process_Object_Declaration): Insert the counter after the
84         build-in-place initialization call for a controlled object. This
85         was previously done in Find_Last_Init.
86         * exp_util.adb (Requires_Cleanup_Actions): Recognize a controlled
87         deferred constant which is in fact initialized by means of a
88         build-in-place function call as needing finalization actions.
90 2016-06-16  Justin Squirek  <squirek@adacore.com>
92         * exp_aggr.adb (Expand_Array_Aggregate): Minor comment changes and
93         additional style fixes.
94         * exp_ch7.adb: Minor typo fixes and reformatting.
96 2016-06-16  Justin Squirek  <squirek@adacore.com>
98         * sem_ch3.adb (Analyze_Object_Declaration): Add a missing check
99         for optimized aggregate arrays with qualified expressions.
100         * exp_aggr.adb (Expand_Array_Aggregate): Fix block and
101         conditional statement in charge of deciding whether to perform
102         in-place expansion. Specifically, use Parent_Node to jump over
103         the qualified expression to the object declaration node. Also,
104         a check has been inserted to skip the optimization if SPARK 2005
105         is being used in strict adherence to RM 4.3(5).
107 2016-06-16  Tristan Gingold  <gingold@adacore.com>
109         * sem_prag.adb (Analyze_Pragma): Simplify code
110         for Pragma_Priority.
112 2016-06-16  Eric Botcazou  <ebotcazou@adacore.com>
114         * sem_util.ads (Indexed_Component_Bit_Offset): Declare.
115         * sem_util.adb (Indexed_Component_Bit_Offset): New
116         function returning the offset of an indexed component.
117         (Has_Compatible_Alignment_Internal): Call it.
118         * sem_ch13.adb (Offset_Value): New function returning the offset of an
119         Address attribute reference from the underlying entity.
120         (Validate_Address_Clauses): Call it and take the offset into
121         account for the size warning.
123 2016-06-16  Hristian Kirtchev  <kirtchev@adacore.com>
125         * bindgen.adb, exp_util.adb, sem_ch9.adb, sem_util.adb: Minor
126         reformatting.
128 2016-06-16  Gary Dismukes  <dismukes@adacore.com>
130         * sem_ch9.adb, sem_util.ads, sem_res.adb: Minor reformatting and typo
131         fixes.
133 2016-06-16  Javier Miranda  <miranda@adacore.com>
135         * sem_res.adb (Resolve): Under relaxed RM semantics silently
136         replace occurrences of null by System.Null_Address.
137         * sem_ch4.adb (Analyze_One_Call, Operator_Check): Under
138         relaxed RM semantics silently replace occurrences of null by
139         System.Null_Address.
140         * sem_util.ad[sb] (Null_To_Null_Address_Convert_OK): New subprogram.
141         (Replace_Null_By_Null_Address): New subprogram.
143 2016-06-16  Bob Duff  <duff@adacore.com>
145         * exp_util.adb (Is_Controlled_Function_Call):
146         This was missing the case where the call is in prefix format,
147         with named notation, as in Obj.Func (Formal => Actual).
149 2016-06-16  Hristian Kirtchev  <kirtchev@adacore.com>
151         * exp_attr.adb, inline.adb, sem_attr.adb, sem_elab.adb: Minor
152         reformatting.
154 2016-06-16  Bob Duff  <duff@adacore.com>
156         * sem_util.adb (Collect): Avoid Empty Full_T. Otherwise Etype
157         (Full_T) crashes when assertions are on.
158         * sem_ch12.adb (Matching_Actual): Correctly handle the case where
159         "others => <>" appears in a generic formal package, other than
160         by itself.
162 2016-06-16  Arnaud Charlet  <charlet@adacore.com>
164         * usage.adb: Remove confusing comment in usage line.
165         * bindgen.adb: Fix binder generated file in codepeer mode wrt
166         recent additions.
168 2016-06-16  Javier Miranda  <miranda@adacore.com>
170         * restrict.adb (Check_Restriction_No_Use_Of_Entity): Avoid
171         never-ending loop, code cleanup; adding also support for Text_IO.
172         * sem_ch8.adb (Find_Expanded_Name): Invoke
173         Check_Restriction_No_Use_Entity.
175 2016-06-16  Tristan Gingold  <gingold@adacore.com>
177         * exp_ch9.adb: Minor comment fix.
178         * einfo.ads (Has_Protected): Clarify comment.
179         * sem_ch9.adb (Analyze_Protected_Type_Declaration): Do not
180         consider private protected types declared in the runtime for
181         the No_Local_Protected_Types restriction.
183 2016-06-14  Ed Schonberg  <schonberg@adacore.com>
185         * sem_ch6.adb (Set_Actual_Subtypes): Do not generate actual
186         subtypes for unconstrained formals when analyzing the generated
187         body of an expression function, because it may lead to premature
188         and misplaced freezing of the types of formals.
190 2016-06-14  Gary Dismukes  <dismukes@adacore.com>
192         * sem_elab.adb, sem_ch4.adb: Minor reformatting and typo fix.
194 2016-06-14  Tristan Gingold  <gingold@adacore.com>
196         * einfo.adb (Set_Has_Timing_Event): Add assertion.
197         * sem_util.ads, sem_util.adb (Propagate_Concurrent_Flags): New
198         name for Propagate_Type_Has_Flags.
199         * exp_ch3.adb, sem_ch3.adb, sem_ch7.adb, sem_ch9.adb: Adjust after
200         renaming.
202 2016-06-14  Bob Duff  <duff@adacore.com>
204         * sem_elab.adb (Check_A_Call): Do nothing if the callee is
205         (or is in) an instance, and the caller is outside.  Misc cleanup.
207 2016-06-14  Javier Miranda  <miranda@adacore.com>
209         * sem_ch4.adb (Analyze_Quantified_Expression):
210         Generating C code avoid spurious warning on loop variable of
211         inlinined postconditions.
213 2016-06-14  Javier Miranda  <miranda@adacore.com>
215         * sem_attr.adb (Analyze_Attribute_Old_Result): Adding assertion.
216         (Analyze_Attribute [Attribute_Old]): Generating C handle
217         analysis of 'old in inlined postconditions.
218         (Analyze_Attribute [Attribute_Result]): Generating C handle analysis
219         of 'result in inlined postconditions.
220         * exp_attr.adb (Expand_N_Attribute_Reference [Attribute_Old]):
221         Generating C handle expansion of 'old in inlined postconditions.
222         * inline.adb (Declare_Postconditions_Result): New subprogram.
223         * sem_ch12.adb (Copy_Generic_Node): Copy pragmas generated from
224         aspects when generating C code since pre/post conditions are
225         inlined and the frontend inlining relies on this routine to
226         perform inlining.
227         * exp_ch6.adb (Inlined_Subprogram): Replace Generate_C_Code
228         by Modify_Tree_For_C.
229         * exp_unst.adb (Visit_Node): Searching for up-level references
230         skip entities defined in inlined subprograms.
232 2016-06-14  Hristian Kirtchev  <kirtchev@adacore.com>
234         * sem_ch7.adb, sem_ch12.adb, freeze.adb, lib-xref.ads, exp_ch3.adb:
235         Minor reformatting.
237 2016-06-14  Bob Duff  <duff@adacore.com>
239         * sem_elab.adb: Do nothing if the callee is intrinsic.
240         * sinfo.ads, einfo.ads: Minor comment fixes.
242 2016-06-14  Ed Schonberg  <schonberg@adacore.com>
244         * contracts.adb (Has_Null_Body): Move to sem_util, for general
245         availability.
246         * sem_util.ads, sem_util.adb (Has_Null_Body): Predicate to
247         determine when an internal procedure created for some assertion
248         checking (e.g. type invariant) is a null procedure. Used to
249         eliminate redundant calls to such procedures when they apply to
250         components of composite types.
251         * exp_ch3.adb (Build_Component_Invariant_Call): Do not add call
252         if invariant procedure has a null body.
254 2016-06-14  Thomas Quinot  <quinot@adacore.com>
256         * g-socket.ads (Check_Selector): Clarify effect on IN OUT socket
257         set parameters.
259 2016-06-14  Hristian Kirtchev  <kirtchev@adacore.com>
261         * exp_ch4.adb (Process_Action): Pass the action
262         list to Process_Transient_Object.
263         (Process_If_Case_Statements): Pass the action list to
264         Process_Transient_Object.
265         (Process_Transient_Object): Add new parameter Stmts and update the
266         comment on usage. When the context is a Boolean evaluation, insert
267         any finalization calls after the last statement of the construct.
269 2016-06-14  Tristan Gingold  <gingold@adacore.com>
271         * einfo.adb, einfo.ads (Has_Timing_Event,
272         Set_Has_Timing_Event): Add Has_Timing_Event flag.
273         (Write_Entity_Flags): Display * sem_util.ads, sem_util.adb:
274         (Propagate_Type_Has_Flags): New procedure to factorize code.
275         * exp_ch3.adb (Expand_Freeze_Array_Type,
276         Expand_Freeze_Record_Type): Call Propagate_Type_Has_Flags.
277         * sem_ch3.adb (Access_Type_Decalaration): Initialize
278         Has_Timing_Event flag.  (Analyze_Object_Declaration):
279         Move code that check No_Local_Timing_Events near
280         the code that check No_Local_Protected_Objects.
281         (Analyze_Private_Extension_Declaration, Array_Type_Declaration)
282         (Build_Derived_Type, Copy_Array_Base_Type_Attributes,
283         Process_Full_View) (Record_Type_Definition): Call
284         Propagate_Type_Has_Flags.
285         * sem_ch4.adb (Analyze_Allocator): Check No_Local_Timing_Events.
286         * sem_ch7.adb (New_Private_Type): Set Has_Timing_Event on the
287         Timing_Event type.
288         (Uninstall_Declaration): Call Propagate_Type_Has_Flags.
289         * sem_ch9.adb (Analyze_Protected_Definition): Call
290         Propagate_Type_Has_Flags.
292 2016-06-14  Arnaud Charlet  <charlet@adacore.com>
294         * sem.ads: Minor style fix.
296 2016-06-14  Ed Schonberg  <schonberg@adacore.com>
298         * sem_ch12.adb (Analyze_Associations): An actual parameter
299         with a box must be included in the count of actuals, to detect
300         possible superfluous named actuals that do not match any of the
301         formals of the generic unit in a formal package declaration.
303 2016-06-14  Justin Squirek  <squirek@adacore.com>
305         * sem_ch3.adb (Analyze_Object_Declaration): Fix formatting
306         of error output related to SPARK RM 6.1.7(3) and pragma
307         Extensions_Visible.
308         * sem_ch4.adb (Analyze_Type_Conversion): Fix formatting of error
309         output related to SPARK RM 6.1.7(3) and pragma Extensions_Visible.
310         * sem_prag.adb (Analyze_Pragma): Fix formatting of error output
311         related to SPARK RM 7.1.2(15) and pragma Volatile_Function
312         so that the values True and False are no longer surrounded by
313         double quotes.
314         * sem_res.adb (Resolve_Actuals): Fix formatting of error output
315         related to SPARK RM 6.1.7(3) and pragma Extensions_Visible.
317 2016-06-14  Arnaud Charlet  <charlet@adacore.com>
319         * gnat1drv.adb (Adjust_Global_Switches): Enable access checks
320         in codepeer mode.
321         * freeze.adb: Minor grammar fix in comment.
322 2016-06-14  Hristian Kirtchev  <kirtchev@adacore.com>
324         * lib.adb: Minor reformatting.
325         * sem_util.adb (Is_OK_Volatile_Context): Do
326         include Address in the supported attributes.
328 2016-06-14  Hristian Kirtchev  <kirtchev@adacore.com>
330         * exp_ch4.adb (Expand_N_Case_Expression):
331         Code cleanup. Finalize any transient controlled
332         objects on exit from a case expression alternative.
333         (Expand_N_If_Expression): Code cleanup.
334         (Process_Actions): Removed.
335         (Process_If_Case_Statements): New routine.
336         (Process_Transient_Object): Change the name of formal Rel_Node to
337         N and update all occurrences. Update the comment on usage. When
338         the type of the context is Boolean, the proper insertion point
339         for the finalization call is after the last declaration.
341 2016-06-14  Ed Schonberg  <schonberg@adacore.com>
343         * lib-xref.ads, lib-xref.adb (Has_Deferred_Reference): new
344         predicate to determine whether an entity appears in a context
345         for which a Deferred_Reference was created, because it is not
346         possible to determine when reference is analyzed whether it
347         appears in a context in which the entity is modified.
348         * sem_ch5.adb (Analyze_Statement): Do not emit a useless warning
349         on assignment for an entity that has a deferred_reference.
351 2016-06-14  Javier Miranda  <miranda@adacore.com>
353         * sem_res.adb (Resolve_Actuals): Generate a reference to actuals that
354         come from source. Previously the reference was generated only if the
355         call comes from source but the call may be rewritten by the expander
356         thus causing the notification of spurious warnings.
358 2016-06-14  Arnaud Charlet  <charlet@adacore.com>
360         * gnat1drv.adb: Remove further references to AAMP.
361         * checks.adb (Apply_Scalar_Range_Check): Take
362         Check_Float_Overflow info account.
363         * live.ads, live.adb Added subprogram headers and
364         start-of-processing-for comments.
365         * sem_ch12.adb (Instantiate_Package_Body): Do not suppress
366         checks when instantiating runtime units in CodePeer mode.
368 2016-06-14  Arnaud Charlet  <charlet@adacore.com>
370         * exp_ch3.adb (Expand_N_Object_Declaration): Only consider
371         nodes from sources.
373 2016-06-14  Arnaud Charlet  <charlet@adacore.com>
375         * switch-c.adb, gnat1drv.adb (Adjust_Global_Switches): Only disable
376         simple value propagation in CodePeer mode when warnings are disabled.
377         (Scan_Front_End_Switches): Enable relevant front-end switches
378         when using -gnateC.
380 2016-06-14  Hristian Kirtchev  <kirtchev@adacore.com>
382         * sem_util.adb (Is_OK_Volatile_Context): A
383         reference to a volatile object is considered OK if appears as
384         the prefix of attributes Address, Alignment, Component_Size,
385         First_Bit, Last_Bit, Position, Size, Storage_Size.
387 2016-06-14  Yannick Moy  <moy@adacore.com>
389         * lib-xref-spark_specific.adb (Add_SPARK_File): Do not traverse
390         subunits directly, as they are already traversed as part of the
391         top-level unit to which they belong.
392         (Add_SPARK_Xrefs): Add assertions to ensure correct sorting.
393         (Generate_Dereference): Use unique definition place for special
394         variable __HEAP, to ensure correct sorting of references.
395         * lib-xref.adb (Generate_Reference): Use top-level unit in case
396         of subunits.
397         * lib.adb, lib.ads (Get_Top_Level_Code_Unit): New functions that
398         compute the top-level code unit for a source location of AST node,
399         that go past subunits.
401 2016-06-13  Eric Botcazou  <ebotcazou@adacore.com>
403         * gcc-interface/decl.c (gnat_to_gnu_subprog_type): Build only a minimal
404         PARM_DECL when the parameter type is dummy.
405         * gcc-interface/trans.c (Call_to_gnu): Translate formal types before
406         formal objects.
408 2016-06-13  Eric Botcazou  <ebotcazou@adacore.com>
410         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Deal with
411         PLUS_EXPR in the expression of a renaming.
413 2016-06-13  Eric Botcazou  <ebotcazou@adacore.com>
415         * gcc-interface/utils2.c (known_alignment) <CALL_EXPR>: Deal specially
416         with calls to malloc.
418 2016-06-11  Eric Botcazou  <ebotcazou@adacore.com>
420         * gcc-interface/trans.c (build_binary_op_trapv): If no operand is a
421         constant, use the generic implementation of the middle-end; otherwise
422         turn the dynamic conditions into static conditions and simplify.
424 2016-06-11  Eric Botcazou  <ebotcazou@adacore.com>
426         * gcc-interface/trans.c (Case_Statement_to_gnu): Deal with characters.
428 2016-06-11  Pierre-Marie de Rodat  <derodat@adacore.com>
430         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not clobber
431         gnat_entity_name with temporary names for XUP and XUT types.
433 2016-06-10  Martin Sebor  <msebor@redhat.com>
435         PR c/71392
436         * gcc/ada/gcc-interface/utils.c (handle_nonnull_attribute): Accept
437         the nonnull attribute in type-generic builtins.
439 2016-06-06  Eric Botcazou  <ebotcazou@adacore.com>
441         * gcc-interface/decl.c (Gigi_Equivalent_Type): Make sure equivalent
442         types are present before returning them.  Remove final assertion.
443         (gnat_to_gnu_entity) <E_Access_Protected_Subprogram_Type>: Adjust to
444         above change.
445         <E_Protected_Type>: Likewise.
447 2016-06-06  Eric Botcazou  <ebotcazou@adacore.com>
449         * gcc-interface/trans.c (elaborate_all_entities_for_package): Also do
450         not elaborate Itypes.
452 2016-06-06  Eric Botcazou  <ebotcazou@adacore.com>
454         * gcc-interface/utils.c (gnat_internal_attribute_table): Add support
455         for noinline and noclone attributes.
456         (handle_noinline_attribute): New handler.
457         (handle_noclone_attribute): Likewise.
459 2016-06-06  Eric Botcazou  <ebotcazou@adacore.com>
461         * gcc-interface/trans.c (process_type): Beef up comment.
463 2016-06-06  Eric Botcazou  <ebotcazou@adacore.com>
465         * gcc-interface/utils2.c (build_call_alloc_dealloc): Do not substitute
466         placeholder expressions here but...
467         * gcc-interface/trans.c (gnat_to_gnu) <N_Free_Statement>: ...here.
468         Make an exception to the protection of a CALL_EXPR result with an
469         unconstrained type only in the same cases as Call_to_gnu.
471 2016-06-06  Eric Botcazou  <ebotcazou@adacore.com>
473         * gcc-interface/trans.c (gnat_to_gnu): Rework special code dealing
474         with boolean rvalues and set the location directly.  Do not set the
475         location in the other cases for a simple name.
476         (gnat_to_gnu_external): Clear the location on the expression.
478 2016-06-06  Eric Botcazou  <ebotcazou@adacore.com>
480         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Component>: Remove
481         useless 'else' statements and tidy up.
482         <E_Array_Subtype>: Fully deal with the declaration here.
483         <E_Incomplete_Type>: Use properly-typed constant.
484         Assert that we don't apply the special type treatment to dummy types.
485         Separate this treatment from the final back-annotation and simplify
486         the condition for the RM size.
487         (gnat_to_gnu_param): Add GNU_PARAM_TYPE parameter and adjust.
488         (gnat_to_gnu_subprog_type): Ajust call to gnat_to_gnu_param.
489         * gcc-interface/trans.c (gnat_to_gnu) <N_Subprogram_Declaration>: Add
490         comment.
491         (process_freeze_entity): Remove obsolete code.
492         (process_type): Minor tweaks.
494 2016-06-06  Eric Botcazou  <ebotcazou@adacore.com>
496         * einfo.ads (Returns_Limited_View): Remove.
497         (Set_Returns_Limited_View ): Likewise.
498         * einfo.adb (Returns_Limited_View): Likewise.
499         (Set_Returns_Limited_View ): Likewise.
500         * freeze.adb (Late_Freeze_Subprogram): Remove.
501         (Freeze_Entity): Do not defer the freezing of functions returning an
502         incomplete type coming from a limited context.
504 2016-06-06  Eric Botcazou  <ebotcazou@adacore.com>
506         * gcc-interface/gigi.h (finish_subprog_decl): Add ASM_NAME parameter.
507         * gcc-interface/decl.c (gnu_ext_name_for_subprog): New function.
508         (gnat_to_gnu_entity) <E_Subprogram_Type>: Do not check compatibility
509         of profiles for builtins here...  Call gnu_ext_name_for_subprog.
510         Also update profiles if pointers to limited_with'ed types are
511         updated.
512         (gnat_to_gnu_param): Restore the correct source location information
513         for vector ABI warnings.
514         (associate_subprog_with_dummy_type): Add comment about AI05-019.
515         Set TYPE_DUMMY_IN_PROFILE_P flag unconditionally.
516         (update_profile): Deal with builtin declarations.
517         Call gnu_ext_name_for_subprog.  Adjust call to finish_subprog_decl.
518         (update_profiles_with): Add comment.
519         (gnat_to_gnu_subprog_type): Reuse the return type if it is complete.
520         Likewise for parameter declarations in most cases.  Do not change
521         the return type for the CICO mechanism if the profile is incomplete.
522         ...but here instead.  Always reset the slot for the parameters.
523         * gcc-interface/utils.c (create_subprog_decl): Call
524         gnu_ext_name_for_subprog.  Do not set the assembler name here but...
525         (finish_subprog_decl): ...but here instead.  Add ASM_NAME parameter.
527 2016-06-06  Eric Botcazou  <ebotcazou@adacore.com>
529         * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Insert the
530         declaration of the corresponding record type before that of the
531         unprotected version of the subprograms that operate on it.
532         (Expand_Access_Protected_Subprogram_Type): Declare the Equivalent_Type
533         just before the original type.
534         * sem_ch3.adb (Handle_Late_Controlled_Primitive): Point the current
535         declaration to the newly created declaration for the primitive.
536         (Analyze_Subtype_Declaration): Remove obsolete code forcing the
537         freezing of the subtype before its declaration.
538         (Replace_Anonymous_Access_To_Protected_Subprogram): Insert the new
539         declaration in the nearest enclosing scope for formal parameters too.
540         (Build_Derived_Access_Type): Restore the status of the created Itype
541         after it is erased by Copy_Node.
542         * sem_ch6.adb (Exchange_Limited_Views): Remove guard on entry.
543         (Analyze_Subprogram_Body_Helper): Call Exchange_Limited_Views only if
544         the specification is present.
545         Move around the code changing the designated view of the return type
546         and save the original view.  Restore it on exit.
547         * sem_ch13.adb (Build_Predicate_Function_Declaration): Always insert
548         the declaration right after that of the type.
550 2016-06-01  Simon Wright  <simon@pushface.org>
552         PR ada/71358
553         * g-comlin.adb (Display_Section_Help): Do not dereference
554         Config.Switches if it's null.
555         (Getopt): Likewise.
557 2016-05-31  Eric Botcazou  <ebotcazou@adacore.com>
559         * s-osinte-kfreebsd-gnu.ads (clock_getres): Define.
560         (Get_Page_Size): Remove duplicate and return int.
562 2016-05-31  Jan Sommer  <soja-lists@aries.uberspace.de>
564         PR ada/71317
565         * s-osinte-rtems.ads (clock_getres): Define.
566         (Get_Page_Size): Remove duplicate and return int.
568 2016-05-20  Eric Botcazou  <ebotcazou@adacore.com>
570         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Signed_Integer_Subtype>:
571         Make same-sized subtypes of signed base types signed.
572         * gcc-interface/utils.c (make_type_from_size): Adjust to above change.
573         (unchecked_convert): Likewise.
575 2016-05-16  Eric Botcazou  <ebotcazou@adacore.com>
577         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Do not build
578         a specific type for the object if it is deemed a constant.
580 2016-05-16  Eric Botcazou  <ebotcazou@adacore.com>
582         * freeze.adb (Freeze_Record_Type): Extend pragma Implicit_Packing to
583         components of any elementary types and of composite types.
585 2016-05-16  Eric Botcazou  <ebotcazou@adacore.com>
587         * freeze.adb (Freeze_Array_Type): Call Addressable predicate instead
588         of testing for individual sizes.
589         (Freeze_Entity): Rework implementation of pragma Implicit_Packing for
590         array types, in particular test for suitable sizes upfront and do not
591         mimic the processing that will be redone later in Freeze_Array_Type.
593 2016-05-16  Eric Botcazou  <ebotcazou@adacore.com>
595         * gcc-interface/trans.c (elaborate_all_entities_for_package): Also skip
596         formal objects.
598 2016-05-16  Eric Botcazou  <ebotcazou@adacore.com>
600         * doc/gnat_rm/implementation_defined_attributes.rst
601         (Scalar_Storage_Order): Adjust restriction for packed array types.
602         * einfo.ads (Is_Bit_Packed_Array): Adjust description.
603         (Is_Packed): Likewise.
604         (Is_Packed_Array_Impl_Type): Likewise.
605         (Packed_Array_Impl_Type): Likewise.
606         * exp_ch4.adb (Expand_N_Indexed_Component): Do not do anything special
607         if the prefix is not a packed array implemented specially.
608         * exp_ch6.adb (Expand_Actuals): Expand indexed components only for
609         bit-packed array types.
610         * exp_pakd.adb (Install_PAT): Set Is_Packed_Array_Impl_Type flag on
611         the PAT before analyzing its declaration.
612         (Create_Packed_Array_Impl_Type): Remove redundant statements.
613         * freeze.adb (Check_Component_Storage_Order): Reject packed array
614         components only if they are bit packed.
615         (Freeze_Array_Type): Fix logic detecting bit packing and do not bit
616         pack for composite types whose size is multiple of a byte.
617         Create the implementation type for packed array types only when it is
618         needed, i.e. bit packing or packing because of holes in index types.
619         Make sure the Has_Non_Standard_Rep and Is_Packed flags agree.
620         * gcc-interface/gigi.h (make_packable_type): Add MAX_ALIGN parameter.
621         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Signed_Integer_Subtype>:
622         Call maybe_pad_type instead of building the padding type manually.
623         (gnat_to_gnu_entity) <E_Array_Subtype>: Do not assert that
624         Packed_Array_Impl_Type is present for packed arrays.
625         (gnat_to_gnu_component_type): Also handle known alignment for packed
626         types by passing it to make_packable_type.
627         * gcc-interface/utils.c (make_packable_type): Add MAX_ALIGN parameter
628         and deal with it in the array case.  Adjust recursive call.  Simplify
629         computation of new size and cap the alignment to BIGGEST_ALIGNMENT.
631 2016-05-16  Thomas Quinot  <quinot@adacore.com>
633         * freeze.adb (Check_Component_Storage_Order): Also get full view of
634         enclosing type.
636 2016-05-16  Eric Botcazou  <ebotcazou@adacore.com>
638         * exp_util.adb (Remove_Side_Effects): Also make a constant if we need
639         to capture the value for a small not by-reference record type.
640         * freeze.ads (Check_Compile_Time_Size): Adjust comment.
641         * freeze.adb (Set_Small_Size): Likewise.  Accept a size in the range
642         of 33 .. 64 bits.
643         (Check_Compile_Time_Size): Merge scalar and access type cases. Change
644         variable name in array type case.  For the computation of the packed
645         size, deal with record components and remove redundant test.
646         (Freeze_Array_Type): Also adjust packing status when the size of the
647         component type is in the range 33 .. 64 bits.
648         * doc/gnat_rm/representation_clauses_and_pragmas.rst: Turn primitive
649         into elementary type throughout.  Minor tweaks.
650         (Alignment Clauses): Document actual alignment of packed array types.
651         (Pragma Pack for Arrays): List only the 3 main cases and adjust.  Add
652         "simple" to the record case.  Document effect on non packable types.
653         (Pragma Pack for Records): Likewise.  Add record case and adjust.
655 2016-05-16  Eric Botcazou  <ebotcazou@adacore.com>
657         * gcc-interface/Make-lang.in (GNATMAKE_FOR_HOST): In the canadian
658         cross case, use host_noncanonical instead of host as prefix.
659         (GNATBIND_FOR_HOST): Likewise.
660         (GNATLINK_FOR_HOST): Likewise.
661         (GNATLS_FOR_HOST): Likewise.
663 2016-05-06  Eric Botcazou  <ebotcazou@adacore.com>
665         PR ada/70969
666         * system-darwin-ppc64.ads: Add pragma No_Elaboration_Code_All.
667         * system-linux-armeb.ads: Likewise.
668         * system-linux-mips64el.ads: Likewise.
669         * system-linux-mips.ads: Likewise.
670         * system-linux-mipsel.ads: Likewise.
671         * system-linux-ppc64.ads: Likewise.
672         * system-linux-sparcv9.ads: Likewise.
673         * system-rtems.ads: Likewise.
675 2016-05-04  Samuel Thibault  <samuel.thibault@ens-lyon.org>
677         * s-osinte-gnu.ads (Get_Page_Size): Return int and use getpagesize
678         instead of __getpagesize.
680 2016-05-02  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
682         * gcc-interface/Makefile.in (install-gcc-specs): Use foreach.
683         Honor DESTDIR.
685 2016-05-02  Tristan Gingold  <gingold@adacore.com>
687         * fname.adb (Is_Predefined_File_Name): Also consider non-krunched
688         i-* names.
690 2016-05-02  Ed Schonberg  <schonberg@adacore.com>
692         * sem_util.adb (Aggregate_Constraint_Checks): Separate
693         accessibility checks and non-null checks for aggregate components,
694         to prevent spurious accessibility errors.
696 2016-05-02  Ed Schonberg  <schonberg@adacore.com>
698         * sem_ch3.adb (OK_For_Limited_Init): A type conversion is not
699         always legal in the in-place initialization of a limited entity
700         (e.g. an allocator).
701         * sem_res.adb (Resolve_Allocator): Improve error message with RM
702         reference  when allocator expression is illegal.
704 2016-05-02  Ed Schonberg  <schonberg@adacore.com>
706         * exp_ch6.adb (Expand_Call): When inlining a call to a function
707         declared in a package instance, locate the instance node of the
708         package after the actual package declaration. skipping over
709         pragmas that may have been introduced when the generic unit
710         carries aspects that are transformed into pragmas.
712 2016-05-02  Bob Duff  <duff@adacore.com>
714         * s-memory.adb (Alloc, Realloc): Move checks
715         for Size = 0 or size_t'Last into the Result = System.Null_Address
716         path for efficiency. Improve comments (based on actual C language
717         requirements for malloc).
718         * exp_util.adb (Build_Allocate_Deallocate_Proc): Optimize the
719         case where we are using the default Global_Pool_Object, and we
720         don't need the heavy finalization machinery.
722 2016-05-02  Gary Dismukes  <dismukes@adacore.com>
724         * exp_util.ads, sem_ch12.adb: Minor reformatting.
726 2016-05-02  Javier Miranda  <miranda@adacore.com>
728         * exp_util.ads, exp_util.adb (Force_Evaluation): Adding new formal.
729         (Remove_Side_Effects): Adding a new formal.
730         * exp_ch6.adb (Expand_Simple_Function_Return): Generating the
731         call to the _Postconditions procedure ensure that side-effects
732         are unconditionally removed.
734 2016-05-02  Ed Schonberg  <schonberg@adacore.com>
736         * sem_ch12.adb (Check_Formal_Package_Instance, Check_Mismatch):
737         Use original node to determine whether the declaration is for
738         a formal type declaration, to take into account that formwl
739         private types are rewritten as private extension declarations
740         to simplify semantic analysis.
742 2016-05-02  Gary Dismukes  <dismukes@adacore.com>
744         * exp_ch9.adb, sem_ch6.adb, sem_ch6.ads: Minor reformatting and typo
745         fixes.
747 2016-05-02  Hristian Kirtchev  <kirtchev@adacore.com>
749         * sem_ch3.adb, exp_ch9.adb, einfo.adb, sem_ch4.adb, sem_ch6.adb: Minor
750         reformatting.
752 2016-05-02  Ed Schonberg  <schonberg@adacore.com>
754         * exp_ch4.adb (Expand_N_Allocator): If the designated type
755         is a private derived type with no discriminants, examine its
756         underlying_full_view to determine whether the full view has
757         defaulted discriminants, so their defaults can be used in the
758         call to the initialization procedure for the designated object.
760 2016-05-02  Hristian Kirtchev  <kirtchev@adacore.com>
762         * exp_prag.adb, comperr.adb: Minor reformatting.
764 2016-05-02  Ed Schonberg  <schonberg@adacore.com>
766         * exp_pakd.adb (Rj_Unchecked_Convert_To): Do not perform an
767         unchecked conversion if the source size is 0 (indicating that
768         its RM size is unknown). This will happen with packed arrays of
769         non-discrete types, in which case the component type is known
770         to match.
772 2016-05-02  Arnaud Charlet  <charlet@adacore.com>
774         * debug.adb: Reserve -gnatd.V.
776 2016-05-02  Javier Miranda  <miranda@adacore.com>
778         * sem_ch3.adb (Process_Full_View): Remove from visibility
779         wrappers of synchronized types to avoid spurious errors with
780         their wrapped entity.
781         * exp_ch9.adb (Build_Wrapper_Spec): Do not generate the wrapper
782         if no interface primitive is covered by the subprogram and this is
783         not a primitive declared between two views; see Process_Full_View.
784         (Build_Protected_Sub_Specification): Link the dispatching
785         subprogram with its original non-dispatching protected subprogram
786         since their names differ.
787         (Expand_N_Protected_Type_Declaration):
788         If a protected subprogram overrides an interface primitive then
789         do not build a wrapper if it was already built.
790         * einfo.ads, einfo.adb (Original_Protected_Subprogram): New attribute.
791         * sem_ch4.adb (Names_Match): New subprogram.
792         * sem_ch6.adb (Check_Synchronized_Overriding): Moved
793         to library level and defined in the public part of the
794         package to invoke it from Exp_Ch9.Build_Wrapper_Spec
795         (Has_Matching_Entry_Or_Subprogram): New subprogram.
796         (Report_Conflict): New subprogram.
798 2016-05-02  Jerome Lambourg  <lambourg@adacore.com>
800         * s-unstyp.ads: Code cleanups.
802 2016-05-02  Hristian Kirtchev  <kirtchev@adacore.com>
804         * sem_ch13.adb (Size_Too_Small_Error): Fix the error message format.
806 2016-05-02  Ed Schonberg  <schonberg@adacore.com>
808         * exp_prag.adb (Expand_attributes_In_Consequence,
809         Expand_Attributes): If the prefix of'Old is an unconstrained type,
810         for example an unconstrained formal of the enclosing subprogram,
811         create an object declaration with an expression to obtain the
812         actual subtype of the temporary.
814 2016-05-02  Arnaud Charlet  <charlet@adacore.com>
816         * comperr.adb (Delete_SCIL_Files): Add missing handling of
817         N_Subprogram_Declaration.
819 2016-05-02  Gary Dismukes  <dismukes@adacore.com>
821         * exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, checks.adb, sem_attr.adb,
822         gnat1drv.adb, sem_ch4.adb, sem_ch13.adb: Minor reformatting and typo
823         fixes.
824         * sem_prag.adb, sem_ch12.adb: Minor typo fixes.
826 2016-05-02  Ed Schonberg  <schonberg@adacore.com>
828         * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): The
829         function call may be wrapped in an explicit type conversion.
831 2016-05-02  Jerome Lambourg  <lambourg@adacore.com>
833         * interfac.ads: use pragma No_Elaboration_Code_All.
834         * s-unstyp.ads: s-unstyp.ads: use pragma No_Elaboration_Code_All.
836 2016-05-02  Ed Schonberg  <schonberg@adacore.com>
838         * sem.adb (Analyze: If node is an error node previously created
839         by the parser, disable expansion to prevent subsequent glitches
840         in error recovery.
842 2016-05-02  Hristian Kirtchev  <kirtchev@adacore.com>
844         * sem_ch13.adb (Alignment_Error): Removed.
845         (Get_Alignment_Value): Code cleanup.
847 2016-05-02  Tristan Gingold  <gingold@adacore.com>
849         * sem_ch3.adb (Analyze_Object_Declaration): Use Has_Protected
850         to check for the no local protected objects restriction.
852 2016-05-02  Hristian Kirtchev  <kirtchev@adacore.com>
854         * einfo.adb Anonymous_Master now uses Node35.
855         (Anonymous_Master): Update the assertion and node reference.
856         (Set_Anonymous_Master): Update the assertion and node reference.
857         (Write_Field35_Name): Add output for Anonymous_Master.
858         (Write_Field36_Name): The output is now undefined.
859         * einfo.ads Update the node and description of attribute
860         Anonymous_Master. Remove prior occurrences in entities as this
861         is now a type attribute.
862         * exp_ch3.adb (Expand_Freeze_Array_Type): Remove local variable
863         Ins_Node. Anonymous access- to-controlled component types no
864         longer need finalization masters. The master is now built when
865         a related allocator is expanded.
866         (Expand_Freeze_Record_Type): Remove local variable Has_AACC. Do not
867         detect whether the record type has at least one component of anonymous
868         access-to- controlled type. These types no longer need finalization
869         masters. The master is now built when a related allocator is expanded.
870         * exp_ch4.adb Remove with and use clauses for Lib and Sem_Ch8.
871         (Current_Anonymous_Master): Removed.
872         (Expand_N_Allocator): Call Build_Anonymous_Master to create a
873         finalization master for an anonymous access-to-controlled type.
874         * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
875         Call routine Build_Anonymous_Master to create a finalization master
876         for an anonymous access-to-controlled type.
877         * exp_ch7.adb (Allows_Finalization_Master): New routine.
878         (Build_Anonymous_Master): New routine.
879         (Build_Finalization_Master): Remove formal parameter
880         For_Anonymous. Use Allows_Finalization_Master to determine whether
881         circumstances warrant a finalization master. This routine no
882         longer creates masters for anonymous access-to-controlled types.
883         (In_Deallocation_Instance): Removed.
884         * exp_ch7.ads (Build_Anonymous_Master): New routine.
885         (Build_Finalization_Master): Remove formal parameter For_Anonymous
886         and update the comment on usage.
887         * sem_util.adb (Get_Qualified_Name): New routines.
888         (Output_Name): Reimplemented.
889         (Output_Scope): Removed.
890         * sem_util.ads (Get_Qualified_Name): New routines.
892 2016-05-02  Hristian Kirtchev  <kirtchev@adacore.com>
894         * debug.adb: Document the use of switch -gnatd.H.
895         * gnat1drv.adb (Adjust_Global_Switches): Set ASIS_GNSA mode when
896         -gnatd.H is present.
897         (Gnat1drv): Suppress the call to gigi when ASIS_GNSA mode is active.
898         * opt.ads: Add new option ASIS_GNSA_Mode.
899         * sem_ch13.adb (Alignment_Error): New routine.
900         (Analyze_Attribute_Definition_Clause): Suppress certain errors in
901         ASIS mode for attribute clause Alignment, Machine_Radix, Size, and
902         Stream_Size.
903         (Check_Size): Use routine Size_Too_Small_Error to
904         suppress certain errors in ASIS mode.
905         (Get_Alignment_Value): Use routine Alignment_Error to suppress certain
906         errors in ASIS mode.
907         (Size_Too_Small_Error): New routine.
909 2016-05-02  Arnaud Charlet  <charlet@adacore.com>
911         * spark_xrefs.ads Description of the spark cross-references
912         clarified; small style fixes.
913         * lib-xref-spark_specific.adb (Add_SPARK_Scope,
914         Detect_And_Add_SPARK_Scope): consider protected types and bodies
915         as yet another scopes.
916         (Enclosing_Subprogram_Or_Library_Package): refactored using
917         Hristian's suggestions; added support for scopes of protected
918         types and bodies; fix for entries to return the scope of the
919         enclosing concurrent type, which is consistent with what is
920         returned for protected subprograms.
921         * sem_intr.adb: Minor style fix in comment.
923 2016-05-02  Hristian Kirtchev  <kirtchev@adacore.com>
925         * lib-xref.ads, lib-xref-spark_specific.adb, get_spark_xrefs.adb,
926         put_spark_xrefs.adb: Minor reformatting.
928 2016-05-02  Doug Rupp  <rupp@adacore.com>
930         * g-traceb.ads: Document traceback for ARM.
932 2016-05-02  Javier Miranda  <miranda@adacore.com>
934         * exp_disp.adb (Make_Tags): Do not generate the
935         external name of interface tags adding the suffix counter since
936         it causes problems at link time when the IP routines are inlined
937         across units with optimization.
939 2016-05-02  Ed Schonberg  <schonberg@adacore.com>
941         * einfo.ads, einfo.adb (Predicates_Ignared): new flag to indicate
942         that predicate checking is disabled for predicated subtypes in
943         the context of an Assertion_Policy pragma.
944         * checks.adb (Apply_Predicate_Check): Do nothing if
945         Predicates_Ignored is true.
946         * exp_ch3.adb (Expand_Freeze_Enumeration_Type): If
947         Predicates_Ignores is true, the function Rep_To_Pos does raise
948         an exception for invalid data.
949         * exp_ch4.adb (Expand_N_Type_Conversion): IF target is a predicated
950         type do not apply check if Predicates_Ignored is true.
951         * exp_ch5.adb (Expand_N_Case_Statement): If Predicates_Ignored
952         is true, sem_prag.adb:
953         * sem_ch3.adb (Analyze_Object_Declaration): If Predicates_Ignored
954         is true do not emit predicate check on initializing expression.
956 2016-05-02  Arnaud Charlet  <charlet@adacore.com>
958         * get_spark_xrefs.adb (Get_Nat, Get_Name): Initialize variables when
959         they are declared; refine type of a counter from Integer to Natural.
960         * sem_ch5.adb, gnatcmd.adb, s-intman-posix.adb, eval_fat.adb,
961         prj.adb, sem_util.adb, s-intman-android.adb, prj-nmsc.adb, sem_ch8.adb,
962         exp_ch3.adb: Minor editing.
964 2016-05-02  Yannick Moy  <moy@adacore.com>
966         * a-tigeli.adb (Get_Line): Always set Last prior to returning.
968 2016-05-02  Yannick Moy  <moy@adacore.com>
970         * lib-xref.adb: Minor style fix in whitespace of declarations.
971         * put_spark_xrefs.adb (Put_SPARK_Xrefs): printing of strings
972         refactored without loops.
973         * put_spark_xrefs.ads (Write_Info_Str): new formal argument of
974         generic procedure.
975         * spark_xrefs.adb (Write_Info_Str): new actual in instantiation
976         of generic procedure.
978 2016-05-02  Arnaud Charlet  <charlet@adacore.com>
980         * lib-xref-spark_specific.adb (Add_SPARK_Scope): add task type scope.
981         (Detect_And_Add_SPARK_Scope): detect and add task type scope.
982         (Enclosing_Subprogram_Or_Package): Respect boundaries of task
983         and entry declarations.
984         * spark_xrefs.ads: minor typo in comment.
986 2016-05-02  Arnaud Charlet  <charlet@adacore.com>
988         * make.adb: Minor: avoid an exception when calling gnatmake with
989         no argument and gnatmake is built with checks on.
990         * lib-xref-spark_specific.adb: Minor code cleanup.
992 2016-05-02  Ed Schonberg  <schonberg@adacore.com>
994         * sem_util.adb (Normalize_Actuals): Take into account extra
995         actuals that may have been introduced previously. Normally extra
996         actuals are introduced when a call is expanded, but a validity
997         check may copy and reanalyze a call that carries an extra actual
998         (e.g. an accessibility parameter) before the call itself is
999         marked Analzyed, and the analysis of the copy has to be able to
1000         cope with the added actual.
1002 2016-05-02  Bob Duff  <duff@adacore.com>
1004         * sem_ch10.adb (Analyze_Compilation_Unit): Preserve
1005         treeishness. Previous version had Context_Items shared between
1006         the spec and body.
1008 2016-05-02  Ed Schonberg  <schonberg@adacore.com>
1010         * sem_aggr.adb (Resolve_Aggr_Expression): For both array and
1011         record cases, apply predicate check on component for expression
1012         only if expression has been analyzed already. For expressions
1013         that need to be duplicated when they cover multiple components,
1014         resolution and predicate checking take place later.
1016 2016-05-02  Olivier Hainque  <hainque@adacore.com>
1018         * a-direct.adb (Delete_Tree): Use full names to designate subdirs
1019         and files therein, instead of local names after a change of
1020         current directory.
1022 2016-05-02  Thomas Quinot  <quinot@adacore.com>
1024         * freeze.adb (Check_Component_Storage_Order): Get full view of
1025         component type.
1027 2016-05-02  Hristian Kirtchev  <kirtchev@adacore.com>
1029         * checks.adb, freeze.adb, sem_res.adb, s-stposu.adb, repinfo.adb:
1030         Minor reformatting.
1032 2016-05-02  Hristian Kirtchev  <kirtchev@adacore.com>
1034         * sem_ch4.adb (Find_Indexing_Operations): Use the underlying type
1035         of the container base type in case the container is a subtype.
1036         * sem_ch5.adb (Analyze_Iterator_Specification): Ensure that
1037         the selector has an entity when checking for a component of a
1038         mutable object.
1040 2016-05-02  Arnaud Charlet  <charlet@adacore.com>
1042         Remove dead code.
1043         * opt.ads (Latest_Ada_Only): New flag.
1044         * sem_prag.adb, par-prag.adb: Ignore pragma Ada_xx under this flag.
1045         * usage.adb, switch-c.adb: Disable support for -gnatxx under this flag.
1046         * einfo.ads (Has_Predicates, Predicate_Function):
1047         Clarify that Has_Predicates does not imply that Predicate_Function
1048         will return a non-empty entity.
1050 2016-05-02  Ed Schonberg  <schonberg@adacore.com>
1052         * sem_res.adb (Resolve_Qualified_Expression): Generate a predicate
1053         check if type requires it.
1054         * checks.adb (Apply_Predicate_Check): Disable checks in the
1055         object declaration created for an expression with side-effects
1056         that requires a predicate check to prevent infinite recursion
1057         during expansion.
1059 2016-05-02  Ed Schonberg  <schonberg@adacore.com>
1061         * sem_ch6.adb (Process_Formals): Check properly the type of a
1062         formal to determine whether a given convention applies to it.
1064 2016-05-02  Doug Rupp  <rupp@adacore.com>
1066         * tracebak.c: Add incantations for arm-vxworks[67] traceback.
1068 2016-05-02  Thomas Quinot  <quinot@adacore.com>
1070         * freeze.adb (Check_Component_Storage_Order): Make it a warning, not an
1071         error, to have a component with implicit SSO within a composite type
1072         that has explicit SSO.
1074 2016-05-02  Bob Duff  <duff@adacore.com>
1076         * s-stposu.adb (Allocate_Any_Controlled): Don't lock/unlock twice.
1078 2016-05-02  Ed Schonberg  <schonberg@adacore.com>
1080         * repinfo.adb (List_Entities): Make procedure recursive, to
1081         provide representation information for subprograms declared
1082         within subprogram bodies.
1084 2016-05-02  Arnaud Charlet  <charlet@adacore.com>
1086         * exp_ch5.adb, layout.adb, gnatcmd.adb exp_attr.adb, make.adb,
1087         bindgen.adb, debug.adb, exp_pakd.adb, freeze.adb, sem_util.adb,
1088         gnatlink.adb, switch-m.adb, exp_ch4.adb, repinfo.adb, adabkend.adb,
1089         osint.adb: Remove dead code.
1091 2016-05-02  Yannick Moy  <moy@adacore.com>
1093         * a-tigeli.adb (Get_Line): Fix bound for test to
1094         decide when to compensate for character 0 added by call to fgets.
1096 2016-05-02  Ed Schonberg  <schonberg@adacore.com>
1098         * sem_ch4.adb (Analyze_Allocator): If the expression does not
1099         have a subtype indication and the type is an unconstrained tagged
1100         type with defaulted discriminants, create an explicit constraint
1101         for it during analysis to prevent out-of-order freezing actions
1102         on generated classwide types.
1104 2016-05-02  Javier Miranda  <miranda@adacore.com>
1106         * exp_ch5.adb (Expand_N_Assignment_Statement):
1107         In the runtime check that ensures that the tags of source an
1108         target match, add missing displacement of the pointer to the
1109         objects if they cover interface types.
1111 2016-05-02  Ed Schonberg  <schonberg@adacore.com>
1113         * sem_attr.adb (Analyze_Attribute, case 'Old): Do not use
1114         base type for attribute when type is discrete: transformation
1115         is not needed for such types, and leads to spurious errors if
1116         the context is a case construct.
1118 2016-05-02  Eric Botcazou  <ebotcazou@adacore.com>
1120         * gcc-interface/decl.c (elaborate_reference_1): Do not bother about
1121         operand #2 for COMPONENT_REF.
1122         * gcc-interface/utils2.c (gnat_save_expr): Likewise.
1123         (gnat_protect_expr): Likewise.
1124         (gnat_stabilize_reference_1): Likewise.
1125         (gnat_rewrite_reference): Do not bother about operand #3 for ARRAY_REF.
1126         (get_inner_constant_reference): Likewise.
1127         (gnat_invariant_expr): Likewise.
1128         * gcc-interface/trans.c (fold_constant_decl_in_expr): Likewise.
1130 2016-05-02  Eric Botcazou  <ebotcazou@adacore.com>
1132         * gcc-interface/trans.c (Range_to_gnu): New static function.
1133         (Raise_Error_to_gnu) <N_In>: Call it to translate the range.
1134         (gnat_to_gnu) <N_In>: Likewise.
1136 2016-04-30  Eric Botcazou  <ebotcazou@adacore.com>
1138         * gcc-interface/Make-lang.in (ACATSCMD): New variable.
1139         (check-acats): Use it.
1140         (check_acats_targets): Likewise.
1142 2016-04-28  Eric Botcazou  <ebotcazou@adacore.com>
1144         PR ada/70786
1145         * a-textio.adb (Get_Immediate): Add missing 'not' in expression.
1147 2016-04-27  Eric Botcazou  <ebotcazou@adacore.com>
1149         * sem_aux.adb (Is_By_Reference_Type): Also return true for a tagged
1150         incomplete type without full view.
1151         * sem_ch6.adb (Exchange_Limited_Views): Change into a function and
1152         return the list of changes.
1153         (Restore_Limited_Views): New procedure to undo the transformation made
1154         by Exchange_Limited_Views.
1155         (Analyze_Subprogram_Body_Helper): Adjust call to Exchange_Limited_Views
1156         and call Restore_Limited_Views at the end, if need be.
1157         (Possible_Freeze): Do not delay freezing because of incomplete types.
1158         (Process_Formals): Remove kludges for class-wide types.
1159         * types.h (By_Copy_Return): Delete.
1160         * gcc-interface/ada-tree.h (TYPE_MAX_ALIGN): Move around.
1161         (TYPE_DUMMY_IN_PROFILE_P): New macro.
1162         * gcc-interface/gigi.h (update_profiles_with): Declare.
1163         (finish_subprog_decl): Likewise.
1164         (get_minimal_subprog_decl): Delete.
1165         (create_subprog_type): Likewise.
1166         (create_param_decl): Adjust prototype.
1167         (create_subprog_decl): Likewise.
1168         * gcc-interface/decl.c (defer_limited_with): Rename into...
1169         (defer_limited_with_list): ...this.
1170         (gnat_to_gnu_entity): Adjust to above renaming.
1171         (finalize_from_limited_with): Likewise.
1172         (tree_entity_vec_map): New structure.
1173         (gt_pch_nx): New helpers.
1174         (dummy_to_subprog_map): New hash table.
1175         (gnat_to_gnu_param): Set the SLOC here.  Remove MECH parameter and
1176         add FIRST parameter.  Deal with the mechanism here instead of...
1177         Do not make read-only variant of types.  Simplify expressions.
1178         In the by-ref case, test the mechanism before must_pass_by_ref
1179         and also TYPE_IS_BY_REFERENCE_P before building the reference type.
1180         (gnat_to_gnu_subprog_type): New static function extracted from...
1181         Do not special-case the type_annotate_only mode.  Call
1182         gnat_to_gnu_profile_type instead of gnat_to_gnu_type on return type.
1183         Deal with dummy return types.  Likewise for parameter types.  Deal
1184         with by-reference types explicitly and add a kludge for null procedures
1185         with untagged incomplete types.  Remove assertion on the types and be
1186         prepared for multiple elaboration of the declarations.  Skip the whole
1187         CICO processing if the profile is incomplete.  Handle the completion of
1188         a previously incomplete profile.
1189         (gnat_to_gnu_entity) <E_Variable>: Rename local variable.
1190         Adjust couple of calls to create_param_decl.
1191         <E_Access_Subprogram_Type, E_Anonymous_Access_Subprogram_Type>:
1192         Remove specific deferring code.
1193         <E_Access_Type>: Also deal with E_Subprogram_Type designated type.
1194         Simplify handling of dummy types and remove obsolete comment.
1195         Constify a couple of variables.  Do not set TYPE_UNIVERSAL_ALIASING_P
1196         on dummy types.
1197         <E_Access_Subtype>: Tweak comment and simplify condition.
1198         <E_Subprogram_Type>: ...here.  Call it and clean up handling.  Remove
1199         obsolete comment and adjust call to gnat_to_gnu_param.  Adjust call to
1200         create_subprog_decl.
1201         <E_Incomplete_Type>: Add a couple of 'const' qualifiers and get rid of
1202         inner break statements.  Tidy up condition guarding direct use of the
1203         full view.
1204         (get_minimal_subprog_decl): Delete.
1205         (finalize_from_limited_with): Call update_profiles_with on dummy types
1206         with TYPE_DUMMY_IN_PROFILE_P set.
1207         (is_from_limited_with_of_main): Delete.
1208         (associate_subprog_with_dummy_type): New function.
1209         (update_profile): Likewise.
1210         (update_profiles_with): Likewise.
1211         (gnat_to_gnu_profile_type): Likewise.
1212         (init_gnat_decl): Initialize dummy_to_subprog_map.
1213         (destroy_gnat_decl): Destroy dummy_to_subprog_map.
1214         * gcc-interface/misc.c (gnat_get_alias_set): Add guard for accessing
1215         TYPE_UNIVERSAL_ALIASING_P.
1216         (gnat_get_array_descr_info): Minor tweak.
1217         * gcc-interface/trans.c (gigi): Adjust calls to create_subprog_decl.
1218         (build_raise_check): Likewise.
1219         (Compilation_Unit_to_gnu): Likewise.
1220         (Identifier_to_gnu): Accept mismatches coming from a limited context.
1221         (Attribute_to_gnu): Remove kludge for dispatch table entities.
1222         (process_freeze_entity): Do not retrieve old definition if there is an
1223         address clause on the entity.  Call update_profiles_with on dummy types
1224         with TYPE_DUMMY_IN_PROFILE_P set.
1225         * gcc-interface/utils.c (build_dummy_unc_pointer_types): Also set
1226         TYPE_REFERENCE_TO to the fat pointer type.
1227         (create_subprog_type): Delete.
1228         (create_param_decl): Remove READONLY parameter.
1229         (finish_subprog_decl): New function extracted from...
1230         (create_subprog_decl): ...here.  Call it.  Remove CONST_FLAG and
1231         VOLATILE_FLAG parameters and adjust.
1232         (update_pointer_to): Also clear TYPE_REFERENCE_TO in the unconstrained
1233         case.
1235 2016-04-27  Arnaud Charlet  <charlet@adacore.com>
1237         * aa_util.adb, aa_util.ads: Removed, no longer used.
1239 2016-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
1241         * sem_prag.adb (Analyze_Pragma): An object
1242         renaming declaration resulting from the expansion of an object
1243         declaration is a suitable context for pragma Ghost.
1245 2016-04-27  Doug Rupp  <rupp@adacore.com>
1247         * init.c: Refine last checkin so the only requirement is the
1248         signaling compilation unit is compiled with the same mode as
1249         the compilation unit containing the initial landing pad.
1251 2016-04-27  Ed Schonberg  <schonberg@adacore.com>
1253         * sem_ch13.adb (Valid_Default_Iterator): Better filter of illegal
1254         specifications for Default_Iterator, including overloaded cases
1255         where no interpretations are legal, and return types that are
1256         not iterator types.
1258 2016-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
1260         * exp_ch5.adb (Expand_N_Assignment_Statement): Do not install
1261         an accessibility check when the left hand side of the assignment
1262         denotes a container cursor.
1263         * exp_util.ads, exp_util.adb (Find_Primitive_Operations): Removed.
1264         * sem_ch4.adb (Find_Indexing_Operations): New routine.
1265         (Try_Container_Indexing): Code cleanup.
1267 2016-04-27  Arnaud Charlet  <charlet@adacore.com>
1269         * sem_ch10.adb, sem_case.adb: Mark messages udner -gnatwr when needed.
1271 2016-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
1273         * errout.adb, errutil.adb: Minor reformatting.
1275 2016-04-27  Ed Schonberg  <schonberg@adacore.com>
1277         * sem_ch13.adb (Analyze_Aspect_Specifications, case Pre/Post):
1278         Check that the classwide version is illegal when the prefix is
1279         an operation of an untagged synchronized type.
1281 2016-04-27  Arnaud Charlet  <charleT@adacore.com>
1283         * sinput-l.ads, sem_ch13.adb: Minor editing.
1285 2016-04-27  Doug Rupp  <rupp@adacore.com>
1287         * init.c (__gnat_adjust_context_for_raise) [arm-linux thumb]:
1288         Bump the pc so the lower order bit is set.
1290 2016-04-27  Ed Schonberg  <schonberg@adacore.com>
1292         * sem_case.adb, sem_case.ads (NO_Op): If appropriate warning is
1293         enabled, report an empty range in a case construct.
1295 2016-04-27  Arnaud Charlet  <charlet@adacore.com>
1297         * sinput.ads, a-cfdlli.adb, a-crbtgo.adb, a-chtgop.adb, a-cbhama.adb,
1298         a-rbtgbo.adb, a-crdlli.adb, a-chtgbo.adb: Minor editing.
1300 2016-04-27  Bob Duff  <duff@adacore.com>
1302         * a-chtgop.adb (Adjust): Zero the tampering counts on assignment,
1303         as is done for the other containers.
1305 2016-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
1307         * ghost.adb (In_Subprogram_Body_Profile): New routine.
1308         (Is_OK_Declaration): Treat an unanalyzed expression
1309         function as an OK context.  Treat a reference to a Ghost entity
1310         as OK when it appears within the profile of a subprogram body.
1312 2016-04-27  Bob Duff  <duff@adacore.com>
1314         * errout.ads: Document the fact that informational messages
1315         don't have to be warnings.
1316         * errout.adb (Error_Msg_Internal): In statistics counts, deal
1317         correctly with informational messages that are not warnings.
1318         (Error_Msg_NEL): Remove useless 'if' aroung Set_Posted, because
1319         Set_Posted already checks for errors and ignores others.
1320         * erroutc.adb (Prescan_Message): Set Is_Serious_Error to False
1321         if Is_Info_Msg; the previous code was assuming that Is_Info_Msg
1322         implies Is_Warning_Msg.
1323         * errutil.adb (Error_Msg): In statistics counts, deal correctly
1324         with informational messages that are not warnings.
1326 2016-04-27  Ed Schonberg  <schonberg@adacore.com>
1328         * sem_util.ads, sem_util.adb (Is_Null_Record_Type): New predicate
1329         to determine whether a record type is a null record.
1330         * sem_ch3.adb (Analyze_Object_Declaration): If the type is a
1331         null record and there is no expression in the declaration,
1332         no predicate check applies to the object.
1334 2016-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
1336         * sem_ch7.adb (Analyze_Package_Body_Helper): The body of an
1337         instantiated package should not cause freezing of previous contracts.
1339 2016-04-27  Ed Schonberg  <schonberg@adacore.com>
1341         * sem_dim.adb (Analyze_Dimension): Handle subtype declarations
1342         that do not come from source.
1343         (Analyze_Dimension_Subtype_Declaration): Allow confirming
1344         dimensions on subtype entity, either inherited from base type
1345         or provided by aspect specification.
1347 2016-04-27  Ed Schonberg  <schonberg@adacore.com>
1349         * s-gearop.ads (Matrix_Vector_Solution, Matrix_Matrix_Solution):
1350         Add scalar formal object Zero, to allow detection and report
1351         when the matrix is singular.
1352         * s-gearop.adb (Matrix_Vector_Solution, Matrix_Matrix_Solution):
1353         Raise Constraint_Error if the Forward_Eliminate pass has
1354         determined that determinant is Zero.o
1355         * s-ngrear.adb (Solve): Add actual for Zero in corresponding
1356         instantiations.
1357         * s-ngcoar.adb (Solve): Ditto.
1359 2016-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
1361         * sem_ch3.adb: Minor reformatting.
1363 2016-04-27  Ed Schonberg  <schonberg@adacore.com>
1365         * sem_dim.adb (Analyze_Dimension, case N_Identifier): Check
1366         that identifier has a usable type before analysis, to handle
1367         properly identifiers introduced after some lexical/syntactic
1368         recovery that created new identifiers.
1370 2016-04-27  Bob Duff  <duff@adacore.com>
1372         * a-coinve.adb, a-comutr.adb, a-conhel.adb, a-convec.adb,
1373         exp_util.adb: Remove assertions that can fail in obscure cases when
1374         assertions are turned on but tampering checks are turned off.
1376 2016-04-27  Javier Miranda  <miranda@adacore.com>
1378         * exp_ch6.adb (Add_Call_By_Copy_Code,
1379         Add_Simple_Call_By_Copy_Code, Expand_Actuals): Handle formals
1380         whose type comes from the limited view.
1382 2016-04-27  Yannick Moy  <moy@adacore.com>
1384         * a-textio.adb: Complete previous patch.
1386 2016-04-27  Yannick Moy  <moy@adacore.com>
1388         * inline.adb (Expand_Inlined_Call): Use Cannot_Inline instead of
1389         Error_Msg_N to issue message about impossibility to inline call,
1390         with slight change of message.
1392 2016-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
1394         * exp_spark.adb (Expand_Potential_Renaming): Removed.
1395         (Expand_SPARK): Update the call to expand a potential renaming.
1396         (Expand_SPARK_Potential_Renaming): New routine.
1397         * exp_spark.ads (Expand_SPARK_Potential_Renaming): New routine.
1398         * sem.adb Add with and use clauses for Exp_SPARK.
1399         (Analyze): Expand a non-overloaded potential renaming for SPARK.
1401 2016-04-27  Ed Schonberg  <schonberg@adacore.com>
1403         * sem_ch3.adb (Constrain_Discriminated_Type): In an instance,
1404         check full view for the presence of defaulted discriminants,
1405         even when the partial view of a private type has no visible and
1406         no unknown discriminants.
1408 2016-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
1410         * lib-xref.adb, exp_ch3.adb: Minor reformatting.
1412 2016-04-27  Nicolas Roche  <roche@adacore.com>
1414         * rtinit.c: Add weak symbol __gnat_do_argv_expansion.
1416 2016-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
1418         * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile): Code
1419         cleanup. Check the original node when trying to determine the node kind
1420         of pragma Volatile's argument to account for untagged derivations
1421         where the type is transformed into a constrained subtype.
1423 2016-04-27  Olivier Hainque  <hainque@adacore.com>
1425         * mkdir.c (__gnat_mkdir): Rework the vxworks section to use a
1426         consistent posix interface on the caller side.
1428 2016-04-27  Ed Schonberg  <schonberg@adacore.com>
1430         * sem_ch10.adb (Build_Limited_View, Decorate_Type): If this
1431         is a limited view of a type, initialize the Limited_Dependents
1432         field to catch misuses of the type in a client unit.
1434 2016-04-27  Thomas Quinot  <quinot@adacore.com>
1436         * a-strunb-shared.adb (Finalize): add missing Reference call.
1437         * s-strhas.adb: minor grammar fix and extension of comment
1438         * sem_ch8.adb: minor whitespace fixes
1440 2016-04-27  Ed Schonberg  <schonberg@adacore.com>
1442         * lib-xref.adb (Get_Type_Reference): Handle properly the case
1443         of an object declaration whose type definition is a class-wide
1444         subtype and whose expression is a function call that returns a
1445         classwide type.
1447 2016-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
1449         * sem_util.ads, sem_util.adb (Output_Entity): New routine.
1450         (Output_Name): New routine.
1452 2016-04-27  Bob Duff  <duff@adacore.com>
1454         * exp_ch3.adb (Rewrite_As_Renaming): Disable previous change for now.
1456 2016-04-27  Vincent Celier  <celier@adacore.com>
1458         * gnatcmd.adb: For "gnat ls -V -P", recognize switch
1459         --unchecked-shared-lib-imports and set the flag
1460         Opt.Unchecked_Shared_Lib_Imports accordingly.
1462 2016-04-27  Ed Schonberg  <schonberg@adacore.com>
1464         * sem_prag.adb (Analyze_Pre_Post_Condition_In_Decl_Part):
1465         A generic subprogram is never a primitive operation, and thus
1466         a classwide condition for it is not legal.
1468 2016-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
1470         * sem_aggr.adb, sem_dim.adb, sem_dim.ads, einfo.adb: Minor
1471         reformatting.
1473 2016-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
1475         * sem_res.adb (Flag_Effectively_Volatile_Objects): New routine.
1476         (Resolve_Actuals): Flag effectively volatile objects with enabled
1477         property Async_Writers or Effective_Reads as illegal.
1478         * sem_util.adb (Is_OK_Volatile_Context): Comment reformatting.
1480 2016-04-27  Javier Miranda  <miranda@adacore.com>
1482         * exp_ch3.adb (Make_Predefined_Primitive_Specs):
1483         Do not generate the profile of the equality operator if it has
1484         been explicitly defined as abstract in the parent type. Required
1485         to avoid reporting an spurious error.
1487 2016-04-27  Ed Schonberg  <schonberg@adacore.com>
1489         * sem_dim.ads, sem_dim.adb (Check_Expression_Dimensions): New
1490         procedure to compute the dimension vector of a scalar expression
1491         and compare it with the dimensions if its expected subtype. Used
1492         for the ultimate components of a multidimensional aggregate,
1493         whose components typically are themselves aggregates that are
1494         expanded separately. Previous to this patch, dimensionality
1495         checking on such aggregates generated spurious errors.
1496         * sem_aggr.adb (Resolve_Array_Aggregate): Use
1497         Check_Expression_Dimensions when needed.
1499 2016-04-27  Javier Miranda  <miranda@adacore.com>
1501         * einfo.ads, einfo.adb (Corresponding_Function): New attribute
1502         (applicable to E_Procedure).
1503         (Corresponding_Procedure): New attribute (applicable to E_Function).
1504         * exp_util.adb (Build_Procedure_Form): Link the function with
1505         its internally built proc and viceversa.
1506         * sem_ch6.adb (Build_Subprogram_Declaration): Propagate the
1507         attribute Rewritten_For_C and Corresponding_Procedure to the body.
1508         * exp_ch6.adb (Rewritten_For_C_Func_Id): Removed.
1509         (Rewritten_For_C_Proc_Id): Removed.
1510         * exp_unst.adb (Note_Uplevel_Ref): Use the new attribute to
1511         locate the corresponding procedure.
1513 2016-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
1515         * sem_ch13.adb (Analyze_Aspect_Export_Import): Signal that there is no
1516         corresponding pragma.
1518 2016-04-27  Bob Duff  <duff@adacore.com>
1520         * exp_ch3.adb: Minor comment improvement.
1522 2016-04-27  Ed Schonberg  <schonberg@adacore.com>
1524         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration): If the
1525         return type is an untagged limited record with only access
1526         discriminants and no controlled components, the return value does not
1527         need to use the secondary stack.
1529 2016-04-27  Javier Miranda  <miranda@adacore.com>
1531         * exp_util.adb (Remove_Side_Effects): When
1532         generating C code handle object declarations that have
1533         discriminants and are initialized by means of a call to a
1534         function.
1536 2016-04-27  Ed Schonberg  <schonberg@adacore.com>
1538         * a-textio.adb (Get_Line function): Handle properly the case of
1539         a line that has the same length as the buffer (or a multiple
1540         thereof) and there is no line terminator.
1541         * a-tigeli.adb (Get_Line procedure): Do not store an end_of_file
1542         in the string when there is no previous line terminator and we
1543         need at most one additional character.
1545 2016-04-27  Arnaud Charlet  <charlet@adacore.com>
1547         * s-rident.ads: Make No_Implicit_Loops non partition wide.
1549 2016-04-27  Arnaud Charlet  <charlet@adacore.com>
1551         * sem_ch11.adb (Analyze_Handled_Statements): check useless
1552         assignments also in entries and task bodies, not only in
1553         procedures and declaration blocks.
1554         * sem_ch5.adb (Analyze_Block_Statement): check useless
1555         assignements in declaration blocks as part of processing their
1556         handled statement sequence, just like it was done for procedures
1557         and now is also done for entries and task bodies.
1558         * sem_warn.adb (Warn_On_Useless_Assignment): detect boundries
1559         of entries and task bodies just like of procedures.
1561 2016-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
1563         * sem_util.adb (Is_Volatile_Function): Recognize
1564         a function declared within a protected type as well as the
1565         protected/unprotected version of a function.
1567 2016-04-27  Bob Duff  <duff@adacore.com>
1569         * exp_ch3.adb (Expand_N_Object_Declaration): Rewrite an object
1570         declaration of the form "X : T := Func (...);", where T is
1571         controlled, as a renaming.
1572         * a-strunb-shared.adb (Finalize): Set the Unbounded_String Object
1573         to be an empty string, instead of null-ing out the Reference.
1574         * exp_util.adb (Needs_Finalization): Remove redundant code.
1576 2016-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
1578         * aspects.ads Aspects Export and Import do not require delay. They
1579         were classified as delayed aspects, but treated as non-delayed
1580         by the analysis of aspects.
1581         * freeze.adb (Copy_Import_Pragma): New routine.
1582         (Wrap_Imported_Subprogram): Copy the import pragma by first
1583         resetting all semantic fields to avoid an infinite loop when
1584         performing the copy.
1585         * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): Add
1586         comment on the processing of aspects Export and Import
1587         at the freeze point.
1588         (Analyze_Aspect_Convention: New routine.
1589         (Analyze_Aspect_Export_Import): New routine.
1590         (Analyze_Aspect_External_Link_Name): New routine.
1591         (Analyze_Aspect_External_Or_Link_Name): Removed.
1592         (Analyze_Aspect_Specifications): Factor out the analysis of
1593         aspects Convention, Export, External_Name, Import, and Link_Name
1594         in their respective routines.  Aspects Export and Import should
1595         not generate a Boolean pragma because their corresponding pragmas
1596         have a very different syntax.
1597         (Build_Export_Import_Pragma): New routine.
1598         (Get_Interfacing_Aspects): New routine.
1600 2016-04-27  Eric Botcazou  <ebotcazou@adacore.com>
1602         * inline.adb (Add_Inlined_Body): Overhaul implementation,
1603         robustify handling of -gnatn1, add special treatment for
1604         expression functions.
1606 2016-04-27  Doug Rupp  <rupp@adacore.com>
1608         * g-traceb.ads: Update comment.
1609         * exp_ch2.adb: minor style fix in object declaration
1611 2016-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
1613         * sem_elab.adb (Check_Internal_Call): Do not
1614         consider a call when it appears within pragma Initial_Condition
1615         since the pragma is part of the elaboration statements of a
1616         package body and may only call external subprograms or subprograms
1617         whose body is already available.
1618         (Within_Initial_Condition): New routine.
1620 2016-04-27  Ed Schonberg  <schonberg@adacore.com>
1622         * exp_util.adb (Build_Procedure_Form): Prevent double generation
1623         of the procedure form when dealing with an expression function
1624         whose return type is an array.
1625         * sem_ch3.adb: Fix out-of order Has_Predicates setting.
1626         * exp_ch6.adb: Proper conversion for inherited operation in C.
1627         * sem_ch6.adb: Code cleanup.
1629 2016-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
1631         * lib-xref.ads, sem_ch10.adb: minor style fix in comment
1632         * g-socket.adb: Minor reformatting.
1633         * sinfo.ads: Minor comment correction.
1634         * sem_warn.ads: minor grammar fix in comment
1636 2016-04-27  Eric Botcazou  <ebotcazou@adacore.com>
1638         * gcc-interface/gigi.h (gnat_to_gnu_entity): Adjust prototype.
1639         (maybe_pad_type): Adjust comment.
1640         (finish_record_type): Likewise.
1641         (rest_of_record_type_compilation): Likewise.
1642         * gcc-interface/decl.c (gnat_to_gnu_entity): Change DEFINITION type
1643         parameter from integer to boolean.  Adjust recursive calls.
1644         <E_Subprogram_Type>: Use copy_type and remove redundant assignments.
1645         <E_Signed_Integer_Subtype>:  Adjust comment.  Remove call to
1646         rest_of_record_type_compilation.  Set TYPE_PADDING_P flag earlier.
1647         Pass false to finish_record_type.  Set the debug type later.
1648         <E_Record_Subtype>: Remove call to rest_of_record_type_compilation.
1649         (gnat_to_gnu_component_type): Fix formatting.
1650         (gnat_to_gnu_field_decl): Adjust call to gnat_to_gnu_entity.
1651         (gnat_to_gnu_type): Likewise.
1652         * gcc-interface/trans.c (Identifier_to_gnu): Likewise.
1653         (Loop_Statement_to_gnu): Likewise.
1654         (Subprogram_Body_to_gnu): Likewise.
1655         (Exception_Handler_to_gnu_fe_sjlj): Likewise.
1656         (Exception_Handler_to_gnu_gcc): Likewise.
1657         (Compilation_Unit_to_gnu): Likewise.
1658         (gnat_to_gnu): Likewise.
1659         (push_exception_label_stack): Likewise.
1660         (elaborate_all_entities_for_package): Likewise.
1661         (process_freeze_entity): Likewise.
1662         (process_decls): Likewise.
1663         (process_type): Likewise.
1664         * gcc-interface/utils.c (struct deferred_decl_context_node): Tweak.
1665         (maybe_pad_type): Adjust comments.  Set the debug type later.  Remove
1666         call to rest_of_record_type_compilation.
1667         (rest_of_record_type_compilation): Use copy_type.
1668         (copy_type): Use correctly typed constants.
1669         (gnat_signed_or_unsigned_type_for): Use copy_type.
1670         * gcc-interface/utils2.c (nonbinary_modular_operation): Likewise.
1671         (build_goto_raise): Adjust call tognat_to_gnu_entity.
1673 2016-04-27  Eric Botcazou  <ebotcazou@adacore.com>
1675         * gcc-interface/misc.c (gnat_init): Do not call
1676         internal_reference_types.
1678 2016-04-27  Svante Signell  <svante.signell@gmail.com>
1680         * gcc-interface/Makefile.in (x86 GNU/Hurd): Use s-osinte-gnu.adb.
1681         * s-osinte-gnu.ads: Small tweaks.
1682         * s-osinte-gnu.adb: New file.
1684 2016-04-21  Hristian Kirtchev  <kirtchev@adacore.com>
1686         * sem_prag.adb (Match_Constituent): Treat a constant as a legal
1687         constituent even if it is not to prevent spurious errors.
1689 2016-04-21  Gary Dismukes  <dismukes@adacore.com>
1691         * sem_ch4.adb: Minor typo fixes and reformatting.
1693 2016-04-21  Dmitriy Anisimkov  <anisimko@adacore.com>
1695         * g-calend.ads (No_Time): The same value in any timezone.
1696         * g-socket.adb (Raise_Host_Error): Remove ending
1697         dot from original error message before append colon delimited
1698         host name.
1700 2016-04-21  Hristian Kirtchev  <kirtchev@adacore.com>
1702         * sem_ch3.adb: Code cleanup.
1703         * sem_ch6.adb: Code cleanup.
1704         (Is_Matching_Limited_View): New routine.
1705         (Matches_Limited_With_View): Reimplemented.
1706         * sem_ch10.adb (Decorate_Type): Code cleanup.
1708 2016-04-21  Doug Rupp  <rupp@adacore.com>
1710         * tracebak.c (PPC ELF): Add macro defs for lynxos178e.
1712 2016-04-21  Ed Schonberg  <schonberg@adacore.com>
1714         * sem_ch4.adb (Try_Container_Indexing): If there are overloaded
1715         indexing functions, collect all overloadings of the call firts,
1716         and then transfer them to indexing node, to prevent interleaving
1717         of the set of interpretations of the nodes involved.
1718         * sem_res.adb (Resolve): Suppress cascaded errors that report
1719         ambiguities when one of the actuals in an overloaded generatlized
1720         indexing operation is illegal and has type Any_Type, as is done
1721         for similar cascaded errors in subprogram calls.
1722         (Valid_Tagged_Conversion): Cleanup conversion checks when one
1723         of the types involved is a class-wide subtype.
1725 2016-04-21  Ed Schonberg  <schonberg@adacore.com>
1727         * sem_ch12.adb (Load_Parent_Of_Generic): When looking for the
1728         subprogram declaration within a wrapper package, skip pragmas
1729         that may have been generated by aspect specifications on the
1730         generic instance.
1732 2016-04-21  Javier Miranda  <miranda@adacore.com>
1734         * exp_aggr.adb (Component_Not_OK_For_Backend): Generating C
1735         code return True for array identifiers since the backend needs
1736         to initialize such component by means of memcpy().
1738 2016-04-21  Arnaud Charlet  <charlet@adacore.com>
1740         * a-tasatt.adb, a-tasatt.ads (Fast_Path): Rewritten to avoid reading
1741         potentially uninitialized memory.
1742         * sem_ch3.adb: Minor style fix in comment.
1744 2016-04-21  Arnaud Charlet  <charlet@adacore.com>
1746         * gnat_rm.texi, gnat_ugn.texi,
1747         doc/gnat_ugn/gnat_project_manager.rst,
1748         doc/gnat_ugn/building_executable_programs_with_gnat.rst,
1749         doc/gnat_ugn/gnat_and_program_execution.rst,
1750         doc/gnat_ugn/gnat_utility_programs.rst,
1751         doc/gnat_ugn/the_gnat_compilation_model.rst,
1752         doc/gnat_rm/implementation_defined_attributes.rst,
1753         doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
1754         doc/gnat_rm/implementation_defined_pragmas.rst,
1755         doc/gnat_rm/the_gnat_library.rst,
1756         doc/gnat_rm/implementation_defined_aspects.rst: Update doc.
1757         * doc/Makefile: Cleanups.
1759 2016-04-21  Hristian Kirtchev  <kirtchev@adacore.com>
1761         * exp_pakd.adb, sem_ch13.adb: Minor reformatting.
1763 2016-04-21  Ed Schonberg  <schonberg@adacore.com>
1765         * exp_dbug.adb, exp_dbug.ads (Qualify_Entity_Name): Add suffixes to
1766         disambiguate local variables that may be hidden from inner visibility
1767         by nested block declarations or loop variables.
1769 2016-04-21  Jerome Lambourg  <lambourg@adacore.com>
1771         * s-soflin.adb: Initialize the Stack_Limit global variable.
1773 2016-04-21  Hristian Kirtchev  <kirtchev@adacore.com>
1775         * lib-writ.adb: Minor reformatting.
1777 2016-04-21  Ed Schonberg  <schonberg@adacore.com>
1779         * exp_pakd.adb (Compute_Number_Components): New function to
1780         build an expression that computes the number of a components of
1781         an array that may be multidimensional.
1782         (Expan_Packed_Eq): Use it.
1784 2016-04-21  Arnaud Charlet  <charlet@adacore.com>
1786         * g-traceb.ads: Update list of supported platforms.
1788 2016-04-21  Ed Schonberg  <schonberg@adacore.com>
1790         * sem_ch13.adb (Add_Predicates): if the type is declared in
1791         an inner package it may be frozen outside of the package, and
1792         the generated pragma has not been analyzed yet, the expression
1793         for the predicate must be captured and added to the predicate
1794         function at this point.
1796 2016-04-21  Hristian Kirtchev  <kirtchev@adacore.com>
1798         * contracts.adb (Analyze_Package_Body_Contract): Do not check
1799         for a missing package refinement because 1) packages do not have
1800         "refinement" and 2) the check for proper state refinement is
1801         performed in a different place.
1802         * einfo.adb (Has_Non_Null_Visible_Refinement): Reimplemented.
1803         (Has_Null_Visible_Refinement): Reimplemented.
1804         * sem_ch3.adb (Analyze_Declarations): Determine whether all
1805         abstract states have received a refinement and if not, emit
1806         errors.
1807         * sem_ch7.adb (Analyze_Package_Declaration): Code
1808         cleanup. Determine whether all abstract states of the
1809         package and any nested packages have received a refinement
1810         and if not, emit errors.
1811         (Requires_Completion_In_Body): Add new formal parameter
1812         Do_Abstract_States. Update the comment on usage. Propagate the
1813         Do_Abstract_States flag to all Unit_Requires_Body calls.
1814         (Unit_Requires_Body): Remove formal
1815         parameter Ignore_Abstract_States. Add new formal paramter
1816         Do_Abstract_States. Propagate the Do_Abstract_States flag to
1817         all Requires_Completion_In calls.
1818         * sem_ch7.ads (Unit_Requires_Body): Remove formal
1819         parameter Ignore_Abstract_States. Add new formal paramter
1820         Do_Abstract_States. Update the comment on usage.
1821         * sem_ch9.adb (Analyze_Single_Protected_Declaration): Do
1822         not initialize the constituent list as this is now done on a
1823         need-to-add-element basis.
1824         (Analyze_Single_Task_Declaration):
1825         Do not initialize the constituent list as this is now done on
1826         a need-to-add-element basis.
1827         * sem_ch10.adb (Decorate_State): Do not initialize the constituent
1828         lists as this is now done on a need-to-add-element basis.
1829         * sem_prag.adb (Analyze_Constituent): Set the
1830         refinement constituents when adding a new element.
1831         (Analyze_Part_Of_In_Decl_Part): Set the Part_Of constituents when
1832         adding a new element.
1833         (Analyze_Part_Of_Option): Set the Part_Of
1834         constituents when adding a new element.
1835         (Analyze_Pragma): Set the Part_Of constituents when adding a new
1836         element.
1837         (Check_Constituent_Usage (all versions)): Reimplemented.
1838         (Collect_Constituent): Set the refinement constituents when adding
1839         a new element.
1840         (Create_Abstract_State): Do not initialize the
1841         constituent lists as this is now done on a need-to-add-element basis.
1842         (Propagate_Part_Of): Set the Part_Of constituents when
1843         adding a new element.
1844         * sem_util.adb (Check_State_Refinements): New routine.
1845         (Has_Non_Null_Refinement): Reimplemented.
1846         (Has_Null_Refinement): Reimplemented.
1847         (Requires_State_Refinement): Removed.
1848         * sem_util.ads (Check_State_Refinements): New routine.
1849         (Requires_State_Refinement): Removed.
1851 2016-04-21  Hristian Kirtchev  <kirtchev@adacore.com>
1853         * lib-writ.adb, sem_ch6.adb: Minor reformatting and code cleanup.
1854         * sem.adb: Fix comment.
1856 2016-04-21  Ed Schonberg  <schonberg@adacore.com>
1858         * sem_ch3.adb (Analyze_Subtype_Declaration): A subtype
1859         declaration with no aspects, whose subtype_mark is a subtype
1860         with predicates, inherits the list of subprograms for the type.
1862 2016-04-21  Arnaud Charlet  <charlet@adacore.com>
1864         * exp_aggr.adb (Has_Per_Object_Constraint): Refine previous
1865         change.
1867 2016-04-21  Thomas Quinot  <quinot@adacore.com>
1869         * g-socket.adb (Raise_Host_Error): Include additional Name parameter.
1871 2016-04-21  Ed Schonberg  <schonberg@adacore.com>
1873         * lib-writ.adb (Write_ALI): Do not record in ali file units
1874         that are present in the files table but not analyzed. These
1875         units are present because they appear in the context of units
1876         named in limited_with clauses, and the unit being compiled does
1877         not depend semantically on them.
1879 2016-04-21  Ed Schonberg  <schonberg@adacore.com>
1881         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Simplify code to
1882         create the procedure body for an function returning an array type,
1883         when generating C code. Reuse the subprogram body rather than
1884         creating a new one, both as an efficiency measure and because
1885         in an instance the body may contain global references that must
1886         be preserved.
1888 2016-04-21  Hristian Kirtchev  <kirtchev@adacore.com>
1890         * sem_ch3.adb, exp_attr.adb, exp_ch6.adb, exp_aggr.adb: Minor
1891         reformatting.
1893 2016-04-21  Javier Miranda  <miranda@adacore.com>
1895         * exp_aggr.adb (Component_Check): Extend
1896         the check that verifies that the aggregate has no function
1897         calls to handle transformations performed by the frontend.
1898         (Ultimate_Original_Expression): New subprogram.
1900 2016-04-21  Philippe Gil  <gil@adacore.com>
1902         * krunch.adb (Krunch): Fix krunching of i-java.
1904 2016-04-21  Arnaud Charlet  <charlet@adacore.com>
1906         * exp_ch8.adb (Evaluation_Required): Always return
1907         True when Modify_Tree_For_C.
1909 2016-04-21  Eric Botcazou  <ebotcazou@adacore.com>
1911         * gnatlink.adb (Gnatlink): Robustify detection of Windows target.
1912         * alloc.ads: Minor comment fixes.
1913         * einfo.ads: Fix typo.
1915 2016-04-21  Arnaud Charlet  <charlet@adacore.com>
1917         * exp_aggr.adb (Component_Not_OK_For_Backend): Redo previous
1918         changes to handle all cases of components depending on the
1919         discriminant, not just string literals.
1921 2016-04-21  Ed Schonberg  <schonberg@adacore.com>
1923         * sem_ch3.adb (Analyze_Subtype_Declaration): If the subtype
1924         declaration is the generated declaration for a generic actual,
1925         inherit predicates from the actual if it is a predicated subtype.
1927 2016-04-21  Ed Schonberg  <schonberg@adacore.com>
1929         * exp_ch6.adb (Rewrite_Function_Call_For_C): If the function is
1930         inherited and its result is controlling,  introduce a conversion
1931         on the actual for the corresponding procedure call, to avoid
1932         spurious type errors.
1934 2016-04-21  Jerome Lambourg  <lambourg@adacore.com>
1936         * krunch.adb (Krunch): Fix krunching of i-vxworks.
1938 2016-04-21  Gary Dismukes  <dismukes@adacore.com>
1940         * exp_aggr.adb: Minor reformatting and code cleanup.
1942 2016-04-21  Ed Schonberg  <schonberg@adacore.com>
1944         * sem_ch13.adb (Resolve_Name): Omit quantified expressions from
1945         resolution, because they introduce local names. Full resolution
1946         will take place when predicate function is constructed.
1948 2016-04-21  Arnaud Charlet  <charlet@adacore.com>
1950         * exp_aggr.adb (Component_Not_OK_For_Backend): Refine previous
1951         change to take into account Per_Object_Constraint field rather
1952         than special casing strings.
1953         * exp_ch6.adb: Fix typo in Replace_Returns.
1955 2016-04-21  Hristian Kirtchev  <kirtchev@adacore.com>
1957         * sem_ch5.adb: Minor reformatting.
1959 2016-04-21  Arnaud Charlet  <charlet@adacore.com>
1961         * exp_aggr.adb (Backend_Processing_Possible): Return False
1962         when generating C and aggregate contains function calls.
1964 2016-04-21  Tristan Gingold  <gingold@adacore.com>
1966         * krunch.adb (Krunch): Only partially krunch children of
1967         Interfaces that aren't known.
1969 2016-04-21  Ed Schonberg  <schonberg@adacore.com>
1971         * sem_prag.adb (Make_Inline): Handle properly the instantiation
1972         of a generic subpprogram that carries an Inline aspect. Place
1973         inline info on the anonymous subprogram that is constructed in
1974         the wrapper package.
1975         (Analyze_Pragma, case Pure): Do not check placement if pragma
1976         appears within an instantiation, which can be nested at any level.
1977         * sem_ch12.adb (Analyze_Instance_And_Renamings): Do not copy Freeze
1978         node from anonymous subprogram to its visible renaming. The
1979         freeze node will be constructed if the subprogram carries
1980         delayed aspects.
1981         (Set_Global): Preserve dimension information if present (from
1982         code reading).
1984 2016-04-21  Vasiliy Fofanov  <fofanov@adacore.com>
1986         * gnatlink.adb: Change wording of the warning message on
1987         problematic filenames to be more neutral. Add a new substring
1988         "patch" introduced on Windows 10.
1990 2016-04-21  Philippe Gil  <gil@adacore.com>
1992         * tracebak.c (__gnat_backtrace): handle bad RIP values (win64 only)
1994 2016-04-21  Javier Miranda  <miranda@adacore.com>
1996         * exp_aggr.adb (Component_Not_OK_For_Backend): Return true for string
1997         literals.
1999 2016-04-21  Hristian Kirtchev  <kirtchev@adacore.com>
2001         * einfo.adb (Has_Non_Null_Abstract_State): New routine.
2002         * einfo.ads New synthesized attribute
2003         Has_Non_Null_Abstract_State along with occurrences in entities.
2004         (Has_Non_Null_Abstract_State): New routine.
2005         * sem_ch7.adb (Unit_Requires_Body): Add local variable
2006         Requires_Body. A package declaring an abstract state requires
2007         a body only when the state is non-null and the package contains
2008         at least one other construct that requires completion in a body.
2009         * sem_util.adb (Mode_Is_Off): Removed.
2010         (Requires_State_Refinement): Remove an obsolete check. Code
2011         cleanup.
2013 2016-04-21  Bob Duff  <duff@adacore.com>
2015         * sem_attr.adb (Analyze_Attribute): In processing
2016         the 'Old attribute, a warning is given for infinite recursion. Fix
2017         the code to not crash when the prefix of 'Old denotes a protected
2018         function.
2019         * sem_ch5.adb (Analyze_Iterator_Specification):
2020         Avoid calling Is_Dependent_Component_Of_Mutable_Object in cases
2021         where the parameter would not be an object.
2023 2016-04-21  Eric Botcazou  <ebotcazou@adacore.com>
2025         * sem_eval.adb (Compile_Time_Compare): Be prepared for an empty
2026         Etype or Underlying_Type of the operands.
2028 2016-04-21  Eric Botcazou  <ebotcazou@adacore.com>
2030         * atree.adb (Print_Statistics): Protect against overflows and
2031         print the memory consumption in bytes.
2032         * table.adb (Reallocate): Do the intermediate calculation of the new
2033         size using the Memory.size_t type.
2035 2016-04-21  Gary Dismukes  <dismukes@adacore.com>
2037         * exp_attr.adb (Is_Inline_Floating_Point_Attribute): Suppress
2038         expansion of Attribute_Machine and Attribute_Model for AAMP.
2040 2016-04-21  Ed Schonberg  <schonberg@adacore.com>
2042         * freeze.adb: Disable previous change for now.
2044 2016-04-21  Ed Schonberg  <schonberg@adacore.com>
2046         * sem_ch8.adb (Find_Selected_Component): If prefix has an
2047         access type and designated type is a limited view, introduce
2048         an explicit dereference before continuing the analysis, and
2049         set its type to the non-limited view of the designated type,
2050         if we are in context where it is available.
2052 2016-04-21  Ed Schonberg  <schonberg@adacore.com>
2054         * freeze.adb: Freeze profile in ASIS mode.
2056 2016-04-21  Hristian Kirtchev  <kirtchev@adacore.com>
2058         * sem_aux.ads, sem_aux.adb (Has_Rep_Item): New variant.
2059         * sem_util.adb (Inherit_Rep_Item_Chain): Reimplemented.
2061 2016-04-21  Hristian Kirtchev  <kirtchev@adacore.com>
2063         * exp_ch6.adb: Minor reformatting.
2065 2016-04-21  Ed Schonberg  <schonberg@adacore.com>
2067         * sem_ch13.adb: Minor comment update.
2069 2016-04-21  Ed Schonberg  <schonberg@adacore.com>
2071         * freeze.ads, freeze.adb (Freeze_Entity, Freeze_Before): Add
2072         boolean parameter to determine whether freezing an overloadable
2073         entity freezes its profile as well. This is required by
2074         AI05-019. The call to Freeze_Profile within Freeze_Entity is
2075         conditioned by the value of this flag, whose default is True.
2076         * sem_attr.adb (Resolve_Attribute, case 'Access): The attribute
2077         reference freezes the prefix, but it the prefix is a subprogram
2078         it does not freeze its profile.
2080 2016-04-21  Javier Miranda  <miranda@adacore.com>
2082         * exp_util.adb (Build_Procedure_Form): No action needed for
2083         subprogram renamings since the backend can generate the call
2084         using the renamed subprogram. This leaves the tree more clean
2085         to the backend.
2086         * exp_ch6.adb (Expand_Call): Extend previous patch for
2087         rewritten-for-c entities to handle subprogram renamings.
2088         (Rewrite_Function_Call_For_C): Handle subprogram renamings.
2090 2016-04-21  Ed Schonberg  <schonberg@adacore.com>
2092         * sem_ch13.adb: Code cleanup.
2094 2016-04-21  Ed Schonberg  <schonberg@adacore.com>
2096         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If the body is
2097         created for SPARK_To_C, the entity must remain invisible so it
2098         does not overload subsequent references to the original function.
2099         * exp_ch6.adb (Build_Procedure_Body_Form, Replace_Returns):
2100         Handle Extended_Return_Statements by replacing it with a block
2101         with assignments and a simple return statement.
2102         * exp_util.adb (Build_Procedure_Form): Make procedure entity
2103         invisible after analyzing declaration, to prevent improper
2104         overloading.
2106 2016-04-21  Javier Miranda  <miranda@adacore.com>
2108         * sem_ch6.adb (Build_Subprogram_Declaration): Propagate the
2109         attribute Rewritten_For_C to the body since since the expander
2110         may generate calls using that entity.
2111         * exp_ch6.adb (Expand_Call): For internally generated
2112         calls ensure that they reference the entity of the spec
2113         of the called function.
2114         (Rewritten_For_C_Func_Id): New subprogram.
2115         (Rewritten_For_C_Proc_Id): New subprogram.
2116         (Rewrite_Function_Call_For_C): Invoke the new subprogram to
2117         ensure that we skip freezing entities.
2118         * exp_util.adb (Build_Procedure_Form): No action needed if the
2119         procedure was already built.
2121 2016-04-21  Hristian Kirtchev  <kirtchev@adacore.com>
2123         * sem_ch3.adb, exp_util.adb, sem_ch13.adb, exp_unst.adb: Minor
2124         reformatting.
2126 2016-04-21  Ed Schonberg  <schonberg@adacore.com>
2128         * sem_util.adb (Denotes_Iterator): Use root type to determine
2129         whether the ultimate ancestor is the predefined iterator
2130         interface pakage.
2131         * exp_ch5.adb (Expand_Iterator_Over_Container): simplify code
2132         and avoid reuse of Pack local variable.
2134 2016-04-21  Olivier Hainque  <hainque@adacore.com>
2136         * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
2137         system-vxworks-ppc.ads, system-vxworks-m68k.ads,
2138         system-vxworks-mips.ads, system-vxworks-x86.ads: Define
2139         Executable_Extension to ".out".
2141 2016-04-21  Javier Miranda  <miranda@adacore.com>
2143         * frontend.adb: Update call to Unnest_Subprograms.
2144         * exp_ch6.ads, exp_ch6.adb, exp_unst.ads, exp_unst.adb
2145         (Unnest_Subprograms): Moved to package exp_unst.
2146         * exp_unst.ads (Unnest_Subprogram): Moved to the body of the
2147         package.
2148         * exp_dbug.adb (Qualify_Entity_Name): Enable qualification of
2149         enumeration literals when generating C code.
2151 2016-04-21  Javier Miranda  <miranda@adacore.com>
2153         * frontend.adb: Remove call to initialize Exp_Ch6.
2154         * exp_ch6.ads, exp_ch6.adb (Initialize): removed.
2155         (Unest_Entry/Unest_Bodies): Removed.
2156         (Unnest_Subprograms): Code cleanup.
2158 2016-04-21  Arnaud Charlet  <charlet@adacore.com>
2160         * set_targ.adb (Read_Target_Dependent_Values):
2161         close target description file once its contents is read.
2162         * s-os_lib.adb (Non_Blocking_Spawn, version with Stdout_File
2163         and Stderr_File): Close local file descriptors before spawning
2164         child process.
2165         * exp_util.adb (Containing_Package_With_Ext_Axioms): Limit scope of
2166         local variables to make the code easier to understand and avoid
2167         duplicated calls to Parent and Generic_Parent.
2169 2016-04-20  Bob Duff  <duff@adacore.com>
2171         * s-os_lib.ads: Minor comment fix.
2173 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
2175         * exp_ch5.adb (Expand_N_Assignment_Statement): Do no generate
2176         a discriminant check for a type whose partial view has unknown
2177         discriminants when the full view has discriminants with defaults.
2179 2016-04-20  Javier Miranda  <miranda@adacore.com>
2181         * exp_util.adb (Remove_Side_Effects): When generating C code
2182         remove side effect of type conversion of access to unconstrained
2183         array type.
2184         (Side_Effect_Free): Return false for the type
2185         conversion of access to unconstrained array type when generating
2186         C code.
2187         * sem_res.adb (Resolved_Type_Conversion): Remove side effects
2188         of access to unconstrained array type conversion when generating
2189         C code.
2191 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
2193         * sem_ch13.adb (Build_Predicate_Function_Declaration): New
2194         function, to construct the declaration of a predicate function
2195         at the end of the current declarative part rather than at the
2196         (possibly later) freeze point of the type. This also allows uses
2197         of a type with predicates in instantiations elsewhere.
2198         (Resolve_Aspect_Expression): New procedure to detect visiblity
2199         errors in aspect expressions, at the end of the declarative part
2200         that includes the type declaration.
2201         * sem_ch3.adb (Complete_Private_Subtype): Propagate properly the
2202         predicate function from private to full view.
2203         * einfo.adb (Predicate_Function): Refine search for predicate
2204         function when type has a full view and predicate function may
2205         be defined on either view.
2207 2016-04-20  Javier Miranda  <miranda@adacore.com>
2209         * frontend.adb: Passing the root of the tree to
2210         Unnest_Subprograms().
2211         * exp_ch6.adb (Expand_N_Subprogram_Body): Remove code that
2212         took care of adding subprograms to the Unest_Bodies table since
2213         performing such action too early disables the ability to process
2214         generic instantiations.
2215         (Unnest_Subprograms): Adding parameter.
2216         (Search_Unnesting_Subprograms): New subprogram.
2217         * exp_ch6.ads (Unnest_Subrograms): Update documentation.
2219 2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>
2221         * exp_util.adb, freeze.adb, sem_util.adb: Minor reformatting.
2223 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
2225         * exp_unst.adb (Check_Static_Type): For a private type, check
2226         full view.
2228 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
2230         * sem_attr.adb (Check_Type): Reject an attribute reference in
2231         an aspect expression, when the prefix of the reference is the
2232         current instance of the type to which the aspect applies.
2234 2016-04-20  Bob Duff  <duff@adacore.com>
2236         * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about
2237         hiding unless we're actually hiding something. The previous
2238         code would (for example) warn about a "<" on a record type
2239         because it incorrectly thought it was hiding the "<" on Boolean
2240         in Standard. We need to check that the homonym S is in fact a
2241         homograph of a predefined operator.
2243 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
2245         * exp_util.ads, exp_util.adb (Build_Procedure_Form): Moved here
2246         from exp_ch6.adb, for use in SPARK_To_C mode when creating the
2247         procedure equivalent to a function returning an array, when this
2248         construction is deferred to the freeze point of the function.
2249         * sem_util.adb (Is_Unchecked_Conversion_Instance): Include a
2250         function that renames an instance of Unchecked_Conversion.
2251         * freeze.adb (Freeze_Subprogram): Generate the proper procedure
2252         declaration for a function returning an array.
2253         * exp_ch6.adb (Build_Procedure_Form): Moved to exp_util.
2255 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
2257         * sem_util.ads, sem_util.adb (Is_Expanded_Priority_Attribute):
2258         New predicate to determine that in a context with full run-time,
2259         a function call is an expansion of a reference to attribute
2260         Priority.
2261         * sem_ch5.adb (Analyze_Function_Call): use it.
2262         * exp_ch5.adb (Expand_N_Subprogram_Call): use it.
2264 2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>
2266         * einfo.adb Flag286 is now used as Is_Exception_Handler.
2267         (Is_Exception_Handler): New routine.
2268         (Set_Is_Exception_Handler): New routine.
2269         (Write_Entity_Flags): Output the status of Is_Exception_Handler.
2270         * einfo.ads New attribute Is_Exception_Handler along with
2271         occurrences in entities.
2272         (Is_Exception_Handler): New routine along with pragma Inline.
2273         (Set_Is_Exception_Handler): New routine along with pragma Inline.
2274         * exp_ch7.adb (Make_Transient_Block): Ignore blocks generated
2275         for exception handlers with a choice parameter.
2276         * sem_ch11.adb (Analyze_Exception_Handlers): Mark the scope
2277         generated for a choice parameter as an exception handler.
2279 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
2281         * sem_ch3.adb (Build_Derived_Access_Type): Remove dead code.
2282         (Constrain_Discriminated_Type): In an instance, if the type has
2283         unknown discriminants, use its full view.
2284         (Process_Subtype): Check that the base type is private before
2285         adding subtype to Private_Dependents list.
2287 2016-04-20  Bob Duff  <duff@adacore.com>
2289         * sem_ch13.adb: Minor comment fix.
2291 2016-04-20  Yannick Moy  <moy@adacore.com>
2293         * sem_ch4.adb: Fix typos in comments.
2294         * sem_res.adb (Resolve_Case_Expression): Fix type of case alternatives.
2296 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
2298         * sem_ch4.adb (Analyze_Selected_Component): A reference to the
2299         current instance of a task type is legal if the prefix is an
2300         expression of that task type and the selector is an entry or
2301         entry family.
2303 2016-04-20  Arnaud Charlet  <charlet@adacore.com>
2305         * a-cfdlli.ads (List): Type is no longer tagged, not needed. Move
2306         varsize field at the end for efficiency.
2308 2016-04-20  Vincent Celier  <celier@adacore.com>
2310         * gnatcmd.adb: Do not invoke gprls when the invocation of "gnat
2311         ls" includes the switch -V.
2312         * clean.adb: "<target>-gnatclean -P" now calls "gprclean
2313         --target=<target>"
2314         * make.adb: "<target>-gnatmake -P" now calls "gprbuild
2315         --target=<target>"
2317 2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>
2319         * sem_ch12.adb (Qualify_Type): Do not perform
2320         partial qualification when the immediate scope is a generic unit.
2322 2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>
2324         * exp_unst.adb: Minor reformatting.
2326 2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>
2328         * exp_ch4.adb (Expand_Allocator_Expression): Ensure that the
2329         tag assignment and adjustment preceed the accessibility check.
2330         * exp_ch7.adb (Is_Subprogram_Call): Reimplemented.
2332 2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>
2334         * exp_prag.adb (Expand_Attributes): Ensure that
2335         the temporary used to capture the value of attribute 'Old's
2336         prefix is properly initialized.
2338 2016-04-20  Javier Miranda  <miranda@adacore.com>
2340         * exp_unst.ads, exp_unst.adb (Get_Level, Subp_Index): Moved to library
2341         level.
2343 2016-04-20  Arnaud Charlet  <charlet@adacore.com>
2345         * sem_ch9.adb (Analyze_Task_Type_Declaration): Shut down warning
2346         in codepeer mode.
2348 2016-04-20  Vincent Celier  <celier@adacore.com>
2350         * make.adb: Code cleanup.
2352 2016-04-20  Arnaud Charlet  <charlet@adacore.com>
2354         * exp_ch4.adb (Expand_Allocator_Expression): Help C code
2355         generation.
2357 2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>
2359         * sem_ch12.adb (Copy_Generic_Node): Handle the special
2360         qualification installed for universal literals that act as
2361         operands in binary or unary operators.  (Qualify_Operand): Mark
2362         the qualification to signal the instantiation mechanism how to
2363         handle global reference propagation.
2364         * sinfo.adb (Is_Qualified_Universal_Literal): New routine.
2365         (Set_Is_Qualified_Universal_Literal): New routine.
2366         * sinfo.ads New attribute Is_Qualified_Universal_Literal along
2367         with occurrences in nodes.
2368         (Is_Qualified_Universal_Literal):
2369         New routine along with pragma Inline.
2370         (Set_Is_Qualified_Universal_Literal): New routine along with
2371         pragma Inline.
2373 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
2375         * sem.adb (Do_Analyze): Save and restore Style_Max_Line_Length
2376         so that the corresponding checks are preserved across compilations
2377         that include System.Constants in their context.
2379 2016-04-20  Gary Dismukes  <dismukes@adacore.com>
2381         * sem_type.adb: Minor typo fix and reformatting.
2382         * a-conhel.ads: Update comment.
2384 2016-04-20  Bob Duff  <duff@adacore.com>
2386         * a-cihama.adb, a-cihase.adb, a-coinve.adb (Copy): Rewrite the
2387         code so it doesn't trigger an "uninit var" warning.
2389 2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>
2391         * sem_attr.ads Add new table Universal_Type_Attribute.
2392         * sem_util.adb (Yields_Universal_Type): Use a table lookup when
2393         checking attributes.
2395 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
2397         * exp_aggr.adb (Init_Stored_Discriminants,
2398         Init_Visible_Discriminants): New procedures, subsidiary of
2399         Build_Record_Aggr_Code, to handle properly the construction
2400         of aggregates for a derived type that constrains some parent
2401         discriminants and renames others.
2403 2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>
2405         * sem_ch12.adb (Qualify_Universal_Operands): New routine.
2406         (Save_References_In_Operator): Add explicit qualifications in
2407         the generic template for all operands of universal type.
2408         * sem_type.adb (Disambiguate): Update the call to Matches.
2409         (Matches): Reimplemented.
2410         * sem_util.ads, sem_util.adb (Yields_Universal_Type): New routine.
2412 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
2414         * sem_ch13.adb (Rep_Item_Too_Late): Better error message for
2415         an illegal aspect that freezes the entity to which it applies.
2417 2016-04-20  Bob Duff  <duff@adacore.com>
2419         * a-stwibo.ads, a-stzbou.ads
2420         ("="): Add overriding keyword before function to avoid crash when
2421         compiler is called with -gnatyO (check overriding indicators).
2423 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
2425         * sem_prag.adb (Analyze_Pragma, case Check_Policy):  If this
2426         is a configuration pragma and it uses the ARG syntax, insert
2427         the rewritten pragma after the current one rather than using
2428         Insert_Actions.
2430 2016-04-20  Arnaud Charlet  <charlet@adacore.com>
2432         * exp_aggr.adb (Backend_Processing_Possible): Add handling of
2433         C back-end.
2435 2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>
2437         * s-imgllu.adb, sem_util.adb, s-imgint.adb, s-imguns.adb,
2438         s-imglli.adb: Minor reformatting.
2440 2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>
2442         * sem_res.adb (Rewrite_Renamed_Operator): Do not rewrite the
2443         renamed operator when the associated node appears within a
2444         pre/postcondition.
2445         * sem_util.ads, sem_util.adb (In_Pre_Post_Condition): New routine.
2447 2016-04-20  Yannick Moy  <moy@adacore.com>
2449         * osint.adb (Relocate_Path): Fix test when Path is shorter than Prefix.
2450         * einfo.adb (Set_Overridden_Operation): Add assertion.
2451         * sem_util.adb (Unique_Entity): for renaming-as-body return the spec
2452         entity.
2454 2016-04-20  Javier Miranda  <miranda@adacore.com>
2456         * exp_unst.adb (Append_Unique_Call): New subprogram.
2457         (Unnest_Subprogram): Replace the unique occurrence
2458         of Call.Append() by Append_Unique_Call() which protects us from
2459         adding to the Calls table duplicated entries.
2461 2016-04-20  Arnaud Charlet  <charlet@adacore.com>
2463         * exp_attr.adb (Is_GCC_Target): Fix for C backend.
2464         * xref_lib.ads (Dependencies_Tables): instantiate
2465         Table package with types that guarantee its safe use.
2466         * s-imgllu.adb, s-imgint.adb, s-imguns.adb, s-imglli.adb: Avoid nested
2467         procedures.
2469 2016-04-20  Arnaud Charlet  <charlet@adacore.com>
2471         * exp_attr.adb (Expand_N_Attribute_Reference [Attribute_Valid]):
2472         Disable expansion when generating C code.
2473         * sinfo.ads, inline.ads: Minor editing.
2475 2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>
2477         * sem_util.adb, contracts.adb, ghost.adb, exp_ch6.adb: Minor
2478         reformatting.
2480 2016-04-20  Javier Miranda  <miranda@adacore.com>
2482         * contracts.adb (Build_Postconditions_Procedure): Code cleanup.
2483         * ghost.adb (Os_OK_Ghost_Context.Is_OK_Declaration): Handle the
2484         declaration of the internally built _postcondition procedure.
2486 2016-04-20  Arnaud Charlet  <charlet@adacore.com>
2488         * snames.ads-tmpl (Internal_Attribute_Id, Attribute_Class_Array): Fix
2489         indentation.
2490         * sem_util.adb (Is_Unchecked_Conversion_Instance):
2491         defense against library-level renamings of other functions,
2492         which are never instances of Unchecked_Conversion.
2493         * einfo.ads: minor fix of casing in comment
2495 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
2497         * exp_ch6.adb (Expand_N_Subprogram_Stub): Do not expand a body
2498         that has been analyzed and expanded already. Qualify the names
2499         in the proper body for use in the generation of C code.
2501 2016-04-20  Javier Miranda  <miranda@adacore.com>
2503         * contracts.adb (Build_Postconditions_Procedure): Force its
2504         inlining when generating C code.
2505         * sem_attr.adb (Analyze_Attribute_Old_Result): Handle inlined
2506         _postconditions when generating C code.
2507         * exp_ch6.adb (Inlined_Subprogram): Inline calls to
2508         _postconditions when generating C code.
2509         * sinfo.ads, sinfo.adb (Corresponding_Spec, Set_Corresponding_Spec):
2510         types of return value and argument changed from Node_Id to
2511         Entity_Id.
2513 2016-04-20  Vincent Celier  <celier@adacore.com>
2515         * make.adb, clean.adb, gnatname.adb: Revert previous change for now.
2517 2016-04-20  Eric Botcazou  <ebotcazou@adacore.com>
2519         * sem_ch12.adb (Analyze_Instance_And_Renamings): Do not reset
2520         the Has_Delayed_Freeze flag on the anonymous instance node.
2522 2016-04-20  Javier Miranda  <miranda@adacore.com>
2524         * sem_ch5.adb (Analyze_Iterator_Specification): Remove transient
2525         scope associated with the renaming object declaration.
2526         * exp_util.adb (Insert_Actions): Remove handling of iterator
2527         loop marked as requiring the secondary stack.
2529 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
2531         * sem_attr.adb (Analyze_Attribute, case 'Image): Implement
2532         AI12-0124, which extends the functionality of the attribute so it
2533         reflects the semantics of GNAT 'Img when applied to scalar types.
2534         * lib-xref.adb: minor whitespace layout fix.
2536 2016-04-20  Vincent Celier  <celier@adacore.com>
2538         * clean.adb (Gnatclean): Fail if project file specified and
2539         gprclean is not available.
2540         * gnatname.adb: Fail is -P is used and gprname is not available.
2541         * make.adb (Initialize): Fail if project file specified and
2542         gprbuild is not available.
2544 2016-04-20  Bob Duff  <duff@adacore.com>
2546         * sem_ch5.adb (Analyze_Iterator_Specification): Do not use secondary
2547         stack when possible.
2549 2016-04-20  Gary Dismukes  <dismukes@adacore.com>
2551         * par_sco.adb, sem_util.adb, sem_ch13.adb: Minor typo corrections and
2552         reformatting.
2554 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
2556         * sem_prag.adb (Analyze_Pragma, case Default_Storage_Pool):
2557         If the pragma comes from an aspect specification, verify that
2558         the aspect applies to an entity with a declarative part.
2559         * exp_ch5.adb: Code cleanup.
2561 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
2563         * sem_res.adb (Resolve_If_Expression): If first expression is
2564         universal, resolve subsequent ones with the corresponding class
2565         type (Any_Integer or Any_Real).
2567 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
2569         * sem_ch5.adb (Analyze_Iterator_Specification): If expansion is
2570         disabled, complete the analysis of the iterator name to ensure
2571         that reference for entities within are properly generated.
2573 2016-04-20  Arnaud Charlet  <charlet@adacore.com>
2575         * a-dispat.ads (Yield): add Global contract.
2576         * a-calend.ads, a-reatim.ads: Added Initializes => Clock_Time.
2577         * a-taside.adb: Added Initializes => Tasking_State.
2579 2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>
2581         * sem_ch13.adb (Build_Invariant_Procedure):
2582         Reimplement the invariant procedure spec and body insertion.
2584 2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>
2586         * sem_ch13.adb (Add_Invariant): Do not replace
2587         the saved expression of an invariatn aspect when inheriting
2588         a class-wide type invariant as this clobbers the existing
2589         expression. Do not use New_Copy_List as it is unnecessary
2590         and leaves the parent pointers referencing the wrong part of
2591         the tree. Do not replace the type references for ASIS when
2592         inheriting a class-wide type invariant as this clobbers the
2593         existing replacement.
2595 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
2597         * sem_util.adb (Build_Explicit_Dereference): If the designated
2598         expression is an entity name, generate reference to the entity
2599         because it will not be resolved again.
2601 2016-04-19  Arnaud Charlet  <charlet@adacore.com>
2603         * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
2604         gnat_rm.texi: Update documentation.
2606 2016-04-19  Olivier Hainque  <hainque@adacore.com>
2608         * par_sco.adb (Traverse_One, case N_Case_Statement):
2609         Skip pragmas before the first alternative.
2610         (Traverse_Handled_Statement_Sequence, Exception_Handlers): Likewise.
2612 2016-04-19  Tristan Gingold  <gingold@adacore.com>
2614         * adaint.c (__gnat_lwp_self): New function (for darwin).
2615         * s-osinte-darwin.ads, s-osinte-darwin.adb (lwp_self): Import
2616         of __gnat_lwp_self.
2618 2016-04-19  Olivier Hainque  <hainque@adacore.com>
2620         * sem_util.adb (Build_Elaboration_Entity): Always request an
2621         elab counter when preserving control-flow.
2623 2016-04-19  Olivier Hainque  <hainque@adacore.com>
2625         * sem_ch13.adb (Build_Invariant_Procedure_Declaration): Set
2626         Needs_Debug_Info when producing SCOs.
2627         * par_sco.adb (Traverse_Aspects): Fix categorization of
2628         Type_Invariant to match actual processing as activated depending
2629         on pragma Assertion_Policy.
2630         * sem_prag.adb (Analyze_Pragma): Remove special case for
2631         Name_Invariant regarding SCO generation, which completely disabled
2632         the production of SCOs for Invariant pragmas and aspects.
2634 2016-04-19  Hristian Kirtchev  <kirtchev@adacore.com>
2636         * checks.adb, sem_util.adb, sem_res.adb, sem_attr.adb: Minor
2637         reformatting.
2639 2016-04-19  Ed Schonberg  <schonberg@adacore.com>
2641         * freeze.adb (Freeze_Profile): Refine predicate that checks
2642         whether a function that returns a limited view is declared in
2643         another unit and cannot be frozen at this point.
2645 2016-04-19  Ed Schonberg  <schonberg@adacore.com>
2647         * exp_aggr.adb (Component_Count): Handle properly superflat
2648         arrays, i.e. empty arrays where Hi < Lo - 1, to ensure that the
2649         return value of the function is Natural, rather than leaving
2650         the handling of such arrays to the caller of this function.
2652 2016-04-19  Arnaud Charlet  <charlet@adacore.com>
2654         * sem_prag.adb, sem_attr.adb, par-prag.adb, exp_aggr.adb, sem_type.adb
2655         sem_ch12.adb, sem_ch3.adb, exp_ch7.adb, exp_ch9.adb: Code cleanup.
2656         * sem_res.adb, sem_util.ads, sem_util.adb (Is_OK_Volatile_Context):
2657         Promoted from being a nested subprogram in Sem_Res.Resolve_Entity_Name
2658         to publicly visible routine in Sem_Util.
2660 2016-04-19  Ed Schonberg  <schonberg@adacore.com>
2662         * checks.adb (Apply_Parameter_Aliasing_Checks): Do not apply
2663         the check if the type of the actual is By_Reference.
2665 2016-04-19  Arnaud Charlet  <charlet@adacore.com>
2667         * sem_res.adb (Within_Subprogram_Call): Detect
2668         also nodes that appear in entry calls.
2669         (Resolve_Actuals, Insert_Default): Propagate
2670         dimension information if any, from default expression to the
2671         copy that appears in the list of actuals.
2672         * uintp.ads: minor whitespace fix in comment.
2673         * sem_prag.adb, stringt.adb, inline.adb, lib-xref-spark_specific.adb:
2674         Minor code cleanup.
2675         * set_targ.adb (Set_Targ): convert directly from
2676         Natural to Pos, without intermediate conversion to Int.
2678 2016-04-19  Arnaud Charlet  <charlet@adacore.com>
2680         * sem_ch6.adb (Process_Formals): Mark suspicious reference to
2681         SPARK RM in comment.
2682         * sem_prag.adb (Analyze_Global_Item): Fix reference to SPARK RM
2683         in comment.
2684         * sem_res.adb (Property_Error, Resolve_Actuals): Fix reference
2685         to SPARK RM in both comment and error message.
2687 2016-04-19  Eric Botcazou  <ebotcazou@adacore.com>
2689         * sem_ch6.adb (Possible_Freeze): If the type is an incomplete
2690         CW type, then the subprogram must have a delayed freeze. This
2691         ensures that the backend can properly recover the full view when
2692         elaborating the access subprogram declaration.
2694 2016-04-19  Ed Schonberg  <schonberg@adacore.com>
2696         * sem_attr.adb (Resolve_Attribute, case 'Access): Freeze
2697         overloadable entity if originally overloaded.
2699 2016-04-19  Arnaud Charlet  <charlet@adacore.com>
2701         * exp_aggr.adb, exp_ch3.adb, exp_ch7.adb, exp_ch9.adb, exp_code.adb,
2702         exp_fixd.adb, namet.adb, osint.adb, osint.ads, par-ch2.adb,
2703         sem_ch10.adb, sem_ch12.adb, sem_disp.adb, sem_elab.adb, sem_elim.adb
2704         sem_util.adb, styleg.adb, styleg.ads, stylesw.ads: Minor code
2705         clean up.
2707 2016-04-19  Arnaud Charlet  <charlet@adacore.com>
2709         * sem_util.adb (Copy_Node_With_Replacement):
2710         use Set_Comes_From_Source instead of directly manipulating
2711         internals of the node table.
2712         * sem_util.adb (Within_Scope): refactored to remove duplicated code.
2713         * sem_aux.adb (Get_Rep_Pragma,
2714         Subprogram_Body_Entity, Subprogram_Spec): declare variables that
2715         do not change as constants and initialize them in the declaration.
2716         (Get_Rep_Pragma, Subprogram_Body_Entity, Subprogram_Spec): declare
2717         variables that do not change as constants and initialize them
2718         in the declaration.
2720 2016-04-19  Ed Schonberg  <schonberg@adacore.com>
2722         * sem_res.adb (Resolve_Entry_Call): If the entry has
2723         preconditions it is rewritten by means of a wrapper that
2724         incorporates the original call. Before rewriting generate a
2725         reference to the entry being called to prevent spurious warnings
2726         and provide correct cross-reference information.
2728 2016-04-19  Hristian Kirtchev  <kirtchev@adacore.com>
2730         * sem_disp.adb (Check_Dispatching_Context): Code cleanup. Add
2731         local constant Scop. Ignore any internally generated loops when
2732         performing the check concerning an abstract subprogram call
2733         without a controlling argument.
2734         * sem_util.ads, sem_util.adb (Current_Scope_No_Loops): New routine.
2736 2016-04-19  Bob Duff  <duff@adacore.com>
2738         * sem_elab.adb (Check_A_Call): There are cases where we have No
2739         (Ent) after the Alias loop, even when there was no previous error,
2740         so we can't assert that there was an error.
2742 2016-04-19  Ed Schonberg  <schonberg@adacore.com>
2744         * sem_attr.adb (Analyze_Access_Attribute, OK_Self_Reference):
2745         Reject use of type name as a prefix to 'access within an aggregate
2746         in a context that is not the declarative region of a type.
2748 2016-04-19  Vincent Celier  <celier@adacore.com>
2750         * gnatcmd.adb: Make "gnat ls -P" invoke gprls Make "gnat bind
2751         -P" invoke "gprbuild -b" Make "gnat link -P" invoke "gprbuild
2752         -l" Fail if the invocation is "gnat find -P" or "gnat xref -P"
2753         Remove anything related to project files
2754         * g-mbdira.adb: minor whitespace cleanup
2755         * g-spipat.adb: minor removal of extra spaces after closing paren
2757 2016-04-19  Ed Schonberg  <schonberg@adacore.com>
2759         * exp_ch6.adb (Expand_Actuals):  If post-statements are present
2760         and the enclosing context is a function call or indexing, build
2761         an Expression_With_Actions for the call.
2763 2016-04-19  Hristian Kirtchev  <kirtchev@adacore.com>
2765         * lib-writ.adb (Write_With_Lines): Code cleanup. Do not generate
2766         a with line for an ignored Ghost unit.
2767         * sem_ch7.adb (Analyze_Package_Declaration): Add local constant
2768         Par. A child package is Ghost when its parent is Ghost.
2769         * sem_prag.adb (Analyze_Pragma): Pragma Ghost can now apply to
2770         a subprogram declaration that acts as a compilation unit.
2772 2016-04-18  Michael Matz  <matz@suse.de>
2774         * gcc-interface/decl.c (gnat_to_gnu_entity): Use SET_TYPE_ALIGN.
2775         (gnat_to_gnu_field): Ditto.
2776         (components_to_record): Ditto.
2777         (create_variant_part_from): Ditto.
2778         (copy_and_substitute_in_size): Ditto.
2779         (substitute_in_type): Ditto.
2780         * gcc-interface/utils.c (make_aligning_type): Use SET_TYPE_ALIGN.
2781         (make_packable_type): Ditto.
2782         (maybe_pad_type): Ditto.
2783         (finish_fat_pointer_type): Ditto.
2784         (finish_record_type): Ditto and use SET_DECL_ALIGN.
2785         (rest_of_record_type_compilation): Use SET_TYPE_ALIGN.
2786         (create_field_decl): Use SET_DECL_ALIGN.
2788 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
2790         * einfo.adb (Overridden_Operation): assert that
2791         function is called for valid arguments.
2792         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, sem_type.adb,
2793         s-osinte-vxworks.ads, a-ngcefu.adb, sem_ch10.adb, einfo.ads,
2794         sem_prag.adb, sem_ch12.adb, sem.adb, i-cobol.ads, freeze.adb,
2795         sem_util.adb, a-chtgop.ads, s-rannum.adb, exp_ch6.adb, s-bignum.adb,
2796         s-osinte-freebsd.ads, par-ch5.adb, a-chtgbo.ads, a-cofove.adb:
2797         No space after closing parenthesis except where required for
2798         layout.
2799         * sem_res.adb: Minor reformatting.
2801 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
2803         * exp_ch4.adb (Expand_N_Case_Expression): Convert into a case
2804         statement when relevant.
2806 2016-04-18  Bob Duff  <duff@adacore.com>
2808         * a-cuprqu.adb (Enqueue): Properly handle the
2809         case where the new element has a unique priority.
2811 2016-04-18  Tristan Gingold  <gingold@adacore.com>
2813         * adaint.h: Define stat structures and functions for iOS
2814         simulator.
2816 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
2818         * sem_res.adb (Resolve_Entry_Call): reset
2819         Is_Overloaded flag after resolving calls to overloaded protected
2820         operations.
2821         * exp_spark.adb (Expand_SPARK): call
2822         Qualify_Entity_Names for tasking nodes, i.e. protected types,
2823         task types and entries.
2824         * exp_ch4.adb (Expand_N_If_Expression): Refine previous change
2825         in case of an unconstrained type.
2827 2016-04-18  Yannick Moy  <moy@adacore.com>
2829         * sem_eval.adb, sem_eval.ads (Check_Non_Static_Context): Add
2830         comment to document usage of subprogram in GNATprove.
2832 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
2834         * sem_prag.adb (Analyze_Pragma, case Test_Case): Improve error
2835         message for wrong placement of aspect Test_Case.
2837 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
2839         * einfo.ads: Update the documentation of attribute Renamed_Object.
2840         * exp_spark.adb (Expand_Potential_Renaming): Reimplemented.
2842 2016-04-18  Gary Dismukes  <dismukes@adacore.com>
2844         * exp_ch4.adb (Optimize_Length_Comparison): Return immediately
2845         in the case of AAMP (same as for use of the -gnatd.P switch) to
2846         suppress this optimization, which avoids creating a dependence
2847         on the 64-bit arithmetic package.
2849 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
2851         * exp_ch4.adb: Update comment.
2853 2016-04-18  Eric Botcazou  <ebotcazou@adacore.com>
2855         * exp_ch6.adb (Expand_Call): Make sure instantiations are
2856         registered only once as pending here.
2858 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
2860         * exp_ch4.adb, gnat1drv.adb, opt.ads, sem_res.adb
2861         (Minimize_Expression_With_Actions): New flag.
2862         (Adjust_Global_Switches): Set Minimize_Expression_With_Actions
2863         when generating C.
2864         (Resolve_Short_Circuit): Redo previous change
2865         using Minimize_Expression_With_Actions.
2866         (Expand_N_If_Expression,
2867         Expand_Short_Circuit_Operator): Restore old code to avoid
2868         Expression_With_Actions when Minimize_Expression_With_Actions
2869         is set.
2871 2016-04-18  Vincent Celier  <celier@adacore.com>
2873         * s-os_lib.adb (Non_Blocking_Spawn, version with Stdout_File and
2874         Stderr_File): Close local file descriptors when no longer needed.
2876 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
2878         * sem_ch5.adb (Analyze_Iterator_Specification): Remove SPARK
2879         mode check that the type of the cursor in an iteration over
2880         a formal container is not volatile. The proper check on the
2881         element type is done elsewhere.
2883 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
2885         * sem_ch6.adb (Process_Formals): Do not set a delay freeze on
2886         a subprogram that returns a class-wide type, if the subprogram
2887         is a compilation unit, because otherwise gigi will treat the
2888         subprogram as external, leading to link errors.
2890 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
2892         * sem_res.adb (Resolve_Short_Circuit): Do not use
2893         expression-with-actions when generating C.
2895 2016-04-18  Yannick Moy  <moy@adacore.com>
2897         * sem_util.adb (Apply_Compile_Time_Constraint_Error): Do not generate
2898         raise node in GNATprove mode.
2900 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
2902         * s-fileio.adb: Minor reformatting.
2903         * sem_prag.adb (Analyze_Input_Item): Add local
2904         variable Input_OK. Do not consider mappings of generic formal
2905         parameters to actuals.
2907 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
2909         * sem_ch5.adb (Get_Cursor_Type): If iterator type is a derived
2910         type, the cursor is declared in the scope of the parent type.
2911         (Analyze_Parameter_Specification): A qualified expression with an
2912         iterator type indicates an iteration over a container (explicit
2913         or implicit).
2915 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
2917         * osint-c.ads, osint-c.adb (Delete_C_File, Delete_H_File): New.
2918         * gnat1drv.adb (Gnat1drv): Delete old C files before regenerating them.
2919         * debug.adb: Reserve -gnatd.4 to force generation of C files.
2921 2016-04-18  Yannick Moy  <moy@adacore.com>
2923         * sem_eval.adb (Eval_Arithmetic_Op): Do not issue error on static
2924         division by zero, instead possibly issue a warning.
2925         * sem_res.adb (Resolve_Arithmetic_Op): Do not issue error on
2926         static division by zero, instead add check flag on original
2927         expression.
2928         * sem_util.adb, sem_util.ads (Compile_Time_Constraint_Error):
2929         Only issue error when both SPARK_Mode is On and Warn is False.
2931 2016-04-18  Yannick Moy  <moy@adacore.com>
2933         * checks.adb (Apply_Scalar_Range_Check): Force
2934         warning instead of error when SPARK_Mode is On, on index out of
2935         bounds, and set check flag for GNATprove.
2937 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
2939         * sem_prag.adb (Check_In_Out_States.Check_Constituent_Usage):
2940         Update the comment on usage.  Reimplemented.
2941         (Check_Input_States.Check_Constituent_Usage): Update the comment
2942         on usage. A Proof_In constituent can now refine an Input state
2943         as long as there is at least one Input constituent present.
2945 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
2947         * sem_ch6.adb (Check_Inline_Pragma): Use the Sloc of the
2948         body id as the sloc of the entity in the generated subprogram
2949         declaration, to avoid spurious conformance errors when style
2950         checks are enabled.
2952 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
2954         * sem_ch4.adb (Analyze_Selected_Component, Has_Dereference):
2955         Refine check on illegal calls to entities within a task body,
2956         when the entity is declared in an object of the same type. In
2957         a generic context there might be no explicit dereference but if
2958         the prefix includes an access type the construct is legal.
2960 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
2962         * rtsfind.ads, rtsfind.adb (RE_Id, RE_Unit_Table): add
2963         RE_Default_Priority.
2965 2016-04-18  Bob Duff  <duff@adacore.com>
2967         * sem_prag.adb (Check_Arg_Is_Local_Name): Don't do the check
2968         if the pragma came from an aspect specification.
2970 2016-04-18  Gary Dismukes  <dismukes@adacore.com>
2972         * gnat1drv.adb, contracts.adb: Minor reformatting and wording fixes.
2974 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
2976         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): To suppress
2977         superfluous conformance check on an inlined body with a previous
2978         spec, use the fact that the generated declaration does not come
2979         from source. We must treat the entity as coming from source to
2980         enable some back-end inlining when pragma appears after the body.
2982 2016-04-18  Gary Dismukes  <dismukes@adacore.com>
2984         * lib-xref-spark_specific.adb, par-ch2.adb, errout.ads,
2985         exp_intr.adb: Minor reformatting and typo corrections.
2987 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
2989         * sem_ch6.adb: Code cleanup.
2991 2016-04-18  Thomas Quinot  <quinot@adacore.com>
2993         * sem_ch13.adb: Minor reformatting and error message tweaking
2994         (remove extraneous spaces).
2996 2016-04-18  Johannes Kanig  <kanig@adacore.com>
2998         * gnat1drv.adb (Gnat1drv): Force loading of System unit for SPARK.
3000 2016-04-18  Bob Duff  <duff@adacore.com>
3002         * s-fileio.adb (Fopen_Mode): If Mode = Out_File, and the file
3003         exists, and it's a fifo, we use "w" as the open string instead of
3004         "r+". This is necessary to make a write to the fifo block until
3005         a reader is ready.
3007 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
3009         * sem_attr.adb (Denote_Same_Function): Account
3010         for a special case where a primitive of a tagged type inherits
3011         a class-wide postcondition from a parent type.
3013 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
3015         * par-ch2.adb (P_Expression_Or_Reserved_Word): New routine.
3016         (P_Pragma): Signal Scan_Pragma_Argument_Association when the use
3017         of reserved words is OK.
3018         (Scan_Pragma_Argument_Association):
3019         Add new formal Reserved_Words_OK and update the comment on
3020         usage. Code cleanup. Parse an expression or a reserved word in
3021         identifier form for pragmas Restriction_Warnings and Restrictions
3022         No_Use_Of_Attribute.
3023         * restrict.adb (Check_Restriction_No_Use_Of_Attribute):
3024         Reimplemented.  (Check_Restriction_No_Use_Of_Pragma): Code cleanup.
3025         (Set_Restriction_No_Specification_Of_Aspect): Properly set the warning
3026         flag for an aspect.
3027         (Set_Restriction_No_Use_Of_Attribute): Properly set the warning
3028         flag for an attribute.  (Set_Restriction_No_Use_Of_Entity):
3029         Update the parameter profile.
3030         (Set_Restriction_No_Use_Of_Pragma): Properly set the warning flag for
3031         a pragma.
3032         * restrict.ads (Check_Restriction_No_Use_Of_Attribute): Update
3033         the comment on usage.
3034         (Set_Restriction_No_Use_Of_Entity): Update the parameter profile.
3035         * sem_attr.adb (Analyze_Attribute): Check restriction
3036         No_Use_Of_Attribute.
3037         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Check
3038         restriction No_Use_Of_Attribute before any rewritings have
3039         taken place.
3040         * sem_prag.adb (Analyze_Pragma): Check restriction
3041         No_Use_Of_Pragma before any rewritings have taken place.
3043 2016-04-18  Bob Duff  <duff@adacore.com>
3045         * sem_ch6.adb (Is_Inline_Pragma): The pragma
3046         argument can be a selected component, which has no Chars field,
3047         so we need to deal with that case (use the Selector_Name).
3048         (Check_Inline_Pragma): We need to test Is_List_Member before
3049         calling In_Same_List, because in case of a library unit, they're
3050         not in lists, so In_Same_List fails an assertion.
3052 2016-04-18  Bob Duff  <duff@adacore.com>
3054         * namet.ads, namet.adb: Add an Append that appends a
3055         Bounded_String onto a Bounded_String. Probably a little more
3056         efficient than "Append(X, +Y);". Also minor cleanup.
3057         (Append_Decoded, Append_Decoded_With_Brackets, Append_Unqualified,
3058         Append_Unqualified_Decoded): Make sure these work with non-empty
3059         buffers.
3060         * casing.ads, casing.adb (Set_Casing): Pass a Bounded_String
3061         parameter, defaulting to Global_Name_Buffer.
3062         * errout.ads, errout.adb (Adjust_Name_Case): Pass a
3063         Bounded_String parameter, no default.
3064         * exp_ch11.adb (Expand_N_Raise_Statement): Use local
3065         Bounded_String instead of Global_Name_Buffer.
3066         * exp_intr.ads, exp_intr.adb (Write_Entity_Name): Rename it
3067         to Append_Entity_Name, and pass a Bounded_String parameter,
3068         instead of using globals.
3069         (Add_Source_Info): Pass a Bounded_String parameter, instead of
3070         using globals.
3071         (Expand_Source_Info): Use local instead of globals.
3072         * stringt.ads, stringt.adb (Append): Add an Append procedure
3073         for appending a String_Id onto a Bounded_String.
3074         (String_To_Name_Buffer, Add_String_To_Name_Buffer): Rewrite in
3075         terms of Append.
3076         * sem_prag.adb (Set_Error_Msg_To_Profile_Name): Adjust for new
3077         Adjust_Name_Case parameter.
3078         * erroutc.adb, uname.adb: Don't pass D => Mixed_Case to
3079         Set_Casing; that's the default.
3080         * lib-xref-spark_specific.adb (Add_SPARK_Scope): Pretend that calls to
3081         protected subprograms are entry calls; otherwise it is not possible to
3082         distinguish them from regular subprogram calls.
3084 2016-04-18  Gary Dismukes  <dismukes@adacore.com>
3086         * sem_ch13.adb (Has_Good_Profile): Improvement
3087         of error message. Now indicates subtype_mark of formal parameter
3088         rather than the formal's name, plus minor rewording.
3090 2016-04-18  Pascal Obry  <obry@adacore.com>
3092         * adaint.c, adaint.h, s-os_lib.ads: Add new routine Current_Process_Id.
3094 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
3096         * stringt.adb, exp_ch6.adb, sem_ch13.adb: Minor reformatting.
3098 2016-04-18  Gary Dismukes  <dismukes@adacore.com>
3100         * par-ch4.adb, sem_prag.adb: Minor reformatting.
3102 2016-04-18  Bob Duff  <duff@adacore.com>
3104         * sinput.ads, sinput.adb (Build_Location_String): Take a
3105         parameter instead of using a global variable.  The function
3106         version no longer destroys the Name_Buffer.
3107         * stringt.ads, stringt.adb (String_From_Name_Buffer): Take a
3108         parameter, which defaults to the Global_Name_Buffer, so some
3109         calls can avoid the global.
3110         * exp_ch11.adb, exp_intr.adb: Use new interfaces above
3111         to avoid using globals. All but one call to Build_Location_String
3112         avoids the global. Only one call to String_From_Name_Buffer
3113         avoids it.
3115 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
3117         * namet.adb, namet.ads, exp_unst.adb: Minor reformatting.
3119 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
3121         * sem_eval.adb (Choice_Matches): Check the expression
3122         against the predicate values when the choice denotes a
3123         subtype with a static predicate.
3124         (Eval_Membership_Op): Code cleanup. Remove the suspicious guard which
3125         tests for predicates.
3126         (Is_OK_Static_Subtype): A subtype with a dynamic predicate
3127         is not static.  (Is_Static_Subtype): A subtype with a dynamic
3128         predicate is not static.
3129         * sem_eval.ads (Is_OK_Static_Subtype): Update the comment on usage.
3130         (Is_Static_Subtype): Update the comment on usage.
3132 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
3134         * sem_prag.adb (Analyze_Input_Item): Allow
3135         generic formals to appear as initialization items.
3137 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
3139         * sem_ch13.adb (Analyze_Stream_TSS_Definition,
3140         Has_Good_Profile): Additional error message to indicate that
3141         the second parameter of the subprogram must be a first subtype.
3143 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
3145         * sem_ch6.adb (Analyze_Subprogram_Body_Helper, Is_Inline_Pragma):
3146         Use the pragma lookahead that determines whether a subprogram
3147         is to be inlined, when some level of backend optimization is
3148         required.
3149         * sem_ch12.ads, sem_ch12.adb (Add_Pending_Instantiation): Factorize
3150         code used to create an instance body when needed for inlining.
3151         * exp_ch6.adb (Expand_Call): When a call is to be inlined, and the
3152         call appears within an instantiation that is not a compilation
3153         unit, add a pending instantiation for the enclosing instance,
3154         so the backend can inline in turn the calls contained in the
3155         inlined body.
3157 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
3159         * sem_prag.adb (Build_Pragma_Check_Equivalent): The mapping
3160         that relates operations of the parent type to the operations of
3161         the derived type has three distinct sources:
3162         a) explicit operations of the derived type carry an
3163         Overridden_Operation that designates the operation in the
3164         ancestor.
3165         b) Implicit operations that are inherited by the derived type
3166         carry an alias that may be an explicit subprogram (in which case
3167         it may have an Overridden_ Operation indicator) or may also be
3168         inherited and carry its own alias.
3169         c) If the parent type is an interface, the operation of the
3170         derived type does not override, but the interface operation
3171         indicates the operation that implements it.
3172         * sem_prag.adb: Minor reformatting.
3173         * sem_prag.adb (Check_External_Property): Update
3174         the comment on usage. Reimplement.
3176 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
3178         * exp_ch5.adb (Expand_Assignment_Statement): In restricted
3179         profiles such as ZFP, ceiling priority is not available.
3181 2016-04-18  Bob Duff  <duff@adacore.com>
3183         * namet-sp.ads: Minor typo fix, ironically in 'Spelling_Checker'.
3185 2016-04-18  Bob Duff  <duff@adacore.com>
3187         * sem_elab.adb (Output_Calls): Use
3188         Get_Name_String, to clearly indicate that the global Name_Buffer
3189         is being used. The previous code used Is_Internal_Name, which
3190         returns a Boolean, but also has a side effect of setting the
3191         Name_Buffer. Then it called the other Is_Internal_Name, which uses
3192         the Name_Buffer for its input. And then it called Error_Msg_N,
3193         again using the Name_Buffer. We haven't eliminated the global
3194         usage here, but we've made it a bit clearer.
3195         This also allows us to have a side-effect-free version of
3196         Is_Internal_Name.
3197         * namet.ads, namet.adb: Provide a type Bounded_String, along with
3198         routines that can be used without using global variables. Provide
3199         Global_Name_Buffer so existing code can continue to use the
3200         global. Mark the routines that use globals as obsolete.  New code
3201         shouldn't call the obsolete ones, and we should clean up existing
3202         code from time to time.
3203         Name_Find_Str is renamed as Name_Find.
3204         * namet.h: Changed as necessary to interface to the new version
3205         of Namet.
3206         * bindgen.adb, exp_unst.adb: Name_Find_Str is renamed as
3207         Name_Find.
3209 2016-04-18  Yannick Moy  <moy@adacore.com>
3211         * sem_util.adb, sem_util.ads (Has_Full_Default_Initialization): used
3212         outside of GNATprove, hence it should not be removed.
3214 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
3216         * sem_prag.adb (Analyze_Refinement_Clause):
3217         The refinement of an external abstract state can now mention
3218         non-external constituents.
3219         (Check_External_Property): Update all SPARK RM references.
3221 2016-04-18  Bob Duff  <duff@adacore.com>
3223         * exp_intr.adb: Remove some duplicated code.
3225 2016-04-18  Yannick Moy  <moy@adacore.com>
3227         * a-nudira.adb, a-nudira.ads, a-nuflra.adb, a-nuflra.ads: Mark
3228         package spec and body out of SPARK.
3230 2016-04-18  Johannes Kanig  <kanig@adacore.com>
3232         * spark_xrefs.ads: Minor comment update.
3234 2016-04-18  Johannes Kanig  <kanig@adacore.com>
3236         * gnat1drv.adb (Gnat1drv): Force loading of System
3237         unit for SPARK.
3239 2016-04-18  Bob Duff  <duff@adacore.com>
3241         * a-cuprqu.adb: Correction to previous change. If a new node
3242         is inserted at the front of the queue (because it is higher
3243         priority than the previous front node), we need to update
3244         Header.Next_Unequal -- not just in the case where the queue was
3245         previously empty.
3247 2016-04-18  Bob Duff  <duff@adacore.com>
3249         * a-cuprqu.ads: Change the representation of List_Type from a
3250         singly-linked list to a doubly-linked list. In addition, add a
3251         pointer Next_Unequal, which points past a possibly-long chain
3252         of equal-priority items. This increases efficiency, especially
3253         in the case of many equal-priority items.
3254         * a-cuprqu.adb (Dequeue, Enqueue): Rewrite algorithms to take
3255         advantage of new data structure.
3256         (Finalize): Rewrite in terms of Dequeue, for simplicity.
3258 2016-04-18  Yannick Moy  <moy@adacore.com>
3260         * contracts.adb (Analyze_Object_Contract,
3261         Analyze_Protected_Contract): Remove tests performed in GNATprove.
3262         * sem_util.adb, sem_util.ads (Has_Full_Default_Initialization):
3263         Remove query for tests performed in GNATprove.
3265 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
3267         * sem_aggr.adb (Resolve_Record_Aggregate): If
3268         Warn_On_Redundant_Constructs is enabled, report a redundant box
3269         association that does not cover any components, as it done for
3270         redundant others associations in case statements.
3272 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
3274         * sem_prag.adb (Collect_Inherited_Class_Wide_Conditions):
3275         Analyze the generated Check pragma for an inherited condition so
3276         that it does not freeze the dispatching type of the primitive
3277         operation, because it is pre-analyzed at the point of the
3278         subprogram declaration (and not in the subprogram body, as is
3279         done during regular expansion).
3281 2016-04-18  Vincent Celier  <celier@adacore.com>
3283         * ali.ads: Increase the range of all _Id types to 100 millions.
3285 2016-04-18  Gary Dismukes  <dismukes@adacore.com>
3287         * sem_warn.adb (Check_References): Change warning to suggest
3288         using pragma Export rather than saying "volatile has no effect".
3290 2016-04-18  Bob Duff  <duff@adacore.com>
3292         * g-souinf.ads (Compilation_ISO_Date): New function to return
3293         the current date in ISO form.
3294         * exp_intr.adb (Expand_Source_Info, Add_Source_Info): Expand
3295         a call to Compilation_ISO_Date into a string literal containing
3296         the current date in ISO form.
3297         * exp_intr.ads (Add_Source_Info): Improve documentation.
3298         * sem_intr.adb (Check_Intrinsic_Subprogram): Recognize
3299         Compilation_ISO_Date.
3300         * snames.ads-tmpl (Name_Compilation_ISO_Date): New Name_Id.
3302 2016-04-18  Eric Botcazou  <ebotcazou@adacore.com>
3304         * layout.adb (Set_Elem_Alignment): Extend setting of alignment
3305         to subtypes that are not first subtypes.
3307 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
3309         * sem_prag.ads (Collect_Inherited_Class_Wide_Conditions):
3310         Simplify interface.
3311         * sem_prag.adb (Collect_Inherited_Class_Wide_Conditions): Insert
3312         generated pragmas after subprogram declaration, rather than in
3313         the corresponding subprogram body.
3314         * sem_ch6.adb (New_Overloaded_Entity): In GNATProve
3315         mode, if the operation is overridding, call
3316         Collect_Inherited_Class_Wide_Conditions to generate the
3317         corresponding pragmas immediately after the corresponding
3318         subprogram declaration.
3320 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
3322         * spark_xrefs.ads (Xref_Index, Scope_Index, File_Index): restrict
3323         type to natural numbers.
3324         (Stype): document code characters for concurrent entities.
3326 2016-04-18  Olivier Hainque  <hainque@adacore.com>
3328         * targparm.ads: Update the Frontend_Exceptions default internal
3329         value.
3330         (Frontend_Exceptions_On_Target): Change default value to True.
3332 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
3334         * sem_ch4.adb (Analyze_Selected_Component): Refine error
3335         detection when a selected component in the body of a synchronized
3336         type is a reference to an object of the same type declared
3337         elsewhere. The construct is legal if the prefix of the selected
3338         component includes an explicit dereference at any point.
3340 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
3342         * sem_ch3.adb (Analyze_Object_Declaration): Do not consider
3343         internally generated expressions when trying to determine whether
3344         a formal parameter of a tagged type subject to Extensions_Visible
3345         False is used to initialize an object.
3346         * sem_ch4.adb (Analyze_Type_Conversion): Do not consider
3347         internally generated expressions when trying to determine whether
3348         a formal parameter of a tagged type subject to Extensions_Visible
3349         False is used in a type conversion.
3351 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
3353         * sem_res.adb (Is_Protected_Operation_Call):
3354         Add guards to account for a non-decorated selected component.
3356 2016-04-18  Yannick Moy  <moy@adacore.com>
3358         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Improve
3359         implementation of Body_Has_SPARK_Mode_On.
3360         * sem_prag.adb, sem_prag.ads (Get_SPARK_Mode_From_Annotation):
3361         New function replacing previous Get_SPARK_Mode_From_Pragma, that
3362         deals also with aspects.
3363         (Get_SPARK_Mode_Type): Make function internal again.
3364         * inline.adb, sem_ch7.adb, sem_util.adb: Use new
3365         Get_SPARK_Mode_From_Annotation.
3367 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
3369         * contracts.adb (Analyze_Object_Contract): Update references to
3370         SPARK RM.
3371         * freeze.adb (Freeze_Entity): Update references to SPARK RM.
3372         * ghost.adb Add with and use clauses for Sem_Disp.
3373         (Check_Ghost_Derivation): Removed.
3374         (Check_Ghost_Overriding):
3375         Reimplemented.  (Check_Ghost_Policy): Update references to SPARK RM.
3376         (Check_Ghost_Primitive): New routine.
3377         (Check_Ghost_Refinement): New routine.  (Is_OK_Ghost_Context):
3378         Update references to SPARK RM.  (Is_OK_Pragma): Update references
3379         to SPARK RM. Predicates are now a valid context for references
3380         to Ghost entities.
3381         * ghost.ads (Check_Ghost_Derivation): Removed.
3382         (Check_Ghost_Overriding): Update the comment on usage.
3383         (Check_Ghost_Primitive): New routine.
3384         (Check_Ghost_Refinement): New routine.
3385         (Remove_Ignored_Ghost_Code): Update references to SPARK RM.
3386         * sem_ch3.adb (Process_Full_View): Remove the now obsolete check
3387         related to Ghost derivations
3388         * sem_ch6.adb (Check_Conformance): Remove now obsolete check
3389         related to the convention-like behavior of pragma Ghost.
3390         (Check_For_Primitive_Subprogram): Verify that the Ghost policy
3391         of a tagged type and its primitive agree.
3392         * sem_prag.adb (Analyze_Pragma): Update references to SPARK
3393         RM. Move the verification of pragma Assertion_Policy Ghost
3394         to the proper place. Remove the now obsolete check related
3395         to Ghost derivations.
3396         (Collect_Constituent): Add a call to Check_Ghost_Refinement.
3397         * sem_res.adb (Resolve_Actuals): Update references to SPARK RM.
3399 2016-04-18  Eric Botcazou  <ebotcazou@adacore.com>
3401         * layout.adb: Fix more minor typos in comments.
3403 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
3405         * a-calend.ads, sem_prag.adb, sem_ch6.adb: Minor reformatting.
3407 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
3409         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): In GNATprove
3410         mode, collect inherited class-wide conditions to generate the
3411         corresponding pragmas.
3412         * sem_prag.ads (Build_Pragma_Check_Equivalent): Moved from contracts
3413         * contracts.adb (Collect_Inherited_Class_Wide_Conditions): New
3414         procedure for overriding subprograms, used to generate the pragmas
3415         corresponding to an inherited class- wide pre- or postcondition.
3416         * sem_prag.adb (Build_Pragma_Check_Equivalent): moved here
3417         from contracts.adb (Replace_Condition_Entities): Subsidiary
3418         Build_Pragma_Check_Equivalent, to implement the proper semantics
3419         of inherited class-wide conditions, as given in AI12-0113.
3420         (Process_Class_Wide_Condition): Removed.
3421         (Collect_Inherited_Class_Wide_Conditions): Iterate over pragmas
3422         in contract of subprogram, to collect inherited class-wide
3423         conditions.
3424         (Build_Pragma_Check_Equivalent): Moved to sem_prag.adb
3426 2016-04-18  Yannick Moy  <moy@adacore.com>
3428         * a-calend.adb (Ada.Calendar): Mark package body as SPARK_Mode Off.
3429         * a-calend.ads (Ada.Calendar): Mark package spec as
3430         SPARK_Mode and add synchronous external abstract state Clock_Time.
3432 2016-04-18  Yannick Moy  <moy@adacore.com>
3434         * sem_res.adb (Resolve_Call): Prevent inlining of
3435         calls inside expression functions.  Factor previous code issuing
3436         errors to call Cannot_Inline instead, which does appropriate
3437         processing of message for GNATprove.
3439 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
3441         * einfo.ads, sem_ch3.adb, sem_ch8.adb, osint-l.adb, rtsfind.adb,
3442         osint-b.adb: Cleanups.
3444 2016-04-18  Yannick Moy  <moy@adacore.com>
3446         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Only create
3447         body to inline in GNATprove mode when SPARK_Mode On applies to
3448         subprogram body.
3449         * sem_prag.adb, sem_prag.ads (Get_SPARK_Mode_Type): Make function
3450         public.
3452 2016-04-18  Eric Botcazou  <ebotcazou@adacore.com>
3454         * layout.adb: Fix minor typo in comment.
3455         * inline.adb: Fix minor pasto.
3456         * sem_ch12.ads: Fix minor typos in comments.
3458 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
3460         * sem_disp.adb (Check_Dispatching_Call): Major rewriting to
3461         handle some complex cases of tag indeterminate calls that are
3462         actuals in other dispatching calls that are themselves tag
3463         indeterminate.
3464         (Check_Dispatching_Context): Add parameter to support recursive
3465         check for an enclosing construct that may provide a tag for a
3466         tag-indeterminate call.
3468 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
3470         * sem_prag.adb (Analyze_Depends_In_Decl_Part):
3471         Add global variables Task_Input_Seen and Task_Output_Seen.
3472         (Analyze_Global_Item): Detect an illegal use of the current
3473         instance of a single protected/task type in a global annotation.
3474         (Analyze_Input_Output): Inputs and output related to the current
3475         instance of a task unit are now tracked.
3476         (Check_Usage): Require
3477         the presence of the current instance of a task unit only when
3478         one input/output is available.  (Current_Task_Instance_Seen):
3479         New routine.
3480         (Is_CCT_Instance): New parameter profile. Update
3481         the comment on usage. The routine now properly recognizes several
3482         cases related to single protected/task types.
3484 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
3486         * freeze.adb (Freeze_Entity): Use New_Freeze_Node
3487         to create a brand new freeze node. This handles a case where an
3488         ignored Ghost context is freezing something which is not ignored
3489         Ghost and whose freeze node should not be removed from the tree.
3490         (New_Freeze_Node): New routine.
3492 2016-04-18  Jerome Lambourg  <lambourg@adacore.com>
3494         * sigtramp.h (__gnat_set_is_vxsim) New function to
3495         tell sigtramp-vxworks to handle vxsim signal contexts.  *
3496         sigtramp-vxworks.c (__gnat_sigtramp) Take into account the
3497         differences in the sigcontext structure between the expected
3498         regular x86 or x86_64 ones and the ones received in case of
3499         exexution on the vxworks simulator.
3500         * init.c: also compute is_vxsim in case of x86_64-vx7 target. Provide
3501         this information to sigtramp-vxworks.c. Remove the old mechanism for
3502         vxsim.
3503         * init-vxsim.c, sigtramp-vxworks-vxsim.c: remove, now obsolete.
3505 2016-04-18  Eric Botcazou  <ebotcazou@adacore.com>
3507         * exp_ch3.adb (Inline_Init_Proc): New function returning
3508         whether the initialization procedure of a type should be
3509         inlined.  Return again True for controlled type themselves.
3510         (Build_Array_Init_Proc): Call it to set Set_Is_Inlined on Init_Proc.
3511         (Build_Record_Init_Proc): Likewise.
3513 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
3515         * gnatvsn.ads (Library_Version): Bump to 7.
3517 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
3519         * sem_ch6.adb (Analyze_Expression_Function): Set Inlined flag
3520         on the entity of a subprogram declaration that is completed by
3521         an expression function.
3523 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
3525         * sem_util.adb (Is_Current_Instance): A entity given by a subtype
3526         declaration can appear in an aspect specification for a dynamic
3527         predicate, and a pragma for aspect Predicate_Failure.
3528         * exp_util.adb (Replace_Subtype_References): Replace current
3529         occurrences of the subtype to which a dynamic predicate applies,
3530         byt the expression that triggers a predicate check. Needed to
3531         implement new aspect Predicate_Failure.
3533 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
3535         * a-intsig.ads, a-intsig.adb: Removed, no longer used.
3536         * Makefile.rtl: update accordingly.
3538 2016-04-18  Eric Botcazou  <ebotcazou@adacore.com>
3540         * sem_type.adb (Disambiguate): Call Covers only when necessary
3541         for standard operators.
3543 2016-04-18  Eric Botcazou  <ebotcazou@adacore.com>
3545         * atree.ads (Num_Extension_Nodes): Add couple of figures
3546         to comment.
3547         * atree.adb: Add GNAT.Heap_Sort_G dependency.
3548         (Print_Statistics): New exported procedure to print statistics.
3550 2016-04-18  Eric Botcazou  <ebotcazou@adacore.com>
3552         * exp_ch3.adb (Build_Record_Init_Proc): Do not mark the procedure
3553         as to be inlined if the type needs finalization.
3555 2016-04-18  Jerome Lambourg  <lambourg@adacore.com>
3557         * sigtramp-vxworks-target.inc: sigtramp-vxworks: force the stack
3558         alignment for x86_64.
3559         * init.c: Better fix for guard page reset on x86_64-vx7.
3560         Do not try to retrieve the page that actually raised
3561         the signal as the probing mechanism used on x86_64 do not allow
3562         such retrieval. We thus just test if the guard page is active,
3563         and re-activate it if not.
3565 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
3567         * a-sytaco.adb (Suspension_Object): Aspect Default_Initial_Condition
3568         added.
3570 2016-04-18  Jerome Lambourg  <lambourg@adacore.com>
3572         * affinity.c: Use the proper type for task id.
3573         * init.c (__gnat_inum_to_ivec): ivec is a pointer.
3575 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
3577         * sem_prag.adb (Process_Convention): Relax rule on exporting
3578         Intrinsic types if Relaxed_RM_Semantics is True.
3580 2016-04-18  Vincent Celier  <celier@adacore.com>
3582         * sem_ch3.adb, lib.ads, sinfo.ads, sem_ch10.adb, einfo.adb, einfo.ads,
3583         checks.ads, sem_ch12.adb, sem.adb, sem_util.adb, sem_util.ads,
3584         sem_res.adb, sem_attr.adb, par.adb, exp_ch4.adb, errout.ads,
3585         sem_ch4.adb, atree.adb, atree.ads, sem_warn.adb, treepr.adb,
3586         exp_ch3.ads, exp_unst.adb: Change "descendent" to
3587         "descendant" in comments, error messages and identifiers.
3588         * gcc-interface/decl.c: Ditto.
3590 2016-04-18  Eric Botcazou  <ebotcazou@adacore.com>
3592         * sem_type.adb (Operator_Matches_Spec): Call First_Formal on
3593         New_S only once at the beginning of the function.
3595 2016-04-02  Eric Botcazou  <ebotcazou@adacore.com>
3597         * gcc-interface/decl.c (components_to_record): Restrict the previous
3598         change to fields with variable size.
3600 2016-03-27  Eric Botcazou  <ebotcazou@adacore.com>
3602         * gcc-interface/decl.c (components_to_record): Add special case for
3603         single field with representation clause at offset 0.
3605 2016-03-16  Svante Signell  <svante.signell@gmail.com>
3607         * gcc-interface/Makefile.in: Add support for x86 GNU/Hurd.
3608         * s-osinte-gnu.ads: New file.
3610 2016-03-13  Eric Botcazou  <ebotcazou@adacore.com>
3612         * system-vxworks-m68k.ads (Stack_Check_Probes): Set to True.
3613         (Stack_Check_Limits): Set to False.
3614         * system-vxworks-mips.ads (Stack_Check_Probes): Set to True.
3615         (Stack_Check_Limits): Set to False.
3616         * system-vxworks-ppc.ads (Stack_Check_Probes): Set to True.
3617         (Stack_Check_Limits): Set to False.
3618         * system-vxworks-sparcv9.ads (Stack_Check_Probes): Set to True.
3619         (Stack_Check_Limits): Set to False.
3620         * system-vxworks-x86.ads (Stack_Check_Probes): Set to True.
3621         (Stack_Check_Limits): Set to False.
3623 2016-03-07  Eric Botcazou  <ebotcazou@adacore.com>
3625         * gcc-interface/trans.c (statement_node_p): New predicate.
3626         (gnat_to_gnu): Invoke it to detect statement nodes.  In ASIS mode, do
3627         not return dummy results for expressions attached to packed array
3628         implementation types.
3630 2016-03-07  Eric Botcazou  <ebotcazou@adacore.com>
3632         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Always mark
3633         the expression of a renaming manually in case #3.
3635 2016-03-02  Dominik Vogt  <vogt@linux.vnet.ibm.com>
3637         * system-linux-s390.ads: Enable Stack_Check_Probes.
3638         * system-linux-s390.ads: Likewise.
3640 2016-02-29  Martin Liska  <mliska@suse.cz>
3642         * gcc-interface/utils.c (set_reverse_storage_order_on_pad_type):
3643         Replace ENABLE_CHECKING macro with flag_checking.
3645 2016-02-29  Eric Botcazou  <ebotcazou@adacore.com>
3647         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Retrofit
3648         handling of unconstrained array types as designated types into common
3649         processing.  Also handle array types as incomplete designated types.
3651 2016-02-29  Eric Botcazou  <ebotcazou@adacore.com>
3653         * gcc-interface/decl.c (gnat_to_gnu_entity) <Concurrent types>: In
3654         ASIS mode, fully lay out the minimal record type.
3656 2016-02-29  Eric Botcazou  <ebotcazou@adacore.com>
3658         * gcc-interface/trans.c (finalize_nrv_r): Remove obsolete code.
3659         (build_return_expr): Likewise.
3660         (Call_to_gnu): If this is a function call and there is no target,
3661         create a temporary for the return value for all aggregate types,
3662         but never create it for a return statement.  Push a binding level
3663         around the call in more cases.  Remove obsolete code.
3665 2016-02-29  Eric Botcazou  <ebotcazou@adacore.com>
3667         * gcc-interface/ada-tree.h (DECL_RETURN_VALUE_P): New macro.
3668         * gcc-interface/gigi.h (gigi): Remove useless attribute.
3669         (gnat_gimplify_expr): Likewise.
3670         (gnat_to_gnu_external): Declare.
3671         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: Factor out
3672         code dealing with the expression of external constants into...
3673         Invoke gnat_to_gnu_external instead.
3674         <E_Variable>: Invoke gnat_to_gnu_external to translate renamed objects
3675         when not for a definition.  Deal with COMPOUND_EXPR and variables with
3676         DECL_RETURN_VALUE_P set for renamings and with the case of a dangling
3677         'reference to a function call in a renaming.  Remove obsolete test and
3678         adjust associated comment.
3679         * gcc-interface/trans.c (Call_to_gnu): Set DECL_RETURN_VALUE_P on the
3680         temporaries created to hold the return value, if any.
3681         (gnat_to_gnu_external): ...this.  New function.
3682         * gcc-interface/utils.c (create_var_decl): Detect a constant created
3683         to hold 'reference to function call.
3684         * gcc-interface/utils2.c (build_unary_op) <ADDR_EXPR>: Add folding
3685         for COMPOUND_EXPR in the DECL_RETURN_VALUE_P case.
3687 2016-02-17  Eric Botcazou  <ebotcazou@adacore.com>
3689         * exp_ch4.adb (Expand_N_Indexed_Component): Activate synchronization if
3690         the prefix denotes an entity which Has_Atomic_Components.
3691         * gcc-interface/trans.c (node_is_atomic): Return true if the prefix
3692         denotes an entity which Has_Atomic_Components.
3694 2016-02-17  Eric Botcazou  <ebotcazou@adacore.com>
3696         * gcc-interface/utils2.c (gnat_protect_expr): Make a SAVE_EXPR only
3697         for fat pointer or scalar types.
3699 2016-02-16  Eric Botcazou  <ebotcazou@adacore.com>
3701         * gcc-interface/gigi.h (maybe_debug_type): New inline function.
3702         * gcc-interface/misc.c (gnat_get_array_descr_info): Use it.
3703         Call maybe_character_value on the array bounds.  Get to the base type
3704         of the index type and call maybe_debug_type on it.
3705         * gcc-interface/utils.c (finish_character_type): Add special treatment
3706         for char_type_node.
3708 2016-02-16  Eric Botcazou  <ebotcazou@adacore.com>
3710         * gcc-interface/misc.c (gnat_enum_underlying_base_type): New function.
3711         (LANG_HOOKS_ENUM_UNDERLYING_BASE_TYPE): Define to above.
3713 2016-02-12  Jakub Jelinek  <jakub@redhat.com>
3715         * prj-tree.ads: Spelling fixes - behaviour -> behavior and
3716         neighbour -> neighbor.
3717         * prep.adb: Likewise.
3718         * prj.ads: Likewise.
3719         * prepcomp.adb: Likewise.
3720         * g-socket.ads: Likewise.
3721         * s-imgrea.adb: Likewise.
3722         * a-calend.adb: Likewise.
3723         * exp_disp.adb: Likewise.
3724         * doc/gnat_ugn/gnat_utility_programs.rst: Likewise.
3725         * g-socket.adb: Likewise.
3726         * sem_ch12.adb: Likewise.
3727         * terminals.c: Likewise.
3729 2016-02-08  Bernd Schmidt  <bschmidt@redhat.com>
3731         * gcc-interface/misc.c (gnat_init): Remove second argument in call to
3732         build_common_tree_nodes.
3734 2016-02-08  Eric Botcazou  <ebotcazou@adacore.com>
3736         * gcc-interface/utils.c (create_var_decl): Set again DECL_COMMON and
3737         DECL_IGNORED_P last.
3739 2016-01-28  Eric Botcazou  <ebotcazou@adacore.com>
3741         * gcc-interface/gigi.h (enum attr_type): Rename into...
3742         (enum attrib_type): ...this.
3743         (struct attrib): Adjust.
3744         * gcc-interface/decl.c (prepend_one_attribute): Likewise.
3746 2016-01-20  Eric Botcazou  <ebotcazou@adacore.com>
3748         * exp_ch2.adb (Expand_Current_Value): Make an appropriate character
3749         literal if the entity is of a character type.
3750         * gcc-interface/lang.opt (fsigned-char): New option.
3751         * gcc-interface/misc.c (gnat_handle_option): Accept it.
3752         (gnat_init): Adjust comment.
3753         * gcc-interface/gigi.h (finish_character_type): New prototype.
3754         (maybe_character_type): New inline function.
3755         (maybe_character_value): Likewise.
3756         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Enumeration_Type>: For
3757         a character of CHAR_TYPE_SIZE, make a signed type if flag_signed_char.
3758         Set TYPE_ARTIFICIAL early and call finish_character_type on the type.
3759         <E_Enumeration_Subtype>: For a subtype of character with RM_Size and
3760         Esize equal to CHAR_TYPE_SIZE, make a signed type if flag_signed_char.
3761         Copy TYPE_STRING_FLAG from type to subtype.
3762         <E_Array_Type>: Deal with character index types.
3763         <E_Array_Subtype>: Likewise.
3764         * gcc-interface/trans.c (gigi): Replace unsigned_char_type_node with
3765         char_type_node throughout.
3766         (build_raise_check): Likewise.
3767         (get_type_length): Deal with character types.
3768         (Attribute_to_gnu) <Attr_Pos>: Likewise.  Remove obsolete range check
3769         code.  Minor tweak.
3770         <Attr_Pred>: Likewise.
3771         (Loop_Statement_to_gnu): Likewise.
3772         (Raise_Error_to_gnu): Likewise.
3773         <N_Indexed_Component>: Deal with character index types.  Remove
3774         obsolete code.
3775         <N_Slice>: Likewise.
3776         <N_Type_Conversion>: Deal with character types.  Minor tweak.
3777         <N_Unchecked_Type_Conversion>: Likewise.
3778         <N_In>: Likewise.
3779         <N_Op_Eq>: Likewise.
3780         (emit_index_check): Delete.
3781         * gcc-interface/utils.c (finish_character_type): New function.
3782         (gnat_signed_or_unsigned_type_for): Deal with built-in character types.
3783         * gcc-interface/utils2.c (expand_sloc): Replace unsigned_char_type_node
3784         with char_type_node.
3785         (build_call_raise): Likewise.
3786         (build_call_raise_column): Likewise.
3787         (build_call_raise_range): Likewise.
3789 2016-01-18  Eric Botcazou  <ebotcazou@adacore.com>
3791         * gcc-interface/gigi.h (build_call_raise_column): Adjust prototype.
3792         (build_call_raise_range): Likewise.
3793         (gnat_unsigned_type): Delete.
3794         (gnat_signed_type): Likewise.
3795         (gnat_signed_or_unsigned_type_for): New prototype.
3796         (gnat_unsigned_type_for): New inline function.
3797         (gnat_signed_type_for): Likewise.
3798         * gcc-interface/cuintp.c (build_cst_from_int): Call build_int_cst.
3799         * gcc-interface/decl.c (gnat_to_gnu_entity): Likewise.
3800         (gnat_to_gnu_entity) <E_Array_Type>: Always translate the index types
3801         and compute their base type from that.
3802         <E_Array_Subtype>: Remove duplicate declaration.
3803         * gcc-interface/misc.c (get_array_bit_stride): Call build_int_cst.
3804         * gcc-interface/trans.c (get_type_length): Likewise.
3805         (Attribute_to_gnu): Likewise.
3806         (Loop_Statement_to_gnu): Likewise.
3807         (Call_to_gnu): Likewise.
3808         (gnat_to_gnu): Call build_real, build_int_cst, gnat_unsigned_type_for
3809         and gnat_signed_type_for.  Minor tweaks.
3810         (build_binary_op_trapv): Likewise.
3811         (emit_check): Likewise.
3812         (convert_with_check): Likewise.
3813         (Raise_Error_to_gnu): Adjust calls to the build_call_raise family of
3814         functions.  Minor tweaks.
3815         (Case_Statement_to_gnu): Remove dead code.
3816         (gnat_to_gnu): Call gnat_unsigned_type_for and gnat_signed_type_for.
3817         (init_code_table): Minor reordering.
3818         * gcc-interface/utils.c (gnat_unsigned_type): Delete.
3819         (gnat_signed_type): Likewise.
3820         (gnat_signed_or_unsigned_type_for): New function.
3821         (unchecked_convert): Use directly the size in the test for precision
3822         vs size adjustments.
3823         (install_builtin_elementary_types): Call gnat_signed_type_for.
3824         * gcc-interface/utils2.c (nonbinary_modular_operation): Call
3825         build_int_cst.
3826         (build_goto_raise): New function taken from...
3827         (build_call_raise): ...here.  Call it.
3828         (build_call_raise_column): Add KIND parameter and call it.
3829         (build_call_raise_range): Likewise.
3831 2016-01-18  Eric Botcazou  <ebotcazou@adacore.com>
3833         * gcc-interface/ada-tree.h (TYPE_IMPLEMENTS_PACKED_ARRAY_P): Rename to
3834         (TYPE_IMPL_PACKED_ARRAY_P): ...this.
3835         (TYPE_CAN_HAVE_DEBUG_TYPE_P): Do not test TYPE_DEBUG_TYPE.
3836         * gcc-interface/decl.c (gnat_to_gnu_entity): Simplify NULL_TREE tests
3837         and tweak gnat_encodings tests throughout.
3838         (initial_value_needs_conversion): Likewise.
3839         (intrin_arglists_compatible_p): Likewise.
3840         * gcc-interface/misc.c (gnat_print_type): Likewise.
3841         (gnat_get_debug_type): Likewise.
3842         (gnat_get_fixed_point_type_info): Likewise.
3843         (gnat_get_array_descr_info): Likewise.
3844         (get_array_bit_stride): Likewise.
3845         (gnat_get_type_bias): Fix formatting.
3846         (enumerate_modes): Likewise.
3847         * gcc-interface/trans.c (gnat_to_gnu): Likewise.
3848         (add_decl_expr): Simplify NULL_TREE test.
3849         (end_stmt_group): Likewise.
3850         (build_binary_op_trapv): Fix formatting.
3851         (get_exception_label): Use switch statement.
3852         (init_code_table): Move around.
3853         * gcc-interface/utils.c (global_bindings_p): Simplify NULL_TREE test.
3854         (gnat_poplevel): Likewise.
3855         (gnat_set_type_context): Likewise.
3856         (defer_or_set_type_context): Fix formatting.
3857         (gnat_pushdecl): Simplify NULL_TREE test.
3858         (maybe_pad_type): Likewise.
3859         (add_parallel_type): Likewise.
3860         (create_range_type): Likewise.
3861         (process_deferred_decl_context): Likewise.
3862         (convert): Likewise.
3863         (def_builtin_1): Likewise.
3864         * gcc-interface/utils2.c (find_common_type): Likewise.
3865         (build_binary_op): Likewise.
3866         (gnat_rewrite_reference): Likewise.
3867         (get_inner_constant_reference): Likewise.
3869 2016-01-18  Eric Botcazou  <ebotcazou@adacore.com>
3871         PR ada/69219
3872         * gcc-interface/trans.c (check_inlining_for_nested_subprog): Consider
3873         the parent function instead of the current function in order to issue
3874         the warning or the error.  Add guard for ignored functions.
3876 2016-01-17  Jakub Jelinek  <jakub@redhat.com>
3878         * adaint.c (__gnat_killprocesstree): Avoid -Wparentheses warning.
3880 2016-01-15  Jakub Jelinek  <jakub@redhat.com>
3882         * adaint.c (__gnat_locate_exec_on_path): Use const char * instead
3883         of char * for path_val to avoid warnings.
3885 2016-01-06  Pierre-Marie de Rodat  <derodat@adacore.com>
3887         * gcc-interface/utils.c: Bump copyright year.
3888         (rest_of_record_type_compilation): Add XVE/XVU parallel types to
3889         the current lexical scope.
3891 2016-01-04  Jakub Jelinek  <jakub@redhat.com>
3893         * gnat_ugn.texi: Bump @copying's copyright year.
3894         * gnat_rm.texi: Likewise.
3896 2016-01-02  Eric Botcazou  <ebotcazou@adacore.com>
3898         * gnatvsn.ads: Bump copyright year.
3901 Copyright (C) 2016 Free Software Foundation, Inc.
3903 Copying and distribution of this file, with or without modification,
3904 are permitted in any medium without royalty provided the copyright
3905 notice and this notice are preserved.