From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2140) id DE3F73947407; Thu, 27 Jan 2022 09:49:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DE3F73947407 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Alexandre Oliva To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/aoliva/heads/testme)] Handle non-standard booleans in if_expression condition X-Act-Checkin: gcc X-Git-Author: Alexandre Oliva X-Git-Refname: refs/users/aoliva/heads/testme X-Git-Oldrev: 53836c887a05db23ff3b9fc06f64e0ba78810ece X-Git-Newrev: c42aeafeff55be1192aff2abf50868c13aa3691d Message-Id: <20220127094919.DE3F73947407@sourceware.org> Date: Thu, 27 Jan 2022 09:49:19 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Jan 2022 09:49:20 -0000 https://gcc.gnu.org/g:c42aeafeff55be1192aff2abf50868c13aa3691d commit c42aeafeff55be1192aff2abf50868c13aa3691d Author: Alexandre Oliva Date: Wed Dec 29 08:44:55 2021 -0300 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. [changelog] * exp_ch4.adb (Expand_N_If_Expression): Call Adjust_Condition to handle non-standard booleans. Diff: --- gcc/ada/exp_ch4.adb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb index c31f5bb36ba..662f975291e 100644 --- a/gcc/ada/exp_ch4.adb +++ b/gcc/ada/exp_ch4.adb @@ -5793,6 +5793,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.