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