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