aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMaroua Maalej <maalej@adacore.com>2018-10-09 15:06:30 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2018-10-09 15:06:30 +0000
commit38c2f655ffa5cf2f335c2772ec484702d891a7c3 (patch)
tree191daf19dd73e3798d397c213a5332d2cd9f26c7 /gcc
parent827845b8291910e7815ffcafe58d48a78c3ea410 (diff)
downloadgcc-38c2f655ffa5cf2f335c2772ec484702d891a7c3.zip
gcc-38c2f655ffa5cf2f335c2772ec484702d891a7c3.tar.gz
gcc-38c2f655ffa5cf2f335c2772ec484702d891a7c3.tar.bz2
[Ada] SPARK: fix bug related to non access object permissions
2018-10-09 Maroua Maalej <maalej@adacore.com> gcc/ada/ * sem_spark.adb (Check_Declaration): fix bug related to non access object permissions. From-SVN: r264979
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog5
-rw-r--r--gcc/ada/sem_spark.adb20
2 files changed, 7 insertions, 18 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index fdc2c31..fada99d 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,8 @@
+2018-10-09 Maroua Maalej <maalej@adacore.com>
+
+ * sem_spark.adb (Check_Declaration): fix bug related to non
+ access object permissions.
+
2018-10-09 Doug Rupp <rupp@adacore.com>
* libgnat/a-ncelfu.ads: Fix name in header to match package.
diff --git a/gcc/ada/sem_spark.adb b/gcc/ada/sem_spark.adb
index 9a22092..0fe7c1b 100644
--- a/gcc/ada/sem_spark.adb
+++ b/gcc/ada/sem_spark.adb
@@ -1052,22 +1052,6 @@ package body Sem_SPARK is
end if;
end if;
- elsif Nkind_In (Expression (Decl),
- N_Attribute_Reference,
- N_Attribute_Reference,
- N_Expanded_Name,
- N_Explicit_Dereference,
- N_Indexed_Component,
- N_Reference,
- N_Selected_Component,
- N_Slice)
- then
- if Is_Access_Type (Etype (Prefix (Expression (Decl))))
- or else Is_Deep (Etype (Prefix (Expression (Decl))))
- then
- Current_Checking_Mode := Observe;
- Check := True;
- end if;
end if;
end if;
@@ -1075,7 +1059,7 @@ package body Sem_SPARK is
Check_Node (Expression (Decl));
end if;
- -- If lhs is not a pointer, we still give it the appropriate
+ -- If lhs is not a pointer, we still give it the unrestricted
-- state which is useless but not harmful.
declare
@@ -1215,7 +1199,7 @@ package body Sem_SPARK is
when N_Attribute_Reference =>
case Attribute_Name (Expr) is
when Name_Access =>
- Error_Msg_N ("access attribute not allowed in SPARK", Expr);
+ Error_Msg_N ("access attribute not allowed", Expr);
when Name_Last
| Name_First