2016-04-21 Javier Miranda <miranda@adacore.com>
[official-gcc.git] / gcc / ada / ChangeLog
blobd725805d6465fde732f6d843c43b035109f3a2de
1 2016-04-21  Javier Miranda  <miranda@adacore.com>
3         * sem_ch6.adb (Build_Subprogram_Declaration): Propagate the
4         attribute Rewritten_For_C to the body since since the expander
5         may generate calls using that entity.
6         * exp_ch6.adb (Expand_Call): For internally generated
7         calls ensure that they reference the entity of the spec
8         of the called function.
9         (Rewritten_For_C_Func_Id): New subprogram.
10         (Rewritten_For_C_Proc_Id): New subprogram.
11         (Rewrite_Function_Call_For_C): Invoke the new subprogram to
12         ensure that we skip freezing entities.
13         * exp_util.adb (Build_Procedure_Form): No action needed if the
14         procedure was already built.
16 2016-04-21  Hristian Kirtchev  <kirtchev@adacore.com>
18         * sem_ch3.adb, exp_util.adb, sem_ch13.adb, exp_unst.adb: Minor
19         reformatting.
21 2016-04-21  Ed Schonberg  <schonberg@adacore.com>
23         * sem_util.adb (Denotes_Iterator): Use root type to determine
24         whether the ultimate ancestor is the predefined iterator
25         interface pakage.
26         * exp_ch5.adb (Expand_Iterator_Over_Container): simplify code
27         and avoid reuse of Pack local variable.
29 2016-04-21  Olivier Hainque  <hainque@adacore.com>
31         * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
32         system-vxworks-ppc.ads, system-vxworks-m68k.ads,
33         system-vxworks-mips.ads, system-vxworks-x86.ads: Define
34         Executable_Extension to ".out".
36 2016-04-21  Javier Miranda  <miranda@adacore.com>
38         * frontend.adb: Update call to Unnest_Subprograms.
39         * exp_ch6.ads, exp_ch6.adb, exp_unst.ads, exp_unst.adb
40         (Unnest_Subprograms): Moved to package exp_unst.
41         * exp_unst.ads (Unnest_Subprogram): Moved to the body of the
42         package.
43         * exp_dbug.adb (Qualify_Entity_Name): Enable qualification of
44         enumeration literals when generating C code.
46 2016-04-21  Javier Miranda  <miranda@adacore.com>
48         * frontend.adb: Remove call to initialize Exp_Ch6.
49         * exp_ch6.ads, exp_ch6.adb (Initialize): removed.
50         (Unest_Entry/Unest_Bodies): Removed.
51         (Unnest_Subprograms): Code cleanup.
53 2016-04-21  Arnaud Charlet  <charlet@adacore.com>
55         * set_targ.adb (Read_Target_Dependent_Values):
56         close target description file once its contents is read.
57         * s-os_lib.adb (Non_Blocking_Spawn, version with Stdout_File
58         and Stderr_File): Close local file descriptors before spawning
59         child process.
60         * exp_util.adb (Containing_Package_With_Ext_Axioms): Limit scope of
61         local variables to make the code easier to understand and avoid
62         duplicated calls to Parent and Generic_Parent.
64 2016-04-20  Bob Duff  <duff@adacore.com>
66         * s-os_lib.ads: Minor comment fix.
68 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
70         * exp_ch5.adb (Expand_N_Assignment_Statement): Do no generate
71         a discriminant check for a type whose partial view has unknown
72         discriminants when the full view has discriminants with defaults.
74 2016-04-20  Javier Miranda  <miranda@adacore.com>
76         * exp_util.adb (Remove_Side_Effects): When generating C code
77         remove side effect of type conversion of access to unconstrained
78         array type.
79         (Side_Effect_Free): Return false for the type
80         conversion of access to unconstrained array type when generating
81         C code.
82         * sem_res.adb (Resolved_Type_Conversion): Remove side effects
83         of access to unconstrained array type conversion when generating
84         C code.
86 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
88         * sem_ch13.adb (Build_Predicate_Function_Declaration): New
89         function, to construct the declaration of a predicate function
90         at the end of the current declarative part rather than at the
91         (possibly later) freeze point of the type. This also allows uses
92         of a type with predicates in instantiations elsewhere.
93         (Resolve_Aspect_Expression): New procedure to detect visiblity
94         errors in aspect expressions, at the end of the declarative part
95         that includes the type declaration.
96         * sem_ch3.adb (Complete_Private_Subtype): Propagate properly the
97         predicate function from private to full view.
98         * einfo.adb (Predicate_Function): Refine search for predicate
99         function when type has a full view and predicate function may
100         be defined on either view.
102 2016-04-20  Javier Miranda  <miranda@adacore.com>
104         * frontend.adb: Passing the root of the tree to
105         Unnest_Subprograms().
106         * exp_ch6.adb (Expand_N_Subprogram_Body): Remove code that
107         took care of adding subprograms to the Unest_Bodies table since
108         performing such action too early disables the ability to process
109         generic instantiations.
110         (Unnest_Subprograms): Adding parameter.
111         (Search_Unnesting_Subprograms): New subprogram.
112         * exp_ch6.ads (Unnest_Subrograms): Update documentation.
114 2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>
116         * exp_util.adb, freeze.adb, sem_util.adb: Minor reformatting.
118 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
120         * exp_unst.adb (Check_Static_Type): For a private type, check
121         full view.
123 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
125         * sem_attr.adb (Check_Type): Reject an attribute reference in
126         an aspect expression, when the prefix of the reference is the
127         current instance of the type to which the aspect applies.
129 2016-04-20  Bob Duff  <duff@adacore.com>
131         * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about
132         hiding unless we're actually hiding something. The previous
133         code would (for example) warn about a "<" on a record type
134         because it incorrectly thought it was hiding the "<" on Boolean
135         in Standard. We need to check that the homonym S is in fact a
136         homograph of a predefined operator.
138 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
140         * exp_util.ads, exp_util.adb (Build_Procedure_Form): Moved here
141         from exp_ch6.adb, for use in SPARK_To_C mode when creating the
142         procedure equivalent to a function returning an array, when this
143         construction is deferred to the freeze point of the function.
144         * sem_util.adb (Is_Unchecked_Conversion_Instance): Include a
145         function that renames an instance of Unchecked_Conversion.
146         * freeze.adb (Freeze_Subprogram): Generate the proper procedure
147         declaration for a function returning an array.
148         * exp_ch6.adb (Build_Procedure_Form): Moved to exp_util.
150 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
152         * sem_util.ads, sem_util.adb (Is_Expanded_Priority_Attribute):
153         New predicate to determine that in a context with full run-time,
154         a function call is an expansion of a reference to attribute
155         Priority.
156         * sem_ch5.adb (Analyze_Function_Call): use it.
157         * exp_ch5.adb (Expand_N_Subprogram_Call): use it.
159 2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>
161         * einfo.adb Flag286 is now used as Is_Exception_Handler.
162         (Is_Exception_Handler): New routine.
163         (Set_Is_Exception_Handler): New routine.
164         (Write_Entity_Flags): Output the status of Is_Exception_Handler.
165         * einfo.ads New attribute Is_Exception_Handler along with
166         occurrences in entities.
167         (Is_Exception_Handler): New routine along with pragma Inline.
168         (Set_Is_Exception_Handler): New routine along with pragma Inline.
169         * exp_ch7.adb (Make_Transient_Block): Ignore blocks generated
170         for exception handlers with a choice parameter.
171         * sem_ch11.adb (Analyze_Exception_Handlers): Mark the scope
172         generated for a choice parameter as an exception handler.
174 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
176         * sem_ch3.adb (Build_Derived_Access_Type): Remove dead code.
177         (Constrain_Discriminated_Type): In an instance, if the type has
178         unknown discriminants, use its full view.
179         (Process_Subtype): Check that the base type is private before
180         adding subtype to Private_Dependents list.
182 2016-04-20  Bob Duff  <duff@adacore.com>
184         * sem_ch13.adb: Minor comment fix.
186 2016-04-20  Yannick Moy  <moy@adacore.com>
188         * sem_ch4.adb: Fix typos in comments.
189         * sem_res.adb (Resolve_Case_Expression): Fix type of case alternatives.
191 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
193         * sem_ch4.adb (Analyze_Selected_Component): A reference to the
194         current instance of a task type is legal if the prefix is an
195         expression of that task type and the selector is an entry or
196         entry family.
198 2016-04-20  Arnaud Charlet  <charlet@adacore.com>
200         * a-cfdlli.ads (List): Type is no longer tagged, not needed. Move
201         varsize field at the end for efficiency.
203 2016-04-20  Vincent Celier  <celier@adacore.com>
205         * gnatcmd.adb: Do not invoke gprls when the invocation of "gnat
206         ls" includes the switch -V.
207         * clean.adb: "<target>-gnatclean -P" now calls "gprclean
208         --target=<target>"
209         * make.adb: "<target>-gnatmake -P" now calls "gprbuild
210         --target=<target>"
212 2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>
214         * sem_ch12.adb (Qualify_Type): Do not perform
215         partial qualification when the immediate scope is a generic unit.
217 2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>
219         * exp_unst.adb: Minor reformatting.
221 2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>
223         * exp_ch4.adb (Expand_Allocator_Expression): Ensure that the
224         tag assignment and adjustment preceed the accessibility check.
225         * exp_ch7.adb (Is_Subprogram_Call): Reimplemented.
227 2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>
229         * exp_prag.adb (Expand_Attributes): Ensure that
230         the temporary used to capture the value of attribute 'Old's
231         prefix is properly initialized.
233 2016-04-20  Javier Miranda  <miranda@adacore.com>
235         * exp_unst.ads, exp_unst.adb (Get_Level, Subp_Index): Moved to library
236         level.
238 2016-04-20  Arnaud Charlet  <charlet@adacore.com>
240         * sem_ch9.adb (Analyze_Task_Type_Declaration): Shut down warning
241         in codepeer mode.
243 2016-04-20  Vincent Celier  <celier@adacore.com>
245         * make.adb: Code cleanup.
247 2016-04-20  Arnaud Charlet  <charlet@adacore.com>
249         * exp_ch4.adb (Expand_Allocator_Expression): Help C code
250         generation.
252 2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>
254         * sem_ch12.adb (Copy_Generic_Node): Handle the special
255         qualification installed for universal literals that act as
256         operands in binary or unary operators.  (Qualify_Operand): Mark
257         the qualification to signal the instantiation mechanism how to
258         handle global reference propagation.
259         * sinfo.adb (Is_Qualified_Universal_Literal): New routine.
260         (Set_Is_Qualified_Universal_Literal): New routine.
261         * sinfo.ads New attribute Is_Qualified_Universal_Literal along
262         with occurrences in nodes.
263         (Is_Qualified_Universal_Literal):
264         New routine along with pragma Inline.
265         (Set_Is_Qualified_Universal_Literal): New routine along with
266         pragma Inline.
268 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
270         * sem.adb (Do_Analyze): Save and restore Style_Max_Line_Length
271         so that the corresponding checks are preserved across compilations
272         that include System.Constants in their context.
274 2016-04-20  Gary Dismukes  <dismukes@adacore.com>
276         * sem_type.adb: Minor typo fix and reformatting.
277         * a-conhel.ads: Update comment.
279 2016-04-20  Bob Duff  <duff@adacore.com>
281         * a-cihama.adb, a-cihase.adb, a-coinve.adb (Copy): Rewrite the
282         code so it doesn't trigger an "uninit var" warning.
284 2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>
286         * sem_attr.ads Add new table Universal_Type_Attribute.
287         * sem_util.adb (Yields_Universal_Type): Use a table lookup when
288         checking attributes.
290 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
292         * exp_aggr.adb (Init_Stored_Discriminants,
293         Init_Visible_Discriminants): New procedures, subsidiary of
294         Build_Record_Aggr_Code, to handle properly the construction
295         of aggregates for a derived type that constrains some parent
296         discriminants and renames others.
298 2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>
300         * sem_ch12.adb (Qualify_Universal_Operands): New routine.
301         (Save_References_In_Operator): Add explicit qualifications in
302         the generic template for all operands of universal type.
303         * sem_type.adb (Disambiguate): Update the call to Matches.
304         (Matches): Reimplemented.
305         * sem_util.ads, sem_util.adb (Yields_Universal_Type): New routine.
307 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
309         * sem_ch13.adb (Rep_Item_Too_Late): Better error message for
310         an illegal aspect that freezes the entity to which it applies.
312 2016-04-20  Bob Duff  <duff@adacore.com>
314         * a-stwibo.ads, a-stzbou.ads
315         ("="): Add overriding keyword before function to avoid crash when
316         compiler is called with -gnatyO (check overriding indicators).
318 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
320         * sem_prag.adb (Analyze_Pragma, case Check_Policy):  If this
321         is a configuration pragma and it uses the ARG syntax, insert
322         the rewritten pragma after the current one rather than using
323         Insert_Actions.
325 2016-04-20  Arnaud Charlet  <charlet@adacore.com>
327         * exp_aggr.adb (Backend_Processing_Possible): Add handling of
328         C back-end.
330 2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>
332         * s-imgllu.adb, sem_util.adb, s-imgint.adb, s-imguns.adb,
333         s-imglli.adb: Minor reformatting.
335 2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>
337         * sem_res.adb (Rewrite_Renamed_Operator): Do not rewrite the
338         renamed operator when the associated node appears within a
339         pre/postcondition.
340         * sem_util.ads, sem_util.adb (In_Pre_Post_Condition): New routine.
342 2016-04-20  Yannick Moy  <moy@adacore.com>
344         * osint.adb (Relocate_Path): Fix test when Path is shorter than Prefix.
345         * einfo.adb (Set_Overridden_Operation): Add assertion.
346         * sem_util.adb (Unique_Entity): for renaming-as-body return the spec
347         entity.
349 2016-04-20  Javier Miranda  <miranda@adacore.com>
351         * exp_unst.adb (Append_Unique_Call): New subprogram.
352         (Unnest_Subprogram): Replace the unique occurrence
353         of Call.Append() by Append_Unique_Call() which protects us from
354         adding to the Calls table duplicated entries.
356 2016-04-20  Arnaud Charlet  <charlet@adacore.com>
358         * exp_attr.adb (Is_GCC_Target): Fix for C backend.
359         * xref_lib.ads (Dependencies_Tables): instantiate
360         Table package with types that guarantee its safe use.
361         * s-imgllu.adb, s-imgint.adb, s-imguns.adb, s-imglli.adb: Avoid nested
362         procedures.
364 2016-04-20  Arnaud Charlet  <charlet@adacore.com>
366         * exp_attr.adb (Expand_N_Attribute_Reference [Attribute_Valid]):
367         Disable expansion when generating C code.
368         * sinfo.ads, inline.ads: Minor editing.
370 2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>
372         * sem_util.adb, contracts.adb, ghost.adb, exp_ch6.adb: Minor
373         reformatting.
375 2016-04-20  Javier Miranda  <miranda@adacore.com>
377         * contracts.adb (Build_Postconditions_Procedure): Code cleanup.
378         * ghost.adb (Os_OK_Ghost_Context.Is_OK_Declaration): Handle the
379         declaration of the internally built _postcondition procedure.
381 2016-04-20  Arnaud Charlet  <charlet@adacore.com>
383         * snames.ads-tmpl (Internal_Attribute_Id, Attribute_Class_Array): Fix
384         indentation.
385         * sem_util.adb (Is_Unchecked_Conversion_Instance):
386         defense against library-level renamings of other functions,
387         which are never instances of Unchecked_Conversion.
388         * einfo.ads: minor fix of casing in comment
390 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
392         * exp_ch6.adb (Expand_N_Subprogram_Stub): Do not expand a body
393         that has been analyzed and expanded already. Qualify the names
394         in the proper body for use in the generation of C code.
396 2016-04-20  Javier Miranda  <miranda@adacore.com>
398         * contracts.adb (Build_Postconditions_Procedure): Force its
399         inlining when generating C code.
400         * sem_attr.adb (Analyze_Attribute_Old_Result): Handle inlined
401         _postconditions when generating C code.
402         * exp_ch6.adb (Inlined_Subprogram): Inline calls to
403         _postconditions when generating C code.
404         * sinfo.ads, sinfo.adb (Corresponding_Spec, Set_Corresponding_Spec):
405         types of return value and argument changed from Node_Id to
406         Entity_Id.
408 2016-04-20  Vincent Celier  <celier@adacore.com>
410         * make.adb, clean.adb, gnatname.adb: Revert previous change for now.
412 2016-04-20  Eric Botcazou  <ebotcazou@adacore.com>
414         * sem_ch12.adb (Analyze_Instance_And_Renamings): Do not reset
415         the Has_Delayed_Freeze flag on the anonymous instance node.
417 2016-04-20  Javier Miranda  <miranda@adacore.com>
419         * sem_ch5.adb (Analyze_Iterator_Specification): Remove transient
420         scope associated with the renaming object declaration.
421         * exp_util.adb (Insert_Actions): Remove handling of iterator
422         loop marked as requiring the secondary stack.
424 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
426         * sem_attr.adb (Analyze_Attribute, case 'Image): Implement
427         AI12-0124, which extends the functionality of the attribute so it
428         reflects the semantics of GNAT 'Img when applied to scalar types.
429         * lib-xref.adb: minor whitespace layout fix.
431 2016-04-20  Vincent Celier  <celier@adacore.com>
433         * clean.adb (Gnatclean): Fail if project file specified and
434         gprclean is not available.
435         * gnatname.adb: Fail is -P is used and gprname is not available.
436         * make.adb (Initialize): Fail if project file specified and
437         gprbuild is not available.
439 2016-04-20  Bob Duff  <duff@adacore.com>
441         * sem_ch5.adb (Analyze_Iterator_Specification): Do not use secondary
442         stack when possible.
444 2016-04-20  Gary Dismukes  <dismukes@adacore.com>
446         * par_sco.adb, sem_util.adb, sem_ch13.adb: Minor typo corrections and
447         reformatting.
449 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
451         * sem_prag.adb (Analyze_Pragma, case Default_Storage_Pool):
452         If the pragma comes from an aspect specification, verify that
453         the aspect applies to an entity with a declarative part.
454         * exp_ch5.adb: Code cleanup.
456 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
458         * sem_res.adb (Resolve_If_Expression): If first expression is
459         universal, resolve subsequent ones with the corresponding class
460         type (Any_Integer or Any_Real).
462 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
464         * sem_ch5.adb (Analyze_Iterator_Specification): If expansion is
465         disabled, complete the analysis of the iterator name to ensure
466         that reference for entities within are properly generated.
468 2016-04-20  Arnaud Charlet  <charlet@adacore.com>
470         * a-dispat.ads (Yield): add Global contract.
471         * a-calend.ads, a-reatim.ads: Added Initializes => Clock_Time.
472         * a-taside.adb: Added Initializes => Tasking_State.
474 2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>
476         * sem_ch13.adb (Build_Invariant_Procedure):
477         Reimplement the invariant procedure spec and body insertion.
479 2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>
481         * sem_ch13.adb (Add_Invariant): Do not replace
482         the saved expression of an invariatn aspect when inheriting
483         a class-wide type invariant as this clobbers the existing
484         expression. Do not use New_Copy_List as it is unnecessary
485         and leaves the parent pointers referencing the wrong part of
486         the tree. Do not replace the type references for ASIS when
487         inheriting a class-wide type invariant as this clobbers the
488         existing replacement.
490 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
492         * sem_util.adb (Build_Explicit_Dereference): If the designated
493         expression is an entity name, generate reference to the entity
494         because it will not be resolved again.
496 2016-04-19  Arnaud Charlet  <charlet@adacore.com>
498         * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
499         gnat_rm.texi: Update documentation.
501 2016-04-19  Olivier Hainque  <hainque@adacore.com>
503         * par_sco.adb (Traverse_One, case N_Case_Statement):
504         Skip pragmas before the first alternative.
505         (Traverse_Handled_Statement_Sequence, Exception_Handlers): Likewise.
507 2016-04-19  Tristan Gingold  <gingold@adacore.com>
509         * adaint.c (__gnat_lwp_self): New function (for darwin).
510         * s-osinte-darwin.ads, s-osinte-darwin.adb (lwp_self): Import
511         of __gnat_lwp_self.
513 2016-04-19  Olivier Hainque  <hainque@adacore.com>
515         * sem_util.adb (Build_Elaboration_Entity): Always request an
516         elab counter when preserving control-flow.
518 2016-04-19  Olivier Hainque  <hainque@adacore.com>
520         * sem_ch13.adb (Build_Invariant_Procedure_Declaration): Set
521         Needs_Debug_Info when producing SCOs.
522         * par_sco.adb (Traverse_Aspects): Fix categorization of
523         Type_Invariant to match actual processing as activated depending
524         on pragma Assertion_Policy.
525         * sem_prag.adb (Analyze_Pragma): Remove special case for
526         Name_Invariant regarding SCO generation, which completely disabled
527         the production of SCOs for Invariant pragmas and aspects.
529 2016-04-19  Hristian Kirtchev  <kirtchev@adacore.com>
531         * checks.adb, sem_util.adb, sem_res.adb, sem_attr.adb: Minor
532         reformatting.
534 2016-04-19  Ed Schonberg  <schonberg@adacore.com>
536         * freeze.adb (Freeze_Profile): Refine predicate that checks
537         whether a function that returns a limited view is declared in
538         another unit and cannot be frozen at this point.
540 2016-04-19  Ed Schonberg  <schonberg@adacore.com>
542         * exp_aggr.adb (Component_Count): Handle properly superflat
543         arrays, i.e. empty arrays where Hi < Lo - 1, to ensure that the
544         return value of the function is Natural, rather than leaving
545         the handling of such arrays to the caller of this function.
547 2016-04-19  Arnaud Charlet  <charlet@adacore.com>
549         * sem_prag.adb, sem_attr.adb, par-prag.adb, exp_aggr.adb, sem_type.adb
550         sem_ch12.adb, sem_ch3.adb, exp_ch7.adb, exp_ch9.adb: Code cleanup.
551         * sem_res.adb, sem_util.ads, sem_util.adb (Is_OK_Volatile_Context):
552         Promoted from being a nested subprogram in Sem_Res.Resolve_Entity_Name
553         to publicly visible routine in Sem_Util.
555 2016-04-19  Ed Schonberg  <schonberg@adacore.com>
557         * checks.adb (Apply_Parameter_Aliasing_Checks): Do not apply
558         the check if the type of the actual is By_Reference.
560 2016-04-19  Arnaud Charlet  <charlet@adacore.com>
562         * sem_res.adb (Within_Subprogram_Call): Detect
563         also nodes that appear in entry calls.
564         (Resolve_Actuals, Insert_Default): Propagate
565         dimension information if any, from default expression to the
566         copy that appears in the list of actuals.
567         * uintp.ads: minor whitespace fix in comment.
568         * sem_prag.adb, stringt.adb, inline.adb, lib-xref-spark_specific.adb:
569         Minor code cleanup.
570         * set_targ.adb (Set_Targ): convert directly from
571         Natural to Pos, without intermediate conversion to Int.
573 2016-04-19  Arnaud Charlet  <charlet@adacore.com>
575         * sem_ch6.adb (Process_Formals): Mark suspicious reference to
576         SPARK RM in comment.
577         * sem_prag.adb (Analyze_Global_Item): Fix reference to SPARK RM
578         in comment.
579         * sem_res.adb (Property_Error, Resolve_Actuals): Fix reference
580         to SPARK RM in both comment and error message.
582 2016-04-19  Eric Botcazou  <ebotcazou@adacore.com>
584         * sem_ch6.adb (Possible_Freeze): If the type is an incomplete
585         CW type, then the subprogram must have a delayed freeze. This
586         ensures that the backend can properly recover the full view when
587         elaborating the access subprogram declaration.
589 2016-04-19  Ed Schonberg  <schonberg@adacore.com>
591         * sem_attr.adb (Resolve_Attribute, case 'Access): Freeze
592         overloadable entity if originally overloaded.
594 2016-04-19  Arnaud Charlet  <charlet@adacore.com>
596         * exp_aggr.adb, exp_ch3.adb, exp_ch7.adb, exp_ch9.adb, exp_code.adb,
597         exp_fixd.adb, namet.adb, osint.adb, osint.ads, par-ch2.adb,
598         sem_ch10.adb, sem_ch12.adb, sem_disp.adb, sem_elab.adb, sem_elim.adb
599         sem_util.adb, styleg.adb, styleg.ads, stylesw.ads: Minor code
600         clean up.
602 2016-04-19  Arnaud Charlet  <charlet@adacore.com>
604         * sem_util.adb (Copy_Node_With_Replacement):
605         use Set_Comes_From_Source instead of directly manipulating
606         internals of the node table.
607         * sem_util.adb (Within_Scope): refactored to remove duplicated code.
608         * sem_aux.adb (Get_Rep_Pragma,
609         Subprogram_Body_Entity, Subprogram_Spec): declare variables that
610         do not change as constants and initialize them in the declaration.
611         (Get_Rep_Pragma, Subprogram_Body_Entity, Subprogram_Spec): declare
612         variables that do not change as constants and initialize them
613         in the declaration.
615 2016-04-19  Ed Schonberg  <schonberg@adacore.com>
617         * sem_res.adb (Resolve_Entry_Call): If the entry has
618         preconditions it is rewritten by means of a wrapper that
619         incorporates the original call. Before rewriting generate a
620         reference to the entry being called to prevent spurious warnings
621         and provide correct cross-reference information.
623 2016-04-19  Hristian Kirtchev  <kirtchev@adacore.com>
625         * sem_disp.adb (Check_Dispatching_Context): Code cleanup. Add
626         local constant Scop. Ignore any internally generated loops when
627         performing the check concerning an abstract subprogram call
628         without a controlling argument.
629         * sem_util.ads, sem_util.adb (Current_Scope_No_Loops): New routine.
631 2016-04-19  Bob Duff  <duff@adacore.com>
633         * sem_elab.adb (Check_A_Call): There are cases where we have No
634         (Ent) after the Alias loop, even when there was no previous error,
635         so we can't assert that there was an error.
637 2016-04-19  Ed Schonberg  <schonberg@adacore.com>
639         * sem_attr.adb (Analyze_Access_Attribute, OK_Self_Reference):
640         Reject use of type name as a prefix to 'access within an aggregate
641         in a context that is not the declarative region of a type.
643 2016-04-19  Vincent Celier  <celier@adacore.com>
645         * gnatcmd.adb: Make "gnat ls -P" invoke gprls Make "gnat bind
646         -P" invoke "gprbuild -b" Make "gnat link -P" invoke "gprbuild
647         -l" Fail if the invocation is "gnat find -P" or "gnat xref -P"
648         Remove anything related to project files
649         * g-mbdira.adb: minor whitespace cleanup
650         * g-spipat.adb: minor removal of extra spaces after closing paren
652 2016-04-19  Ed Schonberg  <schonberg@adacore.com>
654         * exp_ch6.adb (Expand_Actuals):  If post-statements are present
655         and the enclosing context is a function call or indexing, build
656         an Expression_With_Actions for the call.
658 2016-04-19  Hristian Kirtchev  <kirtchev@adacore.com>
660         * lib-writ.adb (Write_With_Lines): Code cleanup. Do not generate
661         a with line for an ignored Ghost unit.
662         * sem_ch7.adb (Analyze_Package_Declaration): Add local constant
663         Par. A child package is Ghost when its parent is Ghost.
664         * sem_prag.adb (Analyze_Pragma): Pragma Ghost can now apply to
665         a subprogram declaration that acts as a compilation unit.
667 2016-04-18  Michael Matz  <matz@suse.de>
669         * gcc-interface/decl.c (gnat_to_gnu_entity): Use SET_TYPE_ALIGN.
670         (gnat_to_gnu_field): Ditto.
671         (components_to_record): Ditto.
672         (create_variant_part_from): Ditto.
673         (copy_and_substitute_in_size): Ditto.
674         (substitute_in_type): Ditto.
675         * gcc-interface/utils.c (make_aligning_type): Use SET_TYPE_ALIGN.
676         (make_packable_type): Ditto.
677         (maybe_pad_type): Ditto.
678         (finish_fat_pointer_type): Ditto.
679         (finish_record_type): Ditto and use SET_DECL_ALIGN.
680         (rest_of_record_type_compilation): Use SET_TYPE_ALIGN.
681         (create_field_decl): Use SET_DECL_ALIGN.
683 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
685         * einfo.adb (Overridden_Operation): assert that
686         function is called for valid arguments.
687         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, sem_type.adb,
688         s-osinte-vxworks.ads, a-ngcefu.adb, sem_ch10.adb, einfo.ads,
689         sem_prag.adb, sem_ch12.adb, sem.adb, i-cobol.ads, freeze.adb,
690         sem_util.adb, a-chtgop.ads, s-rannum.adb, exp_ch6.adb, s-bignum.adb,
691         s-osinte-freebsd.ads, par-ch5.adb, a-chtgbo.ads, a-cofove.adb:
692         No space after closing parenthesis except where required for
693         layout.
694         * sem_res.adb: Minor reformatting.
696 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
698         * exp_ch4.adb (Expand_N_Case_Expression): Convert into a case
699         statement when relevant.
701 2016-04-18  Bob Duff  <duff@adacore.com>
703         * a-cuprqu.adb (Enqueue): Properly handle the
704         case where the new element has a unique priority.
706 2016-04-18  Tristan Gingold  <gingold@adacore.com>
708         * adaint.h: Define stat structures and functions for iOS
709         simulator.
711 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
713         * sem_res.adb (Resolve_Entry_Call): reset
714         Is_Overloaded flag after resolving calls to overloaded protected
715         operations.
716         * exp_spark.adb (Expand_SPARK): call
717         Qualify_Entity_Names for tasking nodes, i.e. protected types,
718         task types and entries.
719         * exp_ch4.adb (Expand_N_If_Expression): Refine previous change
720         in case of an unconstrained type.
722 2016-04-18  Yannick Moy  <moy@adacore.com>
724         * sem_eval.adb, sem_eval.ads (Check_Non_Static_Context): Add
725         comment to document usage of subprogram in GNATprove.
727 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
729         * sem_prag.adb (Analyze_Pragma, case Test_Case): Improve error
730         message for wrong placement of aspect Test_Case.
732 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
734         * einfo.ads: Update the documentation of attribute Renamed_Object.
735         * exp_spark.adb (Expand_Potential_Renaming): Reimplemented.
737 2016-04-18  Gary Dismukes  <dismukes@adacore.com>
739         * exp_ch4.adb (Optimize_Length_Comparison): Return immediately
740         in the case of AAMP (same as for use of the -gnatd.P switch) to
741         suppress this optimization, which avoids creating a dependence
742         on the 64-bit arithmetic package.
744 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
746         * exp_ch4.adb: Update comment.
748 2016-04-18  Eric Botcazou  <ebotcazou@adacore.com>
750         * exp_ch6.adb (Expand_Call): Make sure instantiations are
751         registered only once as pending here.
753 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
755         * exp_ch4.adb, gnat1drv.adb, opt.ads, sem_res.adb
756         (Minimize_Expression_With_Actions): New flag.
757         (Adjust_Global_Switches): Set Minimize_Expression_With_Actions
758         when generating C.
759         (Resolve_Short_Circuit): Redo previous change
760         using Minimize_Expression_With_Actions.
761         (Expand_N_If_Expression,
762         Expand_Short_Circuit_Operator): Restore old code to avoid
763         Expression_With_Actions when Minimize_Expression_With_Actions
764         is set.
766 2016-04-18  Vincent Celier  <celier@adacore.com>
768         * s-os_lib.adb (Non_Blocking_Spawn, version with Stdout_File and
769         Stderr_File): Close local file descriptors when no longer needed.
771 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
773         * sem_ch5.adb (Analyze_Iterator_Specification): Remove SPARK
774         mode check that the type of the cursor in an iteration over
775         a formal container is not volatile. The proper check on the
776         element type is done elsewhere.
778 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
780         * sem_ch6.adb (Process_Formals): Do not set a delay freeze on
781         a subprogram that returns a class-wide type, if the subprogram
782         is a compilation unit, because otherwise gigi will treat the
783         subprogram as external, leading to link errors.
785 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
787         * sem_res.adb (Resolve_Short_Circuit): Do not use
788         expression-with-actions when generating C.
790 2016-04-18  Yannick Moy  <moy@adacore.com>
792         * sem_util.adb (Apply_Compile_Time_Constraint_Error): Do not generate
793         raise node in GNATprove mode.
795 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
797         * s-fileio.adb: Minor reformatting.
798         * sem_prag.adb (Analyze_Input_Item): Add local
799         variable Input_OK. Do not consider mappings of generic formal
800         parameters to actuals.
802 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
804         * sem_ch5.adb (Get_Cursor_Type): If iterator type is a derived
805         type, the cursor is declared in the scope of the parent type.
806         (Analyze_Parameter_Specification): A qualified expression with an
807         iterator type indicates an iteration over a container (explicit
808         or implicit).
810 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
812         * osint-c.ads, osint-c.adb (Delete_C_File, Delete_H_File): New.
813         * gnat1drv.adb (Gnat1drv): Delete old C files before regenerating them.
814         * debug.adb: Reserve -gnatd.4 to force generation of C files.
816 2016-04-18  Yannick Moy  <moy@adacore.com>
818         * sem_eval.adb (Eval_Arithmetic_Op): Do not issue error on static
819         division by zero, instead possibly issue a warning.
820         * sem_res.adb (Resolve_Arithmetic_Op): Do not issue error on
821         static division by zero, instead add check flag on original
822         expression.
823         * sem_util.adb, sem_util.ads (Compile_Time_Constraint_Error):
824         Only issue error when both SPARK_Mode is On and Warn is False.
826 2016-04-18  Yannick Moy  <moy@adacore.com>
828         * checks.adb (Apply_Scalar_Range_Check): Force
829         warning instead of error when SPARK_Mode is On, on index out of
830         bounds, and set check flag for GNATprove.
832 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
834         * sem_prag.adb (Check_In_Out_States.Check_Constituent_Usage):
835         Update the comment on usage.  Reimplemented.
836         (Check_Input_States.Check_Constituent_Usage): Update the comment
837         on usage. A Proof_In constituent can now refine an Input state
838         as long as there is at least one Input constituent present.
840 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
842         * sem_ch6.adb (Check_Inline_Pragma): Use the Sloc of the
843         body id as the sloc of the entity in the generated subprogram
844         declaration, to avoid spurious conformance errors when style
845         checks are enabled.
847 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
849         * sem_ch4.adb (Analyze_Selected_Component, Has_Dereference):
850         Refine check on illegal calls to entities within a task body,
851         when the entity is declared in an object of the same type. In
852         a generic context there might be no explicit dereference but if
853         the prefix includes an access type the construct is legal.
855 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
857         * rtsfind.ads, rtsfind.adb (RE_Id, RE_Unit_Table): add
858         RE_Default_Priority.
860 2016-04-18  Bob Duff  <duff@adacore.com>
862         * sem_prag.adb (Check_Arg_Is_Local_Name): Don't do the check
863         if the pragma came from an aspect specification.
865 2016-04-18  Gary Dismukes  <dismukes@adacore.com>
867         * gnat1drv.adb, contracts.adb: Minor reformatting and wording fixes.
869 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
871         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): To suppress
872         superfluous conformance check on an inlined body with a previous
873         spec, use the fact that the generated declaration does not come
874         from source. We must treat the entity as coming from source to
875         enable some back-end inlining when pragma appears after the body.
877 2016-04-18  Gary Dismukes  <dismukes@adacore.com>
879         * lib-xref-spark_specific.adb, par-ch2.adb, errout.ads,
880         exp_intr.adb: Minor reformatting and typo corrections.
882 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
884         * sem_ch6.adb: Code cleanup.
886 2016-04-18  Thomas Quinot  <quinot@adacore.com>
888         * sem_ch13.adb: Minor reformatting and error message tweaking
889         (remove extraneous spaces).
891 2016-04-18  Johannes Kanig  <kanig@adacore.com>
893         * gnat1drv.adb (Gnat1drv): Force loading of System unit for SPARK.
895 2016-04-18  Bob Duff  <duff@adacore.com>
897         * s-fileio.adb (Fopen_Mode): If Mode = Out_File, and the file
898         exists, and it's a fifo, we use "w" as the open string instead of
899         "r+". This is necessary to make a write to the fifo block until
900         a reader is ready.
902 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
904         * sem_attr.adb (Denote_Same_Function): Account
905         for a special case where a primitive of a tagged type inherits
906         a class-wide postcondition from a parent type.
908 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
910         * par-ch2.adb (P_Expression_Or_Reserved_Word): New routine.
911         (P_Pragma): Signal Scan_Pragma_Argument_Association when the use
912         of reserved words is OK.
913         (Scan_Pragma_Argument_Association):
914         Add new formal Reserved_Words_OK and update the comment on
915         usage. Code cleanup. Parse an expression or a reserved word in
916         identifier form for pragmas Restriction_Warnings and Restrictions
917         No_Use_Of_Attribute.
918         * restrict.adb (Check_Restriction_No_Use_Of_Attribute):
919         Reimplemented.  (Check_Restriction_No_Use_Of_Pragma): Code cleanup.
920         (Set_Restriction_No_Specification_Of_Aspect): Properly set the warning
921         flag for an aspect.
922         (Set_Restriction_No_Use_Of_Attribute): Properly set the warning
923         flag for an attribute.  (Set_Restriction_No_Use_Of_Entity):
924         Update the parameter profile.
925         (Set_Restriction_No_Use_Of_Pragma): Properly set the warning flag for
926         a pragma.
927         * restrict.ads (Check_Restriction_No_Use_Of_Attribute): Update
928         the comment on usage.
929         (Set_Restriction_No_Use_Of_Entity): Update the parameter profile.
930         * sem_attr.adb (Analyze_Attribute): Check restriction
931         No_Use_Of_Attribute.
932         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Check
933         restriction No_Use_Of_Attribute before any rewritings have
934         taken place.
935         * sem_prag.adb (Analyze_Pragma): Check restriction
936         No_Use_Of_Pragma before any rewritings have taken place.
938 2016-04-18  Bob Duff  <duff@adacore.com>
940         * sem_ch6.adb (Is_Inline_Pragma): The pragma
941         argument can be a selected component, which has no Chars field,
942         so we need to deal with that case (use the Selector_Name).
943         (Check_Inline_Pragma): We need to test Is_List_Member before
944         calling In_Same_List, because in case of a library unit, they're
945         not in lists, so In_Same_List fails an assertion.
947 2016-04-18  Bob Duff  <duff@adacore.com>
949         * namet.ads, namet.adb: Add an Append that appends a
950         Bounded_String onto a Bounded_String. Probably a little more
951         efficient than "Append(X, +Y);". Also minor cleanup.
952         (Append_Decoded, Append_Decoded_With_Brackets, Append_Unqualified,
953         Append_Unqualified_Decoded): Make sure these work with non-empty
954         buffers.
955         * casing.ads, casing.adb (Set_Casing): Pass a Bounded_String
956         parameter, defaulting to Global_Name_Buffer.
957         * errout.ads, errout.adb (Adjust_Name_Case): Pass a
958         Bounded_String parameter, no default.
959         * exp_ch11.adb (Expand_N_Raise_Statement): Use local
960         Bounded_String instead of Global_Name_Buffer.
961         * exp_intr.ads, exp_intr.adb (Write_Entity_Name): Rename it
962         to Append_Entity_Name, and pass a Bounded_String parameter,
963         instead of using globals.
964         (Add_Source_Info): Pass a Bounded_String parameter, instead of
965         using globals.
966         (Expand_Source_Info): Use local instead of globals.
967         * stringt.ads, stringt.adb (Append): Add an Append procedure
968         for appending a String_Id onto a Bounded_String.
969         (String_To_Name_Buffer, Add_String_To_Name_Buffer): Rewrite in
970         terms of Append.
971         * sem_prag.adb (Set_Error_Msg_To_Profile_Name): Adjust for new
972         Adjust_Name_Case parameter.
973         * erroutc.adb, uname.adb: Don't pass D => Mixed_Case to
974         Set_Casing; that's the default.
975         * lib-xref-spark_specific.adb (Add_SPARK_Scope): Pretend that calls to
976         protected subprograms are entry calls; otherwise it is not possible to
977         distinguish them from regular subprogram calls.
979 2016-04-18  Gary Dismukes  <dismukes@adacore.com>
981         * sem_ch13.adb (Has_Good_Profile): Improvement
982         of error message. Now indicates subtype_mark of formal parameter
983         rather than the formal's name, plus minor rewording.
985 2016-04-18  Pascal Obry  <obry@adacore.com>
987         * adaint.c, adaint.h, s-os_lib.ads: Add new routine Current_Process_Id.
989 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
991         * stringt.adb, exp_ch6.adb, sem_ch13.adb: Minor reformatting.
993 2016-04-18  Gary Dismukes  <dismukes@adacore.com>
995         * par-ch4.adb, sem_prag.adb: Minor reformatting.
997 2016-04-18  Bob Duff  <duff@adacore.com>
999         * sinput.ads, sinput.adb (Build_Location_String): Take a
1000         parameter instead of using a global variable.  The function
1001         version no longer destroys the Name_Buffer.
1002         * stringt.ads, stringt.adb (String_From_Name_Buffer): Take a
1003         parameter, which defaults to the Global_Name_Buffer, so some
1004         calls can avoid the global.
1005         * exp_ch11.adb, exp_intr.adb: Use new interfaces above
1006         to avoid using globals. All but one call to Build_Location_String
1007         avoids the global. Only one call to String_From_Name_Buffer
1008         avoids it.
1010 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
1012         * namet.adb, namet.ads, exp_unst.adb: Minor reformatting.
1014 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
1016         * sem_eval.adb (Choice_Matches): Check the expression
1017         against the predicate values when the choice denotes a
1018         subtype with a static predicate.
1019         (Eval_Membership_Op): Code cleanup. Remove the suspicious guard which
1020         tests for predicates.
1021         (Is_OK_Static_Subtype): A subtype with a dynamic predicate
1022         is not static.  (Is_Static_Subtype): A subtype with a dynamic
1023         predicate is not static.
1024         * sem_eval.ads (Is_OK_Static_Subtype): Update the comment on usage.
1025         (Is_Static_Subtype): Update the comment on usage.
1027 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
1029         * sem_prag.adb (Analyze_Input_Item): Allow
1030         generic formals to appear as initialization items.
1032 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
1034         * sem_ch13.adb (Analyze_Stream_TSS_Definition,
1035         Has_Good_Profile): Additional error message to indicate that
1036         the second parameter of the subprogram must be a first subtype.
1038 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
1040         * sem_ch6.adb (Analyze_Subprogram_Body_Helper, Is_Inline_Pragma):
1041         Use the pragma lookahead that determines whether a subprogram
1042         is to be inlined, when some level of backend optimization is
1043         required.
1044         * sem_ch12.ads, sem_ch12.adb (Add_Pending_Instantiation): Factorize
1045         code used to create an instance body when needed for inlining.
1046         * exp_ch6.adb (Expand_Call): When a call is to be inlined, and the
1047         call appears within an instantiation that is not a compilation
1048         unit, add a pending instantiation for the enclosing instance,
1049         so the backend can inline in turn the calls contained in the
1050         inlined body.
1052 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
1054         * sem_prag.adb (Build_Pragma_Check_Equivalent): The mapping
1055         that relates operations of the parent type to the operations of
1056         the derived type has three distinct sources:
1057         a) explicit operations of the derived type carry an
1058         Overridden_Operation that designates the operation in the
1059         ancestor.
1060         b) Implicit operations that are inherited by the derived type
1061         carry an alias that may be an explicit subprogram (in which case
1062         it may have an Overridden_ Operation indicator) or may also be
1063         inherited and carry its own alias.
1064         c) If the parent type is an interface, the operation of the
1065         derived type does not override, but the interface operation
1066         indicates the operation that implements it.
1067         * sem_prag.adb: Minor reformatting.
1068         * sem_prag.adb (Check_External_Property): Update
1069         the comment on usage. Reimplement.
1071 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
1073         * exp_ch5.adb (Expand_Assignment_Statement): In restricted
1074         profiles such as ZFP, ceiling priority is not available.
1076 2016-04-18  Bob Duff  <duff@adacore.com>
1078         * namet-sp.ads: Minor typo fix, ironically in 'Spelling_Checker'.
1080 2016-04-18  Bob Duff  <duff@adacore.com>
1082         * sem_elab.adb (Output_Calls): Use
1083         Get_Name_String, to clearly indicate that the global Name_Buffer
1084         is being used. The previous code used Is_Internal_Name, which
1085         returns a Boolean, but also has a side effect of setting the
1086         Name_Buffer. Then it called the other Is_Internal_Name, which uses
1087         the Name_Buffer for its input. And then it called Error_Msg_N,
1088         again using the Name_Buffer. We haven't eliminated the global
1089         usage here, but we've made it a bit clearer.
1090         This also allows us to have a side-effect-free version of
1091         Is_Internal_Name.
1092         * namet.ads, namet.adb: Provide a type Bounded_String, along with
1093         routines that can be used without using global variables. Provide
1094         Global_Name_Buffer so existing code can continue to use the
1095         global. Mark the routines that use globals as obsolete.  New code
1096         shouldn't call the obsolete ones, and we should clean up existing
1097         code from time to time.
1098         Name_Find_Str is renamed as Name_Find.
1099         * namet.h: Changed as necessary to interface to the new version
1100         of Namet.
1101         * bindgen.adb, exp_unst.adb: Name_Find_Str is renamed as
1102         Name_Find.
1104 2016-04-18  Yannick Moy  <moy@adacore.com>
1106         * sem_util.adb, sem_util.ads (Has_Full_Default_Initialization): used
1107         outside of GNATprove, hence it should not be removed.
1109 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
1111         * sem_prag.adb (Analyze_Refinement_Clause):
1112         The refinement of an external abstract state can now mention
1113         non-external constituents.
1114         (Check_External_Property): Update all SPARK RM references.
1116 2016-04-18  Bob Duff  <duff@adacore.com>
1118         * exp_intr.adb: Remove some duplicated code.
1120 2016-04-18  Yannick Moy  <moy@adacore.com>
1122         * a-nudira.adb, a-nudira.ads, a-nuflra.adb, a-nuflra.ads: Mark
1123         package spec and body out of SPARK.
1125 2016-04-18  Johannes Kanig  <kanig@adacore.com>
1127         * spark_xrefs.ads: Minor comment update.
1129 2016-04-18  Johannes Kanig  <kanig@adacore.com>
1131         * gnat1drv.adb (Gnat1drv): Force loading of System
1132         unit for SPARK.
1134 2016-04-18  Bob Duff  <duff@adacore.com>
1136         * a-cuprqu.adb: Correction to previous change. If a new node
1137         is inserted at the front of the queue (because it is higher
1138         priority than the previous front node), we need to update
1139         Header.Next_Unequal -- not just in the case where the queue was
1140         previously empty.
1142 2016-04-18  Bob Duff  <duff@adacore.com>
1144         * a-cuprqu.ads: Change the representation of List_Type from a
1145         singly-linked list to a doubly-linked list. In addition, add a
1146         pointer Next_Unequal, which points past a possibly-long chain
1147         of equal-priority items. This increases efficiency, especially
1148         in the case of many equal-priority items.
1149         * a-cuprqu.adb (Dequeue, Enqueue): Rewrite algorithms to take
1150         advantage of new data structure.
1151         (Finalize): Rewrite in terms of Dequeue, for simplicity.
1153 2016-04-18  Yannick Moy  <moy@adacore.com>
1155         * contracts.adb (Analyze_Object_Contract,
1156         Analyze_Protected_Contract): Remove tests performed in GNATprove.
1157         * sem_util.adb, sem_util.ads (Has_Full_Default_Initialization):
1158         Remove query for tests performed in GNATprove.
1160 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
1162         * sem_aggr.adb (Resolve_Record_Aggregate): If
1163         Warn_On_Redundant_Constructs is enabled, report a redundant box
1164         association that does not cover any components, as it done for
1165         redundant others associations in case statements.
1167 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
1169         * sem_prag.adb (Collect_Inherited_Class_Wide_Conditions):
1170         Analyze the generated Check pragma for an inherited condition so
1171         that it does not freeze the dispatching type of the primitive
1172         operation, because it is pre-analyzed at the point of the
1173         subprogram declaration (and not in the subprogram body, as is
1174         done during regular expansion).
1176 2016-04-18  Vincent Celier  <celier@adacore.com>
1178         * ali.ads: Increase the range of all _Id types to 100 millions.
1180 2016-04-18  Gary Dismukes  <dismukes@adacore.com>
1182         * sem_warn.adb (Check_References): Change warning to suggest
1183         using pragma Export rather than saying "volatile has no effect".
1185 2016-04-18  Bob Duff  <duff@adacore.com>
1187         * g-souinf.ads (Compilation_ISO_Date): New function to return
1188         the current date in ISO form.
1189         * exp_intr.adb (Expand_Source_Info, Add_Source_Info): Expand
1190         a call to Compilation_ISO_Date into a string literal containing
1191         the current date in ISO form.
1192         * exp_intr.ads (Add_Source_Info): Improve documentation.
1193         * sem_intr.adb (Check_Intrinsic_Subprogram): Recognize
1194         Compilation_ISO_Date.
1195         * snames.ads-tmpl (Name_Compilation_ISO_Date): New Name_Id.
1197 2016-04-18  Eric Botcazou  <ebotcazou@adacore.com>
1199         * layout.adb (Set_Elem_Alignment): Extend setting of alignment
1200         to subtypes that are not first subtypes.
1202 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
1204         * sem_prag.ads (Collect_Inherited_Class_Wide_Conditions):
1205         Simplify interface.
1206         * sem_prag.adb (Collect_Inherited_Class_Wide_Conditions): Insert
1207         generated pragmas after subprogram declaration, rather than in
1208         the corresponding subprogram body.
1209         * sem_ch6.adb (New_Overloaded_Entity): In GNATProve
1210         mode, if the operation is overridding, call
1211         Collect_Inherited_Class_Wide_Conditions to generate the
1212         corresponding pragmas immediately after the corresponding
1213         subprogram declaration.
1215 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
1217         * spark_xrefs.ads (Xref_Index, Scope_Index, File_Index): restrict
1218         type to natural numbers.
1219         (Stype): document code characters for concurrent entities.
1221 2016-04-18  Olivier Hainque  <hainque@adacore.com>
1223         * targparm.ads: Update the Frontend_Exceptions default internal
1224         value.
1225         (Frontend_Exceptions_On_Target): Change default value to True.
1227 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
1229         * sem_ch4.adb (Analyze_Selected_Component): Refine error
1230         detection when a selected component in the body of a synchronized
1231         type is a reference to an object of the same type declared
1232         elsewhere. The construct is legal if the prefix of the selected
1233         component includes an explicit dereference at any point.
1235 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
1237         * sem_ch3.adb (Analyze_Object_Declaration): Do not consider
1238         internally generated expressions when trying to determine whether
1239         a formal parameter of a tagged type subject to Extensions_Visible
1240         False is used to initialize an object.
1241         * sem_ch4.adb (Analyze_Type_Conversion): Do not consider
1242         internally generated expressions when trying to determine whether
1243         a formal parameter of a tagged type subject to Extensions_Visible
1244         False is used in a type conversion.
1246 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
1248         * sem_res.adb (Is_Protected_Operation_Call):
1249         Add guards to account for a non-decorated selected component.
1251 2016-04-18  Yannick Moy  <moy@adacore.com>
1253         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Improve
1254         implementation of Body_Has_SPARK_Mode_On.
1255         * sem_prag.adb, sem_prag.ads (Get_SPARK_Mode_From_Annotation):
1256         New function replacing previous Get_SPARK_Mode_From_Pragma, that
1257         deals also with aspects.
1258         (Get_SPARK_Mode_Type): Make function internal again.
1259         * inline.adb, sem_ch7.adb, sem_util.adb: Use new
1260         Get_SPARK_Mode_From_Annotation.
1262 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
1264         * contracts.adb (Analyze_Object_Contract): Update references to
1265         SPARK RM.
1266         * freeze.adb (Freeze_Entity): Update references to SPARK RM.
1267         * ghost.adb Add with and use clauses for Sem_Disp.
1268         (Check_Ghost_Derivation): Removed.
1269         (Check_Ghost_Overriding):
1270         Reimplemented.  (Check_Ghost_Policy): Update references to SPARK RM.
1271         (Check_Ghost_Primitive): New routine.
1272         (Check_Ghost_Refinement): New routine.  (Is_OK_Ghost_Context):
1273         Update references to SPARK RM.  (Is_OK_Pragma): Update references
1274         to SPARK RM. Predicates are now a valid context for references
1275         to Ghost entities.
1276         * ghost.ads (Check_Ghost_Derivation): Removed.
1277         (Check_Ghost_Overriding): Update the comment on usage.
1278         (Check_Ghost_Primitive): New routine.
1279         (Check_Ghost_Refinement): New routine.
1280         (Remove_Ignored_Ghost_Code): Update references to SPARK RM.
1281         * sem_ch3.adb (Process_Full_View): Remove the now obsolete check
1282         related to Ghost derivations
1283         * sem_ch6.adb (Check_Conformance): Remove now obsolete check
1284         related to the convention-like behavior of pragma Ghost.
1285         (Check_For_Primitive_Subprogram): Verify that the Ghost policy
1286         of a tagged type and its primitive agree.
1287         * sem_prag.adb (Analyze_Pragma): Update references to SPARK
1288         RM. Move the verification of pragma Assertion_Policy Ghost
1289         to the proper place. Remove the now obsolete check related
1290         to Ghost derivations.
1291         (Collect_Constituent): Add a call to Check_Ghost_Refinement.
1292         * sem_res.adb (Resolve_Actuals): Update references to SPARK RM.
1294 2016-04-18  Eric Botcazou  <ebotcazou@adacore.com>
1296         * layout.adb: Fix more minor typos in comments.
1298 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
1300         * a-calend.ads, sem_prag.adb, sem_ch6.adb: Minor reformatting.
1302 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
1304         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): In GNATprove
1305         mode, collect inherited class-wide conditions to generate the
1306         corresponding pragmas.
1307         * sem_prag.ads (Build_Pragma_Check_Equivalent): Moved from contracts
1308         * contracts.adb (Collect_Inherited_Class_Wide_Conditions): New
1309         procedure for overriding subprograms, used to generate the pragmas
1310         corresponding to an inherited class- wide pre- or postcondition.
1311         * sem_prag.adb (Build_Pragma_Check_Equivalent): moved here
1312         from contracts.adb (Replace_Condition_Entities): Subsidiary
1313         Build_Pragma_Check_Equivalent, to implement the proper semantics
1314         of inherited class-wide conditions, as given in AI12-0113.
1315         (Process_Class_Wide_Condition): Removed.
1316         (Collect_Inherited_Class_Wide_Conditions): Iterate over pragmas
1317         in contract of subprogram, to collect inherited class-wide
1318         conditions.
1319         (Build_Pragma_Check_Equivalent): Moved to sem_prag.adb
1321 2016-04-18  Yannick Moy  <moy@adacore.com>
1323         * a-calend.adb (Ada.Calendar): Mark package body as SPARK_Mode Off.
1324         * a-calend.ads (Ada.Calendar): Mark package spec as
1325         SPARK_Mode and add synchronous external abstract state Clock_Time.
1327 2016-04-18  Yannick Moy  <moy@adacore.com>
1329         * sem_res.adb (Resolve_Call): Prevent inlining of
1330         calls inside expression functions.  Factor previous code issuing
1331         errors to call Cannot_Inline instead, which does appropriate
1332         processing of message for GNATprove.
1334 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
1336         * einfo.ads, sem_ch3.adb, sem_ch8.adb, osint-l.adb, rtsfind.adb,
1337         osint-b.adb: Cleanups.
1339 2016-04-18  Yannick Moy  <moy@adacore.com>
1341         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Only create
1342         body to inline in GNATprove mode when SPARK_Mode On applies to
1343         subprogram body.
1344         * sem_prag.adb, sem_prag.ads (Get_SPARK_Mode_Type): Make function
1345         public.
1347 2016-04-18  Eric Botcazou  <ebotcazou@adacore.com>
1349         * layout.adb: Fix minor typo in comment.
1350         * inline.adb: Fix minor pasto.
1351         * sem_ch12.ads: Fix minor typos in comments.
1353 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
1355         * sem_disp.adb (Check_Dispatching_Call): Major rewriting to
1356         handle some complex cases of tag indeterminate calls that are
1357         actuals in other dispatching calls that are themselves tag
1358         indeterminate.
1359         (Check_Dispatching_Context): Add parameter to support recursive
1360         check for an enclosing construct that may provide a tag for a
1361         tag-indeterminate call.
1363 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
1365         * sem_prag.adb (Analyze_Depends_In_Decl_Part):
1366         Add global variables Task_Input_Seen and Task_Output_Seen.
1367         (Analyze_Global_Item): Detect an illegal use of the current
1368         instance of a single protected/task type in a global annotation.
1369         (Analyze_Input_Output): Inputs and output related to the current
1370         instance of a task unit are now tracked.
1371         (Check_Usage): Require
1372         the presence of the current instance of a task unit only when
1373         one input/output is available.  (Current_Task_Instance_Seen):
1374         New routine.
1375         (Is_CCT_Instance): New parameter profile. Update
1376         the comment on usage. The routine now properly recognizes several
1377         cases related to single protected/task types.
1379 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
1381         * freeze.adb (Freeze_Entity): Use New_Freeze_Node
1382         to create a brand new freeze node. This handles a case where an
1383         ignored Ghost context is freezing something which is not ignored
1384         Ghost and whose freeze node should not be removed from the tree.
1385         (New_Freeze_Node): New routine.
1387 2016-04-18  Jerome Lambourg  <lambourg@adacore.com>
1389         * sigtramp.h (__gnat_set_is_vxsim) New function to
1390         tell sigtramp-vxworks to handle vxsim signal contexts.  *
1391         sigtramp-vxworks.c (__gnat_sigtramp) Take into account the
1392         differences in the sigcontext structure between the expected
1393         regular x86 or x86_64 ones and the ones received in case of
1394         exexution on the vxworks simulator.
1395         * init.c: also compute is_vxsim in case of x86_64-vx7 target. Provide
1396         this information to sigtramp-vxworks.c. Remove the old mechanism for
1397         vxsim.
1398         * init-vxsim.c, sigtramp-vxworks-vxsim.c: remove, now obsolete.
1400 2016-04-18  Eric Botcazou  <ebotcazou@adacore.com>
1402         * exp_ch3.adb (Inline_Init_Proc): New function returning
1403         whether the initialization procedure of a type should be
1404         inlined.  Return again True for controlled type themselves.
1405         (Build_Array_Init_Proc): Call it to set Set_Is_Inlined on Init_Proc.
1406         (Build_Record_Init_Proc): Likewise.
1408 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
1410         * gnatvsn.ads (Library_Version): Bump to 7.
1412 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
1414         * sem_ch6.adb (Analyze_Expression_Function): Set Inlined flag
1415         on the entity of a subprogram declaration that is completed by
1416         an expression function.
1418 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
1420         * sem_util.adb (Is_Current_Instance): A entity given by a subtype
1421         declaration can appear in an aspect specification for a dynamic
1422         predicate, and a pragma for aspect Predicate_Failure.
1423         * exp_util.adb (Replace_Subtype_References): Replace current
1424         occurrences of the subtype to which a dynamic predicate applies,
1425         byt the expression that triggers a predicate check. Needed to
1426         implement new aspect Predicate_Failure.
1428 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
1430         * a-intsig.ads, a-intsig.adb: Removed, no longer used.
1431         * Makefile.rtl: update accordingly.
1433 2016-04-18  Eric Botcazou  <ebotcazou@adacore.com>
1435         * sem_type.adb (Disambiguate): Call Covers only when necessary
1436         for standard operators.
1438 2016-04-18  Eric Botcazou  <ebotcazou@adacore.com>
1440         * atree.ads (Num_Extension_Nodes): Add couple of figures
1441         to comment.
1442         * atree.adb: Add GNAT.Heap_Sort_G dependency.
1443         (Print_Statistics): New exported procedure to print statistics.
1445 2016-04-18  Eric Botcazou  <ebotcazou@adacore.com>
1447         * exp_ch3.adb (Build_Record_Init_Proc): Do not mark the procedure
1448         as to be inlined if the type needs finalization.
1450 2016-04-18  Jerome Lambourg  <lambourg@adacore.com>
1452         * sigtramp-vxworks-target.inc: sigtramp-vxworks: force the stack
1453         alignment for x86_64.
1454         * init.c: Better fix for guard page reset on x86_64-vx7.
1455         Do not try to retrieve the page that actually raised
1456         the signal as the probing mechanism used on x86_64 do not allow
1457         such retrieval. We thus just test if the guard page is active,
1458         and re-activate it if not.
1460 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
1462         * a-sytaco.adb (Suspension_Object): Aspect Default_Initial_Condition
1463         added.
1465 2016-04-18  Jerome Lambourg  <lambourg@adacore.com>
1467         * affinity.c: Use the proper type for task id.
1468         * init.c (__gnat_inum_to_ivec): ivec is a pointer.
1470 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
1472         * sem_prag.adb (Process_Convention): Relax rule on exporting
1473         Intrinsic types if Relaxed_RM_Semantics is True.
1475 2016-04-18  Vincent Celier  <celier@adacore.com>
1477         * sem_ch3.adb, lib.ads, sinfo.ads, sem_ch10.adb, einfo.adb, einfo.ads,
1478         checks.ads, sem_ch12.adb, sem.adb, sem_util.adb, sem_util.ads,
1479         sem_res.adb, sem_attr.adb, par.adb, exp_ch4.adb, errout.ads,
1480         sem_ch4.adb, atree.adb, atree.ads, sem_warn.adb, treepr.adb,
1481         exp_ch3.ads, exp_unst.adb: Change "descendent" to
1482         "descendant" in comments, error messages and identifiers.
1483         * gcc-interface/decl.c: Ditto.
1485 2016-04-18  Eric Botcazou  <ebotcazou@adacore.com>
1487         * sem_type.adb (Operator_Matches_Spec): Call First_Formal on
1488         New_S only once at the beginning of the function.
1490 2016-04-02  Eric Botcazou  <ebotcazou@adacore.com>
1492         * gcc-interface/decl.c (components_to_record): Restrict the previous
1493         change to fields with variable size.
1495 2016-03-27  Eric Botcazou  <ebotcazou@adacore.com>
1497         * gcc-interface/decl.c (components_to_record): Add special case for
1498         single field with representation clause at offset 0.
1500 2016-03-16  Svante Signell  <svante.signell@gmail.com>
1502         * gcc-interface/Makefile.in: Add support for x86 GNU/Hurd.
1503         * s-osinte-gnu.ads: New file.
1505 2016-03-13  Eric Botcazou  <ebotcazou@adacore.com>
1507         * system-vxworks-m68k.ads (Stack_Check_Probes): Set to True.
1508         (Stack_Check_Limits): Set to False.
1509         * system-vxworks-mips.ads (Stack_Check_Probes): Set to True.
1510         (Stack_Check_Limits): Set to False.
1511         * system-vxworks-ppc.ads (Stack_Check_Probes): Set to True.
1512         (Stack_Check_Limits): Set to False.
1513         * system-vxworks-sparcv9.ads (Stack_Check_Probes): Set to True.
1514         (Stack_Check_Limits): Set to False.
1515         * system-vxworks-x86.ads (Stack_Check_Probes): Set to True.
1516         (Stack_Check_Limits): Set to False.
1518 2016-03-07  Eric Botcazou  <ebotcazou@adacore.com>
1520         * gcc-interface/trans.c (statement_node_p): New predicate.
1521         (gnat_to_gnu): Invoke it to detect statement nodes.  In ASIS mode, do
1522         not return dummy results for expressions attached to packed array
1523         implementation types.
1525 2016-03-07  Eric Botcazou  <ebotcazou@adacore.com>
1527         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Always mark
1528         the expression of a renaming manually in case #3.
1530 2016-03-02  Dominik Vogt  <vogt@linux.vnet.ibm.com>
1532         * system-linux-s390.ads: Enable Stack_Check_Probes.
1533         * system-linux-s390.ads: Likewise.
1535 2016-02-29  Martin Liska  <mliska@suse.cz>
1537         * gcc-interface/utils.c (set_reverse_storage_order_on_pad_type):
1538         Replace ENABLE_CHECKING macro with flag_checking.
1540 2016-02-29  Eric Botcazou  <ebotcazou@adacore.com>
1542         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Retrofit
1543         handling of unconstrained array types as designated types into common
1544         processing.  Also handle array types as incomplete designated types.
1546 2016-02-29  Eric Botcazou  <ebotcazou@adacore.com>
1548         * gcc-interface/decl.c (gnat_to_gnu_entity) <Concurrent types>: In
1549         ASIS mode, fully lay out the minimal record type.
1551 2016-02-29  Eric Botcazou  <ebotcazou@adacore.com>
1553         * gcc-interface/trans.c (finalize_nrv_r): Remove obsolete code.
1554         (build_return_expr): Likewise.
1555         (Call_to_gnu): If this is a function call and there is no target,
1556         create a temporary for the return value for all aggregate types,
1557         but never create it for a return statement.  Push a binding level
1558         around the call in more cases.  Remove obsolete code.
1560 2016-02-29  Eric Botcazou  <ebotcazou@adacore.com>
1562         * gcc-interface/ada-tree.h (DECL_RETURN_VALUE_P): New macro.
1563         * gcc-interface/gigi.h (gigi): Remove useless attribute.
1564         (gnat_gimplify_expr): Likewise.
1565         (gnat_to_gnu_external): Declare.
1566         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: Factor out
1567         code dealing with the expression of external constants into...
1568         Invoke gnat_to_gnu_external instead.
1569         <E_Variable>: Invoke gnat_to_gnu_external to translate renamed objects
1570         when not for a definition.  Deal with COMPOUND_EXPR and variables with
1571         DECL_RETURN_VALUE_P set for renamings and with the case of a dangling
1572         'reference to a function call in a renaming.  Remove obsolete test and
1573         adjust associated comment.
1574         * gcc-interface/trans.c (Call_to_gnu): Set DECL_RETURN_VALUE_P on the
1575         temporaries created to hold the return value, if any.
1576         (gnat_to_gnu_external): ...this.  New function.
1577         * gcc-interface/utils.c (create_var_decl): Detect a constant created
1578         to hold 'reference to function call.
1579         * gcc-interface/utils2.c (build_unary_op) <ADDR_EXPR>: Add folding
1580         for COMPOUND_EXPR in the DECL_RETURN_VALUE_P case.
1582 2016-02-17  Eric Botcazou  <ebotcazou@adacore.com>
1584         * exp_ch4.adb (Expand_N_Indexed_Component): Activate synchronization if
1585         the prefix denotes an entity which Has_Atomic_Components.
1586         * gcc-interface/trans.c (node_is_atomic): Return true if the prefix
1587         denotes an entity which Has_Atomic_Components.
1589 2016-02-17  Eric Botcazou  <ebotcazou@adacore.com>
1591         * gcc-interface/utils2.c (gnat_protect_expr): Make a SAVE_EXPR only
1592         for fat pointer or scalar types.
1594 2016-02-16  Eric Botcazou  <ebotcazou@adacore.com>
1596         * gcc-interface/gigi.h (maybe_debug_type): New inline function.
1597         * gcc-interface/misc.c (gnat_get_array_descr_info): Use it.
1598         Call maybe_character_value on the array bounds.  Get to the base type
1599         of the index type and call maybe_debug_type on it.
1600         * gcc-interface/utils.c (finish_character_type): Add special treatment
1601         for char_type_node.
1603 2016-02-16  Eric Botcazou  <ebotcazou@adacore.com>
1605         * gcc-interface/misc.c (gnat_enum_underlying_base_type): New function.
1606         (LANG_HOOKS_ENUM_UNDERLYING_BASE_TYPE): Define to above.
1608 2016-02-12  Jakub Jelinek  <jakub@redhat.com>
1610         * prj-tree.ads: Spelling fixes - behaviour -> behavior and
1611         neighbour -> neighbor.
1612         * prep.adb: Likewise.
1613         * prj.ads: Likewise.
1614         * prepcomp.adb: Likewise.
1615         * g-socket.ads: Likewise.
1616         * s-imgrea.adb: Likewise.
1617         * a-calend.adb: Likewise.
1618         * exp_disp.adb: Likewise.
1619         * doc/gnat_ugn/gnat_utility_programs.rst: Likewise.
1620         * g-socket.adb: Likewise.
1621         * sem_ch12.adb: Likewise.
1622         * terminals.c: Likewise.
1624 2016-02-08  Bernd Schmidt  <bschmidt@redhat.com>
1626         * gcc-interface/misc.c (gnat_init): Remove second argument in call to
1627         build_common_tree_nodes.
1629 2016-02-08  Eric Botcazou  <ebotcazou@adacore.com>
1631         * gcc-interface/utils.c (create_var_decl): Set again DECL_COMMON and
1632         DECL_IGNORED_P last.
1634 2016-01-28  Eric Botcazou  <ebotcazou@adacore.com>
1636         * gcc-interface/gigi.h (enum attr_type): Rename into...
1637         (enum attrib_type): ...this.
1638         (struct attrib): Adjust.
1639         * gcc-interface/decl.c (prepend_one_attribute): Likewise.
1641 2016-01-20  Eric Botcazou  <ebotcazou@adacore.com>
1643         * exp_ch2.adb (Expand_Current_Value): Make an appropriate character
1644         literal if the entity is of a character type.
1645         * gcc-interface/lang.opt (fsigned-char): New option.
1646         * gcc-interface/misc.c (gnat_handle_option): Accept it.
1647         (gnat_init): Adjust comment.
1648         * gcc-interface/gigi.h (finish_character_type): New prototype.
1649         (maybe_character_type): New inline function.
1650         (maybe_character_value): Likewise.
1651         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Enumeration_Type>: For
1652         a character of CHAR_TYPE_SIZE, make a signed type if flag_signed_char.
1653         Set TYPE_ARTIFICIAL early and call finish_character_type on the type.
1654         <E_Enumeration_Subtype>: For a subtype of character with RM_Size and
1655         Esize equal to CHAR_TYPE_SIZE, make a signed type if flag_signed_char.
1656         Copy TYPE_STRING_FLAG from type to subtype.
1657         <E_Array_Type>: Deal with character index types.
1658         <E_Array_Subtype>: Likewise.
1659         * gcc-interface/trans.c (gigi): Replace unsigned_char_type_node with
1660         char_type_node throughout.
1661         (build_raise_check): Likewise.
1662         (get_type_length): Deal with character types.
1663         (Attribute_to_gnu) <Attr_Pos>: Likewise.  Remove obsolete range check
1664         code.  Minor tweak.
1665         <Attr_Pred>: Likewise.
1666         (Loop_Statement_to_gnu): Likewise.
1667         (Raise_Error_to_gnu): Likewise.
1668         <N_Indexed_Component>: Deal with character index types.  Remove
1669         obsolete code.
1670         <N_Slice>: Likewise.
1671         <N_Type_Conversion>: Deal with character types.  Minor tweak.
1672         <N_Unchecked_Type_Conversion>: Likewise.
1673         <N_In>: Likewise.
1674         <N_Op_Eq>: Likewise.
1675         (emit_index_check): Delete.
1676         * gcc-interface/utils.c (finish_character_type): New function.
1677         (gnat_signed_or_unsigned_type_for): Deal with built-in character types.
1678         * gcc-interface/utils2.c (expand_sloc): Replace unsigned_char_type_node
1679         with char_type_node.
1680         (build_call_raise): Likewise.
1681         (build_call_raise_column): Likewise.
1682         (build_call_raise_range): Likewise.
1684 2016-01-18  Eric Botcazou  <ebotcazou@adacore.com>
1686         * gcc-interface/gigi.h (build_call_raise_column): Adjust prototype.
1687         (build_call_raise_range): Likewise.
1688         (gnat_unsigned_type): Delete.
1689         (gnat_signed_type): Likewise.
1690         (gnat_signed_or_unsigned_type_for): New prototype.
1691         (gnat_unsigned_type_for): New inline function.
1692         (gnat_signed_type_for): Likewise.
1693         * gcc-interface/cuintp.c (build_cst_from_int): Call build_int_cst.
1694         * gcc-interface/decl.c (gnat_to_gnu_entity): Likewise.
1695         (gnat_to_gnu_entity) <E_Array_Type>: Always translate the index types
1696         and compute their base type from that.
1697         <E_Array_Subtype>: Remove duplicate declaration.
1698         * gcc-interface/misc.c (get_array_bit_stride): Call build_int_cst.
1699         * gcc-interface/trans.c (get_type_length): Likewise.
1700         (Attribute_to_gnu): Likewise.
1701         (Loop_Statement_to_gnu): Likewise.
1702         (Call_to_gnu): Likewise.
1703         (gnat_to_gnu): Call build_real, build_int_cst, gnat_unsigned_type_for
1704         and gnat_signed_type_for.  Minor tweaks.
1705         (build_binary_op_trapv): Likewise.
1706         (emit_check): Likewise.
1707         (convert_with_check): Likewise.
1708         (Raise_Error_to_gnu): Adjust calls to the build_call_raise family of
1709         functions.  Minor tweaks.
1710         (Case_Statement_to_gnu): Remove dead code.
1711         (gnat_to_gnu): Call gnat_unsigned_type_for and gnat_signed_type_for.
1712         (init_code_table): Minor reordering.
1713         * gcc-interface/utils.c (gnat_unsigned_type): Delete.
1714         (gnat_signed_type): Likewise.
1715         (gnat_signed_or_unsigned_type_for): New function.
1716         (unchecked_convert): Use directly the size in the test for precision
1717         vs size adjustments.
1718         (install_builtin_elementary_types): Call gnat_signed_type_for.
1719         * gcc-interface/utils2.c (nonbinary_modular_operation): Call
1720         build_int_cst.
1721         (build_goto_raise): New function taken from...
1722         (build_call_raise): ...here.  Call it.
1723         (build_call_raise_column): Add KIND parameter and call it.
1724         (build_call_raise_range): Likewise.
1726 2016-01-18  Eric Botcazou  <ebotcazou@adacore.com>
1728         * gcc-interface/ada-tree.h (TYPE_IMPLEMENTS_PACKED_ARRAY_P): Rename to
1729         (TYPE_IMPL_PACKED_ARRAY_P): ...this.
1730         (TYPE_CAN_HAVE_DEBUG_TYPE_P): Do not test TYPE_DEBUG_TYPE.
1731         * gcc-interface/decl.c (gnat_to_gnu_entity): Simplify NULL_TREE tests
1732         and tweak gnat_encodings tests throughout.
1733         (initial_value_needs_conversion): Likewise.
1734         (intrin_arglists_compatible_p): Likewise.
1735         * gcc-interface/misc.c (gnat_print_type): Likewise.
1736         (gnat_get_debug_type): Likewise.
1737         (gnat_get_fixed_point_type_info): Likewise.
1738         (gnat_get_array_descr_info): Likewise.
1739         (get_array_bit_stride): Likewise.
1740         (gnat_get_type_bias): Fix formatting.
1741         (enumerate_modes): Likewise.
1742         * gcc-interface/trans.c (gnat_to_gnu): Likewise.
1743         (add_decl_expr): Simplify NULL_TREE test.
1744         (end_stmt_group): Likewise.
1745         (build_binary_op_trapv): Fix formatting.
1746         (get_exception_label): Use switch statement.
1747         (init_code_table): Move around.
1748         * gcc-interface/utils.c (global_bindings_p): Simplify NULL_TREE test.
1749         (gnat_poplevel): Likewise.
1750         (gnat_set_type_context): Likewise.
1751         (defer_or_set_type_context): Fix formatting.
1752         (gnat_pushdecl): Simplify NULL_TREE test.
1753         (maybe_pad_type): Likewise.
1754         (add_parallel_type): Likewise.
1755         (create_range_type): Likewise.
1756         (process_deferred_decl_context): Likewise.
1757         (convert): Likewise.
1758         (def_builtin_1): Likewise.
1759         * gcc-interface/utils2.c (find_common_type): Likewise.
1760         (build_binary_op): Likewise.
1761         (gnat_rewrite_reference): Likewise.
1762         (get_inner_constant_reference): Likewise.
1764 2016-01-18  Eric Botcazou  <ebotcazou@adacore.com>
1766         PR ada/69219
1767         * gcc-interface/trans.c (check_inlining_for_nested_subprog): Consider
1768         the parent function instead of the current function in order to issue
1769         the warning or the error.  Add guard for ignored functions.
1771 2016-01-17  Jakub Jelinek  <jakub@redhat.com>
1773         * adaint.c (__gnat_killprocesstree): Avoid -Wparentheses warning.
1775 2016-01-15  Jakub Jelinek  <jakub@redhat.com>
1777         * adaint.c (__gnat_locate_exec_on_path): Use const char * instead
1778         of char * for path_val to avoid warnings.
1780 2016-01-06  Pierre-Marie de Rodat  <derodat@adacore.com>
1782         * gcc-interface/utils.c: Bump copyright year.
1783         (rest_of_record_type_compilation): Add XVE/XVU parallel types to
1784         the current lexical scope.
1786 2016-01-04  Jakub Jelinek  <jakub@redhat.com>
1788         * gnat_ugn.texi: Bump @copying's copyright year.
1789         * gnat_rm.texi: Likewise.
1791 2016-01-02  Eric Botcazou  <ebotcazou@adacore.com>
1793         * gnatvsn.ads: Bump copyright year.
1796 Copyright (C) 2016 Free Software Foundation, Inc.
1798 Copying and distribution of this file, with or without modification,
1799 are permitted in any medium without royalty provided the copyright
1800 notice and this notice are preserved.