diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-07-30 15:12:15 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-07-30 15:12:15 +0000 |
commit | 7c3537be7ec41897478ec5b892df75ceb71c6980 (patch) | |
tree | 1e514a1830f592673f0fcf04c1f66e2283589aa7 /gcc/ada/sem_ch9.adb | |
parent | 482a44fac34add269597316ca15f2907f4361ef4 (diff) | |
download | gcc-7c3537be7ec41897478ec5b892df75ceb71c6980.tar.gz |
2012-07-30 Vincent Pucci <pucci@adacore.com>
* sem_ch9.adb (Allows_Lock_Free_Implementation): Restrict implicit
dereferences of access values.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189975 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_ch9.adb')
-rw-r--r-- | gcc/ada/sem_ch9.adb | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/gcc/ada/sem_ch9.adb b/gcc/ada/sem_ch9.adb index 1420ba87bc0..c392dccdc9a 100644 --- a/gcc/ada/sem_ch9.adb +++ b/gcc/ada/sem_ch9.adb @@ -411,12 +411,15 @@ package body Sem_Ch9 is return Abandon; - -- Explicit dereferences restricted (i.e. dereferences of - -- access values). + -- Dereferences of access values restricted - elsif Kind = N_Explicit_Dereference then + elsif Kind = N_Explicit_Dereference + or else (Kind = N_Selected_Component + and then Is_Access_Type (Etype (Prefix (N)))) + then if Lock_Free_Given then - Error_Msg_N ("explicit dereference not allowed", N); + Error_Msg_N ("dereference of access value " & + "not allowed", N); return Skip; end if; |