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