diff options
author | Alexandre Oliva <oliva@adacore.com> | 2021-12-29 04:10:45 -0300 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2022-05-10 08:19:29 +0000 |
commit | 81d33c5c9211dd65b2ffd29424e403582e4542f9 (patch) | |
tree | 3fc515340533ea2d9636750906f5a34301a2d43a | |
parent | a77ab90ed3a3077a1e9320ac43b32c850d7c525f (diff) | |
download | gcc-81d33c5c9211dd65b2ffd29424e403582e4542f9.zip gcc-81d33c5c9211dd65b2ffd29424e403582e4542f9.tar.gz gcc-81d33c5c9211dd65b2ffd29424e403582e4542f9.tar.bz2 |
[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.
-rw-r--r-- | gcc/ada/exp_ch4.adb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb index 9de384a..98ce797 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. |