aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/exp_attr.adb
diff options
context:
space:
mode:
authorEd Schonberg <schonberg@adacore.com>2011-12-22 08:54:26 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2011-12-22 09:54:26 +0100
commit3b59004a6dccaa88c178edde7e497debe098ef6e (patch)
tree8ae97f6c9b1cf91d31b83f4294ee87b5c265aba1 /gcc/ada/exp_attr.adb
parent9a7e930fb278bb55e5387b9342d5566afb1f2c3b (diff)
downloadgcc-3b59004a6dccaa88c178edde7e497debe098ef6e.zip
gcc-3b59004a6dccaa88c178edde7e497debe098ef6e.tar.gz
gcc-3b59004a6dccaa88c178edde7e497debe098ef6e.tar.bz2
a-cohase.ads, [...]: Update to latest RM version.
2011-12-22 Ed Schonberg <schonberg@adacore.com> * a-cohase.ads, a-cohase.adb: Update to latest RM version. Add aspect Constant_Reference to set type, and corresponding functions. * a-cihama.ads, a-cihama.adb: Update to latest RM version. Add function Reference to provide a proper element iterator construct over indefinite maps. 2011-12-22 Ed Schonberg <schonberg@adacore.com> * exp_attr.adb (Expand_N_Attribute, case 'Access): Do not insert implicit conversion on prefix of Unrestricted_Access when prefix is an explicit dereference. From-SVN: r182617
Diffstat (limited to 'gcc/ada/exp_attr.adb')
-rw-r--r--gcc/ada/exp_attr.adb5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/ada/exp_attr.adb b/gcc/ada/exp_attr.adb
index ef0e70b..14d9da1 100644
--- a/gcc/ada/exp_attr.adb
+++ b/gcc/ada/exp_attr.adb
@@ -971,11 +971,12 @@ package body Exp_Attr is
(Etype (Prefix (Ref_Object))));
begin
-- No implicit conversion required if designated types
- -- match.
+ -- match, or if we have an unrestricted access.
if Obj_DDT /= Btyp_DDT
+ and then Id /= Attribute_Unrestricted_Access
and then not (Is_Class_Wide_Type (Obj_DDT)
- and then Etype (Obj_DDT) = Btyp_DDT)
+ and then Etype (Obj_DDT) = Btyp_DDT)
then
Rewrite (N,
Convert_To (Typ,