From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1914) id 69C2638346AD; Tue, 10 May 2022 08:22:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 69C2638346AD MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Pierre-Marie de Rodat To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-250] [Ada] Handle non-standard booleans in if_expression condition X-Act-Checkin: gcc X-Git-Author: Alexandre Oliva X-Git-Refname: refs/heads/master X-Git-Oldrev: a77ab90ed3a3077a1e9320ac43b32c850d7c525f X-Git-Newrev: 81d33c5c9211dd65b2ffd29424e403582e4542f9 Message-Id: <20220510082259.69C2638346AD@sourceware.org> Date: Tue, 10 May 2022 08:22:59 +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: Tue, 10 May 2022 08:22:59 -0000 https://gcc.gnu.org/g:81d33c5c9211dd65b2ffd29424e403582e4542f9 commit r13-250-g81d33c5c9211dd65b2ffd29424e403582e4542f9 Author: Alexandre Oliva Date: Wed Dec 29 04:10:45 2021 -0300 [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: --- 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 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.