[multiple changes]
[gcc.git] / gcc / ada / ChangeLog
1 2015-10-16 Gary Dismukes <dismukes@adacore.com>
2
3 * prj.adb, sem_util.adb, exp_ch6.adb: Minor reformatting.
4
5 2015-10-16 Ed Schonberg <schonberg@adacore.com>
6
7 * exp_ch5.adb (Expand_Formal_Container_Element_Loop): Modify
8 expansion to allow element iteration over formal containers
9 whose elements are indefinite types.
10
11 2015-10-16 Doug Rupp <rupp@adacore.com>
12
13 * s-taprop-linux.adb (Monotonic_Clock): Call clock_gettime
14 instead of gettimeofday.
15 * s-osinte-linux.ads (clock_gettime): New imported subprogram.
16
17 2015-10-16 Hristian Kirtchev <kirtchev@adacore.com>
18
19 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
20 Indefinite or limited library level objects are now returned on
21 the heap.
22 * exp_ch7.adb (Build_Finalization_Master): Add formal
23 parameter For_Lib_Level. Add context specific insertion for a
24 finalization master created for an access result type related
25 to a build-in-place function call used to initialize a library
26 level object.
27 * exp_ch7.ads (Build_Finalization_Master): Add formal parameter
28 For_Lib_Level. Update the comment on usage.
29 * sem_util.adb (Mark_Coextensions): Code cleanup.
30
31 2015-10-16 Emmanuel Briot <briot@adacore.com>
32
33 * prj.adb (For_Every_Project_Imported_Context): Fix handling
34 of aggregated projects with duplicate names.
35 * a-ngelfu.ads: Minor whitespace fix.
36
37 2015-10-16 Ed Schonberg <schonberg@adacore.com>
38
39 * sem_ch13.adb (Build_Predicate_Functions): The expression for
40 the predicate is side-effect free if it does not contain any
41 variable references.
42
43 2015-10-16 Bob Duff <duff@adacore.com>
44
45 * a-convec.adb ("="): Previous version depended
46 on "=" composing, but that doesn't quite work -- we want the "="
47 operator passed in to the generic. So we need a loop after all.
48
49 2015-10-16 Yannick Moy <moy@adacore.com>
50
51 * sem_util.adb (Is_Object_Reference): Attribute 'Loop_Entry produces
52 an object.
53 * sem_ch6.adb: Minor fix in comment.
54
55 2015-10-16 Bob Duff <duff@adacore.com>
56
57 * a-contai.ads: Add two check names: Container_Checks and
58 Tampering_Check. Move the tampering check machinery from
59 Ada.Containers.Vectors to Ada.Containers. Later we can share it
60 with other containers.
61 Disable the tampering machinery in the presence of
62 Suppress(Tampering_Check).
63 Simplify the implementation of tampering checks. E.g. use RAII
64 to make incrementing/decrementing of the counts more concise.
65 * a-contai.adb: New package body, implementing the above.
66 * a-convec.ads, a-convec.adb: Use tampering check machinery
67 in Ada.Containers.
68 Disable all checking code when checks are suppressed.
69 Simplify many of the operations. Implement "&" in terms of Append,
70 rather than "by hand".
71 Remove: function "=" (L, R : Elements_Array) return Boolean is
72 abstract; so we can call the predefined "=" on Elements_Array.
73 For "=" on Vectors: Previously, we returned True immediately if
74 Left'Address = Right'Address. That seems like a non-optimization
75 ("if X = X" is unusual), so removed that. Simplify by using
76 slice comparison ("=" on Element_Array will automatically call
77 "=" on the components, even if user defined).
78
79 2015-10-16 Ed Schonberg <schonberg@adacore.com>
80
81 * sem_ch13.adb (Chek_Record_Representation_Clause): When
82 iterating over components, skip anonymous subtypes created for
83 constrained array components.
84
85 2015-10-16 Eric Botcazou <ebotcazou@adacore.com>
86
87 * a-tags.ads (Parent_Size): Remove obsolete pragma Export.
88 * s-finmas.ads (Header_Offset): Delete.
89 * s-finmas.adb (Header_Offset): Likewise.
90 (Finalize): Call Header_Size instead of Header_Offset.
91 * s-stposu.adb (Allocate_Any_Controlled): Likewise.
92 (Deallocate_Any_Controlled): Likewise.
93
94 2015-10-16 Arnaud Charlet <charlet@adacore.com>
95
96 * a-exetim.ads, a-exetim-mingw.ads, a-exetim-default.ads: Whitespace
97 cleanup.
98 * s-osprim-mingw.adb, einfo.ads, sem_util.adb, sem_util.ads,
99 sem_ch4.adb, sem_ch13.adb, s-trasym.adb, s-trasym.ads,
100 s-taprop-posix.adb: Minor reformatting.
101
102 2015-10-16 Bob Duff <duff@adacore.com>
103
104 * adadecode.h, adadecode.c (ada_demangle): Remove
105 ada_demangle, no longer used.
106 * a-except-2005.adb: Bring System.Traceback.Symbolic into the
107 closure.
108
109 2015-10-16 Ed Schonberg <schonberg@adacore.com>
110
111 * sem_util.adb, sem_util.ads (Get_Reference_Discriminant): Utility to
112 locate the access discriminant that supports implicit dereference on a
113 record type.
114 (Is_OK_Variable_For_Out_Parameter): Reject other illegal uses
115 of Implicit_Dereference on an access_to_constant when actual
116 parameter is a rewritten variable or function call.
117
118 2015-10-16 Bob Duff <duff@adacore.com>
119
120 * a-tags.adb, s-trasym.adb, s-trasym.ads: Make sure we don't get
121 elaboration circularities when polling is turned on.
122
123 2015-10-16 Ed Schonberg <schonberg@adacore.com>
124
125 * sem_ch3.adb (Replace_Anonymous_Access_To_Protected_Subprogram):
126 When creating a full declaration for a formal parameter, the
127 entity is labelled as an Itype, so set Associated_Node_For_Itype
128 accordingly.
129 * einfo.ads: Clarify use of Associated_Node_For_Itype.
130
131 2015-10-16 Bob Duff <duff@adacore.com>
132
133 * bindgen: Move pragmas Warnings earlier, otherwise
134 we can get warnings on with_clauses.
135
136 2015-10-16 Arnaud Charlet <charlet@adacore.com>
137
138 * s-osprim-mingw.adb, s-osprim-x32.adb, s-taprop-mingw.adb,
139 s-taprop-posix.adb (Monotonic_Clock): Removed, not used.
140 Remove remaining references to OS_Primitives.Monotonic_Clock.
141 Keep it only on windows which is a special case.
142
143 2015-10-16 Javier Miranda <miranda@adacore.com>
144
145 * a-textio.adb (Get_Line): Fix documentation.
146 * einfo.ads (Interface_Name): Fix documentation.
147 * exp_aggr.adb (Backend_Processing_Possible): Fix documentation.
148 * exp_ch4.adb (Expand_N_In): Fix documentation.
149
150 2015-10-16 Eric Botcazou <ebotcazou@adacore.com>
151
152 * inline.adb (Subp_Info): Remove Listed component.
153 (Add_Inlined_Subprogram): Take an entity instead of an index.
154 Do not set Listed component to True.
155 (New_Entry): Do not initialize Listed component to False.
156 (Analyze_Inlined_Bodies): Do not test Listed component
157 (Must_Inline): Add calls not in the main unit only
158 if they are in a subprogram that can be inlined outside its unit.
159 (Add_Inlined_Body): Move test around and add comment.
160
161 2015-10-16 Arnaud Charlet <charlet@adacore.com>
162
163 * sinfo.ads, einfo.ads: monir clean ups.
164
165 2015-10-16 Arnaud Charlet <charlet@adacore.com>
166
167 * usage.adb, debug.adb, a-except.adb, a-except.ads, a-except-2005.adb,
168 a-except-2005.ads, s-imgrea.adb: Minor code clean ups related to
169 jgnat/dotnet removal.
170
171 2015-10-16 Arnaud Charlet <charlet@adacore.com>
172
173 * s-osprim-vxworks.adb, s-osprim-darwin.adb, s-tadeca.adb,
174 s-osprim-unix.adb, s-osprim-solaris.adb, s-osprim-posix.adb,
175 s-osprim.ads (Monotonic_Clock): Removed, unused.
176
177 2015-10-16 Ed Schonberg <schonberg@adacore.com>
178
179 * sem_ch4.adb (Try_Object_Operation, Try_One_Interpretation):
180 Do not reset the Obj_Type of the prefix if an interpretation
181 involves an untagged type, to prevent a crash when analyzing an
182 illegal program in All_Errors mode.
183
184 2015-10-16 Hristian Kirtchev <kirtchev@adacore.com>
185
186 * exp_ch4.adb (Expand_N_Expression_With_Actions):
187 Force the evaluation of the expression when its type is Boolean.
188 (Force_Boolean_Evaluation): New routine.
189
190 2015-10-16 Bob Duff <duff@adacore.com>
191
192 * sem_util.adb (Has_Discrim_Dep_Array): Remove
193 this function, and the call. No longer needed now that the back
194 end can handle such things. Should result in further speedups
195 in some cases.
196
197 2015-10-16 Ed Schonberg <schonberg@adacore.com>
198
199 * sem_ch13.adb (Build_Predicate_Functions): If expression for
200 predicate is side-effect free, indicate that the predicate
201 function is pure, to allow for optimization of redundant
202 predicate checks.
203
204 2015-10-16 Arnaud Charlet <charlet@adacore.com>
205
206 * checks.adb: Fix typo.
207 * s-osinte-linux.ads: Add header.
208 * projects.texi: Removed, no longer used.
209 * gcc-interface/Make-lang.in: Update dependencies
210 * s-multip.adb: Minor: fix header.
211 * sem_ch3.adb, exp_ch7.adb, g-dirope.ads, sinfo.ads, types.ads,
212 a-textio.adb, s-exctra.adb, ali.adb, back_end.ads, exp_intr.adb,
213 a-tigeli.adb, exp_ch3.adb, s-os_lib.ads: Remove further references to
214 .NET.
215 * gnatlink.adb, opt.ads, exp_aggr.adb, s-solita.adb: Minor comment
216 updates.
217
218 2015-10-16 Gary Dismukes <dismukes@adacore.com>
219
220 * exp_ch9.adb (Build_Simple_Entry_Call): Set_Is_Internal on
221 the temporary object used for a by-copy entry parameter, to
222 ensure that the object doesn't get its No_Initialization flag
223 reset later in Default_Initialize_Object. Also, generate the
224 assignment of the actual to the temporary in the additional case
225 of a scalar out parameter whose type has a Default_Value aspect.
226 * exp_ch3.adb: Fix minor typo in comment.
227
228 2015-10-16 Hristian Kirtchev <kirtchev@adacore.com>
229
230 * exp_util.adb, sem_util.ads, sem_ch6.adb, sem_ch7.adb, sem_ch8.adb:
231 Minor reformatting.
232 * sem_ch12.adb (Analyze_Formal_Package_Declaration): Set the
233 SPARK_Mode from the context.
234
235 2015-10-16 Bob Duff <duff@adacore.com>
236
237 * sem_util.adb (Requires_Transient_Scope):
238 If Typ is a generic formal incomplete type, look at the actual
239 type. Otherwise, we don't notice that the actual type is tagged,
240 has a variant part, etc, causing a mismatch of calling conventions
241 between caller and callee.
242
243 2015-10-16 Hristian Kirtchev <kirtchev@adacore.com>
244
245 * einfo.ads: Move the declaration of enumeration
246 literal E_Abstract_State above E_Entry. Update the upper bound
247 of subtype Overloadable_Kind.
248
249 2015-10-16 Gary Dismukes <dismukes@adacore.com>
250
251 * exp_attr.adb: Minor editorial changes.
252
253 2015-10-16 Arnaud Charlet <charlet@adacore.com>
254
255 * exp_ch5.adb, sem_ch3.adb, frontend.adb, exp_ch7.adb, exp_ch7.ads,
256 sem_ch5.adb, sem_type.adb, exp_util.adb, exp_util.ads, comperr.adb,
257 exp_attr.adb, sinfo.ads, exp_ch9.adb, make.adb, usage.adb,
258 lib-writ.adb, sem_ch9.adb, bindgen.adb, debug.adb, einfo.adb,
259 einfo.ads, types.ads, checks.adb, sem_prag.adb, s-tasini.adb,
260 rtsfind.ads, freeze.adb, sem_util.adb, sem_util.ads, exp_dbug.adb,
261 gnatlink.adb, gnat1drv.adb, targparm.adb, targparm.ads, exp_ch4.adb,
262 exp_ch11.adb, repinfo.adb, s-soflin.adb, s-soflin.ads, exp_ch6.adb,
263 exp_ch13.adb, sem_mech.adb, sem_ch6.adb, par-prag.adb, exp_disp.adb,
264 sem_ch8.adb, exp_disp.ads, snames.adb-tmpl, exp_aggr.adb, sem_eval.adb,
265 exp_intr.adb, sem_ch13.adb, snames.ads-tmpl, sem_disp.adb, exp_ch3.adb:
266 Code clean up: remove special handling for .NET and JVM.
267
268 2015-10-16 Arnaud Charlet <charlet@adacore.com>
269
270 * sem_ch12.adb: Minor punctuation fix in comment
271 * s-rident.ads: Minor consistency fix in comment
272 * exp_attr.adb, g-spipat.ads: punctuation fixes in comments.
273 * restrict.ads: Style fix in comments.
274 * sem_prag.adb: Minor grammar fix in comment
275
276 2015-10-16 Gary Dismukes <dismukes@adacore.com>
277
278 * sem_ch12.adb: Minor reformatting/rewording.
279
280 2015-10-16 Arnaud Charlet <charlet@adacore.com>
281
282 * einfo.ads: Minor fix of duplicate words
283 * rident.ads: Minor style fix in comment
284
285 2015-10-16 Hristian Kirtchev <kirtchev@adacore.com>
286
287 * exp_ch3.adb (Expand_N_Full_Type_Declaration): Do not capture,
288 set and restore the Ghost mode.
289 (Expand_N_Object_Declaration): Do not capture, set and restore the
290 Ghost mode.
291 (Freeze_Type): Redo the capture and restore of the Ghost mode.
292 (Restore_Globals): Removed.
293 * exp_ch5.adb (Expand_N_Assignment_Statement): Redo the capture
294 and restore of the Ghost mode.
295 (Restore_Globals): Removed.
296 * exp_ch6.adb (Expand_N_Procedure_Call_Statement):
297 Redo the capture and restore of the Ghost mode.
298 (Expand_N_Subprogram_Body): Redo the capture, set and restore
299 of the Ghost mode.
300 (Expand_N_Subprogram_Declaration): Do not
301 capture, set and restore the Ghost mode.
302 (Restore_Globals): Removed.
303 * exp_ch7.adb (Expand_N_Package_Body): Redo the capture, set
304 and restore of the Ghost mode.
305 (Expand_N_Package_Declaration): Do not capture, set and restore the
306 Ghost mode.
307 * exp_ch8.adb (Expand_N_Exception_Renaming_Declaration):
308 Redo the capture and restore of the Ghost mode.
309 (Expand_N_Object_Renaming_Declaration): Redo
310 the capture and restore of the Ghost mode.
311 (Expand_N_Package_Renaming_Declaration):
312 Redo the capture and restore of the Ghost mode.
313 (Expand_N_Subprogram_Renaming_Declaration): Redo the capture
314 and restore of the Ghost mode.
315 * exp_ch11.adb Remove with and use clauses for Ghost.
316 (Expand_N_Exception_Declaration): Do not capture, set and restore
317 the Ghost mode.
318 * exp_disp.adb (Make_DT): Redo the capture and restore of the
319 Ghost mode.
320 (Restore_Globals): Removed.
321 * exp_prag.adb (Expand_Pragma_Check): Do not capture, set
322 and restore the Ghost mode.
323 (Expand_Pragma_Contract_Cases):
324 Redo the capture and restore of the Ghost mode. Preserve the
325 original context of contract cases by setting / resetting the
326 In_Assertion_Expr counter.
327 (Expand_Pragma_Initial_Condition):
328 Redo the capture and restore of the Ghost mode.
329 (Expand_Pragma_Loop_Variant): Redo the capture and restore of
330 the Ghost mode.
331 (Restore_Globals): Removed.
332 * exp_util.adb (Make_Predicate_Call): Redo the capture and
333 restore of the Ghost mode.
334 (Restore_Globals): Removed.
335 * freeze.adb (Freeze_Entity): Redo the capture and restore of
336 the Ghost mode.
337 (Restore_Globals): Removed.
338 * ghost.adb (Check_Ghost_Context): Remove the RM reference from
339 the error message.
340 (Is_OK_Statement): Account for statements
341 that appear in assertion expressions.
342 (Is_Subject_To_Ghost):
343 Moved from spec.
344 * ghost.ads (Is_Subject_To_Ghost): Moved to body.
345 * rtsfind.ads (Load_RTU): Redo the capture and restore of the
346 Ghost mode.
347 * sem.adb Add with and use clauses for Ghost.
348 (Analyze): Redo
349 the capture and restore of the Ghost mode. Set the Ghost mode
350 when analyzing a declaration.
351 (Do_Analyze): Redo the capture
352 and restore of the Ghost mode.
353 * sem_ch3.adb (Analyze_Full_Type_Declaration): Do not capture, set
354 and restore the Ghost mode.
355 (Analyze_Incomplete_Type_Decl):
356 Do not capture, set and restore the Ghost mode.
357 (Analyze_Number_Declaration): Do not capture, set and restore the
358 Ghost mode.
359 (Analyze_Object_Declaration): Do not capture, set and
360 restore the Ghost mode.
361 (Analyze_Private_Extension_Declaration):
362 Do not capture, set and restore the Ghost mode.
363 (Analyze_Subtype_Declaration): Do not capture, set and restore
364 the Ghost mode.
365 (Restore_Globals): Removed.
366 * sem_ch5.adb (Analyze_Assignment): Redo the capture and restore
367 of the Ghost mode.
368 (Restore_Globals): Removed.
369 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration):
370 Do not capture, set and restore the Ghost mode.
371 (Analyze_Procedure_Call): Redo the capture and restore of the
372 Ghost mode.
373 (Analyze_Subprogram_Body_Helper): Redo the capture
374 and restore of the Ghost mode. (Analyze_Subprogram_Declaration):
375 Do not capture, set and restore the Ghost mode.
376 (Restore_Globals): Removed.
377 * sem_ch7.adb (Analyze_Package_Body_Helper): Redo the capture and
378 restore of the Ghost mode.
379 (Analyze_Package_Declaration):
380 Do not capture, set and restore the Ghost mode.
381 (Analyze_Private_Type_Declaration): Do not capture, set and
382 restore the Ghost mode.
383 (Restore_Globals): Removed.
384 * sem_ch8.adb (Analyze_Exception_Renaming): Do not capture,
385 set and restore the Ghost mode.
386 (Analyze_Generic_Renaming): Do not capture, set and restore the Ghost
387 mode.
388 (Analyze_Object_Renaming): Do not capture, set and restore the
389 Ghost mode.
390 (Analyze_Package_Renaming): Do not capture, set and restore the Ghost
391 mode.
392 (Analyze_Subprogram_Renaming): Do not capture, set and restore the
393 Ghost mode.
394 (Restore_Globals): Removed.
395 * sem_ch11.adb (Analyze_Exception_Declaration): Do not capture,
396 set and restore the Ghost mode.
397 * sem_ch12.adb (Analyze_Generic_Package_Declaration):
398 Do not capture, set and restore the Ghost mode.
399 (Analyze_Generic_Subprogram_Declaration): Do not capture, set
400 and restore the Ghost mode.
401 * sem_ch13.adb (Build_Invariant_Procedure_Declaration): Redo
402 the capture and restore of the Ghost mode.
403 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
404 Redo the capture and restore of the Ghost mode.
405 (Analyze_External_Property_In_Decl_Part):
406 Redo the capture and restore of the Ghost mode.
407 (Analyze_Initial_Condition_In_Decl_Part): Redo the
408 capture and restore of the Ghost mode. (Analyze_Pragma):
409 Do not capture, set and restore the Ghost mode for Assert.
410 Redo the capture and restore of the Ghost mode for Check. Do
411 not capture and restore the Ghost mode for Invariant.
412 (Analyze_Pre_Post_Condition_In_Decl_Part): Redo the capture and
413 restore of the Ghost mode.
414 * sem_res.adb (Resolve): Capture, set and restore the Ghost mode
415 when resolving a declaration.
416 * sem_util.adb (Build_Default_Init_Cond_Procedure_Body):
417 Redo the capture and restore of the Ghost mode.
418 (Build_Default_Init_Cond_Procedure_Declaration): Redo the capture
419 and restore of the Ghost mode.
420
421 2015-10-16 Bob Duff <duff@adacore.com>
422
423 * debug.adb: Document -gnatdQ switch.
424
425 2015-10-16 Ed Schonberg <schonberg@adacore.com>
426
427 * sem_ch12.adb (Analyze_Formal_Subprogram): Implement rule that
428 a formal abstract subprogram cannot have a null default: RM 12.6
429 (4 1.2).
430
431 2015-10-16 Bob Duff <duff@adacore.com>
432
433 * sem_util.ads, sinput.ads, bcheck.adb: Minor comment fixes.
434
435 2015-10-16 Javier Miranda <miranda@adacore.com>
436
437 * inline.adb (Add_Inlined_Body): Ensure that
438 Analyze_Inlined_Bodies will be invoked after completing the
439 analysis of the current unit.
440
441 2015-10-16 Arnaud Charlet <charlet@adacore.com>
442
443 * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order): Fix error
444 message for bad last bit position.
445 * sem_ch3.adb, sem_util.adb, sem_util.ads: Minor reformatting.
446
447 2015-10-16 Ed Schonberg <schonberg@adacore.com>
448
449 * exp_ch5.adb (Expand_N_Case_Statement): If expression is
450 compile-time known but does not obey a static predicate on
451 its type, replace the case statement with a raise statement,
452 as with other statically detected constraint violations.
453
454 2015-10-16 Bob Duff <duff@adacore.com>
455
456 * s-traceb.adb, s-traceb.ads, s-traceb-hpux.adb, s-traceb-mastop.adb:
457 Reinstate code.
458 * opt.ads: Minor typo.
459
460 2015-10-16 Ed Schonberg <schonberg@adacore.com>
461
462 * sem_util.adb (Gather_Components): When gathering components
463 of a nested variant, the record type used in legality checks is
464 the enclosing record type.
465
466 2015-10-13 Jakub Jelinek <jakub@redhat.com>
467
468 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
469 DEF_FUNCTION_TYPE_11): Define.
470
471 2015-10-09 Eric Botcazou <ebotcazou@adacore.com>
472
473 * gcc-interface/Make-lang.in: Make sure that GNAT1_OBJS and not just
474 GNAT1_ADA_OBJS are compiled only after generated files are created.
475
476 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
477
478 * gcc-interface/trans.c (convert_with_check): Use real_arithmetic
479 instead of REAL_ARITHMETIC.
480
481 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
482
483 * gcc-interface/trans.c (convert_with_check): Use real_less instead
484 of REAL_VALUES_LESS.
485
486 2015-10-02 Doug Rupp <rupp@adacore.com>
487 Olivier Hainque <hainque@adacore.com>
488
489 * gcc-interface/lang.opt (fbuiltin-printf): Accept.
490 * gcc-interface/misc.c (gnat_handle_option): Ignore it.
491 * gcc-interface/lang-specs.h (@ada, @adawhy, @adascil): Propagate -f*
492 flags as -g* and -m* flags past -gnatez.
493
494 2015-10-02 Eric Botcazou <ebotcazou@adacore.com>
495
496 * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Warnings>: Replace
497 linear search with call to find_opt and issue warnings if the -W
498 switch is not appropriate.
499
500 2015-10-02 Eric Botcazou <ebotcazou@adacore.com>
501
502 * gcc-interface/ada-tree.h (DECL_RESTRICTED_ALIASING_P): New flag.
503 * gcc-interface/decl.c (gnat_to_gnu_param): For parameters passed by
504 reference but whose type isn't by-ref and whose mechanism hasn't been
505 forced to by-ref, set the DECL_RESTRICTED_ALIASING_P flag directly on
506 them instead of changing their type.
507 * gcc-interface/trans.c (scan_rhs_r): New helper function.
508 (independent_iterations_p): New predicate.
509 (Loop_Statement_to_gnu): For a loop with an iteration scheme, set an
510 ivdep pragma if the iterations are independent.
511
512 2015-10-02 Eric Botcazou <ebotcazou@adacore.com>
513
514 * gcc-interface/trans.c (find_loop_for): Use FOR_EACH_VEC_ELT_REVERSE.
515 (Loop_Statement_to_gnu): Use FOR_EACH_VEC_ELT.
516 (finalize_nrv): Use FOR_EACH_VEC_SAFE_ELT and initialize field.
517 (build_stmt_group): Add blank lines.
518
519 2015-09-30 Thomas Schwinge <thomas@codesourcery.com>
520
521 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_11): Don't define.
522
523 2015-09-28 Tom de Vries <tom@codesourcery.com>
524
525 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_6): Define.
526
527 2015-09-17 Eric Botcazou <ebotcazou@adacore.com>
528
529 * gcc-interface/trans.c (emit_check): Do not touch TREE_SIDE_EFFECTS.
530
531 2015-09-14 Pierre-Marie de Rodat <derodat@adacore.com>
532
533 * gcc-interface/misc.c (gnat_post_options): Issue a warning if
534 generating STABS debugging information when not the default.
535
536 2015-09-14 Eric Botcazou <ebotcazou@adacore.com>
537
538 * gcc-interface/gigi.h (ref_filename): Delete.
539 (Sloc_to_locus): Add clean_column parameter defaulting to false.
540 (build_call_raise): Adjust comment.
541 (build_call_raise_range): Move around.
542 * gcc-interface/trans.c (ref_filename): Delete.
543 (gigi): Fix formatting.
544 (block_end_locus_sink): Delete.
545 (Sloc_to_locus1): Tidy up and reformat. Rename into...
546 (Sloc_to_locus): ...this. Add default for clean_colmun parameter.
547 (set_expr_location_from_node1): Rename into...
548 (set_expr_location_from_node): ...this.
549 (set_end_locus_from_node): Move around. Adjust for renaming.
550 (Handled_Sequence_Of_Statements_to_gnu): Likewise.
551 (add_cleanup): Likewise.
552 * gcc-interface/utils2.c (expand_sloc): New static function.
553 (build_call_raise): Call it.
554 (build_call_raise_column): Likewise.
555 (build_call_raise_range): Likewise. Move around.
556
557 2015-09-14 Eric Botcazou <ebotcazou@adacore.com>
558
559 * gcc-interface/utils2.c (gnat_rewrite_reference) <COMPOUND_EXPR>: Add
560 another acceptable pattern for the RHS.
561
562 2015-07-24 Micahel Darling <darlingm@gmail.com>
563
564 PR other/66259
565 * prj-nmsc.adb: Reflects renaming of configure.in to configure.ac
566 * gcc-interface/Makefile.in: Likewise
567
568 2015-07-12 Aldy Hernandez <aldyh@redhat.com>
569
570 * gcc-interface/utils.c: Fix double word typos.
571 * gnat_ugn.texi: Same.
572 * init.c: Same.
573 * par.adb: Same.
574 * projects.texi: Same.
575 * sem_ch4.adb: Same.
576 * sem_ch6.adb: Same.
577 * sem_dim.adb: Same.
578 * sem_eval.adb: Same.
579 * sem_prag.adb: Same.
580 * sem_warn.adb: Same.
581
582 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
583
584 * gcc-interface/cuintp.c: Adjust includes.
585 * gcc-interface/decl.c: Likewise.
586 * gcc-interface/misc.c: Likewise.
587 * gcc-interface/targtyps.c: Likewise.
588 * gcc-interface/trans.c: Likewise.
589 * gcc-interface/utils.c: Likewise.
590 * gcc-interface/utils2.c: Likewise.
591
592 2015-07-06 John Marino <gnugcc@marino.st>
593
594 * s-oscons-tmplt.c: Add support for DragonFly alongside FreeBSD.
595
596 2015-06-29 Eric Botcazou <ebotcazou@adacore.com>
597
598 PR ada/63310
599 * gcc-interface/utils.c (gnat_write_global_declarations): Always
600 build the dummy global variable if code was generated.
601
602 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
603
604 PR fortran/66605
605 * gcc-interface/misc.c (gnat_post_options): No need to disable
606 warn_unused_parameter anymore.
607
608 2015-06-26 Eric Botcazou <ebotcazou@adacore.com>
609
610 * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): When
611 not optimizing the CFG, clear the DECL_DECLARED_INLINE_P flag on the
612 at-end procedures.
613
614 2015-06-26 Eric Botcazou <ebotcazou@adacore.com>
615
616 * gcc-interface/gigi.h (note_types_used_by_globals): Delete.
617 (gnat_write_global_declarations): New prototype.
618 * gcc-interface/utils.c (type_decls): Rename back to...
619 (global_decls): ...this.
620 (gnat_pushdecls): Revert previous change.
621 (create_var_decl): Do not output global variables.
622 (note_types_used_by_globals): Rename back to...
623 (gnat_write_global_declarations): ...this. Output variables on the
624 global_decls vector.
625 * gcc-interface/misc.c (gnat_parse_file): Adjust to above renaming.
626
627 2015-06-26 Eric Botcazou <ebotcazou@adacore.com>
628
629 * gcc-interface/gigi.h (create_var_decl_1): Rename into...
630 (create_var_decl): ...this. Add default value for last parameter.
631 (create_type_stub_decl): Adjust.
632 (create_type_decl): Likewise.
633 (create_field_decl): Likewise.
634 (create_param_decl): Likewise.
635 (create_label_decl): Likewise.
636 (create_subprog_decl): Likewise.
637 * gcc-interface/utils.c (create_var_decl_1): Rename into...
638 (create_var_decl): ...this. Rename var_name into name and var_init
639 into init, move const_decl_allowed_p last and adjust accordingly.
640 (create_type_stub_decl): Rename type_name into name and adjust.
641 (create_type_decl): Likewise.
642 (create_field_decl): Likewise for field_name and field_type.
643 (create_param_decl): Likewise for param_name and param_type.
644 (create_label_decl): Likewise for label_name.
645 (create_subprog_decl): Likewise for subprog_name and subprog_type.
646 * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust couple of calls
647 to create_var_decl_1.
648
649 2015-06-26 Eric Botcazou <ebotcazou@adacore.com>
650
651 * gcc-interface/trans.c (loop_info_d): Add low_bound, high_bound,
652 artificial, has_checks and warned_aggressive_loop_optimizations.
653 (gigi): Set warn_aggressive_loop_optimizations to 0.
654 (inside_loop_p): New inline predicate.
655 (push_range_check_info): Rename into...
656 (find_loop_for): ...this and do not push range_check_info_d object.
657 (Loop_Statement_to_gnu): Set artificial, low_bound and high_bound
658 fields of gnu_loop_info. Adjust detection of checks enabled by
659 -funswitch-loops and adds one for -faggressive-loop-optimizations.
660 (gnat_to_gnu) <N_Indexed_Component>: If aggressive loop optimizations
661 are enabled, warn for loops overrunning an array of size 1 not at the
662 end of a record.
663
664 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
665
666 * gcc-interface/trans.c: Remove ipa-ref.h and plugin-api.h from include
667 list.
668 * gcc-interface/utils.c: Likewise.
669
670 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
671
672 * gcc-interface/decl.c (value_annotation_hasher): Inherit from
673 ggc_cache_ptr_hash rather than ggc_cache_hasher.
674 * gcc-interface/utils.c (pad_type_hasher): Likewise.
675
676 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
677
678 * gcc-interface/decl.c (value_annotation_hasher::handle_cache_entry):
679 Delete.
680 (value_annotation_hasher::keep_cache_entry): New function.
681 * gcc-interface/utils.c (pad_type_hasher::handle_cache_entry):
682 Delete.
683 (pad_type_hasher::keep_cache_entry): New function.
684
685 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
686
687 * gcc-interface/misc.c: Include calls.h not function.h.
688
689 2015-06-19 Eric Botcazou <ebotcazou@adacore.com>
690
691 * gcc-interface/gigi.h (record_builtin_type): Adjust comment.
692 (tree create_type_decl): Likewise.
693 (create_var_decl_1): Add artificial_p and debug_info_p parameters.
694 (create_var_decl): Likewise.
695 (create_true_var_decl): Delete.
696 (create_subprog_decl): Add debug_info_p parameter.
697 * gcc-interface/decl.c (gnat_to_gnu_entity): Add artificial_p local
698 variable and use it throughout. Remove DECL_ARTIFICIAL settings.
699 <E_Variable>: Adjust calls to create_var_decl and create_var_decl_1.
700 Remove DECL_IGNORED_P settings.
701 <E_Enumeration_Type>: Likewise.
702 <E_Record_Type>: Likewise.
703 <E_Subprogram_Type>: Likewise. Remove artificial_flag local variable.
704 Adjust call to create_subprog_decl.
705 (get_minimal_subprog_decl): Likewise.
706 (elaborate_expression_1): Adjust call to create_var_decl.
707 * gcc-interface/trans.c (gigi): Adjust calls to create_var_decl and
708 create_subprog_decl. Remove DECL_ARTIFICIAL & DECL_IGNORED_P settings.
709 * gcc-interface/utils.c (maybe_pad_type): Likewise.
710 (record_builtin_type): Adjust comment.
711 (create_type_stub_decl): Remove obsolete comment.
712 (create_var_decl_1): Add artificial_p and debug_info_p parameters.
713 Set DECL_ARTIFICIAL and DECL_IGNORED_P accordingly.
714 (create_subprog_decl): Add debug_info_p parameter. Set DECL_IGNORED_P
715 accordingly.
716
717 2015-06-19 Eric Botcazou <ebotcazou@adacore.com>
718
719 * gcc-interface/misc.c (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): Define.
720
721 2015-06-19 Eric Botcazou <ebotcazou@adacore.com>
722
723 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Make sure
724 the size of a padding type built around the return type is positive.
725 * gcc-interface/trans.c (gnat_to_gnu) <N_Simple_Return_Statement>:
726 Use INIT_EXPR instead of MODIFY_EXPR to assign to the return object.
727
728 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
729
730 * gcc-interface/cuintp.c: Do not include input.h, line-map.h or is-a.h.
731 * gcc-interface/decl.c: Likewise.
732 * gcc-interface/misc.c: Likewise.
733 * gcc-interface/targtyps.c: Likewise.
734 * gcc-interface/trans.c: Likewise.
735 * gcc-interface/utils.c: Likewise.
736 * gcc-interface/utils2.c: Likewise.
737
738 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
739
740 * gcc-interface/utils.c (get_global_context): Register the main
741 translation unit through the new debug hook.
742
743 2015-06-09 Eric Botcazou <ebotcazou@adacore.com>
744
745 * gcc-interface/misc.c: Remove duplicate include directives.
746 * gcc-interface/trans.c: Likewise.
747 * gcc-interface/utils.c: Likewise.
748
749 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
750
751 * gcc-interface/cuintp.c : Adjust include files.
752 * gcc-interface/decl.c : Likewise.
753 * gcc-interface/misc.c : Likewise.
754 * gcc-interface/targtyps.c : Likewise.
755 * gcc-interface/trans.c : Likewise.
756 * gcc-interface/utils.c : Likewise.
757 * gcc-interface/utils2.c : Likewise.
758
759 2015-06-08 John Marino <gnugcc@marino.st>
760
761 * a-intnam-dragonfly.ads: New.
762 * s-osinte-dragonfly.adb: Likewise.
763 * s-osinte-dragonfly.ads: Likewise.
764 * system-dragonfly-x86_64.ads: Likewise.
765 * adaint.c: Add BSD macros.
766 * cstreams.c: Likewise.
767 * gsocket.h: Likewise.
768 * link.c: Likewise.
769 * socket.c: Likewise.
770 * env.c: Add __DragonFly__, remove __FreeBSD__ macro.
771 * init.c: Add __DragonFly__, change __gnat_install_handler
772 prototype from empty to void.
773 * initialize.c: Add __DragonFly__.
774 * sysdep.c: Likewise.
775 * s-osinte-freebsd.adb: Use __get_errno instead of __error.
776 * tracebak.c: Set unwinder for i386 BSD.
777 * gcc-interface/Makefile.in: Add x86_64 DragonFly, tweak
778 x86_64 FreeBSD and x86 FreeBSD.
779
780 2015-06-06 Eric Botcazou <ebotcazou@adacore.com>
781
782 * gcc-interface/utils.c (note_types_used_by_globals): Tweak comment.
783 * gcc-interface/decl.c (gnat_to_gnu_entity): Likewise.
784
785 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
786
787 * gcc-interface/gigi.h (note_types_used_by_globals): Rename from
788 gnat_write_global_declarations.
789 * gcc-interface/misc.c (gnat_parse_file): Call
790 note_types_used_by_globals.
791 Remove LANG_HOOKS_WRITE_GLOBALS.
792 * gcc-interface/utils.c: Rename global_decls to type_decls.
793 (gnat_write_global_declarations): Rename
794 to note_types_used_by_globals.
795 Remove call to finalize_compilation_unit.
796 Remove call to debug_hooks->global_decl for globals.
797 (gnat_pushdecls): Only insert into type_decls if TYPE_DECL.
798
799 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
800
801 * gcc-interface/cuintp.c: Adjust includes for restructured coretypes.h.
802 * gcc-interface/decl.c: Likewise.
803 * gcc-interface/misc.c: Likewise.
804 * gcc-interface/targtyps.c: Likewise.
805 * gcc-interface/trans.c: Likewise.
806 * gcc-interface/utils.c: Likewise.
807 * gcc-interface/utils2.c: Likewise.
808
809 2015-06-04 Pierre-Marie de Rodat <derodat@adacore.com>
810
811 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: If
812 processing a definition, create definitions for padding types
813 around return types.
814
815 2015-06-03 Eric Botcazou <ebotcazou@adacore.com>
816
817 * gcc-interface/utils.c (copy_type): Also set TYPE_CANONICAL.
818
819 2015-06-03 Eric Botcazou <ebotcazou@adacore.com>
820
821 * gcc-interface/trans.c (gnat_to_gnu) <N_Simple_Return_Statement>: Fix
822 typo in latest change.
823
824 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
825
826 * gcc-interface/Makefile.in: Fix ARM/Darwin configuration.
827
828 2015-06-01 Pierre-Marie de Rodat <derodat@adacore.com>
829
830 * gcc-interface/utils.c (scale_by_factor_of): When handling a function
831 call expression, process the corresponding function body. Also handle
832 potential addends.
833
834 2015-06-01 Pierre-Marie de Rodat <derodat@adacore.com>
835
836 * gcc-interface/decl.c (gnat_to_gnu_entity): Replace pointer types with
837 references ones for functions that return references.
838
839 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
840
841 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: For a
842 definition of a type coming from a limited_with, get to the full view
843 if it is not in the main code unit.
844
845 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
846
847 * gcc-interface/utils.c (create_var_decl_1): If an assembler name is
848 specified, let the target mangle it before settting.
849 (create_subprog_decl): Likewise and move this treatment last.
850
851 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
852
853 * gcc-interface/lang-specs.h (TARGET_VXWORKS_RTP): Move substitution to
854 before first -gnatez switch. Simplify and add trailing space.
855
856 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
857
858 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: If the
859 record has a parent field and a representation clause, make sure that
860 it is properly aligned.
861
862 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
863
864 * gcc-interface/trans.c (lvalue_required_p) <N_Indexed_Component>: Deal
865 with character and enumeration literals as index values.
866
867 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
868
869 * gcc-interface/gigi.h (build_simple_component_ref): Declare.
870 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Deal with
871 address clause on aliased object with unconstrained nominal subtype.
872 Mark the aligning variable as artificial, do not convert the address
873 expression immediately but mark it as constant instead.
874 * gcc-interface/utils.c (convert): If the target type contains a
875 template, be prepared for an empty array.
876 (maybe_unconstrained_array): Likewise.
877 * gcc-interface/utils2.c (known_alignment) <POINTER_PLUS_EXPR>: Deal
878 with the pattern built for aligning types.
879 <INTEGER_CST>: Do not cap the value at BIGGEST_ALIGNMENT.
880 (build_simple_component_ref): Make public.
881 If the base object is a constructor that contains a template, fold the
882 result field by field.
883
884 2015-05-31 Eric Botcazou <ebotcazou@adacore.com>
885
886 * s-oscons-tmplt.c: Add explicit tests for Android alongside Linux.
887
888 2015-05-30 Eric Botcazou <ebotcazou@adacore.com>
889
890 * adaint.c: Test for __linux__ instead of linux and __sun__ instead
891 of sun. Add missing leading underscore to AIX. Remove #elif 0.
892 * adaint.h: Likewise.
893 * cio.c: Likewise.
894 * cstreams.c: Likewise.
895 * env.c: Likewise.
896 * gsocket.h: Likewise.
897 * init.c: Likewise. Test for __i386__ instead of i386.
898 * link.c: Likewise.
899 * s-oscons-tmplt.c: Likewise.
900 * sysdep.c: Likewise.
901 * terminals.c: Likewise. Use BSD symbol instead of FREEBSD.
902 * tracebak.c: Likewise. Test for __sparc__ instead of sparc.
903
904 2015-05-28 Eric Botcazou <ebotcazou@adacore.com>
905
906 * gcc-interface/utils.c (max_size) <tcc_binary>: Add special code to
907 deal with the subtraction of a "negative" value in an unsigned type.
908
909 2015-05-28 Eric Botcazou <ebotcazou@adacore.com>
910
911 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Do
912 not error out on a return type which has a size that overflows if the
913 return is done by invisible reference.
914
915 2015-05-28 Eric Botcazou <ebotcazou@adacore.com>
916
917 * gcc-interface/utils.c (gnat_pushdecl): Reunify the handling of array
918 and pointer types wrt DECL_ORIGINAL_TYPE and adjust left and right.
919
920 2015-05-28 Eric Botcazou <ebotcazou@adacore.com>
921
922 * gcc-interface/gigi.h (gnat_stabilize_reference): Adjust.
923 (rewrite_fn): Remove third parameter.
924 (type_is_padding_self_referential): New inline predicate.
925 (return_type_with_variable_size_p): Likewise.
926 * gcc-interface/decl.c (allocatable_size_p): More around.
927 (cannot_be_superflat_p): Rename into...
928 (cannot_be_superflat ): ...this.
929 (initial_value_needs_conversion): New predicate.
930 (gnat_to_gnu_entity): Invoke type_is_padding_self_referential,
931 initial_value_needs_conversion and adjust to above renaming.
932 For a renaming, force the materialization if the inner expression
933 is compound. Adjust calls to elaborate_reference and build a
934 compound expression if needed.
935 (struct er_dat): Add N field.
936 (elaborate_reference_1): Remove N parameter and adjust.
937 (elaborate_reference): Add INIT parameter and pass it in the call to
938 gnat_rewrite_reference. Adjust initial expression.
939 * gcc-interface/trans.c (Call_to_gnu): Treat renamings the same way as
940 regular object declarations when it comes to creating a temporary.
941 Adjust call to gnat_stabilize_reference and build a compound expression
942 if needed. Invoke return_type_with_variable_size_p.
943 (gnat_to_gnu): Invoke type_is_padding_self_referential. In case #4,
944 return a call to a function unmodified if it returns with variable size
945 and is also the initial expression in an object declaration.
946 * gcc-interface/utils2.c (build_binary_op) <INIT_EXPR>: Use the RHS'
947 type if it is a call to a function that returns with variable size.
948 (build_unary_op): Invoke type_is_padding_self_referential.
949 (gnat_stabilize_reference_1): Remove N parameter and adjust.
950 (gnat_stabilize_reference): Add INIT parameter and pass it in the call
951 to gnat_rewrite_reference.
952 (gnat_rewrite_reference): Remove N, add INIT parameter and adjust.
953 <COMPOUND_EXPR>: New case.
954
955 2015-05-28 Ed Schonberg <schonberg@adacore.com>
956
957 * sem_ch3.adb (Is_Visible_Component): Component is visible
958 in a derived type if inherited through an ancestor that has a
959 partial view of the original type holding the component, if the
960 full view of that original type is in scope.
961 * sem_util.ads (Get_Body_From_Stub): Works for all kinds of stubs.
962
963 2015-05-28 Bob Duff <duff@adacore.com>
964
965 * sem_util.adb (Requires_Transient_Scope): For definite untagged
966 subtypes, we should never have to use the secondary stack. This moves
967 toward that goal. But there are still cases that don't work.
968 Here, we move the check for Is_Definite first, but add a
969 special-purpose check for Has_Discrim_Dep_Array.
970
971 2015-05-28 Bob Duff <duff@adacore.com>
972
973 * sem_util.adb (Requires_Transient_Scope): Avoid returning
974 function results on the secondary stack in so many cases.
975
976 2015-05-28 Ed Schonberg <schonberg@adacore.com>
977
978 * sem_util.adb (Wrong_Type): In any instance, do not emit error
979 if type of expression is the partial view of the expected type.
980
981 2015-05-28 Ed Schonberg <schonberg@adacore.com>
982
983 * sem_res.adb (Resolve_Actuals): a) The replacement of formal
984 names in named associations only needs to be done within an
985 instance, on a call to a primitive of a formal derived type,
986 where the actual subprogram may have different formal names than
987 those of the primitive operation of the formal type.
988 b) Defaulted parameters must be taken into account when obtaining
989 the names of the formals of the actual subprogram being called.
990
991 2015-05-28 Robert Dewar <dewar@adacore.com>
992
993 * sem_ch13.adb, sem_disp.ads: Minor reformatting.
994
995 2015-05-28 Ed Schonberg <schonberg@adacore.com>
996
997 * sem_util.adb (Set_Debug_Info_Needed): For a private type
998 whose full view is itself a derived private type, set flag on
999 underlying full view as well, for proper gdb display.
1000
1001 2015-05-28 Bob Duff <duff@adacore.com>
1002
1003 * exp_tss.ads: Minor comment fix.
1004 * exp_ch3.adb (Build_Array_Init_Proc, Build_Record_Init_Proc):
1005 Inline init_procs when the type has controlled parts. Remove
1006 obsolete comments about those init_procs -- init_procs for
1007 such types are no longer complex. A typical init_proc just
1008 initializes the 'Tag field, and calls the parent init_proc
1009 (e.g. for Limited_Controlled), which calls the grandparent
1010 (for Root_Controlled), which does nothing. This all boils down
1011 to one instruction when inlined.
1012 * exp_ch7.adb (Create_Finalizer): Inline the finalizer.
1013
1014 2015-05-28 Ed Schonberg <schonberg@adacore.com>
1015
1016 * sem_ch4.adb (Analyze_Selected_Component): If the type to use
1017 is a derived type and is a generic actual, the selected component
1018 appears within an instance body, and the check over the type
1019 has failed, examine ancestor types for the desired component.
1020 (Find_Component_In_Instance): If record type is a derived type,
1021 examine all ancestors in order to locate desired component.
1022
1023 2015-05-27 H.J. Lu <hongjiu.lu@intel.com>
1024
1025 * gcc-interface/Makefile.in (TOOLS_LIBS): Add @NO_PIE_FLAG@.
1026
1027 2015-05-27 Eric Botcazou <ebotcazou@adacore.com>
1028
1029 * gcc-interface/trans.c (elaborate_all_entities): Do not elaborate an
1030 incomplete type coming from a limited_with and whose non-limited view
1031 comes from the main unit.
1032
1033 2015-05-27 Eric Botcazou <ebotcazou@adacore.com>
1034
1035 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Move down
1036 code applying atomic checks to the object.
1037
1038 2015-05-27 Robert Dewar <dewar@adacore.com>
1039
1040 * sem_aux.adb: Minor rewording.
1041
1042 2015-05-27 Bob Duff <duff@adacore.com>
1043
1044 * exp_prag.adb (Expand_Pragma_Abort_Defer): Make
1045 pragma Abort_Defer do nothing if Abort_Allowed is False.
1046
1047 2015-05-27 Arnaud Charlet <charlet@adacore.com>
1048
1049 * exp_ch9.adb, sem_util.adb, sem_util.ads, s-stposu.adb, s-spsufi.ads,
1050 sem_elab.ads, g-comlin.ads, errout.ads, exp_ch6.adb, sem_ch4.adb,
1051 opt.ads, s-bignum.adb, output.ads, sem_ch13.adb, erroutc.ads,
1052 sem_disp.ads, exp_ch3.adb: Minor fixes of duplicate words in comments.
1053
1054 2015-05-27 Doug Rupp <rupp@adacore.com>
1055
1056 * adaint.c (__gnat_tmp_name) [vxworks]: Robustify and use for rtp as
1057 well as kernel.
1058
1059 2015-05-27 Pierre-Marie de Rodat <derodat@adacore.com>
1060
1061 * par_sco.adb (Process_Decision): Store sloc to
1062 condition/pragmas SCOs associations into a temporary table before
1063 moving them to the SCO_Raw_Hash_Table so that we can back them
1064 out just like we do for SCO entries that are simple decisions
1065 in an expression context.
1066
1067 2015-05-27 Ed Schonberg <schonberg@adacore.com>
1068
1069 * sem_ch6.adb (Process_Formals): A non-private formal type that
1070 is a limited view does not have a list of private dependents.
1071
1072 2015-05-27 Ed Schonberg <schonberg@adacore.com>
1073
1074 * exp_ch5.adb (Expand_N_Case_Statement): If the expression in
1075 the case statement is a compile-time known value, we look for a
1076 corresponding alternative to optimize the case statement into a
1077 single case. If the type has a static predicate and the expression
1078 does not satisfy the predicate, there is no legal alternative and
1079 this optimization is not applicable. Excecution is erroneous,
1080 or else if assertions are enabled, an exception will be raised
1081 earlier, at the point the expression is elaborated.
1082
1083 2015-05-27 Robert Dewar <dewar@adacore.com>
1084
1085 * sem_elab.adb (Check_Internal_Call_Continue): Suppress
1086 warning on Finalize, Adjust, or Initialize if type involved has
1087 Warnings_Off set.
1088
1089 2015-05-27 Ed Schonberg <schonberg@adacore.com>
1090
1091 * sem_aux.adb, sem_aux.ads (First_Discriminant): Return empty when
1092 applied to a type with no known discriminants.
1093
1094 2015-05-26 Robert Dewar <dewar@adacore.com>
1095
1096 * errout.ads, sem_ch4.adb, sem_ch6.adb: Minor reformatting.
1097
1098 2015-05-26 Bob Duff <duff@adacore.com>
1099
1100 * sem_elab.adb (Check_A_Call): In the case where we're
1101 calling something in an instance of a generic package that is
1102 within this same unit (as the call), make sure we treat it
1103 as a call to an entity within the same unit. That is, call
1104 Check_Internal_Call, rather than putting "Elaborate_All(X)"
1105 on X, which would necessarily result in an elaboration cycle in
1106 static-elaboration mode.
1107
1108 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
1109
1110 * freeze.ads (Is_Atomic_VFA_Aggregate): Adjust profile.
1111 * freeze.adb (Is_Atomic_VFA_Aggregate): Change Entity
1112 parameter into Node parameter and remove Type parameter.
1113 Look at Is_Atomic_Or_VFA both on the type and on the object.
1114 (Freeze_Entity): Adjust call to Is_Atomic_VFA_Aggregate.
1115 * exp_aggr.adb (Expand_Record_Aggregate): Likewise.
1116 (Process_Atomic_Independent_Shared_Volatile): Remove code
1117 propagating Atomic or VFA from object to locally-defined type.
1118
1119 2015-05-26 Bob Duff <duff@adacore.com>
1120
1121 * exp_ch7.adb: Minor comment fix.
1122
1123 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
1124
1125 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Min/Attr_Max>: Do not
1126 bother about NaN's if Machine_Overflows is true.
1127
1128 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
1129
1130 * gcc-interface/trans.c (gnat_to_gnu) <N_Object_Declaration>: Really
1131 force evaluation of the expression, if any, when the object has its
1132 elaboration delayed. Do not create a variable at global level.
1133
1134 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
1135
1136 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Machine>: Do not apply
1137 extra-precision trick to literals. Build SAVE_EXPR manually.
1138
1139 * gcc-interface/misc.c (enumerate_modes): Add bypass for x86/x86-64.
1140
1141 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
1142
1143 * gcc-interface/ada-tree.h (DECL_GLOBAL_NONCONSTANT_RENAMING_P): Delete
1144 (DECL_RENAMED_OBJECT): Adjust comment.
1145 * gcc-interface/gigi.h (record_global_nonconstant_renaming): Delete.
1146 (invalidate_global_nonconstant_renamings): Likewise.
1147 (gnat_constant_reference_p): Likewise.
1148 (rewrite_fn): New function type.
1149 (gnat_rewrite_reference): Declare.
1150 (call_is_atomic_load): New inline predicate.
1151 * gcc-interface/decl.c (elaborate_reference_1): New function.
1152 (elaborate_reference): Likewise.
1153 (gnat_to_gnu_entity): Call elaborate_reference to elaborate renamings
1154 and simplify associated code. Set const_flag to true consistently in
1155 conjunction with used_by_ref.
1156 * gcc-interface/trans.c (Identifier_to_gnu): Always replace renaming
1157 pointers by renamed objects.
1158 (outer_atomic_access_required_p): Deal with renamings.
1159 (Compilation_Unit_to_gnu): Do not call
1160 invalidate_global_nonconstant_renamings.
1161 (gnat_to_gnu) <N_Object_Renaming_Declaration>: Adjust comment.
1162 (gnat_gimplify_expr): Deal with atomic loads.
1163 * gcc-interface/utils.c (global_nonconstant_renamings): Delete.
1164 (destroy_gnat_utils): Do not call
1165 invalidate_global_nonconstant_renamings.
1166 (record_global_nonconstant_renaming): Delete.
1167 (invalidate_global_nonconstant_renamings): Likewise.
1168 * gcc-interface/utils2.c (call_is_atomic_load): Move to gigi.h.
1169 (build_load_modify_store): Build a copy of the destination.
1170 (gnat_stabilize_reference_1): Adjust.
1171 (gnat_stabilize_reference): Call gnat_stabilize_reference_1 through
1172 gnat_rewrite_reference and move bulk of code to...
1173 (gnat_rewrite_reference): ...here. New global function.
1174 (gnat_constant_reference_p): Delete.
1175
1176 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
1177
1178 * gcc-interface/gigi.h (gnat_stabilize_reference): Adjust prototype.
1179 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not rely on const_flag
1180 to detect constant renamings. Be prepared for specific pattern of
1181 renamed object based on function calls. Create a constant object
1182 for the renaming of a NULL_EXPR or of a CONSTRUCTOR. Adjust calls
1183 to gnat_stabilize_reference and tidy up. Remove redundant tests.
1184 (elaborate_expression_1): Remove obsolete test and tidy up.
1185 * gcc-interface/trans.c (Call_to_gnu): Do not stabilize In/Out or Out
1186 parameters passed by reference.
1187 (gnat_to_gnu) <N_Selected_Component>: Remove redundant protection again
1188 side-effects.
1189 Use gnat_protect_expr instead of gnat_stabilize_reference for general
1190 protection against side-effects.
1191 * gcc-interface/utils2.c (gnat_stable_expr_p): New predicate.
1192 (gnat_save_expr): Invoke it.
1193 (gnat_protect_expr): Likewise.
1194 (gnat_stabilize_reference_1): Likewise. Remove useless propagation
1195 of TREE_THIS_NOTRAP.
1196 (gnat_stabilize_reference): Remove parameter and adjust throughout.
1197 Delete ADDR_EXDR, COMPOUND_EXPR and CONSTRUCTOR cases.
1198 Restrict CALL_EXPR case to atomic loads and tweak ERROR_MARK case.
1199
1200 2015-05-26 Ed Schonberg <schonberg@adacore.com>
1201
1202 * sinfo.ads: Minor reformatting.
1203 * sem_aux.ads: Clarify use of First_Discriminant.
1204 * sem_ch4.adb (Analyze_Explicit_Dereference): The use of a limited
1205 view is replaced with the non-limited view in an instance body,
1206 where the enclosing unit must have a regular with_clause on the
1207 relevant unit.
1208 * sem_ch12.adb (Install_Body): Freeze instantation after its
1209 body. Remove useless freeze nodes for incomplete actuals to
1210 prevent multiple generation of internal operations.
1211 (Instantiate_Package_Body): Set sloc of body appropriately when
1212 there are incomplete actuals and the instance body is placed in
1213 the body of the enclosing unit.
1214 * errout.ads: Consistent punctuation, better alignment and trivial
1215 typos in comments.
1216 * err_vars.ads: Fix typo.
1217
1218 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
1219
1220 * sem_ch8.adb (Analyze_Object_Renaming): Lift restriction on
1221 components of Volatile_Full_Access objects.
1222
1223 2015-05-26 Ed Schonberg <schonberg@adacore.com>
1224
1225 * sem_ch6.adb (Is_Non_Overriding_Operation,
1226 Get_Generic_Parent_Type): Handle properly the case of a derived
1227 scalar type by using the first subtype rather than its generated
1228 anonymous base type.
1229
1230 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
1231
1232 * einfo.adb (Write_Field17_Name): Move E_Incomplete_Subtype
1233 case to...
1234 (Write_Field19_Name): ...here.
1235
1236 2015-05-26 Ed Schonberg <schonberg@adacore.com>
1237
1238 * sem_ch13.adb: sem_ch13.adb (Add_Predicates): Undo analysis
1239 of original expression in ASIS mode: does not solve the ASIS
1240 problem of a usable type information, and crashes the back-end
1241 when performing type annotations.
1242
1243 2015-05-26 Robert Dewar <dewar@adacore.com>
1244
1245 * sem_disp.adb (Inherited_Subprograms): Add One_Only parameter.
1246 (Is_Overriding_Subprogram): Use One_Only_Parameter.
1247 * sem_disp.ads (Inherited_Subprograms): Add One_Only parameter.
1248
1249 2015-05-26 Robert Dewar <dewar@adacore.com>
1250
1251 * exp_prag.adb, sem_ch3.adb, sem_ch5.adb, exp_ch11.adb, ghost.adb,
1252 exp_ch6.adb, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb, sem_ch13.adb,
1253 exp_ch3.adb: Minor reformatting.
1254
1255 2015-05-26 Bob Duff <duff@adacore.com>
1256
1257 * treepr.adb: Minor improvement to debugging routines (pp, pn)
1258 robustness. Rearrange the code so passing a nonexistent Node_Id
1259 prints "No such node" rather than crashing, and causing gdb to
1260 generate confusing messages.
1261
1262 2015-05-26 Gary Dismukes <dismukes@adacore.com>
1263
1264 * sem_util.adb: Minor typo fix.
1265
1266 2015-05-26 Yannick Moy <moy@adacore.com>
1267
1268 * sem_aux.adb (Subprogram_Body_Entity): Deal with subprogram stubs.
1269
1270 2015-05-26 Hristian Kirtchev <kirtchev@adacore.com>
1271
1272 * exp_ch3.adb (Expand_N_Full_Type_Declaration): Capture, set and
1273 restore the Ghost mode.
1274 (Expand_N_Object_Declaration): Capture, set and restore the Ghost mode.
1275 (Freeze_Type): Update the call to Set_Ghost_Mode.
1276 (Restore_Globals): New routine.
1277 * exp_ch5.adb Add with and use clauses for Ghost.
1278 (Expand_N_Assignment_Statement): Capture, set and restore the
1279 Ghost mode.
1280 (Restore_Globals): New routine.
1281 * exp_ch6.adb Add with and use clauses for Ghost.
1282 (Expand_N_Procedure_Call_Statement): Capture, set and
1283 restore the Ghost mode.
1284 (Expand_N_Subprogram_Body):
1285 Code cleanup. Capture, set and restore the Ghost mode.
1286 (Expand_N_Subprogram_Declaration): Capture, set and restore the
1287 Ghost mode.
1288 (Restore_Globals): New routine.
1289 * exp_ch7.adb Add with and use clauses for Ghost.
1290 (Expand_N_Package_Body): Capture, set and restore the Ghost mode.
1291 (Expand_N_Package_Declaration): Capture, set and restore the
1292 Ghost mode.
1293 (Wrap_HSS_In_Block): Create a proper identifier for the block.
1294 * exp_ch8.adb Add with and use clauses for Ghost.
1295 (Expand_N_Exception_Renaming_Declaration): Code
1296 cleanup. Capture, set and restore the Ghost mode.
1297 (Expand_N_Object_Renaming_Declaration): Capture, set and restore
1298 the Ghost mode.
1299 (Expand_N_Package_Renaming_Declaration): Capture, set and restore the
1300 Ghost mode.
1301 (Expand_N_Subprogram_Renaming_Declaration): Capture, set and
1302 restore the Ghost mode.
1303 * exp_ch11.adb (Expand_N_Exception_Declaration): Code
1304 cleanup. Capture, set and restore the Ghost mode.
1305 * exp_disp.adb (Make_DT): Update the call to Set_Ghost_Mode. Do
1306 not initialize the dispatch table slot of a Ghost subprogram.
1307 * exp_prag.adb Add with and use clauses for Ghost.
1308 (Expand_Pragma_Check): Capture, set and restore the Ghost mode.
1309 (Expand_Pragma_Contract_Cases): Capture, set and restore the
1310 Ghost mode.
1311 (Expand_Pragma_Initial_Condition): Capture, set and
1312 restore the Ghost mode.
1313 (Expand_Pragma_Loop_Variant): Capture,
1314 set and restore the Ghost mode.
1315 (Restore_Globals): New routine.
1316 * exp_util.adb Add with and use clauses for Ghost.
1317 (Make_Predicate_Call): Code cleanup. Capture, set and restore
1318 the Ghost mode.
1319 (Restore_Globals): New routine.
1320 * freeze.adb (Freeze_Entity): Code cleanup. Update the call
1321 to Set_Ghost_Mode.
1322 * ghost.adb Add with and use clause for Sem_Prag.
1323 (Check_Ghost_Completion): Code cleanup.
1324 (Check_Ghost_Overriding): New routine.
1325 (Check_Ghost_Policy): Code cleanup.
1326 (Ghost_Entity): New routine.
1327 (Is_Ghost_Declaration): Removed.
1328 (Is_Ghost_Statement_Or_Pragma): Removed.
1329 (Is_OK_Context): Reimplemented.
1330 (Is_OK_Declaration): New routine.
1331 (Is_OK_Pragma): New routine.
1332 (Is_OK_Statement): New routine.
1333 (Mark_Full_View_As_Ghost): New routine.
1334 (Mark_Pragma_As_Ghost): New routine.
1335 (Mark_Renaming_As_Ghost): New routine.
1336 (Propagate_Ignored_Ghost_Code): Update the comment on usage.
1337 (Set_From_Entity): New routine.
1338 (Set_From_Policy): New routine.
1339 (Set_Ghost_Mode): This routine now handles pragmas and freeze nodes.
1340 (Set_Ghost_Mode_For_Freeze): Removed.
1341 (Set_Ghost_Mode_From_Entity): New routine.
1342 (Set_Ghost_Mode_From_Policy): Removed.
1343 * ghost.ads (Check_Ghost_Overriding): New routine.
1344 (Mark_Full_View_As_Ghost): New routine.
1345 (Mark_Pragma_As_Ghost): New routine.
1346 (Mark_Renaming_As_Ghost): New routine.
1347 (Set_Ghost_Mode): Update the parameter profile. Update the
1348 comment on usage.
1349 (Set_Ghost_Mode_For_Freeze): Removed.
1350 (Set_Ghost_Mode_From_Entity): New routine.
1351 * sem_ch3.adb (Analyze_Full_Type_Declaration):
1352 Capture and restore the Ghost mode. Mark a type
1353 as Ghost regardless of whether it comes from source.
1354 (Analyze_Incomplete_Type_Decl): Capture, set and restore the
1355 Ghost mode.
1356 (Analyze_Number_Declaration): Capture and restore the Ghost mode.
1357 (Analyze_Object_Declaration): Capture and restore the Ghost mode.
1358 (Analyze_Private_Extension_Declaration): Capture and
1359 restore the Ghost mode.
1360 (Analyze_Subtype_Declaration): Capture and restore the Ghost mode.
1361 (Process_Full_View): The full view inherits all Ghost-related
1362 attributes from the private view.
1363 (Restore_Globals): New routine.
1364 * sem_ch5.adb (Analyze_Assignment): Capture and restore the
1365 Ghost mode.
1366 (Restore_Globals): New routine.
1367 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration):
1368 Code cleanup. Capture and restore the Ghost mode. Mark a
1369 subprogram as Ghost regarless of whether it comes from source.
1370 (Analyze_Procedure_Call): Capture and restore the Ghost mode.
1371 (Analyze_Subprogram_Body_Helper): Capture and restore the Ghost mode.
1372 (Analyze_Subprogram_Declaration): Capture and restore the Ghost mode.
1373 (New_Overloaded_Entity): Ensure that a
1374 parent subprogram and an overriding subprogram have compatible
1375 Ghost policies.
1376 * sem_ch7.adb (Analyze_Package_Body_Helper): Capture and restore
1377 the Ghost mode.
1378 (Analyze_Package_Declaration): Capture and
1379 restore the Ghost mode. Mark a package as Ghost when it is
1380 declared in a Ghost region.
1381 (Analyze_Private_Type_Declaration): Capture and restore the Ghost mode.
1382 (Restore_Globals): New routine.
1383 * sem_ch8.adb (Analyze_Exception_Renaming): Code
1384 reformatting. Capture and restore the Ghost mode. A renaming
1385 becomes Ghost when its name references a Ghost entity.
1386 (Analyze_Generic_Renaming): Capture and restore the Ghost mode. A
1387 renaming becomes Ghost when its name references a Ghost entity.
1388 (Analyze_Object_Renaming): Capture and restore the Ghost mode. A
1389 renaming becomes Ghost when its name references a Ghost entity.
1390 (Analyze_Package_Renaming): Capture and restore the Ghost mode. A
1391 renaming becomes Ghost when its name references a Ghost entity.
1392 (Analyze_Subprogram_Renaming): Capture and restore the Ghost
1393 mode. A renaming becomes Ghost when its name references a
1394 Ghost entity.
1395 * sem_ch11.adb (Analyze_Exception_Declaration): Capture, set
1396 and restore the Ghost mode.
1397 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Capture and
1398 restore the Ghost mode.
1399 (Analyze_Generic_Subprogram_Declaration):
1400 Capture and restore the Ghost mode.
1401 * sem_ch13.adb Add with and use clauses for Ghost.
1402 (Add_Invariant): New routine.
1403 (Add_Invariants): Factor out code.
1404 (Add_Predicate): New routine.
1405 (Add_Predicates): Factor out code.
1406 (Build_Invariant_Procedure_Declaration): Code cleanup. Capture,
1407 set and restore the Ghost mode.
1408 (Build_Invariant_Procedure): Code cleanup.
1409 (Build_Predicate_Functions): Capture, set and
1410 restore the Ghost mode. Mark the generated functions as Ghost.
1411 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
1412 Capture, set and restore the Ghost mode.
1413 (Analyze_External_Property_In_Decl_Part): Capture, set and restore
1414 the Ghost mode.
1415 (Analyze_Initial_Condition_In_Decl_Part):
1416 Capture, set and restore the Ghost mode.
1417 (Analyze_Pragma):
1418 Code cleanup. Capture, set and restore the Ghost mode. Flag
1419 pragmas Linker_Section, No_Return, Unmodified, Unreferenced and
1420 Unreferenced_Objects as illegal when it applies to both Ghost
1421 and living arguments. Pragma Ghost cannot apply to synchronized
1422 objects.
1423 (Check_Kind): Moved to the spec of Sem_Prag.
1424 (Process_Inline): Flag the pragma as illegal when it applies to
1425 both Ghost and living arguments.
1426 (Restore_Globals): New routine.
1427 * sem_prag.ads Add pragma Default_Initial_Condition
1428 to table Assertion_Expression_Pragma. Add new table
1429 Is_Aspect_Specifying_Pragma.
1430 (Check_Kind): Moved from body of Sem_Prag.
1431 * sem_util.adb Add with and use clauses for Ghost.
1432 (Build_Default_Init_Cond_Procedure_Body): Capture, set and restore
1433 the Ghost mode.
1434 (Build_Default_Init_Cond_Procedure_Declaration):
1435 Capture, set and restore the Ghost mode. Mark the default
1436 initial condition procedure as Ghost when it is declared
1437 in a Ghost region.
1438 (Is_Renaming_Declaration): New routine.
1439 (Policy_In_List): Account for the single argument version of
1440 Check_Pragma.
1441 * sem_util.ads (Is_Renaming_Declaration): New routine.
1442 * sinfo.adb (Is_Ghost_Pragma): New routine.
1443 (Set_Is_Ghost_Pragma): New routine.
1444 * sinfo.ads New attribute Is_Ghost_Pragma.
1445 (Is_Ghost_Pragma): New routine along with pragma Inline.
1446 (Set_Is_Ghost_Pragma): New routine along with pragma Inline.
1447
1448 2015-05-26 Robert Dewar <dewar@adacore.com>
1449
1450 * sem_ch3.adb, sem_aux.adb, sem_aux.ads, exp_ch6.adb, sprint.adb:
1451 Minor reformatting.
1452
1453 2015-05-26 Gary Dismukes <dismukes@adacore.com>
1454
1455 * gnat1drv.adb, targparm.adb, targparm.ads, restrict.adb: Minor
1456 reformatting and typo fixes in comments.
1457
1458 2015-05-26 Ed Schonberg <schonberg@adacore.com>
1459
1460 * sem_ch7.adb (Swap_Private_Dependets): Set visibility of
1461 the two views of a private dependent in two separate steps,
1462 to ensure proper visibility in parent units analyzed for inlining.
1463
1464 2015-05-26 Yannick Moy <moy@adacore.com>
1465
1466 * sem_aux.adb, sem_aux.ads (Get_Low_Bound): Use Type_Low_Bound.
1467 (Package_Body, Package_Spec): New queries moved
1468 here from GNATprove.
1469 (Package_Specification): Simplify query to remove use of loop.
1470 * sem_util.adb, sem_util.ads (Enclosing_Declaration,
1471 Enclosing_Package_Or_Subprogram, Is_Attribute_Update): New
1472 queries moved here from GNATprove.
1473
1474 2015-05-26 Bob Duff <duff@adacore.com>
1475
1476 * einfo.adb, einfo.ads, sprint.adb, lib-xref.ads: Minor cleanup: Remove
1477 obsolete Entity_Kinds E_String_Type and E_String_Subtype. Update
1478 redundant assertions.
1479
1480 2015-05-26 Gary Dismukes <dismukes@adacore.com>
1481
1482 * sem_util.adb, sem_util.ads, sem_ch13.adb: Minor typo fixes.
1483
1484 2015-05-26 Doug Rupp <rupp@adacore.com>
1485
1486 * init.c [vxworks]: Refine previous checkin.
1487
1488 2015-05-26 Robert Dewar <dewar@adacore.com>
1489
1490 * exp_ch4.adb (Wrap_MA): New function.
1491 (Expand_N_Op_Expon): Use Wrap_MA.
1492
1493 2015-05-26 Bob Duff <duff@adacore.com>
1494
1495 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
1496 Do not use secondary stack to return limited records with
1497 defaulted discriminants. This is an efficiency improvement.
1498 * exp_ch6.adb, exp_dist.adb, sem_attr.adb, sem_aux.adb, sem_aux.ads,
1499 sem_ch12.adb, sem_ch3.adb, sem_ch4.adb, sem_ch6.adb, sem_ch7.adb,
1500 sem_util.adb: Change the sense of Is_Indefinite_Subtype to be
1501 Is_Definite_Subtype. This is an improvement to readability (the double
1502 negative in "not Is_Indefinite_Subtype" was slightly confusing). Also
1503 disallow passing non-[sub]type entities, an unnecessary and slightly
1504 bug-prone flexibility.
1505
1506 2015-05-26 Robert Dewar <dewar@adacore.com>
1507
1508 * sem_aggr.adb (Resolve_Array_Aggregate): Defend against
1509 bad bounds.
1510 * debug.adb: Document -gnatd.k.
1511 * erroutc.adb (Set_Msg_Insertion_Line_Number): Implement -gnatd.k.
1512
1513 2015-05-26 Robert Dewar <dewar@adacore.com>
1514
1515 * gnat1drv.adb (Gnat1drv): Provide new arguments for
1516 Get_Target_Parameters.
1517 * restrict.adb (Set_Restriction_No_Specification_Of_Aspect):
1518 new procedure.
1519 (Set_Restriction_No_Use_Of_Attribute): new procedure.
1520 * restrict.ads (Set_Restriction_No_Specification_Of_Aspect):
1521 new procedure.
1522 (Set_Restriction_No_Use_Of_Attribute): new procedure.
1523 * s-rident.ads (Integer_Parameter_Restrictions): New subtype.
1524 * targparm.adb (Get_Target_Parameters): Allow new restriction
1525 pragmas No_Specification_Of_Aspect No_Use_Of_Attribute
1526 No_Use_Of_Pragma.
1527 * targparm.ads: New parameters for Get_Target_Parameters.
1528 * tbuild.adb (Set_NOD): New name for Set_RND.
1529 (Set_NSA): New procedure.
1530 (Set_NUA): New procedure.
1531 (Set_NUP): New procedure.
1532 * tbuild.ads (Make_SC): Minor reformatting.
1533 (Set_NOD): New name for Set_RND.
1534 (Set_NSA, Set_NUA, Set_NUP): New procedure.
1535
1536 2015-05-26 Ed Schonberg <schonberg@adacore.com>
1537
1538 * a-stwise.adb (Find_Token): If source'first is not positive,
1539 an exception must be raised, as specified by RM 2005 A.4.3
1540 (68/1). This must be checked explicitly, given that run-time
1541 files are normally compiled without constraint checks.
1542 * a-stzsea.adb (Find_Token): Ditto.
1543
1544 2015-05-26 Ed Schonberg <schonberg@adacore.com>
1545
1546 * sem_util.ads sem_util.adb (Is_Current_Instance): New predicate
1547 to fully implement RM 8.6 (17/3). which earlier only applied
1548 to synchronized types. Used to preanalyze aspects that include
1549 current instances of types, such as Predicate and Invariant.
1550 * sem_res.adb (Resolve_Entity_Name): Use Is_Current_Instance.
1551 * sem_ch13.adb (Add_Predicates): In ASIS mode, preserve original
1552 expression of aspect and analyze it to provide proper type
1553 information.
1554
1555 2015-05-26 Robert Dewar <dewar@adacore.com>
1556
1557 * rtsfind.ads: Add entries for RE_Exn[_Long]_Float.
1558 * s-exnllf.adb (Exn_Float): New function.
1559 (Exn_Long_Float): New function.
1560 (Exn_Long_Long_Float): Rewritten interface.
1561 (Exp): New name for what used to be Exn_Long_Long_Float.
1562 * s-exnllf.ads (Exn_Float): New function.
1563 (Exn_Long_Float): New function.
1564
1565 2015-05-26 Ed Schonberg <schonberg@adacore.com>
1566
1567 * sem_ch8.adb (Find_Selected_Component): Do not emit an error
1568 on a selected component when the prefix is a type name that is
1569 a Current_Instance.
1570 * einfo.ads: Minor grammar fix.
1571
1572 2015-05-26 Doug Rupp <rupp@adacore.com>
1573
1574 * init.c [vxworks] (sysLib.h): Only for x86.
1575
1576 2015-05-26 Doug Rupp <rupp@adacore.com>
1577
1578 * init-vxsim.c (CPU): define as __VXSIM_CPU__
1579 * sigtramp-vxworks-vxsim.c (CPU): Likewise.
1580 sigtramp-vxworks-target.inc: Add check for SIMLINUX.
1581 * sigtramp.h: Likewise.
1582
1583 2015-05-26 Robert Dewar <dewar@adacore.com>
1584
1585 * sem_aux.adb, sem_disp.adb, sem_util.ads: Add comment.
1586 * sem_util.adb: Minor reformatting
1587
1588 2015-05-26 Yannick Moy <moy@adacore.com>
1589
1590 * inline.adb (Has_Initialized_Type): Adapt to new names.
1591 * sem_aux.adb, sem_aux.ads (Get_Low_Bound, Number_Components,
1592 Subprogram_Body, Subprogram_Body_Entity, Subprogram_Spec,
1593 Subprogram_Specification): New query functions used in GNATprove.
1594 * sem_disp.adb, sem_disp.ads (Is_Overriding_Subprogram): New
1595 query functions used in GNATprove.
1596 * sem_util.adb, sem_util.adso (Enclosing_Lib_Unit_Node,
1597 Get_Cursor_Type, Get_Return_Object, Get_User_Defined_Eq,
1598 Is_Double_Precision_Floating_Point_Type,
1599 Is_Single_Precision_Floating_Point_Type): New query functions
1600 used in GNATprove.
1601
1602 2015-05-26 Bob Duff <duff@adacore.com>
1603
1604 * s-rpc.ads (Partition_ID): Increase maximum Partition_ID to
1605 some huge number.
1606 * a-except-2005.adb, a-except-2005.ads, a-except.adb,
1607 a-except.ads, a-exexda.adb, a-exstat.adb: Minor comment fixes.
1608
1609 2015-05-26 Robert Dewar <dewar@adacore.com>
1610
1611 * sinfo.adb: Minor comment addition.
1612 * einfo.adb: Minor whitespace and punctuation fix.
1613 * sem_util.adb: Minor editing of comments.
1614
1615 2015-05-26 Ed Schonberg <schonberg@adacore.com>
1616
1617 * sem_ch7.adb (Install_Private_Declarations,
1618 Swap_Private_Dependents): Ensure that both views of the dependent
1619 subtype are immediately visible if we are within their scope. This
1620 may be needed when a procedure body is both the parent of an
1621 instantiated child unit, and is itself used to inline a local
1622 function.
1623
1624 2015-05-26 Gary Dismukes <dismukes@adacore.com>
1625
1626 * exp_prag.adb, gnat1drv.adb: Minor reformatting.
1627
1628 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
1629
1630 * exp_ch4.adb (Expand_N_Indexed_Component): In the circuit
1631 detecting exceptions to the rewriting, deal with implicit
1632 dereferences in the selected component case.
1633
1634 2015-05-26 Bob Duff <duff@adacore.com>
1635
1636 * sem_ch13.adb (Analyze_One_Aspect): Do not
1637 require the expression of the Disable_Controlled aspect to be
1638 static in a generic template, because 'Enabled is not known
1639 until the instance.
1640
1641 2015-05-26 Doug Rupp <rupp@adacore.com>
1642
1643 * init-vxsim.c: New file for vxsim ZCX
1644 * sigtramp-vxworks-vxsim.c: Likewise.
1645 * sigtramp-vxworks.c: Factor out target dependent bits into ...
1646 * sigtramp-vxworks-target.inc: ... here.
1647 * sigtramp.h: Add vxsim zcx protos.
1648 * init.c [vxworks...] (sysLib.h): Include.
1649 (__gnat_map_signal): Make global.
1650 [...i386] (__gnat_error_handler): Call __gnat_vxsim_error_handler if
1651 on vxsim.
1652 [...i386] (__gnat_install_handler): Test if on vxsim.
1653
1654 2015-05-26 Ed Schonberg <schonberg@adacore.com>
1655
1656 * sem_ch5.adb (Analyze_Iterator_Specification): For an element
1657 iterator over an array, if the component is aliased, the loop
1658 variable is aliased as well.
1659
1660 2015-05-26 Ed Schonberg <schonberg@adacore.com>
1661
1662 * exp_ch6.adb (Expand_Actuals): For a function call with in-out
1663 parameters that is rewritten as an expression_with_actions,
1664 we preserve the original function call node for further use by
1665 the caller (typically Expand_Call). In the presence of validity
1666 checks, that function call, though it is labelled Analyzed to
1667 prevent an infinite recursion, may be rewritten as a temporary
1668 by Remove_Side_Effects. Ensure that the caller has access to
1669 the original function call to continue expansion.
1670 * atree.ads: Minor typo in comment.
1671
1672 2015-05-26 Javier Miranda <miranda@adacore.com>
1673
1674 * sem_util.adb (Check_Function_Writable_Actuals):
1675 Add missing support to check the violation of writable actuals
1676 in array aggregates that have a nonstatic range.
1677
1678 2015-05-26 Hristian Kirtchev <kirtchev@adacore.com>
1679
1680 * exp_ch6.adb (Process_Contract_Cases_For): Update the call to
1681 Expand_Pragma_Contract_Cases.
1682 * exp_prag.ads, exp_prag.adb (Expand_Contract_Cases): Rename to
1683 Expand_Pragma_Contract_Cases.
1684 * sem_ch13.adb (Add_Invariants): Use the original aspect name
1685 when creating the arguments of pragma Check. This ensures that
1686 'Class is properly recognized and handled.
1687
1688 2015-05-26 Arnaud Charlet <charlet@adacore.com>
1689
1690 * gnat1drv.adb: Minor adjustments.
1691 (Adjust_Global_Switches): Disable some related flags in CodePeer mode.
1692 * sem_ch4.adb (Has_Arbitrary_Evaluation_Order,
1693 Stop_Subtree_Climbind): Code cleanup.
1694 * einfo.ads: Minor comment change.
1695
1696 2015-05-26 Javier Miranda <miranda@adacore.com>
1697
1698 * sem_aggr.adb (Resolve_Aggregate, Resolve_Extension_Aggregate):
1699 Code cleanup.
1700 * sem_ch3.adb (Build_Derived_Record_Type,
1701 Record_Type_Declaration): Code cleanup.
1702 * sem_ch4.adb (Has_Arbitrary_Evaluation_Order,
1703 Stop_Subtree_Climbind): Tables which speed up the identification
1704 of dangerous calls to Ada 2012 functions with writable actuals
1705 (AI05-0144).
1706 (Analyze_Arithmetic_Op, Analyze_Call, Analyze_Comparison_Op,
1707 Analyze_Equality_Op, Analyze_Logical_Op, Analyze_Membership_Op,
1708 Analyze_Range): Code cleanup.
1709 (Is_Arbitrary_Evaluation_Order_Construct): Removed.
1710 (Check_Writable_Actuals): Code cleanup using the added tables.
1711 * sem_util.adb (Check_Function_Writable_Actuals): Return
1712 immediately if the node does not have the flag Check_Actuals
1713 set to True.
1714
1715 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
1716
1717 * exp_ch6.adb (Add_Call_By_Copy_Code): Remove restrictive
1718 condition in the detection of the effects of Remove_Side_Effects.
1719 * exp_util.ads (Remove_Side_Effects): Add general and historical note.
1720 * exp_util.adb (Is_Name_Reference): New predicate.
1721 (Remove_Side_Effects): Use it in lieu of Is_Object_Reference
1722 in order to decide whether to use the renaming to capture the
1723 side effects of the subexpression.
1724 (Side_Effect_Free): Remove obsolete test.
1725
1726 2015-05-26 Robert Dewar <dewar@adacore.com>
1727
1728 * aspects.ads, aspects.adb: Add aspect Disable_Controlled.
1729 * einfo.ads, einfo.adb (Disable_Controlled): New flag.
1730 (Is_Controlled_Active): New function.
1731 * exp_ch3.adb (Expand_Freeze_Record_Type): Use
1732 Is_Controlled_Active.
1733 * exp_util.adb (Needs_Finalization): Finalization not needed
1734 if Disable_Controlled set.
1735 * freeze.adb (Freeze_Array_Type): Do not set
1736 Has_Controlled_Component if the component has Disable_Controlled.
1737 (Freeze_Record_Type): ditto.
1738 * sem_ch13.adb (Decorate): Minor reformatting.
1739 (Analyze_Aspect_Specifications): Implement Disable_Controlled.
1740 * sem_ch3.adb (Analyze_Object_Declaration): Handle
1741 Disable_Controlled.
1742 (Array_Type_Declaration): ditto.
1743 (Build_Derived_Private_Type): ditto.
1744 (Build_Derived_Type): ditto.
1745 (Record_Type_Definition): ditto.
1746 * snames.ads-tmpl: Add Name_Disable_Controlled.
1747
1748 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
1749
1750 * exp_ch6.adb (Expand_Actuals): Use a constant declaration instead
1751 of a renaming to capture the return value of a function call.
1752 (Expand_Simple_Function_Return): Call Remove_Side_Effects
1753 instead of removing side effects manually before the call to
1754 _Postconditions.
1755
1756 2015-05-26 Robert Dewar <dewar@adacore.com>
1757
1758 * exp_ch4.adb (Expand_N_Op_Expon): Deal with problem of wrong
1759 order in calling Duplicate_Subexpr.
1760 * einfo.ads: Fix documentation of Object/Value size for scalar types.
1761
1762 2015-05-26 Ed Schonberg <schonberg@adacore.com>
1763
1764 * exp_aggr.adb (Build_Array_Aggr_Code, Gen_Assign):
1765 If a component is default-initialized and its type has an
1766 invariant procedure, insert an invariant test after code for
1767 default-initialization of the component.
1768
1769 2015-05-26 Gary Dismukes <dismukes@adacore.com>
1770
1771 * einfo.ads, sem_util.adb, sem_ch4.adb: Minor reformatting.
1772
1773 2015-05-26 Robert Dewar <dewar@adacore.com>
1774
1775 * exp_unst.adb, exp_unst.ads: Change to using Subps table index for
1776 making AREC entity names unique.
1777
1778 2015-05-26 Ed Schonberg <schonberg@adacore.com>
1779
1780 * sem_cat.adb (Has_Stream_Attribute_Definition): If the type
1781 has aspect specifications, examine the corresponding list of
1782 representation items to determine whether there is a visible
1783 stream operation. The attribute definition clause generated from
1784 the aspect will be inserted at the freeze point of the type,
1785 which may be in the private part and not directly visible,
1786 but the aspect makes the operation available to a client.
1787
1788 2015-05-26 Robert Dewar <dewar@adacore.com>
1789
1790 * sem_util.adb: Minor code reorganization.
1791 * sem_ch6.adb: Minor reformatting.
1792
1793 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
1794
1795 * gcc-interface/utils.c (maybe_pad_type): Do not apply adjustment to
1796 original size for elementary types before issuing the size warning.
1797
1798 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
1799
1800 * get_targ.adb (C_Get_Float_Words_BE): Adjust import name.
1801 (C_Get_Words_BE): Likewise.
1802 (C_Get_Bytes_BE): Likewise.
1803 (C_Get_Bits_BE): Likewise.
1804 (Width_From_Size): Remove superfluous space.
1805 * gcc-interface/targtyps.c (get_float_words_be): Rename into...
1806 (get_target_float_words_be): ...this.
1807 (get_words_be): Rename into...
1808 (get_target_words_be): ...this.
1809 (get_bytes_be): Rename into...
1810 (get_target_bytes_be): ...this.
1811 (get_bits_be): Rename into...
1812 (get_target_bits_be): ...this.
1813 * gcc-interface/gigi.h (standard_datatypes): Remove ADT_ptr_void_type.
1814 (ptr_void_type_node): Delete.
1815 (get_target_float_size): Likewise.
1816 (get_target_double_size): Likewise.
1817 (get_target_long_double_size): Likewise.
1818 (get_float_words_be): Likewise.
1819 (get_words_be): Likewise.
1820 (get_bytes_be): Likewise.
1821 (get_bits_be): Likewise.
1822 (get_target_float_words_be): Declare.
1823 (get_target_words_be): Likewise.
1824 (get_target_bytes_be): Likewise.
1825 (get_target_bits_be): Likewise.
1826 * gcc-interface/decl.c (gnat_to_gnu_entity): Replace ptr_void_type_node
1827 with ptr_type_node.
1828 (intrin_return_compatible_p): Likewise.
1829 * gcc-interface/trans.c (gigi): Likewise.
1830 * gcc-interface/utils2.c (maybe_wrap_malloc): Likewise.
1831 (maybe_wrap_free): Likewise.
1832 * gcc-interface/utils.c (maybe_pad_type): Remove superfluous space.
1833 * gcc-interface/misc.c (gnat_init): Do not set ptr_void_type_node.
1834
1835 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
1836
1837 * gcc-interface/decl.c (elaborate_expression): Take a const string
1838 suffix instead of a tree.
1839 (elaborate_expression_1): Likewise.
1840 (elaborate_expression_2): Likewise.
1841 (gnat_to_gnu_entity): Adjust to above changes.
1842 (build_subst_list): Likewise.
1843 (get_entity_char): New static function.
1844
1845 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
1846
1847 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: Move around.
1848 <E_Exception>: Merge with E_Variable case.
1849 <E_Variable>: Remove 'object' label.
1850
1851 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
1852
1853 * gcc-interface/decl.c (gnat_to_gnu_entity): Minor tweak.
1854 * gcc-interface/trans.c (finalize_nrv_unc_r): Use CONSTRUCTOR_ELT.
1855 * gcc-interface/utils.c (convert): Likewise and simplify.
1856 (remove_conversions): Likewise.
1857 * gcc-interface/utils2.c (compare_fat_pointers): Likewise.
1858 (build_unary_op): Likewise and simplify.
1859
1860 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
1861
1862 * gcc-interface/gigi.h (build_atomic_load): Adjust prototype.
1863 (build_atomic_store): Likewise.
1864 (build_load_modify_store): Declare.
1865 (VECTOR_TYPE_P): Delete.
1866 * gcc-interface/decl.c (gnat_to_gnu_entity): Replace Is_Atomic with
1867 Is_Atomic_Or_VFA throughout.
1868 <E_Array_Type>: Build a variant of the XUA type instead of forcing
1869 TYPE_VOLATILE on it.
1870 <E_Array_Subtype>: Use the main variant of the base type.
1871 Do not force TYPE_VOLATILE on the type being built.
1872 <E_Record_Type>: Likewise.
1873 <E_Array_Subtype>: Likewise.
1874 <E_Subprogram_Type>: Rename local variable.
1875 Add Atomic qualifier in conjunction with Volatile on types if needed.
1876 Force BLKmode for by-ref types only at the end of the processing.
1877 Change qualifiers only after changing the mode of the type. Set
1878 TYPE_UNIVERSAL_ALIASING_P on the type directly.
1879 (check_ok_for_atomic_type): Issue specific error message for VFA.
1880 (gnat_to_gnu_component_type): Replace Is_Atomic with
1881 Is_Atomic_Or_VFA throughout.
1882 * gcc-interface/misc.c (gnat_get_alias_set): Test
1883 TYPE_UNIVERSAL_ALIASING_P on the type directly.
1884 * gcc-interface/trans.c (lvalue_required_p): Replace Is_Atomic with
1885 Is_Atomic_Or_VFA throughout. Add missing guard.
1886 (node_is_atomic): New predicate.
1887 (node_has_volatile_full_access): Likewise.
1888 (gnat_strip_type_conversion): New function.
1889 (outer_atomic_access_required_p): New predicate.
1890 (atomic_sync_required_p): Rename into...
1891 (atomic_access_required_p): ...this. Add SYNC parameter, scan the
1892 parent node first and then look for the atomic setting. Add support
1893 for Volatile_Full_Access.
1894 (Call_to_gnu): Add atomic_access and outer_atomic_access parameters
1895 and adjusts calls to above functions. Use load-modify-store sequence
1896 for updates of In/Out and Out parameters if required, as well as for
1897 moving the result to the target if required. Add couple of missing
1898 guards.
1899 (gnat_to_gnu): Adjust calls to above functions.
1900 <N_Object_Renaming_Declaration>: If the renamed object has side-effects
1901 evaluate only its address.
1902 <N_Assignment_Statement>: Adjust call to Call_to_gnu. Use load-modify
1903 store sequence if required.
1904 <N_Function_Call>: Adjust call to Call_to_gnu.
1905 (extract_values): Adjust comment.
1906 * gcc-interface/utils2.c (build_atomic_load): Add SYNC parameter and
1907 use relaxed memory model if it is not set.
1908 (build_atomic_store): Likewise.
1909 (call_is_atomic_load): New predicate.
1910 (build_load_modify_store): New function.
1911 (build_binary_op) <MODIFY_EXPR>: Accept SAVE_EXPR on the LHS.
1912 (gnat_stabilize_reference) <CALL_EXPR>: Deal with atomic loads.
1913
1914 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
1915
1916 * gcc-interface/ada-tree.h (DECL_RENAMING_GLOBAL_P): Rename into...
1917 (DECL_GLOBAL_NONCONSTANT_RENAMING_P): ...this.
1918 * gcc-interface/gigi.h (record_global_renaming_pointer): Delete.
1919 (invalidate_global_renaming_pointers): Likewise.
1920 (record_global_nonconstant_renaming): New.
1921 (invalidate_global_nonconstant_renamings): Likewise.
1922 (get_inner_constant_reference): Likewise.
1923 (gnat_constant_reference_p): Likewise.
1924 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Adjust to above
1925 and register the renaming pointer only if the object is non-constant.
1926 (elaborate_expression_1): Call get_inner_constant_reference instead
1927 of get_inner_reference.
1928 * gcc-interface/trans.c (fold_constant_decl_in_expr): Minor tweak.
1929 (Identifier_to_gnu): Adjust to above and do not recheck the renamed
1930 object before substituting it.
1931 (Compilation_Unit_to_gnu): Adjust to above renaming. Minor tweaks.
1932 (gnat_to_gnu) <N_Object_Renaming_Declaration>: Do not return the
1933 result at the global level.
1934 (N_Exception_Renaming_Declaration): Likewise.
1935 * gcc-interface/utils.c (global_renaming_pointers): Rename into...
1936 (global_nonconstant_renamings): ...this.
1937 (destroy_gnat_utils): Adjust to above renaming.
1938 (record_global_renaming_pointer): Rename into...
1939 (record_global_nonconstant_renaming): ...this.
1940 (invalidate_global_renaming_pointers): Rename into...
1941 (invalidate_global_nonconstant_renamings): ...this and do not recheck
1942 the renamed object before invalidating.
1943 * gcc-interface/utils2.c (gnat_stabilize_reference): Minor tweak.
1944 (get_inner_constant_reference): New public function.
1945 (gnat_constant_reference_p): New predicate.
1946
1947 2015-05-25 Javier Miranda <miranda@adacore.com>
1948
1949 * einfo.ads, einfo.adb (Has_Out_Or_In_Out_Parameter): This attribute
1950 is now present in subprograms, generic subprograms, entries and
1951 entry families.
1952 * sem_ch6.adb (Set_Formal_Mode): Set As_Out_Or_In_Out_Parameter
1953 on entries, entry families, subprograms and generic subprograms.
1954 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration):
1955 Minor code reorganization to ensure that the Ekind attribute
1956 of the subprogram entity is set before its formals are
1957 processed. Required to allow the use of the attribute
1958 Has_Out_Or_In_Out_Parameter on the subprogram entity.
1959 * sem_aggr.adb (Resolve_Aggregate, Resolve_Extension_Aggregate):
1960 Perform the check on writable actuals only if the value of some
1961 component of the aggregate involves calling a function with
1962 out-mode parameters.
1963 (Resolve_Record_Aggregate): Propagate the Check_Actuals flag to the
1964 internally built aggregate.
1965 * sem_ch3.adb (Build_Derived_Record_Type, Record_Type_Declaration):
1966 Perform the check on writable actuals only if the initialization of
1967 some component involves calling a function with out-mode parameters.
1968 * sem_ch4.adb (Analyze_Arithmetic_Op, Analyze_Comparison_Op,
1969 Analyze_Equality_Op, Analyze_Logical_Op, Analyze_Membership_Op,
1970 Analyze_Range): Check writable actuals only if the
1971 subtrees have a call to a function with out-mode parameters
1972 (Analyze_Call.Check_Writable_Actuals): New subprogram. If the call
1973 has out or in-out parameters then mark its outermost enclosing
1974 construct as a node on which the writable actuals check must
1975 be performed.
1976 (Analyze_Call): Check if the flag must be set and if the outermost
1977 enclosing construct.
1978 * sem_util.adb (Check_Function_Writable_Actuals): Code cleanup
1979 and reorganization. We skip processing aggregate discriminants
1980 since their precise analysis involves two phases traversal.
1981 * sem_res.adb (Resolve_Actuals, Resolve_Arithmetic_Op,
1982 Resolve_Logical_Op, Resolve_Membership_Op): Remove call to
1983 check_writable_actuals.
1984
1985 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1986
1987 * sem_ch3.adb (Constrain_Concurrent): If the context is a
1988 type declaration, generate an Itype_Reference for the anonymous
1989 subtype, to force elaboration at this point in gigi.
1990
1991 2015-05-22 Gary Dismukes <dismukes@adacore.com>
1992
1993 * layout.adb, einfo.ads, sem_ch12.adb, freeze.adb, sem_util.ads,
1994 exp_ch4.adb, sem_ch6.adb: Minor reformatting and typo fixes.
1995
1996 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1997
1998 * sem_res.adb (Resolve_Actuals): If the call is to an overridden
1999 operation, replace the names of the actuals in named associations
2000 with the names of the actuals of the subprogram that is eventually
2001 executed. The names of the formals and the defaults can differ
2002 between the two operations when they are operations of a formal
2003 derived type.
2004
2005 2015-05-22 Bob Duff <duff@adacore.com>
2006
2007 * a-convec.ads, a-convec.adb (Append): Check for fast path. Split
2008 out slow path into separate procedure. Inline Append. Fast path
2009 now avoids calling Insert.
2010 (Finalize): Do the busy checking last, so the container gets emptied.
2011 (Insert, Insert_Space): Remove redundancy.
2012
2013 2015-05-22 Robert Dewar <dewar@adacore.com>
2014
2015 * switch-c.adb (Scan_Front_End_Switches): Insist on -gnatc
2016 for -gnatd.V.
2017
2018 2015-05-22 Arnaud Charlet <charlet@adacore.com>
2019
2020 * gnatvsn.ads: Minor code reorg to remember more easily to update
2021 variables.
2022
2023 2015-05-22 Ed Schonberg <schonberg@adacore.com>
2024
2025 * sem_ch10.adb (Analyze_With_Clause): In ASIS_Mode, a
2026 limited_with clause on a predefined unit is not transformed into
2027 a regular with_clause, to preserve the original tree structure.
2028 * sinfo.ads (N_With_Clause): Add comment on handling of
2029 Limited_With.
2030 * sem_ch10.adb: Minor reformatting.
2031
2032 2015-05-22 Ed Schonberg <schonberg@adacore.com>
2033
2034 * sem_ch8.adb (Freeze_Profile): A limited view of a type in
2035 the profile of a subprogram renaming does not require freezing,
2036 because it is declared in a different unit.
2037
2038 2015-05-22 Ed Schonberg <schonberg@adacore.com>
2039
2040 * exp_aggr.adb (Get_Constraint_Association): If type (of ancestor
2041 composite type) is private, go to full view. This was previously
2042 done only in an instance context, but is happen whenever a chain
2043 of private extensions includes one inherited discriminant.
2044
2045 2015-05-22 Robert Dewar <dewar@adacore.com>
2046
2047 * einfo.ads: Minor comment updates.
2048 * exp_unst.adb: Move Subps table to spec Don't remove old entries
2049 from table Add Last field to record last entry used.
2050 * exp_unst.ads: Move Subps table here from body So that Cprint
2051 can access saved values.
2052
2053 2015-05-22 Bob Duff <duff@adacore.com>
2054
2055 * a-cdlili.adb, a-cdlili.ads, a-cohama.adb, a-cohama.ads,
2056 * a-cohase.adb, a-cohase.ads, a-convec.adb, a-convec.ads,
2057 * a-coorma.adb, a-coorma.ads, a-coorse.adb, a-coorse.ads:
2058 (Pseudo_Reference, Element_Access, Get_Element_Access): New
2059 declarations added for use by performance improvements in exp_ch5.adb.
2060 * snames.ads-tmpl: New names referenced by exp_ch5.adb.
2061 * exp_ch5.adb: Speed up "for ... of" loops for predefined containers.
2062 Instead of doing literally what the RM calls for, we do something
2063 equivalent that avoids expensive operations inside the loop. If the
2064 container package has appropriate Next, Pseudo_Reference,
2065 Element_Access, Get_Element_Access declarations, we invoke the
2066 optimization.
2067 * snames.ads-tmpl: Note speed improvement.
2068
2069 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
2070
2071 * einfo.ads (Is_Atomic_Or_VFA): Move to XEINFO INLINES section.
2072 * xeinfo.adb: Replace a-einfo.h with einfo.h throughout.
2073 Add pattern to translate "or else" into "||".
2074
2075 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
2076
2077 * einfo.ads (Has_Volatile_Full_Access): Rename into...
2078 (Is_Volatile_Full_Access): ...this.
2079 (Set_Has_Volatile_Full_Access): Rename into...
2080 (Set_Is_Volatile_Full_Access): ...this.
2081 * einfo.adb (Has_Volatile_Full_Access): Rename into...
2082 (Is_Volatile_Full_Access): ...this.
2083 (Set_Has_Volatile_Full_Access): Rename into...
2084 (Set_Is_Volatile_Full_Access): ...this.
2085 (Is_Atomic_Or_VFA): Adjust to above renaming.
2086 * errout.adb (Special_Msg_Delete): Likewise.
2087 * exp_pakd.adb (Install_PAT): Likewise.
2088 * freeze.adb (Freeze_Array_Type): Likewise.
2089 * sem_ch8.adb (Analyze_Object_Renaming): Likewise.
2090 * sem_ch13.adb (Inherit_Delayed_Rep_Aspects): Likewise.
2091 (Inherit_Aspects_At_Freeze_Point): Likewise.
2092 * sem_prag.adb (Set_Atomic_VFA): Likewise.
2093 (Process_Atomic_Independent_Shared_Volatile): Likewise.
2094 * sem_util.adb (Is_Atomic_Or_VFA_Object): Likewise.
2095
2096 2015-05-22 Robert Dewar <dewar@adacore.com>
2097
2098 * exp_ch5.adb, layout.adb, einfo.adb, einfo.ads, sem_prag.adb,
2099 freeze.adb, freeze.ads, sem_util.adb, sem_util.ads, exp_ch2.adb,
2100 exp_ch4.adb, errout.adb, exp_aggr.adb, sem_ch13.adb: This is a general
2101 change that deals with the fact that most of the special coding for
2102 Atomic should also apply to the case of Volatile_Full_Access.
2103 A new attribute Is_Atomic_Or_VFA is introduced, and many of the
2104 references to Is_Atomic now use this new attribute.
2105
2106 2015-05-22 Robert Dewar <dewar@adacore.com>
2107
2108 * exp_ch4.adb (Expand_N_Op_Eq): Introduce 'Machine for 'Result
2109 comparison.
2110
2111 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
2112
2113 * sprint.adb (Source_Dump): When generating debug files, deal
2114 with the case of a stand-alone package instantiation by dumping
2115 together the spec and the body in the common debug file.
2116
2117 2015-05-22 Robert Dewar <dewar@adacore.com>
2118
2119 * sem_ch13.adb (Minimum_Size): Size is zero for null range
2120 discrete subtype.
2121
2122 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
2123
2124 * einfo.adb (Anonymous_Master): This attribute now applies
2125 to package and subprogram bodies.
2126 (Set_Anonymous_Master): This attribute now applies to package and
2127 subprogram bodies.
2128 (Write_Field36_Name): Add output for package and subprogram bodies.
2129 * einfo.ads Update the documentation on attribute Anonymous_Master
2130 along with occurrences in entities.
2131 * exp_ch4.adb (Create_Anonymous_Master): Reimplemented to
2132 handle spec and body anonymous masters of the same unit.
2133 (Current_Anonymous_Master): Reimplemented. Handle a
2134 package instantiation that acts as a compilation unit.
2135 (Insert_And_Analyze): Reimplemented.
2136
2137 2015-05-22 Ed Schonberg <schonberg@adacore.com>
2138
2139 * sem_ch10.adb (Analyze_With_Clause): A limited_with_clause on a
2140 predefined unit is treated as a regular with_clause.
2141
2142 2015-05-22 Robert Dewar <dewar@adacore.com>
2143
2144 * sem_ch12.adb, prj.ads, makeutl.ads, sem_ch6.adb, prj-nmsc.adb,
2145 prj-conf.adb, sem_disp.adb: Minor reformatting.
2146
2147 2015-05-22 Vincent Celier <celier@adacore.com>
2148
2149 * clean.adb (Parse_Cmd_Line): For native gnatclean, check
2150 for switch -P and, if found and gprclean is available, invoke
2151 silently gprclean.
2152 * make.adb (Initialize): For native gnatmake, check for switch -P
2153 and, if found and gprbuild is available, invoke silently gprbuild.
2154
2155 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
2156
2157 * sem_ch13.adb (Validate_Unchecked_Conversions): Also issue
2158 specific warning for discrete types when the source is larger
2159 than the target.
2160
2161 2015-05-22 Ed Schonberg <schonberg@adacore.com>
2162
2163 * einfo.ads, einfo.adb (Incomplete_Actuals): New attribute of
2164 package instantiations. Holds the list of actuals in the instance
2165 that are incomplete types, to determine where the corresponding
2166 instance body must be placed.
2167 * sem_ch6.adb (Conforming_Types): An incomplete type used as an
2168 actual in an instance matches an incomplete formal.
2169 * sem_disp.adb (Check_Dispatching_Call): Handle missing case of
2170 explicit dereference.
2171 (Inherited_Subprograms): In the presence of a limited view there
2172 are no subprograms to inherit.
2173 * sem_ch12.adb (Preanalyze_Actuals): Build list of incomplete
2174 actuals of instance, for later placement of instance body and
2175 freeze nodes for actuals.
2176 (Install_Body): In the presence of actuals that incomplete types
2177 from a limited view, the instance body cannot be placed after
2178 the declaration because full views have not been seen yet. Any
2179 use of the non-limited views in the instance body requires
2180 the presence of a regular with_clause in the enclosing unit,
2181 and will fail if this with_clause is missing. We place the
2182 instance body at the beginning of the enclosing body, which is
2183 the unit being compiled, and ensure that freeze nodes for the
2184 full views of the incomplete types appear before the instance.
2185
2186 2015-05-22 Pascal Obry <obry@adacore.com>
2187
2188 * makeutl.ads, prj-conf.adb, prj-nmsc.adb, prj.ads
2189 (In_Place_Option): Removed.
2190 (Relocate_Build_Tree_Option): New constant.
2191 (Root_Dir_Option): New constant.
2192 (Obj_Root_Dir): Removed.
2193 (Build_Tree_Dir): New variable.
2194 (Root_Src_Tree): Removed.
2195 (Root_Dir): New variable.
2196 * prj-conf.adb (Get_Or_Create_Configuration_File): Add check
2197 for improper relocation.
2198 * prj-nmsc.adb (Locate_Directory): Add check for improper
2199 relocation.
2200
2201 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
2202
2203 * einfo.adb (Default_Init_Cond_Procedure): Code cleanup. The
2204 attribute now applies to the base type.
2205 (Has_Default_Init_Cond): Now applies to the base type.
2206 (Has_Inherited_Default_Init_Cond): Now applies to the base type.
2207 (Set_Default_Init_Cond_Procedure): Code cleanup. The attribute now
2208 applies to the base type.
2209 (Set_Has_Default_Init_Cond): Now applies to the base type.
2210 (Set_Has_Inherited_Default_Init_Cond): Now applies to the base type.
2211 * exp_ch3.adb (Expand_N_Object_Declaration): No need to use the
2212 base type when adding a call to the Default_Initial_Condition.
2213
2214 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
2215
2216 * einfo.adb: Node36 is now used as Anonymous_Master. Flag253
2217 is now unused.
2218 (Anonymous_Master): New routine.
2219 (Has_Anonymous_Master): Removed.
2220 (Set_Anonymous_Master): New routine.
2221 (Set_Has_Anonymous_Master): Removed.
2222 (Write_Entity_Flags): Remove the output for Has_Anonymous_Maser.
2223 (Write_Field36_Name): Add output for Anonymous_Master.
2224 * einfo.ads Add new attribute Anonymous_Master along with
2225 occurrences in nodes. Remove attribute Has_Anonymous_Master along
2226 with occurrences in nodes.
2227 (Anonymous_Master): New routine along with pragma Inline.
2228 (Has_Anonymous_Master): Removed along with pragma Inline.
2229 (Set_Anonymous_Master): New routine along with pragma Inline.
2230 (Set_Has_Anonymous_Master): Removed along with pragma Inline.
2231 * exp_ch4.adb (Create_Anonymous_Master): New routine.
2232 (Current_Anonymous_Master): Reimplemented.
2233
2234 2015-05-22 Bob Duff <duff@adacore.com>
2235
2236 * freeze.adb (Freeze_Profile): Suppress warning if imported
2237 subprogram is not at library level.
2238
2239 2015-05-22 Robert Dewar <dewar@adacore.com>
2240
2241 * sem_ch8.adb (Analyze_Object_Renaming): Check for renaming
2242 component of an object to which Volatile_Full_Access applies.
2243
2244 2015-05-22 Jerome Guitton <guitton@adacore.com>
2245
2246 * exp_dbug.ads: Add note about non bit-packed arrays.
2247
2248 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
2249
2250 * sem_prag.adb: Fix typo.
2251 * einfo.ads: Grammar fixes in comments.
2252
2253 2015-05-22 Bob Duff <duff@adacore.com>
2254
2255 * a-cborma.ads, a-cidlli.ads, a-cimutr.ads, a-ciormu.ads,
2256 * a-cihase.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
2257 * a-cborse.ads, a-comutr.ads, a-ciorma.ads, a-cobove.ads,
2258 * a-coormu.ads, a-convec.ads, a-cohase.ads, a-coinho.ads,
2259 * a-cbdlli.ads, a-cbmutr.ads, a-cbhase.ads, a-cdlili.ads,
2260 * a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
2261 * a-coinho-shared.ads (Constant_Reference_Type, Reference_Type):
2262 Add an initialization expression "raise Program_Error". See,
2263 for example, RM-A.18.2(148.4).
2264
2265 2015-05-22 Robert Dewar <dewar@adacore.com>
2266
2267 * debug.adb: Update documentation.
2268 * einfo.ads, einfo.adb (Needs_Typedef): New flag
2269 * exp_unst.adb (Unnest_Subprogram): Mark AREC types as needing
2270 typedef's in C.
2271 * frontend.adb: Update comments.
2272 * gnat1drv.adb (Adjust_Global_Switches): Set all needed flags
2273 for -gnatd.V
2274 * opt.ads (Generate_C_Code): New switch.
2275 * osint-c.adb (Write_C_File_Info): Removed, not used
2276 (Write_H_File_Info): Removed, not used
2277 * osint-c.ads (Write_C_File_Info): Removed, not used
2278 (Write_H_File_Info): Removed, not used
2279 * osint.ads (Write_Info): Minor comment updates.
2280 (Output_FD): Moved from private part to public part of spec.
2281 * sem.adb (Semantics): Force expansion on if in Generate_C_Code
2282 mode.
2283 * atree.ads: minor typo in comment.
2284 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
2285 Do not allow VFA on composite object with aliased component.
2286
2287 2015-05-22 Arnaud Charlet <charlet@adacore.com>
2288
2289 * osint-c.adb, osint-c.ads (Set_File_Name): Move back to spec.
2290
2291 2015-05-22 Pascal Obry <obry@adacore.com>
2292
2293 * prj-util.adb: Minor comment editing.
2294
2295 2015-05-22 Pascal Obry <obry@adacore.com>
2296
2297 * makeutl.ads (In_Place_Option): New constant.
2298 * prj.ads (Obj_Root_Dir): New variable (absolute path to relocate
2299 objects).
2300 (Root_Src_Tree): New variable (absolute path of root source tree).
2301 * prj-conf.adb (Do_Autoconf): Take into account the object root
2302 directory (if defined) to generate configuration project.
2303 * prj-nmsc.adb (Get_Directories): Handle case where Obj_Root_Dir
2304 is defined.
2305 (Locate_Directory): Likewise.
2306
2307 2015-05-22 Pascal Obry <obry@adacore.com>
2308
2309 * prj-util.ads, prj-util.adb (Relative_Path): New routine.
2310
2311 2015-05-22 Bob Duff <duff@adacore.com>
2312
2313 * exp_utils.ads, exp_utils.adb (Find_Optional_Prim_Op): New
2314 interface to return Empty when not found, so we can avoid handling
2315 Program_Error in that case.
2316 (Find_Prim_Op): Fix latent bug: raise Program_Error when there are no
2317 primitives.
2318 * exp_ch7.adb, sem_util.adb: Use Find_Optional_Prim_Op when the
2319 code is expecting Empty.
2320 * sem_ch8.adb: Use Find_Optional_Prim_Op to avoid handling
2321 Program_Error.
2322
2323 2015-05-22 Robert Dewar <dewar@adacore.com>
2324
2325 * sem_ch3.adb, sem_intr.adb, exp_ch4.adb, s-rannum.adb,
2326 sem_eval.adb, s-fatgen.adb, s-expmod.ads: Remove incorrect hyphen in
2327 non-binary.
2328 * exp_util.adb: Add comment.
2329 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move from spec to
2330 body.
2331 (Set_File_Name): New name for the above.
2332 (Create_C_File, Create_H_File, Write_C_File_Info, Write_H_File_Info,
2333 Close_C_File, Close_H_File): New procedure.
2334 * osint.adb: Minor reformatting.
2335 * osint.ads: Minor comment updates.
2336
2337 2015-05-22 Robert Dewar <dewar@adacore.com>
2338
2339 * exp_ch4.adb: Minor rewording.
2340 * exp_util.ads: Clarify that Find_Prim_Op is only for
2341 tagged types.
2342
2343 2015-05-22 Robert Dewar <dewar@adacore.com>
2344
2345 * atree.adb, atree.ads, treepr.adb: Change name Needs_Actuals_Check to
2346 Check_Actuals.
2347 * exp_ch4.adb (Expand_N_Op_Expon): Optimize 2**x in modular
2348 and overflow cases.
2349
2350 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
2351
2352 * exp_pakd.adb (Install_PAT): Propagate representation aspects
2353 from the original array type to the PAT.
2354
2355 2015-05-22 Robert Dewar <dewar@adacore.com>
2356
2357 * treepr.adb (Print_Node_Header): Add output of Needs_Actuals_Check.
2358
2359 2015-05-22 Robert Dewar <dewar@adacore.com>
2360
2361 * atree.adb, atree.ads (Needs_Actuals_Check): New flag.
2362
2363 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
2364
2365 * sem_prag.adb (Analyze_Pragma): Remove the detection
2366 of a useless Part_Of indicator when the related item is a constant.
2367 (Check_Matching_Constituent): Do not emit an error on a constant.
2368 (Check_Missing_Part_Of): Do not check for a missing Part_Of indicator
2369 when the related item is a constant.
2370 (Collect_Body_States): Code cleanup.
2371 (Collect_Visible_States): Code cleanup.
2372 (Report_Unused_States): Do not emit an error on a constant.
2373 * sem_util.ads, sem_util.adb (Has_Variable_Input): Removed.
2374
2375 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
2376
2377 * sem_ch8.adb (Analyze_Object_Renaming): Copy
2378 Has_Volatile_Full_Access from renamed to renaming entities.
2379 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
2380 Tidy up and remove redundant setting of Has_Volatile_Full_Access.
2381
2382 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
2383
2384 * ghost.adb (Check_Ghost_Completion): Update references to SPARK
2385 RM 6.9 rules.
2386 (Check_Ghost_Policy): Update references to SPARK RM 6.9 rules.
2387 * sem_ch3.adb (Analyze_Object_Declaration): Update references
2388 to SPARK RM 6.9 rules.
2389 (Check_Completion): Ghost entities do not require a special form of
2390 completion.
2391 * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Update references
2392 to SPARK RM 6.9 rules.
2393 (Analyze_Subprogram_Body_Helper): Update references to SPARK RM 6.9
2394 rules.
2395 * sem_ch7.adb (Analyze_Package_Body_Helper): Update references
2396 to SPARK RM 6.9 rules.
2397 (Requires_Completion_In_Body): Ghost entities do not require a special
2398 form of completion.
2399
2400 2015-05-22 Robert Dewar <dewar@adacore.com>
2401
2402 * a-csquin.ads: Use Ada 2012 notation.
2403 * sem_ch8.adb: Minor reformatting.
2404
2405 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
2406
2407 * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect Import
2408 acts as a completion.
2409
2410 2015-05-22 Ed Schonberg <schonberg@adacore.com>
2411
2412 * sem_ch13.adb: Minor reformatting.
2413
2414 2015-05-22 Jose Ruiz <ruiz@adacore.com>
2415
2416 * a-reatim.adb: Minor change, fix typo.
2417
2418 2015-05-22 Robert Dewar <dewar@adacore.com>
2419
2420 * sem_util.ads: Minor addition of ??? comment.
2421 * sem_prag.adb, sem_util.adb: Minor reformatting.
2422 * sem_ch13.adb: minor reformatting.
2423
2424 2015-05-22 Robert Dewar <dewar@adacore.com>
2425
2426 * a-reatim.ads: Add Compile_Time_Error to ensure Duration
2427 is 64-bits.
2428 * sem_ch13.adb: Improve error message.
2429 * exp_ch4.adb: Minor reformatting.
2430
2431 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
2432
2433 * sem_prag.adb (Analyze_Pragma): Constants without variable
2434 input do not require indicator Part_Of.
2435 (Check_Missing_Part_Of): Constants without variable input do not
2436 requrie indicator Part_Of.
2437 (Collect_Visible_States): Constants without variable input are
2438 not part of the hidden state of a package.
2439 * sem_util.ads, sem_util.adb (Has_Variable_Input): New routine.
2440
2441 2015-05-22 Robert Dewar <dewar@adacore.com>
2442
2443 * exp_util.adb (Activate_Atomic_Synchronization): Do not set
2444 Atomic_Sync_Required for an object renaming declaration.
2445 * sem_ch8.adb (Analyze_Object_Renaming): Copy Is_Atomic and
2446 Is_Independent to renaming object.
2447
2448 2015-05-22 Ed Schonberg <schonberg@adacore.com>
2449
2450 * sem_ch5.adb (Analyze_Iterator_Specification): Diagnose
2451 various illegalities in iterators over arrays and containers:
2452 a) New function Get_Cursor_Type, to verify that the cursor is
2453 not a limited type at the point of iteration.
2454 b) If the container is a constant, an element_iterator is illegal
2455 if the container type does not have a Constant_Indexing aspect.
2456 c) If the iterate function has an in-out controlling parameter,
2457 the container cannot be a constant object.
2458 d) Reject additional cases of iterators over a
2459 discriminant-dependent component of a mutable object.
2460
2461 2015-05-21 Hristian Kirtchev <kirtchev@adacore.com>
2462
2463 * einfo.adb (Contract): This attribute now applies to constants.
2464 (Set_Contract): This attribute now applies to constants.
2465 (Write_Field34_Name): Add output for constants.
2466 * einfo.ads Attribute Contract now applies to constants.
2467 * sem_ch3.adb (Analyze_Object_Contract): Constants now have
2468 their Part_Of indicator verified.
2469 * sem_prag.adb (Analyze_Constituent): A constant is now a valid
2470 constituent.
2471 (Analyze_Global_Item): A constant cannot act as an output.
2472 (Analyze_Initialization_Item): Constants are now a valid
2473 initialization item.
2474 (Analyze_Initializes_In_Decl_Part): Rename
2475 global variable States_And_Vars to States_And_Objs and update
2476 all its occurrences.
2477 (Analyze_Input_Item): Constants are now a
2478 valid initialization item. Remove SPARM RM references from error
2479 messages.
2480 (Analyze_Pragma): Indicator Part_Of can now apply to a constant.
2481 (Collect_Body_States): Collect both source constants
2482 and variables.
2483 (Collect_States_And_Objects): Collect both source constants and
2484 variables.
2485 (Collect_States_And_Variables): Rename
2486 to Collect_States_And_Objects and update all its occurrences.
2487 (Collect_Visible_States): Do not collect constants and variables
2488 used to map generic formals to actuals.
2489 (Find_Role): The role of a constant is that of an input. Separate the
2490 role of a variable from that of a constant.
2491 (Report_Unused_Constituents): Add specialized wording for constants.
2492 (Report_Unused_States): Add specialized wording for constants.
2493 * sem_util.adb (Add_Contract_Item): Add processing for constants.
2494 * sem_util.ads (Add_Contract_Item): Update the comment on usage.
2495 (Find_Placement_In_State_Space): Update the comment on usage.
2496
2497 2015-05-21 Ed Schonberg <schonberg@adacore.com>
2498
2499 * sem_ch5.adb: minor reformatting.
2500
2501 2015-05-21 Robert Dewar <dewar@adacore.com>
2502
2503 * freeze.adb (Freeze_Entity): Properly tag -gnatw.z messages.
2504
2505 2015-05-21 Robert Dewar <dewar@adacore.com>
2506
2507 * freeze.adb: Minor reformatting.
2508 * cstand.adb (Print_Standard): Fix bad printing of Duration
2509 low bound.
2510 * a-reatim.adb (Time_Of): Complete rewrite to properly detect
2511 out of range args.
2512
2513 2015-05-21 Ed Schonberg <schonberg@adacore.com>
2514
2515 * sem_ch5.adb: add (useless) initial value.
2516 * sem_ch3.adb (Replace_Anonymous_Access_To_Protected_Subprogram):
2517 Check whether the procedure has parameters before processing
2518 formals in ASIS mode.
2519
2520 2015-05-21 Ed Schonberg <schonberg@adacore.com>
2521
2522 * sem_ch13.adb (Check_Iterator_Functions): Emit error on Iterator
2523 aspect as well when indexing function is illegal.
2524 (Valid_Default_Iterator): Handle properly somme illegal cases
2525 to prevent compilation abandoned messages.
2526 (Check_Primitive_Function): Verify that type and indexing function
2527 are in the same scope.
2528 * freeze.adb (Freeze_Record): Extend patch on the presence of
2529 indexing aspects to aspect Default_Iterator.
2530
2531 2015-05-19 David Malcolm <dmalcolm@redhat.com>
2532
2533 * gcc-interface/trans.c (Sloc_to_locus1): Strenghthen local "map"
2534 from line_map * to line_map_ordinary *.
2535
2536 2015-05-12 Jason Merrill <jason@redhat.com>
2537
2538 * sigtramp-vxworks.c: Add space between string literal and macro
2539 name.
2540
2541 2015-05-12 Arnaud Charlet <charlet@adacore.com>
2542
2543 * gnat_rm.texi, gnat_ugn.texi, doc: Documentation updates and clean ups
2544
2545 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2546
2547 * sem_ch5.adb (Analyze_Iterator_Specifications): Additional
2548 legality checks for array and container iterators:
2549 a) The domain of iteration cannot be a component that depends
2550 on discriminants of a mutable object. The check was recently
2551 added for element iterators.
2552 b) The cursor type cannot be a limited type at the point of the
2553 iteration, because the cursor will be assigned to in the body
2554 of the loop.
2555
2556 2015-05-12 Robert Dewar <dewar@adacore.com>
2557
2558 * freeze.adb (Freeze_Record_Type): Make sure that if we have
2559 aspect Iterator_Element, then we have either Constant_Indexing
2560 or Variable_Indexing.
2561
2562 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2563
2564 * a-coormu.ads, a-coormu.adb: Add Indexing aspect, Reference_Type,
2565 and Reference_Control_Type to support element iterators over
2566 ordered multisets.
2567 * a-ciormu.ads, a-ciormu.adb: Ditto for
2568 indefinite_ordered_multisets.
2569
2570 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
2571
2572 * exp_ch4.adb (Expand_N_Expression_With_Actions): Force
2573 the evaluation of the EWA expression. Code cleanup.
2574 (Process_Transient_Object): Code cleanup.
2575 * exp_util.adb (Is_Aliased): Controlled transient objects found
2576 within EWA nodes are not aliased.
2577 (Is_Finalizable_Transient): Iterators are not finalizable transients.
2578
2579 2015-05-12 Robert Dewar <dewar@adacore.com>
2580
2581 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
2582 Don't allow Atomic and Volatile_Full_Access for the same entity.
2583
2584 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2585
2586 * sem_ch5.adb (Analyze_Iterator_Specification): Implement new
2587 semantics and safety checks specified in AI12-0151.
2588
2589 2015-05-12 Pierre-Marie de Rodat <derodat@adacore.com>
2590
2591 * sem_ch10.adb (Sem_Ch10.Analyze_Proper_Body): Generate SCOs
2592 for subunit in generic units.
2593
2594 2015-05-12 Robert Dewar <dewar@adacore.com>
2595
2596 * sem_elab.adb (Check_A_Call): Avoid checking internal call
2597 from Valid_Scalars
2598
2599 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2600
2601 * sem_ch6.adb (Process_Formals): An untagged incomplete type
2602 is legal in the profile of a null procedure.
2603
2604 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2605
2606 * sem_ch12.adb (Validate_Derived_Type_Instance): Handle properly
2607 the checks on a derived formal whose parent type is a previous
2608 formal that is not a derived type.
2609
2610 2015-05-12 Robert Dewar <dewar@adacore.com>
2611
2612 * aspects.ads, aspects.adb: Add entries for aspect Volatile_Full_Access
2613 * einfo.adb (Has_Volatile_Full_Access): New flag.
2614 (Has_Volatile_Full_Access): New flag.
2615 * einfo.ads (Has_Volatile_Full_Access): New flag.
2616 * par-prag.adb: Add dummy entry for Volatile_Full_Access.
2617 * sem_prag.adb (Analyze_Pragma, case Volatile_Full_Access):
2618 Implement new pragma.
2619 * snames.ads-tmpl: Add entries for pragma Volatile_Full_Access.
2620
2621 2015-05-12 Robert Dewar <dewar@adacore.com>
2622
2623 * targparm.ads: Minor reformatting.
2624
2625 2015-05-12 Robert Dewar <dewar@adacore.com>
2626
2627 * a-reatim.adb (Time_Of): Properly detect overflow when TS = 0.0.
2628 * a-reatim.ads: Minor reformatting.
2629
2630 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
2631
2632 * einfo.ads: Update the documentation of flags
2633 Has_Inherited_Default_Init_Cond and Has_Default_Init_Cond.
2634
2635 2015-05-12 Robert Dewar <dewar@adacore.com>
2636
2637 * impunit.adb: Add entry for a-dhfina.ads
2638 * a-dhfina.ads: New file.
2639
2640 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2641
2642 * exp_ch5.adb (Expand_Iterator_Loop_Over_Array): if the array
2643 type has convention Fortran, a multidimensional iterator varies
2644 the first dimension fastest.
2645
2646 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
2647
2648 * einfo.adb: Node32 is now used as Encapsulating_State.
2649 Node37 is now used as Associated_Entity.
2650 (Associated_Entity): New routine.
2651 (Encapsulating_State): Update the assertion guard to include constants.
2652 (Set_Associated_Entity): New routine.
2653 (Set_Encapsulating_State): Update the assertion guard to
2654 include constants.
2655 (Write_Field10_Name): Remove the output for Encapsulating_State.
2656 (Write_Field32_Name): Add output for Encapsulating_State.
2657 (Write_Field37_Name): Add output for Associated_Entity.
2658 * einfo.ads New attribute Associated_Entity along with placement
2659 in entities. Attribute Encapsulating_State now uses Node32.
2660 (Associated_Entity): New routine along with pragma Inline.
2661 (Set_Associated_Entity): New routine along with pragma Inline.
2662 * inline.ads Code reformatting.
2663 * sem_attr.adb (Analyze_Attribute): Correct the prefix of
2664 attribute 'Result when the context is a generic instantiation.
2665 (Analyze_Attribute_Old_Result): Pragmas Depends and
2666 Refined_Depends are a valid context for attribute 'Result.
2667 (Denote_Same_Function): Allow attribute 'Result to denote
2668 generic functions.
2669 * sem_ch3.adb Add with and use clauses for Sem_Ch12.
2670 (Analyze_Declarations): Capture global references within the
2671 contracts of packages, subprograms and their respective bodies.
2672 * sem_ch6.adb (Analyze_Aspects_On_Body_Or_Stub): Removed.
2673 (Analyze_Completion_Contract): Removed.
2674 (Analyze_Generic_Subprogram_Body): Enchange the aspects after
2675 creating the generic copy. Create a generic contract for the
2676 template. Analyze the aspects of the generic body. Analyze the
2677 contract of the generic body when it is a compilation unit and
2678 capture global references.
2679 (Analyze_Subprogram_Body_Contract): Code cleanup.
2680 (Analyze_Subprogram_Contract): Do not save global references here.
2681 (Save_Global_References_In_List): Removed.
2682 * sem_ch7.adb (Analyze_Package_Body_Contract): Code cleanup.
2683 (Analyze_Package_Body_Helper): Create a generic contract for
2684 the template.
2685 (Analyze_Package_Contract): Code cleanup.
2686 * sem_ch10.adb Add with and use clauses for Sem_Ch12.
2687 (Analyze_Compilation_Unit): Capture global references in a
2688 generic subprogram declaration that acts as a compilation unit.
2689 * sem_ch12.adb Add with and use clauses for Sem_Prag. Illustrate
2690 the implementation of generic contracts. Alphabetize various
2691 subprograms.
2692 (Analyze_Generic_Package_Declaration):
2693 Create a generic contract for the template.
2694 (Analyze_Generic_Subprogram_Declaration): Create a generic
2695 contract for the template.
2696 (Analyze_Subprogram_Instantiation): Instantiate the contract of the
2697 subprogram.
2698 (Copy_Generic_Node): Link defining entities of the generic template
2699 with the corresponding defining entities of the generic copy. Update
2700 the processing of pragmas.
2701 (Instantiate_Contract): Removed.
2702 (Instantiate_Subprogram_Contract): New routine.
2703 (Requires_Delayed_Save): New routine.
2704 (Save_Global_References): Rename formal parameter N to Templ. Various
2705 cleanups.
2706 (Save_Global_References_In_Aspects): Moved from the spec.
2707 (Save_Global_References_In_Contract): New routine.
2708 (Save_References_In_Aggregate): New routine.
2709 (Save_References_In_Char_Lit_Or_Op_Symbol): New routine.
2710 (Save_References_In_Descendants): New routine.
2711 (Save_References_In_Identifier): New routine.
2712 (Save_References_In_Operator): New routine.
2713 (Save_References_In_Pragma): New routine.
2714 * sem_ch12.ads (Save_Global_References): Rename formal
2715 parameter N to Templ. Update the comment on usage.
2716 (Save_Global_References_In_Aspects): Moved to the body.
2717 (Save_Global_References_In_Contract): New routine.
2718 * sem_ch13.adb (Analyze_Aspect_Specifications_On_Body_Or_Stub):
2719 New routine.
2720 * sem_ch13.ads (Analyze_Aspect_Specifications_On_Body_Or_Stub):
2721 New routine.
2722 * sem_prag.adb (Add_Item_To_Name_Buffer): Add support for
2723 generic parameters.
2724 (Analyze_Contract_Cases_In_Decl_Part): Code cleanup.
2725 (Analyze_Depends_Global): New routine.
2726 (Analyze_Depends_In_Decl_Part): Code cleanup.
2727 (Analyze_Global_In_Decl_Part): Code cleanup.
2728 (Analyze_Global_Item): Constants are now valid global items. Do
2729 not perform state-related checks in an instance. Change the way
2730 renamings are handled. (Analyze_Initial_Condition_In_Decl_Part):
2731 Code cleanup.
2732 (Analyze_Initializes_In_Decl_Part): Code cleanup.
2733 (Analyze_Input_Output): The analysis of attribute 'Result in
2734 the context of pragmas Depends or Refined_Depends now reuses
2735 the existing attribute analysis machinery. Constants and
2736 generic parameters are now valid dependency items. Do not
2737 perform state-related checks in an instance. Change the way
2738 renamings are handled. (Analyze_Pragma): Add a "characteristics"
2739 section for pragmas Abstract_State, Contract_Cases, Depends,
2740 Extensions_Visible, Global, Initial_Condition, Initializes,
2741 Post, Post_Class, Postcondition, Pre, Pre_Class, Precondition,
2742 Refined_Depends, Refined_Global, Refined_Post, Refined_State, Test_Case.
2743 (Analyze_Pre_Post_Condition): Do not create a generic
2744 template here.
2745 (Analyze_Pre_Post_Condition_In_Decl_Part): Code cleanup.
2746 (Analyze_Refined_Depends_Global_Post): New routine.
2747 (Analyze_Refined_Depends_In_Decl_Part): Code cleanup.
2748 (Analyze_Refined_Global_In_Decl_Part): Code cleanup.
2749 (Analyze_Refined_Pragma): Removed.
2750 (Analyze_Refined_State_In_Decl_Part): Code cleanup.
2751 (Analyze_Test_Case_In_Decl_Part): Code cleanup.
2752 (Check_Dependency_Clause): Do not perform this check in an instance.
2753 (Check_Function_Return): Add support for generic functions.
2754 (Check_In_Out_States): Do not perform this check in an instance.
2755 (Check_Input_States): Do not perform this check in an instance.
2756 (Check_Mode_Restriction_In_Function): Add support for generic functions.
2757 (Check_Output_States): Do not perform this check in an instance.
2758 (Check_Postcondition_Use_In_Inlined_Subprogram): Rename
2759 parameter Subp_Id to Spec_Id and update comment on usage.
2760 (Check_Proof_In_States): Do not perform this check in an instance.
2761 (Check_Refined_Global_Item): Add support for constants.
2762 (Check_Refined_Global_List): Do not perform this check in an instance.
2763 (Collect_Global_Items): Reimplemented.
2764 (Collect_Subprogram_Inputs_Outputs): Add support for generic parameters.
2765 (Create_Generic_Template): Removed.
2766 (Find_Related_Package_Or_Body): Moved to spec.
2767 (Find_Role): Add support for generic parameters and constants.
2768 (Get_Argument): Moved to spec. Rename parameter Spec_Id to Context_Id.
2769 (Match_Item): Add support for constants.
2770 (Preanalyze_Test_Case_Arg): Reimplemented.
2771 (Report_Extra_Clauses): Do not perform this check in an instance.
2772 (Report_Extra_Constituents): Do not perform this check in an instance.
2773 * sem_prag.ads (Collect_Subprogram_Inputs_Outputs): Update
2774 the comment on usage.
2775 (Find_Related_Package_Or_Body): Moved from body.
2776 (Get_Argument): Moved from body.
2777 * sem_util.adb Add with and use clauses for Sem_Ch12.
2778 (Corresponding_Spec_Of): Add support for packages and package bodies.
2779 (Create_Generic_Contract): New routine.
2780 (Is_Contract_Annotation): Reimplemented.
2781 (Is_Generic_Declaration_Or_Body): New routine.
2782 (Is_Package_Contract_Annotation): New routine.
2783 (Is_Subprogram_Contract_Annotation): New routine.
2784 * sem_util.ads (Corresponding_Spec_Of): Update the comment on usage.
2785 (Create_Generic_Contract): New routine.
2786 (Is_Generic_Declaration_Or_Body): New routine.
2787 (Is_Package_Contract_Annotation): New routine.
2788 (Is_Subprogram_Contract_Annotation): New routine.
2789 * sinfo.adb (Is_Generic_Contract_Pragma): New routine.
2790 (Set_Is_Generic_Contract_Pragma): New routine.
2791 * sinfo.ads Add new attribute Is_Generic_Contract_Pragma along
2792 with occurrences in nodes.
2793 (Is_Generic_Contract_Pragma): New routine along with pragma Inline.
2794 (Set_Is_Generic_Contract_Pragma): New routine along with pragma Inline.
2795 * treepr.adb (Print_Entity_Info): Output fields 36 to 41.
2796
2797 2015-05-12 Robert Dewar <dewar@adacore.com>
2798
2799 * a-taster.ads: Minor comment fix: fix bad header, this is a
2800 pure RM unit.
2801
2802 2015-05-12 Robert Dewar <dewar@adacore.com>
2803
2804 * sem_intr.adb: (Check_Shift): Diagnose bad modulus value.
2805
2806 2015-05-12 Robert Dewar <dewar@adacore.com>
2807
2808 * gnat1drv.adb (Adjust_Global_Switches): Default to suppressing
2809 Alignment_Checks on non-strict alignment machine.
2810 * sem_ch13.adb (Validate_Address_Clauses): Don't give
2811 compile-time alignment warnings if run time Alignment_Check
2812 is suppressed.
2813
2814 2015-05-12 Thomas Quinot <quinot@adacore.com>
2815
2816 * g-sercom.ads, g-sercom-linux.adb (GNAT.Serial_Communications.
2817 Data_Rate): New literals B75, B110, B150, B300, B600.
2818
2819 2015-05-12 Doug Rupp <rupp@adacore.com>
2820
2821 * init.c (__gnat_init_float) [vxworks]: For e500v2,
2822 do nothing and leave the responsibility to install the handler
2823 and enable the exceptions to the BSP.
2824
2825 2015-05-12 Robert Dewar <dewar@adacore.com>
2826
2827 * sem_ch9.adb, einfo.ads, exp_intr.adb: Minor reformatting.
2828 * sem_disp.adb: Minor code reorganization (remove junk redundant
2829 null statement).
2830 * exp_unst.adb (Unnest_Subprogram.Uplev_Refs): Ignore uplevel
2831 references to bounds of types coming from original type reference.
2832 * checks.ads: Minor reformatting.
2833 * checks.adb: Minor reformatting.
2834 * sem_prag.adb (Analyze_Pragma, case Check): If in ignored
2835 assertion, then make sure we do not drag in bignum stuff.
2836
2837 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2838
2839 * sem_ch9.adb (Collect_Interfaces): Initialize
2840 Direct_Primitive_Operations for a tagged synchronized type,
2841 so it can used in ASIS mode.
2842 * sem_disp.adb (Check_Dispatching_Operation): If expansion is
2843 disabled, attach subprogram to list of Direct_Primitive_Operations
2844 of synchronized type itself, for ASIS use, because in this case
2845 Corresponding_Record_Type is not built.
2846 * einfo.ads: Indicate use of Direct_Primitive_Operations on
2847 synchronized type.
2848
2849 2015-05-12 Pierre-Marie de Rodat <derodat@adacore.com>
2850
2851 * exp_pakd.adb: Make clearer the comment in exp_pakd.adb about
2852 ___XP suffixes.
2853
2854 2015-05-12 Robert Dewar <dewar@adacore.com>
2855
2856 * sem_ch3.adb, sem_util.adb, sem_ch6.adb: Minor reformatting.
2857
2858 2015-05-12 Robert Dewar <dewar@adacore.com>
2859
2860 * exp_unst.adb (Visit_Node): Deal with subprogram and package stubs.
2861
2862 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2863
2864 * exp_intr.adb (Expand_Dispatching_Constructor_Call): The
2865 tag to be retrieved for the generated call is the first entry
2866 in the dispatch table for the return type of the instantiated
2867 constructor.
2868
2869 2015-05-12 Bob Duff <duff@adacore.com>
2870
2871 * exp_ch7.adb, exp_ch7.ads, exp_intr.adb, exp_util.adb,
2872 exp_util.ads: Update comments.
2873
2874 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2875
2876 * sem_ch3.adb (Add_Internal_Interface_Entities): Do no generate
2877 freeze nodes for these in ASIS mode, because they lead to
2878 elaoration order issues in gigi.
2879
2880 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
2881
2882 * sem_ch6.adb (Analyze_Expression_Function): Code
2883 cleanup. Use Copy_Subprogram_Spec to create a proper spec.
2884 (Analyze_Subprogram_Body_Helper): Code cleanup. Do not
2885 prepare a stand alone body for inlining in GNATprove mode
2886 when inside a generic. (Body_Has_Contract): Reimplemented.
2887 (Build_Subprogram_Declaration): New routine.
2888 * sem_ch10.adb (Analyze_Compilation_Unit): Capture global
2889 references within generic bodies by loading them.
2890 * sem_util.adb (Copy_Parameter_List): Code cleanup.
2891 (Copy_Subprogram_Spec): New routine.
2892 (Is_Contract_Annotation): New routine.
2893 * sem_util.ads (Copy_Subprogram_Spec): New routine.
2894 (Is_Contract_Annotation): New routine.
2895
2896 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
2897
2898 * sem_attr.adb (Resolve_Attribute): Do not analyze the generated
2899 body of an expression function when the prefix of attribute
2900 'Access is the body.
2901
2902 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2903
2904 * sem_ch3.adb (Build_Derived_Enumeration_Type): The anonymous base
2905 created for a derived enumeration type is not a first subtype,
2906 even though it is defined through a full type declaration.
2907 * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): Do not process
2908 aspects for the anonymous base type constructed for a derived
2909 scalar type, because they will be set when the first subtype
2910 is frozen.
2911 (Inherit_Aspects_At_Freeze_Point): Fix typos on handling of
2912 Default_Value and Default_Component_Value, that prevented the
2913 proper inheritance of these aspects.
2914
2915 2015-05-12 Gary Dismukes <dismukes@adacore.com>
2916
2917 * exp_ch6.adb, exp_unst.adb: Minor typo fixes.
2918
2919 2015-05-12 Robert Dewar <dewar@adacore.com>
2920
2921 * sem_ch3.adb: Minor reformatting.
2922
2923 2015-05-12 Vincent Celier <celier@adacore.com>
2924
2925 * gnatcmd.adb: If we want to invoke gnatmake (gnatclean) with
2926 -P, then check if gprbuild (gprclean) is available; if it is,
2927 use gprbuild (gprclean) instead of gnatmake (gnatclean).
2928
2929 2015-05-12 Robert Dewar <dewar@adacore.com>
2930
2931 * debug.adb: Add flag -gnatd.3 to output diagnostic info from
2932 Exp_Unst.
2933 * einfo.ad, einfo.adb: Reorganize (and remove most of) flags used by
2934 Exp_Unst.
2935 * exp_ch6.adb (Unest_Bodies): Table for delayed calls to
2936 Unnest_Subprogram (Expand_N_Subprogram_Body): Add entry to table
2937 for later call instead of calling Unnest_Subprogram directly
2938 (Initialize): New procedure (Unnest_Subprograms): New procedure
2939 * exp_ch6.ads (Add_Extra_Actual_To_Call): Move into proper
2940 alpha order.
2941 (Initialize): New procedure.
2942 (Unnest_Subprograms): New procedure.
2943 * exp_unst.adb (Unnest_Subprogram): Major rewrite, moving
2944 all processing to this routine which is now called late
2945 after instantiating bodies. Fully handles the case of generic
2946 instantiations now.
2947 * exp_unst.ads: Major rewrite, moving all processing to
2948 Unnest_Subprogram.
2949 * frontend.adb (Frontend): Add call to Exp_Ch6.Initialize.
2950 (Frontend): Add call to Unnest_Subprograms.
2951 * sem_ch8.adb (Find_Direct_Name): Back to old calling sequence
2952 for Check_Nested_Access.
2953 * sem_util.adb (Build_Default_Subtype): Minor reformatting
2954 (Check_Nested_Access): Back to original VM-only form (we
2955 now do all the processing for Unnest_Subprogram at the time
2956 it is called.
2957 (Denotes_Same_Object): Minor reformatting
2958 (Note_Possible_Modification): Old calling sequence for
2959 Check_Nested_Access.
2960 * sem_util.ads (Check_Nested_Access): Back to original VM-only
2961 form (we now do all the processing for Unnest_Subprogram at the
2962 time it is called.
2963
2964 2015-05-12 Robert Dewar <dewar@adacore.com>
2965
2966 * sem_ch3.adb, freeze.adb, sem_ch6.adb: Minor reformatting.
2967
2968 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2969
2970 * sem_ch3.adb (Analyze_Object_Declaration): New function
2971 Has_Delayed_Aspect, used to defer resolution of an aggregate
2972 expression when the object declaration carries aspects Address
2973 and/or Alignment.
2974 * freeze.adb (Freeze_Object_Declaration): New subsidiary procedure
2975 to Freeze_Entity. In addition to the previous processing steps
2976 at the freeze point of an object, this procedure also handles
2977 aggregates in object declarations, when the declaration carries
2978 delayed aspects that require that the initialization of the
2979 object be attached to its freeze actions.
2980
2981 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2982
2983 * sem_ch6.adb (Analyze_Subprogram_Declaration): Following
2984 AI12-0147, null procedures and expression functions are allowed
2985 in protected bodies.
2986
2987 2015-05-12 Tristan Gingold <gingold@adacore.com>
2988
2989 * i-cpoint.adb (Copy_Terminated_Array): Copy nothing if Length is 0.
2990
2991 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2992
2993 * sem_ch3.adb (Complete_Private_Subtype): Propagate
2994 Has_Delayed_Aspects flag from private to full view, to ensure
2995 that predicate functions are constructed.
2996
2997 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2998
2999 * sem_ch6.adb (Process_Formals): If a tagged formal is an
3000 incomplete class-wide type, the subprogram must have a delayed
3001 freeze even though the opertation is not a primitive of the
3002 type. THis ensures that the backend can recover the full view
3003 when elaborating the subprogram declaration.
3004
3005 2015-05-12 Ed Schonberg <schonberg@adacore.com>
3006
3007 * exp_util.adb (Get_Current_Value_Condition): Nothing to be
3008 done if an elsif part has been rewritten so that it is not part
3009 of an enclosing if_statement.
3010
3011 2015-05-12 Robert Dewar <dewar@adacore.com>
3012
3013 * sem_type.adb, sem_ch10.adb, freeze.adb, sem_ch6.adb, exp_disp.adb:
3014 Minor reformatting.
3015
3016 2015-05-12 Bob Duff <duff@adacore.com>
3017
3018 * exp_attr.adb (Size): Remove unnecessary check for types with
3019 unknown discriminants. That was causing the compiler to build
3020 a function call _size(T), where T is a type, not an object.
3021
3022 2015-05-12 Ed Schonberg <schonberg@adacore.com>
3023
3024 * sem_ch4.adb (Extended_Primitive_Ops): Exclude overriding
3025 primitive operations of a type extension declared in the package
3026 body, to prevent duplicates in extended list.
3027
3028 2015-05-12 Ed Schonberg <schonberg@adacore.com>
3029
3030 * sem_ch3.adb (Analyze_Component_Declaration): If the component is
3031 an unconstrained synchronized type with discriminants, create a
3032 constrained default subtype for it, so that the enclosing record
3033 can be given the proper size.
3034 * sem_util.adb (Build_Default_Subtype): If the subtype is created
3035 for a record discriminant, do not analyze the declarztion at
3036 once because it is added to the freezing actions of the enclosing
3037 record type.
3038
3039 2015-05-12 Robert Dewar <dewar@adacore.com>
3040
3041 * exp_prag.adb (Expand_N_Pragma): Rewrite ignored pragma as
3042 Null statements.
3043 * namet.ads (Boolean3): Document this flag used for Ignore_Pragma.
3044 * par-prag.adb (Prag): Implement Ignore_Pragma.
3045 * sem_prag.adb: Implement Ignore_Pragma.
3046 * snames.ads-tmpl: Add entries for pragma Ignore_Pragma.
3047
3048 2015-05-12 Javier Miranda <miranda@adacore.com>
3049
3050 * sem_ch10.adb (Build_Shadow_Entity): Link the class-wide shadow
3051 entity with its corresponding real entity.
3052 (Decorate_Type): Unconditionally build the class-wide shadow entity of
3053 tagged types.
3054 * einfo.ads, einfo.adb (Has_Non_Limited_View): New synthesized
3055 attribute.
3056 (Non_Limited_View): Moved from field 17 to field 19 be available
3057 in class-wide entities.
3058 * exp_attr.adb (Access_Cases): Code cleanup.
3059 * exp_disp.adb (Expand_Interface_Actuals): Ditto.
3060 * exp_util.adb (Non_Limited_Designated_Type): Ditto.
3061 * freeze.adb (Build_Renamed_Bdody): Ditto.
3062 * sem_aux.adb (Available_View): Ditto.
3063 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
3064 (Try_One_Prefix_Interpretation): Ditto.
3065 * sem_ch5.adb (Analyze_Assignment): Ditto.
3066 * sem_ch6.adb (Detect_And_Exchange): Ditto.
3067 * sem_ch8.adb (Find_Expanded_Name): Ditto.
3068 * sem_disp.adb (Check_Controlling_Type): Ditto.
3069 * sem_res.adb (Resolve_Type_Conversion): Ditto.
3070 (Full_Designated_Type): Ditto.
3071 * sem_type.adb (Covers): Ditto.
3072 * sem_util.adb: Fix typo in comment.
3073
3074 2015-05-12 Robert Dewar <dewar@adacore.com>
3075
3076 * exp_unst.adb (Get_Real_Subp): New subprogram.
3077 (Unnest_Subprogram): Use Get_Real_Subp.
3078 (Uplev_Refs_For_One_Subp): Skip if no ARECnU entity.
3079 (Uplev_Refs_For_One_Subp): Use actual subtype in unconstrained case.
3080
3081 2015-05-12 Robert Dewar <dewar@adacore.com>
3082
3083 * a-reatim.adb ("/"): Add explicit check for Time_Span_First / -1.
3084
3085 2015-05-12 Ed Schonberg <schonberg@adacore.com>
3086
3087 * sem_ch4.adb (Extended_Primitive_Ops): New subprogram,
3088 auxiliary to Try_Primitive_Operation to handle properly prefixed
3089 calls where the operation is not a primitive of the type, but
3090 is declared in the package body that is in the immediate scope
3091 of the type.
3092
3093 2015-05-12 Robert Dewar <dewar@adacore.com>
3094
3095 * sem_util.adb (Is_Variable): Allow X'Deref(Y) as a variable.
3096
3097 2015-05-12 Ed Schonberg <schonberg@adacore.com>
3098
3099 * sem_ch8.adb (Find_Expanded_Name): Handle properly a fully
3100 qualified name for an instance of a generic grand-child unit in
3101 the body its parent.
3102
3103 2015-05-12 Robert Dewar <dewar@adacore.com>
3104
3105 * exp_unst.adb (Upref_Name): New subprogram.
3106 (Unnest_Subprogram): Use Upref_Name.
3107 (Unnest_Subprogram): Use new Deref attribute.
3108 * exp_unst.ads: Doc updates.
3109
3110 2015-05-12 Thomas Quinot <quinot@adacore.com>
3111
3112 * adaint.c: Enable Large File Support in adaint so that __gnat_readdir
3113 can access files on filesystems mounted from servers that use large
3114 NFS file handles.
3115
3116 2015-05-09 Eric Botcazou <ebotcazou@adacore.com>
3117
3118 * gcc-interface/utils.c (gnat_write_global_declarations): Use type_decl
3119 method instead of global_decl for TYPE_DECLs.
3120
3121 2015-04-27 Jim Wilson <jim.wilson@linaro.org>
3122
3123 * gcc-interface/Makefile-lan.in (ada.mostlyclean): Remove gnatbind
3124 and gnat1.
3125
3126 2015-04-13 Eric Botcazou <ebotcazou@adacore.com>
3127
3128 * gnatvsn.ads (Library_Version): Bump to 6.
3129
3130 2015-04-09 Iain Sandoe <iain@codesourcery.com>
3131
3132 * gcc-interface/Makefile.in (darwin, powerpc): Enable atomics.
3133
3134 2015-04-08 Eric Botcazou <ebotcazou@adacore.com>
3135
3136 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Do not make
3137 a function returning an unconstrained type 'const' for the middle-end.
3138
3139 * gcc-interface/trans.c (Pragma_to_gnu) <case Pragma_Warning>: Use
3140 exact condition to detect Reason => "..." pattern.
3141
3142 2015-03-31 Tom de Vries <tom@codesourcery.com>
3143
3144 PR ada/65490
3145 * terminals.c (child_setup_tty): Fix warning 'argument to sizeof in
3146 bzero call is the same expression as the destination'.
3147
3148 2015-03-26 Eric Botcazou <ebotcazou@adacore.com>
3149
3150 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Deref>: New case.
3151
3152 2015-03-24 Gary Dismukes <dismukes@adacore.com>
3153
3154 * sem_ch3.adb: Minor typo fix (missing paren).
3155
3156 2015-03-24 Robert Dewar <dewar@adacore.com>
3157
3158 * sinfo.ads: Update comment.
3159
3160 2015-03-24 Robert Dewar <dewar@adacore.com>
3161
3162 * exp_attr.adb: Add entry for typ'Deref.
3163 * sem_attr.adb (Deref): New GNAT attribute.
3164 * sem_attr.ads: Add entry for new GNAT attribute Deref.
3165 * snames.ads-tmpl: Add entries for new attribute Deref.
3166
3167 2015-03-24 Ed Schonberg <schonberg@adacore.com>
3168
3169 * sem_ch13.adb (Rep_Item_Too_Early): allow pragma Convention
3170 on generic type.
3171
3172 2015-03-24 Gary Dismukes <dismukes@adacore.com>
3173
3174 * inline.adb: Minor typo fix.
3175
3176 2015-03-24 Arnaud Charlet <charlet@adacore.com>
3177
3178 * doc/gnat_ugn/building_executable_programs_with_gnat.rst,
3179 doc/gnat_ugn/gnat_utility_programs.rst
3180 doc/gnat_rm/implementation_defined_attributes.rst
3181 doc/gnat_rm/implementation_defined_pragmas.rst
3182 doc/gnat_rm/representation_clauses_and_pragmas.rst
3183 doc/gnat_rm/about_this_guide.rst
3184 doc/gnat_rm/implementation_of_ada_2012_features.rst: Doc improvements.
3185 * gnat_rm.texi, gnat_ugn.texi: Regenerate.
3186
3187 2015-03-23 Jakub Jelinek <jakub@redhat.com>
3188
3189 PR bootstrap/65522
3190 * adadecode.c (ada_demangle): Guard with IN_RTS instead of IN_GCC.
3191
3192 2015-03-20 Eric Botcazou <ebotcazou@adacore.com>
3193
3194 PR ada/65451
3195 * gcc-interface/utils.c (gnat_pushdecl): Tidy up and improve comment.
3196 Make sure to chain only main variants through TYPE_NEXT_PTR_TO.
3197
3198 * gcc-interface/trans.c (Attribute_to_gnu): Revert latest change.
3199
3200 2015-03-16 Eric Botcazou <ebotcazou@adacore.com>
3201
3202 * gcc-interface/utils2.c (gnat_invariant_expr): Return null if the type
3203 of the expression ends up being composite.
3204
3205 2015-03-16 Eric Botcazou <ebotcazou@adacore.com>
3206
3207 * gcc-interface/decl.c (is_from_limited_with_of_main): New predicate.
3208 (gnat_to_gnu_entity) <E_Subprogram_Type>: Invoke it on return and
3209 parameter types to detect circularities in ASIS mode.
3210 * gcc-interface/trans.c (Attribute_to_gnu): Mention AI05-0151.
3211
3212 2015-03-16 Eric Botcazou <ebotcazou@adacore.com>
3213
3214 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Abstract_State>: Do not
3215 short-circuit the regular handling.
3216
3217 2015-03-13 Robert Dewar <dewar@adacore.com>
3218
3219 * exp_unst.adb (Note_Uplevel_Reference): Eliminate duplicate
3220 references.
3221 (Actual_Ref): New function.
3222 (AREC_String): Minor reformatting.
3223 (Unnest_Subprogram): Use Actual_Ref.
3224 * frontend.adb (Frontend): Turn off Unnest_Subprogram_Mode
3225 before call to Instantiate_Bodies.
3226
3227 2015-03-13 Ed Schonberg <schonberg@adacore.com>
3228
3229 * freeze.adb (Freeze_Profile): If the return type of a function
3230 being frozen is an untagged limited view and the function is
3231 abstract, mark the type as frozen because there is no later
3232 point at which the profile of the subprogram will be elaborated.
3233
3234 2015-03-13 Robert Dewar <dewar@adacore.com>
3235
3236 * einfo.adb, einfo.ads, atree.adb, atree.ads, atree.h: Add seventh
3237 component to entities. Add new fields Field36-41 and Node36-41.
3238
3239 2015-03-13 Claire Dross <dross@adacore.com>
3240
3241 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Rewrite after review.
3242
3243 2015-03-13 Robert Dewar <dewar@adacore.com>
3244
3245 * exp_util.adb (Is_Volatile_Reference): Compile time known
3246 value is never considered to be a volatile reference.
3247
3248 2015-03-13 Robert Dewar <dewar@adacore.com>
3249
3250 * sem_ch3.adb (Analyze_Object_Contract): Suppress "constant
3251 cannot be volatile" for internally generated object (such as
3252 FIRST and LAST constants).
3253
3254 2015-03-13 Ed Schonberg <schonberg@adacore.com>
3255
3256 * sem_ch12.adb (Validate_Access_Subprogram_Instance): If a
3257 convention is specified for the formal parameter, verify that
3258 the actual has the same convention.
3259 * sem_prag.adb (Set_Convention_From_Pragma): Allow convention
3260 pragma to be set on a generic formal type.
3261 * sem_util.adb (Set_Convention): Ignore within an instance,
3262 as it has already been verified in the generic unit.
3263
3264 2015-03-13 Claire Dross <dross@adacore.com>
3265
3266 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do not inline
3267 subprograms with unconstrained record parameters containing
3268 Itype declarations.
3269 * sinfo.ads Document GNATprove assumption that type should match
3270 in the AST.
3271 * sem_ch6.adb (Analyze_Subprogram_Body_Contract):
3272 Do not check for Refined_Depends and Refined_Globals contracts
3273 as they are optional.
3274
3275 2015-03-13 Ed Schonberg <schonberg@adacore.com>
3276
3277 * sem_ch12.adb (Instantiate_Type): For a floating-point type,
3278 capture dimension info if any, because the generated subtype
3279 declaration does not come from source and will not process dimensions.
3280 * sem_dim,adb (Analyze_Dimension_Extension_Or_Record_Aggregate):
3281 Do not analyze expressions with an initialization procedure
3282 because aggregates will have been checked at the point of record
3283 declaration.
3284
3285 2015-03-13 Robert Dewar <dewar@adacore.com>
3286
3287 * aspects.ads, aspects.adb: Add entries for aspect Unimplemented.
3288 * einfo.ads, einfo.adb (Is_Unimplemented): New flag.
3289 * sem_ch13.adb: Add dummy entry for aspect Unimplemented.
3290 * snames.ads-tmpl: Add entry for Name_Unimplemented.
3291
3292 2015-03-13 Gary Dismukes <dismukes@adacore.com>
3293
3294 * style.adb (Missing_Overriding): Apply the
3295 Comes_From_Source test to the Original_Node of the subprogram
3296 node, to handle the case of a null procedure declaration that
3297 has been rewritten as an empty procedure body.
3298
3299 2015-03-13 Robert Dewar <dewar@adacore.com>
3300
3301 * exp_util.ads: Minor fix to comment.
3302 * sem_ch3.adb (Constrain_Index): Correct pasto from previous
3303 change.
3304
3305 2015-03-13 Robert Dewar <dewar@adacore.com>
3306
3307 * exp_util.ads, exp_util.adb (Force_Evaluation): Add Related_Id and
3308 Is_Low/High_Bound params.
3309 * sem_ch3.adb (Constrain_Index): Use new Force_Evaluation calling
3310 sequence to simplify generation of FIRST/LAST temps for bounds.
3311
3312 2015-03-12 Olivier Hainque <hainque@adacore.com>
3313
3314 * gcc-interface/trans.c (Attribute_to_gnu) <Code_Address case>:
3315 On targets where a function symbol designates a function descriptor,
3316 fetch the function code address from the descriptor.
3317 (USE_RUNTIME_DESCRIPTORS): Provide a default definition.
3318
3319 2015-03-04 Robert Dewar <dewar@adacore.com>
3320
3321 * sem_warn.adb: Minor reformatting.
3322 * init.c: Minor tweaks.
3323
3324 2015-03-04 Dmitriy Anisimko <anisimko@adacore.com>
3325
3326 * a-coinho-shared.adb: Fix clear of already empty holder.
3327
3328 2015-03-04 Robert Dewar <dewar@adacore.com>
3329
3330 * exp_unst.adb (Check_Dynamic_Type): Ignore library level types.
3331 (Check_Uplevel_Reference_To_Type): Ignore call inside generic.
3332 (Note_Uplevel_Reference): Ignore call inside generic.
3333 (Note_Uplevel_Reference): Fix check for no entity field.
3334 (Unnest_Subprogram): Ignore call inside generic.
3335 (Find_Current_Subprogram): Use Defining_Entity, not Defining_Unit_Name.
3336 (Visit_Node): Ignore calls to Imported subprograms.
3337 (Visit_Node): Fix problem in finding subprogram body in some cases.
3338 (Add_Form_To_Spec): Use Defining_Entity, not Defining_Unit_Name.
3339
3340 2015-03-04 Robert Dewar <dewar@adacore.com>
3341
3342 * einfo.adb (Is_ARECnF_Entity): Removed.
3343 (Last_Formal): Remove special handling of Is_ARECnF_Entity.
3344 (Next_Formal): Remove special handling of Is_ARECnF_Entity.
3345 (Next_Formal_With_Extras): Remove special handling of Is_ARECnF_Entity.
3346 (Number_Entries): Minor reformatting.
3347 * einfo.ads (Is_ARECnF_Entity): Removed.
3348 * exp_unst.adb (Unnest_Subprogram): Remove setting of
3349 Is_ARECnF_Entity.
3350 (Add_Extra_Formal): Use normal Extra_Formal circuit.
3351 * sprint.adb (Write_Param_Specs): Properly handle case where
3352 there are no source formals, but we have at least one Extra_Formal
3353 present.
3354
3355 2015-03-04 Ed Schonberg <schonberg@adacore.com>
3356
3357 * sem_aggr.adb (Resolve_Record_Aggregate,
3358 Add_Discriminant_Values): If the value is a reference to the
3359 current instance of an enclosing type, use its base type to check
3360 against prefix of attribute reference, because the target type
3361 may be otherwise constrained.
3362
3363 2015-03-04 Robert Dewar <dewar@adacore.com>
3364
3365 * atree.h: Add entries for Flag287-Flag309.
3366 * einfo.adb: Add (unused) flags Flag287-Flag309.
3367
3368 2015-03-04 Ed Schonberg <schonberg@adacore.com>
3369
3370 * sem_util.adb (Collect_Interfaces, Collect): When gathering
3371 interfaces of ancestors, handle properly a subtype of a private
3372 extension.
3373
3374 2015-03-04 Robert Dewar <dewar@adacore.com>
3375
3376 * einfo.adb (Is_ARECnF_Entity): New flag (ARECnF is an extra formal).
3377 (Next_Formal): Don't return ARECnF formal.
3378 (Last_Formal): Don't consider ARECnF formal.
3379 (Next_Formal_With_Extras): Do consider ARECnF formal.
3380 * einfo.ads (Is_ARECnF_Entity): New flag (ARECnF is an extra formal).
3381 * exp_unst.adb (Create_Entities): Set Is_ARECnF_Entity flag.
3382
3383 2015-03-04 Javier Miranda <miranda@adacore.com>
3384
3385 * exp_ch6.adb (Expand_Simple_Function_Return): When the returned
3386 object is a class-wide interface object and we generate the
3387 accessibility described in RM 6.5(8/3) then displace the pointer
3388 to the object to reference the base of the object (to get access
3389 to the TSD of the object).
3390
3391 2015-03-04 Hristian Kirtchev <kirtchev@adacore.com>
3392
3393 * sem_prag.adb (Analyze_Abstract_State): Use routine
3394 Malformed_State_Error to issue general errors.
3395 (Analyze_Pragma): Diagnose a syntax error related to a state
3396 declaration with a simple option.
3397 (Malformed_State_Error): New routine.
3398
3399 2015-03-04 Robert Dewar <dewar@adacore.com>
3400
3401 * a-strsup.adb (Super_Slice): Deal with super flat case.
3402 * einfo.ads: Minor reformatting.
3403 * s-imgdec.adb (Set_Decimal_Digits): Add comment about possibly
3404 redundant code.
3405
3406 2015-03-04 Claire Dross <dross@adacore.com>
3407
3408 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
3409 a-cforse.ads, a-cofove.ads: Use Default_Initial_Condition on formal
3410 containers.
3411
3412 2015-03-04 Ed Schonberg <schonberg@adacore.com>
3413
3414 * sem_warn.adb (Check_References): When checking for an unused
3415 in-out parameter of a class- wide type, use its type to determine
3416 whether it is private, in order to avoid a spurious warning when
3417 subprogram spec and body are in different units.
3418
3419 2015-03-04 Yannick Moy <moy@adacore.com>
3420
3421 * sem_attr.adb: Improve warning messages.
3422
3423 2015-03-04 Robert Dewar <dewar@adacore.com>
3424
3425 * exp_ch6.adb (Expand_N_Subprogram_Body): Avoid trying to unnest
3426 generic subprograms.
3427 * exp_unst.adb (Check_Dynamic_Type): Handle record types properly
3428 (Note_Uplevel_Reference): Ignore uplevel references to non-types
3429 (Get_Level): Consider only subprograms, not blocks.
3430 (Visit_Node): Set proper condition for generating ARECnF entity.
3431 Ignore indirect calls. Ignore calls to subprograms
3432 outside our nest.
3433 (Unnest_Subprogram): Minor changes in dealing with ARECnF entity.
3434 (Add_Form_To_Spec): Properly set Last_Entity field.
3435 (Unnest_Subprogram): Set current subprogram scope for analyze calls.
3436 Handle case of no uplevel refs in outer subprogram
3437 Don't mark uplevel entities as aliased.
3438 Don't deal with calls with no ARECnF requirement.
3439
3440 2015-03-04 Robert Dewar <dewar@adacore.com>
3441
3442 * s-valrea.adb (Scan_Real): Remove redundant tests from scaling loops.
3443 * s-imgdec.adb (Set_Decimal_Digits): Remove redundant Max
3444 operation in computing LZ.
3445 * sem_attr.adb: Minor typo fix
3446
3447 2015-03-04 Robert Dewar <dewar@adacore.com>
3448
3449 * exp_ch7.adb: Minor reformatting.
3450 * exp_unst.adb (Build_Tables): Fix minor glitch for no separate
3451 spec case.
3452 * erroutc.adb (Delete_Msg): add missing decrement of info msg counter.
3453
3454 2015-03-04 Hristian Kirtchev <kirtchev@adacore.com>
3455
3456 * exp_ch6.adb (Build_Pragma_Check_Equivalent): Suppress
3457 references to formal parameters subject to pragma Unreferenced.
3458 (Suppress_Reference): New routine.
3459 * sem_attr.adb (Analyze_Attribute): Reimplement the analysis
3460 of attribute 'Old. Attributes 'Old and 'Result now share
3461 common processing.
3462 (Analyze_Old_Result_Attribute): New routine.
3463 (Check_Placement_In_Check): Removed.
3464 (Check_Placement_In_Contract_Cases): Removed.
3465 (Check_Placement_In_Test_Case): Removed.
3466 (Check_Use_In_Contract_Cases): Removed.
3467 (Check_Use_In_Test_Case): Removed.
3468 (In_Refined_Post): Removed.
3469 (Is_Within): Removed.
3470 * sem_warn.adb (Check_Low_Bound_Tested): Code cleanup.
3471 (Check_Low_Bound_Tested_For): New routine.
3472
3473 2015-03-04 Hristian Kirtchev <kirtchev@adacore.com>
3474
3475 * exp_ch3.adb (Expand_N_Object_Declaration):
3476 Generate a runtime check to test the expression of pragma
3477 Default_Initial_Condition when the object is default initialized.
3478
3479 2015-03-02 Robert Dewar <dewar@adacore.com>
3480
3481 * scng.adb (Scan): Ignore illegal character in relaxed
3482 semantics mode.
3483
3484 2015-03-02 Ed Schonberg <schonberg@adacore.com>
3485
3486 * sem_ch4.adb (Analyze_Set_Membership); Retain Overloaded flag
3487 on left operand, so it can be properly resolved with type of
3488 alternatives of right operand.
3489 * sem_res.adb (Resolve_Set_Membership): Handle properly an
3490 overloaded left-hand side when the alternatives on the right
3491 hand side are literals of some universal type. Use first
3492 non-overloaded alternative to find expected type.
3493
3494 2015-03-02 Ed Schonberg <schonberg@adacore.com>
3495
3496 * exp_ch7.adb (Make_Set_Finalize_Address_Call): Use underlying
3497 type to retrieve designated type, because the purported access
3498 type may be a partial (private) view, when it is declared in
3499 the private part of a nested package, and finalization actions
3500 are generated when completing compilation of enclosing unit.
3501
3502 2015-03-02 Robert Dewar <dewar@adacore.com>
3503
3504 * back_end.adb (Call_Back_End): Remove previous patch,
3505 the back end now gets to see the result of -gnatd.1
3506 (Unnest_Subprogram_Mode) processing.
3507 * elists.ads, elists.adb (List_Length): New function.
3508 * exp_unst.ads, exp_unst.adb: Major changes, first complete version.
3509 * sem_util.adb (Check_Nested_Access): Handle formals in
3510 Unnest_Subprogram_Mode.
3511 (Adjust_Named_Associations): Minor reformatting.
3512 * sprint.adb (Sprint_Node_Actual): Fix failure to print aliased
3513 for parameters.
3514
3515 2015-03-02 Robert Dewar <dewar@adacore.com>
3516
3517 * atree.ads, atree.adb (Uint24): New function
3518 (Set_Uint24): New procedure.
3519 * atree.h (Uint24): New macro for field access.
3520 * back_end.adb (Call_Back_End): For now, don't call back end
3521 if unnesting subprogs.
3522 * einfo.adb (Activation_Record_Component): New field
3523 (Subps_Index): New field.
3524 * einfo.ads (Activation_Record_Component): New field
3525 (Subps_Index): New field Minor reordering of comments into alpha order.
3526 * exp_unst.ads, exp_unst.adb: Continued development.
3527
3528 2015-03-02 Gary Dismukes <dismukes@adacore.com>
3529
3530 * exp_disp.ads: Minor reformatting.
3531
3532 2015-03-02 Ed Schonberg <schonberg@adacore.com>
3533
3534 * sem_ch8.adb (Chain_Use_Clause): Do not chain use clause from
3535 ancestor to list of use clauses active in descendant unit if we
3536 are within the private part of an intervening parent, to prevent
3537 circularities in use clause list.
3538
3539 2015-03-02 Javier Miranda <miranda@adacore.com>
3540
3541 * exp_ch9.adb (Build_Corresponding_Record): Propagate type
3542 invariants to the corresponding record type.
3543 * exp_disp.ad[sb] (Set_DT_Position_Value): New subprogram
3544 which sets the value of the DTC_Entity associated with a given
3545 primitive of a tagged type and propagates the value to the
3546 wrapped subprogram.
3547 (Set_DTC_Entity_Value): Propagate the DTC
3548 value to the wrapped entity.
3549 * sem_ch13.adb (Build_Invariant_Procedure): Append the code
3550 associated with invariants of progenitors.
3551 * sem_ch3.adb (Build_Derived_Record_Type): Inherit type invariants
3552 of parents and progenitors.
3553 (Process_Full_View): Check hidden inheritance of class-wide type
3554 invariants.
3555 * sem_ch7.adb (Analyze_Package_Specification): Do not generate
3556 the invariant procedure for interface types; build the invariant
3557 procedure for tagged types inheriting invariants from their
3558 progenitors.
3559 * sem_prag.adb (Pragma_Invariant) Allow invariants in interface
3560 types but do not build their invariant procedure since their
3561 invariants will be propagated to the invariant procedure of
3562 types covering the interface.
3563 * exp_ch6.adb, exp_disp.adb, sem_ch3.adb, sem_ch7.adb,
3564 sem_ch8.adb, sem_disp.adb: Replace all calls to Set_DT_Position
3565 by calls to Set_DT_Position_Value.
3566
3567 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
3568
3569 * sem_attr.adb (Analyze_Attribute): Factor out heavily indented
3570 code in Denote_Same_Function. Do not analyze attribute 'Result
3571 when it is inside procedure _Postconditions. Remove a misplaced
3572 warning diagnostic. Code cleanup.
3573 (Denote_Same_Function): New routine.
3574 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Code
3575 cleanup. Warn on pre/postconditions on an inlined subprogram.
3576 (Analyze_Pragma, Refined_Post case): Warn on pre/postconditions on
3577 an inlined subprogram.
3578 (Analyze_Pre_Post_Condition_In_Decl_Part): Code cleanup. Warn on
3579 pre/post condition on an inlined subprogram.
3580 (Analyze_Test_Case_In_Decl_Part): Code cleanup. Warn on
3581 pre/postconditions on an inlined subprogram.
3582 (Check_Postcondition_Use_In_Inlined_Subprogram): New routine.
3583
3584 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
3585
3586 * sem_prag.adb (Ensure_Aggregate_Form):
3587 Ensure that the name denoted by the Chars of a pragma argument
3588 association has the proper Sloc when converted into an aggregate.
3589
3590 2015-03-02 Bob Duff <duff@adacore.com>
3591
3592 * sem_ch6.adb (Check_Private_Overriding): Capture
3593 Incomplete_Or_Partial_View in a constant. This is cleaner and
3594 more efficient.
3595
3596 2015-03-02 Gary Dismukes <dismukes@adacore.com>
3597
3598 * einfo.ads, exp_unst.ads: Minor reformatting.
3599
3600 2015-03-02 Ed Schonberg <schonberg@adacore.com>
3601
3602 * a-strsea.adb (Find_Token): Ensure that the range of iteration
3603 does not perform any improper character access. This prevents
3604 erroneous access in the unusual case of an empty string target
3605 and a From parameter less than Source'First.
3606
3607 2015-03-02 Robert Dewar <dewar@adacore.com>
3608
3609 * elists.adb (List_Length): Fix incorrect result.
3610
3611 2015-03-02 Bob Duff <duff@adacore.com>
3612
3613 * sem_ch6.adb (Check_Private_Overriding): Refine the legality
3614 checks here. It used to check that the function is merely
3615 overriding SOMEthing. Now it checks that the function is
3616 overriding a corresponding public operation. This is a correction
3617 to the implementation of the rule in RM-3.9.3(10).
3618
3619 2015-03-02 Robert Dewar <dewar@adacore.com>
3620
3621 * debug.adb: Document new debug flag -gnatd.1.
3622 * einfo.ads, einfo.adb (Has_Nested_Subprogram): New flag.
3623 (Has_Uplevel_Reference): New flag (Is_Static_Type): New flag.
3624 (Uplevel_Reference_Noted):New flag (Uplevel_References): New field.
3625 * elists.ads elists.adb (List_Length): New function.
3626 * exp_ch6.adb (Expand_N_Subprogram_Body): Call Unnest_Subprogram
3627 when appropriate (Process_Preconditions): Minor code
3628 reorganization and reformatting
3629 * exp_unst.ads, exp_unst.adb: New files.
3630 * gnat1drv.adb (Adjust_Global_Switches): Set
3631 Unnest_Subprogram_Mode if -gnatd.1
3632 * namet.ads, namet.adb (Name_Find_Str): New version of Name_Find with
3633 string argument.
3634 * opt.ads (Unnest_Subprogram_Mode): New flag.
3635 * par-ch3.adb (P_Identifier_Declarations): Fixes to -gnatd.2 handling.
3636 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set
3637 Has_Nested_Subprogram flag.
3638 * sem_ch8.adb (Find_Direct_Name): New calling sequence for
3639 Check_Nested_Access.
3640 (Find_Selected_Component): Minor comment addition.
3641 * sem_util.adb (Check_Nested_Access): New version for use with Exp_Unst.
3642 (Note_Possible_Modification): New calling sequence for
3643 Check_Nested_Access.
3644 * sem_util.ads (Check_Nested_Access): New version for use with Exp_Unst.
3645 * gcc-interface/Make-lang.in (GNAT1_OBJS): Add exp_unst.o
3646
3647 2015-03-02 Pierre-Marie de Rodat <derodat@adacore.com>
3648
3649 * gcc-interface/utils.c (gnat_pushdecl): For non-artificial pointer
3650 types, preserve the original type and create copies just like the C
3651 front-end does. For artificial ones, do not define a name for
3652 the original type.
3653 (create_type_decl): When gnat_pushdecl made the input type the
3654 original type for the new declaration, do not define a stub
3655 declaration for it.
3656 * gcc-interface/utils2.c (build_binary_op): Accept two different
3657 pointer types when they point to the same type.
3658
3659 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
3660
3661 * exp_util.adb (Possible_Bit_Aligned_Component): Do not process
3662 an unanalyzed node.
3663 * sem_util.adb (Kill_Current_Values): Do not invalidate and
3664 de-null a constant.
3665
3666 2015-03-02 Robert Dewar <dewar@adacore.com>
3667
3668 * sem_ch3.adb, exp_attr.adb, checks.adb, exp_aggr.adb: Minor
3669 reformatting.
3670
3671 2015-03-02 Ed Schonberg <schonberg@adacore.com>
3672
3673 * sem_ch8.adb: extend use of Available_Subtype.
3674
3675 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
3676
3677 * sem_prag.adb (Duplication_Error): Remove the special handling
3678 of 'Class or _Class in the context of pre/postconditions.
3679 (Process_Class_Wide_Condition): Remove the special handling of
3680 'Class or _Class in the context of pre/postconditions.
3681 * sem_util.adb (Original_Aspect_Pragma_Name): Names Pre_Class
3682 and Post_Class no longer need to be converted to _Pre and _Post.
3683 * sem_util.ads (Original_Aspect_Pragma_Name): Update the comment
3684 on usage.
3685
3686 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
3687
3688 * exp_ch6.adb (Process_Preconditions): Modify the
3689 mechanism that find the first source declaration to correct exit
3690 the loop once it has been found.
3691
3692 2015-03-02 Gary Dismukes <dismukes@adacore.com>
3693
3694 * a-strsea.adb: Minor typo fix.
3695
3696 2015-03-02 Bob Duff <duff@adacore.com>
3697
3698 * einfo.ads: Minor comment fixes.
3699
3700 2015-03-02 Gary Dismukes <dismukes@adacore.com>
3701
3702 * einfo.adb, checks.adb: Minor reformatting and typo fixes.
3703
3704 2015-03-02 Ed Schonberg <schonberg@adacore.com>
3705
3706 * exp_aggr.adb (Get_Assoc_Expr): If the Default_Component_Value
3707 is defined for the array type, use it instead of a Default_Value
3708 specified for the component type itself.
3709
3710 2015-03-02 Thomas Quinot <quinot@adacore.com>
3711
3712 * exp_attr.adb (Expand_N_Attribute_Reference, case Input): When
3713 expanding a 'Input attribute reference for a class-wide type,
3714 do not generate a separate object declaration for the controlling
3715 tag dummy object; instead, generate the expression inline in the
3716 dispatching call. Otherwise, the declaration (which involves a
3717 call to String'Input, returning a dynamically sized value on the
3718 secondary stack) will be expanded outside of proper secondary
3719 stack mark/release operations, and will thus cause a secondary
3720 stack leak.
3721
3722 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
3723
3724 * checks.adb (Add_Validity_Check): Change the names of all
3725 formal parameters to better illustrate their purpose. Update
3726 the subprogram documentation. Update all occurrences of the
3727 formal parameters. Generate a pre/postcondition pragma by
3728 calling Build_Pre_Post_Condition.
3729 (Build_PPC_Pragma): Removed.
3730 (Build_Pre_Post_Condition): New routine.
3731 * einfo.adb Node8 is no longer used as Postcondition_Proc. Node14
3732 is now used as Postconditions_Proc. Flag240 is now renamed to
3733 Has_Expanded_Contract. (First_Formal): The routine can now
3734 operate on generic subprograms.
3735 (First_Formal_With_Extras): The routine can now operate on generic
3736 subprograms.
3737 (Has_Expanded_Contract): New routine.
3738 (Has_Postconditions): Removed.
3739 (Postcondition_Proc): Removed.
3740 (Postconditions_Proc): New routine.
3741 (Set_Has_Expanded_Contract): New routine.
3742 (Set_Has_Postconditions): Removed.
3743 (Set_Postcondition_Proc): Removed.
3744 (Set_Postconditions_Proc): New routine.
3745 (Write_Entity_Flags): Remove the output of Has_Postconditions. Add
3746 the output of Has_Expanded_Contract.
3747 (Write_Field8_Name): Remove the output of Postcondition_Proc.
3748 (Write_Field14_Name): Add the output of Postconditions_Proc.
3749 * einfo.ads New attributes Has_Expanded_Contract and
3750 Postconditions_Proc along with occurrences in entities.
3751 Remove attributes Has_Postconditions and Postcondition_Proc
3752 along with occurrences in entities.
3753 (Has_Expanded_Contract): New routine along with pragma Inline.
3754 (Has_Postconditions): Removed along with pragma Inline.
3755 (Postcondition_Proc): Removed along with pragma Inline.
3756 (Postconditions_Proc): New routine along with pragma Inline.
3757 (Set_Has_Expanded_Contract): New routine along with pragma Inline.
3758 (Set_Has_Postconditions): Removed along with pragma Inline.
3759 (Set_Postcondition_Proc): Removed along with pragma Inline.
3760 (Set_Postconditions_Proc): New routine along with pragma Inline.
3761 * exp_ch6.adb (Add_Return): Code cleanup. Update the
3762 generation of the call to the _Postconditions routine of
3763 the procedure. (Expand_Non_Function_Return): Reformat the
3764 comment on usage. Code cleanup. Update the generation of
3765 the call to the _Postconditions routine of the procedure or
3766 entry [family].
3767 (Expand_Simple_Function_Return): Update the
3768 generation of the _Postconditions routine of the function.
3769 (Expand_Subprogram_Contract): Reimplemented.
3770 * exp_ch6.ads (Expand_Subprogram_Contract): Update the parameter
3771 profile along the comment on usage.
3772 * exp_ch9.adb (Build_PPC_Wrapper): Code cleanup.
3773 (Expand_N_Task_Type_Declaration): Generate pre/postconditions
3774 wrapper when the entry [family] has a contract with
3775 pre/postconditions.
3776 * exp_prag.adb (Expand_Attributes_In_Consequence): New routine.
3777 (Expand_Contract_Cases): This routine and its subsidiaries now
3778 analyze all generated code.
3779 (Expand_Old_In_Consequence): Removed.
3780 * sem_attr.adb Add with and use clause for Sem_Prag.
3781 (Analyze_Attribute): Reimplment the analysis of attribute 'Result.
3782 (Check_Use_In_Test_Case): Use routine Test_Case_Arg to obtain
3783 "Ensures".
3784 * sem_ch3.adb (Analyze_Declarations): Analyze the contract of
3785 a generic subprogram.
3786 (Analyze_Object_Declaration): Do not create a contract node.
3787 (Derive_Subprogram): Do not create a contract node.
3788 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Do
3789 not create a contract node.
3790 (Analyze_Completion_Contract): New routine.
3791 (Analyze_Function_Return): Alphabetize.
3792 (Analyze_Generic_Subprogram_Body): Alphabetize. Do not create a
3793 contract node. Do not copy pre/postconditions to the original
3794 generic template.
3795 (Analyze_Null_Procedure): Do not create a contract node.
3796 (Analyze_Subprogram_Body_Contract): Reimplemented.
3797 (Analyze_Subprogram_Body_Helper): Do not mark the enclosing scope
3798 as having postconditions. Do not create a contract node. Analyze
3799 the subprogram body contract of a body that acts as a compilation
3800 unit. Expand the subprogram contract after the declarations have
3801 been analyzed.
3802 (Analyze_Subprogram_Contract): Reimplemented.
3803 (Analyze_Subprogram_Specification): Do not create a contract node.
3804 (List_Inherited_Pre_Post_Aspects): Code cleanup.
3805 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Update the
3806 comment on usage.
3807 (Analyze_Subprogram_Contract): Update the
3808 parameter profile and the comment on usage.
3809 * sem_ch7.adb (Analyze_Package_Body_Helper): Do not create a
3810 contract node.
3811 (Analyze_Package_Declaration): Do not create a
3812 contract node.
3813 (Is_Subp_Or_Const_Ref): Ensure that the prefix has an entity.
3814 * sem_ch8.adb (Analyze_Subprogram_Renaming): Do not create a
3815 contract node.
3816 * sem_ch9.adb (Analyze_Entry_Declaration): Do not create a
3817 contract node.
3818 * sem_ch10.adb (Analyze_Compilation_Unit): Move local variables to
3819 their proper section and alphabetize them. Analyze the contract of
3820 a [generic] subprogram after all Pragmas_After have been analyzed.
3821 (Analyze_Subprogram_Body_Stub_Contract): Alphabetize.
3822 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Do not
3823 create a contract node.
3824 (Analyze_Generic_Subprogram_Declaration):
3825 Alphabetize local variables. Do not create a contract
3826 node. Do not generate aspects out of pragmas for ASIS.
3827 (Analyze_Subprogram_Instantiation): Instantiate
3828 the contract of the subprogram. Do not create a
3829 contract node. (Instantiate_Contract): New routine.
3830 (Instantiate_Subprogram_Body): Alphabetize local variables.
3831 (Save_Global_References_In_Aspects): New routine.
3832 (Save_References): Do not save the global references found within
3833 the aspects of a generic subprogram.
3834 * sem_ch12.ads (Save_Global_References_In_Aspects): New routine.
3835 * sem_ch13.adb (Analyze_Aspect_Specifications): Do not use
3836 Original_Node for establishing linkages.
3837 (Insert_Pragma): Insertion in a subprogram body takes precedence over
3838 the case where the subprogram body is also a compilation unit.
3839 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Use
3840 Get_Argument to obtain the proper expression. Install the generic
3841 formals when the related context is a generic subprogram.
3842 (Analyze_Depends_In_Decl_Part): Use Get_Argument to obtain
3843 the proper expression. Use Corresponding_Spec_Of to obtain
3844 the spec. Install the generic formal when the related context
3845 is a generic subprogram.
3846 (Analyze_Global_In_Decl_Part): Use Get_Argument to obtain the proper
3847 expression. Use Corresponding_Spec_Of to obtain the spec. Install the
3848 generic formal when the related context is a generic subprogram.
3849 (Analyze_Initial_Condition_In_Decl_Part): Use Get_Argument
3850 to obtain the proper expression. Remove the call to
3851 Check_SPARK_Aspect_For_ASIS as the analysis is now done
3852 automatically.
3853 (Analyze_Pragma): Update all occurrences
3854 to Original_Aspect_Name. Pragmas Contract_Cases, Depends,
3855 Extensions_Visible, Global, Postcondition, Precondition and
3856 Test_Case now carry generic templates when the related context
3857 is a generic subprogram. The same pragmas are no longer
3858 forcefully fully analyzed when the context is a subprogram
3859 that acts as a compilation unit. Pragmas Abstract_State,
3860 Initial_Condition, Initializes and Refined_State have been clean
3861 up. Pragmas Post, Post_Class, Postcondition, Pre, Pre_Class
3862 and Precondition now use the same routine for analysis. Pragma
3863 Refined_Post does not need to check the use of 'Result or
3864 the lack of a post-state in its expression. Reimplement the
3865 analysis of pragma Test_Case.
3866 (Analyze_Pre_Post_Condition): New routine.
3867 (Analyze_Pre_Post_Condition_In_Decl_Part):
3868 Reimplemented.
3869 (Analyze_Refined_Depends_In_Decl_Part): Use Get_Argument to obtain the
3870 proper expression.
3871 (Analyze_Refined_Global_In_Decl_Part): Use Get_Argument to obtain
3872 the proper expression.
3873 (Analyze_Test_Case_In_Decl_Part): Reimplemented.
3874 (Check_Pre_Post): Removed.
3875 (Check_Precondition_Postcondition): Removed.
3876 (Check_SPARK_Aspect_For_ASIS): Removed.
3877 (Check_Test_Case): Removed.
3878 (Collect_Subprogram_Inputs_Outputs): Use Get_Argument
3879 to obtain the proper expression. Use Corresponding_Spec_Of to
3880 find the proper spec.
3881 (Create_Generic_Template): New routine.
3882 (Duplication_Error): New routine.
3883 (Expression_Function_Error): New routine.
3884 (Find_Related_Subprogram_Or_Body): Moved to the spec
3885 of Sem_Prag. Emit precise error messages. Account for cases of
3886 rewritten expression functions, generic instantiations, handled
3887 sequence of statements and pragmas from aspects.
3888 (Get_Argument): New routine.
3889 (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Removed.
3890 (Preanalyze_CTC_Args): Removed.
3891 (Process_Class_Wide_Condition): New routine.
3892 * sem_prag.ads (Analyze_Test_Case_In_Decl_Part): Update
3893 the parameter profile along with the comment on usage.
3894 (Find_Related_Subprogram_Or_Body): Moved from the body of Sem_Prag.
3895 (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Removed.
3896 (Test_Case_Arg): New routine.
3897 * sem_util.adb Add with and use clauses for Sem_Ch6.
3898 (Add_Contract_Item): This routine now creates a contract
3899 node the first time an item is added. Remove the duplicate
3900 aspect/pragma checks.
3901 (Check_Result_And_Post_State): Reimplemented.
3902 (Corresponding_Spec_Of): New routine.
3903 (Get_Ensures_From_CTC_Pragma): Removed.
3904 (Get_Requires_From_CTC_Pragma): Removed.
3905 (Has_Significant_Contract): New routine.
3906 (Inherit_Subprogram_Contract): Inherit only if the source
3907 has a contract.
3908 (Install_Generic_Formals): New routine.
3909 (Original_Aspect_Name): Removed.
3910 (Original_Aspect_Pragma_Name): New routine.
3911 * sem_util.ads (Check_Result_And_Post_State): Reimplemented.
3912 (Corresponding_Spec_Of): New routine.
3913 (Get_Ensures_From_CTC_Pragma): Removed.
3914 (Get_Requires_From_CTC_Pragma): Removed.
3915 (Has_Significant_Contract): New routine.
3916 (Install_Generic_Formals): New routine.
3917 (Original_Aspect_Name): Removed.
3918 (Original_Aspect_Pragma_Name): New routine.
3919 * sem_warn.adb Add with and use clauses for Sem_Prag.
3920 (Within_Postcondition): Use Test_Case_Arg to extract "Ensures".
3921
3922 2015-03-02 Ed Schonberg <schonberg@adacore.com>
3923
3924 * sem_ch8.adb (Available_Subtype): Optimization in
3925 Find_Selected_Component: when safe, use existing subtype of
3926 array component, possibly discriminant-dependent, rather than
3927 creating new subtype declaration for it. In this fashion different
3928 occurrences of the component have the same subtype, rather than
3929 just equivalent ones. Simplifies value tracing in GNATProve.
3930
3931 2015-03-01 Arnaud Charlet <charlet@adacore.com>
3932
3933 PR ada/65259
3934
3935 * doc/gnat_ugn/gnat_project_manager.rst,
3936 doc/gnat_ugn/platform_specific_information.rst: Remove reference to
3937 image, too troublesome with texi format.
3938 * gnat_ugn.texi: Regenerate.
3939
3940 2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
3941
3942 PR libgomp/64625
3943 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8): Remove.
3944 (DEF_FUNCTION_TYPE_VAR_12): Likewise.
3945 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
3946
3947 2015-02-23 Thomas Schwinge <thomas@codesourcery.com>
3948
3949 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8): Fix number of
3950 arguments parameter.
3951 (DEF_FUNCTION_TYPE_VAR_12): Likewise.
3952
3953 2015-02-22 Arnaud Charlet <charlet@adacore.com>
3954
3955 * doc/Makefile: postprocess texinfo files to update @dircategory
3956 and update texi files under gcc/ada.
3957 * gnat_ugn.texi, gnat_rm.texi: Regenerated.
3958
3959 2015-02-22 Arnaud Charlet <charlet@adacore.com>
3960
3961 * doc/gnat_ugn/project-manager-figure.png,
3962 doc/gnat_ugn/rtlibrary-structure.png: New.
3963
3964 2015-02-22 Tom de Vries <tom@codesourcery.com>
3965
3966 PR ada/65100
3967 * gnat-style.texi (@subsection Loop Statements): Replace @noindent by
3968 @item, and fix warning '@itemize has text but no @item'.
3969
3970 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3971
3972 * sem_prag.adb (Analyze_Pragma, case Obsolescent): Pragma
3973 legally applies to an abstract subprogram declaration.
3974 * freeze.adb: Minor comment addition.
3975
3976 2015-02-20 Robert Dewar <dewar@adacore.com>
3977
3978 * errout.ads: Document replacement of Name_uPre/Post/Type_Invariant.
3979 * erroutc.adb (Set_Msg_Str): Replace _xxx.
3980 (Pre/Post/Type_Invariant) by xxx'Class.
3981 * erroutc.ads (Set_Msg_Str): Replace _xxx.
3982 (Pre/Post/Type_Invariant) by xxx'Class.
3983 * sem_prag.adb (Fix_Error): Remove special casing of
3984 Name_uType_Invariant.
3985 (Analyze_Pre_Post_Condition_In_Decl_Part): Remove special casing of
3986 Name_uPre and Name_uPost in aspect case (done in Errout now).
3987
3988 2015-02-20 Robert Dewar <dewar@adacore.com>
3989
3990 * g-alveop.adb: Minor style fixes.
3991
3992 2015-02-20 Robert Dewar <dewar@adacore.com>
3993
3994 * freeze.adb (Warn_Overlay): Guard against blow up with address
3995 clause.
3996
3997 2015-02-20 Bob Duff <duff@adacore.com>
3998
3999 * exp_attr.adb (May_Be_External_Call): Remove this. There is no need
4000 for the compiler to guess whether the call is internal or external --
4001 it is always external.
4002 (Expand_Access_To_Protected_Op): For P'Access, where P
4003 is a protected subprogram, always create a pointer to the
4004 External_Subprogram.
4005
4006 2015-02-20 Robert Dewar <dewar@adacore.com>
4007
4008 * a-dispat.adb, a-stcoed.ads: Minor reformatting.
4009
4010 2015-02-20 Robert Dewar <dewar@adacore.com>
4011
4012 * sem_ch13.adb (Build_Discrete_Static_Predicate): Allow static
4013 predicate for non-static subtype.
4014 (Build_Predicate_Functions): Do not assume subtype associated with a
4015 static predicate must be static.
4016
4017 2015-02-20 Robert Dewar <dewar@adacore.com>
4018
4019 * errout.adb (Set_Msg_Node): Better handling of internal names
4020 (Set_Msg_Node): Kill message when we cannot eliminate internal name.
4021 * errout.ads: Document additional case of message deletion.
4022 * namet.adb (Is_Internal_Name): Refined to consider wide
4023 strings in brackets notation and character literals not to be
4024 internal names.
4025 * sem_ch8.adb (Find_Selected_Component): Give additional error
4026 when selector name is a subprogram whose first parameter has
4027 the same type as the prefix, but that type is untagged.
4028
4029 2015-02-20 Robert Dewar <dewar@adacore.com>
4030
4031 * g-allein.ads, g-alveop.adb, g-alveop.ads, opt.ads: Minor reformatting
4032
4033 2015-02-20 Tristan Gingold <gingold@adacore.com>
4034
4035 * opt.ads (GNAT_Mode_Config): New variable.
4036 * opt.adb (Set_Opt_Config_Switches): Consider GNAT_Mode_Config
4037 to set Assertions_Enabled.
4038 * switch-c.adb (Scan_Front_End_Switches): Set GNAT_Mode_Config
4039 for -gnatg.
4040
4041 2015-02-20 Robert Dewar <dewar@adacore.com>
4042
4043 * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Add an additional
4044 comment regarding the handling of unterminated fixed-point
4045 constants.
4046 * s-valuns.ads (Scan_Raw_Unsigned): Add comments
4047 corresponding to those previously added for
4048 System.Val_LLU.Scan_Raw_Long_Long_Unsigned.
4049
4050 2015-02-20 Olivier Hainque <hainque@adacore.com>
4051
4052 * g-allein.ads, g-alveop.ads, g-alveop.adb: Code clean ups.
4053
4054 2015-02-20 Robert Dewar <dewar@adacore.com>
4055
4056 * sem_prag.adb: Minor comment clarification.
4057
4058 2015-02-20 Olivier Hainque <hainque@adacore.com>
4059
4060 * g-allein.ads (vec_ctf, vec_vcsfx, vec_vcfux): Remove.
4061 * g-alleve.ads, g-alleva.adb (vcfux): Likewise.
4062 * g-alveop.ads (vec_vcfsx, vec_vcfux): Just rename the ll versions.
4063 (vec_ctf): Now renamings as well.
4064
4065 2015-02-20 Robert Dewar <dewar@adacore.com>
4066
4067 * switch-c.adb, bindgen.adb: Minor reformatting.
4068
4069 2015-02-20 Ed Schonberg <schonberg@adacore.com>
4070
4071 * sem_prag.adb (Analyze_Pragma, case Type_Invariant):
4072 Invariant'class is allowed on an abstract type.
4073
4074 2015-02-20 Ed Schonberg <schonberg@adacore.com>
4075
4076 * sem_ch3.adb (Access_Definition): If the access definition is
4077 for a protected component and defines an access to protected
4078 subprogram, do not create an itype reference for it because a
4079 full type declaration will be built in order to generate the
4080 proper equivalent type.
4081 (Analyze_Subtype_Declaration): Add information of incomplete
4082 subtypes, for Ada 2012 extended uses of incomplete types.
4083
4084 2015-02-20 Gary Dismukes <dismukes@adacore.com>
4085
4086 * sem_res.adb: Minor reformatting.
4087
4088 2015-02-20 Vincent Celier <celier@adacore.com>
4089
4090 * switch-c.adb (Scan_Front_End_Switches): When comparing runtime
4091 path name for several switches --RTS, use the normalized path
4092 names.
4093
4094 2015-02-20 Vincent Celier <celier@adacore.com>
4095
4096 * bindgen.adb: Minor reformatting and code reorganization.
4097
4098 2015-02-20 Jose Ruiz <ruiz@adacore.com>
4099
4100 * a-stcoed.ads: Add spec for this package (Unimplemented_Unit).
4101 * impunit.adb (Non_Imp_File_Names_12): Mark unit a-stcoed.ads as
4102 defined by Ada 2012.
4103
4104 2015-02-20 Arnaud Charlet <charlet@adacore.com>
4105
4106 * sysdep.c, expect.c, s-oscons-tmplt.c, gsocket.h, adaint.c: Remove
4107 obsolete references to RTX, nucleus, VMS.
4108
4109 2015-02-20 Ed Schonberg <schonberg@adacore.com>
4110
4111 * sem_prag.adb (Fix_Error): For an illegal Type_Invariant'Class
4112 aspect, use name that mentions Class explicitly, rather than
4113 compiler-internal name.
4114
4115 2015-02-20 Robert Dewar <dewar@adacore.com>
4116
4117 * debug.adb: Add documentation for -gnatd.2 (allow statements
4118 in decl sequences).
4119 * par-ch3.adb (P_Identifier_Declarations): Handle
4120 statement appearing where declaration expected more cleanly.
4121 (Statement_When_Declaration_Expected): Implement debug flag
4122 -gnatd.2.
4123
4124 2015-02-20 Jose Ruiz <ruiz@adacore.com>
4125
4126 * a-dinopr.ads: Add spec for this package (Unimplemented_Unit).
4127 * a-dispat.ads (Yield): Include procedure added in Ada 2012.
4128 * a-dispat.adb (Yield): Implement procedure added in Ada 2012.
4129 * impunit.adb (Non_Imp_File_Names_05): Mark unit a-dinopr.ads as
4130 defined by Ada 2005.
4131 * snames.ads-tmpl (Name_Non_Preemptive_FIFO_Within_Priorities):
4132 This is the correct name for the dispatching policy (FIFO was
4133 missing).
4134
4135 2015-02-20 Javier Miranda <miranda@adacore.com>
4136
4137 * sem_res.adb (Resolve_Type_Conversion): If the type of the
4138 operand is the limited-view of a class-wide type then recover
4139 the class-wide type of the non-limited view.
4140
4141 2015-02-20 Arnaud Charlet <charlet@adacore.com>
4142
4143 * gcc-interface/Makefile.in: Remove references to nucleus.
4144 * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Procedure): Set
4145 extern_flag to true for Inline_Always subprograms with
4146 Intrinsic convention.
4147
4148 2015-02-20 Yannick Moy <moy@adacore.com>
4149
4150 * sem_prag.ads: Minor typo in comment.
4151
4152 2015-02-20 Pascal Obry <obry@adacore.com>
4153
4154 * s-osprim-mingw.adb: Fix Get_Base_Time parameter mode.
4155
4156 2015-02-20 Vincent Celier <celier@adacore.com>
4157
4158 * makeutl.adb (Get_Directories.Add_Dir): Add a directory only
4159 if it exists.
4160
4161 2015-02-20 Robert Dewar <dewar@adacore.com>
4162
4163 * sem_eval.ads: Minor reformatting.
4164
4165 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
4166
4167 * freeze.adb (Size_Known): Do not set the packed size for
4168 independent type or component.
4169 (Freeze_Array_Type): Check for Independent[_Components] with packing
4170 or explicit component size clause.
4171 * gnat1drv.adb (Post_Compilation_Validation_Checks): Do the validation
4172 of independence pragmas only for non-GCC back-ends.
4173 * sem_ch13.adb (Initialize): Likewise for the initialization.
4174 * sem_prag.adb (Record_Independence_Check): New procedure to record an
4175 independence check in the table.
4176 (Analyze_Pragma): Use it throughout instead of doing it manually.
4177 * gcc-interface/decl.c (gnat_to_gnu_field): Add support for
4178 independent type or component.
4179
4180 2015-02-20 Thomas Quinot <quinot@adacore.com>
4181
4182 * adaint.c (__gnat_readdir): For Solaris, use 64 bit variants of
4183 struct direct and readdir. This is required for NFS filesystems
4184 mounted from servers that use 64-bit cookies.
4185
4186 2015-02-20 Ed Schonberg <schonberg@adacore.com>
4187
4188 * sem_ch12.adb (Analyze_Subprogram_Instantiaion): New subprogram
4189 Build_Subprogram_Renaming, to create renaming of subprogram
4190 instance in the the declaration of the wrapper package rather
4191 than in its body, so that it is available for analysis of aspects
4192 propagated from generic to instantiation.
4193 (Check_Mismatch): An actual for a formal package that is an
4194 incomplete type matches a formal type that is incomplete.
4195 (Instantiate_Package_Body): Move code that builds subprogram
4196 renaming to Analyze_Subprogram_Instantiation.
4197 (Instantiate_Type): The generated subtype is a limited view if
4198 the actual is a limited view.
4199 (Load_Parent_Of_Generic): Retrieve instance declaration from
4200 its new position within wrapper package.
4201
4202 2015-02-20 Arnaud Charlet <charlet@adacore.com>
4203
4204 * s-parame-vxworks.adb, s-os_lib.ads: Update comments.
4205
4206 2015-02-20 Robert Dewar <dewar@adacore.com>
4207
4208 * s-osinte-vxworks.ads (To_Timespec): Add comment about the
4209 issue of negative arguments.
4210
4211 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
4212
4213 * gnat1drv.adb: Minor consistency fix.
4214
4215 2015-02-20 Pascal Obry <obry@adacore.com>
4216
4217 * s-osprim-mingw.adb (Get_Base_Time): Properly release lock in all
4218 paths.
4219
4220 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
4221
4222 * inline.adb (Expand_Inlined_Call): Skip again calls to subprogram
4223 renamings.
4224 * exp_ch6.adb (Expand_Call): Use back-end inlining
4225 instead of expansion for simple subprogram renamings.
4226
4227 2015-02-20 Robert Dewar <dewar@adacore.com>
4228
4229 * exp_util.adb: Minor reformatting.
4230
4231 2015-02-20 Vincent Celier <celier@adacore.com>
4232
4233 * switch-c.adb (Scan_Front_End_Switches): Do not fail when --RTS=
4234 is specified several times with different values that indicates
4235 the same runtime directory.
4236
4237 2015-02-20 Ed Schonberg <schonberg@adacore.com>
4238
4239 * sem_attr.adb (Check_Not_Incomplete_Type): Clean up code to
4240 handle properly illegal uses of attributes on prefixes on an
4241 incomplete type, both when the type of the prefix is locally
4242 incomplete, and when it is a limited view of a type whose
4243 non-limited view is not available.
4244 (Analyze_Attribute): Add calls to Check_Not_Incomplete_Type for
4245 'Address and others.
4246
4247 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
4248
4249 * exp_ch6.adb: Fix minor typo in comment.
4250
4251 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
4252
4253 * sinfo.ads: Add comment.
4254
4255 2015-02-20 Olivier Hainque <hainque@adacore.com>
4256
4257 * opt.ads: Replace Opt.Suppress_All_Inlining by two separate
4258 flags controlling the actual FE inlining out of pragma Inline
4259 and pragma Inline_Always.
4260 * adabkend.adb (Scan_Compiler_Arguments): Set both flags to True
4261 on -fno-inline, which disables all inlining in compilers with
4262 an Ada back-end and without back-end inlining support.
4263 * back_end.adb (Scan_Back_End_Switches): Set the Inline related
4264 flag to True on -fno-inline and leave Inline_Always alone for
4265 gcc back-ends.
4266 * back_end.ads (Scan_Compiler_Arguments): Adjust spec wrt the
4267 names of the Opt flags it sets.
4268 * gnat1drv.adb (Adjust_Global_Switches): Remove test on
4269 Opt.Suppress_All_Inlining in the Back_End_Inlining computation.
4270 * sem_prag.adb (Make_Inline): Remove early return conditioned
4271 on Opt.Suppress_All_Inlining.
4272 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Use the flags to
4273 disable the calls to Build_Body_To_Inline otherwise triggered
4274 by pragma Inline or Inline_Always. This will prevent actual
4275 front-end inlining of the subprogram on calls.
4276
4277 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
4278
4279 * exp_ch3.adb (Default_Initialize_Object): Call Add_Inlined_Body on the
4280 Abort_Undefer_Direct function.
4281 * exp_ch5.adb (Expand_N_Assignment_Statement): Likewise.
4282 * exp_intr.adb (Expand_Unc_Deallocation): Likewise.
4283 * exp_prag.adb (Expand_Pragma_Abort_Defer): Likewise.
4284 * exp_ch4.adb (Expand_N_Selected_Component): Adjust call to
4285 Add_Inlined_Body.
4286 * exp_ch6.adb (Expand_Call): Adjust calls to Add_Inlined_Body.
4287 Remove call to Register_Backend_Call and move code resetting
4288 Needs_Debug_Info on inlined subprograms to...
4289 * inline.ads (Add_Inlined_Body): Add N parameter.
4290 (Register_Backend_Call): Delete.
4291 * inline.adb (Add_Inlined_Body): ...here and simplify.
4292 Register the call with Backend_Calls directly.
4293 (Register_Backend_Call): Delete.
4294 * s-stalib.ads (Abort_Undefer_Direct): Restore pragma Inline.
4295
4296 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
4297
4298 * s-stalib.ads: Fix typo.
4299
4300 2015-02-20 Ed Schonberg <schonberg@adacore.com>
4301
4302 * exp_ch3.adb (Default_Initialize_Object): If the object has a
4303 delayed freeze, the actions associated with default initialization
4304 must be part of the freeze actions, rather that being inserted
4305 directly after the object declaration.
4306
4307 2015-02-20 Robert Dewar <dewar@adacore.com>
4308
4309 * lib-load.adb: Minor comment update.
4310
4311 2015-02-20 Vincent Celier <celier@adacore.com>
4312
4313 * prj-proc.adb (Process_Case_Construction): When there are
4314 incomplete withed projects and the case variable is unknown,
4315 skip the case construction.
4316
4317 2015-02-20 Ed Schonberg <schonberg@adacore.com>
4318
4319 * exp_ch6.adb (Expand_Actuals): Add caller-side invariant checks
4320 when an actual is a view conversion, either because the call is
4321 to an inherited operation, or because the actual is an explicit
4322 type conversion to an ancestor type. Fixes ACATS 4.0D: C732001
4323
4324 2015-02-20 Robert Dewar <dewar@adacore.com>
4325
4326 * einfo.ads: Minor comment updates Fix missing pragma Inline
4327 for Set_Partial_View_Has_Unknown_Discr.
4328 * einfo.adb (Write_Entity_Flags): Add missing entry for
4329 Partial_View_Has_Unknown_Discr.
4330 * sem_ch3.adb: Minor reformatting.
4331
4332 2015-02-20 Vincent Celier <celier@adacore.com>
4333
4334 * opt.ads: Minor cleanup: remove mention of gprmake.
4335 * s-stalib.ads (Abort_Undefer_Direct): Do not inline.
4336 * s-tataat.adb: Do not call System.Tasking.Self but directly
4337 System.Task_Primitives.Operations.Self.
4338
4339 2015-02-20 Arnaud Charlet <charlet@adacore.com>
4340
4341 * gnat_rm.texi, gnat_ugn.texi: Now automatically generated from
4342 sphinx in the doc directory.
4343 * doc: New directory containing sphinx versions of gnat_rm and gnat_ugn
4344
4345 2015-02-20 Robert Dewar <dewar@adacore.com>
4346
4347 * sem_res.adb: Minor reformatting.
4348 * exp_ch9.adb (Build_Protected_Spec): Copy Aliased setting when
4349 building spec.
4350 * sem_ch13.adb (Analyze_Aspect_Specifications): Exclude Boolean
4351 aspects from circuitry setting delay required to false if the
4352 argument is an integer literal.
4353
4354 2015-02-20 Ed Schonberg <schonberg@adacore.com>
4355
4356 * einfo.ads. einfo.adb (Partial_View_Has_Unknown_Discr): New flag
4357 on type entities, to enforce AI12-0133: default initialization
4358 of types whose partial view has unknown discriminants does not
4359 get an invariant check, because clients of the unit can never
4360 declare objects of such types.
4361 * sem_ch3.adb (Find_Type_Name); Set new flag
4362 Partial_View_Has_Unknown_Discr when needed.
4363 * exp_ch3.adb (Expand_N_Object_Declaration): Use flag to suppress
4364 generation of invariant call on default-initialized object.
4365
4366 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
4367
4368 * gcc-interface/decl.c (gnat_to_gnu_param): Do not strip the padding
4369 if the parameter either is passed by reference or if the alignment
4370 would be lowered.
4371
4372 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
4373
4374 * gcc-interface/decl.c (is_cplusplus_method): Use Is_Primitive flag to
4375 detect primitive operations of tagged and untagged types.
4376
4377 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
4378
4379 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not bother about alias
4380 sets in presence of derivation for subprogram types.
4381
4382 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
4383
4384 * gcc-interface/utils.c (begin_subprog_body): Assert that the body is
4385 present in the same context as the declaration.
4386
4387 2015-02-07 Jakub Jelinek <jakub@redhat.com>
4388
4389 PR middle-end/64340
4390 * gcc-interface/trans.c (gigi): Recreate optimization_default_node
4391 and optimization_current_node after tweaking global_options.
4392
4393 2015-02-05 Robert Dewar <dewar@adacore.com>
4394
4395 * prj-proc.adb, sem_aux.adb, exp_ch9.adb, errout.adb, prj-dect.adb,
4396 prj-nmsc.adb: Minor reformatting.
4397
4398 2015-02-05 Ed Schonberg <schonberg@adacore.com>
4399
4400 * sem_type.adb (Covers): In ASIS_Mode the Corresponding_Record
4401 of a protected type may not be available, so to check conformance
4402 with an interface type, examine the interface list in the type
4403 declaration directly.
4404 (Write_Overloads): Improve information for indirect calls,
4405 for debugger use.
4406
4407 2015-02-05 Ed Schonberg <schonberg@adacore.com>
4408
4409 * exp_ch3.adb (Make_Tag_Assignment): Do not perform this
4410 expansion activity in ASIS mode.
4411
4412 2015-02-05 Javier Miranda <miranda@adacore.com>
4413
4414 * errout.adb (Error_Msg_PT): Add missing error.
4415 * sem_ch6.adb (Check_Synchronized_Overriding): Check the missing
4416 RM rule. Code cleanup.
4417 * exp_ch9.adb (Build_Wrapper_Spec): Propagate "constant" in
4418 anonymous access types. Found working on the tests. Code cleanup.
4419
4420 2015-02-05 Vincent Celier <celier@adacore.com>
4421
4422 * prj-dect.adb (Parse_Attribute_Declaration): Continue scanning
4423 when there are incomplete withs.
4424 * prj-nmsc.adb (Process_Naming): Do not try to get the value
4425 of an element when it is nil.
4426 (Check_Naming): Do not check a nil suffix for illegality
4427 * prj-proc.adb (Expression): Do not process an empty term.
4428 * prj-strt.adb (Attribute_Reference): If attribute cannot be
4429 found, parse a possible index to avoid cascading errors.
4430
4431 2015-02-05 Ed Schonberg <schonberg@adacore.com>
4432
4433 * sem_aux.adb (Is_Derived_Type): A subprogram_type generated
4434 for an access_to_subprogram declaration is not a derived type.
4435
4436 2015-02-05 Robert Dewar <dewar@adacore.com>
4437
4438 * errout.adb (Error_Msg_Internal): For non-serious error set
4439 Fatal_Error to Ignored.
4440 * lib-load.adb (Load_Unit): Minor comment updates.
4441 * sem_ch10.adb (Analyze_With_Clause): Propagate Fatal_Error
4442 setting from with'ed unit to with'ing unit.
4443 * sem_prag.adb (Analyze_Pragma, case Warnings): Document handling
4444 of ambiguity.
4445
4446 2015-02-05 Yannick Moy <moy@adacore.com>
4447
4448 * sem_prag.adb, par-prag.adb: Minor code clean up.
4449
4450 2015-02-05 Yannick Moy <moy@adacore.com>
4451
4452 * par-prag.adb (Pragma_Warnings): Update for extended form
4453 of pragma Warnings. The "one" argument case may now have 2 or
4454 3 arguments.
4455 * sem_prag.adb (Analyze_Pragma/Pragma_Warnings): Update for
4456 extended form of pragma Warnings. Pragma with tool name is either
4457 rewritten as null or as an equivalent form without tool name,
4458 before reanalysis.
4459 * snames.ads-tmpl (Name_Gnatprove): New name.
4460
4461 2015-02-05 Robert Dewar <dewar@adacore.com>
4462
4463 * sem_ch13.adb (Add_Invariants): Don't assume invariant is
4464 standard Boolean.
4465 * sem_prag.adb (Analyze_Pragma, case Check): Don't assume
4466 condition is standard Boolean, it can be non-standard derived
4467 Boolean.
4468
4469 2015-02-05 Robert Dewar <dewar@adacore.com>
4470
4471 * checks.adb (Enable_Range_Check): Disconnect attempted
4472 optimization for the case of range check for subscript of
4473 unconstrained array.
4474
4475 2015-02-05 Robert Dewar <dewar@adacore.com>
4476
4477 * par-ch13.adb (With_Present): New function
4478 (Aspect_Specifications_Present): Handle WHEN in place of WITH
4479 (Get_Aspect_Specifications): Comment update.
4480 * par.adb: Comment updates.
4481
4482 2015-02-05 Robert Dewar <dewar@adacore.com>
4483
4484 * errout.adb (Handle_Serious_Error): New setting of Fatal_Error.
4485 * frontend.adb (Frontend): New setting of Fatal_Error.
4486 * lib-load.adb (Create_Dummy_Package_Unit): New setting of
4487 Fatal_Error.
4488 (Load_Main_Source): New setting of Fatal_Error
4489 (Load_Unit): New setting of Fatal_Error.
4490 * lib-writ.adb (Add_Preprocessing_Dependency): New setting of
4491 Fatal_Error.
4492 (Ensure_System_Dependency): New setting of Fatal_Error.
4493 * lib.adb (Fatal_Error): New setting of Fatal_Error
4494 (Set_Fatal_Error): New setting of Fatal_Error.
4495 * lib.ads: New definition of Fatal_Error and associated routines.
4496 * par-ch10.adb (P_Compilation_Unit): New setting of Fatal_Error.
4497 * par-load.adb (Load): New setting of Fatal_Error.
4498 * rtsfind.adb (Load_RTU): New setting of Fatal_Error.
4499 * sem_ch10.adb (Analyze_Compilation_Unit): New setting of
4500 Fatal_Error.
4501 (Optional_Subunit): New setting of Fatal_Error.
4502 (Analyze_Proper_Body): New setting of Fatal_Error.
4503 (Load_Needed_Body): New setting of Fatal_Error.
4504
4505 2015-02-05 Ed Schonberg <schonberg@adacore.com>
4506
4507 * sem_res.adb (Resolve_Call): If the function being called has
4508 out parameters do not check for language version if the function
4509 comes from a predefined unit, as those are always compiled in
4510 Ada 2012 mode.
4511
4512 2015-02-05 Ed Schonberg <schonberg@adacore.com>
4513
4514 * sem_ch3.adb (Process_Full_View): Verify that the full view
4515 of a type extension must carry an explicit limited keyword if
4516 the partial view does (RM 7.3 (10.1)).
4517
4518 2015-02-05 Robert Dewar <dewar@adacore.com>
4519
4520 * g-rannum.adb, g-rannum.ads, s-rannum.adb, s-rannum.ads,
4521 sem_warn.ads: Minor reformatting.
4522 * exp_ch13.adb (Expand_N_Freeze_Entity): Add guard for aspect
4523 deleted by -gnatI.
4524 * sem_prag.adb (Analyze_Pragma, case Type_Invariant): Give
4525 error for abstract type.
4526
4527 2015-02-05 Yannick Moy <moy@adacore.com>
4528
4529 * opt.ads (Warn_On_Suspicious_Contract): Update comment
4530 describing use.
4531 * sem_attr.adb (Analyze_Attribute/Attribute_Update): Warn on
4532 suspicious uses of 'Update.
4533 * sem_warn.adb, sem_warn.ads (Warn_On_Suspicious_Update): New
4534 function issues warning on suspicious uses of 'Update.
4535 * g-rannum.adb, g-rannum.ads, s-rannum.adb, s-rannum.ads: Mark
4536 package spec and body as SPARK_Mode Off.
4537
4538 2015-02-05 Robert Dewar <dewar@adacore.com>
4539
4540 * sem_prag.adb (Set_Elab_Unit_Name): New name for Set_Unit_Name
4541 (Analyze_Pragma): Change Set_Unit_Name to Set_Elab_Unit_Name
4542 (Set_Elab_Unit_Name): Generate reference for Elaborate[_All]
4543 * sem_warn.adb (Warn_On_Unreferenced_Entity): Suppress warning
4544 for exported entity.
4545
4546 2015-02-05 Hristian Kirtchev <kirtchev@adacore.com>
4547
4548 * sem_prag.adb (Check_Pragma_Conformance): Add
4549 local variable Arg. Ensure that all errors are associated with
4550 the pragma if it appears without an argument. Add comments on
4551 various cases.
4552
4553 2015-02-05 Robert Dewar <dewar@adacore.com>
4554
4555 * lib-xref.adb: Minor reformatting.
4556
4557 2015-02-05 Tristan Gingold <gingold@adacore.com>
4558
4559 PR ada/64349
4560 * env.c: Fix thinko: handle Darwin case before default one.
4561
4562 2015-01-30 Robert Dewar <dewar@adacore.com>
4563
4564 * a-assert.adb: Minor reformatting.
4565 * sem_ch13.adb: Minor comment clarification.
4566 * types.ads: Minor comment update.
4567 * sem_eval.adb (Real_Or_String_Static_Predicate_Matches): Avoid blow up
4568 when we have a predicate that is nothing but an inherited dynamic
4569 predicate.
4570
4571 2015-01-30 Jerome Guitton <guitton@adacore.com>
4572
4573 * gcc-interface/Makefile.in (x86-vxworks): Update GCC_SPEC_FILES to
4574 include cert link spec.
4575
4576 2015-01-30 Robert Dewar <dewar@adacore.com>
4577
4578 * einfo.ads: Minor comment fix.
4579 * freeze.adb (Freeze_Profile): Add test for suspicious import
4580 in pure unit.
4581 * sem_prag.adb (Process_Import_Or_Interface): Test for suspicious
4582 use in Pure unit is now moved to Freeze (to properly catch
4583 Pure_Function exemption).
4584
4585 2015-01-30 Bob Duff <duff@adacore.com>
4586
4587 * sem_res.ads: Minor comment fix.
4588 * sem_type.adb: sem_type.adb (Remove_Conversions): Need to
4589 check both operands of an operator.
4590
4591 2015-01-30 Yannick Moy <moy@adacore.com>
4592
4593 * a-assert.ads, a-assert.adb: Mark package spec in SPARK. Set assertion
4594 policy for Pre to Ignore.
4595 (Assert): Add precondition.
4596
4597 2015-01-30 Robert Dewar <dewar@adacore.com>
4598
4599 * sem_prag.adb (Process_Import_Or_Interface): Warn if used in
4600 Pure unit.
4601 * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Clarify
4602 documentation for some special cases of invalid attempts at
4603 based integers.
4604
4605 2015-01-30 Gary Dismukes <dismukes@adacore.com>
4606
4607 * errout.ads: Minor reformatting.
4608
4609 2015-01-30 Yannick Moy <moy@adacore.com>
4610
4611 * inline.adb (Process_Formals): Use the sloc of
4612 the inlined node instead of the sloc of the actual parameter,
4613 when replacing formal parameters by the actual one.
4614
4615 2015-01-30 Arnaud Charlet <charlet@adacore.com>
4616
4617 * g-expect.adb (Get_Command_Output): Use infinite timeout when
4618 calling Expect.
4619
4620 2015-01-30 Ed Schonberg <schonberg@adacore.com>
4621
4622 * sem_ch12.adb (Analyze_Associations): If an in-parameter is
4623 defaulted in an instantiation, add an entry in the list of actuals
4624 to indicate the default value of the formal (as is already done
4625 for defaulted subprograms).
4626
4627 2015-01-30 Javier Miranda <miranda@adacore.com>
4628
4629 * errout.adb (Error_Msg_PT): Minor error phrasing update.
4630
4631 2015-01-30 Robert Dewar <dewar@adacore.com>
4632
4633 * sem_warn.adb (Warn_On_Known_Condition): Improve error message
4634 for object case.
4635
4636 2015-01-30 Pierre-Marie de Rodat <derodat@adacore.com>
4637
4638 * exp_dbug.adb (Get_Encoded_Name): When
4639 -fgnat-encodings=minimal, do not generate names for biased types.
4640
4641 2015-01-30 Tristan Gingold <gingold@adacore.com>
4642
4643 PR ada/64349
4644 * env.c: Move vxworks and darwin includes out of #ifdef IN_RTS.
4645
4646 2015-01-30 Gary Dismukes <dismukes@adacore.com>
4647
4648 * freeze.adb: Minor reformatting.
4649
4650 2015-01-30 Javier Miranda <miranda@adacore.com>
4651
4652 * errout.ads (Error_Msg_PT): Replace Node_Id by Entity_Id and
4653 improve its documentation.
4654 * errout.adb (Error_Msg_PT): Improve the error message.
4655 * sem_ch6.adb (Check_Conformance): Update call to Error_Msg_PT.
4656 (Check_Synchronized_Overriding): Update call to Error_Msg_PT.
4657 * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup.
4658
4659 2015-01-30 Robert Dewar <dewar@adacore.com>
4660
4661 * sem_warn.adb (Warn_On_Known_Condition): Do special casing of
4662 message for False case.
4663
4664 2015-01-30 Doug Rupp <rupp@adacore.com>
4665
4666 * s-vxwext-kernel.ads (Task_Cont): Remove imported subprogram body.
4667 * s-vxwext-kernel.adb (Task_Cont): New subpprogram body specialized for
4668 kernel.
4669
4670 2015-01-30 Gary Dismukes <dismukes@adacore.com>
4671
4672 * sem_attr.adb (Declared_Within_Generic_Unit):
4673 New function to test whether an entity is declared within the
4674 declarative region of a given generic unit.
4675 (Resolve_Attribute): For checking legality of subprogram'Access within
4676 a generic unit, call new Boolean function Declared_Within_Generic_Unit
4677 instead of simply comparing the results of Enclosing_Generic_Unit on
4678 the prefix and access type. Correct minor comment typos.
4679
4680 2015-01-30 Robert Dewar <dewar@adacore.com>
4681
4682 * freeze.adb, exp_util.ads: Update comment.
4683 * exp_util.adb, exp_ch3.adb: Minor code reorganization and reformatting.
4684 * sem_util.adb: Minor: fix typo.
4685
4686 2015-01-30 Hristian Kirtchev <kirtchev@adacore.com>
4687
4688 * sem_attr.adb (Analyze_Attribute): Ensure that
4689 the check concerning Refined_Post takes precedence over the
4690 other cases.
4691
4692 2015-01-30 Gary Dismukes <dismukes@adacore.com>
4693
4694 * sem_prag.adb: Minor typo fixes and reformatting.
4695
4696 2015-01-30 Yannick Moy <moy@adacore.com>
4697
4698 * sem_attr.adb: Code clean up.
4699
4700 2015-01-30 Robert Dewar <dewar@adacore.com>
4701
4702 * ali.adb (Scan_ALI): Set Serious_Errors flag in Unit record.
4703 * ali.ads (Unit_Record): Add new field Serious_Errors.
4704 * lib-writ.adb (Write_Unit_Information): Set SE (serious errors)
4705 attribute in U line.
4706 * lib-writ.ads: New attribute SE (serious erors) in unit line.
4707
4708 2015-01-30 Hristian Kirtchev <kirtchev@adacore.com>
4709
4710 * einfo.adb Update the usage of attributes Entry_Bodies_Array,
4711 Lit_Indexes, Scale_Value, Storage_Size_Variable,
4712 String_Literal_Low_Bound along associated routines and
4713 Write_FieldX_Name.
4714 (Pending_Access_Types): New routine.
4715 (Set_Pending_Access_Types): New routine.
4716 (Write_Field15_Name): Add an entry for Pending_Access_Types.
4717 * einfo.ads Add new attribute Pending_Access_Types along
4718 with usage in nodes. Update the usage of attributes
4719 Entry_Bodies_Array, Lit_Indexes, Scale_Value,
4720 Storage_Size_Variable, String_Literal_Low_Bound.
4721 (Pending_Access_Types): New routine along with pragma Inline.
4722 (Set_Pending_Access_Types): New routine along with pragma Inline.
4723 * exp_ch3.adb (Expand_Freeze_Array_Type): Add new local variable
4724 Ins_Node. Determine the insertion node for anonynous access type
4725 that acts as a component type of an array. Update the call to
4726 Build_Finalization_Master.
4727 (Expand_Freeze_Record_Type): Update
4728 the calls to Build_Finalization_Master.
4729 (Freeze_Type): Remove
4730 local variable RACW_Seen. Factor out the code that deals with
4731 remote access-to-class-wide types. Create a finalization master
4732 when the designated type contains a private component. Fully
4733 initialize all pending access types.
4734 (Process_RACW_Types): New routine.
4735 (Process_Pending_Access_Types): New routine.
4736 * exp_ch4.adb (Expand_Allocator_Expression): Allocation no longer
4737 needs to set primitive Finalize_Address.
4738 (Expand_N_Allocator): Allocation no longer sets primitive
4739 Finalize_Address.
4740 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
4741 Update the call to Build_Finalization_Master.
4742 (Make_Build_In_Place_Call_In_Allocator): Allocation no longer
4743 needs to set primitive Finalize_Address.
4744 * exp_ch7.adb (Add_Pending_Access_Type): New routine.
4745 (Build_Finalization_Master): New parameter profile. Associate
4746 primitive Finalize_Address with the finalization master if the
4747 designated type has been frozen, otherwise treat the access
4748 type as pending. Simplify the insertion of the master and
4749 related initialization code.
4750 (Make_Finalize_Address_Body): Allow Finalize_Address for class-wide
4751 abstract types.
4752 (Make_Set_Finalize_Address_Call): Remove forlam parameter Typ.
4753 Simplify the implementation.
4754 * exp_ch7.ads (Build_Finalization_Master): New parameter profile
4755 along with comment on usage.
4756 (Make_Set_Finalize_Address_Call): Remove formal parameter Typ. Update
4757 the comment on usage.
4758 * exp_util.adb (Build_Allocate_Deallocate_Proc): Use routine
4759 Finalize_Address to retrieve the primitive.
4760 (Finalize_Address): New routine.
4761 (Find_Finalize_Address): Removed.
4762 * exp_util.ads (Finalize_Address): New routine.
4763 * freeze.adb (Freeze_All): Remove the generation of finalization
4764 masters.
4765 * sem_ch3.adb (Analyze_Full_Type_Declaration): Propagate any
4766 pending access types from the partial to the full view.
4767
4768 2015-01-30 Robert Dewar <dewar@adacore.com>
4769
4770 * sem_disp.adb: Minor reformatting.
4771 * sem_disp.ads: Documentation update.
4772
4773 2015-01-30 Ed Schonberg <schonberg@adacore.com>
4774
4775 * sem_disp.adb (Is_Dynamically_Tagged): when applied to an entity
4776 or a function call, return True if type is class-wide.
4777 * sem_res.adb (Resolve_Case_Expression, Resolve_If_Expression);
4778 Apply RM 4.5.7 (17/3): all or none of the dependent expression
4779 of a conditional expression must be dynamically tagged.
4780
4781 2015-01-30 Ed Schonberg <schonberg@adacore.com>
4782
4783 * sem_ch6.adb (Analyze_Function_Return): In an extended return
4784 statement, apply accessibility check to result object when there
4785 is no initializing expression (Ada 2012 RM 6.5 (5.4/3))
4786
4787 2015-01-30 Robert Dewar <dewar@adacore.com>
4788
4789 * sem_ch4.adb (Analyze_If_Expression): Allow for non-standard
4790 Boolean for case where ELSE is omitted.
4791 * sem_res.adb: Minor reformatting.
4792
4793 2015-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
4794
4795 Fix build under cygwin/64.
4796 * adaint.h: Add check for __CYGWIN__.
4797 * mingw32.h: Prevent windows.h from including x86intrin.h in GCC.
4798
4799 2015-01-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
4800
4801 PR ada/64640
4802 * adaint.c: Handle __CYGWIN__ like __MINGW32__ here.
4803 * mingw32.h: Don't include <tchar.h> under cygwin.
4804 (_O_U8TEXT, _O_U16TEXT, _O_WTEXT): Set to _O_TEXT if not yet defined.
4805
4806 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
4807
4808 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8)
4809 (DEF_FUNCTION_TYPE_VAR_12): New macros.
4810
4811 2015-01-09 Michael Collison <michael.collison@linaro.org>
4812
4813 * gcc-interface/cuintp.c: Include hash-set.h, machmode.h,
4814 vec.h, double-int.h, input.h, alias.h, symtab.h,
4815 fold-const.h, wide-int.h, and inchash.h due to
4816 flattening of tree.h.
4817 * gcc-interface/decl.c: Ditto.
4818 * gcc-interface/misc.c: Ditto.
4819 * gcc-interface/targtyps.c: Include hash-set.h, machmode.h,
4820 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h,
4821 fold-const.h, wide-int.h, and inchash.h due to
4822 flattening of tree.h.
4823 * gcc-interface/trans.c: Include hash-set.h, machmode.h,
4824 vec.h, double-int.h, input.h, alias.h, symtab.h, real.h,
4825 fold-const.h, wide-int.h, inchash.h due to
4826 flattening of tree.h.
4827 * gcc-interface/utils.c: Include hash-set.h, machmode.h,
4828 vec.h, double-int.h, input.h, alias.h, symtab.h,
4829 fold-const.h, wide-int.h, and inchash.h due to
4830 flattening of tree.h.
4831 * gcc-interface/utils2.c: Ditto.
4832
4833 2015-01-07 Robert Dewar <dewar@adacore.com>
4834
4835 * sem_warn.adb (Check_One_Unit): Don't give unused entities
4836 warning for a package which is used as a generic parameter.
4837
4838 2015-01-07 Bob Duff <duff@adacore.com>
4839
4840 * usage.adb (Usage): Correct documentation of
4841 -gnatw.f switches.
4842
4843 2015-01-07 Robert Dewar <dewar@adacore.com>
4844
4845 * s-fileio.adb: Minor reformatting.
4846
4847 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4848
4849 * sem_ch12.adb (Instantiate_Object): If formal is an anonymous
4850 access to subprogram, replace its formals with new entities when
4851 building the object declaration, both if actual is present and
4852 when it is defaulted.
4853
4854 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4855
4856 * sem_ch5.adb (Analyze_Assignment): If left-hand side is a view
4857 conversion and type of expression has invariant, apply invariant
4858 check on expression.
4859
4860 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4861
4862 * sem_ch3.adb (Create_Constrained_Components): A call to
4863 Gather_Components may detect an error if an inherited discriminant
4864 that controls a variant is non-static.
4865 * sem_aggr.adb (Resolve_Record_Aggregate, Step 5): The call to
4866 Gather_Components may report an error if an inherited discriminant
4867 in a variant in non-static.
4868 * sem_util.adb (Gather_Components): If a non-static discriminant
4869 is inherited do not report error here, but let caller handle it.
4870 (Find_Actual): Small optimization.
4871
4872 2015-01-07 Bob Duff <duff@adacore.com>
4873
4874 * usage.adb (Usage): Document -gnatw.f switch.
4875
4876 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4877
4878 * sem_ch12.adb: Code clean up and minor reformatting.
4879
4880 2015-01-07 Robert Dewar <dewar@adacore.com>
4881
4882 * exp_ch4.adb (Expand_N_Type_Conversion): Add guard for
4883 Raise_Accessibility_Error call.
4884 * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Add documentation
4885 on handling of invalid digits in based constants.
4886 * s-fatgen.ads: Minor reformatting.
4887 * sem_attr.adb (Analyze_Attribute, case Unrestricted_Access):
4888 Avoid noting bogus modification for Valid test.
4889 * snames.ads-tmpl (Name_Attr_Long_Float): New Name.
4890 * einfo.ads: Minor reformatting.
4891 * sem_warn.adb: Minor comment clarification.
4892 * sem_ch12.adb: Minor reformatting.
4893
4894 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4895
4896 * exp_ch5.adb (Expand_Predicated_Loop): Handle properly loops
4897 over static predicates when the loop parameter specification
4898 carries a Reverse indicator.
4899
4900 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4901
4902 * sem_ch12.adb (Instantiate_Object): If formal has a default,
4903 actual is missing and formal has an anonymous access type, copy
4904 access definition in full so that tree for instance is properly
4905 formatted for ASIS use.
4906
4907 2015-01-07 Bob Duff <duff@adacore.com>
4908
4909 * sem_elab.adb (Check_Internal_Call_Continue): Give a warning
4910 for P'Access, where P is a subprogram in the same package as
4911 the P'Access, and the P'Access is evaluated at elaboration
4912 time, and occurs before the body of P. For example, "X : T :=
4913 P'Access;" would allow a subsequent call to X.all to be an
4914 access-before-elaboration error; hence the warning. This warning
4915 is enabled by the -gnatw.f switch.
4916 * opt.ads (Warn_On_Elab_Access): New flag for warning switch.
4917 * warnsw.adb (Set_Dot_Warning_Switch): Set Warn_On_Elab_Access.
4918 * gnat_ugn.texi: Document the new warning.
4919
4920 2015-01-07 Johannes Kanig <kanig@adacore.com>
4921
4922 * lib-xref-spark_specific.adb (Collect_SPARK_Xrefs): Skip unneeded
4923 cross ref files.
4924
4925 2015-01-07 Robert Dewar <dewar@adacore.com>
4926
4927 * s-taprop-linux.adb, clean.adb: Minor reformatting.
4928
4929 2015-01-07 Arnaud Charlet <charlet@adacore.com>
4930
4931 * s-tassta.adb: Relax some overzealous assertions.
4932
4933 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4934
4935 * sem_ch6.adb (Analyze_Return_Type): An call that returns a limited
4936 view of a type is legal when context is a thunk generated for
4937 operation inherited from an interface.
4938 * exp_ch6.adb (Expand_Simple_Function_Return): If context is
4939 a thunk and return type is an incomplete type do not continue
4940 expansion; thunk will be fully elaborated when generating code.
4941
4942 2015-01-07 Doug Rupp <rupp@adacore.com>
4943
4944 * s-osinte-mingw.ads (LARGE_INTEGR): New subtype.
4945 (QueryPerformanceFrequency): New imported procedure.
4946 * s-taprop-mingw.adb (RT_Resolution): Call above and return
4947 resolution vice a hardcoded value.
4948 * s-taprop-solaris.adb (RT_Resolution): Call clock_getres and return
4949 resolution vice a hardcoded value.
4950 * s-linux-android.ads (clockid_t): New subtype.
4951 * s-osinte-aix.ads (clock_getres): New imported subprogram.
4952 * s-osinte-android.ads (clock_getres): Likewise.
4953 * s-osinte-freebsd.ads (clock_getres): Likewise.
4954 * s-osinte-solaris-posix.ads (clock_getres): Likewise.
4955 * s-osinte-darwin.ads (clock_getres): New subprogram.
4956 * s-osinte-darwin.adb (clock_getres): New subprogram.
4957 * thread.c (__gnat_clock_get_res) [__APPLE__]: New function.
4958 * s-taprop-posix.adb (RT_Resolution): Call clock_getres to
4959 calculate resolution vice hard coded value.
4960
4961 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4962
4963 * exp_util.adb (Make_CW_Equivalent_Type): If root type is a
4964 limited view, use non-limited view when available to create
4965 equivalent record type.
4966
4967 2015-01-07 Vincent Celier <celier@adacore.com>
4968
4969 * gnatcmd.adb: Remove command Sync and any data and processing
4970 related to this command. Remove project processing for gnatstack.
4971 * prj-attr.adb: Remove package Synchonize and its attributes.
4972
4973 2015-01-07 Vincent Celier <celier@adacore.com>
4974
4975 * clean.adb: Minor error message change.
4976
4977 2015-01-07 Tristan Gingold <gingold@adacore.com>
4978
4979 PR ada/64349
4980 * env.c (__gnat_environ): Adjust for darwin9/darwin10.
4981
4982 2015-01-07 Javier Miranda <miranda@adacore.com>
4983
4984 * sem_ch10.adb (Analyze_With_Clause): Compiling under -gnatq
4985 protect the frontend against never ending recursion caused by
4986 circularities in the sources.
4987
4988 2015-01-07 Robert Dewar <dewar@adacore.com>
4989
4990 * a-reatim.adb, make.adb, exp_pakd.adb, i-cpoint.adb, sem_ch8.adb,
4991 exp_ch3.adb: Minor reformatting.
4992
4993 2015-01-07 Doug Rupp <rupp@adacore.com>
4994
4995 * s-linux.ads (clockid_t): New subtype.
4996 * s-osinte-linux.ads (pragma Linker Options): Add -lrt.
4997 (clockid_t): New subtype.
4998 (clock_getres): Import system call.
4999 * s-taprop-linux.adb (System.OS_Constants): With and rename.
5000 (RT_Resolution): Remove
5001 hardcoded value and call clock_getres.
5002 * s-linux-sparc.ads, s-linux-mipsel.ads, s-linux-hppa.ads,
5003 s-linux-alpha.ads, s-linux-x32.ads (clockid_t): Add new subtype.
5004
5005 2015-01-07 Robert Dewar <dewar@adacore.com>
5006
5007 * sem_warn.adb (Check_One_Unit): Guard against context item
5008 with no Entity field.
5009
5010 2015-01-07 Vincent Celier <celier@adacore.com>
5011
5012 * clean.adb (Gnatclean): Warn that 'gnatclean -P' is obsolete.
5013 * make.adb (Initialize): Warn that 'gnatmake -P' is obsolete.
5014
5015 2015-01-07 Vincent Celier <celier@adacore.com>
5016
5017 * prj-conf.adb (Parse_Project_And_Apply_Config): Always finalize
5018 errors/warnings in the first parsing of the project files,
5019 to display the warnings when there is no errors.
5020
5021 2015-01-07 Tristan Gingold <gingold@adacore.com>
5022
5023 * i-cpoint.adb (Copy_Terminated_Array): Nicely handle null target.
5024
5025 2015-01-07 Doug Rupp <rupp@adacore.com>
5026
5027 * s-taprop-vxworks.adb (Stop_All_Tasks): Pass return
5028 value from Int_Lock as parameter to Int_Unlock.
5029 * s-osinte-vxworks.ads (Int_Unlock): Add parameter.
5030 * s-vxwext.ads (Int_Unlock): Likewise.
5031 * s-vxwext-kernel.adb (intUnlock, Int_Unlock): Likewise.
5032 * s-vxwext-kernel.ads (Int_Unlock): Likewise.
5033 * s-vxwext-rtp.adb (Int_Unlock): Likewise.
5034 * s-vxwext-rtp.ads (Int_Unlock): Likewise.
5035
5036 2015-01-07 Pierre-Marie de Rodat <derodat@adacore.com>
5037
5038 * exp_pakd.adb: Add a comment in exp_pakd.adb to explain why we
5039 keep ___XP suffixes
5040
5041 2015-01-07 Tristan Gingold <gingold@adacore.com>
5042
5043 * i-cpoint.adb (Copy_Terminated_Array): Use Copy_Array to
5044 handle overlap.
5045
5046 2015-01-07 Eric Botcazou <ebotcazou@adacore.com>
5047
5048 * sem_ch3.adb (Analyze_Full_Type_Declaration): Do not
5049 automatically set No_Strict_Aliasing on access types.
5050 * fe.h (No_Strict_Aliasing_CP): Declare.
5051 * gcc-interface/trans.c (gigi): Force flag_strict_aliasing to 0 if
5052 No_Strict_Aliasing_CP is set.
5053
5054 2015-01-07 Johannes Kanig <kanig@adacore.com>
5055
5056 * sem_ch8.adb (Analyze_Subprogram_Renaming) do
5057 not build function wrapper in gnatprove mode when the package
5058 is externally axiomatized.
5059
5060 2015-01-07 Jose Ruiz <ruiz@adacore.com>
5061
5062 * a-reatim.adb (Time_Of): Reduce the number of spurious overflows in
5063 intermediate computations when the parameters have different signs.
5064
5065 2015-01-07 Javier Miranda <miranda@adacore.com>
5066
5067 * exp_ch3.adb (Build_Init_Procedure): For derived types,
5068 improve the code which takes care of identifying and moving to
5069 the beginning of the init-proc the call to the init-proc of the
5070 parent type.
5071
5072 2015-01-07 Olivier Hainque <hainque@adacore.com>
5073
5074 * gcc-interface/trans.c (gnat_to_gnu, <N_Expression_With_Action>):
5075 Elaborate the expression as part of the same stmt group as the actions.
5076
5077 2015-01-07 Robert Dewar <dewar@adacore.com>
5078
5079 * sem_ch3.adb: Minor error message change.
5080
5081 2015-01-07 Ed Schonberg <schonberg@adacore.com>
5082
5083 * sem_prag.adb (Analyze_Pragma, case Preelaborable_Initialization):
5084 Following AI05-028, the pragam applies legally to any composite type.
5085
5086 2015-01-07 Arnaud Charlet <charlet@adacore.com>
5087
5088 * s-osinte-vxworks.adb, s-osinte-vxworks.ads
5089 (sigwait, sigwaitinfo): Removed, not needed after all on any
5090 VxWorks configurations.
5091
5092 2015-01-07 Robert Dewar <dewar@adacore.com>
5093
5094 * sem_ch3.adb, freeze.adb, exp_disp.adb: Minor reformatting.
5095
5096 2015-01-07 Javier Miranda <miranda@adacore.com>
5097
5098 * exp_disp.adb (Expand_Interface_Conversion): Adding missing
5099 generation of accessibility check.
5100
5101 2015-01-07 Ed Schonberg <schonberg@adacore.com>
5102
5103 * sem_ch3.adb (Derived_Type_Declaration): In the case of an
5104 illegal completion from a class- wide type, set etype of the
5105 derived type properly to prevent cascaded errors.
5106
5107 2015-01-07 Robert Dewar <dewar@adacore.com>
5108
5109 * prj.ads, i-cpoint.adb, freeze.adb, ghost.adb, prj-err.adb: Minor
5110 reformatting.
5111
5112 2015-01-07 Robert Dewar <dewar@adacore.com>
5113
5114 * restrict.adb (Check_Restriction_No_Use_Of_Attribute):
5115 New procedure.
5116 (OK_No_Use_Of_Entity_Name): New function.
5117 (Set_Restriction_No_Use_Of_Entity): New procedure.
5118 * restrict.ads (Check_Restriction_No_Use_Of_Attribute):
5119 New procedure.
5120 (OK_No_Use_Of_Entity_Name): New function.
5121 (Set_Restriction_No_Use_Of_Entity): New procedure.
5122 * sem_ch8.adb (Find_Direct_Name): Add check for violation of
5123 No_Use_Of_Entity.
5124 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
5125 Add processing for new restriction No_Use_Of_Entity.
5126
5127 2015-01-07 Eric Botcazou <ebotcazou@adacore.com>
5128
5129 * freeze.adb (Freeze_Array_Type): Apply same handling to Is_Atomic
5130 component type as to Has_Atomic_Components type. Remove useless
5131 test on Is_Aliased component type.
5132
5133 2015-01-07 Hristian Kirtchev <kirtchev@adacore.com>
5134
5135 * alloc.ads Alphabetize several declarations. Add constants
5136 Ignored_Ghost_Units_Initial and Ignored_Ghost_Units_Increment.
5137 * atree.adb Add with and use clauses for Opt.
5138 (Allocate_Initialize_Node): Mark a node as ignored Ghost
5139 if it is created in an ignored Ghost region.
5140 (Ekind_In): New variant.
5141 (Is_Ignored_Ghost_Node): New routine.
5142 (Set_Is_Ignored_Ghost_Node): New routine.
5143 * atree.adb Aplhabetize several subprograms declarations. Flag
5144 Spare0 is now known as Is_Ignored_Ghost_Node.
5145 (Ekind_In): New variant.
5146 (Is_Ignored_Ghost_Node): New routine.
5147 (Set_Is_Ignored_Ghost_Node): New routine.
5148 * einfo.adb: Flag 279 is now known as Contains_Ignored_Ghost_Code.
5149 (Contains_Ignored_Ghost_Code): New routine.
5150 (Set_Contains_Ignored_Ghost_Code): New routine.
5151 (Set_Is_Checked_Ghost_Entity, Set_Is_Ignored_Ghost_Entity):
5152 It is now possible to set this property on an unanalyzed entity.
5153 (Write_Entity_Flags): Output the status of flag
5154 Contains_Ignored_Ghost_Code.
5155 * einfo.ads New attribute Contains_Ignored_Ghost_Code along with
5156 usage in nodes.
5157 (Contains_Ignored_Ghost_Code): New routine
5158 along with pragma Inline.
5159 (Set_Contains_Ignored_Ghost_Code): New routine along with pragma Inline.
5160 * exp_ch3.adb Add with and use clauses for Ghost.
5161 (Freeze_Type): Capture/restore the value of Ghost_Mode on entry/exit.
5162 Set the Ghost_Mode in effect.
5163 (Restore_Globals): New routine.
5164 * exp_ch7.adb (Process_Declarations): Do not process a context
5165 that invoves an ignored Ghost entity.
5166 * exp_dbug.adb (Qualify_All_Entity_Names): Skip an ignored Ghost
5167 construct that has been rewritten as a null statement.
5168 * exp_disp.adb Add with and use clauses for Ghost.
5169 (Make_DT): Capture/restore the value of Ghost_Mode on entry/exit. Set
5170 the Ghost_Mode in effect.
5171 (Restore_Globals): New routine.
5172 * exp_util.adb (Requires_Cleanup_Actions): An ignored Ghost entity
5173 does not require any clean up. Add two missing cases that deal
5174 with block statements.
5175 * freeze.adb Add with and use clauses for Ghost.
5176 (Freeze_Entity): Capture/restore the value of Ghost_Mode on entry/exit.
5177 Set the Ghost_Mode in effect.
5178 (Restore_Globals): New routine.
5179 * frontend.adb Add with and use clauses for Ghost. Remove any
5180 ignored Ghost code from all units that qualify.
5181 * ghost.adb New unit.
5182 * ghost.ads New unit.
5183 * gnat1drv.adb Add with clause for Ghost. Initialize and lock
5184 the table in package Ghost.
5185 * lib.ads: Alphabetize several subprogram declarations.
5186 * lib-xref.adb (Output_References): Do not generate reference
5187 information for ignored Ghost entities.
5188 * opt.ads Add new type Ghost_Mode_Type and new global variable
5189 Ghost_Mode.
5190 * rtsfind.adb (Load_RTU): Provide a clean environment when
5191 loading a runtime unit.
5192 * sem.adb (Analyze): Capture/restore the value of Ghost_Mode on
5193 entry/exit as the node may set a different mode.
5194 (Do_Analyze):
5195 Capture/restore the value of Ghost_Mode on entry/exit as the
5196 unit may be withed from a unit with a different Ghost mode.
5197 * sem_ch3.adb Add with and use clauses for Ghost.
5198 (Analyze_Full_Type_Declaration, Analyze_Incomplete_Type_Decl,
5199 Analyze_Number_Declaration, Analyze_Private_Extension_Declaration,
5200 Analyze_Subtype_Declaration): Set the Ghost_Mode in effect. Mark
5201 the entity as Ghost when there is a Ghost_Mode in effect.
5202 (Array_Type_Declaration): The implicit base type inherits the
5203 "ghostness" from the array type.
5204 (Derive_Subprogram): The
5205 alias inherits the "ghostness" from the parent subprogram.
5206 (Make_Implicit_Base): The implicit base type inherits the
5207 "ghostness" from the parent type.
5208 * sem_ch5.adb Add with and use clauses for Ghost.
5209 (Analyze_Assignment): Set the Ghost_Mode in effect.
5210 * sem_ch6.adb Add with and use clauses for Ghost.
5211 (Analyze_Abstract_Subprogram_Declaration, Analyze_Procedure_Call,
5212 Analyze_Subprogram_Body_Helper, Analyze_Subprogram_Declaration):
5213 Set the Ghost_Mode in effect. Mark the entity as Ghost when
5214 there is a Ghost_Mode in effect.
5215 * sem_ch7.adb Add with and use clauses for Ghost.
5216 (Analyze_Package_Body_Helper, Analyze_Package_Declaration,
5217 Analyze_Private_Type_Declaration): Set the Ghost_Mode in
5218 effect. Mark the entity as Ghost when there is a Ghost_Mode
5219 in effect.
5220 * sem_ch8.adb Add with and use clauses for Ghost.
5221 (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
5222 Analyze_Object_Renaming, Analyze_Package_Renaming,
5223 Analyze_Subprogram_Renaming): Set the Ghost_Mode in effect. Mark
5224 the entity as Ghost when there is a Ghost_Mode in effect.
5225 (Find_Type): Check the Ghost context of a type.
5226 * sem_ch11.adb Add with and use clauses for Ghost.
5227 (Analyze_Exception_Declaration): Set the Ghost_Mode in
5228 effect. Mark the entity as Ghost when there is a Ghost_Mode
5229 in effect.
5230 * sem_ch12.adb Add with and use clauses for Ghost.
5231 (Analyze_Generic_Package_Declaration,
5232 Analyze_Generic_Subprogram_Declaration): Set the Ghost_Mode in effect.
5233 Mark the entity as Ghost when there is a Ghost_Mode in effect.
5234 * sem_prag.adb Add with and use clauses for Ghost.
5235 (Analyze_Pragma): Ghost-related checks are triggered when there
5236 is a Ghost mode in effect.
5237 (Create_Abstract_State): Mark the
5238 entity as Ghost when there is a Ghost_Mode in effect.
5239 * sem_res.adb Add with and use clauses for Ghost.
5240 (Check_Ghost_Context): Removed.
5241 * sem_util.adb (Check_Ghost_Completion): Removed.
5242 (Check_Ghost_Derivation): Removed.
5243 (Incomplete_Or_Partial_View):
5244 Add a guard in case the entity has not been analyzed yet
5245 and does carry a scope.
5246 (Is_Declaration): New routine.
5247 (Is_Ghost_Entity): Removed.
5248 (Is_Ghost_Statement_Or_Pragma):
5249 Removed.
5250 (Is_Subject_To_Ghost): Removed.
5251 (Set_Is_Ghost_Entity):
5252 Removed.
5253 (Within_Ghost_Scope): Removed.
5254 * sem_util.adb (Check_Ghost_Completion): Removed.
5255 (Check_Ghost_Derivation): Removed.
5256 (Is_Declaration): New routine.
5257 (Is_Ghost_Entity): Removed.
5258 (Is_Ghost_Statement_Or_Pragma): Removed.
5259 (Is_Subject_To_Ghost): Removed.
5260 (Set_Is_Ghost_Entity): Removed.
5261 (Within_Ghost_Scope): Removed.
5262 * sinfo.ads Add a section on Ghost mode.
5263 * treepr.adb (Print_Header_Flag): New routine.
5264 (Print_Node_Header): Factor out code. Output flag
5265 Is_Ignored_Ghost_Node.
5266 * gcc-interface/Make-lang.in: Add dependency for unit Ghost.
5267
5268 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
5269
5270 * freeze.adb (Freeze_Array_Type) <Complain_CS>: Remove always
5271 true test and unreachable 'else' arm.
5272
5273 2015-01-06 Vincent Celier <celier@adacore.com>
5274
5275 * prj-conf.adb (Check_Target): Improve error message when
5276 there are mismatched targets between the on in the configuration
5277 project file and the specified one, either in the main project
5278 file or in the --target= switch.
5279
5280 2015-01-06 Pascal Obry <obry@adacore.com>
5281
5282 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Mode and
5283 Install_Name attribute definitions.
5284
5285 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5286
5287 * freeze.adb (Wrap_Imported_Subprogram): Indicate that the
5288 generated Import pragma for the internal imported procedure does
5289 not come from an aspect, so that Is_Imported can be properly
5290 set for it.
5291
5292 2015-01-06 Gary Dismukes <dismukes@adacore.com>
5293
5294 * sem_ch12.adb (Might_Inline_Subp): Record whether
5295 any subprograms in the generic package are marked with
5296 pragma Inline_Always (setting flag Has_Inline_Always).
5297 (Analyze_Package_Instantiation): Add test of Has_Inline_Always
5298 alongside existing test of Front_End_Inlining as alternative
5299 conditions for setting Inline_Now. Also add test of
5300 Has_Inline_Always along with Front_End_Inlining test as an
5301 alternative condition for setting Needs_Body to False.
5302
5303 2015-01-06 Tristan Gingold <gingold@adacore.com>
5304
5305 * i-cpoint.adb (Copy_Array): Handle overlap.
5306
5307 2015-01-06 Pascal Obry <obry@adacore.com>
5308
5309 * bindgen.adb: Minor style fix.
5310
5311 2015-01-06 Robert Dewar <dewar@adacore.com>
5312
5313 * sem_util.ads, sem_util.adb: Minor reformatting.
5314
5315 2015-01-06 Vincent Celier <celier@adacore.com>
5316
5317 * prj-conf.adb (Parse_Project_And_Apply_Config): Reset incomplete
5318 with flags before parsing the projects.
5319 * prj-err.adb (Error_Msg): Do nothing if there are incomplete withs.
5320 * prj-part.adb (Post_Parse_Context_Clause): Set Incomplete_Withs
5321 to True in the flags, when Ignore_Missing_With is True and an
5322 imported project cannot be found.
5323 * prj-proc.adb (Expression): When there are incomplete withs and
5324 a variable or attribute is not found, set the variable/attribute
5325 to unknown.
5326 * prj.ads (Processing_Flags): New flag Incomplete_Withs,
5327 defaulted to False.
5328
5329 2015-01-06 Vasiliy Fofanov <fofanov@adacore.com>
5330
5331 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-conf.adb,
5332 prj-err.adb: Add new switch --no-command-line.
5333
5334 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5335
5336 * sem_ch12.adb: Sloc of wrapper is that of instantiation.
5337
5338 2015-01-06 Robert Dewar <dewar@adacore.com>
5339
5340 * sem_ch11.adb: Minor reformatting.
5341
5342 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5343
5344 * exp_aggr.adb (Get_Assoc_Expr): New routine internal to
5345 Build_Array_Aggr_Code, used to initialized components covered
5346 by a box association. If the component type is scalar and has
5347 a default aspect, use it to initialize such components.
5348
5349 2015-01-06 Pascal Obry <obry@adacore.com>
5350
5351 * rtinit.c (__gnat_runtime_initialize): Add a parameter to
5352 control the setup of the exception handler.
5353 * initialize.c: Remove unused declaration.
5354 * bindgen.adb: Always call __gnat_runtime_initialize and pass
5355 whether the exeception handler must be set or not.
5356
5357 2015-01-06 Thomas Quinot <quinot@adacore.com>
5358
5359 * freeze.adb (Set_SSO_From_Defaults): When setting scalar storage
5360 order to native from default, make sure to also adjust bit order.
5361 * exp_aggr.adb: Minor reformatting.
5362
5363 2015-01-06 Robert Dewar <dewar@adacore.com>
5364
5365 * s-valllu.adb, s-valllu.ads, s-valuti.ads, s-valuns.adb, s-valuns.ads,
5366 s-valrea.adb, s-valrea.ads: Add some additional guards for
5367 Str'Last = Positive'Last.
5368
5369 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5370
5371 * sem_ch12.adb, sem_ch8.adb: Ongoing work for wrappers for actual
5372 subprograms.
5373
5374 2015-01-06 Javier Miranda <miranda@adacore.com>
5375
5376 * exp_disp.adb (Expand_Interface_Conversion): Reapply patch.
5377
5378 2015-01-06 Thomas Quinot <quinot@adacore.com>
5379
5380 * sem_util.ads: Minor reformatting.
5381 * sem_cat.adb (In_RCI_Visible_Declarations): Change back to...
5382 (In_RCI_Declaration) Return to old name, as proper checking of
5383 entity being in the visible part depends on entity kind and must
5384 be done by the caller.
5385
5386 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5387
5388 * sem_ch12.adb, sem_ch12.ads, sem_ch8.adb: Ongoing work for wrappers
5389 for operators in SPARK.
5390
5391 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5392
5393 * sem_aggr.adb (Get_Value): In ASIS mode, preanalyze the
5394 expression in an others association before making copies for
5395 separate resolution and accessibility checks. This ensures that
5396 the type of the expression is available to ASIS in all cases,
5397 in particular if the expression is itself an aggregate.
5398
5399 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
5400
5401 * einfo.ads (Has_Independent_Components): Document extended
5402 usage.
5403 * einfo.adb (Has_Independent_Components): Remove obsolete assertion.
5404 (Set_Has_Independent_Components): Adjust assertion.
5405 * sem_prag.adb (Analyze_Pragma): Also set Has_Independent_Components
5406 for pragma Atomic_Components. Set Has_Independent_Components
5407 on the object instead of the type for an object declaration with
5408 pragma Independent_Components.
5409
5410 2015-01-06 Olivier Hainque <hainque@adacore.com>
5411
5412 * set_targ.adb (Read_Target_Dependent_Values): Set
5413 Long_Double_Index when "long double" is read.
5414 (elaboration code): Register_Back_End_Types only when not reading from
5415 config files. Doing otherwise is pointless and error prone.
5416
5417 2015-01-06 Robert Dewar <dewar@adacore.com>
5418
5419 * s-valrea.adb (Value_Real): Check for Str'Last = Positive'Last
5420
5421 2015-01-06 Robert Dewar <dewar@adacore.com>
5422
5423 * a-wtgeau.adb, a-ztgeau.adb, a-tigeau.adb (String_Skip): Raise PE if
5424 Str'Last = Positive'Last.
5425
5426 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5427
5428 * sem_ch6.adb (Matches_Limited_View): Handle properly the case
5429 where the non-limited type is a generic actual and appears as
5430 a subtype of the non-limited view of the other.
5431 * freeze.adb (Build_Renamed_Body): If the return type of the
5432 declaration that is being completed is a limited view and the
5433 non-limited view is available, use it in the specification of
5434 the generated body.
5435
5436 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5437
5438 * sem_ch3.adb (Find_Type_Name): If there is a previous tagged
5439 incomplete view, the type of the classwide type common to both
5440 views is the type being declared.
5441
5442 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
5443
5444 * einfo.ads (Is_Independent): Further document extended usage.
5445
5446 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
5447
5448 * einfo.ads (Is_Independent): Document extended usage.
5449 * einfo.adb (Is_Independent): Remove obsolete assertion.
5450 (Set_Is_Independent): Likewise.
5451 * sem_prag.adb (Process_Atomic_Shared_Volatile): Rename into...
5452 (Process_Atomic_Independent_Shared_Volatile): ...this.
5453 Deal with pragma Independent here.
5454 (Analyze_Pragma): Adjust
5455 to above renaming and also invoke it for pragma Independent.
5456 Adjust comment for Independent_Components.
5457
5458 2015-01-06 Robert Dewar <dewar@adacore.com>
5459
5460 * snames.ads-tmpl: Remove entries for attribute Enum_Image.
5461 * exp_attr.adb: Remove reference to Attribute_Enum_Image.
5462
5463 2015-01-06 Robert Dewar <dewar@adacore.com>
5464
5465 * s-vallli.adb (Value_Long_Long_Integer): Handle case of Str'Last
5466 = Positive'Last.
5467 * s-valllu.adb (Value_Long_Long_Unsigned): Handle case of
5468 Str'Last = Positive'Last.
5469
5470 2015-01-06 Robert Dewar <dewar@adacore.com>
5471
5472 * sem_prag.adb (Process_Inline): Remove redundant construct
5473 warning (-gnatw.r) for an ineffective pragma Inline.
5474
5475 2015-01-06 Robert Dewar <dewar@adacore.com>
5476
5477 * s-valint.adb: Fix typo in last checkin.
5478 * s-valuns.adb (Value_Unsigned): More efficient fix for
5479 Positive'Last case.
5480 * sem_attr.adb (Analyze_Attribute): Minor reformatting
5481 (Eval_Attribute): Static ervaluation of 'Img for enumeration types.
5482
5483 2015-01-06 Robert Dewar <dewar@adacore.com>
5484
5485 * s-valint.adb, s-valuns.adb (Value_Integer): Deal with case where
5486 Str'Last = Positive'Last
5487
5488 2015-01-06 Thomas Quinot <quinot@adacore.com>
5489
5490 * xoscons.adb: Display exception information and return non-zero
5491 exit status in top level exception handler.
5492
5493 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5494
5495 * sem_ch8.adb: Code clean up.
5496
5497 2015-01-06 Tristan Gingold <gingold@adacore.com>
5498
5499 * targparm.ads: Remove obsolete comment.
5500
5501 2015-01-06 Olivier Hainque <hainque@adacore.com>
5502
5503 * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Variable): When
5504 constructing a ref to variable, update inner_const_flag from the
5505 variable TREE_READONLY attribute.
5506 * gcc-interface/targtyps.c (WIDEST_HARDWARE_FP_SIZE): Remove default
5507 definition.
5508 (get_target_float_size): Remove.
5509 (get_target_double_size): Remove.
5510 (get_target_long_double_size): Remove.
5511
5512 2015-01-06 Pascal Obry <obry@adacore.com>
5513
5514 * adaint.c (ProcListEvt): Set to NULL.
5515 * rtinit.c: New file.
5516 (__gnat_rt_init_count): New reference counter set to 0.
5517 (__gnat_runtime_initialize): Move code here from __gnat_initialize when
5518 this code is actually needed for the runtime initialization. This
5519 routine returns immediately if the initialization has already been done.
5520 * final.c: Revert previous change.
5521 * rtfinal.c: New file.
5522 (__gnat_runtime_finalize)[Win32]: Add finalization of the critical
5523 section and event. The default version of this routine is empty (except
5524 for the reference counting code). This routine returns immediately if
5525 some others libraries are referencing the runtime.
5526 * bindgen.adb (Gen_Adainit): Generate call to Runtime_Initialize
5527 remove circuitry to initialize the signal handler as this is
5528 now done by the runtime initialization routine.
5529 (Gen_Adafinal): Generate call to Runtime_Finalize.
5530 * gnat_ugn.texi: Update documentation about concurrency and
5531 initialization/finalization of the run-time.
5532 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Add
5533 references to rtfinal.o and rtinit.o
5534
5535 2015-01-06 Robert Dewar <dewar@adacore.com>
5536
5537 * exp_attr.adb (Expand_N_Attribute_Reference): Add dummy entry
5538 for Enum_Image.
5539 * sem_attr.adb: Implement Enum_Image attribute.
5540 * snames.ads-tmpl: Add entries for Enum_Image attribute.
5541
5542 2015-01-06 Robert Dewar <dewar@adacore.com>
5543
5544 * namet.ads: Document use of Boolean2 for No_Use_Of_Entity.
5545 * restrict.ads (No_Use_Of_Entity): New table.
5546 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
5547 Ignore No_Use_Of_Entity (will be processed in parser).
5548 * snames.ads-tmpl: Add entry for Name_No_Use_Of_Entity.
5549
5550 2015-01-06 Vincent Celier <celier@adacore.com>
5551
5552 * prj-tree.adb (Imported_Or_Extended_Project_Of): Do not try
5553 to check for an extended project, if a project does not have
5554 yet a project declaration.
5555
5556 2015-01-06 Pierre-Marie Derodat <derodat@adacore.com>
5557
5558 * scos.ads: Update documentation about the SCO table build
5559 process and about table records format.
5560 * par_sco.ads (SCO_Record): Rename to SCO_Record_Raw.
5561 (SCO_Record_Filtered): New procedure.
5562 (Set_SCO_Logical_Operator): New procedure.
5563 (dsco): Update documentation.
5564 * par_sco.adb: Update library-level comments.
5565 (SCO_Generation_State_Type): New type.
5566 (SCO_Generation_State): New variable.
5567 (SCO_Raw_Table): New package instanciation.
5568 (Condition_Pragma_Hash_Table): Rename to SCO_Raw_Hash_Table.
5569 ("<"): New.
5570 (Tristate): New type.
5571 (Is_Logical_Operator): Return Tristate and update documentation.
5572 (Has_Decision): Update call to Is_Logical_Operator and complete
5573 documentation.
5574 (Set_Table_Entry): Rename to Set_Raw_Table_Entry, update
5575 comment, add an assertion for state checking and change
5576 references to SCO_Table into SCO_Raw_Table.
5577 (dsco): Refactor to dump the raw and the filtered tables.
5578 (Process_Decisions.Output_Decision_Operand): Handle putative
5579 short-circuit operators.
5580 (Process_Decisions.Output_Element): Update references
5581 to Set_Table_Entry and to Condition_Pragma_Hash_Table.
5582 (Process_Decisions.Process_Decision_Operand): Update call
5583 to Is_Logical_Operator.
5584 (Process_Decisions.Process_Node): Handle putative short-circuit
5585 operators and change references to
5586 SCO_Table into SCO_Raw_Table.
5587 (SCO_Output): Add an assertion
5588 for state checking and remove code that used to stamp out SCO entries.
5589 (SCO_Pragma_Disabled): Change reference to SCO_Table
5590 into SCO_Raw_Table.
5591 (SCO_Record): Rename to SCO_Record_Raw,
5592 add an assertion for state checking and change references
5593 to SCO_Table into SCO_Raw_Table.
5594 (Set_SCO_Condition): Add an assertion for state checking, update
5595 references to Condition_Pragma_Hash_Table and change references to
5596 SCO_Table into SCO_Raw_Table.
5597 (Set_SCO_Pragma_Enabled): Add an assertion for state checking and
5598 change references to SCO_Table into SCO_Raw_Table.
5599 (Set_SCO_Logical_Operator): New procedure.
5600 (Traverse_Declarations_Or_Statements.Set_Statement_Entry): Update
5601 references to Set_Table_Entry and to Condition_Pragma_Hash_Table.
5602 (SCO_Record_Fildered): New procedure.
5603 * gnat1drv.adb (Gnat1drv): Invoke the SCO filtering pass.
5604 * lib-writ.adb (Write_ALI): Invoke the SCO filtering pass and
5605 output SCOs.
5606 * par-load.adb (Load): Update reference to SCO_Record.
5607 * par.adb (Par): Update reference to SCO_Record.
5608 * put_scos.adb (Put_SCOs): Add an assertion to check that no
5609 putative SCO condition reaches this end.
5610 * sem_ch10.adb (Analyze_Proper_Body): Update reference to SCO_Record.
5611 * sem_res.adb (Resolve_Logical_Op): Validate putative SCOs
5612 when corresponding to an "and"/"or" operator affected by the
5613 Short_Circuit_And_Or pragma.
5614
5615 2015-01-06 Robert Dewar <dewar@adacore.com>
5616
5617 * sem_ch8.adb (Analyze_Use_Package): Give more specific error
5618 msg for attempted USE of generic subprogram or subprogram.
5619
5620 2015-01-06 Robert Dewar <dewar@adacore.com>
5621
5622 * s-valllu.adb, a-tiinau.adb, a-timoau.adb, a-ztinau.adb, a-ztmoau.adb,
5623 s-valuns.adb, s-valrea.adb, a-wtflau.adb, a-tiflau.adb, a-ztflau.adb,
5624 a-wtinau.adb, a-wtmoau.adb: Document recognition of : in place of #.
5625
5626 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5627
5628 * sem_ch13.adb (Analyze_Aspect_Specifications): For aspects
5629 that specify stream subprograms, if the prefix is a class-wide
5630 type then the generated attribute definition clause must apply
5631 to the same class-wide type.
5632 (Default_Iterator): An iterator defined by an aspect of some
5633 container type T must have a first parameter of type T, T'class,
5634 or an access to such (from code reading RM 5.5.1 (2/3)).
5635
5636 2015-01-06 Arnaud Charlet <charlet@adacore.com>
5637
5638 * gnat1drv.adb: Minor: complete previous change.
5639
5640 2015-01-06 Olivier Hainque <hainque@adacore.com>
5641
5642 * set_targ.ads (C_Type_For): New function. Return the name of
5643 a C type supported by the back-end and suitable as a basis to
5644 construct the standard Ada floating point type identified by
5645 the T parameter. This is used as a common ground to feed both
5646 ttypes values and the GNAT tree nodes for the standard floating
5647 point types.
5648 * set_targ.adb (Long_Double_Index): The index at which "long
5649 double" gets registered in the FPT_Mode_Table. This is useful to
5650 know whether we have a "long double" available at all and get at
5651 it's characteristics without having to search the FPT_Mode_Table
5652 when we need to decide which C type should be used as the
5653 basis for Long_Long_Float in Ada.
5654 (Register_Float_Type): Fill Long_Double_Index.
5655 (FPT_Mode_Index_For): New function. Return the index in
5656 FPT_Mode_Table that designates the entry corresponding to the
5657 provided C type name.
5658 (FPT_Mode_Index_For): New function. Return the index in
5659 FPT_Mode_Table that designates the entry for a back-end type
5660 suitable as a basis to construct the standard Ada floating point
5661 type identified by the input T parameter.
5662 (elaboration code): Register_Back_End_Types unconditionally,
5663 so C_Type_For can operate regardless of -gnateT. Do it
5664 early so we can query it for the floating point sizes, via
5665 FPT_Mode_Index_For. Initialize Float_Size, Double_Size and
5666 Long_Double_Size from the FPT_Mode_Table, as cstand will do.
5667 * cstand.adb (Create_Float_Types): Use C_Type_For to determine
5668 which C type should be used as the basis for the construction
5669 of the Standard Ada floating point types.
5670 * get_targ.ads (Get_Float_Size, Get_Double_Size,
5671 Get_Long_Double_Size): Remove.
5672 * get_targ.adb: Likewise.
5673
5674 2015-01-06 Thomas Quinot <quinot@adacore.com>
5675
5676 * sem_cat.adb (In_RCI_Declaration): Remove unnecessary
5677 parameter and rename to...
5678 (In_RCI_Visible_Declarations): Fix handling of private part of nested
5679 package.
5680 (Validate_RCI_Subprogram_Declaration): Reject illegal function
5681 returning anonymous access in RCI unit.
5682
5683 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5684
5685 * sem_ch6.adb (New_Overloaded_Entity): In GNATprove mode, a
5686 function wrapper may be a homonym of another local declaration.
5687 * sem_ch8.adb (Analyze_Subprogram_Renaming): In GNATprove mode,
5688 build function and operator wrappers after the actual subprogram
5689 has been resolved, and replace the standard renaming declaration
5690 with the declaration of wrapper.
5691 * sem_ch12.ads (Build_Function_Wrapper, Build_Operator_Wraooer):
5692 make public for use elsewhere.
5693 * sem_ch12.adb (Build_Function_Wrapper, Build_Operator_Wraooer):
5694 rewrite, now that actual is fully resolved when wrapper is
5695 constructed.
5696
5697 2015-01-06 Javier Miranda <miranda@adacore.com>
5698
5699 * exp_disp.adb: Revert previous change.
5700
5701 2015-01-06 Robert Dewar <dewar@adacore.com>
5702
5703 * exp_util.adb: Change name Name_Table_Boolean to
5704 Name_Table_Boolean1.
5705 * namet.adb: Change name Name_Table_Boolean to Name_Table_Boolean1
5706 Introduce Name_Table_Boolean2/3.
5707 * namet.ads: Change name Name_Table_Boolean to Name_Table_Boolean1
5708 Introduce Name_Table_Boolean2/3.
5709 * par-ch13.adb: Change name Name_Table_Boolean to
5710 Name_Table_Boolean1.
5711
5712 2015-01-06 Bob Duff <duff@adacore.com>
5713
5714 * gnat_rm.texi: Improve documentation regarding No_Task_Termination.
5715
5716 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5717
5718 * sem_aggr.adb (Resolve_Record_Aggregte, Get_Value): For an
5719 others choice that covers multiple components, analyze each
5720 copy with the type of the component even in compile-only mode,
5721 to detect potential accessibility errors.
5722
5723 2015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
5724
5725 * sem_res.adb (Is_Assignment_Or_Object_Expression): New routine.
5726 (Resolve_Actuals): An effectively volatile out
5727 parameter cannot act as an in or in out actual in a call.
5728 (Resolve_Entity_Name): An effectively volatile out parameter
5729 cannot be read.
5730
5731 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5732
5733 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If the body is
5734 the expansion of an expression function it may be pre-analyzed
5735 if a 'access attribute is applied to the function, in which case
5736 last_entity may have been assigned already.
5737
5738 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5739
5740 * sem_ch4.adb (Analyze_One_Call): If formal has an incomplete
5741 type and actual has the corresponding full view, there is no
5742 error, but a case of use of incomplete type in a predicate or
5743 invariant expression.
5744
5745 2015-01-06 Vincent Celier <celier@adacore.com>
5746
5747 * makeutl.adb (Insert_No_Roots): Make sure that the same source
5748 in two different project tree is checked in both trees, if they
5749 are sources of two different projects, extended or not.
5750
5751 2015-01-06 Arnaud Charlet <charlet@adacore.com>
5752
5753 * gnat1drv.adb: Minor code clean up.
5754 (Adjust_Global_Switches): Ignore gnatprove_mode in codepeer_mode.
5755
5756 2015-01-06 Bob Duff <duff@adacore.com>
5757
5758 * osint.adb (Read_Source_File): Don't print out
5759 file name unless T = Source.
5760
5761 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5762
5763 * sem_util.adb (Is_Variable, Is_OK_Variable_For_Out_Formal):
5764 recognize improper uses of constant_reference types as actuals
5765 for in-out parameters.
5766 (Check_Function_Call): Do not collect identifiers if function
5767 name is missing because of previous error.
5768
5769 2015-01-06 Robert Dewar <dewar@adacore.com>
5770
5771 * ali-util.adb, sem_prag.adb, rtsfind.adb, sem_util.adb, sem_res.adb,
5772 ali.adb, binde.adb, namet.adb, namet.ads, gnatls.adb, bcheck.adb:
5773 Minor change of name Name_Table_Info => Name_Table_Int.
5774
5775 2015-01-06 Robert Dewar <dewar@adacore.com>
5776
5777 * exp_strm.adb (Build_Elementary_Input_Call): Clarify comments
5778 in previous checkin.
5779 * freeze.adb (Freeze_Fixed_Point_Type): Add warning for shaving
5780 of bounds.
5781 * sem_prag.adb, sem_ch10.adb, sem_ch6.adb: Minor reformatting.
5782
5783 2015-01-06 Vincent Celier <celier@adacore.com>
5784
5785 * a-strsup.adb (Times (Natural;String;Positive)): Raise
5786 Length_Error, not Index_Error, when the result is too long.
5787
5788 2015-01-06 Thomas Quinot <quinot@adacore.com>
5789
5790 * a-direct.adb (Create_Path): Minor error handling and
5791 performance improvement.
5792
5793 2015-01-06 Robert Dewar <dewar@adacore.com>
5794
5795 * checks.ads, sem_ch12.adb: Minor reformatting.
5796 * exp_ch4.adb (Expand_N_Op_Divide): Generate explicit divide by
5797 zero check for fixed-point case if Backend_Divide_Checks_On_Target
5798 is False.
5799
5800 2015-01-06 Robert Dewar <dewar@adacore.com>
5801
5802 * sem_prag.adb (Analyze_Pragma, case No_Elaboration_Code_All):
5803 Do not set restriction No_Elaboration_Code unless the pragma
5804 appears in the main unit).
5805
5806 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5807
5808 * sem_ch10.adb (Is_Regular_With_Clause): Add guard to verify
5809 that with clause has already been analyzed before checking kind
5810 of with_clause.
5811
5812 2015-01-06 Robert Dewar <dewar@adacore.com>
5813
5814 * exp_strm.adb (Build_Elementary_Input_Call): Return base type
5815 (as required by RM).
5816
5817 2015-01-06 Arnaud Charlet <charlet@adacore.com>
5818
5819 * a-reatim.adb ("/"): Add explicit pragma Unsuppress (Division_Check).
5820
5821 2015-01-06 Robert Dewar <dewar@adacore.com>
5822
5823 * sem_prag.adb (Process_Suppress_Unsuppress): Add extra warning
5824 for ignoring pragma Suppress (Elaboration_Check) in SPARK mode.
5825
5826 2015-01-06 Javier Miranda <miranda@adacore.com>
5827
5828 * exp_disp.adb (Expand_Interface_Conversion): No displacement
5829 of the pointer to the object needed when the type of the operand
5830 is not an interface type and the interface is one of its parent
5831 types (since they share the primary dispatch table).
5832
5833 2015-01-06 Vincent Celier <celier@adacore.com>
5834
5835 * prj-env.adb: Minor comment update.
5836
5837 2015-01-06 Javier Miranda <miranda@adacore.com>
5838
5839 * sem_res.adb (Valid_Conversion): Restrict the checks on anonymous
5840 access types whose target type is an interface type to operands
5841 that are access types; required to report an error when the
5842 operand is not an access type.
5843
5844 2015-01-06 Bob Duff <duff@adacore.com>
5845
5846 * a-cfinve.adb (Copy): Set the discriminant to the Length when
5847 Capacity = 0.
5848 * a-cofove.ads (Capacity): Add a postcondition.
5849 * a-cfinve.ads (Capacity): Add a postcondition.
5850 (Reserve_Capacity): Correct the postcondition in the case where
5851 Capacity = 0; that means "Capacity => Length (Container)".
5852 * a-cofove.adb (Elems[c]): Add a comment
5853 explaining the dangers and how to avoid them.
5854
5855 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5856
5857 * sem_ch12.adb: Code clean up.
5858
5859 2015-01-06 Arnaud Charlet <charlet@adacore.com>
5860
5861 * gnatvsn.ads: Bump copyright year.
5862
5863 2015-01-06 Robert Dewar <dewar@adacore.com>
5864
5865 * s-taskin.ads, s-traces.ads: Minor reformatting.
5866 * exp_util.adb: Minor typo fix.
5867
5868 2015-01-06 Vincent Celier <celier@adacore.com>
5869
5870 * gnatls.adb (Search_RTS): Invoke Initialize_Default_Project_Path
5871 with the runtime name.
5872 * prj-env.adb (Initialize_Default_Project_Path): When both
5873 Target_Name and Runtime_Name are not empty string, add to the
5874 project path the two directories .../lib/gnat and .../share/gpr
5875 related to the runtime.
5876 * prj-env.ads (Initialize_Default_Project_Path): New String
5877 parameter Runtime_Name, defaulted to the empty string.
5878
5879 2015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
5880
5881 * frontend.adb: Guard against the case where a configuration
5882 pragma may be split into multiple pragmas and the original
5883 rewritten as a null statement.
5884 * sem_prag.adb (Analyze_Pragma): Insert a brand new Check_Policy
5885 pragma using Insert_Before rather than Insert_Action. This
5886 takes care of the configuration pragma case where Insert_Action
5887 would fail.
5888
5889 2015-01-06 Bob Duff <duff@adacore.com>
5890
5891 * a-coboho.ads (Element_Access): Add "pragma
5892 No_Strict_Aliasing (Element_Access);". This is needed because
5893 we are unchecked-converting from Address to Element_Access.
5894 * a-cofove.ads, a-cofove.adb (Elems,Elemsc): Fix bounds of the
5895 result to be 1.
5896
5897 2015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
5898
5899 * sem_res.adb (Resolve_Actuals): Remove the
5900 restriction which prohibits volatile actual parameters with
5901 enabled external propery Async_Writers to act appear in procedure
5902 calls where the corresponding formal is of mode OUT.
5903
5904 2015-01-05 Jakub Jelinek <jakub@redhat.com>
5905
5906 * gnat_ugn.texi: Bump @copying's copyright year.
5907
5908 2015-01-05 Eric Botcazou <ebotcazou@adacore.com>
5909
5910 PR ada/64492
5911 * gcc-interface/Makefile.in (../stamp-tools): Reinstate dropped code.
5912
5913 2015-01-04 Uros Bizjak <ubizjak@gmail.com>
5914
5915 * gcc-interface/misc.c (internal_error_function): Use xasprintf instead
5916 of unchecked asprintf.
5917
5918 \f
5919 Copyright (C) 2015 Free Software Foundation, Inc.
5920
5921 Copying and distribution of this file, with or without modification,
5922 are permitted in any medium without royalty provided the copyright
5923 notice and this notice are preserved.