From patchwork Tue Nov 8 08:41:50 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: 16933 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2569604wru; Tue, 8 Nov 2022 00:44:31 -0800 (PST) X-Google-Smtp-Source: AMsMyM52ro+mWUttSABC5a88LUZXiPEbJHINEPRmZlBzIRbUu2qcCQl5ZwX2IVAVIXEWrCo6PmsO X-Received: by 2002:a17:907:96a0:b0:7ad:960d:1789 with SMTP id hd32-20020a17090796a000b007ad960d1789mr52863388ejc.305.1667897071022; Tue, 08 Nov 2022 00:44:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667897071; cv=none; d=google.com; s=arc-20160816; b=gJSGDf0YEc0e0ycfKN8oLd1kytAn6ktvOysWEaxQ4rTqNb7l2PhkDaVBwh5sloZq+G MMK/vP5Xp3EKqNeFNwyjnvnWvlshEayNk74WS/oeqkvyioBqXvmWFMPpZYEY5iyZOVo9 OZw5qbetFm0lYCYnKZ5PzDhoZwMqTznG7mEF2+z1YMEbpD0c1UdNVR7U32O1FBZgSAkw 2bs4+8xU3hC6tVEoEqDn8TXMNACZeuE6zduzNCYJMbwKmpTDpairgeNv9USQ9a70HrJ9 2MLNKN9uyKRWQhVG+EPOLITEnX36ROIZv454aVCOTVivHZeX6dliaIbrYmZ+e3pQyRWj +yFg== 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=5kx/JGnW7N5ffrgul284qJM9YXB11znm2zWmZHLwE4c=; b=VeWvpJkpcxNocGW2FCSlfONglUmw0Svuz6wP97Uluhk4KznEXiGxX4KDlybRouEb6O 2rhBA98Ql6+jnsQdsYIOE44SulNHxcmbdV+QFzp1QNGDai99seRDL4OivudbFSasOIdZ QRQYGiT0zhQugrg9wLB4fsrf9wRsHCKzK1euM/1js/Gn+1L5zHjQkyYJAtXqWx4ZWjqe Kt33MDQxUNvlPKl6p8eEIPV9D1MRUtahKWI0N1ZpbKIavE/FgKqgzHErwziIdCDsY4BP YOvC44lEGqoB7axf4XMKGjdK7R1MsNco963miLm8N+TuOWizFikn8uUTAD4bIj6cCKA0 XKkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=xeijOyMt; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c 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 (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id s2-20020a17090699c200b0078081036bdasi11166759ejn.501.2022.11.08.00.44.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Nov 2022 00:44:31 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=xeijOyMt; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c 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 B59E83856956 for ; Tue, 8 Nov 2022 08:43:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B59E83856956 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1667897008; bh=5kx/JGnW7N5ffrgul284qJM9YXB11znm2zWmZHLwE4c=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=xeijOyMt9PzcqbwJr2pH7nPMdLzNZdGSbrHrLVwS2QOYehCMInLyqEO0geSybvjGc 3M59e24aPYtB7NNseOx74I/F3fMm86VT5OmDqIf2r1qunCmQ6D/n1NX4gRrYGfaXQ5 eRT9IN+jnVNjkknqiOGFxIgLf2hxn0wIZ4o8gXp8= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) by sourceware.org (Postfix) with ESMTPS id 3B64C38582AF for ; Tue, 8 Nov 2022 08:41:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3B64C38582AF Received: by mail-wr1-x42a.google.com with SMTP id g12so19733538wrs.10 for ; Tue, 08 Nov 2022 00:41:55 -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=5kx/JGnW7N5ffrgul284qJM9YXB11znm2zWmZHLwE4c=; b=0Wbjdk6axvaSWPvfovLZqoQyIJTFo4ao8rh4BjvvQQ6G9QbEOMgsgwEA+sGCxh5Jtu sSJXejBi1ZRycBs0UaF3wqIgw84ncQoM46DpCVuaIGy06BbBugfSit29Z7OAjADWgRTd uif8hQ8FC9RorQb4zL5A4daSc6SffOtxUsaOoZ1h0P5xbH/DT23pCP1a+Q5L4iVvhKte /tUejvBWymRKTqYqnrqDbeZeaYgwqpu1igNrepusM2oAelZfLMxpFmdjqa/HeGhMMPAe OWOfPrzvf2IcdHOyAUxVx6XBQQpVY8zBlnmnJRqEzVUYg/LOIFn+s0yRuTsnpHzk5Z/z LyEA== X-Gm-Message-State: ACrzQf1jPMkGAl90TlY8sWq6HUfuJGCOf1p5dG9UIep1pPSEXh2SOIaB Cr02wgVN1oR6AyqZZbpMGZiNLQcWAw6Ftw== X-Received: by 2002:a5d:4fc2:0:b0:236:66ce:5e2e with SMTP id h2-20020a5d4fc2000000b0023666ce5e2emr35154006wrw.638.1667896914143; Tue, 08 Nov 2022 00:41:54 -0800 (PST) Received: from localhost.localdomain (static-176-191-105-132.ftth.abo.bbox.fr. [176.191.105.132]) by smtp.gmail.com with ESMTPSA id n1-20020a1ca401000000b003cf66a2d433sm13511783wme.33.2022.11.08.00.41.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Nov 2022 00:41:53 -0800 (PST) To: gcc-patches@gcc.gnu.org Cc: Piotr Trojanek Subject: [COMMITTED] ada: Allow initialization of limited objects with delta aggregates Date: Tue, 8 Nov 2022 09:41:50 +0100 Message-Id: <20221108084150.300930-1-poulhies@adacore.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 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 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?1748916839047869333?= X-GMAIL-MSGID: =?utf-8?q?1748916839047869333?= From: Piotr Trojanek Objects of a limited type can be initialized with "aggregates", which is a collective term for ordinary aggregates (i.e. record aggregates and array aggregates), extension aggregates and finally for delta aggregates (introduced by Ada 2022). gcc/ada/ * sem_ch3.adb (OK_For_Limited_Init_In_05): Handle delta aggregates just like other aggregates. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_ch3.adb | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index 76dc6325060..f6b852051dc 100644 --- a/gcc/ada/sem_ch3.adb +++ b/gcc/ada/sem_ch3.adb @@ -20145,6 +20145,7 @@ package body Sem_Ch3 is case Nkind (Original_Node (Exp)) is when N_Aggregate + | N_Delta_Aggregate | N_Extension_Aggregate | N_Function_Call | N_Op