From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-x232.google.com (mail-lj1-x232.google.com [IPv6:2a00:1450:4864:20::232]) by sourceware.org (Postfix) with ESMTPS id 2FA9F3858D32 for ; Tue, 13 Jun 2023 07:37:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2FA9F3858D32 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-lj1-x232.google.com with SMTP id 38308e7fff4ca-2b1fcda0f92so63902011fa.2 for ; Tue, 13 Jun 2023 00:37:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1686641854; x=1689233854; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=0LlyLvcofl2ZtLd0p8g4hTdiBiV8ZSPABOjXu+xsO40=; b=jbnEs/b1//EtH01sU6bQ0iGvQv7raUAkY8wCi2ZHam1JvQGheqL4+BCBtGeSRwqnVC qKM4QjoDyyrV2WA7oHJnii+Dn4SeOiVVgO7Se0xsvDyEwHbQBDEQn5aolzPd5FHHZKud BpgreUGlbvY0sPnic9tCwS+29pT69064vjC/guDIdPXlhPZntHDKr7LvUBfM9/g82zo7 vJ6EpwujFv+xeN2jKXmLkzyH+iZdxxSjNKSZctzHBkJxB5/IyJZ8BwRiE0il5r17dfIs hcpLHGC7GCVPXlYNuTGKpDpXhMVMKamiwG6a02UhPVZCC/EYsrT8sTkE6ANCX3trkPmK vNPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686641854; x=1689233854; 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=0LlyLvcofl2ZtLd0p8g4hTdiBiV8ZSPABOjXu+xsO40=; b=baGE+4/bdBqzmiMOThqI/jsTXdTVBM/8HTqoXYi3cWmkvr4ZhVZ4AFyFTUHfS3aQND VorYdyxK4Im+CtaHSQDQs08Hyy2IsC0Rna0S5dAJpPLSc9lWSlVMtiU5upnnhCra493c 2gFM3fUYC3kRtQdYcd+s6ECO4AVDqOALrpKDp88Ifz+sYZwBcQcU216gx+/JWN4YoRKP xFIvu7I+wtxdnd0A9ghPf/YvmG2kITecZszqOwMtuKOEIqsVjHR8SYwVTpK7DwiLXjWY rq7UrUORS51KydPo6XehcIRd17CGrVDxPYt0n9zS0ydPbP1QNo47IBBRUup7jk1wpR+z /tmA== X-Gm-Message-State: AC+VfDyWC7dsDPtDjI/yUZmmdQ06CMXlitWcfHhy/ndfwkfkNdPS592q SGoNXQ5ObwmT7TcQk8n8RcikdAdDxxufq/rwbROzRg== X-Google-Smtp-Source: ACHHUZ5OsVo01PCrA0LAdcKLUxq0nRVlGwoBKuTf3GuiSzheinB8PsDRD3mAF3hIhdhQikVdCAIh4g== X-Received: by 2002:a2e:8817:0:b0:2ac:dd01:e169 with SMTP id x23-20020a2e8817000000b002acdd01e169mr3781094ljh.40.1686641854546; Tue, 13 Jun 2023 00:37:34 -0700 (PDT) Received: from localhost.localdomain ([2001:861:3382:1a90:bfa8:5d29:40e5:cc66]) by smtp.gmail.com with ESMTPSA id y10-20020a1c4b0a000000b003f5ffba9ae1sm13571090wma.24.2023.06.13.00.37.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Jun 2023 00:37:33 -0700 (PDT) From: =?UTF-8?q?Marc=20Poulhi=C3=A8s?= To: gcc-patches@gcc.gnu.org Cc: Piotr Trojanek Subject: [COMMITTED] ada: Remove explicit decoration of wrapper created in freezing Date: Tue, 13 Jun 2023 09:37:23 +0200 Message-Id: <20230613073723.238680-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.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,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: Piotr Trojanek We create wrapper functions associated with inherited functions with controlling results which are not overridden during freezing. We partly decorated them explicitly, even though they would be fully decorated later anyway. This early decoration didn't work as expected, because flag In_Private_Part that is read by Override_Dispatching_Operation it not set reliably while freezing (as explained in the comment of Is_Private_Declaration). In effect, we were getting a circularity between Alias and Overridden_Operation, which was causing GNATprove to loop infinitely. Apparently the cleanest fix is to not decorate the wrapper with an early call to Override_Dispatching_Operation. gcc/ada/ * exp_ch3.adb (Make_Controlling_Function_Wrappers): Remove early decoration. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/exp_ch3.adb | 2 -- 1 file changed, 2 deletions(-) diff --git a/gcc/ada/exp_ch3.adb b/gcc/ada/exp_ch3.adb index f8c99470dd7..91dcfa0f643 100644 --- a/gcc/ada/exp_ch3.adb +++ b/gcc/ada/exp_ch3.adb @@ -11140,8 +11140,6 @@ package body Exp_Ch3 is -- is a wrapper's body in order to get check suppression right. Set_Corresponding_Spec (Func_Body, Func_Id); - - Override_Dispatching_Operation (Tag_Typ, Subp, New_Op => Func_Id); end if; <> -- 2.40.0