1 2015-05-30 Eric Botcazou <ebotcazou@adacore.com>
3 * adaint.c: Test for __linux__ instead of linux and __sun__ instead
4 of sun. Add missing leading underscore to AIX. Remove #elif 0.
7 * cstreams.c: Likewise.
10 * init.c: Likewise. Test for __i386__ instead of i386.
12 * s-oscons-tmplt.c: Likewise.
14 * terminals.c: Likewise. Use BSD symbol instead of FREEBSD.
15 * tracebak.c: Likewise. Test for __sparc__ instead of sparc.
17 2015-05-28 Eric Botcazou <ebotcazou@adacore.com>
19 * gcc-interface/utils.c (max_size) <tcc_binary>: Add special code to
20 deal with the subtraction of a "negative" value in an unsigned type.
22 2015-05-28 Eric Botcazou <ebotcazou@adacore.com>
24 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Do
25 not error out on a return type which has a size that overflows if the
26 return is done by invisible reference.
28 2015-05-28 Eric Botcazou <ebotcazou@adacore.com>
30 * gcc-interface/utils.c (gnat_pushdecl): Reunify the handling of array
31 and pointer types wrt DECL_ORIGINAL_TYPE and adjust left and right.
33 2015-05-28 Eric Botcazou <ebotcazou@adacore.com>
35 * gcc-interface/gigi.h (gnat_stabilize_reference): Adjust.
36 (rewrite_fn): Remove third parameter.
37 (type_is_padding_self_referential): New inline predicate.
38 (return_type_with_variable_size_p): Likewise.
39 * gcc-interface/decl.c (allocatable_size_p): More around.
40 (cannot_be_superflat_p): Rename into...
41 (cannot_be_superflat ): ...this.
42 (initial_value_needs_conversion): New predicate.
43 (gnat_to_gnu_entity): Invoke type_is_padding_self_referential,
44 initial_value_needs_conversion and adjust to above renaming.
45 For a renaming, force the materialization if the inner expression
46 is compound. Adjust calls to elaborate_reference and build a
47 compound expression if needed.
48 (struct er_dat): Add N field.
49 (elaborate_reference_1): Remove N parameter and adjust.
50 (elaborate_reference): Add INIT parameter and pass it in the call to
51 gnat_rewrite_reference. Adjust initial expression.
52 * gcc-interface/trans.c (Call_to_gnu): Treat renamings the same way as
53 regular object declarations when it comes to creating a temporary.
54 Adjust call to gnat_stabilize_reference and build a compound expression
55 if needed. Invoke return_type_with_variable_size_p.
56 (gnat_to_gnu): Invoke type_is_padding_self_referential. In case #4,
57 return a call to a function unmodified if it returns with variable size
58 and is also the initial expression in an object declaration.
59 * gcc-interface/utils2.c (build_binary_op) <INIT_EXPR>: Use the RHS'
60 type if it is a call to a function that returns with variable size.
61 (build_unary_op): Invoke type_is_padding_self_referential.
62 (gnat_stabilize_reference_1): Remove N parameter and adjust.
63 (gnat_stabilize_reference): Add INIT parameter and pass it in the call
64 to gnat_rewrite_reference.
65 (gnat_rewrite_reference): Remove N, add INIT parameter and adjust.
66 <COMPOUND_EXPR>: New case.
68 2015-05-28 Ed Schonberg <schonberg@adacore.com>
70 * sem_ch3.adb (Is_Visible_Component): Component is visible
71 in a derived type if inherited through an ancestor that has a
72 partial view of the original type holding the component, if the
73 full view of that original type is in scope.
74 * sem_util.ads (Get_Body_From_Stub): Works for all kinds of stubs.
76 2015-05-28 Bob Duff <duff@adacore.com>
78 * sem_util.adb (Requires_Transient_Scope): For definite untagged
79 subtypes, we should never have to use the secondary stack. This moves
80 toward that goal. But there are still cases that don't work.
81 Here, we move the check for Is_Definite first, but add a
82 special-purpose check for Has_Discrim_Dep_Array.
84 2015-05-28 Bob Duff <duff@adacore.com>
86 * sem_util.adb (Requires_Transient_Scope): Avoid returning
87 function results on the secondary stack in so many cases.
89 2015-05-28 Ed Schonberg <schonberg@adacore.com>
91 * sem_util.adb (Wrong_Type): In any instance, do not emit error
92 if type of expression is the partial view of the expected type.
94 2015-05-28 Ed Schonberg <schonberg@adacore.com>
96 * sem_res.adb (Resolve_Actuals): a) The replacement of formal
97 names in named associations only needs to be done within an
98 instance, on a call to a primitive of a formal derived type,
99 where the actual subprogram may have different formal names than
100 those of the primitive operation of the formal type.
101 b) Defaulted parameters must be taken into account when obtaining
102 the names of the formals of the actual subprogram being called.
104 2015-05-28 Robert Dewar <dewar@adacore.com>
106 * sem_ch13.adb, sem_disp.ads: Minor reformatting.
108 2015-05-28 Ed Schonberg <schonberg@adacore.com>
110 * sem_util.adb (Set_Debug_Info_Needed): For a private type
111 whose full view is itself a derived private type, set flag on
112 underlying full view as well, for proper gdb display.
114 2015-05-28 Bob Duff <duff@adacore.com>
116 * exp_tss.ads: Minor comment fix.
117 * exp_ch3.adb (Build_Array_Init_Proc, Build_Record_Init_Proc):
118 Inline init_procs when the type has controlled parts. Remove
119 obsolete comments about those init_procs -- init_procs for
120 such types are no longer complex. A typical init_proc just
121 initializes the 'Tag field, and calls the parent init_proc
122 (e.g. for Limited_Controlled), which calls the grandparent
123 (for Root_Controlled), which does nothing. This all boils down
124 to one instruction when inlined.
125 * exp_ch7.adb (Create_Finalizer): Inline the finalizer.
127 2015-05-28 Ed Schonberg <schonberg@adacore.com>
129 * sem_ch4.adb (Analyze_Selected_Component): If the type to use
130 is a derived type and is a generic actual, the selected component
131 appears within an instance body, and the check over the type
132 has failed, examine ancestor types for the desired component.
133 (Find_Component_In_Instance): If record type is a derived type,
134 examine all ancestors in order to locate desired component.
136 2015-05-27 H.J. Lu <hongjiu.lu@intel.com>
138 * gcc-interface/Makefile.in (TOOLS_LIBS): Add @NO_PIE_FLAG@.
140 2015-05-27 Eric Botcazou <ebotcazou@adacore.com>
142 * gcc-interface/trans.c (elaborate_all_entities): Do not elaborate an
143 incomplete type coming from a limited_with and whose non-limited view
144 comes from the main unit.
146 2015-05-27 Eric Botcazou <ebotcazou@adacore.com>
148 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Move down
149 code applying atomic checks to the object.
151 2015-05-27 Robert Dewar <dewar@adacore.com>
153 * sem_aux.adb: Minor rewording.
155 2015-05-27 Bob Duff <duff@adacore.com>
157 * exp_prag.adb (Expand_Pragma_Abort_Defer): Make
158 pragma Abort_Defer do nothing if Abort_Allowed is False.
160 2015-05-27 Arnaud Charlet <charlet@adacore.com>
162 * exp_ch9.adb, sem_util.adb, sem_util.ads, s-stposu.adb, s-spsufi.ads,
163 sem_elab.ads, g-comlin.ads, errout.ads, exp_ch6.adb, sem_ch4.adb,
164 opt.ads, s-bignum.adb, output.ads, sem_ch13.adb, erroutc.ads,
165 sem_disp.ads, exp_ch3.adb: Minor fixes of duplicate words in comments.
167 2015-05-27 Doug Rupp <rupp@adacore.com>
169 * adaint.c (__gnat_tmp_name) [vxworks]: Robustify and use for rtp as
172 2015-05-27 Pierre-Marie de Rodat <derodat@adacore.com>
174 * par_sco.adb (Process_Decision): Store sloc to
175 condition/pragmas SCOs associations into a temporary table before
176 moving them to the SCO_Raw_Hash_Table so that we can back them
177 out just like we do for SCO entries that are simple decisions
178 in an expression context.
180 2015-05-27 Ed Schonberg <schonberg@adacore.com>
182 * sem_ch6.adb (Process_Formals): A non-private formal type that
183 is a limited view does not have a list of private dependents.
185 2015-05-27 Ed Schonberg <schonberg@adacore.com>
187 * exp_ch5.adb (Expand_N_Case_Statement): If the expression in
188 the case statement is a compile-time known value, we look for a
189 corresponding alternative to optimize the case statement into a
190 single case. If the type has a static predicate and the expression
191 does not satisfy the predicate, there is no legal alternative and
192 this optimization is not applicable. Excecution is erroneous,
193 or else if assertions are enabled, an exception will be raised
194 earlier, at the point the expression is elaborated.
196 2015-05-27 Robert Dewar <dewar@adacore.com>
198 * sem_elab.adb (Check_Internal_Call_Continue): Suppress
199 warning on Finalize, Adjust, or Initialize if type involved has
202 2015-05-27 Ed Schonberg <schonberg@adacore.com>
204 * sem_aux.adb, sem_aux.ads (First_Discriminant): Return empty when
205 applied to a type with no known discriminants.
207 2015-05-26 Robert Dewar <dewar@adacore.com>
209 * errout.ads, sem_ch4.adb, sem_ch6.adb: Minor reformatting.
211 2015-05-26 Bob Duff <duff@adacore.com>
213 * sem_elab.adb (Check_A_Call): In the case where we're
214 calling something in an instance of a generic package that is
215 within this same unit (as the call), make sure we treat it
216 as a call to an entity within the same unit. That is, call
217 Check_Internal_Call, rather than putting "Elaborate_All(X)"
218 on X, which would necessarily result in an elaboration cycle in
219 static-elaboration mode.
221 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
223 * freeze.ads (Is_Atomic_VFA_Aggregate): Adjust profile.
224 * freeze.adb (Is_Atomic_VFA_Aggregate): Change Entity
225 parameter into Node parameter and remove Type parameter.
226 Look at Is_Atomic_Or_VFA both on the type and on the object.
227 (Freeze_Entity): Adjust call to Is_Atomic_VFA_Aggregate.
228 * exp_aggr.adb (Expand_Record_Aggregate): Likewise.
229 (Process_Atomic_Independent_Shared_Volatile): Remove code
230 propagating Atomic or VFA from object to locally-defined type.
232 2015-05-26 Bob Duff <duff@adacore.com>
234 * exp_ch7.adb: Minor comment fix.
236 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
238 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Min/Attr_Max>: Do not
239 bother about NaN's if Machine_Overflows is true.
241 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
243 * gcc-interface/trans.c (gnat_to_gnu) <N_Object_Declaration>: Really
244 force evaluation of the expression, if any, when the object has its
245 elaboration delayed. Do not create a variable at global level.
247 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
249 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Machine>: Do not apply
250 extra-precision trick to literals. Build SAVE_EXPR manually.
252 * gcc-interface/misc.c (enumerate_modes): Add bypass for x86/x86-64.
254 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
256 * gcc-interface/ada-tree.h (DECL_GLOBAL_NONCONSTANT_RENAMING_P): Delete
257 (DECL_RENAMED_OBJECT): Adjust comment.
258 * gcc-interface/gigi.h (record_global_nonconstant_renaming): Delete.
259 (invalidate_global_nonconstant_renamings): Likewise.
260 (gnat_constant_reference_p): Likewise.
261 (rewrite_fn): New function type.
262 (gnat_rewrite_reference): Declare.
263 (call_is_atomic_load): New inline predicate.
264 * gcc-interface/decl.c (elaborate_reference_1): New function.
265 (elaborate_reference): Likewise.
266 (gnat_to_gnu_entity): Call elaborate_reference to elaborate renamings
267 and simplify associated code. Set const_flag to true consistently in
268 conjunction with used_by_ref.
269 * gcc-interface/trans.c (Identifier_to_gnu): Always replace renaming
270 pointers by renamed objects.
271 (outer_atomic_access_required_p): Deal with renamings.
272 (Compilation_Unit_to_gnu): Do not call
273 invalidate_global_nonconstant_renamings.
274 (gnat_to_gnu) <N_Object_Renaming_Declaration>: Adjust comment.
275 (gnat_gimplify_expr): Deal with atomic loads.
276 * gcc-interface/utils.c (global_nonconstant_renamings): Delete.
277 (destroy_gnat_utils): Do not call
278 invalidate_global_nonconstant_renamings.
279 (record_global_nonconstant_renaming): Delete.
280 (invalidate_global_nonconstant_renamings): Likewise.
281 * gcc-interface/utils2.c (call_is_atomic_load): Move to gigi.h.
282 (build_load_modify_store): Build a copy of the destination.
283 (gnat_stabilize_reference_1): Adjust.
284 (gnat_stabilize_reference): Call gnat_stabilize_reference_1 through
285 gnat_rewrite_reference and move bulk of code to...
286 (gnat_rewrite_reference): ...here. New global function.
287 (gnat_constant_reference_p): Delete.
289 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
291 * gcc-interface/gigi.h (gnat_stabilize_reference): Adjust prototype.
292 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not rely on const_flag
293 to detect constant renamings. Be prepared for specific pattern of
294 renamed object based on function calls. Create a constant object
295 for the renaming of a NULL_EXPR or of a CONSTRUCTOR. Adjust calls
296 to gnat_stabilize_reference and tidy up. Remove redundant tests.
297 (elaborate_expression_1): Remove obsolete test and tidy up.
298 * gcc-interface/trans.c (Call_to_gnu): Do not stabilize In/Out or Out
299 parameters passed by reference.
300 (gnat_to_gnu) <N_Selected_Component>: Remove redundant protection again
302 Use gnat_protect_expr instead of gnat_stabilize_reference for general
303 protection against side-effects.
304 * gcc-interface/utils2.c (gnat_stable_expr_p): New predicate.
305 (gnat_save_expr): Invoke it.
306 (gnat_protect_expr): Likewise.
307 (gnat_stabilize_reference_1): Likewise. Remove useless propagation
309 (gnat_stabilize_reference): Remove parameter and adjust throughout.
310 Delete ADDR_EXDR, COMPOUND_EXPR and CONSTRUCTOR cases.
311 Restrict CALL_EXPR case to atomic loads and tweak ERROR_MARK case.
313 2015-05-26 Ed Schonberg <schonberg@adacore.com>
315 * sinfo.ads: Minor reformatting.
316 * sem_aux.ads: Clarify use of First_Discriminant.
317 * sem_ch4.adb (Analyze_Explicit_Dereference): The use of a limited
318 view is replaced with the non-limited view in an instance body,
319 where the enclosing unit must have a regular with_clause on the
321 * sem_ch12.adb (Install_Body): Freeze instantation after its
322 body. Remove useless freeze nodes for incomplete actuals to
323 prevent multiple generation of internal operations.
324 (Instantiate_Package_Body): Set sloc of body appropriately when
325 there are incomplete actuals and the instance body is placed in
326 the body of the enclosing unit.
327 * errout.ads: Consistent punctuation, better alignment and trivial
329 * err_vars.ads: Fix typo.
331 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
333 * sem_ch8.adb (Analyze_Object_Renaming): Lift restriction on
334 components of Volatile_Full_Access objects.
336 2015-05-26 Ed Schonberg <schonberg@adacore.com>
338 * sem_ch6.adb (Is_Non_Overriding_Operation,
339 Get_Generic_Parent_Type): Handle properly the case of a derived
340 scalar type by using the first subtype rather than its generated
343 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
345 * einfo.adb (Write_Field17_Name): Move E_Incomplete_Subtype
347 (Write_Field19_Name): ...here.
349 2015-05-26 Ed Schonberg <schonberg@adacore.com>
351 * sem_ch13.adb: sem_ch13.adb (Add_Predicates): Undo analysis
352 of original expression in ASIS mode: does not solve the ASIS
353 problem of a usable type information, and crashes the back-end
354 when performing type annotations.
356 2015-05-26 Robert Dewar <dewar@adacore.com>
358 * sem_disp.adb (Inherited_Subprograms): Add One_Only parameter.
359 (Is_Overriding_Subprogram): Use One_Only_Parameter.
360 * sem_disp.ads (Inherited_Subprograms): Add One_Only parameter.
362 2015-05-26 Robert Dewar <dewar@adacore.com>
364 * exp_prag.adb, sem_ch3.adb, sem_ch5.adb, exp_ch11.adb, ghost.adb,
365 exp_ch6.adb, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb, sem_ch13.adb,
366 exp_ch3.adb: Minor reformatting.
368 2015-05-26 Bob Duff <duff@adacore.com>
370 * treepr.adb: Minor improvement to debugging routines (pp, pn)
371 robustness. Rearrange the code so passing a nonexistent Node_Id
372 prints "No such node" rather than crashing, and causing gdb to
373 generate confusing messages.
375 2015-05-26 Gary Dismukes <dismukes@adacore.com>
377 * sem_util.adb: Minor typo fix.
379 2015-05-26 Yannick Moy <moy@adacore.com>
381 * sem_aux.adb (Subprogram_Body_Entity): Deal with subprogram stubs.
383 2015-05-26 Hristian Kirtchev <kirtchev@adacore.com>
385 * exp_ch3.adb (Expand_N_Full_Type_Declaration): Capture, set and
386 restore the Ghost mode.
387 (Expand_N_Object_Declaration): Capture, set and restore the Ghost mode.
388 (Freeze_Type): Update the call to Set_Ghost_Mode.
389 (Restore_Globals): New routine.
390 * exp_ch5.adb Add with and use clauses for Ghost.
391 (Expand_N_Assignment_Statement): Capture, set and restore the
393 (Restore_Globals): New routine.
394 * exp_ch6.adb Add with and use clauses for Ghost.
395 (Expand_N_Procedure_Call_Statement): Capture, set and
396 restore the Ghost mode.
397 (Expand_N_Subprogram_Body):
398 Code cleanup. Capture, set and restore the Ghost mode.
399 (Expand_N_Subprogram_Declaration): Capture, set and restore the
401 (Restore_Globals): New routine.
402 * exp_ch7.adb Add with and use clauses for Ghost.
403 (Expand_N_Package_Body): Capture, set and restore the Ghost mode.
404 (Expand_N_Package_Declaration): Capture, set and restore the
406 (Wrap_HSS_In_Block): Create a proper identifier for the block.
407 * exp_ch8.adb Add with and use clauses for Ghost.
408 (Expand_N_Exception_Renaming_Declaration): Code
409 cleanup. Capture, set and restore the Ghost mode.
410 (Expand_N_Object_Renaming_Declaration): Capture, set and restore
412 (Expand_N_Package_Renaming_Declaration): Capture, set and restore the
414 (Expand_N_Subprogram_Renaming_Declaration): Capture, set and
415 restore the Ghost mode.
416 * exp_ch11.adb (Expand_N_Exception_Declaration): Code
417 cleanup. Capture, set and restore the Ghost mode.
418 * exp_disp.adb (Make_DT): Update the call to Set_Ghost_Mode. Do
419 not initialize the dispatch table slot of a Ghost subprogram.
420 * exp_prag.adb Add with and use clauses for Ghost.
421 (Expand_Pragma_Check): Capture, set and restore the Ghost mode.
422 (Expand_Pragma_Contract_Cases): Capture, set and restore the
424 (Expand_Pragma_Initial_Condition): Capture, set and
425 restore the Ghost mode.
426 (Expand_Pragma_Loop_Variant): Capture,
427 set and restore the Ghost mode.
428 (Restore_Globals): New routine.
429 * exp_util.adb Add with and use clauses for Ghost.
430 (Make_Predicate_Call): Code cleanup. Capture, set and restore
432 (Restore_Globals): New routine.
433 * freeze.adb (Freeze_Entity): Code cleanup. Update the call
435 * ghost.adb Add with and use clause for Sem_Prag.
436 (Check_Ghost_Completion): Code cleanup.
437 (Check_Ghost_Overriding): New routine.
438 (Check_Ghost_Policy): Code cleanup.
439 (Ghost_Entity): New routine.
440 (Is_Ghost_Declaration): Removed.
441 (Is_Ghost_Statement_Or_Pragma): Removed.
442 (Is_OK_Context): Reimplemented.
443 (Is_OK_Declaration): New routine.
444 (Is_OK_Pragma): New routine.
445 (Is_OK_Statement): New routine.
446 (Mark_Full_View_As_Ghost): New routine.
447 (Mark_Pragma_As_Ghost): New routine.
448 (Mark_Renaming_As_Ghost): New routine.
449 (Propagate_Ignored_Ghost_Code): Update the comment on usage.
450 (Set_From_Entity): New routine.
451 (Set_From_Policy): New routine.
452 (Set_Ghost_Mode): This routine now handles pragmas and freeze nodes.
453 (Set_Ghost_Mode_For_Freeze): Removed.
454 (Set_Ghost_Mode_From_Entity): New routine.
455 (Set_Ghost_Mode_From_Policy): Removed.
456 * ghost.ads (Check_Ghost_Overriding): New routine.
457 (Mark_Full_View_As_Ghost): New routine.
458 (Mark_Pragma_As_Ghost): New routine.
459 (Mark_Renaming_As_Ghost): New routine.
460 (Set_Ghost_Mode): Update the parameter profile. Update the
462 (Set_Ghost_Mode_For_Freeze): Removed.
463 (Set_Ghost_Mode_From_Entity): New routine.
464 * sem_ch3.adb (Analyze_Full_Type_Declaration):
465 Capture and restore the Ghost mode. Mark a type
466 as Ghost regardless of whether it comes from source.
467 (Analyze_Incomplete_Type_Decl): Capture, set and restore the
469 (Analyze_Number_Declaration): Capture and restore the Ghost mode.
470 (Analyze_Object_Declaration): Capture and restore the Ghost mode.
471 (Analyze_Private_Extension_Declaration): Capture and
472 restore the Ghost mode.
473 (Analyze_Subtype_Declaration): Capture and restore the Ghost mode.
474 (Process_Full_View): The full view inherits all Ghost-related
475 attributes from the private view.
476 (Restore_Globals): New routine.
477 * sem_ch5.adb (Analyze_Assignment): Capture and restore the
479 (Restore_Globals): New routine.
480 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration):
481 Code cleanup. Capture and restore the Ghost mode. Mark a
482 subprogram as Ghost regarless of whether it comes from source.
483 (Analyze_Procedure_Call): Capture and restore the Ghost mode.
484 (Analyze_Subprogram_Body_Helper): Capture and restore the Ghost mode.
485 (Analyze_Subprogram_Declaration): Capture and restore the Ghost mode.
486 (New_Overloaded_Entity): Ensure that a
487 parent subprogram and an overriding subprogram have compatible
489 * sem_ch7.adb (Analyze_Package_Body_Helper): Capture and restore
491 (Analyze_Package_Declaration): Capture and
492 restore the Ghost mode. Mark a package as Ghost when it is
493 declared in a Ghost region.
494 (Analyze_Private_Type_Declaration): Capture and restore the Ghost mode.
495 (Restore_Globals): New routine.
496 * sem_ch8.adb (Analyze_Exception_Renaming): Code
497 reformatting. Capture and restore the Ghost mode. A renaming
498 becomes Ghost when its name references a Ghost entity.
499 (Analyze_Generic_Renaming): Capture and restore the Ghost mode. A
500 renaming becomes Ghost when its name references a Ghost entity.
501 (Analyze_Object_Renaming): Capture and restore the Ghost mode. A
502 renaming becomes Ghost when its name references a Ghost entity.
503 (Analyze_Package_Renaming): Capture and restore the Ghost mode. A
504 renaming becomes Ghost when its name references a Ghost entity.
505 (Analyze_Subprogram_Renaming): Capture and restore the Ghost
506 mode. A renaming becomes Ghost when its name references a
508 * sem_ch11.adb (Analyze_Exception_Declaration): Capture, set
509 and restore the Ghost mode.
510 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Capture and
511 restore the Ghost mode.
512 (Analyze_Generic_Subprogram_Declaration):
513 Capture and restore the Ghost mode.
514 * sem_ch13.adb Add with and use clauses for Ghost.
515 (Add_Invariant): New routine.
516 (Add_Invariants): Factor out code.
517 (Add_Predicate): New routine.
518 (Add_Predicates): Factor out code.
519 (Build_Invariant_Procedure_Declaration): Code cleanup. Capture,
520 set and restore the Ghost mode.
521 (Build_Invariant_Procedure): Code cleanup.
522 (Build_Predicate_Functions): Capture, set and
523 restore the Ghost mode. Mark the generated functions as Ghost.
524 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
525 Capture, set and restore the Ghost mode.
526 (Analyze_External_Property_In_Decl_Part): Capture, set and restore
528 (Analyze_Initial_Condition_In_Decl_Part):
529 Capture, set and restore the Ghost mode.
531 Code cleanup. Capture, set and restore the Ghost mode. Flag
532 pragmas Linker_Section, No_Return, Unmodified, Unreferenced and
533 Unreferenced_Objects as illegal when it applies to both Ghost
534 and living arguments. Pragma Ghost cannot apply to synchronized
536 (Check_Kind): Moved to the spec of Sem_Prag.
537 (Process_Inline): Flag the pragma as illegal when it applies to
538 both Ghost and living arguments.
539 (Restore_Globals): New routine.
540 * sem_prag.ads Add pragma Default_Initial_Condition
541 to table Assertion_Expression_Pragma. Add new table
542 Is_Aspect_Specifying_Pragma.
543 (Check_Kind): Moved from body of Sem_Prag.
544 * sem_util.adb Add with and use clauses for Ghost.
545 (Build_Default_Init_Cond_Procedure_Body): Capture, set and restore
547 (Build_Default_Init_Cond_Procedure_Declaration):
548 Capture, set and restore the Ghost mode. Mark the default
549 initial condition procedure as Ghost when it is declared
551 (Is_Renaming_Declaration): New routine.
552 (Policy_In_List): Account for the single argument version of
554 * sem_util.ads (Is_Renaming_Declaration): New routine.
555 * sinfo.adb (Is_Ghost_Pragma): New routine.
556 (Set_Is_Ghost_Pragma): New routine.
557 * sinfo.ads New attribute Is_Ghost_Pragma.
558 (Is_Ghost_Pragma): New routine along with pragma Inline.
559 (Set_Is_Ghost_Pragma): New routine along with pragma Inline.
561 2015-05-26 Robert Dewar <dewar@adacore.com>
563 * sem_ch3.adb, sem_aux.adb, sem_aux.ads, exp_ch6.adb, sprint.adb:
566 2015-05-26 Gary Dismukes <dismukes@adacore.com>
568 * gnat1drv.adb, targparm.adb, targparm.ads, restrict.adb: Minor
569 reformatting and typo fixes in comments.
571 2015-05-26 Ed Schonberg <schonberg@adacore.com>
573 * sem_ch7.adb (Swap_Private_Dependets): Set visibility of
574 the two views of a private dependent in two separate steps,
575 to ensure proper visibility in parent units analyzed for inlining.
577 2015-05-26 Yannick Moy <moy@adacore.com>
579 * sem_aux.adb, sem_aux.ads (Get_Low_Bound): Use Type_Low_Bound.
580 (Package_Body, Package_Spec): New queries moved
582 (Package_Specification): Simplify query to remove use of loop.
583 * sem_util.adb, sem_util.ads (Enclosing_Declaration,
584 Enclosing_Package_Or_Subprogram, Is_Attribute_Update): New
585 queries moved here from GNATprove.
587 2015-05-26 Bob Duff <duff@adacore.com>
589 * einfo.adb, einfo.ads, sprint.adb, lib-xref.ads: Minor cleanup: Remove
590 obsolete Entity_Kinds E_String_Type and E_String_Subtype. Update
591 redundant assertions.
593 2015-05-26 Gary Dismukes <dismukes@adacore.com>
595 * sem_util.adb, sem_util.ads, sem_ch13.adb: Minor typo fixes.
597 2015-05-26 Doug Rupp <rupp@adacore.com>
599 * init.c [vxworks]: Refine previous checkin.
601 2015-05-26 Robert Dewar <dewar@adacore.com>
603 * exp_ch4.adb (Wrap_MA): New function.
604 (Expand_N_Op_Expon): Use Wrap_MA.
606 2015-05-26 Bob Duff <duff@adacore.com>
608 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
609 Do not use secondary stack to return limited records with
610 defaulted discriminants. This is an efficiency improvement.
611 * exp_ch6.adb, exp_dist.adb, sem_attr.adb, sem_aux.adb, sem_aux.ads,
612 sem_ch12.adb, sem_ch3.adb, sem_ch4.adb, sem_ch6.adb, sem_ch7.adb,
613 sem_util.adb: Change the sense of Is_Indefinite_Subtype to be
614 Is_Definite_Subtype. This is an improvement to readability (the double
615 negative in "not Is_Indefinite_Subtype" was slightly confusing). Also
616 disallow passing non-[sub]type entities, an unnecessary and slightly
617 bug-prone flexibility.
619 2015-05-26 Robert Dewar <dewar@adacore.com>
621 * sem_aggr.adb (Resolve_Array_Aggregate): Defend against
623 * debug.adb: Document -gnatd.k.
624 * erroutc.adb (Set_Msg_Insertion_Line_Number): Implement -gnatd.k.
626 2015-05-26 Robert Dewar <dewar@adacore.com>
628 * gnat1drv.adb (Gnat1drv): Provide new arguments for
629 Get_Target_Parameters.
630 * restrict.adb (Set_Restriction_No_Specification_Of_Aspect):
632 (Set_Restriction_No_Use_Of_Attribute): new procedure.
633 * restrict.ads (Set_Restriction_No_Specification_Of_Aspect):
635 (Set_Restriction_No_Use_Of_Attribute): new procedure.
636 * s-rident.ads (Integer_Parameter_Restrictions): New subtype.
637 * targparm.adb (Get_Target_Parameters): Allow new restriction
638 pragmas No_Specification_Of_Aspect No_Use_Of_Attribute
640 * targparm.ads: New parameters for Get_Target_Parameters.
641 * tbuild.adb (Set_NOD): New name for Set_RND.
642 (Set_NSA): New procedure.
643 (Set_NUA): New procedure.
644 (Set_NUP): New procedure.
645 * tbuild.ads (Make_SC): Minor reformatting.
646 (Set_NOD): New name for Set_RND.
647 (Set_NSA, Set_NUA, Set_NUP): New procedure.
649 2015-05-26 Ed Schonberg <schonberg@adacore.com>
651 * a-stwise.adb (Find_Token): If source'first is not positive,
652 an exception must be raised, as specified by RM 2005 A.4.3
653 (68/1). This must be checked explicitly, given that run-time
654 files are normally compiled without constraint checks.
655 * a-stzsea.adb (Find_Token): Ditto.
657 2015-05-26 Ed Schonberg <schonberg@adacore.com>
659 * sem_util.ads sem_util.adb (Is_Current_Instance): New predicate
660 to fully implement RM 8.6 (17/3). which earlier only applied
661 to synchronized types. Used to preanalyze aspects that include
662 current instances of types, such as Predicate and Invariant.
663 * sem_res.adb (Resolve_Entity_Name): Use Is_Current_Instance.
664 * sem_ch13.adb (Add_Predicates): In ASIS mode, preserve original
665 expression of aspect and analyze it to provide proper type
668 2015-05-26 Robert Dewar <dewar@adacore.com>
670 * rtsfind.ads: Add entries for RE_Exn[_Long]_Float.
671 * s-exnllf.adb (Exn_Float): New function.
672 (Exn_Long_Float): New function.
673 (Exn_Long_Long_Float): Rewritten interface.
674 (Exp): New name for what used to be Exn_Long_Long_Float.
675 * s-exnllf.ads (Exn_Float): New function.
676 (Exn_Long_Float): New function.
678 2015-05-26 Ed Schonberg <schonberg@adacore.com>
680 * sem_ch8.adb (Find_Selected_Component): Do not emit an error
681 on a selected component when the prefix is a type name that is
683 * einfo.ads: Minor grammar fix.
685 2015-05-26 Doug Rupp <rupp@adacore.com>
687 * init.c [vxworks] (sysLib.h): Only for x86.
689 2015-05-26 Doug Rupp <rupp@adacore.com>
691 * init-vxsim.c (CPU): define as __VXSIM_CPU__
692 * sigtramp-vxworks-vxsim.c (CPU): Likewise.
693 sigtramp-vxworks-target.inc: Add check for SIMLINUX.
694 * sigtramp.h: Likewise.
696 2015-05-26 Robert Dewar <dewar@adacore.com>
698 * sem_aux.adb, sem_disp.adb, sem_util.ads: Add comment.
699 * sem_util.adb: Minor reformatting
701 2015-05-26 Yannick Moy <moy@adacore.com>
703 * inline.adb (Has_Initialized_Type): Adapt to new names.
704 * sem_aux.adb, sem_aux.ads (Get_Low_Bound, Number_Components,
705 Subprogram_Body, Subprogram_Body_Entity, Subprogram_Spec,
706 Subprogram_Specification): New query functions used in GNATprove.
707 * sem_disp.adb, sem_disp.ads (Is_Overriding_Subprogram): New
708 query functions used in GNATprove.
709 * sem_util.adb, sem_util.adso (Enclosing_Lib_Unit_Node,
710 Get_Cursor_Type, Get_Return_Object, Get_User_Defined_Eq,
711 Is_Double_Precision_Floating_Point_Type,
712 Is_Single_Precision_Floating_Point_Type): New query functions
715 2015-05-26 Bob Duff <duff@adacore.com>
717 * s-rpc.ads (Partition_ID): Increase maximum Partition_ID to
719 * a-except-2005.adb, a-except-2005.ads, a-except.adb,
720 a-except.ads, a-exexda.adb, a-exstat.adb: Minor comment fixes.
722 2015-05-26 Robert Dewar <dewar@adacore.com>
724 * sinfo.adb: Minor comment addition.
725 * einfo.adb: Minor whitespace and punctuation fix.
726 * sem_util.adb: Minor editing of comments.
728 2015-05-26 Ed Schonberg <schonberg@adacore.com>
730 * sem_ch7.adb (Install_Private_Declarations,
731 Swap_Private_Dependents): Ensure that both views of the dependent
732 subtype are immediately visible if we are within their scope. This
733 may be needed when a procedure body is both the parent of an
734 instantiated child unit, and is itself used to inline a local
737 2015-05-26 Gary Dismukes <dismukes@adacore.com>
739 * exp_prag.adb, gnat1drv.adb: Minor reformatting.
741 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
743 * exp_ch4.adb (Expand_N_Indexed_Component): In the circuit
744 detecting exceptions to the rewriting, deal with implicit
745 dereferences in the selected component case.
747 2015-05-26 Bob Duff <duff@adacore.com>
749 * sem_ch13.adb (Analyze_One_Aspect): Do not
750 require the expression of the Disable_Controlled aspect to be
751 static in a generic template, because 'Enabled is not known
754 2015-05-26 Doug Rupp <rupp@adacore.com>
756 * init-vxsim.c: New file for vxsim ZCX
757 * sigtramp-vxworks-vxsim.c: Likewise.
758 * sigtramp-vxworks.c: Factor out target dependent bits into ...
759 * sigtramp-vxworks-target.inc: ... here.
760 * sigtramp.h: Add vxsim zcx protos.
761 * init.c [vxworks...] (sysLib.h): Include.
762 (__gnat_map_signal): Make global.
763 [...i386] (__gnat_error_handler): Call __gnat_vxsim_error_handler if
765 [...i386] (__gnat_install_handler): Test if on vxsim.
767 2015-05-26 Ed Schonberg <schonberg@adacore.com>
769 * sem_ch5.adb (Analyze_Iterator_Specification): For an element
770 iterator over an array, if the component is aliased, the loop
771 variable is aliased as well.
773 2015-05-26 Ed Schonberg <schonberg@adacore.com>
775 * exp_ch6.adb (Expand_Actuals): For a function call with in-out
776 parameters that is rewritten as an expression_with_actions,
777 we preserve the original function call node for further use by
778 the caller (typically Expand_Call). In the presence of validity
779 checks, that function call, though it is labelled Analyzed to
780 prevent an infinite recursion, may be rewritten as a temporary
781 by Remove_Side_Effects. Ensure that the caller has access to
782 the original function call to continue expansion.
783 * atree.ads: Minor typo in comment.
785 2015-05-26 Javier Miranda <miranda@adacore.com>
787 * sem_util.adb (Check_Function_Writable_Actuals):
788 Add missing support to check the violation of writable actuals
789 in array aggregates that have a nonstatic range.
791 2015-05-26 Hristian Kirtchev <kirtchev@adacore.com>
793 * exp_ch6.adb (Process_Contract_Cases_For): Update the call to
794 Expand_Pragma_Contract_Cases.
795 * exp_prag.ads, exp_prag.adb (Expand_Contract_Cases): Rename to
796 Expand_Pragma_Contract_Cases.
797 * sem_ch13.adb (Add_Invariants): Use the original aspect name
798 when creating the arguments of pragma Check. This ensures that
799 'Class is properly recognized and handled.
801 2015-05-26 Arnaud Charlet <charlet@adacore.com>
803 * gnat1drv.adb: Minor adjustments.
804 (Adjust_Global_Switches): Disable some related flags in CodePeer mode.
805 * sem_ch4.adb (Has_Arbitrary_Evaluation_Order,
806 Stop_Subtree_Climbind): Code cleanup.
807 * einfo.ads: Minor comment change.
809 2015-05-26 Javier Miranda <miranda@adacore.com>
811 * sem_aggr.adb (Resolve_Aggregate, Resolve_Extension_Aggregate):
813 * sem_ch3.adb (Build_Derived_Record_Type,
814 Record_Type_Declaration): Code cleanup.
815 * sem_ch4.adb (Has_Arbitrary_Evaluation_Order,
816 Stop_Subtree_Climbind): Tables which speed up the identification
817 of dangerous calls to Ada 2012 functions with writable actuals
819 (Analyze_Arithmetic_Op, Analyze_Call, Analyze_Comparison_Op,
820 Analyze_Equality_Op, Analyze_Logical_Op, Analyze_Membership_Op,
821 Analyze_Range): Code cleanup.
822 (Is_Arbitrary_Evaluation_Order_Construct): Removed.
823 (Check_Writable_Actuals): Code cleanup using the added tables.
824 * sem_util.adb (Check_Function_Writable_Actuals): Return
825 immediately if the node does not have the flag Check_Actuals
828 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
830 * exp_ch6.adb (Add_Call_By_Copy_Code): Remove restrictive
831 condition in the detection of the effects of Remove_Side_Effects.
832 * exp_util.ads (Remove_Side_Effects): Add general and historical note.
833 * exp_util.adb (Is_Name_Reference): New predicate.
834 (Remove_Side_Effects): Use it in lieu of Is_Object_Reference
835 in order to decide whether to use the renaming to capture the
836 side effects of the subexpression.
837 (Side_Effect_Free): Remove obsolete test.
839 2015-05-26 Robert Dewar <dewar@adacore.com>
841 * aspects.ads, aspects.adb: Add aspect Disable_Controlled.
842 * einfo.ads, einfo.adb (Disable_Controlled): New flag.
843 (Is_Controlled_Active): New function.
844 * exp_ch3.adb (Expand_Freeze_Record_Type): Use
845 Is_Controlled_Active.
846 * exp_util.adb (Needs_Finalization): Finalization not needed
847 if Disable_Controlled set.
848 * freeze.adb (Freeze_Array_Type): Do not set
849 Has_Controlled_Component if the component has Disable_Controlled.
850 (Freeze_Record_Type): ditto.
851 * sem_ch13.adb (Decorate): Minor reformatting.
852 (Analyze_Aspect_Specifications): Implement Disable_Controlled.
853 * sem_ch3.adb (Analyze_Object_Declaration): Handle
855 (Array_Type_Declaration): ditto.
856 (Build_Derived_Private_Type): ditto.
857 (Build_Derived_Type): ditto.
858 (Record_Type_Definition): ditto.
859 * snames.ads-tmpl: Add Name_Disable_Controlled.
861 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
863 * exp_ch6.adb (Expand_Actuals): Use a constant declaration instead
864 of a renaming to capture the return value of a function call.
865 (Expand_Simple_Function_Return): Call Remove_Side_Effects
866 instead of removing side effects manually before the call to
869 2015-05-26 Robert Dewar <dewar@adacore.com>
871 * exp_ch4.adb (Expand_N_Op_Expon): Deal with problem of wrong
872 order in calling Duplicate_Subexpr.
873 * einfo.ads: Fix documentation of Object/Value size for scalar types.
875 2015-05-26 Ed Schonberg <schonberg@adacore.com>
877 * exp_aggr.adb (Build_Array_Aggr_Code, Gen_Assign):
878 If a component is default-initialized and its type has an
879 invariant procedure, insert an invariant test after code for
880 default-initialization of the component.
882 2015-05-26 Gary Dismukes <dismukes@adacore.com>
884 * einfo.ads, sem_util.adb, sem_ch4.adb: Minor reformatting.
886 2015-05-26 Robert Dewar <dewar@adacore.com>
888 * exp_unst.adb, exp_unst.ads: Change to using Subps table index for
889 making AREC entity names unique.
891 2015-05-26 Ed Schonberg <schonberg@adacore.com>
893 * sem_cat.adb (Has_Stream_Attribute_Definition): If the type
894 has aspect specifications, examine the corresponding list of
895 representation items to determine whether there is a visible
896 stream operation. The attribute definition clause generated from
897 the aspect will be inserted at the freeze point of the type,
898 which may be in the private part and not directly visible,
899 but the aspect makes the operation available to a client.
901 2015-05-26 Robert Dewar <dewar@adacore.com>
903 * sem_util.adb: Minor code reorganization.
904 * sem_ch6.adb: Minor reformatting.
906 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
908 * gcc-interface/utils.c (maybe_pad_type): Do not apply adjustment to
909 original size for elementary types before issuing the size warning.
911 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
913 * get_targ.adb (C_Get_Float_Words_BE): Adjust import name.
914 (C_Get_Words_BE): Likewise.
915 (C_Get_Bytes_BE): Likewise.
916 (C_Get_Bits_BE): Likewise.
917 (Width_From_Size): Remove superfluous space.
918 * gcc-interface/targtyps.c (get_float_words_be): Rename into...
919 (get_target_float_words_be): ...this.
920 (get_words_be): Rename into...
921 (get_target_words_be): ...this.
922 (get_bytes_be): Rename into...
923 (get_target_bytes_be): ...this.
924 (get_bits_be): Rename into...
925 (get_target_bits_be): ...this.
926 * gcc-interface/gigi.h (standard_datatypes): Remove ADT_ptr_void_type.
927 (ptr_void_type_node): Delete.
928 (get_target_float_size): Likewise.
929 (get_target_double_size): Likewise.
930 (get_target_long_double_size): Likewise.
931 (get_float_words_be): Likewise.
932 (get_words_be): Likewise.
933 (get_bytes_be): Likewise.
934 (get_bits_be): Likewise.
935 (get_target_float_words_be): Declare.
936 (get_target_words_be): Likewise.
937 (get_target_bytes_be): Likewise.
938 (get_target_bits_be): Likewise.
939 * gcc-interface/decl.c (gnat_to_gnu_entity): Replace ptr_void_type_node
941 (intrin_return_compatible_p): Likewise.
942 * gcc-interface/trans.c (gigi): Likewise.
943 * gcc-interface/utils2.c (maybe_wrap_malloc): Likewise.
944 (maybe_wrap_free): Likewise.
945 * gcc-interface/utils.c (maybe_pad_type): Remove superfluous space.
946 * gcc-interface/misc.c (gnat_init): Do not set ptr_void_type_node.
948 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
950 * gcc-interface/decl.c (elaborate_expression): Take a const string
951 suffix instead of a tree.
952 (elaborate_expression_1): Likewise.
953 (elaborate_expression_2): Likewise.
954 (gnat_to_gnu_entity): Adjust to above changes.
955 (build_subst_list): Likewise.
956 (get_entity_char): New static function.
958 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
960 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: Move around.
961 <E_Exception>: Merge with E_Variable case.
962 <E_Variable>: Remove 'object' label.
964 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
966 * gcc-interface/decl.c (gnat_to_gnu_entity): Minor tweak.
967 * gcc-interface/trans.c (finalize_nrv_unc_r): Use CONSTRUCTOR_ELT.
968 * gcc-interface/utils.c (convert): Likewise and simplify.
969 (remove_conversions): Likewise.
970 * gcc-interface/utils2.c (compare_fat_pointers): Likewise.
971 (build_unary_op): Likewise and simplify.
973 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
975 * gcc-interface/gigi.h (build_atomic_load): Adjust prototype.
976 (build_atomic_store): Likewise.
977 (build_load_modify_store): Declare.
978 (VECTOR_TYPE_P): Delete.
979 * gcc-interface/decl.c (gnat_to_gnu_entity): Replace Is_Atomic with
980 Is_Atomic_Or_VFA throughout.
981 <E_Array_Type>: Build a variant of the XUA type instead of forcing
983 <E_Array_Subtype>: Use the main variant of the base type.
984 Do not force TYPE_VOLATILE on the type being built.
985 <E_Record_Type>: Likewise.
986 <E_Array_Subtype>: Likewise.
987 <E_Subprogram_Type>: Rename local variable.
988 Add Atomic qualifier in conjunction with Volatile on types if needed.
989 Force BLKmode for by-ref types only at the end of the processing.
990 Change qualifiers only after changing the mode of the type. Set
991 TYPE_UNIVERSAL_ALIASING_P on the type directly.
992 (check_ok_for_atomic_type): Issue specific error message for VFA.
993 (gnat_to_gnu_component_type): Replace Is_Atomic with
994 Is_Atomic_Or_VFA throughout.
995 * gcc-interface/misc.c (gnat_get_alias_set): Test
996 TYPE_UNIVERSAL_ALIASING_P on the type directly.
997 * gcc-interface/trans.c (lvalue_required_p): Replace Is_Atomic with
998 Is_Atomic_Or_VFA throughout. Add missing guard.
999 (node_is_atomic): New predicate.
1000 (node_has_volatile_full_access): Likewise.
1001 (gnat_strip_type_conversion): New function.
1002 (outer_atomic_access_required_p): New predicate.
1003 (atomic_sync_required_p): Rename into...
1004 (atomic_access_required_p): ...this. Add SYNC parameter, scan the
1005 parent node first and then look for the atomic setting. Add support
1006 for Volatile_Full_Access.
1007 (Call_to_gnu): Add atomic_access and outer_atomic_access parameters
1008 and adjusts calls to above functions. Use load-modify-store sequence
1009 for updates of In/Out and Out parameters if required, as well as for
1010 moving the result to the target if required. Add couple of missing
1012 (gnat_to_gnu): Adjust calls to above functions.
1013 <N_Object_Renaming_Declaration>: If the renamed object has side-effects
1014 evaluate only its address.
1015 <N_Assignment_Statement>: Adjust call to Call_to_gnu. Use load-modify
1016 store sequence if required.
1017 <N_Function_Call>: Adjust call to Call_to_gnu.
1018 (extract_values): Adjust comment.
1019 * gcc-interface/utils2.c (build_atomic_load): Add SYNC parameter and
1020 use relaxed memory model if it is not set.
1021 (build_atomic_store): Likewise.
1022 (call_is_atomic_load): New predicate.
1023 (build_load_modify_store): New function.
1024 (build_binary_op) <MODIFY_EXPR>: Accept SAVE_EXPR on the LHS.
1025 (gnat_stabilize_reference) <CALL_EXPR>: Deal with atomic loads.
1027 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
1029 * gcc-interface/ada-tree.h (DECL_RENAMING_GLOBAL_P): Rename into...
1030 (DECL_GLOBAL_NONCONSTANT_RENAMING_P): ...this.
1031 * gcc-interface/gigi.h (record_global_renaming_pointer): Delete.
1032 (invalidate_global_renaming_pointers): Likewise.
1033 (record_global_nonconstant_renaming): New.
1034 (invalidate_global_nonconstant_renamings): Likewise.
1035 (get_inner_constant_reference): Likewise.
1036 (gnat_constant_reference_p): Likewise.
1037 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Adjust to above
1038 and register the renaming pointer only if the object is non-constant.
1039 (elaborate_expression_1): Call get_inner_constant_reference instead
1040 of get_inner_reference.
1041 * gcc-interface/trans.c (fold_constant_decl_in_expr): Minor tweak.
1042 (Identifier_to_gnu): Adjust to above and do not recheck the renamed
1043 object before substituting it.
1044 (Compilation_Unit_to_gnu): Adjust to above renaming. Minor tweaks.
1045 (gnat_to_gnu) <N_Object_Renaming_Declaration>: Do not return the
1046 result at the global level.
1047 (N_Exception_Renaming_Declaration): Likewise.
1048 * gcc-interface/utils.c (global_renaming_pointers): Rename into...
1049 (global_nonconstant_renamings): ...this.
1050 (destroy_gnat_utils): Adjust to above renaming.
1051 (record_global_renaming_pointer): Rename into...
1052 (record_global_nonconstant_renaming): ...this.
1053 (invalidate_global_renaming_pointers): Rename into...
1054 (invalidate_global_nonconstant_renamings): ...this and do not recheck
1055 the renamed object before invalidating.
1056 * gcc-interface/utils2.c (gnat_stabilize_reference): Minor tweak.
1057 (get_inner_constant_reference): New public function.
1058 (gnat_constant_reference_p): New predicate.
1060 2015-05-25 Javier Miranda <miranda@adacore.com>
1062 * einfo.ads, einfo.adb (Has_Out_Or_In_Out_Parameter): This attribute
1063 is now present in subprograms, generic subprograms, entries and
1065 * sem_ch6.adb (Set_Formal_Mode): Set As_Out_Or_In_Out_Parameter
1066 on entries, entry families, subprograms and generic subprograms.
1067 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration):
1068 Minor code reorganization to ensure that the Ekind attribute
1069 of the subprogram entity is set before its formals are
1070 processed. Required to allow the use of the attribute
1071 Has_Out_Or_In_Out_Parameter on the subprogram entity.
1072 * sem_aggr.adb (Resolve_Aggregate, Resolve_Extension_Aggregate):
1073 Perform the check on writable actuals only if the value of some
1074 component of the aggregate involves calling a function with
1075 out-mode parameters.
1076 (Resolve_Record_Aggregate): Propagate the Check_Actuals flag to the
1077 internally built aggregate.
1078 * sem_ch3.adb (Build_Derived_Record_Type, Record_Type_Declaration):
1079 Perform the check on writable actuals only if the initialization of
1080 some component involves calling a function with out-mode parameters.
1081 * sem_ch4.adb (Analyze_Arithmetic_Op, Analyze_Comparison_Op,
1082 Analyze_Equality_Op, Analyze_Logical_Op, Analyze_Membership_Op,
1083 Analyze_Range): Check writable actuals only if the
1084 subtrees have a call to a function with out-mode parameters
1085 (Analyze_Call.Check_Writable_Actuals): New subprogram. If the call
1086 has out or in-out parameters then mark its outermost enclosing
1087 construct as a node on which the writable actuals check must
1089 (Analyze_Call): Check if the flag must be set and if the outermost
1090 enclosing construct.
1091 * sem_util.adb (Check_Function_Writable_Actuals): Code cleanup
1092 and reorganization. We skip processing aggregate discriminants
1093 since their precise analysis involves two phases traversal.
1094 * sem_res.adb (Resolve_Actuals, Resolve_Arithmetic_Op,
1095 Resolve_Logical_Op, Resolve_Membership_Op): Remove call to
1096 check_writable_actuals.
1098 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1100 * sem_ch3.adb (Constrain_Concurrent): If the context is a
1101 type declaration, generate an Itype_Reference for the anonymous
1102 subtype, to force elaboration at this point in gigi.
1104 2015-05-22 Gary Dismukes <dismukes@adacore.com>
1106 * layout.adb, einfo.ads, sem_ch12.adb, freeze.adb, sem_util.ads,
1107 exp_ch4.adb, sem_ch6.adb: Minor reformatting and typo fixes.
1109 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1111 * sem_res.adb (Resolve_Actuals): If the call is to an overridden
1112 operation, replace the names of the actuals in named associations
1113 with the names of the actuals of the subprogram that is eventually
1114 executed. The names of the formals and the defaults can differ
1115 between the two operations when they are operations of a formal
1118 2015-05-22 Bob Duff <duff@adacore.com>
1120 * a-convec.ads, a-convec.adb (Append): Check for fast path. Split
1121 out slow path into separate procedure. Inline Append. Fast path
1122 now avoids calling Insert.
1123 (Finalize): Do the busy checking last, so the container gets emptied.
1124 (Insert, Insert_Space): Remove redundancy.
1126 2015-05-22 Robert Dewar <dewar@adacore.com>
1128 * switch-c.adb (Scan_Front_End_Switches): Insist on -gnatc
1131 2015-05-22 Arnaud Charlet <charlet@adacore.com>
1133 * gnatvsn.ads: Minor code reorg to remember more easily to update
1136 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1138 * sem_ch10.adb (Analyze_With_Clause): In ASIS_Mode, a
1139 limited_with clause on a predefined unit is not transformed into
1140 a regular with_clause, to preserve the original tree structure.
1141 * sinfo.ads (N_With_Clause): Add comment on handling of
1143 * sem_ch10.adb: Minor reformatting.
1145 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1147 * sem_ch8.adb (Freeze_Profile): A limited view of a type in
1148 the profile of a subprogram renaming does not require freezing,
1149 because it is declared in a different unit.
1151 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1153 * exp_aggr.adb (Get_Constraint_Association): If type (of ancestor
1154 composite type) is private, go to full view. This was previously
1155 done only in an instance context, but is happen whenever a chain
1156 of private extensions includes one inherited discriminant.
1158 2015-05-22 Robert Dewar <dewar@adacore.com>
1160 * einfo.ads: Minor comment updates.
1161 * exp_unst.adb: Move Subps table to spec Don't remove old entries
1162 from table Add Last field to record last entry used.
1163 * exp_unst.ads: Move Subps table here from body So that Cprint
1164 can access saved values.
1166 2015-05-22 Bob Duff <duff@adacore.com>
1168 * a-cdlili.adb, a-cdlili.ads, a-cohama.adb, a-cohama.ads,
1169 * a-cohase.adb, a-cohase.ads, a-convec.adb, a-convec.ads,
1170 * a-coorma.adb, a-coorma.ads, a-coorse.adb, a-coorse.ads:
1171 (Pseudo_Reference, Element_Access, Get_Element_Access): New
1172 declarations added for use by performance improvements in exp_ch5.adb.
1173 * snames.ads-tmpl: New names referenced by exp_ch5.adb.
1174 * exp_ch5.adb: Speed up "for ... of" loops for predefined containers.
1175 Instead of doing literally what the RM calls for, we do something
1176 equivalent that avoids expensive operations inside the loop. If the
1177 container package has appropriate Next, Pseudo_Reference,
1178 Element_Access, Get_Element_Access declarations, we invoke the
1180 * snames.ads-tmpl: Note speed improvement.
1182 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
1184 * einfo.ads (Is_Atomic_Or_VFA): Move to XEINFO INLINES section.
1185 * xeinfo.adb: Replace a-einfo.h with einfo.h throughout.
1186 Add pattern to translate "or else" into "||".
1188 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
1190 * einfo.ads (Has_Volatile_Full_Access): Rename into...
1191 (Is_Volatile_Full_Access): ...this.
1192 (Set_Has_Volatile_Full_Access): Rename into...
1193 (Set_Is_Volatile_Full_Access): ...this.
1194 * einfo.adb (Has_Volatile_Full_Access): Rename into...
1195 (Is_Volatile_Full_Access): ...this.
1196 (Set_Has_Volatile_Full_Access): Rename into...
1197 (Set_Is_Volatile_Full_Access): ...this.
1198 (Is_Atomic_Or_VFA): Adjust to above renaming.
1199 * errout.adb (Special_Msg_Delete): Likewise.
1200 * exp_pakd.adb (Install_PAT): Likewise.
1201 * freeze.adb (Freeze_Array_Type): Likewise.
1202 * sem_ch8.adb (Analyze_Object_Renaming): Likewise.
1203 * sem_ch13.adb (Inherit_Delayed_Rep_Aspects): Likewise.
1204 (Inherit_Aspects_At_Freeze_Point): Likewise.
1205 * sem_prag.adb (Set_Atomic_VFA): Likewise.
1206 (Process_Atomic_Independent_Shared_Volatile): Likewise.
1207 * sem_util.adb (Is_Atomic_Or_VFA_Object): Likewise.
1209 2015-05-22 Robert Dewar <dewar@adacore.com>
1211 * exp_ch5.adb, layout.adb, einfo.adb, einfo.ads, sem_prag.adb,
1212 freeze.adb, freeze.ads, sem_util.adb, sem_util.ads, exp_ch2.adb,
1213 exp_ch4.adb, errout.adb, exp_aggr.adb, sem_ch13.adb: This is a general
1214 change that deals with the fact that most of the special coding for
1215 Atomic should also apply to the case of Volatile_Full_Access.
1216 A new attribute Is_Atomic_Or_VFA is introduced, and many of the
1217 references to Is_Atomic now use this new attribute.
1219 2015-05-22 Robert Dewar <dewar@adacore.com>
1221 * exp_ch4.adb (Expand_N_Op_Eq): Introduce 'Machine for 'Result
1224 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
1226 * sprint.adb (Source_Dump): When generating debug files, deal
1227 with the case of a stand-alone package instantiation by dumping
1228 together the spec and the body in the common debug file.
1230 2015-05-22 Robert Dewar <dewar@adacore.com>
1232 * sem_ch13.adb (Minimum_Size): Size is zero for null range
1235 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1237 * einfo.adb (Anonymous_Master): This attribute now applies
1238 to package and subprogram bodies.
1239 (Set_Anonymous_Master): This attribute now applies to package and
1241 (Write_Field36_Name): Add output for package and subprogram bodies.
1242 * einfo.ads Update the documentation on attribute Anonymous_Master
1243 along with occurrences in entities.
1244 * exp_ch4.adb (Create_Anonymous_Master): Reimplemented to
1245 handle spec and body anonymous masters of the same unit.
1246 (Current_Anonymous_Master): Reimplemented. Handle a
1247 package instantiation that acts as a compilation unit.
1248 (Insert_And_Analyze): Reimplemented.
1250 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1252 * sem_ch10.adb (Analyze_With_Clause): A limited_with_clause on a
1253 predefined unit is treated as a regular with_clause.
1255 2015-05-22 Robert Dewar <dewar@adacore.com>
1257 * sem_ch12.adb, prj.ads, makeutl.ads, sem_ch6.adb, prj-nmsc.adb,
1258 prj-conf.adb, sem_disp.adb: Minor reformatting.
1260 2015-05-22 Vincent Celier <celier@adacore.com>
1262 * clean.adb (Parse_Cmd_Line): For native gnatclean, check
1263 for switch -P and, if found and gprclean is available, invoke
1265 * make.adb (Initialize): For native gnatmake, check for switch -P
1266 and, if found and gprbuild is available, invoke silently gprbuild.
1268 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
1270 * sem_ch13.adb (Validate_Unchecked_Conversions): Also issue
1271 specific warning for discrete types when the source is larger
1274 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1276 * einfo.ads, einfo.adb (Incomplete_Actuals): New attribute of
1277 package instantiations. Holds the list of actuals in the instance
1278 that are incomplete types, to determine where the corresponding
1279 instance body must be placed.
1280 * sem_ch6.adb (Conforming_Types): An incomplete type used as an
1281 actual in an instance matches an incomplete formal.
1282 * sem_disp.adb (Check_Dispatching_Call): Handle missing case of
1283 explicit dereference.
1284 (Inherited_Subprograms): In the presence of a limited view there
1285 are no subprograms to inherit.
1286 * sem_ch12.adb (Preanalyze_Actuals): Build list of incomplete
1287 actuals of instance, for later placement of instance body and
1288 freeze nodes for actuals.
1289 (Install_Body): In the presence of actuals that incomplete types
1290 from a limited view, the instance body cannot be placed after
1291 the declaration because full views have not been seen yet. Any
1292 use of the non-limited views in the instance body requires
1293 the presence of a regular with_clause in the enclosing unit,
1294 and will fail if this with_clause is missing. We place the
1295 instance body at the beginning of the enclosing body, which is
1296 the unit being compiled, and ensure that freeze nodes for the
1297 full views of the incomplete types appear before the instance.
1299 2015-05-22 Pascal Obry <obry@adacore.com>
1301 * makeutl.ads, prj-conf.adb, prj-nmsc.adb, prj.ads
1302 (In_Place_Option): Removed.
1303 (Relocate_Build_Tree_Option): New constant.
1304 (Root_Dir_Option): New constant.
1305 (Obj_Root_Dir): Removed.
1306 (Build_Tree_Dir): New variable.
1307 (Root_Src_Tree): Removed.
1308 (Root_Dir): New variable.
1309 * prj-conf.adb (Get_Or_Create_Configuration_File): Add check
1310 for improper relocation.
1311 * prj-nmsc.adb (Locate_Directory): Add check for improper
1314 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1316 * einfo.adb (Default_Init_Cond_Procedure): Code cleanup. The
1317 attribute now applies to the base type.
1318 (Has_Default_Init_Cond): Now applies to the base type.
1319 (Has_Inherited_Default_Init_Cond): Now applies to the base type.
1320 (Set_Default_Init_Cond_Procedure): Code cleanup. The attribute now
1321 applies to the base type.
1322 (Set_Has_Default_Init_Cond): Now applies to the base type.
1323 (Set_Has_Inherited_Default_Init_Cond): Now applies to the base type.
1324 * exp_ch3.adb (Expand_N_Object_Declaration): No need to use the
1325 base type when adding a call to the Default_Initial_Condition.
1327 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1329 * einfo.adb: Node36 is now used as Anonymous_Master. Flag253
1331 (Anonymous_Master): New routine.
1332 (Has_Anonymous_Master): Removed.
1333 (Set_Anonymous_Master): New routine.
1334 (Set_Has_Anonymous_Master): Removed.
1335 (Write_Entity_Flags): Remove the output for Has_Anonymous_Maser.
1336 (Write_Field36_Name): Add output for Anonymous_Master.
1337 * einfo.ads Add new attribute Anonymous_Master along with
1338 occurrences in nodes. Remove attribute Has_Anonymous_Master along
1339 with occurrences in nodes.
1340 (Anonymous_Master): New routine along with pragma Inline.
1341 (Has_Anonymous_Master): Removed along with pragma Inline.
1342 (Set_Anonymous_Master): New routine along with pragma Inline.
1343 (Set_Has_Anonymous_Master): Removed along with pragma Inline.
1344 * exp_ch4.adb (Create_Anonymous_Master): New routine.
1345 (Current_Anonymous_Master): Reimplemented.
1347 2015-05-22 Bob Duff <duff@adacore.com>
1349 * freeze.adb (Freeze_Profile): Suppress warning if imported
1350 subprogram is not at library level.
1352 2015-05-22 Robert Dewar <dewar@adacore.com>
1354 * sem_ch8.adb (Analyze_Object_Renaming): Check for renaming
1355 component of an object to which Volatile_Full_Access applies.
1357 2015-05-22 Jerome Guitton <guitton@adacore.com>
1359 * exp_dbug.ads: Add note about non bit-packed arrays.
1361 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
1363 * sem_prag.adb: Fix typo.
1364 * einfo.ads: Grammar fixes in comments.
1366 2015-05-22 Bob Duff <duff@adacore.com>
1368 * a-cborma.ads, a-cidlli.ads, a-cimutr.ads, a-ciormu.ads,
1369 * a-cihase.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
1370 * a-cborse.ads, a-comutr.ads, a-ciorma.ads, a-cobove.ads,
1371 * a-coormu.ads, a-convec.ads, a-cohase.ads, a-coinho.ads,
1372 * a-cbdlli.ads, a-cbmutr.ads, a-cbhase.ads, a-cdlili.ads,
1373 * a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
1374 * a-coinho-shared.ads (Constant_Reference_Type, Reference_Type):
1375 Add an initialization expression "raise Program_Error". See,
1376 for example, RM-A.18.2(148.4).
1378 2015-05-22 Robert Dewar <dewar@adacore.com>
1380 * debug.adb: Update documentation.
1381 * einfo.ads, einfo.adb (Needs_Typedef): New flag
1382 * exp_unst.adb (Unnest_Subprogram): Mark AREC types as needing
1384 * frontend.adb: Update comments.
1385 * gnat1drv.adb (Adjust_Global_Switches): Set all needed flags
1387 * opt.ads (Generate_C_Code): New switch.
1388 * osint-c.adb (Write_C_File_Info): Removed, not used
1389 (Write_H_File_Info): Removed, not used
1390 * osint-c.ads (Write_C_File_Info): Removed, not used
1391 (Write_H_File_Info): Removed, not used
1392 * osint.ads (Write_Info): Minor comment updates.
1393 (Output_FD): Moved from private part to public part of spec.
1394 * sem.adb (Semantics): Force expansion on if in Generate_C_Code
1396 * atree.ads: minor typo in comment.
1397 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
1398 Do not allow VFA on composite object with aliased component.
1400 2015-05-22 Arnaud Charlet <charlet@adacore.com>
1402 * osint-c.adb, osint-c.ads (Set_File_Name): Move back to spec.
1404 2015-05-22 Pascal Obry <obry@adacore.com>
1406 * prj-util.adb: Minor comment editing.
1408 2015-05-22 Pascal Obry <obry@adacore.com>
1410 * makeutl.ads (In_Place_Option): New constant.
1411 * prj.ads (Obj_Root_Dir): New variable (absolute path to relocate
1413 (Root_Src_Tree): New variable (absolute path of root source tree).
1414 * prj-conf.adb (Do_Autoconf): Take into account the object root
1415 directory (if defined) to generate configuration project.
1416 * prj-nmsc.adb (Get_Directories): Handle case where Obj_Root_Dir
1418 (Locate_Directory): Likewise.
1420 2015-05-22 Pascal Obry <obry@adacore.com>
1422 * prj-util.ads, prj-util.adb (Relative_Path): New routine.
1424 2015-05-22 Bob Duff <duff@adacore.com>
1426 * exp_utils.ads, exp_utils.adb (Find_Optional_Prim_Op): New
1427 interface to return Empty when not found, so we can avoid handling
1428 Program_Error in that case.
1429 (Find_Prim_Op): Fix latent bug: raise Program_Error when there are no
1431 * exp_ch7.adb, sem_util.adb: Use Find_Optional_Prim_Op when the
1432 code is expecting Empty.
1433 * sem_ch8.adb: Use Find_Optional_Prim_Op to avoid handling
1436 2015-05-22 Robert Dewar <dewar@adacore.com>
1438 * sem_ch3.adb, sem_intr.adb, exp_ch4.adb, s-rannum.adb,
1439 sem_eval.adb, s-fatgen.adb, s-expmod.ads: Remove incorrect hyphen in
1441 * exp_util.adb: Add comment.
1442 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move from spec to
1444 (Set_File_Name): New name for the above.
1445 (Create_C_File, Create_H_File, Write_C_File_Info, Write_H_File_Info,
1446 Close_C_File, Close_H_File): New procedure.
1447 * osint.adb: Minor reformatting.
1448 * osint.ads: Minor comment updates.
1450 2015-05-22 Robert Dewar <dewar@adacore.com>
1452 * exp_ch4.adb: Minor rewording.
1453 * exp_util.ads: Clarify that Find_Prim_Op is only for
1456 2015-05-22 Robert Dewar <dewar@adacore.com>
1458 * atree.adb, atree.ads, treepr.adb: Change name Needs_Actuals_Check to
1460 * exp_ch4.adb (Expand_N_Op_Expon): Optimize 2**x in modular
1463 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
1465 * exp_pakd.adb (Install_PAT): Propagate representation aspects
1466 from the original array type to the PAT.
1468 2015-05-22 Robert Dewar <dewar@adacore.com>
1470 * treepr.adb (Print_Node_Header): Add output of Needs_Actuals_Check.
1472 2015-05-22 Robert Dewar <dewar@adacore.com>
1474 * atree.adb, atree.ads (Needs_Actuals_Check): New flag.
1476 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1478 * sem_prag.adb (Analyze_Pragma): Remove the detection
1479 of a useless Part_Of indicator when the related item is a constant.
1480 (Check_Matching_Constituent): Do not emit an error on a constant.
1481 (Check_Missing_Part_Of): Do not check for a missing Part_Of indicator
1482 when the related item is a constant.
1483 (Collect_Body_States): Code cleanup.
1484 (Collect_Visible_States): Code cleanup.
1485 (Report_Unused_States): Do not emit an error on a constant.
1486 * sem_util.ads, sem_util.adb (Has_Variable_Input): Removed.
1488 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
1490 * sem_ch8.adb (Analyze_Object_Renaming): Copy
1491 Has_Volatile_Full_Access from renamed to renaming entities.
1492 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
1493 Tidy up and remove redundant setting of Has_Volatile_Full_Access.
1495 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1497 * ghost.adb (Check_Ghost_Completion): Update references to SPARK
1499 (Check_Ghost_Policy): Update references to SPARK RM 6.9 rules.
1500 * sem_ch3.adb (Analyze_Object_Declaration): Update references
1501 to SPARK RM 6.9 rules.
1502 (Check_Completion): Ghost entities do not require a special form of
1504 * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Update references
1505 to SPARK RM 6.9 rules.
1506 (Analyze_Subprogram_Body_Helper): Update references to SPARK RM 6.9
1508 * sem_ch7.adb (Analyze_Package_Body_Helper): Update references
1509 to SPARK RM 6.9 rules.
1510 (Requires_Completion_In_Body): Ghost entities do not require a special
1513 2015-05-22 Robert Dewar <dewar@adacore.com>
1515 * a-csquin.ads: Use Ada 2012 notation.
1516 * sem_ch8.adb: Minor reformatting.
1518 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1520 * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect Import
1521 acts as a completion.
1523 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1525 * sem_ch13.adb: Minor reformatting.
1527 2015-05-22 Jose Ruiz <ruiz@adacore.com>
1529 * a-reatim.adb: Minor change, fix typo.
1531 2015-05-22 Robert Dewar <dewar@adacore.com>
1533 * sem_util.ads: Minor addition of ??? comment.
1534 * sem_prag.adb, sem_util.adb: Minor reformatting.
1535 * sem_ch13.adb: minor reformatting.
1537 2015-05-22 Robert Dewar <dewar@adacore.com>
1539 * a-reatim.ads: Add Compile_Time_Error to ensure Duration
1541 * sem_ch13.adb: Improve error message.
1542 * exp_ch4.adb: Minor reformatting.
1544 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1546 * sem_prag.adb (Analyze_Pragma): Constants without variable
1547 input do not require indicator Part_Of.
1548 (Check_Missing_Part_Of): Constants without variable input do not
1549 requrie indicator Part_Of.
1550 (Collect_Visible_States): Constants without variable input are
1551 not part of the hidden state of a package.
1552 * sem_util.ads, sem_util.adb (Has_Variable_Input): New routine.
1554 2015-05-22 Robert Dewar <dewar@adacore.com>
1556 * exp_util.adb (Activate_Atomic_Synchronization): Do not set
1557 Atomic_Sync_Required for an object renaming declaration.
1558 * sem_ch8.adb (Analyze_Object_Renaming): Copy Is_Atomic and
1559 Is_Independent to renaming object.
1561 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1563 * sem_ch5.adb (Analyze_Iterator_Specification): Diagnose
1564 various illegalities in iterators over arrays and containers:
1565 a) New function Get_Cursor_Type, to verify that the cursor is
1566 not a limited type at the point of iteration.
1567 b) If the container is a constant, an element_iterator is illegal
1568 if the container type does not have a Constant_Indexing aspect.
1569 c) If the iterate function has an in-out controlling parameter,
1570 the container cannot be a constant object.
1571 d) Reject additional cases of iterators over a
1572 discriminant-dependent component of a mutable object.
1574 2015-05-21 Hristian Kirtchev <kirtchev@adacore.com>
1576 * einfo.adb (Contract): This attribute now applies to constants.
1577 (Set_Contract): This attribute now applies to constants.
1578 (Write_Field34_Name): Add output for constants.
1579 * einfo.ads Attribute Contract now applies to constants.
1580 * sem_ch3.adb (Analyze_Object_Contract): Constants now have
1581 their Part_Of indicator verified.
1582 * sem_prag.adb (Analyze_Constituent): A constant is now a valid
1584 (Analyze_Global_Item): A constant cannot act as an output.
1585 (Analyze_Initialization_Item): Constants are now a valid
1586 initialization item.
1587 (Analyze_Initializes_In_Decl_Part): Rename
1588 global variable States_And_Vars to States_And_Objs and update
1589 all its occurrences.
1590 (Analyze_Input_Item): Constants are now a
1591 valid initialization item. Remove SPARM RM references from error
1593 (Analyze_Pragma): Indicator Part_Of can now apply to a constant.
1594 (Collect_Body_States): Collect both source constants
1596 (Collect_States_And_Objects): Collect both source constants and
1598 (Collect_States_And_Variables): Rename
1599 to Collect_States_And_Objects and update all its occurrences.
1600 (Collect_Visible_States): Do not collect constants and variables
1601 used to map generic formals to actuals.
1602 (Find_Role): The role of a constant is that of an input. Separate the
1603 role of a variable from that of a constant.
1604 (Report_Unused_Constituents): Add specialized wording for constants.
1605 (Report_Unused_States): Add specialized wording for constants.
1606 * sem_util.adb (Add_Contract_Item): Add processing for constants.
1607 * sem_util.ads (Add_Contract_Item): Update the comment on usage.
1608 (Find_Placement_In_State_Space): Update the comment on usage.
1610 2015-05-21 Ed Schonberg <schonberg@adacore.com>
1612 * sem_ch5.adb: minor reformatting.
1614 2015-05-21 Robert Dewar <dewar@adacore.com>
1616 * freeze.adb (Freeze_Entity): Properly tag -gnatw.z messages.
1618 2015-05-21 Robert Dewar <dewar@adacore.com>
1620 * freeze.adb: Minor reformatting.
1621 * cstand.adb (Print_Standard): Fix bad printing of Duration
1623 * a-reatim.adb (Time_Of): Complete rewrite to properly detect
1626 2015-05-21 Ed Schonberg <schonberg@adacore.com>
1628 * sem_ch5.adb: add (useless) initial value.
1629 * sem_ch3.adb (Replace_Anonymous_Access_To_Protected_Subprogram):
1630 Check whether the procedure has parameters before processing
1631 formals in ASIS mode.
1633 2015-05-21 Ed Schonberg <schonberg@adacore.com>
1635 * sem_ch13.adb (Check_Iterator_Functions): Emit error on Iterator
1636 aspect as well when indexing function is illegal.
1637 (Valid_Default_Iterator): Handle properly somme illegal cases
1638 to prevent compilation abandoned messages.
1639 (Check_Primitive_Function): Verify that type and indexing function
1640 are in the same scope.
1641 * freeze.adb (Freeze_Record): Extend patch on the presence of
1642 indexing aspects to aspect Default_Iterator.
1644 2015-05-19 David Malcolm <dmalcolm@redhat.com>
1646 * gcc-interface/trans.c (Sloc_to_locus1): Strenghthen local "map"
1647 from line_map * to line_map_ordinary *.
1649 2015-05-12 Jason Merrill <jason@redhat.com>
1651 * sigtramp-vxworks.c: Add space between string literal and macro
1654 2015-05-12 Arnaud Charlet <charlet@adacore.com>
1656 * gnat_rm.texi, gnat_ugn.texi, doc: Documentation updates and clean ups
1658 2015-05-12 Ed Schonberg <schonberg@adacore.com>
1660 * sem_ch5.adb (Analyze_Iterator_Specifications): Additional
1661 legality checks for array and container iterators:
1662 a) The domain of iteration cannot be a component that depends
1663 on discriminants of a mutable object. The check was recently
1664 added for element iterators.
1665 b) The cursor type cannot be a limited type at the point of the
1666 iteration, because the cursor will be assigned to in the body
1669 2015-05-12 Robert Dewar <dewar@adacore.com>
1671 * freeze.adb (Freeze_Record_Type): Make sure that if we have
1672 aspect Iterator_Element, then we have either Constant_Indexing
1673 or Variable_Indexing.
1675 2015-05-12 Ed Schonberg <schonberg@adacore.com>
1677 * a-coormu.ads, a-coormu.adb: Add Indexing aspect, Reference_Type,
1678 and Reference_Control_Type to support element iterators over
1680 * a-ciormu.ads, a-ciormu.adb: Ditto for
1681 indefinite_ordered_multisets.
1683 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
1685 * exp_ch4.adb (Expand_N_Expression_With_Actions): Force
1686 the evaluation of the EWA expression. Code cleanup.
1687 (Process_Transient_Object): Code cleanup.
1688 * exp_util.adb (Is_Aliased): Controlled transient objects found
1689 within EWA nodes are not aliased.
1690 (Is_Finalizable_Transient): Iterators are not finalizable transients.
1692 2015-05-12 Robert Dewar <dewar@adacore.com>
1694 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
1695 Don't allow Atomic and Volatile_Full_Access for the same entity.
1697 2015-05-12 Ed Schonberg <schonberg@adacore.com>
1699 * sem_ch5.adb (Analyze_Iterator_Specification): Implement new
1700 semantics and safety checks specified in AI12-0151.
1702 2015-05-12 Pierre-Marie de Rodat <derodat@adacore.com>
1704 * sem_ch10.adb (Sem_Ch10.Analyze_Proper_Body): Generate SCOs
1705 for subunit in generic units.
1707 2015-05-12 Robert Dewar <dewar@adacore.com>
1709 * sem_elab.adb (Check_A_Call): Avoid checking internal call
1712 2015-05-12 Ed Schonberg <schonberg@adacore.com>
1714 * sem_ch6.adb (Process_Formals): An untagged incomplete type
1715 is legal in the profile of a null procedure.
1717 2015-05-12 Ed Schonberg <schonberg@adacore.com>
1719 * sem_ch12.adb (Validate_Derived_Type_Instance): Handle properly
1720 the checks on a derived formal whose parent type is a previous
1721 formal that is not a derived type.
1723 2015-05-12 Robert Dewar <dewar@adacore.com>
1725 * aspects.ads, aspects.adb: Add entries for aspect Volatile_Full_Access
1726 * einfo.adb (Has_Volatile_Full_Access): New flag.
1727 (Has_Volatile_Full_Access): New flag.
1728 * einfo.ads (Has_Volatile_Full_Access): New flag.
1729 * par-prag.adb: Add dummy entry for Volatile_Full_Access.
1730 * sem_prag.adb (Analyze_Pragma, case Volatile_Full_Access):
1731 Implement new pragma.
1732 * snames.ads-tmpl: Add entries for pragma Volatile_Full_Access.
1734 2015-05-12 Robert Dewar <dewar@adacore.com>
1736 * targparm.ads: Minor reformatting.
1738 2015-05-12 Robert Dewar <dewar@adacore.com>
1740 * a-reatim.adb (Time_Of): Properly detect overflow when TS = 0.0.
1741 * a-reatim.ads: Minor reformatting.
1743 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
1745 * einfo.ads: Update the documentation of flags
1746 Has_Inherited_Default_Init_Cond and Has_Default_Init_Cond.
1748 2015-05-12 Robert Dewar <dewar@adacore.com>
1750 * impunit.adb: Add entry for a-dhfina.ads
1751 * a-dhfina.ads: New file.
1753 2015-05-12 Ed Schonberg <schonberg@adacore.com>
1755 * exp_ch5.adb (Expand_Iterator_Loop_Over_Array): if the array
1756 type has convention Fortran, a multidimensional iterator varies
1757 the first dimension fastest.
1759 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
1761 * einfo.adb: Node32 is now used as Encapsulating_State.
1762 Node37 is now used as Associated_Entity.
1763 (Associated_Entity): New routine.
1764 (Encapsulating_State): Update the assertion guard to include constants.
1765 (Set_Associated_Entity): New routine.
1766 (Set_Encapsulating_State): Update the assertion guard to
1768 (Write_Field10_Name): Remove the output for Encapsulating_State.
1769 (Write_Field32_Name): Add output for Encapsulating_State.
1770 (Write_Field37_Name): Add output for Associated_Entity.
1771 * einfo.ads New attribute Associated_Entity along with placement
1772 in entities. Attribute Encapsulating_State now uses Node32.
1773 (Associated_Entity): New routine along with pragma Inline.
1774 (Set_Associated_Entity): New routine along with pragma Inline.
1775 * inline.ads Code reformatting.
1776 * sem_attr.adb (Analyze_Attribute): Correct the prefix of
1777 attribute 'Result when the context is a generic instantiation.
1778 (Analyze_Attribute_Old_Result): Pragmas Depends and
1779 Refined_Depends are a valid context for attribute 'Result.
1780 (Denote_Same_Function): Allow attribute 'Result to denote
1782 * sem_ch3.adb Add with and use clauses for Sem_Ch12.
1783 (Analyze_Declarations): Capture global references within the
1784 contracts of packages, subprograms and their respective bodies.
1785 * sem_ch6.adb (Analyze_Aspects_On_Body_Or_Stub): Removed.
1786 (Analyze_Completion_Contract): Removed.
1787 (Analyze_Generic_Subprogram_Body): Enchange the aspects after
1788 creating the generic copy. Create a generic contract for the
1789 template. Analyze the aspects of the generic body. Analyze the
1790 contract of the generic body when it is a compilation unit and
1791 capture global references.
1792 (Analyze_Subprogram_Body_Contract): Code cleanup.
1793 (Analyze_Subprogram_Contract): Do not save global references here.
1794 (Save_Global_References_In_List): Removed.
1795 * sem_ch7.adb (Analyze_Package_Body_Contract): Code cleanup.
1796 (Analyze_Package_Body_Helper): Create a generic contract for
1798 (Analyze_Package_Contract): Code cleanup.
1799 * sem_ch10.adb Add with and use clauses for Sem_Ch12.
1800 (Analyze_Compilation_Unit): Capture global references in a
1801 generic subprogram declaration that acts as a compilation unit.
1802 * sem_ch12.adb Add with and use clauses for Sem_Prag. Illustrate
1803 the implementation of generic contracts. Alphabetize various
1805 (Analyze_Generic_Package_Declaration):
1806 Create a generic contract for the template.
1807 (Analyze_Generic_Subprogram_Declaration): Create a generic
1808 contract for the template.
1809 (Analyze_Subprogram_Instantiation): Instantiate the contract of the
1811 (Copy_Generic_Node): Link defining entities of the generic template
1812 with the corresponding defining entities of the generic copy. Update
1813 the processing of pragmas.
1814 (Instantiate_Contract): Removed.
1815 (Instantiate_Subprogram_Contract): New routine.
1816 (Requires_Delayed_Save): New routine.
1817 (Save_Global_References): Rename formal parameter N to Templ. Various
1819 (Save_Global_References_In_Aspects): Moved from the spec.
1820 (Save_Global_References_In_Contract): New routine.
1821 (Save_References_In_Aggregate): New routine.
1822 (Save_References_In_Char_Lit_Or_Op_Symbol): New routine.
1823 (Save_References_In_Descendants): New routine.
1824 (Save_References_In_Identifier): New routine.
1825 (Save_References_In_Operator): New routine.
1826 (Save_References_In_Pragma): New routine.
1827 * sem_ch12.ads (Save_Global_References): Rename formal
1828 parameter N to Templ. Update the comment on usage.
1829 (Save_Global_References_In_Aspects): Moved to the body.
1830 (Save_Global_References_In_Contract): New routine.
1831 * sem_ch13.adb (Analyze_Aspect_Specifications_On_Body_Or_Stub):
1833 * sem_ch13.ads (Analyze_Aspect_Specifications_On_Body_Or_Stub):
1835 * sem_prag.adb (Add_Item_To_Name_Buffer): Add support for
1837 (Analyze_Contract_Cases_In_Decl_Part): Code cleanup.
1838 (Analyze_Depends_Global): New routine.
1839 (Analyze_Depends_In_Decl_Part): Code cleanup.
1840 (Analyze_Global_In_Decl_Part): Code cleanup.
1841 (Analyze_Global_Item): Constants are now valid global items. Do
1842 not perform state-related checks in an instance. Change the way
1843 renamings are handled. (Analyze_Initial_Condition_In_Decl_Part):
1845 (Analyze_Initializes_In_Decl_Part): Code cleanup.
1846 (Analyze_Input_Output): The analysis of attribute 'Result in
1847 the context of pragmas Depends or Refined_Depends now reuses
1848 the existing attribute analysis machinery. Constants and
1849 generic parameters are now valid dependency items. Do not
1850 perform state-related checks in an instance. Change the way
1851 renamings are handled. (Analyze_Pragma): Add a "characteristics"
1852 section for pragmas Abstract_State, Contract_Cases, Depends,
1853 Extensions_Visible, Global, Initial_Condition, Initializes,
1854 Post, Post_Class, Postcondition, Pre, Pre_Class, Precondition,
1855 Refined_Depends, Refined_Global, Refined_Post, Refined_State, Test_Case.
1856 (Analyze_Pre_Post_Condition): Do not create a generic
1858 (Analyze_Pre_Post_Condition_In_Decl_Part): Code cleanup.
1859 (Analyze_Refined_Depends_Global_Post): New routine.
1860 (Analyze_Refined_Depends_In_Decl_Part): Code cleanup.
1861 (Analyze_Refined_Global_In_Decl_Part): Code cleanup.
1862 (Analyze_Refined_Pragma): Removed.
1863 (Analyze_Refined_State_In_Decl_Part): Code cleanup.
1864 (Analyze_Test_Case_In_Decl_Part): Code cleanup.
1865 (Check_Dependency_Clause): Do not perform this check in an instance.
1866 (Check_Function_Return): Add support for generic functions.
1867 (Check_In_Out_States): Do not perform this check in an instance.
1868 (Check_Input_States): Do not perform this check in an instance.
1869 (Check_Mode_Restriction_In_Function): Add support for generic functions.
1870 (Check_Output_States): Do not perform this check in an instance.
1871 (Check_Postcondition_Use_In_Inlined_Subprogram): Rename
1872 parameter Subp_Id to Spec_Id and update comment on usage.
1873 (Check_Proof_In_States): Do not perform this check in an instance.
1874 (Check_Refined_Global_Item): Add support for constants.
1875 (Check_Refined_Global_List): Do not perform this check in an instance.
1876 (Collect_Global_Items): Reimplemented.
1877 (Collect_Subprogram_Inputs_Outputs): Add support for generic parameters.
1878 (Create_Generic_Template): Removed.
1879 (Find_Related_Package_Or_Body): Moved to spec.
1880 (Find_Role): Add support for generic parameters and constants.
1881 (Get_Argument): Moved to spec. Rename parameter Spec_Id to Context_Id.
1882 (Match_Item): Add support for constants.
1883 (Preanalyze_Test_Case_Arg): Reimplemented.
1884 (Report_Extra_Clauses): Do not perform this check in an instance.
1885 (Report_Extra_Constituents): Do not perform this check in an instance.
1886 * sem_prag.ads (Collect_Subprogram_Inputs_Outputs): Update
1887 the comment on usage.
1888 (Find_Related_Package_Or_Body): Moved from body.
1889 (Get_Argument): Moved from body.
1890 * sem_util.adb Add with and use clauses for Sem_Ch12.
1891 (Corresponding_Spec_Of): Add support for packages and package bodies.
1892 (Create_Generic_Contract): New routine.
1893 (Is_Contract_Annotation): Reimplemented.
1894 (Is_Generic_Declaration_Or_Body): New routine.
1895 (Is_Package_Contract_Annotation): New routine.
1896 (Is_Subprogram_Contract_Annotation): New routine.
1897 * sem_util.ads (Corresponding_Spec_Of): Update the comment on usage.
1898 (Create_Generic_Contract): New routine.
1899 (Is_Generic_Declaration_Or_Body): New routine.
1900 (Is_Package_Contract_Annotation): New routine.
1901 (Is_Subprogram_Contract_Annotation): New routine.
1902 * sinfo.adb (Is_Generic_Contract_Pragma): New routine.
1903 (Set_Is_Generic_Contract_Pragma): New routine.
1904 * sinfo.ads Add new attribute Is_Generic_Contract_Pragma along
1905 with occurrences in nodes.
1906 (Is_Generic_Contract_Pragma): New routine along with pragma Inline.
1907 (Set_Is_Generic_Contract_Pragma): New routine along with pragma Inline.
1908 * treepr.adb (Print_Entity_Info): Output fields 36 to 41.
1910 2015-05-12 Robert Dewar <dewar@adacore.com>
1912 * a-taster.ads: Minor comment fix: fix bad header, this is a
1915 2015-05-12 Robert Dewar <dewar@adacore.com>
1917 * sem_intr.adb: (Check_Shift): Diagnose bad modulus value.
1919 2015-05-12 Robert Dewar <dewar@adacore.com>
1921 * gnat1drv.adb (Adjust_Global_Switches): Default to suppressing
1922 Alignment_Checks on non-strict alignment machine.
1923 * sem_ch13.adb (Validate_Address_Clauses): Don't give
1924 compile-time alignment warnings if run time Alignment_Check
1927 2015-05-12 Thomas Quinot <quinot@adacore.com>
1929 * g-sercom.ads, g-sercom-linux.adb (GNAT.Serial_Communications.
1930 Data_Rate): New literals B75, B110, B150, B300, B600.
1932 2015-05-12 Doug Rupp <rupp@adacore.com>
1934 * init.c (__gnat_init_float) [vxworks]: For e500v2,
1935 do nothing and leave the responsibility to install the handler
1936 and enable the exceptions to the BSP.
1938 2015-05-12 Robert Dewar <dewar@adacore.com>
1940 * sem_ch9.adb, einfo.ads, exp_intr.adb: Minor reformatting.
1941 * sem_disp.adb: Minor code reorganization (remove junk redundant
1943 * exp_unst.adb (Unnest_Subprogram.Uplev_Refs): Ignore uplevel
1944 references to bounds of types coming from original type reference.
1945 * checks.ads: Minor reformatting.
1946 * checks.adb: Minor reformatting.
1947 * sem_prag.adb (Analyze_Pragma, case Check): If in ignored
1948 assertion, then make sure we do not drag in bignum stuff.
1950 2015-05-12 Ed Schonberg <schonberg@adacore.com>
1952 * sem_ch9.adb (Collect_Interfaces): Initialize
1953 Direct_Primitive_Operations for a tagged synchronized type,
1954 so it can used in ASIS mode.
1955 * sem_disp.adb (Check_Dispatching_Operation): If expansion is
1956 disabled, attach subprogram to list of Direct_Primitive_Operations
1957 of synchronized type itself, for ASIS use, because in this case
1958 Corresponding_Record_Type is not built.
1959 * einfo.ads: Indicate use of Direct_Primitive_Operations on
1962 2015-05-12 Pierre-Marie de Rodat <derodat@adacore.com>
1964 * exp_pakd.adb: Make clearer the comment in exp_pakd.adb about
1967 2015-05-12 Robert Dewar <dewar@adacore.com>
1969 * sem_ch3.adb, sem_util.adb, sem_ch6.adb: Minor reformatting.
1971 2015-05-12 Robert Dewar <dewar@adacore.com>
1973 * exp_unst.adb (Visit_Node): Deal with subprogram and package stubs.
1975 2015-05-12 Ed Schonberg <schonberg@adacore.com>
1977 * exp_intr.adb (Expand_Dispatching_Constructor_Call): The
1978 tag to be retrieved for the generated call is the first entry
1979 in the dispatch table for the return type of the instantiated
1982 2015-05-12 Bob Duff <duff@adacore.com>
1984 * exp_ch7.adb, exp_ch7.ads, exp_intr.adb, exp_util.adb,
1985 exp_util.ads: Update comments.
1987 2015-05-12 Ed Schonberg <schonberg@adacore.com>
1989 * sem_ch3.adb (Add_Internal_Interface_Entities): Do no generate
1990 freeze nodes for these in ASIS mode, because they lead to
1991 elaoration order issues in gigi.
1993 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
1995 * sem_ch6.adb (Analyze_Expression_Function): Code
1996 cleanup. Use Copy_Subprogram_Spec to create a proper spec.
1997 (Analyze_Subprogram_Body_Helper): Code cleanup. Do not
1998 prepare a stand alone body for inlining in GNATprove mode
1999 when inside a generic. (Body_Has_Contract): Reimplemented.
2000 (Build_Subprogram_Declaration): New routine.
2001 * sem_ch10.adb (Analyze_Compilation_Unit): Capture global
2002 references within generic bodies by loading them.
2003 * sem_util.adb (Copy_Parameter_List): Code cleanup.
2004 (Copy_Subprogram_Spec): New routine.
2005 (Is_Contract_Annotation): New routine.
2006 * sem_util.ads (Copy_Subprogram_Spec): New routine.
2007 (Is_Contract_Annotation): New routine.
2009 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
2011 * sem_attr.adb (Resolve_Attribute): Do not analyze the generated
2012 body of an expression function when the prefix of attribute
2013 'Access is the body.
2015 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2017 * sem_ch3.adb (Build_Derived_Enumeration_Type): The anonymous base
2018 created for a derived enumeration type is not a first subtype,
2019 even though it is defined through a full type declaration.
2020 * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): Do not process
2021 aspects for the anonymous base type constructed for a derived
2022 scalar type, because they will be set when the first subtype
2024 (Inherit_Aspects_At_Freeze_Point): Fix typos on handling of
2025 Default_Value and Default_Component_Value, that prevented the
2026 proper inheritance of these aspects.
2028 2015-05-12 Gary Dismukes <dismukes@adacore.com>
2030 * exp_ch6.adb, exp_unst.adb: Minor typo fixes.
2032 2015-05-12 Robert Dewar <dewar@adacore.com>
2034 * sem_ch3.adb: Minor reformatting.
2036 2015-05-12 Vincent Celier <celier@adacore.com>
2038 * gnatcmd.adb: If we want to invoke gnatmake (gnatclean) with
2039 -P, then check if gprbuild (gprclean) is available; if it is,
2040 use gprbuild (gprclean) instead of gnatmake (gnatclean).
2042 2015-05-12 Robert Dewar <dewar@adacore.com>
2044 * debug.adb: Add flag -gnatd.3 to output diagnostic info from
2046 * einfo.ad, einfo.adb: Reorganize (and remove most of) flags used by
2048 * exp_ch6.adb (Unest_Bodies): Table for delayed calls to
2049 Unnest_Subprogram (Expand_N_Subprogram_Body): Add entry to table
2050 for later call instead of calling Unnest_Subprogram directly
2051 (Initialize): New procedure (Unnest_Subprograms): New procedure
2052 * exp_ch6.ads (Add_Extra_Actual_To_Call): Move into proper
2054 (Initialize): New procedure.
2055 (Unnest_Subprograms): New procedure.
2056 * exp_unst.adb (Unnest_Subprogram): Major rewrite, moving
2057 all processing to this routine which is now called late
2058 after instantiating bodies. Fully handles the case of generic
2060 * exp_unst.ads: Major rewrite, moving all processing to
2062 * frontend.adb (Frontend): Add call to Exp_Ch6.Initialize.
2063 (Frontend): Add call to Unnest_Subprograms.
2064 * sem_ch8.adb (Find_Direct_Name): Back to old calling sequence
2065 for Check_Nested_Access.
2066 * sem_util.adb (Build_Default_Subtype): Minor reformatting
2067 (Check_Nested_Access): Back to original VM-only form (we
2068 now do all the processing for Unnest_Subprogram at the time
2070 (Denotes_Same_Object): Minor reformatting
2071 (Note_Possible_Modification): Old calling sequence for
2072 Check_Nested_Access.
2073 * sem_util.ads (Check_Nested_Access): Back to original VM-only
2074 form (we now do all the processing for Unnest_Subprogram at the
2077 2015-05-12 Robert Dewar <dewar@adacore.com>
2079 * sem_ch3.adb, freeze.adb, sem_ch6.adb: Minor reformatting.
2081 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2083 * sem_ch3.adb (Analyze_Object_Declaration): New function
2084 Has_Delayed_Aspect, used to defer resolution of an aggregate
2085 expression when the object declaration carries aspects Address
2087 * freeze.adb (Freeze_Object_Declaration): New subsidiary procedure
2088 to Freeze_Entity. In addition to the previous processing steps
2089 at the freeze point of an object, this procedure also handles
2090 aggregates in object declarations, when the declaration carries
2091 delayed aspects that require that the initialization of the
2092 object be attached to its freeze actions.
2094 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2096 * sem_ch6.adb (Analyze_Subprogram_Declaration): Following
2097 AI12-0147, null procedures and expression functions are allowed
2098 in protected bodies.
2100 2015-05-12 Tristan Gingold <gingold@adacore.com>
2102 * i-cpoint.adb (Copy_Terminated_Array): Copy nothing if Length is 0.
2104 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2106 * sem_ch3.adb (Complete_Private_Subtype): Propagate
2107 Has_Delayed_Aspects flag from private to full view, to ensure
2108 that predicate functions are constructed.
2110 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2112 * sem_ch6.adb (Process_Formals): If a tagged formal is an
2113 incomplete class-wide type, the subprogram must have a delayed
2114 freeze even though the opertation is not a primitive of the
2115 type. THis ensures that the backend can recover the full view
2116 when elaborating the subprogram declaration.
2118 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2120 * exp_util.adb (Get_Current_Value_Condition): Nothing to be
2121 done if an elsif part has been rewritten so that it is not part
2122 of an enclosing if_statement.
2124 2015-05-12 Robert Dewar <dewar@adacore.com>
2126 * sem_type.adb, sem_ch10.adb, freeze.adb, sem_ch6.adb, exp_disp.adb:
2129 2015-05-12 Bob Duff <duff@adacore.com>
2131 * exp_attr.adb (Size): Remove unnecessary check for types with
2132 unknown discriminants. That was causing the compiler to build
2133 a function call _size(T), where T is a type, not an object.
2135 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2137 * sem_ch4.adb (Extended_Primitive_Ops): Exclude overriding
2138 primitive operations of a type extension declared in the package
2139 body, to prevent duplicates in extended list.
2141 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2143 * sem_ch3.adb (Analyze_Component_Declaration): If the component is
2144 an unconstrained synchronized type with discriminants, create a
2145 constrained default subtype for it, so that the enclosing record
2146 can be given the proper size.
2147 * sem_util.adb (Build_Default_Subtype): If the subtype is created
2148 for a record discriminant, do not analyze the declarztion at
2149 once because it is added to the freezing actions of the enclosing
2152 2015-05-12 Robert Dewar <dewar@adacore.com>
2154 * exp_prag.adb (Expand_N_Pragma): Rewrite ignored pragma as
2156 * namet.ads (Boolean3): Document this flag used for Ignore_Pragma.
2157 * par-prag.adb (Prag): Implement Ignore_Pragma.
2158 * sem_prag.adb: Implement Ignore_Pragma.
2159 * snames.ads-tmpl: Add entries for pragma Ignore_Pragma.
2161 2015-05-12 Javier Miranda <miranda@adacore.com>
2163 * sem_ch10.adb (Build_Shadow_Entity): Link the class-wide shadow
2164 entity with its corresponding real entity.
2165 (Decorate_Type): Unconditionally build the class-wide shadow entity of
2167 * einfo.ads, einfo.adb (Has_Non_Limited_View): New synthesized
2169 (Non_Limited_View): Moved from field 17 to field 19 be available
2170 in class-wide entities.
2171 * exp_attr.adb (Access_Cases): Code cleanup.
2172 * exp_disp.adb (Expand_Interface_Actuals): Ditto.
2173 * exp_util.adb (Non_Limited_Designated_Type): Ditto.
2174 * freeze.adb (Build_Renamed_Bdody): Ditto.
2175 * sem_aux.adb (Available_View): Ditto.
2176 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
2177 (Try_One_Prefix_Interpretation): Ditto.
2178 * sem_ch5.adb (Analyze_Assignment): Ditto.
2179 * sem_ch6.adb (Detect_And_Exchange): Ditto.
2180 * sem_ch8.adb (Find_Expanded_Name): Ditto.
2181 * sem_disp.adb (Check_Controlling_Type): Ditto.
2182 * sem_res.adb (Resolve_Type_Conversion): Ditto.
2183 (Full_Designated_Type): Ditto.
2184 * sem_type.adb (Covers): Ditto.
2185 * sem_util.adb: Fix typo in comment.
2187 2015-05-12 Robert Dewar <dewar@adacore.com>
2189 * exp_unst.adb (Get_Real_Subp): New subprogram.
2190 (Unnest_Subprogram): Use Get_Real_Subp.
2191 (Uplev_Refs_For_One_Subp): Skip if no ARECnU entity.
2192 (Uplev_Refs_For_One_Subp): Use actual subtype in unconstrained case.
2194 2015-05-12 Robert Dewar <dewar@adacore.com>
2196 * a-reatim.adb ("/"): Add explicit check for Time_Span_First / -1.
2198 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2200 * sem_ch4.adb (Extended_Primitive_Ops): New subprogram,
2201 auxiliary to Try_Primitive_Operation to handle properly prefixed
2202 calls where the operation is not a primitive of the type, but
2203 is declared in the package body that is in the immediate scope
2206 2015-05-12 Robert Dewar <dewar@adacore.com>
2208 * sem_util.adb (Is_Variable): Allow X'Deref(Y) as a variable.
2210 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2212 * sem_ch8.adb (Find_Expanded_Name): Handle properly a fully
2213 qualified name for an instance of a generic grand-child unit in
2214 the body its parent.
2216 2015-05-12 Robert Dewar <dewar@adacore.com>
2218 * exp_unst.adb (Upref_Name): New subprogram.
2219 (Unnest_Subprogram): Use Upref_Name.
2220 (Unnest_Subprogram): Use new Deref attribute.
2221 * exp_unst.ads: Doc updates.
2223 2015-05-12 Thomas Quinot <quinot@adacore.com>
2225 * adaint.c: Enable Large File Support in adaint so that __gnat_readdir
2226 can access files on filesystems mounted from servers that use large
2229 2015-05-09 Eric Botcazou <ebotcazou@adacore.com>
2231 * gcc-interface/utils.c (gnat_write_global_declarations): Use type_decl
2232 method instead of global_decl for TYPE_DECLs.
2234 2015-04-27 Jim Wilson <jim.wilson@linaro.org>
2236 * gcc-interface/Makefile-lan.in (ada.mostlyclean): Remove gnatbind
2239 2015-04-13 Eric Botcazou <ebotcazou@adacore.com>
2241 * gnatvsn.ads (Library_Version): Bump to 6.
2243 2015-04-09 Iain Sandoe <iain@codesourcery.com>
2245 * gcc-interface/Makefile.in (darwin, powerpc): Enable atomics.
2247 2015-04-08 Eric Botcazou <ebotcazou@adacore.com>
2249 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Do not make
2250 a function returning an unconstrained type 'const' for the middle-end.
2252 * gcc-interface/trans.c (Pragma_to_gnu) <case Pragma_Warning>: Use
2253 exact condition to detect Reason => "..." pattern.
2255 2015-03-31 Tom de Vries <tom@codesourcery.com>
2258 * terminals.c (child_setup_tty): Fix warning 'argument to sizeof in
2259 bzero call is the same expression as the destination'.
2261 2015-03-26 Eric Botcazou <ebotcazou@adacore.com>
2263 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Deref>: New case.
2265 2015-03-24 Gary Dismukes <dismukes@adacore.com>
2267 * sem_ch3.adb: Minor typo fix (missing paren).
2269 2015-03-24 Robert Dewar <dewar@adacore.com>
2271 * sinfo.ads: Update comment.
2273 2015-03-24 Robert Dewar <dewar@adacore.com>
2275 * exp_attr.adb: Add entry for typ'Deref.
2276 * sem_attr.adb (Deref): New GNAT attribute.
2277 * sem_attr.ads: Add entry for new GNAT attribute Deref.
2278 * snames.ads-tmpl: Add entries for new attribute Deref.
2280 2015-03-24 Ed Schonberg <schonberg@adacore.com>
2282 * sem_ch13.adb (Rep_Item_Too_Early): allow pragma Convention
2285 2015-03-24 Gary Dismukes <dismukes@adacore.com>
2287 * inline.adb: Minor typo fix.
2289 2015-03-24 Arnaud Charlet <charlet@adacore.com>
2291 * doc/gnat_ugn/building_executable_programs_with_gnat.rst,
2292 doc/gnat_ugn/gnat_utility_programs.rst
2293 doc/gnat_rm/implementation_defined_attributes.rst
2294 doc/gnat_rm/implementation_defined_pragmas.rst
2295 doc/gnat_rm/representation_clauses_and_pragmas.rst
2296 doc/gnat_rm/about_this_guide.rst
2297 doc/gnat_rm/implementation_of_ada_2012_features.rst: Doc improvements.
2298 * gnat_rm.texi, gnat_ugn.texi: Regenerate.
2300 2015-03-23 Jakub Jelinek <jakub@redhat.com>
2303 * adadecode.c (ada_demangle): Guard with IN_RTS instead of IN_GCC.
2305 2015-03-20 Eric Botcazou <ebotcazou@adacore.com>
2308 * gcc-interface/utils.c (gnat_pushdecl): Tidy up and improve comment.
2309 Make sure to chain only main variants through TYPE_NEXT_PTR_TO.
2311 * gcc-interface/trans.c (Attribute_to_gnu): Revert latest change.
2313 2015-03-16 Eric Botcazou <ebotcazou@adacore.com>
2315 * gcc-interface/utils2.c (gnat_invariant_expr): Return null if the type
2316 of the expression ends up being composite.
2318 2015-03-16 Eric Botcazou <ebotcazou@adacore.com>
2320 * gcc-interface/decl.c (is_from_limited_with_of_main): New predicate.
2321 (gnat_to_gnu_entity) <E_Subprogram_Type>: Invoke it on return and
2322 parameter types to detect circularities in ASIS mode.
2323 * gcc-interface/trans.c (Attribute_to_gnu): Mention AI05-0151.
2325 2015-03-16 Eric Botcazou <ebotcazou@adacore.com>
2327 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Abstract_State>: Do not
2328 short-circuit the regular handling.
2330 2015-03-13 Robert Dewar <dewar@adacore.com>
2332 * exp_unst.adb (Note_Uplevel_Reference): Eliminate duplicate
2334 (Actual_Ref): New function.
2335 (AREC_String): Minor reformatting.
2336 (Unnest_Subprogram): Use Actual_Ref.
2337 * frontend.adb (Frontend): Turn off Unnest_Subprogram_Mode
2338 before call to Instantiate_Bodies.
2340 2015-03-13 Ed Schonberg <schonberg@adacore.com>
2342 * freeze.adb (Freeze_Profile): If the return type of a function
2343 being frozen is an untagged limited view and the function is
2344 abstract, mark the type as frozen because there is no later
2345 point at which the profile of the subprogram will be elaborated.
2347 2015-03-13 Robert Dewar <dewar@adacore.com>
2349 * einfo.adb, einfo.ads, atree.adb, atree.ads, atree.h: Add seventh
2350 component to entities. Add new fields Field36-41 and Node36-41.
2352 2015-03-13 Claire Dross <dross@adacore.com>
2354 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Rewrite after review.
2356 2015-03-13 Robert Dewar <dewar@adacore.com>
2358 * exp_util.adb (Is_Volatile_Reference): Compile time known
2359 value is never considered to be a volatile reference.
2361 2015-03-13 Robert Dewar <dewar@adacore.com>
2363 * sem_ch3.adb (Analyze_Object_Contract): Suppress "constant
2364 cannot be volatile" for internally generated object (such as
2365 FIRST and LAST constants).
2367 2015-03-13 Ed Schonberg <schonberg@adacore.com>
2369 * sem_ch12.adb (Validate_Access_Subprogram_Instance): If a
2370 convention is specified for the formal parameter, verify that
2371 the actual has the same convention.
2372 * sem_prag.adb (Set_Convention_From_Pragma): Allow convention
2373 pragma to be set on a generic formal type.
2374 * sem_util.adb (Set_Convention): Ignore within an instance,
2375 as it has already been verified in the generic unit.
2377 2015-03-13 Claire Dross <dross@adacore.com>
2379 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do not inline
2380 subprograms with unconstrained record parameters containing
2382 * sinfo.ads Document GNATprove assumption that type should match
2384 * sem_ch6.adb (Analyze_Subprogram_Body_Contract):
2385 Do not check for Refined_Depends and Refined_Globals contracts
2386 as they are optional.
2388 2015-03-13 Ed Schonberg <schonberg@adacore.com>
2390 * sem_ch12.adb (Instantiate_Type): For a floating-point type,
2391 capture dimension info if any, because the generated subtype
2392 declaration does not come from source and will not process dimensions.
2393 * sem_dim,adb (Analyze_Dimension_Extension_Or_Record_Aggregate):
2394 Do not analyze expressions with an initialization procedure
2395 because aggregates will have been checked at the point of record
2398 2015-03-13 Robert Dewar <dewar@adacore.com>
2400 * aspects.ads, aspects.adb: Add entries for aspect Unimplemented.
2401 * einfo.ads, einfo.adb (Is_Unimplemented): New flag.
2402 * sem_ch13.adb: Add dummy entry for aspect Unimplemented.
2403 * snames.ads-tmpl: Add entry for Name_Unimplemented.
2405 2015-03-13 Gary Dismukes <dismukes@adacore.com>
2407 * style.adb (Missing_Overriding): Apply the
2408 Comes_From_Source test to the Original_Node of the subprogram
2409 node, to handle the case of a null procedure declaration that
2410 has been rewritten as an empty procedure body.
2412 2015-03-13 Robert Dewar <dewar@adacore.com>
2414 * exp_util.ads: Minor fix to comment.
2415 * sem_ch3.adb (Constrain_Index): Correct pasto from previous
2418 2015-03-13 Robert Dewar <dewar@adacore.com>
2420 * exp_util.ads, exp_util.adb (Force_Evaluation): Add Related_Id and
2421 Is_Low/High_Bound params.
2422 * sem_ch3.adb (Constrain_Index): Use new Force_Evaluation calling
2423 sequence to simplify generation of FIRST/LAST temps for bounds.
2425 2015-03-12 Olivier Hainque <hainque@adacore.com>
2427 * gcc-interface/trans.c (Attribute_to_gnu) <Code_Address case>:
2428 On targets where a function symbol designates a function descriptor,
2429 fetch the function code address from the descriptor.
2430 (USE_RUNTIME_DESCRIPTORS): Provide a default definition.
2432 2015-03-04 Robert Dewar <dewar@adacore.com>
2434 * sem_warn.adb: Minor reformatting.
2435 * init.c: Minor tweaks.
2437 2015-03-04 Dmitriy Anisimko <anisimko@adacore.com>
2439 * a-coinho-shared.adb: Fix clear of already empty holder.
2441 2015-03-04 Robert Dewar <dewar@adacore.com>
2443 * exp_unst.adb (Check_Dynamic_Type): Ignore library level types.
2444 (Check_Uplevel_Reference_To_Type): Ignore call inside generic.
2445 (Note_Uplevel_Reference): Ignore call inside generic.
2446 (Note_Uplevel_Reference): Fix check for no entity field.
2447 (Unnest_Subprogram): Ignore call inside generic.
2448 (Find_Current_Subprogram): Use Defining_Entity, not Defining_Unit_Name.
2449 (Visit_Node): Ignore calls to Imported subprograms.
2450 (Visit_Node): Fix problem in finding subprogram body in some cases.
2451 (Add_Form_To_Spec): Use Defining_Entity, not Defining_Unit_Name.
2453 2015-03-04 Robert Dewar <dewar@adacore.com>
2455 * einfo.adb (Is_ARECnF_Entity): Removed.
2456 (Last_Formal): Remove special handling of Is_ARECnF_Entity.
2457 (Next_Formal): Remove special handling of Is_ARECnF_Entity.
2458 (Next_Formal_With_Extras): Remove special handling of Is_ARECnF_Entity.
2459 (Number_Entries): Minor reformatting.
2460 * einfo.ads (Is_ARECnF_Entity): Removed.
2461 * exp_unst.adb (Unnest_Subprogram): Remove setting of
2463 (Add_Extra_Formal): Use normal Extra_Formal circuit.
2464 * sprint.adb (Write_Param_Specs): Properly handle case where
2465 there are no source formals, but we have at least one Extra_Formal
2468 2015-03-04 Ed Schonberg <schonberg@adacore.com>
2470 * sem_aggr.adb (Resolve_Record_Aggregate,
2471 Add_Discriminant_Values): If the value is a reference to the
2472 current instance of an enclosing type, use its base type to check
2473 against prefix of attribute reference, because the target type
2474 may be otherwise constrained.
2476 2015-03-04 Robert Dewar <dewar@adacore.com>
2478 * atree.h: Add entries for Flag287-Flag309.
2479 * einfo.adb: Add (unused) flags Flag287-Flag309.
2481 2015-03-04 Ed Schonberg <schonberg@adacore.com>
2483 * sem_util.adb (Collect_Interfaces, Collect): When gathering
2484 interfaces of ancestors, handle properly a subtype of a private
2487 2015-03-04 Robert Dewar <dewar@adacore.com>
2489 * einfo.adb (Is_ARECnF_Entity): New flag (ARECnF is an extra formal).
2490 (Next_Formal): Don't return ARECnF formal.
2491 (Last_Formal): Don't consider ARECnF formal.
2492 (Next_Formal_With_Extras): Do consider ARECnF formal.
2493 * einfo.ads (Is_ARECnF_Entity): New flag (ARECnF is an extra formal).
2494 * exp_unst.adb (Create_Entities): Set Is_ARECnF_Entity flag.
2496 2015-03-04 Javier Miranda <miranda@adacore.com>
2498 * exp_ch6.adb (Expand_Simple_Function_Return): When the returned
2499 object is a class-wide interface object and we generate the
2500 accessibility described in RM 6.5(8/3) then displace the pointer
2501 to the object to reference the base of the object (to get access
2502 to the TSD of the object).
2504 2015-03-04 Hristian Kirtchev <kirtchev@adacore.com>
2506 * sem_prag.adb (Analyze_Abstract_State): Use routine
2507 Malformed_State_Error to issue general errors.
2508 (Analyze_Pragma): Diagnose a syntax error related to a state
2509 declaration with a simple option.
2510 (Malformed_State_Error): New routine.
2512 2015-03-04 Robert Dewar <dewar@adacore.com>
2514 * a-strsup.adb (Super_Slice): Deal with super flat case.
2515 * einfo.ads: Minor reformatting.
2516 * s-imgdec.adb (Set_Decimal_Digits): Add comment about possibly
2519 2015-03-04 Claire Dross <dross@adacore.com>
2521 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
2522 a-cforse.ads, a-cofove.ads: Use Default_Initial_Condition on formal
2525 2015-03-04 Ed Schonberg <schonberg@adacore.com>
2527 * sem_warn.adb (Check_References): When checking for an unused
2528 in-out parameter of a class- wide type, use its type to determine
2529 whether it is private, in order to avoid a spurious warning when
2530 subprogram spec and body are in different units.
2532 2015-03-04 Yannick Moy <moy@adacore.com>
2534 * sem_attr.adb: Improve warning messages.
2536 2015-03-04 Robert Dewar <dewar@adacore.com>
2538 * exp_ch6.adb (Expand_N_Subprogram_Body): Avoid trying to unnest
2539 generic subprograms.
2540 * exp_unst.adb (Check_Dynamic_Type): Handle record types properly
2541 (Note_Uplevel_Reference): Ignore uplevel references to non-types
2542 (Get_Level): Consider only subprograms, not blocks.
2543 (Visit_Node): Set proper condition for generating ARECnF entity.
2544 Ignore indirect calls. Ignore calls to subprograms
2546 (Unnest_Subprogram): Minor changes in dealing with ARECnF entity.
2547 (Add_Form_To_Spec): Properly set Last_Entity field.
2548 (Unnest_Subprogram): Set current subprogram scope for analyze calls.
2549 Handle case of no uplevel refs in outer subprogram
2550 Don't mark uplevel entities as aliased.
2551 Don't deal with calls with no ARECnF requirement.
2553 2015-03-04 Robert Dewar <dewar@adacore.com>
2555 * s-valrea.adb (Scan_Real): Remove redundant tests from scaling loops.
2556 * s-imgdec.adb (Set_Decimal_Digits): Remove redundant Max
2557 operation in computing LZ.
2558 * sem_attr.adb: Minor typo fix
2560 2015-03-04 Robert Dewar <dewar@adacore.com>
2562 * exp_ch7.adb: Minor reformatting.
2563 * exp_unst.adb (Build_Tables): Fix minor glitch for no separate
2565 * erroutc.adb (Delete_Msg): add missing decrement of info msg counter.
2567 2015-03-04 Hristian Kirtchev <kirtchev@adacore.com>
2569 * exp_ch6.adb (Build_Pragma_Check_Equivalent): Suppress
2570 references to formal parameters subject to pragma Unreferenced.
2571 (Suppress_Reference): New routine.
2572 * sem_attr.adb (Analyze_Attribute): Reimplement the analysis
2573 of attribute 'Old. Attributes 'Old and 'Result now share
2575 (Analyze_Old_Result_Attribute): New routine.
2576 (Check_Placement_In_Check): Removed.
2577 (Check_Placement_In_Contract_Cases): Removed.
2578 (Check_Placement_In_Test_Case): Removed.
2579 (Check_Use_In_Contract_Cases): Removed.
2580 (Check_Use_In_Test_Case): Removed.
2581 (In_Refined_Post): Removed.
2582 (Is_Within): Removed.
2583 * sem_warn.adb (Check_Low_Bound_Tested): Code cleanup.
2584 (Check_Low_Bound_Tested_For): New routine.
2586 2015-03-04 Hristian Kirtchev <kirtchev@adacore.com>
2588 * exp_ch3.adb (Expand_N_Object_Declaration):
2589 Generate a runtime check to test the expression of pragma
2590 Default_Initial_Condition when the object is default initialized.
2592 2015-03-02 Robert Dewar <dewar@adacore.com>
2594 * scng.adb (Scan): Ignore illegal character in relaxed
2597 2015-03-02 Ed Schonberg <schonberg@adacore.com>
2599 * sem_ch4.adb (Analyze_Set_Membership); Retain Overloaded flag
2600 on left operand, so it can be properly resolved with type of
2601 alternatives of right operand.
2602 * sem_res.adb (Resolve_Set_Membership): Handle properly an
2603 overloaded left-hand side when the alternatives on the right
2604 hand side are literals of some universal type. Use first
2605 non-overloaded alternative to find expected type.
2607 2015-03-02 Ed Schonberg <schonberg@adacore.com>
2609 * exp_ch7.adb (Make_Set_Finalize_Address_Call): Use underlying
2610 type to retrieve designated type, because the purported access
2611 type may be a partial (private) view, when it is declared in
2612 the private part of a nested package, and finalization actions
2613 are generated when completing compilation of enclosing unit.
2615 2015-03-02 Robert Dewar <dewar@adacore.com>
2617 * back_end.adb (Call_Back_End): Remove previous patch,
2618 the back end now gets to see the result of -gnatd.1
2619 (Unnest_Subprogram_Mode) processing.
2620 * elists.ads, elists.adb (List_Length): New function.
2621 * exp_unst.ads, exp_unst.adb: Major changes, first complete version.
2622 * sem_util.adb (Check_Nested_Access): Handle formals in
2623 Unnest_Subprogram_Mode.
2624 (Adjust_Named_Associations): Minor reformatting.
2625 * sprint.adb (Sprint_Node_Actual): Fix failure to print aliased
2628 2015-03-02 Robert Dewar <dewar@adacore.com>
2630 * atree.ads, atree.adb (Uint24): New function
2631 (Set_Uint24): New procedure.
2632 * atree.h (Uint24): New macro for field access.
2633 * back_end.adb (Call_Back_End): For now, don't call back end
2634 if unnesting subprogs.
2635 * einfo.adb (Activation_Record_Component): New field
2636 (Subps_Index): New field.
2637 * einfo.ads (Activation_Record_Component): New field
2638 (Subps_Index): New field Minor reordering of comments into alpha order.
2639 * exp_unst.ads, exp_unst.adb: Continued development.
2641 2015-03-02 Gary Dismukes <dismukes@adacore.com>
2643 * exp_disp.ads: Minor reformatting.
2645 2015-03-02 Ed Schonberg <schonberg@adacore.com>
2647 * sem_ch8.adb (Chain_Use_Clause): Do not chain use clause from
2648 ancestor to list of use clauses active in descendant unit if we
2649 are within the private part of an intervening parent, to prevent
2650 circularities in use clause list.
2652 2015-03-02 Javier Miranda <miranda@adacore.com>
2654 * exp_ch9.adb (Build_Corresponding_Record): Propagate type
2655 invariants to the corresponding record type.
2656 * exp_disp.ad[sb] (Set_DT_Position_Value): New subprogram
2657 which sets the value of the DTC_Entity associated with a given
2658 primitive of a tagged type and propagates the value to the
2660 (Set_DTC_Entity_Value): Propagate the DTC
2661 value to the wrapped entity.
2662 * sem_ch13.adb (Build_Invariant_Procedure): Append the code
2663 associated with invariants of progenitors.
2664 * sem_ch3.adb (Build_Derived_Record_Type): Inherit type invariants
2665 of parents and progenitors.
2666 (Process_Full_View): Check hidden inheritance of class-wide type
2668 * sem_ch7.adb (Analyze_Package_Specification): Do not generate
2669 the invariant procedure for interface types; build the invariant
2670 procedure for tagged types inheriting invariants from their
2672 * sem_prag.adb (Pragma_Invariant) Allow invariants in interface
2673 types but do not build their invariant procedure since their
2674 invariants will be propagated to the invariant procedure of
2675 types covering the interface.
2676 * exp_ch6.adb, exp_disp.adb, sem_ch3.adb, sem_ch7.adb,
2677 sem_ch8.adb, sem_disp.adb: Replace all calls to Set_DT_Position
2678 by calls to Set_DT_Position_Value.
2680 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
2682 * sem_attr.adb (Analyze_Attribute): Factor out heavily indented
2683 code in Denote_Same_Function. Do not analyze attribute 'Result
2684 when it is inside procedure _Postconditions. Remove a misplaced
2685 warning diagnostic. Code cleanup.
2686 (Denote_Same_Function): New routine.
2687 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Code
2688 cleanup. Warn on pre/postconditions on an inlined subprogram.
2689 (Analyze_Pragma, Refined_Post case): Warn on pre/postconditions on
2690 an inlined subprogram.
2691 (Analyze_Pre_Post_Condition_In_Decl_Part): Code cleanup. Warn on
2692 pre/post condition on an inlined subprogram.
2693 (Analyze_Test_Case_In_Decl_Part): Code cleanup. Warn on
2694 pre/postconditions on an inlined subprogram.
2695 (Check_Postcondition_Use_In_Inlined_Subprogram): New routine.
2697 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
2699 * sem_prag.adb (Ensure_Aggregate_Form):
2700 Ensure that the name denoted by the Chars of a pragma argument
2701 association has the proper Sloc when converted into an aggregate.
2703 2015-03-02 Bob Duff <duff@adacore.com>
2705 * sem_ch6.adb (Check_Private_Overriding): Capture
2706 Incomplete_Or_Partial_View in a constant. This is cleaner and
2709 2015-03-02 Gary Dismukes <dismukes@adacore.com>
2711 * einfo.ads, exp_unst.ads: Minor reformatting.
2713 2015-03-02 Ed Schonberg <schonberg@adacore.com>
2715 * a-strsea.adb (Find_Token): Ensure that the range of iteration
2716 does not perform any improper character access. This prevents
2717 erroneous access in the unusual case of an empty string target
2718 and a From parameter less than Source'First.
2720 2015-03-02 Robert Dewar <dewar@adacore.com>
2722 * elists.adb (List_Length): Fix incorrect result.
2724 2015-03-02 Bob Duff <duff@adacore.com>
2726 * sem_ch6.adb (Check_Private_Overriding): Refine the legality
2727 checks here. It used to check that the function is merely
2728 overriding SOMEthing. Now it checks that the function is
2729 overriding a corresponding public operation. This is a correction
2730 to the implementation of the rule in RM-3.9.3(10).
2732 2015-03-02 Robert Dewar <dewar@adacore.com>
2734 * debug.adb: Document new debug flag -gnatd.1.
2735 * einfo.ads, einfo.adb (Has_Nested_Subprogram): New flag.
2736 (Has_Uplevel_Reference): New flag (Is_Static_Type): New flag.
2737 (Uplevel_Reference_Noted):New flag (Uplevel_References): New field.
2738 * elists.ads elists.adb (List_Length): New function.
2739 * exp_ch6.adb (Expand_N_Subprogram_Body): Call Unnest_Subprogram
2740 when appropriate (Process_Preconditions): Minor code
2741 reorganization and reformatting
2742 * exp_unst.ads, exp_unst.adb: New files.
2743 * gnat1drv.adb (Adjust_Global_Switches): Set
2744 Unnest_Subprogram_Mode if -gnatd.1
2745 * namet.ads, namet.adb (Name_Find_Str): New version of Name_Find with
2747 * opt.ads (Unnest_Subprogram_Mode): New flag.
2748 * par-ch3.adb (P_Identifier_Declarations): Fixes to -gnatd.2 handling.
2749 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set
2750 Has_Nested_Subprogram flag.
2751 * sem_ch8.adb (Find_Direct_Name): New calling sequence for
2752 Check_Nested_Access.
2753 (Find_Selected_Component): Minor comment addition.
2754 * sem_util.adb (Check_Nested_Access): New version for use with Exp_Unst.
2755 (Note_Possible_Modification): New calling sequence for
2756 Check_Nested_Access.
2757 * sem_util.ads (Check_Nested_Access): New version for use with Exp_Unst.
2758 * gcc-interface/Make-lang.in (GNAT1_OBJS): Add exp_unst.o
2760 2015-03-02 Pierre-Marie de Rodat <derodat@adacore.com>
2762 * gcc-interface/utils.c (gnat_pushdecl): For non-artificial pointer
2763 types, preserve the original type and create copies just like the C
2764 front-end does. For artificial ones, do not define a name for
2766 (create_type_decl): When gnat_pushdecl made the input type the
2767 original type for the new declaration, do not define a stub
2769 * gcc-interface/utils2.c (build_binary_op): Accept two different
2770 pointer types when they point to the same type.
2772 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
2774 * exp_util.adb (Possible_Bit_Aligned_Component): Do not process
2776 * sem_util.adb (Kill_Current_Values): Do not invalidate and
2779 2015-03-02 Robert Dewar <dewar@adacore.com>
2781 * sem_ch3.adb, exp_attr.adb, checks.adb, exp_aggr.adb: Minor
2784 2015-03-02 Ed Schonberg <schonberg@adacore.com>
2786 * sem_ch8.adb: extend use of Available_Subtype.
2788 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
2790 * sem_prag.adb (Duplication_Error): Remove the special handling
2791 of 'Class or _Class in the context of pre/postconditions.
2792 (Process_Class_Wide_Condition): Remove the special handling of
2793 'Class or _Class in the context of pre/postconditions.
2794 * sem_util.adb (Original_Aspect_Pragma_Name): Names Pre_Class
2795 and Post_Class no longer need to be converted to _Pre and _Post.
2796 * sem_util.ads (Original_Aspect_Pragma_Name): Update the comment
2799 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
2801 * exp_ch6.adb (Process_Preconditions): Modify the
2802 mechanism that find the first source declaration to correct exit
2803 the loop once it has been found.
2805 2015-03-02 Gary Dismukes <dismukes@adacore.com>
2807 * a-strsea.adb: Minor typo fix.
2809 2015-03-02 Bob Duff <duff@adacore.com>
2811 * einfo.ads: Minor comment fixes.
2813 2015-03-02 Gary Dismukes <dismukes@adacore.com>
2815 * einfo.adb, checks.adb: Minor reformatting and typo fixes.
2817 2015-03-02 Ed Schonberg <schonberg@adacore.com>
2819 * exp_aggr.adb (Get_Assoc_Expr): If the Default_Component_Value
2820 is defined for the array type, use it instead of a Default_Value
2821 specified for the component type itself.
2823 2015-03-02 Thomas Quinot <quinot@adacore.com>
2825 * exp_attr.adb (Expand_N_Attribute_Reference, case Input): When
2826 expanding a 'Input attribute reference for a class-wide type,
2827 do not generate a separate object declaration for the controlling
2828 tag dummy object; instead, generate the expression inline in the
2829 dispatching call. Otherwise, the declaration (which involves a
2830 call to String'Input, returning a dynamically sized value on the
2831 secondary stack) will be expanded outside of proper secondary
2832 stack mark/release operations, and will thus cause a secondary
2835 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
2837 * checks.adb (Add_Validity_Check): Change the names of all
2838 formal parameters to better illustrate their purpose. Update
2839 the subprogram documentation. Update all occurrences of the
2840 formal parameters. Generate a pre/postcondition pragma by
2841 calling Build_Pre_Post_Condition.
2842 (Build_PPC_Pragma): Removed.
2843 (Build_Pre_Post_Condition): New routine.
2844 * einfo.adb Node8 is no longer used as Postcondition_Proc. Node14
2845 is now used as Postconditions_Proc. Flag240 is now renamed to
2846 Has_Expanded_Contract. (First_Formal): The routine can now
2847 operate on generic subprograms.
2848 (First_Formal_With_Extras): The routine can now operate on generic
2850 (Has_Expanded_Contract): New routine.
2851 (Has_Postconditions): Removed.
2852 (Postcondition_Proc): Removed.
2853 (Postconditions_Proc): New routine.
2854 (Set_Has_Expanded_Contract): New routine.
2855 (Set_Has_Postconditions): Removed.
2856 (Set_Postcondition_Proc): Removed.
2857 (Set_Postconditions_Proc): New routine.
2858 (Write_Entity_Flags): Remove the output of Has_Postconditions. Add
2859 the output of Has_Expanded_Contract.
2860 (Write_Field8_Name): Remove the output of Postcondition_Proc.
2861 (Write_Field14_Name): Add the output of Postconditions_Proc.
2862 * einfo.ads New attributes Has_Expanded_Contract and
2863 Postconditions_Proc along with occurrences in entities.
2864 Remove attributes Has_Postconditions and Postcondition_Proc
2865 along with occurrences in entities.
2866 (Has_Expanded_Contract): New routine along with pragma Inline.
2867 (Has_Postconditions): Removed along with pragma Inline.
2868 (Postcondition_Proc): Removed along with pragma Inline.
2869 (Postconditions_Proc): New routine along with pragma Inline.
2870 (Set_Has_Expanded_Contract): New routine along with pragma Inline.
2871 (Set_Has_Postconditions): Removed along with pragma Inline.
2872 (Set_Postcondition_Proc): Removed along with pragma Inline.
2873 (Set_Postconditions_Proc): New routine along with pragma Inline.
2874 * exp_ch6.adb (Add_Return): Code cleanup. Update the
2875 generation of the call to the _Postconditions routine of
2876 the procedure. (Expand_Non_Function_Return): Reformat the
2877 comment on usage. Code cleanup. Update the generation of
2878 the call to the _Postconditions routine of the procedure or
2880 (Expand_Simple_Function_Return): Update the
2881 generation of the _Postconditions routine of the function.
2882 (Expand_Subprogram_Contract): Reimplemented.
2883 * exp_ch6.ads (Expand_Subprogram_Contract): Update the parameter
2884 profile along the comment on usage.
2885 * exp_ch9.adb (Build_PPC_Wrapper): Code cleanup.
2886 (Expand_N_Task_Type_Declaration): Generate pre/postconditions
2887 wrapper when the entry [family] has a contract with
2889 * exp_prag.adb (Expand_Attributes_In_Consequence): New routine.
2890 (Expand_Contract_Cases): This routine and its subsidiaries now
2891 analyze all generated code.
2892 (Expand_Old_In_Consequence): Removed.
2893 * sem_attr.adb Add with and use clause for Sem_Prag.
2894 (Analyze_Attribute): Reimplment the analysis of attribute 'Result.
2895 (Check_Use_In_Test_Case): Use routine Test_Case_Arg to obtain
2897 * sem_ch3.adb (Analyze_Declarations): Analyze the contract of
2898 a generic subprogram.
2899 (Analyze_Object_Declaration): Do not create a contract node.
2900 (Derive_Subprogram): Do not create a contract node.
2901 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Do
2902 not create a contract node.
2903 (Analyze_Completion_Contract): New routine.
2904 (Analyze_Function_Return): Alphabetize.
2905 (Analyze_Generic_Subprogram_Body): Alphabetize. Do not create a
2906 contract node. Do not copy pre/postconditions to the original
2908 (Analyze_Null_Procedure): Do not create a contract node.
2909 (Analyze_Subprogram_Body_Contract): Reimplemented.
2910 (Analyze_Subprogram_Body_Helper): Do not mark the enclosing scope
2911 as having postconditions. Do not create a contract node. Analyze
2912 the subprogram body contract of a body that acts as a compilation
2913 unit. Expand the subprogram contract after the declarations have
2915 (Analyze_Subprogram_Contract): Reimplemented.
2916 (Analyze_Subprogram_Specification): Do not create a contract node.
2917 (List_Inherited_Pre_Post_Aspects): Code cleanup.
2918 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Update the
2920 (Analyze_Subprogram_Contract): Update the
2921 parameter profile and the comment on usage.
2922 * sem_ch7.adb (Analyze_Package_Body_Helper): Do not create a
2924 (Analyze_Package_Declaration): Do not create a
2926 (Is_Subp_Or_Const_Ref): Ensure that the prefix has an entity.
2927 * sem_ch8.adb (Analyze_Subprogram_Renaming): Do not create a
2929 * sem_ch9.adb (Analyze_Entry_Declaration): Do not create a
2931 * sem_ch10.adb (Analyze_Compilation_Unit): Move local variables to
2932 their proper section and alphabetize them. Analyze the contract of
2933 a [generic] subprogram after all Pragmas_After have been analyzed.
2934 (Analyze_Subprogram_Body_Stub_Contract): Alphabetize.
2935 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Do not
2936 create a contract node.
2937 (Analyze_Generic_Subprogram_Declaration):
2938 Alphabetize local variables. Do not create a contract
2939 node. Do not generate aspects out of pragmas for ASIS.
2940 (Analyze_Subprogram_Instantiation): Instantiate
2941 the contract of the subprogram. Do not create a
2942 contract node. (Instantiate_Contract): New routine.
2943 (Instantiate_Subprogram_Body): Alphabetize local variables.
2944 (Save_Global_References_In_Aspects): New routine.
2945 (Save_References): Do not save the global references found within
2946 the aspects of a generic subprogram.
2947 * sem_ch12.ads (Save_Global_References_In_Aspects): New routine.
2948 * sem_ch13.adb (Analyze_Aspect_Specifications): Do not use
2949 Original_Node for establishing linkages.
2950 (Insert_Pragma): Insertion in a subprogram body takes precedence over
2951 the case where the subprogram body is also a compilation unit.
2952 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Use
2953 Get_Argument to obtain the proper expression. Install the generic
2954 formals when the related context is a generic subprogram.
2955 (Analyze_Depends_In_Decl_Part): Use Get_Argument to obtain
2956 the proper expression. Use Corresponding_Spec_Of to obtain
2957 the spec. Install the generic formal when the related context
2958 is a generic subprogram.
2959 (Analyze_Global_In_Decl_Part): Use Get_Argument to obtain the proper
2960 expression. Use Corresponding_Spec_Of to obtain the spec. Install the
2961 generic formal when the related context is a generic subprogram.
2962 (Analyze_Initial_Condition_In_Decl_Part): Use Get_Argument
2963 to obtain the proper expression. Remove the call to
2964 Check_SPARK_Aspect_For_ASIS as the analysis is now done
2966 (Analyze_Pragma): Update all occurrences
2967 to Original_Aspect_Name. Pragmas Contract_Cases, Depends,
2968 Extensions_Visible, Global, Postcondition, Precondition and
2969 Test_Case now carry generic templates when the related context
2970 is a generic subprogram. The same pragmas are no longer
2971 forcefully fully analyzed when the context is a subprogram
2972 that acts as a compilation unit. Pragmas Abstract_State,
2973 Initial_Condition, Initializes and Refined_State have been clean
2974 up. Pragmas Post, Post_Class, Postcondition, Pre, Pre_Class
2975 and Precondition now use the same routine for analysis. Pragma
2976 Refined_Post does not need to check the use of 'Result or
2977 the lack of a post-state in its expression. Reimplement the
2978 analysis of pragma Test_Case.
2979 (Analyze_Pre_Post_Condition): New routine.
2980 (Analyze_Pre_Post_Condition_In_Decl_Part):
2982 (Analyze_Refined_Depends_In_Decl_Part): Use Get_Argument to obtain the
2984 (Analyze_Refined_Global_In_Decl_Part): Use Get_Argument to obtain
2985 the proper expression.
2986 (Analyze_Test_Case_In_Decl_Part): Reimplemented.
2987 (Check_Pre_Post): Removed.
2988 (Check_Precondition_Postcondition): Removed.
2989 (Check_SPARK_Aspect_For_ASIS): Removed.
2990 (Check_Test_Case): Removed.
2991 (Collect_Subprogram_Inputs_Outputs): Use Get_Argument
2992 to obtain the proper expression. Use Corresponding_Spec_Of to
2993 find the proper spec.
2994 (Create_Generic_Template): New routine.
2995 (Duplication_Error): New routine.
2996 (Expression_Function_Error): New routine.
2997 (Find_Related_Subprogram_Or_Body): Moved to the spec
2998 of Sem_Prag. Emit precise error messages. Account for cases of
2999 rewritten expression functions, generic instantiations, handled
3000 sequence of statements and pragmas from aspects.
3001 (Get_Argument): New routine.
3002 (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Removed.
3003 (Preanalyze_CTC_Args): Removed.
3004 (Process_Class_Wide_Condition): New routine.
3005 * sem_prag.ads (Analyze_Test_Case_In_Decl_Part): Update
3006 the parameter profile along with the comment on usage.
3007 (Find_Related_Subprogram_Or_Body): Moved from the body of Sem_Prag.
3008 (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Removed.
3009 (Test_Case_Arg): New routine.
3010 * sem_util.adb Add with and use clauses for Sem_Ch6.
3011 (Add_Contract_Item): This routine now creates a contract
3012 node the first time an item is added. Remove the duplicate
3013 aspect/pragma checks.
3014 (Check_Result_And_Post_State): Reimplemented.
3015 (Corresponding_Spec_Of): New routine.
3016 (Get_Ensures_From_CTC_Pragma): Removed.
3017 (Get_Requires_From_CTC_Pragma): Removed.
3018 (Has_Significant_Contract): New routine.
3019 (Inherit_Subprogram_Contract): Inherit only if the source
3021 (Install_Generic_Formals): New routine.
3022 (Original_Aspect_Name): Removed.
3023 (Original_Aspect_Pragma_Name): New routine.
3024 * sem_util.ads (Check_Result_And_Post_State): Reimplemented.
3025 (Corresponding_Spec_Of): New routine.
3026 (Get_Ensures_From_CTC_Pragma): Removed.
3027 (Get_Requires_From_CTC_Pragma): Removed.
3028 (Has_Significant_Contract): New routine.
3029 (Install_Generic_Formals): New routine.
3030 (Original_Aspect_Name): Removed.
3031 (Original_Aspect_Pragma_Name): New routine.
3032 * sem_warn.adb Add with and use clauses for Sem_Prag.
3033 (Within_Postcondition): Use Test_Case_Arg to extract "Ensures".
3035 2015-03-02 Ed Schonberg <schonberg@adacore.com>
3037 * sem_ch8.adb (Available_Subtype): Optimization in
3038 Find_Selected_Component: when safe, use existing subtype of
3039 array component, possibly discriminant-dependent, rather than
3040 creating new subtype declaration for it. In this fashion different
3041 occurrences of the component have the same subtype, rather than
3042 just equivalent ones. Simplifies value tracing in GNATProve.
3044 2015-03-01 Arnaud Charlet <charlet@adacore.com>
3048 * doc/gnat_ugn/gnat_project_manager.rst,
3049 doc/gnat_ugn/platform_specific_information.rst: Remove reference to
3050 image, too troublesome with texi format.
3051 * gnat_ugn.texi: Regenerate.
3053 2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
3056 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8): Remove.
3057 (DEF_FUNCTION_TYPE_VAR_12): Likewise.
3058 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
3060 2015-02-23 Thomas Schwinge <thomas@codesourcery.com>
3062 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8): Fix number of
3063 arguments parameter.
3064 (DEF_FUNCTION_TYPE_VAR_12): Likewise.
3066 2015-02-22 Arnaud Charlet <charlet@adacore.com>
3068 * doc/Makefile: postprocess texinfo files to update @dircategory
3069 and update texi files under gcc/ada.
3070 * gnat_ugn.texi, gnat_rm.texi: Regenerated.
3072 2015-02-22 Arnaud Charlet <charlet@adacore.com>
3074 * doc/gnat_ugn/project-manager-figure.png,
3075 doc/gnat_ugn/rtlibrary-structure.png: New.
3077 2015-02-22 Tom de Vries <tom@codesourcery.com>
3080 * gnat-style.texi (@subsection Loop Statements): Replace @noindent by
3081 @item, and fix warning '@itemize has text but no @item'.
3083 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3085 * sem_prag.adb (Analyze_Pragma, case Obsolescent): Pragma
3086 legally applies to an abstract subprogram declaration.
3087 * freeze.adb: Minor comment addition.
3089 2015-02-20 Robert Dewar <dewar@adacore.com>
3091 * errout.ads: Document replacement of Name_uPre/Post/Type_Invariant.
3092 * erroutc.adb (Set_Msg_Str): Replace _xxx.
3093 (Pre/Post/Type_Invariant) by xxx'Class.
3094 * erroutc.ads (Set_Msg_Str): Replace _xxx.
3095 (Pre/Post/Type_Invariant) by xxx'Class.
3096 * sem_prag.adb (Fix_Error): Remove special casing of
3097 Name_uType_Invariant.
3098 (Analyze_Pre_Post_Condition_In_Decl_Part): Remove special casing of
3099 Name_uPre and Name_uPost in aspect case (done in Errout now).
3101 2015-02-20 Robert Dewar <dewar@adacore.com>
3103 * g-alveop.adb: Minor style fixes.
3105 2015-02-20 Robert Dewar <dewar@adacore.com>
3107 * freeze.adb (Warn_Overlay): Guard against blow up with address
3110 2015-02-20 Bob Duff <duff@adacore.com>
3112 * exp_attr.adb (May_Be_External_Call): Remove this. There is no need
3113 for the compiler to guess whether the call is internal or external --
3114 it is always external.
3115 (Expand_Access_To_Protected_Op): For P'Access, where P
3116 is a protected subprogram, always create a pointer to the
3117 External_Subprogram.
3119 2015-02-20 Robert Dewar <dewar@adacore.com>
3121 * a-dispat.adb, a-stcoed.ads: Minor reformatting.
3123 2015-02-20 Robert Dewar <dewar@adacore.com>
3125 * sem_ch13.adb (Build_Discrete_Static_Predicate): Allow static
3126 predicate for non-static subtype.
3127 (Build_Predicate_Functions): Do not assume subtype associated with a
3128 static predicate must be static.
3130 2015-02-20 Robert Dewar <dewar@adacore.com>
3132 * errout.adb (Set_Msg_Node): Better handling of internal names
3133 (Set_Msg_Node): Kill message when we cannot eliminate internal name.
3134 * errout.ads: Document additional case of message deletion.
3135 * namet.adb (Is_Internal_Name): Refined to consider wide
3136 strings in brackets notation and character literals not to be
3138 * sem_ch8.adb (Find_Selected_Component): Give additional error
3139 when selector name is a subprogram whose first parameter has
3140 the same type as the prefix, but that type is untagged.
3142 2015-02-20 Robert Dewar <dewar@adacore.com>
3144 * g-allein.ads, g-alveop.adb, g-alveop.ads, opt.ads: Minor reformatting
3146 2015-02-20 Tristan Gingold <gingold@adacore.com>
3148 * opt.ads (GNAT_Mode_Config): New variable.
3149 * opt.adb (Set_Opt_Config_Switches): Consider GNAT_Mode_Config
3150 to set Assertions_Enabled.
3151 * switch-c.adb (Scan_Front_End_Switches): Set GNAT_Mode_Config
3154 2015-02-20 Robert Dewar <dewar@adacore.com>
3156 * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Add an additional
3157 comment regarding the handling of unterminated fixed-point
3159 * s-valuns.ads (Scan_Raw_Unsigned): Add comments
3160 corresponding to those previously added for
3161 System.Val_LLU.Scan_Raw_Long_Long_Unsigned.
3163 2015-02-20 Olivier Hainque <hainque@adacore.com>
3165 * g-allein.ads, g-alveop.ads, g-alveop.adb: Code clean ups.
3167 2015-02-20 Robert Dewar <dewar@adacore.com>
3169 * sem_prag.adb: Minor comment clarification.
3171 2015-02-20 Olivier Hainque <hainque@adacore.com>
3173 * g-allein.ads (vec_ctf, vec_vcsfx, vec_vcfux): Remove.
3174 * g-alleve.ads, g-alleva.adb (vcfux): Likewise.
3175 * g-alveop.ads (vec_vcfsx, vec_vcfux): Just rename the ll versions.
3176 (vec_ctf): Now renamings as well.
3178 2015-02-20 Robert Dewar <dewar@adacore.com>
3180 * switch-c.adb, bindgen.adb: Minor reformatting.
3182 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3184 * sem_prag.adb (Analyze_Pragma, case Type_Invariant):
3185 Invariant'class is allowed on an abstract type.
3187 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3189 * sem_ch3.adb (Access_Definition): If the access definition is
3190 for a protected component and defines an access to protected
3191 subprogram, do not create an itype reference for it because a
3192 full type declaration will be built in order to generate the
3193 proper equivalent type.
3194 (Analyze_Subtype_Declaration): Add information of incomplete
3195 subtypes, for Ada 2012 extended uses of incomplete types.
3197 2015-02-20 Gary Dismukes <dismukes@adacore.com>
3199 * sem_res.adb: Minor reformatting.
3201 2015-02-20 Vincent Celier <celier@adacore.com>
3203 * switch-c.adb (Scan_Front_End_Switches): When comparing runtime
3204 path name for several switches --RTS, use the normalized path
3207 2015-02-20 Vincent Celier <celier@adacore.com>
3209 * bindgen.adb: Minor reformatting and code reorganization.
3211 2015-02-20 Jose Ruiz <ruiz@adacore.com>
3213 * a-stcoed.ads: Add spec for this package (Unimplemented_Unit).
3214 * impunit.adb (Non_Imp_File_Names_12): Mark unit a-stcoed.ads as
3215 defined by Ada 2012.
3217 2015-02-20 Arnaud Charlet <charlet@adacore.com>
3219 * sysdep.c, expect.c, s-oscons-tmplt.c, gsocket.h, adaint.c: Remove
3220 obsolete references to RTX, nucleus, VMS.
3222 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3224 * sem_prag.adb (Fix_Error): For an illegal Type_Invariant'Class
3225 aspect, use name that mentions Class explicitly, rather than
3226 compiler-internal name.
3228 2015-02-20 Robert Dewar <dewar@adacore.com>
3230 * debug.adb: Add documentation for -gnatd.2 (allow statements
3232 * par-ch3.adb (P_Identifier_Declarations): Handle
3233 statement appearing where declaration expected more cleanly.
3234 (Statement_When_Declaration_Expected): Implement debug flag
3237 2015-02-20 Jose Ruiz <ruiz@adacore.com>
3239 * a-dinopr.ads: Add spec for this package (Unimplemented_Unit).
3240 * a-dispat.ads (Yield): Include procedure added in Ada 2012.
3241 * a-dispat.adb (Yield): Implement procedure added in Ada 2012.
3242 * impunit.adb (Non_Imp_File_Names_05): Mark unit a-dinopr.ads as
3243 defined by Ada 2005.
3244 * snames.ads-tmpl (Name_Non_Preemptive_FIFO_Within_Priorities):
3245 This is the correct name for the dispatching policy (FIFO was
3248 2015-02-20 Javier Miranda <miranda@adacore.com>
3250 * sem_res.adb (Resolve_Type_Conversion): If the type of the
3251 operand is the limited-view of a class-wide type then recover
3252 the class-wide type of the non-limited view.
3254 2015-02-20 Arnaud Charlet <charlet@adacore.com>
3256 * gcc-interface/Makefile.in: Remove references to nucleus.
3257 * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Procedure): Set
3258 extern_flag to true for Inline_Always subprograms with
3259 Intrinsic convention.
3261 2015-02-20 Yannick Moy <moy@adacore.com>
3263 * sem_prag.ads: Minor typo in comment.
3265 2015-02-20 Pascal Obry <obry@adacore.com>
3267 * s-osprim-mingw.adb: Fix Get_Base_Time parameter mode.
3269 2015-02-20 Vincent Celier <celier@adacore.com>
3271 * makeutl.adb (Get_Directories.Add_Dir): Add a directory only
3274 2015-02-20 Robert Dewar <dewar@adacore.com>
3276 * sem_eval.ads: Minor reformatting.
3278 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
3280 * freeze.adb (Size_Known): Do not set the packed size for
3281 independent type or component.
3282 (Freeze_Array_Type): Check for Independent[_Components] with packing
3283 or explicit component size clause.
3284 * gnat1drv.adb (Post_Compilation_Validation_Checks): Do the validation
3285 of independence pragmas only for non-GCC back-ends.
3286 * sem_ch13.adb (Initialize): Likewise for the initialization.
3287 * sem_prag.adb (Record_Independence_Check): New procedure to record an
3288 independence check in the table.
3289 (Analyze_Pragma): Use it throughout instead of doing it manually.
3290 * gcc-interface/decl.c (gnat_to_gnu_field): Add support for
3291 independent type or component.
3293 2015-02-20 Thomas Quinot <quinot@adacore.com>
3295 * adaint.c (__gnat_readdir): For Solaris, use 64 bit variants of
3296 struct direct and readdir. This is required for NFS filesystems
3297 mounted from servers that use 64-bit cookies.
3299 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3301 * sem_ch12.adb (Analyze_Subprogram_Instantiaion): New subprogram
3302 Build_Subprogram_Renaming, to create renaming of subprogram
3303 instance in the the declaration of the wrapper package rather
3304 than in its body, so that it is available for analysis of aspects
3305 propagated from generic to instantiation.
3306 (Check_Mismatch): An actual for a formal package that is an
3307 incomplete type matches a formal type that is incomplete.
3308 (Instantiate_Package_Body): Move code that builds subprogram
3309 renaming to Analyze_Subprogram_Instantiation.
3310 (Instantiate_Type): The generated subtype is a limited view if
3311 the actual is a limited view.
3312 (Load_Parent_Of_Generic): Retrieve instance declaration from
3313 its new position within wrapper package.
3315 2015-02-20 Arnaud Charlet <charlet@adacore.com>
3317 * s-parame-vxworks.adb, s-os_lib.ads: Update comments.
3319 2015-02-20 Robert Dewar <dewar@adacore.com>
3321 * s-osinte-vxworks.ads (To_Timespec): Add comment about the
3322 issue of negative arguments.
3324 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
3326 * gnat1drv.adb: Minor consistency fix.
3328 2015-02-20 Pascal Obry <obry@adacore.com>
3330 * s-osprim-mingw.adb (Get_Base_Time): Properly release lock in all
3333 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
3335 * inline.adb (Expand_Inlined_Call): Skip again calls to subprogram
3337 * exp_ch6.adb (Expand_Call): Use back-end inlining
3338 instead of expansion for simple subprogram renamings.
3340 2015-02-20 Robert Dewar <dewar@adacore.com>
3342 * exp_util.adb: Minor reformatting.
3344 2015-02-20 Vincent Celier <celier@adacore.com>
3346 * switch-c.adb (Scan_Front_End_Switches): Do not fail when --RTS=
3347 is specified several times with different values that indicates
3348 the same runtime directory.
3350 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3352 * sem_attr.adb (Check_Not_Incomplete_Type): Clean up code to
3353 handle properly illegal uses of attributes on prefixes on an
3354 incomplete type, both when the type of the prefix is locally
3355 incomplete, and when it is a limited view of a type whose
3356 non-limited view is not available.
3357 (Analyze_Attribute): Add calls to Check_Not_Incomplete_Type for
3358 'Address and others.
3360 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
3362 * exp_ch6.adb: Fix minor typo in comment.
3364 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
3366 * sinfo.ads: Add comment.
3368 2015-02-20 Olivier Hainque <hainque@adacore.com>
3370 * opt.ads: Replace Opt.Suppress_All_Inlining by two separate
3371 flags controlling the actual FE inlining out of pragma Inline
3372 and pragma Inline_Always.
3373 * adabkend.adb (Scan_Compiler_Arguments): Set both flags to True
3374 on -fno-inline, which disables all inlining in compilers with
3375 an Ada back-end and without back-end inlining support.
3376 * back_end.adb (Scan_Back_End_Switches): Set the Inline related
3377 flag to True on -fno-inline and leave Inline_Always alone for
3379 * back_end.ads (Scan_Compiler_Arguments): Adjust spec wrt the
3380 names of the Opt flags it sets.
3381 * gnat1drv.adb (Adjust_Global_Switches): Remove test on
3382 Opt.Suppress_All_Inlining in the Back_End_Inlining computation.
3383 * sem_prag.adb (Make_Inline): Remove early return conditioned
3384 on Opt.Suppress_All_Inlining.
3385 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Use the flags to
3386 disable the calls to Build_Body_To_Inline otherwise triggered
3387 by pragma Inline or Inline_Always. This will prevent actual
3388 front-end inlining of the subprogram on calls.
3390 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
3392 * exp_ch3.adb (Default_Initialize_Object): Call Add_Inlined_Body on the
3393 Abort_Undefer_Direct function.
3394 * exp_ch5.adb (Expand_N_Assignment_Statement): Likewise.
3395 * exp_intr.adb (Expand_Unc_Deallocation): Likewise.
3396 * exp_prag.adb (Expand_Pragma_Abort_Defer): Likewise.
3397 * exp_ch4.adb (Expand_N_Selected_Component): Adjust call to
3399 * exp_ch6.adb (Expand_Call): Adjust calls to Add_Inlined_Body.
3400 Remove call to Register_Backend_Call and move code resetting
3401 Needs_Debug_Info on inlined subprograms to...
3402 * inline.ads (Add_Inlined_Body): Add N parameter.
3403 (Register_Backend_Call): Delete.
3404 * inline.adb (Add_Inlined_Body): ...here and simplify.
3405 Register the call with Backend_Calls directly.
3406 (Register_Backend_Call): Delete.
3407 * s-stalib.ads (Abort_Undefer_Direct): Restore pragma Inline.
3409 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
3411 * s-stalib.ads: Fix typo.
3413 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3415 * exp_ch3.adb (Default_Initialize_Object): If the object has a
3416 delayed freeze, the actions associated with default initialization
3417 must be part of the freeze actions, rather that being inserted
3418 directly after the object declaration.
3420 2015-02-20 Robert Dewar <dewar@adacore.com>
3422 * lib-load.adb: Minor comment update.
3424 2015-02-20 Vincent Celier <celier@adacore.com>
3426 * prj-proc.adb (Process_Case_Construction): When there are
3427 incomplete withed projects and the case variable is unknown,
3428 skip the case construction.
3430 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3432 * exp_ch6.adb (Expand_Actuals): Add caller-side invariant checks
3433 when an actual is a view conversion, either because the call is
3434 to an inherited operation, or because the actual is an explicit
3435 type conversion to an ancestor type. Fixes ACATS 4.0D: C732001
3437 2015-02-20 Robert Dewar <dewar@adacore.com>
3439 * einfo.ads: Minor comment updates Fix missing pragma Inline
3440 for Set_Partial_View_Has_Unknown_Discr.
3441 * einfo.adb (Write_Entity_Flags): Add missing entry for
3442 Partial_View_Has_Unknown_Discr.
3443 * sem_ch3.adb: Minor reformatting.
3445 2015-02-20 Vincent Celier <celier@adacore.com>
3447 * opt.ads: Minor cleanup: remove mention of gprmake.
3448 * s-stalib.ads (Abort_Undefer_Direct): Do not inline.
3449 * s-tataat.adb: Do not call System.Tasking.Self but directly
3450 System.Task_Primitives.Operations.Self.
3452 2015-02-20 Arnaud Charlet <charlet@adacore.com>
3454 * gnat_rm.texi, gnat_ugn.texi: Now automatically generated from
3455 sphinx in the doc directory.
3456 * doc: New directory containing sphinx versions of gnat_rm and gnat_ugn
3458 2015-02-20 Robert Dewar <dewar@adacore.com>
3460 * sem_res.adb: Minor reformatting.
3461 * exp_ch9.adb (Build_Protected_Spec): Copy Aliased setting when
3463 * sem_ch13.adb (Analyze_Aspect_Specifications): Exclude Boolean
3464 aspects from circuitry setting delay required to false if the
3465 argument is an integer literal.
3467 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3469 * einfo.ads. einfo.adb (Partial_View_Has_Unknown_Discr): New flag
3470 on type entities, to enforce AI12-0133: default initialization
3471 of types whose partial view has unknown discriminants does not
3472 get an invariant check, because clients of the unit can never
3473 declare objects of such types.
3474 * sem_ch3.adb (Find_Type_Name); Set new flag
3475 Partial_View_Has_Unknown_Discr when needed.
3476 * exp_ch3.adb (Expand_N_Object_Declaration): Use flag to suppress
3477 generation of invariant call on default-initialized object.
3479 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
3481 * gcc-interface/decl.c (gnat_to_gnu_param): Do not strip the padding
3482 if the parameter either is passed by reference or if the alignment
3485 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
3487 * gcc-interface/decl.c (is_cplusplus_method): Use Is_Primitive flag to
3488 detect primitive operations of tagged and untagged types.
3490 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
3492 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not bother about alias
3493 sets in presence of derivation for subprogram types.
3495 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
3497 * gcc-interface/utils.c (begin_subprog_body): Assert that the body is
3498 present in the same context as the declaration.
3500 2015-02-07 Jakub Jelinek <jakub@redhat.com>
3503 * gcc-interface/trans.c (gigi): Recreate optimization_default_node
3504 and optimization_current_node after tweaking global_options.
3506 2015-02-05 Robert Dewar <dewar@adacore.com>
3508 * prj-proc.adb, sem_aux.adb, exp_ch9.adb, errout.adb, prj-dect.adb,
3509 prj-nmsc.adb: Minor reformatting.
3511 2015-02-05 Ed Schonberg <schonberg@adacore.com>
3513 * sem_type.adb (Covers): In ASIS_Mode the Corresponding_Record
3514 of a protected type may not be available, so to check conformance
3515 with an interface type, examine the interface list in the type
3516 declaration directly.
3517 (Write_Overloads): Improve information for indirect calls,
3520 2015-02-05 Ed Schonberg <schonberg@adacore.com>
3522 * exp_ch3.adb (Make_Tag_Assignment): Do not perform this
3523 expansion activity in ASIS mode.
3525 2015-02-05 Javier Miranda <miranda@adacore.com>
3527 * errout.adb (Error_Msg_PT): Add missing error.
3528 * sem_ch6.adb (Check_Synchronized_Overriding): Check the missing
3529 RM rule. Code cleanup.
3530 * exp_ch9.adb (Build_Wrapper_Spec): Propagate "constant" in
3531 anonymous access types. Found working on the tests. Code cleanup.
3533 2015-02-05 Vincent Celier <celier@adacore.com>
3535 * prj-dect.adb (Parse_Attribute_Declaration): Continue scanning
3536 when there are incomplete withs.
3537 * prj-nmsc.adb (Process_Naming): Do not try to get the value
3538 of an element when it is nil.
3539 (Check_Naming): Do not check a nil suffix for illegality
3540 * prj-proc.adb (Expression): Do not process an empty term.
3541 * prj-strt.adb (Attribute_Reference): If attribute cannot be
3542 found, parse a possible index to avoid cascading errors.
3544 2015-02-05 Ed Schonberg <schonberg@adacore.com>
3546 * sem_aux.adb (Is_Derived_Type): A subprogram_type generated
3547 for an access_to_subprogram declaration is not a derived type.
3549 2015-02-05 Robert Dewar <dewar@adacore.com>
3551 * errout.adb (Error_Msg_Internal): For non-serious error set
3552 Fatal_Error to Ignored.
3553 * lib-load.adb (Load_Unit): Minor comment updates.
3554 * sem_ch10.adb (Analyze_With_Clause): Propagate Fatal_Error
3555 setting from with'ed unit to with'ing unit.
3556 * sem_prag.adb (Analyze_Pragma, case Warnings): Document handling
3559 2015-02-05 Yannick Moy <moy@adacore.com>
3561 * sem_prag.adb, par-prag.adb: Minor code clean up.
3563 2015-02-05 Yannick Moy <moy@adacore.com>
3565 * par-prag.adb (Pragma_Warnings): Update for extended form
3566 of pragma Warnings. The "one" argument case may now have 2 or
3568 * sem_prag.adb (Analyze_Pragma/Pragma_Warnings): Update for
3569 extended form of pragma Warnings. Pragma with tool name is either
3570 rewritten as null or as an equivalent form without tool name,
3572 * snames.ads-tmpl (Name_Gnatprove): New name.
3574 2015-02-05 Robert Dewar <dewar@adacore.com>
3576 * sem_ch13.adb (Add_Invariants): Don't assume invariant is
3578 * sem_prag.adb (Analyze_Pragma, case Check): Don't assume
3579 condition is standard Boolean, it can be non-standard derived
3582 2015-02-05 Robert Dewar <dewar@adacore.com>
3584 * checks.adb (Enable_Range_Check): Disconnect attempted
3585 optimization for the case of range check for subscript of
3586 unconstrained array.
3588 2015-02-05 Robert Dewar <dewar@adacore.com>
3590 * par-ch13.adb (With_Present): New function
3591 (Aspect_Specifications_Present): Handle WHEN in place of WITH
3592 (Get_Aspect_Specifications): Comment update.
3593 * par.adb: Comment updates.
3595 2015-02-05 Robert Dewar <dewar@adacore.com>
3597 * errout.adb (Handle_Serious_Error): New setting of Fatal_Error.
3598 * frontend.adb (Frontend): New setting of Fatal_Error.
3599 * lib-load.adb (Create_Dummy_Package_Unit): New setting of
3601 (Load_Main_Source): New setting of Fatal_Error
3602 (Load_Unit): New setting of Fatal_Error.
3603 * lib-writ.adb (Add_Preprocessing_Dependency): New setting of
3605 (Ensure_System_Dependency): New setting of Fatal_Error.
3606 * lib.adb (Fatal_Error): New setting of Fatal_Error
3607 (Set_Fatal_Error): New setting of Fatal_Error.
3608 * lib.ads: New definition of Fatal_Error and associated routines.
3609 * par-ch10.adb (P_Compilation_Unit): New setting of Fatal_Error.
3610 * par-load.adb (Load): New setting of Fatal_Error.
3611 * rtsfind.adb (Load_RTU): New setting of Fatal_Error.
3612 * sem_ch10.adb (Analyze_Compilation_Unit): New setting of
3614 (Optional_Subunit): New setting of Fatal_Error.
3615 (Analyze_Proper_Body): New setting of Fatal_Error.
3616 (Load_Needed_Body): New setting of Fatal_Error.
3618 2015-02-05 Ed Schonberg <schonberg@adacore.com>
3620 * sem_res.adb (Resolve_Call): If the function being called has
3621 out parameters do not check for language version if the function
3622 comes from a predefined unit, as those are always compiled in
3625 2015-02-05 Ed Schonberg <schonberg@adacore.com>
3627 * sem_ch3.adb (Process_Full_View): Verify that the full view
3628 of a type extension must carry an explicit limited keyword if
3629 the partial view does (RM 7.3 (10.1)).
3631 2015-02-05 Robert Dewar <dewar@adacore.com>
3633 * g-rannum.adb, g-rannum.ads, s-rannum.adb, s-rannum.ads,
3634 sem_warn.ads: Minor reformatting.
3635 * exp_ch13.adb (Expand_N_Freeze_Entity): Add guard for aspect
3637 * sem_prag.adb (Analyze_Pragma, case Type_Invariant): Give
3638 error for abstract type.
3640 2015-02-05 Yannick Moy <moy@adacore.com>
3642 * opt.ads (Warn_On_Suspicious_Contract): Update comment
3644 * sem_attr.adb (Analyze_Attribute/Attribute_Update): Warn on
3645 suspicious uses of 'Update.
3646 * sem_warn.adb, sem_warn.ads (Warn_On_Suspicious_Update): New
3647 function issues warning on suspicious uses of 'Update.
3648 * g-rannum.adb, g-rannum.ads, s-rannum.adb, s-rannum.ads: Mark
3649 package spec and body as SPARK_Mode Off.
3651 2015-02-05 Robert Dewar <dewar@adacore.com>
3653 * sem_prag.adb (Set_Elab_Unit_Name): New name for Set_Unit_Name
3654 (Analyze_Pragma): Change Set_Unit_Name to Set_Elab_Unit_Name
3655 (Set_Elab_Unit_Name): Generate reference for Elaborate[_All]
3656 * sem_warn.adb (Warn_On_Unreferenced_Entity): Suppress warning
3657 for exported entity.
3659 2015-02-05 Hristian Kirtchev <kirtchev@adacore.com>
3661 * sem_prag.adb (Check_Pragma_Conformance): Add
3662 local variable Arg. Ensure that all errors are associated with
3663 the pragma if it appears without an argument. Add comments on
3666 2015-02-05 Robert Dewar <dewar@adacore.com>
3668 * lib-xref.adb: Minor reformatting.
3670 2015-02-05 Tristan Gingold <gingold@adacore.com>
3673 * env.c: Fix thinko: handle Darwin case before default one.
3675 2015-01-30 Robert Dewar <dewar@adacore.com>
3677 * a-assert.adb: Minor reformatting.
3678 * sem_ch13.adb: Minor comment clarification.
3679 * types.ads: Minor comment update.
3680 * sem_eval.adb (Real_Or_String_Static_Predicate_Matches): Avoid blow up
3681 when we have a predicate that is nothing but an inherited dynamic
3684 2015-01-30 Jerome Guitton <guitton@adacore.com>
3686 * gcc-interface/Makefile.in (x86-vxworks): Update GCC_SPEC_FILES to
3687 include cert link spec.
3689 2015-01-30 Robert Dewar <dewar@adacore.com>
3691 * einfo.ads: Minor comment fix.
3692 * freeze.adb (Freeze_Profile): Add test for suspicious import
3694 * sem_prag.adb (Process_Import_Or_Interface): Test for suspicious
3695 use in Pure unit is now moved to Freeze (to properly catch
3696 Pure_Function exemption).
3698 2015-01-30 Bob Duff <duff@adacore.com>
3700 * sem_res.ads: Minor comment fix.
3701 * sem_type.adb: sem_type.adb (Remove_Conversions): Need to
3702 check both operands of an operator.
3704 2015-01-30 Yannick Moy <moy@adacore.com>
3706 * a-assert.ads, a-assert.adb: Mark package spec in SPARK. Set assertion
3707 policy for Pre to Ignore.
3708 (Assert): Add precondition.
3710 2015-01-30 Robert Dewar <dewar@adacore.com>
3712 * sem_prag.adb (Process_Import_Or_Interface): Warn if used in
3714 * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Clarify
3715 documentation for some special cases of invalid attempts at
3718 2015-01-30 Gary Dismukes <dismukes@adacore.com>
3720 * errout.ads: Minor reformatting.
3722 2015-01-30 Yannick Moy <moy@adacore.com>
3724 * inline.adb (Process_Formals): Use the sloc of
3725 the inlined node instead of the sloc of the actual parameter,
3726 when replacing formal parameters by the actual one.
3728 2015-01-30 Arnaud Charlet <charlet@adacore.com>
3730 * g-expect.adb (Get_Command_Output): Use infinite timeout when
3733 2015-01-30 Ed Schonberg <schonberg@adacore.com>
3735 * sem_ch12.adb (Analyze_Associations): If an in-parameter is
3736 defaulted in an instantiation, add an entry in the list of actuals
3737 to indicate the default value of the formal (as is already done
3738 for defaulted subprograms).
3740 2015-01-30 Javier Miranda <miranda@adacore.com>
3742 * errout.adb (Error_Msg_PT): Minor error phrasing update.
3744 2015-01-30 Robert Dewar <dewar@adacore.com>
3746 * sem_warn.adb (Warn_On_Known_Condition): Improve error message
3749 2015-01-30 Pierre-Marie de Rodat <derodat@adacore.com>
3751 * exp_dbug.adb (Get_Encoded_Name): When
3752 -fgnat-encodings=minimal, do not generate names for biased types.
3754 2015-01-30 Tristan Gingold <gingold@adacore.com>
3757 * env.c: Move vxworks and darwin includes out of #ifdef IN_RTS.
3759 2015-01-30 Gary Dismukes <dismukes@adacore.com>
3761 * freeze.adb: Minor reformatting.
3763 2015-01-30 Javier Miranda <miranda@adacore.com>
3765 * errout.ads (Error_Msg_PT): Replace Node_Id by Entity_Id and
3766 improve its documentation.
3767 * errout.adb (Error_Msg_PT): Improve the error message.
3768 * sem_ch6.adb (Check_Conformance): Update call to Error_Msg_PT.
3769 (Check_Synchronized_Overriding): Update call to Error_Msg_PT.
3770 * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup.
3772 2015-01-30 Robert Dewar <dewar@adacore.com>
3774 * sem_warn.adb (Warn_On_Known_Condition): Do special casing of
3775 message for False case.
3777 2015-01-30 Doug Rupp <rupp@adacore.com>
3779 * s-vxwext-kernel.ads (Task_Cont): Remove imported subprogram body.
3780 * s-vxwext-kernel.adb (Task_Cont): New subpprogram body specialized for
3783 2015-01-30 Gary Dismukes <dismukes@adacore.com>
3785 * sem_attr.adb (Declared_Within_Generic_Unit):
3786 New function to test whether an entity is declared within the
3787 declarative region of a given generic unit.
3788 (Resolve_Attribute): For checking legality of subprogram'Access within
3789 a generic unit, call new Boolean function Declared_Within_Generic_Unit
3790 instead of simply comparing the results of Enclosing_Generic_Unit on
3791 the prefix and access type. Correct minor comment typos.
3793 2015-01-30 Robert Dewar <dewar@adacore.com>
3795 * freeze.adb, exp_util.ads: Update comment.
3796 * exp_util.adb, exp_ch3.adb: Minor code reorganization and reformatting.
3797 * sem_util.adb: Minor: fix typo.
3799 2015-01-30 Hristian Kirtchev <kirtchev@adacore.com>
3801 * sem_attr.adb (Analyze_Attribute): Ensure that
3802 the check concerning Refined_Post takes precedence over the
3805 2015-01-30 Gary Dismukes <dismukes@adacore.com>
3807 * sem_prag.adb: Minor typo fixes and reformatting.
3809 2015-01-30 Yannick Moy <moy@adacore.com>
3811 * sem_attr.adb: Code clean up.
3813 2015-01-30 Robert Dewar <dewar@adacore.com>
3815 * ali.adb (Scan_ALI): Set Serious_Errors flag in Unit record.
3816 * ali.ads (Unit_Record): Add new field Serious_Errors.
3817 * lib-writ.adb (Write_Unit_Information): Set SE (serious errors)
3818 attribute in U line.
3819 * lib-writ.ads: New attribute SE (serious erors) in unit line.
3821 2015-01-30 Hristian Kirtchev <kirtchev@adacore.com>
3823 * einfo.adb Update the usage of attributes Entry_Bodies_Array,
3824 Lit_Indexes, Scale_Value, Storage_Size_Variable,
3825 String_Literal_Low_Bound along associated routines and
3827 (Pending_Access_Types): New routine.
3828 (Set_Pending_Access_Types): New routine.
3829 (Write_Field15_Name): Add an entry for Pending_Access_Types.
3830 * einfo.ads Add new attribute Pending_Access_Types along
3831 with usage in nodes. Update the usage of attributes
3832 Entry_Bodies_Array, Lit_Indexes, Scale_Value,
3833 Storage_Size_Variable, String_Literal_Low_Bound.
3834 (Pending_Access_Types): New routine along with pragma Inline.
3835 (Set_Pending_Access_Types): New routine along with pragma Inline.
3836 * exp_ch3.adb (Expand_Freeze_Array_Type): Add new local variable
3837 Ins_Node. Determine the insertion node for anonynous access type
3838 that acts as a component type of an array. Update the call to
3839 Build_Finalization_Master.
3840 (Expand_Freeze_Record_Type): Update
3841 the calls to Build_Finalization_Master.
3842 (Freeze_Type): Remove
3843 local variable RACW_Seen. Factor out the code that deals with
3844 remote access-to-class-wide types. Create a finalization master
3845 when the designated type contains a private component. Fully
3846 initialize all pending access types.
3847 (Process_RACW_Types): New routine.
3848 (Process_Pending_Access_Types): New routine.
3849 * exp_ch4.adb (Expand_Allocator_Expression): Allocation no longer
3850 needs to set primitive Finalize_Address.
3851 (Expand_N_Allocator): Allocation no longer sets primitive
3853 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
3854 Update the call to Build_Finalization_Master.
3855 (Make_Build_In_Place_Call_In_Allocator): Allocation no longer
3856 needs to set primitive Finalize_Address.
3857 * exp_ch7.adb (Add_Pending_Access_Type): New routine.
3858 (Build_Finalization_Master): New parameter profile. Associate
3859 primitive Finalize_Address with the finalization master if the
3860 designated type has been frozen, otherwise treat the access
3861 type as pending. Simplify the insertion of the master and
3862 related initialization code.
3863 (Make_Finalize_Address_Body): Allow Finalize_Address for class-wide
3865 (Make_Set_Finalize_Address_Call): Remove forlam parameter Typ.
3866 Simplify the implementation.
3867 * exp_ch7.ads (Build_Finalization_Master): New parameter profile
3868 along with comment on usage.
3869 (Make_Set_Finalize_Address_Call): Remove formal parameter Typ. Update
3870 the comment on usage.
3871 * exp_util.adb (Build_Allocate_Deallocate_Proc): Use routine
3872 Finalize_Address to retrieve the primitive.
3873 (Finalize_Address): New routine.
3874 (Find_Finalize_Address): Removed.
3875 * exp_util.ads (Finalize_Address): New routine.
3876 * freeze.adb (Freeze_All): Remove the generation of finalization
3878 * sem_ch3.adb (Analyze_Full_Type_Declaration): Propagate any
3879 pending access types from the partial to the full view.
3881 2015-01-30 Robert Dewar <dewar@adacore.com>
3883 * sem_disp.adb: Minor reformatting.
3884 * sem_disp.ads: Documentation update.
3886 2015-01-30 Ed Schonberg <schonberg@adacore.com>
3888 * sem_disp.adb (Is_Dynamically_Tagged): when applied to an entity
3889 or a function call, return True if type is class-wide.
3890 * sem_res.adb (Resolve_Case_Expression, Resolve_If_Expression);
3891 Apply RM 4.5.7 (17/3): all or none of the dependent expression
3892 of a conditional expression must be dynamically tagged.
3894 2015-01-30 Ed Schonberg <schonberg@adacore.com>
3896 * sem_ch6.adb (Analyze_Function_Return): In an extended return
3897 statement, apply accessibility check to result object when there
3898 is no initializing expression (Ada 2012 RM 6.5 (5.4/3))
3900 2015-01-30 Robert Dewar <dewar@adacore.com>
3902 * sem_ch4.adb (Analyze_If_Expression): Allow for non-standard
3903 Boolean for case where ELSE is omitted.
3904 * sem_res.adb: Minor reformatting.
3906 2015-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
3908 Fix build under cygwin/64.
3909 * adaint.h: Add check for __CYGWIN__.
3910 * mingw32.h: Prevent windows.h from including x86intrin.h in GCC.
3912 2015-01-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
3915 * adaint.c: Handle __CYGWIN__ like __MINGW32__ here.
3916 * mingw32.h: Don't include <tchar.h> under cygwin.
3917 (_O_U8TEXT, _O_U16TEXT, _O_WTEXT): Set to _O_TEXT if not yet defined.
3919 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
3921 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8)
3922 (DEF_FUNCTION_TYPE_VAR_12): New macros.
3924 2015-01-09 Michael Collison <michael.collison@linaro.org>
3926 * gcc-interface/cuintp.c: Include hash-set.h, machmode.h,
3927 vec.h, double-int.h, input.h, alias.h, symtab.h,
3928 fold-const.h, wide-int.h, and inchash.h due to
3929 flattening of tree.h.
3930 * gcc-interface/decl.c: Ditto.
3931 * gcc-interface/misc.c: Ditto.
3932 * gcc-interface/targtyps.c: Include hash-set.h, machmode.h,
3933 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h,
3934 fold-const.h, wide-int.h, and inchash.h due to
3935 flattening of tree.h.
3936 * gcc-interface/trans.c: Include hash-set.h, machmode.h,
3937 vec.h, double-int.h, input.h, alias.h, symtab.h, real.h,
3938 fold-const.h, wide-int.h, inchash.h due to
3939 flattening of tree.h.
3940 * gcc-interface/utils.c: Include hash-set.h, machmode.h,
3941 vec.h, double-int.h, input.h, alias.h, symtab.h,
3942 fold-const.h, wide-int.h, and inchash.h due to
3943 flattening of tree.h.
3944 * gcc-interface/utils2.c: Ditto.
3946 2015-01-07 Robert Dewar <dewar@adacore.com>
3948 * sem_warn.adb (Check_One_Unit): Don't give unused entities
3949 warning for a package which is used as a generic parameter.
3951 2015-01-07 Bob Duff <duff@adacore.com>
3953 * usage.adb (Usage): Correct documentation of
3956 2015-01-07 Robert Dewar <dewar@adacore.com>
3958 * s-fileio.adb: Minor reformatting.
3960 2015-01-07 Ed Schonberg <schonberg@adacore.com>
3962 * sem_ch12.adb (Instantiate_Object): If formal is an anonymous
3963 access to subprogram, replace its formals with new entities when
3964 building the object declaration, both if actual is present and
3965 when it is defaulted.
3967 2015-01-07 Ed Schonberg <schonberg@adacore.com>
3969 * sem_ch5.adb (Analyze_Assignment): If left-hand side is a view
3970 conversion and type of expression has invariant, apply invariant
3971 check on expression.
3973 2015-01-07 Ed Schonberg <schonberg@adacore.com>
3975 * sem_ch3.adb (Create_Constrained_Components): A call to
3976 Gather_Components may detect an error if an inherited discriminant
3977 that controls a variant is non-static.
3978 * sem_aggr.adb (Resolve_Record_Aggregate, Step 5): The call to
3979 Gather_Components may report an error if an inherited discriminant
3980 in a variant in non-static.
3981 * sem_util.adb (Gather_Components): If a non-static discriminant
3982 is inherited do not report error here, but let caller handle it.
3983 (Find_Actual): Small optimization.
3985 2015-01-07 Bob Duff <duff@adacore.com>
3987 * usage.adb (Usage): Document -gnatw.f switch.
3989 2015-01-07 Ed Schonberg <schonberg@adacore.com>
3991 * sem_ch12.adb: Code clean up and minor reformatting.
3993 2015-01-07 Robert Dewar <dewar@adacore.com>
3995 * exp_ch4.adb (Expand_N_Type_Conversion): Add guard for
3996 Raise_Accessibility_Error call.
3997 * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Add documentation
3998 on handling of invalid digits in based constants.
3999 * s-fatgen.ads: Minor reformatting.
4000 * sem_attr.adb (Analyze_Attribute, case Unrestricted_Access):
4001 Avoid noting bogus modification for Valid test.
4002 * snames.ads-tmpl (Name_Attr_Long_Float): New Name.
4003 * einfo.ads: Minor reformatting.
4004 * sem_warn.adb: Minor comment clarification.
4005 * sem_ch12.adb: Minor reformatting.
4007 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4009 * exp_ch5.adb (Expand_Predicated_Loop): Handle properly loops
4010 over static predicates when the loop parameter specification
4011 carries a Reverse indicator.
4013 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4015 * sem_ch12.adb (Instantiate_Object): If formal has a default,
4016 actual is missing and formal has an anonymous access type, copy
4017 access definition in full so that tree for instance is properly
4018 formatted for ASIS use.
4020 2015-01-07 Bob Duff <duff@adacore.com>
4022 * sem_elab.adb (Check_Internal_Call_Continue): Give a warning
4023 for P'Access, where P is a subprogram in the same package as
4024 the P'Access, and the P'Access is evaluated at elaboration
4025 time, and occurs before the body of P. For example, "X : T :=
4026 P'Access;" would allow a subsequent call to X.all to be an
4027 access-before-elaboration error; hence the warning. This warning
4028 is enabled by the -gnatw.f switch.
4029 * opt.ads (Warn_On_Elab_Access): New flag for warning switch.
4030 * warnsw.adb (Set_Dot_Warning_Switch): Set Warn_On_Elab_Access.
4031 * gnat_ugn.texi: Document the new warning.
4033 2015-01-07 Johannes Kanig <kanig@adacore.com>
4035 * lib-xref-spark_specific.adb (Collect_SPARK_Xrefs): Skip unneeded
4038 2015-01-07 Robert Dewar <dewar@adacore.com>
4040 * s-taprop-linux.adb, clean.adb: Minor reformatting.
4042 2015-01-07 Arnaud Charlet <charlet@adacore.com>
4044 * s-tassta.adb: Relax some overzealous assertions.
4046 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4048 * sem_ch6.adb (Analyze_Return_Type): An call that returns a limited
4049 view of a type is legal when context is a thunk generated for
4050 operation inherited from an interface.
4051 * exp_ch6.adb (Expand_Simple_Function_Return): If context is
4052 a thunk and return type is an incomplete type do not continue
4053 expansion; thunk will be fully elaborated when generating code.
4055 2015-01-07 Doug Rupp <rupp@adacore.com>
4057 * s-osinte-mingw.ads (LARGE_INTEGR): New subtype.
4058 (QueryPerformanceFrequency): New imported procedure.
4059 * s-taprop-mingw.adb (RT_Resolution): Call above and return
4060 resolution vice a hardcoded value.
4061 * s-taprop-solaris.adb (RT_Resolution): Call clock_getres and return
4062 resolution vice a hardcoded value.
4063 * s-linux-android.ads (clockid_t): New subtype.
4064 * s-osinte-aix.ads (clock_getres): New imported subprogram.
4065 * s-osinte-android.ads (clock_getres): Likewise.
4066 * s-osinte-freebsd.ads (clock_getres): Likewise.
4067 * s-osinte-solaris-posix.ads (clock_getres): Likewise.
4068 * s-osinte-darwin.ads (clock_getres): New subprogram.
4069 * s-osinte-darwin.adb (clock_getres): New subprogram.
4070 * thread.c (__gnat_clock_get_res) [__APPLE__]: New function.
4071 * s-taprop-posix.adb (RT_Resolution): Call clock_getres to
4072 calculate resolution vice hard coded value.
4074 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4076 * exp_util.adb (Make_CW_Equivalent_Type): If root type is a
4077 limited view, use non-limited view when available to create
4078 equivalent record type.
4080 2015-01-07 Vincent Celier <celier@adacore.com>
4082 * gnatcmd.adb: Remove command Sync and any data and processing
4083 related to this command. Remove project processing for gnatstack.
4084 * prj-attr.adb: Remove package Synchonize and its attributes.
4086 2015-01-07 Vincent Celier <celier@adacore.com>
4088 * clean.adb: Minor error message change.
4090 2015-01-07 Tristan Gingold <gingold@adacore.com>
4093 * env.c (__gnat_environ): Adjust for darwin9/darwin10.
4095 2015-01-07 Javier Miranda <miranda@adacore.com>
4097 * sem_ch10.adb (Analyze_With_Clause): Compiling under -gnatq
4098 protect the frontend against never ending recursion caused by
4099 circularities in the sources.
4101 2015-01-07 Robert Dewar <dewar@adacore.com>
4103 * a-reatim.adb, make.adb, exp_pakd.adb, i-cpoint.adb, sem_ch8.adb,
4104 exp_ch3.adb: Minor reformatting.
4106 2015-01-07 Doug Rupp <rupp@adacore.com>
4108 * s-linux.ads (clockid_t): New subtype.
4109 * s-osinte-linux.ads (pragma Linker Options): Add -lrt.
4110 (clockid_t): New subtype.
4111 (clock_getres): Import system call.
4112 * s-taprop-linux.adb (System.OS_Constants): With and rename.
4113 (RT_Resolution): Remove
4114 hardcoded value and call clock_getres.
4115 * s-linux-sparc.ads, s-linux-mipsel.ads, s-linux-hppa.ads,
4116 s-linux-alpha.ads, s-linux-x32.ads (clockid_t): Add new subtype.
4118 2015-01-07 Robert Dewar <dewar@adacore.com>
4120 * sem_warn.adb (Check_One_Unit): Guard against context item
4121 with no Entity field.
4123 2015-01-07 Vincent Celier <celier@adacore.com>
4125 * clean.adb (Gnatclean): Warn that 'gnatclean -P' is obsolete.
4126 * make.adb (Initialize): Warn that 'gnatmake -P' is obsolete.
4128 2015-01-07 Vincent Celier <celier@adacore.com>
4130 * prj-conf.adb (Parse_Project_And_Apply_Config): Always finalize
4131 errors/warnings in the first parsing of the project files,
4132 to display the warnings when there is no errors.
4134 2015-01-07 Tristan Gingold <gingold@adacore.com>
4136 * i-cpoint.adb (Copy_Terminated_Array): Nicely handle null target.
4138 2015-01-07 Doug Rupp <rupp@adacore.com>
4140 * s-taprop-vxworks.adb (Stop_All_Tasks): Pass return
4141 value from Int_Lock as parameter to Int_Unlock.
4142 * s-osinte-vxworks.ads (Int_Unlock): Add parameter.
4143 * s-vxwext.ads (Int_Unlock): Likewise.
4144 * s-vxwext-kernel.adb (intUnlock, Int_Unlock): Likewise.
4145 * s-vxwext-kernel.ads (Int_Unlock): Likewise.
4146 * s-vxwext-rtp.adb (Int_Unlock): Likewise.
4147 * s-vxwext-rtp.ads (Int_Unlock): Likewise.
4149 2015-01-07 Pierre-Marie de Rodat <derodat@adacore.com>
4151 * exp_pakd.adb: Add a comment in exp_pakd.adb to explain why we
4154 2015-01-07 Tristan Gingold <gingold@adacore.com>
4156 * i-cpoint.adb (Copy_Terminated_Array): Use Copy_Array to
4159 2015-01-07 Eric Botcazou <ebotcazou@adacore.com>
4161 * sem_ch3.adb (Analyze_Full_Type_Declaration): Do not
4162 automatically set No_Strict_Aliasing on access types.
4163 * fe.h (No_Strict_Aliasing_CP): Declare.
4164 * gcc-interface/trans.c (gigi): Force flag_strict_aliasing to 0 if
4165 No_Strict_Aliasing_CP is set.
4167 2015-01-07 Johannes Kanig <kanig@adacore.com>
4169 * sem_ch8.adb (Analyze_Subprogram_Renaming) do
4170 not build function wrapper in gnatprove mode when the package
4171 is externally axiomatized.
4173 2015-01-07 Jose Ruiz <ruiz@adacore.com>
4175 * a-reatim.adb (Time_Of): Reduce the number of spurious overflows in
4176 intermediate computations when the parameters have different signs.
4178 2015-01-07 Javier Miranda <miranda@adacore.com>
4180 * exp_ch3.adb (Build_Init_Procedure): For derived types,
4181 improve the code which takes care of identifying and moving to
4182 the beginning of the init-proc the call to the init-proc of the
4185 2015-01-07 Olivier Hainque <hainque@adacore.com>
4187 * gcc-interface/trans.c (gnat_to_gnu, <N_Expression_With_Action>):
4188 Elaborate the expression as part of the same stmt group as the actions.
4190 2015-01-07 Robert Dewar <dewar@adacore.com>
4192 * sem_ch3.adb: Minor error message change.
4194 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4196 * sem_prag.adb (Analyze_Pragma, case Preelaborable_Initialization):
4197 Following AI05-028, the pragam applies legally to any composite type.
4199 2015-01-07 Arnaud Charlet <charlet@adacore.com>
4201 * s-osinte-vxworks.adb, s-osinte-vxworks.ads
4202 (sigwait, sigwaitinfo): Removed, not needed after all on any
4203 VxWorks configurations.
4205 2015-01-07 Robert Dewar <dewar@adacore.com>
4207 * sem_ch3.adb, freeze.adb, exp_disp.adb: Minor reformatting.
4209 2015-01-07 Javier Miranda <miranda@adacore.com>
4211 * exp_disp.adb (Expand_Interface_Conversion): Adding missing
4212 generation of accessibility check.
4214 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4216 * sem_ch3.adb (Derived_Type_Declaration): In the case of an
4217 illegal completion from a class- wide type, set etype of the
4218 derived type properly to prevent cascaded errors.
4220 2015-01-07 Robert Dewar <dewar@adacore.com>
4222 * prj.ads, i-cpoint.adb, freeze.adb, ghost.adb, prj-err.adb: Minor
4225 2015-01-07 Robert Dewar <dewar@adacore.com>
4227 * restrict.adb (Check_Restriction_No_Use_Of_Attribute):
4229 (OK_No_Use_Of_Entity_Name): New function.
4230 (Set_Restriction_No_Use_Of_Entity): New procedure.
4231 * restrict.ads (Check_Restriction_No_Use_Of_Attribute):
4233 (OK_No_Use_Of_Entity_Name): New function.
4234 (Set_Restriction_No_Use_Of_Entity): New procedure.
4235 * sem_ch8.adb (Find_Direct_Name): Add check for violation of
4237 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
4238 Add processing for new restriction No_Use_Of_Entity.
4240 2015-01-07 Eric Botcazou <ebotcazou@adacore.com>
4242 * freeze.adb (Freeze_Array_Type): Apply same handling to Is_Atomic
4243 component type as to Has_Atomic_Components type. Remove useless
4244 test on Is_Aliased component type.
4246 2015-01-07 Hristian Kirtchev <kirtchev@adacore.com>
4248 * alloc.ads Alphabetize several declarations. Add constants
4249 Ignored_Ghost_Units_Initial and Ignored_Ghost_Units_Increment.
4250 * atree.adb Add with and use clauses for Opt.
4251 (Allocate_Initialize_Node): Mark a node as ignored Ghost
4252 if it is created in an ignored Ghost region.
4253 (Ekind_In): New variant.
4254 (Is_Ignored_Ghost_Node): New routine.
4255 (Set_Is_Ignored_Ghost_Node): New routine.
4256 * atree.adb Aplhabetize several subprograms declarations. Flag
4257 Spare0 is now known as Is_Ignored_Ghost_Node.
4258 (Ekind_In): New variant.
4259 (Is_Ignored_Ghost_Node): New routine.
4260 (Set_Is_Ignored_Ghost_Node): New routine.
4261 * einfo.adb: Flag 279 is now known as Contains_Ignored_Ghost_Code.
4262 (Contains_Ignored_Ghost_Code): New routine.
4263 (Set_Contains_Ignored_Ghost_Code): New routine.
4264 (Set_Is_Checked_Ghost_Entity, Set_Is_Ignored_Ghost_Entity):
4265 It is now possible to set this property on an unanalyzed entity.
4266 (Write_Entity_Flags): Output the status of flag
4267 Contains_Ignored_Ghost_Code.
4268 * einfo.ads New attribute Contains_Ignored_Ghost_Code along with
4270 (Contains_Ignored_Ghost_Code): New routine
4271 along with pragma Inline.
4272 (Set_Contains_Ignored_Ghost_Code): New routine along with pragma Inline.
4273 * exp_ch3.adb Add with and use clauses for Ghost.
4274 (Freeze_Type): Capture/restore the value of Ghost_Mode on entry/exit.
4275 Set the Ghost_Mode in effect.
4276 (Restore_Globals): New routine.
4277 * exp_ch7.adb (Process_Declarations): Do not process a context
4278 that invoves an ignored Ghost entity.
4279 * exp_dbug.adb (Qualify_All_Entity_Names): Skip an ignored Ghost
4280 construct that has been rewritten as a null statement.
4281 * exp_disp.adb Add with and use clauses for Ghost.
4282 (Make_DT): Capture/restore the value of Ghost_Mode on entry/exit. Set
4283 the Ghost_Mode in effect.
4284 (Restore_Globals): New routine.
4285 * exp_util.adb (Requires_Cleanup_Actions): An ignored Ghost entity
4286 does not require any clean up. Add two missing cases that deal
4287 with block statements.
4288 * freeze.adb Add with and use clauses for Ghost.
4289 (Freeze_Entity): Capture/restore the value of Ghost_Mode on entry/exit.
4290 Set the Ghost_Mode in effect.
4291 (Restore_Globals): New routine.
4292 * frontend.adb Add with and use clauses for Ghost. Remove any
4293 ignored Ghost code from all units that qualify.
4294 * ghost.adb New unit.
4295 * ghost.ads New unit.
4296 * gnat1drv.adb Add with clause for Ghost. Initialize and lock
4297 the table in package Ghost.
4298 * lib.ads: Alphabetize several subprogram declarations.
4299 * lib-xref.adb (Output_References): Do not generate reference
4300 information for ignored Ghost entities.
4301 * opt.ads Add new type Ghost_Mode_Type and new global variable
4303 * rtsfind.adb (Load_RTU): Provide a clean environment when
4304 loading a runtime unit.
4305 * sem.adb (Analyze): Capture/restore the value of Ghost_Mode on
4306 entry/exit as the node may set a different mode.
4308 Capture/restore the value of Ghost_Mode on entry/exit as the
4309 unit may be withed from a unit with a different Ghost mode.
4310 * sem_ch3.adb Add with and use clauses for Ghost.
4311 (Analyze_Full_Type_Declaration, Analyze_Incomplete_Type_Decl,
4312 Analyze_Number_Declaration, Analyze_Private_Extension_Declaration,
4313 Analyze_Subtype_Declaration): Set the Ghost_Mode in effect. Mark
4314 the entity as Ghost when there is a Ghost_Mode in effect.
4315 (Array_Type_Declaration): The implicit base type inherits the
4316 "ghostness" from the array type.
4317 (Derive_Subprogram): The
4318 alias inherits the "ghostness" from the parent subprogram.
4319 (Make_Implicit_Base): The implicit base type inherits the
4320 "ghostness" from the parent type.
4321 * sem_ch5.adb Add with and use clauses for Ghost.
4322 (Analyze_Assignment): Set the Ghost_Mode in effect.
4323 * sem_ch6.adb Add with and use clauses for Ghost.
4324 (Analyze_Abstract_Subprogram_Declaration, Analyze_Procedure_Call,
4325 Analyze_Subprogram_Body_Helper, Analyze_Subprogram_Declaration):
4326 Set the Ghost_Mode in effect. Mark the entity as Ghost when
4327 there is a Ghost_Mode in effect.
4328 * sem_ch7.adb Add with and use clauses for Ghost.
4329 (Analyze_Package_Body_Helper, Analyze_Package_Declaration,
4330 Analyze_Private_Type_Declaration): Set the Ghost_Mode in
4331 effect. Mark the entity as Ghost when there is a Ghost_Mode
4333 * sem_ch8.adb Add with and use clauses for Ghost.
4334 (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
4335 Analyze_Object_Renaming, Analyze_Package_Renaming,
4336 Analyze_Subprogram_Renaming): Set the Ghost_Mode in effect. Mark
4337 the entity as Ghost when there is a Ghost_Mode in effect.
4338 (Find_Type): Check the Ghost context of a type.
4339 * sem_ch11.adb Add with and use clauses for Ghost.
4340 (Analyze_Exception_Declaration): Set the Ghost_Mode in
4341 effect. Mark the entity as Ghost when there is a Ghost_Mode
4343 * sem_ch12.adb Add with and use clauses for Ghost.
4344 (Analyze_Generic_Package_Declaration,
4345 Analyze_Generic_Subprogram_Declaration): Set the Ghost_Mode in effect.
4346 Mark the entity as Ghost when there is a Ghost_Mode in effect.
4347 * sem_prag.adb Add with and use clauses for Ghost.
4348 (Analyze_Pragma): Ghost-related checks are triggered when there
4349 is a Ghost mode in effect.
4350 (Create_Abstract_State): Mark the
4351 entity as Ghost when there is a Ghost_Mode in effect.
4352 * sem_res.adb Add with and use clauses for Ghost.
4353 (Check_Ghost_Context): Removed.
4354 * sem_util.adb (Check_Ghost_Completion): Removed.
4355 (Check_Ghost_Derivation): Removed.
4356 (Incomplete_Or_Partial_View):
4357 Add a guard in case the entity has not been analyzed yet
4358 and does carry a scope.
4359 (Is_Declaration): New routine.
4360 (Is_Ghost_Entity): Removed.
4361 (Is_Ghost_Statement_Or_Pragma):
4363 (Is_Subject_To_Ghost): Removed.
4364 (Set_Is_Ghost_Entity):
4366 (Within_Ghost_Scope): Removed.
4367 * sem_util.adb (Check_Ghost_Completion): Removed.
4368 (Check_Ghost_Derivation): Removed.
4369 (Is_Declaration): New routine.
4370 (Is_Ghost_Entity): Removed.
4371 (Is_Ghost_Statement_Or_Pragma): Removed.
4372 (Is_Subject_To_Ghost): Removed.
4373 (Set_Is_Ghost_Entity): Removed.
4374 (Within_Ghost_Scope): Removed.
4375 * sinfo.ads Add a section on Ghost mode.
4376 * treepr.adb (Print_Header_Flag): New routine.
4377 (Print_Node_Header): Factor out code. Output flag
4378 Is_Ignored_Ghost_Node.
4379 * gcc-interface/Make-lang.in: Add dependency for unit Ghost.
4381 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
4383 * freeze.adb (Freeze_Array_Type) <Complain_CS>: Remove always
4384 true test and unreachable 'else' arm.
4386 2015-01-06 Vincent Celier <celier@adacore.com>
4388 * prj-conf.adb (Check_Target): Improve error message when
4389 there are mismatched targets between the on in the configuration
4390 project file and the specified one, either in the main project
4391 file or in the --target= switch.
4393 2015-01-06 Pascal Obry <obry@adacore.com>
4395 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Mode and
4396 Install_Name attribute definitions.
4398 2015-01-06 Ed Schonberg <schonberg@adacore.com>
4400 * freeze.adb (Wrap_Imported_Subprogram): Indicate that the
4401 generated Import pragma for the internal imported procedure does
4402 not come from an aspect, so that Is_Imported can be properly
4405 2015-01-06 Gary Dismukes <dismukes@adacore.com>
4407 * sem_ch12.adb (Might_Inline_Subp): Record whether
4408 any subprograms in the generic package are marked with
4409 pragma Inline_Always (setting flag Has_Inline_Always).
4410 (Analyze_Package_Instantiation): Add test of Has_Inline_Always
4411 alongside existing test of Front_End_Inlining as alternative
4412 conditions for setting Inline_Now. Also add test of
4413 Has_Inline_Always along with Front_End_Inlining test as an
4414 alternative condition for setting Needs_Body to False.
4416 2015-01-06 Tristan Gingold <gingold@adacore.com>
4418 * i-cpoint.adb (Copy_Array): Handle overlap.
4420 2015-01-06 Pascal Obry <obry@adacore.com>
4422 * bindgen.adb: Minor style fix.
4424 2015-01-06 Robert Dewar <dewar@adacore.com>
4426 * sem_util.ads, sem_util.adb: Minor reformatting.
4428 2015-01-06 Vincent Celier <celier@adacore.com>
4430 * prj-conf.adb (Parse_Project_And_Apply_Config): Reset incomplete
4431 with flags before parsing the projects.
4432 * prj-err.adb (Error_Msg): Do nothing if there are incomplete withs.
4433 * prj-part.adb (Post_Parse_Context_Clause): Set Incomplete_Withs
4434 to True in the flags, when Ignore_Missing_With is True and an
4435 imported project cannot be found.
4436 * prj-proc.adb (Expression): When there are incomplete withs and
4437 a variable or attribute is not found, set the variable/attribute
4439 * prj.ads (Processing_Flags): New flag Incomplete_Withs,
4442 2015-01-06 Vasiliy Fofanov <fofanov@adacore.com>
4444 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-conf.adb,
4445 prj-err.adb: Add new switch --no-command-line.
4447 2015-01-06 Ed Schonberg <schonberg@adacore.com>
4449 * sem_ch12.adb: Sloc of wrapper is that of instantiation.
4451 2015-01-06 Robert Dewar <dewar@adacore.com>
4453 * sem_ch11.adb: Minor reformatting.
4455 2015-01-06 Ed Schonberg <schonberg@adacore.com>
4457 * exp_aggr.adb (Get_Assoc_Expr): New routine internal to
4458 Build_Array_Aggr_Code, used to initialized components covered
4459 by a box association. If the component type is scalar and has
4460 a default aspect, use it to initialize such components.
4462 2015-01-06 Pascal Obry <obry@adacore.com>
4464 * rtinit.c (__gnat_runtime_initialize): Add a parameter to
4465 control the setup of the exception handler.
4466 * initialize.c: Remove unused declaration.
4467 * bindgen.adb: Always call __gnat_runtime_initialize and pass
4468 whether the exeception handler must be set or not.
4470 2015-01-06 Thomas Quinot <quinot@adacore.com>
4472 * freeze.adb (Set_SSO_From_Defaults): When setting scalar storage
4473 order to native from default, make sure to also adjust bit order.
4474 * exp_aggr.adb: Minor reformatting.
4476 2015-01-06 Robert Dewar <dewar@adacore.com>
4478 * s-valllu.adb, s-valllu.ads, s-valuti.ads, s-valuns.adb, s-valuns.ads,
4479 s-valrea.adb, s-valrea.ads: Add some additional guards for
4480 Str'Last = Positive'Last.
4482 2015-01-06 Ed Schonberg <schonberg@adacore.com>
4484 * sem_ch12.adb, sem_ch8.adb: Ongoing work for wrappers for actual
4487 2015-01-06 Javier Miranda <miranda@adacore.com>
4489 * exp_disp.adb (Expand_Interface_Conversion): Reapply patch.
4491 2015-01-06 Thomas Quinot <quinot@adacore.com>
4493 * sem_util.ads: Minor reformatting.
4494 * sem_cat.adb (In_RCI_Visible_Declarations): Change back to...
4495 (In_RCI_Declaration) Return to old name, as proper checking of
4496 entity being in the visible part depends on entity kind and must
4497 be done by the caller.
4499 2015-01-06 Ed Schonberg <schonberg@adacore.com>
4501 * sem_ch12.adb, sem_ch12.ads, sem_ch8.adb: Ongoing work for wrappers
4502 for operators in SPARK.
4504 2015-01-06 Ed Schonberg <schonberg@adacore.com>
4506 * sem_aggr.adb (Get_Value): In ASIS mode, preanalyze the
4507 expression in an others association before making copies for
4508 separate resolution and accessibility checks. This ensures that
4509 the type of the expression is available to ASIS in all cases,
4510 in particular if the expression is itself an aggregate.
4512 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
4514 * einfo.ads (Has_Independent_Components): Document extended
4516 * einfo.adb (Has_Independent_Components): Remove obsolete assertion.
4517 (Set_Has_Independent_Components): Adjust assertion.
4518 * sem_prag.adb (Analyze_Pragma): Also set Has_Independent_Components
4519 for pragma Atomic_Components. Set Has_Independent_Components
4520 on the object instead of the type for an object declaration with
4521 pragma Independent_Components.
4523 2015-01-06 Olivier Hainque <hainque@adacore.com>
4525 * set_targ.adb (Read_Target_Dependent_Values): Set
4526 Long_Double_Index when "long double" is read.
4527 (elaboration code): Register_Back_End_Types only when not reading from
4528 config files. Doing otherwise is pointless and error prone.
4530 2015-01-06 Robert Dewar <dewar@adacore.com>
4532 * s-valrea.adb (Value_Real): Check for Str'Last = Positive'Last
4534 2015-01-06 Robert Dewar <dewar@adacore.com>
4536 * a-wtgeau.adb, a-ztgeau.adb, a-tigeau.adb (String_Skip): Raise PE if
4537 Str'Last = Positive'Last.
4539 2015-01-06 Ed Schonberg <schonberg@adacore.com>
4541 * sem_ch6.adb (Matches_Limited_View): Handle properly the case
4542 where the non-limited type is a generic actual and appears as
4543 a subtype of the non-limited view of the other.
4544 * freeze.adb (Build_Renamed_Body): If the return type of the
4545 declaration that is being completed is a limited view and the
4546 non-limited view is available, use it in the specification of
4549 2015-01-06 Ed Schonberg <schonberg@adacore.com>
4551 * sem_ch3.adb (Find_Type_Name): If there is a previous tagged
4552 incomplete view, the type of the classwide type common to both
4553 views is the type being declared.
4555 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
4557 * einfo.ads (Is_Independent): Further document extended usage.
4559 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
4561 * einfo.ads (Is_Independent): Document extended usage.
4562 * einfo.adb (Is_Independent): Remove obsolete assertion.
4563 (Set_Is_Independent): Likewise.
4564 * sem_prag.adb (Process_Atomic_Shared_Volatile): Rename into...
4565 (Process_Atomic_Independent_Shared_Volatile): ...this.
4566 Deal with pragma Independent here.
4567 (Analyze_Pragma): Adjust
4568 to above renaming and also invoke it for pragma Independent.
4569 Adjust comment for Independent_Components.
4571 2015-01-06 Robert Dewar <dewar@adacore.com>
4573 * snames.ads-tmpl: Remove entries for attribute Enum_Image.
4574 * exp_attr.adb: Remove reference to Attribute_Enum_Image.
4576 2015-01-06 Robert Dewar <dewar@adacore.com>
4578 * s-vallli.adb (Value_Long_Long_Integer): Handle case of Str'Last
4580 * s-valllu.adb (Value_Long_Long_Unsigned): Handle case of
4581 Str'Last = Positive'Last.
4583 2015-01-06 Robert Dewar <dewar@adacore.com>
4585 * sem_prag.adb (Process_Inline): Remove redundant construct
4586 warning (-gnatw.r) for an ineffective pragma Inline.
4588 2015-01-06 Robert Dewar <dewar@adacore.com>
4590 * s-valint.adb: Fix typo in last checkin.
4591 * s-valuns.adb (Value_Unsigned): More efficient fix for
4593 * sem_attr.adb (Analyze_Attribute): Minor reformatting
4594 (Eval_Attribute): Static ervaluation of 'Img for enumeration types.
4596 2015-01-06 Robert Dewar <dewar@adacore.com>
4598 * s-valint.adb, s-valuns.adb (Value_Integer): Deal with case where
4599 Str'Last = Positive'Last
4601 2015-01-06 Thomas Quinot <quinot@adacore.com>
4603 * xoscons.adb: Display exception information and return non-zero
4604 exit status in top level exception handler.
4606 2015-01-06 Ed Schonberg <schonberg@adacore.com>
4608 * sem_ch8.adb: Code clean up.
4610 2015-01-06 Tristan Gingold <gingold@adacore.com>
4612 * targparm.ads: Remove obsolete comment.
4614 2015-01-06 Olivier Hainque <hainque@adacore.com>
4616 * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Variable): When
4617 constructing a ref to variable, update inner_const_flag from the
4618 variable TREE_READONLY attribute.
4619 * gcc-interface/targtyps.c (WIDEST_HARDWARE_FP_SIZE): Remove default
4621 (get_target_float_size): Remove.
4622 (get_target_double_size): Remove.
4623 (get_target_long_double_size): Remove.
4625 2015-01-06 Pascal Obry <obry@adacore.com>
4627 * adaint.c (ProcListEvt): Set to NULL.
4628 * rtinit.c: New file.
4629 (__gnat_rt_init_count): New reference counter set to 0.
4630 (__gnat_runtime_initialize): Move code here from __gnat_initialize when
4631 this code is actually needed for the runtime initialization. This
4632 routine returns immediately if the initialization has already been done.
4633 * final.c: Revert previous change.
4634 * rtfinal.c: New file.
4635 (__gnat_runtime_finalize)[Win32]: Add finalization of the critical
4636 section and event. The default version of this routine is empty (except
4637 for the reference counting code). This routine returns immediately if
4638 some others libraries are referencing the runtime.
4639 * bindgen.adb (Gen_Adainit): Generate call to Runtime_Initialize
4640 remove circuitry to initialize the signal handler as this is
4641 now done by the runtime initialization routine.
4642 (Gen_Adafinal): Generate call to Runtime_Finalize.
4643 * gnat_ugn.texi: Update documentation about concurrency and
4644 initialization/finalization of the run-time.
4645 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Add
4646 references to rtfinal.o and rtinit.o
4648 2015-01-06 Robert Dewar <dewar@adacore.com>
4650 * exp_attr.adb (Expand_N_Attribute_Reference): Add dummy entry
4652 * sem_attr.adb: Implement Enum_Image attribute.
4653 * snames.ads-tmpl: Add entries for Enum_Image attribute.
4655 2015-01-06 Robert Dewar <dewar@adacore.com>
4657 * namet.ads: Document use of Boolean2 for No_Use_Of_Entity.
4658 * restrict.ads (No_Use_Of_Entity): New table.
4659 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
4660 Ignore No_Use_Of_Entity (will be processed in parser).
4661 * snames.ads-tmpl: Add entry for Name_No_Use_Of_Entity.
4663 2015-01-06 Vincent Celier <celier@adacore.com>
4665 * prj-tree.adb (Imported_Or_Extended_Project_Of): Do not try
4666 to check for an extended project, if a project does not have
4667 yet a project declaration.
4669 2015-01-06 Pierre-Marie Derodat <derodat@adacore.com>
4671 * scos.ads: Update documentation about the SCO table build
4672 process and about table records format.
4673 * par_sco.ads (SCO_Record): Rename to SCO_Record_Raw.
4674 (SCO_Record_Filtered): New procedure.
4675 (Set_SCO_Logical_Operator): New procedure.
4676 (dsco): Update documentation.
4677 * par_sco.adb: Update library-level comments.
4678 (SCO_Generation_State_Type): New type.
4679 (SCO_Generation_State): New variable.
4680 (SCO_Raw_Table): New package instanciation.
4681 (Condition_Pragma_Hash_Table): Rename to SCO_Raw_Hash_Table.
4683 (Tristate): New type.
4684 (Is_Logical_Operator): Return Tristate and update documentation.
4685 (Has_Decision): Update call to Is_Logical_Operator and complete
4687 (Set_Table_Entry): Rename to Set_Raw_Table_Entry, update
4688 comment, add an assertion for state checking and change
4689 references to SCO_Table into SCO_Raw_Table.
4690 (dsco): Refactor to dump the raw and the filtered tables.
4691 (Process_Decisions.Output_Decision_Operand): Handle putative
4692 short-circuit operators.
4693 (Process_Decisions.Output_Element): Update references
4694 to Set_Table_Entry and to Condition_Pragma_Hash_Table.
4695 (Process_Decisions.Process_Decision_Operand): Update call
4696 to Is_Logical_Operator.
4697 (Process_Decisions.Process_Node): Handle putative short-circuit
4698 operators and change references to
4699 SCO_Table into SCO_Raw_Table.
4700 (SCO_Output): Add an assertion
4701 for state checking and remove code that used to stamp out SCO entries.
4702 (SCO_Pragma_Disabled): Change reference to SCO_Table
4704 (SCO_Record): Rename to SCO_Record_Raw,
4705 add an assertion for state checking and change references
4706 to SCO_Table into SCO_Raw_Table.
4707 (Set_SCO_Condition): Add an assertion for state checking, update
4708 references to Condition_Pragma_Hash_Table and change references to
4709 SCO_Table into SCO_Raw_Table.
4710 (Set_SCO_Pragma_Enabled): Add an assertion for state checking and
4711 change references to SCO_Table into SCO_Raw_Table.
4712 (Set_SCO_Logical_Operator): New procedure.
4713 (Traverse_Declarations_Or_Statements.Set_Statement_Entry): Update
4714 references to Set_Table_Entry and to Condition_Pragma_Hash_Table.
4715 (SCO_Record_Fildered): New procedure.
4716 * gnat1drv.adb (Gnat1drv): Invoke the SCO filtering pass.
4717 * lib-writ.adb (Write_ALI): Invoke the SCO filtering pass and
4719 * par-load.adb (Load): Update reference to SCO_Record.
4720 * par.adb (Par): Update reference to SCO_Record.
4721 * put_scos.adb (Put_SCOs): Add an assertion to check that no
4722 putative SCO condition reaches this end.
4723 * sem_ch10.adb (Analyze_Proper_Body): Update reference to SCO_Record.
4724 * sem_res.adb (Resolve_Logical_Op): Validate putative SCOs
4725 when corresponding to an "and"/"or" operator affected by the
4726 Short_Circuit_And_Or pragma.
4728 2015-01-06 Robert Dewar <dewar@adacore.com>
4730 * sem_ch8.adb (Analyze_Use_Package): Give more specific error
4731 msg for attempted USE of generic subprogram or subprogram.
4733 2015-01-06 Robert Dewar <dewar@adacore.com>
4735 * s-valllu.adb, a-tiinau.adb, a-timoau.adb, a-ztinau.adb, a-ztmoau.adb,
4736 s-valuns.adb, s-valrea.adb, a-wtflau.adb, a-tiflau.adb, a-ztflau.adb,
4737 a-wtinau.adb, a-wtmoau.adb: Document recognition of : in place of #.
4739 2015-01-06 Ed Schonberg <schonberg@adacore.com>
4741 * sem_ch13.adb (Analyze_Aspect_Specifications): For aspects
4742 that specify stream subprograms, if the prefix is a class-wide
4743 type then the generated attribute definition clause must apply
4744 to the same class-wide type.
4745 (Default_Iterator): An iterator defined by an aspect of some
4746 container type T must have a first parameter of type T, T'class,
4747 or an access to such (from code reading RM 5.5.1 (2/3)).
4749 2015-01-06 Arnaud Charlet <charlet@adacore.com>
4751 * gnat1drv.adb: Minor: complete previous change.
4753 2015-01-06 Olivier Hainque <hainque@adacore.com>
4755 * set_targ.ads (C_Type_For): New function. Return the name of
4756 a C type supported by the back-end and suitable as a basis to
4757 construct the standard Ada floating point type identified by
4758 the T parameter. This is used as a common ground to feed both
4759 ttypes values and the GNAT tree nodes for the standard floating
4761 * set_targ.adb (Long_Double_Index): The index at which "long
4762 double" gets registered in the FPT_Mode_Table. This is useful to
4763 know whether we have a "long double" available at all and get at
4764 it's characteristics without having to search the FPT_Mode_Table
4765 when we need to decide which C type should be used as the
4766 basis for Long_Long_Float in Ada.
4767 (Register_Float_Type): Fill Long_Double_Index.
4768 (FPT_Mode_Index_For): New function. Return the index in
4769 FPT_Mode_Table that designates the entry corresponding to the
4770 provided C type name.
4771 (FPT_Mode_Index_For): New function. Return the index in
4772 FPT_Mode_Table that designates the entry for a back-end type
4773 suitable as a basis to construct the standard Ada floating point
4774 type identified by the input T parameter.
4775 (elaboration code): Register_Back_End_Types unconditionally,
4776 so C_Type_For can operate regardless of -gnateT. Do it
4777 early so we can query it for the floating point sizes, via
4778 FPT_Mode_Index_For. Initialize Float_Size, Double_Size and
4779 Long_Double_Size from the FPT_Mode_Table, as cstand will do.
4780 * cstand.adb (Create_Float_Types): Use C_Type_For to determine
4781 which C type should be used as the basis for the construction
4782 of the Standard Ada floating point types.
4783 * get_targ.ads (Get_Float_Size, Get_Double_Size,
4784 Get_Long_Double_Size): Remove.
4785 * get_targ.adb: Likewise.
4787 2015-01-06 Thomas Quinot <quinot@adacore.com>
4789 * sem_cat.adb (In_RCI_Declaration): Remove unnecessary
4790 parameter and rename to...
4791 (In_RCI_Visible_Declarations): Fix handling of private part of nested
4793 (Validate_RCI_Subprogram_Declaration): Reject illegal function
4794 returning anonymous access in RCI unit.
4796 2015-01-06 Ed Schonberg <schonberg@adacore.com>
4798 * sem_ch6.adb (New_Overloaded_Entity): In GNATprove mode, a
4799 function wrapper may be a homonym of another local declaration.
4800 * sem_ch8.adb (Analyze_Subprogram_Renaming): In GNATprove mode,
4801 build function and operator wrappers after the actual subprogram
4802 has been resolved, and replace the standard renaming declaration
4803 with the declaration of wrapper.
4804 * sem_ch12.ads (Build_Function_Wrapper, Build_Operator_Wraooer):
4805 make public for use elsewhere.
4806 * sem_ch12.adb (Build_Function_Wrapper, Build_Operator_Wraooer):
4807 rewrite, now that actual is fully resolved when wrapper is
4810 2015-01-06 Javier Miranda <miranda@adacore.com>
4812 * exp_disp.adb: Revert previous change.
4814 2015-01-06 Robert Dewar <dewar@adacore.com>
4816 * exp_util.adb: Change name Name_Table_Boolean to
4817 Name_Table_Boolean1.
4818 * namet.adb: Change name Name_Table_Boolean to Name_Table_Boolean1
4819 Introduce Name_Table_Boolean2/3.
4820 * namet.ads: Change name Name_Table_Boolean to Name_Table_Boolean1
4821 Introduce Name_Table_Boolean2/3.
4822 * par-ch13.adb: Change name Name_Table_Boolean to
4823 Name_Table_Boolean1.
4825 2015-01-06 Bob Duff <duff@adacore.com>
4827 * gnat_rm.texi: Improve documentation regarding No_Task_Termination.
4829 2015-01-06 Ed Schonberg <schonberg@adacore.com>
4831 * sem_aggr.adb (Resolve_Record_Aggregte, Get_Value): For an
4832 others choice that covers multiple components, analyze each
4833 copy with the type of the component even in compile-only mode,
4834 to detect potential accessibility errors.
4836 2015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
4838 * sem_res.adb (Is_Assignment_Or_Object_Expression): New routine.
4839 (Resolve_Actuals): An effectively volatile out
4840 parameter cannot act as an in or in out actual in a call.
4841 (Resolve_Entity_Name): An effectively volatile out parameter
4844 2015-01-06 Ed Schonberg <schonberg@adacore.com>
4846 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If the body is
4847 the expansion of an expression function it may be pre-analyzed
4848 if a 'access attribute is applied to the function, in which case
4849 last_entity may have been assigned already.
4851 2015-01-06 Ed Schonberg <schonberg@adacore.com>
4853 * sem_ch4.adb (Analyze_One_Call): If formal has an incomplete
4854 type and actual has the corresponding full view, there is no
4855 error, but a case of use of incomplete type in a predicate or
4856 invariant expression.
4858 2015-01-06 Vincent Celier <celier@adacore.com>
4860 * makeutl.adb (Insert_No_Roots): Make sure that the same source
4861 in two different project tree is checked in both trees, if they
4862 are sources of two different projects, extended or not.
4864 2015-01-06 Arnaud Charlet <charlet@adacore.com>
4866 * gnat1drv.adb: Minor code clean up.
4867 (Adjust_Global_Switches): Ignore gnatprove_mode in codepeer_mode.
4869 2015-01-06 Bob Duff <duff@adacore.com>
4871 * osint.adb (Read_Source_File): Don't print out
4872 file name unless T = Source.
4874 2015-01-06 Ed Schonberg <schonberg@adacore.com>
4876 * sem_util.adb (Is_Variable, Is_OK_Variable_For_Out_Formal):
4877 recognize improper uses of constant_reference types as actuals
4878 for in-out parameters.
4879 (Check_Function_Call): Do not collect identifiers if function
4880 name is missing because of previous error.
4882 2015-01-06 Robert Dewar <dewar@adacore.com>
4884 * ali-util.adb, sem_prag.adb, rtsfind.adb, sem_util.adb, sem_res.adb,
4885 ali.adb, binde.adb, namet.adb, namet.ads, gnatls.adb, bcheck.adb:
4886 Minor change of name Name_Table_Info => Name_Table_Int.
4888 2015-01-06 Robert Dewar <dewar@adacore.com>
4890 * exp_strm.adb (Build_Elementary_Input_Call): Clarify comments
4891 in previous checkin.
4892 * freeze.adb (Freeze_Fixed_Point_Type): Add warning for shaving
4894 * sem_prag.adb, sem_ch10.adb, sem_ch6.adb: Minor reformatting.
4896 2015-01-06 Vincent Celier <celier@adacore.com>
4898 * a-strsup.adb (Times (Natural;String;Positive)): Raise
4899 Length_Error, not Index_Error, when the result is too long.
4901 2015-01-06 Thomas Quinot <quinot@adacore.com>
4903 * a-direct.adb (Create_Path): Minor error handling and
4904 performance improvement.
4906 2015-01-06 Robert Dewar <dewar@adacore.com>
4908 * checks.ads, sem_ch12.adb: Minor reformatting.
4909 * exp_ch4.adb (Expand_N_Op_Divide): Generate explicit divide by
4910 zero check for fixed-point case if Backend_Divide_Checks_On_Target
4913 2015-01-06 Robert Dewar <dewar@adacore.com>
4915 * sem_prag.adb (Analyze_Pragma, case No_Elaboration_Code_All):
4916 Do not set restriction No_Elaboration_Code unless the pragma
4917 appears in the main unit).
4919 2015-01-06 Ed Schonberg <schonberg@adacore.com>
4921 * sem_ch10.adb (Is_Regular_With_Clause): Add guard to verify
4922 that with clause has already been analyzed before checking kind
4925 2015-01-06 Robert Dewar <dewar@adacore.com>
4927 * exp_strm.adb (Build_Elementary_Input_Call): Return base type
4928 (as required by RM).
4930 2015-01-06 Arnaud Charlet <charlet@adacore.com>
4932 * a-reatim.adb ("/"): Add explicit pragma Unsuppress (Division_Check).
4934 2015-01-06 Robert Dewar <dewar@adacore.com>
4936 * sem_prag.adb (Process_Suppress_Unsuppress): Add extra warning
4937 for ignoring pragma Suppress (Elaboration_Check) in SPARK mode.
4939 2015-01-06 Javier Miranda <miranda@adacore.com>
4941 * exp_disp.adb (Expand_Interface_Conversion): No displacement
4942 of the pointer to the object needed when the type of the operand
4943 is not an interface type and the interface is one of its parent
4944 types (since they share the primary dispatch table).
4946 2015-01-06 Vincent Celier <celier@adacore.com>
4948 * prj-env.adb: Minor comment update.
4950 2015-01-06 Javier Miranda <miranda@adacore.com>
4952 * sem_res.adb (Valid_Conversion): Restrict the checks on anonymous
4953 access types whose target type is an interface type to operands
4954 that are access types; required to report an error when the
4955 operand is not an access type.
4957 2015-01-06 Bob Duff <duff@adacore.com>
4959 * a-cfinve.adb (Copy): Set the discriminant to the Length when
4961 * a-cofove.ads (Capacity): Add a postcondition.
4962 * a-cfinve.ads (Capacity): Add a postcondition.
4963 (Reserve_Capacity): Correct the postcondition in the case where
4964 Capacity = 0; that means "Capacity => Length (Container)".
4965 * a-cofove.adb (Elems[c]): Add a comment
4966 explaining the dangers and how to avoid them.
4968 2015-01-06 Ed Schonberg <schonberg@adacore.com>
4970 * sem_ch12.adb: Code clean up.
4972 2015-01-06 Arnaud Charlet <charlet@adacore.com>
4974 * gnatvsn.ads: Bump copyright year.
4976 2015-01-06 Robert Dewar <dewar@adacore.com>
4978 * s-taskin.ads, s-traces.ads: Minor reformatting.
4979 * exp_util.adb: Minor typo fix.
4981 2015-01-06 Vincent Celier <celier@adacore.com>
4983 * gnatls.adb (Search_RTS): Invoke Initialize_Default_Project_Path
4984 with the runtime name.
4985 * prj-env.adb (Initialize_Default_Project_Path): When both
4986 Target_Name and Runtime_Name are not empty string, add to the
4987 project path the two directories .../lib/gnat and .../share/gpr
4988 related to the runtime.
4989 * prj-env.ads (Initialize_Default_Project_Path): New String
4990 parameter Runtime_Name, defaulted to the empty string.
4992 2015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
4994 * frontend.adb: Guard against the case where a configuration
4995 pragma may be split into multiple pragmas and the original
4996 rewritten as a null statement.
4997 * sem_prag.adb (Analyze_Pragma): Insert a brand new Check_Policy
4998 pragma using Insert_Before rather than Insert_Action. This
4999 takes care of the configuration pragma case where Insert_Action
5002 2015-01-06 Bob Duff <duff@adacore.com>
5004 * a-coboho.ads (Element_Access): Add "pragma
5005 No_Strict_Aliasing (Element_Access);". This is needed because
5006 we are unchecked-converting from Address to Element_Access.
5007 * a-cofove.ads, a-cofove.adb (Elems,Elemsc): Fix bounds of the
5010 2015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
5012 * sem_res.adb (Resolve_Actuals): Remove the
5013 restriction which prohibits volatile actual parameters with
5014 enabled external propery Async_Writers to act appear in procedure
5015 calls where the corresponding formal is of mode OUT.
5017 2015-01-05 Jakub Jelinek <jakub@redhat.com>
5019 * gnat_ugn.texi: Bump @copying's copyright year.
5021 2015-01-05 Eric Botcazou <ebotcazou@adacore.com>
5024 * gcc-interface/Makefile.in (../stamp-tools): Reinstate dropped code.
5026 2015-01-04 Uros Bizjak <ubizjak@gmail.com>
5028 * gcc-interface/misc.c (internal_error_function): Use xasprintf instead
5029 of unchecked asprintf.
5032 Copyright (C) 2015 Free Software Foundation, Inc.
5034 Copying and distribution of this file, with or without modification,
5035 are permitted in any medium without royalty provided the copyright
5036 notice and this notice are preserved.