From 7d2a5dbbfed311b9d13e5772dbc86f525adde3e9 Mon Sep 17 00:00:00 2001 From: Piotr Trojanek Date: Thu, 22 Feb 2024 22:25:16 +0100 Subject: ada: Fix detection of if_expressions that are known on entry Fix a small glitch in routine Is_Known_On_Entry, which returned False for all if_expressions, regardless whether their conditions or dependent expressions are known on entry. gcc/ada/ * sem_util.adb (Is_Known_On_Entry): Check whether condition and dependent expressions of an if_expression are known on entry. --- gcc/ada/sem_util.adb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index 68e131d..766cabf 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -30784,9 +30784,7 @@ package body Sem_Util is return Is_Known_On_Entry (Expression (Expr)); when N_If_Expression => - if not All_Exps_Known_On_Entry (Expressions (Expr)) then - return False; - end if; + return All_Exps_Known_On_Entry (Expressions (Expr)); when N_Case_Expression => if not Is_Known_On_Entry (Expression (Expr)) then -- cgit v1.1