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: 60973 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D3E6A3853D48 for ; Tue, 22 Nov 2022 12:37:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D3E6A3853D48 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1669120633; 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=oqpMfmE7QsvCGdPWHS95eLcfu5UBlnqR++b6pN5kuNhRdd1Solyn07pQ4k9wv/7+2 la00xym5VJ9FAj7MjnicYKzLqZvB3ukAnyrJeM3rdfINYIrSvdq5GK2BQIGXk2q+5j Tk2zeZDI9O574xejJcRk5N/ptUggqT5xkb8xBR9c= 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-Google-Smtp-Source: AA0mqf6d2tQ3Y73CawxRuGVZPrv7nZe5FeGUsn+Sjh13W83jhtcYs/8dRwV8LCizdDgX53buhF3YNw== 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+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" 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;