1 2015-05-28 Robert Dewar <dewar@adacore.com>
3 * sem_ch13.adb, sem_disp.ads: Minor reformatting.
5 2015-05-28 Ed Schonberg <schonberg@adacore.com>
7 * sem_util.adb (Set_Debug_Info_Needed): For a private type
8 whose full view is itself a derived private type, set flag on
9 underlying full view as well, for proper gdb display.
11 2015-05-28 Bob Duff <duff@adacore.com>
13 * exp_tss.ads: Minor comment fix.
14 * exp_ch3.adb (Build_Array_Init_Proc, Build_Record_Init_Proc):
15 Inline init_procs when the type has controlled parts. Remove
16 obsolete comments about those init_procs -- init_procs for
17 such types are no longer complex. A typical init_proc just
18 initializes the 'Tag field, and calls the parent init_proc
19 (e.g. for Limited_Controlled), which calls the grandparent
20 (for Root_Controlled), which does nothing. This all boils down
21 to one instruction when inlined.
22 * exp_ch7.adb (Create_Finalizer): Inline the finalizer.
24 2015-05-28 Ed Schonberg <schonberg@adacore.com>
26 * sem_ch4.adb (Analyze_Selected_Component): If the type to use
27 is a derived type and is a generic actual, the selected component
28 appears within an instance body, and the check over the type
29 has failed, examine ancestor types for the desired component.
30 (Find_Component_In_Instance): If record type is a derived type,
31 examine all ancestors in order to locate desired component.
33 2015-05-27 H.J. Lu <hongjiu.lu@intel.com>
35 * gcc-interface/Makefile.in (TOOLS_LIBS): Add @NO_PIE_FLAG@.
37 2015-05-27 Eric Botcazou <ebotcazou@adacore.com>
39 * gcc-interface/trans.c (elaborate_all_entities): Do not elaborate an
40 incomplete type coming from a limited_with and whose non-limited view
41 comes from the main unit.
43 2015-05-27 Eric Botcazou <ebotcazou@adacore.com>
45 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Move down
46 code applying atomic checks to the object.
48 2015-05-27 Robert Dewar <dewar@adacore.com>
50 * sem_aux.adb: Minor rewording.
52 2015-05-27 Bob Duff <duff@adacore.com>
54 * exp_prag.adb (Expand_Pragma_Abort_Defer): Make
55 pragma Abort_Defer do nothing if Abort_Allowed is False.
57 2015-05-27 Arnaud Charlet <charlet@adacore.com>
59 * exp_ch9.adb, sem_util.adb, sem_util.ads, s-stposu.adb, s-spsufi.ads,
60 sem_elab.ads, g-comlin.ads, errout.ads, exp_ch6.adb, sem_ch4.adb,
61 opt.ads, s-bignum.adb, output.ads, sem_ch13.adb, erroutc.ads,
62 sem_disp.ads, exp_ch3.adb: Minor fixes of duplicate words in comments.
64 2015-05-27 Doug Rupp <rupp@adacore.com>
66 * adaint.c (__gnat_tmp_name) [vxworks]: Robustify and use for rtp as
69 2015-05-27 Pierre-Marie de Rodat <derodat@adacore.com>
71 * par_sco.adb (Process_Decision): Store sloc to
72 condition/pragmas SCOs associations into a temporary table before
73 moving them to the SCO_Raw_Hash_Table so that we can back them
74 out just like we do for SCO entries that are simple decisions
75 in an expression context.
77 2015-05-27 Ed Schonberg <schonberg@adacore.com>
79 * sem_ch6.adb (Process_Formals): A non-private formal type that
80 is a limited view does not have a list of private dependents.
82 2015-05-27 Ed Schonberg <schonberg@adacore.com>
84 * exp_ch5.adb (Expand_N_Case_Statement): If the expression in
85 the case statement is a compile-time known value, we look for a
86 corresponding alternative to optimize the case statement into a
87 single case. If the type has a static predicate and the expression
88 does not satisfy the predicate, there is no legal alternative and
89 this optimization is not applicable. Excecution is erroneous,
90 or else if assertions are enabled, an exception will be raised
91 earlier, at the point the expression is elaborated.
93 2015-05-27 Robert Dewar <dewar@adacore.com>
95 * sem_elab.adb (Check_Internal_Call_Continue): Suppress
96 warning on Finalize, Adjust, or Initialize if type involved has
99 2015-05-27 Ed Schonberg <schonberg@adacore.com>
101 * sem_aux.adb, sem_aux.ads (First_Discriminant): Return empty when
102 applied to a type with no known discriminants.
104 2015-05-26 Robert Dewar <dewar@adacore.com>
106 * errout.ads, sem_ch4.adb, sem_ch6.adb: Minor reformatting.
108 2015-05-26 Bob Duff <duff@adacore.com>
110 * sem_elab.adb (Check_A_Call): In the case where we're
111 calling something in an instance of a generic package that is
112 within this same unit (as the call), make sure we treat it
113 as a call to an entity within the same unit. That is, call
114 Check_Internal_Call, rather than putting "Elaborate_All(X)"
115 on X, which would necessarily result in an elaboration cycle in
116 static-elaboration mode.
118 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
120 * freeze.ads (Is_Atomic_VFA_Aggregate): Adjust profile.
121 * freeze.adb (Is_Atomic_VFA_Aggregate): Change Entity
122 parameter into Node parameter and remove Type parameter.
123 Look at Is_Atomic_Or_VFA both on the type and on the object.
124 (Freeze_Entity): Adjust call to Is_Atomic_VFA_Aggregate.
125 * exp_aggr.adb (Expand_Record_Aggregate): Likewise.
126 (Process_Atomic_Independent_Shared_Volatile): Remove code
127 propagating Atomic or VFA from object to locally-defined type.
129 2015-05-26 Bob Duff <duff@adacore.com>
131 * exp_ch7.adb: Minor comment fix.
133 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
135 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Min/Attr_Max>: Do not
136 bother about NaN's if Machine_Overflows is true.
138 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
140 * gcc-interface/trans.c (gnat_to_gnu) <N_Object_Declaration>: Really
141 force evaluation of the expression, if any, when the object has its
142 elaboration delayed. Do not create a variable at global level.
144 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
146 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Machine>: Do not apply
147 extra-precision trick to literals. Build SAVE_EXPR manually.
149 * gcc-interface/misc.c (enumerate_modes): Add bypass for x86/x86-64.
151 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
153 * gcc-interface/ada-tree.h (DECL_GLOBAL_NONCONSTANT_RENAMING_P): Delete
154 (DECL_RENAMED_OBJECT): Adjust comment.
155 * gcc-interface/gigi.h (record_global_nonconstant_renaming): Delete.
156 (invalidate_global_nonconstant_renamings): Likewise.
157 (gnat_constant_reference_p): Likewise.
158 (rewrite_fn): New function type.
159 (gnat_rewrite_reference): Declare.
160 (call_is_atomic_load): New inline predicate.
161 * gcc-interface/decl.c (elaborate_reference_1): New function.
162 (elaborate_reference): Likewise.
163 (gnat_to_gnu_entity): Call elaborate_reference to elaborate renamings
164 and simplify associated code. Set const_flag to true consistently in
165 conjunction with used_by_ref.
166 * gcc-interface/trans.c (Identifier_to_gnu): Always replace renaming
167 pointers by renamed objects.
168 (outer_atomic_access_required_p): Deal with renamings.
169 (Compilation_Unit_to_gnu): Do not call
170 invalidate_global_nonconstant_renamings.
171 (gnat_to_gnu) <N_Object_Renaming_Declaration>: Adjust comment.
172 (gnat_gimplify_expr): Deal with atomic loads.
173 * gcc-interface/utils.c (global_nonconstant_renamings): Delete.
174 (destroy_gnat_utils): Do not call
175 invalidate_global_nonconstant_renamings.
176 (record_global_nonconstant_renaming): Delete.
177 (invalidate_global_nonconstant_renamings): Likewise.
178 * gcc-interface/utils2.c (call_is_atomic_load): Move to gigi.h.
179 (build_load_modify_store): Build a copy of the destination.
180 (gnat_stabilize_reference_1): Adjust.
181 (gnat_stabilize_reference): Call gnat_stabilize_reference_1 through
182 gnat_rewrite_reference and move bulk of code to...
183 (gnat_rewrite_reference): ...here. New global function.
184 (gnat_constant_reference_p): Delete.
186 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
188 * gcc-interface/gigi.h (gnat_stabilize_reference): Adjust prototype.
189 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not rely on const_flag
190 to detect constant renamings. Be prepared for specific pattern of
191 renamed object based on function calls. Create a constant object
192 for the renaming of a NULL_EXPR or of a CONSTRUCTOR. Adjust calls
193 to gnat_stabilize_reference and tidy up. Remove redundant tests.
194 (elaborate_expression_1): Remove obsolete test and tidy up.
195 * gcc-interface/trans.c (Call_to_gnu): Do not stabilize In/Out or Out
196 parameters passed by reference.
197 (gnat_to_gnu) <N_Selected_Component>: Remove redundant protection again
199 Use gnat_protect_expr instead of gnat_stabilize_reference for general
200 protection against side-effects.
201 * gcc-interface/utils2.c (gnat_stable_expr_p): New predicate.
202 (gnat_save_expr): Invoke it.
203 (gnat_protect_expr): Likewise.
204 (gnat_stabilize_reference_1): Likewise. Remove useless propagation
206 (gnat_stabilize_reference): Remove parameter and adjust throughout.
207 Delete ADDR_EXDR, COMPOUND_EXPR and CONSTRUCTOR cases.
208 Restrict CALL_EXPR case to atomic loads and tweak ERROR_MARK case.
210 2015-05-26 Ed Schonberg <schonberg@adacore.com>
212 * sinfo.ads: Minor reformatting.
213 * sem_aux.ads: Clarify use of First_Discriminant.
214 * sem_ch4.adb (Analyze_Explicit_Dereference): The use of a limited
215 view is replaced with the non-limited view in an instance body,
216 where the enclosing unit must have a regular with_clause on the
218 * sem_ch12.adb (Install_Body): Freeze instantation after its
219 body. Remove useless freeze nodes for incomplete actuals to
220 prevent multiple generation of internal operations.
221 (Instantiate_Package_Body): Set sloc of body appropriately when
222 there are incomplete actuals and the instance body is placed in
223 the body of the enclosing unit.
224 * errout.ads: Consistent punctuation, better alignment and trivial
226 * err_vars.ads: Fix typo.
228 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
230 * sem_ch8.adb (Analyze_Object_Renaming): Lift restriction on
231 components of Volatile_Full_Access objects.
233 2015-05-26 Ed Schonberg <schonberg@adacore.com>
235 * sem_ch6.adb (Is_Non_Overriding_Operation,
236 Get_Generic_Parent_Type): Handle properly the case of a derived
237 scalar type by using the first subtype rather than its generated
240 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
242 * einfo.adb (Write_Field17_Name): Move E_Incomplete_Subtype
244 (Write_Field19_Name): ...here.
246 2015-05-26 Ed Schonberg <schonberg@adacore.com>
248 * sem_ch13.adb: sem_ch13.adb (Add_Predicates): Undo analysis
249 of original expression in ASIS mode: does not solve the ASIS
250 problem of a usable type information, and crashes the back-end
251 when performing type annotations.
253 2015-05-26 Robert Dewar <dewar@adacore.com>
255 * sem_disp.adb (Inherited_Subprograms): Add One_Only parameter.
256 (Is_Overriding_Subprogram): Use One_Only_Parameter.
257 * sem_disp.ads (Inherited_Subprograms): Add One_Only parameter.
259 2015-05-26 Robert Dewar <dewar@adacore.com>
261 * exp_prag.adb, sem_ch3.adb, sem_ch5.adb, exp_ch11.adb, ghost.adb,
262 exp_ch6.adb, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb, sem_ch13.adb,
263 exp_ch3.adb: Minor reformatting.
265 2015-05-26 Bob Duff <duff@adacore.com>
267 * treepr.adb: Minor improvement to debugging routines (pp, pn)
268 robustness. Rearrange the code so passing a nonexistent Node_Id
269 prints "No such node" rather than crashing, and causing gdb to
270 generate confusing messages.
272 2015-05-26 Gary Dismukes <dismukes@adacore.com>
274 * sem_util.adb: Minor typo fix.
276 2015-05-26 Yannick Moy <moy@adacore.com>
278 * sem_aux.adb (Subprogram_Body_Entity): Deal with subprogram stubs.
280 2015-05-26 Hristian Kirtchev <kirtchev@adacore.com>
282 * exp_ch3.adb (Expand_N_Full_Type_Declaration): Capture, set and
283 restore the Ghost mode.
284 (Expand_N_Object_Declaration): Capture, set and restore the Ghost mode.
285 (Freeze_Type): Update the call to Set_Ghost_Mode.
286 (Restore_Globals): New routine.
287 * exp_ch5.adb Add with and use clauses for Ghost.
288 (Expand_N_Assignment_Statement): Capture, set and restore the
290 (Restore_Globals): New routine.
291 * exp_ch6.adb Add with and use clauses for Ghost.
292 (Expand_N_Procedure_Call_Statement): Capture, set and
293 restore the Ghost mode.
294 (Expand_N_Subprogram_Body):
295 Code cleanup. Capture, set and restore the Ghost mode.
296 (Expand_N_Subprogram_Declaration): Capture, set and restore the
298 (Restore_Globals): New routine.
299 * exp_ch7.adb Add with and use clauses for Ghost.
300 (Expand_N_Package_Body): Capture, set and restore the Ghost mode.
301 (Expand_N_Package_Declaration): Capture, set and restore the
303 (Wrap_HSS_In_Block): Create a proper identifier for the block.
304 * exp_ch8.adb Add with and use clauses for Ghost.
305 (Expand_N_Exception_Renaming_Declaration): Code
306 cleanup. Capture, set and restore the Ghost mode.
307 (Expand_N_Object_Renaming_Declaration): Capture, set and restore
309 (Expand_N_Package_Renaming_Declaration): Capture, set and restore the
311 (Expand_N_Subprogram_Renaming_Declaration): Capture, set and
312 restore the Ghost mode.
313 * exp_ch11.adb (Expand_N_Exception_Declaration): Code
314 cleanup. Capture, set and restore the Ghost mode.
315 * exp_disp.adb (Make_DT): Update the call to Set_Ghost_Mode. Do
316 not initialize the dispatch table slot of a Ghost subprogram.
317 * exp_prag.adb Add with and use clauses for Ghost.
318 (Expand_Pragma_Check): Capture, set and restore the Ghost mode.
319 (Expand_Pragma_Contract_Cases): Capture, set and restore the
321 (Expand_Pragma_Initial_Condition): Capture, set and
322 restore the Ghost mode.
323 (Expand_Pragma_Loop_Variant): Capture,
324 set and restore the Ghost mode.
325 (Restore_Globals): New routine.
326 * exp_util.adb Add with and use clauses for Ghost.
327 (Make_Predicate_Call): Code cleanup. Capture, set and restore
329 (Restore_Globals): New routine.
330 * freeze.adb (Freeze_Entity): Code cleanup. Update the call
332 * ghost.adb Add with and use clause for Sem_Prag.
333 (Check_Ghost_Completion): Code cleanup.
334 (Check_Ghost_Overriding): New routine.
335 (Check_Ghost_Policy): Code cleanup.
336 (Ghost_Entity): New routine.
337 (Is_Ghost_Declaration): Removed.
338 (Is_Ghost_Statement_Or_Pragma): Removed.
339 (Is_OK_Context): Reimplemented.
340 (Is_OK_Declaration): New routine.
341 (Is_OK_Pragma): New routine.
342 (Is_OK_Statement): New routine.
343 (Mark_Full_View_As_Ghost): New routine.
344 (Mark_Pragma_As_Ghost): New routine.
345 (Mark_Renaming_As_Ghost): New routine.
346 (Propagate_Ignored_Ghost_Code): Update the comment on usage.
347 (Set_From_Entity): New routine.
348 (Set_From_Policy): New routine.
349 (Set_Ghost_Mode): This routine now handles pragmas and freeze nodes.
350 (Set_Ghost_Mode_For_Freeze): Removed.
351 (Set_Ghost_Mode_From_Entity): New routine.
352 (Set_Ghost_Mode_From_Policy): Removed.
353 * ghost.ads (Check_Ghost_Overriding): New routine.
354 (Mark_Full_View_As_Ghost): New routine.
355 (Mark_Pragma_As_Ghost): New routine.
356 (Mark_Renaming_As_Ghost): New routine.
357 (Set_Ghost_Mode): Update the parameter profile. Update the
359 (Set_Ghost_Mode_For_Freeze): Removed.
360 (Set_Ghost_Mode_From_Entity): New routine.
361 * sem_ch3.adb (Analyze_Full_Type_Declaration):
362 Capture and restore the Ghost mode. Mark a type
363 as Ghost regardless of whether it comes from source.
364 (Analyze_Incomplete_Type_Decl): Capture, set and restore the
366 (Analyze_Number_Declaration): Capture and restore the Ghost mode.
367 (Analyze_Object_Declaration): Capture and restore the Ghost mode.
368 (Analyze_Private_Extension_Declaration): Capture and
369 restore the Ghost mode.
370 (Analyze_Subtype_Declaration): Capture and restore the Ghost mode.
371 (Process_Full_View): The full view inherits all Ghost-related
372 attributes from the private view.
373 (Restore_Globals): New routine.
374 * sem_ch5.adb (Analyze_Assignment): Capture and restore the
376 (Restore_Globals): New routine.
377 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration):
378 Code cleanup. Capture and restore the Ghost mode. Mark a
379 subprogram as Ghost regarless of whether it comes from source.
380 (Analyze_Procedure_Call): Capture and restore the Ghost mode.
381 (Analyze_Subprogram_Body_Helper): Capture and restore the Ghost mode.
382 (Analyze_Subprogram_Declaration): Capture and restore the Ghost mode.
383 (New_Overloaded_Entity): Ensure that a
384 parent subprogram and an overriding subprogram have compatible
386 * sem_ch7.adb (Analyze_Package_Body_Helper): Capture and restore
388 (Analyze_Package_Declaration): Capture and
389 restore the Ghost mode. Mark a package as Ghost when it is
390 declared in a Ghost region.
391 (Analyze_Private_Type_Declaration): Capture and restore the Ghost mode.
392 (Restore_Globals): New routine.
393 * sem_ch8.adb (Analyze_Exception_Renaming): Code
394 reformatting. Capture and restore the Ghost mode. A renaming
395 becomes Ghost when its name references a Ghost entity.
396 (Analyze_Generic_Renaming): Capture and restore the Ghost mode. A
397 renaming becomes Ghost when its name references a Ghost entity.
398 (Analyze_Object_Renaming): Capture and restore the Ghost mode. A
399 renaming becomes Ghost when its name references a Ghost entity.
400 (Analyze_Package_Renaming): Capture and restore the Ghost mode. A
401 renaming becomes Ghost when its name references a Ghost entity.
402 (Analyze_Subprogram_Renaming): Capture and restore the Ghost
403 mode. A renaming becomes Ghost when its name references a
405 * sem_ch11.adb (Analyze_Exception_Declaration): Capture, set
406 and restore the Ghost mode.
407 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Capture and
408 restore the Ghost mode.
409 (Analyze_Generic_Subprogram_Declaration):
410 Capture and restore the Ghost mode.
411 * sem_ch13.adb Add with and use clauses for Ghost.
412 (Add_Invariant): New routine.
413 (Add_Invariants): Factor out code.
414 (Add_Predicate): New routine.
415 (Add_Predicates): Factor out code.
416 (Build_Invariant_Procedure_Declaration): Code cleanup. Capture,
417 set and restore the Ghost mode.
418 (Build_Invariant_Procedure): Code cleanup.
419 (Build_Predicate_Functions): Capture, set and
420 restore the Ghost mode. Mark the generated functions as Ghost.
421 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
422 Capture, set and restore the Ghost mode.
423 (Analyze_External_Property_In_Decl_Part): Capture, set and restore
425 (Analyze_Initial_Condition_In_Decl_Part):
426 Capture, set and restore the Ghost mode.
428 Code cleanup. Capture, set and restore the Ghost mode. Flag
429 pragmas Linker_Section, No_Return, Unmodified, Unreferenced and
430 Unreferenced_Objects as illegal when it applies to both Ghost
431 and living arguments. Pragma Ghost cannot apply to synchronized
433 (Check_Kind): Moved to the spec of Sem_Prag.
434 (Process_Inline): Flag the pragma as illegal when it applies to
435 both Ghost and living arguments.
436 (Restore_Globals): New routine.
437 * sem_prag.ads Add pragma Default_Initial_Condition
438 to table Assertion_Expression_Pragma. Add new table
439 Is_Aspect_Specifying_Pragma.
440 (Check_Kind): Moved from body of Sem_Prag.
441 * sem_util.adb Add with and use clauses for Ghost.
442 (Build_Default_Init_Cond_Procedure_Body): Capture, set and restore
444 (Build_Default_Init_Cond_Procedure_Declaration):
445 Capture, set and restore the Ghost mode. Mark the default
446 initial condition procedure as Ghost when it is declared
448 (Is_Renaming_Declaration): New routine.
449 (Policy_In_List): Account for the single argument version of
451 * sem_util.ads (Is_Renaming_Declaration): New routine.
452 * sinfo.adb (Is_Ghost_Pragma): New routine.
453 (Set_Is_Ghost_Pragma): New routine.
454 * sinfo.ads New attribute Is_Ghost_Pragma.
455 (Is_Ghost_Pragma): New routine along with pragma Inline.
456 (Set_Is_Ghost_Pragma): New routine along with pragma Inline.
458 2015-05-26 Robert Dewar <dewar@adacore.com>
460 * sem_ch3.adb, sem_aux.adb, sem_aux.ads, exp_ch6.adb, sprint.adb:
463 2015-05-26 Gary Dismukes <dismukes@adacore.com>
465 * gnat1drv.adb, targparm.adb, targparm.ads, restrict.adb: Minor
466 reformatting and typo fixes in comments.
468 2015-05-26 Ed Schonberg <schonberg@adacore.com>
470 * sem_ch7.adb (Swap_Private_Dependets): Set visibility of
471 the two views of a private dependent in two separate steps,
472 to ensure proper visibility in parent units analyzed for inlining.
474 2015-05-26 Yannick Moy <moy@adacore.com>
476 * sem_aux.adb, sem_aux.ads (Get_Low_Bound): Use Type_Low_Bound.
477 (Package_Body, Package_Spec): New queries moved
479 (Package_Specification): Simplify query to remove use of loop.
480 * sem_util.adb, sem_util.ads (Enclosing_Declaration,
481 Enclosing_Package_Or_Subprogram, Is_Attribute_Update): New
482 queries moved here from GNATprove.
484 2015-05-26 Bob Duff <duff@adacore.com>
486 * einfo.adb, einfo.ads, sprint.adb, lib-xref.ads: Minor cleanup: Remove
487 obsolete Entity_Kinds E_String_Type and E_String_Subtype. Update
488 redundant assertions.
490 2015-05-26 Gary Dismukes <dismukes@adacore.com>
492 * sem_util.adb, sem_util.ads, sem_ch13.adb: Minor typo fixes.
494 2015-05-26 Doug Rupp <rupp@adacore.com>
496 * init.c [vxworks]: Refine previous checkin.
498 2015-05-26 Robert Dewar <dewar@adacore.com>
500 * exp_ch4.adb (Wrap_MA): New function.
501 (Expand_N_Op_Expon): Use Wrap_MA.
503 2015-05-26 Bob Duff <duff@adacore.com>
505 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
506 Do not use secondary stack to return limited records with
507 defaulted discriminants. This is an efficiency improvement.
508 * exp_ch6.adb, exp_dist.adb, sem_attr.adb, sem_aux.adb, sem_aux.ads,
509 sem_ch12.adb, sem_ch3.adb, sem_ch4.adb, sem_ch6.adb, sem_ch7.adb,
510 sem_util.adb: Change the sense of Is_Indefinite_Subtype to be
511 Is_Definite_Subtype. This is an improvement to readability (the double
512 negative in "not Is_Indefinite_Subtype" was slightly confusing). Also
513 disallow passing non-[sub]type entities, an unnecessary and slightly
514 bug-prone flexibility.
516 2015-05-26 Robert Dewar <dewar@adacore.com>
518 * sem_aggr.adb (Resolve_Array_Aggregate): Defend against
520 * debug.adb: Document -gnatd.k.
521 * erroutc.adb (Set_Msg_Insertion_Line_Number): Implement -gnatd.k.
523 2015-05-26 Robert Dewar <dewar@adacore.com>
525 * gnat1drv.adb (Gnat1drv): Provide new arguments for
526 Get_Target_Parameters.
527 * restrict.adb (Set_Restriction_No_Specification_Of_Aspect):
529 (Set_Restriction_No_Use_Of_Attribute): new procedure.
530 * restrict.ads (Set_Restriction_No_Specification_Of_Aspect):
532 (Set_Restriction_No_Use_Of_Attribute): new procedure.
533 * s-rident.ads (Integer_Parameter_Restrictions): New subtype.
534 * targparm.adb (Get_Target_Parameters): Allow new restriction
535 pragmas No_Specification_Of_Aspect No_Use_Of_Attribute
537 * targparm.ads: New parameters for Get_Target_Parameters.
538 * tbuild.adb (Set_NOD): New name for Set_RND.
539 (Set_NSA): New procedure.
540 (Set_NUA): New procedure.
541 (Set_NUP): New procedure.
542 * tbuild.ads (Make_SC): Minor reformatting.
543 (Set_NOD): New name for Set_RND.
544 (Set_NSA, Set_NUA, Set_NUP): New procedure.
546 2015-05-26 Ed Schonberg <schonberg@adacore.com>
548 * a-stwise.adb (Find_Token): If source'first is not positive,
549 an exception must be raised, as specified by RM 2005 A.4.3
550 (68/1). This must be checked explicitly, given that run-time
551 files are normally compiled without constraint checks.
552 * a-stzsea.adb (Find_Token): Ditto.
554 2015-05-26 Ed Schonberg <schonberg@adacore.com>
556 * sem_util.ads sem_util.adb (Is_Current_Instance): New predicate
557 to fully implement RM 8.6 (17/3). which earlier only applied
558 to synchronized types. Used to preanalyze aspects that include
559 current instances of types, such as Predicate and Invariant.
560 * sem_res.adb (Resolve_Entity_Name): Use Is_Current_Instance.
561 * sem_ch13.adb (Add_Predicates): In ASIS mode, preserve original
562 expression of aspect and analyze it to provide proper type
565 2015-05-26 Robert Dewar <dewar@adacore.com>
567 * rtsfind.ads: Add entries for RE_Exn[_Long]_Float.
568 * s-exnllf.adb (Exn_Float): New function.
569 (Exn_Long_Float): New function.
570 (Exn_Long_Long_Float): Rewritten interface.
571 (Exp): New name for what used to be Exn_Long_Long_Float.
572 * s-exnllf.ads (Exn_Float): New function.
573 (Exn_Long_Float): New function.
575 2015-05-26 Ed Schonberg <schonberg@adacore.com>
577 * sem_ch8.adb (Find_Selected_Component): Do not emit an error
578 on a selected component when the prefix is a type name that is
580 * einfo.ads: Minor grammar fix.
582 2015-05-26 Doug Rupp <rupp@adacore.com>
584 * init.c [vxworks] (sysLib.h): Only for x86.
586 2015-05-26 Doug Rupp <rupp@adacore.com>
588 * init-vxsim.c (CPU): define as __VXSIM_CPU__
589 * sigtramp-vxworks-vxsim.c (CPU): Likewise.
590 sigtramp-vxworks-target.inc: Add check for SIMLINUX.
591 * sigtramp.h: Likewise.
593 2015-05-26 Robert Dewar <dewar@adacore.com>
595 * sem_aux.adb, sem_disp.adb, sem_util.ads: Add comment.
596 * sem_util.adb: Minor reformatting
598 2015-05-26 Yannick Moy <moy@adacore.com>
600 * inline.adb (Has_Initialized_Type): Adapt to new names.
601 * sem_aux.adb, sem_aux.ads (Get_Low_Bound, Number_Components,
602 Subprogram_Body, Subprogram_Body_Entity, Subprogram_Spec,
603 Subprogram_Specification): New query functions used in GNATprove.
604 * sem_disp.adb, sem_disp.ads (Is_Overriding_Subprogram): New
605 query functions used in GNATprove.
606 * sem_util.adb, sem_util.adso (Enclosing_Lib_Unit_Node,
607 Get_Cursor_Type, Get_Return_Object, Get_User_Defined_Eq,
608 Is_Double_Precision_Floating_Point_Type,
609 Is_Single_Precision_Floating_Point_Type): New query functions
612 2015-05-26 Bob Duff <duff@adacore.com>
614 * s-rpc.ads (Partition_ID): Increase maximum Partition_ID to
616 * a-except-2005.adb, a-except-2005.ads, a-except.adb,
617 a-except.ads, a-exexda.adb, a-exstat.adb: Minor comment fixes.
619 2015-05-26 Robert Dewar <dewar@adacore.com>
621 * sinfo.adb: Minor comment addition.
622 * einfo.adb: Minor whitespace and punctuation fix.
623 * sem_util.adb: Minor editing of comments.
625 2015-05-26 Ed Schonberg <schonberg@adacore.com>
627 * sem_ch7.adb (Install_Private_Declarations,
628 Swap_Private_Dependents): Ensure that both views of the dependent
629 subtype are immediately visible if we are within their scope. This
630 may be needed when a procedure body is both the parent of an
631 instantiated child unit, and is itself used to inline a local
634 2015-05-26 Gary Dismukes <dismukes@adacore.com>
636 * exp_prag.adb, gnat1drv.adb: Minor reformatting.
638 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
640 * exp_ch4.adb (Expand_N_Indexed_Component): In the circuit
641 detecting exceptions to the rewriting, deal with implicit
642 dereferences in the selected component case.
644 2015-05-26 Bob Duff <duff@adacore.com>
646 * sem_ch13.adb (Analyze_One_Aspect): Do not
647 require the expression of the Disable_Controlled aspect to be
648 static in a generic template, because 'Enabled is not known
651 2015-05-26 Doug Rupp <rupp@adacore.com>
653 * init-vxsim.c: New file for vxsim ZCX
654 * sigtramp-vxworks-vxsim.c: Likewise.
655 * sigtramp-vxworks.c: Factor out target dependent bits into ...
656 * sigtramp-vxworks-target.inc: ... here.
657 * sigtramp.h: Add vxsim zcx protos.
658 * init.c [vxworks...] (sysLib.h): Include.
659 (__gnat_map_signal): Make global.
660 [...i386] (__gnat_error_handler): Call __gnat_vxsim_error_handler if
662 [...i386] (__gnat_install_handler): Test if on vxsim.
664 2015-05-26 Ed Schonberg <schonberg@adacore.com>
666 * sem_ch5.adb (Analyze_Iterator_Specification): For an element
667 iterator over an array, if the component is aliased, the loop
668 variable is aliased as well.
670 2015-05-26 Ed Schonberg <schonberg@adacore.com>
672 * exp_ch6.adb (Expand_Actuals): For a function call with in-out
673 parameters that is rewritten as an expression_with_actions,
674 we preserve the original function call node for further use by
675 the caller (typically Expand_Call). In the presence of validity
676 checks, that function call, though it is labelled Analyzed to
677 prevent an infinite recursion, may be rewritten as a temporary
678 by Remove_Side_Effects. Ensure that the caller has access to
679 the original function call to continue expansion.
680 * atree.ads: Minor typo in comment.
682 2015-05-26 Javier Miranda <miranda@adacore.com>
684 * sem_util.adb (Check_Function_Writable_Actuals):
685 Add missing support to check the violation of writable actuals
686 in array aggregates that have a nonstatic range.
688 2015-05-26 Hristian Kirtchev <kirtchev@adacore.com>
690 * exp_ch6.adb (Process_Contract_Cases_For): Update the call to
691 Expand_Pragma_Contract_Cases.
692 * exp_prag.ads, exp_prag.adb (Expand_Contract_Cases): Rename to
693 Expand_Pragma_Contract_Cases.
694 * sem_ch13.adb (Add_Invariants): Use the original aspect name
695 when creating the arguments of pragma Check. This ensures that
696 'Class is properly recognized and handled.
698 2015-05-26 Arnaud Charlet <charlet@adacore.com>
700 * gnat1drv.adb: Minor adjustments.
701 (Adjust_Global_Switches): Disable some related flags in CodePeer mode.
702 * sem_ch4.adb (Has_Arbitrary_Evaluation_Order,
703 Stop_Subtree_Climbind): Code cleanup.
704 * einfo.ads: Minor comment change.
706 2015-05-26 Javier Miranda <miranda@adacore.com>
708 * sem_aggr.adb (Resolve_Aggregate, Resolve_Extension_Aggregate):
710 * sem_ch3.adb (Build_Derived_Record_Type,
711 Record_Type_Declaration): Code cleanup.
712 * sem_ch4.adb (Has_Arbitrary_Evaluation_Order,
713 Stop_Subtree_Climbind): Tables which speed up the identification
714 of dangerous calls to Ada 2012 functions with writable actuals
716 (Analyze_Arithmetic_Op, Analyze_Call, Analyze_Comparison_Op,
717 Analyze_Equality_Op, Analyze_Logical_Op, Analyze_Membership_Op,
718 Analyze_Range): Code cleanup.
719 (Is_Arbitrary_Evaluation_Order_Construct): Removed.
720 (Check_Writable_Actuals): Code cleanup using the added tables.
721 * sem_util.adb (Check_Function_Writable_Actuals): Return
722 immediately if the node does not have the flag Check_Actuals
725 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
727 * exp_ch6.adb (Add_Call_By_Copy_Code): Remove restrictive
728 condition in the detection of the effects of Remove_Side_Effects.
729 * exp_util.ads (Remove_Side_Effects): Add general and historical note.
730 * exp_util.adb (Is_Name_Reference): New predicate.
731 (Remove_Side_Effects): Use it in lieu of Is_Object_Reference
732 in order to decide whether to use the renaming to capture the
733 side effects of the subexpression.
734 (Side_Effect_Free): Remove obsolete test.
736 2015-05-26 Robert Dewar <dewar@adacore.com>
738 * aspects.ads, aspects.adb: Add aspect Disable_Controlled.
739 * einfo.ads, einfo.adb (Disable_Controlled): New flag.
740 (Is_Controlled_Active): New function.
741 * exp_ch3.adb (Expand_Freeze_Record_Type): Use
742 Is_Controlled_Active.
743 * exp_util.adb (Needs_Finalization): Finalization not needed
744 if Disable_Controlled set.
745 * freeze.adb (Freeze_Array_Type): Do not set
746 Has_Controlled_Component if the component has Disable_Controlled.
747 (Freeze_Record_Type): ditto.
748 * sem_ch13.adb (Decorate): Minor reformatting.
749 (Analyze_Aspect_Specifications): Implement Disable_Controlled.
750 * sem_ch3.adb (Analyze_Object_Declaration): Handle
752 (Array_Type_Declaration): ditto.
753 (Build_Derived_Private_Type): ditto.
754 (Build_Derived_Type): ditto.
755 (Record_Type_Definition): ditto.
756 * snames.ads-tmpl: Add Name_Disable_Controlled.
758 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
760 * exp_ch6.adb (Expand_Actuals): Use a constant declaration instead
761 of a renaming to capture the return value of a function call.
762 (Expand_Simple_Function_Return): Call Remove_Side_Effects
763 instead of removing side effects manually before the call to
766 2015-05-26 Robert Dewar <dewar@adacore.com>
768 * exp_ch4.adb (Expand_N_Op_Expon): Deal with problem of wrong
769 order in calling Duplicate_Subexpr.
770 * einfo.ads: Fix documentation of Object/Value size for scalar types.
772 2015-05-26 Ed Schonberg <schonberg@adacore.com>
774 * exp_aggr.adb (Build_Array_Aggr_Code, Gen_Assign):
775 If a component is default-initialized and its type has an
776 invariant procedure, insert an invariant test after code for
777 default-initialization of the component.
779 2015-05-26 Gary Dismukes <dismukes@adacore.com>
781 * einfo.ads, sem_util.adb, sem_ch4.adb: Minor reformatting.
783 2015-05-26 Robert Dewar <dewar@adacore.com>
785 * exp_unst.adb, exp_unst.ads: Change to using Subps table index for
786 making AREC entity names unique.
788 2015-05-26 Ed Schonberg <schonberg@adacore.com>
790 * sem_cat.adb (Has_Stream_Attribute_Definition): If the type
791 has aspect specifications, examine the corresponding list of
792 representation items to determine whether there is a visible
793 stream operation. The attribute definition clause generated from
794 the aspect will be inserted at the freeze point of the type,
795 which may be in the private part and not directly visible,
796 but the aspect makes the operation available to a client.
798 2015-05-26 Robert Dewar <dewar@adacore.com>
800 * sem_util.adb: Minor code reorganization.
801 * sem_ch6.adb: Minor reformatting.
803 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
805 * gcc-interface/utils.c (maybe_pad_type): Do not apply adjustment to
806 original size for elementary types before issuing the size warning.
808 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
810 * get_targ.adb (C_Get_Float_Words_BE): Adjust import name.
811 (C_Get_Words_BE): Likewise.
812 (C_Get_Bytes_BE): Likewise.
813 (C_Get_Bits_BE): Likewise.
814 (Width_From_Size): Remove superfluous space.
815 * gcc-interface/targtyps.c (get_float_words_be): Rename into...
816 (get_target_float_words_be): ...this.
817 (get_words_be): Rename into...
818 (get_target_words_be): ...this.
819 (get_bytes_be): Rename into...
820 (get_target_bytes_be): ...this.
821 (get_bits_be): Rename into...
822 (get_target_bits_be): ...this.
823 * gcc-interface/gigi.h (standard_datatypes): Remove ADT_ptr_void_type.
824 (ptr_void_type_node): Delete.
825 (get_target_float_size): Likewise.
826 (get_target_double_size): Likewise.
827 (get_target_long_double_size): Likewise.
828 (get_float_words_be): Likewise.
829 (get_words_be): Likewise.
830 (get_bytes_be): Likewise.
831 (get_bits_be): Likewise.
832 (get_target_float_words_be): Declare.
833 (get_target_words_be): Likewise.
834 (get_target_bytes_be): Likewise.
835 (get_target_bits_be): Likewise.
836 * gcc-interface/decl.c (gnat_to_gnu_entity): Replace ptr_void_type_node
838 (intrin_return_compatible_p): Likewise.
839 * gcc-interface/trans.c (gigi): Likewise.
840 * gcc-interface/utils2.c (maybe_wrap_malloc): Likewise.
841 (maybe_wrap_free): Likewise.
842 * gcc-interface/utils.c (maybe_pad_type): Remove superfluous space.
843 * gcc-interface/misc.c (gnat_init): Do not set ptr_void_type_node.
845 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
847 * gcc-interface/decl.c (elaborate_expression): Take a const string
848 suffix instead of a tree.
849 (elaborate_expression_1): Likewise.
850 (elaborate_expression_2): Likewise.
851 (gnat_to_gnu_entity): Adjust to above changes.
852 (build_subst_list): Likewise.
853 (get_entity_char): New static function.
855 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
857 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: Move around.
858 <E_Exception>: Merge with E_Variable case.
859 <E_Variable>: Remove 'object' label.
861 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
863 * gcc-interface/decl.c (gnat_to_gnu_entity): Minor tweak.
864 * gcc-interface/trans.c (finalize_nrv_unc_r): Use CONSTRUCTOR_ELT.
865 * gcc-interface/utils.c (convert): Likewise and simplify.
866 (remove_conversions): Likewise.
867 * gcc-interface/utils2.c (compare_fat_pointers): Likewise.
868 (build_unary_op): Likewise and simplify.
870 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
872 * gcc-interface/gigi.h (build_atomic_load): Adjust prototype.
873 (build_atomic_store): Likewise.
874 (build_load_modify_store): Declare.
875 (VECTOR_TYPE_P): Delete.
876 * gcc-interface/decl.c (gnat_to_gnu_entity): Replace Is_Atomic with
877 Is_Atomic_Or_VFA throughout.
878 <E_Array_Type>: Build a variant of the XUA type instead of forcing
880 <E_Array_Subtype>: Use the main variant of the base type.
881 Do not force TYPE_VOLATILE on the type being built.
882 <E_Record_Type>: Likewise.
883 <E_Array_Subtype>: Likewise.
884 <E_Subprogram_Type>: Rename local variable.
885 Add Atomic qualifier in conjunction with Volatile on types if needed.
886 Force BLKmode for by-ref types only at the end of the processing.
887 Change qualifiers only after changing the mode of the type. Set
888 TYPE_UNIVERSAL_ALIASING_P on the type directly.
889 (check_ok_for_atomic_type): Issue specific error message for VFA.
890 (gnat_to_gnu_component_type): Replace Is_Atomic with
891 Is_Atomic_Or_VFA throughout.
892 * gcc-interface/misc.c (gnat_get_alias_set): Test
893 TYPE_UNIVERSAL_ALIASING_P on the type directly.
894 * gcc-interface/trans.c (lvalue_required_p): Replace Is_Atomic with
895 Is_Atomic_Or_VFA throughout. Add missing guard.
896 (node_is_atomic): New predicate.
897 (node_has_volatile_full_access): Likewise.
898 (gnat_strip_type_conversion): New function.
899 (outer_atomic_access_required_p): New predicate.
900 (atomic_sync_required_p): Rename into...
901 (atomic_access_required_p): ...this. Add SYNC parameter, scan the
902 parent node first and then look for the atomic setting. Add support
903 for Volatile_Full_Access.
904 (Call_to_gnu): Add atomic_access and outer_atomic_access parameters
905 and adjusts calls to above functions. Use load-modify-store sequence
906 for updates of In/Out and Out parameters if required, as well as for
907 moving the result to the target if required. Add couple of missing
909 (gnat_to_gnu): Adjust calls to above functions.
910 <N_Object_Renaming_Declaration>: If the renamed object has side-effects
911 evaluate only its address.
912 <N_Assignment_Statement>: Adjust call to Call_to_gnu. Use load-modify
913 store sequence if required.
914 <N_Function_Call>: Adjust call to Call_to_gnu.
915 (extract_values): Adjust comment.
916 * gcc-interface/utils2.c (build_atomic_load): Add SYNC parameter and
917 use relaxed memory model if it is not set.
918 (build_atomic_store): Likewise.
919 (call_is_atomic_load): New predicate.
920 (build_load_modify_store): New function.
921 (build_binary_op) <MODIFY_EXPR>: Accept SAVE_EXPR on the LHS.
922 (gnat_stabilize_reference) <CALL_EXPR>: Deal with atomic loads.
924 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
926 * gcc-interface/ada-tree.h (DECL_RENAMING_GLOBAL_P): Rename into...
927 (DECL_GLOBAL_NONCONSTANT_RENAMING_P): ...this.
928 * gcc-interface/gigi.h (record_global_renaming_pointer): Delete.
929 (invalidate_global_renaming_pointers): Likewise.
930 (record_global_nonconstant_renaming): New.
931 (invalidate_global_nonconstant_renamings): Likewise.
932 (get_inner_constant_reference): Likewise.
933 (gnat_constant_reference_p): Likewise.
934 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Adjust to above
935 and register the renaming pointer only if the object is non-constant.
936 (elaborate_expression_1): Call get_inner_constant_reference instead
937 of get_inner_reference.
938 * gcc-interface/trans.c (fold_constant_decl_in_expr): Minor tweak.
939 (Identifier_to_gnu): Adjust to above and do not recheck the renamed
940 object before substituting it.
941 (Compilation_Unit_to_gnu): Adjust to above renaming. Minor tweaks.
942 (gnat_to_gnu) <N_Object_Renaming_Declaration>: Do not return the
943 result at the global level.
944 (N_Exception_Renaming_Declaration): Likewise.
945 * gcc-interface/utils.c (global_renaming_pointers): Rename into...
946 (global_nonconstant_renamings): ...this.
947 (destroy_gnat_utils): Adjust to above renaming.
948 (record_global_renaming_pointer): Rename into...
949 (record_global_nonconstant_renaming): ...this.
950 (invalidate_global_renaming_pointers): Rename into...
951 (invalidate_global_nonconstant_renamings): ...this and do not recheck
952 the renamed object before invalidating.
953 * gcc-interface/utils2.c (gnat_stabilize_reference): Minor tweak.
954 (get_inner_constant_reference): New public function.
955 (gnat_constant_reference_p): New predicate.
957 2015-05-25 Javier Miranda <miranda@adacore.com>
959 * einfo.ads, einfo.adb (Has_Out_Or_In_Out_Parameter): This attribute
960 is now present in subprograms, generic subprograms, entries and
962 * sem_ch6.adb (Set_Formal_Mode): Set As_Out_Or_In_Out_Parameter
963 on entries, entry families, subprograms and generic subprograms.
964 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration):
965 Minor code reorganization to ensure that the Ekind attribute
966 of the subprogram entity is set before its formals are
967 processed. Required to allow the use of the attribute
968 Has_Out_Or_In_Out_Parameter on the subprogram entity.
969 * sem_aggr.adb (Resolve_Aggregate, Resolve_Extension_Aggregate):
970 Perform the check on writable actuals only if the value of some
971 component of the aggregate involves calling a function with
973 (Resolve_Record_Aggregate): Propagate the Check_Actuals flag to the
974 internally built aggregate.
975 * sem_ch3.adb (Build_Derived_Record_Type, Record_Type_Declaration):
976 Perform the check on writable actuals only if the initialization of
977 some component involves calling a function with out-mode parameters.
978 * sem_ch4.adb (Analyze_Arithmetic_Op, Analyze_Comparison_Op,
979 Analyze_Equality_Op, Analyze_Logical_Op, Analyze_Membership_Op,
980 Analyze_Range): Check writable actuals only if the
981 subtrees have a call to a function with out-mode parameters
982 (Analyze_Call.Check_Writable_Actuals): New subprogram. If the call
983 has out or in-out parameters then mark its outermost enclosing
984 construct as a node on which the writable actuals check must
986 (Analyze_Call): Check if the flag must be set and if the outermost
988 * sem_util.adb (Check_Function_Writable_Actuals): Code cleanup
989 and reorganization. We skip processing aggregate discriminants
990 since their precise analysis involves two phases traversal.
991 * sem_res.adb (Resolve_Actuals, Resolve_Arithmetic_Op,
992 Resolve_Logical_Op, Resolve_Membership_Op): Remove call to
993 check_writable_actuals.
995 2015-05-22 Ed Schonberg <schonberg@adacore.com>
997 * sem_ch3.adb (Constrain_Concurrent): If the context is a
998 type declaration, generate an Itype_Reference for the anonymous
999 subtype, to force elaboration at this point in gigi.
1001 2015-05-22 Gary Dismukes <dismukes@adacore.com>
1003 * layout.adb, einfo.ads, sem_ch12.adb, freeze.adb, sem_util.ads,
1004 exp_ch4.adb, sem_ch6.adb: Minor reformatting and typo fixes.
1006 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1008 * sem_res.adb (Resolve_Actuals): If the call is to an overridden
1009 operation, replace the names of the actuals in named associations
1010 with the names of the actuals of the subprogram that is eventually
1011 executed. The names of the formals and the defaults can differ
1012 between the two operations when they are operations of a formal
1015 2015-05-22 Bob Duff <duff@adacore.com>
1017 * a-convec.ads, a-convec.adb (Append): Check for fast path. Split
1018 out slow path into separate procedure. Inline Append. Fast path
1019 now avoids calling Insert.
1020 (Finalize): Do the busy checking last, so the container gets emptied.
1021 (Insert, Insert_Space): Remove redundancy.
1023 2015-05-22 Robert Dewar <dewar@adacore.com>
1025 * switch-c.adb (Scan_Front_End_Switches): Insist on -gnatc
1028 2015-05-22 Arnaud Charlet <charlet@adacore.com>
1030 * gnatvsn.ads: Minor code reorg to remember more easily to update
1033 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1035 * sem_ch10.adb (Analyze_With_Clause): In ASIS_Mode, a
1036 limited_with clause on a predefined unit is not transformed into
1037 a regular with_clause, to preserve the original tree structure.
1038 * sinfo.ads (N_With_Clause): Add comment on handling of
1040 * sem_ch10.adb: Minor reformatting.
1042 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1044 * sem_ch8.adb (Freeze_Profile): A limited view of a type in
1045 the profile of a subprogram renaming does not require freezing,
1046 because it is declared in a different unit.
1048 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1050 * exp_aggr.adb (Get_Constraint_Association): If type (of ancestor
1051 composite type) is private, go to full view. This was previously
1052 done only in an instance context, but is happen whenever a chain
1053 of private extensions includes one inherited discriminant.
1055 2015-05-22 Robert Dewar <dewar@adacore.com>
1057 * einfo.ads: Minor comment updates.
1058 * exp_unst.adb: Move Subps table to spec Don't remove old entries
1059 from table Add Last field to record last entry used.
1060 * exp_unst.ads: Move Subps table here from body So that Cprint
1061 can access saved values.
1063 2015-05-22 Bob Duff <duff@adacore.com>
1065 * a-cdlili.adb, a-cdlili.ads, a-cohama.adb, a-cohama.ads,
1066 * a-cohase.adb, a-cohase.ads, a-convec.adb, a-convec.ads,
1067 * a-coorma.adb, a-coorma.ads, a-coorse.adb, a-coorse.ads:
1068 (Pseudo_Reference, Element_Access, Get_Element_Access): New
1069 declarations added for use by performance improvements in exp_ch5.adb.
1070 * snames.ads-tmpl: New names referenced by exp_ch5.adb.
1071 * exp_ch5.adb: Speed up "for ... of" loops for predefined containers.
1072 Instead of doing literally what the RM calls for, we do something
1073 equivalent that avoids expensive operations inside the loop. If the
1074 container package has appropriate Next, Pseudo_Reference,
1075 Element_Access, Get_Element_Access declarations, we invoke the
1077 * snames.ads-tmpl: Note speed improvement.
1079 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
1081 * einfo.ads (Is_Atomic_Or_VFA): Move to XEINFO INLINES section.
1082 * xeinfo.adb: Replace a-einfo.h with einfo.h throughout.
1083 Add pattern to translate "or else" into "||".
1085 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
1087 * einfo.ads (Has_Volatile_Full_Access): Rename into...
1088 (Is_Volatile_Full_Access): ...this.
1089 (Set_Has_Volatile_Full_Access): Rename into...
1090 (Set_Is_Volatile_Full_Access): ...this.
1091 * einfo.adb (Has_Volatile_Full_Access): Rename into...
1092 (Is_Volatile_Full_Access): ...this.
1093 (Set_Has_Volatile_Full_Access): Rename into...
1094 (Set_Is_Volatile_Full_Access): ...this.
1095 (Is_Atomic_Or_VFA): Adjust to above renaming.
1096 * errout.adb (Special_Msg_Delete): Likewise.
1097 * exp_pakd.adb (Install_PAT): Likewise.
1098 * freeze.adb (Freeze_Array_Type): Likewise.
1099 * sem_ch8.adb (Analyze_Object_Renaming): Likewise.
1100 * sem_ch13.adb (Inherit_Delayed_Rep_Aspects): Likewise.
1101 (Inherit_Aspects_At_Freeze_Point): Likewise.
1102 * sem_prag.adb (Set_Atomic_VFA): Likewise.
1103 (Process_Atomic_Independent_Shared_Volatile): Likewise.
1104 * sem_util.adb (Is_Atomic_Or_VFA_Object): Likewise.
1106 2015-05-22 Robert Dewar <dewar@adacore.com>
1108 * exp_ch5.adb, layout.adb, einfo.adb, einfo.ads, sem_prag.adb,
1109 freeze.adb, freeze.ads, sem_util.adb, sem_util.ads, exp_ch2.adb,
1110 exp_ch4.adb, errout.adb, exp_aggr.adb, sem_ch13.adb: This is a general
1111 change that deals with the fact that most of the special coding for
1112 Atomic should also apply to the case of Volatile_Full_Access.
1113 A new attribute Is_Atomic_Or_VFA is introduced, and many of the
1114 references to Is_Atomic now use this new attribute.
1116 2015-05-22 Robert Dewar <dewar@adacore.com>
1118 * exp_ch4.adb (Expand_N_Op_Eq): Introduce 'Machine for 'Result
1121 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
1123 * sprint.adb (Source_Dump): When generating debug files, deal
1124 with the case of a stand-alone package instantiation by dumping
1125 together the spec and the body in the common debug file.
1127 2015-05-22 Robert Dewar <dewar@adacore.com>
1129 * sem_ch13.adb (Minimum_Size): Size is zero for null range
1132 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1134 * einfo.adb (Anonymous_Master): This attribute now applies
1135 to package and subprogram bodies.
1136 (Set_Anonymous_Master): This attribute now applies to package and
1138 (Write_Field36_Name): Add output for package and subprogram bodies.
1139 * einfo.ads Update the documentation on attribute Anonymous_Master
1140 along with occurrences in entities.
1141 * exp_ch4.adb (Create_Anonymous_Master): Reimplemented to
1142 handle spec and body anonymous masters of the same unit.
1143 (Current_Anonymous_Master): Reimplemented. Handle a
1144 package instantiation that acts as a compilation unit.
1145 (Insert_And_Analyze): Reimplemented.
1147 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1149 * sem_ch10.adb (Analyze_With_Clause): A limited_with_clause on a
1150 predefined unit is treated as a regular with_clause.
1152 2015-05-22 Robert Dewar <dewar@adacore.com>
1154 * sem_ch12.adb, prj.ads, makeutl.ads, sem_ch6.adb, prj-nmsc.adb,
1155 prj-conf.adb, sem_disp.adb: Minor reformatting.
1157 2015-05-22 Vincent Celier <celier@adacore.com>
1159 * clean.adb (Parse_Cmd_Line): For native gnatclean, check
1160 for switch -P and, if found and gprclean is available, invoke
1162 * make.adb (Initialize): For native gnatmake, check for switch -P
1163 and, if found and gprbuild is available, invoke silently gprbuild.
1165 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
1167 * sem_ch13.adb (Validate_Unchecked_Conversions): Also issue
1168 specific warning for discrete types when the source is larger
1171 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1173 * einfo.ads, einfo.adb (Incomplete_Actuals): New attribute of
1174 package instantiations. Holds the list of actuals in the instance
1175 that are incomplete types, to determine where the corresponding
1176 instance body must be placed.
1177 * sem_ch6.adb (Conforming_Types): An incomplete type used as an
1178 actual in an instance matches an incomplete formal.
1179 * sem_disp.adb (Check_Dispatching_Call): Handle missing case of
1180 explicit dereference.
1181 (Inherited_Subprograms): In the presence of a limited view there
1182 are no subprograms to inherit.
1183 * sem_ch12.adb (Preanalyze_Actuals): Build list of incomplete
1184 actuals of instance, for later placement of instance body and
1185 freeze nodes for actuals.
1186 (Install_Body): In the presence of actuals that incomplete types
1187 from a limited view, the instance body cannot be placed after
1188 the declaration because full views have not been seen yet. Any
1189 use of the non-limited views in the instance body requires
1190 the presence of a regular with_clause in the enclosing unit,
1191 and will fail if this with_clause is missing. We place the
1192 instance body at the beginning of the enclosing body, which is
1193 the unit being compiled, and ensure that freeze nodes for the
1194 full views of the incomplete types appear before the instance.
1196 2015-05-22 Pascal Obry <obry@adacore.com>
1198 * makeutl.ads, prj-conf.adb, prj-nmsc.adb, prj.ads
1199 (In_Place_Option): Removed.
1200 (Relocate_Build_Tree_Option): New constant.
1201 (Root_Dir_Option): New constant.
1202 (Obj_Root_Dir): Removed.
1203 (Build_Tree_Dir): New variable.
1204 (Root_Src_Tree): Removed.
1205 (Root_Dir): New variable.
1206 * prj-conf.adb (Get_Or_Create_Configuration_File): Add check
1207 for improper relocation.
1208 * prj-nmsc.adb (Locate_Directory): Add check for improper
1211 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1213 * einfo.adb (Default_Init_Cond_Procedure): Code cleanup. The
1214 attribute now applies to the base type.
1215 (Has_Default_Init_Cond): Now applies to the base type.
1216 (Has_Inherited_Default_Init_Cond): Now applies to the base type.
1217 (Set_Default_Init_Cond_Procedure): Code cleanup. The attribute now
1218 applies to the base type.
1219 (Set_Has_Default_Init_Cond): Now applies to the base type.
1220 (Set_Has_Inherited_Default_Init_Cond): Now applies to the base type.
1221 * exp_ch3.adb (Expand_N_Object_Declaration): No need to use the
1222 base type when adding a call to the Default_Initial_Condition.
1224 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1226 * einfo.adb: Node36 is now used as Anonymous_Master. Flag253
1228 (Anonymous_Master): New routine.
1229 (Has_Anonymous_Master): Removed.
1230 (Set_Anonymous_Master): New routine.
1231 (Set_Has_Anonymous_Master): Removed.
1232 (Write_Entity_Flags): Remove the output for Has_Anonymous_Maser.
1233 (Write_Field36_Name): Add output for Anonymous_Master.
1234 * einfo.ads Add new attribute Anonymous_Master along with
1235 occurrences in nodes. Remove attribute Has_Anonymous_Master along
1236 with occurrences in nodes.
1237 (Anonymous_Master): New routine along with pragma Inline.
1238 (Has_Anonymous_Master): Removed along with pragma Inline.
1239 (Set_Anonymous_Master): New routine along with pragma Inline.
1240 (Set_Has_Anonymous_Master): Removed along with pragma Inline.
1241 * exp_ch4.adb (Create_Anonymous_Master): New routine.
1242 (Current_Anonymous_Master): Reimplemented.
1244 2015-05-22 Bob Duff <duff@adacore.com>
1246 * freeze.adb (Freeze_Profile): Suppress warning if imported
1247 subprogram is not at library level.
1249 2015-05-22 Robert Dewar <dewar@adacore.com>
1251 * sem_ch8.adb (Analyze_Object_Renaming): Check for renaming
1252 component of an object to which Volatile_Full_Access applies.
1254 2015-05-22 Jerome Guitton <guitton@adacore.com>
1256 * exp_dbug.ads: Add note about non bit-packed arrays.
1258 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
1260 * sem_prag.adb: Fix typo.
1261 * einfo.ads: Grammar fixes in comments.
1263 2015-05-22 Bob Duff <duff@adacore.com>
1265 * a-cborma.ads, a-cidlli.ads, a-cimutr.ads, a-ciormu.ads,
1266 * a-cihase.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
1267 * a-cborse.ads, a-comutr.ads, a-ciorma.ads, a-cobove.ads,
1268 * a-coormu.ads, a-convec.ads, a-cohase.ads, a-coinho.ads,
1269 * a-cbdlli.ads, a-cbmutr.ads, a-cbhase.ads, a-cdlili.ads,
1270 * a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
1271 * a-coinho-shared.ads (Constant_Reference_Type, Reference_Type):
1272 Add an initialization expression "raise Program_Error". See,
1273 for example, RM-A.18.2(148.4).
1275 2015-05-22 Robert Dewar <dewar@adacore.com>
1277 * debug.adb: Update documentation.
1278 * einfo.ads, einfo.adb (Needs_Typedef): New flag
1279 * exp_unst.adb (Unnest_Subprogram): Mark AREC types as needing
1281 * frontend.adb: Update comments.
1282 * gnat1drv.adb (Adjust_Global_Switches): Set all needed flags
1284 * opt.ads (Generate_C_Code): New switch.
1285 * osint-c.adb (Write_C_File_Info): Removed, not used
1286 (Write_H_File_Info): Removed, not used
1287 * osint-c.ads (Write_C_File_Info): Removed, not used
1288 (Write_H_File_Info): Removed, not used
1289 * osint.ads (Write_Info): Minor comment updates.
1290 (Output_FD): Moved from private part to public part of spec.
1291 * sem.adb (Semantics): Force expansion on if in Generate_C_Code
1293 * atree.ads: minor typo in comment.
1294 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
1295 Do not allow VFA on composite object with aliased component.
1297 2015-05-22 Arnaud Charlet <charlet@adacore.com>
1299 * osint-c.adb, osint-c.ads (Set_File_Name): Move back to spec.
1301 2015-05-22 Pascal Obry <obry@adacore.com>
1303 * prj-util.adb: Minor comment editing.
1305 2015-05-22 Pascal Obry <obry@adacore.com>
1307 * makeutl.ads (In_Place_Option): New constant.
1308 * prj.ads (Obj_Root_Dir): New variable (absolute path to relocate
1310 (Root_Src_Tree): New variable (absolute path of root source tree).
1311 * prj-conf.adb (Do_Autoconf): Take into account the object root
1312 directory (if defined) to generate configuration project.
1313 * prj-nmsc.adb (Get_Directories): Handle case where Obj_Root_Dir
1315 (Locate_Directory): Likewise.
1317 2015-05-22 Pascal Obry <obry@adacore.com>
1319 * prj-util.ads, prj-util.adb (Relative_Path): New routine.
1321 2015-05-22 Bob Duff <duff@adacore.com>
1323 * exp_utils.ads, exp_utils.adb (Find_Optional_Prim_Op): New
1324 interface to return Empty when not found, so we can avoid handling
1325 Program_Error in that case.
1326 (Find_Prim_Op): Fix latent bug: raise Program_Error when there are no
1328 * exp_ch7.adb, sem_util.adb: Use Find_Optional_Prim_Op when the
1329 code is expecting Empty.
1330 * sem_ch8.adb: Use Find_Optional_Prim_Op to avoid handling
1333 2015-05-22 Robert Dewar <dewar@adacore.com>
1335 * sem_ch3.adb, sem_intr.adb, exp_ch4.adb, s-rannum.adb,
1336 sem_eval.adb, s-fatgen.adb, s-expmod.ads: Remove incorrect hyphen in
1338 * exp_util.adb: Add comment.
1339 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move from spec to
1341 (Set_File_Name): New name for the above.
1342 (Create_C_File, Create_H_File, Write_C_File_Info, Write_H_File_Info,
1343 Close_C_File, Close_H_File): New procedure.
1344 * osint.adb: Minor reformatting.
1345 * osint.ads: Minor comment updates.
1347 2015-05-22 Robert Dewar <dewar@adacore.com>
1349 * exp_ch4.adb: Minor rewording.
1350 * exp_util.ads: Clarify that Find_Prim_Op is only for
1353 2015-05-22 Robert Dewar <dewar@adacore.com>
1355 * atree.adb, atree.ads, treepr.adb: Change name Needs_Actuals_Check to
1357 * exp_ch4.adb (Expand_N_Op_Expon): Optimize 2**x in modular
1360 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
1362 * exp_pakd.adb (Install_PAT): Propagate representation aspects
1363 from the original array type to the PAT.
1365 2015-05-22 Robert Dewar <dewar@adacore.com>
1367 * treepr.adb (Print_Node_Header): Add output of Needs_Actuals_Check.
1369 2015-05-22 Robert Dewar <dewar@adacore.com>
1371 * atree.adb, atree.ads (Needs_Actuals_Check): New flag.
1373 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1375 * sem_prag.adb (Analyze_Pragma): Remove the detection
1376 of a useless Part_Of indicator when the related item is a constant.
1377 (Check_Matching_Constituent): Do not emit an error on a constant.
1378 (Check_Missing_Part_Of): Do not check for a missing Part_Of indicator
1379 when the related item is a constant.
1380 (Collect_Body_States): Code cleanup.
1381 (Collect_Visible_States): Code cleanup.
1382 (Report_Unused_States): Do not emit an error on a constant.
1383 * sem_util.ads, sem_util.adb (Has_Variable_Input): Removed.
1385 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
1387 * sem_ch8.adb (Analyze_Object_Renaming): Copy
1388 Has_Volatile_Full_Access from renamed to renaming entities.
1389 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
1390 Tidy up and remove redundant setting of Has_Volatile_Full_Access.
1392 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1394 * ghost.adb (Check_Ghost_Completion): Update references to SPARK
1396 (Check_Ghost_Policy): Update references to SPARK RM 6.9 rules.
1397 * sem_ch3.adb (Analyze_Object_Declaration): Update references
1398 to SPARK RM 6.9 rules.
1399 (Check_Completion): Ghost entities do not require a special form of
1401 * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Update references
1402 to SPARK RM 6.9 rules.
1403 (Analyze_Subprogram_Body_Helper): Update references to SPARK RM 6.9
1405 * sem_ch7.adb (Analyze_Package_Body_Helper): Update references
1406 to SPARK RM 6.9 rules.
1407 (Requires_Completion_In_Body): Ghost entities do not require a special
1410 2015-05-22 Robert Dewar <dewar@adacore.com>
1412 * a-csquin.ads: Use Ada 2012 notation.
1413 * sem_ch8.adb: Minor reformatting.
1415 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1417 * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect Import
1418 acts as a completion.
1420 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1422 * sem_ch13.adb: Minor reformatting.
1424 2015-05-22 Jose Ruiz <ruiz@adacore.com>
1426 * a-reatim.adb: Minor change, fix typo.
1428 2015-05-22 Robert Dewar <dewar@adacore.com>
1430 * sem_util.ads: Minor addition of ??? comment.
1431 * sem_prag.adb, sem_util.adb: Minor reformatting.
1432 * sem_ch13.adb: minor reformatting.
1434 2015-05-22 Robert Dewar <dewar@adacore.com>
1436 * a-reatim.ads: Add Compile_Time_Error to ensure Duration
1438 * sem_ch13.adb: Improve error message.
1439 * exp_ch4.adb: Minor reformatting.
1441 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1443 * sem_prag.adb (Analyze_Pragma): Constants without variable
1444 input do not require indicator Part_Of.
1445 (Check_Missing_Part_Of): Constants without variable input do not
1446 requrie indicator Part_Of.
1447 (Collect_Visible_States): Constants without variable input are
1448 not part of the hidden state of a package.
1449 * sem_util.ads, sem_util.adb (Has_Variable_Input): New routine.
1451 2015-05-22 Robert Dewar <dewar@adacore.com>
1453 * exp_util.adb (Activate_Atomic_Synchronization): Do not set
1454 Atomic_Sync_Required for an object renaming declaration.
1455 * sem_ch8.adb (Analyze_Object_Renaming): Copy Is_Atomic and
1456 Is_Independent to renaming object.
1458 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1460 * sem_ch5.adb (Analyze_Iterator_Specification): Diagnose
1461 various illegalities in iterators over arrays and containers:
1462 a) New function Get_Cursor_Type, to verify that the cursor is
1463 not a limited type at the point of iteration.
1464 b) If the container is a constant, an element_iterator is illegal
1465 if the container type does not have a Constant_Indexing aspect.
1466 c) If the iterate function has an in-out controlling parameter,
1467 the container cannot be a constant object.
1468 d) Reject additional cases of iterators over a
1469 discriminant-dependent component of a mutable object.
1471 2015-05-21 Hristian Kirtchev <kirtchev@adacore.com>
1473 * einfo.adb (Contract): This attribute now applies to constants.
1474 (Set_Contract): This attribute now applies to constants.
1475 (Write_Field34_Name): Add output for constants.
1476 * einfo.ads Attribute Contract now applies to constants.
1477 * sem_ch3.adb (Analyze_Object_Contract): Constants now have
1478 their Part_Of indicator verified.
1479 * sem_prag.adb (Analyze_Constituent): A constant is now a valid
1481 (Analyze_Global_Item): A constant cannot act as an output.
1482 (Analyze_Initialization_Item): Constants are now a valid
1483 initialization item.
1484 (Analyze_Initializes_In_Decl_Part): Rename
1485 global variable States_And_Vars to States_And_Objs and update
1486 all its occurrences.
1487 (Analyze_Input_Item): Constants are now a
1488 valid initialization item. Remove SPARM RM references from error
1490 (Analyze_Pragma): Indicator Part_Of can now apply to a constant.
1491 (Collect_Body_States): Collect both source constants
1493 (Collect_States_And_Objects): Collect both source constants and
1495 (Collect_States_And_Variables): Rename
1496 to Collect_States_And_Objects and update all its occurrences.
1497 (Collect_Visible_States): Do not collect constants and variables
1498 used to map generic formals to actuals.
1499 (Find_Role): The role of a constant is that of an input. Separate the
1500 role of a variable from that of a constant.
1501 (Report_Unused_Constituents): Add specialized wording for constants.
1502 (Report_Unused_States): Add specialized wording for constants.
1503 * sem_util.adb (Add_Contract_Item): Add processing for constants.
1504 * sem_util.ads (Add_Contract_Item): Update the comment on usage.
1505 (Find_Placement_In_State_Space): Update the comment on usage.
1507 2015-05-21 Ed Schonberg <schonberg@adacore.com>
1509 * sem_ch5.adb: minor reformatting.
1511 2015-05-21 Robert Dewar <dewar@adacore.com>
1513 * freeze.adb (Freeze_Entity): Properly tag -gnatw.z messages.
1515 2015-05-21 Robert Dewar <dewar@adacore.com>
1517 * freeze.adb: Minor reformatting.
1518 * cstand.adb (Print_Standard): Fix bad printing of Duration
1520 * a-reatim.adb (Time_Of): Complete rewrite to properly detect
1523 2015-05-21 Ed Schonberg <schonberg@adacore.com>
1525 * sem_ch5.adb: add (useless) initial value.
1526 * sem_ch3.adb (Replace_Anonymous_Access_To_Protected_Subprogram):
1527 Check whether the procedure has parameters before processing
1528 formals in ASIS mode.
1530 2015-05-21 Ed Schonberg <schonberg@adacore.com>
1532 * sem_ch13.adb (Check_Iterator_Functions): Emit error on Iterator
1533 aspect as well when indexing function is illegal.
1534 (Valid_Default_Iterator): Handle properly somme illegal cases
1535 to prevent compilation abandoned messages.
1536 (Check_Primitive_Function): Verify that type and indexing function
1537 are in the same scope.
1538 * freeze.adb (Freeze_Record): Extend patch on the presence of
1539 indexing aspects to aspect Default_Iterator.
1541 2015-05-19 David Malcolm <dmalcolm@redhat.com>
1543 * gcc-interface/trans.c (Sloc_to_locus1): Strenghthen local "map"
1544 from line_map * to line_map_ordinary *.
1546 2015-05-12 Jason Merrill <jason@redhat.com>
1548 * sigtramp-vxworks.c: Add space between string literal and macro
1551 2015-05-12 Arnaud Charlet <charlet@adacore.com>
1553 * gnat_rm.texi, gnat_ugn.texi, doc: Documentation updates and clean ups
1555 2015-05-12 Ed Schonberg <schonberg@adacore.com>
1557 * sem_ch5.adb (Analyze_Iterator_Specifications): Additional
1558 legality checks for array and container iterators:
1559 a) The domain of iteration cannot be a component that depends
1560 on discriminants of a mutable object. The check was recently
1561 added for element iterators.
1562 b) The cursor type cannot be a limited type at the point of the
1563 iteration, because the cursor will be assigned to in the body
1566 2015-05-12 Robert Dewar <dewar@adacore.com>
1568 * freeze.adb (Freeze_Record_Type): Make sure that if we have
1569 aspect Iterator_Element, then we have either Constant_Indexing
1570 or Variable_Indexing.
1572 2015-05-12 Ed Schonberg <schonberg@adacore.com>
1574 * a-coormu.ads, a-coormu.adb: Add Indexing aspect, Reference_Type,
1575 and Reference_Control_Type to support element iterators over
1577 * a-ciormu.ads, a-ciormu.adb: Ditto for
1578 indefinite_ordered_multisets.
1580 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
1582 * exp_ch4.adb (Expand_N_Expression_With_Actions): Force
1583 the evaluation of the EWA expression. Code cleanup.
1584 (Process_Transient_Object): Code cleanup.
1585 * exp_util.adb (Is_Aliased): Controlled transient objects found
1586 within EWA nodes are not aliased.
1587 (Is_Finalizable_Transient): Iterators are not finalizable transients.
1589 2015-05-12 Robert Dewar <dewar@adacore.com>
1591 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
1592 Don't allow Atomic and Volatile_Full_Access for the same entity.
1594 2015-05-12 Ed Schonberg <schonberg@adacore.com>
1596 * sem_ch5.adb (Analyze_Iterator_Specification): Implement new
1597 semantics and safety checks specified in AI12-0151.
1599 2015-05-12 Pierre-Marie de Rodat <derodat@adacore.com>
1601 * sem_ch10.adb (Sem_Ch10.Analyze_Proper_Body): Generate SCOs
1602 for subunit in generic units.
1604 2015-05-12 Robert Dewar <dewar@adacore.com>
1606 * sem_elab.adb (Check_A_Call): Avoid checking internal call
1609 2015-05-12 Ed Schonberg <schonberg@adacore.com>
1611 * sem_ch6.adb (Process_Formals): An untagged incomplete type
1612 is legal in the profile of a null procedure.
1614 2015-05-12 Ed Schonberg <schonberg@adacore.com>
1616 * sem_ch12.adb (Validate_Derived_Type_Instance): Handle properly
1617 the checks on a derived formal whose parent type is a previous
1618 formal that is not a derived type.
1620 2015-05-12 Robert Dewar <dewar@adacore.com>
1622 * aspects.ads, aspects.adb: Add entries for aspect Volatile_Full_Access
1623 * einfo.adb (Has_Volatile_Full_Access): New flag.
1624 (Has_Volatile_Full_Access): New flag.
1625 * einfo.ads (Has_Volatile_Full_Access): New flag.
1626 * par-prag.adb: Add dummy entry for Volatile_Full_Access.
1627 * sem_prag.adb (Analyze_Pragma, case Volatile_Full_Access):
1628 Implement new pragma.
1629 * snames.ads-tmpl: Add entries for pragma Volatile_Full_Access.
1631 2015-05-12 Robert Dewar <dewar@adacore.com>
1633 * targparm.ads: Minor reformatting.
1635 2015-05-12 Robert Dewar <dewar@adacore.com>
1637 * a-reatim.adb (Time_Of): Properly detect overflow when TS = 0.0.
1638 * a-reatim.ads: Minor reformatting.
1640 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
1642 * einfo.ads: Update the documentation of flags
1643 Has_Inherited_Default_Init_Cond and Has_Default_Init_Cond.
1645 2015-05-12 Robert Dewar <dewar@adacore.com>
1647 * impunit.adb: Add entry for a-dhfina.ads
1648 * a-dhfina.ads: New file.
1650 2015-05-12 Ed Schonberg <schonberg@adacore.com>
1652 * exp_ch5.adb (Expand_Iterator_Loop_Over_Array): if the array
1653 type has convention Fortran, a multidimensional iterator varies
1654 the first dimension fastest.
1656 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
1658 * einfo.adb: Node32 is now used as Encapsulating_State.
1659 Node37 is now used as Associated_Entity.
1660 (Associated_Entity): New routine.
1661 (Encapsulating_State): Update the assertion guard to include constants.
1662 (Set_Associated_Entity): New routine.
1663 (Set_Encapsulating_State): Update the assertion guard to
1665 (Write_Field10_Name): Remove the output for Encapsulating_State.
1666 (Write_Field32_Name): Add output for Encapsulating_State.
1667 (Write_Field37_Name): Add output for Associated_Entity.
1668 * einfo.ads New attribute Associated_Entity along with placement
1669 in entities. Attribute Encapsulating_State now uses Node32.
1670 (Associated_Entity): New routine along with pragma Inline.
1671 (Set_Associated_Entity): New routine along with pragma Inline.
1672 * inline.ads Code reformatting.
1673 * sem_attr.adb (Analyze_Attribute): Correct the prefix of
1674 attribute 'Result when the context is a generic instantiation.
1675 (Analyze_Attribute_Old_Result): Pragmas Depends and
1676 Refined_Depends are a valid context for attribute 'Result.
1677 (Denote_Same_Function): Allow attribute 'Result to denote
1679 * sem_ch3.adb Add with and use clauses for Sem_Ch12.
1680 (Analyze_Declarations): Capture global references within the
1681 contracts of packages, subprograms and their respective bodies.
1682 * sem_ch6.adb (Analyze_Aspects_On_Body_Or_Stub): Removed.
1683 (Analyze_Completion_Contract): Removed.
1684 (Analyze_Generic_Subprogram_Body): Enchange the aspects after
1685 creating the generic copy. Create a generic contract for the
1686 template. Analyze the aspects of the generic body. Analyze the
1687 contract of the generic body when it is a compilation unit and
1688 capture global references.
1689 (Analyze_Subprogram_Body_Contract): Code cleanup.
1690 (Analyze_Subprogram_Contract): Do not save global references here.
1691 (Save_Global_References_In_List): Removed.
1692 * sem_ch7.adb (Analyze_Package_Body_Contract): Code cleanup.
1693 (Analyze_Package_Body_Helper): Create a generic contract for
1695 (Analyze_Package_Contract): Code cleanup.
1696 * sem_ch10.adb Add with and use clauses for Sem_Ch12.
1697 (Analyze_Compilation_Unit): Capture global references in a
1698 generic subprogram declaration that acts as a compilation unit.
1699 * sem_ch12.adb Add with and use clauses for Sem_Prag. Illustrate
1700 the implementation of generic contracts. Alphabetize various
1702 (Analyze_Generic_Package_Declaration):
1703 Create a generic contract for the template.
1704 (Analyze_Generic_Subprogram_Declaration): Create a generic
1705 contract for the template.
1706 (Analyze_Subprogram_Instantiation): Instantiate the contract of the
1708 (Copy_Generic_Node): Link defining entities of the generic template
1709 with the corresponding defining entities of the generic copy. Update
1710 the processing of pragmas.
1711 (Instantiate_Contract): Removed.
1712 (Instantiate_Subprogram_Contract): New routine.
1713 (Requires_Delayed_Save): New routine.
1714 (Save_Global_References): Rename formal parameter N to Templ. Various
1716 (Save_Global_References_In_Aspects): Moved from the spec.
1717 (Save_Global_References_In_Contract): New routine.
1718 (Save_References_In_Aggregate): New routine.
1719 (Save_References_In_Char_Lit_Or_Op_Symbol): New routine.
1720 (Save_References_In_Descendants): New routine.
1721 (Save_References_In_Identifier): New routine.
1722 (Save_References_In_Operator): New routine.
1723 (Save_References_In_Pragma): New routine.
1724 * sem_ch12.ads (Save_Global_References): Rename formal
1725 parameter N to Templ. Update the comment on usage.
1726 (Save_Global_References_In_Aspects): Moved to the body.
1727 (Save_Global_References_In_Contract): New routine.
1728 * sem_ch13.adb (Analyze_Aspect_Specifications_On_Body_Or_Stub):
1730 * sem_ch13.ads (Analyze_Aspect_Specifications_On_Body_Or_Stub):
1732 * sem_prag.adb (Add_Item_To_Name_Buffer): Add support for
1734 (Analyze_Contract_Cases_In_Decl_Part): Code cleanup.
1735 (Analyze_Depends_Global): New routine.
1736 (Analyze_Depends_In_Decl_Part): Code cleanup.
1737 (Analyze_Global_In_Decl_Part): Code cleanup.
1738 (Analyze_Global_Item): Constants are now valid global items. Do
1739 not perform state-related checks in an instance. Change the way
1740 renamings are handled. (Analyze_Initial_Condition_In_Decl_Part):
1742 (Analyze_Initializes_In_Decl_Part): Code cleanup.
1743 (Analyze_Input_Output): The analysis of attribute 'Result in
1744 the context of pragmas Depends or Refined_Depends now reuses
1745 the existing attribute analysis machinery. Constants and
1746 generic parameters are now valid dependency items. Do not
1747 perform state-related checks in an instance. Change the way
1748 renamings are handled. (Analyze_Pragma): Add a "characteristics"
1749 section for pragmas Abstract_State, Contract_Cases, Depends,
1750 Extensions_Visible, Global, Initial_Condition, Initializes,
1751 Post, Post_Class, Postcondition, Pre, Pre_Class, Precondition,
1752 Refined_Depends, Refined_Global, Refined_Post, Refined_State, Test_Case.
1753 (Analyze_Pre_Post_Condition): Do not create a generic
1755 (Analyze_Pre_Post_Condition_In_Decl_Part): Code cleanup.
1756 (Analyze_Refined_Depends_Global_Post): New routine.
1757 (Analyze_Refined_Depends_In_Decl_Part): Code cleanup.
1758 (Analyze_Refined_Global_In_Decl_Part): Code cleanup.
1759 (Analyze_Refined_Pragma): Removed.
1760 (Analyze_Refined_State_In_Decl_Part): Code cleanup.
1761 (Analyze_Test_Case_In_Decl_Part): Code cleanup.
1762 (Check_Dependency_Clause): Do not perform this check in an instance.
1763 (Check_Function_Return): Add support for generic functions.
1764 (Check_In_Out_States): Do not perform this check in an instance.
1765 (Check_Input_States): Do not perform this check in an instance.
1766 (Check_Mode_Restriction_In_Function): Add support for generic functions.
1767 (Check_Output_States): Do not perform this check in an instance.
1768 (Check_Postcondition_Use_In_Inlined_Subprogram): Rename
1769 parameter Subp_Id to Spec_Id and update comment on usage.
1770 (Check_Proof_In_States): Do not perform this check in an instance.
1771 (Check_Refined_Global_Item): Add support for constants.
1772 (Check_Refined_Global_List): Do not perform this check in an instance.
1773 (Collect_Global_Items): Reimplemented.
1774 (Collect_Subprogram_Inputs_Outputs): Add support for generic parameters.
1775 (Create_Generic_Template): Removed.
1776 (Find_Related_Package_Or_Body): Moved to spec.
1777 (Find_Role): Add support for generic parameters and constants.
1778 (Get_Argument): Moved to spec. Rename parameter Spec_Id to Context_Id.
1779 (Match_Item): Add support for constants.
1780 (Preanalyze_Test_Case_Arg): Reimplemented.
1781 (Report_Extra_Clauses): Do not perform this check in an instance.
1782 (Report_Extra_Constituents): Do not perform this check in an instance.
1783 * sem_prag.ads (Collect_Subprogram_Inputs_Outputs): Update
1784 the comment on usage.
1785 (Find_Related_Package_Or_Body): Moved from body.
1786 (Get_Argument): Moved from body.
1787 * sem_util.adb Add with and use clauses for Sem_Ch12.
1788 (Corresponding_Spec_Of): Add support for packages and package bodies.
1789 (Create_Generic_Contract): New routine.
1790 (Is_Contract_Annotation): Reimplemented.
1791 (Is_Generic_Declaration_Or_Body): New routine.
1792 (Is_Package_Contract_Annotation): New routine.
1793 (Is_Subprogram_Contract_Annotation): New routine.
1794 * sem_util.ads (Corresponding_Spec_Of): Update the comment on usage.
1795 (Create_Generic_Contract): New routine.
1796 (Is_Generic_Declaration_Or_Body): New routine.
1797 (Is_Package_Contract_Annotation): New routine.
1798 (Is_Subprogram_Contract_Annotation): New routine.
1799 * sinfo.adb (Is_Generic_Contract_Pragma): New routine.
1800 (Set_Is_Generic_Contract_Pragma): New routine.
1801 * sinfo.ads Add new attribute Is_Generic_Contract_Pragma along
1802 with occurrences in nodes.
1803 (Is_Generic_Contract_Pragma): New routine along with pragma Inline.
1804 (Set_Is_Generic_Contract_Pragma): New routine along with pragma Inline.
1805 * treepr.adb (Print_Entity_Info): Output fields 36 to 41.
1807 2015-05-12 Robert Dewar <dewar@adacore.com>
1809 * a-taster.ads: Minor comment fix: fix bad header, this is a
1812 2015-05-12 Robert Dewar <dewar@adacore.com>
1814 * sem_intr.adb: (Check_Shift): Diagnose bad modulus value.
1816 2015-05-12 Robert Dewar <dewar@adacore.com>
1818 * gnat1drv.adb (Adjust_Global_Switches): Default to suppressing
1819 Alignment_Checks on non-strict alignment machine.
1820 * sem_ch13.adb (Validate_Address_Clauses): Don't give
1821 compile-time alignment warnings if run time Alignment_Check
1824 2015-05-12 Thomas Quinot <quinot@adacore.com>
1826 * g-sercom.ads, g-sercom-linux.adb (GNAT.Serial_Communications.
1827 Data_Rate): New literals B75, B110, B150, B300, B600.
1829 2015-05-12 Doug Rupp <rupp@adacore.com>
1831 * init.c (__gnat_init_float) [vxworks]: For e500v2,
1832 do nothing and leave the responsibility to install the handler
1833 and enable the exceptions to the BSP.
1835 2015-05-12 Robert Dewar <dewar@adacore.com>
1837 * sem_ch9.adb, einfo.ads, exp_intr.adb: Minor reformatting.
1838 * sem_disp.adb: Minor code reorganization (remove junk redundant
1840 * exp_unst.adb (Unnest_Subprogram.Uplev_Refs): Ignore uplevel
1841 references to bounds of types coming from original type reference.
1842 * checks.ads: Minor reformatting.
1843 * checks.adb: Minor reformatting.
1844 * sem_prag.adb (Analyze_Pragma, case Check): If in ignored
1845 assertion, then make sure we do not drag in bignum stuff.
1847 2015-05-12 Ed Schonberg <schonberg@adacore.com>
1849 * sem_ch9.adb (Collect_Interfaces): Initialize
1850 Direct_Primitive_Operations for a tagged synchronized type,
1851 so it can used in ASIS mode.
1852 * sem_disp.adb (Check_Dispatching_Operation): If expansion is
1853 disabled, attach subprogram to list of Direct_Primitive_Operations
1854 of synchronized type itself, for ASIS use, because in this case
1855 Corresponding_Record_Type is not built.
1856 * einfo.ads: Indicate use of Direct_Primitive_Operations on
1859 2015-05-12 Pierre-Marie de Rodat <derodat@adacore.com>
1861 * exp_pakd.adb: Make clearer the comment in exp_pakd.adb about
1864 2015-05-12 Robert Dewar <dewar@adacore.com>
1866 * sem_ch3.adb, sem_util.adb, sem_ch6.adb: Minor reformatting.
1868 2015-05-12 Robert Dewar <dewar@adacore.com>
1870 * exp_unst.adb (Visit_Node): Deal with subprogram and package stubs.
1872 2015-05-12 Ed Schonberg <schonberg@adacore.com>
1874 * exp_intr.adb (Expand_Dispatching_Constructor_Call): The
1875 tag to be retrieved for the generated call is the first entry
1876 in the dispatch table for the return type of the instantiated
1879 2015-05-12 Bob Duff <duff@adacore.com>
1881 * exp_ch7.adb, exp_ch7.ads, exp_intr.adb, exp_util.adb,
1882 exp_util.ads: Update comments.
1884 2015-05-12 Ed Schonberg <schonberg@adacore.com>
1886 * sem_ch3.adb (Add_Internal_Interface_Entities): Do no generate
1887 freeze nodes for these in ASIS mode, because they lead to
1888 elaoration order issues in gigi.
1890 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
1892 * sem_ch6.adb (Analyze_Expression_Function): Code
1893 cleanup. Use Copy_Subprogram_Spec to create a proper spec.
1894 (Analyze_Subprogram_Body_Helper): Code cleanup. Do not
1895 prepare a stand alone body for inlining in GNATprove mode
1896 when inside a generic. (Body_Has_Contract): Reimplemented.
1897 (Build_Subprogram_Declaration): New routine.
1898 * sem_ch10.adb (Analyze_Compilation_Unit): Capture global
1899 references within generic bodies by loading them.
1900 * sem_util.adb (Copy_Parameter_List): Code cleanup.
1901 (Copy_Subprogram_Spec): New routine.
1902 (Is_Contract_Annotation): New routine.
1903 * sem_util.ads (Copy_Subprogram_Spec): New routine.
1904 (Is_Contract_Annotation): New routine.
1906 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
1908 * sem_attr.adb (Resolve_Attribute): Do not analyze the generated
1909 body of an expression function when the prefix of attribute
1910 'Access is the body.
1912 2015-05-12 Ed Schonberg <schonberg@adacore.com>
1914 * sem_ch3.adb (Build_Derived_Enumeration_Type): The anonymous base
1915 created for a derived enumeration type is not a first subtype,
1916 even though it is defined through a full type declaration.
1917 * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): Do not process
1918 aspects for the anonymous base type constructed for a derived
1919 scalar type, because they will be set when the first subtype
1921 (Inherit_Aspects_At_Freeze_Point): Fix typos on handling of
1922 Default_Value and Default_Component_Value, that prevented the
1923 proper inheritance of these aspects.
1925 2015-05-12 Gary Dismukes <dismukes@adacore.com>
1927 * exp_ch6.adb, exp_unst.adb: Minor typo fixes.
1929 2015-05-12 Robert Dewar <dewar@adacore.com>
1931 * sem_ch3.adb: Minor reformatting.
1933 2015-05-12 Vincent Celier <celier@adacore.com>
1935 * gnatcmd.adb: If we want to invoke gnatmake (gnatclean) with
1936 -P, then check if gprbuild (gprclean) is available; if it is,
1937 use gprbuild (gprclean) instead of gnatmake (gnatclean).
1939 2015-05-12 Robert Dewar <dewar@adacore.com>
1941 * debug.adb: Add flag -gnatd.3 to output diagnostic info from
1943 * einfo.ad, einfo.adb: Reorganize (and remove most of) flags used by
1945 * exp_ch6.adb (Unest_Bodies): Table for delayed calls to
1946 Unnest_Subprogram (Expand_N_Subprogram_Body): Add entry to table
1947 for later call instead of calling Unnest_Subprogram directly
1948 (Initialize): New procedure (Unnest_Subprograms): New procedure
1949 * exp_ch6.ads (Add_Extra_Actual_To_Call): Move into proper
1951 (Initialize): New procedure.
1952 (Unnest_Subprograms): New procedure.
1953 * exp_unst.adb (Unnest_Subprogram): Major rewrite, moving
1954 all processing to this routine which is now called late
1955 after instantiating bodies. Fully handles the case of generic
1957 * exp_unst.ads: Major rewrite, moving all processing to
1959 * frontend.adb (Frontend): Add call to Exp_Ch6.Initialize.
1960 (Frontend): Add call to Unnest_Subprograms.
1961 * sem_ch8.adb (Find_Direct_Name): Back to old calling sequence
1962 for Check_Nested_Access.
1963 * sem_util.adb (Build_Default_Subtype): Minor reformatting
1964 (Check_Nested_Access): Back to original VM-only form (we
1965 now do all the processing for Unnest_Subprogram at the time
1967 (Denotes_Same_Object): Minor reformatting
1968 (Note_Possible_Modification): Old calling sequence for
1969 Check_Nested_Access.
1970 * sem_util.ads (Check_Nested_Access): Back to original VM-only
1971 form (we now do all the processing for Unnest_Subprogram at the
1974 2015-05-12 Robert Dewar <dewar@adacore.com>
1976 * sem_ch3.adb, freeze.adb, sem_ch6.adb: Minor reformatting.
1978 2015-05-12 Ed Schonberg <schonberg@adacore.com>
1980 * sem_ch3.adb (Analyze_Object_Declaration): New function
1981 Has_Delayed_Aspect, used to defer resolution of an aggregate
1982 expression when the object declaration carries aspects Address
1984 * freeze.adb (Freeze_Object_Declaration): New subsidiary procedure
1985 to Freeze_Entity. In addition to the previous processing steps
1986 at the freeze point of an object, this procedure also handles
1987 aggregates in object declarations, when the declaration carries
1988 delayed aspects that require that the initialization of the
1989 object be attached to its freeze actions.
1991 2015-05-12 Ed Schonberg <schonberg@adacore.com>
1993 * sem_ch6.adb (Analyze_Subprogram_Declaration): Following
1994 AI12-0147, null procedures and expression functions are allowed
1995 in protected bodies.
1997 2015-05-12 Tristan Gingold <gingold@adacore.com>
1999 * i-cpoint.adb (Copy_Terminated_Array): Copy nothing if Length is 0.
2001 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2003 * sem_ch3.adb (Complete_Private_Subtype): Propagate
2004 Has_Delayed_Aspects flag from private to full view, to ensure
2005 that predicate functions are constructed.
2007 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2009 * sem_ch6.adb (Process_Formals): If a tagged formal is an
2010 incomplete class-wide type, the subprogram must have a delayed
2011 freeze even though the opertation is not a primitive of the
2012 type. THis ensures that the backend can recover the full view
2013 when elaborating the subprogram declaration.
2015 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2017 * exp_util.adb (Get_Current_Value_Condition): Nothing to be
2018 done if an elsif part has been rewritten so that it is not part
2019 of an enclosing if_statement.
2021 2015-05-12 Robert Dewar <dewar@adacore.com>
2023 * sem_type.adb, sem_ch10.adb, freeze.adb, sem_ch6.adb, exp_disp.adb:
2026 2015-05-12 Bob Duff <duff@adacore.com>
2028 * exp_attr.adb (Size): Remove unnecessary check for types with
2029 unknown discriminants. That was causing the compiler to build
2030 a function call _size(T), where T is a type, not an object.
2032 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2034 * sem_ch4.adb (Extended_Primitive_Ops): Exclude overriding
2035 primitive operations of a type extension declared in the package
2036 body, to prevent duplicates in extended list.
2038 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2040 * sem_ch3.adb (Analyze_Component_Declaration): If the component is
2041 an unconstrained synchronized type with discriminants, create a
2042 constrained default subtype for it, so that the enclosing record
2043 can be given the proper size.
2044 * sem_util.adb (Build_Default_Subtype): If the subtype is created
2045 for a record discriminant, do not analyze the declarztion at
2046 once because it is added to the freezing actions of the enclosing
2049 2015-05-12 Robert Dewar <dewar@adacore.com>
2051 * exp_prag.adb (Expand_N_Pragma): Rewrite ignored pragma as
2053 * namet.ads (Boolean3): Document this flag used for Ignore_Pragma.
2054 * par-prag.adb (Prag): Implement Ignore_Pragma.
2055 * sem_prag.adb: Implement Ignore_Pragma.
2056 * snames.ads-tmpl: Add entries for pragma Ignore_Pragma.
2058 2015-05-12 Javier Miranda <miranda@adacore.com>
2060 * sem_ch10.adb (Build_Shadow_Entity): Link the class-wide shadow
2061 entity with its corresponding real entity.
2062 (Decorate_Type): Unconditionally build the class-wide shadow entity of
2064 * einfo.ads, einfo.adb (Has_Non_Limited_View): New synthesized
2066 (Non_Limited_View): Moved from field 17 to field 19 be available
2067 in class-wide entities.
2068 * exp_attr.adb (Access_Cases): Code cleanup.
2069 * exp_disp.adb (Expand_Interface_Actuals): Ditto.
2070 * exp_util.adb (Non_Limited_Designated_Type): Ditto.
2071 * freeze.adb (Build_Renamed_Bdody): Ditto.
2072 * sem_aux.adb (Available_View): Ditto.
2073 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
2074 (Try_One_Prefix_Interpretation): Ditto.
2075 * sem_ch5.adb (Analyze_Assignment): Ditto.
2076 * sem_ch6.adb (Detect_And_Exchange): Ditto.
2077 * sem_ch8.adb (Find_Expanded_Name): Ditto.
2078 * sem_disp.adb (Check_Controlling_Type): Ditto.
2079 * sem_res.adb (Resolve_Type_Conversion): Ditto.
2080 (Full_Designated_Type): Ditto.
2081 * sem_type.adb (Covers): Ditto.
2082 * sem_util.adb: Fix typo in comment.
2084 2015-05-12 Robert Dewar <dewar@adacore.com>
2086 * exp_unst.adb (Get_Real_Subp): New subprogram.
2087 (Unnest_Subprogram): Use Get_Real_Subp.
2088 (Uplev_Refs_For_One_Subp): Skip if no ARECnU entity.
2089 (Uplev_Refs_For_One_Subp): Use actual subtype in unconstrained case.
2091 2015-05-12 Robert Dewar <dewar@adacore.com>
2093 * a-reatim.adb ("/"): Add explicit check for Time_Span_First / -1.
2095 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2097 * sem_ch4.adb (Extended_Primitive_Ops): New subprogram,
2098 auxiliary to Try_Primitive_Operation to handle properly prefixed
2099 calls where the operation is not a primitive of the type, but
2100 is declared in the package body that is in the immediate scope
2103 2015-05-12 Robert Dewar <dewar@adacore.com>
2105 * sem_util.adb (Is_Variable): Allow X'Deref(Y) as a variable.
2107 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2109 * sem_ch8.adb (Find_Expanded_Name): Handle properly a fully
2110 qualified name for an instance of a generic grand-child unit in
2111 the body its parent.
2113 2015-05-12 Robert Dewar <dewar@adacore.com>
2115 * exp_unst.adb (Upref_Name): New subprogram.
2116 (Unnest_Subprogram): Use Upref_Name.
2117 (Unnest_Subprogram): Use new Deref attribute.
2118 * exp_unst.ads: Doc updates.
2120 2015-05-12 Thomas Quinot <quinot@adacore.com>
2122 * adaint.c: Enable Large File Support in adaint so that __gnat_readdir
2123 can access files on filesystems mounted from servers that use large
2126 2015-05-09 Eric Botcazou <ebotcazou@adacore.com>
2128 * gcc-interface/utils.c (gnat_write_global_declarations): Use type_decl
2129 method instead of global_decl for TYPE_DECLs.
2131 2015-04-27 Jim Wilson <jim.wilson@linaro.org>
2133 * gcc-interface/Makefile-lan.in (ada.mostlyclean): Remove gnatbind
2136 2015-04-13 Eric Botcazou <ebotcazou@adacore.com>
2138 * gnatvsn.ads (Library_Version): Bump to 6.
2140 2015-04-09 Iain Sandoe <iain@codesourcery.com>
2142 * gcc-interface/Makefile.in (darwin, powerpc): Enable atomics.
2144 2015-04-08 Eric Botcazou <ebotcazou@adacore.com>
2146 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Do not make
2147 a function returning an unconstrained type 'const' for the middle-end.
2149 * gcc-interface/trans.c (Pragma_to_gnu) <case Pragma_Warning>: Use
2150 exact condition to detect Reason => "..." pattern.
2152 2015-03-31 Tom de Vries <tom@codesourcery.com>
2155 * terminals.c (child_setup_tty): Fix warning 'argument to sizeof in
2156 bzero call is the same expression as the destination'.
2158 2015-03-26 Eric Botcazou <ebotcazou@adacore.com>
2160 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Deref>: New case.
2162 2015-03-24 Gary Dismukes <dismukes@adacore.com>
2164 * sem_ch3.adb: Minor typo fix (missing paren).
2166 2015-03-24 Robert Dewar <dewar@adacore.com>
2168 * sinfo.ads: Update comment.
2170 2015-03-24 Robert Dewar <dewar@adacore.com>
2172 * exp_attr.adb: Add entry for typ'Deref.
2173 * sem_attr.adb (Deref): New GNAT attribute.
2174 * sem_attr.ads: Add entry for new GNAT attribute Deref.
2175 * snames.ads-tmpl: Add entries for new attribute Deref.
2177 2015-03-24 Ed Schonberg <schonberg@adacore.com>
2179 * sem_ch13.adb (Rep_Item_Too_Early): allow pragma Convention
2182 2015-03-24 Gary Dismukes <dismukes@adacore.com>
2184 * inline.adb: Minor typo fix.
2186 2015-03-24 Arnaud Charlet <charlet@adacore.com>
2188 * doc/gnat_ugn/building_executable_programs_with_gnat.rst,
2189 doc/gnat_ugn/gnat_utility_programs.rst
2190 doc/gnat_rm/implementation_defined_attributes.rst
2191 doc/gnat_rm/implementation_defined_pragmas.rst
2192 doc/gnat_rm/representation_clauses_and_pragmas.rst
2193 doc/gnat_rm/about_this_guide.rst
2194 doc/gnat_rm/implementation_of_ada_2012_features.rst: Doc improvements.
2195 * gnat_rm.texi, gnat_ugn.texi: Regenerate.
2197 2015-03-23 Jakub Jelinek <jakub@redhat.com>
2200 * adadecode.c (ada_demangle): Guard with IN_RTS instead of IN_GCC.
2202 2015-03-20 Eric Botcazou <ebotcazou@adacore.com>
2205 * gcc-interface/utils.c (gnat_pushdecl): Tidy up and improve comment.
2206 Make sure to chain only main variants through TYPE_NEXT_PTR_TO.
2208 * gcc-interface/trans.c (Attribute_to_gnu): Revert latest change.
2210 2015-03-16 Eric Botcazou <ebotcazou@adacore.com>
2212 * gcc-interface/utils2.c (gnat_invariant_expr): Return null if the type
2213 of the expression ends up being composite.
2215 2015-03-16 Eric Botcazou <ebotcazou@adacore.com>
2217 * gcc-interface/decl.c (is_from_limited_with_of_main): New predicate.
2218 (gnat_to_gnu_entity) <E_Subprogram_Type>: Invoke it on return and
2219 parameter types to detect circularities in ASIS mode.
2220 * gcc-interface/trans.c (Attribute_to_gnu): Mention AI05-0151.
2222 2015-03-16 Eric Botcazou <ebotcazou@adacore.com>
2224 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Abstract_State>: Do not
2225 short-circuit the regular handling.
2227 2015-03-13 Robert Dewar <dewar@adacore.com>
2229 * exp_unst.adb (Note_Uplevel_Reference): Eliminate duplicate
2231 (Actual_Ref): New function.
2232 (AREC_String): Minor reformatting.
2233 (Unnest_Subprogram): Use Actual_Ref.
2234 * frontend.adb (Frontend): Turn off Unnest_Subprogram_Mode
2235 before call to Instantiate_Bodies.
2237 2015-03-13 Ed Schonberg <schonberg@adacore.com>
2239 * freeze.adb (Freeze_Profile): If the return type of a function
2240 being frozen is an untagged limited view and the function is
2241 abstract, mark the type as frozen because there is no later
2242 point at which the profile of the subprogram will be elaborated.
2244 2015-03-13 Robert Dewar <dewar@adacore.com>
2246 * einfo.adb, einfo.ads, atree.adb, atree.ads, atree.h: Add seventh
2247 component to entities. Add new fields Field36-41 and Node36-41.
2249 2015-03-13 Claire Dross <dross@adacore.com>
2251 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Rewrite after review.
2253 2015-03-13 Robert Dewar <dewar@adacore.com>
2255 * exp_util.adb (Is_Volatile_Reference): Compile time known
2256 value is never considered to be a volatile reference.
2258 2015-03-13 Robert Dewar <dewar@adacore.com>
2260 * sem_ch3.adb (Analyze_Object_Contract): Suppress "constant
2261 cannot be volatile" for internally generated object (such as
2262 FIRST and LAST constants).
2264 2015-03-13 Ed Schonberg <schonberg@adacore.com>
2266 * sem_ch12.adb (Validate_Access_Subprogram_Instance): If a
2267 convention is specified for the formal parameter, verify that
2268 the actual has the same convention.
2269 * sem_prag.adb (Set_Convention_From_Pragma): Allow convention
2270 pragma to be set on a generic formal type.
2271 * sem_util.adb (Set_Convention): Ignore within an instance,
2272 as it has already been verified in the generic unit.
2274 2015-03-13 Claire Dross <dross@adacore.com>
2276 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do not inline
2277 subprograms with unconstrained record parameters containing
2279 * sinfo.ads Document GNATprove assumption that type should match
2281 * sem_ch6.adb (Analyze_Subprogram_Body_Contract):
2282 Do not check for Refined_Depends and Refined_Globals contracts
2283 as they are optional.
2285 2015-03-13 Ed Schonberg <schonberg@adacore.com>
2287 * sem_ch12.adb (Instantiate_Type): For a floating-point type,
2288 capture dimension info if any, because the generated subtype
2289 declaration does not come from source and will not process dimensions.
2290 * sem_dim,adb (Analyze_Dimension_Extension_Or_Record_Aggregate):
2291 Do not analyze expressions with an initialization procedure
2292 because aggregates will have been checked at the point of record
2295 2015-03-13 Robert Dewar <dewar@adacore.com>
2297 * aspects.ads, aspects.adb: Add entries for aspect Unimplemented.
2298 * einfo.ads, einfo.adb (Is_Unimplemented): New flag.
2299 * sem_ch13.adb: Add dummy entry for aspect Unimplemented.
2300 * snames.ads-tmpl: Add entry for Name_Unimplemented.
2302 2015-03-13 Gary Dismukes <dismukes@adacore.com>
2304 * style.adb (Missing_Overriding): Apply the
2305 Comes_From_Source test to the Original_Node of the subprogram
2306 node, to handle the case of a null procedure declaration that
2307 has been rewritten as an empty procedure body.
2309 2015-03-13 Robert Dewar <dewar@adacore.com>
2311 * exp_util.ads: Minor fix to comment.
2312 * sem_ch3.adb (Constrain_Index): Correct pasto from previous
2315 2015-03-13 Robert Dewar <dewar@adacore.com>
2317 * exp_util.ads, exp_util.adb (Force_Evaluation): Add Related_Id and
2318 Is_Low/High_Bound params.
2319 * sem_ch3.adb (Constrain_Index): Use new Force_Evaluation calling
2320 sequence to simplify generation of FIRST/LAST temps for bounds.
2322 2015-03-12 Olivier Hainque <hainque@adacore.com>
2324 * gcc-interface/trans.c (Attribute_to_gnu) <Code_Address case>:
2325 On targets where a function symbol designates a function descriptor,
2326 fetch the function code address from the descriptor.
2327 (USE_RUNTIME_DESCRIPTORS): Provide a default definition.
2329 2015-03-04 Robert Dewar <dewar@adacore.com>
2331 * sem_warn.adb: Minor reformatting.
2332 * init.c: Minor tweaks.
2334 2015-03-04 Dmitriy Anisimko <anisimko@adacore.com>
2336 * a-coinho-shared.adb: Fix clear of already empty holder.
2338 2015-03-04 Robert Dewar <dewar@adacore.com>
2340 * exp_unst.adb (Check_Dynamic_Type): Ignore library level types.
2341 (Check_Uplevel_Reference_To_Type): Ignore call inside generic.
2342 (Note_Uplevel_Reference): Ignore call inside generic.
2343 (Note_Uplevel_Reference): Fix check for no entity field.
2344 (Unnest_Subprogram): Ignore call inside generic.
2345 (Find_Current_Subprogram): Use Defining_Entity, not Defining_Unit_Name.
2346 (Visit_Node): Ignore calls to Imported subprograms.
2347 (Visit_Node): Fix problem in finding subprogram body in some cases.
2348 (Add_Form_To_Spec): Use Defining_Entity, not Defining_Unit_Name.
2350 2015-03-04 Robert Dewar <dewar@adacore.com>
2352 * einfo.adb (Is_ARECnF_Entity): Removed.
2353 (Last_Formal): Remove special handling of Is_ARECnF_Entity.
2354 (Next_Formal): Remove special handling of Is_ARECnF_Entity.
2355 (Next_Formal_With_Extras): Remove special handling of Is_ARECnF_Entity.
2356 (Number_Entries): Minor reformatting.
2357 * einfo.ads (Is_ARECnF_Entity): Removed.
2358 * exp_unst.adb (Unnest_Subprogram): Remove setting of
2360 (Add_Extra_Formal): Use normal Extra_Formal circuit.
2361 * sprint.adb (Write_Param_Specs): Properly handle case where
2362 there are no source formals, but we have at least one Extra_Formal
2365 2015-03-04 Ed Schonberg <schonberg@adacore.com>
2367 * sem_aggr.adb (Resolve_Record_Aggregate,
2368 Add_Discriminant_Values): If the value is a reference to the
2369 current instance of an enclosing type, use its base type to check
2370 against prefix of attribute reference, because the target type
2371 may be otherwise constrained.
2373 2015-03-04 Robert Dewar <dewar@adacore.com>
2375 * atree.h: Add entries for Flag287-Flag309.
2376 * einfo.adb: Add (unused) flags Flag287-Flag309.
2378 2015-03-04 Ed Schonberg <schonberg@adacore.com>
2380 * sem_util.adb (Collect_Interfaces, Collect): When gathering
2381 interfaces of ancestors, handle properly a subtype of a private
2384 2015-03-04 Robert Dewar <dewar@adacore.com>
2386 * einfo.adb (Is_ARECnF_Entity): New flag (ARECnF is an extra formal).
2387 (Next_Formal): Don't return ARECnF formal.
2388 (Last_Formal): Don't consider ARECnF formal.
2389 (Next_Formal_With_Extras): Do consider ARECnF formal.
2390 * einfo.ads (Is_ARECnF_Entity): New flag (ARECnF is an extra formal).
2391 * exp_unst.adb (Create_Entities): Set Is_ARECnF_Entity flag.
2393 2015-03-04 Javier Miranda <miranda@adacore.com>
2395 * exp_ch6.adb (Expand_Simple_Function_Return): When the returned
2396 object is a class-wide interface object and we generate the
2397 accessibility described in RM 6.5(8/3) then displace the pointer
2398 to the object to reference the base of the object (to get access
2399 to the TSD of the object).
2401 2015-03-04 Hristian Kirtchev <kirtchev@adacore.com>
2403 * sem_prag.adb (Analyze_Abstract_State): Use routine
2404 Malformed_State_Error to issue general errors.
2405 (Analyze_Pragma): Diagnose a syntax error related to a state
2406 declaration with a simple option.
2407 (Malformed_State_Error): New routine.
2409 2015-03-04 Robert Dewar <dewar@adacore.com>
2411 * a-strsup.adb (Super_Slice): Deal with super flat case.
2412 * einfo.ads: Minor reformatting.
2413 * s-imgdec.adb (Set_Decimal_Digits): Add comment about possibly
2416 2015-03-04 Claire Dross <dross@adacore.com>
2418 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
2419 a-cforse.ads, a-cofove.ads: Use Default_Initial_Condition on formal
2422 2015-03-04 Ed Schonberg <schonberg@adacore.com>
2424 * sem_warn.adb (Check_References): When checking for an unused
2425 in-out parameter of a class- wide type, use its type to determine
2426 whether it is private, in order to avoid a spurious warning when
2427 subprogram spec and body are in different units.
2429 2015-03-04 Yannick Moy <moy@adacore.com>
2431 * sem_attr.adb: Improve warning messages.
2433 2015-03-04 Robert Dewar <dewar@adacore.com>
2435 * exp_ch6.adb (Expand_N_Subprogram_Body): Avoid trying to unnest
2436 generic subprograms.
2437 * exp_unst.adb (Check_Dynamic_Type): Handle record types properly
2438 (Note_Uplevel_Reference): Ignore uplevel references to non-types
2439 (Get_Level): Consider only subprograms, not blocks.
2440 (Visit_Node): Set proper condition for generating ARECnF entity.
2441 Ignore indirect calls. Ignore calls to subprograms
2443 (Unnest_Subprogram): Minor changes in dealing with ARECnF entity.
2444 (Add_Form_To_Spec): Properly set Last_Entity field.
2445 (Unnest_Subprogram): Set current subprogram scope for analyze calls.
2446 Handle case of no uplevel refs in outer subprogram
2447 Don't mark uplevel entities as aliased.
2448 Don't deal with calls with no ARECnF requirement.
2450 2015-03-04 Robert Dewar <dewar@adacore.com>
2452 * s-valrea.adb (Scan_Real): Remove redundant tests from scaling loops.
2453 * s-imgdec.adb (Set_Decimal_Digits): Remove redundant Max
2454 operation in computing LZ.
2455 * sem_attr.adb: Minor typo fix
2457 2015-03-04 Robert Dewar <dewar@adacore.com>
2459 * exp_ch7.adb: Minor reformatting.
2460 * exp_unst.adb (Build_Tables): Fix minor glitch for no separate
2462 * erroutc.adb (Delete_Msg): add missing decrement of info msg counter.
2464 2015-03-04 Hristian Kirtchev <kirtchev@adacore.com>
2466 * exp_ch6.adb (Build_Pragma_Check_Equivalent): Suppress
2467 references to formal parameters subject to pragma Unreferenced.
2468 (Suppress_Reference): New routine.
2469 * sem_attr.adb (Analyze_Attribute): Reimplement the analysis
2470 of attribute 'Old. Attributes 'Old and 'Result now share
2472 (Analyze_Old_Result_Attribute): New routine.
2473 (Check_Placement_In_Check): Removed.
2474 (Check_Placement_In_Contract_Cases): Removed.
2475 (Check_Placement_In_Test_Case): Removed.
2476 (Check_Use_In_Contract_Cases): Removed.
2477 (Check_Use_In_Test_Case): Removed.
2478 (In_Refined_Post): Removed.
2479 (Is_Within): Removed.
2480 * sem_warn.adb (Check_Low_Bound_Tested): Code cleanup.
2481 (Check_Low_Bound_Tested_For): New routine.
2483 2015-03-04 Hristian Kirtchev <kirtchev@adacore.com>
2485 * exp_ch3.adb (Expand_N_Object_Declaration):
2486 Generate a runtime check to test the expression of pragma
2487 Default_Initial_Condition when the object is default initialized.
2489 2015-03-02 Robert Dewar <dewar@adacore.com>
2491 * scng.adb (Scan): Ignore illegal character in relaxed
2494 2015-03-02 Ed Schonberg <schonberg@adacore.com>
2496 * sem_ch4.adb (Analyze_Set_Membership); Retain Overloaded flag
2497 on left operand, so it can be properly resolved with type of
2498 alternatives of right operand.
2499 * sem_res.adb (Resolve_Set_Membership): Handle properly an
2500 overloaded left-hand side when the alternatives on the right
2501 hand side are literals of some universal type. Use first
2502 non-overloaded alternative to find expected type.
2504 2015-03-02 Ed Schonberg <schonberg@adacore.com>
2506 * exp_ch7.adb (Make_Set_Finalize_Address_Call): Use underlying
2507 type to retrieve designated type, because the purported access
2508 type may be a partial (private) view, when it is declared in
2509 the private part of a nested package, and finalization actions
2510 are generated when completing compilation of enclosing unit.
2512 2015-03-02 Robert Dewar <dewar@adacore.com>
2514 * back_end.adb (Call_Back_End): Remove previous patch,
2515 the back end now gets to see the result of -gnatd.1
2516 (Unnest_Subprogram_Mode) processing.
2517 * elists.ads, elists.adb (List_Length): New function.
2518 * exp_unst.ads, exp_unst.adb: Major changes, first complete version.
2519 * sem_util.adb (Check_Nested_Access): Handle formals in
2520 Unnest_Subprogram_Mode.
2521 (Adjust_Named_Associations): Minor reformatting.
2522 * sprint.adb (Sprint_Node_Actual): Fix failure to print aliased
2525 2015-03-02 Robert Dewar <dewar@adacore.com>
2527 * atree.ads, atree.adb (Uint24): New function
2528 (Set_Uint24): New procedure.
2529 * atree.h (Uint24): New macro for field access.
2530 * back_end.adb (Call_Back_End): For now, don't call back end
2531 if unnesting subprogs.
2532 * einfo.adb (Activation_Record_Component): New field
2533 (Subps_Index): New field.
2534 * einfo.ads (Activation_Record_Component): New field
2535 (Subps_Index): New field Minor reordering of comments into alpha order.
2536 * exp_unst.ads, exp_unst.adb: Continued development.
2538 2015-03-02 Gary Dismukes <dismukes@adacore.com>
2540 * exp_disp.ads: Minor reformatting.
2542 2015-03-02 Ed Schonberg <schonberg@adacore.com>
2544 * sem_ch8.adb (Chain_Use_Clause): Do not chain use clause from
2545 ancestor to list of use clauses active in descendant unit if we
2546 are within the private part of an intervening parent, to prevent
2547 circularities in use clause list.
2549 2015-03-02 Javier Miranda <miranda@adacore.com>
2551 * exp_ch9.adb (Build_Corresponding_Record): Propagate type
2552 invariants to the corresponding record type.
2553 * exp_disp.ad[sb] (Set_DT_Position_Value): New subprogram
2554 which sets the value of the DTC_Entity associated with a given
2555 primitive of a tagged type and propagates the value to the
2557 (Set_DTC_Entity_Value): Propagate the DTC
2558 value to the wrapped entity.
2559 * sem_ch13.adb (Build_Invariant_Procedure): Append the code
2560 associated with invariants of progenitors.
2561 * sem_ch3.adb (Build_Derived_Record_Type): Inherit type invariants
2562 of parents and progenitors.
2563 (Process_Full_View): Check hidden inheritance of class-wide type
2565 * sem_ch7.adb (Analyze_Package_Specification): Do not generate
2566 the invariant procedure for interface types; build the invariant
2567 procedure for tagged types inheriting invariants from their
2569 * sem_prag.adb (Pragma_Invariant) Allow invariants in interface
2570 types but do not build their invariant procedure since their
2571 invariants will be propagated to the invariant procedure of
2572 types covering the interface.
2573 * exp_ch6.adb, exp_disp.adb, sem_ch3.adb, sem_ch7.adb,
2574 sem_ch8.adb, sem_disp.adb: Replace all calls to Set_DT_Position
2575 by calls to Set_DT_Position_Value.
2577 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
2579 * sem_attr.adb (Analyze_Attribute): Factor out heavily indented
2580 code in Denote_Same_Function. Do not analyze attribute 'Result
2581 when it is inside procedure _Postconditions. Remove a misplaced
2582 warning diagnostic. Code cleanup.
2583 (Denote_Same_Function): New routine.
2584 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Code
2585 cleanup. Warn on pre/postconditions on an inlined subprogram.
2586 (Analyze_Pragma, Refined_Post case): Warn on pre/postconditions on
2587 an inlined subprogram.
2588 (Analyze_Pre_Post_Condition_In_Decl_Part): Code cleanup. Warn on
2589 pre/post condition on an inlined subprogram.
2590 (Analyze_Test_Case_In_Decl_Part): Code cleanup. Warn on
2591 pre/postconditions on an inlined subprogram.
2592 (Check_Postcondition_Use_In_Inlined_Subprogram): New routine.
2594 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
2596 * sem_prag.adb (Ensure_Aggregate_Form):
2597 Ensure that the name denoted by the Chars of a pragma argument
2598 association has the proper Sloc when converted into an aggregate.
2600 2015-03-02 Bob Duff <duff@adacore.com>
2602 * sem_ch6.adb (Check_Private_Overriding): Capture
2603 Incomplete_Or_Partial_View in a constant. This is cleaner and
2606 2015-03-02 Gary Dismukes <dismukes@adacore.com>
2608 * einfo.ads, exp_unst.ads: Minor reformatting.
2610 2015-03-02 Ed Schonberg <schonberg@adacore.com>
2612 * a-strsea.adb (Find_Token): Ensure that the range of iteration
2613 does not perform any improper character access. This prevents
2614 erroneous access in the unusual case of an empty string target
2615 and a From parameter less than Source'First.
2617 2015-03-02 Robert Dewar <dewar@adacore.com>
2619 * elists.adb (List_Length): Fix incorrect result.
2621 2015-03-02 Bob Duff <duff@adacore.com>
2623 * sem_ch6.adb (Check_Private_Overriding): Refine the legality
2624 checks here. It used to check that the function is merely
2625 overriding SOMEthing. Now it checks that the function is
2626 overriding a corresponding public operation. This is a correction
2627 to the implementation of the rule in RM-3.9.3(10).
2629 2015-03-02 Robert Dewar <dewar@adacore.com>
2631 * debug.adb: Document new debug flag -gnatd.1.
2632 * einfo.ads, einfo.adb (Has_Nested_Subprogram): New flag.
2633 (Has_Uplevel_Reference): New flag (Is_Static_Type): New flag.
2634 (Uplevel_Reference_Noted):New flag (Uplevel_References): New field.
2635 * elists.ads elists.adb (List_Length): New function.
2636 * exp_ch6.adb (Expand_N_Subprogram_Body): Call Unnest_Subprogram
2637 when appropriate (Process_Preconditions): Minor code
2638 reorganization and reformatting
2639 * exp_unst.ads, exp_unst.adb: New files.
2640 * gnat1drv.adb (Adjust_Global_Switches): Set
2641 Unnest_Subprogram_Mode if -gnatd.1
2642 * namet.ads, namet.adb (Name_Find_Str): New version of Name_Find with
2644 * opt.ads (Unnest_Subprogram_Mode): New flag.
2645 * par-ch3.adb (P_Identifier_Declarations): Fixes to -gnatd.2 handling.
2646 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set
2647 Has_Nested_Subprogram flag.
2648 * sem_ch8.adb (Find_Direct_Name): New calling sequence for
2649 Check_Nested_Access.
2650 (Find_Selected_Component): Minor comment addition.
2651 * sem_util.adb (Check_Nested_Access): New version for use with Exp_Unst.
2652 (Note_Possible_Modification): New calling sequence for
2653 Check_Nested_Access.
2654 * sem_util.ads (Check_Nested_Access): New version for use with Exp_Unst.
2655 * gcc-interface/Make-lang.in (GNAT1_OBJS): Add exp_unst.o
2657 2015-03-02 Pierre-Marie de Rodat <derodat@adacore.com>
2659 * gcc-interface/utils.c (gnat_pushdecl): For non-artificial pointer
2660 types, preserve the original type and create copies just like the C
2661 front-end does. For artificial ones, do not define a name for
2663 (create_type_decl): When gnat_pushdecl made the input type the
2664 original type for the new declaration, do not define a stub
2666 * gcc-interface/utils2.c (build_binary_op): Accept two different
2667 pointer types when they point to the same type.
2669 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
2671 * exp_util.adb (Possible_Bit_Aligned_Component): Do not process
2673 * sem_util.adb (Kill_Current_Values): Do not invalidate and
2676 2015-03-02 Robert Dewar <dewar@adacore.com>
2678 * sem_ch3.adb, exp_attr.adb, checks.adb, exp_aggr.adb: Minor
2681 2015-03-02 Ed Schonberg <schonberg@adacore.com>
2683 * sem_ch8.adb: extend use of Available_Subtype.
2685 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
2687 * sem_prag.adb (Duplication_Error): Remove the special handling
2688 of 'Class or _Class in the context of pre/postconditions.
2689 (Process_Class_Wide_Condition): Remove the special handling of
2690 'Class or _Class in the context of pre/postconditions.
2691 * sem_util.adb (Original_Aspect_Pragma_Name): Names Pre_Class
2692 and Post_Class no longer need to be converted to _Pre and _Post.
2693 * sem_util.ads (Original_Aspect_Pragma_Name): Update the comment
2696 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
2698 * exp_ch6.adb (Process_Preconditions): Modify the
2699 mechanism that find the first source declaration to correct exit
2700 the loop once it has been found.
2702 2015-03-02 Gary Dismukes <dismukes@adacore.com>
2704 * a-strsea.adb: Minor typo fix.
2706 2015-03-02 Bob Duff <duff@adacore.com>
2708 * einfo.ads: Minor comment fixes.
2710 2015-03-02 Gary Dismukes <dismukes@adacore.com>
2712 * einfo.adb, checks.adb: Minor reformatting and typo fixes.
2714 2015-03-02 Ed Schonberg <schonberg@adacore.com>
2716 * exp_aggr.adb (Get_Assoc_Expr): If the Default_Component_Value
2717 is defined for the array type, use it instead of a Default_Value
2718 specified for the component type itself.
2720 2015-03-02 Thomas Quinot <quinot@adacore.com>
2722 * exp_attr.adb (Expand_N_Attribute_Reference, case Input): When
2723 expanding a 'Input attribute reference for a class-wide type,
2724 do not generate a separate object declaration for the controlling
2725 tag dummy object; instead, generate the expression inline in the
2726 dispatching call. Otherwise, the declaration (which involves a
2727 call to String'Input, returning a dynamically sized value on the
2728 secondary stack) will be expanded outside of proper secondary
2729 stack mark/release operations, and will thus cause a secondary
2732 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
2734 * checks.adb (Add_Validity_Check): Change the names of all
2735 formal parameters to better illustrate their purpose. Update
2736 the subprogram documentation. Update all occurrences of the
2737 formal parameters. Generate a pre/postcondition pragma by
2738 calling Build_Pre_Post_Condition.
2739 (Build_PPC_Pragma): Removed.
2740 (Build_Pre_Post_Condition): New routine.
2741 * einfo.adb Node8 is no longer used as Postcondition_Proc. Node14
2742 is now used as Postconditions_Proc. Flag240 is now renamed to
2743 Has_Expanded_Contract. (First_Formal): The routine can now
2744 operate on generic subprograms.
2745 (First_Formal_With_Extras): The routine can now operate on generic
2747 (Has_Expanded_Contract): New routine.
2748 (Has_Postconditions): Removed.
2749 (Postcondition_Proc): Removed.
2750 (Postconditions_Proc): New routine.
2751 (Set_Has_Expanded_Contract): New routine.
2752 (Set_Has_Postconditions): Removed.
2753 (Set_Postcondition_Proc): Removed.
2754 (Set_Postconditions_Proc): New routine.
2755 (Write_Entity_Flags): Remove the output of Has_Postconditions. Add
2756 the output of Has_Expanded_Contract.
2757 (Write_Field8_Name): Remove the output of Postcondition_Proc.
2758 (Write_Field14_Name): Add the output of Postconditions_Proc.
2759 * einfo.ads New attributes Has_Expanded_Contract and
2760 Postconditions_Proc along with occurrences in entities.
2761 Remove attributes Has_Postconditions and Postcondition_Proc
2762 along with occurrences in entities.
2763 (Has_Expanded_Contract): New routine along with pragma Inline.
2764 (Has_Postconditions): Removed along with pragma Inline.
2765 (Postcondition_Proc): Removed along with pragma Inline.
2766 (Postconditions_Proc): New routine along with pragma Inline.
2767 (Set_Has_Expanded_Contract): New routine along with pragma Inline.
2768 (Set_Has_Postconditions): Removed along with pragma Inline.
2769 (Set_Postcondition_Proc): Removed along with pragma Inline.
2770 (Set_Postconditions_Proc): New routine along with pragma Inline.
2771 * exp_ch6.adb (Add_Return): Code cleanup. Update the
2772 generation of the call to the _Postconditions routine of
2773 the procedure. (Expand_Non_Function_Return): Reformat the
2774 comment on usage. Code cleanup. Update the generation of
2775 the call to the _Postconditions routine of the procedure or
2777 (Expand_Simple_Function_Return): Update the
2778 generation of the _Postconditions routine of the function.
2779 (Expand_Subprogram_Contract): Reimplemented.
2780 * exp_ch6.ads (Expand_Subprogram_Contract): Update the parameter
2781 profile along the comment on usage.
2782 * exp_ch9.adb (Build_PPC_Wrapper): Code cleanup.
2783 (Expand_N_Task_Type_Declaration): Generate pre/postconditions
2784 wrapper when the entry [family] has a contract with
2786 * exp_prag.adb (Expand_Attributes_In_Consequence): New routine.
2787 (Expand_Contract_Cases): This routine and its subsidiaries now
2788 analyze all generated code.
2789 (Expand_Old_In_Consequence): Removed.
2790 * sem_attr.adb Add with and use clause for Sem_Prag.
2791 (Analyze_Attribute): Reimplment the analysis of attribute 'Result.
2792 (Check_Use_In_Test_Case): Use routine Test_Case_Arg to obtain
2794 * sem_ch3.adb (Analyze_Declarations): Analyze the contract of
2795 a generic subprogram.
2796 (Analyze_Object_Declaration): Do not create a contract node.
2797 (Derive_Subprogram): Do not create a contract node.
2798 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Do
2799 not create a contract node.
2800 (Analyze_Completion_Contract): New routine.
2801 (Analyze_Function_Return): Alphabetize.
2802 (Analyze_Generic_Subprogram_Body): Alphabetize. Do not create a
2803 contract node. Do not copy pre/postconditions to the original
2805 (Analyze_Null_Procedure): Do not create a contract node.
2806 (Analyze_Subprogram_Body_Contract): Reimplemented.
2807 (Analyze_Subprogram_Body_Helper): Do not mark the enclosing scope
2808 as having postconditions. Do not create a contract node. Analyze
2809 the subprogram body contract of a body that acts as a compilation
2810 unit. Expand the subprogram contract after the declarations have
2812 (Analyze_Subprogram_Contract): Reimplemented.
2813 (Analyze_Subprogram_Specification): Do not create a contract node.
2814 (List_Inherited_Pre_Post_Aspects): Code cleanup.
2815 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Update the
2817 (Analyze_Subprogram_Contract): Update the
2818 parameter profile and the comment on usage.
2819 * sem_ch7.adb (Analyze_Package_Body_Helper): Do not create a
2821 (Analyze_Package_Declaration): Do not create a
2823 (Is_Subp_Or_Const_Ref): Ensure that the prefix has an entity.
2824 * sem_ch8.adb (Analyze_Subprogram_Renaming): Do not create a
2826 * sem_ch9.adb (Analyze_Entry_Declaration): Do not create a
2828 * sem_ch10.adb (Analyze_Compilation_Unit): Move local variables to
2829 their proper section and alphabetize them. Analyze the contract of
2830 a [generic] subprogram after all Pragmas_After have been analyzed.
2831 (Analyze_Subprogram_Body_Stub_Contract): Alphabetize.
2832 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Do not
2833 create a contract node.
2834 (Analyze_Generic_Subprogram_Declaration):
2835 Alphabetize local variables. Do not create a contract
2836 node. Do not generate aspects out of pragmas for ASIS.
2837 (Analyze_Subprogram_Instantiation): Instantiate
2838 the contract of the subprogram. Do not create a
2839 contract node. (Instantiate_Contract): New routine.
2840 (Instantiate_Subprogram_Body): Alphabetize local variables.
2841 (Save_Global_References_In_Aspects): New routine.
2842 (Save_References): Do not save the global references found within
2843 the aspects of a generic subprogram.
2844 * sem_ch12.ads (Save_Global_References_In_Aspects): New routine.
2845 * sem_ch13.adb (Analyze_Aspect_Specifications): Do not use
2846 Original_Node for establishing linkages.
2847 (Insert_Pragma): Insertion in a subprogram body takes precedence over
2848 the case where the subprogram body is also a compilation unit.
2849 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Use
2850 Get_Argument to obtain the proper expression. Install the generic
2851 formals when the related context is a generic subprogram.
2852 (Analyze_Depends_In_Decl_Part): Use Get_Argument to obtain
2853 the proper expression. Use Corresponding_Spec_Of to obtain
2854 the spec. Install the generic formal when the related context
2855 is a generic subprogram.
2856 (Analyze_Global_In_Decl_Part): Use Get_Argument to obtain the proper
2857 expression. Use Corresponding_Spec_Of to obtain the spec. Install the
2858 generic formal when the related context is a generic subprogram.
2859 (Analyze_Initial_Condition_In_Decl_Part): Use Get_Argument
2860 to obtain the proper expression. Remove the call to
2861 Check_SPARK_Aspect_For_ASIS as the analysis is now done
2863 (Analyze_Pragma): Update all occurrences
2864 to Original_Aspect_Name. Pragmas Contract_Cases, Depends,
2865 Extensions_Visible, Global, Postcondition, Precondition and
2866 Test_Case now carry generic templates when the related context
2867 is a generic subprogram. The same pragmas are no longer
2868 forcefully fully analyzed when the context is a subprogram
2869 that acts as a compilation unit. Pragmas Abstract_State,
2870 Initial_Condition, Initializes and Refined_State have been clean
2871 up. Pragmas Post, Post_Class, Postcondition, Pre, Pre_Class
2872 and Precondition now use the same routine for analysis. Pragma
2873 Refined_Post does not need to check the use of 'Result or
2874 the lack of a post-state in its expression. Reimplement the
2875 analysis of pragma Test_Case.
2876 (Analyze_Pre_Post_Condition): New routine.
2877 (Analyze_Pre_Post_Condition_In_Decl_Part):
2879 (Analyze_Refined_Depends_In_Decl_Part): Use Get_Argument to obtain the
2881 (Analyze_Refined_Global_In_Decl_Part): Use Get_Argument to obtain
2882 the proper expression.
2883 (Analyze_Test_Case_In_Decl_Part): Reimplemented.
2884 (Check_Pre_Post): Removed.
2885 (Check_Precondition_Postcondition): Removed.
2886 (Check_SPARK_Aspect_For_ASIS): Removed.
2887 (Check_Test_Case): Removed.
2888 (Collect_Subprogram_Inputs_Outputs): Use Get_Argument
2889 to obtain the proper expression. Use Corresponding_Spec_Of to
2890 find the proper spec.
2891 (Create_Generic_Template): New routine.
2892 (Duplication_Error): New routine.
2893 (Expression_Function_Error): New routine.
2894 (Find_Related_Subprogram_Or_Body): Moved to the spec
2895 of Sem_Prag. Emit precise error messages. Account for cases of
2896 rewritten expression functions, generic instantiations, handled
2897 sequence of statements and pragmas from aspects.
2898 (Get_Argument): New routine.
2899 (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Removed.
2900 (Preanalyze_CTC_Args): Removed.
2901 (Process_Class_Wide_Condition): New routine.
2902 * sem_prag.ads (Analyze_Test_Case_In_Decl_Part): Update
2903 the parameter profile along with the comment on usage.
2904 (Find_Related_Subprogram_Or_Body): Moved from the body of Sem_Prag.
2905 (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Removed.
2906 (Test_Case_Arg): New routine.
2907 * sem_util.adb Add with and use clauses for Sem_Ch6.
2908 (Add_Contract_Item): This routine now creates a contract
2909 node the first time an item is added. Remove the duplicate
2910 aspect/pragma checks.
2911 (Check_Result_And_Post_State): Reimplemented.
2912 (Corresponding_Spec_Of): New routine.
2913 (Get_Ensures_From_CTC_Pragma): Removed.
2914 (Get_Requires_From_CTC_Pragma): Removed.
2915 (Has_Significant_Contract): New routine.
2916 (Inherit_Subprogram_Contract): Inherit only if the source
2918 (Install_Generic_Formals): New routine.
2919 (Original_Aspect_Name): Removed.
2920 (Original_Aspect_Pragma_Name): New routine.
2921 * sem_util.ads (Check_Result_And_Post_State): Reimplemented.
2922 (Corresponding_Spec_Of): New routine.
2923 (Get_Ensures_From_CTC_Pragma): Removed.
2924 (Get_Requires_From_CTC_Pragma): Removed.
2925 (Has_Significant_Contract): New routine.
2926 (Install_Generic_Formals): New routine.
2927 (Original_Aspect_Name): Removed.
2928 (Original_Aspect_Pragma_Name): New routine.
2929 * sem_warn.adb Add with and use clauses for Sem_Prag.
2930 (Within_Postcondition): Use Test_Case_Arg to extract "Ensures".
2932 2015-03-02 Ed Schonberg <schonberg@adacore.com>
2934 * sem_ch8.adb (Available_Subtype): Optimization in
2935 Find_Selected_Component: when safe, use existing subtype of
2936 array component, possibly discriminant-dependent, rather than
2937 creating new subtype declaration for it. In this fashion different
2938 occurrences of the component have the same subtype, rather than
2939 just equivalent ones. Simplifies value tracing in GNATProve.
2941 2015-03-01 Arnaud Charlet <charlet@adacore.com>
2945 * doc/gnat_ugn/gnat_project_manager.rst,
2946 doc/gnat_ugn/platform_specific_information.rst: Remove reference to
2947 image, too troublesome with texi format.
2948 * gnat_ugn.texi: Regenerate.
2950 2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
2953 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8): Remove.
2954 (DEF_FUNCTION_TYPE_VAR_12): Likewise.
2955 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
2957 2015-02-23 Thomas Schwinge <thomas@codesourcery.com>
2959 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8): Fix number of
2960 arguments parameter.
2961 (DEF_FUNCTION_TYPE_VAR_12): Likewise.
2963 2015-02-22 Arnaud Charlet <charlet@adacore.com>
2965 * doc/Makefile: postprocess texinfo files to update @dircategory
2966 and update texi files under gcc/ada.
2967 * gnat_ugn.texi, gnat_rm.texi: Regenerated.
2969 2015-02-22 Arnaud Charlet <charlet@adacore.com>
2971 * doc/gnat_ugn/project-manager-figure.png,
2972 doc/gnat_ugn/rtlibrary-structure.png: New.
2974 2015-02-22 Tom de Vries <tom@codesourcery.com>
2977 * gnat-style.texi (@subsection Loop Statements): Replace @noindent by
2978 @item, and fix warning '@itemize has text but no @item'.
2980 2015-02-20 Ed Schonberg <schonberg@adacore.com>
2982 * sem_prag.adb (Analyze_Pragma, case Obsolescent): Pragma
2983 legally applies to an abstract subprogram declaration.
2984 * freeze.adb: Minor comment addition.
2986 2015-02-20 Robert Dewar <dewar@adacore.com>
2988 * errout.ads: Document replacement of Name_uPre/Post/Type_Invariant.
2989 * erroutc.adb (Set_Msg_Str): Replace _xxx.
2990 (Pre/Post/Type_Invariant) by xxx'Class.
2991 * erroutc.ads (Set_Msg_Str): Replace _xxx.
2992 (Pre/Post/Type_Invariant) by xxx'Class.
2993 * sem_prag.adb (Fix_Error): Remove special casing of
2994 Name_uType_Invariant.
2995 (Analyze_Pre_Post_Condition_In_Decl_Part): Remove special casing of
2996 Name_uPre and Name_uPost in aspect case (done in Errout now).
2998 2015-02-20 Robert Dewar <dewar@adacore.com>
3000 * g-alveop.adb: Minor style fixes.
3002 2015-02-20 Robert Dewar <dewar@adacore.com>
3004 * freeze.adb (Warn_Overlay): Guard against blow up with address
3007 2015-02-20 Bob Duff <duff@adacore.com>
3009 * exp_attr.adb (May_Be_External_Call): Remove this. There is no need
3010 for the compiler to guess whether the call is internal or external --
3011 it is always external.
3012 (Expand_Access_To_Protected_Op): For P'Access, where P
3013 is a protected subprogram, always create a pointer to the
3014 External_Subprogram.
3016 2015-02-20 Robert Dewar <dewar@adacore.com>
3018 * a-dispat.adb, a-stcoed.ads: Minor reformatting.
3020 2015-02-20 Robert Dewar <dewar@adacore.com>
3022 * sem_ch13.adb (Build_Discrete_Static_Predicate): Allow static
3023 predicate for non-static subtype.
3024 (Build_Predicate_Functions): Do not assume subtype associated with a
3025 static predicate must be static.
3027 2015-02-20 Robert Dewar <dewar@adacore.com>
3029 * errout.adb (Set_Msg_Node): Better handling of internal names
3030 (Set_Msg_Node): Kill message when we cannot eliminate internal name.
3031 * errout.ads: Document additional case of message deletion.
3032 * namet.adb (Is_Internal_Name): Refined to consider wide
3033 strings in brackets notation and character literals not to be
3035 * sem_ch8.adb (Find_Selected_Component): Give additional error
3036 when selector name is a subprogram whose first parameter has
3037 the same type as the prefix, but that type is untagged.
3039 2015-02-20 Robert Dewar <dewar@adacore.com>
3041 * g-allein.ads, g-alveop.adb, g-alveop.ads, opt.ads: Minor reformatting
3043 2015-02-20 Tristan Gingold <gingold@adacore.com>
3045 * opt.ads (GNAT_Mode_Config): New variable.
3046 * opt.adb (Set_Opt_Config_Switches): Consider GNAT_Mode_Config
3047 to set Assertions_Enabled.
3048 * switch-c.adb (Scan_Front_End_Switches): Set GNAT_Mode_Config
3051 2015-02-20 Robert Dewar <dewar@adacore.com>
3053 * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Add an additional
3054 comment regarding the handling of unterminated fixed-point
3056 * s-valuns.ads (Scan_Raw_Unsigned): Add comments
3057 corresponding to those previously added for
3058 System.Val_LLU.Scan_Raw_Long_Long_Unsigned.
3060 2015-02-20 Olivier Hainque <hainque@adacore.com>
3062 * g-allein.ads, g-alveop.ads, g-alveop.adb: Code clean ups.
3064 2015-02-20 Robert Dewar <dewar@adacore.com>
3066 * sem_prag.adb: Minor comment clarification.
3068 2015-02-20 Olivier Hainque <hainque@adacore.com>
3070 * g-allein.ads (vec_ctf, vec_vcsfx, vec_vcfux): Remove.
3071 * g-alleve.ads, g-alleva.adb (vcfux): Likewise.
3072 * g-alveop.ads (vec_vcfsx, vec_vcfux): Just rename the ll versions.
3073 (vec_ctf): Now renamings as well.
3075 2015-02-20 Robert Dewar <dewar@adacore.com>
3077 * switch-c.adb, bindgen.adb: Minor reformatting.
3079 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3081 * sem_prag.adb (Analyze_Pragma, case Type_Invariant):
3082 Invariant'class is allowed on an abstract type.
3084 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3086 * sem_ch3.adb (Access_Definition): If the access definition is
3087 for a protected component and defines an access to protected
3088 subprogram, do not create an itype reference for it because a
3089 full type declaration will be built in order to generate the
3090 proper equivalent type.
3091 (Analyze_Subtype_Declaration): Add information of incomplete
3092 subtypes, for Ada 2012 extended uses of incomplete types.
3094 2015-02-20 Gary Dismukes <dismukes@adacore.com>
3096 * sem_res.adb: Minor reformatting.
3098 2015-02-20 Vincent Celier <celier@adacore.com>
3100 * switch-c.adb (Scan_Front_End_Switches): When comparing runtime
3101 path name for several switches --RTS, use the normalized path
3104 2015-02-20 Vincent Celier <celier@adacore.com>
3106 * bindgen.adb: Minor reformatting and code reorganization.
3108 2015-02-20 Jose Ruiz <ruiz@adacore.com>
3110 * a-stcoed.ads: Add spec for this package (Unimplemented_Unit).
3111 * impunit.adb (Non_Imp_File_Names_12): Mark unit a-stcoed.ads as
3112 defined by Ada 2012.
3114 2015-02-20 Arnaud Charlet <charlet@adacore.com>
3116 * sysdep.c, expect.c, s-oscons-tmplt.c, gsocket.h, adaint.c: Remove
3117 obsolete references to RTX, nucleus, VMS.
3119 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3121 * sem_prag.adb (Fix_Error): For an illegal Type_Invariant'Class
3122 aspect, use name that mentions Class explicitly, rather than
3123 compiler-internal name.
3125 2015-02-20 Robert Dewar <dewar@adacore.com>
3127 * debug.adb: Add documentation for -gnatd.2 (allow statements
3129 * par-ch3.adb (P_Identifier_Declarations): Handle
3130 statement appearing where declaration expected more cleanly.
3131 (Statement_When_Declaration_Expected): Implement debug flag
3134 2015-02-20 Jose Ruiz <ruiz@adacore.com>
3136 * a-dinopr.ads: Add spec for this package (Unimplemented_Unit).
3137 * a-dispat.ads (Yield): Include procedure added in Ada 2012.
3138 * a-dispat.adb (Yield): Implement procedure added in Ada 2012.
3139 * impunit.adb (Non_Imp_File_Names_05): Mark unit a-dinopr.ads as
3140 defined by Ada 2005.
3141 * snames.ads-tmpl (Name_Non_Preemptive_FIFO_Within_Priorities):
3142 This is the correct name for the dispatching policy (FIFO was
3145 2015-02-20 Javier Miranda <miranda@adacore.com>
3147 * sem_res.adb (Resolve_Type_Conversion): If the type of the
3148 operand is the limited-view of a class-wide type then recover
3149 the class-wide type of the non-limited view.
3151 2015-02-20 Arnaud Charlet <charlet@adacore.com>
3153 * gcc-interface/Makefile.in: Remove references to nucleus.
3154 * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Procedure): Set
3155 extern_flag to true for Inline_Always subprograms with
3156 Intrinsic convention.
3158 2015-02-20 Yannick Moy <moy@adacore.com>
3160 * sem_prag.ads: Minor typo in comment.
3162 2015-02-20 Pascal Obry <obry@adacore.com>
3164 * s-osprim-mingw.adb: Fix Get_Base_Time parameter mode.
3166 2015-02-20 Vincent Celier <celier@adacore.com>
3168 * makeutl.adb (Get_Directories.Add_Dir): Add a directory only
3171 2015-02-20 Robert Dewar <dewar@adacore.com>
3173 * sem_eval.ads: Minor reformatting.
3175 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
3177 * freeze.adb (Size_Known): Do not set the packed size for
3178 independent type or component.
3179 (Freeze_Array_Type): Check for Independent[_Components] with packing
3180 or explicit component size clause.
3181 * gnat1drv.adb (Post_Compilation_Validation_Checks): Do the validation
3182 of independence pragmas only for non-GCC back-ends.
3183 * sem_ch13.adb (Initialize): Likewise for the initialization.
3184 * sem_prag.adb (Record_Independence_Check): New procedure to record an
3185 independence check in the table.
3186 (Analyze_Pragma): Use it throughout instead of doing it manually.
3187 * gcc-interface/decl.c (gnat_to_gnu_field): Add support for
3188 independent type or component.
3190 2015-02-20 Thomas Quinot <quinot@adacore.com>
3192 * adaint.c (__gnat_readdir): For Solaris, use 64 bit variants of
3193 struct direct and readdir. This is required for NFS filesystems
3194 mounted from servers that use 64-bit cookies.
3196 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3198 * sem_ch12.adb (Analyze_Subprogram_Instantiaion): New subprogram
3199 Build_Subprogram_Renaming, to create renaming of subprogram
3200 instance in the the declaration of the wrapper package rather
3201 than in its body, so that it is available for analysis of aspects
3202 propagated from generic to instantiation.
3203 (Check_Mismatch): An actual for a formal package that is an
3204 incomplete type matches a formal type that is incomplete.
3205 (Instantiate_Package_Body): Move code that builds subprogram
3206 renaming to Analyze_Subprogram_Instantiation.
3207 (Instantiate_Type): The generated subtype is a limited view if
3208 the actual is a limited view.
3209 (Load_Parent_Of_Generic): Retrieve instance declaration from
3210 its new position within wrapper package.
3212 2015-02-20 Arnaud Charlet <charlet@adacore.com>
3214 * s-parame-vxworks.adb, s-os_lib.ads: Update comments.
3216 2015-02-20 Robert Dewar <dewar@adacore.com>
3218 * s-osinte-vxworks.ads (To_Timespec): Add comment about the
3219 issue of negative arguments.
3221 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
3223 * gnat1drv.adb: Minor consistency fix.
3225 2015-02-20 Pascal Obry <obry@adacore.com>
3227 * s-osprim-mingw.adb (Get_Base_Time): Properly release lock in all
3230 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
3232 * inline.adb (Expand_Inlined_Call): Skip again calls to subprogram
3234 * exp_ch6.adb (Expand_Call): Use back-end inlining
3235 instead of expansion for simple subprogram renamings.
3237 2015-02-20 Robert Dewar <dewar@adacore.com>
3239 * exp_util.adb: Minor reformatting.
3241 2015-02-20 Vincent Celier <celier@adacore.com>
3243 * switch-c.adb (Scan_Front_End_Switches): Do not fail when --RTS=
3244 is specified several times with different values that indicates
3245 the same runtime directory.
3247 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3249 * sem_attr.adb (Check_Not_Incomplete_Type): Clean up code to
3250 handle properly illegal uses of attributes on prefixes on an
3251 incomplete type, both when the type of the prefix is locally
3252 incomplete, and when it is a limited view of a type whose
3253 non-limited view is not available.
3254 (Analyze_Attribute): Add calls to Check_Not_Incomplete_Type for
3255 'Address and others.
3257 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
3259 * exp_ch6.adb: Fix minor typo in comment.
3261 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
3263 * sinfo.ads: Add comment.
3265 2015-02-20 Olivier Hainque <hainque@adacore.com>
3267 * opt.ads: Replace Opt.Suppress_All_Inlining by two separate
3268 flags controlling the actual FE inlining out of pragma Inline
3269 and pragma Inline_Always.
3270 * adabkend.adb (Scan_Compiler_Arguments): Set both flags to True
3271 on -fno-inline, which disables all inlining in compilers with
3272 an Ada back-end and without back-end inlining support.
3273 * back_end.adb (Scan_Back_End_Switches): Set the Inline related
3274 flag to True on -fno-inline and leave Inline_Always alone for
3276 * back_end.ads (Scan_Compiler_Arguments): Adjust spec wrt the
3277 names of the Opt flags it sets.
3278 * gnat1drv.adb (Adjust_Global_Switches): Remove test on
3279 Opt.Suppress_All_Inlining in the Back_End_Inlining computation.
3280 * sem_prag.adb (Make_Inline): Remove early return conditioned
3281 on Opt.Suppress_All_Inlining.
3282 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Use the flags to
3283 disable the calls to Build_Body_To_Inline otherwise triggered
3284 by pragma Inline or Inline_Always. This will prevent actual
3285 front-end inlining of the subprogram on calls.
3287 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
3289 * exp_ch3.adb (Default_Initialize_Object): Call Add_Inlined_Body on the
3290 Abort_Undefer_Direct function.
3291 * exp_ch5.adb (Expand_N_Assignment_Statement): Likewise.
3292 * exp_intr.adb (Expand_Unc_Deallocation): Likewise.
3293 * exp_prag.adb (Expand_Pragma_Abort_Defer): Likewise.
3294 * exp_ch4.adb (Expand_N_Selected_Component): Adjust call to
3296 * exp_ch6.adb (Expand_Call): Adjust calls to Add_Inlined_Body.
3297 Remove call to Register_Backend_Call and move code resetting
3298 Needs_Debug_Info on inlined subprograms to...
3299 * inline.ads (Add_Inlined_Body): Add N parameter.
3300 (Register_Backend_Call): Delete.
3301 * inline.adb (Add_Inlined_Body): ...here and simplify.
3302 Register the call with Backend_Calls directly.
3303 (Register_Backend_Call): Delete.
3304 * s-stalib.ads (Abort_Undefer_Direct): Restore pragma Inline.
3306 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
3308 * s-stalib.ads: Fix typo.
3310 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3312 * exp_ch3.adb (Default_Initialize_Object): If the object has a
3313 delayed freeze, the actions associated with default initialization
3314 must be part of the freeze actions, rather that being inserted
3315 directly after the object declaration.
3317 2015-02-20 Robert Dewar <dewar@adacore.com>
3319 * lib-load.adb: Minor comment update.
3321 2015-02-20 Vincent Celier <celier@adacore.com>
3323 * prj-proc.adb (Process_Case_Construction): When there are
3324 incomplete withed projects and the case variable is unknown,
3325 skip the case construction.
3327 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3329 * exp_ch6.adb (Expand_Actuals): Add caller-side invariant checks
3330 when an actual is a view conversion, either because the call is
3331 to an inherited operation, or because the actual is an explicit
3332 type conversion to an ancestor type. Fixes ACATS 4.0D: C732001
3334 2015-02-20 Robert Dewar <dewar@adacore.com>
3336 * einfo.ads: Minor comment updates Fix missing pragma Inline
3337 for Set_Partial_View_Has_Unknown_Discr.
3338 * einfo.adb (Write_Entity_Flags): Add missing entry for
3339 Partial_View_Has_Unknown_Discr.
3340 * sem_ch3.adb: Minor reformatting.
3342 2015-02-20 Vincent Celier <celier@adacore.com>
3344 * opt.ads: Minor cleanup: remove mention of gprmake.
3345 * s-stalib.ads (Abort_Undefer_Direct): Do not inline.
3346 * s-tataat.adb: Do not call System.Tasking.Self but directly
3347 System.Task_Primitives.Operations.Self.
3349 2015-02-20 Arnaud Charlet <charlet@adacore.com>
3351 * gnat_rm.texi, gnat_ugn.texi: Now automatically generated from
3352 sphinx in the doc directory.
3353 * doc: New directory containing sphinx versions of gnat_rm and gnat_ugn
3355 2015-02-20 Robert Dewar <dewar@adacore.com>
3357 * sem_res.adb: Minor reformatting.
3358 * exp_ch9.adb (Build_Protected_Spec): Copy Aliased setting when
3360 * sem_ch13.adb (Analyze_Aspect_Specifications): Exclude Boolean
3361 aspects from circuitry setting delay required to false if the
3362 argument is an integer literal.
3364 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3366 * einfo.ads. einfo.adb (Partial_View_Has_Unknown_Discr): New flag
3367 on type entities, to enforce AI12-0133: default initialization
3368 of types whose partial view has unknown discriminants does not
3369 get an invariant check, because clients of the unit can never
3370 declare objects of such types.
3371 * sem_ch3.adb (Find_Type_Name); Set new flag
3372 Partial_View_Has_Unknown_Discr when needed.
3373 * exp_ch3.adb (Expand_N_Object_Declaration): Use flag to suppress
3374 generation of invariant call on default-initialized object.
3376 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
3378 * gcc-interface/decl.c (gnat_to_gnu_param): Do not strip the padding
3379 if the parameter either is passed by reference or if the alignment
3382 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
3384 * gcc-interface/decl.c (is_cplusplus_method): Use Is_Primitive flag to
3385 detect primitive operations of tagged and untagged types.
3387 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
3389 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not bother about alias
3390 sets in presence of derivation for subprogram types.
3392 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
3394 * gcc-interface/utils.c (begin_subprog_body): Assert that the body is
3395 present in the same context as the declaration.
3397 2015-02-07 Jakub Jelinek <jakub@redhat.com>
3400 * gcc-interface/trans.c (gigi): Recreate optimization_default_node
3401 and optimization_current_node after tweaking global_options.
3403 2015-02-05 Robert Dewar <dewar@adacore.com>
3405 * prj-proc.adb, sem_aux.adb, exp_ch9.adb, errout.adb, prj-dect.adb,
3406 prj-nmsc.adb: Minor reformatting.
3408 2015-02-05 Ed Schonberg <schonberg@adacore.com>
3410 * sem_type.adb (Covers): In ASIS_Mode the Corresponding_Record
3411 of a protected type may not be available, so to check conformance
3412 with an interface type, examine the interface list in the type
3413 declaration directly.
3414 (Write_Overloads): Improve information for indirect calls,
3417 2015-02-05 Ed Schonberg <schonberg@adacore.com>
3419 * exp_ch3.adb (Make_Tag_Assignment): Do not perform this
3420 expansion activity in ASIS mode.
3422 2015-02-05 Javier Miranda <miranda@adacore.com>
3424 * errout.adb (Error_Msg_PT): Add missing error.
3425 * sem_ch6.adb (Check_Synchronized_Overriding): Check the missing
3426 RM rule. Code cleanup.
3427 * exp_ch9.adb (Build_Wrapper_Spec): Propagate "constant" in
3428 anonymous access types. Found working on the tests. Code cleanup.
3430 2015-02-05 Vincent Celier <celier@adacore.com>
3432 * prj-dect.adb (Parse_Attribute_Declaration): Continue scanning
3433 when there are incomplete withs.
3434 * prj-nmsc.adb (Process_Naming): Do not try to get the value
3435 of an element when it is nil.
3436 (Check_Naming): Do not check a nil suffix for illegality
3437 * prj-proc.adb (Expression): Do not process an empty term.
3438 * prj-strt.adb (Attribute_Reference): If attribute cannot be
3439 found, parse a possible index to avoid cascading errors.
3441 2015-02-05 Ed Schonberg <schonberg@adacore.com>
3443 * sem_aux.adb (Is_Derived_Type): A subprogram_type generated
3444 for an access_to_subprogram declaration is not a derived type.
3446 2015-02-05 Robert Dewar <dewar@adacore.com>
3448 * errout.adb (Error_Msg_Internal): For non-serious error set
3449 Fatal_Error to Ignored.
3450 * lib-load.adb (Load_Unit): Minor comment updates.
3451 * sem_ch10.adb (Analyze_With_Clause): Propagate Fatal_Error
3452 setting from with'ed unit to with'ing unit.
3453 * sem_prag.adb (Analyze_Pragma, case Warnings): Document handling
3456 2015-02-05 Yannick Moy <moy@adacore.com>
3458 * sem_prag.adb, par-prag.adb: Minor code clean up.
3460 2015-02-05 Yannick Moy <moy@adacore.com>
3462 * par-prag.adb (Pragma_Warnings): Update for extended form
3463 of pragma Warnings. The "one" argument case may now have 2 or
3465 * sem_prag.adb (Analyze_Pragma/Pragma_Warnings): Update for
3466 extended form of pragma Warnings. Pragma with tool name is either
3467 rewritten as null or as an equivalent form without tool name,
3469 * snames.ads-tmpl (Name_Gnatprove): New name.
3471 2015-02-05 Robert Dewar <dewar@adacore.com>
3473 * sem_ch13.adb (Add_Invariants): Don't assume invariant is
3475 * sem_prag.adb (Analyze_Pragma, case Check): Don't assume
3476 condition is standard Boolean, it can be non-standard derived
3479 2015-02-05 Robert Dewar <dewar@adacore.com>
3481 * checks.adb (Enable_Range_Check): Disconnect attempted
3482 optimization for the case of range check for subscript of
3483 unconstrained array.
3485 2015-02-05 Robert Dewar <dewar@adacore.com>
3487 * par-ch13.adb (With_Present): New function
3488 (Aspect_Specifications_Present): Handle WHEN in place of WITH
3489 (Get_Aspect_Specifications): Comment update.
3490 * par.adb: Comment updates.
3492 2015-02-05 Robert Dewar <dewar@adacore.com>
3494 * errout.adb (Handle_Serious_Error): New setting of Fatal_Error.
3495 * frontend.adb (Frontend): New setting of Fatal_Error.
3496 * lib-load.adb (Create_Dummy_Package_Unit): New setting of
3498 (Load_Main_Source): New setting of Fatal_Error
3499 (Load_Unit): New setting of Fatal_Error.
3500 * lib-writ.adb (Add_Preprocessing_Dependency): New setting of
3502 (Ensure_System_Dependency): New setting of Fatal_Error.
3503 * lib.adb (Fatal_Error): New setting of Fatal_Error
3504 (Set_Fatal_Error): New setting of Fatal_Error.
3505 * lib.ads: New definition of Fatal_Error and associated routines.
3506 * par-ch10.adb (P_Compilation_Unit): New setting of Fatal_Error.
3507 * par-load.adb (Load): New setting of Fatal_Error.
3508 * rtsfind.adb (Load_RTU): New setting of Fatal_Error.
3509 * sem_ch10.adb (Analyze_Compilation_Unit): New setting of
3511 (Optional_Subunit): New setting of Fatal_Error.
3512 (Analyze_Proper_Body): New setting of Fatal_Error.
3513 (Load_Needed_Body): New setting of Fatal_Error.
3515 2015-02-05 Ed Schonberg <schonberg@adacore.com>
3517 * sem_res.adb (Resolve_Call): If the function being called has
3518 out parameters do not check for language version if the function
3519 comes from a predefined unit, as those are always compiled in
3522 2015-02-05 Ed Schonberg <schonberg@adacore.com>
3524 * sem_ch3.adb (Process_Full_View): Verify that the full view
3525 of a type extension must carry an explicit limited keyword if
3526 the partial view does (RM 7.3 (10.1)).
3528 2015-02-05 Robert Dewar <dewar@adacore.com>
3530 * g-rannum.adb, g-rannum.ads, s-rannum.adb, s-rannum.ads,
3531 sem_warn.ads: Minor reformatting.
3532 * exp_ch13.adb (Expand_N_Freeze_Entity): Add guard for aspect
3534 * sem_prag.adb (Analyze_Pragma, case Type_Invariant): Give
3535 error for abstract type.
3537 2015-02-05 Yannick Moy <moy@adacore.com>
3539 * opt.ads (Warn_On_Suspicious_Contract): Update comment
3541 * sem_attr.adb (Analyze_Attribute/Attribute_Update): Warn on
3542 suspicious uses of 'Update.
3543 * sem_warn.adb, sem_warn.ads (Warn_On_Suspicious_Update): New
3544 function issues warning on suspicious uses of 'Update.
3545 * g-rannum.adb, g-rannum.ads, s-rannum.adb, s-rannum.ads: Mark
3546 package spec and body as SPARK_Mode Off.
3548 2015-02-05 Robert Dewar <dewar@adacore.com>
3550 * sem_prag.adb (Set_Elab_Unit_Name): New name for Set_Unit_Name
3551 (Analyze_Pragma): Change Set_Unit_Name to Set_Elab_Unit_Name
3552 (Set_Elab_Unit_Name): Generate reference for Elaborate[_All]
3553 * sem_warn.adb (Warn_On_Unreferenced_Entity): Suppress warning
3554 for exported entity.
3556 2015-02-05 Hristian Kirtchev <kirtchev@adacore.com>
3558 * sem_prag.adb (Check_Pragma_Conformance): Add
3559 local variable Arg. Ensure that all errors are associated with
3560 the pragma if it appears without an argument. Add comments on
3563 2015-02-05 Robert Dewar <dewar@adacore.com>
3565 * lib-xref.adb: Minor reformatting.
3567 2015-02-05 Tristan Gingold <gingold@adacore.com>
3569 PR ada/64349da/64349
3570 * env.c: Fix thinko: handle Darwin case before default one.
3572 2015-01-30 Robert Dewar <dewar@adacore.com>
3574 * a-assert.adb: Minor reformatting.
3575 * sem_ch13.adb: Minor comment clarification.
3576 * types.ads: Minor comment update.
3577 * sem_eval.adb (Real_Or_String_Static_Predicate_Matches): Avoid blow up
3578 when we have a predicate that is nothing but an inherited dynamic
3581 2015-01-30 Jerome Guitton <guitton@adacore.com>
3583 * gcc-interface/Makefile.in (x86-vxworks): Update GCC_SPEC_FILES to
3584 include cert link spec.
3586 2015-01-30 Robert Dewar <dewar@adacore.com>
3588 * einfo.ads: Minor comment fix.
3589 * freeze.adb (Freeze_Profile): Add test for suspicious import
3591 * sem_prag.adb (Process_Import_Or_Interface): Test for suspicious
3592 use in Pure unit is now moved to Freeze (to properly catch
3593 Pure_Function exemption).
3595 2015-01-30 Bob Duff <duff@adacore.com>
3597 * sem_res.ads: Minor comment fix.
3598 * sem_type.adb: sem_type.adb (Remove_Conversions): Need to
3599 check both operands of an operator.
3601 2015-01-30 Yannick Moy <moy@adacore.com>
3603 * a-assert.ads, a-assert.adb: Mark package spec in SPARK. Set assertion
3604 policy for Pre to Ignore.
3605 (Assert): Add precondition.
3607 2015-01-30 Robert Dewar <dewar@adacore.com>
3609 * sem_prag.adb (Process_Import_Or_Interface): Warn if used in
3611 * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Clarify
3612 documentation for some special cases of invalid attempts at
3615 2015-01-30 Gary Dismukes <dismukes@adacore.com>
3617 * errout.ads: Minor reformatting.
3619 2015-01-30 Yannick Moy <moy@adacore.com>
3621 * inline.adb (Process_Formals): Use the sloc of
3622 the inlined node instead of the sloc of the actual parameter,
3623 when replacing formal parameters by the actual one.
3625 2015-01-30 Arnaud Charlet <charlet@adacore.com>
3627 * g-expect.adb (Get_Command_Output): Use infinite timeout when
3630 2015-01-30 Ed Schonberg <schonberg@adacore.com>
3632 * sem_ch12.adb (Analyze_Associations): If an in-parameter is
3633 defaulted in an instantiation, add an entry in the list of actuals
3634 to indicate the default value of the formal (as is already done
3635 for defaulted subprograms).
3637 2015-01-30 Javier Miranda <miranda@adacore.com>
3639 * errout.adb (Error_Msg_PT): Minor error phrasing update.
3641 2015-01-30 Robert Dewar <dewar@adacore.com>
3643 * sem_warn.adb (Warn_On_Known_Condition): Improve error message
3646 2015-01-30 Pierre-Marie de Rodat <derodat@adacore.com>
3648 * exp_dbug.adb (Get_Encoded_Name): When
3649 -fgnat-encodings=minimal, do not generate names for biased types.
3651 2015-01-30 Tristan Gingold <gingold@adacore.com>
3654 * env.c: Move vxworks and darwin includes out of #ifdef IN_RTS.
3656 2015-01-30 Gary Dismukes <dismukes@adacore.com>
3658 * freeze.adb: Minor reformatting.
3660 2015-01-30 Javier Miranda <miranda@adacore.com>
3662 * errout.ads (Error_Msg_PT): Replace Node_Id by Entity_Id and
3663 improve its documentation.
3664 * errout.adb (Error_Msg_PT): Improve the error message.
3665 * sem_ch6.adb (Check_Conformance): Update call to Error_Msg_PT.
3666 (Check_Synchronized_Overriding): Update call to Error_Msg_PT.
3667 * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup.
3669 2015-01-30 Robert Dewar <dewar@adacore.com>
3671 * sem_warn.adb (Warn_On_Known_Condition): Do special casing of
3672 message for False case.
3674 2015-01-30 Doug Rupp <rupp@adacore.com>
3676 * s-vxwext-kernel.ads (Task_Cont): Remove imported subprogram body.
3677 * s-vxwext-kernel.adb (Task_Cont): New subpprogram body specialized for
3680 2015-01-30 Gary Dismukes <dismukes@adacore.com>
3682 * sem_attr.adb (Declared_Within_Generic_Unit):
3683 New function to test whether an entity is declared within the
3684 declarative region of a given generic unit.
3685 (Resolve_Attribute): For checking legality of subprogram'Access within
3686 a generic unit, call new Boolean function Declared_Within_Generic_Unit
3687 instead of simply comparing the results of Enclosing_Generic_Unit on
3688 the prefix and access type. Correct minor comment typos.
3690 2015-01-30 Robert Dewar <dewar@adacore.com>
3692 * freeze.adb, exp_util.ads: Update comment.
3693 * exp_util.adb, exp_ch3.adb: Minor code reorganization and reformatting.
3694 * sem_util.adb: Minor: fix typo.
3696 2015-01-30 Hristian Kirtchev <kirtchev@adacore.com>
3698 * sem_attr.adb (Analyze_Attribute): Ensure that
3699 the check concerning Refined_Post takes precedence over the
3702 2015-01-30 Gary Dismukes <dismukes@adacore.com>
3704 * sem_prag.adb: Minor typo fixes and reformatting.
3706 2015-01-30 Yannick Moy <moy@adacore.com>
3708 * sem_attr.adb: Code clean up.
3710 2015-01-30 Robert Dewar <dewar@adacore.com>
3712 * ali.adb (Scan_ALI): Set Serious_Errors flag in Unit record.
3713 * ali.ads (Unit_Record): Add new field Serious_Errors.
3714 * lib-writ.adb (Write_Unit_Information): Set SE (serious errors)
3715 attribute in U line.
3716 * lib-writ.ads: New attribute SE (serious erors) in unit line.
3718 2015-01-30 Hristian Kirtchev <kirtchev@adacore.com>
3720 * einfo.adb Update the usage of attributes Entry_Bodies_Array,
3721 Lit_Indexes, Scale_Value, Storage_Size_Variable,
3722 String_Literal_Low_Bound along associated routines and
3724 (Pending_Access_Types): New routine.
3725 (Set_Pending_Access_Types): New routine.
3726 (Write_Field15_Name): Add an entry for Pending_Access_Types.
3727 * einfo.ads Add new attribute Pending_Access_Types along
3728 with usage in nodes. Update the usage of attributes
3729 Entry_Bodies_Array, Lit_Indexes, Scale_Value,
3730 Storage_Size_Variable, String_Literal_Low_Bound.
3731 (Pending_Access_Types): New routine along with pragma Inline.
3732 (Set_Pending_Access_Types): New routine along with pragma Inline.
3733 * exp_ch3.adb (Expand_Freeze_Array_Type): Add new local variable
3734 Ins_Node. Determine the insertion node for anonynous access type
3735 that acts as a component type of an array. Update the call to
3736 Build_Finalization_Master.
3737 (Expand_Freeze_Record_Type): Update
3738 the calls to Build_Finalization_Master.
3739 (Freeze_Type): Remove
3740 local variable RACW_Seen. Factor out the code that deals with
3741 remote access-to-class-wide types. Create a finalization master
3742 when the designated type contains a private component. Fully
3743 initialize all pending access types.
3744 (Process_RACW_Types): New routine.
3745 (Process_Pending_Access_Types): New routine.
3746 * exp_ch4.adb (Expand_Allocator_Expression): Allocation no longer
3747 needs to set primitive Finalize_Address.
3748 (Expand_N_Allocator): Allocation no longer sets primitive
3750 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
3751 Update the call to Build_Finalization_Master.
3752 (Make_Build_In_Place_Call_In_Allocator): Allocation no longer
3753 needs to set primitive Finalize_Address.
3754 * exp_ch7.adb (Add_Pending_Access_Type): New routine.
3755 (Build_Finalization_Master): New parameter profile. Associate
3756 primitive Finalize_Address with the finalization master if the
3757 designated type has been frozen, otherwise treat the access
3758 type as pending. Simplify the insertion of the master and
3759 related initialization code.
3760 (Make_Finalize_Address_Body): Allow Finalize_Address for class-wide
3762 (Make_Set_Finalize_Address_Call): Remove forlam parameter Typ.
3763 Simplify the implementation.
3764 * exp_ch7.ads (Build_Finalization_Master): New parameter profile
3765 along with comment on usage.
3766 (Make_Set_Finalize_Address_Call): Remove formal parameter Typ. Update
3767 the comment on usage.
3768 * exp_util.adb (Build_Allocate_Deallocate_Proc): Use routine
3769 Finalize_Address to retrieve the primitive.
3770 (Finalize_Address): New routine.
3771 (Find_Finalize_Address): Removed.
3772 * exp_util.ads (Finalize_Address): New routine.
3773 * freeze.adb (Freeze_All): Remove the generation of finalization
3775 * sem_ch3.adb (Analyze_Full_Type_Declaration): Propagate any
3776 pending access types from the partial to the full view.
3778 2015-01-30 Robert Dewar <dewar@adacore.com>
3780 * sem_disp.adb: Minor reformatting.
3781 * sem_disp.ads: Documentation update.
3783 2015-01-30 Ed Schonberg <schonberg@adacore.com>
3785 * sem_disp.adb (Is_Dynamically_Tagged): when applied to an entity
3786 or a function call, return True if type is class-wide.
3787 * sem_res.adb (Resolve_Case_Expression, Resolve_If_Expression);
3788 Apply RM 4.5.7 (17/3): all or none of the dependent expression
3789 of a conditional expression must be dynamically tagged.
3791 2015-01-30 Ed Schonberg <schonberg@adacore.com>
3793 * sem_ch6.adb (Analyze_Function_Return): In an extended return
3794 statement, apply accessibility check to result object when there
3795 is no initializing expression (Ada 2012 RM 6.5 (5.4/3))
3797 2015-01-30 Robert Dewar <dewar@adacore.com>
3799 * sem_ch4.adb (Analyze_If_Expression): Allow for non-standard
3800 Boolean for case where ELSE is omitted.
3801 * sem_res.adb: Minor reformatting.
3803 2015-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
3805 Fix build under cygwin/64.
3806 * adaint.h: Add check for __CYGWIN__.
3807 * mingw32.h: Prevent windows.h from including x86intrin.h in GCC.
3809 2015-01-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
3812 * adaint.c: Handle __CYGWIN__ like __MINGW32__ here.
3813 * mingw32.h: Don't include <tchar.h> under cygwin.
3814 (_O_U8TEXT, _O_U16TEXT, _O_WTEXT): Set to _O_TEXT if not yet defined.
3816 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
3818 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8)
3819 (DEF_FUNCTION_TYPE_VAR_12): New macros.
3821 2015-01-09 Michael Collison <michael.collison@linaro.org>
3823 * gcc-interface/cuintp.c: Include hash-set.h, machmode.h,
3824 vec.h, double-int.h, input.h, alias.h, symtab.h,
3825 fold-const.h, wide-int.h, and inchash.h due to
3826 flattening of tree.h.
3827 * gcc-interface/decl.c: Ditto.
3828 * gcc-interface/misc.c: Ditto.
3829 * gcc-interface/targtyps.c: Include hash-set.h, machmode.h,
3830 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h,
3831 fold-const.h, wide-int.h, and inchash.h due to
3832 flattening of tree.h.
3833 * gcc-interface/trans.c: Include hash-set.h, machmode.h,
3834 vec.h, double-int.h, input.h, alias.h, symtab.h, real.h,
3835 fold-const.h, wide-int.h, inchash.h due to
3836 flattening of tree.h.
3837 * gcc-interface/utils.c: Include hash-set.h, machmode.h,
3838 vec.h, double-int.h, input.h, alias.h, symtab.h,
3839 fold-const.h, wide-int.h, and inchash.h due to
3840 flattening of tree.h.
3841 * gcc-interface/utils2.c: Ditto.
3843 2015-01-07 Robert Dewar <dewar@adacore.com>
3845 * sem_warn.adb (Check_One_Unit): Don't give unused entities
3846 warning for a package which is used as a generic parameter.
3848 2015-01-07 Bob Duff <duff@adacore.com>
3850 * usage.adb (Usage): Correct documentation of
3853 2015-01-07 Robert Dewar <dewar@adacore.com>
3855 * s-fileio.adb: Minor reformatting.
3857 2015-01-07 Ed Schonberg <schonberg@adacore.com>
3859 * sem_ch12.adb (Instantiate_Object): If formal is an anonymous
3860 access to subprogram, replace its formals with new entities when
3861 building the object declaration, both if actual is present and
3862 when it is defaulted.
3864 2015-01-07 Ed Schonberg <schonberg@adacore.com>
3866 * sem_ch5.adb (Analyze_Assignment): If left-hand side is a view
3867 conversion and type of expression has invariant, apply invariant
3868 check on expression.
3870 2015-01-07 Ed Schonberg <schonberg@adacore.com>
3872 * sem_ch3.adb (Create_Constrained_Components): A call to
3873 Gather_Components may detect an error if an inherited discriminant
3874 that controls a variant is non-static.
3875 * sem_aggr.adb (Resolve_Record_Aggregate, Step 5): The call to
3876 Gather_Components may report an error if an inherited discriminant
3877 in a variant in non-static.
3878 * sem_util.adb (Gather_Components): If a non-static discriminant
3879 is inherited do not report error here, but let caller handle it.
3880 (Find_Actual): Small optimization.
3882 2015-01-07 Bob Duff <duff@adacore.com>
3884 * usage.adb (Usage): Document -gnatw.f switch.
3886 2015-01-07 Ed Schonberg <schonberg@adacore.com>
3888 * sem_ch12.adb: Code clean up and minor reformatting.
3890 2015-01-07 Robert Dewar <dewar@adacore.com>
3892 * exp_ch4.adb (Expand_N_Type_Conversion): Add guard for
3893 Raise_Accessibility_Error call.
3894 * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Add documentation
3895 on handling of invalid digits in based constants.
3896 * s-fatgen.ads: Minor reformatting.
3897 * sem_attr.adb (Analyze_Attribute, case Unrestricted_Access):
3898 Avoid noting bogus modification for Valid test.
3899 * snames.ads-tmpl (Name_Attr_Long_Float): New Name.
3900 * einfo.ads: Minor reformatting.
3901 * sem_warn.adb: Minor comment clarification.
3902 * sem_ch12.adb: Minor reformatting.
3904 2015-01-07 Ed Schonberg <schonberg@adacore.com>
3906 * exp_ch5.adb (Expand_Predicated_Loop): Handle properly loops
3907 over static predicates when the loop parameter specification
3908 carries a Reverse indicator.
3910 2015-01-07 Ed Schonberg <schonberg@adacore.com>
3912 * sem_ch12.adb (Instantiate_Object): If formal has a default,
3913 actual is missing and formal has an anonymous access type, copy
3914 access definition in full so that tree for instance is properly
3915 formatted for ASIS use.
3917 2015-01-07 Bob Duff <duff@adacore.com>
3919 * sem_elab.adb (Check_Internal_Call_Continue): Give a warning
3920 for P'Access, where P is a subprogram in the same package as
3921 the P'Access, and the P'Access is evaluated at elaboration
3922 time, and occurs before the body of P. For example, "X : T :=
3923 P'Access;" would allow a subsequent call to X.all to be an
3924 access-before-elaboration error; hence the warning. This warning
3925 is enabled by the -gnatw.f switch.
3926 * opt.ads (Warn_On_Elab_Access): New flag for warning switch.
3927 * warnsw.adb (Set_Dot_Warning_Switch): Set Warn_On_Elab_Access.
3928 * gnat_ugn.texi: Document the new warning.
3930 2015-01-07 Johannes Kanig <kanig@adacore.com>
3932 * lib-xref-spark_specific.adb (Collect_SPARK_Xrefs): Skip unneeded
3935 2015-01-07 Robert Dewar <dewar@adacore.com>
3937 * s-taprop-linux.adb, clean.adb: Minor reformatting.
3939 2015-01-07 Arnaud Charlet <charlet@adacore.com>
3941 * s-tassta.adb: Relax some overzealous assertions.
3943 2015-01-07 Ed Schonberg <schonberg@adacore.com>
3945 * sem_ch6.adb (Analyze_Return_Type): An call that returns a limited
3946 view of a type is legal when context is a thunk generated for
3947 operation inherited from an interface.
3948 * exp_ch6.adb (Expand_Simple_Function_Return): If context is
3949 a thunk and return type is an incomplete type do not continue
3950 expansion; thunk will be fully elaborated when generating code.
3952 2015-01-07 Doug Rupp <rupp@adacore.com>
3954 * s-osinte-mingw.ads (LARGE_INTEGR): New subtype.
3955 (QueryPerformanceFrequency): New imported procedure.
3956 * s-taprop-mingw.adb (RT_Resolution): Call above and return
3957 resolution vice a hardcoded value.
3958 * s-taprop-solaris.adb (RT_Resolution): Call clock_getres and return
3959 resolution vice a hardcoded value.
3960 * s-linux-android.ads (clockid_t): New subtype.
3961 * s-osinte-aix.ads (clock_getres): New imported subprogram.
3962 * s-osinte-android.ads (clock_getres): Likewise.
3963 * s-osinte-freebsd.ads (clock_getres): Likewise.
3964 * s-osinte-solaris-posix.ads (clock_getres): Likewise.
3965 * s-osinte-darwin.ads (clock_getres): New subprogram.
3966 * s-osinte-darwin.adb (clock_getres): New subprogram.
3967 * thread.c (__gnat_clock_get_res) [__APPLE__]: New function.
3968 * s-taprop-posix.adb (RT_Resolution): Call clock_getres to
3969 calculate resolution vice hard coded value.
3971 2015-01-07 Ed Schonberg <schonberg@adacore.com>
3973 * exp_util.adb (Make_CW_Equivalent_Type): If root type is a
3974 limited view, use non-limited view when available to create
3975 equivalent record type.
3977 2015-01-07 Vincent Celier <celier@adacore.com>
3979 * gnatcmd.adb: Remove command Sync and any data and processing
3980 related to this command. Remove project processing for gnatstack.
3981 * prj-attr.adb: Remove package Synchonize and its attributes.
3983 2015-01-07 Vincent Celier <celier@adacore.com>
3985 * clean.adb: Minor error message change.
3987 2015-01-07 Tristan Gingold <gingold@adacore.com>
3990 * env.c (__gnat_environ): Adjust for darwin9/darwin10.
3992 2015-01-07 Javier Miranda <miranda@adacore.com>
3994 * sem_ch10.adb (Analyze_With_Clause): Compiling under -gnatq
3995 protect the frontend against never ending recursion caused by
3996 circularities in the sources.
3998 2015-01-07 Robert Dewar <dewar@adacore.com>
4000 * a-reatim.adb, make.adb, exp_pakd.adb, i-cpoint.adb, sem_ch8.adb,
4001 exp_ch3.adb: Minor reformatting.
4003 2015-01-07 Doug Rupp <rupp@adacore.com>
4005 * s-linux.ads (clockid_t): New subtype.
4006 * s-osinte-linux.ads (pragma Linker Options): Add -lrt.
4007 (clockid_t): New subtype.
4008 (clock_getres): Import system call.
4009 * s-taprop-linux.adb (System.OS_Constants): With and rename.
4010 (RT_Resolution): Remove
4011 hardcoded value and call clock_getres.
4012 * s-linux-sparc.ads, s-linux-mipsel.ads, s-linux-hppa.ads,
4013 s-linux-alpha.ads, s-linux-x32.ads (clockid_t): Add new subtype.
4015 2015-01-07 Robert Dewar <dewar@adacore.com>
4017 * sem_warn.adb (Check_One_Unit): Guard against context item
4018 with no Entity field.
4020 2015-01-07 Vincent Celier <celier@adacore.com>
4022 * clean.adb (Gnatclean): Warn that 'gnatclean -P' is obsolete.
4023 * make.adb (Initialize): Warn that 'gnatmake -P' is obsolete.
4025 2015-01-07 Vincent Celier <celier@adacore.com>
4027 * prj-conf.adb (Parse_Project_And_Apply_Config): Always finalize
4028 errors/warnings in the first parsing of the project files,
4029 to display the warnings when there is no errors.
4031 2015-01-07 Tristan Gingold <gingold@adacore.com>
4033 * i-cpoint.adb (Copy_Terminated_Array): Nicely handle null target.
4035 2015-01-07 Doug Rupp <rupp@adacore.com>
4037 * s-taprop-vxworks.adb (Stop_All_Tasks): Pass return
4038 value from Int_Lock as parameter to Int_Unlock.
4039 * s-osinte-vxworks.ads (Int_Unlock): Add parameter.
4040 * s-vxwext.ads (Int_Unlock): Likewise.
4041 * s-vxwext-kernel.adb (intUnlock, Int_Unlock): Likewise.
4042 * s-vxwext-kernel.ads (Int_Unlock): Likewise.
4043 * s-vxwext-rtp.adb (Int_Unlock): Likewise.
4044 * s-vxwext-rtp.ads (Int_Unlock): Likewise.
4046 2015-01-07 Pierre-Marie de Rodat <derodat@adacore.com>
4048 * exp_pakd.adb: Add a comment in exp_pakd.adb to explain why we
4051 2015-01-07 Tristan Gingold <gingold@adacore.com>
4053 * i-cpoint.adb (Copy_Terminated_Array): Use Copy_Array to
4056 2015-01-07 Eric Botcazou <ebotcazou@adacore.com>
4058 * sem_ch3.adb (Analyze_Full_Type_Declaration): Do not
4059 automatically set No_Strict_Aliasing on access types.
4060 * fe.h (No_Strict_Aliasing_CP): Declare.
4061 * gcc-interface/trans.c (gigi): Force flag_strict_aliasing to 0 if
4062 No_Strict_Aliasing_CP is set.
4064 2015-01-07 Johannes Kanig <kanig@adacore.com>
4066 * sem_ch8.adb (Analyze_Subprogram_Renaming) do
4067 not build function wrapper in gnatprove mode when the package
4068 is externally axiomatized.
4070 2015-01-07 Jose Ruiz <ruiz@adacore.com>
4072 * a-reatim.adb (Time_Of): Reduce the number of spurious overflows in
4073 intermediate computations when the parameters have different signs.
4075 2015-01-07 Javier Miranda <miranda@adacore.com>
4077 * exp_ch3.adb (Build_Init_Procedure): For derived types,
4078 improve the code which takes care of identifying and moving to
4079 the beginning of the init-proc the call to the init-proc of the
4082 2015-01-07 Olivier Hainque <hainque@adacore.com>
4084 * gcc-interface/trans.c (gnat_to_gnu, <N_Expression_With_Action>):
4085 Elaborate the expression as part of the same stmt group as the actions.
4087 2015-01-07 Robert Dewar <dewar@adacore.com>
4089 * sem_ch3.adb: Minor error message change.
4091 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4093 * sem_prag.adb (Analyze_Pragma, case Preelaborable_Initialization):
4094 Following AI05-028, the pragam applies legally to any composite type.
4096 2015-01-07 Arnaud Charlet <charlet@adacore.com>
4098 * s-osinte-vxworks.adb, s-osinte-vxworks.ads
4099 (sigwait, sigwaitinfo): Removed, not needed after all on any
4100 VxWorks configurations.
4102 2015-01-07 Robert Dewar <dewar@adacore.com>
4104 * sem_ch3.adb, freeze.adb, exp_disp.adb: Minor reformatting.
4106 2015-01-07 Javier Miranda <miranda@adacore.com>
4108 * exp_disp.adb (Expand_Interface_Conversion): Adding missing
4109 generation of accessibility check.
4111 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4113 * sem_ch3.adb (Derived_Type_Declaration): In the case of an
4114 illegal completion from a class- wide type, set etype of the
4115 derived type properly to prevent cascaded errors.
4117 2015-01-07 Robert Dewar <dewar@adacore.com>
4119 * prj.ads, i-cpoint.adb, freeze.adb, ghost.adb, prj-err.adb: Minor
4122 2015-01-07 Robert Dewar <dewar@adacore.com>
4124 * restrict.adb (Check_Restriction_No_Use_Of_Attribute):
4126 (OK_No_Use_Of_Entity_Name): New function.
4127 (Set_Restriction_No_Use_Of_Entity): New procedure.
4128 * restrict.ads (Check_Restriction_No_Use_Of_Attribute):
4130 (OK_No_Use_Of_Entity_Name): New function.
4131 (Set_Restriction_No_Use_Of_Entity): New procedure.
4132 * sem_ch8.adb (Find_Direct_Name): Add check for violation of
4134 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
4135 Add processing for new restriction No_Use_Of_Entity.
4137 2015-01-07 Eric Botcazou <ebotcazou@adacore.com>
4139 * freeze.adb (Freeze_Array_Type): Apply same handling to Is_Atomic
4140 component type as to Has_Atomic_Components type. Remove useless
4141 test on Is_Aliased component type.
4143 2015-01-07 Hristian Kirtchev <kirtchev@adacore.com>
4145 * alloc.ads Alphabetize several declarations. Add constants
4146 Ignored_Ghost_Units_Initial and Ignored_Ghost_Units_Increment.
4147 * atree.adb Add with and use clauses for Opt.
4148 (Allocate_Initialize_Node): Mark a node as ignored Ghost
4149 if it is created in an ignored Ghost region.
4150 (Ekind_In): New variant.
4151 (Is_Ignored_Ghost_Node): New routine.
4152 (Set_Is_Ignored_Ghost_Node): New routine.
4153 * atree.adb Aplhabetize several subprograms declarations. Flag
4154 Spare0 is now known as Is_Ignored_Ghost_Node.
4155 (Ekind_In): New variant.
4156 (Is_Ignored_Ghost_Node): New routine.
4157 (Set_Is_Ignored_Ghost_Node): New routine.
4158 * einfo.adb: Flag 279 is now known as Contains_Ignored_Ghost_Code.
4159 (Contains_Ignored_Ghost_Code): New routine.
4160 (Set_Contains_Ignored_Ghost_Code): New routine.
4161 (Set_Is_Checked_Ghost_Entity, Set_Is_Ignored_Ghost_Entity):
4162 It is now possible to set this property on an unanalyzed entity.
4163 (Write_Entity_Flags): Output the status of flag
4164 Contains_Ignored_Ghost_Code.
4165 * einfo.ads New attribute Contains_Ignored_Ghost_Code along with
4167 (Contains_Ignored_Ghost_Code): New routine
4168 along with pragma Inline.
4169 (Set_Contains_Ignored_Ghost_Code): New routine along with pragma Inline.
4170 * exp_ch3.adb Add with and use clauses for Ghost.
4171 (Freeze_Type): Capture/restore the value of Ghost_Mode on entry/exit.
4172 Set the Ghost_Mode in effect.
4173 (Restore_Globals): New routine.
4174 * exp_ch7.adb (Process_Declarations): Do not process a context
4175 that invoves an ignored Ghost entity.
4176 * exp_dbug.adb (Qualify_All_Entity_Names): Skip an ignored Ghost
4177 construct that has been rewritten as a null statement.
4178 * exp_disp.adb Add with and use clauses for Ghost.
4179 (Make_DT): Capture/restore the value of Ghost_Mode on entry/exit. Set
4180 the Ghost_Mode in effect.
4181 (Restore_Globals): New routine.
4182 * exp_util.adb (Requires_Cleanup_Actions): An ignored Ghost entity
4183 does not require any clean up. Add two missing cases that deal
4184 with block statements.
4185 * freeze.adb Add with and use clauses for Ghost.
4186 (Freeze_Entity): Capture/restore the value of Ghost_Mode on entry/exit.
4187 Set the Ghost_Mode in effect.
4188 (Restore_Globals): New routine.
4189 * frontend.adb Add with and use clauses for Ghost. Remove any
4190 ignored Ghost code from all units that qualify.
4191 * ghost.adb New unit.
4192 * ghost.ads New unit.
4193 * gnat1drv.adb Add with clause for Ghost. Initialize and lock
4194 the table in package Ghost.
4195 * lib.ads: Alphabetize several subprogram declarations.
4196 * lib-xref.adb (Output_References): Do not generate reference
4197 information for ignored Ghost entities.
4198 * opt.ads Add new type Ghost_Mode_Type and new global variable
4200 * rtsfind.adb (Load_RTU): Provide a clean environment when
4201 loading a runtime unit.
4202 * sem.adb (Analyze): Capture/restore the value of Ghost_Mode on
4203 entry/exit as the node may set a different mode.
4205 Capture/restore the value of Ghost_Mode on entry/exit as the
4206 unit may be withed from a unit with a different Ghost mode.
4207 * sem_ch3.adb Add with and use clauses for Ghost.
4208 (Analyze_Full_Type_Declaration, Analyze_Incomplete_Type_Decl,
4209 Analyze_Number_Declaration, Analyze_Private_Extension_Declaration,
4210 Analyze_Subtype_Declaration): Set the Ghost_Mode in effect. Mark
4211 the entity as Ghost when there is a Ghost_Mode in effect.
4212 (Array_Type_Declaration): The implicit base type inherits the
4213 "ghostness" from the array type.
4214 (Derive_Subprogram): The
4215 alias inherits the "ghostness" from the parent subprogram.
4216 (Make_Implicit_Base): The implicit base type inherits the
4217 "ghostness" from the parent type.
4218 * sem_ch5.adb Add with and use clauses for Ghost.
4219 (Analyze_Assignment): Set the Ghost_Mode in effect.
4220 * sem_ch6.adb Add with and use clauses for Ghost.
4221 (Analyze_Abstract_Subprogram_Declaration, Analyze_Procedure_Call,
4222 Analyze_Subprogram_Body_Helper, Analyze_Subprogram_Declaration):
4223 Set the Ghost_Mode in effect. Mark the entity as Ghost when
4224 there is a Ghost_Mode in effect.
4225 * sem_ch7.adb Add with and use clauses for Ghost.
4226 (Analyze_Package_Body_Helper, Analyze_Package_Declaration,
4227 Analyze_Private_Type_Declaration): Set the Ghost_Mode in
4228 effect. Mark the entity as Ghost when there is a Ghost_Mode
4230 * sem_ch8.adb Add with and use clauses for Ghost.
4231 (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
4232 Analyze_Object_Renaming, Analyze_Package_Renaming,
4233 Analyze_Subprogram_Renaming): Set the Ghost_Mode in effect. Mark
4234 the entity as Ghost when there is a Ghost_Mode in effect.
4235 (Find_Type): Check the Ghost context of a type.
4236 * sem_ch11.adb Add with and use clauses for Ghost.
4237 (Analyze_Exception_Declaration): Set the Ghost_Mode in
4238 effect. Mark the entity as Ghost when there is a Ghost_Mode
4240 * sem_ch12.adb Add with and use clauses for Ghost.
4241 (Analyze_Generic_Package_Declaration,
4242 Analyze_Generic_Subprogram_Declaration): Set the Ghost_Mode in effect.
4243 Mark the entity as Ghost when there is a Ghost_Mode in effect.
4244 * sem_prag.adb Add with and use clauses for Ghost.
4245 (Analyze_Pragma): Ghost-related checks are triggered when there
4246 is a Ghost mode in effect.
4247 (Create_Abstract_State): Mark the
4248 entity as Ghost when there is a Ghost_Mode in effect.
4249 * sem_res.adb Add with and use clauses for Ghost.
4250 (Check_Ghost_Context): Removed.
4251 * sem_util.adb (Check_Ghost_Completion): Removed.
4252 (Check_Ghost_Derivation): Removed.
4253 (Incomplete_Or_Partial_View):
4254 Add a guard in case the entity has not been analyzed yet
4255 and does carry a scope.
4256 (Is_Declaration): New routine.
4257 (Is_Ghost_Entity): Removed.
4258 (Is_Ghost_Statement_Or_Pragma):
4260 (Is_Subject_To_Ghost): Removed.
4261 (Set_Is_Ghost_Entity):
4263 (Within_Ghost_Scope): Removed.
4264 * sem_util.adb (Check_Ghost_Completion): Removed.
4265 (Check_Ghost_Derivation): Removed.
4266 (Is_Declaration): New routine.
4267 (Is_Ghost_Entity): Removed.
4268 (Is_Ghost_Statement_Or_Pragma): Removed.
4269 (Is_Subject_To_Ghost): Removed.
4270 (Set_Is_Ghost_Entity): Removed.
4271 (Within_Ghost_Scope): Removed.
4272 * sinfo.ads Add a section on Ghost mode.
4273 * treepr.adb (Print_Header_Flag): New routine.
4274 (Print_Node_Header): Factor out code. Output flag
4275 Is_Ignored_Ghost_Node.
4276 * gcc-interface/Make-lang.in: Add dependency for unit Ghost.
4278 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
4280 * freeze.adb (Freeze_Array_Type) <Complain_CS>: Remove always
4281 true test and unreachable 'else' arm.
4283 2015-01-06 Vincent Celier <celier@adacore.com>
4285 * prj-conf.adb (Check_Target): Improve error message when
4286 there are mismatched targets between the on in the configuration
4287 project file and the specified one, either in the main project
4288 file or in the --target= switch.
4290 2015-01-06 Pascal Obry <obry@adacore.com>
4292 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Mode and
4293 Install_Name attribute definitions.
4295 2015-01-06 Ed Schonberg <schonberg@adacore.com>
4297 * freeze.adb (Wrap_Imported_Subprogram): Indicate that the
4298 generated Import pragma for the internal imported procedure does
4299 not come from an aspect, so that Is_Imported can be properly
4302 2015-01-06 Gary Dismukes <dismukes@adacore.com>
4304 * sem_ch12.adb (Might_Inline_Subp): Record whether
4305 any subprograms in the generic package are marked with
4306 pragma Inline_Always (setting flag Has_Inline_Always).
4307 (Analyze_Package_Instantiation): Add test of Has_Inline_Always
4308 alongside existing test of Front_End_Inlining as alternative
4309 conditions for setting Inline_Now. Also add test of
4310 Has_Inline_Always along with Front_End_Inlining test as an
4311 alternative condition for setting Needs_Body to False.
4313 2015-01-06 Tristan Gingold <gingold@adacore.com>
4315 * i-cpoint.adb (Copy_Array): Handle overlap.
4317 2015-01-06 Pascal Obry <obry@adacore.com>
4319 * bindgen.adb: Minor style fix.
4321 2015-01-06 Robert Dewar <dewar@adacore.com>
4323 * sem_util.ads, sem_util.adb: Minor reformatting.
4325 2015-01-06 Vincent Celier <celier@adacore.com>
4327 * prj-conf.adb (Parse_Project_And_Apply_Config): Reset incomplete
4328 with flags before parsing the projects.
4329 * prj-err.adb (Error_Msg): Do nothing if there are incomplete withs.
4330 * prj-part.adb (Post_Parse_Context_Clause): Set Incomplete_Withs
4331 to True in the flags, when Ignore_Missing_With is True and an
4332 imported project cannot be found.
4333 * prj-proc.adb (Expression): When there are incomplete withs and
4334 a variable or attribute is not found, set the variable/attribute
4336 * prj.ads (Processing_Flags): New flag Incomplete_Withs,
4339 2015-01-06 Vasiliy Fofanov <fofanov@adacore.com>
4341 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-conf.adb,
4342 prj-err.adb: Add new switch --no-command-line.
4344 2015-01-06 Ed Schonberg <schonberg@adacore.com>
4346 * sem_ch12.adb: Sloc of wrapper is that of instantiation.
4348 2015-01-06 Robert Dewar <dewar@adacore.com>
4350 * sem_ch11.adb: Minor reformatting.
4352 2015-01-06 Ed Schonberg <schonberg@adacore.com>
4354 * exp_aggr.adb (Get_Assoc_Expr): New routine internal to
4355 Build_Array_Aggr_Code, used to initialized components covered
4356 by a box association. If the component type is scalar and has
4357 a default aspect, use it to initialize such components.
4359 2015-01-06 Pascal Obry <obry@adacore.com>
4361 * rtinit.c (__gnat_runtime_initialize): Add a parameter to
4362 control the setup of the exception handler.
4363 * initialize.c: Remove unused declaration.
4364 * bindgen.adb: Always call __gnat_runtime_initialize and pass
4365 whether the exeception handler must be set or not.
4367 2015-01-06 Thomas Quinot <quinot@adacore.com>
4369 * freeze.adb (Set_SSO_From_Defaults): When setting scalar storage
4370 order to native from default, make sure to also adjust bit order.
4371 * exp_aggr.adb: Minor reformatting.
4373 2015-01-06 Robert Dewar <dewar@adacore.com>
4375 * s-valllu.adb, s-valllu.ads, s-valuti.ads, s-valuns.adb, s-valuns.ads,
4376 s-valrea.adb, s-valrea.ads: Add some additional guards for
4377 Str'Last = Positive'Last.
4379 2015-01-06 Ed Schonberg <schonberg@adacore.com>
4381 * sem_ch12.adb, sem_ch8.adb: Ongoing work for wrappers for actual
4384 2015-01-06 Javier Miranda <miranda@adacore.com>
4386 * exp_disp.adb (Expand_Interface_Conversion): Reapply patch.
4388 2015-01-06 Thomas Quinot <quinot@adacore.com>
4390 * sem_util.ads: Minor reformatting.
4391 * sem_cat.adb (In_RCI_Visible_Declarations): Change back to...
4392 (In_RCI_Declaration) Return to old name, as proper checking of
4393 entity being in the visible part depends on entity kind and must
4394 be done by the caller.
4396 2015-01-06 Ed Schonberg <schonberg@adacore.com>
4398 * sem_ch12.adb, sem_ch12.ads, sem_ch8.adb: Ongoing work for wrappers
4399 for operators in SPARK.
4401 2015-01-06 Ed Schonberg <schonberg@adacore.com>
4403 * sem_aggr.adb (Get_Value): In ASIS mode, preanalyze the
4404 expression in an others association before making copies for
4405 separate resolution and accessibility checks. This ensures that
4406 the type of the expression is available to ASIS in all cases,
4407 in particular if the expression is itself an aggregate.
4409 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
4411 * einfo.ads (Has_Independent_Components): Document extended
4413 * einfo.adb (Has_Independent_Components): Remove obsolete assertion.
4414 (Set_Has_Independent_Components): Adjust assertion.
4415 * sem_prag.adb (Analyze_Pragma): Also set Has_Independent_Components
4416 for pragma Atomic_Components. Set Has_Independent_Components
4417 on the object instead of the type for an object declaration with
4418 pragma Independent_Components.
4420 2015-01-06 Olivier Hainque <hainque@adacore.com>
4422 * set_targ.adb (Read_Target_Dependent_Values): Set
4423 Long_Double_Index when "long double" is read.
4424 (elaboration code): Register_Back_End_Types only when not reading from
4425 config files. Doing otherwise is pointless and error prone.
4427 2015-01-06 Robert Dewar <dewar@adacore.com>
4429 * s-valrea.adb (Value_Real): Check for Str'Last = Positive'Last
4431 2015-01-06 Robert Dewar <dewar@adacore.com>
4433 * a-wtgeau.adb, a-ztgeau.adb, a-tigeau.adb (String_Skip): Raise PE if
4434 Str'Last = Positive'Last.
4436 2015-01-06 Ed Schonberg <schonberg@adacore.com>
4438 * sem_ch6.adb (Matches_Limited_View): Handle properly the case
4439 where the non-limited type is a generic actual and appears as
4440 a subtype of the non-limited view of the other.
4441 * freeze.adb (Build_Renamed_Body): If the return type of the
4442 declaration that is being completed is a limited view and the
4443 non-limited view is available, use it in the specification of
4446 2015-01-06 Ed Schonberg <schonberg@adacore.com>
4448 * sem_ch3.adb (Find_Type_Name): If there is a previous tagged
4449 incomplete view, the type of the classwide type common to both
4450 views is the type being declared.
4452 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
4454 * einfo.ads (Is_Independent): Further document extended usage.
4456 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
4458 * einfo.ads (Is_Independent): Document extended usage.
4459 * einfo.adb (Is_Independent): Remove obsolete assertion.
4460 (Set_Is_Independent): Likewise.
4461 * sem_prag.adb (Process_Atomic_Shared_Volatile): Rename into...
4462 (Process_Atomic_Independent_Shared_Volatile): ...this.
4463 Deal with pragma Independent here.
4464 (Analyze_Pragma): Adjust
4465 to above renaming and also invoke it for pragma Independent.
4466 Adjust comment for Independent_Components.
4468 2015-01-06 Robert Dewar <dewar@adacore.com>
4470 * snames.ads-tmpl: Remove entries for attribute Enum_Image.
4471 * exp_attr.adb: Remove reference to Attribute_Enum_Image.
4473 2015-01-06 Robert Dewar <dewar@adacore.com>
4475 * s-vallli.adb (Value_Long_Long_Integer): Handle case of Str'Last
4477 * s-valllu.adb (Value_Long_Long_Unsigned): Handle case of
4478 Str'Last = Positive'Last.
4480 2015-01-06 Robert Dewar <dewar@adacore.com>
4482 * sem_prag.adb (Process_Inline): Remove redundant construct
4483 warning (-gnatw.r) for an ineffective pragma Inline.
4485 2015-01-06 Robert Dewar <dewar@adacore.com>
4487 * s-valint.adb: Fix typo in last checkin.
4488 * s-valuns.adb (Value_Unsigned): More efficient fix for
4490 * sem_attr.adb (Analyze_Attribute): Minor reformatting
4491 (Eval_Attribute): Static ervaluation of 'Img for enumeration types.
4493 2015-01-06 Robert Dewar <dewar@adacore.com>
4495 * s-valint.adb, s-valuns.adb (Value_Integer): Deal with case where
4496 Str'Last = Positive'Last
4498 2015-01-06 Thomas Quinot <quinot@adacore.com>
4500 * xoscons.adb: Display exception information and return non-zero
4501 exit status in top level exception handler.
4503 2015-01-06 Ed Schonberg <schonberg@adacore.com>
4505 * sem_ch8.adb: Code clean up.
4507 2015-01-06 Tristan Gingold <gingold@adacore.com>
4509 * targparm.ads: Remove obsolete comment.
4511 2015-01-06 Olivier Hainque <hainque@adacore.com>
4513 * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Variable): When
4514 constructing a ref to variable, update inner_const_flag from the
4515 variable TREE_READONLY attribute.
4516 * gcc-interface/targtyps.c (WIDEST_HARDWARE_FP_SIZE): Remove default
4518 (get_target_float_size): Remove.
4519 (get_target_double_size): Remove.
4520 (get_target_long_double_size): Remove.
4522 2015-01-06 Pascal Obry <obry@adacore.com>
4524 * adaint.c (ProcListEvt): Set to NULL.
4525 * rtinit.c: New file.
4526 (__gnat_rt_init_count): New reference counter set to 0.
4527 (__gnat_runtime_initialize): Move code here from __gnat_initialize when
4528 this code is actually needed for the runtime initialization. This
4529 routine returns immediately if the initialization has already been done.
4530 * final.c: Revert previous change.
4531 * rtfinal.c: New file.
4532 (__gnat_runtime_finalize)[Win32]: Add finalization of the critical
4533 section and event. The default version of this routine is empty (except
4534 for the reference counting code). This routine returns immediately if
4535 some others libraries are referencing the runtime.
4536 * bindgen.adb (Gen_Adainit): Generate call to Runtime_Initialize
4537 remove circuitry to initialize the signal handler as this is
4538 now done by the runtime initialization routine.
4539 (Gen_Adafinal): Generate call to Runtime_Finalize.
4540 * gnat_ugn.texi: Update documentation about concurrency and
4541 initialization/finalization of the run-time.
4542 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Add
4543 references to rtfinal.o and rtinit.o
4545 2015-01-06 Robert Dewar <dewar@adacore.com>
4547 * exp_attr.adb (Expand_N_Attribute_Reference): Add dummy entry
4549 * sem_attr.adb: Implement Enum_Image attribute.
4550 * snames.ads-tmpl: Add entries for Enum_Image attribute.
4552 2015-01-06 Robert Dewar <dewar@adacore.com>
4554 * namet.ads: Document use of Boolean2 for No_Use_Of_Entity.
4555 * restrict.ads (No_Use_Of_Entity): New table.
4556 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
4557 Ignore No_Use_Of_Entity (will be processed in parser).
4558 * snames.ads-tmpl: Add entry for Name_No_Use_Of_Entity.
4560 2015-01-06 Vincent Celier <celier@adacore.com>
4562 * prj-tree.adb (Imported_Or_Extended_Project_Of): Do not try
4563 to check for an extended project, if a project does not have
4564 yet a project declaration.
4566 2015-01-06 Pierre-Marie Derodat <derodat@adacore.com>
4568 * scos.ads: Update documentation about the SCO table build
4569 process and about table records format.
4570 * par_sco.ads (SCO_Record): Rename to SCO_Record_Raw.
4571 (SCO_Record_Filtered): New procedure.
4572 (Set_SCO_Logical_Operator): New procedure.
4573 (dsco): Update documentation.
4574 * par_sco.adb: Update library-level comments.
4575 (SCO_Generation_State_Type): New type.
4576 (SCO_Generation_State): New variable.
4577 (SCO_Raw_Table): New package instanciation.
4578 (Condition_Pragma_Hash_Table): Rename to SCO_Raw_Hash_Table.
4580 (Tristate): New type.
4581 (Is_Logical_Operator): Return Tristate and update documentation.
4582 (Has_Decision): Update call to Is_Logical_Operator and complete
4584 (Set_Table_Entry): Rename to Set_Raw_Table_Entry, update
4585 comment, add an assertion for state checking and change
4586 references to SCO_Table into SCO_Raw_Table.
4587 (dsco): Refactor to dump the raw and the filtered tables.
4588 (Process_Decisions.Output_Decision_Operand): Handle putative
4589 short-circuit operators.
4590 (Process_Decisions.Output_Element): Update references
4591 to Set_Table_Entry and to Condition_Pragma_Hash_Table.
4592 (Process_Decisions.Process_Decision_Operand): Update call
4593 to Is_Logical_Operator.
4594 (Process_Decisions.Process_Node): Handle putative short-circuit
4595 operators and change references to
4596 SCO_Table into SCO_Raw_Table.
4597 (SCO_Output): Add an assertion
4598 for state checking and remove code that used to stamp out SCO entries.
4599 (SCO_Pragma_Disabled): Change reference to SCO_Table
4601 (SCO_Record): Rename to SCO_Record_Raw,
4602 add an assertion for state checking and change references
4603 to SCO_Table into SCO_Raw_Table.
4604 (Set_SCO_Condition): Add an assertion for state checking, update
4605 references to Condition_Pragma_Hash_Table and change references to
4606 SCO_Table into SCO_Raw_Table.
4607 (Set_SCO_Pragma_Enabled): Add an assertion for state checking and
4608 change references to SCO_Table into SCO_Raw_Table.
4609 (Set_SCO_Logical_Operator): New procedure.
4610 (Traverse_Declarations_Or_Statements.Set_Statement_Entry): Update
4611 references to Set_Table_Entry and to Condition_Pragma_Hash_Table.
4612 (SCO_Record_Fildered): New procedure.
4613 * gnat1drv.adb (Gnat1drv): Invoke the SCO filtering pass.
4614 * lib-writ.adb (Write_ALI): Invoke the SCO filtering pass and
4616 * par-load.adb (Load): Update reference to SCO_Record.
4617 * par.adb (Par): Update reference to SCO_Record.
4618 * put_scos.adb (Put_SCOs): Add an assertion to check that no
4619 putative SCO condition reaches this end.
4620 * sem_ch10.adb (Analyze_Proper_Body): Update reference to SCO_Record.
4621 * sem_res.adb (Resolve_Logical_Op): Validate putative SCOs
4622 when corresponding to an "and"/"or" operator affected by the
4623 Short_Circuit_And_Or pragma.
4625 2015-01-06 Robert Dewar <dewar@adacore.com>
4627 * sem_ch8.adb (Analyze_Use_Package): Give more specific error
4628 msg for attempted USE of generic subprogram or subprogram.
4630 2015-01-06 Robert Dewar <dewar@adacore.com>
4632 * s-valllu.adb, a-tiinau.adb, a-timoau.adb, a-ztinau.adb, a-ztmoau.adb,
4633 s-valuns.adb, s-valrea.adb, a-wtflau.adb, a-tiflau.adb, a-ztflau.adb,
4634 a-wtinau.adb, a-wtmoau.adb: Document recognition of : in place of #.
4636 2015-01-06 Ed Schonberg <schonberg@adacore.com>
4638 * sem_ch13.adb (Analyze_Aspect_Specifications): For aspects
4639 that specify stream subprograms, if the prefix is a class-wide
4640 type then the generated attribute definition clause must apply
4641 to the same class-wide type.
4642 (Default_Iterator): An iterator defined by an aspect of some
4643 container type T must have a first parameter of type T, T'class,
4644 or an access to such (from code reading RM 5.5.1 (2/3)).
4646 2015-01-06 Arnaud Charlet <charlet@adacore.com>
4648 * gnat1drv.adb: Minor: complete previous change.
4650 2015-01-06 Olivier Hainque <hainque@adacore.com>
4652 * set_targ.ads (C_Type_For): New function. Return the name of
4653 a C type supported by the back-end and suitable as a basis to
4654 construct the standard Ada floating point type identified by
4655 the T parameter. This is used as a common ground to feed both
4656 ttypes values and the GNAT tree nodes for the standard floating
4658 * set_targ.adb (Long_Double_Index): The index at which "long
4659 double" gets registered in the FPT_Mode_Table. This is useful to
4660 know whether we have a "long double" available at all and get at
4661 it's characteristics without having to search the FPT_Mode_Table
4662 when we need to decide which C type should be used as the
4663 basis for Long_Long_Float in Ada.
4664 (Register_Float_Type): Fill Long_Double_Index.
4665 (FPT_Mode_Index_For): New function. Return the index in
4666 FPT_Mode_Table that designates the entry corresponding to the
4667 provided C type name.
4668 (FPT_Mode_Index_For): New function. Return the index in
4669 FPT_Mode_Table that designates the entry for a back-end type
4670 suitable as a basis to construct the standard Ada floating point
4671 type identified by the input T parameter.
4672 (elaboration code): Register_Back_End_Types unconditionally,
4673 so C_Type_For can operate regardless of -gnateT. Do it
4674 early so we can query it for the floating point sizes, via
4675 FPT_Mode_Index_For. Initialize Float_Size, Double_Size and
4676 Long_Double_Size from the FPT_Mode_Table, as cstand will do.
4677 * cstand.adb (Create_Float_Types): Use C_Type_For to determine
4678 which C type should be used as the basis for the construction
4679 of the Standard Ada floating point types.
4680 * get_targ.ads (Get_Float_Size, Get_Double_Size,
4681 Get_Long_Double_Size): Remove.
4682 * get_targ.adb: Likewise.
4684 2015-01-06 Thomas Quinot <quinot@adacore.com>
4686 * sem_cat.adb (In_RCI_Declaration): Remove unnecessary
4687 parameter and rename to...
4688 (In_RCI_Visible_Declarations): Fix handling of private part of nested
4690 (Validate_RCI_Subprogram_Declaration): Reject illegal function
4691 returning anonymous access in RCI unit.
4693 2015-01-06 Ed Schonberg <schonberg@adacore.com>
4695 * sem_ch6.adb (New_Overloaded_Entity): In GNATprove mode, a
4696 function wrapper may be a homonym of another local declaration.
4697 * sem_ch8.adb (Analyze_Subprogram_Renaming): In GNATprove mode,
4698 build function and operator wrappers after the actual subprogram
4699 has been resolved, and replace the standard renaming declaration
4700 with the declaration of wrapper.
4701 * sem_ch12.ads (Build_Function_Wrapper, Build_Operator_Wraooer):
4702 make public for use elsewhere.
4703 * sem_ch12.adb (Build_Function_Wrapper, Build_Operator_Wraooer):
4704 rewrite, now that actual is fully resolved when wrapper is
4707 2015-01-06 Javier Miranda <miranda@adacore.com>
4709 * exp_disp.adb: Revert previous change.
4711 2015-01-06 Robert Dewar <dewar@adacore.com>
4713 * exp_util.adb: Change name Name_Table_Boolean to
4714 Name_Table_Boolean1.
4715 * namet.adb: Change name Name_Table_Boolean to Name_Table_Boolean1
4716 Introduce Name_Table_Boolean2/3.
4717 * namet.ads: Change name Name_Table_Boolean to Name_Table_Boolean1
4718 Introduce Name_Table_Boolean2/3.
4719 * par-ch13.adb: Change name Name_Table_Boolean to
4720 Name_Table_Boolean1.
4722 2015-01-06 Bob Duff <duff@adacore.com>
4724 * gnat_rm.texi: Improve documentation regarding No_Task_Termination.
4726 2015-01-06 Ed Schonberg <schonberg@adacore.com>
4728 * sem_aggr.adb (Resolve_Record_Aggregte, Get_Value): For an
4729 others choice that covers multiple components, analyze each
4730 copy with the type of the component even in compile-only mode,
4731 to detect potential accessibility errors.
4733 2015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
4735 * sem_res.adb (Is_Assignment_Or_Object_Expression): New routine.
4736 (Resolve_Actuals): An effectively volatile out
4737 parameter cannot act as an in or in out actual in a call.
4738 (Resolve_Entity_Name): An effectively volatile out parameter
4741 2015-01-06 Ed Schonberg <schonberg@adacore.com>
4743 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If the body is
4744 the expansion of an expression function it may be pre-analyzed
4745 if a 'access attribute is applied to the function, in which case
4746 last_entity may have been assigned already.
4748 2015-01-06 Ed Schonberg <schonberg@adacore.com>
4750 * sem_ch4.adb (Analyze_One_Call): If formal has an incomplete
4751 type and actual has the corresponding full view, there is no
4752 error, but a case of use of incomplete type in a predicate or
4753 invariant expression.
4755 2015-01-06 Vincent Celier <celier@adacore.com>
4757 * makeutl.adb (Insert_No_Roots): Make sure that the same source
4758 in two different project tree is checked in both trees, if they
4759 are sources of two different projects, extended or not.
4761 2015-01-06 Arnaud Charlet <charlet@adacore.com>
4763 * gnat1drv.adb: Minor code clean up.
4764 (Adjust_Global_Switches): Ignore gnatprove_mode in codepeer_mode.
4766 2015-01-06 Bob Duff <duff@adacore.com>
4768 * osint.adb (Read_Source_File): Don't print out
4769 file name unless T = Source.
4771 2015-01-06 Ed Schonberg <schonberg@adacore.com>
4773 * sem_util.adb (Is_Variable, Is_OK_Variable_For_Out_Formal):
4774 recognize improper uses of constant_reference types as actuals
4775 for in-out parameters.
4776 (Check_Function_Call): Do not collect identifiers if function
4777 name is missing because of previous error.
4779 2015-01-06 Robert Dewar <dewar@adacore.com>
4781 * ali-util.adb, sem_prag.adb, rtsfind.adb, sem_util.adb, sem_res.adb,
4782 ali.adb, binde.adb, namet.adb, namet.ads, gnatls.adb, bcheck.adb:
4783 Minor change of name Name_Table_Info => Name_Table_Int.
4785 2015-01-06 Robert Dewar <dewar@adacore.com>
4787 * exp_strm.adb (Build_Elementary_Input_Call): Clarify comments
4788 in previous checkin.
4789 * freeze.adb (Freeze_Fixed_Point_Type): Add warning for shaving
4791 * sem_prag.adb, sem_ch10.adb, sem_ch6.adb: Minor reformatting.
4793 2015-01-06 Vincent Celier <celier@adacore.com>
4795 * a-strsup.adb (Times (Natural;String;Positive)): Raise
4796 Length_Error, not Index_Error, when the result is too long.
4798 2015-01-06 Thomas Quinot <quinot@adacore.com>
4800 * a-direct.adb (Create_Path): Minor error handling and
4801 performance improvement.
4803 2015-01-06 Robert Dewar <dewar@adacore.com>
4805 * checks.ads, sem_ch12.adb: Minor reformatting.
4806 * exp_ch4.adb (Expand_N_Op_Divide): Generate explicit divide by
4807 zero check for fixed-point case if Backend_Divide_Checks_On_Target
4810 2015-01-06 Robert Dewar <dewar@adacore.com>
4812 * sem_prag.adb (Analyze_Pragma, case No_Elaboration_Code_All):
4813 Do not set restriction No_Elaboration_Code unless the pragma
4814 appears in the main unit).
4816 2015-01-06 Ed Schonberg <schonberg@adacore.com>
4818 * sem_ch10.adb (Is_Regular_With_Clause): Add guard to verify
4819 that with clause has already been analyzed before checking kind
4822 2015-01-06 Robert Dewar <dewar@adacore.com>
4824 * exp_strm.adb (Build_Elementary_Input_Call): Return base type
4825 (as required by RM).
4827 2015-01-06 Arnaud Charlet <charlet@adacore.com>
4829 * a-reatim.adb ("/"): Add explicit pragma Unsuppress (Division_Check).
4831 2015-01-06 Robert Dewar <dewar@adacore.com>
4833 * sem_prag.adb (Process_Suppress_Unsuppress): Add extra warning
4834 for ignoring pragma Suppress (Elaboration_Check) in SPARK mode.
4836 2015-01-06 Javier Miranda <miranda@adacore.com>
4838 * exp_disp.adb (Expand_Interface_Conversion): No displacement
4839 of the pointer to the object needed when the type of the operand
4840 is not an interface type and the interface is one of its parent
4841 types (since they share the primary dispatch table).
4843 2015-01-06 Vincent Celier <celier@adacore.com>
4845 * prj-env.adb: Minor comment update.
4847 2015-01-06 Javier Miranda <miranda@adacore.com>
4849 * sem_res.adb (Valid_Conversion): Restrict the checks on anonymous
4850 access types whose target type is an interface type to operands
4851 that are access types; required to report an error when the
4852 operand is not an access type.
4854 2015-01-06 Bob Duff <duff@adacore.com>
4856 * a-cfinve.adb (Copy): Set the discriminant to the Length when
4858 * a-cofove.ads (Capacity): Add a postcondition.
4859 * a-cfinve.ads (Capacity): Add a postcondition.
4860 (Reserve_Capacity): Correct the postcondition in the case where
4861 Capacity = 0; that means "Capacity => Length (Container)".
4862 * a-cofove.adb (Elems[c]): Add a comment
4863 explaining the dangers and how to avoid them.
4865 2015-01-06 Ed Schonberg <schonberg@adacore.com>
4867 * sem_ch12.adb: Code clean up.
4869 2015-01-06 Arnaud Charlet <charlet@adacore.com>
4871 * gnatvsn.ads: Bump copyright year.
4873 2015-01-06 Robert Dewar <dewar@adacore.com>
4875 * s-taskin.ads, s-traces.ads: Minor reformatting.
4876 * exp_util.adb: Minor typo fix.
4878 2015-01-06 Vincent Celier <celier@adacore.com>
4880 * gnatls.adb (Search_RTS): Invoke Initialize_Default_Project_Path
4881 with the runtime name.
4882 * prj-env.adb (Initialize_Default_Project_Path): When both
4883 Target_Name and Runtime_Name are not empty string, add to the
4884 project path the two directories .../lib/gnat and .../share/gpr
4885 related to the runtime.
4886 * prj-env.ads (Initialize_Default_Project_Path): New String
4887 parameter Runtime_Name, defaulted to the empty string.
4889 2015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
4891 * frontend.adb: Guard against the case where a configuration
4892 pragma may be split into multiple pragmas and the original
4893 rewritten as a null statement.
4894 * sem_prag.adb (Analyze_Pragma): Insert a brand new Check_Policy
4895 pragma using Insert_Before rather than Insert_Action. This
4896 takes care of the configuration pragma case where Insert_Action
4899 2015-01-06 Bob Duff <duff@adacore.com>
4901 * a-coboho.ads (Element_Access): Add "pragma
4902 No_Strict_Aliasing (Element_Access);". This is needed because
4903 we are unchecked-converting from Address to Element_Access.
4904 * a-cofove.ads, a-cofove.adb (Elems,Elemsc): Fix bounds of the
4907 2015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
4909 * sem_res.adb (Resolve_Actuals): Remove the
4910 restriction which prohibits volatile actual parameters with
4911 enabled external propery Async_Writers to act appear in procedure
4912 calls where the corresponding formal is of mode OUT.
4914 2015-01-05 Jakub Jelinek <jakub@redhat.com>
4916 * gnat_ugn.texi: Bump @copying's copyright year.
4918 2015-01-05 Eric Botcazou <ebotcazou@adacore.com>
4921 * gcc-interface/Makefile.in (../stamp-tools): Reinstate dropped code.
4923 2015-01-04 Uros Bizjak <ubizjak@gmail.com>
4925 * gcc-interface/misc.c (internal_error_function): Use xasprintf instead
4926 of unchecked asprintf.
4929 Copyright (C) 2015 Free Software Foundation, Inc.
4931 Copying and distribution of this file, with or without modification,
4932 are permitted in any medium without royalty provided the copyright
4933 notice and this notice are preserved.