From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by sourceware.org (Postfix) with ESMTPS id 11D79385383D for ; Tue, 16 May 2023 08:41:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 11D79385383D 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-wr1-x434.google.com with SMTP id ffacd0b85a97d-30786c87cdaso10934322f8f.2 for ; Tue, 16 May 2023 01:41:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1684226500; x=1686818500; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=naLeV1ulRioHI9RQCof9L0B3bxN1fmkU8Y7TcsbOPbM=; b=SRDh3KSBXGrP5B49DbacVFcYFjndi/IuN0LO35Tp6FVYfaHJxG1eVrQYfgmkchb9Ab 0WNevGjJ1aMhha31xZPVC4FL/jQmI8rq7+zcZzA+Hjtpd/tHBx+FEWGBBopHyEGmTo6n 01ll5cAbWAO4Xrqx1s727ny3i6b8Exkl4vJX86S1/8x3mK867xnKJxottRsgPJje+DO7 bc44GIXOrQ/IwuXei4C56n7vQ8BiPFga3ZDVnzdH7kvapxEa7rx48fNqJ82t+HVT27BL dy8i5oytgRnpuj7VPQ4JJfO+OUkT8ac5qCxGD4DC5No5v0VZ0BrdEeQMuhH6N6QsR33j J/Fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684226500; x=1686818500; 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=naLeV1ulRioHI9RQCof9L0B3bxN1fmkU8Y7TcsbOPbM=; b=On38Z8SXNPtEXp1PpeA61v9Wvd9q8nhO15k5Isj2ddVAD8EBjqZfEUtcsXqYw27ZcC tSQSI8+5Jv2sfcA7aVGYnonv36Jratizhie4kK/UIiUEeePBOfUIxJtEMxxb8D+w07BG 3t4sNLORpebNHGyKUcCTX7tpOt0MvFPRmRogFHn5ow1hueulB4A57BEcQfQ2DqgQNAGF uhyHxPr9al6YTJ0z2MM86pKW1wELvhEZYtRO4QZngdFrNFDo5qHME7NDz443Lw4BZseo DkCXpyyws2VxsN12jdG5YDKSqX50V5EglHFCjq/9u19mMK9OEK4vlJtfFpLQoR7B/FAq 8/Qg== X-Gm-Message-State: AC+VfDyc+y6+RnmekD33W4l4laD9IxaUBnksxw4omluodtNhT0GJAre0 4wgs2p3/eUA4Rf2+Hdj2V/Hx7NxgPsgFKq76Zq8toA== X-Google-Smtp-Source: ACHHUZ4CGLvMJuCntcKf+Szbdbe2EfMRvF/mjEt6/MbgeLwOMG/VbAWMta/uaUS3uU85+ZNXlByyUw== X-Received: by 2002:adf:cd0a:0:b0:306:320f:7bd7 with SMTP id w10-20020adfcd0a000000b00306320f7bd7mr27810913wrm.41.1684226499898; Tue, 16 May 2023 01:41:39 -0700 (PDT) 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 b4-20020adfde04000000b0030632833e74sm1797465wrm.11.2023.05.16.01.41.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 May 2023 01:41:39 -0700 (PDT) From: =?UTF-8?q?Marc=20Poulhi=C3=A8s?= To: gcc-patches@gcc.gnu.org Cc: Eric Botcazou Subject: [COMMITTED] ada: Fix missing warning on aggregate with iterated component Date: Tue, 16 May 2023 10:41:38 +0200 Message-Id: <20230516084138.1502460-1-poulhies@adacore.com> X-Mailer: git-send-email 2.40.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-13.5 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,T_SCC_BODY_TEXT_LINE 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: Eric Botcazou This happens when the iterated component does not really iterate. gcc/ada/ * exp_aggr.adb (Expand_Array_Aggregate): Do not set Warnings_Off on the temporary created when in-place expansion is not possible. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/exp_aggr.adb | 1 - 1 file changed, 1 deletion(-) diff --git a/gcc/ada/exp_aggr.adb b/gcc/ada/exp_aggr.adb index cf8bac0f4bf..fe61e0ec90b 100644 --- a/gcc/ada/exp_aggr.adb +++ b/gcc/ada/exp_aggr.adb @@ -7068,7 +7068,6 @@ package body Exp_Aggr is Defining_Identifier => Tmp, Object_Definition => New_Occurrence_Of (Typ, Loc)); Set_No_Initialization (Tmp_Decl, True); - Set_Warnings_Off (Tmp); -- If we are within a loop, the temporary will be pushed on the -- stack at each iteration. If the aggregate is the expression -- 2.40.0