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.
Tested on x86_64-pc-linux-gnu, committed on trunk
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
--- 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.