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