1 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
3 * freeze.adb (Freeze_Entity): Ensure that a Ghost type is not
4 concurrent, nor effectively volatile.
5 * ghost.adb (Check_Ghost_Type): New routine.
6 * ghost.ads (Check_Ghost_Type): New routine.
7 * sem_util.adb (Is_Declaration): Reimplemented. The routine can now
8 consider specific subsets of declarations.
9 (Is_Declaration_Other_Than_Renaming): Removed. Its functionality is
10 replicated by Is_Declaration.
11 * sem_util.ads (Is_Declaration): New parameter profile. Update the
13 (Is_Declaration_Other_Than_Renaming): Removed.
15 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
17 * sem_ch5.adb (Analyze_Assignment): Assignments to variables that act
18 as Part_Of consituents of single protected types are illegal when they
19 take place inside a protected function.
20 (Diagnose_Non_Variable_Lhs): Use Within_Function to check for an
22 (Is_Protected_Part_Of_Constituent): New routine.
23 (Within_Function): New routine.
25 2018-01-11 Arnaud Charlet <charlet@adacore.com>
27 Bump copyright notices to 2018.
29 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
31 * binde.adb, par-ch6.adb, par-ch9.adb, sem_ch12.adb, sem_ch13.adb:
34 2018-01-11 Justin Squirek <squirek@adacore.com>
36 * par-ch6.adb (Scan_Body_Or_Expression_Function): Add additional check
37 to make sure a given expression function is properly parenthesized.
39 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
41 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Check the
42 categorization of a subprogram body which does not complete a previous
45 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
47 * sem_ch10.adb (Check_Private_Child_Unit): Ensure that the enclosing
48 scope of package Ada is Standard.
50 2018-01-11 Ed Schonberg <schonberg@adacore.com>
52 * sem_ch13.adb (Replace_Type_Ref): Handle properly reference to a
53 subcomponent of the current entity when building the body for a dynamic
54 predicate function for a record with composite subcomponents.
56 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
58 * exp_aggr.adb (Convert_Aggr_In_Object_Decl): Update the call to
59 Establish_Transient_Scope.
60 (Convert_To_Assignments): Update the call to Establish_Transient_Scope.
61 (Expand_Array_Aggregate): Update the call to Establish_Transient_Scope.
62 * exp_ch6.adb (Expand_Call_Helper): Update the call to
63 Establish_Transient_Scope.
64 (Make_Build_In_Place_Call_In_Object_Declaration): Update the call to
65 Establish_Transient_Scope.
66 * exp_ch7.adb (Establish_Transient_Scope): Restructured. Delegate the
67 management of the secondary stack to an enclosing scope if there is no
68 suitable construct to wrap, and the transient scope was intended to
69 manage the secondary stack.
70 (Find_Node_To_Be_Wrapped): Restructured. A case_statement_alternative
71 is a valid boundary for a transient expression which comes from the
72 statements of the alternative, otherwise alternatives cannot be
73 wrapped. Assignments of controlled objects which have controlled
74 actions suppressed now stop the traversal as there is no point in
75 looking for an enclosing construct. Add several N_xxx_Body choices to
76 the termination conditions for completeness.
77 * exp_ch7.ads (Establish_Transient_Scope): Update the parameter profile
78 and the associated comment on usage.
79 * exp_smem.adb (Add_Shared_Var_Lock_Procs): Update the call to
80 Establish_Transient_Scope.
81 (Add_Write_After): Update the call to Establish_Transient_Scope.
82 * sem_res.adb (Check_Initialization_Call): Removed.
83 (Resolve_Actuals): Account for additional cases where finalization
84 actions are required by utilizing predicate Needs_Finalization rather
86 (Resolve_Call): Type initialization procedures can now utilize
87 transient scopes to manage the secondary stack, thus preventing leaks
88 during initialization. Remove the previous kludgy algorithm which
89 attempts to manage the secondary stack at the object creation site.
91 2018-01-11 Jerome Lambourg <lambourg@adacore.com>
93 * libgnat/g-soliop__qnx.ads: New.
94 * adaint.c, adaint.h, cstreams.c, s-oscons-tmplt.c, sysdep.c: Update
97 2018-01-11 Bob Duff <duff@adacore.com>
99 * par-ch9.adb (P_Protected_Operation_Declaration_Opt): Give an error if
100 a null procedure occurs in a protected definition.
102 2018-01-11 Bob Duff <duff@adacore.com>
104 * binderr.ads, namet.ads: Minor reformatting.
106 2018-01-11 Bob Duff <duff@adacore.com>
108 * doc/gnat_ugn/gnat_utility_programs.rst: Improve documentation of
111 2018-01-11 Bob Duff <duff@adacore.com>
113 * binde.adb (Force_Elab_Order): Give an error if there are duplicate
116 2018-01-11 Ed Schonberg <schonberg@adacore.com>
118 * sem_ch6.adb (Freeze_Expr_Types): If an access value is the
119 controlling argument of a dispatching call. freeze the corresponding
122 2018-01-11 Ben Brosgol <brosgol@adacore.com>
124 * doc/Makefile: Add Sphinx option -W to treat warnings as errors.
126 2018-01-11 Ben Brosgol <brosgol@adacore.com>
128 * doc/gnat_rm/implementation_defined_aspects.rst: Minor type/wording
130 * gnat_rm.texi: Regenerate.
132 2018-01-11 Ed Schonberg <schonberg@adacore.com>
134 * sem_ch12.adb (Check_Fixed_Point_Type): Do not apply check if the
135 formsl type corresponding to the actual fixed point type is private,
136 because in this case there can be no suspicious arithmetic operations
137 in the generic unless they reference a formal subprogram. Clarify
140 2018-01-11 Javier Miranda <miranda@adacore.com>
142 * exp_util.adb (Remove_Side_Effects): No action done for functions
143 returning class-wide types since it requires generating code using
144 'reference and the CCG target has no secondary stack.
145 * gnat1drv.adb: Disable building static dispatch tables when generating
148 2018-01-11 Piotr Trojanek <trojanek@adacore.com>
150 * libgnat/a-direio.ads, libgnat/a-sequio.ads, libgnat/a-ststio.ads,
151 libgnat/a-textio.ads, libgnat/a-witeio.ads, libgnat/a-ztexio.ads
152 (File_Type): Add Default_Initial_Condition aspect.
154 2018-01-11 Pascal Obry <obry@adacore.com>
156 * libgnat/s-os_lib.adb (Normalize_Pathname): New implementation.
158 2018-01-11 Bob Duff <duff@adacore.com>
160 * doc/gnat_ugn/gnat_utility_programs.rst: Rewrite gnatpp documentation
161 to match what the Libadalang-based version does.
162 * doc/gnat_ugn/about_this_guide.rst: Update reference.
164 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
166 * sem_res.adb (Uses_SS): A controlled type requires the secondary stack
167 if it contains at least one component declaration employing a function
168 call returning on the secondary stack.
170 2018-01-11 Yannick Moy <moy@adacore.com>
172 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
173 Update description of restriction SPARK_05 with SPARK 2014.
174 * gnat_rm.texi: Regenerate.
176 2018-01-11 Vasiliy Fofanov <fofanov@adacore.com>
178 * doc/gnat_ugn/gnat_utility_programs.rst: Fix layout.
180 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
182 * exp_aggr.adb, exp_ch9.adb, exp_util.adb, sem_aggr.adb, sem_ch3.adb,
183 sem_res.adb, sem_util.adb: Minor reformatting.
185 2018-01-11 Ed Schonberg <schonberg@adacore.com>
187 * sem_prag.adb (Analyze_Pragma, case Predicate): Indicate that the type
188 has a delayed aspect which must be processed at the point the type is
189 frozen. This mimics what is done when the predicate is provided by a
192 2018-01-11 Doug Rupp <rupp@adacore.com>
194 * init.c (vxworks): Add macro checks for __aarch64__.
196 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
198 * exp_util.adb (Add_Failure_Expression): New routine.
199 (Make_Predicate_Check): Reimplement the handling of Predicate_Failure.
200 * sem_util.adb (Is_Current_Instance): Code cleanup.
202 2018-01-11 Patrick Bernardi <bernardi@adacore.com>
204 * libgnat/s-parame*.adb, libgnat/s-parame*.ads: Remove unneeded
205 Default_Sec_Stack_Size.
206 * libgnat/s-secsta.adb (SS_Allocate): Handle the fixed secondary stack
207 limit check so that the integer index does not overflow. Check the
208 dynamic stack allocation does not cause the secondary stack pointer to
210 (SS_Info): Align colons.
211 (SS_Init): Cover the case when bootstraping with an old compiler that
212 does not set Default_SS_Size.
214 2018-01-11 Ed Schonberg <schonberg@adacore.com>
216 * sem_ch3.adb (Add_Internal_Interface_Entities): When checking the
217 legality of an inherited operation that may require overriding, ignore
218 primitive_wrappers that correspond to explicit operations that override
219 an interface primitive.
220 * exp_util.adb (Build_Class_Wide_Expression, Replace_Entity): If the
221 operation to which the class-wide expression applies is a protected op.
222 with a primitive_wrapper, verify that the updated inherited expression
223 does not contain an internal call to a protected function. This
224 completes the implementation of AI12-0166.
226 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
228 * ali.adb: Document the remaining letters available for ALI lines.
229 (Scan_ALI): A with clause is internal when it is encoded on a 'Z' line.
230 * ali.ads: Update type With_Record. Field
231 Implicit_With_From_Instantiation is no longer in use. Add field
233 * csinfo.adb (CSinfo): Remove the setup for attribute
234 Implicit_With_From_Instantiation.
235 * lib-writ.adb (Collect_Withs): Correct the logic which marks a unit as
236 either implicitly or explicitly withed.
237 (Is_Implicit_With_Clause): New routine.
238 (Write_ALI): Rename array Implicit_With to Has_Implicit_With to avoid
239 confusion with the with clause attribute by the same name.
240 (Write_With_Lines): Update the emission of 'W', 'Y', and 'Z' headers.
241 * rtsfind.adb (Maybe_Add_With): Code cleanup.
242 * sem_ch8.adb (Present_System_Aux): Code cleanup.
243 * sem_ch10.adb (Expand_With_Clause): Mark the with clause as generated
245 (Implicit_With_On_Parent): Mark the with clause as generated for a
247 * sem_ch12.adb (Inherit_Context): With clauses inherited by an
248 instantiation are no longer marked as Implicit_With_From_Instantiation
249 because they are already marked as implicit.
250 * sem_elab.adb (Ensure_Prior_Elaboration_Static): Remove the kludge
251 which marks implicit with clauses as related to an instantiation.
252 * sinfo.adb (Implicit_With_From_Instantiation): Removed.
253 (Parent_With): New routine.
254 (Set_Implicit_With_From_Instantiation): Removed.
255 (Set_Parent_With): New routine.
256 * sinfo.ads: Update the documentation of attribute Implicit_With.
257 Remove attribute Implicit_With_From_Instantiation along with
258 occurrences in nodes. Add attribute Parent_With along with occurrences
260 (Implicit_With_From_Instantiation): Removed along with pragma Inline.
261 (Parent_With): New routine along with pragma Inline.
262 (Set_Implicit_With_From_Instantiation): Removed along with pragma Inline.
263 (Set_Parent_With): New routine along with pragma Inline.
265 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
267 * sem_util.adb (Find_Enclosing_Scope): Return the unique defining
268 entity when the enclosing construct is a body.
270 2018-01-11 Patrick Bernardi <bernardi@adacore.com>
272 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Simplified
273 Secondary_Stack_Size handling as a pragma is now generated for the
274 corresponding aspect instead of an attribute. Pragma expression is
275 relocated instead of evaluated. Discriminant of the corresponding
276 record type is referenced rather than the type discriminant.
277 (Create_Secondary_Stack_For_Task, Make_Task_Create_Call): Update
278 Secondary_Stack_Size rep item checks to only look for the pragma rep.
279 * sem_ch13.adb (Analyze_One_Aspect): Transform
280 Aspect_Secondary_Stack_Size into a pragma instead of an attribute
281 because the attribute does not have visibility on a task type's
282 discriminants when the type's definition is expanded.
283 (Analyze_Attribute_Definition_Clause): Remove handling of
284 Attribute_Secondary_Stack_Size.
285 * snames.adb-tmpl, snames.ads-tmpl: Remove
286 Attribute_Secondary_Stack_Size, no longer used.
288 2018-01-11 Justin Squirek <squirek@adacore.com>
290 * sem_ch8.adb: Minor comment fix.
292 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
294 * exp_ch4.adb (Process_Action): Do not abandon the inspection of an
295 individual action because the action may denote a complex expression,
296 such as a case statement, which in turn may contain additional
299 2018-01-11 Ed Schonberg <schonberg@adacore.com>
301 * sem_aggr.adb (Resolve_Iterated_Component_Association): Perform
302 analysis on a copy of the expression with a copy of the index variable,
303 because full expansion will rewrite construct into a loop with the
304 original loop variable.
305 * exp_aggr.adb (Gen_Assign): Defer analysis and resolution if the
306 expression is an iterated component association. Full analysis takes
307 place when construct is rewritten as a loop.
308 (In_Place_Assign_OK, Safe_Component): An iterated_component_association
309 is not safe for in-place assignment.
310 * sem_util.adb (Remove_Entity): Handle properly the case of an isolated
311 entity with no homonym and no other entity in the scope.
313 2018-01-11 Justin Squirek <squirek@adacore.com>
315 * sem_prag.adb (Analyze_Pragma:Pragma_Loop_Variant): Modify error
316 message to be printed on the pragma argument identifier.
318 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
320 * exp_util.adb (Build_Invariant_Procedure_Declaration): Set the last
321 entity of the generated invariant procedure in order to construct a
324 2018-01-11 Piotr Trojanek <trojanek@adacore.com>
326 * sem_ch13.adb (Build_Predicate_Functions): Fix minor issues in
329 2018-01-11 Arnaud Charlet <charlet@adacore.com>
331 * einfo.ads, einfo.adb (Activation_Record_Component,
332 Set_Activation_Record_Component, Set_Is_Uplevel_Referenced_Entity):
333 Allow E_Discriminant.
335 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
337 * gcc-interface/decl.c (gnat_to_gnu_component_type): Apply the check
338 for atomic access once the component size is taken into account and
339 also do it if the component type is Atomic or Volatile_Full_Access.
341 2018-01-04 Eric Botcazou <ebotcazou@adacore.com>
343 * gnatvsn.ads: Bump copyright year.
345 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
346 Alan Hayward <alan.hayward@arm.com>
347 David Sherwood <david.sherwood@arm.com>
349 * gcc-interface/misc.c (enumerate_modes): Treat GET_MODE_BITSIZE
352 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
353 Alan Hayward <alan.hayward@arm.com>
354 David Sherwood <david.sherwood@arm.com>
356 * gcc-interface/misc.c (enumerate_modes): Treat GET_MODE_PRECISION
359 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
360 Alan Hayward <alan.hayward@arm.com>
361 David Sherwood <david.sherwood@arm.com>
363 * gcc-interface/utils.c (gnat_types_compatible_p): Handle
364 polynomial TYPE_VECTOR_SUBPARTS.
366 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
367 Alan Hayward <alan.hayward@arm.com>
368 David Sherwood <david.sherwood@arm.com>
370 * gcc-interface/misc.c (enumerate_modes): Handle polynomial
373 2018-01-03 Jakub Jelinek <jakub@redhat.com>
375 Update copyright years.
377 * gnat_ugn.texi: Bump @copying's copyright year.
378 * gnat_rm.texi: Likewise.
380 Copyright (C) 2018 Free Software Foundation, Inc.
382 Copying and distribution of this file, with or without modification,
383 are permitted in any medium without royalty provided the copyright
384 notice and this notice are preserved.