]> gcc.gnu.org Git - gcc.git/blob - gcc/ada/ChangeLog
[multiple changes]
[gcc.git] / gcc / ada / ChangeLog
1 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
2
3 * sem_attr.ads Add new table Universal_Type_Attribute.
4 * sem_util.adb (Yields_Universal_Type): Use a table lookup when
5 checking attributes.
6
7 2016-04-20 Ed Schonberg <schonberg@adacore.com>
8
9 * exp_aggr.adb (Init_Stored_Discriminants,
10 Init_Visible_Discriminants): New procedures, subsidiary of
11 Build_Record_Aggr_Code, to handle properly the construction
12 of aggregates for a derived type that constrains some parent
13 discriminants and renames others.
14
15 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
16
17 * sem_ch12.adb (Qualify_Universal_Operands): New routine.
18 (Save_References_In_Operator): Add explicit qualifications in
19 the generic template for all operands of universal type.
20 * sem_type.adb (Disambiguate): Update the call to Matches.
21 (Matches): Reimplemented.
22 * sem_util.ads, sem_util.adb (Yields_Universal_Type): New routine.
23
24 2016-04-20 Ed Schonberg <schonberg@adacore.com>
25
26 * sem_ch13.adb (Rep_Item_Too_Late): Better error message for
27 an illegal aspect that freezes the entity to which it applies.
28
29 2016-04-20 Bob Duff <duff@adacore.com>
30
31 * a-stwibo.ads, a-stzbou.ads
32 ("="): Add overriding keyword before function to avoid crash when
33 compiler is called with -gnatyO (check overriding indicators).
34
35 2016-04-20 Ed Schonberg <schonberg@adacore.com>
36
37 * sem_prag.adb (Analyze_Pragma, case Check_Policy): If this
38 is a configuration pragma and it uses the ARG syntax, insert
39 the rewritten pragma after the current one rather than using
40 Insert_Actions.
41
42 2016-04-20 Arnaud Charlet <charlet@adacore.com>
43
44 * exp_aggr.adb (Backend_Processing_Possible): Add handling of
45 C back-end.
46
47 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
48
49 * s-imgllu.adb, sem_util.adb, s-imgint.adb, s-imguns.adb,
50 s-imglli.adb: Minor reformatting.
51
52 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
53
54 * sem_res.adb (Rewrite_Renamed_Operator): Do not rewrite the
55 renamed operator when the associated node appears within a
56 pre/postcondition.
57 * sem_util.ads, sem_util.adb (In_Pre_Post_Condition): New routine.
58
59 2016-04-20 Yannick Moy <moy@adacore.com>
60
61 * osint.adb (Relocate_Path): Fix test when Path is shorter than Prefix.
62 * einfo.adb (Set_Overridden_Operation): Add assertion.
63 * sem_util.adb (Unique_Entity): for renaming-as-body return the spec
64 entity.
65
66 2016-04-20 Javier Miranda <miranda@adacore.com>
67
68 * exp_unst.adb (Append_Unique_Call): New subprogram.
69 (Unnest_Subprogram): Replace the unique occurrence
70 of Call.Append() by Append_Unique_Call() which protects us from
71 adding to the Calls table duplicated entries.
72
73 2016-04-20 Arnaud Charlet <charlet@adacore.com>
74
75 * exp_attr.adb (Is_GCC_Target): Fix for C backend.
76 * xref_lib.ads (Dependencies_Tables): instantiate
77 Table package with types that guarantee its safe use.
78 * s-imgllu.adb, s-imgint.adb, s-imguns.adb, s-imglli.adb: Avoid nested
79 procedures.
80
81 2016-04-20 Arnaud Charlet <charlet@adacore.com>
82
83 * exp_attr.adb (Expand_N_Attribute_Reference [Attribute_Valid]):
84 Disable expansion when generating C code.
85 * sinfo.ads, inline.ads: Minor editing.
86
87 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
88
89 * sem_util.adb, contracts.adb, ghost.adb, exp_ch6.adb: Minor
90 reformatting.
91
92 2016-04-20 Javier Miranda <miranda@adacore.com>
93
94 * contracts.adb (Build_Postconditions_Procedure): Code cleanup.
95 * ghost.adb (Os_OK_Ghost_Context.Is_OK_Declaration): Handle the
96 declaration of the internally built _postcondition procedure.
97
98 2016-04-20 Arnaud Charlet <charlet@adacore.com>
99
100 * snames.ads-tmpl (Internal_Attribute_Id, Attribute_Class_Array): Fix
101 indentation.
102 * sem_util.adb (Is_Unchecked_Conversion_Instance):
103 defense against library-level renamings of other functions,
104 which are never instances of Unchecked_Conversion.
105 * einfo.ads: minor fix of casing in comment
106
107 2016-04-20 Ed Schonberg <schonberg@adacore.com>
108
109 * exp_ch6.adb (Expand_N_Subprogram_Stub): Do not expand a body
110 that has been analyzed and expanded already. Qualify the names
111 in the proper body for use in the generation of C code.
112
113 2016-04-20 Javier Miranda <miranda@adacore.com>
114
115 * contracts.adb (Build_Postconditions_Procedure): Force its
116 inlining when generating C code.
117 * sem_attr.adb (Analyze_Attribute_Old_Result): Handle inlined
118 _postconditions when generating C code.
119 * exp_ch6.adb (Inlined_Subprogram): Inline calls to
120 _postconditions when generating C code.
121 * sinfo.ads, sinfo.adb (Corresponding_Spec, Set_Corresponding_Spec):
122 types of return value and argument changed from Node_Id to
123 Entity_Id.
124
125 2016-04-20 Vincent Celier <celier@adacore.com>
126
127 * make.adb, clean.adb, gnatname.adb: Revert previous change for now.
128
129 2016-04-20 Eric Botcazou <ebotcazou@adacore.com>
130
131 * sem_ch12.adb (Analyze_Instance_And_Renamings): Do not reset
132 the Has_Delayed_Freeze flag on the anonymous instance node.
133
134 2016-04-20 Javier Miranda <miranda@adacore.com>
135
136 * sem_ch5.adb (Analyze_Iterator_Specification): Remove transient
137 scope associated with the renaming object declaration.
138 * exp_util.adb (Insert_Actions): Remove handling of iterator
139 loop marked as requiring the secondary stack.
140
141 2016-04-20 Ed Schonberg <schonberg@adacore.com>
142
143 * sem_attr.adb (Analyze_Attribute, case 'Image): Implement
144 AI12-0124, which extends the functionality of the attribute so it
145 reflects the semantics of GNAT 'Img when applied to scalar types.
146 * lib-xref.adb: minor whitespace layout fix.
147
148 2016-04-20 Vincent Celier <celier@adacore.com>
149
150 * clean.adb (Gnatclean): Fail if project file specified and
151 gprclean is not available.
152 * gnatname.adb: Fail is -P is used and gprname is not available.
153 * make.adb (Initialize): Fail if project file specified and
154 gprbuild is not available.
155
156 2016-04-20 Bob Duff <duff@adacore.com>
157
158 * sem_ch5.adb (Analyze_Iterator_Specification): Do not use secondary
159 stack when possible.
160
161 2016-04-20 Gary Dismukes <dismukes@adacore.com>
162
163 * par_sco.adb, sem_util.adb, sem_ch13.adb: Minor typo corrections and
164 reformatting.
165
166 2016-04-20 Ed Schonberg <schonberg@adacore.com>
167
168 * sem_prag.adb (Analyze_Pragma, case Default_Storage_Pool):
169 If the pragma comes from an aspect specification, verify that
170 the aspect applies to an entity with a declarative part.
171 * exp_ch5.adb: Code cleanup.
172
173 2016-04-20 Ed Schonberg <schonberg@adacore.com>
174
175 * sem_res.adb (Resolve_If_Expression): If first expression is
176 universal, resolve subsequent ones with the corresponding class
177 type (Any_Integer or Any_Real).
178
179 2016-04-20 Ed Schonberg <schonberg@adacore.com>
180
181 * sem_ch5.adb (Analyze_Iterator_Specification): If expansion is
182 disabled, complete the analysis of the iterator name to ensure
183 that reference for entities within are properly generated.
184
185 2016-04-20 Arnaud Charlet <charlet@adacore.com>
186
187 * a-dispat.ads (Yield): add Global contract.
188 * a-calend.ads, a-reatim.ads: Added Initializes => Clock_Time.
189 * a-taside.adb: Added Initializes => Tasking_State.
190
191 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
192
193 * sem_ch13.adb (Build_Invariant_Procedure):
194 Reimplement the invariant procedure spec and body insertion.
195
196 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
197
198 * sem_ch13.adb (Add_Invariant): Do not replace
199 the saved expression of an invariatn aspect when inheriting
200 a class-wide type invariant as this clobbers the existing
201 expression. Do not use New_Copy_List as it is unnecessary
202 and leaves the parent pointers referencing the wrong part of
203 the tree. Do not replace the type references for ASIS when
204 inheriting a class-wide type invariant as this clobbers the
205 existing replacement.
206
207 2016-04-20 Ed Schonberg <schonberg@adacore.com>
208
209 * sem_util.adb (Build_Explicit_Dereference): If the designated
210 expression is an entity name, generate reference to the entity
211 because it will not be resolved again.
212
213 2016-04-19 Arnaud Charlet <charlet@adacore.com>
214
215 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
216 gnat_rm.texi: Update documentation.
217
218 2016-04-19 Olivier Hainque <hainque@adacore.com>
219
220 * par_sco.adb (Traverse_One, case N_Case_Statement):
221 Skip pragmas before the first alternative.
222 (Traverse_Handled_Statement_Sequence, Exception_Handlers): Likewise.
223
224 2016-04-19 Tristan Gingold <gingold@adacore.com>
225
226 * adaint.c (__gnat_lwp_self): New function (for darwin).
227 * s-osinte-darwin.ads, s-osinte-darwin.adb (lwp_self): Import
228 of __gnat_lwp_self.
229
230 2016-04-19 Olivier Hainque <hainque@adacore.com>
231
232 * sem_util.adb (Build_Elaboration_Entity): Always request an
233 elab counter when preserving control-flow.
234
235 2016-04-19 Olivier Hainque <hainque@adacore.com>
236
237 * sem_ch13.adb (Build_Invariant_Procedure_Declaration): Set
238 Needs_Debug_Info when producing SCOs.
239 * par_sco.adb (Traverse_Aspects): Fix categorization of
240 Type_Invariant to match actual processing as activated depending
241 on pragma Assertion_Policy.
242 * sem_prag.adb (Analyze_Pragma): Remove special case for
243 Name_Invariant regarding SCO generation, which completely disabled
244 the production of SCOs for Invariant pragmas and aspects.
245
246 2016-04-19 Hristian Kirtchev <kirtchev@adacore.com>
247
248 * checks.adb, sem_util.adb, sem_res.adb, sem_attr.adb: Minor
249 reformatting.
250
251 2016-04-19 Ed Schonberg <schonberg@adacore.com>
252
253 * freeze.adb (Freeze_Profile): Refine predicate that checks
254 whether a function that returns a limited view is declared in
255 another unit and cannot be frozen at this point.
256
257 2016-04-19 Ed Schonberg <schonberg@adacore.com>
258
259 * exp_aggr.adb (Component_Count): Handle properly superflat
260 arrays, i.e. empty arrays where Hi < Lo - 1, to ensure that the
261 return value of the function is Natural, rather than leaving
262 the handling of such arrays to the caller of this function.
263
264 2016-04-19 Arnaud Charlet <charlet@adacore.com>
265
266 * sem_prag.adb, sem_attr.adb, par-prag.adb, exp_aggr.adb, sem_type.adb
267 sem_ch12.adb, sem_ch3.adb, exp_ch7.adb, exp_ch9.adb: Code cleanup.
268 * sem_res.adb, sem_util.ads, sem_util.adb (Is_OK_Volatile_Context):
269 Promoted from being a nested subprogram in Sem_Res.Resolve_Entity_Name
270 to publicly visible routine in Sem_Util.
271
272 2016-04-19 Ed Schonberg <schonberg@adacore.com>
273
274 * checks.adb (Apply_Parameter_Aliasing_Checks): Do not apply
275 the check if the type of the actual is By_Reference.
276
277 2016-04-19 Arnaud Charlet <charlet@adacore.com>
278
279 * sem_res.adb (Within_Subprogram_Call): Detect
280 also nodes that appear in entry calls.
281 (Resolve_Actuals, Insert_Default): Propagate
282 dimension information if any, from default expression to the
283 copy that appears in the list of actuals.
284 * uintp.ads: minor whitespace fix in comment.
285 * sem_prag.adb, stringt.adb, inline.adb, lib-xref-spark_specific.adb:
286 Minor code cleanup.
287 * set_targ.adb (Set_Targ): convert directly from
288 Natural to Pos, without intermediate conversion to Int.
289
290 2016-04-19 Arnaud Charlet <charlet@adacore.com>
291
292 * sem_ch6.adb (Process_Formals): Mark suspicious reference to
293 SPARK RM in comment.
294 * sem_prag.adb (Analyze_Global_Item): Fix reference to SPARK RM
295 in comment.
296 * sem_res.adb (Property_Error, Resolve_Actuals): Fix reference
297 to SPARK RM in both comment and error message.
298
299 2016-04-19 Eric Botcazou <ebotcazou@adacore.com>
300
301 * sem_ch6.adb (Possible_Freeze): If the type is an incomplete
302 CW type, then the subprogram must have a delayed freeze. This
303 ensures that the backend can properly recover the full view when
304 elaborating the access subprogram declaration.
305
306 2016-04-19 Ed Schonberg <schonberg@adacore.com>
307
308 * sem_attr.adb (Resolve_Attribute, case 'Access): Freeze
309 overloadable entity if originally overloaded.
310
311 2016-04-19 Arnaud Charlet <charlet@adacore.com>
312
313 * exp_aggr.adb, exp_ch3.adb, exp_ch7.adb, exp_ch9.adb, exp_code.adb,
314 exp_fixd.adb, namet.adb, osint.adb, osint.ads, par-ch2.adb,
315 sem_ch10.adb, sem_ch12.adb, sem_disp.adb, sem_elab.adb, sem_elim.adb
316 sem_util.adb, styleg.adb, styleg.ads, stylesw.ads: Minor code
317 clean up.
318
319 2016-04-19 Arnaud Charlet <charlet@adacore.com>
320
321 * sem_util.adb (Copy_Node_With_Replacement):
322 use Set_Comes_From_Source instead of directly manipulating
323 internals of the node table.
324 * sem_util.adb (Within_Scope): refactored to remove duplicated code.
325 * sem_aux.adb (Get_Rep_Pragma,
326 Subprogram_Body_Entity, Subprogram_Spec): declare variables that
327 do not change as constants and initialize them in the declaration.
328 (Get_Rep_Pragma, Subprogram_Body_Entity, Subprogram_Spec): declare
329 variables that do not change as constants and initialize them
330 in the declaration.
331
332 2016-04-19 Ed Schonberg <schonberg@adacore.com>
333
334 * sem_res.adb (Resolve_Entry_Call): If the entry has
335 preconditions it is rewritten by means of a wrapper that
336 incorporates the original call. Before rewriting generate a
337 reference to the entry being called to prevent spurious warnings
338 and provide correct cross-reference information.
339
340 2016-04-19 Hristian Kirtchev <kirtchev@adacore.com>
341
342 * sem_disp.adb (Check_Dispatching_Context): Code cleanup. Add
343 local constant Scop. Ignore any internally generated loops when
344 performing the check concerning an abstract subprogram call
345 without a controlling argument.
346 * sem_util.ads, sem_util.adb (Current_Scope_No_Loops): New routine.
347
348 2016-04-19 Bob Duff <duff@adacore.com>
349
350 * sem_elab.adb (Check_A_Call): There are cases where we have No
351 (Ent) after the Alias loop, even when there was no previous error,
352 so we can't assert that there was an error.
353
354 2016-04-19 Ed Schonberg <schonberg@adacore.com>
355
356 * sem_attr.adb (Analyze_Access_Attribute, OK_Self_Reference):
357 Reject use of type name as a prefix to 'access within an aggregate
358 in a context that is not the declarative region of a type.
359
360 2016-04-19 Vincent Celier <celier@adacore.com>
361
362 * gnatcmd.adb: Make "gnat ls -P" invoke gprls Make "gnat bind
363 -P" invoke "gprbuild -b" Make "gnat link -P" invoke "gprbuild
364 -l" Fail if the invocation is "gnat find -P" or "gnat xref -P"
365 Remove anything related to project files
366 * g-mbdira.adb: minor whitespace cleanup
367 * g-spipat.adb: minor removal of extra spaces after closing paren
368
369 2016-04-19 Ed Schonberg <schonberg@adacore.com>
370
371 * exp_ch6.adb (Expand_Actuals): If post-statements are present
372 and the enclosing context is a function call or indexing, build
373 an Expression_With_Actions for the call.
374
375 2016-04-19 Hristian Kirtchev <kirtchev@adacore.com>
376
377 * lib-writ.adb (Write_With_Lines): Code cleanup. Do not generate
378 a with line for an ignored Ghost unit.
379 * sem_ch7.adb (Analyze_Package_Declaration): Add local constant
380 Par. A child package is Ghost when its parent is Ghost.
381 * sem_prag.adb (Analyze_Pragma): Pragma Ghost can now apply to
382 a subprogram declaration that acts as a compilation unit.
383
384 2016-04-18 Michael Matz <matz@suse.de>
385
386 * gcc-interface/decl.c (gnat_to_gnu_entity): Use SET_TYPE_ALIGN.
387 (gnat_to_gnu_field): Ditto.
388 (components_to_record): Ditto.
389 (create_variant_part_from): Ditto.
390 (copy_and_substitute_in_size): Ditto.
391 (substitute_in_type): Ditto.
392 * gcc-interface/utils.c (make_aligning_type): Use SET_TYPE_ALIGN.
393 (make_packable_type): Ditto.
394 (maybe_pad_type): Ditto.
395 (finish_fat_pointer_type): Ditto.
396 (finish_record_type): Ditto and use SET_DECL_ALIGN.
397 (rest_of_record_type_compilation): Use SET_TYPE_ALIGN.
398 (create_field_decl): Use SET_DECL_ALIGN.
399
400 2016-04-18 Arnaud Charlet <charlet@adacore.com>
401
402 * einfo.adb (Overridden_Operation): assert that
403 function is called for valid arguments.
404 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, sem_type.adb,
405 s-osinte-vxworks.ads, a-ngcefu.adb, sem_ch10.adb, einfo.ads,
406 sem_prag.adb, sem_ch12.adb, sem.adb, i-cobol.ads, freeze.adb,
407 sem_util.adb, a-chtgop.ads, s-rannum.adb, exp_ch6.adb, s-bignum.adb,
408 s-osinte-freebsd.ads, par-ch5.adb, a-chtgbo.ads, a-cofove.adb:
409 No space after closing parenthesis except where required for
410 layout.
411 * sem_res.adb: Minor reformatting.
412
413 2016-04-18 Arnaud Charlet <charlet@adacore.com>
414
415 * exp_ch4.adb (Expand_N_Case_Expression): Convert into a case
416 statement when relevant.
417
418 2016-04-18 Bob Duff <duff@adacore.com>
419
420 * a-cuprqu.adb (Enqueue): Properly handle the
421 case where the new element has a unique priority.
422
423 2016-04-18 Tristan Gingold <gingold@adacore.com>
424
425 * adaint.h: Define stat structures and functions for iOS
426 simulator.
427
428 2016-04-18 Arnaud Charlet <charlet@adacore.com>
429
430 * sem_res.adb (Resolve_Entry_Call): reset
431 Is_Overloaded flag after resolving calls to overloaded protected
432 operations.
433 * exp_spark.adb (Expand_SPARK): call
434 Qualify_Entity_Names for tasking nodes, i.e. protected types,
435 task types and entries.
436 * exp_ch4.adb (Expand_N_If_Expression): Refine previous change
437 in case of an unconstrained type.
438
439 2016-04-18 Yannick Moy <moy@adacore.com>
440
441 * sem_eval.adb, sem_eval.ads (Check_Non_Static_Context): Add
442 comment to document usage of subprogram in GNATprove.
443
444 2016-04-18 Ed Schonberg <schonberg@adacore.com>
445
446 * sem_prag.adb (Analyze_Pragma, case Test_Case): Improve error
447 message for wrong placement of aspect Test_Case.
448
449 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
450
451 * einfo.ads: Update the documentation of attribute Renamed_Object.
452 * exp_spark.adb (Expand_Potential_Renaming): Reimplemented.
453
454 2016-04-18 Gary Dismukes <dismukes@adacore.com>
455
456 * exp_ch4.adb (Optimize_Length_Comparison): Return immediately
457 in the case of AAMP (same as for use of the -gnatd.P switch) to
458 suppress this optimization, which avoids creating a dependence
459 on the 64-bit arithmetic package.
460
461 2016-04-18 Arnaud Charlet <charlet@adacore.com>
462
463 * exp_ch4.adb: Update comment.
464
465 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
466
467 * exp_ch6.adb (Expand_Call): Make sure instantiations are
468 registered only once as pending here.
469
470 2016-04-18 Arnaud Charlet <charlet@adacore.com>
471
472 * exp_ch4.adb, gnat1drv.adb, opt.ads, sem_res.adb
473 (Minimize_Expression_With_Actions): New flag.
474 (Adjust_Global_Switches): Set Minimize_Expression_With_Actions
475 when generating C.
476 (Resolve_Short_Circuit): Redo previous change
477 using Minimize_Expression_With_Actions.
478 (Expand_N_If_Expression,
479 Expand_Short_Circuit_Operator): Restore old code to avoid
480 Expression_With_Actions when Minimize_Expression_With_Actions
481 is set.
482
483 2016-04-18 Vincent Celier <celier@adacore.com>
484
485 * s-os_lib.adb (Non_Blocking_Spawn, version with Stdout_File and
486 Stderr_File): Close local file descriptors when no longer needed.
487
488 2016-04-18 Ed Schonberg <schonberg@adacore.com>
489
490 * sem_ch5.adb (Analyze_Iterator_Specification): Remove SPARK
491 mode check that the type of the cursor in an iteration over
492 a formal container is not volatile. The proper check on the
493 element type is done elsewhere.
494
495 2016-04-18 Ed Schonberg <schonberg@adacore.com>
496
497 * sem_ch6.adb (Process_Formals): Do not set a delay freeze on
498 a subprogram that returns a class-wide type, if the subprogram
499 is a compilation unit, because otherwise gigi will treat the
500 subprogram as external, leading to link errors.
501
502 2016-04-18 Arnaud Charlet <charlet@adacore.com>
503
504 * sem_res.adb (Resolve_Short_Circuit): Do not use
505 expression-with-actions when generating C.
506
507 2016-04-18 Yannick Moy <moy@adacore.com>
508
509 * sem_util.adb (Apply_Compile_Time_Constraint_Error): Do not generate
510 raise node in GNATprove mode.
511
512 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
513
514 * s-fileio.adb: Minor reformatting.
515 * sem_prag.adb (Analyze_Input_Item): Add local
516 variable Input_OK. Do not consider mappings of generic formal
517 parameters to actuals.
518
519 2016-04-18 Ed Schonberg <schonberg@adacore.com>
520
521 * sem_ch5.adb (Get_Cursor_Type): If iterator type is a derived
522 type, the cursor is declared in the scope of the parent type.
523 (Analyze_Parameter_Specification): A qualified expression with an
524 iterator type indicates an iteration over a container (explicit
525 or implicit).
526
527 2016-04-18 Arnaud Charlet <charlet@adacore.com>
528
529 * osint-c.ads, osint-c.adb (Delete_C_File, Delete_H_File): New.
530 * gnat1drv.adb (Gnat1drv): Delete old C files before regenerating them.
531 * debug.adb: Reserve -gnatd.4 to force generation of C files.
532
533 2016-04-18 Yannick Moy <moy@adacore.com>
534
535 * sem_eval.adb (Eval_Arithmetic_Op): Do not issue error on static
536 division by zero, instead possibly issue a warning.
537 * sem_res.adb (Resolve_Arithmetic_Op): Do not issue error on
538 static division by zero, instead add check flag on original
539 expression.
540 * sem_util.adb, sem_util.ads (Compile_Time_Constraint_Error):
541 Only issue error when both SPARK_Mode is On and Warn is False.
542
543 2016-04-18 Yannick Moy <moy@adacore.com>
544
545 * checks.adb (Apply_Scalar_Range_Check): Force
546 warning instead of error when SPARK_Mode is On, on index out of
547 bounds, and set check flag for GNATprove.
548
549 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
550
551 * sem_prag.adb (Check_In_Out_States.Check_Constituent_Usage):
552 Update the comment on usage. Reimplemented.
553 (Check_Input_States.Check_Constituent_Usage): Update the comment
554 on usage. A Proof_In constituent can now refine an Input state
555 as long as there is at least one Input constituent present.
556
557 2016-04-18 Ed Schonberg <schonberg@adacore.com>
558
559 * sem_ch6.adb (Check_Inline_Pragma): Use the Sloc of the
560 body id as the sloc of the entity in the generated subprogram
561 declaration, to avoid spurious conformance errors when style
562 checks are enabled.
563
564 2016-04-18 Ed Schonberg <schonberg@adacore.com>
565
566 * sem_ch4.adb (Analyze_Selected_Component, Has_Dereference):
567 Refine check on illegal calls to entities within a task body,
568 when the entity is declared in an object of the same type. In
569 a generic context there might be no explicit dereference but if
570 the prefix includes an access type the construct is legal.
571
572 2016-04-18 Arnaud Charlet <charlet@adacore.com>
573
574 * rtsfind.ads, rtsfind.adb (RE_Id, RE_Unit_Table): add
575 RE_Default_Priority.
576
577 2016-04-18 Bob Duff <duff@adacore.com>
578
579 * sem_prag.adb (Check_Arg_Is_Local_Name): Don't do the check
580 if the pragma came from an aspect specification.
581
582 2016-04-18 Gary Dismukes <dismukes@adacore.com>
583
584 * gnat1drv.adb, contracts.adb: Minor reformatting and wording fixes.
585
586 2016-04-18 Ed Schonberg <schonberg@adacore.com>
587
588 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): To suppress
589 superfluous conformance check on an inlined body with a previous
590 spec, use the fact that the generated declaration does not come
591 from source. We must treat the entity as coming from source to
592 enable some back-end inlining when pragma appears after the body.
593
594 2016-04-18 Gary Dismukes <dismukes@adacore.com>
595
596 * lib-xref-spark_specific.adb, par-ch2.adb, errout.ads,
597 exp_intr.adb: Minor reformatting and typo corrections.
598
599 2016-04-18 Ed Schonberg <schonberg@adacore.com>
600
601 * sem_ch6.adb: Code cleanup.
602
603 2016-04-18 Thomas Quinot <quinot@adacore.com>
604
605 * sem_ch13.adb: Minor reformatting and error message tweaking
606 (remove extraneous spaces).
607
608 2016-04-18 Johannes Kanig <kanig@adacore.com>
609
610 * gnat1drv.adb (Gnat1drv): Force loading of System unit for SPARK.
611
612 2016-04-18 Bob Duff <duff@adacore.com>
613
614 * s-fileio.adb (Fopen_Mode): If Mode = Out_File, and the file
615 exists, and it's a fifo, we use "w" as the open string instead of
616 "r+". This is necessary to make a write to the fifo block until
617 a reader is ready.
618
619 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
620
621 * sem_attr.adb (Denote_Same_Function): Account
622 for a special case where a primitive of a tagged type inherits
623 a class-wide postcondition from a parent type.
624
625 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
626
627 * par-ch2.adb (P_Expression_Or_Reserved_Word): New routine.
628 (P_Pragma): Signal Scan_Pragma_Argument_Association when the use
629 of reserved words is OK.
630 (Scan_Pragma_Argument_Association):
631 Add new formal Reserved_Words_OK and update the comment on
632 usage. Code cleanup. Parse an expression or a reserved word in
633 identifier form for pragmas Restriction_Warnings and Restrictions
634 No_Use_Of_Attribute.
635 * restrict.adb (Check_Restriction_No_Use_Of_Attribute):
636 Reimplemented. (Check_Restriction_No_Use_Of_Pragma): Code cleanup.
637 (Set_Restriction_No_Specification_Of_Aspect): Properly set the warning
638 flag for an aspect.
639 (Set_Restriction_No_Use_Of_Attribute): Properly set the warning
640 flag for an attribute. (Set_Restriction_No_Use_Of_Entity):
641 Update the parameter profile.
642 (Set_Restriction_No_Use_Of_Pragma): Properly set the warning flag for
643 a pragma.
644 * restrict.ads (Check_Restriction_No_Use_Of_Attribute): Update
645 the comment on usage.
646 (Set_Restriction_No_Use_Of_Entity): Update the parameter profile.
647 * sem_attr.adb (Analyze_Attribute): Check restriction
648 No_Use_Of_Attribute.
649 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Check
650 restriction No_Use_Of_Attribute before any rewritings have
651 taken place.
652 * sem_prag.adb (Analyze_Pragma): Check restriction
653 No_Use_Of_Pragma before any rewritings have taken place.
654
655 2016-04-18 Bob Duff <duff@adacore.com>
656
657 * sem_ch6.adb (Is_Inline_Pragma): The pragma
658 argument can be a selected component, which has no Chars field,
659 so we need to deal with that case (use the Selector_Name).
660 (Check_Inline_Pragma): We need to test Is_List_Member before
661 calling In_Same_List, because in case of a library unit, they're
662 not in lists, so In_Same_List fails an assertion.
663
664 2016-04-18 Bob Duff <duff@adacore.com>
665
666 * namet.ads, namet.adb: Add an Append that appends a
667 Bounded_String onto a Bounded_String. Probably a little more
668 efficient than "Append(X, +Y);". Also minor cleanup.
669 (Append_Decoded, Append_Decoded_With_Brackets, Append_Unqualified,
670 Append_Unqualified_Decoded): Make sure these work with non-empty
671 buffers.
672 * casing.ads, casing.adb (Set_Casing): Pass a Bounded_String
673 parameter, defaulting to Global_Name_Buffer.
674 * errout.ads, errout.adb (Adjust_Name_Case): Pass a
675 Bounded_String parameter, no default.
676 * exp_ch11.adb (Expand_N_Raise_Statement): Use local
677 Bounded_String instead of Global_Name_Buffer.
678 * exp_intr.ads, exp_intr.adb (Write_Entity_Name): Rename it
679 to Append_Entity_Name, and pass a Bounded_String parameter,
680 instead of using globals.
681 (Add_Source_Info): Pass a Bounded_String parameter, instead of
682 using globals.
683 (Expand_Source_Info): Use local instead of globals.
684 * stringt.ads, stringt.adb (Append): Add an Append procedure
685 for appending a String_Id onto a Bounded_String.
686 (String_To_Name_Buffer, Add_String_To_Name_Buffer): Rewrite in
687 terms of Append.
688 * sem_prag.adb (Set_Error_Msg_To_Profile_Name): Adjust for new
689 Adjust_Name_Case parameter.
690 * erroutc.adb, uname.adb: Don't pass D => Mixed_Case to
691 Set_Casing; that's the default.
692 * lib-xref-spark_specific.adb (Add_SPARK_Scope): Pretend that calls to
693 protected subprograms are entry calls; otherwise it is not possible to
694 distinguish them from regular subprogram calls.
695
696 2016-04-18 Gary Dismukes <dismukes@adacore.com>
697
698 * sem_ch13.adb (Has_Good_Profile): Improvement
699 of error message. Now indicates subtype_mark of formal parameter
700 rather than the formal's name, plus minor rewording.
701
702 2016-04-18 Pascal Obry <obry@adacore.com>
703
704 * adaint.c, adaint.h, s-os_lib.ads: Add new routine Current_Process_Id.
705
706 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
707
708 * stringt.adb, exp_ch6.adb, sem_ch13.adb: Minor reformatting.
709
710 2016-04-18 Gary Dismukes <dismukes@adacore.com>
711
712 * par-ch4.adb, sem_prag.adb: Minor reformatting.
713
714 2016-04-18 Bob Duff <duff@adacore.com>
715
716 * sinput.ads, sinput.adb (Build_Location_String): Take a
717 parameter instead of using a global variable. The function
718 version no longer destroys the Name_Buffer.
719 * stringt.ads, stringt.adb (String_From_Name_Buffer): Take a
720 parameter, which defaults to the Global_Name_Buffer, so some
721 calls can avoid the global.
722 * exp_ch11.adb, exp_intr.adb: Use new interfaces above
723 to avoid using globals. All but one call to Build_Location_String
724 avoids the global. Only one call to String_From_Name_Buffer
725 avoids it.
726
727 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
728
729 * namet.adb, namet.ads, exp_unst.adb: Minor reformatting.
730
731 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
732
733 * sem_eval.adb (Choice_Matches): Check the expression
734 against the predicate values when the choice denotes a
735 subtype with a static predicate.
736 (Eval_Membership_Op): Code cleanup. Remove the suspicious guard which
737 tests for predicates.
738 (Is_OK_Static_Subtype): A subtype with a dynamic predicate
739 is not static. (Is_Static_Subtype): A subtype with a dynamic
740 predicate is not static.
741 * sem_eval.ads (Is_OK_Static_Subtype): Update the comment on usage.
742 (Is_Static_Subtype): Update the comment on usage.
743
744 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
745
746 * sem_prag.adb (Analyze_Input_Item): Allow
747 generic formals to appear as initialization items.
748
749 2016-04-18 Ed Schonberg <schonberg@adacore.com>
750
751 * sem_ch13.adb (Analyze_Stream_TSS_Definition,
752 Has_Good_Profile): Additional error message to indicate that
753 the second parameter of the subprogram must be a first subtype.
754
755 2016-04-18 Ed Schonberg <schonberg@adacore.com>
756
757 * sem_ch6.adb (Analyze_Subprogram_Body_Helper, Is_Inline_Pragma):
758 Use the pragma lookahead that determines whether a subprogram
759 is to be inlined, when some level of backend optimization is
760 required.
761 * sem_ch12.ads, sem_ch12.adb (Add_Pending_Instantiation): Factorize
762 code used to create an instance body when needed for inlining.
763 * exp_ch6.adb (Expand_Call): When a call is to be inlined, and the
764 call appears within an instantiation that is not a compilation
765 unit, add a pending instantiation for the enclosing instance,
766 so the backend can inline in turn the calls contained in the
767 inlined body.
768
769 2016-04-18 Ed Schonberg <schonberg@adacore.com>
770
771 * sem_prag.adb (Build_Pragma_Check_Equivalent): The mapping
772 that relates operations of the parent type to the operations of
773 the derived type has three distinct sources:
774 a) explicit operations of the derived type carry an
775 Overridden_Operation that designates the operation in the
776 ancestor.
777 b) Implicit operations that are inherited by the derived type
778 carry an alias that may be an explicit subprogram (in which case
779 it may have an Overridden_ Operation indicator) or may also be
780 inherited and carry its own alias.
781 c) If the parent type is an interface, the operation of the
782 derived type does not override, but the interface operation
783 indicates the operation that implements it.
784 * sem_prag.adb: Minor reformatting.
785 * sem_prag.adb (Check_External_Property): Update
786 the comment on usage. Reimplement.
787
788 2016-04-18 Ed Schonberg <schonberg@adacore.com>
789
790 * exp_ch5.adb (Expand_Assignment_Statement): In restricted
791 profiles such as ZFP, ceiling priority is not available.
792
793 2016-04-18 Bob Duff <duff@adacore.com>
794
795 * namet-sp.ads: Minor typo fix, ironically in 'Spelling_Checker'.
796
797 2016-04-18 Bob Duff <duff@adacore.com>
798
799 * sem_elab.adb (Output_Calls): Use
800 Get_Name_String, to clearly indicate that the global Name_Buffer
801 is being used. The previous code used Is_Internal_Name, which
802 returns a Boolean, but also has a side effect of setting the
803 Name_Buffer. Then it called the other Is_Internal_Name, which uses
804 the Name_Buffer for its input. And then it called Error_Msg_N,
805 again using the Name_Buffer. We haven't eliminated the global
806 usage here, but we've made it a bit clearer.
807 This also allows us to have a side-effect-free version of
808 Is_Internal_Name.
809 * namet.ads, namet.adb: Provide a type Bounded_String, along with
810 routines that can be used without using global variables. Provide
811 Global_Name_Buffer so existing code can continue to use the
812 global. Mark the routines that use globals as obsolete. New code
813 shouldn't call the obsolete ones, and we should clean up existing
814 code from time to time.
815 Name_Find_Str is renamed as Name_Find.
816 * namet.h: Changed as necessary to interface to the new version
817 of Namet.
818 * bindgen.adb, exp_unst.adb: Name_Find_Str is renamed as
819 Name_Find.
820
821 2016-04-18 Yannick Moy <moy@adacore.com>
822
823 * sem_util.adb, sem_util.ads (Has_Full_Default_Initialization): used
824 outside of GNATprove, hence it should not be removed.
825
826 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
827
828 * sem_prag.adb (Analyze_Refinement_Clause):
829 The refinement of an external abstract state can now mention
830 non-external constituents.
831 (Check_External_Property): Update all SPARK RM references.
832
833 2016-04-18 Bob Duff <duff@adacore.com>
834
835 * exp_intr.adb: Remove some duplicated code.
836
837 2016-04-18 Yannick Moy <moy@adacore.com>
838
839 * a-nudira.adb, a-nudira.ads, a-nuflra.adb, a-nuflra.ads: Mark
840 package spec and body out of SPARK.
841
842 2016-04-18 Johannes Kanig <kanig@adacore.com>
843
844 * spark_xrefs.ads: Minor comment update.
845
846 2016-04-18 Johannes Kanig <kanig@adacore.com>
847
848 * gnat1drv.adb (Gnat1drv): Force loading of System
849 unit for SPARK.
850
851 2016-04-18 Bob Duff <duff@adacore.com>
852
853 * a-cuprqu.adb: Correction to previous change. If a new node
854 is inserted at the front of the queue (because it is higher
855 priority than the previous front node), we need to update
856 Header.Next_Unequal -- not just in the case where the queue was
857 previously empty.
858
859 2016-04-18 Bob Duff <duff@adacore.com>
860
861 * a-cuprqu.ads: Change the representation of List_Type from a
862 singly-linked list to a doubly-linked list. In addition, add a
863 pointer Next_Unequal, which points past a possibly-long chain
864 of equal-priority items. This increases efficiency, especially
865 in the case of many equal-priority items.
866 * a-cuprqu.adb (Dequeue, Enqueue): Rewrite algorithms to take
867 advantage of new data structure.
868 (Finalize): Rewrite in terms of Dequeue, for simplicity.
869
870 2016-04-18 Yannick Moy <moy@adacore.com>
871
872 * contracts.adb (Analyze_Object_Contract,
873 Analyze_Protected_Contract): Remove tests performed in GNATprove.
874 * sem_util.adb, sem_util.ads (Has_Full_Default_Initialization):
875 Remove query for tests performed in GNATprove.
876
877 2016-04-18 Ed Schonberg <schonberg@adacore.com>
878
879 * sem_aggr.adb (Resolve_Record_Aggregate): If
880 Warn_On_Redundant_Constructs is enabled, report a redundant box
881 association that does not cover any components, as it done for
882 redundant others associations in case statements.
883
884 2016-04-18 Ed Schonberg <schonberg@adacore.com>
885
886 * sem_prag.adb (Collect_Inherited_Class_Wide_Conditions):
887 Analyze the generated Check pragma for an inherited condition so
888 that it does not freeze the dispatching type of the primitive
889 operation, because it is pre-analyzed at the point of the
890 subprogram declaration (and not in the subprogram body, as is
891 done during regular expansion).
892
893 2016-04-18 Vincent Celier <celier@adacore.com>
894
895 * ali.ads: Increase the range of all _Id types to 100 millions.
896
897 2016-04-18 Gary Dismukes <dismukes@adacore.com>
898
899 * sem_warn.adb (Check_References): Change warning to suggest
900 using pragma Export rather than saying "volatile has no effect".
901
902 2016-04-18 Bob Duff <duff@adacore.com>
903
904 * g-souinf.ads (Compilation_ISO_Date): New function to return
905 the current date in ISO form.
906 * exp_intr.adb (Expand_Source_Info, Add_Source_Info): Expand
907 a call to Compilation_ISO_Date into a string literal containing
908 the current date in ISO form.
909 * exp_intr.ads (Add_Source_Info): Improve documentation.
910 * sem_intr.adb (Check_Intrinsic_Subprogram): Recognize
911 Compilation_ISO_Date.
912 * snames.ads-tmpl (Name_Compilation_ISO_Date): New Name_Id.
913
914 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
915
916 * layout.adb (Set_Elem_Alignment): Extend setting of alignment
917 to subtypes that are not first subtypes.
918
919 2016-04-18 Ed Schonberg <schonberg@adacore.com>
920
921 * sem_prag.ads (Collect_Inherited_Class_Wide_Conditions):
922 Simplify interface.
923 * sem_prag.adb (Collect_Inherited_Class_Wide_Conditions): Insert
924 generated pragmas after subprogram declaration, rather than in
925 the corresponding subprogram body.
926 * sem_ch6.adb (New_Overloaded_Entity): In GNATProve
927 mode, if the operation is overridding, call
928 Collect_Inherited_Class_Wide_Conditions to generate the
929 corresponding pragmas immediately after the corresponding
930 subprogram declaration.
931
932 2016-04-18 Arnaud Charlet <charlet@adacore.com>
933
934 * spark_xrefs.ads (Xref_Index, Scope_Index, File_Index): restrict
935 type to natural numbers.
936 (Stype): document code characters for concurrent entities.
937
938 2016-04-18 Olivier Hainque <hainque@adacore.com>
939
940 * targparm.ads: Update the Frontend_Exceptions default internal
941 value.
942 (Frontend_Exceptions_On_Target): Change default value to True.
943
944 2016-04-18 Ed Schonberg <schonberg@adacore.com>
945
946 * sem_ch4.adb (Analyze_Selected_Component): Refine error
947 detection when a selected component in the body of a synchronized
948 type is a reference to an object of the same type declared
949 elsewhere. The construct is legal if the prefix of the selected
950 component includes an explicit dereference at any point.
951
952 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
953
954 * sem_ch3.adb (Analyze_Object_Declaration): Do not consider
955 internally generated expressions when trying to determine whether
956 a formal parameter of a tagged type subject to Extensions_Visible
957 False is used to initialize an object.
958 * sem_ch4.adb (Analyze_Type_Conversion): Do not consider
959 internally generated expressions when trying to determine whether
960 a formal parameter of a tagged type subject to Extensions_Visible
961 False is used in a type conversion.
962
963 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
964
965 * sem_res.adb (Is_Protected_Operation_Call):
966 Add guards to account for a non-decorated selected component.
967
968 2016-04-18 Yannick Moy <moy@adacore.com>
969
970 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Improve
971 implementation of Body_Has_SPARK_Mode_On.
972 * sem_prag.adb, sem_prag.ads (Get_SPARK_Mode_From_Annotation):
973 New function replacing previous Get_SPARK_Mode_From_Pragma, that
974 deals also with aspects.
975 (Get_SPARK_Mode_Type): Make function internal again.
976 * inline.adb, sem_ch7.adb, sem_util.adb: Use new
977 Get_SPARK_Mode_From_Annotation.
978
979 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
980
981 * contracts.adb (Analyze_Object_Contract): Update references to
982 SPARK RM.
983 * freeze.adb (Freeze_Entity): Update references to SPARK RM.
984 * ghost.adb Add with and use clauses for Sem_Disp.
985 (Check_Ghost_Derivation): Removed.
986 (Check_Ghost_Overriding):
987 Reimplemented. (Check_Ghost_Policy): Update references to SPARK RM.
988 (Check_Ghost_Primitive): New routine.
989 (Check_Ghost_Refinement): New routine. (Is_OK_Ghost_Context):
990 Update references to SPARK RM. (Is_OK_Pragma): Update references
991 to SPARK RM. Predicates are now a valid context for references
992 to Ghost entities.
993 * ghost.ads (Check_Ghost_Derivation): Removed.
994 (Check_Ghost_Overriding): Update the comment on usage.
995 (Check_Ghost_Primitive): New routine.
996 (Check_Ghost_Refinement): New routine.
997 (Remove_Ignored_Ghost_Code): Update references to SPARK RM.
998 * sem_ch3.adb (Process_Full_View): Remove the now obsolete check
999 related to Ghost derivations
1000 * sem_ch6.adb (Check_Conformance): Remove now obsolete check
1001 related to the convention-like behavior of pragma Ghost.
1002 (Check_For_Primitive_Subprogram): Verify that the Ghost policy
1003 of a tagged type and its primitive agree.
1004 * sem_prag.adb (Analyze_Pragma): Update references to SPARK
1005 RM. Move the verification of pragma Assertion_Policy Ghost
1006 to the proper place. Remove the now obsolete check related
1007 to Ghost derivations.
1008 (Collect_Constituent): Add a call to Check_Ghost_Refinement.
1009 * sem_res.adb (Resolve_Actuals): Update references to SPARK RM.
1010
1011 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
1012
1013 * layout.adb: Fix more minor typos in comments.
1014
1015 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
1016
1017 * a-calend.ads, sem_prag.adb, sem_ch6.adb: Minor reformatting.
1018
1019 2016-04-18 Ed Schonberg <schonberg@adacore.com>
1020
1021 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): In GNATprove
1022 mode, collect inherited class-wide conditions to generate the
1023 corresponding pragmas.
1024 * sem_prag.ads (Build_Pragma_Check_Equivalent): Moved from contracts
1025 * contracts.adb (Collect_Inherited_Class_Wide_Conditions): New
1026 procedure for overriding subprograms, used to generate the pragmas
1027 corresponding to an inherited class- wide pre- or postcondition.
1028 * sem_prag.adb (Build_Pragma_Check_Equivalent): moved here
1029 from contracts.adb (Replace_Condition_Entities): Subsidiary
1030 Build_Pragma_Check_Equivalent, to implement the proper semantics
1031 of inherited class-wide conditions, as given in AI12-0113.
1032 (Process_Class_Wide_Condition): Removed.
1033 (Collect_Inherited_Class_Wide_Conditions): Iterate over pragmas
1034 in contract of subprogram, to collect inherited class-wide
1035 conditions.
1036 (Build_Pragma_Check_Equivalent): Moved to sem_prag.adb
1037
1038 2016-04-18 Yannick Moy <moy@adacore.com>
1039
1040 * a-calend.adb (Ada.Calendar): Mark package body as SPARK_Mode Off.
1041 * a-calend.ads (Ada.Calendar): Mark package spec as
1042 SPARK_Mode and add synchronous external abstract state Clock_Time.
1043
1044 2016-04-18 Yannick Moy <moy@adacore.com>
1045
1046 * sem_res.adb (Resolve_Call): Prevent inlining of
1047 calls inside expression functions. Factor previous code issuing
1048 errors to call Cannot_Inline instead, which does appropriate
1049 processing of message for GNATprove.
1050
1051 2016-04-18 Arnaud Charlet <charlet@adacore.com>
1052
1053 * einfo.ads, sem_ch3.adb, sem_ch8.adb, osint-l.adb, rtsfind.adb,
1054 osint-b.adb: Cleanups.
1055
1056 2016-04-18 Yannick Moy <moy@adacore.com>
1057
1058 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Only create
1059 body to inline in GNATprove mode when SPARK_Mode On applies to
1060 subprogram body.
1061 * sem_prag.adb, sem_prag.ads (Get_SPARK_Mode_Type): Make function
1062 public.
1063
1064 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
1065
1066 * layout.adb: Fix minor typo in comment.
1067 * inline.adb: Fix minor pasto.
1068 * sem_ch12.ads: Fix minor typos in comments.
1069
1070 2016-04-18 Ed Schonberg <schonberg@adacore.com>
1071
1072 * sem_disp.adb (Check_Dispatching_Call): Major rewriting to
1073 handle some complex cases of tag indeterminate calls that are
1074 actuals in other dispatching calls that are themselves tag
1075 indeterminate.
1076 (Check_Dispatching_Context): Add parameter to support recursive
1077 check for an enclosing construct that may provide a tag for a
1078 tag-indeterminate call.
1079
1080 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
1081
1082 * sem_prag.adb (Analyze_Depends_In_Decl_Part):
1083 Add global variables Task_Input_Seen and Task_Output_Seen.
1084 (Analyze_Global_Item): Detect an illegal use of the current
1085 instance of a single protected/task type in a global annotation.
1086 (Analyze_Input_Output): Inputs and output related to the current
1087 instance of a task unit are now tracked.
1088 (Check_Usage): Require
1089 the presence of the current instance of a task unit only when
1090 one input/output is available. (Current_Task_Instance_Seen):
1091 New routine.
1092 (Is_CCT_Instance): New parameter profile. Update
1093 the comment on usage. The routine now properly recognizes several
1094 cases related to single protected/task types.
1095
1096 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
1097
1098 * freeze.adb (Freeze_Entity): Use New_Freeze_Node
1099 to create a brand new freeze node. This handles a case where an
1100 ignored Ghost context is freezing something which is not ignored
1101 Ghost and whose freeze node should not be removed from the tree.
1102 (New_Freeze_Node): New routine.
1103
1104 2016-04-18 Jerome Lambourg <lambourg@adacore.com>
1105
1106 * sigtramp.h (__gnat_set_is_vxsim) New function to
1107 tell sigtramp-vxworks to handle vxsim signal contexts. *
1108 sigtramp-vxworks.c (__gnat_sigtramp) Take into account the
1109 differences in the sigcontext structure between the expected
1110 regular x86 or x86_64 ones and the ones received in case of
1111 exexution on the vxworks simulator.
1112 * init.c: also compute is_vxsim in case of x86_64-vx7 target. Provide
1113 this information to sigtramp-vxworks.c. Remove the old mechanism for
1114 vxsim.
1115 * init-vxsim.c, sigtramp-vxworks-vxsim.c: remove, now obsolete.
1116
1117 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
1118
1119 * exp_ch3.adb (Inline_Init_Proc): New function returning
1120 whether the initialization procedure of a type should be
1121 inlined. Return again True for controlled type themselves.
1122 (Build_Array_Init_Proc): Call it to set Set_Is_Inlined on Init_Proc.
1123 (Build_Record_Init_Proc): Likewise.
1124
1125 2016-04-18 Arnaud Charlet <charlet@adacore.com>
1126
1127 * gnatvsn.ads (Library_Version): Bump to 7.
1128
1129 2016-04-18 Ed Schonberg <schonberg@adacore.com>
1130
1131 * sem_ch6.adb (Analyze_Expression_Function): Set Inlined flag
1132 on the entity of a subprogram declaration that is completed by
1133 an expression function.
1134
1135 2016-04-18 Ed Schonberg <schonberg@adacore.com>
1136
1137 * sem_util.adb (Is_Current_Instance): A entity given by a subtype
1138 declaration can appear in an aspect specification for a dynamic
1139 predicate, and a pragma for aspect Predicate_Failure.
1140 * exp_util.adb (Replace_Subtype_References): Replace current
1141 occurrences of the subtype to which a dynamic predicate applies,
1142 byt the expression that triggers a predicate check. Needed to
1143 implement new aspect Predicate_Failure.
1144
1145 2016-04-18 Arnaud Charlet <charlet@adacore.com>
1146
1147 * a-intsig.ads, a-intsig.adb: Removed, no longer used.
1148 * Makefile.rtl: update accordingly.
1149
1150 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
1151
1152 * sem_type.adb (Disambiguate): Call Covers only when necessary
1153 for standard operators.
1154
1155 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
1156
1157 * atree.ads (Num_Extension_Nodes): Add couple of figures
1158 to comment.
1159 * atree.adb: Add GNAT.Heap_Sort_G dependency.
1160 (Print_Statistics): New exported procedure to print statistics.
1161
1162 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
1163
1164 * exp_ch3.adb (Build_Record_Init_Proc): Do not mark the procedure
1165 as to be inlined if the type needs finalization.
1166
1167 2016-04-18 Jerome Lambourg <lambourg@adacore.com>
1168
1169 * sigtramp-vxworks-target.inc: sigtramp-vxworks: force the stack
1170 alignment for x86_64.
1171 * init.c: Better fix for guard page reset on x86_64-vx7.
1172 Do not try to retrieve the page that actually raised
1173 the signal as the probing mechanism used on x86_64 do not allow
1174 such retrieval. We thus just test if the guard page is active,
1175 and re-activate it if not.
1176
1177 2016-04-18 Arnaud Charlet <charlet@adacore.com>
1178
1179 * a-sytaco.adb (Suspension_Object): Aspect Default_Initial_Condition
1180 added.
1181
1182 2016-04-18 Jerome Lambourg <lambourg@adacore.com>
1183
1184 * affinity.c: Use the proper type for task id.
1185 * init.c (__gnat_inum_to_ivec): ivec is a pointer.
1186
1187 2016-04-18 Arnaud Charlet <charlet@adacore.com>
1188
1189 * sem_prag.adb (Process_Convention): Relax rule on exporting
1190 Intrinsic types if Relaxed_RM_Semantics is True.
1191
1192 2016-04-18 Vincent Celier <celier@adacore.com>
1193
1194 * sem_ch3.adb, lib.ads, sinfo.ads, sem_ch10.adb, einfo.adb, einfo.ads,
1195 checks.ads, sem_ch12.adb, sem.adb, sem_util.adb, sem_util.ads,
1196 sem_res.adb, sem_attr.adb, par.adb, exp_ch4.adb, errout.ads,
1197 sem_ch4.adb, atree.adb, atree.ads, sem_warn.adb, treepr.adb,
1198 exp_ch3.ads, exp_unst.adb: Change "descendent" to
1199 "descendant" in comments, error messages and identifiers.
1200 * gcc-interface/decl.c: Ditto.
1201
1202 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
1203
1204 * sem_type.adb (Operator_Matches_Spec): Call First_Formal on
1205 New_S only once at the beginning of the function.
1206
1207 2016-04-02 Eric Botcazou <ebotcazou@adacore.com>
1208
1209 * gcc-interface/decl.c (components_to_record): Restrict the previous
1210 change to fields with variable size.
1211
1212 2016-03-27 Eric Botcazou <ebotcazou@adacore.com>
1213
1214 * gcc-interface/decl.c (components_to_record): Add special case for
1215 single field with representation clause at offset 0.
1216
1217 2016-03-16 Svante Signell <svante.signell@gmail.com>
1218
1219 * gcc-interface/Makefile.in: Add support for x86 GNU/Hurd.
1220 * s-osinte-gnu.ads: New file.
1221
1222 2016-03-13 Eric Botcazou <ebotcazou@adacore.com>
1223
1224 * system-vxworks-m68k.ads (Stack_Check_Probes): Set to True.
1225 (Stack_Check_Limits): Set to False.
1226 * system-vxworks-mips.ads (Stack_Check_Probes): Set to True.
1227 (Stack_Check_Limits): Set to False.
1228 * system-vxworks-ppc.ads (Stack_Check_Probes): Set to True.
1229 (Stack_Check_Limits): Set to False.
1230 * system-vxworks-sparcv9.ads (Stack_Check_Probes): Set to True.
1231 (Stack_Check_Limits): Set to False.
1232 * system-vxworks-x86.ads (Stack_Check_Probes): Set to True.
1233 (Stack_Check_Limits): Set to False.
1234
1235 2016-03-07 Eric Botcazou <ebotcazou@adacore.com>
1236
1237 * gcc-interface/trans.c (statement_node_p): New predicate.
1238 (gnat_to_gnu): Invoke it to detect statement nodes. In ASIS mode, do
1239 not return dummy results for expressions attached to packed array
1240 implementation types.
1241
1242 2016-03-07 Eric Botcazou <ebotcazou@adacore.com>
1243
1244 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Always mark
1245 the expression of a renaming manually in case #3.
1246
1247 2016-03-02 Dominik Vogt <vogt@linux.vnet.ibm.com>
1248
1249 * system-linux-s390.ads: Enable Stack_Check_Probes.
1250 * system-linux-s390.ads: Likewise.
1251
1252 2016-02-29 Martin Liska <mliska@suse.cz>
1253
1254 * gcc-interface/utils.c (set_reverse_storage_order_on_pad_type):
1255 Replace ENABLE_CHECKING macro with flag_checking.
1256
1257 2016-02-29 Eric Botcazou <ebotcazou@adacore.com>
1258
1259 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Retrofit
1260 handling of unconstrained array types as designated types into common
1261 processing. Also handle array types as incomplete designated types.
1262
1263 2016-02-29 Eric Botcazou <ebotcazou@adacore.com>
1264
1265 * gcc-interface/decl.c (gnat_to_gnu_entity) <Concurrent types>: In
1266 ASIS mode, fully lay out the minimal record type.
1267
1268 2016-02-29 Eric Botcazou <ebotcazou@adacore.com>
1269
1270 * gcc-interface/trans.c (finalize_nrv_r): Remove obsolete code.
1271 (build_return_expr): Likewise.
1272 (Call_to_gnu): If this is a function call and there is no target,
1273 create a temporary for the return value for all aggregate types,
1274 but never create it for a return statement. Push a binding level
1275 around the call in more cases. Remove obsolete code.
1276
1277 2016-02-29 Eric Botcazou <ebotcazou@adacore.com>
1278
1279 * gcc-interface/ada-tree.h (DECL_RETURN_VALUE_P): New macro.
1280 * gcc-interface/gigi.h (gigi): Remove useless attribute.
1281 (gnat_gimplify_expr): Likewise.
1282 (gnat_to_gnu_external): Declare.
1283 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: Factor out
1284 code dealing with the expression of external constants into...
1285 Invoke gnat_to_gnu_external instead.
1286 <E_Variable>: Invoke gnat_to_gnu_external to translate renamed objects
1287 when not for a definition. Deal with COMPOUND_EXPR and variables with
1288 DECL_RETURN_VALUE_P set for renamings and with the case of a dangling
1289 'reference to a function call in a renaming. Remove obsolete test and
1290 adjust associated comment.
1291 * gcc-interface/trans.c (Call_to_gnu): Set DECL_RETURN_VALUE_P on the
1292 temporaries created to hold the return value, if any.
1293 (gnat_to_gnu_external): ...this. New function.
1294 * gcc-interface/utils.c (create_var_decl): Detect a constant created
1295 to hold 'reference to function call.
1296 * gcc-interface/utils2.c (build_unary_op) <ADDR_EXPR>: Add folding
1297 for COMPOUND_EXPR in the DECL_RETURN_VALUE_P case.
1298
1299 2016-02-17 Eric Botcazou <ebotcazou@adacore.com>
1300
1301 * exp_ch4.adb (Expand_N_Indexed_Component): Activate synchronization if
1302 the prefix denotes an entity which Has_Atomic_Components.
1303 * gcc-interface/trans.c (node_is_atomic): Return true if the prefix
1304 denotes an entity which Has_Atomic_Components.
1305
1306 2016-02-17 Eric Botcazou <ebotcazou@adacore.com>
1307
1308 * gcc-interface/utils2.c (gnat_protect_expr): Make a SAVE_EXPR only
1309 for fat pointer or scalar types.
1310
1311 2016-02-16 Eric Botcazou <ebotcazou@adacore.com>
1312
1313 * gcc-interface/gigi.h (maybe_debug_type): New inline function.
1314 * gcc-interface/misc.c (gnat_get_array_descr_info): Use it.
1315 Call maybe_character_value on the array bounds. Get to the base type
1316 of the index type and call maybe_debug_type on it.
1317 * gcc-interface/utils.c (finish_character_type): Add special treatment
1318 for char_type_node.
1319
1320 2016-02-16 Eric Botcazou <ebotcazou@adacore.com>
1321
1322 * gcc-interface/misc.c (gnat_enum_underlying_base_type): New function.
1323 (LANG_HOOKS_ENUM_UNDERLYING_BASE_TYPE): Define to above.
1324
1325 2016-02-12 Jakub Jelinek <jakub@redhat.com>
1326
1327 * prj-tree.ads: Spelling fixes - behaviour -> behavior and
1328 neighbour -> neighbor.
1329 * prep.adb: Likewise.
1330 * prj.ads: Likewise.
1331 * prepcomp.adb: Likewise.
1332 * g-socket.ads: Likewise.
1333 * s-imgrea.adb: Likewise.
1334 * a-calend.adb: Likewise.
1335 * exp_disp.adb: Likewise.
1336 * doc/gnat_ugn/gnat_utility_programs.rst: Likewise.
1337 * g-socket.adb: Likewise.
1338 * sem_ch12.adb: Likewise.
1339 * terminals.c: Likewise.
1340
1341 2016-02-08 Bernd Schmidt <bschmidt@redhat.com>
1342
1343 * gcc-interface/misc.c (gnat_init): Remove second argument in call to
1344 build_common_tree_nodes.
1345
1346 2016-02-08 Eric Botcazou <ebotcazou@adacore.com>
1347
1348 * gcc-interface/utils.c (create_var_decl): Set again DECL_COMMON and
1349 DECL_IGNORED_P last.
1350
1351 2016-01-28 Eric Botcazou <ebotcazou@adacore.com>
1352
1353 * gcc-interface/gigi.h (enum attr_type): Rename into...
1354 (enum attrib_type): ...this.
1355 (struct attrib): Adjust.
1356 * gcc-interface/decl.c (prepend_one_attribute): Likewise.
1357
1358 2016-01-20 Eric Botcazou <ebotcazou@adacore.com>
1359
1360 * exp_ch2.adb (Expand_Current_Value): Make an appropriate character
1361 literal if the entity is of a character type.
1362 * gcc-interface/lang.opt (fsigned-char): New option.
1363 * gcc-interface/misc.c (gnat_handle_option): Accept it.
1364 (gnat_init): Adjust comment.
1365 * gcc-interface/gigi.h (finish_character_type): New prototype.
1366 (maybe_character_type): New inline function.
1367 (maybe_character_value): Likewise.
1368 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Enumeration_Type>: For
1369 a character of CHAR_TYPE_SIZE, make a signed type if flag_signed_char.
1370 Set TYPE_ARTIFICIAL early and call finish_character_type on the type.
1371 <E_Enumeration_Subtype>: For a subtype of character with RM_Size and
1372 Esize equal to CHAR_TYPE_SIZE, make a signed type if flag_signed_char.
1373 Copy TYPE_STRING_FLAG from type to subtype.
1374 <E_Array_Type>: Deal with character index types.
1375 <E_Array_Subtype>: Likewise.
1376 * gcc-interface/trans.c (gigi): Replace unsigned_char_type_node with
1377 char_type_node throughout.
1378 (build_raise_check): Likewise.
1379 (get_type_length): Deal with character types.
1380 (Attribute_to_gnu) <Attr_Pos>: Likewise. Remove obsolete range check
1381 code. Minor tweak.
1382 <Attr_Pred>: Likewise.
1383 (Loop_Statement_to_gnu): Likewise.
1384 (Raise_Error_to_gnu): Likewise.
1385 <N_Indexed_Component>: Deal with character index types. Remove
1386 obsolete code.
1387 <N_Slice>: Likewise.
1388 <N_Type_Conversion>: Deal with character types. Minor tweak.
1389 <N_Unchecked_Type_Conversion>: Likewise.
1390 <N_In>: Likewise.
1391 <N_Op_Eq>: Likewise.
1392 (emit_index_check): Delete.
1393 * gcc-interface/utils.c (finish_character_type): New function.
1394 (gnat_signed_or_unsigned_type_for): Deal with built-in character types.
1395 * gcc-interface/utils2.c (expand_sloc): Replace unsigned_char_type_node
1396 with char_type_node.
1397 (build_call_raise): Likewise.
1398 (build_call_raise_column): Likewise.
1399 (build_call_raise_range): Likewise.
1400
1401 2016-01-18 Eric Botcazou <ebotcazou@adacore.com>
1402
1403 * gcc-interface/gigi.h (build_call_raise_column): Adjust prototype.
1404 (build_call_raise_range): Likewise.
1405 (gnat_unsigned_type): Delete.
1406 (gnat_signed_type): Likewise.
1407 (gnat_signed_or_unsigned_type_for): New prototype.
1408 (gnat_unsigned_type_for): New inline function.
1409 (gnat_signed_type_for): Likewise.
1410 * gcc-interface/cuintp.c (build_cst_from_int): Call build_int_cst.
1411 * gcc-interface/decl.c (gnat_to_gnu_entity): Likewise.
1412 (gnat_to_gnu_entity) <E_Array_Type>: Always translate the index types
1413 and compute their base type from that.
1414 <E_Array_Subtype>: Remove duplicate declaration.
1415 * gcc-interface/misc.c (get_array_bit_stride): Call build_int_cst.
1416 * gcc-interface/trans.c (get_type_length): Likewise.
1417 (Attribute_to_gnu): Likewise.
1418 (Loop_Statement_to_gnu): Likewise.
1419 (Call_to_gnu): Likewise.
1420 (gnat_to_gnu): Call build_real, build_int_cst, gnat_unsigned_type_for
1421 and gnat_signed_type_for. Minor tweaks.
1422 (build_binary_op_trapv): Likewise.
1423 (emit_check): Likewise.
1424 (convert_with_check): Likewise.
1425 (Raise_Error_to_gnu): Adjust calls to the build_call_raise family of
1426 functions. Minor tweaks.
1427 (Case_Statement_to_gnu): Remove dead code.
1428 (gnat_to_gnu): Call gnat_unsigned_type_for and gnat_signed_type_for.
1429 (init_code_table): Minor reordering.
1430 * gcc-interface/utils.c (gnat_unsigned_type): Delete.
1431 (gnat_signed_type): Likewise.
1432 (gnat_signed_or_unsigned_type_for): New function.
1433 (unchecked_convert): Use directly the size in the test for precision
1434 vs size adjustments.
1435 (install_builtin_elementary_types): Call gnat_signed_type_for.
1436 * gcc-interface/utils2.c (nonbinary_modular_operation): Call
1437 build_int_cst.
1438 (build_goto_raise): New function taken from...
1439 (build_call_raise): ...here. Call it.
1440 (build_call_raise_column): Add KIND parameter and call it.
1441 (build_call_raise_range): Likewise.
1442
1443 2016-01-18 Eric Botcazou <ebotcazou@adacore.com>
1444
1445 * gcc-interface/ada-tree.h (TYPE_IMPLEMENTS_PACKED_ARRAY_P): Rename to
1446 (TYPE_IMPL_PACKED_ARRAY_P): ...this.
1447 (TYPE_CAN_HAVE_DEBUG_TYPE_P): Do not test TYPE_DEBUG_TYPE.
1448 * gcc-interface/decl.c (gnat_to_gnu_entity): Simplify NULL_TREE tests
1449 and tweak gnat_encodings tests throughout.
1450 (initial_value_needs_conversion): Likewise.
1451 (intrin_arglists_compatible_p): Likewise.
1452 * gcc-interface/misc.c (gnat_print_type): Likewise.
1453 (gnat_get_debug_type): Likewise.
1454 (gnat_get_fixed_point_type_info): Likewise.
1455 (gnat_get_array_descr_info): Likewise.
1456 (get_array_bit_stride): Likewise.
1457 (gnat_get_type_bias): Fix formatting.
1458 (enumerate_modes): Likewise.
1459 * gcc-interface/trans.c (gnat_to_gnu): Likewise.
1460 (add_decl_expr): Simplify NULL_TREE test.
1461 (end_stmt_group): Likewise.
1462 (build_binary_op_trapv): Fix formatting.
1463 (get_exception_label): Use switch statement.
1464 (init_code_table): Move around.
1465 * gcc-interface/utils.c (global_bindings_p): Simplify NULL_TREE test.
1466 (gnat_poplevel): Likewise.
1467 (gnat_set_type_context): Likewise.
1468 (defer_or_set_type_context): Fix formatting.
1469 (gnat_pushdecl): Simplify NULL_TREE test.
1470 (maybe_pad_type): Likewise.
1471 (add_parallel_type): Likewise.
1472 (create_range_type): Likewise.
1473 (process_deferred_decl_context): Likewise.
1474 (convert): Likewise.
1475 (def_builtin_1): Likewise.
1476 * gcc-interface/utils2.c (find_common_type): Likewise.
1477 (build_binary_op): Likewise.
1478 (gnat_rewrite_reference): Likewise.
1479 (get_inner_constant_reference): Likewise.
1480
1481 2016-01-18 Eric Botcazou <ebotcazou@adacore.com>
1482
1483 PR ada/69219
1484 * gcc-interface/trans.c (check_inlining_for_nested_subprog): Consider
1485 the parent function instead of the current function in order to issue
1486 the warning or the error. Add guard for ignored functions.
1487
1488 2016-01-17 Jakub Jelinek <jakub@redhat.com>
1489
1490 * adaint.c (__gnat_killprocesstree): Avoid -Wparentheses warning.
1491
1492 2016-01-15 Jakub Jelinek <jakub@redhat.com>
1493
1494 * adaint.c (__gnat_locate_exec_on_path): Use const char * instead
1495 of char * for path_val to avoid warnings.
1496
1497 2016-01-06 Pierre-Marie de Rodat <derodat@adacore.com>
1498
1499 * gcc-interface/utils.c: Bump copyright year.
1500 (rest_of_record_type_compilation): Add XVE/XVU parallel types to
1501 the current lexical scope.
1502
1503 2016-01-04 Jakub Jelinek <jakub@redhat.com>
1504
1505 * gnat_ugn.texi: Bump @copying's copyright year.
1506 * gnat_rm.texi: Likewise.
1507
1508 2016-01-02 Eric Botcazou <ebotcazou@adacore.com>
1509
1510 * gnatvsn.ads: Bump copyright year.
1511
1512 \f
1513 Copyright (C) 2016 Free Software Foundation, Inc.
1514
1515 Copying and distribution of this file, with or without modification,
1516 are permitted in any medium without royalty provided the copyright
1517 notice and this notice are preserved.
This page took 0.105622 seconds and 6 git commands to generate.