Message ID | 20220902075331.GA1121106@poulhies-Precision-5550 |
---|---|
State | New, archived |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:ecc5:0:0:0:0:0 with SMTP id s5csp611859wro; Fri, 2 Sep 2022 00:59:17 -0700 (PDT) X-Google-Smtp-Source: AA6agR5k6Tdi1Mq2aWIeFlXKHXOKAi9oWud5c3WBPfHEZ0HjDPPYM7MQe2S6B2RuhuXGVgrSzk2y X-Received: by 2002:aa7:cc97:0:b0:445:afab:2634 with SMTP id p23-20020aa7cc97000000b00445afab2634mr32678973edt.54.1662105557122; Fri, 02 Sep 2022 00:59:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662105557; cv=none; d=google.com; s=arc-20160816; b=YehYgqN8NWaDqMlQTmQleH2FgzlteQXHfqw323tgpaXa2IVpZmK4U9zH1+agUtHA4A dRUIeK4El2OKlo9Wfx2OEln42cMNDcyY7DuRnIiY9PqLRPQD4cVT+PA2uuMs+3JFwjpG JtnMpndknljKU+foZlt6tEvkutUyv6l1CKjpEttJqRAIfkVtJnFCI1mpk4Y0chTCOMpD QwvEUvCJ4d8XqcM0tShXsLdkn5R89LUNDwUV39/r9uah+bZk3xIFb72In+YHK+d82jIo PHiIyuUlLr9T7ZLB5kCfMo0IKmsnClLNQgG3YnnlTJsKV343loUa2mlV8kXEvHFFjgDq wUCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:reply-to:from:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence :content-disposition:mime-version:message-id:subject:to:date :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=sI3P+wMuHqIAOSUVIA63sF9PJOFdt1Bvk94T3vImnqY=; b=UCZftC4Wudf7fCklwk7vuJUJKj1J3+XP9z075AwHfzKfmWwSzoavP6RNKypffdAlmc d5i2vJ7ewoHgjHC94ch/VJ7IwflU1HH9yRt8B4716cop5RXG7jS/aL/IXwfXJGgQ1MwO 8wftnRiPFCe+7LA20YXzu+fxON/4XT2XzeDxlsj0ogusA2pmMeRNZ4OQ199Ns70dx6UC I2LIdEzspxbaqb76JHEgulMCbHDQzqWvL3PBFcrCdn3xmJdQ+FGD7BCNHaLq3m2O5LNH 3benDo6NRT3X5rqywjvSz3G3xyNHwe+hc8NqsIeG2c3uwzZw2dLE1sNRtI2EyMYGDJLT XWSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=LnTgFmvP; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id b13-20020a056402278d00b00448988dcdd5si1382851ede.532.2022.09.02.00.59.16 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Sep 2022 00:59:17 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=LnTgFmvP; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 719523854164 for <ouuuleilei@gmail.com>; Fri, 2 Sep 2022 07:57:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 719523854164 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1662105442; bh=sI3P+wMuHqIAOSUVIA63sF9PJOFdt1Bvk94T3vImnqY=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=LnTgFmvPP0epdbqOj63wRg+8fShJVuPDPQrqTwqzSiqePIKpQkq3YhyuoXlKIfgOn /JFbC1zm8qV/VESWOSOAtrDRF1zXA0KBd5RBxgdb+xLqRRvY4fyjVfHpOOR+C6YAHD 6TUfeFvVMqpp1MECg99ZHZrzZTdwAiFsx4LlaFA4= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by sourceware.org (Postfix) with ESMTPS id 56E273857C65 for <gcc-patches@gcc.gnu.org>; Fri, 2 Sep 2022 07:53:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 56E273857C65 Received: by mail-wr1-x42d.google.com with SMTP id b16so1227819wru.7 for <gcc-patches@gcc.gnu.org>; Fri, 02 Sep 2022 00:53:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date; bh=sI3P+wMuHqIAOSUVIA63sF9PJOFdt1Bvk94T3vImnqY=; b=TfuiY7wNPdfs4M2KaitVKClz2EHxpyGXZORVOjZNdiAPb+T8VKlNjCtPAwloccWxZ5 oA4l42OpSp2IG2Q7smqrYsKQudLdvWxJAhCUsSBt1zH1EZ8nc8O6KljVoHv6b0CPIwVE 2R8mHyte6873LpZAyfmVrw9xB1JQkAnwwhTKnczGrQQ1cYp/0ZU6OQIsJTHvmEUcXLnN hgQKzO+pEHCLD26AFwKeaB3aI2VnAoLTL3a68GDFDSP/6GKdSLCnnaQiMJssYe4xRJDI fmpgJyjXtXpU9a8kCk2jEJChK6JMyfz2z3tLMhWylr1LqxSr0Iy9K4Un5vxjtSWTp/go oscg== X-Gm-Message-State: ACgBeo1YqMz84gFs4z5osik+4VuHLRz6iLHMvgT/iiR5VM5ZdLlpMFht 9bUWD/WcD5SKRyFheoyj9wOFPOJq3zAwYQ== X-Received: by 2002:a5d:6d0f:0:b0:226:ef13:4689 with SMTP id e15-20020a5d6d0f000000b00226ef134689mr5594366wrq.203.1662105213255; Fri, 02 Sep 2022 00:53:33 -0700 (PDT) Received: from poulhies-Precision-5550 (static-176-191-105-132.ftth.abo.bbox.fr. [176.191.105.132]) by smtp.gmail.com with ESMTPSA id bo11-20020a056000068b00b002251639bfd0sm872241wrb.59.2022.09.02.00.53.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Sep 2022 00:53:32 -0700 (PDT) Date: Fri, 2 Sep 2022 09:53:31 +0200 To: gcc-patches@gcc.gnu.org Subject: [Ada] Adjust previous change to Expand_Subtype_From_Expr Message-ID: <20220902075331.GA1121106@poulhies-Precision-5550> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="d6Gm4EdcadzBjdND" Content-Disposition: inline X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> From: =?utf-8?q?Marc_Poulhi=C3=A8s_via_Gcc-patches?= <gcc-patches@gcc.gnu.org> Reply-To: Marc =?iso-8859-1?q?Poulhi=E8s?= <poulhies@adacore.com> Cc: Eric Botcazou <ebotcazou@adacore.com> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1742843996967130967?= X-GMAIL-MSGID: =?utf-8?q?1742843996967130967?= |
Series |
[Ada] Adjust previous change to Expand_Subtype_From_Expr
|
|
Commit Message
Marc Poulhiès
Sept. 2, 2022, 7:53 a.m. UTC
An aggregate may have been rewritten before being seen by the procedure. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_util.adb (Expand_Subtype_From_Expr): Be prepared for rewritten aggregates as expressions.
diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb --- a/gcc/ada/exp_util.adb +++ b/gcc/ada/exp_util.adb @@ -5741,7 +5741,7 @@ package body Exp_Util is -- non-statically-matching subtypes on 'Access of this object. and then (Nkind (N) /= N_Object_Declaration - or else Nkind (Exp) = N_Aggregate + or else Nkind (Original_Node (Exp)) = N_Aggregate or else Is_Constr_Subt_For_U_Nominal (Exp_Typ)) then -- Within an initialization procedure, a selected component