From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-x135.google.com (mail-lf1-x135.google.com [IPv6:2a00:1450:4864:20::135]) by sourceware.org (Postfix) with ESMTPS id 90E823849AF1 for ; Thu, 16 May 2024 09:26:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 90E823849AF1 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 90E823849AF1 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::135 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715851577; cv=none; b=nPM3epuzsDGFE/bCFbKtm95cdNOMVouwgQmyQmx56cix1ZDqNPuHu/vNvXOqyaHQipDFe6J1n/nI44XV5BBoYL9Qjyb0qkwCmsWmKeirEe9cscJBdxO7CHtWLkzH5IIsQYcSlrkFlJ66N5AZIkU2VoSO8AqdSEajd4kiam+M03Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715851577; c=relaxed/simple; bh=xtD6rBGJ/KIGMop7+DF+wohEgvhIGQvGmnbk0MTJmiY=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=epl+6NB7i8c1L6p8a76KJ65d0/MUUtTCbmfvUHK9qInQnQ5KdedJDSwqN61ks1Hsr5F3CKQr/DXGvnRf9x6+lrgI3CTyIyLxNE45UUV5CSFZ7Vhy7mFNoOLh1HG5Eqwq4hgqcih3u2igOfCNd1pkvFAEwaNR+ywPl40jDukCy/M= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-5238b5c080cso674561e87.1 for ; Thu, 16 May 2024 02:26:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1715851573; x=1716456373; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=+OVAdn2p2chaH2XIm8nRiwzHZ100v3Eh4mRRiYD14tI=; b=PjX0TpimGIGE2DMSYEH7o6i9jAik52PcUSIOisD3hySAlAn7nFWekcdaIx3zWjj+6n vV0udjPj/Bmpc40WLYMCtqE3+FPyISuO4IWU5yem7YlksyOzpZev8OP1Bkbg3XePRicu lz3hl4rgD7coQBQOztWRp4lU9g7q6Ht4VLYf6EKlr4C2s1LfsvZ7RyXHWy821QsDgWCf nenFLTTwGzJtB2vR8o+CEVntTXaEtJQM2HlutPrAOSiHbtfuTd7xzquUNSs4Mq4NGdEg OYyQg+yNeJ0Sm1VrZQPmgZ1M7ZcMDnaN21Y/uyYOBFL+PA5yFNa8UpcvciW7m8Xlf3Cm 7aog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715851573; x=1716456373; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+OVAdn2p2chaH2XIm8nRiwzHZ100v3Eh4mRRiYD14tI=; b=OVtO0mWx2Cc8Om4ffzwSPUj2IKFh9Kb0ZFSM3fD39QMYT+NCxNBf4TtUAC8ScIueMu 5Nc7Huzwd8GRPXrsOT8xReAfAMMf18jYkt/cIjmD3qBEczUv+3xkEDQ4drOOBUTcych+ hE4Pjg9xwlwPy2IyrHCdNg1/W3KQJ0K72sP1MUkZIVaHuJSwwwrFFiyaF616PAKZmiJU ny68p3rDWS2n2mBl33SC4iSfAGM0NP6og5fmE/BeeqfgdlC3lBlq0WglDHxy8KXwk+uZ YRqkrKkBcz9BpdtYGRyXk7w8fr20wxHZ9YPnqtyigea/YdQxu8Qd1fezHgxKpvFWuoV0 /WVQ== X-Gm-Message-State: AOJu0YyuEqGVRwviJR7jmkriKzrXJW+qD4mmg6z/q74qap1wvNE6ZkSa jX6sIVm6LtMxf6MiZFT627AMYsEG9im0Mt7SCInIxe0l0fY8MnRQhHeAlVsivYFNtOfNUeMbU4A = X-Google-Smtp-Source: AGHT+IEmCZBJUed1TteuwukGhwzJudmfCuBnmokcp2XsLPt3wziF6nhKutYRaotFGggDGv5Ec3m/lA== X-Received: by 2002:ac2:5546:0:b0:523:8c69:4848 with SMTP id 2adb3069b0e04-5238c694adbmr2823773e87.51.1715851572927; Thu, 16 May 2024 02:26:12 -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 5b1f17b1804b1-41fd10cf8besm135802635e9.1.2024.05.16.02.26.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 May 2024 02:26:12 -0700 (PDT) From: =?UTF-8?q?Marc=20Poulhi=C3=A8s?= To: gcc-patches@gcc.gnu.org Cc: Steve Baird Subject: [COMMITTED 08/35] ada: Fix bug in maintaining dimension info Date: Thu, 16 May 2024 11:25:37 +0200 Message-ID: <20240516092606.41242-8-poulhies@adacore.com> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240516092606.41242-1-poulhies@adacore.com> References: <20240516092606.41242-1-poulhies@adacore.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-13.7 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: Steve Baird Copying a node does not automatically propagate its associated dimension information (if any). This must be done explicitly. gcc/ada/ * sem_util.adb (Copy_Node_With_Replacement): Add call to Copy_Dimensions so that any dimension information associated with the copied node is also associated with the resulting copy. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_util.adb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index 1785931530f..68e131db606 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -53,6 +53,7 @@ with Sem_Cat; use Sem_Cat; with Sem_Ch6; use Sem_Ch6; with Sem_Ch8; use Sem_Ch8; with Sem_Ch13; use Sem_Ch13; +with Sem_Dim; use Sem_Dim; with Sem_Disp; use Sem_Disp; with Sem_Elab; use Sem_Elab; with Sem_Eval; use Sem_Eval; @@ -23447,6 +23448,8 @@ package body Sem_Util is Set_Chars (Result, Chars (Entity (Result))); end if; end if; + + Copy_Dimensions (From => N, To => Result); end if; return Result; -- 2.43.2