diff mbox series

[Ada] Remove excessive guard in detection of access-to-variable objects

Message ID 20220712122503.GA3404497@adacore.com
State New
Headers show
Series [Ada] Remove excessive guard in detection of access-to-variable objects | expand

Commit Message

Pierre-Marie de Rodat July 12, 2022, 12:25 p.m. UTC
It is safe to call Is_Access_Variable without calling
Is_Access_Object_Type before. Compiler cleanup only; semantics is
unaffected.

Tested on x86_64-pc-linux-gnu, committed on trunk

gcc/ada/

	* sem_util.adb (Is_Variable): Remove excessive guard.
diff mbox series

Patch

diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb
--- 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