1 2017-01-12 Arnaud Charlet <charlet@adacore.com>
3 * gcc-interface/Makefile.in: Clean up VxWorks targets.
5 2017-01-12 Ed Schonberg <schonberg@adacore.com>
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.
11 2017-01-12 Ed Schonberg <schonberg@adacore.com>
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
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)).
24 2017-01-12 Yannick Moy <moy@adacore.com>
26 * gnat1drv.adb (Adjust_Global_Switches): Only
27 perform checking of exception mechanism when generating code.
29 2017-01-12 Justin Squirek <squirek@adacore.com>
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
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.
41 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
43 * exp_ch9.adb, sem_prag.adb, s-tassta.adb, sem_util.adb, s-tarest.adb,
44 sem_ch13.adb: Minor reformatting.
46 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
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
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
69 * exp_ch4.adb (Apply_Accessibility_Check): Guard against a
70 missing finalization primitive when the designated type was
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
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.
101 2017-01-12 Arnaud Charlet <charlet@adacore.com>
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.
108 2017-01-12 Patrick Bernardi <bernardi@adacore.com>
110 * sem_ch10.adb (Analyze_With_Clause): Removed code that turned
111 Configurable_Run_Time_Mode off when analysing with'ed predefined
114 2017-01-12 Gary Dismukes <dismukes@adacore.com>
116 * sem_prag.adb: Minor reformatting.
117 * sem_util.adb (Unique_Entity): fix result for
118 bodies of entry families.
120 2017-01-12 Justin Squirek <squirek@adacore.com>
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.
128 2017-01-12 Gary Dismukes <dismukes@adacore.com>
130 * exp_ch9.adb, s-secsta.adb, snames.ads-tmpl, exp_ch3.adb: Minor
132 * debug.adb: Minor comment fixes.
134 2017-01-12 Arnaud Charlet <charlet@adacore.com>
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
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
145 2017-01-12 Patrick Bernardi <bernardi@adacore.com>
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
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
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
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
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.
187 2017-01-12 Yannick Moy <moy@adacore.com>
189 * exp_spark.adb (Expand_SPARK_Potential_Renaming): Fix sloc of copied
192 2017-01-12 Justin Squirek <squirek@adacore.com>
194 * exp_attr.adb (Expand_N_Attribute_Reference):
195 Fix Finalization_Size case by properly resolving the type after
198 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
200 * exp_util.adb (Build_DIC_Procedure_Body): Semi-insert the body into
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.
206 2017-01-12 Justin Squirek <squirek@adacore.com>
208 * exp_ch6.adb (Expand_Call): Add guard to prevent
209 invariant checks from being created for internally generated
212 2017-01-12 Bob Duff <duff@adacore.com>
214 * lib-writ.ads: Remove incorrect comment.
216 2017-01-12 Javier Miranda <miranda@adacore.com>
218 * debug.adb (-gnatd.K): Enable generation of contract-only
219 procedures in CodePeer mode.
220 * contracts.adb (Build_And_Analyze_Contract_Only_Subprograms):
222 (Analyze_Contracts): Generate contract-only procedures if -gnatdK is
224 * scil_ll.ads, scil_ll.adb (Get_Contract_Only_Body_Name): New
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.
233 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
235 * exp_ch6.adb: Minor reformatting.
236 * spark_xrefs.ads: minor cleanup of comments for SPARK xrefs
238 2017-01-12 Bob Duff <duff@adacore.com>
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
247 * switch-b.adb: Parse -f switch.
249 2017-01-12 Justin Squirek <squirek@adacore.com>
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
256 * nlists.adb, nlists.ads (Prepend_New): New routine.
257 (Prepend_New_To): New routine.
259 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
261 * sinfo.ads: Minor reformatting.
263 2017-01-12 Gary Dismukes <dismukes@adacore.com>
265 * exp_util.adb, exp_util.ads, einfo.ads: Minor typo fixes and
268 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
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.
275 2017-01-12 Bob Duff <duff@adacore.com>
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.
289 2017-01-09 Hristian Kirtchev <kirtchev@adacore.com>
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
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
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
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
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
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
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
409 * sinfo.ads, sinfo.adb: Add new attribute Expression_Copy along with
411 (Expression_Copy): New routine along with pragma Inline.
412 (Set_Expression_Copy): New routine along with pragma Inline.
414 2017-01-06 Bob Duff <duff@adacore.com>
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.
421 2017-01-06 Bob Duff <duff@adacore.com>
423 * sem_prag.adb: Minor: remove pragma Warnings.
425 2017-01-06 Tristan Gingold <gingold@adacore.com>
427 * Makefile.rtl: Do not compile s-stchop by default.
429 2017-01-06 Patrick Bernardi <bernardi@adacore.com>
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.
437 2017-01-06 Ed Schonberg <schonberg@adacore.com>
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.
444 2017-01-06 Patrick Bernardi <bernardi@adacore.com>
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
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
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.
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.
486 2017-01-06 Pascal Obry <obry@adacore.com>
488 * a-direio.adb, a-direio.ads, a-sequio.adb, a-sequio.ads: Add Flush to
489 Sequential_IO and Direct_IO.
491 2017-01-06 Bob Duff <duff@adacore.com>
493 * snames.ads-tmpl (Renamed): New name for the pragma argument.
494 * par-ch2.adb: Allow the new pragma (with analysis deferred
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
509 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
511 * exp_ch9.adb: Minor reformatting.
513 2017-01-06 Tristan Gingold <gingold@adacore.com>
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
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.
524 2017-01-06 Bob Duff <duff@adacore.com>
526 * sinfo.ads, sinfo.adb (Map_Pragma_Name): Preparation work,
527 dummy implementation of Map_Pragma_Name.
529 2017-01-06 Tristan Gingold <gingold@adacore.com>
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
536 * s-tposen.ads (Entry_Body_Access): Moved from s-taprob,
537 now access to constant.
539 2017-01-06 Gary Dismukes <dismukes@adacore.com>
541 * einfo.ads, sem_res.adb, sem_attr.adb, sem_ch6.adb: Minor
542 reformatting and typo fixes.
544 2017-01-06 Bob Duff <duff@adacore.com>
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
551 * sinfo.ads, sinfo.adb (Pragma_Name_Mapped): Preparation work,
552 Dummy implementation of Pragma_Name_Mapped.
554 2017-01-06 Ed Schonberg <schonberg@adacore.com>
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
562 * sem_attr.adb: Minor reformatting.
564 2017-01-06 Justin Squirek <squirek@adacore.com>
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.
571 2017-01-06 Ed Schonberg <schonberg@adacore.com>
573 * einfo.ads, einfo.adb (Is_Entry_Wrapper): New flag, defined
574 on procedures that are wrappers created for entries that have
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
580 * exp_ch9.adb (Build_Contract_Wrapper): Set Is_Entry_Wrapper on
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
587 2017-01-06 Yannick Moy <moy@adacore.com>
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.
593 2017-01-06 Gary Dismukes <dismukes@adacore.com>
595 * s-tpobop.adb: Minor reformatting.
597 2017-01-06 Ed Schonberg <schonberg@adacore.com>
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.
603 2017-01-06 Tristan Gingold <gingold@adacore.com>
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
610 2017-01-06 Ed Schonberg <schonberg@adacore.com>
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.
619 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
621 * exp_attr.adb, sem_attr.ads: Minor reformatting.
623 2017-01-06 Justin Squirek <squirek@adacore.com>
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.
634 2017-01-06 Ed Schonberg <schonberg@adacore.com>
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.
641 2017-01-06 Tristan Gingold <gingold@adacore.com>
643 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Do not generate
644 max_queue_lengths_array if unused.
646 2017-01-06 Bob Duff <duff@adacore.com>
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
655 2017-01-06 Ed Schonberg <schonberg@adacore.com>
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
662 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
664 * exp_ch5.adb, sem_ch3.adb, checks.adb: Minor reformatting and
667 2017-01-06 Ed Schonberg <schonberg@adacore.com>
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.
685 2017-01-06 Tristan Gingold <gingold@adacore.com>
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.
691 2017-01-06 Gary Dismukes <dismukes@adacore.com>
693 * sem_util.ads: Minor typo fix and reformatting.
695 2017-01-06 Yannick Moy <moy@adacore.com>
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
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.
708 2017-01-06 Tristan Gingold <gingold@adacore.com>
710 * raise-gcc.c (abort): Macro to call Abort_Propagation.
711 * s-tpoben.ads (Protected_Entry_Queue_Max_Access): Make it access
713 * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
714 Do not generate the Entry_Max_Queue_Lengths_Array if all default
716 * exp_util.adb (Corresponding_Runtime_Package): Consider
717 Max_Queue_Length pragma.
719 2017-01-06 Justin Squirek <squirek@adacore.com>
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
732 * sem_prag.adb (Analyze_Pragma): Remove entry families restriction
734 2017-01-06 Yannick Moy <moy@adacore.com>
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
744 2017-01-06 Tristan Gingold <gingold@adacore.com>
746 * sem_util.adb, s-taprop-linux.adb (Finalize_TCB): Remove call to
747 Invalidate_Stack_Cache.
749 2017-01-06 Eric Botcazou <ebotcazou@adacore.com>
751 * s-os_lib.adb: Minor fix to the signature of Readlink.
753 2017-01-06 Javier Miranda <miranda@adacore.com>
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.
759 2017-01-06 Arnaud Charlet <charlet@adacore.com>
761 * exp_ch5.adb (Expand_N_If_Statement): Obey existing comment and
762 mark a rewritten if statement as explicit (Comes_From_Source).
764 2017-01-06 Gary Dismukes <dismukes@adacore.com>
766 * sem_prag.adb, rtsfind.adb, sem_util.adb: Minor typo fixes.
768 2017-01-06 Tristan Gingold <gingold@adacore.com>
770 * ada.ads, a-unccon.ads: Add pragma No_Elaboration_Code_All.
772 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
774 * sem_case.adb: Minor reformatting.
776 2017-01-06 Thomas Quinot <quinot@adacore.com>
778 * g-socthi-mingw.adb: Remove now extraneous USE TYPE clause
780 2017-01-06 Justin Squirek <squirek@adacore.com>
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
793 (Make_Initialize_Protection): Pass a reference to
794 the Entry_Max_Queue_Lengths_Array in the protected type node to
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.
817 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
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.
823 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
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
831 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
833 * sem_prag.adb, sem_ch8.adb: Minor reformatting.
835 2017-01-06 Ed Schonberg <schonberg@adacore.com>
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
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.
846 2017-01-06 Thomas Quinot <quinot@adacore.com>
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
851 2017-01-06 Bob Duff <duff@adacore.com>
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
857 * lib-writ.ads: Comment clarification.
858 * ali-util.ads: Minor comment fix.
859 * ali.adb: Minor reformatting.
861 2017-01-06 Tristan Gingold <gingold@adacore.com>
863 * a-exexpr-gcc.adb: Improve comment.
865 2017-01-03 James Cowgill <James.Cowgill@imgtec.com>
867 * s-linux-mips.ads: Use correct signal and errno constants.
868 (sa_handler_pos, sa_mask_pos): Fix offsets for 64-bit MIPS.
870 2017-01-03 James Cowgill <James.Cowgill@imgtec.com>
872 * s-linux-mips.ads: Rename from s-linux-mipsel.ads.
873 * gcc-interface/Makefile.in (MIPS/Linux): Merge mips and mipsel
876 2017-01-01 Eric Botcazou <ebotcazou@adacore.com>
878 * gnatvsn.ads: Bump copyright year.
880 2017-01-01 Jakub Jelinek <jakub@redhat.com>
882 * gnat_ugn.texi: Bump @copying's copyright year.
883 * gnat_rm.texi: Likewise.
885 Copyright (C) 2017 Free Software Foundation, Inc.
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.