Calling Unique_Defining_Entity on protectected entry declarations is
equivalent to calling a simpler Defining_Entity; use the simpler routine.

Simplification only; semantics unaffected, so no test provided.

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

2018-05-31  Piotr Trojanek  <troja...@adacore.com>

gcc/ada/

        * sem_prag.adb (Analyze_Pragma): Replace call to Unique_Defining_Entity
        with a semantically equivalent call to Defining_Entity.
--- gcc/ada/sem_prag.adb
+++ gcc/ada/sem_prag.adb
@@ -18795,7 +18795,7 @@ package body Sem_Prag is
                   return;
                end if;
 
-               Entry_Id := Unique_Defining_Entity (Entry_Decl);
+               Entry_Id := Defining_Entity (Entry_Decl);
 
             --  Otherwise the pragma is associated with an illegal construct
 

Reply via email to