From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7879) id 317BE385558F; Wed, 15 Feb 2023 10:19:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 317BE385558F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1676456345; bh=xRsOF6jZ2LIQPzgXZ/nEiML7Zsq+uzXPxt2XA2PThGY=; h=From:To:Subject:Date:From; b=To+O70xekvBsoh8tCWqwNhBgf37aLeqd3F94tQEAQW/TAIwcurGgGSoj9dDoAW9IV ISJQ60ZnV69ut+4oZIvueSgyunc8KvfTLyGiDauKLDfrmxWGb0Awr3hWfGxlOddaCS 279CNObA2ULeCHRH21riKeGS1OuwPuqhxQ/m4EsI= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Filip Kastl To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/pheeck/heads/sccp)] ada: Fix formatting glitches in Make_Tag_Assignment X-Act-Checkin: gcc X-Git-Author: Eric Botcazou X-Git-Refname: refs/users/pheeck/heads/sccp X-Git-Oldrev: 6a31241c5d2ae78d8bc24e383c891093268845c0 X-Git-Newrev: 08c73d59810317e0de86dfaaac6e4d2a44c23f84 Message-Id: <20230215101905.317BE385558F@sourceware.org> Date: Wed, 15 Feb 2023 10:19:05 +0000 (GMT) List-Id: https://gcc.gnu.org/g:08c73d59810317e0de86dfaaac6e4d2a44c23f84 commit 08c73d59810317e0de86dfaaac6e4d2a44c23f84 Author: Eric Botcazou Date: Sat Nov 19 20:43:40 2022 +0100 ada: Fix formatting glitches in Make_Tag_Assignment gcc/ada/ * exp_ch3.adb (Make_Tag_Assignment): Fix formatting glitches. Diff: --- 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;