1 2017-01-13 Gary Dismukes <dismukes@adacore.com>
3 * bindgen.adb, sem_ch6.adb, binde.adb, exp_ch3.adb: Minor reformatting
6 2017-01-13 Javier Miranda <miranda@adacore.com>
8 * einfo.ads (Component_Bit_Offset): Fix documentation.
9 * sem_ch13.adb (Check_Record_Representation_Clause): Skip check
10 on record holes for components with unknown compile-time offsets.
12 2017-01-13 Bob Duff <duff@adacore.com>
14 * ali.ads, ali.adb (Static_Elaboration_Model_Used): Remove unused flag.
15 * g-locfil.ads: Minor comment fix.
17 2017-01-13 Bob Duff <duff@adacore.com>
19 * binde.adb (Elab_New): New elaboration order algorithm
20 that is expected to cause fewer ABE issues. This is a work in
21 progress. The new algorithm is currently disabled, and can be
22 enable by the -dp switch, or by modifying the Do_Old and Do_New
23 etc. flags and rebuilding. Experimental code is included to
24 compare the results of the old and new algorithms.
25 * binde.ads: Use GNAT.Dynamic_Tables instead of Table, so we
26 can have multiple of these tables, so the old and new algorithms
28 * bindgen.ads (Gen_Output_File): Pass Elab_Order as an 'in'
29 parameter of type array. This avoids the global variable, and
30 allows bounds checking (which is normally defeated by the tables
31 packages). It also ensures that the Elab_Order is read-only
33 * bindgen.adb: Pass Elab_Order as an 'in' parameter to all
34 subprograms that need it, as above.
35 * debug.adb: Document new -dp switch. Modify doc of old -do
37 * gnatbind.adb (Gnatbind): Make use of new interfaces to Binde
38 and Bindgen. Move writing of closure (-R and -Ra switches)
39 to Binde; that's more convenient.
41 2017-01-13 Ed Schonberg <schonberg@adacore.com>
43 * sem_ch6.adb (Analyze_Expression_Function): If the expression
44 function is a completion, all entities referenced in the
45 expression are frozen. As a consequence, a reference to an
46 uncompleted private type from an enclosing scope is illegal.
48 2017-01-13 Javier Miranda <miranda@adacore.com>
50 * sem_ch6.adb (Freeze_Expr_Types): New subprogram.
51 (Analyze_Subprogram_Body_Helper): At the occurrence of an
52 expression function declaration that is a completion, its
53 expression causes freezing (AI12-0103).
55 2017-01-13 Vadim Godunko <godunko@adacore.com>
57 * a-coinho-shared.adb: Fix memory leaks in Constant_Reference and
58 Reference functions of Ada.Containers.Indefinite_Holders.
60 2017-01-13 Bob Duff <duff@adacore.com>
62 * s-os_lib.ads: Minor comment fixes.
64 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
66 * exp_ch3.adb (Default_Initialize_Object): Do not default
67 initialize an object when it is of a task type and restriction
68 No_Tasking is in effect because the initialization is obsolete.
69 * exp_ch9.adb (Build_Master_Entity): Do not generate a master when
70 restriction No_Tasking is in effect.
71 (Build_Master_Renaming): Do not rename a master when restriction
72 No_Tasking is in effect.
74 2017-01-13 Ed Schonberg <schonberg@adacore.com>
76 * sem_aggr.adb (Resolve_Array_Aggregate): The code that verifies
77 the legality of An others clause applies as well to a choice in
78 an Iterated_component_ association.
79 (Resolve_Iterated_Component_Association): An others choice
81 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): An
82 Iterated_Component_Association is not static.
84 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
86 * exp_ch3.adb (Freeze_Type): Mark the Ghost mode as set in case
87 control is passed to the expresion handler before the new mode
89 * sem_ch12.adb (Analyze_Package_Instantiation,
90 Analyze_Subprogram_Instantiation): Mark the Ghost mode as set
91 in case control is passed to the expresion handler before the
94 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
96 * sem_aggr.adb, sem_ch3.adb, inline.adb, sem_util.adb, exp_ch4.adb,
97 exp_aggr.adb: Minor reformatting.
99 2017-01-13 Gary Dismukes <dismukes@adacore.com>
101 * inline.adb: Minor reformatting and typo fix.
103 2017-01-13 Ed Schonberg <schonberg@adacore.com>
105 * sem_util.ads, sem_util.adb (Choice_List): Move function here
106 from sem_aggr.adb, for use elsewhere.
107 * sem_ch3.adb (Analyze_Object_Declaration): Use Choice_List.
108 * sem_aggr.adb (Resolve_Array_Aggregate): Remove
109 Iterated_Component_Present.
110 * exp_aggr.adb: Use Choice_List throughout, to handle
111 Iterated_Component_Associations.
112 (Gen_Loop): Generate proper loop for an
113 Iterated_Component_Association: loop variable has the identifier
114 of the original association. Generate a loop even for a single
115 component choice, in order to make loop parameter visible in
117 (Flatten): An Iterated_Component_Association is not static.
119 2017-01-13 Yannick Moy <moy@adacore.com>
121 * exp_ch4.adb (Expand_N_Op_Expon): Ensure that the value of
122 float exponentiation for statically known small negative values
123 is the reciprocal of the exponentiation for the opposite value
125 * s-exnllf.adb (Exn_Float, Exn_Long_Float, Exn_Long_Long_Float):
126 Ensure that the value of float exponentiation for negative values
127 is the reciprocal of the exponentiation for the opposite value
129 * inline.adb (Expand_Inlined_Call): Fix the count
130 for the number of generated gotos.
132 2017-01-13 Yannick Moy <moy@adacore.com>
134 * inline.adb: Code cleanup.
135 * sem_util.adb (Is_OK_Volatile_Context): Add
136 expression in delay statement as OK for volatile context.
138 2017-01-13 Ed Schonberg <schonberg@adacore.com>
140 * sem_aggr.adb (Resolve_Array_Aggregate): In normal compilation
141 mode a choice that is a subtype with a static predicate is
142 replaced by the values it covers. This transformation must not
143 be performed in ASIS mode, to preserve the source for analysis.
145 2017-01-13 Justin Squirek <squirek@adacore.com>
147 * nlists.ads: Correct minor typo.
149 2017-01-13 Gary Dismukes <dismukes@adacore.com>
151 * sem_ch13.adb: Minor reformatting and typo fix.
153 2017-01-13 Ed Schonberg <schonberg@adacore.com>
155 * par-ch4.adb (P_Aggregate_Or_Parent_Expr): An
156 Iterated_Component_Association is a named association in an
158 * sem_aggr.adb (Resolve_Iterated_Component_Association): New
159 procedure, subsidiary of Resolve_Array_Aggregate, to analyze
160 and resolve the discrete choices and the expression of the
162 * sinfo.adb, sinfo.ads: In analogy with N_Component_Association,
163 Loop_Actions and Box_Present are attributes of
164 N_Iterated_Component_Association nodes. Box_Present is always
166 * sprint.adb (Sprint_Node): An Iterated_Component_Association
167 has a Discrete_Choices list, as specified in the RM. A
168 Component_Association for aggregate uses instead a Choices list.
169 We have to live with this small inconsistency because the new
170 construct also has a defining identifier, and there is no way
171 to merge the two node structures.
173 2017-01-13 Yannick Moy <moy@adacore.com>
175 * inline.adb (Remove_Aspects_And_Pragmas): Add Unused to the
176 list of pragmas to remove. Remove pragmas from the list of
177 statements in the body to inline.
178 * namet.adb, namet.ads (Nam_In): New version with 12 parameters.
180 2017-01-13 Ed Schonberg <schonberg@adacore.com>
182 * sem_ch3.adb (Resolve_Aspects): New procedure, subsidiary of
183 Analyze_Declarations, to analyze and resolve the expressions of
184 aspect specifications in the current declarative list, so that
185 the expressions have proper entity and type info. This is needed
186 for ASIS when there is no subsequent expansion to generate this
187 semantic information.
188 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Use Etype of
189 original expression, to suppress cascaded errors when expression
190 has been constant-folded.
191 (Resolve_Aspect_Expressions, Resolve_Name): Preserve entities in
192 ASIS mode, because there is no subsequent expansion to decorate
195 2017-01-13 Yannick Moy <moy@adacore.com>
197 * inline.adb, inline.ads (Call_Can_Be_Inlined_In_GNATprove_Mode):
198 New function to detect when a call may be inlined or not in
200 (Expand_Inlined_Call): Ensure that a temporary
201 is always created in the cases where a type conversion may be
202 needed on an input parameter in GNATprove mode, so that GNATprove
203 sees the check to perform.
204 * sem_res.adb (Resolve_Call): In GNATprove mode, skip inlining
205 when not applicable due to actual requiring type conversion
206 with possible check but no temporary value can be copied for
207 GNATprove to see the check.
209 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
211 * sem_aggr.adb, par_sco.adb, s-osprim-mingw.adb, exp_ch5.adb,
212 exp_prag.adb, sem_ch3.adb, xr_tabls.adb, lib-xref-spark_specific.adb,
213 layout.adb, sem_dist.adb, exp_spark.adb, exp_ch7.adb, gnatcmd.adb,
214 exp_util.adb, prj-proc.adb, sem_aux.adb, comperr.adb, g-memdum.adb,
215 exp_attr.adb, s-intman-solaris.adb, exp_ch9.adb, make.adb, live.adb,
216 g-sercom-linux.adb, sem_dim.adb, mlib-prj.adb, s-intman-posix.adb,
217 sem_ch9.adb, sem_ch10.adb, prep.adb, einfo.adb, scng.adb, checks.adb,
218 prj-strt.adb, sem_prag.adb, eval_fat.adb, sem_ch12.adb, sem.adb,
219 a-numaux-x86.adb, a-stwifi.adb, i-cobol.adb, prj.adb,
220 get_spark_xrefs.adb, s-tasini.adb, rtsfind.adb, freeze.adb,
221 g-arrspl.adb, par-ch4.adb, sem_util.adb, sem_res.adb, expander.adb,
222 sem_attr.adb, exp_dbug.adb, prj-pp.adb, a-stzfix.adb, s-interr.adb,
223 s-wchcnv.adb, switch-m.adb, gnat1drv.adb, sinput-l.adb, stylesw.adb,
224 contracts.adb, s-intman-android.adb, g-expect.adb, exp_ch4.adb,
225 g-comlin.adb, errout.adb, sinput.adb, s-exctra.adb, repinfo.adb,
226 g-spipat.adb, g-debpoo.adb, exp_ch6.adb, sem_ch4.adb, exp_ch13.adb,
227 a-wtedit.adb, validsw.adb, pprint.adb, widechar.adb, makeutl.adb,
228 ali.adb, set_targ.adb, sem_mech.adb, sem_ch6.adb, gnatdll.adb,
229 get_scos.adb, g-pehage.adb, s-tratas-default.adb, gnatbind.adb,
230 prj-dect.adb, g-socthi-mingw.adb, par-prag.adb, prj-nmsc.adb,
231 exp_disp.adb, par-ch12.adb, binde.adb, sem_ch8.adb,
232 s-tfsetr-default.adb, s-regexp.adb, gprep.adb, s-tpobop.adb,
233 a-teioed.adb, sem_warn.adb, sem_eval.adb, g-awk.adb, s-io.adb,
234 a-ztedit.adb, xoscons.adb, exp_intr.adb, sem_cat.adb, sprint.adb,
235 g-socket.adb, exp_dist.adb, sem_ch13.adb, s-tfsetr-vxworks.adb,
236 par-ch3.adb, treepr.adb, g-forstr.adb, g-catiio.adb, par-ch5.adb,
237 uname.adb, osint.adb, exp_ch3.adb, prj-env.adb, a-strfix.adb,
238 a-stzsup.adb, prj-tree.adb, s-fileio.adb: Update all eligible case
239 statements to reflect the new style for case alternatives. Various
240 code clean up and reformatting.
242 2017-01-13 Gary Dismukes <dismukes@adacore.com>
244 * exp_util.adb: Minor reformatting.
246 2017-01-13 Yannick Moy <moy@adacore.com>
248 * exp_spark.adb: Code cleanup.
249 * sem_ch9.adb (Analyze_Delay_Until): Resolve
250 expression so that calls are identified as such inside delay
253 2017-01-13 Ed Schonberg <schonberg@adacore.com>
255 * exp_util.adb (Insert_Actions): Handle Iterated_Component_Association.
256 * par-ch3.adb (P_Discrete_Choice_List): An
257 Iterated_Component_Association is an array aggregate component.
258 * par-ch4.adb (P_Iterated_Component_Association): New procedure.
259 (Is_Quantified_Expression): New function that performs a lookahead
260 to distinguish quantified expressions from iterated component
262 (P_Aggregate_Or_Paren_Expr): Recognize iterated component
264 (P_Unparen_Cond_Case_Quant_Expression, P_Primary): Ditto.
265 * sem.adb (Analyze): Handle Iterated_Component_Association.
266 * sem_aggr.adb (Resolve_Array_Aggregate): Dummy handling of iterated
267 component associations.
268 * sinfo.ads, sinfo.adb: Entries for for
269 N_Iterated_Component_Association and its fields.
270 * sprint.adb (Sprint_Node_Actual): Handle
271 N_Iterated_Component_Association.
273 2017-01-13 Justin Squirek <squirek@adacore.com>
275 * sem_ch12.adb (Analyze_Package_Instantiation): Move disabiling
276 of the style check until after preanalysis of acutals.
278 2017-01-13 Yannick Moy <moy@adacore.com>
280 * sem_ch13.adb: Minor reformatting.
281 * par-ch11.adb: minor style fix in whitespace
282 * gnatbind.adb (Gnatbind): Scope of Std_Lib_File
283 reduced to Add_Artificial_ALI_File; style fix in declaration of
284 Text; grammar fix in comment.
285 * osint-c.adb (Read_Library_Info): strip trailing NUL from result.
286 * freeze.adb: Cleanup to pass pragma instead of
288 * exp_spark.adb (Expand_SPARK_Attribute_Reference): New procedure to
289 replace System'To_Address by equivalent call.
291 2017-01-13 Arnaud Charlet <charlet@adacore.com>
293 * bindusg.adb: Improve usage output for -f switch.
295 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
297 * frontend.adb, freeze.adb, sem_res.adb, sem_attr.adb, sem_ch8.adb:
300 2017-01-13 Ed Schonberg <schonberg@adacore.com>
302 * sem_ch13.adb (Is_Predicate_Static): Following the intent of the RM,
303 treat comparisons on strings as legal in a Static_Predicate.
304 (Is_Predicate_Static, Is_Type_Ref): Predicate also returns true on
305 a function call that is the expansion of a string comparison.The
306 function call is built when compiling the corresponding predicate
307 function, but the expression has been found legal as a static
308 predicate during earlier analysis.
309 * sem_eval.adb (Real_Or_String_Static_Predicate_Matches): Handle
310 properly a function call that is the expansion of a string
311 comparison operation, in order to recover the Static_Predicate
312 expression and apply it to a static argument when needed.
314 2017-01-13 Tristan Gingold <gingold@adacore.com>
316 * s-mmap.adb, s-mmap.ads (Open_Read_No_Exception): New function.
317 (Open_Read): Re-implement using Open_Read_No_Exception.
318 (Open_Write): Raise exception in case of error.
319 * s-mmosin-mingw.adb (Open_Common): Do not raise exception.
320 * s-mmosin-unix.adb (Open_Read, Open_Write): Do not
322 * s-mmosin-mingw.ads, s-mmosin-unix.ads (Open_Read): Adjust comment.
324 2017-01-13 Yannick Moy <moy@adacore.com>
326 * checks.adb: Code cleanup.
328 2017-01-13 Yannick Moy <moy@adacore.com>
330 * freeze.adb (Check_Inherited_Conditions): Use analyzed pragma
331 expression instead of unanalyzed aspect expression for checking
332 the validity of inheriting an operation. Also copy the expression
333 being passing it to Build_Class_Wide_Expression, as this call
334 modifies its argument.
335 * sem_util.ads Fix comment to reference correct function name
338 2017-01-13 Javier Miranda <miranda@adacore.com>
340 * sem_res.adb (Resolve_Generalized_Indexing): Compiling in ASIS mode,
341 when we propagate information about the indexes back to the original
342 indexing mode and the prefix of the index is a function call, do not
343 remove any parameter from such call.
345 2017-01-13 Gary Dismukes <dismukes@adacore.com>
347 * exp_ch6.ads (Needs_BIP_Finalization_Master): Update comment.
348 * exp_ch6.adb (Needs_BIP_Finalization_Master): Return True for
349 a build-in-place function whose result type is tagged.
351 2017-01-13 Yannick Moy <moy@adacore.com>
353 * sem_ch8.adb (Analyze_Subprogram_Renaming.Build_Class_Wide_Wrapper):
354 Do not generate a wrapper when the only candidate is a class-wide
356 (Analyze_Subprogram_Renaming): Do not freeze the renaming or renamed
357 inside a generic context.
359 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
361 * exp_util.adb (Add_Inherited_Tagged_DIC):
362 Pass the object parameters of both the parent and the derived
363 type DIC procedure to the reference replacement circuitry.
364 (Find_DIC_Type): Modify the circuitry to present the partial
365 view of a private type in case the private type defines its own
367 (Replace_Object_And_Primitive_References): Add two
368 optional formal parameters. Update the comment on usage. Update
369 the replacement of references to object parameters.
371 2017-01-13 Gary Dismukes <dismukes@adacore.com>
373 * einfo.adb, sem_ch6.adb, atree.adb: Minor reformatting and typo fix.
375 2017-01-13 Ed Schonberg <schonberg@adacore.com>
377 * sem_res.adb (Resolve_Actuals): Apply Scalar_Range_Check to
378 an out parameter that is a type conversion, independently of th
379 range check that may apply to the expression of the conversion,
380 for use in GNATProve.
382 2017-01-13 Yannick Moy <moy@adacore.com>
384 * gnat1drv.adb (Gnat1drv): Move the implicit with for System in
385 GNATprove_Mode here to Frontend.
386 * frontend.adb (Frontend): Move the implicit with for System
387 in GNATprove_Mode here as it ismore correct this way; the old
388 place only worked by chance, since there were no overloaded names.
389 * rtsfind.ads (RE_Id, RE_Unit_Table): Add RE_Tasking_State.
390 * sem_attr.adb (Analyze_Attribute): In GNATprove_Mode, for the
391 four attributes identified in SRM 9(18), add an implicit with
392 to Ada.Task_Identification.
393 * sem_ch8.adb (Analyze_Subprogram_Renaming.Build_Class_Wide_Wrapper):
394 Deal specially with the wrapper introduced for AI05-0071 in GNATprove
396 * checks.adb (Apply_Discriminant_Check,
397 Apply_Selected_Length_Checks, Apply_Selected_Range_Checks):
398 In GNATprove mode, we do not apply the checks, but we still
399 analyze the expression to possibly issue errors on SPARK
400 code when a run-time error can be detected at compile time.
401 (Selected_Length_Checks, Selected_Range_Checks): Perform analysis
404 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
406 * expander.adb (Expand): Add a warning about using return
407 statements in Ghost management code.
408 * exp_ch3.adb (Freeze_Type): Add a warning about using return
409 statements in Ghost management code.
410 * exp_ch7.adb (Build_Invariant_Procedure_Body,
411 Build_Invariant_Procedure_Declaration): Add a warning about
412 using return statements in Ghost management code.
413 * exp_disp.adb (Make_DT): Add a warning about using return
414 statements in Ghost management code.
415 * exp_util.adb (Build_DIC_Procedure_Body,
416 Build_DIC_Procedure_Declaration, Make_Predicated_Call): Add a
417 warning about using return statements in Ghost management code.
418 * freeze.adb (Freeze_Entity): Add a warning about using return
419 statements in Ghost management code.
420 * sem.adb (Analyze, Do_Analyze): Add a warning about using return
421 statements in Ghost management code.
422 * sem_ch3.adb (Analyze_Object_Declaration, Process_Full_View): Add
423 a warning about using return statements in Ghost management code.
424 * sem_ch5.adb (Analyze_Assignment): Add a warning about using
425 return statements in Ghost management code.
426 * sem_ch6.adb (Analyze_Procedure_Call,
427 Analyze_Subprogram_Body_Helper): Add a warning about using return
428 statements in Ghost management code.
429 * sem_ch7.adb (Analyze_Package_Body_Helper): Add a warning about
430 using return statements in Ghost management code.
431 * sem_ch12.adb (Analyze_Package_Instantiation,
432 Analyze_Subprogram_Instantiation, Instantiate_Package_Body,
433 Instantiate_Subprogram_Body): Add a warning about using return
434 statements in Ghost management code.
435 * sem_ch13.adb (Build_Predicate_Functions,
436 Build_Predicate_Function_Declarations): Add a warning about
437 using return statements in Ghost management code.
438 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part,
439 Analyze_Initial_Condition_In_Decl_Part, Analyze_Pragma,
440 Analyze_Pre_Post_Condition_In_Decl_Part): Add a warning about
441 using return statements in Ghost management code.
443 2017-01-13 Tristan Gingold <gingold@adacore.com>
445 * s-mmosin-mingw.adb: Fix pragma import.
447 2017-01-13 Arnaud Charlet <charlet@adacore.com>
449 * gnat1drv.adb (Adjust_Global_Switches): Ignore -gnateE in
452 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
454 * atree.adb (Allocate_Initialize_Node): A newly created node is
455 no longer marked as Ghost at this level.
456 (Mark_New_Ghost_Node): New routine.
457 (New_Copy): Mark the copy as Ghost.
458 (New_Entity): Mark the entity as Ghost.
459 (New_Node): Mark the node as Ghost.
460 * einfo.adb (Is_Checked_Ghost_Entity): This attribute can now
461 apply to unanalyzed entities.
462 (Is_Ignored_Ghost_Entity): This attribute can now apply to unanalyzed
464 (Set_Is_Checked_Ghost_Entity): This attribute now
465 applies to all entities as well as unanalyzed entities.
466 (Set_Is_Ignored_Ghost_Entity): This attribute now applies to
467 all entities as well as unanalyzed entities.
468 * expander.adb Add with and use clauses for Ghost.
469 (Expand): Install and revert the Ghost region associated with the node
471 * exp_ch3.adb (Expand_Freeze_Array_Type): Remove all Ghost-related code.
472 (Expand_Freeze_Class_Wide_Type): Remoe all Ghost-related code.
473 (Expand_Freeze_Enumeration_Type): Remove all Ghost-related code.
474 (Expand_Freeze_Record_Type): Remove all Ghost-related code.
475 (Freeze_Type): Install and revert the Ghost region associated
476 with the type being frozen.
477 * exp_ch5.adb Remove with and use clauses for Ghost.
478 (Expand_N_Assignment_Statement): Remove all Ghost-related code.
479 * exp_ch6.adb Remove with and use clauses for Ghost.
480 (Expand_N_Procedure_Call_Statement): Remove all Ghost-relatd code.
481 (Expand_N_Subprogram_Body): Remove all Ghost-related code.
482 * exp_ch7.adb (Build_Invariant_Procedure_Body): Install and revert the
483 Ghost region of the working type.
484 (Build_Invariant_Procedure_Declaration): Install and revert
485 the Ghost region of the working type.
486 (Expand_N_Package_Body): Remove all Ghost-related code.
487 * exp_ch8.adb Remove with and use clauses for Ghost.
488 (Expand_N_Exception_Renaming_Declaration): Remove all Ghost-related
490 (Expand_N_Object_Renaming_Declaration): Remove all Ghost-related code.
491 (Expand_N_Package_Renaming_Declaration): Remove all Ghost-related code.
492 (Expand_N_Subprogram_Renaming_Declaration): Remove all Ghost-related
494 * exp_ch13.adb Remove with and use clauses for Ghost.
495 (Expand_N_Freeze_Entity): Remove all Ghost-related code.
496 * exp_disp.adb (Make_DT): Install and revert the Ghost region of
497 the tagged type. Move the generation of various entities within
498 the Ghost region of the type.
499 * exp_prag.adb Remove with and use clauses for Ghost.
500 (Expand_Pragma_Check): Remove all Ghost-related code.
501 (Expand_Pragma_Contract_Cases): Remove all Ghost-related code.
502 (Expand_Pragma_Initial_Condition): Remove all Ghost-related code.
503 (Expand_Pragma_Loop_Variant): Remove all Ghost-related code.
504 * exp_util.adb (Build_DIC_Procedure_Body): Install
505 and revert the Ghost region of the working types.
506 (Build_DIC_Procedure_Declaration): Install and revert the
507 Ghost region of the working type.
508 (Make_Invariant_Call): Install and revert the Ghost region of the
510 (Make_Predicate_Call): Reimplemented. Install and revert the
511 Ghost region of the associated type.
512 * freeze.adb (Freeze_Entity): Install and revert the Ghost region
513 of the entity being frozen.
514 (New_Freeze_Node): Removed.
515 * ghost.adb Remove with and use clauses for Opt.
516 (Check_Ghost_Completion): Update the parameter profile
517 and all references to formal parameters.
518 (Ghost_Entity): Update the comment on usage.
519 (Install_Ghost_Mode): New routines.
520 (Is_Ghost_Assignment): New routine.
521 (Is_Ghost_Declaration): New routine.
522 (Is_Ghost_Pragma): New routine.
523 (Is_Ghost_Procedure_Call): New routine.
524 (Is_Ghost_Renaming): Removed.
525 (Is_OK_Declaration): Reimplemented.
526 (Is_OK_Pragma): Reimplemented.
527 (Is_OK_Statement): Reimplemented.
528 (Is_Subject_To_Ghost): Update the comment on usage.
529 (Mark_And_Set_Ghost_Assignment): New routine.
530 (Mark_And_Set_Ghost_Body): New routine.
531 (Mark_And_Set_Ghost_Completion): New routine.
532 (Mark_And_Set_Ghost_Declaration): New routine.
533 (Mark_And_Set_Ghost_Instantiation): New routine.
534 (Mark_And_Set_Ghost_Procedure_Call): New routine.
535 (Mark_Full_View_As_Ghost): Removed.
536 (Mark_Ghost_Declaration_Or_Body): New routine.
537 (Mark_Ghost_Pragma): New routine.
538 (Mark_Ghost_Renaming): New routine.
539 (Mark_Pragma_As_Ghost): Removed.
540 (Mark_Renaming_As_Ghost): Removed.
541 (Propagate_Ignored_Ghost_Code): Update the comment on usage.
542 (Prune_Node): Freeze nodes no longer need special pruning, they
543 are processed by the general ignored Ghost code mechanism.
544 (Restore_Ghost_Mode): New routine.
545 (Set_Ghost_Mode): Reimplemented.
546 (Set_Ghost_Mode_From_Entity): Removed.
547 * ghost.ads Add with and use clauses for Ghost.
548 (Check_Ghost_Completion): Update the parameter profile
549 along with the comment on usage.
550 (Install_Ghost_Mode): New routine.
551 (Is_Ghost_Assignment): New routine.
552 (Is_Ghost_Declaration): New routine.
553 (Is_Ghost_Pragma): New routine.
554 (Is_Ghost_Procedure_Call): New routine.
555 (Mark_And_Set_Ghost_Assignment): New routine.
556 (Mark_And_Set_Ghost_Body): New routine.
557 (Mark_And_Set_Ghost_Completion): New routine.
558 (Mark_And_Set_Ghost_Declaration): New routine.
559 (Mark_And_Set_Ghost_Instantiation): New routine.
560 (Mark_And_Set_Ghost_Procedure_Call): New routine.
561 (Mark_Full_View_As_Ghost): Removed.
562 (Mark_Ghost_Pragma): New routine.
563 (Mark_Ghost_Renaming): New routine.
564 (Mark_Pragma_As_Ghost): Removed.
565 (Mark_Renaming_As_Ghost): Removed.
566 (Restore_Ghost_Mode): New routine.
567 (Set_Ghost_Mode): Redefined.
568 (Set_Ghost_Mode_From_Entity): Removed.
569 * sem.adb (Analyze): Install and revert the Ghost region of the
571 (Do_Analyze): Change the way a clean Ghost
572 region is installed and reverted.
573 * sem_ch3.adb (Analyze_Full_Type_Declaration): Remove
574 all Ghost-related code.
575 (Analyze_Incomplete_Type_Decl): Remove all Ghost-related code.
576 (Analyze_Number_Declaration): Remove all Ghost-related code.
577 (Analyze_Object_Declaration): Install and revert the Ghost region of
578 a deferred object declaration's completion.
579 (Array_Type_Declaration): Remove all Ghost-related code.
580 (Build_Derived_Type): Update the comment on
581 the propagation of Ghost attributes from a parent to a derived type.
582 (Derive_Subprogram): Remove all Ghost-related code.
583 (Make_Class_Wide_Type): Remove all Ghost-related code.
584 (Make_Implicit_Base): Remove all Ghost-related code.
585 (Process_Full_View): Install and revert the Ghost region of
586 the partial view. There is no longer need to check the Ghost
588 * sem_ch5.adb (Analyze_Assignment): Install and revert the Ghost
589 region of the left hand side.
590 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Remove
591 all Ghost-related code.
592 (Analyze_Expression_Function): Remove all Ghost-related code.
593 (Analyze_Generic_Subprogram_Body): Remove all Ghost-related code.
594 (Analyze_Procedure_Call): Install and revert the Ghost region of
595 the procedure being called.
596 (Analyze_Subprogram_Body_Helper): Install and revert the Ghost
597 region of the spec or body.
598 (Analyze_Subprogram_Declaration): Remove all Ghost-related code.
599 (Build_Subprogram_Declaration): Remove all Ghost-related code.
600 (Find_Corresponding_Spec): Remove all Ghost-related code.
601 (Process_Formals): Remove all Ghost-related code.
602 * sem_ch7.adb (Analyze_Package_Body_Helper): Install and revert
603 the Ghost region of the spec.
604 (Analyze_Package_Declaration): Remove all Ghost-related code.
605 * sem_ch8.adb (Analyze_Exception_Renaming): Mark a renaming as
606 Ghost when it aliases a Ghost entity.
607 (Analyze_Generic_Renaming): Mark a renaming as Ghost when it aliases
609 (Analyze_Object_Renaming): Mark a renaming as Ghost when
610 it aliases a Ghost entity.
611 (Analyze_Package_Renaming): Mark a renaming as Ghost when it aliases
613 (Analyze_Subprogram_Renaming): Mark a renaming as Ghost when it
614 aliases a Ghost entity.
615 * sem_ch11.adb Remove with and use clauses for Ghost.
616 (Analyze_Exception_Declaration): Remove all Ghost-related code.
617 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Remove all
619 (Analyze_Generic_Subprogram_Declaration): Remove all Ghost-related
621 (Analyze_Package_Instantiation): Install and revert the Ghost region
622 of the package instantiation.
623 (Analyze_Subprogram_Instantiation): Install
624 and revert the Ghost region of the subprogram instantiation.
625 (Instantiate_Package_Body): Code clean up. Install and revert the
626 Ghost region of the package body.
627 (Instantiate_Subprogram_Body): Code clean up. Install and revert the
628 Ghost region of the subprogram body.
629 * sem_ch13.adb (Build_Predicate_Functions): Install
630 and revert the Ghost region of the related type.
631 (Build_Predicate_Function_Declaration): Code clean up. Install
632 and rever the Ghost region of the related type.
633 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
634 Install and revert the Ghost region of the pragma.
635 (Analyze_Initial_Condition_In_Decl_Part): Install and revert the
636 Ghost region of the pragma.
637 (Analyze_Pragma): Install and revert the Ghost region of various
638 pragmas. Mark a pragma as Ghost when it is related to a Ghost entity
639 or encloses a Ghost entity.
640 (Analyze_Pre_Post_Condition): Install and revert the Ghost
641 region of the pragma.
642 (Analyze_Pre_Post_Condition_In_Decl_Part): Install and revert the
643 Ghost region of the pragma.
644 * sem_res.adb (Resolve): Remove all Ghost-related code.
645 * sem_util.adb (Is_Declaration): Reimplemented.
646 (Is_Declaration_Other_Than_Renaming): New routine.
647 * sem_util.ads (Is_Declaration_Other_Than_Renaming): New routine.
648 * sinfo.adb (Is_Checked_Ghost_Pragma): New routine.
649 (Is_Ghost_Pragma): Removed.
650 (Is_Ignored_Ghost_Pragma): New routine.
651 (Set_Is_Checked_Ghost_Pragma): New routine.
652 (Set_Is_Ghost_Pragma): Removed.
653 (Set_Is_Ignored_Ghost_Pragma): New routine.
654 * sinfo.ads: Update the documentation on Ghost mode and
655 Ghost regions. New attributes Is_Checked_Ghost_Pragma
656 and Is_Ignored_Ghost_Pragma along with usages in nodes.
657 Remove attribute Is_Ghost_Pragma along with usages in nodes.
658 (Is_Checked_Ghost_Pragma): New routine along with pragma Inline.
659 (Is_Ghost_Pragma): Removed along with pragma Inline.
660 (Is_Ignored_Ghost_Pragma): New routine along with pragma Inline.
661 (Set_Is_Checked_Ghost_Pragma): New routine along with pragma Inline.
662 (Set_Is_Ghost_Pragma): Removed along with pragma Inline.
663 (Set_Is_Ignored_Ghost_Pragma): New routine along with pragma Inline.
665 2017-01-12 Tristan Gingold <gingold@adacore.com>
667 * s-mmap.ads, s-mmap.adb, s-mmosin-unix.ads, s-mmosin-unix.adb,
668 s-mmauni-long.ads, s-mmosin-mingw.ads, s-mmosin-mingw.adb: New files.
670 2017-01-12 Yannick Moy <moy@adacore.com>
672 * errout.adb, errout.ads (Initialize): Factor common treatment
674 (Reset_Warnings): New procedure to reset counts related to warnings.
675 (Record_Compilation_Errors): New variable to store the presence of an
676 error, used in gnat2why to allow changing the Warning_Mode.
677 (Compilation_Errors): Use new variable Record_Compilation_Errors to
678 store the presence of an error.
680 2017-01-12 Javier Miranda <miranda@adacore.com>
682 * sem_ch13.adb (Analyze_Aspect_Specifications):
683 For Interrupt_Handler and Attach_ Handler aspects, decorate the
684 internally built reference to the protected procedure as coming
685 from sources and force its analysis.
687 2017-01-12 Ed Schonberg <schonberg@adacore.com>
689 * sem_ch3.adb (Build_Derived_Type): For a scalar derived type,
690 inherit predicates if any from the first_subtype of the parent,
691 not from the anonymous parent type.
692 * sem_eval.adb (Is_Static_Subtype): A type that inherits a dynamic
693 predicate is not a static subtype.
695 2017-01-12 Gary Dismukes <dismukes@adacore.com>
697 * freeze.adb (Check_Suspicious_Convention): New procedure
698 performing a warning check on discriminated record types with
699 convention C or C++. Factored out of procedure Freeze_Record_Type,
700 and changed to only apply to base types (to avoid spurious
701 warnings on subtypes). Minor improvement of warning messages
702 to refer to discriminated rather than variant record types.
703 (Freeze_Record_Type): Remove code for performing a suspicious
705 (Freeze_Entity): Only call Freeze_Record_Type
706 on types that aren't declared within any enclosing generic units
707 (rather than just excluding the type when the innermost scope
708 is generic). Call Check_Suspicious_Convention whether or not
709 the type is declared within a generic unit.
710 * sem_ch8.adb (In_Generic_Scope): Move this function to Sem_Util.
711 * sem_util.ads, sem_util.adb (In_Generic_Scope): New function (moved
714 2017-01-12 Tristan Gingold <gingold@adacore.com>
716 * sysdep.c, adaint.c, rtinit.c, ming32.h:
717 (__gnat_current_codepage): Renamed from CurrentCodePage
718 (__gnat_current_ccs_encoding): Renamed from CurrentCCSEncoding
720 2017-01-12 Ed Schonberg <schonberg@adacore.com>
722 * sem_ch6.adb (Fully_Conformant_Expressions): Handle properly
723 quantified expressions, following AI12-050: the loop parameters
724 of two quantified expressions are conformant if they have the
727 2017-01-12 Arnaud Charlet <charlet@adacore.com>
729 * gcc-interface/Makefile.in: Clean up VxWorks targets.
731 2017-01-12 Ed Schonberg <schonberg@adacore.com>
733 * sem_attr.adb (Analyze_Attribute_Reference, case Loop_Entry):
734 Hnadle properly the attribute reference when it appears as part
735 of an expression in another loop aspect.
737 2017-01-12 Ed Schonberg <schonberg@adacore.com>
739 * exp_ch3.adb (Check_Predicated_Discriminant): New procedure,
740 subsidiary of Build_Initialization_Call, to complete generation
741 of predicate checks on discriminants whose (sub)types have
742 predicates, and to add checks on variants that do not have an
744 * sem_util.adb (Gather_Components): A missing Others alternative is
745 not an error when the type of the discriminant is a static predicate
746 (and coverage has been checked when analyzing the case statement). A
747 runtime check is generated to verify that a given discriminant
748 satisfies the predicate (RM 3.8.1. (21.1/2)).
750 2017-01-12 Yannick Moy <moy@adacore.com>
752 * gnat1drv.adb (Adjust_Global_Switches): Only
753 perform checking of exception mechanism when generating code.
755 2017-01-12 Justin Squirek <squirek@adacore.com>
757 * exp_ch7.adb (Add_Type_Invariants, Process_Array_Component):
758 Remove handling of access component with invariant.
759 (Build_Invariant_Procedure_Declaration): Remove return on class
761 * freeze.adb (Freeze_Array_Type, Freeze_Record_Type): Remove
762 conditional exception for component or array so Has_Own_Invariants
763 flag is not falsly set.
764 * sem_ch3.adb (Make_Class_Wide_Type): Initialize copy of class
765 wide type to have no invariant flags.
767 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
769 * exp_ch9.adb, sem_prag.adb, s-tassta.adb, sem_util.adb, s-tarest.adb,
770 sem_ch13.adb: Minor reformatting.
772 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
774 * exp_aggr.adb (Build_Record_Aggr_Code): Guard against a missing
775 adjustment primitive when the ancestor type was not properly frozen.
776 (Gen_Assign): Guard against a missing initialization
777 primitive when the component type was not properly frozen.
778 (Initialize_Array_Component): Guard against a missing adjustment
779 primitive when the component type was not properly frozen.
780 (Initialize_Record_Component): Guard against a missing adjustment
781 primitive when the component type was not properly frozen.
782 (Process_Transient_Component_Completion): The transient object may
783 not be finalized when its associated type was not properly frozen.
784 * exp_ch3.adb (Build_Assignment): Guard against a missing
785 adjustment primitive when the component type was not properly frozen.
786 (Build_Initialization_Call): Guard against a missing
787 initialization primitive when the associated type was not properly
789 (Expand_N_Object_Declaration): Guard against a missing
790 adjustment primitive when the base type was not properly frozen.
791 (Predefined_Primitive_Bodies): Create an empty Deep_Adjust
792 body when there is no adjustment primitive available. Create an
793 empty Deep_Finalize body when there is no finalization primitive
795 * exp_ch4.adb (Apply_Accessibility_Check): Guard against a
796 missing finalization primitive when the designated type was
798 (Expand_N_Allocator): Guard against a missing initialization primitive
799 when the designated type was not properly frozen.
800 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add the adjustment call
801 only when the corresponding adjustment primitive is available.
802 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Generate the
803 adjustment/finalization statements only when there is an available
804 primitive to carry out the action.
805 (Build_Initialize_Statements): Generate the initialization/finalization
806 statements only when there is an available primitive to carry out the
808 (Make_Adjust_Call): Do not generate a call when the underlying
809 type is not present due to a possible missing full view.
810 (Make_Final_Call): Do not generate a call when the underlying
811 type is not present due to a possible missing full view.
812 (Make_Finalize_Address_Stmts): Generate an empty body when the
813 designated type lacks a finalization primitive.
814 (Make_Init_Call): Do not generate a call when the underlying type is
815 not present due to a possible missing full view.
816 (Process_Component_For_Adjust): Add the adjustment call only when the
817 corresponding adjustment primitive is available.
818 (Process_Component_For_Finalize): Add the finalization call only when
819 the corresponding finalization primitive is available.
820 (Process_Object_Declaration): Use a null statement to emulate a
821 missing call to the finalization primitive of the object type.
822 * exp_ch7.ads (Make_Adjust_Call): Update the comment on usage.
823 (Make_Final_Call): Update the comment on usage.
824 (Make_Init_Call): Update the comment on usage.
825 * exp_util.adb (Build_Transient_Object_Statements): Code reformatting.
827 2017-01-12 Arnaud Charlet <charlet@adacore.com>
829 * einfo.ads: Update documentation of Address_Taken.
830 * sem_attr.adb (Analyze_Access_Attribute, Resolve_Attribute
831 [Access_Attribute]): Only consider 'Access/'Unchecked_Access
832 for subprograms when setting Address_Taken flag.
834 2017-01-12 Patrick Bernardi <bernardi@adacore.com>
836 * sem_ch10.adb (Analyze_With_Clause): Removed code that turned
837 Configurable_Run_Time_Mode off when analysing with'ed predefined
840 2017-01-12 Gary Dismukes <dismukes@adacore.com>
842 * sem_prag.adb: Minor reformatting.
843 * sem_util.adb (Unique_Entity): fix result for
844 bodies of entry families.
846 2017-01-12 Justin Squirek <squirek@adacore.com>
848 * sem_prag.adb (Analyze_Pragma): Add appropriate calls to
849 Resolve_Suppressible in the pragma Assertion_Policy case.
850 (Resolve_Suppressible): Created this function to factor out
851 common code used to resolve Suppress to either Ignore or Check
852 * snames.ads-tmpl: Add name for Suppressible.
854 2017-01-12 Gary Dismukes <dismukes@adacore.com>
856 * exp_ch9.adb, s-secsta.adb, snames.ads-tmpl, exp_ch3.adb: Minor
858 * debug.adb: Minor comment fixes.
860 2017-01-12 Arnaud Charlet <charlet@adacore.com>
862 * sem_util.adb (Unique_Entity): For concurrent
863 bodies that are defined with stubs and complete a declaration
864 of a single concurrent object return the entity of an implicit
865 concurrent type, not the entity of the anonymous concurrent
867 * debug.adb: -gnatd.J is no longer used.
868 * make.adb (Globalize): Removed, no longer used.
869 * sem_ch9.adb: minor typo in comment for entry index
871 2017-01-12 Patrick Bernardi <bernardi@adacore.com>
873 * aspect.adb, aspect.ads: Added new aspect Secondary_Stack_Size.
874 * exp_ch3.adb (Build_Init_Statements): As part of initialising
875 the value record of a task, set its _Secondary_Stack_Size field
877 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Create
878 a _Secondary_Stack_Size field in the value record of
879 the task if a Secondary_Stack_Size rep item is present.
880 (Make_Task_Create_Call): Include secondary stack size
881 parameter. If No_Secondary_Stack restriction is in place, passes
883 * par-prag.adb, sem_prag.adb, sem_prag.ads: Added new pragma
884 Secondary_Stack_Size.
885 * s-secsta.adb, s-secsta.ads (Minimum_Secondary_Stack_Size): New
886 function to define the overhead of the secondary stack.
887 * s-tarest.adb (Create_Restricted_Task,
888 Create_Restricted_Task_Sequential): Functions now include
889 Secondary_Stack_Size parameter to pass to Initialize_ATCB.
890 * s-tarest.adb (Create_Restricted_Task,
891 Create_Restricted_Task_Sequential): Calls to Initialize_ATCB now
892 include Secondary_Stack_Size parameter.
893 (Task_Wrapper): Secondary stack now allocated to the size specified by
894 the Secondary_Stack_Size parameter in the task's ATCB.
895 * s-taskin.adb, s-taskin.adb (Common_ATCB, Initialize_ATCB): New
896 Secondary_Stack_Size component.
897 * s-tassta.adb, s-tassta.ads (Create_Restricted_Task,
898 Create_Restricted_Task_Sequential): Function now include
899 Secondary_Stack_Size parameter.
900 (Task_Wrapper): Secondary stack now allocated to the size
901 specified by the Secondary_Stack_Size parameter in the task's
903 * s-tproft.adb (Register_Foreign_Thread): Amended Initialize_ATCB call
904 to include Secondary_Stack_Size parameter.
905 * sem_ch13.adb (Analyze_Aspect_Specification): Add support for
906 Secondary_Stack_Size aspect, turning the aspect into its corresponding
908 (Analyze_Attribute_Definition): Process Secondary_Stack_Size attribute.
909 * snames.adb-tmpl, snames.ads-tmpl: Added names
910 Name_Secondary_Stack_Size, Name_uSecondary_Stack_Size,
911 Attribute_Secondary_Stack_Size and Pragma_Secondary_Stack_Size.
913 2017-01-12 Yannick Moy <moy@adacore.com>
915 * exp_spark.adb (Expand_SPARK_Potential_Renaming): Fix sloc of copied
918 2017-01-12 Justin Squirek <squirek@adacore.com>
920 * exp_attr.adb (Expand_N_Attribute_Reference):
921 Fix Finalization_Size case by properly resolving the type after
924 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
926 * exp_util.adb (Build_DIC_Procedure_Body): Semi-insert the body into
928 (Build_DIC_Procedure_Declaration): Semi-insert the body into the tree.
929 * binde.adb, exp_ch5.adb, sem_type.adb, sem.ads, sem_res.adb,
930 exp_sel.ads: Minor reformatting.
932 2017-01-12 Justin Squirek <squirek@adacore.com>
934 * exp_ch6.adb (Expand_Call): Add guard to prevent
935 invariant checks from being created for internally generated
938 2017-01-12 Bob Duff <duff@adacore.com>
940 * lib-writ.ads: Remove incorrect comment.
942 2017-01-12 Javier Miranda <miranda@adacore.com>
944 * debug.adb (-gnatd.K): Enable generation of contract-only
945 procedures in CodePeer mode.
946 * contracts.adb (Build_And_Analyze_Contract_Only_Subprograms):
948 (Analyze_Contracts): Generate contract-only procedures if -gnatdK is
950 * scil_ll.ads, scil_ll.adb (Get_Contract_Only_Body_Name): New
952 (Get_Contract_Only_Missing_Body_Name): New subprogram.
953 (Get_Contract_Only_Body): New subprogram.
954 (Set_Contract_Only_Body): New subprogram.
955 (Is_Contract_Only_Body): New subprogram.
956 (Set_Is_Contract_Only_Body): New subprogram.
957 (SCIL_Nodes): Replace table by hash-table.
959 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
961 * exp_ch6.adb: Minor reformatting.
962 * spark_xrefs.ads: minor cleanup of comments for SPARK xrefs
964 2017-01-12 Bob Duff <duff@adacore.com>
966 * binde.adb (Forced): New reason for a dependence.
967 (Force_Elab_Order): Implementation of the new switch.
968 * binde.ads: Minor comment fixes.
969 * bindusg.adb: Add -f switch. Apparently, there was an -f switch
970 long ago that is no longer supported; removed comment about that.
971 * opt.ads (Force_Elab_Order_File): Name of file specified for
973 * switch-b.adb: Parse -f switch.
975 2017-01-12 Justin Squirek <squirek@adacore.com>
977 * exp_ch6.adb (Check_View_Conversion): Created this function
978 to properly chain calls to check type invariants that may be
979 present in a subprogram call after the subprogram.
980 (Expand_Call): Add a conditional to identify when a view conversion
982 * nlists.adb, nlists.ads (Prepend_New): New routine.
983 (Prepend_New_To): New routine.
985 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
987 * sinfo.ads: Minor reformatting.
989 2017-01-12 Gary Dismukes <dismukes@adacore.com>
991 * exp_util.adb, exp_util.ads, einfo.ads: Minor typo fixes and
994 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
996 * exp_ch6.adb (Make_Build_In_Place_Call_In_Anonymous_Context): Add new
997 variable Definite. Create a local object and pass its 'Access to the
998 BIP function when the result type is either definite or it does not
999 require any finalization or secondary stack management.
1001 2017-01-12 Bob Duff <duff@adacore.com>
1003 * contracts.adb, einfo.adb, errout.adb, exp_attr.adb,
1004 exp_ch3.adb, exp_ch7.adb, exp_ch9.adb, exp_prag.adb, freeze.adb,
1005 frontend.adb, ghost.adb, inline.adb, lib-writ.adb, lib-xref.adb,
1006 par.adb, par-ch10.adb, par-ch2.adb, par-prag.adb, par_sco.adb,
1007 sem_attr.adb, sem_aux.adb, sem_ch10.adb, sem_ch12.adb,
1008 sem_ch13.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb, sem_elab.adb,
1009 sem_prag.adb, sem_res.adb, sem_util.adb, sem_util.ads,
1010 sem_warn.adb, sinfo.adb, sinfo.ads, sprint.adb (Pragma_Name):
1011 Change name to Pragma_Name_Unmapped.
1012 (Pragma_Name_Mapped): Change name to Pragma_Name.
1013 This is because the "mapped" version should be the usual case.
1015 2017-01-09 Hristian Kirtchev <kirtchev@adacore.com>
1017 * einfo.ads, einfo.adb: Remove uses of flags Has_Default_Init_Cond,
1018 Is_Default_Init_Cond_Procedure, and
1019 Has_Inherited_Default_Init_Cond. Add uses of flags
1020 Has_Own_DIC, Is_DIC_Procedure, and Has_Inherited_DIC.
1021 (Default_Init_Cond_Procedure): Removed.
1022 (DIC_Procedure): New routine.
1023 (Has_Default_Init_Cond): Removed.
1024 (Has_DIC): New routine.
1025 (Has_Inheritable_Invariants): The attribute applies to the base type.
1026 (Has_Inherited_Default_Init_Cond): Removed.
1027 (Has_Inherited_DIC): New routine.
1028 (Has_Inherited_Invariants): The attribute applies to the base type.
1029 (Has_Own_DIC): New routine.
1030 (Has_Own_Invariants): The attribute applies to the base type.
1031 (Is_Default_Init_Cond_Procedure): Removed.
1032 (Is_DIC_Procedure): New routine.
1033 (Set_Default_Init_Cond_Procedure): Removed.
1034 (Set_DIC_Procedure): New routine.
1035 (Set_Has_Default_Init_Cond): Removed.
1036 (Set_Has_Inheritable_Invariants): The attribute applies
1038 (Set_Has_Inherited_Default_Init_Cond): Removed.
1039 (Set_Has_Inherited_DIC): New routine.
1040 (Set_Has_Inherited_Invariants): The attribute applies to the base type.
1041 (Set_Has_Own_DIC): New routine.
1042 (Set_Has_Own_Invariants): The attribute applies to the base type.
1043 (Set_Is_Default_Init_Cond_Procedure): Removed.
1044 (Set_Is_DIC_Procedure): New routine.
1045 (Write_Entity_Flags): Update the output of all flags related to
1046 default initial condition.
1047 * exp_ch3.adb (Expand_N_Object_Declaration): Update the generation
1048 of the call to the DIC procedure.
1049 (Freeze_Type): Generate the body of the DIC procedure.
1050 * exp_ch7.adb (Build_Invariant_Procedure_Body): Replace
1051 all occurrences of Create_Append with Append_New_To. Do
1052 not generate an invariant procedure for a class-wide type.
1053 The generated body acts as a freeze action of the working type.
1054 (Build_Invariant_Procedure_Declaration): Do not generate an
1055 invariant procedure for a class-wide type.
1056 (Create_Append): Removed.
1057 * exp_util.adb: Add with and use clauses for Sem_Ch3, sem_ch6,
1058 sem_Ch12, Sem_Disp, and GNAT.HTable. Move the handling of
1059 class-wide pre/postcondition description and data structures from
1061 (Build_Class_Wide_Expression): Moved from Sem_Prag.
1062 (Build_DIC_Call): New routine.
1063 (Build_DIC_Procedure_Body): New routine.
1064 (Build_DIC_Procedure_Declaration): New routine.
1065 (Entity_Hash): Moved from Sem_Prag.
1066 (Find_DIC_Type): New routine.
1067 (Update_Primitives_Mapping): Reimplemented.
1068 (Update_Primitives_Mapping_Of_Types): New routine.
1069 * exp_util.ads (Build_Class_Wide_Expression): Moved from Sem_Prag.
1070 (Build_DIC_Call): New routine.
1071 (Build_DIC_Procedure_Body): New routine.
1072 (Build_DIC_Procedure_Declaration): New routine.
1073 (Update_Primitives_Mapping): Moved from Sem_Prag.
1074 (Update_Primitives_Mapping_Of_Types): New routine.
1075 * nlists.adb (Append_New): New routine.
1076 (Append_New_To): New routine.
1077 * nlists.ads (Append_New): New routine.
1078 (Append_New_To): New routine.
1079 * sem_ch3.adb (Analyze_Declarations): Do not generate the bodies
1080 of DIC procedures here. This is now done at the end of the
1081 visible declarations, private declarations, and at the freeze
1083 (Analyze_Private_Extension_Declaration):
1084 A private extension inherits the DIC pragma of a parent type.
1085 (Analyze_Subtype_Declaration): No need to propagate invariant
1086 attributes to a subtype as those apply to the base type.
1087 (Build_Derived_Record_Type): No need to inherit invariants here
1088 as this is now done in Build_Derived_Type.
1089 (Build_Derived_Type): Inherit both the DIC pragma and invariants from
1091 (Process_Full_View): Update the propagation of DIC attributes.
1092 (Propagate_Default_Init_Cond_Attributes): Removed.
1093 * sem_ch7.adb Add with and use clauses for Exp_Util.
1094 (Analyze_Package_Specification): Create the body of the DIC
1095 procedure at the end of the visible and private declarations.
1096 (Preserve_Full_Attributes): Propagate DIC attributes.
1097 * sem_ch9.adb (Analyze_Protected_Type_Declaration): Propagate
1099 (Analyze_Task_Type_Declaration): Propagate DIC attributes.
1100 * sem_elab.adb (Check_A_Call): Update the call to
1101 Is_Nontrivial_Default_Init_Cond_Procedure.
1102 * sem_prag.adb Remove the with and use clauses for
1103 GNAT.HTable. Move the handling of class- wide pre/postcondition
1104 description and data structures to Exp_Util.
1105 (Analyze_Pragma): Create the declaration of the DIC procedure. There
1106 is no need to propagate invariant-related attributes at this point
1107 as this is done in Build_Invariant_Procedure_Declaration.
1108 (Build_Class_Wide_Expression): Moved to Exp_Util.
1109 (Entity_Hash): Moved to Exp_Util.
1110 (Update_Primitives_Mapping): Moved to Exp_Util.
1111 * sem_prag.ads (Build_Class_Wide_Expression): Moved to Exp_Util.
1112 (Update_Primitives_Mapping): Moved to Exp_Util.
1113 * sem_util.adb: Remove with and use clauses for Ghost
1115 (Build_Default_Init_Cond_Call): Removed.
1116 (Build_Default_Init_Cond_Procedure_Bodies): Removed.
1117 (Build_Default_Init_Cond_Procedure_Declaration): Removed.
1118 (Get_Views): Reimplemented.
1119 (Has_Full_Default_Initialization): Reimplement the section on DIC.
1120 (Inherit_Default_Init_Cond_Procedure): Removed.
1121 (Is_Nontrivial_Default_Init_Cond_Procedure): Removed.
1122 (Is_Nontrivial_DIC_Procedure): New routine.
1123 (Is_Verifiable_DIC_Pragma): New routine.
1124 (Propagate_DIC_Attributes): New routine.
1125 * sem_util.ads (Build_Default_Init_Cond_Call): Removed.
1126 (Build_Default_Init_Cond_Procedure_Bodies): Removed.
1127 (Build_Default_Init_Cond_Procedure_Declaration): Removed.
1128 (Inherit_Default_Init_Cond_Procedure): Removed.
1129 (Is_Nontrivial_Default_Init_Cond_Procedure): Removed.
1130 (Is_Nontrivial_DIC_Procedure): New routine.
1131 (Is_Verifiable_DIC_Pragma): New routine.
1132 (Propagate_DIC_Attributes): New routine.
1133 * sem_warn.adb (Is_OK_Fully_Initialized): Reimplement the section
1135 * sinfo.ads, sinfo.adb: Add new attribute Expression_Copy along with
1137 (Expression_Copy): New routine along with pragma Inline.
1138 (Set_Expression_Copy): New routine along with pragma Inline.
1140 2017-01-06 Bob Duff <duff@adacore.com>
1142 * bindgen.adb (Gen_Adainit, Gen_Adafinal): Change
1143 "Bind_Main_Program" to "not Bind_For_Library", because otherwise
1144 we won't generate the call to s_stalib_adafinal when the main
1145 is not written in Ada.
1147 2017-01-06 Bob Duff <duff@adacore.com>
1149 * sem_prag.adb: Minor: remove pragma Warnings.
1151 2017-01-06 Tristan Gingold <gingold@adacore.com>
1153 * Makefile.rtl: Do not compile s-stchop by default.
1155 2017-01-06 Patrick Bernardi <bernardi@adacore.com>
1157 * aspects.adb, aspects.ads, exp_ch3.adb, exp_ch9.adb, par-prag.adb,
1158 sem_ch13.adb, sem_prag.adb, sem_prag.ads, snames.adb-tmpl,
1159 snames.ads-tmpl, s-secsta.adb, s-secsta.ads, s-tarest.adb,
1160 s-tarest.ads, s-taskin.adb, s-taskin.ads, s-tassta.adb, s-tassta.ads:
1161 Reverted previous change for now.
1163 2017-01-06 Ed Schonberg <schonberg@adacore.com>
1165 * exp_ch3.adb (Build_Initialization_Call): Apply predicate
1166 check to default discriminant value if checks are enabled.
1167 (Build_Assignment): If type of component has static predicate,
1168 apply check to its default value, if any.
1170 2017-01-06 Patrick Bernardi <bernardi@adacore.com>
1172 * aspect.adb, aspect.ads: Added new aspect Secondary_Stack_Size.
1173 * exp_ch3.adb (Build_Init_Statements): As part of initialising
1174 the value record of a task, set its _Secondary_Stack_Size field
1176 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Create
1177 a _Secondary_Stack_Size field in the value record of
1178 the task if a Secondary_Stack_Size rep item is present.
1179 (Make_Task_Create_Call): Include secondary stack size
1180 parameter. If No_Secondary_Stack restriction is in place, passes
1182 * par-prag.adb, sem_prag.adb, sem_prag.ads: Added new pragma
1183 Secondary_Stack_Size.
1184 * s-secsta.adb, s-secsta.ads (Minimum_Secondary_Stack_Size): New
1185 function to define the overhead of the secondary stack.
1186 * s-tarest.adb (Create_Restricted_Task,
1187 Create_Restricted_Task_Sequential): Functions now include
1188 Secondary_Stack_Size parameter to pass to Initialize_ATCB.
1189 * s-tarest.adb (Create_Restricted_Task,
1190 Create_Restricted_Task_Sequential): Calls to Initialize_ATCB
1191 now include Secondary_Stack_Size parameter.
1193 Secondary stack now allocated to the size specified by the
1194 Secondary_Stack_Size parameter in the task's ATCB.
1195 * s-taskin.adb, s-taskin.adb (Common_ATCB, Initialise_ATCB): New
1196 Secondary_Stack_Size component.
1197 * s-tassta.adb, s-tassta.ads (Create_Restricted_Task,
1198 Create_Restricted_Task_Sequential): Function now include
1199 Secondary_Stack_Size parameter.
1200 (Task_Wrapper): Secondary stack
1201 now allocated to the size specified by the Secondary_Stack_Size
1202 parameter in the task's ATCB.
1203 * sem_ch13.adb (Analyze_Aspect_Specification): Add support
1204 for Secondary_Stack_Size aspect, turning the aspect into its
1205 corresponding internal attribute.
1206 (Analyze_Attribute_Definition):
1207 Process Secondary_Stack_Size attribute.
1208 * snames.adb-tmpl, snames.ads-tmpl: Added names
1209 Name_Secondary_Stack_Size, Name_uSecondary_Stack_Size,
1210 Attribute_Secondary_Stack_Size and Pragma_Secondary_Stack_Size.
1212 2017-01-06 Pascal Obry <obry@adacore.com>
1214 * a-direio.adb, a-direio.ads, a-sequio.adb, a-sequio.ads: Add Flush to
1215 Sequential_IO and Direct_IO.
1217 2017-01-06 Bob Duff <duff@adacore.com>
1219 * snames.ads-tmpl (Renamed): New name for the pragma argument.
1220 * par-ch2.adb: Allow the new pragma (with analysis deferred
1222 * sinfo.ads, sinfo.adb (Map_Pragma_Name, Pragma_Name_Mapped):
1223 Keep a mapping from new pragma names to old names.
1224 * sem_prag.adb: Check legality of pragma Rename_Pragma, and
1225 implement it by calling Map_Pragma_Name.
1226 * checks.adb, contracts.adb, einfo.adb, errout.adb,
1227 * exp_attr.adb, exp_ch3.adb, exp_ch6.adb, exp_ch7.adb, exp_ch9.adb,
1228 * exp_prag.adb, exp_util.adb, freeze.adb, frontend.adb, ghost.adb,
1229 * inline.adb, lib-writ.adb, scans.adb, scans.ads, sem_attr.adb,
1230 * sem_aux.adb, sem_ch10.adb, sem_ch13.adb, sem_ch6.adb, sem_ch9.adb,
1231 * sem_elab.adb, sem_res.adb, sem_util.adb, sem_util.ads,
1232 * sem_warn.adb: Call Pragma_Name_Mapped instead of Pragma_Name
1235 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
1237 * exp_ch9.adb: Minor reformatting.
1239 2017-01-06 Tristan Gingold <gingold@adacore.com>
1241 * exp_ch9.ads, exp_ch9.adb (Build_Entry_Names): Remove (unused).
1242 * rtsfind.ads (RE_Task_Entry_Names_Array, RO_ST_Set_Entry_Names)
1243 (RE_Protected_Entry_Names_Array, RO_PE_Set_Entry_Names): Remove
1245 * s-taskin.ads, s-taskin.adb (Set_Entry_Names,
1246 Task_Entry_Names_Array, Task_Entry_Names_Access): Remove.
1247 * s-tpoben.ads, s-tpoben.adb (Set_Entry_Names,
1248 Protected_Entry_Names_Array, Protected_Entry_Names_Access): Remove.
1250 2017-01-06 Bob Duff <duff@adacore.com>
1252 * sinfo.ads, sinfo.adb (Map_Pragma_Name): Preparation work,
1253 dummy implementation of Map_Pragma_Name.
1255 2017-01-06 Tristan Gingold <gingold@adacore.com>
1257 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Make the
1258 entry_body variable constant.
1259 * s-taprob.ads (Entry_Body_Access): Move to s-tposen.
1260 * s-tpoben.ads (Protected_Entry_Body_Access): Now access
1262 * s-tposen.ads (Entry_Body_Access): Moved from s-taprob,
1263 now access to constant.
1265 2017-01-06 Gary Dismukes <dismukes@adacore.com>
1267 * einfo.ads, sem_res.adb, sem_attr.adb, sem_ch6.adb: Minor
1268 reformatting and typo fixes.
1270 2017-01-06 Bob Duff <duff@adacore.com>
1272 * snames.ads-tmpl: New names for pragma renaming.
1273 * snames.adb-tmpl (Is_Configuration_Pragma_Name): Minor cleanup.
1274 * par-prag.adb: Add new pragma name to case statement.
1275 * sem_prag.adb (Rename_Pragma): Initial cut at semantic analysis
1277 * sinfo.ads, sinfo.adb (Pragma_Name_Mapped): Preparation work,
1278 Dummy implementation of Pragma_Name_Mapped.
1280 2017-01-06 Ed Schonberg <schonberg@adacore.com>
1282 * exp_ch6.adb (Expand_Protected_Subprogram_Call): Add guard to
1283 better detect call within an entry_wrapper.
1284 * sem_res.adb (Resolve_Call): A protected call within an
1285 entity_wrapper is analyzed in the context of the protected
1286 object but corresponds to a pre-analysis and is not an access
1288 * sem_attr.adb: Minor reformatting.
1290 2017-01-06 Justin Squirek <squirek@adacore.com>
1292 * sem_attr.adb (Analyze_Attribute): Modify semantic checks for
1293 Finalization_Size to allow a prefix of any non-class-wide type.
1294 * sem_attr.ads Modify comment for Finalization_Size to include
1295 definite type use case.
1297 2017-01-06 Ed Schonberg <schonberg@adacore.com>
1299 * einfo.ads, einfo.adb (Is_Entry_Wrapper): New flag, defined
1300 on procedures that are wrappers created for entries that have
1302 * sem_ch6.adb (Analyze_Subrogram_Body_Helper): If the subprogram
1303 body is an entry_wrapper, compile it in the context of the
1304 synchronized type, because a precondition may refer to funtions
1306 * exp_ch9.adb (Build_Contract_Wrapper): Set Is_Entry_Wrapper on
1308 * exp_ch6.adb (Expand_Protected_Subprogram_Call): if the call is
1309 within an Entry_Wrapper this is an external call whose target
1310 is the synchronized object that is the actual in the call to
1313 2017-01-06 Yannick Moy <moy@adacore.com>
1315 * sem_attr.adb (Analyze_Attribute/Attribute_Loop_Entry): Analyze node
1316 in tree, which means not analyzing the previous prefix if the node has
1317 been rewritten into its prefix.
1319 2017-01-06 Gary Dismukes <dismukes@adacore.com>
1321 * s-tpobop.adb: Minor reformatting.
1323 2017-01-06 Ed Schonberg <schonberg@adacore.com>
1325 * checks.adb (Ensure_Valid): Do not generate a validity check
1326 within a generated predicate function, validity checks will have
1327 been applied earlier when required.
1329 2017-01-06 Tristan Gingold <gingold@adacore.com>
1331 * s-tpoben.ads (Protection_Entries): Add comment and reorder
1332 components for performances.
1333 * s-tpobop.adb (PO_Do_Or_Queue): Implement Max_Queue_Length runtime
1336 2017-01-06 Ed Schonberg <schonberg@adacore.com>
1338 * sem_eval.adb (Check_Expression_Against_Static_Predicate):
1339 If expression is compile-time known and obeys a static predicate
1340 it must be labelled as static, to prevent spurious warnings and
1341 run-time errors, e.g. in case statements. This is relevant when
1342 the expression is the result of constant-folding a type conversion
1343 whose expression is a variable with a known static value.
1345 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
1347 * exp_attr.adb, sem_attr.ads: Minor reformatting.
1349 2017-01-06 Justin Squirek <squirek@adacore.com>
1351 * exp_attr.adb (Expand_N_Attribute_Reference): Add entry for
1352 expansion of Finalization_Size attribute.
1353 * sem_attr.adb (Analyze_Attribute): Add entry to check the
1354 semantics of Finalization_Size.
1355 (Eval_Attribute): Add null entry for Finalization_Size.
1356 * sem_attr.ads: Add Finalization_Size to the implementation
1357 dependent attribute list.
1358 * snames.ads-tmpl: Add name entry for Finalization_Size attribute.
1360 2017-01-06 Ed Schonberg <schonberg@adacore.com>
1362 * sem_ch5.adb (Analyze_Loop_Statement): If the loop includes an
1363 iterator specification with a serious syntactic error, transform
1364 construct into an infinite loop in order to continue analysis
1365 and prevent a compiler abort.
1367 2017-01-06 Tristan Gingold <gingold@adacore.com>
1369 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Do not generate
1370 max_queue_lengths_array if unused.
1372 2017-01-06 Bob Duff <duff@adacore.com>
1374 * errout.adb (Set_Msg_Text): Protect against out-of-bounds
1375 array access, in case "\" is at the end of Text.
1376 * stylesw.adb (Set_Style_Check_Options): Don't include input
1377 characters in the error message template, because they could
1378 be control characters such as "\", which Errout will try to
1381 2017-01-06 Ed Schonberg <schonberg@adacore.com>
1383 * sem_ch4.adb (Find_Indexing_Operations, Inspect_Declarations):
1384 For a private type examine the visible declarations that follow
1385 the partial view, not just the private declarations that follow
1388 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
1390 * exp_ch5.adb, sem_ch3.adb, checks.adb: Minor reformatting and
1393 2017-01-06 Ed Schonberg <schonberg@adacore.com>
1395 * exp_ch5.adb (Get_Default_Iterator): For a derived type, the
1396 alias of the inherited op is the parent iterator, no need to
1397 examine dispatch table positions which might not be established
1398 yet if type is not frozen.
1399 * sem_disp.adb (Check_Controlling_Formals): The formal of a
1400 predicate function may be a subtype of a tagged type.
1401 * sem_ch3.adb (Complete_Private_Subtype): Adjust inheritance
1402 of representation items for the completion of a type extension
1403 where a predicate applies to the partial view.
1404 * checks.ads, checks.adb (Apply_Predicate_Check): Add optional
1405 parameter that designates function whose actual receives a
1406 predicate check, to improve warning message when the check will
1407 lead to infinite recursion.
1408 * sem_res.adb (Resolve_Actuals): Pass additional parameter to
1409 Apply_Predicate_Check.
1411 2017-01-06 Tristan Gingold <gingold@adacore.com>
1413 * s-rident.ads (Profile_Info): Remove No_Entry_Queue from
1414 Gnat_Extended_Ravenscar.
1415 * exp_ch9.adb, s-tpoben.adb, s-tpoben.ads: Fix spelling.
1417 2017-01-06 Gary Dismukes <dismukes@adacore.com>
1419 * sem_util.ads: Minor typo fix and reformatting.
1421 2017-01-06 Yannick Moy <moy@adacore.com>
1423 * ghost.adb Minor fixing of references to SPARK RM.
1424 (Check_Ghost_Context): Check whether reference is to a lvalue
1425 before issuing an error about violation of SPARK RM 6.9(13)
1426 when declaration has Ghost policy Check and reference has Ghost
1428 * sem_util.adb Minor indentation.
1429 * sem_ch10.adb (Analyze_Package_Body_Stub, Analyze_Protected_Body_Stub,
1430 Analyze_Task_Body_Stub): Set Ekind of the defining identifier.
1431 * sem_util.ads (Unique_Defining_Entity): Document the result
1432 for package body stubs.
1434 2017-01-06 Tristan Gingold <gingold@adacore.com>
1436 * raise-gcc.c (abort): Macro to call Abort_Propagation.
1437 * s-tpoben.ads (Protected_Entry_Queue_Max_Access): Make it access
1439 * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
1440 Do not generate the Entry_Max_Queue_Lengths_Array if all default
1442 * exp_util.adb (Corresponding_Runtime_Package): Consider
1443 Max_Queue_Length pragma.
1445 2017-01-06 Justin Squirek <squirek@adacore.com>
1447 * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
1448 Remove declaration generation in the case of
1449 System_Tasking_Protected_Objects_Single_Entry being used,
1450 and add a warning message when this is detected to occur.
1451 (Make_Initialize_Protection): Remove reference pass in the case
1452 of System_Tasking_Protected_Objects_Single_Entry.
1453 * rtsfind.ads: Remove RE_Protected_Entry_Queue_Max
1454 * s-tposen.adb (Initialize_Protection_Entry): Remove
1455 Entry_Queue_Max parameter.
1456 * s-tposen.ads: Remove the types use to store the entry queue
1458 * sem_prag.adb (Analyze_Pragma): Remove entry families restriction
1460 2017-01-06 Yannick Moy <moy@adacore.com>
1462 * sem_util.adb, sem_util.ads (Get_Enum_Lit_From_Pos): Strengthen
1463 behavior of function, to also accept out of range positions
1464 and raise Constraint_Error in such case, and to copy sloc from
1465 literal if No_Location passed as location.
1466 * uintp.adb, uintp.ads (UI_To_Int, UI_To_CC): Strengthen behavior
1467 of functions to raise Constraint_Error in case of value not in
1470 2017-01-06 Tristan Gingold <gingold@adacore.com>
1472 * sem_util.adb, s-taprop-linux.adb (Finalize_TCB): Remove call to
1473 Invalidate_Stack_Cache.
1475 2017-01-06 Eric Botcazou <ebotcazou@adacore.com>
1477 * s-os_lib.adb: Minor fix to the signature of Readlink.
1479 2017-01-06 Javier Miranda <miranda@adacore.com>
1481 * sem_ch6.adb (Conforming_Types): Handle another
1482 confusion between views in a nested instance with an actual
1483 private type whose full view is not in scope.
1485 2017-01-06 Arnaud Charlet <charlet@adacore.com>
1487 * exp_ch5.adb (Expand_N_If_Statement): Obey existing comment and
1488 mark a rewritten if statement as explicit (Comes_From_Source).
1490 2017-01-06 Gary Dismukes <dismukes@adacore.com>
1492 * sem_prag.adb, rtsfind.adb, sem_util.adb: Minor typo fixes.
1494 2017-01-06 Tristan Gingold <gingold@adacore.com>
1496 * ada.ads, a-unccon.ads: Add pragma No_Elaboration_Code_All.
1498 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
1500 * sem_case.adb: Minor reformatting.
1502 2017-01-06 Thomas Quinot <quinot@adacore.com>
1504 * g-socthi-mingw.adb: Remove now extraneous USE TYPE clause
1506 2017-01-06 Justin Squirek <squirek@adacore.com>
1508 * aspects.adb: Register aspect in Canonical_Aspect.
1509 * aspects.ads: Associate qualities of Aspect_Max_Queue_Length
1510 into respective tables.
1511 * einfo.ads, einfo.adb: Add a new attribute for
1512 handling the parameters for Pragma_Max_Entry_Queue
1513 (Entry_Max_Queue_Lengths_Array) in E_Protected_Type. Subprograms
1514 for accessing and setting were added as well.
1515 * par-prag.adb (Prag): Register Pramga_Max_Entry_Queue.
1516 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Emit
1517 declaration for pramga arguments and store them in the protected
1519 (Make_Initialize_Protection): Pass a reference to
1520 the Entry_Max_Queue_Lengths_Array in the protected type node to
1522 * rtsfind.adb: Minor grammar fix.
1523 * rtsfind.ads: Register new types taken from the
1524 runtime libraries RE_Protected_Entry_Queue_Max and
1525 RE_Protected_Entry_Queue_Max_Array
1526 * s-tposen.adb, s-tpoben.adb
1527 (Initialize_Protection_Entry/Initialize_Protection_Entries):
1528 Add extra parameter and add assignment to local object.
1529 * s-tposen.ads, s-tpoben.ads: Add new types to
1530 store entry queue maximums and a field to the entry object record.
1531 * sem_ch13.adb (Analyze_Aspect_Specifications): Add case statement
1532 for Aspect_Max_Queue_Length.
1533 (Check_Aspect_At_Freeze_Point):
1534 Add aspect to list of aspects that don't require delayed analysis.
1535 * sem_prag.adb (Analyze_Pragma): Add case statement for
1536 Pragma_Max_Queue_Length, check semantics, and register arugments
1537 in the respective entry nodes.
1538 * sem_util.adb, sem_util.ads Add functions Get_Max_Queue_Length
1539 and Has_Max_Queue_Length
1540 * snames.ads-tmpl: Add constant for the new aspect-name
1541 Name_Max_Queue_Length and corrasponding pragma.
1543 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
1545 * exp_util.adb (Is_Controlled_Function_Call):
1546 Reimplemented. Consider any node which has an entity as the
1547 function call may appear in various ways.
1549 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
1551 * exp_attr.adb (Rewrite_Stream_Proc_Call): Use
1552 an unchecked type conversion when performing a view conversion
1553 to/from a private type. In all other cases use a regular type
1554 conversion to ensure that any relevant checks are properly
1557 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
1559 * sem_prag.adb, sem_ch8.adb: Minor reformatting.
1561 2017-01-06 Ed Schonberg <schonberg@adacore.com>
1563 * sem_case.adb (Explain_Non_Static_Bound): Suppress cascaded
1564 error on case expression that is an entity, when coverage is
1565 incomplete and entity has a static value obtained by local
1567 (Handle_Static_Predicate): New procedure, subsidiary of
1568 Check_Choices, to handle case alternatives that are either
1569 subtype names or subtype indications involving subtypes that
1570 have static predicates.
1572 2017-01-06 Thomas Quinot <quinot@adacore.com>
1574 * s-oscons-tmplt.c, g-socket.adb, g-socket.ads, g-sothco.ads:
1575 (GNAT.Socket): Add support for Busy_Polling and Generic_Option
1577 2017-01-06 Bob Duff <duff@adacore.com>
1579 * sem_elab.adb (Activate_Elaborate_All_Desirable): Don't add
1580 Elaborate_All(P) to P itself. That could happen in obscure cases,
1581 and always introduced a cycle (P body must be elaborated before
1583 * lib-writ.ads: Comment clarification.
1584 * ali-util.ads: Minor comment fix.
1585 * ali.adb: Minor reformatting.
1587 2017-01-06 Tristan Gingold <gingold@adacore.com>
1589 * a-exexpr-gcc.adb: Improve comment.
1591 2017-01-03 James Cowgill <James.Cowgill@imgtec.com>
1593 * s-linux-mips.ads: Use correct signal and errno constants.
1594 (sa_handler_pos, sa_mask_pos): Fix offsets for 64-bit MIPS.
1596 2017-01-03 James Cowgill <James.Cowgill@imgtec.com>
1598 * s-linux-mips.ads: Rename from s-linux-mipsel.ads.
1599 * gcc-interface/Makefile.in (MIPS/Linux): Merge mips and mipsel
1602 2017-01-01 Eric Botcazou <ebotcazou@adacore.com>
1604 * gnatvsn.ads: Bump copyright year.
1606 2017-01-01 Jakub Jelinek <jakub@redhat.com>
1608 * gnat_ugn.texi: Bump @copying's copyright year.
1609 * gnat_rm.texi: Likewise.
1611 Copyright (C) 2017 Free Software Foundation, Inc.
1613 Copying and distribution of this file, with or without modification,
1614 are permitted in any medium without royalty provided the copyright
1615 notice and this notice are preserved.