PR ada/85036
[official-gcc.git] / gcc / ada / ChangeLog
blobd75028d2fa484fb0fade6f77bc6f07ea6763f937
1 2018-03-23  Eric Botcazou  <ebotcazou@adacore.com>
3         PR ada/85036
4         * gnatlink.adb (Process_Args): Drop existing link switches if multiple
5         switches are passed for --LINK.
7 2018-03-12  Eric Botcazou  <ebotcazou@adacore.com>
9         PR ada/82813
10         * gcc-interface/misc.c (gnat_post_options): Disable string overflow
11         warnings.
13 2018-03-10  Eric Botcazou  <ebotcazou@adacore.com>
15         * gcc-interface/trans.c (node_has_volatile_full_access) <N_Identifier>:
16         Consider only entities for objects.
18 2018-03-07  Sebastian Huber  <sebastian.huber@embedded-brains.de>
20         * gcc-interface/Makefile.in (OSCONS_CPP): Remove redundant
21         $(GNATLIBCFLAGS).
22         (OSCONS_EXTRACT): Add $(GNATLIBCFLAGS_FOR_C).
24 2018-03-06  Eric Botcazou  <ebotcazou@adacore.com>
26         * gcc-interface/trans.c (convert_with_check): Fix typo in the condition
27         guarding the overflow check emitted for the upper bound of a floating-
28         point conversion.
30 2018-03-06  Eric Botcazou  <ebotcazou@adacore.com>
32         * gcc-interface/utils.c (def_builtin_1): Bail out on error_mark_node.
34 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
36         * libgnat/i-cexten.ads (Float_128): New type.
38 2018-02-02  Eric Botcazou  <ebotcazou@adacore.com>
40         * gcc-interface/decl.c (array_type_has_nonaliased_component): Return
41         false if the component type is a pointer.
43 2018-01-11  Gary Dismukes  <dismukes@adacore.com>
45         * exp_ch3.adb (Default_Initialize_Object): Call New_Copy_Tree on the
46         result of Get_Simple_Init_Value and pass the source location of the
47         object declaration's object_definition.
49 2018-01-11  Ed Schonberg  <schonberg@adacore.com>
51         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration): Handle
52         properly object declarations with initializations that are
53         build-in-place function calls, when there is an address specification,
54         either as an aspect specification or an explicit attribute
55         specification clause, for the initialized object.
56         * freeze.adb (Check_Address_Clause): Do not remove side-effects from
57         initial expressions in the case of a build-in-place call.
59 2018-01-11  Piotr Trojanek  <trojanek@adacore.com>
61         * sem_eval.adb (Is_Null_Range): Retrieve the full view when called on a
62         private (sub)type; refactor to avoid early return statement.
63         (Not_Null_Range): Same as above.
65 2018-01-11  Hristian Kirtchev  <kirtchev@adacore.com>
67         * freeze.adb (Freeze_Entity): Ensure that a Ghost type is not
68         concurrent, nor effectively volatile.
69         * ghost.adb (Check_Ghost_Type): New routine.
70         * ghost.ads (Check_Ghost_Type): New routine.
71         * sem_util.adb (Is_Declaration): Reimplemented. The routine can now
72         consider specific subsets of declarations.
73         (Is_Declaration_Other_Than_Renaming): Removed. Its functionality is
74         replicated by Is_Declaration.
75         * sem_util.ads (Is_Declaration): New parameter profile. Update the
76         comment on usage.
77         (Is_Declaration_Other_Than_Renaming): Removed.
79 2018-01-11  Hristian Kirtchev  <kirtchev@adacore.com>
81         * sem_ch5.adb (Analyze_Assignment): Assignments to variables that act
82         as Part_Of consituents of single protected types are illegal when they
83         take place inside a protected function.
84         (Diagnose_Non_Variable_Lhs): Use Within_Function to check for an
85         enclosing function.
86         (Is_Protected_Part_Of_Constituent): New routine.
87         (Within_Function): New routine.
89 2018-01-11  Arnaud Charlet  <charlet@adacore.com>
91         Bump copyright notices to 2018.
93 2018-01-11  Hristian Kirtchev  <kirtchev@adacore.com>
95         * binde.adb, par-ch6.adb, par-ch9.adb, sem_ch12.adb, sem_ch13.adb:
96         Minor reformatting.
98 2018-01-11  Justin Squirek  <squirek@adacore.com>
100         * par-ch6.adb (Scan_Body_Or_Expression_Function): Add additional check
101         to make sure a given expression function is properly parenthesized.
103 2018-01-11  Hristian Kirtchev  <kirtchev@adacore.com>
105         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Check the
106         categorization of a subprogram body which does not complete a previous
107         declaration.
109 2018-01-11  Hristian Kirtchev  <kirtchev@adacore.com>
111         * sem_ch10.adb (Check_Private_Child_Unit): Ensure that the enclosing
112         scope of package Ada is Standard.
114 2018-01-11  Ed Schonberg  <schonberg@adacore.com>
116         * sem_ch13.adb (Replace_Type_Ref): Handle properly reference to a
117         subcomponent of the current entity when building the body for a dynamic
118         predicate function for a record with composite subcomponents.
120 2018-01-11  Hristian Kirtchev  <kirtchev@adacore.com>
122         * exp_aggr.adb (Convert_Aggr_In_Object_Decl): Update the call to
123         Establish_Transient_Scope.
124         (Convert_To_Assignments): Update the call to Establish_Transient_Scope.
125         (Expand_Array_Aggregate): Update the call to Establish_Transient_Scope.
126         * exp_ch6.adb (Expand_Call_Helper): Update the call to
127         Establish_Transient_Scope.
128         (Make_Build_In_Place_Call_In_Object_Declaration): Update the call to
129         Establish_Transient_Scope.
130         * exp_ch7.adb (Establish_Transient_Scope): Restructured. Delegate the
131         management of the secondary stack to an enclosing scope if there is no
132         suitable construct to wrap, and the transient scope was intended to
133         manage the secondary stack.
134         (Find_Node_To_Be_Wrapped): Restructured. A case_statement_alternative
135         is a valid boundary for a transient expression which comes from the
136         statements of the alternative, otherwise alternatives cannot be
137         wrapped. Assignments of controlled objects which have controlled
138         actions suppressed now stop the traversal as there is no point in
139         looking for an enclosing construct. Add several N_xxx_Body choices to
140         the termination conditions for completeness.
141         * exp_ch7.ads (Establish_Transient_Scope): Update the parameter profile
142         and the associated comment on usage.
143         * exp_smem.adb (Add_Shared_Var_Lock_Procs): Update the call to
144         Establish_Transient_Scope.
145         (Add_Write_After): Update the call to Establish_Transient_Scope.
146         * sem_res.adb (Check_Initialization_Call): Removed.
147         (Resolve_Actuals): Account for additional cases where finalization
148         actions are required by utilizing predicate Needs_Finalization rather
149         than Is_Controlled.
150         (Resolve_Call): Type initialization procedures can now utilize
151         transient scopes to manage the secondary stack, thus preventing leaks
152         during initialization.  Remove the previous kludgy algorithm which
153         attempts to manage the secondary stack at the object creation site.
155 2018-01-11  Jerome Lambourg  <lambourg@adacore.com>
157         * libgnat/g-soliop__qnx.ads: New.
158         * adaint.c, adaint.h, cstreams.c, s-oscons-tmplt.c, sysdep.c: Update
159         for QNX.
161 2018-01-11  Bob Duff  <duff@adacore.com>
163         * par-ch9.adb (P_Protected_Operation_Declaration_Opt): Give an error if
164         a null procedure occurs in a protected definition.
166 2018-01-11  Bob Duff  <duff@adacore.com>
168         * binderr.ads, namet.ads: Minor reformatting.
170 2018-01-11  Bob Duff  <duff@adacore.com>
172         * doc/gnat_ugn/gnat_utility_programs.rst: Improve documentation of
173         xml2gnat.
175 2018-01-11  Bob Duff  <duff@adacore.com>
177         * binde.adb (Force_Elab_Order): Give an error if there are duplicate
178         unit names.
180 2018-01-11  Ed Schonberg  <schonberg@adacore.com>
182         * sem_ch6.adb (Freeze_Expr_Types): If an access value is the
183         controlling argument of a dispatching call. freeze the corresponding
184         designated type.
186 2018-01-11  Ben Brosgol  <brosgol@adacore.com>
188         * doc/Makefile: Add Sphinx option -W to treat warnings as errors.
190 2018-01-11  Ben Brosgol  <brosgol@adacore.com>
192         * doc/gnat_rm/implementation_defined_aspects.rst: Minor type/wording
193         corrections.
194         * gnat_rm.texi: Regenerate.
196 2018-01-11  Ed Schonberg  <schonberg@adacore.com>
198         * sem_ch12.adb (Check_Fixed_Point_Type): Do not apply check if the
199         formsl type corresponding to the actual fixed point type is private,
200         because in this case there can be no suspicious arithmetic operations
201         in the generic unless they reference a formal subprogram.  Clarify
202         warning.
204 2018-01-11  Javier Miranda  <miranda@adacore.com>
206         * exp_util.adb (Remove_Side_Effects): No action done for functions
207         returning class-wide types since it requires generating code using
208         'reference and the CCG target has no secondary stack.
209         * gnat1drv.adb: Disable building static dispatch tables when generating
210         C code.
212 2018-01-11  Piotr Trojanek  <trojanek@adacore.com>
214         * libgnat/a-direio.ads, libgnat/a-sequio.ads, libgnat/a-ststio.ads,
215         libgnat/a-textio.ads, libgnat/a-witeio.ads, libgnat/a-ztexio.ads
216         (File_Type): Add Default_Initial_Condition aspect.
218 2018-01-11  Pascal Obry  <obry@adacore.com>
220         * libgnat/s-os_lib.adb (Normalize_Pathname): New implementation.
222 2018-01-11  Bob Duff  <duff@adacore.com>
224         * doc/gnat_ugn/gnat_utility_programs.rst: Rewrite gnatpp documentation
225         to match what the Libadalang-based version does.
226         * doc/gnat_ugn/about_this_guide.rst: Update reference.
228 2018-01-11  Hristian Kirtchev  <kirtchev@adacore.com>
230         * sem_res.adb (Uses_SS): A controlled type requires the secondary stack
231         if it contains at least one component declaration employing a function
232         call returning on the secondary stack.
234 2018-01-11  Yannick Moy  <moy@adacore.com>
236         * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
237         Update description of restriction SPARK_05 with SPARK 2014.
238         * gnat_rm.texi: Regenerate.
240 2018-01-11  Vasiliy Fofanov  <fofanov@adacore.com>
242         * doc/gnat_ugn/gnat_utility_programs.rst: Fix layout.
244 2018-01-11  Hristian Kirtchev  <kirtchev@adacore.com>
246         * exp_aggr.adb, exp_ch9.adb, exp_util.adb, sem_aggr.adb, sem_ch3.adb,
247         sem_res.adb, sem_util.adb: Minor reformatting.
249 2018-01-11  Ed Schonberg  <schonberg@adacore.com>
251         * sem_prag.adb (Analyze_Pragma, case Predicate): Indicate that the type
252         has a delayed aspect which must be processed at the point the type is
253         frozen. This mimics what is done when the predicate is provided by a
254         source aspect.
256 2018-01-11  Doug Rupp  <rupp@adacore.com>
258         * init.c (vxworks): Add macro checks for __aarch64__.
260 2018-01-11  Hristian Kirtchev  <kirtchev@adacore.com>
262         * exp_util.adb (Add_Failure_Expression): New routine.
263         (Make_Predicate_Check): Reimplement the handling of Predicate_Failure.
264         * sem_util.adb (Is_Current_Instance): Code cleanup.
266 2018-01-11  Patrick Bernardi  <bernardi@adacore.com>
268         * libgnat/s-parame*.adb, libgnat/s-parame*.ads: Remove unneeded
269         Default_Sec_Stack_Size.
270         * libgnat/s-secsta.adb (SS_Allocate): Handle the fixed secondary stack
271         limit check so that the integer index does not overflow. Check the
272         dynamic stack allocation does not cause the secondary stack pointer to
273         overflow.
274         (SS_Info): Align colons.
275         (SS_Init): Cover the case when bootstraping with an old compiler that
276         does not set Default_SS_Size.
278 2018-01-11  Ed Schonberg  <schonberg@adacore.com>
280         * sem_ch3.adb (Add_Internal_Interface_Entities): When checking the
281         legality of an inherited operation that may require overriding, ignore
282         primitive_wrappers that correspond to explicit operations that override
283         an interface primitive.
284         * exp_util.adb (Build_Class_Wide_Expression, Replace_Entity): If the
285         operation to which the class-wide expression applies is a protected op.
286         with a primitive_wrapper, verify that the updated inherited expression
287         does not contain an internal call to a protected function.  This
288         completes the implementation of AI12-0166.
290 2018-01-11  Hristian Kirtchev  <kirtchev@adacore.com>
292         * ali.adb: Document the remaining letters available for ALI lines.
293         (Scan_ALI): A with clause is internal when it is encoded on a 'Z' line.
294         * ali.ads: Update type With_Record. Field
295         Implicit_With_From_Instantiation is no longer in use. Add field
296         Implicit_With.
297         * csinfo.adb (CSinfo): Remove the setup for attribute
298         Implicit_With_From_Instantiation.
299         * lib-writ.adb (Collect_Withs): Correct the logic which marks a unit as
300         either implicitly or explicitly withed.
301         (Is_Implicit_With_Clause): New routine.
302         (Write_ALI): Rename array Implicit_With to Has_Implicit_With to avoid
303         confusion with the with clause attribute by the same name.
304         (Write_With_Lines): Update the emission of 'W', 'Y', and 'Z' headers.
305         * rtsfind.adb (Maybe_Add_With): Code cleanup.
306         * sem_ch8.adb (Present_System_Aux): Code cleanup.
307         * sem_ch10.adb (Expand_With_Clause): Mark the with clause as generated
308         for a parent unit.
309         (Implicit_With_On_Parent): Mark the with clause as generated for a
310         parent unit.
311         * sem_ch12.adb (Inherit_Context): With clauses inherited by an
312         instantiation are no longer marked as Implicit_With_From_Instantiation
313         because they are already marked as implicit.
314         * sem_elab.adb (Ensure_Prior_Elaboration_Static): Remove the kludge
315         which marks implicit with clauses as related to an instantiation.
316         * sinfo.adb (Implicit_With_From_Instantiation): Removed.
317         (Parent_With): New routine.
318         (Set_Implicit_With_From_Instantiation): Removed.
319         (Set_Parent_With): New routine.
320         * sinfo.ads: Update the documentation of attribute Implicit_With.
321         Remove attribute Implicit_With_From_Instantiation along with
322         occurrences in nodes.  Add attribute Parent_With along with occurrences
323         in nodes.
324         (Implicit_With_From_Instantiation): Removed along with pragma Inline.
325         (Parent_With): New routine along with pragma Inline.
326         (Set_Implicit_With_From_Instantiation): Removed along with pragma Inline.
327         (Set_Parent_With): New routine along with pragma Inline.
329 2018-01-11  Hristian Kirtchev  <kirtchev@adacore.com>
331         * sem_util.adb (Find_Enclosing_Scope): Return the unique defining
332         entity when the enclosing construct is a body.
334 2018-01-11  Patrick Bernardi  <bernardi@adacore.com>
336         * exp_ch9.adb (Expand_N_Task_Type_Declaration): Simplified
337         Secondary_Stack_Size handling as a pragma is now generated for the
338         corresponding aspect instead of an attribute.  Pragma expression is
339         relocated instead of evaluated. Discriminant of the corresponding
340         record type is referenced rather than the type discriminant.
341         (Create_Secondary_Stack_For_Task, Make_Task_Create_Call): Update
342         Secondary_Stack_Size rep item checks to only look for the pragma rep.
343         * sem_ch13.adb (Analyze_One_Aspect): Transform
344         Aspect_Secondary_Stack_Size into a pragma instead of an attribute
345         because the attribute does not have visibility on a task type's
346         discriminants when the type's definition is expanded.
347         (Analyze_Attribute_Definition_Clause): Remove handling of
348         Attribute_Secondary_Stack_Size.
349         * snames.adb-tmpl, snames.ads-tmpl: Remove
350         Attribute_Secondary_Stack_Size, no longer used.
352 2018-01-11  Justin Squirek  <squirek@adacore.com>
354         * sem_ch8.adb: Minor comment fix.
356 2018-01-11  Hristian Kirtchev  <kirtchev@adacore.com>
358         * exp_ch4.adb (Process_Action): Do not abandon the inspection of an
359         individual action because the action may denote a complex expression,
360         such as a case statement, which in turn may contain additional
361         transient objects.
363 2018-01-11  Ed Schonberg  <schonberg@adacore.com>
365         * sem_aggr.adb (Resolve_Iterated_Component_Association): Perform
366         analysis on a copy of the expression with a copy of the index variable,
367         because full expansion will rewrite construct into a loop with the
368         original loop variable.
369         * exp_aggr.adb (Gen_Assign): Defer analysis and resolution if the
370         expression is an iterated component association. Full analysis takes
371         place when construct is rewritten as a loop.
372         (In_Place_Assign_OK, Safe_Component): An iterated_component_association
373         is not safe for in-place assignment.
374         * sem_util.adb (Remove_Entity): Handle properly the case of an isolated
375         entity with no homonym and no other entity in the scope.
377 2018-01-11  Justin Squirek  <squirek@adacore.com>
379         * sem_prag.adb (Analyze_Pragma:Pragma_Loop_Variant): Modify error
380         message to be printed on the pragma argument identifier.
382 2018-01-11  Hristian Kirtchev  <kirtchev@adacore.com>
384         * exp_util.adb (Build_Invariant_Procedure_Declaration): Set the last
385         entity of the generated invariant procedure in order to construct a
386         proper entity chain.
388 2018-01-11  Piotr Trojanek  <trojanek@adacore.com>
390         * sem_ch13.adb (Build_Predicate_Functions): Fix minor issues in
391         comment.
393 2018-01-11  Arnaud Charlet  <charlet@adacore.com>
395         * einfo.ads, einfo.adb (Activation_Record_Component,
396         Set_Activation_Record_Component, Set_Is_Uplevel_Referenced_Entity):
397         Allow E_Discriminant.
399 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
401         * gcc-interface/decl.c (gnat_to_gnu_component_type): Apply the check
402         for atomic access once the component size is taken into account and
403         also do it if the component type is Atomic or Volatile_Full_Access.
405 2018-01-04  Eric Botcazou  <ebotcazou@adacore.com>
407         * gnatvsn.ads: Bump copyright year.
409 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
410             Alan Hayward  <alan.hayward@arm.com>
411             David Sherwood  <david.sherwood@arm.com>
413         * gcc-interface/misc.c (enumerate_modes): Treat GET_MODE_BITSIZE
414         as polynomial.
416 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
417             Alan Hayward  <alan.hayward@arm.com>
418             David Sherwood  <david.sherwood@arm.com>
420         * gcc-interface/misc.c (enumerate_modes): Treat GET_MODE_PRECISION
421         as polynomial.
423 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
424             Alan Hayward  <alan.hayward@arm.com>
425             David Sherwood  <david.sherwood@arm.com>
427         * gcc-interface/utils.c (gnat_types_compatible_p): Handle
428         polynomial TYPE_VECTOR_SUBPARTS.
430 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
431             Alan Hayward  <alan.hayward@arm.com>
432             David Sherwood  <david.sherwood@arm.com>
434         * gcc-interface/misc.c (enumerate_modes): Handle polynomial
435         GET_MODE_NUNITS.
437 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
439         Update copyright years.
441         * gnat_ugn.texi: Bump @copying's copyright year.
442         * gnat_rm.texi: Likewise.
444 Copyright (C) 2018 Free Software Foundation, Inc.
446 Copying and distribution of this file, with or without modification,
447 are permitted in any medium without royalty provided the copyright
448 notice and this notice are preserved.