From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2140) id 4E9063856243; Fri, 6 May 2022 07:18:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4E9063856243 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: 3e7db517472f6c671ad616e968f3e1027f42cca7 X-Git-Newrev: 8e9c5b9eb6264c9978ec994c5de165965ebdd510 Message-Id: <20220506071839.4E9063856243@sourceware.org> Date: Fri, 6 May 2022 07:18:39 +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: Fri, 06 May 2022 07:18:39 -0000 https://gcc.gnu.org/g:8e9c5b9eb6264c9978ec994c5de165965ebdd510 commit 8e9c5b9eb6264c9978ec994c5de165965ebdd510 Author: Alexandre Oliva Date: Thu Feb 17 03:12:00 2022 -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 2506c67e936..08dbd9bd8bf 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.