]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[Ada] Remove excessive guard in detection of access-to-variable objects
authorPiotr Trojanek <trojanek@adacore.com>
Mon, 30 Aug 2021 10:03:52 +0000 (12:03 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Tue, 12 Jul 2022 12:24:10 +0000 (12:24 +0000)
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.

gcc/ada/sem_util.adb

index 7b7566d96c79aed9fe687268ecf549d3a91c7734..9cff0f729985dee7d1d17b11791e3440da897ad5 100644 (file)
@@ -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