04e5b8ad45a9b919c7cf124ea4909d5fe4d786b2
[gcc.git] / gcc / ada / ChangeLog
1 2017-01-12 Arnaud Charlet <charlet@adacore.com>
2
3 * gcc-interface/Makefile.in: Clean up VxWorks targets.
4
5 2017-01-12 Ed Schonberg <schonberg@adacore.com>
6
7 * sem_attr.adb (Analyze_Attribute_Reference, case Loop_Entry):
8 Hnadle properly the attribute reference when it appears as part
9 of an expression in another loop aspect.
10
11 2017-01-12 Ed Schonberg <schonberg@adacore.com>
12
13 * exp_ch3.adb (Check_Predicated_Discriminant): New procedure,
14 subsidiary of Build_Initialization_Call, to complete generation
15 of predicate checks on discriminants whose (sub)types have
16 predicates, and to add checks on variants that do not have an
17 others clause.
18 * sem_util.adb (Gather_Components): A missing Others alternative is
19 not an error when the type of the discriminant is a static predicate
20 (and coverage has been checked when analyzing the case statement). A
21 runtime check is generated to verify that a given discriminant
22 satisfies the predicate (RM 3.8.1. (21.1/2)).
23
24 2017-01-12 Yannick Moy <moy@adacore.com>
25
26 * gnat1drv.adb (Adjust_Global_Switches): Only
27 perform checking of exception mechanism when generating code.
28
29 2017-01-12 Justin Squirek <squirek@adacore.com>
30
31 * exp_ch7.adb (Add_Type_Invariants, Process_Array_Component):
32 Remove handling of access component with invariant.
33 (Build_Invariant_Procedure_Declaration): Remove return on class
34 wide type.
35 * freeze.adb (Freeze_Array_Type, Freeze_Record_Type): Remove
36 conditional exception for component or array so Has_Own_Invariants
37 flag is not falsly set.
38 * sem_ch3.adb (Make_Class_Wide_Type): Initialize copy of class
39 wide type to have no invariant flags.
40
41 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
42
43 * exp_ch9.adb, sem_prag.adb, s-tassta.adb, sem_util.adb, s-tarest.adb,
44 sem_ch13.adb: Minor reformatting.
45
46 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
47
48 * exp_aggr.adb (Build_Record_Aggr_Code): Guard against a missing
49 adjustment primitive when the ancestor type was not properly frozen.
50 (Gen_Assign): Guard against a missing initialization
51 primitive when the component type was not properly frozen.
52 (Initialize_Array_Component): Guard against a missing adjustment
53 primitive when the component type was not properly frozen.
54 (Initialize_Record_Component): Guard against a missing adjustment
55 primitive when the component type was not properly frozen.
56 (Process_Transient_Component_Completion): The transient object may
57 not be finalized when its associated type was not properly frozen.
58 * exp_ch3.adb (Build_Assignment): Guard against a missing
59 adjustment primitive when the component type was not properly frozen.
60 (Build_Initialization_Call): Guard against a missing
61 initialization primitive when the associated type was not properly
62 frozen.
63 (Expand_N_Object_Declaration): Guard against a missing
64 adjustment primitive when the base type was not properly frozen.
65 (Predefined_Primitive_Bodies): Create an empty Deep_Adjust
66 body when there is no adjustment primitive available. Create an
67 empty Deep_Finalize body when there is no finalization primitive
68 available.
69 * exp_ch4.adb (Apply_Accessibility_Check): Guard against a
70 missing finalization primitive when the designated type was
71 not properly frozen.
72 (Expand_N_Allocator): Guard against a missing initialization primitive
73 when the designated type was not properly frozen.
74 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add the adjustment call
75 only when the corresponding adjustment primitive is available.
76 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Generate the
77 adjustment/finalization statements only when there is an available
78 primitive to carry out the action.
79 (Build_Initialize_Statements): Generate the initialization/finalization
80 statements only when there is an available primitive to carry out the
81 action.
82 (Make_Adjust_Call): Do not generate a call when the underlying
83 type is not present due to a possible missing full view.
84 (Make_Final_Call): Do not generate a call when the underlying
85 type is not present due to a possible missing full view.
86 (Make_Finalize_Address_Stmts): Generate an empty body when the
87 designated type lacks a finalization primitive.
88 (Make_Init_Call): Do not generate a call when the underlying type is
89 not present due to a possible missing full view.
90 (Process_Component_For_Adjust): Add the adjustment call only when the
91 corresponding adjustment primitive is available.
92 (Process_Component_For_Finalize): Add the finalization call only when
93 the corresponding finalization primitive is available.
94 (Process_Object_Declaration): Use a null statement to emulate a
95 missing call to the finalization primitive of the object type.
96 * exp_ch7.ads (Make_Adjust_Call): Update the comment on usage.
97 (Make_Final_Call): Update the comment on usage.
98 (Make_Init_Call): Update the comment on usage.
99 * exp_util.adb (Build_Transient_Object_Statements): Code reformatting.
100
101 2017-01-12 Arnaud Charlet <charlet@adacore.com>
102
103 * einfo.ads: Update documentation of Address_Taken.
104 * sem_attr.adb (Analyze_Access_Attribute, Resolve_Attribute
105 [Access_Attribute]): Only consider 'Access/'Unchecked_Access
106 for subprograms when setting Address_Taken flag.
107
108 2017-01-12 Patrick Bernardi <bernardi@adacore.com>
109
110 * sem_ch10.adb (Analyze_With_Clause): Removed code that turned
111 Configurable_Run_Time_Mode off when analysing with'ed predefined
112 libraries.
113
114 2017-01-12 Gary Dismukes <dismukes@adacore.com>
115
116 * sem_prag.adb: Minor reformatting.
117 * sem_util.adb (Unique_Entity): fix result for
118 bodies of entry families.
119
120 2017-01-12 Justin Squirek <squirek@adacore.com>
121
122 * sem_prag.adb (Analyze_Pragma): Add appropriate calls to
123 Resolve_Suppressible in the pragma Assertion_Policy case.
124 (Resolve_Suppressible): Created this function to factor out
125 common code used to resolve Suppress to either Ignore or Check
126 * snames.ads-tmpl: Add name for Suppressible.
127
128 2017-01-12 Gary Dismukes <dismukes@adacore.com>
129
130 * exp_ch9.adb, s-secsta.adb, snames.ads-tmpl, exp_ch3.adb: Minor
131 reformatting.
132 * debug.adb: Minor comment fixes.
133
134 2017-01-12 Arnaud Charlet <charlet@adacore.com>
135
136 * sem_util.adb (Unique_Entity): For concurrent
137 bodies that are defined with stubs and complete a declaration
138 of a single concurrent object return the entity of an implicit
139 concurrent type, not the entity of the anonymous concurrent
140 object.
141 * debug.adb: -gnatd.J is no longer used.
142 * make.adb (Globalize): Removed, no longer used.
143 * sem_ch9.adb: minor typo in comment for entry index
144
145 2017-01-12 Patrick Bernardi <bernardi@adacore.com>
146
147 * aspect.adb, aspect.ads: Added new aspect Secondary_Stack_Size.
148 * exp_ch3.adb (Build_Init_Statements): As part of initialising
149 the value record of a task, set its _Secondary_Stack_Size field
150 if present.
151 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Create
152 a _Secondary_Stack_Size field in the value record of
153 the task if a Secondary_Stack_Size rep item is present.
154 (Make_Task_Create_Call): Include secondary stack size
155 parameter. If No_Secondary_Stack restriction is in place, passes
156 stack size of 0.
157 * par-prag.adb, sem_prag.adb, sem_prag.ads: Added new pragma
158 Secondary_Stack_Size.
159 * s-secsta.adb, s-secsta.ads (Minimum_Secondary_Stack_Size): New
160 function to define the overhead of the secondary stack.
161 * s-tarest.adb (Create_Restricted_Task,
162 Create_Restricted_Task_Sequential): Functions now include
163 Secondary_Stack_Size parameter to pass to Initialize_ATCB.
164 * s-tarest.adb (Create_Restricted_Task,
165 Create_Restricted_Task_Sequential): Calls to Initialize_ATCB now
166 include Secondary_Stack_Size parameter.
167 (Task_Wrapper): Secondary stack now allocated to the size specified by
168 the Secondary_Stack_Size parameter in the task's ATCB.
169 * s-taskin.adb, s-taskin.adb (Common_ATCB, Initialize_ATCB): New
170 Secondary_Stack_Size component.
171 * s-tassta.adb, s-tassta.ads (Create_Restricted_Task,
172 Create_Restricted_Task_Sequential): Function now include
173 Secondary_Stack_Size parameter.
174 (Task_Wrapper): Secondary stack now allocated to the size
175 specified by the Secondary_Stack_Size parameter in the task's
176 ATCB.
177 * s-tproft.adb (Register_Foreign_Thread): Amended Initialize_ATCB call
178 to include Secondary_Stack_Size parameter.
179 * sem_ch13.adb (Analyze_Aspect_Specification): Add support for
180 Secondary_Stack_Size aspect, turning the aspect into its corresponding
181 internal attribute.
182 (Analyze_Attribute_Definition): Process Secondary_Stack_Size attribute.
183 * snames.adb-tmpl, snames.ads-tmpl: Added names
184 Name_Secondary_Stack_Size, Name_uSecondary_Stack_Size,
185 Attribute_Secondary_Stack_Size and Pragma_Secondary_Stack_Size.
186
187 2017-01-12 Yannick Moy <moy@adacore.com>
188
189 * exp_spark.adb (Expand_SPARK_Potential_Renaming): Fix sloc of copied
190 subtree.
191
192 2017-01-12 Justin Squirek <squirek@adacore.com>
193
194 * exp_attr.adb (Expand_N_Attribute_Reference):
195 Fix Finalization_Size case by properly resolving the type after
196 rewritting the node.
197
198 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
199
200 * exp_util.adb (Build_DIC_Procedure_Body): Semi-insert the body into
201 the tree.
202 (Build_DIC_Procedure_Declaration): Semi-insert the body into the tree.
203 * binde.adb, exp_ch5.adb, sem_type.adb, sem.ads, sem_res.adb,
204 exp_sel.ads: Minor reformatting.
205
206 2017-01-12 Justin Squirek <squirek@adacore.com>
207
208 * exp_ch6.adb (Expand_Call): Add guard to prevent
209 invariant checks from being created for internally generated
210 subprograms.
211
212 2017-01-12 Bob Duff <duff@adacore.com>
213
214 * lib-writ.ads: Remove incorrect comment.
215
216 2017-01-12 Javier Miranda <miranda@adacore.com>
217
218 * debug.adb (-gnatd.K): Enable generation of contract-only
219 procedures in CodePeer mode.
220 * contracts.adb (Build_And_Analyze_Contract_Only_Subprograms):
221 New subprogram.
222 (Analyze_Contracts): Generate contract-only procedures if -gnatdK is
223 set.
224 * scil_ll.ads, scil_ll.adb (Get_Contract_Only_Body_Name): New
225 subprogram.
226 (Get_Contract_Only_Missing_Body_Name): New subprogram.
227 (Get_Contract_Only_Body): New subprogram.
228 (Set_Contract_Only_Body): New subprogram.
229 (Is_Contract_Only_Body): New subprogram.
230 (Set_Is_Contract_Only_Body): New subprogram.
231 (SCIL_Nodes): Replace table by hash-table.
232
233 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
234
235 * exp_ch6.adb: Minor reformatting.
236 * spark_xrefs.ads: minor cleanup of comments for SPARK xrefs
237
238 2017-01-12 Bob Duff <duff@adacore.com>
239
240 * binde.adb (Forced): New reason for a dependence.
241 (Force_Elab_Order): Implementation of the new switch.
242 * binde.ads: Minor comment fixes.
243 * bindusg.adb: Add -f switch. Apparently, there was an -f switch
244 long ago that is no longer supported; removed comment about that.
245 * opt.ads (Force_Elab_Order_File): Name of file specified for
246 -f switch.
247 * switch-b.adb: Parse -f switch.
248
249 2017-01-12 Justin Squirek <squirek@adacore.com>
250
251 * exp_ch6.adb (Check_View_Conversion): Created this function
252 to properly chain calls to check type invariants that may be
253 present in a subprogram call after the subprogram.
254 (Expand_Call): Add a conditional to identify when a view conversion
255 needs to be checked.
256 * nlists.adb, nlists.ads (Prepend_New): New routine.
257 (Prepend_New_To): New routine.
258
259 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
260
261 * sinfo.ads: Minor reformatting.
262
263 2017-01-12 Gary Dismukes <dismukes@adacore.com>
264
265 * exp_util.adb, exp_util.ads, einfo.ads: Minor typo fixes and
266 reformatting.
267
268 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
269
270 * exp_ch6.adb (Make_Build_In_Place_Call_In_Anonymous_Context): Add new
271 variable Definite. Create a local object and pass its 'Access to the
272 BIP function when the result type is either definite or it does not
273 require any finalization or secondary stack management.
274
275 2017-01-12 Bob Duff <duff@adacore.com>
276
277 * contracts.adb, einfo.adb, errout.adb, exp_attr.adb,
278 exp_ch3.adb, exp_ch7.adb, exp_ch9.adb, exp_prag.adb, freeze.adb,
279 frontend.adb, ghost.adb, inline.adb, lib-writ.adb, lib-xref.adb,
280 par.adb, par-ch10.adb, par-ch2.adb, par-prag.adb, par_sco.adb,
281 sem_attr.adb, sem_aux.adb, sem_ch10.adb, sem_ch12.adb,
282 sem_ch13.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb, sem_elab.adb,
283 sem_prag.adb, sem_res.adb, sem_util.adb, sem_util.ads,
284 sem_warn.adb, sinfo.adb, sinfo.ads, sprint.adb (Pragma_Name):
285 Change name to Pragma_Name_Unmapped.
286 (Pragma_Name_Mapped): Change name to Pragma_Name.
287 This is because the "mapped" version should be the usual case.
288
289 2017-01-09 Hristian Kirtchev <kirtchev@adacore.com>
290
291 * einfo.ads, einfo.adb: Remove uses of flags Has_Default_Init_Cond,
292 Is_Default_Init_Cond_Procedure, and
293 Has_Inherited_Default_Init_Cond. Add uses of flags
294 Has_Own_DIC, Is_DIC_Procedure, and Has_Inherited_DIC.
295 (Default_Init_Cond_Procedure): Removed.
296 (DIC_Procedure): New routine.
297 (Has_Default_Init_Cond): Removed.
298 (Has_DIC): New routine.
299 (Has_Inheritable_Invariants): The attribute applies to the base type.
300 (Has_Inherited_Default_Init_Cond): Removed.
301 (Has_Inherited_DIC): New routine.
302 (Has_Inherited_Invariants): The attribute applies to the base type.
303 (Has_Own_DIC): New routine.
304 (Has_Own_Invariants): The attribute applies to the base type.
305 (Is_Default_Init_Cond_Procedure): Removed.
306 (Is_DIC_Procedure): New routine.
307 (Set_Default_Init_Cond_Procedure): Removed.
308 (Set_DIC_Procedure): New routine.
309 (Set_Has_Default_Init_Cond): Removed.
310 (Set_Has_Inheritable_Invariants): The attribute applies
311 to the base type.
312 (Set_Has_Inherited_Default_Init_Cond): Removed.
313 (Set_Has_Inherited_DIC): New routine.
314 (Set_Has_Inherited_Invariants): The attribute applies to the base type.
315 (Set_Has_Own_DIC): New routine.
316 (Set_Has_Own_Invariants): The attribute applies to the base type.
317 (Set_Is_Default_Init_Cond_Procedure): Removed.
318 (Set_Is_DIC_Procedure): New routine.
319 (Write_Entity_Flags): Update the output of all flags related to
320 default initial condition.
321 * exp_ch3.adb (Expand_N_Object_Declaration): Update the generation
322 of the call to the DIC procedure.
323 (Freeze_Type): Generate the body of the DIC procedure.
324 * exp_ch7.adb (Build_Invariant_Procedure_Body): Replace
325 all occurrences of Create_Append with Append_New_To. Do
326 not generate an invariant procedure for a class-wide type.
327 The generated body acts as a freeze action of the working type.
328 (Build_Invariant_Procedure_Declaration): Do not generate an
329 invariant procedure for a class-wide type.
330 (Create_Append): Removed.
331 * exp_util.adb: Add with and use clauses for Sem_Ch3, sem_ch6,
332 sem_Ch12, Sem_Disp, and GNAT.HTable. Move the handling of
333 class-wide pre/postcondition description and data structures from
334 Sem_Prag.
335 (Build_Class_Wide_Expression): Moved from Sem_Prag.
336 (Build_DIC_Call): New routine.
337 (Build_DIC_Procedure_Body): New routine.
338 (Build_DIC_Procedure_Declaration): New routine.
339 (Entity_Hash): Moved from Sem_Prag.
340 (Find_DIC_Type): New routine.
341 (Update_Primitives_Mapping): Reimplemented.
342 (Update_Primitives_Mapping_Of_Types): New routine.
343 * exp_util.ads (Build_Class_Wide_Expression): Moved from Sem_Prag.
344 (Build_DIC_Call): New routine.
345 (Build_DIC_Procedure_Body): New routine.
346 (Build_DIC_Procedure_Declaration): New routine.
347 (Update_Primitives_Mapping): Moved from Sem_Prag.
348 (Update_Primitives_Mapping_Of_Types): New routine.
349 * nlists.adb (Append_New): New routine.
350 (Append_New_To): New routine.
351 * nlists.ads (Append_New): New routine.
352 (Append_New_To): New routine.
353 * sem_ch3.adb (Analyze_Declarations): Do not generate the bodies
354 of DIC procedures here. This is now done at the end of the
355 visible declarations, private declarations, and at the freeze
356 point of a type.
357 (Analyze_Private_Extension_Declaration):
358 A private extension inherits the DIC pragma of a parent type.
359 (Analyze_Subtype_Declaration): No need to propagate invariant
360 attributes to a subtype as those apply to the base type.
361 (Build_Derived_Record_Type): No need to inherit invariants here
362 as this is now done in Build_Derived_Type.
363 (Build_Derived_Type): Inherit both the DIC pragma and invariants from
364 a parent type.
365 (Process_Full_View): Update the propagation of DIC attributes.
366 (Propagate_Default_Init_Cond_Attributes): Removed.
367 * sem_ch7.adb Add with and use clauses for Exp_Util.
368 (Analyze_Package_Specification): Create the body of the DIC
369 procedure at the end of the visible and private declarations.
370 (Preserve_Full_Attributes): Propagate DIC attributes.
371 * sem_ch9.adb (Analyze_Protected_Type_Declaration): Propagate
372 DIC attributes.
373 (Analyze_Task_Type_Declaration): Propagate DIC attributes.
374 * sem_elab.adb (Check_A_Call): Update the call to
375 Is_Nontrivial_Default_Init_Cond_Procedure.
376 * sem_prag.adb Remove the with and use clauses for
377 GNAT.HTable. Move the handling of class- wide pre/postcondition
378 description and data structures to Exp_Util.
379 (Analyze_Pragma): Create the declaration of the DIC procedure. There
380 is no need to propagate invariant-related attributes at this point
381 as this is done in Build_Invariant_Procedure_Declaration.
382 (Build_Class_Wide_Expression): Moved to Exp_Util.
383 (Entity_Hash): Moved to Exp_Util.
384 (Update_Primitives_Mapping): Moved to Exp_Util.
385 * sem_prag.ads (Build_Class_Wide_Expression): Moved to Exp_Util.
386 (Update_Primitives_Mapping): Moved to Exp_Util.
387 * sem_util.adb: Remove with and use clauses for Ghost
388 and Sem_Ch13.
389 (Build_Default_Init_Cond_Call): Removed.
390 (Build_Default_Init_Cond_Procedure_Bodies): Removed.
391 (Build_Default_Init_Cond_Procedure_Declaration): Removed.
392 (Get_Views): Reimplemented.
393 (Has_Full_Default_Initialization): Reimplement the section on DIC.
394 (Inherit_Default_Init_Cond_Procedure): Removed.
395 (Is_Nontrivial_Default_Init_Cond_Procedure): Removed.
396 (Is_Nontrivial_DIC_Procedure): New routine.
397 (Is_Verifiable_DIC_Pragma): New routine.
398 (Propagate_DIC_Attributes): New routine.
399 * sem_util.ads (Build_Default_Init_Cond_Call): Removed.
400 (Build_Default_Init_Cond_Procedure_Bodies): Removed.
401 (Build_Default_Init_Cond_Procedure_Declaration): Removed.
402 (Inherit_Default_Init_Cond_Procedure): Removed.
403 (Is_Nontrivial_Default_Init_Cond_Procedure): Removed.
404 (Is_Nontrivial_DIC_Procedure): New routine.
405 (Is_Verifiable_DIC_Pragma): New routine.
406 (Propagate_DIC_Attributes): New routine.
407 * sem_warn.adb (Is_OK_Fully_Initialized): Reimplement the section
408 on DIC.
409 * sinfo.ads, sinfo.adb: Add new attribute Expression_Copy along with
410 usage in nodes.
411 (Expression_Copy): New routine along with pragma Inline.
412 (Set_Expression_Copy): New routine along with pragma Inline.
413
414 2017-01-06 Bob Duff <duff@adacore.com>
415
416 * bindgen.adb (Gen_Adainit, Gen_Adafinal): Change
417 "Bind_Main_Program" to "not Bind_For_Library", because otherwise
418 we won't generate the call to s_stalib_adafinal when the main
419 is not written in Ada.
420
421 2017-01-06 Bob Duff <duff@adacore.com>
422
423 * sem_prag.adb: Minor: remove pragma Warnings.
424
425 2017-01-06 Tristan Gingold <gingold@adacore.com>
426
427 * Makefile.rtl: Do not compile s-stchop by default.
428
429 2017-01-06 Patrick Bernardi <bernardi@adacore.com>
430
431 * aspects.adb, aspects.ads, exp_ch3.adb, exp_ch9.adb, par-prag.adb,
432 sem_ch13.adb, sem_prag.adb, sem_prag.ads, snames.adb-tmpl,
433 snames.ads-tmpl, s-secsta.adb, s-secsta.ads, s-tarest.adb,
434 s-tarest.ads, s-taskin.adb, s-taskin.ads, s-tassta.adb, s-tassta.ads:
435 Reverted previous change for now.
436
437 2017-01-06 Ed Schonberg <schonberg@adacore.com>
438
439 * exp_ch3.adb (Build_Initialization_Call): Apply predicate
440 check to default discriminant value if checks are enabled.
441 (Build_Assignment): If type of component has static predicate,
442 apply check to its default value, if any.
443
444 2017-01-06 Patrick Bernardi <bernardi@adacore.com>
445
446 * aspect.adb, aspect.ads: Added new aspect Secondary_Stack_Size.
447 * exp_ch3.adb (Build_Init_Statements): As part of initialising
448 the value record of a task, set its _Secondary_Stack_Size field
449 if present.
450 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Create
451 a _Secondary_Stack_Size field in the value record of
452 the task if a Secondary_Stack_Size rep item is present.
453 (Make_Task_Create_Call): Include secondary stack size
454 parameter. If No_Secondary_Stack restriction is in place, passes
455 stack size of 0.
456 * par-prag.adb, sem_prag.adb, sem_prag.ads: Added new pragma
457 Secondary_Stack_Size.
458 * s-secsta.adb, s-secsta.ads (Minimum_Secondary_Stack_Size): New
459 function to define the overhead of the secondary stack.
460 * s-tarest.adb (Create_Restricted_Task,
461 Create_Restricted_Task_Sequential): Functions now include
462 Secondary_Stack_Size parameter to pass to Initialize_ATCB.
463 * s-tarest.adb (Create_Restricted_Task,
464 Create_Restricted_Task_Sequential): Calls to Initialize_ATCB
465 now include Secondary_Stack_Size parameter.
466 (Task_Wrapper):
467 Secondary stack now allocated to the size specified by the
468 Secondary_Stack_Size parameter in the task's ATCB.
469 * s-taskin.adb, s-taskin.adb (Common_ATCB, Initialise_ATCB): New
470 Secondary_Stack_Size component.
471 * s-tassta.adb, s-tassta.ads (Create_Restricted_Task,
472 Create_Restricted_Task_Sequential): Function now include
473 Secondary_Stack_Size parameter.
474 (Task_Wrapper): Secondary stack
475 now allocated to the size specified by the Secondary_Stack_Size
476 parameter in the task's ATCB.
477 * sem_ch13.adb (Analyze_Aspect_Specification): Add support
478 for Secondary_Stack_Size aspect, turning the aspect into its
479 corresponding internal attribute.
480 (Analyze_Attribute_Definition):
481 Process Secondary_Stack_Size attribute.
482 * snames.adb-tmpl, snames.ads-tmpl: Added names
483 Name_Secondary_Stack_Size, Name_uSecondary_Stack_Size,
484 Attribute_Secondary_Stack_Size and Pragma_Secondary_Stack_Size.
485
486 2017-01-06 Pascal Obry <obry@adacore.com>
487
488 * a-direio.adb, a-direio.ads, a-sequio.adb, a-sequio.ads: Add Flush to
489 Sequential_IO and Direct_IO.
490
491 2017-01-06 Bob Duff <duff@adacore.com>
492
493 * snames.ads-tmpl (Renamed): New name for the pragma argument.
494 * par-ch2.adb: Allow the new pragma (with analysis deferred
495 to Sem_Prag).
496 * sinfo.ads, sinfo.adb (Map_Pragma_Name, Pragma_Name_Mapped):
497 Keep a mapping from new pragma names to old names.
498 * sem_prag.adb: Check legality of pragma Rename_Pragma, and
499 implement it by calling Map_Pragma_Name.
500 * checks.adb, contracts.adb, einfo.adb, errout.adb,
501 * exp_attr.adb, exp_ch3.adb, exp_ch6.adb, exp_ch7.adb, exp_ch9.adb,
502 * exp_prag.adb, exp_util.adb, freeze.adb, frontend.adb, ghost.adb,
503 * inline.adb, lib-writ.adb, scans.adb, scans.ads, sem_attr.adb,
504 * sem_aux.adb, sem_ch10.adb, sem_ch13.adb, sem_ch6.adb, sem_ch9.adb,
505 * sem_elab.adb, sem_res.adb, sem_util.adb, sem_util.ads,
506 * sem_warn.adb: Call Pragma_Name_Mapped instead of Pragma_Name
507 as appropriate.
508
509 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
510
511 * exp_ch9.adb: Minor reformatting.
512
513 2017-01-06 Tristan Gingold <gingold@adacore.com>
514
515 * exp_ch9.ads, exp_ch9.adb (Build_Entry_Names): Remove (unused).
516 * rtsfind.ads (RE_Task_Entry_Names_Array, RO_ST_Set_Entry_Names)
517 (RE_Protected_Entry_Names_Array, RO_PE_Set_Entry_Names): Remove
518 (unused).
519 * s-taskin.ads, s-taskin.adb (Set_Entry_Names,
520 Task_Entry_Names_Array, Task_Entry_Names_Access): Remove.
521 * s-tpoben.ads, s-tpoben.adb (Set_Entry_Names,
522 Protected_Entry_Names_Array, Protected_Entry_Names_Access): Remove.
523
524 2017-01-06 Bob Duff <duff@adacore.com>
525
526 * sinfo.ads, sinfo.adb (Map_Pragma_Name): Preparation work,
527 dummy implementation of Map_Pragma_Name.
528
529 2017-01-06 Tristan Gingold <gingold@adacore.com>
530
531 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Make the
532 entry_body variable constant.
533 * s-taprob.ads (Entry_Body_Access): Move to s-tposen.
534 * s-tpoben.ads (Protected_Entry_Body_Access): Now access
535 to constant.
536 * s-tposen.ads (Entry_Body_Access): Moved from s-taprob,
537 now access to constant.
538
539 2017-01-06 Gary Dismukes <dismukes@adacore.com>
540
541 * einfo.ads, sem_res.adb, sem_attr.adb, sem_ch6.adb: Minor
542 reformatting and typo fixes.
543
544 2017-01-06 Bob Duff <duff@adacore.com>
545
546 * snames.ads-tmpl: New names for pragma renaming.
547 * snames.adb-tmpl (Is_Configuration_Pragma_Name): Minor cleanup.
548 * par-prag.adb: Add new pragma name to case statement.
549 * sem_prag.adb (Rename_Pragma): Initial cut at semantic analysis
550 of the pragma.
551 * sinfo.ads, sinfo.adb (Pragma_Name_Mapped): Preparation work,
552 Dummy implementation of Pragma_Name_Mapped.
553
554 2017-01-06 Ed Schonberg <schonberg@adacore.com>
555
556 * exp_ch6.adb (Expand_Protected_Subprogram_Call): Add guard to
557 better detect call within an entry_wrapper.
558 * sem_res.adb (Resolve_Call): A protected call within an
559 entity_wrapper is analyzed in the context of the protected
560 object but corresponds to a pre-analysis and is not an access
561 before elaboration.
562 * sem_attr.adb: Minor reformatting.
563
564 2017-01-06 Justin Squirek <squirek@adacore.com>
565
566 * sem_attr.adb (Analyze_Attribute): Modify semantic checks for
567 Finalization_Size to allow a prefix of any non-class-wide type.
568 * sem_attr.ads Modify comment for Finalization_Size to include
569 definite type use case.
570
571 2017-01-06 Ed Schonberg <schonberg@adacore.com>
572
573 * einfo.ads, einfo.adb (Is_Entry_Wrapper): New flag, defined
574 on procedures that are wrappers created for entries that have
575 preconditions.
576 * sem_ch6.adb (Analyze_Subrogram_Body_Helper): If the subprogram
577 body is an entry_wrapper, compile it in the context of the
578 synchronized type, because a precondition may refer to funtions
579 of the type.
580 * exp_ch9.adb (Build_Contract_Wrapper): Set Is_Entry_Wrapper on
581 body entity.
582 * exp_ch6.adb (Expand_Protected_Subprogram_Call): if the call is
583 within an Entry_Wrapper this is an external call whose target
584 is the synchronized object that is the actual in the call to
585 the wrapper.
586
587 2017-01-06 Yannick Moy <moy@adacore.com>
588
589 * sem_attr.adb (Analyze_Attribute/Attribute_Loop_Entry): Analyze node
590 in tree, which means not analyzing the previous prefix if the node has
591 been rewritten into its prefix.
592
593 2017-01-06 Gary Dismukes <dismukes@adacore.com>
594
595 * s-tpobop.adb: Minor reformatting.
596
597 2017-01-06 Ed Schonberg <schonberg@adacore.com>
598
599 * checks.adb (Ensure_Valid): Do not generate a validity check
600 within a generated predicate function, validity checks will have
601 been applied earlier when required.
602
603 2017-01-06 Tristan Gingold <gingold@adacore.com>
604
605 * s-tpoben.ads (Protection_Entries): Add comment and reorder
606 components for performances.
607 * s-tpobop.adb (PO_Do_Or_Queue): Implement Max_Queue_Length runtime
608 semantic.
609
610 2017-01-06 Ed Schonberg <schonberg@adacore.com>
611
612 * sem_eval.adb (Check_Expression_Against_Static_Predicate):
613 If expression is compile-time known and obeys a static predicate
614 it must be labelled as static, to prevent spurious warnings and
615 run-time errors, e.g. in case statements. This is relevant when
616 the expression is the result of constant-folding a type conversion
617 whose expression is a variable with a known static value.
618
619 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
620
621 * exp_attr.adb, sem_attr.ads: Minor reformatting.
622
623 2017-01-06 Justin Squirek <squirek@adacore.com>
624
625 * exp_attr.adb (Expand_N_Attribute_Reference): Add entry for
626 expansion of Finalization_Size attribute.
627 * sem_attr.adb (Analyze_Attribute): Add entry to check the
628 semantics of Finalization_Size.
629 (Eval_Attribute): Add null entry for Finalization_Size.
630 * sem_attr.ads: Add Finalization_Size to the implementation
631 dependent attribute list.
632 * snames.ads-tmpl: Add name entry for Finalization_Size attribute.
633
634 2017-01-06 Ed Schonberg <schonberg@adacore.com>
635
636 * sem_ch5.adb (Analyze_Loop_Statement): If the loop includes an
637 iterator specification with a serious syntactic error, transform
638 construct into an infinite loop in order to continue analysis
639 and prevent a compiler abort.
640
641 2017-01-06 Tristan Gingold <gingold@adacore.com>
642
643 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Do not generate
644 max_queue_lengths_array if unused.
645
646 2017-01-06 Bob Duff <duff@adacore.com>
647
648 * errout.adb (Set_Msg_Text): Protect against out-of-bounds
649 array access, in case "\" is at the end of Text.
650 * stylesw.adb (Set_Style_Check_Options): Don't include input
651 characters in the error message template, because they could
652 be control characters such as "\", which Errout will try to
653 interpret.
654
655 2017-01-06 Ed Schonberg <schonberg@adacore.com>
656
657 * sem_ch4.adb (Find_Indexing_Operations, Inspect_Declarations):
658 For a private type examine the visible declarations that follow
659 the partial view, not just the private declarations that follow
660 the full view.
661
662 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
663
664 * exp_ch5.adb, sem_ch3.adb, checks.adb: Minor reformatting and
665 code cleanup.
666
667 2017-01-06 Ed Schonberg <schonberg@adacore.com>
668
669 * exp_ch5.adb (Get_Default_Iterator): For a derived type, the
670 alias of the inherited op is the parent iterator, no need to
671 examine dispatch table positions which might not be established
672 yet if type is not frozen.
673 * sem_disp.adb (Check_Controlling_Formals): The formal of a
674 predicate function may be a subtype of a tagged type.
675 * sem_ch3.adb (Complete_Private_Subtype): Adjust inheritance
676 of representation items for the completion of a type extension
677 where a predicate applies to the partial view.
678 * checks.ads, checks.adb (Apply_Predicate_Check): Add optional
679 parameter that designates function whose actual receives a
680 predicate check, to improve warning message when the check will
681 lead to infinite recursion.
682 * sem_res.adb (Resolve_Actuals): Pass additional parameter to
683 Apply_Predicate_Check.
684
685 2017-01-06 Tristan Gingold <gingold@adacore.com>
686
687 * s-rident.ads (Profile_Info): Remove No_Entry_Queue from
688 Gnat_Extended_Ravenscar.
689 * exp_ch9.adb, s-tpoben.adb, s-tpoben.ads: Fix spelling.
690
691 2017-01-06 Gary Dismukes <dismukes@adacore.com>
692
693 * sem_util.ads: Minor typo fix and reformatting.
694
695 2017-01-06 Yannick Moy <moy@adacore.com>
696
697 * ghost.adb Minor fixing of references to SPARK RM.
698 (Check_Ghost_Context): Check whether reference is to a lvalue
699 before issuing an error about violation of SPARK RM 6.9(13)
700 when declaration has Ghost policy Check and reference has Ghost
701 policy Ignore.
702 * sem_util.adb Minor indentation.
703 * sem_ch10.adb (Analyze_Package_Body_Stub, Analyze_Protected_Body_Stub,
704 Analyze_Task_Body_Stub): Set Ekind of the defining identifier.
705 * sem_util.ads (Unique_Defining_Entity): Document the result
706 for package body stubs.
707
708 2017-01-06 Tristan Gingold <gingold@adacore.com>
709
710 * raise-gcc.c (abort): Macro to call Abort_Propagation.
711 * s-tpoben.ads (Protected_Entry_Queue_Max_Access): Make it access
712 constant.
713 * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
714 Do not generate the Entry_Max_Queue_Lengths_Array if all default
715 values.
716 * exp_util.adb (Corresponding_Runtime_Package): Consider
717 Max_Queue_Length pragma.
718
719 2017-01-06 Justin Squirek <squirek@adacore.com>
720
721 * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
722 Remove declaration generation in the case of
723 System_Tasking_Protected_Objects_Single_Entry being used,
724 and add a warning message when this is detected to occur.
725 (Make_Initialize_Protection): Remove reference pass in the case
726 of System_Tasking_Protected_Objects_Single_Entry.
727 * rtsfind.ads: Remove RE_Protected_Entry_Queue_Max
728 * s-tposen.adb (Initialize_Protection_Entry): Remove
729 Entry_Queue_Max parameter.
730 * s-tposen.ads: Remove the types use to store the entry queue
731 maximum.
732 * sem_prag.adb (Analyze_Pragma): Remove entry families restriction
733
734 2017-01-06 Yannick Moy <moy@adacore.com>
735
736 * sem_util.adb, sem_util.ads (Get_Enum_Lit_From_Pos): Strengthen
737 behavior of function, to also accept out of range positions
738 and raise Constraint_Error in such case, and to copy sloc from
739 literal if No_Location passed as location.
740 * uintp.adb, uintp.ads (UI_To_Int, UI_To_CC): Strengthen behavior
741 of functions to raise Constraint_Error in case of value not in
742 appropriate range.
743
744 2017-01-06 Tristan Gingold <gingold@adacore.com>
745
746 * sem_util.adb, s-taprop-linux.adb (Finalize_TCB): Remove call to
747 Invalidate_Stack_Cache.
748
749 2017-01-06 Eric Botcazou <ebotcazou@adacore.com>
750
751 * s-os_lib.adb: Minor fix to the signature of Readlink.
752
753 2017-01-06 Javier Miranda <miranda@adacore.com>
754
755 * sem_ch6.adb (Conforming_Types): Handle another
756 confusion between views in a nested instance with an actual
757 private type whose full view is not in scope.
758
759 2017-01-06 Arnaud Charlet <charlet@adacore.com>
760
761 * exp_ch5.adb (Expand_N_If_Statement): Obey existing comment and
762 mark a rewritten if statement as explicit (Comes_From_Source).
763
764 2017-01-06 Gary Dismukes <dismukes@adacore.com>
765
766 * sem_prag.adb, rtsfind.adb, sem_util.adb: Minor typo fixes.
767
768 2017-01-06 Tristan Gingold <gingold@adacore.com>
769
770 * ada.ads, a-unccon.ads: Add pragma No_Elaboration_Code_All.
771
772 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
773
774 * sem_case.adb: Minor reformatting.
775
776 2017-01-06 Thomas Quinot <quinot@adacore.com>
777
778 * g-socthi-mingw.adb: Remove now extraneous USE TYPE clause
779
780 2017-01-06 Justin Squirek <squirek@adacore.com>
781
782 * aspects.adb: Register aspect in Canonical_Aspect.
783 * aspects.ads: Associate qualities of Aspect_Max_Queue_Length
784 into respective tables.
785 * einfo.ads, einfo.adb: Add a new attribute for
786 handling the parameters for Pragma_Max_Entry_Queue
787 (Entry_Max_Queue_Lengths_Array) in E_Protected_Type. Subprograms
788 for accessing and setting were added as well.
789 * par-prag.adb (Prag): Register Pramga_Max_Entry_Queue.
790 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Emit
791 declaration for pramga arguments and store them in the protected
792 type node.
793 (Make_Initialize_Protection): Pass a reference to
794 the Entry_Max_Queue_Lengths_Array in the protected type node to
795 the runtime.
796 * rtsfind.adb: Minor grammar fix.
797 * rtsfind.ads: Register new types taken from the
798 runtime libraries RE_Protected_Entry_Queue_Max and
799 RE_Protected_Entry_Queue_Max_Array
800 * s-tposen.adb, s-tpoben.adb
801 (Initialize_Protection_Entry/Initialize_Protection_Entries):
802 Add extra parameter and add assignment to local object.
803 * s-tposen.ads, s-tpoben.ads: Add new types to
804 store entry queue maximums and a field to the entry object record.
805 * sem_ch13.adb (Analyze_Aspect_Specifications): Add case statement
806 for Aspect_Max_Queue_Length.
807 (Check_Aspect_At_Freeze_Point):
808 Add aspect to list of aspects that don't require delayed analysis.
809 * sem_prag.adb (Analyze_Pragma): Add case statement for
810 Pragma_Max_Queue_Length, check semantics, and register arugments
811 in the respective entry nodes.
812 * sem_util.adb, sem_util.ads Add functions Get_Max_Queue_Length
813 and Has_Max_Queue_Length
814 * snames.ads-tmpl: Add constant for the new aspect-name
815 Name_Max_Queue_Length and corrasponding pragma.
816
817 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
818
819 * exp_util.adb (Is_Controlled_Function_Call):
820 Reimplemented. Consider any node which has an entity as the
821 function call may appear in various ways.
822
823 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
824
825 * exp_attr.adb (Rewrite_Stream_Proc_Call): Use
826 an unchecked type conversion when performing a view conversion
827 to/from a private type. In all other cases use a regular type
828 conversion to ensure that any relevant checks are properly
829 installed.
830
831 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
832
833 * sem_prag.adb, sem_ch8.adb: Minor reformatting.
834
835 2017-01-06 Ed Schonberg <schonberg@adacore.com>
836
837 * sem_case.adb (Explain_Non_Static_Bound): Suppress cascaded
838 error on case expression that is an entity, when coverage is
839 incomplete and entity has a static value obtained by local
840 propagation.
841 (Handle_Static_Predicate): New procedure, subsidiary of
842 Check_Choices, to handle case alternatives that are either
843 subtype names or subtype indications involving subtypes that
844 have static predicates.
845
846 2017-01-06 Thomas Quinot <quinot@adacore.com>
847
848 * s-oscons-tmplt.c, g-socket.adb, g-socket.ads, g-sothco.ads:
849 (GNAT.Socket): Add support for Busy_Polling and Generic_Option
850
851 2017-01-06 Bob Duff <duff@adacore.com>
852
853 * sem_elab.adb (Activate_Elaborate_All_Desirable): Don't add
854 Elaborate_All(P) to P itself. That could happen in obscure cases,
855 and always introduced a cycle (P body must be elaborated before
856 P body).
857 * lib-writ.ads: Comment clarification.
858 * ali-util.ads: Minor comment fix.
859 * ali.adb: Minor reformatting.
860
861 2017-01-06 Tristan Gingold <gingold@adacore.com>
862
863 * a-exexpr-gcc.adb: Improve comment.
864
865 2017-01-03 James Cowgill <James.Cowgill@imgtec.com>
866
867 * s-linux-mips.ads: Use correct signal and errno constants.
868 (sa_handler_pos, sa_mask_pos): Fix offsets for 64-bit MIPS.
869
870 2017-01-03 James Cowgill <James.Cowgill@imgtec.com>
871
872 * s-linux-mips.ads: Rename from s-linux-mipsel.ads.
873 * gcc-interface/Makefile.in (MIPS/Linux): Merge mips and mipsel
874 sections.
875
876 2017-01-01 Eric Botcazou <ebotcazou@adacore.com>
877
878 * gnatvsn.ads: Bump copyright year.
879
880 2017-01-01 Jakub Jelinek <jakub@redhat.com>
881
882 * gnat_ugn.texi: Bump @copying's copyright year.
883 * gnat_rm.texi: Likewise.
884 \f
885 Copyright (C) 2017 Free Software Foundation, Inc.
886
887 Copying and distribution of this file, with or without modification,
888 are permitted in any medium without royalty provided the copyright
889 notice and this notice are preserved.