From patchwork Fri May 26 07:35:40 2023 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: 70119 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E3DC2382E697 for ; Fri, 26 May 2023 07:37:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E3DC2382E697 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1685086643; bh=wpXxPoja0SV9A7MGfhg+pYpkRM6ziAgUbgdHoXSulT0=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=dP/mTBZoDr/+CK6lvN9UaGkGhbIp3JteMA994tYqpP+bRvPB7KmEHP9fS6B/eYeXS imqWnlWzeHW9Qe/pvDSpvujxfVIMz8wNjSkSAHuSo40CSbC8ryBAiV7Hky4SKhCs2r N7YG5Mxz3z+iBWvCJowCu1nwEYp1UrEf1luVR8pY= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by sourceware.org (Postfix) with ESMTPS id BF4CC385772B for ; Fri, 26 May 2023 07:35:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BF4CC385772B Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-30a8fa6e6fcso204013f8f.1 for ; Fri, 26 May 2023 00:35:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685086542; x=1687678542; 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=wpXxPoja0SV9A7MGfhg+pYpkRM6ziAgUbgdHoXSulT0=; b=P22iv6jhi8lxrurk5+YwOHEUElaqts+xNXmgL8wv6Ugci78VKKEnsJ+L70lsDC/Eze MGtBXpo+QavNGIiuB69TEFD0GVhq8X0hPYG1dEHJ8IeawGbaaME8SPoocMZpBgQ+fX9S nUBMKyDypFuCxFcfHfEti+f2hml4A1deKqqk44/TQH6RBL4MigTJhCUWgXRFBrCetiar 5mWVZBqq2S9V6NOCWEAGcwujyLpPMZC/JmI7clFtiolDHSkytLgCnRQCVw5LPGwoUo95 CLDJcQs4jAYZNXqLv4C+nFnvpF9zxNpPlHMksyQeXt0cTSpStNNdDOsu3xhJ2NFYgCCy o94A== X-Gm-Message-State: AC+VfDxRNYsL/oeG4AcGVARJSD0d8LO1pH3IDMdqYk4nYCJi+weAgkeu ijp+xDGC9R3R5IvfjI+viIockMSFP5m1H0wNBs3J3A== X-Google-Smtp-Source: ACHHUZ5rd+QB30wUTFcsH5Ti/cKrwzGudGBmvGVymJmulNSocfJyztqOaQ2sEnTJn6asWCcEDzDigg== X-Received: by 2002:a5d:4702:0:b0:309:48eb:cdf9 with SMTP id y2-20020a5d4702000000b0030948ebcdf9mr718791wrq.38.1685086542606; Fri, 26 May 2023 00:35:42 -0700 (PDT) Received: from localhost.localdomain ([2001:861:3382:1a90:777b:eef4:6f79:f26f]) by smtp.gmail.com with ESMTPSA id a16-20020a5d4d50000000b003047ea78b42sm4193870wru.43.2023.05.26.00.35.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 May 2023 00:35:42 -0700 (PDT) To: gcc-patches@gcc.gnu.org Cc: Ronan Desplanques Subject: [COMMITTED] ada: Fix late extra formals creation Date: Fri, 26 May 2023 09:35:40 +0200 Message-Id: <20230526073540.2067682-1-poulhies@adacore.com> X-Mailer: git-send-email 2.40.0 MIME-Version: 1.0 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 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+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" From: Ronan Desplanques Before this patch, in some situations, a subprogram call could be expanded before the extra formals for the subprogram were created. This patch fixes the problem in those situations. gcc/ada/ * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Create extra formals in more situations. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_ch6.adb | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb index 6df1c8dedd3..c58a5488cd2 100644 --- a/gcc/ada/sem_ch6.adb +++ b/gcc/ada/sem_ch6.adb @@ -3907,6 +3907,7 @@ package body Sem_Ch6 is and then Serious_Errors_Detected = 0 then Set_Has_Delayed_Freeze (Spec_Id); + Create_Extra_Formals (Spec_Id); Freeze_Before (N, Spec_Id); end if; end if;