exp_ch6.ads, [...] (Expand_Call): When adding an extra accessibility actual...
authorGary Dismukes <dismukes@adacore.com>
Wed, 6 Jun 2007 10:25:50 +0000 (12:25 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Wed, 6 Jun 2007 10:25:50 +0000 (12:25 +0200)
commit7888a6aecc26ae7f7d406e893e0620dfccb1837b
tree1432e807f3070b618d4b46fb313c6cae5e25b550
parenta79ec8c58c6a8b452a3916fe8d74712c1b0ab708
exp_ch6.ads, [...] (Expand_Call): When adding an extra accessibility actual...

2007-04-20  Gary Dismukes  <dismukes@adacore.com>
    Ed Schonberg  <schonberg@adacore.com>

* exp_ch6.ads, exp_ch6.adb (Expand_Call): When adding an extra
accessibility actual, check for the case of an aliased object that has
been rewritten as an Access attribute, and assign Prev to Prev_Orig so
we fall into processing for the attribute rather than the name of the
object.
(Expand_Inline_Call): If an actual is a literal, and the corresponding
formal has its address taken in the body, create a temporary to capture
value.  If the return type is a limited interface, do not treat the
return value as Controlled.
(Is_In_Place_Function):  If the return type is a limited interface,
treat as returning in place. The actual returned object may not always
be limited, but the caller has to assume that it is returned in place.
(Add_Final_List_Actual_To_Build_In_Place_Call): If the call is the
context of an allocator, use the correct finalization chain (that is,
the chain belonging to the access type, rather than the chain belonging
to the current scope).
(Add_Alloc_Form_Actual_To_Build_In_Place_Call): Test for a tagged
result type rather than a controlling result as a precondition for
adding an allocation form actual to a build-in-place call.
(Add_Final_List_Actual_To_Build_In_Place_Call): Ditto.
(Freeze_Subprogram): Code cleanup. Remove all the code that register the
primitive in the dispatch tables. This work is now done by Make_DT when
the type is frozen.
(Register_Predefined_DT_Entry): Removed.
(Add_Return): If end label is not present, use sloc of last statement
for generated return statement in procedure, for better gdb behavior
on expanded code.
(Add_Access_Actual_To_Build_In_Place_Call): Set parent fields of the
object address nodes to ensure proper processing by routines like
Insert_After*.
(Expand_Call): Fix generation of validity check for parameter
(Add_Alloc_Form_Actual_To_Build_In_Place_Call): Return without passing
the allocation form parameter if the result subtype is constrained,
except when the function has a controlling result.
(Add_Final_List_Actual_To_Build_In_Place_Call): Test Controlled_Type
rather than Is_Controlled and Has_Controlled_Component, since we want to
include class-wide result types in this treatment. Also test for a
controlling result, since that also requires passing a finalization
list.
(Make_Build_In_Place_Call_In_Allocator): Call Add_Alloc_Form_Actual_*
even when the result subtype is constrained, to handle calls involving
controlling results.
(Make_Build_In_Place_Call_In_Anonymous_Context): Add_Alloc_Form_Actual_*
is now called even when the result subtype is constrained, to handle
calls involving controlling results.
(Make_Build_In_Place_Call_In_Assignment): Remove test for Is_Constrained
on call to Add_Alloc_Form_Actual_To_Build_In_Place_Call (that procedure
now performs the test).
(Make_Build_In_Place_Call_In_Object_Declaration):
Add_Alloc_Form_Actual_* is now called even when the result subtype is
constrained, to handle calls involving controlling results.
(Add_Return): Accomodate rewritten pattern from local raise to goto
transformation, so that we still recognize an transfer statement
and do the right thing here in that case.
(Expand_N_Subprogram_Body): Add dummy Push/Pop_xxx_Label nodes at start
and end of subprogram code.
(Register_Interface_DT_Entry, Register_Predefined_DT_Entry): Add missing
support for primitives that are functions (without formals) with a
controlling result.
(Inherited_From_Formal): If the actual subtype has not generic parent
type, it is not an actual for a formal derived type, and there is no
operation to inherit from the formal.

From-SVN: r125399
gcc/ada/exp_ch6.adb
gcc/ada/exp_ch6.ads