diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2015-05-26 11:28:14 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2015-05-26 11:28:14 +0200 |
commit | e8c84c8fc3a1d5e78ec885f9674add6e00fad8e5 (patch) | |
tree | 549d728b2d31a9a843361ff2b3f424e4299f4897 /gcc/ada/exp_ch4.adb | |
parent | b9eb3aa8a2f9c09ade591ed1a1edc12f0e73ed73 (diff) | |
download | gcc-e8c84c8fc3a1d5e78ec885f9674add6e00fad8e5.zip gcc-e8c84c8fc3a1d5e78ec885f9674add6e00fad8e5.tar.gz gcc-e8c84c8fc3a1d5e78ec885f9674add6e00fad8e5.tar.bz2 |
[multiple changes]
2015-05-26 Ed Schonberg <schonberg@adacore.com>
* sem_ch7.adb (Install_Private_Declarations,
Swap_Private_Dependents): Ensure that both views of the dependent
subtype are immediately visible if we are within their scope. This
may be needed when a procedure body is both the parent of an
instantiated child unit, and is itself used to inline a local
function.
2015-05-26 Gary Dismukes <dismukes@adacore.com>
* exp_prag.adb, gnat1drv.adb: Minor reformatting.
2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
* exp_ch4.adb (Expand_N_Indexed_Component): In the circuit
detecting exceptions to the rewriting, deal with implicit
dereferences in the selected component case.
2015-05-26 Bob Duff <duff@adacore.com>
* sem_ch13.adb (Analyze_One_Aspect): Do not
require the expression of the Disable_Controlled aspect to be
static in a generic template, because 'Enabled is not known
until the instance.
2015-05-26 Doug Rupp <rupp@adacore.com>
* init-vxsim.c: New file for vxsim ZCX
* sigtramp-vxworks-vxsim.c: Likewise.
* sigtramp-vxworks.c: Factor out target dependent bits into ...
* sigtramp-vxworks-target.inc: ... here.
* sigtramp.h: Add vxsim zcx protos.
* init.c [vxworks...] (sysLib.h): Include.
(__gnat_map_signal): Make global.
[...i386] (__gnat_error_handler): Call __gnat_vxsim_error_handler if
on vxsim.
[...i386] (__gnat_install_handler): Test if on vxsim.
2015-05-26 Ed Schonberg <schonberg@adacore.com>
* sem_ch5.adb (Analyze_Iterator_Specification): For an element
iterator over an array, if the component is aliased, the loop
variable is aliased as well.
2015-05-26 Ed Schonberg <schonberg@adacore.com>
* exp_ch6.adb (Expand_Actuals): For a function call with in-out
parameters that is rewritten as an expression_with_actions,
we preserve the original function call node for further use by
the caller (typically Expand_Call). In the presence of validity
checks, that function call, though it is labelled Analyzed to
prevent an infinite recursion, may be rewritten as a temporary
by Remove_Side_Effects. Ensure that the caller has access to
the original function call to continue expansion.
* atree.ads: Minor typo in comment.
2015-05-26 Javier Miranda <miranda@adacore.com>
* sem_util.adb (Check_Function_Writable_Actuals):
Add missing support to check the violation of writable actuals
in array aggregates that have a nonstatic range.
From-SVN: r223672
Diffstat (limited to 'gcc/ada/exp_ch4.adb')
-rw-r--r-- | gcc/ada/exp_ch4.adb | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb index 4dcc9be..8e16ca7 100644 --- a/gcc/ada/exp_ch4.adb +++ b/gcc/ada/exp_ch4.adb @@ -6299,7 +6299,10 @@ package body Exp_Ch4 is -- The prefix of an address or bit or size attribute reference - -- The following circuit detects these exceptions + -- The following circuit detects these exceptions. Note that we need to + -- deal with implicit dereferences when climbing up the parent chain, + -- with the additional difficulty that the type of parents may have yet + -- to be resolved since prefixes are usually resolved first. declare Child : Node_Id := N; @@ -6351,11 +6354,22 @@ package body Exp_Ch4 is then return; - elsif Nkind_In (Parnt, N_Indexed_Component, N_Selected_Component) + elsif Nkind (Parnt) = N_Indexed_Component + and then Prefix (Parnt) = Child + then + null; + + elsif Nkind (Parnt) = N_Selected_Component and then Prefix (Parnt) = Child + and then not (Present (Etype (Selector_Name (Parnt))) + and then + Is_Access_Type (Etype (Selector_Name (Parnt)))) then null; + -- If the parent is a dereference, either implicit or explicit, + -- then the packed reference needs to be expanded. + else Expand_Packed_Element_Reference (N); return; |