From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by sourceware.org (Postfix) with ESMTPS id 33005385829F for ; Mon, 7 Nov 2022 08:41:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 33005385829F Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com Received: by mail-wm1-x32c.google.com with SMTP id ja4-20020a05600c556400b003cf6e77f89cso7925964wmb.0 for ; Mon, 07 Nov 2022 00:41:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=Qde9uql4qStvna1Vx8q3FetiaHY3liD99PIvqDgZM/o=; b=jZpvB1cjJHcvMmhFFcT6uZJHddRSQbrA5uIcD7nEelEflcwBHM7HVIUuD+3OajPqWi zC16wXCI0JOxVHeSnFXUFfbRWWyqyDqUGqebc031DEP/ZEB3XXTtrIyTA4ZksXvYYY9i XHfLIWWdOMLC/kHUh+C24uEZw0/Ox4Msxr1cvCZn8oYwuCXFewwboJz+/vnyRbSizeND 62QrqqAPdD0um9on2mt1erKMFtcbQhIgf/SMbN+i85GA6/pSXhpyTv0k5ufbIHyTPNxg 3wy0AWe0PMVpC6JdQhNupjtO3s7PxObRDdjA4ld+I3dNoR/7wBXnixi7gOnQRIuj7RwD 8v7A== 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=Qde9uql4qStvna1Vx8q3FetiaHY3liD99PIvqDgZM/o=; b=qOOngcBOoTr1J89DoSXLFgm1jm5JOzpcm/lSdM7zSAgC5P7ctqN4r6I8NHnD+hRbu2 gH3+6JgKcQTE3kmlJ4xWSUnpN9GqaT4QQPZRzPEewQ6KMOuOoRA+t338v/EsPsjU97Sc IxXrzbyyvXVETx3NTxZ1V5xMWw71cwY5oD0l1uoT9imSCavY8OCkl5fDJVoqEUK3GWSZ R8JmZfNJbv2iNXzRGiby+HIz20kzE6qZhEKsUNC3JanS000JAtBGlzH3TlYOnw5PTTtA X+0guNiZwZ1C1j/kT1v9+ZYVJ0tbpB5X6FnewL6jGJ28I8HKp61c/IZIh6+uMJSl8X/p H64w== X-Gm-Message-State: ANoB5plmTBJ2Wj3amGPhilv44YZIh0T+WeeA9wrQK4h872CiHRcmFSqr GYwCKmGTRAS3cW1GM8E+U7cIGVKlZE9JnA== X-Google-Smtp-Source: AA0mqf53LsyCrm44FIUI783WTAE8TJkmxA3YJpXMGnCueBBjueY48+GjEckyCOGPW4tRRgU7EfGo7g== X-Received: by 2002:a1c:f407:0:b0:3cf:a856:ba12 with SMTP id z7-20020a1cf407000000b003cfa856ba12mr3847657wma.18.1667810499017; Mon, 07 Nov 2022 00:41:39 -0800 (PST) Received: from poulhies-Precision-5550.lan (static-176-191-105-132.ftth.abo.bbox.fr. [176.191.105.132]) by smtp.gmail.com with ESMTPSA id q10-20020adff94a000000b0022e035a4e93sm6548850wrr.87.2022.11.07.00.41.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Nov 2022 00:41:38 -0800 (PST) From: =?UTF-8?q?Marc=20Poulhi=C3=A8s?= To: gcc-patches@gcc.gnu.org Cc: Bob Duff Subject: [COMMITTED] ada: Use named notation in calls to Expand_Composite_Equality Date: Mon, 7 Nov 2022 09:41:35 +0100 Message-Id: <20221107084135.151888-1-poulhies@adacore.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-13.4 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 List-Id: From: Bob Duff Use named notation in calls to Expand_Composite_Equality. gcc/ada/ * exp_ch4.adb (Component_Equality, Expand_Array_Equality) (Expand_Record_Equality): Use named notation. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/exp_ch4.adb | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb index 4a60ff59601..0a104cd8e23 100644 --- a/gcc/ada/exp_ch4.adb +++ b/gcc/ada/exp_ch4.adb @@ -1725,7 +1725,8 @@ package body Exp_Ch4 is Expressions => Index_List2); Test := Expand_Composite_Equality - (Typ, Nod, Component_Type (Typ), L, R); + (Outer_Type => Typ, Nod => Nod, Comp_Type => Component_Type (Typ), + Lhs => L, Rhs => R); -- If some (sub)component is an unchecked_union, the whole operation -- will raise program error. @@ -2013,7 +2014,9 @@ package body Exp_Ch4 is Prefix => New_Copy_Tree (New_Rhs), Expressions => New_List (New_Copy_Tree (Low_B))); - TestL := Expand_Composite_Equality (Ltyp, Nod, Ctyp, L, R); + TestL := Expand_Composite_Equality + (Outer_Type => Ltyp, Nod => Nod, Comp_Type => Ctyp, + Lhs => L, Rhs => R); L := Make_Indexed_Component (Loc, @@ -2025,7 +2028,9 @@ package body Exp_Ch4 is Prefix => New_Rhs, Expressions => New_List (New_Copy_Tree (High_B))); - TestH := Expand_Composite_Equality (Ltyp, Nod, Ctyp, L, R); + TestH := Expand_Composite_Equality + (Outer_Type => Ltyp, Nod => Nod, Comp_Type => Ctyp, + Lhs => L, Rhs => R); return Make_And_Then (Loc, Left_Opnd => TestL, Right_Opnd => TestH); @@ -13380,15 +13385,16 @@ package body Exp_Ch4 is end if; Check := - Expand_Composite_Equality (Typ, Nod, Etype (C), - Lhs => - Make_Selected_Component (Loc, - Prefix => New_Lhs, - Selector_Name => New_Occurrence_Of (C, Loc)), - Rhs => - Make_Selected_Component (Loc, - Prefix => New_Rhs, - Selector_Name => New_Occurrence_Of (C, Loc))); + Expand_Composite_Equality + (Outer_Type => Typ, Nod => Nod, Comp_Type => Etype (C), + Lhs => + Make_Selected_Component (Loc, + Prefix => New_Lhs, + Selector_Name => New_Occurrence_Of (C, Loc)), + Rhs => + Make_Selected_Component (Loc, + Prefix => New_Rhs, + Selector_Name => New_Occurrence_Of (C, Loc))); -- If some (sub)component is an unchecked_union, the whole -- operation will raise program error. -- 2.34.1