From 7ae795f7b62b8cf30291f4b9ebf6f17c397bb9c4 Mon Sep 17 00:00:00 2001 From: Piotr Trojanek Date: Thu, 31 May 2018 10:46:34 +0000 Subject: [PATCH] [Ada] Simplify call to Unique_Defining_Entity on protected entry declarations 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. 2018-05-31 Piotr Trojanek gcc/ada/ * sem_prag.adb (Analyze_Pragma): Replace call to Unique_Defining_Entity with a semantically equivalent call to Defining_Entity. From-SVN: r261003 --- gcc/ada/ChangeLog | 5 +++++ gcc/ada/sem_prag.adb | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index a58cfe85b95..8a138f0af8a 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2018-05-31 Piotr Trojanek + + * sem_prag.adb (Analyze_Pragma): Replace call to Unique_Defining_Entity + with a semantically equivalent call to Defining_Entity. + 2018-05-31 Piotr Trojanek * sem_prag.adb (Analyze_Pragma): Set Etype on the rewritten diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index e80c297cd09..9cfb39c9ca2 100644 --- a/gcc/ada/sem_prag.adb +++ b/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 -- 2.30.2