summaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch13.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2014-06-13 09:40:19 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2014-06-13 09:40:19 +0000
commit3961605376bdd43a150bce2a7e13d96572f7e92a (patch)
tree9392b6fe7a29491493d769638d43c961173996f0 /gcc/ada/sem_ch13.adb
parentd10a989c678e2514464763d65f10c758d2f436e7 (diff)
downloadgcc-3961605376bdd43a150bce2a7e13d96572f7e92a.tar.gz
2014-06-13 Yannick Moy <moy@adacore.com>
* sem_warn.adb (Check_Unset_References): Take case of Refined_Post into account in Within_Postcondition check. 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com> * freeze.adb (Freeze_Record_Type): Volatile types are not allowed in SPARK. 2014-06-13 Yannick Moy <moy@adacore.com> * sem_ch13.adb (Analyze_Aspect_Specifications/Aspect_Import, Aspect_Export): Consider that variables may be set outside the program. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@211611 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_ch13.adb')
-rw-r--r--gcc/ada/sem_ch13.adb15
1 files changed, 14 insertions, 1 deletions
diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb
index 3e1398ba163..31256d22f8f 100644
--- a/gcc/ada/sem_ch13.adb
+++ b/gcc/ada/sem_ch13.adb
@@ -1603,7 +1603,7 @@ package body Sem_Ch13 is
goto Continue;
end if;
- -- For case of address aspect, we don't consider that we
+ -- For the case of aspect Address, we don't consider that we
-- know the entity is never set in the source, since it is
-- is likely aliasing is occurring.
@@ -2691,6 +2691,19 @@ package body Sem_Ch13 is
elsif A_Id = Aspect_Import or else A_Id = Aspect_Export then
+ -- For the case of aspects Import and Export, we don't
+ -- consider that we know the entity is never set in the
+ -- source, since it is is likely modified outside the
+ -- program.
+
+ -- Note: one might think that the analysis of the
+ -- resulting pragma would take care of that, but
+ -- that's not the case since it won't be from source.
+
+ if Ekind (E) = E_Variable then
+ Set_Never_Set_In_Source (E, False);
+ end if;
+
-- Verify that there is an aspect Convention that will
-- incorporate the Import/Export aspect, and eventual
-- Link/External names.