From patchwork Tue Nov 22 12:36:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Marc_Poulhi=C3=A8s?= X-Patchwork-Id: 24339 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2174438wrr; Tue, 22 Nov 2022 04:37:55 -0800 (PST) X-Google-Smtp-Source: AA0mqf45T8MD4HNIRi77sl5JQcsNwZbPdp1+pUT54eLds3nDnEcuB0iCflpfses9ktQ01t1fNzUF X-Received: by 2002:a17:906:fa19:b0:78d:9002:fe3b with SMTP id lo25-20020a170906fa1900b0078d9002fe3bmr15906104ejb.769.1669120675756; Tue, 22 Nov 2022 04:37:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669120675; cv=none; d=google.com; s=arc-20160816; b=VNg4SpY6xbXYk0/dOXdcfH4oM+YiYGlrolerfEPgSZ06sMaFaqT8sFGJ9JiCgvuZ4i eIfAv319/CZNJe2cdDtnrE+0tQ30uuJXuieG5/iV7uDE6ydMdD5dccu3tBFY/o6GSeop oju/N955F1BLirojtKZnLuBXB2Xiuufl7XsipNPZCxhbiNgf5CN6I+7ql5rddypnm8pu a1KXQmE5Bov6nl57xjdAlmNrBX8j8LrsfKWCypeddSKeLYoHKIAL54fWNteg4Lkcz/KY mPsPha7GBxZQaQ/gFqE7UD9rn3SpXzE8HDEjBZiazsJHvi/1qWVZj9BUSpCqSHbG7FqV v/0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:message-id:date:subject:cc :to:dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=yluQqDzzG1ySUSnnixWf2m+0MNELkXjulQySxxPTE8o=; b=cYTCYGb296OV0A/sWzXYYL3HwEjO/zv8aueB+YmN3cx35cwJCeRJdOUhmA0cRwuW3P +sKXbqz+/eOfuxo68Jpe143sDHJMqlUKA36bm7/pcBl67R3psC6qR4+9O1ux4+12hFks vzaBMw8p4uFz/KwAtDlpP4G57tUhju6O5rh8TFXmf5QUqm97kBhiGiw5QbrhkfC2W5xO lP5nkQfDcqqQqvgRx4hQ7NZa1Jss8g3AZ/YCHidiE9K6+MysTMm5TemfHKdzSdRg0VRL mfmbfrSybqQMmPf7iBG/gG3L6qDNOyI+iZIABmdHYLEjVfG4qIEiIbG6ODM4L/yFUKjp UTng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=cjx4JxwU; 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 y15-20020a056402440f00b00461a144e980si12990404eda.379.2022.11.22.04.37.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Nov 2022 04:37:55 -0800 (PST) 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=cjx4JxwU; 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 88CCF384F6DF for ; Tue, 22 Nov 2022 12:37:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 88CCF384F6DF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1669120648; bh=yluQqDzzG1ySUSnnixWf2m+0MNELkXjulQySxxPTE8o=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=cjx4JxwUrGEcRsiOftEWVdvidJCR7+64Po+75jW9f8n0kGRyZIPdbya1ZfwesJf02 vTzaeP9Il85XNkuz9qtpbDJrkGBy7pAwCS9VN7xOFTI2MXoH0a/MqXwrwP+C2YCG5+ yq73ZKUaS6bClMOTglXKE4jc+jzXoHG43hXli+Vc= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by sourceware.org (Postfix) with ESMTPS id 755CD3858428 for ; Tue, 22 Nov 2022 12:36:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 755CD3858428 Received: by mail-wr1-x42f.google.com with SMTP id v1so24454934wrt.11 for ; Tue, 22 Nov 2022 04:36:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=yluQqDzzG1ySUSnnixWf2m+0MNELkXjulQySxxPTE8o=; b=485Go79shMUscXY9MkDrOGeLG299AG55uymzzOb4/tEO4Y1fmidoN0pjUgLAHJY2Xu OLonSrQV7zu2WOqEn4yA06mjLEzYQI+54XJkkUBWFlo+7zFb9++BChoDONBVCbjCE5dJ yY/wKbK7iL+JrKRdi0sozPPlBPcm0Hul9O1dyjbsU61msIpdUEAJIaCPGA4w6TjsfNjG WiK5tksoWHHcN/pkGy+jXWowvMkMFGb4Mv2SxjCIZKEk3aIhjF6mZy+weXjEe3eeeaos Q9V+M5ZJihVNpB1NcvIDTIUp3ilnzlxV24EmEa+ioXLfz+WQL9m0coBaQzp8YN00zdRV dbaQ== X-Gm-Message-State: ANoB5plH4gqe59J7jdPQZML4Q9wCcQG3Hu5rpG2yKF8tHCvM21e763Jl p61oXHmLKqFnwPusFahlEVMb7Cn9cbdoaw== X-Received: by 2002:a5d:4985:0:b0:241:85fc:e85d with SMTP id r5-20020a5d4985000000b0024185fce85dmr14165324wrq.312.1669120601395; Tue, 22 Nov 2022 04:36:41 -0800 (PST) Received: from poulhies-Precision-5550.telnowedge.local (lmontsouris-659-1-24-67.w81-250.abo.wanadoo.fr. [81.250.175.67]) by smtp.gmail.com with ESMTPSA id h2-20020a1ccc02000000b003cf6e1df4a8sm16826472wmb.15.2022.11.22.04.36.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Nov 2022 04:36:40 -0800 (PST) To: gcc-patches@gcc.gnu.org Cc: Eric Botcazou Subject: [COMMITTED] ada: Fix formatting glitches in Make_Tag_Assignment Date: Tue, 22 Nov 2022 13:36:39 +0100 Message-Id: <20221122123639.336264-1-poulhies@adacore.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-13.3 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 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: =?utf-8?q?Marc_Poulhi=C3=A8s_via_Gcc-patches?= From: =?utf-8?q?Marc_Poulhi=C3=A8s?= Reply-To: =?utf-8?q?Marc_Poulhi=C3=A8s?= Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750199881353369958?= X-GMAIL-MSGID: =?utf-8?q?1750199881353369958?= From: Eric Botcazou gcc/ada/ * exp_ch3.adb (Make_Tag_Assignment): Fix formatting glitches. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/exp_ch3.adb | 40 +++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/gcc/ada/exp_ch3.adb b/gcc/ada/exp_ch3.adb index 7b194bb9816..2661a3ff9f6 100644 --- a/gcc/ada/exp_ch3.adb +++ b/gcc/ada/exp_ch3.adb @@ -11769,37 +11769,39 @@ package body Exp_Ch3 is function Make_Tag_Assignment (N : Node_Id) return Node_Id is Loc : constant Source_Ptr := Sloc (N); - Def_If : constant Entity_Id := Defining_Identifier (N); - Expr : constant Node_Id := Expression (N); - Typ : constant Entity_Id := Etype (Def_If); - Full_Typ : constant Entity_Id := Underlying_Type (Typ); + Def_If : constant Entity_Id := Defining_Identifier (N); + Expr : constant Node_Id := Expression (N); + Typ : constant Entity_Id := Etype (Def_If); + Full_Typ : constant Entity_Id := Underlying_Type (Typ); + New_Ref : Node_Id; begin - -- This expansion activity is called during analysis. + -- This expansion activity is called during analysis if Is_Tagged_Type (Typ) - and then not Is_Class_Wide_Type (Typ) - and then not Is_CPP_Class (Typ) - and then Tagged_Type_Expansion - and then Nkind (Expr) /= N_Aggregate - and then (Nkind (Expr) /= N_Qualified_Expression - or else Nkind (Expression (Expr)) /= N_Aggregate) + and then not Is_Class_Wide_Type (Typ) + and then not Is_CPP_Class (Typ) + and then Tagged_Type_Expansion + and then Nkind (Expr) /= N_Aggregate + and then (Nkind (Expr) /= N_Qualified_Expression + or else Nkind (Expression (Expr)) /= N_Aggregate) then New_Ref := Make_Selected_Component (Loc, - Prefix => New_Occurrence_Of (Def_If, Loc), - Selector_Name => - New_Occurrence_Of (First_Tag_Component (Full_Typ), Loc)); + Prefix => New_Occurrence_Of (Def_If, Loc), + Selector_Name => + New_Occurrence_Of (First_Tag_Component (Full_Typ), Loc)); + Set_Assignment_OK (New_Ref); return Make_Assignment_Statement (Loc, - Name => New_Ref, - Expression => - Unchecked_Convert_To (RTE (RE_Tag), - New_Occurrence_Of (Node - (First_Elmt (Access_Disp_Table (Full_Typ))), Loc))); + Name => New_Ref, + Expression => + Unchecked_Convert_To (RTE (RE_Tag), + New_Occurrence_Of + (Node (First_Elmt (Access_Disp_Table (Full_Typ))), Loc))); else return Empty; end if;