aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPiotr Trojanek <trojanek@adacore.com>2021-08-30 12:03:52 +0200
committerPierre-Marie de Rodat <derodat@adacore.com>2022-07-12 12:24:10 +0000
commit474946c61a5dd5335ced09d52a95d1e3d90d1455 (patch)
tree6f0c670c5926199d75d2f5737c96070f6a809913
parente80daf04c8888f527d2fc7f6cbcd1b4c853dcd04 (diff)
downloadgcc-474946c61a5dd5335ced09d52a95d1e3d90d1455.zip
gcc-474946c61a5dd5335ced09d52a95d1e3d90d1455.tar.gz
gcc-474946c61a5dd5335ced09d52a95d1e3d90d1455.tar.bz2
[Ada] Remove excessive guard in detection of access-to-variable objects
It is safe to call Is_Access_Variable without calling Is_Access_Object_Type before. Compiler cleanup only; semantics is unaffected. gcc/ada/ * sem_util.adb (Is_Variable): Remove excessive guard.
-rw-r--r--gcc/ada/sem_util.adb1
1 files changed, 0 insertions, 1 deletions
diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb
index 7b7566d..9cff0f7 100644
--- a/gcc/ada/sem_util.adb
+++ b/gcc/ada/sem_util.adb
@@ -21896,7 +21896,6 @@ package body Sem_Util is
or else (K = E_Component
and then not In_Protected_Function (E))
or else (Present (Etype (E))
- and then Is_Access_Object_Type (Etype (E))
and then Is_Access_Variable (Etype (E))
and then Is_Dereferenced (N))
or else K = E_Out_Parameter