[COMMITTED] ada: Minor tweak in condition

Message ID 20230526073553.2068097-1-poulhies@adacore.com
State Accepted
Headers
Series [COMMITTED] ada: Minor tweak in condition |

Checks

Context Check Description
snail/gcc-patch-check success Github commit url

Commit Message

Marc Poulhiès May 26, 2023, 7:35 a.m. UTC
  From: Eric Botcazou <ebotcazou@adacore.com>

gcc/ada/

	* sem_util.adb (Compile_Time_Constraint_Error): Test the Ekind.

Tested on x86_64-pc-linux-gnu, committed on master.

---
 gcc/ada/sem_util.adb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb
index aabd01747fc..ea5be2ff4b5 100644
--- a/gcc/ada/sem_util.adb
+++ b/gcc/ada/sem_util.adb
@@ -6110,7 +6110,7 @@  package body Sem_Util is
 
                      Conc_Typ : constant Entity_Id :=
                        (if Present (Init_Proc_Type)
-                          and then Init_Proc_Type in E_Record_Type_Id
+                          and then Ekind (Init_Proc_Type) = E_Record_Type
                         then Corresponding_Concurrent_Type (Init_Proc_Type)
                         else Empty);