aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_attr.adb
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2015-11-14 00:11:34 +0000
committerJason Merrill <jason@redhat.com>2015-11-14 00:11:34 +0000
commit1da6b773e737548a7ffbfc950774460433ef9bb8 (patch)
treee5f2d64459601fae812cfe90245af2831eebedb1 /gcc/ada/sem_attr.adb
parent4587dbe905c7599512c23af5b55591a06bf829b9 (diff)
parentd77055b11cf7e121d66f2da7dfbc5f63347c7d7f (diff)
Merge trunk@230365.c++-delayed-folding
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/c++-delayed-folding@230367 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_attr.adb')
-rw-r--r--gcc/ada/sem_attr.adb6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb
index 7112869f4a8..eaaeb15f136 100644
--- a/gcc/ada/sem_attr.adb
+++ b/gcc/ada/sem_attr.adb
@@ -9993,6 +9993,9 @@ package body Sem_Attr is
-- to a missed warning (the Valid check does not really
-- modify!) If this case, Note will be reset to False.
+ -- Skip it as well if the type is an Acccess_To_Constant,
+ -- given that no use of the value can modify the prefix.
+
begin
if Attr_Id = Attribute_Unrestricted_Access
and then Nkind (PN) = N_Function_Call
@@ -10006,6 +10009,9 @@ package body Sem_Attr is
then
Note := False;
end if;
+
+ elsif Is_Access_Constant (Typ) then
+ Note := False;
end if;
if Note then