From: Alexandre Oliva Date: Wed, 29 Dec 2021 07:10:45 +0000 (-0300) Subject: [Ada] Handle non-standard booleans in if_expression condition X-Git-Tag: basepoints/gcc-14~6957 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=81d33c5c9211dd65b2ffd29424e403582e4542f9;p=thirdparty%2Fgcc.git [Ada] Handle non-standard booleans in if_expression condition We failed to call Adjust_Condition for the condition expression of an if_expression, so non-standard booleans were expanded like standard booleans, disregarding representation clauses. Fixed. gcc/ada/ * exp_ch4.adb (Expand_N_If_Expression): Call Adjust_Condition to handle non-standard booleans. --- diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb index 9de384a4eb9..98ce797be68 100644 --- a/gcc/ada/exp_ch4.adb +++ b/gcc/ada/exp_ch4.adb @@ -5794,6 +5794,10 @@ package body Exp_Ch4 is -- Start of processing for Expand_N_If_Expression begin + -- Deal with non-standard booleans + + Adjust_Condition (Cond); + -- Check for MINIMIZED/ELIMINATED overflow mode. -- Apply_Arithmetic_Overflow_Check will not deal with Then/Else_Actions -- so skip this step if any actions are present.