From patchwork Thu Jun 13 13:33:07 2024 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: 1947396 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=Ke6yQgMm; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W0Nh53Nwhz1ydW for ; Thu, 13 Jun 2024 23:35:17 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0E9613882651 for ; Thu, 13 Jun 2024 13:35:15 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by sourceware.org (Postfix) with ESMTPS id ACD273882166 for ; Thu, 13 Jun 2024 13:33:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org ACD273882166 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 ACD273882166 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::32c ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718285635; cv=none; b=vlNOHVKq4F7F2NkT9zKeTVCta5LsdAgdURJ4Aa3RL1sJalEY6fsIZi7KIqK2cwQxphaHp4aCcOPQEqyIsXvpQS1mRx+e8OboePUc9JjoZWbHBSb4vGHQcI/es6oAAInoLkG5t6AW38W4yL+p5bmR0K3kITSMohQe5+LaE2BYSP8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718285635; c=relaxed/simple; bh=syGoNFZwzqcCQLavsSFePn1ewicAOqf2ks82gFqOBCM=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=ox6YRD3d4LD+ThhQga9s1ncEoPtSGtb+Xg98zbJPnnGA3q5iVtxmcrSXIC4jtoTNMI4Ej7Uv0eNiOzVn1mUIcn4uv+1Vtir5Cmyzp/aW/Ih4muN+N3g6n7uCrDGlZl1yIIikYXLxFlddhaX09To8t4ldoXxkPvdN7Qp/AW1V5O0= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-421f4d1c057so9177825e9.3 for ; Thu, 13 Jun 2024 06:33:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1718285630; x=1718890430; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=REl2COwJng9FwidGhdmA+nl1JhBPsHv+2Rc1jvGmLzs=; b=Ke6yQgMmbtiTtJjnTFPrVzK4wcqUH61UD63XSMPuXC3fTmoQI2QPJoOFteMHBvTww+ X2rU51rDcYoITjgkyccajK4tqn05Vm4qgP8GaDjeRf9ViR84MtZIhA07+qDdWCFhd+95 HT4yVJF0hplAAuyeG2GF2ryOQ8o6PCx+nRsNj0NFBfe1VGwwkJlhPK/6z5NPYcbK0jKq tJhjw3rtvKNS/ih72nU05PjrjJSPNXmat7T768TWEHEga907KicGzwE0rm6cOOL9HxKu CcCasvIEx7/TR2tT0GAT2uTib2iFG0rqYToBhe5YZ0s/3GrSan34pYRmOUu1OayaVoFj IZ7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718285630; x=1718890430; 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=REl2COwJng9FwidGhdmA+nl1JhBPsHv+2Rc1jvGmLzs=; b=XTc8X1ABYRBchCjulGd8OEuyapDof+eOqOtYBdc2Bv/2xN4j8cf9qXIWMrOKD2oaTE 8jP7bDniE3m+iAisMisi14Wu2uPrggU9QJkwNIoawzncnpB+N5P5xTJfK4jHM6yjTjnI v6cF452kEq8e/+8eYNAXSwY7IC/AZVvpKs5rxQIWtv6Fe0NUxW/8G5FNmAvqiTDcRp1L bgKOHDDew+lHKaUnnoVKEx3p+UkpsnT3QF31g4rF2xu0wbIeLsOBWzNaIwjlO/W4+jtV y1FRrYavm831piqb9mdWv7uWq8RnKKhg38NAXoJqG3UeIxTmG6P9VS+8mlJpPFqxRLsG IoQQ== X-Gm-Message-State: AOJu0YweR4EAjIePBJd6MLiRmbvT9/ufIHMmpvZ187pYVnJDu+PiFtac SJuudc7UHTgwIQPeH0KYiESBbxyPww+gN5abmHPq1sDoTf9YG7RLHRcAB74dHqVAEEhK2Gt6Z7M = X-Google-Smtp-Source: AGHT+IFO3xEx4lJ3N4MhD6LNZZTzAn312BZfDPJ7JvXuLnuvVVawvoFqoAOnbNpeGDe33EAylqiVQQ== X-Received: by 2002:a05:600c:4f4b:b0:418:c2af:ab83 with SMTP id 5b1f17b1804b1-422c64390dfmr25012885e9.36.1718285630409; Thu, 13 Jun 2024 06:33:50 -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-422870e9145sm62391955e9.22.2024.06.13.06.33.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 06:33:49 -0700 (PDT) From: =?utf-8?q?Marc_Poulhi=C3=A8s?= To: gcc-patches@gcc.gnu.org Cc: Javier Miranda Subject: [COMMITTED 01/30] ada: Missing dynamic predicate checks Date: Thu, 13 Jun 2024 15:33:07 +0200 Message-ID: <20240613133338.1809385-1-poulhies@adacore.com> X-Mailer: git-send-email 2.45.1 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.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org From: Javier Miranda The compiler does not generate dynamic predicate checks when they are enabled for one type declaration and ignored for other type declarations defined in the same scope. gcc/ada/ * sem_ch13.adb (Analyze_One_Aspect): Set the applicable policy of a type declaration when its aspect Dynamic_Predicate is analyzed. * sem_prag.adb (Handle_Dynamic_Predicate_Check): New subprogram that enables or ignores dynamic predicate checks depending on whether dynamic checks are enabled in the context where the associated type declaration is defined; used in the analysis of pragma check. In addition, for pragma Predicate, do not disable it when the aspect was internally build as part of processing a dynamic predicate aspect. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_ch13.adb | 16 ++++++++ gcc/ada/sem_prag.adb | 98 +++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 112 insertions(+), 2 deletions(-) diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb index f84ca2c75d7..34aef434501 100644 --- a/gcc/ada/sem_ch13.adb +++ b/gcc/ada/sem_ch13.adb @@ -3194,6 +3194,22 @@ package body Sem_Ch13 is Set_Has_Static_Predicate_Aspect (E, False); + -- Query the applicable policy since it must rely on the + -- policy applicable in the context of the declaration of + -- entity E; it cannot be done when the built pragma is + -- analyzed because it will be analyzed when E is frozen, + -- and at that point the applicable policy may differ. + -- For example: + + -- pragma Assertion_Policy (Dynamic_Predicate => Check); + -- type T is ... with Dynamic_Predicate => ... + -- pragma Assertion_Policy (Dynamic_Predicate => Ignore); + -- X : T; -- freezes T + + Set_Predicates_Ignored (E, + Policy_In_Effect (Name_Dynamic_Predicate) + = Name_Ignore); + elsif A_Id = Aspect_Static_Predicate then Set_Has_Static_Predicate_Aspect (E); elsif A_Id = Aspect_Ghost_Predicate then diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index 671b2a542ea..6d4ec122a21 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -12030,6 +12030,18 @@ package body Sem_Prag is Set_Is_Ignored (N, Is_Ignored (Original_Node (N))); Set_Is_Checked (N, Is_Checked (Original_Node (N))); + -- Skip querying the applicable policy at this point for dynamic + -- predicate checks since they rely on the policy applicable in + -- the context of their associated type declaration (and this + -- pragma check has been internally added by the frontend at the + -- point where the runtime check must be performed). + + elsif not Comes_From_Source (N) + and then Chars (Pragma_Identifier (N)) = Name_Check + and then Pname = Name_Dynamic_Predicate + then + null; + -- Otherwise query the applicable policy at this point else @@ -14420,6 +14432,62 @@ package body Sem_Prag is -- restore the Ghost mode. when Pragma_Check => Check : declare + + procedure Handle_Dynamic_Predicate_Check; + -- Enable or ignore the pragma depending on whether dynamic + -- checks are enabled in the context where the associated + -- type declaration is defined. + + ------------------------------------ + -- Handle_Dynamic_Predicate_Check -- + ------------------------------------ + + procedure Handle_Dynamic_Predicate_Check is + Func_Call : constant Node_Id := Expression (Arg2); + Func_Id : constant Entity_Id := Entity (Name (Func_Call)); + Typ : Entity_Id; + + begin + -- Locate the type declaration associated with this runtime + -- check. The 2nd parameter of this pragma is a call to an + -- internally built function that has a single parameter; + -- the type of that formal parameter is the type we are + -- searching for. + + pragma Assert (Is_Predicate_Function (Func_Id)); + Typ := Etype (First_Entity (Func_Id)); + + if not Has_Dynamic_Predicate_Aspect (Typ) + and then Is_Private_Type (Typ) + and then Present (Full_View (Typ)) + then + Typ := Full_View (Typ); + end if; + + pragma Assert (Has_Dynamic_Predicate_Aspect (Typ)); + + if not Predicates_Ignored (Typ) then + Set_Is_Checked (N, True); + Set_Is_Ignored (N, False); + + else + -- In CodePeer mode and GNATprove mode, we need to + -- consider all assertions, unless they are disabled, + -- because transformations of the AST may depend on + -- assertions being checked. + + if CodePeer_Mode or GNATprove_Mode then + Set_Is_Checked (N, True); + Set_Is_Ignored (N, False); + else + Set_Is_Checked (N, False); + Set_Is_Ignored (N, True); + end if; + end if; + end Handle_Dynamic_Predicate_Check; + + -- Local variables + Saved_GM : constant Ghost_Mode_Type := Ghost_Mode; Saved_IGR : constant Node_Id := Ignored_Ghost_Region; -- Save the Ghost-related attributes to restore on exit @@ -14430,6 +14498,8 @@ package body Sem_Prag is Str : Node_Id; pragma Warnings (Off, Str); + -- Start of processing for Pragma_Check + begin -- Pragma Check is Ghost when it applies to a Ghost entity. Set -- the mode now to ensure that any nodes generated during analysis @@ -14484,6 +14554,16 @@ package body Sem_Prag is Set_Is_Ignored (N, Is_Ignored (Original_Node (N))); Set_Is_Checked (N, Is_Checked (Original_Node (N))); + -- Internally added dynamic predicate checks require checking the + -- applicable policy at the point of the type declaration of their + -- corresponding entity. + + elsif not Comes_From_Source (N) + and then Chars (Pragma_Identifier (N)) = Name_Check + and then Pname = Name_Dynamic_Predicate + then + Handle_Dynamic_Predicate_Check; + -- Otherwise query the applicable policy at this point else @@ -22279,8 +22359,22 @@ package body Sem_Prag is Set_Has_Delayed_Aspects (Typ); Set_Has_Delayed_Freeze (Typ); - Set_Predicates_Ignored (Typ, - Policy_In_Effect (Name_Dynamic_Predicate) = Name_Ignore); + -- Mark this aspect as ignored if the policy in effect is Ignore. + + -- It is not done for the internally built pragma created as part + -- of processing aspect dynamic predicate because, in such case, + -- this was done when the aspect was processed (see subprogram + -- Analyze_One_Aspect). + + if From_Aspect_Specification (N) + and then Pname = Name_Dynamic_Predicate + then + null; + else + Set_Predicates_Ignored (Typ, + Policy_In_Effect (Name_Dynamic_Predicate) = Name_Ignore); + end if; + Discard := Rep_Item_Too_Late (Typ, N, FOnly => True); end Predicate; From patchwork Thu Jun 13 13:33:08 2024 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: 1947401 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=DjW2yz0H; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W0Njn570Dz1ydW for ; Thu, 13 Jun 2024 23:36:45 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E4E463882126 for ; Thu, 13 Jun 2024 13:36:43 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by sourceware.org (Postfix) with ESMTPS id D1FAE3882172 for ; Thu, 13 Jun 2024 13:33:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D1FAE3882172 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 D1FAE3882172 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::329 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718285635; cv=none; b=RD+Z4k0hPFahnszImt8PNiFX2fNxUeFNIqi/S4rx+tt/Qu8Q7Wj5HhqM0Uxsuw0HrsSWl4SAHf+6w25V+2Pww2r9+L2rWmG9eGtXargIf7tWKK7T/l1iLSAdeza6IabzuUEivf0vlnK9vOtljOK5Mknvk11r5jxqMvGEaeZdY4M= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718285635; c=relaxed/simple; bh=mUIYY6jrkf2ZKzir0FLtslwvxBGdZ3gYDXSbk+lq/MU=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=PbiMcSTJGaeoDybyKDhLsZk5EkVzzQDSxA47cmeVP6xQ6/YhOtNq2yyrMGlACp60Ttw3t8QhWkpYjYovo3fjtBTs2xHN8ZG0VrrfJ6p6t14ImcyqvuI1rw4BO+5qlOCUZqcZ2Ej/ZHzXFoTCZycvA4FYurTLhd4QLB7KembaGXg= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-42172ed3597so6750515e9.0 for ; Thu, 13 Jun 2024 06:33:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1718285631; x=1718890431; 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=QE+eywf9bNEMJR4EGHJbmTxMGdthoxizyKK9ZBCsHtc=; b=DjW2yz0H3Brlc2jNyx/+2yIxODOwZIbsh/HXOr5fmgMzAuRRnvwfPnipB9LNTQsjYK 9cVAi7BMj2YQ1kVa0u/MtE6P7rBebBbw9Nv5OiKj1ZT4o9FUs363gtHg8/QAFibIYvE5 +SmRKnOEICrOCpHJSeEslGXVSgpxt+CiFQuWPbxoCWWAB/wraC8e4F/Z3H7gMIyEJeCo NTKFBpdp4nBJnC3MOYJKs0W+jxfWJ6t4vZALjDuv+CUyRxxSUUh1AuOyXWvUkKUyfJYK KIxj/LBOoKs3s6SvLUNLNITcbsjZd6MigvNNAz7CAG0SepGNg1wJJays0F7GYYfpA+Ec cb9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718285631; x=1718890431; 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=QE+eywf9bNEMJR4EGHJbmTxMGdthoxizyKK9ZBCsHtc=; b=R000NHbtPBR5w7MyQEoFZNmqWEmLf7DS+zu5OpOGikFzm0jpOO/x2mjB+T1oLOdUMl jKkdw5dhwpFahqzxyzuXVBnH3zpR4K6nE8ydJUBJTobd3rVDBPx/sBWiL54B1TsXKb4V TjV/f1yXn3JJeO/ZYplTMDDXkbdjKWsEWkn/agWMn9HOEMx39g3zqrnKNUAo7dIwlPMv mwSxLV8eoZkRDswc9ahuHwLhABM1LmITZfOjkP6LCF2LkHu3GEOUAmXlVA22hNBjkY8m UGszU3+LPy6TjfHSPS0NVA4L+qDFA9O62Dhs0BM7iOd6ku8pN14a3CAaba0ei/WFcHqV eTIQ== X-Gm-Message-State: AOJu0Yx+FRg+zHqtWFwCRqzOuauq4Gk+X+zL23K9QF8Nxr6SsLSxqcYh /LsU8OhJq4A2fF0JjeD0wORBx5AuCAfMuw7yB/y4tmQFxZMr0Fbk95vtDhATNiMmzIYVMHBfdJM = X-Google-Smtp-Source: AGHT+IG5WfkE33d7WZ9jD4f/y7Ms7v+ldizjTdcbtMJDFDh+lZC9wC1aCNLl3eS8XPJP5AWm9my2Jg== X-Received: by 2002:a05:600c:1c19:b0:421:805f:ab3c with SMTP id 5b1f17b1804b1-422b88b6808mr29997695e9.14.1718285631251; Thu, 13 Jun 2024 06:33:51 -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-422870e9145sm62391955e9.22.2024.06.13.06.33.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 06:33:50 -0700 (PDT) From: =?utf-8?q?Marc_Poulhi=C3=A8s?= To: gcc-patches@gcc.gnu.org Cc: Eric Botcazou Subject: [COMMITTED 02/30] ada: Fix too late finalization of temporary object Date: Thu, 13 Jun 2024 15:33:08 +0200 Message-ID: <20240613133338.1809385-2-poulhies@adacore.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240613133338.1809385-1-poulhies@adacore.com> References: <20240613133338.1809385-1-poulhies@adacore.com> 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.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org From: Eric Botcazou The problem is that Is_Finalizable_Transient returns false when a transient object is subject to a renaming by another transient object present in the same transient scope, thus forcing its finalization to be deferred to the enclosing scope. That's not necessary, as only renamings by nontransient objects serviced by transient scopes need to be rejected by the predicate. The change also removes now dead code in the finalization machinery. gcc/ada/ PR ada/114710 * exp_ch7.adb (Build_Finalizer.Process_Declarations): Remove dead code dealing with renamings. * exp_util.ads (Is_Finalizable_Transient): Rename Rel_Node to N. * exp_util.adb (Is_Finalizable_Transient): Likewise. (Is_Aliased): Remove obsolete code dealing wih EWA nodes and only consider renamings present in N itself. (Requires_Cleanup_Actions): Remove dead code dealing with renamings. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/exp_ch7.adb | 20 -------- gcc/ada/exp_util.adb | 116 ++++++++++++++++--------------------------- gcc/ada/exp_util.ads | 10 ++-- 3 files changed, 48 insertions(+), 98 deletions(-) diff --git a/gcc/ada/exp_ch7.adb b/gcc/ada/exp_ch7.adb index fd1d9db0654..3583ed3138f 100644 --- a/gcc/ada/exp_ch7.adb +++ b/gcc/ada/exp_ch7.adb @@ -2477,26 +2477,6 @@ package body Exp_Ch7 is Processing_Actions (Decl, Is_Protected => True); end if; - -- Specific cases of object renamings - - elsif Nkind (Decl) = N_Object_Renaming_Declaration then - Obj_Id := Defining_Identifier (Decl); - Obj_Typ := Base_Type (Etype (Obj_Id)); - - -- Bypass any form of processing for objects which have their - -- finalization disabled. This applies only to objects at the - -- library level. - - if For_Package and then Finalize_Storage_Only (Obj_Typ) then - null; - - -- Ignored Ghost object renamings do not need any cleanup - -- actions because they will not appear in the final tree. - - elsif Is_Ignored_Ghost_Entity (Obj_Id) then - null; - end if; - -- Inspect the freeze node of an access-to-controlled type and -- look for a delayed finalization collection. This case arises -- when the freeze actions are inserted at a later time than the diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb index 654ea7d9124..6ad464e6701 100644 --- a/gcc/ada/exp_util.adb +++ b/gcc/ada/exp_util.adb @@ -8646,8 +8646,8 @@ package body Exp_Util is ------------------------------ function Is_Finalizable_Transient - (Decl : Node_Id; - Rel_Node : Node_Id) return Boolean + (Decl : Node_Id; + N : Node_Id) return Boolean is Obj_Id : constant Entity_Id := Defining_Identifier (Decl); Obj_Typ : constant Entity_Id := Base_Type (Etype (Obj_Id)); @@ -8889,61 +8889,53 @@ package body Exp_Util is -- Start of processing for Is_Aliased begin - -- A controlled transient object is not considered aliased when it - -- appears inside an expression_with_actions node even when there are - -- explicit aliases of it: - - -- do - -- Trans_Id : Ctrl_Typ ...; -- transient object - -- Alias : ... := Trans_Id; -- object is aliased - -- Val : constant Boolean := - -- ... Alias ...; -- aliasing ends - -- -- object safe to finalize - -- in Val end; - - -- Expansion ensures that all aliases are encapsulated in the actions - -- list and do not leak to the expression by forcing the evaluation - -- of the expression. - - if Nkind (Rel_Node) = N_Expression_With_Actions then - return False; - - -- Otherwise examine the statements after the controlled transient - -- object and look for various forms of aliasing. - - else - Stmt := First_Stmt; - while Present (Stmt) loop - if Nkind (Stmt) = N_Object_Declaration then - Expr := Expression (Stmt); + -- Examine the statements following the controlled object and look + -- for various forms of aliasing. + + Stmt := First_Stmt; + while Present (Stmt) loop + -- Transient objects initialized by a reference are finalized + -- (see Initialized_By_Reference above), so we must make sure + -- not to finalize the referenced object twice. And we cannot + -- finalize it at all if it is referenced by the nontransient + -- object serviced by the transient scope. + + if Nkind (Stmt) = N_Object_Declaration then + Expr := Expression (Stmt); + + -- Aliasing of the form: + -- Obj : ... := Trans_Id'reference; + + if Present (Expr) + and then Nkind (Expr) = N_Reference + and then Is_Entity_Name (Prefix (Expr)) + and then Entity (Prefix (Expr)) = Trans_Id + then + return True; + end if; - -- Aliasing of the form: - -- Obj : ... := Trans_Id'reference; + -- (Transient) renamings are never finalized so we need not bother + -- about finalizing transient renamed objects twice. Therefore, we + -- we only need to look at the nontransient object serviced by the + -- transient scope, if it exists and is declared as a renaming. - if Present (Expr) - and then Nkind (Expr) = N_Reference - and then Nkind (Prefix (Expr)) = N_Identifier - and then Entity (Prefix (Expr)) = Trans_Id - then - return True; - end if; - - elsif Nkind (Stmt) = N_Object_Renaming_Declaration then - Ren_Obj := Find_Renamed_Object (Stmt); + elsif Nkind (Stmt) = N_Object_Renaming_Declaration + and then Stmt = N + then + Ren_Obj := Find_Renamed_Object (Stmt); - -- Aliasing of the form: - -- Obj : ... renames ... Trans_Id ...; + -- Aliasing of the form: + -- Obj : ... renames ... Trans_Id ...; - if Present (Ren_Obj) and then Ren_Obj = Trans_Id then - return True; - end if; + if Present (Ren_Obj) and then Ren_Obj = Trans_Id then + return True; end if; + end if; - Next (Stmt); - end loop; + Next (Stmt); + end loop; - return False; - end if; + return False; end Is_Aliased; -------------------------- @@ -9161,8 +9153,8 @@ package body Exp_Util is return Ekind (Obj_Id) in E_Constant | E_Variable and then Needs_Finalization (Desig) - and then Nkind (Rel_Node) /= N_Simple_Return_Statement - and then not Is_Part_Of_BIP_Return_Statement (Rel_Node) + and then Nkind (N) /= N_Simple_Return_Statement + and then not Is_Part_Of_BIP_Return_Statement (N) -- Do not consider a transient object that was already processed @@ -13488,26 +13480,6 @@ package body Exp_Util is return True; end if; - -- Specific cases of object renamings - - elsif Nkind (Decl) = N_Object_Renaming_Declaration then - Obj_Id := Defining_Identifier (Decl); - Obj_Typ := Base_Type (Etype (Obj_Id)); - - -- Bypass any form of processing for objects which have their - -- finalization disabled. This applies only to objects at the - -- library level. - - if Lib_Level and then Finalize_Storage_Only (Obj_Typ) then - null; - - -- Ignored Ghost object renamings do not need any cleanup actions - -- because they will not appear in the final tree. - - elsif Is_Ignored_Ghost_Entity (Obj_Id) then - null; - end if; - -- Inspect the freeze node of an access-to-controlled type and look -- for a delayed finalization collection. This case arises when the -- freeze actions are inserted at a later time than the expansion of diff --git a/gcc/ada/exp_util.ads b/gcc/ada/exp_util.ads index 3c7e70ed13b..8d64b11d750 100644 --- a/gcc/ada/exp_util.ads +++ b/gcc/ada/exp_util.ads @@ -764,12 +764,10 @@ package Exp_Util is -- Rnn.all function Is_Finalizable_Transient - (Decl : Node_Id; - Rel_Node : Node_Id) return Boolean; - -- Determine whether declaration Decl denotes a controlled transient which - -- should be finalized. Rel_Node is the related context. Even though some - -- transients are controlled, they may act as renamings of other objects or - -- function calls. + (Decl : Node_Id; + N : Node_Id) return Boolean; + -- Determine whether declaration Decl denotes a controlled transient object + -- that must be finalized. N is the node serviced by the transient context. function Is_Fully_Repped_Tagged_Type (T : Entity_Id) return Boolean; -- Tests given type T, and returns True if T is a non-discriminated tagged From patchwork Thu Jun 13 13:33:09 2024 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: 1947395 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=cYnw1Y5/; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W0NgM5WK8z20KL for ; Thu, 13 Jun 2024 23:34:39 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C3E9D388215B for ; Thu, 13 Jun 2024 13:34:37 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by sourceware.org (Postfix) with ESMTPS id 4B1A03882108 for ; Thu, 13 Jun 2024 13:33:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4B1A03882108 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 4B1A03882108 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::333 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718285635; cv=none; b=L0ix1Q/EFDuQgeItkuKEOimudbkQq5muFC/2QxjlBHIIKURwoNIpBL+KNDO+TFysnH0cpBAX98ydZtFCWOMmE6eT+8qFbWjljYWk4zZBktc5gqSu/yUjdeayJ0a3Mheis875NBtUuUlr/obIdxmCrri5U4rN5QFfaZKKS6DUnSg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718285635; c=relaxed/simple; bh=LymenqCZ7oCo5mP1cLzDwH/0lJQD58Loedu/iJgIYKg=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=q3Vl+8IVJ9/rL7BAZFG0Ez3J2fbyddRHz5n+UuU3JAU49JQ7eh9myOjjYlUvmSFmb/W+loPMv5sMo3QlUv1/wmXrykQtBXDAH3GEOONSV/drEVup4AqrFYS164MRsjCxJH3bdPr41rPd9zxh3+T/v/Fs/4Pw95OsXxbI9CTaVD0= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-42138eadf64so9155525e9.3 for ; Thu, 13 Jun 2024 06:33:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1718285632; x=1718890432; 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=l6mc6vxMz0jfl7RitJ3gMy2StG72aoFS/45WJmsg0sI=; b=cYnw1Y5/n+o2Tv0oIZKi1YaHXQvMtkbWl7z2h5lnAuvLzA20i6LHLleC841LzxrFR5 hfpg+l25U4tXKKEdHOX/VdcErVyzYgykIwwYIaPd2fUVLTwcH0ElvvoX2rqOoEIv+riQ zadXhMIkGXsjklHE13QX+gNAm1FscF1jQeoG00cIP3HxRB5lxOTihg+kBdHi3t8bGYPB 5cOyMqlJwZJi1rtOvAqEpe8L2U77+XhfzB4X3nYbQFnn7udXLa0qhHU4FI8vHzYJ6wFX /l7jsX4tvI7mdSmDgfx0ESXTxBJxLADpfBF8Qrx8xFz3Ixfl9dC8uIRrttwkTShwGKFg JHew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718285632; x=1718890432; 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=l6mc6vxMz0jfl7RitJ3gMy2StG72aoFS/45WJmsg0sI=; b=kREAqld3SgYQyaL3ys4/61VAWs/eO7k3qlGgtRUVUEGL+yTPUo5G/tk2q4SgnEf7QO 9AShqhKaITp1Oe1zCAKBGLNRk3tuFhs8R4ke1jnKRYsKGiBlMwQ72nQO8L24Ldbj8+db cVzUOL0UEslOXaH9wzNLg7vn2G+tj4oc9mL7wBFSTAF9x+nYDLR0LfZGtQyCCLX4n1+s mx7V84TyGrYx5uWXBAGYORweyqdxgCeAgO62LEv6LfGiqwIR0p2LkLaKnDO+ZKpVlxJ7 +gJ8Rh3sEv/YmHeH6FEdoWkcdTfCXzmzkb52UdA75ASpio3XhuyECKm0mivbRfu8ihmM RaSw== X-Gm-Message-State: AOJu0YwT+ejalpv2rjhl616na9gJE5wd5oaTOdvdVTvi5JwchpuNBpLS qt1X8BzlkBr7drClDMk1WzZBElIUDhV2i7h3MdeNhpLNrX7UFLkIL2TNpl9W30YtqY/JIwHN9cU = X-Google-Smtp-Source: AGHT+IFZA8I7Zl3sBKa//Hu4ZvVbEW6N1zSBcxZgI5vNlRsSkhUFoSVZUbzmj/0Ss0F/xkXqBJbJTw== X-Received: by 2002:a7b:ce18:0:b0:422:5d3d:34cd with SMTP id 5b1f17b1804b1-422862ace78mr51244205e9.16.1718285632026; Thu, 13 Jun 2024 06:33:52 -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-422870e9145sm62391955e9.22.2024.06.13.06.33.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 06:33:51 -0700 (PDT) From: =?utf-8?q?Marc_Poulhi=C3=A8s?= To: gcc-patches@gcc.gnu.org Cc: Eric Botcazou Subject: [COMMITTED 03/30] ada: Add support for symbolic backtraces with DLLs on Windows Date: Thu, 13 Jun 2024 15:33:09 +0200 Message-ID: <20240613133338.1809385-3-poulhies@adacore.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240613133338.1809385-1-poulhies@adacore.com> References: <20240613133338.1809385-1-poulhies@adacore.com> 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.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org From: Eric Botcazou This puts Windows on par with Linux as far as backtraces are concerned. gcc/ada/ * libgnat/s-tsmona__linux.adb (Get): Move down descriptive comment. * libgnat/s-tsmona__mingw.adb: Add with clause and use clause for System.Storage_Elements. (Get): Pass GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT in the call to GetModuleHandleEx and remove the subsequent call to FreeLibrary. Upon success, set Load_Addr to the base address of the module. * libgnat/s-win32.ads (GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS): Use shorter literal. (GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT): New constant. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/libgnat/s-tsmona__linux.adb | 34 ++++++++++++++--------------- gcc/ada/libgnat/s-tsmona__mingw.adb | 20 ++++++++--------- gcc/ada/libgnat/s-win32.ads | 3 ++- 3 files changed, 29 insertions(+), 28 deletions(-) diff --git a/gcc/ada/libgnat/s-tsmona__linux.adb b/gcc/ada/libgnat/s-tsmona__linux.adb index 417b57f4545..4545399017a 100644 --- a/gcc/ada/libgnat/s-tsmona__linux.adb +++ b/gcc/ada/libgnat/s-tsmona__linux.adb @@ -30,7 +30,8 @@ ------------------------------------------------------------------------------ -- This is the GNU/Linux specific version of this package -with Interfaces.C; use Interfaces.C; + +with Interfaces.C; use Interfaces.C; separate (System.Traceback.Symbolic) @@ -41,18 +42,6 @@ package body Module_Name is function Is_Shared_Lib (Base : Address) return Boolean; -- Returns True if a shared library - -- The principle is: - - -- 1. We get information about the module containing the address. - - -- 2. We check that the full pathname is pointing to a shared library. - - -- 3. for shared libraries, we return the non relocated address (so - -- the absolute address in the shared library). - - -- 4. we also return the full pathname of the module containing this - -- address. - ------------------- -- Is_Shared_Lib -- ------------------- @@ -139,11 +128,22 @@ package body Module_Name is -- Get -- --------- - function Get (Addr : System.Address; - Load_Addr : access System.Address) - return String - is + -- The principle is: + + -- 1. We get information about the module containing the address. + + -- 2. We check whether the module is a shared library. + -- 3. For shared libraries, we return the non-relocated address (so + -- the absolute address in the shared library). + + -- 4. We also return the full pathname of the module containing this + -- address. + + function Get + (Addr : System.Address; + Load_Addr : access System.Address) return String + is -- Dl_info record for Linux, used to get sym reloc offset type Dl_info is record diff --git a/gcc/ada/libgnat/s-tsmona__mingw.adb b/gcc/ada/libgnat/s-tsmona__mingw.adb index 3100db08bbd..61264da7dfe 100644 --- a/gcc/ada/libgnat/s-tsmona__mingw.adb +++ b/gcc/ada/libgnat/s-tsmona__mingw.adb @@ -31,7 +31,8 @@ -- This is the Windows specific version of this package -with System.Win32; use System.Win32; +with System.Storage_Elements; use System.Storage_Elements; +with System.Win32; use System.Win32; separate (System.Traceback.Symbolic) @@ -50,27 +51,26 @@ package body Module_Name is -- Get -- --------- - function Get (Addr : System.Address; - Load_Addr : access System.Address) - return String + function Get + (Addr : System.Address; + Load_Addr : access System.Address) return String is Res : DWORD; hModule : aliased HANDLE; - Path : String (1 .. 1_024); + Path : String (1 .. 1024); begin Load_Addr.all := System.Null_Address; if GetModuleHandleEx - (GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS, + (GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS + + GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT, Addr, hModule'Access) = Win32.TRUE then - Res := GetModuleFileName (hModule, Path'Address, Path'Length); + Load_Addr.all := To_Address (Integer_Address (hModule)); - if FreeLibrary (hModule) = Win32.FALSE then - null; - end if; + Res := GetModuleFileName (hModule, Path'Address, Path'Length); if Res > 0 then return Path (1 .. Positive (Res)); diff --git a/gcc/ada/libgnat/s-win32.ads b/gcc/ada/libgnat/s-win32.ads index 6e8e246d903..963cb57b7f0 100644 --- a/gcc/ada/libgnat/s-win32.ads +++ b/gcc/ada/libgnat/s-win32.ads @@ -157,7 +157,8 @@ package System.Win32 is FILE_ATTRIBUTE_VALID_FLAGS : constant := 16#00007fb7#; FILE_ATTRIBUTE_VALID_SET_FLAGS : constant := 16#000031a7#; - GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS : constant := 16#00000004#; + GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS : constant := 16#04#; + GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT : constant := 16#02#; type OVERLAPPED is record Internal : access ULONG; From patchwork Thu Jun 13 13:33:10 2024 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: 1947405 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=CE612BBX; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W0Nl24M9xz1ydW for ; Thu, 13 Jun 2024 23:37:50 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D92803882130 for ; Thu, 13 Jun 2024 13:37:48 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by sourceware.org (Postfix) with ESMTPS id 0B3C03882066 for ; Thu, 13 Jun 2024 13:33:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0B3C03882066 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 0B3C03882066 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::32f ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718285635; cv=none; b=g0KnAF4qmklOHI4gmELeARe1u5Ce8V7nuPMLx05St+xwfCkZYkgn+Y8x+J2q1VvX+2z7cPEF41xzpZ7Qq0SUFp+4AAaQ4ZpUCumMYy6LElNi2MC57Mhe4aDO/x1oiCYhvnB/Utd0sWxjxvHxU0MQ3cMlC2mojpOHZTFFU4iLjuY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718285635; c=relaxed/simple; bh=ux21BS2H3yxCtYl2rs7rSpFeR5coZRccW/lkh215zZM=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=c1tJPW89Qo5jXl6NL9Jmx8WP5F8NyCdGIhRnxtUzbVVLw/OxrjP50czesKeXbsu0qntg2CR+o09HqYbi69PqSPe7oqSIERAz8MCr3KbNhxiJLv6lbqshM+uueL+UTHrt/J39oUY3YKisal5sm8rXDxk2haWIjgrna1n8wC82TUw= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-421820fc26dso9199075e9.2 for ; Thu, 13 Jun 2024 06:33:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1718285633; x=1718890433; 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=IXcbvqYAW59qK9UIPVkTk0ZJ2AgxUHpikoHbsBjMx9I=; b=CE612BBXCS7xb3+HZmM7imoYD/CK9qKxCZRzB04OEsiQTo/vjUX/vGzEvyUV8wkjQd pYvHZdQqvojd/gkGZMXzjMoKlFdzxrNkxCI9v2YLDWf4C5/cSRBOXm6YqcQfnJFMQYNf cO1qU7bxoruEYhn0PSrE07QfaMjWX41sxAsxNQQJ6Z4XOuUOUmn5Nj/9BTDyqeHxVrbn pgAPlAUL6NlxJ8JMoofzZ+y3dg8ExOm2DEPwhlr75mqFYa4DL/Lt74728LyFkFzCgdee NPu6aGyE/LaJ4FJtUz01JbTR1T7KPddIFPGtcgq63BSJhEoei3Dvn5g7TuLJyT0j5Gsb GcPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718285633; x=1718890433; 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=IXcbvqYAW59qK9UIPVkTk0ZJ2AgxUHpikoHbsBjMx9I=; b=ny0/hrhpK3SIEEfuR/erC+ggTvNWuY5LK9Z8bay92TWjTq+psqf1TDh8MDReZMuFVB LB3IHtPakKZFoolqEOC23bU4aUZZ6SHmEEBDdCek55l7sycomSkuJYYZoW2mdkPrI75i 3EMU/kRY6gmIYdL1OnRKr9/ET2RggJ52IMLeDg6VAG0U4j6YJzg2QfLzLM6FhUfKiGFF bTggljYvP9wC2eNO6AeVCqQ2813kpOzTZBI+Gl6ANS5zFLJxJt37ksRBy6glporkJHNT azeIjzJ0mLe6yi4Oif9VC2O+COAwgYZ9NhVdAYLkagK+vtg7S/4kXKPFKW8OJzXlVWFT 5mcw== X-Gm-Message-State: AOJu0YyPmjtCigNR6tiVfPTNZ5OmPeIHe1Tew0bOBwQWbqMzJGRXfpNo qg7G2WnCwn8+Ke8KqvZJmmLE2nhzm/FbqpdeWK7ug2nPBN/lxK0Y/PZLSYHF5mvGuFatCYCiUg0 = X-Google-Smtp-Source: AGHT+IEs7FdUY6wo5GZBSjKy+iRBHFddkX/H1RvKYZPfZrBRl+5+VlwSAiIP9HTJDX/e9HrETeK2OA== X-Received: by 2002:a05:600c:3546:b0:422:47a:15c8 with SMTP id 5b1f17b1804b1-422863ad92cmr43928085e9.12.1718285632799; Thu, 13 Jun 2024 06:33:52 -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-422870e9145sm62391955e9.22.2024.06.13.06.33.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 06:33:52 -0700 (PDT) From: =?utf-8?q?Marc_Poulhi=C3=A8s?= To: gcc-patches@gcc.gnu.org Cc: Piotr Trojanek Subject: [COMMITTED 04/30] ada: Simplify checks for Address and Object_Size clauses Date: Thu, 13 Jun 2024 15:33:10 +0200 Message-ID: <20240613133338.1809385-4-poulhies@adacore.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240613133338.1809385-1-poulhies@adacore.com> References: <20240613133338.1809385-1-poulhies@adacore.com> 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.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org From: Piotr Trojanek Where possible, we can use high-level wrapper routines instead of the low-level Get_Attribute_Definition_Clause. Code cleanup; semantics is unaffected. gcc/ada/ * layout.adb (Layout_Type): Use high-level wrapper routine. * sem_ch13.adb (Inherit_Delayed_Rep_Aspects): Likewise. * sem_ch3.adb (Analyze_Object_Declaration): Likewise. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/layout.adb | 4 ++-- gcc/ada/sem_ch13.adb | 4 +--- gcc/ada/sem_ch3.adb | 3 +-- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/gcc/ada/layout.adb b/gcc/ada/layout.adb index e43e96905e9..75635622c89 100644 --- a/gcc/ada/layout.adb +++ b/gcc/ada/layout.adb @@ -607,8 +607,8 @@ package body Layout is Error_Msg_Uint_1 := RM_Size (E); Error_Msg_F ("object size is too small, minimum allowed is ^", - Expression (Get_Attribute_Definition_Clause - (E, Attribute_Object_Size))); + Expression (Object_Size_Clause (E))); + end if; -- Adjust Esize up to RM_Size value diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb index 34aef434501..32b3333c157 100644 --- a/gcc/ada/sem_ch13.adb +++ b/gcc/ada/sem_ch13.adb @@ -14157,9 +14157,7 @@ package body Sem_Ch13 is | Aspect_Size => if not Has_Size_Clause (Typ) - and then - No (Get_Attribute_Definition_Clause - (Typ, Attribute_Object_Size)) + and then No (Object_Size_Clause (Typ)) then Set_Esize (Typ, Esize (P)); end if; diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index cbe2ef8be54..633e1367aee 100644 --- a/gcc/ada/sem_ch3.adb +++ b/gcc/ada/sem_ch3.adb @@ -5246,8 +5246,7 @@ package body Sem_Ch3 is E := First_Entity (Etype (Id)); while Present (E) loop if Ekind (E) = E_Entry - and then Present (Get_Attribute_Definition_Clause - (E, Attribute_Address)) + and then Present (Address_Clause (E)) then Error_Msg_Warn := SPARK_Mode /= On; Error_Msg_N From patchwork Thu Jun 13 13:33:11 2024 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: 1947398 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=EwsHReST; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W0Nhb4txHz1ydW for ; Thu, 13 Jun 2024 23:35:43 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6E7CF3882053 for ; Thu, 13 Jun 2024 13:35:40 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by sourceware.org (Postfix) with ESMTPS id D962F3882059 for ; Thu, 13 Jun 2024 13:33:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D962F3882059 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 D962F3882059 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::336 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718285637; cv=none; b=N7i+lg+kHbhgEfqfnbXuDFuvx1r5Z3sIgApBrP75vH0R6iiAPMJYF17f+kqb6z825LZ17NSe2dyoMHyd1HaSs/ab5q790ODQyLyboqyIKECyMTfBksAQzINm/XDYABLLIAq6XEFqCtclIDBkIvRDkKs711U6UizR8vmM/oNX0FE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718285637; c=relaxed/simple; bh=bx28NPk73RbjnUyKbbWMA8m8jDxWKcRfS4lIeecQAqo=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=tfvDZYVqZv5ac/iwmn+V+x7L4hTi/MiIzhz/lPpKdlz7w5GUVfQ27xlewbMAhtx1U+frt17NFqMbOsl/obIA50TC3Sdfpd9QkjtxGvPXFM4dbcFi1UyWtdeYcVtH7kBTH1qfsvT4M0Q23sps9gwNjfmhuQ2RDRHTvL3xZGHGKus= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-42179dafd6bso13666905e9.0 for ; Thu, 13 Jun 2024 06:33:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1718285633; x=1718890433; 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=Cn5nB523Xnz3IBPtCIQt3VVQKFitLD8KkxG6XDKiq0o=; b=EwsHReSTeVCfZrXLejkDFVEFlWUZqo0DKV5X6hUt9CziagdPGCN8JU+eKncakQ7QET H+nLLsyDMBLCJphA5ObmcE9Ftq3lbTEavu0G9vzmsL2EmlY6OKO3yFKDEi1PFJb8Bop1 jZ97jFYsQeau40k+P0Lo5RuaFybQQ0geMXDTYVwJ6kZ5yWM+KhEEPeqUCuJQ7bY0Ld/u teIagpPtf68fcQWPadfeLeb8++p6un/nRRLzo/gCfG9o/mt0iRlyhJKm17iTpCN4MBJK nHx24RaizRrsF3ga0oSY/sJDbyEgbFHkmAcWp5i0SDuJ+8AfsANoZr5xVxRkvxyxZjEN Llyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718285633; x=1718890433; 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=Cn5nB523Xnz3IBPtCIQt3VVQKFitLD8KkxG6XDKiq0o=; b=tc7GeeK47ardzNZFP3cQAwpDS3qpyqxCdv1w7tyJt+0o4eaOckkWTOShr4lkl81V0c pcEQg4RoeLLLjrDEy+EqhmUFgbrYU107QqU8zaSR2RXNw/mclWrCBkT/xxyDxJp6Ir0Y 2aH82laSh56wsXtrO/bbtuywWmi/qfA1mDvWtnciqkDS3F2j6njqQKDI6MuV5UG7UgqZ XjK479UAluoseBQwbNZGvXRgf05ZF3G2Ie98lydyJPxzeRBAfc/GonXrUWredkrbnp0m L5locVnWmBCHJVSvSisH4kNaKC+9x80FYm7Gp7/E9pDy/07yHHjcxNSjfzcJgf9dDkhS /Vog== X-Gm-Message-State: AOJu0YyhvoLCIEfR8T2SDZLAf7dfWo/LDKM4XHJntG2mGIfM764MeZOr U94lqocAs+narPy5UXd4U1K2Bk7orOqsNFCqmOI+F48Kz2X4450sZNEy5izoZt45RBnzZHKvtVQ = X-Google-Smtp-Source: AGHT+IG5QlyBPRbIMiKe0K/bdN75lO6GtqMq4WoC6ojtnDsq+g4D7qf2BGep5EeJrOXA/AQukpbmMg== X-Received: by 2002:a05:600c:3512:b0:422:fdb:efb3 with SMTP id 5b1f17b1804b1-422b6fc46e1mr24128435e9.12.1718285633555; Thu, 13 Jun 2024 06:33:53 -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-422870e9145sm62391955e9.22.2024.06.13.06.33.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 06:33:53 -0700 (PDT) From: =?utf-8?q?Marc_Poulhi=C3=A8s?= To: gcc-patches@gcc.gnu.org Cc: Javier Miranda Subject: [COMMITTED 05/30] ada: Missing support for 'Old with overloaded function Date: Thu, 13 Jun 2024 15:33:11 +0200 Message-ID: <20240613133338.1809385-5-poulhies@adacore.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240613133338.1809385-1-poulhies@adacore.com> References: <20240613133338.1809385-1-poulhies@adacore.com> MIME-Version: 1.0 X-Spam-Status: No, score=-13.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_ASCII_DIVIDERS, 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.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org From: Javier Miranda The compiler reports an error when the prefix of 'Old is a call to an overloaded function that has no parameters. gcc/ada/ * sem_attr.adb (Analyze_Attribute): Enhance support for using 'Old with a prefix that references an overloaded function that has no parameters; add missing support for the use of 'Old within qualified expressions. * sem_util.ads (Preanalyze_And_Resolve_Without_Errors): New subprogram. * sem_util.adb (Preanalyze_And_Resolve_Without_Errors): New subprogram. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_attr.adb | 37 ++++++++++++++++++++++++++++++++++++- gcc/ada/sem_util.adb | 12 ++++++++++++ gcc/ada/sem_util.ads | 3 +++ 3 files changed, 51 insertions(+), 1 deletion(-) diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb index 2fd95f36d65..22fbca45ac5 100644 --- a/gcc/ada/sem_attr.adb +++ b/gcc/ada/sem_attr.adb @@ -5534,7 +5534,42 @@ package body Sem_Attr is -- The prefix must be preanalyzed as the full analysis will take -- place during expansion. - Preanalyze_And_Resolve (P); + -- If the attribute reference has an expected type or shall resolve + -- to a given type, the same applies to the prefix; otherwise the + -- prefix shall be resolved independently of context (RM 6.1.1(8/5)). + + if Nkind (Parent (N)) = N_Qualified_Expression then + Preanalyze_And_Resolve (P, Etype (Parent (N))); + + -- An special case occurs when the prefix is an overloaded function + -- call without formals; in order to identify such case we preanalyze + -- a duplicate of the prefix ignoring errors. + + else + declare + P_Copy : constant Node_Id := New_Copy_Tree (P); + + begin + Set_Parent (P_Copy, Parent (P)); + + Preanalyze_And_Resolve_Without_Errors (P_Copy); + + -- In the special case of a call to an overloaded function + -- without extra formals we resolve it using its returned + -- type (which is the unique valid call); if this not the + -- case we will report the error later, as part of the + -- regular analysis of the full expression. + + if Nkind (P_Copy) = N_Function_Call + and then Is_Overloaded (Name (P_Copy)) + and then No (First_Formal (Entity (Name (P_Copy)))) + then + Preanalyze_And_Resolve (P, Etype (Name (P_Copy))); + else + Preanalyze_And_Resolve (P); + end if; + end; + end if; -- Ensure that the prefix does not contain attributes 'Old or 'Result diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index 5bea088c44e..438dea79977 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -25790,6 +25790,18 @@ package body Sem_Util is return Kind; end Policy_In_Effect; + ------------------------------------------- + -- Preanalyze_And_Resolve_Without_Errors -- + ------------------------------------------- + + procedure Preanalyze_And_Resolve_Without_Errors (N : Node_Id) is + Status : constant Boolean := Get_Ignore_Errors; + begin + Set_Ignore_Errors (True); + Preanalyze_And_Resolve (N); + Set_Ignore_Errors (Status); + end Preanalyze_And_Resolve_Without_Errors; + ------------------------------- -- Preanalyze_Without_Errors -- ------------------------------- diff --git a/gcc/ada/sem_util.ads b/gcc/ada/sem_util.ads index f282d1fad99..bda295f0a7f 100644 --- a/gcc/ada/sem_util.ads +++ b/gcc/ada/sem_util.ads @@ -3388,6 +3388,9 @@ package Sem_Util is function Yields_Universal_Type (N : Node_Id) return Boolean; -- Determine whether unanalyzed node N yields a universal type + procedure Preanalyze_And_Resolve_Without_Errors (N : Node_Id); + -- Preanalyze and resolve N without reporting errors + procedure Preanalyze_Without_Errors (N : Node_Id); -- Preanalyze N without reporting errors From patchwork Thu Jun 13 13:33:12 2024 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: 1947397 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=WOBRIOKh; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W0Nh7012fz1ydW for ; Thu, 13 Jun 2024 23:35:18 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 689C53882642 for ; Thu, 13 Jun 2024 13:35:16 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by sourceware.org (Postfix) with ESMTPS id C8DB93882179 for ; Thu, 13 Jun 2024 13:33:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C8DB93882179 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 C8DB93882179 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::334 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718285638; cv=none; b=cm4bOMuRLSQ1xHjJmnUfxL9CjjHqW64k9AwmHXrqcQ97A066I2SE7EZUioHwnyMndRTL2Ih1EwiibaivYy8o2JRWty+EnMEBKy/Fg5y8BhtVxDMyoaWRlEHHv/0PJ8RdJa6X1avR8wSulckwrmm/80e/r0Zn+s8u2IRHbeyeyZ8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718285638; c=relaxed/simple; bh=JM5SGdX7ekOkb6V4LOCbjJiL9RdrVPVvpzH3o0uZd9M=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=INulcjPkMErzVhJq8iJbXUxLM0IecPWjOPsIr/NRciO/hEjV3xyM8jGixZyysNiG5JRWq7wCHJimrMmjR7BTWHwniGk4VCtZf4pdiA+Cz8B3KJeMRVi+QKUK9i3UFNYKQb6NtQTdL7nEk7YJr88UfCPt+WR3cbpJ3aUJEINE+WU= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-421d32fda86so12240965e9.0 for ; Thu, 13 Jun 2024 06:33:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1718285634; x=1718890434; 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=U+8LK4G/fnHR5h8gSfXQUEu3s6p6oPERFc/+ZmhSRzk=; b=WOBRIOKhR9fnBL9BgSemiqLZe6ow4W6gsBs2GRKdkkB9ULLyaWvHnvU7vh1CP57+Xz PCa6yo3E5pOOG+x87qwAJjX0+Gy6N6Yd9IJsAeVU7FJpaj0KVlXvC7lstHpBWe7gaVoM /5rXY2Yyjfu+dM6QP+u6gJizmu6PCuE62cT58y9C7i16CHKt8OdghF5WSvjUMNKj2aWt Uane3lWxhE58D+IDi0Tnzwoh7Df2CH7a2EDSqrjeSeSLk1lwX8/JITDUuIr9g96FB5su QLfoG+TUO4UtqQf4gX6WiEYz/oG9P2bsZJ3rdHYnQDzMmwTQDFv4uMhPXmNBoZHLTPps PUJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718285634; x=1718890434; 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=U+8LK4G/fnHR5h8gSfXQUEu3s6p6oPERFc/+ZmhSRzk=; b=Soo2NVDtxay/00Lgyef0DdVrNkaYn7dOeOHYs1jh9sCD7kVcl18aq/xhe1+KiH9WFa EEY8oEwV8pEkNV2ChhK8gYVdxHItdrrT8mrRyHj9qNXVX7JzEvsW5c+aUUxeDqUxOLMh 3Mm42Yqe7dxjRv1UbSQ8T2SMZqLzeQ2bgUwfcHvWT18swu//fPRfTeEILcRp7nDML1c/ 4j/YsIZZGsq73G/lQCjTxOKcTN+u7138bUNiLroKMoRO0mIwUvNBfcpTmH0ojXsFgl52 gXX3wBDVFV4RBYVvDG6HlMhwYh2TbwJRg13CxFRXX6vuDZPWj+xTGw3x6iRIC8seo9Ib vwBg== X-Gm-Message-State: AOJu0YwAvAGi9uvk3ujnTNkuHW4ex7l6iuI4V2rWQK59yd6IxlvmqiPO yWrtNeAN5/ETS/2bUl2/ltPaODe05n2etLrnem9U0ZZdbaH0Qfdoy9pzx/wFaWKZfowGZvpQXDQ = X-Google-Smtp-Source: AGHT+IHE2nDs2f7Q94prwAPLyLsaImc//AnAqJreL7O7uqG/merKyIcQXG6JFYL27zeIOesf8R0f/g== X-Received: by 2002:a05:600c:42c4:b0:422:6755:17de with SMTP id 5b1f17b1804b1-422867c90f9mr48570255e9.41.1718285634397; Thu, 13 Jun 2024 06:33:54 -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-422870e9145sm62391955e9.22.2024.06.13.06.33.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 06:33:53 -0700 (PDT) From: =?utf-8?q?Marc_Poulhi=C3=A8s?= To: gcc-patches@gcc.gnu.org Cc: Eric Botcazou Subject: [COMMITTED 06/30] ada: Fix fallout of previous finalization change Date: Thu, 13 Jun 2024 15:33:12 +0200 Message-ID: <20240613133338.1809385-6-poulhies@adacore.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240613133338.1809385-1-poulhies@adacore.com> References: <20240613133338.1809385-1-poulhies@adacore.com> 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.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org From: Eric Botcazou Now that Is_Finalizable_Transient only looks at the renamings coming from nontransient objects serviced by transient scopes, it must find the object ultimately renamed by them through a chain of renamings. gcc/ada/ PR ada/114710 * exp_util.adb (Find_Renamed_Object): Recurse if the renamed object is itself a renaming. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/exp_util.adb | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb index 6ad464e6701..bf95b0e13c8 100644 --- a/gcc/ada/exp_util.adb +++ b/gcc/ada/exp_util.adb @@ -8808,9 +8808,10 @@ package body Exp_Util is First_Stmt : Node_Id) return Boolean is function Find_Renamed_Object (Ren_Decl : Node_Id) return Entity_Id; - -- Given an object renaming declaration, retrieve the entity of the - -- renamed name. Return Empty if the renamed name is anything other - -- than a variable or a constant. + -- Given an object renaming declaration, retrieve the entity within + -- the renamed name, recursively if this entity is itself a renaming. + -- Return Empty if the renamed name contains anything other than a + -- variable or a constant. ------------------------- -- Find_Renamed_Object -- @@ -8877,7 +8878,16 @@ package body Exp_Util is Search (Constant_Value (Ren_Obj)); end if; - return Ren_Obj; + -- Recurse if Ren_Obj is itself a renaming + + if Present (Ren_Obj) + and then Ekind (Ren_Obj) = E_Variable + and then Present (Renamed_Object (Ren_Obj)) + then + return Find_Renamed_Object (Declaration_Node (Ren_Obj)); + else + return Ren_Obj; + end if; end Find_Renamed_Object; -- Local variables From patchwork Thu Jun 13 13:33:13 2024 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: 1947399 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=iulWNSZZ; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W0NjQ6Qsjz1ydW for ; Thu, 13 Jun 2024 23:36:26 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0EB9F3882657 for ; Thu, 13 Jun 2024 13:36:25 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by sourceware.org (Postfix) with ESMTPS id 61C8D3882177 for ; Thu, 13 Jun 2024 13:33:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 61C8D3882177 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 61C8D3882177 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::330 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718285638; cv=none; b=Jbeylzq5HS1sMhQtqXGq+IvcuEirEan/gcU1e3RkZYmCI6bKd1WWWLooRB3WwuxnKvOC7EmiIrQAlaC3QTaeJt78KFtuIILy7LqD5SnrjmlfzriRwyfmmDju89CsfTYs57IbImT6x2DM0YHqrzSCSlN3v9onfCNzxQ9g6sZd9yY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718285638; c=relaxed/simple; bh=rWpR0JNLLIpNlCE2nO1lrc3Yz9z5jOLFZ2MLFX/yfF0=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=njDeo7Dng1j2cC0BuA71iF54J8+vPGXfbWRbdyXqo4P7A2G4GLHPD1KnWzt+GKFanGKog2AhV8duiADt0KDoOadUzXetu3naLwi/8lRhet11p2+6wKXNuMy43X//EHDuHTWwuewum/kn1MyAZmojY+sdMDrxFwPpgcSeEcFsi5k= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-42249a4f9e4so7739895e9.2 for ; Thu, 13 Jun 2024 06:33:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1718285635; x=1718890435; 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=apsihoLo/c47k0z35Nj4EWS1Vx0htSl4Sr6XsdeVnF0=; b=iulWNSZZr0IfHk+fTKKHjnCOenvpSgPxN6KQw4XXZqns2sMgwszgXnemnuAl/+os8h tWIs9aJyGhQW07PYfp0z+noFlv6J/4M6GzbEa38FiozT++25nbUdWUZ2xBvHqhFyfVtE SRemp26urMTbY5NUvP3fYUJVbPnAQUsNlDAq67LJUp4W/mS71brbk/h6IMRhJWK2NXUP zU739gQYi9z0Fbk10A1alaQ2bXAdrbry8yhGkjXbmyT4td3CiDMg6WCrv58c/x1VUCjo Ju0P3azkBmXSWxll0FQen2amcuKr11FLz4rjRHPAYvNjSQlR6LByALvho2reWz1/1UEH 60Og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718285635; x=1718890435; 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=apsihoLo/c47k0z35Nj4EWS1Vx0htSl4Sr6XsdeVnF0=; b=TdL8TiJI3VvaymBC70vpM8C/eE1hxSuBC8tl3lCvfUf0goRSrac+uLhRSVUHKd7iSM P8rdpoLGdvlGdzUHSJ3S3EMCQxRosOk5O3ar6snjwNTBSp1pS4rFy2cxk1e+UHSYXXhZ g2e/VkNuhqmv7KvRTvgB9DFuPcIJjfF+IbjphVXmyiUQo0cnXpX2HGcBWt5Md/0GQCa/ TlTr/L0ANryQSqGlKjJOoNn9uxZoBc/CoVUjpjXR1Zabnuj7/amTSPZUBfWehrI9mayW e0k41KLGrq7v3K3zwtjbqm5QeIESMQU+nPa1M2e1weJOeq9Gd3UONklpvdkUvqkRecEz 8LiA== X-Gm-Message-State: AOJu0YwEn7SApA7auyOTC2fSiXZL7gfco8sf8402asXeab5jJ39PPZBn NtfnYIGPrXtpKogAaNqBPXumRZYtGSDNrfA7GsfOmoB4bu/JQakY6s54C0u/5kRXdM/hY+1BlsI = X-Google-Smtp-Source: AGHT+IFQay/2EmUPH++YJS5BWkd+Jd4uHSrzY1rU7lpalZ3nVedIHHlmFySdidK5u2hWibTZPAbA1A== X-Received: by 2002:a05:600c:4e04:b0:421:7f30:7cf7 with SMTP id 5b1f17b1804b1-422861aec47mr44091105e9.1.1718285635187; Thu, 13 Jun 2024 06:33:55 -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-422870e9145sm62391955e9.22.2024.06.13.06.33.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 06:33:54 -0700 (PDT) From: =?utf-8?q?Marc_Poulhi=C3=A8s?= To: gcc-patches@gcc.gnu.org Cc: Richard Kenner Subject: [COMMITTED 07/30] ada: Inline if -gnatn in CCG mode even if -O0 Date: Thu, 13 Jun 2024 15:33:13 +0200 Message-ID: <20240613133338.1809385-7-poulhies@adacore.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240613133338.1809385-1-poulhies@adacore.com> References: <20240613133338.1809385-1-poulhies@adacore.com> MIME-Version: 1.0 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, KAM_NUMSUBJECT, 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.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org From: Richard Kenner gcc/ada/ * exp_ch6.adb (Expand_Ctrl_Function_Call): Inline if -gnatn in CCG mode even if -O0. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/exp_ch6.adb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb index 005210ce6bd..2e873c9c908 100644 --- a/gcc/ada/exp_ch6.adb +++ b/gcc/ada/exp_ch6.adb @@ -5311,10 +5311,11 @@ package body Exp_Ch6 is then Expand_Inlined_Call (Call_Node, Subp, Orig_Subp); - -- Back-end inlining either if optimization is enabled or the call is - -- required to be inlined. + -- Back-end inlining either if optimization is enabled, we're + -- generating C, or the call is required to be inlined. elsif Optimization_Level > 0 + or else CCG_Mode or else Has_Pragma_Inline_Always (Subp) then Add_Inlined_Body (Subp, Call_Node); From patchwork Thu Jun 13 13:33:14 2024 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: 1947400 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=PumTSsJq; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W0NjT27Q6z1ydW for ; Thu, 13 Jun 2024 23:36:29 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7AFA7388265C for ; Thu, 13 Jun 2024 13:36:27 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by sourceware.org (Postfix) with ESMTPS id 29A273882060 for ; Thu, 13 Jun 2024 13:33:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 29A273882060 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 29A273882060 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::32c ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718285639; cv=none; b=IFBtuW8rg46AA8qAVBmHkl3ZvrmIXW1alkmaqjjKWISajbHgT+r96Hj4+mZQQLnchW/f47WewxHZi4JS46NxRrqeriC28CaGWLgsZeNDwFo2auNXpCm/nuU2oWi3i6IzZXtyCWoJHI39YzXF3J2yJKrK8alSxwowliDmiwGhoZA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718285639; c=relaxed/simple; bh=CmrJLGdI42voCs/tf44tCVwBefgU4p9mGNHwE24yyPo=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=iIkkSQjiMzXs5X0WHElxrWyho37uBR8djq1b4PVM/Ng+dybz9gLEfNTzmZR4WcWyl4L7spQhU2u4ggGs8Ouhw6VZ2FTgddRF+WYFz3RTV+PADx7cxT+3Bt41vDoCH4MAZtJSdDzwq+JhCzTR/mHExWlhPAD8qcygY4Nlo8K9LpI= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-42281d8cd2dso7722225e9.3 for ; Thu, 13 Jun 2024 06:33:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1718285636; x=1718890436; 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=z5HoDjd1lvzKjoSGxF5EZPrwxbnX7HTmiy6+/xoFtJA=; b=PumTSsJqCNOwkBoKNj2LukuipVNJoRGUYfGlszms3q+SO4nrYhOVe8SyWQiraVDB/t sjxaVnDPlIN8UaThfrB9iDNNOhYJK3YiRwR9YC8FfOYVa6bHoVlEznH9/sRM2PmSiqI/ U2zGLZb/mEDI16b30oPfQqaJbG5sRvDP/sn8UuTqP5isxpXzwDAmNA4bO7Gg4OclYS+8 BnapJj8IqFAmUaaQthUDuY6darc6egMKM/45UJp8N2MXOHxAdOvgOD5jMOb6PnBryIAh BnaDta1pB1VbBcxW2l/tfMXNSJMB0Qbza3SNCU+0pH0ix4hiMPrfdwdKr0aauUZCt9Zu 6uHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718285636; x=1718890436; 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=z5HoDjd1lvzKjoSGxF5EZPrwxbnX7HTmiy6+/xoFtJA=; b=SDijXOA2PkMcIFT0iiTvDXpTfWKClhxB9S9LRNFwRVwayyAS/JAMMckcMwIByJ53ZH Tmy6fu42wHWBSCRyzcZh+i69f9Ew8Ub4ZY2nLIcii/4PKjSoT3wvhmD3j1KA0zfRMbtx 8C7QuNUvvClgRyKlbVfA3dUswKXqcqeXpRzFV8+Nae3RkGKFKOsJIZMBZKTGbmg/iUSA ylWQCp/IyO+l235WI37tW/8dtuSWUnJQid0VVbqXJmTWOgDv08t2tEjFpIyf7nZAklre SLu4Iwl+FyePBRH1UxwCB8Ljm2G5HY2dRlu7mQU4Ktx6Th8/vRa1T/gr+bh1PQDzN7WC 3ZfA== X-Gm-Message-State: AOJu0YyQYF7j/ci2nd7zA3OQ8tuRXkf1Av14CIGiW4TdKZ6iH0CQ01HP +JbywFKEvZxJH6X36uU+hyHbTaWtrzmScTdldpM1C8Uj0m9Sw9kwMICSeR4iYF1Dmr8DwISrGU8 = X-Google-Smtp-Source: AGHT+IGqLkjmVtXVeF8ooyTJS0F8ttdIzBVWHCbC2GnbfYcwLvPX7CzPFZWJi9OUxQzjH/0bzjAopA== X-Received: by 2002:a05:600c:1c15:b0:422:7467:963d with SMTP id 5b1f17b1804b1-422863ad387mr37683285e9.21.1718285635892; Thu, 13 Jun 2024 06:33:55 -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-422870e9145sm62391955e9.22.2024.06.13.06.33.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 06:33:55 -0700 (PDT) From: =?utf-8?q?Marc_Poulhi=C3=A8s?= To: gcc-patches@gcc.gnu.org Cc: Steve Baird Subject: [COMMITTED 08/30] ada: Reject too-strict alignment specifications. Date: Thu, 13 Jun 2024 15:33:14 +0200 Message-ID: <20240613133338.1809385-8-poulhies@adacore.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240613133338.1809385-1-poulhies@adacore.com> References: <20240613133338.1809385-1-poulhies@adacore.com> 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.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org From: Steve Baird In some cases the compiler incorrectly concludes that a package body is required for a package specification that includes the implicit declaration of one or more inherited subprograms for an explicitly declared derived type. Spurious error messages (e.g., "cannot generate code for file") may result. gcc/ada/ * sem_ch7.adb (Requires_Completion_In_Body): Modify the Comes_From_Source test so that the implicit declaration of an inherited subprogram does not cause an incorrect result of True. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_ch7.adb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gcc/ada/sem_ch7.adb b/gcc/ada/sem_ch7.adb index 09d85bea335..0f0fc90ad6b 100644 --- a/gcc/ada/sem_ch7.adb +++ b/gcc/ada/sem_ch7.adb @@ -2827,13 +2827,14 @@ package body Sem_Ch7 is -- Otherwise test to see if entity requires a completion. Note that -- subprogram entities whose declaration does not come from source are -- ignored here on the basis that we assume the expander will provide an - -- implicit completion at some point. + -- implicit completion at some point. In particular, an inherited + -- subprogram of a derived type should not cause us to return True here. elsif (Is_Overloadable (Id) and then Ekind (Id) not in E_Enumeration_Literal | E_Operator and then not Is_Abstract_Subprogram (Id) and then not Has_Completion (Id) - and then Comes_From_Source (Parent (Id))) + and then Comes_From_Source (Id)) or else (Ekind (Id) = E_Package From patchwork Thu Jun 13 13:33:15 2024 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: 1947402 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=WUpnkVvY; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W0Njq1mw1z1ydW for ; Thu, 13 Jun 2024 23:36:47 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8F15B388215A for ; Thu, 13 Jun 2024 13:36:45 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by sourceware.org (Postfix) with ESMTPS id 24B5F3882120 for ; Thu, 13 Jun 2024 13:33:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 24B5F3882120 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 24B5F3882120 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::333 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718285640; cv=none; b=DAEcHTBDXbXKYuay2lHe5XC4cJ7ey/RLnBDOFTIBB/ZQwaELNKoiH5Dqse4IOPHJg/q+WTya/aMjEpUCShLCofqCmoGtpKP0XpaNJD5n3bmbZ8AKEy70/AdSsaTP9JGwQeuhITZbS0EjwOMOdIGudwQ4hzi1EMWxHOgjRBIeGMc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718285640; c=relaxed/simple; bh=CoTeJLkxIx+dCRRv/tLB/+e8o29kmTrJIavkyYzYH/I=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=q2tjV7sV7+Rh0q4l+vmLJUBALsBT/jYIK1Svi6PxKszQ2QENZSWfxBpWHz9QV0REzc3F2ELbk40nRqfbrFZNqEL9A+HHPrc0XHd11pTnYdv0hkJ0acJdbS8LPq6WTLGMlE2pePmkmXaZlKapYcPHIeen2mZ+OaoMpVvc5fceQUs= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-4218008c613so8503695e9.2 for ; Thu, 13 Jun 2024 06:33:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1718285637; x=1718890437; 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=x+/4TC3xkD187P2hi3A4mkNB1p07SPmemPelxkIGFvE=; b=WUpnkVvYjPVrkr95oZjchxhC3JNSmV8oqxRBJfS9HwELI+VnZHz1XQpDrDLXBH7ZaL k1BhekoCwoTL5fTnnx/rnmUupVm+Z6VLpBxRiRQ5mDBXgjZvvKxJ3Re6E/rWYO6qqjyW VW44iZcw23lpzMaDTtby4iMp/NalEmD4EYni43Sm2VAaB9gW8U3Iu8cfgTx7lNGr0s5P ygEvNUL49tEJAe1G6QFomuWBxmKSfr5d4Sm1KbYumfV3syy2jOKyIsgU9TKpVW0CVf0w nKdevRBYV5SQ7Q6VR12xjSzOsL4aHgqnM3eqmZin5CTKvBAYxiDKq92XUs913MnW5NH7 O+2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718285637; x=1718890437; 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=x+/4TC3xkD187P2hi3A4mkNB1p07SPmemPelxkIGFvE=; b=tHipaQVMIcPh7bG5dEgzkXYflj1u75qCQcKUfKoEHR1w2vSd0ShwJiA6dGPXXAm0Ub NMhYI46aN34v2eG44H6IbgSUIhY2zI6kb7BeKXUHtBwCkpWR9Mpa1Tk8KuLeT3nUPsxS 78QFubdeyGmpEMuvMAQThcOqmizxgd3SeTWYTvjrRDgMN+2CvCjp8dBgADXtoMv10cjN q1+uLG20F1hWxBOt+bSzBbcok9/FZXynwZDH7Ea9HbLA/XNvxee5fetfxvPD46YgU583 stmKNo6Yo6044s5LKUk02If8Y5z3tQqE/uPfc46WSpkNdVsRnR2ArUmS/vJoZJn4wjCw Cf2Q== X-Gm-Message-State: AOJu0YwWfq/22G3zpovR6OKA7f0VJu/IJK3eMSL+BtghRLq0eoziqWC0 +1ZZ7AHybqggqj/pRLYhTZWjDvriM4g598QwSyJT3JXlyFrDNoV2fMG330avpee9e+3A3a+vi08 = X-Google-Smtp-Source: AGHT+IHcYvLr/hwnotHjf7QP6t0Oo+FZ0xx/kmr4YWt+QxdCZm4WeEDRDIi+1aYRvbi7TgkaXhCMlg== X-Received: by 2002:a05:600c:34ca:b0:421:7d30:717e with SMTP id 5b1f17b1804b1-422862a7326mr39823115e9.15.1718285637008; Thu, 13 Jun 2024 06:33:57 -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-422870e9145sm62391955e9.22.2024.06.13.06.33.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 06:33:56 -0700 (PDT) From: =?utf-8?q?Marc_Poulhi=C3=A8s?= To: gcc-patches@gcc.gnu.org Cc: Ronan Desplanques Subject: [COMMITTED 09/30] ada: Fix incorrect String lower bound in gnatlink Date: Thu, 13 Jun 2024 15:33:15 +0200 Message-ID: <20240613133338.1809385-9-poulhies@adacore.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240613133338.1809385-1-poulhies@adacore.com> References: <20240613133338.1809385-1-poulhies@adacore.com> 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.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org From: Ronan Desplanques This patch fixes code in gnatlink that incorrectly assumed that the lower bound of a particular string was always 1. gcc/ada/ * gnatlink.adb (Gnatlink): Fix incorrect lower bound assumption. (Is_Prefix): New function. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/gnatlink.adb | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/gcc/ada/gnatlink.adb b/gcc/ada/gnatlink.adb index 1455412ef93..db0fd144a13 100644 --- a/gcc/ada/gnatlink.adb +++ b/gcc/ada/gnatlink.adb @@ -1885,6 +1885,24 @@ begin Shared_Libgcc_Seen : Boolean := False; Static_Libgcc_Seen : Boolean := False; + function Is_Prefix + (Complete_String : String; Prefix : String) return Boolean; + -- Returns whether Prefix is a prefix of Complete_String + + --------------- + -- Is_Prefix -- + --------------- + + function Is_Prefix + (Complete_String : String; Prefix : String) return Boolean + is + S : String renames Complete_String; + P : String renames Prefix; + begin + return P'Length <= S'Length + and then S (S'First .. S'First + P'Length - 1) = P; + end Is_Prefix; + begin J := Linker_Options.First; while J <= Linker_Options.Last loop @@ -1936,13 +1954,12 @@ begin -- Here we just check for a canonical form that matches the -- pragma Linker_Options set in the NT runtime. - if (Linker_Options.Table (J)'Length > 17 - and then Linker_Options.Table (J) (1 .. 17) = - "-Xlinker --stack=") - or else - (Linker_Options.Table (J)'Length > 12 - and then Linker_Options.Table (J) (1 .. 12) = - "-Wl,--stack=") + if Is_Prefix + (Complete_String => Linker_Options.Table (J).all, + Prefix => "-Xlinker --stack=") + or else Is_Prefix + (Complete_String => Linker_Options.Table (J).all, + Prefix => "-Wl,--stack=") then if Stack_Op then Linker_Options.Table (J .. Linker_Options.Last - 1) := From patchwork Thu Jun 13 13:33:16 2024 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: 1947403 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=FxlCT+Qj; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W0Nkj3jc2z1ydW for ; Thu, 13 Jun 2024 23:37:33 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B86EA388265D for ; Thu, 13 Jun 2024 13:37:31 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by sourceware.org (Postfix) with ESMTPS id EE0A9388217C for ; Thu, 13 Jun 2024 13:33:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org EE0A9388217C 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 EE0A9388217C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::336 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718285640; cv=none; b=kcyQQUNkbZITd+Ug1rtr7m0o1oJTu1u7v/e3drTu/nJ6toHbpGi63br145CcTLVwykcWNh4KEB6NVIlrrONLXvUXhZuc9qrOtkYgJ0hO76BcqkhJbF73aqkqfwkvS2t7x5zvz4qPq0QDs/YablNMel3WJYjuJMaFnfHnFxzsf6Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718285640; c=relaxed/simple; bh=qygIfbmQPN5ufwEFZEDKwmZlcL9CjYF67Jd3G3yiVTo=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=Cz7xQr8PB3OXNgCWICqc2ezfazxqstFaF/nlW6tMSx3eRDzkxDf9htp+DEWOTWecdU2GZliWgYTChoMacb5WVGx17cSpVs+M1QQwcGlFuaRuPp9T2MfRzCXyLwB3+pl1iaE/r0Vc1HRXtwSLuvm8b3fVktZlyiACt9Jr1Fw6Oec= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-42278f3aea4so10426535e9.1 for ; Thu, 13 Jun 2024 06:33:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1718285638; x=1718890438; 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=+fwcGGztIdAQ0BmLO3vfqo3C7ViiaJz+3H63NQrg0IU=; b=FxlCT+QjcSXOxFqJPC/NGK7kSAuOTn3mTvZwLqZklWpLyAWFZrebmrTO/+wmPt5Z9L EHWVEqFYNNTWLsRTdCiPIx9FbtSlDNO4Q3X74AOTRbihebybt5Oldorj2BO2XxO71o9H /tayZ2t0n8P45K6eCOXHR5Xo4BJ+0zeNgSErzcJjZs5bRGMxElH9EqiYqBQjZaN7Fd3j cIAFI4sQFDEdMCx+qFJTFJuUhHBYIKhmCVvidgQBxmJD30Q9UpJpkIkXN02BX3bSGX/2 jl9WxBHRRIUhL5sWB5V06U9yZhbBNhpdG9IpnMI52yme925RK1vR37+ZDzi3Px8AOifQ jb2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718285638; x=1718890438; 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=+fwcGGztIdAQ0BmLO3vfqo3C7ViiaJz+3H63NQrg0IU=; b=BYoGoMIz9Xj5O33F263HU1MIyLDyk5AembY3KuGqc6NJebffgJgbjKmzDdRvHKBPpr E9UZgkv098PkWYvr4Fb82+2JTdoIMzrvRC9sux0PPzDzAFA0j6JUYr9hCO875UXjvP3p 0tkWdAXhf8WpYguk/4kB0ilhaC5vTV886fXmBnPcNQiobUUgepUtnWPSlvljLSq58zvr 1D4PtYF+/nHUx4XQl5fVaZpN45Omvmmtdtgr5cHIveWB/cYbO1y+crP2X3+e22qwDYYb xoy6ivBVSZI1h+fSB1E30bm3OOh2ZFH69ep7ZEIz8ATKYjfXEL2X3j+yabJSSvcqPCEu EnFA== X-Gm-Message-State: AOJu0Yy4WJQu7j4TNf3WLZVpmo6anp/N4cJmQX6fc0Fj0qYLVKLIAgNc NYmAG2lYQJkxLHfbcZeGHtun2D8SJWzpHoijixKQl93INTsCBDq9YTre9daJ20K+yLFnlo+fJxE = X-Google-Smtp-Source: AGHT+IEs19Bia2Hzno5DJPNqb91GdpQ5JUX6TtZF77FB2UVLPw4q+BLxpriPXNdcggKzAmiMBKKf7w== X-Received: by 2002:a05:600c:5117:b0:421:7e76:b85c with SMTP id 5b1f17b1804b1-422864aebd5mr38411635e9.23.1718285637757; Thu, 13 Jun 2024 06:33:57 -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-422870e9145sm62391955e9.22.2024.06.13.06.33.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 06:33:57 -0700 (PDT) From: =?utf-8?q?Marc_Poulhi=C3=A8s?= To: gcc-patches@gcc.gnu.org Cc: Yannick Moy Subject: [COMMITTED 10/30] ada: Do not inline subprogram which could cause SPARK violation Date: Thu, 13 Jun 2024 15:33:16 +0200 Message-ID: <20240613133338.1809385-10-poulhies@adacore.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240613133338.1809385-1-poulhies@adacore.com> References: <20240613133338.1809385-1-poulhies@adacore.com> MIME-Version: 1.0 X-Spam-Status: No, score=-13.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_ASCII_DIVIDERS, 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.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org From: Yannick Moy Inlining in GNATprove a subprogram containing a constant declaration with an address clause/aspect might lead to a spurious error if the address expression is based on a constant view of a mutable object at call site. Do not allow such inlining in GNATprove. gcc/ada/ * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do not inline when constant with address clause is found. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/inline.adb | 83 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 82 insertions(+), 1 deletion(-) diff --git a/gcc/ada/inline.adb b/gcc/ada/inline.adb index 04cf1194009..8e98fb5ad10 100644 --- a/gcc/ada/inline.adb +++ b/gcc/ada/inline.adb @@ -1094,7 +1094,6 @@ package body Inline is -- If the body of the subprogram includes a call that returns an -- unconstrained type, the secondary stack is involved, and it is -- not worth inlining. - ------------------------- -- Has_Extended_Return -- ------------------------- @@ -1462,6 +1461,14 @@ package body Inline is (Spec_Id : Entity_Id; Body_Id : Entity_Id) return Boolean is + function Has_Constant_With_Address_Clause + (Body_Node : Node_Id) + return Boolean; + -- Returns true if the subprogram contains a declaration of a constant + -- with an address clause, which could become illegal in SPARK after + -- inlining, if the address clause mentions a constant view of a mutable + -- object at call site. + function Has_Formal_Or_Result_Of_Deep_Type (Id : Entity_Id) return Boolean; -- Returns true if the subprogram has at least one formal parameter or @@ -1502,6 +1509,70 @@ package body Inline is -- knowledge of the SPARK boundary is needed to determine exactly -- traversal functions. + -------------------------------------- + -- Has_Constant_With_Address_Clause -- + -------------------------------------- + + function Has_Constant_With_Address_Clause + (Body_Node : Node_Id) + return Boolean + is + function Check_Constant_With_Addresss_Clause + (N : Node_Id) + return Traverse_Result; + -- Returns Abandon on node N if this is a declaration of a constant + -- object with an address clause. + + ----------------------------------------- + -- Check_Constant_With_Addresss_Clause -- + ----------------------------------------- + + function Check_Constant_With_Addresss_Clause + (N : Node_Id) + return Traverse_Result + is + begin + case Nkind (N) is + when N_Object_Declaration => + declare + Obj : constant Entity_Id := Defining_Entity (N); + begin + if Constant_Present (N) + and then + (Present (Address_Clause (Obj)) + or else Has_Aspect (Obj, Aspect_Address)) + then + return Abandon; + else + return OK; + end if; + end; + + -- Skip locally declared subprogram bodies inside the body to + -- inline, as the declarations inside those do not count. + + when N_Subprogram_Body => + if N = Body_Node then + return OK; + else + return Skip; + end if; + + when others => + return OK; + end case; + end Check_Constant_With_Addresss_Clause; + + function Check_All_Constants_With_Address_Clause is new + Traverse_Func (Check_Constant_With_Addresss_Clause); + + -- Start of processing for Has_Constant_With_Address_Clause + + begin + return Check_All_Constants_With_Address_Clause + (Body_Node) = Abandon; + end Has_Constant_With_Address_Clause; + --------------------------------------- -- Has_Formal_Or_Result_Of_Deep_Type -- --------------------------------------- @@ -2009,6 +2080,16 @@ package body Inline is elsif Has_Hide_Unhide_Annotation (Spec_Id, Body_Id) then return False; + -- Do not inline subprograms containing constant declarations with an + -- address clause, as inlining could lead to a spurious violation of + -- SPARK rules. + + elsif Present (Body_Id) + and then + Has_Constant_With_Address_Clause (Unit_Declaration_Node (Body_Id)) + then + return False; + -- Otherwise, this is a subprogram declared inside the private part of a -- package, or inside a package body, or locally in a subprogram, and it -- does not have any contract. Inline it. From patchwork Thu Jun 13 13:33:17 2024 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: 1947404 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=L3m0pIMY; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W0Nkt383jz1ydW for ; Thu, 13 Jun 2024 23:37:42 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id ABD723882651 for ; Thu, 13 Jun 2024 13:37:40 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by sourceware.org (Postfix) with ESMTPS id 1D9443882174 for ; Thu, 13 Jun 2024 13:34:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1D9443882174 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 1D9443882174 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::32a ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718285646; cv=none; b=oDXQqkkSqOnpwHYxdvXacT6MqQxLWg6XWf6AenJZu0ur80s8hcCOFtJv8b9fxi9rwa517qYJJrKhQcGF9McgV5fF+3X5zsXS6dwKTR0VL60U+RBPpHhbHDndUq+RITo+56pabS+kXRw96H4RGmwhwCPZN8A8rqAnYvPxm8nZ/AY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718285646; c=relaxed/simple; bh=YVNH5XggvUTxe05sW2N2ZupDxpxc5ZSdlVT/OUB98GY=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=Z9CsJxalGlyYsbr8Wjz4deMrNF1d4jHP3uMuxuLuAF/JuewamVostaL5nVM/FDfMF8wbY50WPl/DLKLDp4qEVgITygtuRYKmG3HGlQx9iVVf2JsacGkyhEJIqj5u2c2oEU+c+7C3NjHc4hbo4Dvh+RZ7zD+vZAm1vDiyo0VSZxc= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-42179dafd6bso13667765e9.0 for ; Thu, 13 Jun 2024 06:34:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1718285640; x=1718890440; 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=HuyZESIwWwUNBrYZgxpmpXUHBjmM36R04GhkMygT1CE=; b=L3m0pIMY4mMRi6X0vGHd3h4P5vVZ51i6KmOeb0hZvD6qiLfreyWXgM6qWanIQu3XJA Bx6zq6sPdPtpUX4Ujtm8gs0AWjn1tNtLNyXHbzKAYAVDL2z9mlXoLm2Ls7KpNVR7lf/g rCzTMQ4C25D1xglTVxdw6W4A2g9o4zGZ72uupxDx5IcEtVS7AHHz7ak+A5Qqwx9W30c4 dXnAtDDJf8yvppBZaex8bkB7NUg6OeKrJ6/y+p8oVoENr00APdjIWbGatQAIeBgvqI4D Gm6o8IFxgmIkqgNfgFaSXCHObOh5G3Ogd79hjRvXTOWHDbZksiIghDzKGV9PmjRF19iN ciVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718285640; x=1718890440; 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=HuyZESIwWwUNBrYZgxpmpXUHBjmM36R04GhkMygT1CE=; b=KonmOdV8h1L4eBQ8S3f/jlxNtACZmwonyGcfzrNyoZEGbAFFbg4KIIoBLa6iqJvQVn 5kcQt2qwBIuZ/eUm16NjIfoOAUgfUi61tyXDY8t1ylwwOvVAbzu/TVpwgJV+XOMqmmux 8NG9hoZ14RSzoqVk1INbjubQGpRof3ZUBU4JBn6leDBMHu+DfNhatbeV6aoh1Hd6lRtR +1OJFSs12bcHussRJXfsEfy6kyUua9L+A/7H+I6A3c45C4kfQ7QcX86sjMLLudsSvb0Z q092uvncA7PrgrjwxvL4HlRndO4cBmkIoJ14+/hTKLba/S83eohcCioqWgsc5ICw7yw4 6QUA== X-Gm-Message-State: AOJu0Yx7RjUEGvk6BFW2MNcLY8tFs81KXXc9ZJBPgJKYTK927PGzjdbs LoabXanuAT4asJcQHELg44/prUCvsTFrfhY1Zo6VLCY5ymZA7XYUBIETwoJomjfxmvsCvOPPaX4 = X-Google-Smtp-Source: AGHT+IE9wraZcKvBkVLmPfxjXs2R6RrIaqOqnzhG0SPwWlqFNFWsJLyepRtJGSs4+c07eS/og3TTQg== X-Received: by 2002:a05:600c:45cd:b0:421:b906:8088 with SMTP id 5b1f17b1804b1-422b66e9ecemr29240845e9.0.1718285638662; Thu, 13 Jun 2024 06:33:58 -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-422870e9145sm62391955e9.22.2024.06.13.06.33.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 06:33:58 -0700 (PDT) From: =?utf-8?q?Marc_Poulhi=C3=A8s?= To: gcc-patches@gcc.gnu.org Cc: Eric Botcazou Subject: [COMMITTED 11/30] ada: Streamline elaboration of local tagged types Date: Thu, 13 Jun 2024 15:33:17 +0200 Message-ID: <20240613133338.1809385-11-poulhies@adacore.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240613133338.1809385-1-poulhies@adacore.com> References: <20240613133338.1809385-1-poulhies@adacore.com> MIME-Version: 1.0 X-Spam-Status: No, score=-13.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_ASCII_DIVIDERS, KAM_SHORT, 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.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org From: Eric Botcazou This set of changes is aimed at streamlining the code generated for the elaboration of local tagged types. The dispatch tables and other related data structures are built dynamically on the stack for them and a few of the patterns used for this turn out to be problematic for the optimizer: 1. the array of primitives in the dispatch table is default-initialized to null values by calling the initialization routine of an unconstrained array type, and then immediately assigned an aggregate made up of the same null values. 2. the external tag is initialized by means of a dynamic concatenation involving the secondary stack, but all the elements have a fixed size. 3. the _size primitive is saved in the TSD by means of the dereference of the address of the TSD that was previously saved in the dispatch table. gcc/ada/ * Makefile.rtl (GNATRTL_NONTASKING_OBJS): Add s-imad32$(objext), s-imad64$(objext) and s-imagea$(objext). * exp_atag.ads (Build_Set_Size_Function): Replace Tag_Node parameter with Typ parameter. * exp_atag.adb: Add clauses for Sinfo.Utils. (Build_Set_Size_Function): Retrieve the TSD object statically. * exp_disp.adb: Add clauses for Ttypes. (Make_DT): Call Address_Image{32,64] instead of Address_Image. (Register_Primitive): Pass Tag_Typ to Build_Set_Size_Function. * rtsfind.ads (RTU_Id): Remove System_Address_Image and add System_Img_Address_{32;64}. (RE_Id): Remove entry for RE_Address_Image and add entries for RE_Address_Image{32,64}. * rtsfind.adb (System_Descendant): Adjust to above changes. * libgnat/a-tags.ads (Address_Array): Suppress initialization. * libgnat/s-addima.adb (System.Address_Image): Call the appropriate routine based on the address size. * libgnat/s-imad32.ads: New file. * libgnat/s-imad64.ads: Likewise. * libgnat/s-imagea.ads: Likewise. * libgnat/s-imagea.adb: Likewise. * gcc-interface/Make-lang.in (GNAT_ADA_OBJS) [$(STAGE1)=False]: Add ada/libgnat/s-imad32.o and ada/libgnat/s-imad64.o. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/Makefile.rtl | 3 ++ gcc/ada/exp_atag.adb | 41 ++++++++++++--- gcc/ada/exp_atag.ads | 4 +- gcc/ada/exp_disp.adb | 27 ++++++---- gcc/ada/gcc-interface/Make-lang.in | 2 + gcc/ada/libgnat/a-tags.ads | 1 + gcc/ada/libgnat/s-addima.adb | 48 ++++-------------- gcc/ada/libgnat/s-imad32.ads | 43 ++++++++++++++++ gcc/ada/libgnat/s-imad64.ads | 43 ++++++++++++++++ gcc/ada/libgnat/s-imagea.adb | 80 ++++++++++++++++++++++++++++++ gcc/ada/libgnat/s-imagea.ads | 45 +++++++++++++++++ gcc/ada/rtsfind.adb | 2 +- gcc/ada/rtsfind.ads | 9 ++-- 13 files changed, 289 insertions(+), 59 deletions(-) create mode 100644 gcc/ada/libgnat/s-imad32.ads create mode 100644 gcc/ada/libgnat/s-imad64.ads create mode 100644 gcc/ada/libgnat/s-imagea.adb create mode 100644 gcc/ada/libgnat/s-imagea.ads diff --git a/gcc/ada/Makefile.rtl b/gcc/ada/Makefile.rtl index 0f5ebb87d73..1512c01f3f8 100644 --- a/gcc/ada/Makefile.rtl +++ b/gcc/ada/Makefile.rtl @@ -611,6 +611,9 @@ GNATRTL_NONTASKING_OBJS= \ s-geveop$(objext) \ s-gloloc$(objext) \ s-htable$(objext) \ + s-imad32$(objext) \ + s-imad64$(objext) \ + s-imagea$(objext) \ s-imageb$(objext) \ s-imaged$(objext) \ s-imagef$(objext) \ diff --git a/gcc/ada/exp_atag.adb b/gcc/ada/exp_atag.adb index 12c7d8c226b..70bdd16c3b9 100644 --- a/gcc/ada/exp_atag.adb +++ b/gcc/ada/exp_atag.adb @@ -36,6 +36,7 @@ with Opt; use Opt; with Rtsfind; use Rtsfind; with Sinfo; use Sinfo; with Sinfo.Nodes; use Sinfo.Nodes; +with Sinfo.Utils; use Sinfo.Utils; with Sem_Aux; use Sem_Aux; with Sem_Disp; use Sem_Disp; with Sem_Util; use Sem_Util; @@ -776,19 +777,45 @@ package body Exp_Atag is function Build_Set_Size_Function (Loc : Source_Ptr; - Tag_Node : Node_Id; - Size_Func : Entity_Id) return Node_Id is + Typ : Entity_Id; + Size_Func : Entity_Id) return Node_Id + is + F_Nod : constant Node_Id := Freeze_Node (Typ); + + Act : Node_Id; + begin pragma Assert (Chars (Size_Func) = Name_uSize - and then RTE_Record_Component_Available (RE_Size_Func)); + and then RTE_Record_Component_Available (RE_Size_Func) + and then Present (F_Nod)); + + -- Find the declaration of the TSD object in the freeze actions + + Act := First (Actions (F_Nod)); + while Present (Act) loop + if Nkind (Act) = N_Object_Declaration + and then Nkind (Object_Definition (Act)) = N_Subtype_Indication + and then Is_Entity_Name (Subtype_Mark (Object_Definition (Act))) + and then Is_RTE (Entity (Subtype_Mark (Object_Definition (Act))), + RE_Type_Specific_Data) + then + exit; + end if; + + Next (Act); + end loop; + + pragma Assert (Present (Act)); + + -- Generate: + -- TSD.Size_Func := Size_Ptr!(Size_Func'Unrestricted_Access); + return Make_Assignment_Statement (Loc, Name => Make_Selected_Component (Loc, - Prefix => - Make_Explicit_Dereference (Loc, - Build_TSD (Loc, - Unchecked_Convert_To (RTE (RE_Address), Tag_Node))), + Prefix => + New_Occurrence_Of (Defining_Identifier (Act), Loc), Selector_Name => New_Occurrence_Of (RTE_Record_Component (RE_Size_Func), Loc)), diff --git a/gcc/ada/exp_atag.ads b/gcc/ada/exp_atag.ads index 96cb5663e68..7e987f110b7 100644 --- a/gcc/ada/exp_atag.ads +++ b/gcc/ada/exp_atag.ads @@ -162,9 +162,9 @@ package Exp_Atag is function Build_Set_Size_Function (Loc : Source_Ptr; - Tag_Node : Node_Id; + Typ : Entity_Id; Size_Func : Entity_Id) return Node_Id; - -- Build code that saves in the TSD the address of the function + -- Build code that saves in the TSD of Typ the address of the function -- calculating _size of the object. function Build_Set_Static_Offset_To_Top diff --git a/gcc/ada/exp_disp.adb b/gcc/ada/exp_disp.adb index 1a19c1e3303..666f84ec688 100644 --- a/gcc/ada/exp_disp.adb +++ b/gcc/ada/exp_disp.adb @@ -70,6 +70,7 @@ with Stringt; use Stringt; with Strub; use Strub; with SCIL_LL; use SCIL_LL; with Tbuild; use Tbuild; +with Ttypes; use Ttypes; package body Exp_Disp is @@ -5217,8 +5218,10 @@ package body Exp_Disp is Chars => New_External_Name (Tname, 'A')); Full_Name : constant String_Id := Fully_Qualified_Name_String (First_Subtype (Typ)); - Str1_Id : String_Id; - Str2_Id : String_Id; + + Address_Image : RE_Id; + Str1_Id : String_Id; + Str2_Id : String_Id; begin -- Generate: @@ -5240,7 +5243,17 @@ package body Exp_Disp is -- Exname : constant String := -- Str1 & Address_Image (Tag) & Str2; - if RTE_Available (RE_Address_Image) then + -- We use Address_Image64 for Morello because Integer_Address + -- is 64-bit large even though Address is 128-bit large. + + case System_Address_Size is + when 32 => Address_Image := RE_Address_Image32; + when 64 => Address_Image := RE_Address_Image64; + when 128 => Address_Image := RE_Address_Image64; + when others => raise Program_Error; + end case; + + if RTE_Available (Address_Image) then Append_To (Result, Make_Object_Declaration (Loc, Defining_Identifier => Exname, @@ -5256,7 +5269,7 @@ package body Exp_Disp is Make_Function_Call (Loc, Name => New_Occurrence_Of - (RTE (RE_Address_Image), Loc), + (RTE (Address_Image), Loc), Parameter_Associations => New_List ( Unchecked_Convert_To (RTE (RE_Address), New_Occurrence_Of (DT_Ptr, Loc)))), @@ -7565,11 +7578,7 @@ package body Exp_Disp is if Chars (Prim) = Name_uSize and then RTE_Record_Component_Available (RE_Size_Func) then - DT_Ptr := Node (First_Elmt (Access_Disp_Table (Tag_Typ))); - Append_To (L, - Build_Set_Size_Function (Loc, - Tag_Node => New_Occurrence_Of (DT_Ptr, Loc), - Size_Func => Prim)); + Append_To (L, Build_Set_Size_Function (Loc, Tag_Typ, Prim)); end if; else diff --git a/gcc/ada/gcc-interface/Make-lang.in b/gcc/ada/gcc-interface/Make-lang.in index 4f1b310fb84..3cbbf5042f1 100644 --- a/gcc/ada/gcc-interface/Make-lang.in +++ b/gcc/ada/gcc-interface/Make-lang.in @@ -528,6 +528,8 @@ GNAT_ADA_OBJS+= \ ada/libgnat/s-excmac.o \ ada/libgnat/s-exctab.o \ ada/libgnat/s-htable.o \ + ada/libgnat/s-imad32.o \ + ada/libgnat/s-imad64.o \ ada/libgnat/s-imgint.o \ ada/libgnat/s-mastop.o \ ada/libgnat/s-memory.o \ diff --git a/gcc/ada/libgnat/a-tags.ads b/gcc/ada/libgnat/a-tags.ads index a36d2df32c1..25a6f7ee599 100644 --- a/gcc/ada/libgnat/a-tags.ads +++ b/gcc/ada/libgnat/a-tags.ads @@ -260,6 +260,7 @@ private type Prim_Ptr is access procedure; type Address_Array is array (Positive range <>) of Prim_Ptr; + pragma Suppress_Initialization (Address_Array); subtype Dispatch_Table is Address_Array (1 .. 1); -- Used by GDB to identify the _tags and traverse the run-time structure diff --git a/gcc/ada/libgnat/s-addima.adb b/gcc/ada/libgnat/s-addima.adb index 61933edeb97..f1488b6a87d 100644 --- a/gcc/ada/libgnat/s-addima.adb +++ b/gcc/ada/libgnat/s-addima.adb @@ -29,44 +29,18 @@ -- -- ------------------------------------------------------------------------------ -with Ada.Unchecked_Conversion; +with System.Img_Address_32; +with System.Img_Address_64; function System.Address_Image (A : Address) return String is - - Result : String (1 .. 2 * Address'Size / Storage_Unit); - - type Byte is mod 2 ** 8; - for Byte'Size use 8; - - Hexdigs : - constant array (Byte range 0 .. 15) of Character := "0123456789ABCDEF"; - - type Bytes is array (1 .. Address'Size / Storage_Unit) of Byte; - for Bytes'Size use Address'Size; - - function To_Bytes is new Ada.Unchecked_Conversion (Address, Bytes); - - Byte_Sequence : constant Bytes := To_Bytes (A); - - LE : constant := Standard'Default_Bit_Order; - BE : constant := 1 - LE; - -- Set to 1/0 for True/False for Little-Endian/Big-Endian - - Start : constant Natural := BE * (1) + LE * (Bytes'Length); - Incr : constant Integer := BE * (1) + LE * (-1); - -- Start and increment for accessing characters of address string - - Ptr : Natural; - -- Scan address string - begin - Ptr := Start; - for N in Bytes'Range loop - Result (2 * N - 1) := Hexdigs (Byte_Sequence (Ptr) / 16); - Result (2 * N) := Hexdigs (Byte_Sequence (Ptr) mod 16); - Ptr := Ptr + Incr; - end loop; - - return Result; - + -- We use Address_Image64 for Morello because Integer_Address is 64-bit + -- large even though Address is 128-bit large. + + case Address'Size is + when 32 => return String (System.Img_Address_32.Address_Image32 (A)); + when 64 => return String (System.Img_Address_64.Address_Image64 (A)); + when 128 => return String (System.Img_Address_64.Address_Image64 (A)); + when others => raise Program_Error; + end case; end System.Address_Image; diff --git a/gcc/ada/libgnat/s-imad32.ads b/gcc/ada/libgnat/s-imad32.ads new file mode 100644 index 00000000000..9130c3a4863 --- /dev/null +++ b/gcc/ada/libgnat/s-imad32.ads @@ -0,0 +1,43 @@ +------------------------------------------------------------------------------ +-- -- +-- GNAT RUN-TIME COMPONENTS -- +-- -- +-- S Y S T E M . I M G _ A D D R E S S _ 3 2 -- +-- -- +-- S p e c -- +-- -- +-- Copyright (C) 2024, Free Software Foundation, Inc. -- +-- -- +-- GNAT is free software; you can redistribute it and/or modify it under -- +-- terms of the GNU General Public License as published by the Free Soft- -- +-- ware Foundation; either version 3, or (at your option) any later ver- -- +-- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- +-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- +-- or FITNESS FOR A PARTICULAR PURPOSE. -- +-- -- +-- As a special exception under Section 7 of GPL version 3, you are granted -- +-- additional permissions described in the GCC Runtime Library Exception, -- +-- version 3.1, as published by the Free Software Foundation. -- +-- -- +-- You should have received a copy of the GNU General Public License and -- +-- a copy of the GCC Runtime Library Exception along with this program; -- +-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- +-- . -- +-- -- +-- GNAT was originally developed by the GNAT team at New York University. -- +-- Extensive contributions were provided by Ada Core Technologies Inc. -- +-- -- +------------------------------------------------------------------------------ + +with Interfaces; +with System.Image_A; + +package System.Img_Address_32 is + pragma Pure; + + package Impl is new Image_A (Interfaces.Unsigned_32); + + function Address_Image32 (A : Address) return Impl.Address_String + renames Impl.Address_Image; + +end System.Img_Address_32; diff --git a/gcc/ada/libgnat/s-imad64.ads b/gcc/ada/libgnat/s-imad64.ads new file mode 100644 index 00000000000..c8da3ee473f --- /dev/null +++ b/gcc/ada/libgnat/s-imad64.ads @@ -0,0 +1,43 @@ +------------------------------------------------------------------------------ +-- -- +-- GNAT RUN-TIME COMPONENTS -- +-- -- +-- S Y S T E M . I M G _ A D D R E S S _ 6 4 -- +-- -- +-- S p e c -- +-- -- +-- Copyright (C) 2024, Free Software Foundation, Inc. -- +-- -- +-- GNAT is free software; you can redistribute it and/or modify it under -- +-- terms of the GNU General Public License as published by the Free Soft- -- +-- ware Foundation; either version 3, or (at your option) any later ver- -- +-- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- +-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- +-- or FITNESS FOR A PARTICULAR PURPOSE. -- +-- -- +-- As a special exception under Section 7 of GPL version 3, you are granted -- +-- additional permissions described in the GCC Runtime Library Exception, -- +-- version 3.1, as published by the Free Software Foundation. -- +-- -- +-- You should have received a copy of the GNU General Public License and -- +-- a copy of the GCC Runtime Library Exception along with this program; -- +-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- +-- . -- +-- -- +-- GNAT was originally developed by the GNAT team at New York University. -- +-- Extensive contributions were provided by Ada Core Technologies Inc. -- +-- -- +------------------------------------------------------------------------------ + +with Interfaces; +with System.Image_A; + +package System.Img_Address_64 is + pragma Pure; + + package Impl is new Image_A (Interfaces.Unsigned_64); + + function Address_Image64 (A : Address) return Impl.Address_String + renames Impl.Address_Image; + +end System.Img_Address_64; diff --git a/gcc/ada/libgnat/s-imagea.adb b/gcc/ada/libgnat/s-imagea.adb new file mode 100644 index 00000000000..abcb883223a --- /dev/null +++ b/gcc/ada/libgnat/s-imagea.adb @@ -0,0 +1,80 @@ +------------------------------------------------------------------------------ +-- -- +-- GNAT RUN-TIME COMPONENTS -- +-- -- +-- S Y S T E M . I M A G E _ A -- +-- -- +-- B o d y -- +-- -- +-- Copyright (C) 2024, Free Software Foundation, Inc. -- +-- -- +-- GNAT is free software; you can redistribute it and/or modify it under -- +-- terms of the GNU General Public License as published by the Free Soft- -- +-- ware Foundation; either version 3, or (at your option) any later ver- -- +-- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- +-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- +-- or FITNESS FOR A PARTICULAR PURPOSE. -- +-- -- +-- As a special exception under Section 7 of GPL version 3, you are granted -- +-- additional permissions described in the GCC Runtime Library Exception, -- +-- version 3.1, as published by the Free Software Foundation. -- +-- -- +-- You should have received a copy of the GNU General Public License and -- +-- a copy of the GCC Runtime Library Exception along with this program; -- +-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- +-- . -- +-- -- +-- GNAT was originally developed by the GNAT team at New York University. -- +-- Extensive contributions were provided by Ada Core Technologies Inc. -- +-- -- +------------------------------------------------------------------------------ + +with Ada.Unchecked_Conversion; + +with System.Storage_Elements; use System.Storage_Elements; + +package body System.Image_A is + + ------------------- + -- Address_Image -- + ------------------- + + function Address_Image (A : Address) return Address_String is + Result : Address_String; + + type Byte is mod 2 ** 8; + for Byte'Size use 8; + + Hexdigs : + constant array (Byte range 0 .. 15) of Character := "0123456789ABCDEF"; + + type Bytes is array (1 .. Uns'Size / Storage_Unit) of Byte; + + function To_Bytes is new Ada.Unchecked_Conversion (Uns, Bytes); + + Byte_Sequence : constant Bytes := To_Bytes (Uns (Integer_Address (A))); + + LE : constant := Standard'Default_Bit_Order; + BE : constant := 1 - LE; + -- Set to 1/0 for True/False for Little-Endian/Big-Endian + + Start : constant Natural := BE * (1) + LE * (Bytes'Length); + Incr : constant Integer := BE * (1) + LE * (-1); + -- Start and increment for accessing characters of address string + + Ptr : Natural; + -- Scan address string + + begin + Ptr := Start; + + for N in Bytes'Range loop + Result (2 * N - 1) := Hexdigs (Byte_Sequence (Ptr) / 16); + Result (2 * N) := Hexdigs (Byte_Sequence (Ptr) mod 16); + Ptr := Ptr + Incr; + end loop; + + return Result; + end Address_Image; + +end System.Image_A; diff --git a/gcc/ada/libgnat/s-imagea.ads b/gcc/ada/libgnat/s-imagea.ads new file mode 100644 index 00000000000..56b42bccae1 --- /dev/null +++ b/gcc/ada/libgnat/s-imagea.ads @@ -0,0 +1,45 @@ +------------------------------------------------------------------------------ +-- -- +-- GNAT RUN-TIME COMPONENTS -- +-- -- +-- S Y S T E M . I M A G E _ A -- +-- -- +-- S p e c -- +-- -- +-- Copyright (C) 2024, Free Software Foundation, Inc. -- +-- -- +-- GNAT is free software; you can redistribute it and/or modify it under -- +-- terms of the GNU General Public License as published by the Free Soft- -- +-- ware Foundation; either version 3, or (at your option) any later ver- -- +-- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- +-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- +-- or FITNESS FOR A PARTICULAR PURPOSE. -- +-- -- +-- As a special exception under Section 7 of GPL version 3, you are granted -- +-- additional permissions described in the GCC Runtime Library Exception, -- +-- version 3.1, as published by the Free Software Foundation. -- +-- -- +-- You should have received a copy of the GNU General Public License and -- +-- a copy of the GCC Runtime Library Exception along with this program; -- +-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- +-- . -- +-- -- +-- GNAT was originally developed by the GNAT team at New York University. -- +-- Extensive contributions were provided by Ada Core Technologies Inc. -- +-- -- +------------------------------------------------------------------------------ + +generic + + type Uns is mod <>; + +package System.Image_A is + pragma Pure; + + subtype Address_String is String (1 .. 2 * Uns'Size / Storage_Unit); + + function Address_Image (A : Address) return Address_String; + -- Return a string made up of hexadecimal digits with upper case letters + -- and without prefix representing the (lower part of) address A. + +end System.Image_A; diff --git a/gcc/ada/rtsfind.adb b/gcc/ada/rtsfind.adb index 7c9935e614c..4cfd9fe4a11 100644 --- a/gcc/ada/rtsfind.adb +++ b/gcc/ada/rtsfind.adb @@ -605,7 +605,7 @@ package body Rtsfind is range Interfaces_C_Strings .. Interfaces_C_Strings; subtype System_Descendant is RTU_Id - range System_Address_Image .. System_Tasking_Stages; + range System_Address_To_Access_Conversions .. System_Tasking_Stages; subtype System_Atomic_Operations_Descendant is System_Descendant range System_Atomic_Operations_Test_And_Set .. diff --git a/gcc/ada/rtsfind.ads b/gcc/ada/rtsfind.ads index 50c77867dcd..f4566b4846f 100644 --- a/gcc/ada/rtsfind.ads +++ b/gcc/ada/rtsfind.ads @@ -199,7 +199,6 @@ package Rtsfind is -- Children of System - System_Address_Image, System_Address_To_Access_Conversions, System_Arith_64, System_Arith_128, @@ -263,6 +262,8 @@ package Rtsfind is System_Fore_Fixed_64, System_Fore_Fixed_128, System_Fore_Real, + System_Img_Address_32, + System_Img_Address_64, System_Img_Bool, System_Img_Char, System_Img_Decimal_32, @@ -756,7 +757,8 @@ package Rtsfind is RE_Null_Address, -- System RE_Priority, -- System - RE_Address_Image, -- System.Address_Image + RE_Address_Image32, -- System.Img_Address_32 + RE_Address_Image64, -- System.Img_Address_64 RE_Add_With_Ovflo_Check64, -- System.Arith_64 RE_Double_Divide64, -- System.Arith_64 @@ -2401,7 +2403,8 @@ package Rtsfind is RE_Null_Address => System, RE_Priority => System, - RE_Address_Image => System_Address_Image, + RE_Address_Image32 => System_Img_Address_32, + RE_Address_Image64 => System_Img_Address_64, RE_Add_With_Ovflo_Check64 => System_Arith_64, RE_Double_Divide64 => System_Arith_64, From patchwork Thu Jun 13 13:33:18 2024 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: 1947413 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=OPCHvpUc; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W0NnW5xt4z1ydW for ; Thu, 13 Jun 2024 23:39:59 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 07D603882AE5 for ; Thu, 13 Jun 2024 13:39:58 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by sourceware.org (Postfix) with ESMTPS id A1CFB388216A for ; Thu, 13 Jun 2024 13:34:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A1CFB388216A 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 A1CFB388216A Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::32d ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718285642; cv=none; b=o0ytw7HefJ7iCipqmv2NjUpD5dcndfVfhQGuuVYKtxEo/NA9pibkbjGPvadR1d3Pie2qmh5hxsALFSN03gTs7eZonuMXl6/b9anZAwnGQYLWmw1QiDRkY65jTelz5WbFNg0tezMQ4IjA40CjQR6YZqG0YPTTSPHRkHscgBUo0zY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718285642; c=relaxed/simple; bh=+f2xxKs6jG6calEhJWujbvvShOHY02yN2VBlIy9Ib8A=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=p0bV0uXS8bY5spx+pD1X4FTMnCBLAbCjjUOlaA223GMVfjz2i6uJkZ29sy3fHFBFwRn5sim78OHIoEJAD9hB0dYnq1en+Jjw9dXETm13o5fuZRha3zTMlbJPyQAm4UEdhPUP9jf8BRVevZm1aen0GG6simAWZh+wbfu1uWy25dM= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-42122ac2f38so6587265e9.1 for ; Thu, 13 Jun 2024 06:34:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1718285639; x=1718890439; 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=fDWCsAI7H81E1tI5XMeJB7Gm4omL/oGikXkpDuKsr2A=; b=OPCHvpUcY7hSbgyCPqIaZE3dFXUJ1Q/0BATmst2+boQlnIjNqdgA6hApMNpWJqlik8 XinmEYoNqdlwOT6B/haikNAUZhuJ2zAG0svpk/YYgvq9Xx4AH4WDQtOd12bDcQUIHmMY Y/8f53vBqJozUfKPIZCDXmc9YKBJAACFvcSY0tHOlM5afSgzWyJt5Ww849wNXYtd1LQH hJWvcGp/540AUdTXjy+1wsG+IeWNbVN1WeCf4teLjrjQ+t4onoUw8vNT43mkV0n25Sed IxoOtQk/PtwIyEoPgV/B96ndwdtPdTGVb7gBnC2fEMYEBaMJIbiK5HCBiKRcED7X/N2W XcRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718285639; x=1718890439; 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=fDWCsAI7H81E1tI5XMeJB7Gm4omL/oGikXkpDuKsr2A=; b=a63Vj2R6EjqdPQbZAWyT5J4nJKrNVfFMVQEYdx0s+4KEt1XX0NfE5O1s33ZMui9mOg MWuBbKn++/L4h46SCf3TfcfQF0Jfdgbpi3T9sBUD6GGuifS+gu36J4OKryLwjl7Kwtu1 3UYpN13BgnM5jWp5M2gkJIsexIXjbUOrKwUGNWtO3PR5yK5YC8jOIU5zuVQYp0v6ZJcN 2Ht/NS/d1JpPhnWFxUN/2ReWdYXQDk3q1sDATdVrd7TjBHHv6ypAolgO945/RDEX00KQ Y6fmp48AIRjUe7xCjJUF28zd212wP3HjIeANezwivNm+Hvs8x69WeUtNm6/5UB7OpYr3 k0EA== X-Gm-Message-State: AOJu0Yz2hlfzsM0xp8SfJh0QtZT+1rtWXhVUDwiSIBsXS8cRH8Gw7hdy XEKAI/Um8jQGbXfST/LRX+sZKFJsh8whVPSyUhLRfZ+5QceX3zs/9kOdyOqdxe2oUE6Va0IckUA = X-Google-Smtp-Source: AGHT+IHOXKW03CQF0rwNUF+49dCaLEOEYIY1kYDRmA514R+hMSMAdCzrnNnWDK+Y0NBmoFlYl3Mhyg== X-Received: by 2002:a05:600c:1c9c:b0:418:2981:c70f with SMTP id 5b1f17b1804b1-422b89b1458mr27314625e9.19.1718285639421; Thu, 13 Jun 2024 06:33:59 -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-422870e9145sm62391955e9.22.2024.06.13.06.33.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 06:33:58 -0700 (PDT) From: =?utf-8?q?Marc_Poulhi=C3=A8s?= To: gcc-patches@gcc.gnu.org Cc: Piotr Trojanek Subject: [COMMITTED 12/30] ada: Check global mode restriction on encapsulating abstract states Date: Thu, 13 Jun 2024 15:33:18 +0200 Message-ID: <20240613133338.1809385-12-poulhies@adacore.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240613133338.1809385-1-poulhies@adacore.com> References: <20240613133338.1809385-1-poulhies@adacore.com> 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.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org From: Piotr Trojanek We already checked that a global item of mode Output is not an Input of the enclosing subprograms. With this change we also check that if this global item is a constituent, then none of its encapsulating abstract states is an Input of the enclosing subprograms. gcc/ada/ * sem_prag.adb (Check_Mode_Restriction_In_Enclosing_Context): Iterate over encapsulating abstract states. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_prag.adb | 81 ++++++++++++++++++++++++++++++-------------- 1 file changed, 56 insertions(+), 25 deletions(-) diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index 6d4ec122a21..d3b29089d77 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -2966,16 +2966,18 @@ package body Sem_Prag is (Item : Node_Id; Item_Id : Entity_Id) is - Context : Entity_Id; - Dummy : Boolean; - Inputs : Elist_Id := No_Elist; - Outputs : Elist_Id := No_Elist; + Context : Entity_Id; + Dummy : Boolean; + Item_View : Entity_Id; + Inputs : Elist_Id := No_Elist; + Outputs : Elist_Id := No_Elist; begin -- Traverse the scope stack looking for enclosing subprograms or -- tasks subject to pragma [Refined_]Global. Context := Scope (Subp_Id); + Check_Context : while Present (Context) and then Context /= Standard_Standard loop -- For a single task type, retrieve the corresponding object to @@ -2997,35 +2999,64 @@ package body Sem_Prag is Subp_Outputs => Outputs, Global_Seen => Dummy); - -- The item is classified as In_Out or Output but appears as - -- an Input or a formal parameter of mode IN in an enclosing - -- subprogram or task unit (SPARK RM 6.1.4(13)). + -- If the item is a constituent, we must check not just the + -- item itself, but also its encapsulating abstract states. - if Appears_In (Inputs, Item_Id) - and then not Appears_In (Outputs, Item_Id) - then - SPARK_Msg_NE - ("global item & cannot have mode In_Out or Output", - Item, Item_Id); + Item_View := Item_Id; - if Is_Subprogram_Or_Entry (Context) then - SPARK_Msg_NE - (Fix_Msg (Subp_Id, "\item already appears as input " - & "of subprogram &"), Item, Context); - else - SPARK_Msg_NE - (Fix_Msg (Subp_Id, "\item already appears as input " - & "of task &"), Item, Context); + Check_View : loop + -- The item is classified as In_Out or Output but appears + -- as an Input or a formal parameter of mode IN in + -- an enclosing subprogram or task unit (SPARK RM + -- 6.1.4(13)). + + if Appears_In (Inputs, Item_View) + and then not Appears_In (Outputs, Item_View) + then + if Item_View = Item_Id then + SPARK_Msg_NE + ("global item & " & + "cannot have mode In_Out or Output", + Item, Item_Id); + else + Error_Msg_Node_2 := Item_View; + SPARK_Msg_NE + ("global constituent & of & " & + "cannot have mode In_Out or Output", + Item, Item_Id); + end if; + + if Is_Subprogram_Or_Entry (Context) then + SPARK_Msg_NE + (Fix_Msg (Subp_Id, "\item already appears " + & "as input of subprogram &"), Item, Context); + else + SPARK_Msg_NE + (Fix_Msg (Subp_Id, "\item already appears " + & "as input of task &"), Item, Context); + end if; + + -- Stop the traversal once an error has been detected + + exit Check_Context; end if; - -- Stop the traversal once an error has been detected + if Ekind (Item_View) in E_Abstract_State + | E_Constant + | E_Variable + then + Item_View := Encapsulating_State (Item_View); + + exit Check_View when No (Item_View); + else + exit Check_View; + end if; + end loop Check_View; - exit; - end if; end if; Context := Scope (Context); - end loop; + end loop Check_Context; end Check_Mode_Restriction_In_Enclosing_Context; ---------------------------------------- From patchwork Thu Jun 13 13:33:19 2024 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: 1947416 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=BSZuwPq/; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W0Npl5f0rz20Xd for ; Thu, 13 Jun 2024 23:41:03 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 14CB03882657 for ; Thu, 13 Jun 2024 13:41:02 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by sourceware.org (Postfix) with ESMTPS id 43713388215C for ; Thu, 13 Jun 2024 13:34:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 43713388215C 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 43713388215C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::329 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718285643; cv=none; b=MkhidnTLOlsvI/arXtUBw98ZBwjx2SS/MZg3ychCjwN1JW4ZyxsJsq7zOTNGTfAD37flbEQc41cinQQviTW47jCYhGoKlvyVNDGZ9jg4RUj5/QwpIywT2ZbEjoTDeV46CnbJJdmY7tRv9ymYCmu7d1yLz0EpI7KWMvF8j3iGsuo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718285643; c=relaxed/simple; bh=JuMSgI6WByAxXNVVUVxCT1wZdCDr5LAIoew3xAHj0z4=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=daYoqcZpl0pSpj16Vvwvhq9LIk1WLY/LxcYD+Un4DlBkPkgWM97DMxpiHcH3jAkMbdgylfJ9G0t3Gmd1tx/oz9nIf0/VsjT0tG7NwRbxqyCk8jvWSGKg7sxHPxDrRfVw+826VLDI1dDy+OOVyMwT4SiWZv2IFRSL9KLux3STxno= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-42189d3c7efso11975865e9.2 for ; Thu, 13 Jun 2024 06:34:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1718285640; x=1718890440; 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=HwIVZXZmYkfW5n9HtGd3ZXVuwVjT6nR+qARClD4uLyE=; b=BSZuwPq/FA6DxG40nSfxcynLJT8NnDDuUJFndKKZqy45+c3yW0spnC6E17q3Wk5xQ8 NKbPwpj9M5u+7D/5BDo56cCLE/sxI09NCt5AU7lRLA112yTHsZEshY6wo8oun1NkfDsQ He2ZlksPYJRYJ1Rt6ubfESZ92aHwo9EccnY019y6CRmnTEthZb6xpFSc/hnmNRD072EY NOyxFjbUwQaLj8OH2eVhkHvm2NBRCb0l0U0sUREsU/N+Wyw+LaebdL48NPyBc0uiJxJH 6Jd3M6C5WbiSKHzZJIDyfH624bgvA3Ieau5g9La7wgnjPuUl/A/PKbMT7Va+nvanyuCN UjUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718285640; x=1718890440; 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=HwIVZXZmYkfW5n9HtGd3ZXVuwVjT6nR+qARClD4uLyE=; b=lWzEus/DvCy0CcTKLMhBDb3EW5RpqZtv0YSsZWSXIxl3T4oWpFo7kMW3fTl3gW8pu0 HBmqu3rHvaXQTqnqhau9EFgQd0OuZq9egOoQXjdr/3yzSvNUGVFp0vUArhIDSgap14LD GqgqngQpv+rIC64QWOL4s1l2+rn6VhPIssrjEZVKt0sHbnPoIdgtJ6rAGSrWF7RX3qMl RU38nm94i4c+G2VwAfAJDmBb46QU8BFM/gGHrOORFCgd2RjjhR+EQtB+C0z5mi2t63J6 jWXkNtU/MluJlD+2hQX9WECglFfzQiODnplmzDC17MeB1kIpkbrQzytqFIC+cfxt12tf VpQg== X-Gm-Message-State: AOJu0Yy7iBQ+eFwaP1HJ0XAgUhQPSipeV1cYN2nJo3BUvUwrJ+BIAO18 u10HnOBGJRkXIcB3LPBO/LPkuEgkTz9ZIQx6XqaNtrV8SAYhnoONyySvqaK+vl1FMHwipOhx394 = X-Google-Smtp-Source: AGHT+IHBKF5vVVAszUsuVxm+zZP+k2Fy5lVRUBXr0/2jRvTbs5VOOCDC5pB8P+Y9i0gS4PtRbcb5+Q== X-Received: by 2002:a05:600c:a54:b0:422:7a16:6986 with SMTP id 5b1f17b1804b1-422863b458fmr48293625e9.9.1718285640135; Thu, 13 Jun 2024 06:34:00 -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-422870e9145sm62391955e9.22.2024.06.13.06.33.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 06:33:59 -0700 (PDT) From: =?utf-8?q?Marc_Poulhi=C3=A8s?= To: gcc-patches@gcc.gnu.org Cc: Eric Botcazou Subject: [COMMITTED 13/30] ada: Fix oversight in latest finalization fix Date: Thu, 13 Jun 2024 15:33:19 +0200 Message-ID: <20240613133338.1809385-13-poulhies@adacore.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240613133338.1809385-1-poulhies@adacore.com> References: <20240613133338.1809385-1-poulhies@adacore.com> 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.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org From: Eric Botcazou The Defining_Identifier of a renaming may be a E_Constant in the context. gcc/ada/ PR ada/114710 * exp_util.adb (Find_Renamed_Object): Recurse for any renaming. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/exp_util.adb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb index bf95b0e13c8..6e2168a80e9 100644 --- a/gcc/ada/exp_util.adb +++ b/gcc/ada/exp_util.adb @@ -8881,7 +8881,7 @@ package body Exp_Util is -- Recurse if Ren_Obj is itself a renaming if Present (Ren_Obj) - and then Ekind (Ren_Obj) = E_Variable + and then Ekind (Ren_Obj) in E_Constant | E_Variable and then Present (Renamed_Object (Ren_Obj)) then return Find_Renamed_Object (Declaration_Node (Ren_Obj)); From patchwork Thu Jun 13 13:33:20 2024 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: 1947412 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=MwQC4Pfk; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W0NnQ59W4z1ydW for ; Thu, 13 Jun 2024 23:39:54 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B15FA3882648 for ; Thu, 13 Jun 2024 13:39:52 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) by sourceware.org (Postfix) with ESMTPS id AF2D1388264D for ; Thu, 13 Jun 2024 13:34:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AF2D1388264D 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 AF2D1388264D Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::130 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718285647; cv=none; b=FFhi32PDOU2OacLrDRdNsbN3dDPNIz5V5xnIolxzFaWt7a9IBh3HQFkU88NcrqUlseTh5uu2eoOn/bif8lfglqYTx3YmCmaRnlssBlknspUWOG8E2GdPbV0619xVFGLkzduD+KiKvLRwQ8peWe6CkRSOgKep15+3ns13tKmTJLg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718285647; c=relaxed/simple; bh=NpTTQklr2skYGh/KBTjUS8BRI2xrPwZKkoZPiV2Kfxs=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=lLTgkPzJOmcV4bJxaF5HUpVc84u9HMnB7ix/l122jYFrgcTr+eP7PbRXAfuGommiBB3VHFUKozGsI1Oj+OA9EUbt50jB26gfqzSQQI9VPgAPsnRfDVbfLRWAsSvU8HM/l5wH3XMwLcGpzX2gBYfLIwbBftPuk+7sB+0hLU4WcEs= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-52c819f6146so1566951e87.1 for ; Thu, 13 Jun 2024 06:34:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1718285641; x=1718890441; 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=vydKsrsEWZEqTTEopeyfvujQFVZqh1EAkqnKo3mu+Qc=; b=MwQC4PfkLXK1tns0eswozfuqA0UaYr4DljdCyGW6335BF1a42O9WuD/c2ESamCZIL9 bzzfTOd2XCBNwhkzL5KSEaObxmGBLZUAEYg+CgfNBpe/J2GijcAvGih5srvyFo54tlv0 CXklaAKPz12owgCX5wETf+85PZnxrPU0KUNzCSulCkhCCCFkqZo9fIKkuk3woDWeUDRP 6ZYIih7WWesPpr2BZESqVjY2XpAZWerrjvulJLyoaM0A9sK1NYrJi2wBzoS0j052Yn0+ Trf736/TvDzI1wTHl5ltL1HsLMlIU/T1z0Vvlk0LT3jMnLCzqOZa5WjatNtVDxg9HH9A F0Bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718285641; x=1718890441; 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=vydKsrsEWZEqTTEopeyfvujQFVZqh1EAkqnKo3mu+Qc=; b=tPwitqR5XOaEJITzMUnbJkdWZSI2bHBNCNNDRoxZYJVr6FZaR+CbYTNQfltOELBdVc E1wiTXcMvNU3UJuHV38T+RaTdncnC+vbRh0urabn04YlFNiwrUvkhCKbcn3KeewFsZwt FjcWOq5Upb78JWhMmGZyO+G+WX0PWZObkiKrhJ81oZgKp/HsNs5LKJYJZqSivTad4+j7 N301T66brSdXDJUiqvYJ5pqmCjzZYCaJZhGrLRoA6DugIEVaJB+NfAyWptx3SI55w6i0 ICZ6jI2nN2YTtIp7H+ICk7157onnk9kXoJG8XQQnQcVJzRixYeqrYHzBaCq9qBV3pbr5 eQkg== X-Gm-Message-State: AOJu0YyDshGNomiB0gQvVTxJsFwKSws8B0Z32O6rpk1GvvKiPJcSTk0g PnrFpYWdU36oWa2sCnzzibZWqJuTFQmEKNoMGVx7PU1YSkayUWUQsEGHoOWom6w6tvvPugeVwPk = X-Google-Smtp-Source: AGHT+IGHg8d2ibwP7K7tXfSsIqktZTwjQ5uxfCYls5PNyOBYjv7LK4NV88lARpor5a1usEonHXk8GQ== X-Received: by 2002:ac2:42c7:0:b0:52c:8aa6:4e9c with SMTP id 2adb3069b0e04-52c9a406bebmr3180654e87.65.1718285640922; Thu, 13 Jun 2024 06:34:00 -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-422870e9145sm62391955e9.22.2024.06.13.06.34.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 06:34:00 -0700 (PDT) From: =?utf-8?q?Marc_Poulhi=C3=A8s?= To: gcc-patches@gcc.gnu.org Cc: Ronan Desplanques Subject: [COMMITTED 14/30] ada: Fix expansion of protected subprogram bodies Date: Thu, 13 Jun 2024 15:33:20 +0200 Message-ID: <20240613133338.1809385-14-poulhies@adacore.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240613133338.1809385-1-poulhies@adacore.com> References: <20240613133338.1809385-1-poulhies@adacore.com> MIME-Version: 1.0 X-Spam-Status: No, score=-13.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_ASCII_DIVIDERS, 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.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org From: Ronan Desplanques System.Tasking.Protected_Objects.Lock can raise exceptions, but that wasn't taken into account by the expansion of protected subprogram bodies before this patch. More precisely, there were cases where calls to System.Tasking.Initialization.Abort_Undefer were incorrectly omitted. This patch fixes this. gcc/ada/ * exp_ch7.adb (Build_Cleanup_Statements): Adapt to changes made to Build_Protected_Subprogram_Call_Cleanup. * exp_ch9.adb (Make_Unlock_Statement, Wrap_Unprotected_Call): New functions. (Build_Protected_Subprogram_Body): Fix resource management in generated code. (Build_Protected_Subprogram_Call_Cleanup): Make use of newly introduced Make_Unlock_Statement. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/exp_ch7.adb | 37 +------ gcc/ada/exp_ch9.adb | 228 +++++++++++++++++++++++++++----------------- 2 files changed, 147 insertions(+), 118 deletions(-) diff --git a/gcc/ada/exp_ch7.adb b/gcc/ada/exp_ch7.adb index 3583ed3138f..b34b4c967fb 100644 --- a/gcc/ada/exp_ch7.adb +++ b/gcc/ada/exp_ch7.adb @@ -1318,41 +1318,12 @@ package body Exp_Ch7 is Append_To (Stmts, Build_Runtime_Call (Loc, RE_Complete_Master)); end if; - -- Add statements to unlock the protected object parameter and to - -- undefer abort. If the context is a protected procedure and the object - -- has entries, call the entry service routine. - - -- NOTE: The generated code references _object, a parameter to the - -- procedure. + -- Add statements to undefer abort. elsif Is_Protected_Subp_Body then - declare - Spec : constant Node_Id := Parent (Corresponding_Spec (N)); - Conc_Typ : Entity_Id := Empty; - Param : Node_Id; - Param_Typ : Entity_Id; - - begin - -- Find the _object parameter representing the protected object - - Param := First (Parameter_Specifications (Spec)); - loop - Param_Typ := Etype (Parameter_Type (Param)); - - if Ekind (Param_Typ) = E_Record_Type then - Conc_Typ := Corresponding_Concurrent_Type (Param_Typ); - end if; - - exit when No (Param) or else Present (Conc_Typ); - Next (Param); - end loop; - - pragma Assert (Present (Param)); - pragma Assert (Present (Conc_Typ)); - - Build_Protected_Subprogram_Call_Cleanup - (Specification (N), Conc_Typ, Loc, Stmts); - end; + if Abort_Allowed then + Append_To (Stmts, Build_Runtime_Call (Loc, RE_Abort_Undefer)); + end if; -- Add a call to Expunge_Unactivated_Tasks for dynamically allocated -- tasks. Other unactivated tasks are completed by Complete_Task or diff --git a/gcc/ada/exp_ch9.adb b/gcc/ada/exp_ch9.adb index 4de253ab6e8..890bd038c5b 100644 --- a/gcc/ada/exp_ch9.adb +++ b/gcc/ada/exp_ch9.adb @@ -442,6 +442,15 @@ package body Exp_Ch9 is -- Determine whether Id is a function or a procedure and is marked as a -- private primitive. + function Make_Unlock_Statement + (Prot_Type : E_Protected_Type_Id; + Op_Spec : N_Subprogram_Specification_Id; + Loc : Source_Ptr) return N_Procedure_Call_Statement_Id; + -- Build a statement that is suitable to unlock an object of type Prot_Type + -- after having performed a protected operation on it. Prot_Type and + -- Op_Spec are used to determine which unlocking subprogram to call, and + -- whether to serve entries before unlocking. + function Null_Statements (Stats : List_Id) return Boolean; -- Used to check DO-END sequence. Checks for equivalent of DO NULL; END. -- Allows labels, and pragma Warnings/Unreferenced in the sequence as well @@ -496,6 +505,18 @@ package body Exp_Ch9 is -- a rescheduling is required, so this optimization is not allowed. This -- function returns True if the optimization is permitted. + function Wrap_Unprotected_Call + (Call : Node_Id; + Prot_Type : E_Protected_Type_Id; + Op_Spec : N_Subprogram_Specification_Id; + Loc : Source_Ptr) return N_Block_Statement_Id; + -- Wrap Call into a block statement with a cleanup procedure set up to + -- release the lock on a protected object of type Prot_Type. Call must be + -- a statement that represents the inner and unprotected execution of the + -- body of a protected operation. Op_Spec must be the spec of that + -- protected operation. This is a subsidiary subprogram of + -- Build_Protected_Subprogram_Body. + ----------------------------- -- Actual_Index_Expression -- ----------------------------- @@ -3849,16 +3870,6 @@ package body Exp_Ch9 is Lock_Kind := RE_Lock; end if; - -- Wrap call in block that will be covered by an at_end handler - - if Might_Raise then - Unprot_Call := - Make_Block_Statement (Loc, - Handled_Statement_Sequence => - Make_Handled_Sequence_Of_Statements (Loc, - Statements => New_List (Unprot_Call))); - end if; - -- Make the protected subprogram body. This locks the protected -- object and calls the unprotected version of the subprogram. @@ -3889,18 +3900,24 @@ package body Exp_Ch9 is Name => Lock_Name, Parameter_Associations => New_List (Object_Parm)); - if Abort_Allowed then - Stmts := New_List ( - Build_Runtime_Call (Loc, RE_Abort_Defer), - Lock_Stmt); - - else - Stmts := New_List (Lock_Stmt); - end if; + Stmts := (if Abort_Allowed then + New_List (Build_Runtime_Call (Loc, RE_Abort_Defer)) + else + New_List); if Might_Raise then + Unprot_Call := Wrap_Unprotected_Call + (Unprot_Call, Pid, Op_Spec, Loc); + + Unprot_Call := + Make_Block_Statement (Loc, + Handled_Statement_Sequence => + Make_Handled_Sequence_Of_Statements (Loc, + Statements => New_List (Lock_Stmt, Unprot_Call))); + Append (Unprot_Call, Stmts); else + Append (Lock_Stmt, Stmts); if Nkind (Op_Spec) = N_Function_Specification then Pre_Stmts := Stmts; Stmts := Empty_List; @@ -4022,74 +4039,10 @@ package body Exp_Ch9 is Loc : Source_Ptr; Stmts : List_Id) is - Nam : Node_Id; - + Unlock_Stmt : constant N_Procedure_Call_Statement_Id := + Make_Unlock_Statement (Conc_Typ, Op_Spec, Loc); begin - -- If the associated protected object has entries, the expanded - -- exclusive protected operation has to service entry queues. In - -- this case generate: - - -- Service_Entries (_object._object'Access); - - if (Nkind (Op_Spec) = N_Procedure_Specification - or else - (Nkind (Op_Spec) = N_Function_Specification - and then - Has_Enabled_Aspect - (Conc_Typ, Aspect_Exclusive_Functions))) - and then Has_Entries (Conc_Typ) - then - case Corresponding_Runtime_Package (Conc_Typ) is - when System_Tasking_Protected_Objects_Entries => - Nam := New_Occurrence_Of (RTE (RE_Service_Entries), Loc); - - when System_Tasking_Protected_Objects_Single_Entry => - Nam := New_Occurrence_Of (RTE (RE_Service_Entry), Loc); - - when others => - raise Program_Error; - end case; - - Append_To (Stmts, - Make_Procedure_Call_Statement (Loc, - Name => Nam, - Parameter_Associations => New_List ( - Make_Attribute_Reference (Loc, - Prefix => - Make_Selected_Component (Loc, - Prefix => Make_Identifier (Loc, Name_uObject), - Selector_Name => Make_Identifier (Loc, Name_uObject)), - Attribute_Name => Name_Unchecked_Access)))); - - else - -- Generate: - -- Unlock (_object._object'Access); - - case Corresponding_Runtime_Package (Conc_Typ) is - when System_Tasking_Protected_Objects_Entries => - Nam := New_Occurrence_Of (RTE (RE_Unlock_Entries), Loc); - - when System_Tasking_Protected_Objects_Single_Entry => - Nam := New_Occurrence_Of (RTE (RE_Unlock_Entry), Loc); - - when System_Tasking_Protected_Objects => - Nam := New_Occurrence_Of (RTE (RE_Unlock), Loc); - - when others => - raise Program_Error; - end case; - - Append_To (Stmts, - Make_Procedure_Call_Statement (Loc, - Name => Nam, - Parameter_Associations => New_List ( - Make_Attribute_Reference (Loc, - Prefix => - Make_Selected_Component (Loc, - Prefix => Make_Identifier (Loc, Name_uObject), - Selector_Name => Make_Identifier (Loc, Name_uObject)), - Attribute_Name => Name_Unchecked_Access)))); - end if; + Append_To (Stmts, Unlock_Stmt); -- Generate: -- Abort_Undefer; @@ -14495,6 +14448,66 @@ package body Exp_Ch9 is Parameter_Associations => Args); end Make_Task_Create_Call; + --------------------------- + -- Make_Unlock_Statement -- + --------------------------- + + function Make_Unlock_Statement + (Prot_Type : E_Protected_Type_Id; + Op_Spec : N_Subprogram_Specification_Id; + Loc : Source_Ptr) return N_Procedure_Call_Statement_Id + is + Nam : constant N_Identifier_Id := + -- If the associated protected object has entries, the expanded + -- exclusive protected operation has to service entry queues. + + (if (Nkind (Op_Spec) = N_Procedure_Specification + or else + (Nkind (Op_Spec) = N_Function_Specification + and then + Has_Enabled_Aspect + (Prot_Type, Aspect_Exclusive_Functions))) + and then Has_Entries (Prot_Type) + then + (case Corresponding_Runtime_Package (Prot_Type) is + when System_Tasking_Protected_Objects_Entries => + New_Occurrence_Of (RTE (RE_Service_Entries), Loc), + + when System_Tasking_Protected_Objects_Single_Entry => + New_Occurrence_Of (RTE (RE_Service_Entry), Loc), + + when others => + raise Program_Error) + + -- Otherwise, unlocking the protected object is sufficient. + + else + (case Corresponding_Runtime_Package (Prot_Type) is + when System_Tasking_Protected_Objects_Entries => + New_Occurrence_Of (RTE (RE_Unlock_Entries), Loc), + + when System_Tasking_Protected_Objects_Single_Entry => + New_Occurrence_Of (RTE (RE_Unlock_Entry), Loc), + + when System_Tasking_Protected_Objects => + New_Occurrence_Of (RTE (RE_Unlock), Loc), + + when others => + raise Program_Error)); + begin + return Make_Procedure_Call_Statement + (Loc, + Name => Nam, + Parameter_Associations => + New_List ( + Make_Attribute_Reference (Loc, + Prefix => + Make_Selected_Component (Loc, + Prefix => Make_Identifier (Loc, Name_uObject), + Selector_Name => Make_Identifier (Loc, Name_uObject)), + Attribute_Name => Name_Unchecked_Access))); + end Make_Unlock_Statement; + ------------------------------ -- Next_Protected_Operation -- ------------------------------ @@ -14861,4 +14874,49 @@ package body Exp_Ch9 is end case; end Trivial_Accept_OK; + --------------------------- + -- Wrap_Unprotected_Call -- + --------------------------- + + function Wrap_Unprotected_Call + (Call : Node_Id; + Prot_Type : E_Protected_Type_Id; + Op_Spec : N_Subprogram_Specification_Id; + Loc : Source_Ptr) return N_Block_Statement_Id + is + Body_Id : constant N_Defining_Identifier_Id := + Make_Defining_Identifier (Loc, Name_Find ("_unlock")); + + Unlock_Body : constant N_Subprogram_Body_Id := + Make_Subprogram_Body + (Loc, + Specification => + Make_Procedure_Specification (Loc, Defining_Unit_Name => Body_Id), + Handled_Statement_Sequence => + Make_Handled_Sequence_Of_Statements + (Loc, Statements => New_List + (Make_Unlock_Statement (Prot_Type, Op_Spec, Loc)))); + + Decls : constant List_Id := New_List (Unlock_Body); + + HSS : constant N_Handled_Sequence_Of_Statements_Id := + Make_Handled_Sequence_Of_Statements + (Loc, Statements => New_List (Call), + At_End_Proc => New_Occurrence_Of (Body_Id, Loc)); + + Block_Statement : constant N_Block_Statement_Id := + Make_Block_Statement + (Loc, Declarations => Decls, + Handled_Statement_Sequence => + HSS); + + begin + if Debug_Generated_Code then + Set_Debug_Info_Needed (Body_Id); + end if; + + Set_Acts_As_Spec (Unlock_Body); + + return Block_Statement; + end Wrap_Unprotected_Call; end Exp_Ch9; From patchwork Thu Jun 13 13:33:21 2024 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: 1947408 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=LQV+5k3L; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W0Nlv65h9z1ydW for ; Thu, 13 Jun 2024 23:38:35 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 284A6388265E for ; Thu, 13 Jun 2024 13:38:34 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by sourceware.org (Postfix) with ESMTPS id D82CF3882123 for ; Thu, 13 Jun 2024 13:34:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D82CF3882123 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 D82CF3882123 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::32a ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718285646; cv=none; b=TsUGKMpmQP7nj+3qHogt/zDRkViLyACnNQIaPQ+7POjIq3Bg4ZcMtPKP0iFzDxx9OUdfGWJF/LYONU3WvNWPSGDTF/KhZq2qNN/GP6trf7oUudHj0+mVVydM3ZxjafhDil6doQg3V85lXriHy/EIeK2Y24Dg+NLKCh3tGuODdaM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718285646; c=relaxed/simple; bh=BaJU6xPVXmDL3bERbV7FcuoVU7waxqj+5HjXQtLjbsQ=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=a0sksTn+5sa30dktqtSax0H2J773VyBwFknw9ZefMevBbA8vdWzcz55LjTXs6Hv8akqWXyqELHtOcdP1g5t4Q1GWRE4a4wHkLKWAqnG3d3FEe7L+gAXo91A2HuN884ff7NCq7rBlNy960JrFSDflp10B1jfkCOSw1zyWH9NpGVo= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-421757d217aso11951035e9.3 for ; Thu, 13 Jun 2024 06:34:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1718285641; x=1718890441; 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=wg0lagRvCtBpiWx09BI7p99Vt3eYMJwuEWgNFyLtT0U=; b=LQV+5k3LEIs2caiOYeGlVA+Wixbe/lbwW3NDABW767Lisy4MiDJ0TPG8KjYV8KRsZS 7D6Bg0zoSsWariS4ReEX1KCyja9TQDnDe1OrfJE7GWXENRDMZr0dFNkaoWg9WnDQGzdo AoEqTxiDaaH0AAHs96b34x8gkug0FyuzzUamBAi3G9hwkocKq0sOpSn/QgDA2oyubprQ oIkJlRSQHd+M6O9FzlmwKmDI4/L9RDtpCtZdtfl5LSdxyUq7hepvTVeKYt2euW1d+tfj XhHXJMly+I0Up1NOwFaJfHUNYHTFOmV4zk3t4JcpC3Pq2HShcTDNhoKfwMSMVuG6NJgr l1GA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718285641; x=1718890441; 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=wg0lagRvCtBpiWx09BI7p99Vt3eYMJwuEWgNFyLtT0U=; b=VPgGjHn9Y+Jc8Qbm6otQ0ecCiEz/Mzf7p/vmd5LiuJgVdSRxcHQmD0Mn00ZHXypsbq GsKCnmP6K5TeIblaq90b2mI5ZGR5zjstUIbcrgkYUdZfupiTcHEjZvJOd60FaS2+e+l7 aMQJGZYHWBNZBXd0tYp1gVTimNYivSpK9vaSI32lRx+2+4DCpk2Xey2QPGxjx3OkWA05 +fQE0+PLTWhB83q5HKvPEEGp58YYCJ0Jogsd2MunDooUjsJQcr4LqQyfSXNnbJR1owc4 60UFw0zvCbCq7+PVZVXPKdxqVQ6s0UBViDlGmT9MICSIisNllK0DX9aLc4tUxI17+QKN 9mKA== X-Gm-Message-State: AOJu0Yw2ELd7BcCWHEF3JzXCuzsUFyDDtvp++jbDgfI1XkpRcLmlZdBs bhGbfsKO7KjmtU/ob5hfTaO58CsnB6VzzSwW1tje7gdCu0kTwG6jvRYUkUDDQrCcpuBd6BYtqOI = X-Google-Smtp-Source: AGHT+IE7IF8DXAf3eDKuC3pu61jTLT+GA9Lu6qxv9sjBwgNPPQkwuozIIMD2tKLXHbd8BL2SNBa2SA== X-Received: by 2002:a05:600c:4590:b0:420:78f:3f9b with SMTP id 5b1f17b1804b1-422867bfe49mr51700405e9.37.1718285641748; Thu, 13 Jun 2024 06:34:01 -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-422870e9145sm62391955e9.22.2024.06.13.06.34.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 06:34:01 -0700 (PDT) From: =?utf-8?q?Marc_Poulhi=C3=A8s?= To: gcc-patches@gcc.gnu.org Cc: Steve Baird Subject: [COMMITTED 15/30] ada: Fix Super attribute documentation Date: Thu, 13 Jun 2024 15:33:21 +0200 Message-ID: <20240613133338.1809385-15-poulhies@adacore.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240613133338.1809385-1-poulhies@adacore.com> References: <20240613133338.1809385-1-poulhies@adacore.com> 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.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org From: Steve Baird The GNAT-defined Super attribute was formerly disallowed for an object of a derived tagged type having an abstract parent type. This rule has been relaxed; an abstract parent type is now permitted as long as it is not an interface type. Update the GNAT RM accordingly. gcc/ada/ * doc/gnat_rm/implementation_defined_attributes.rst: Update Super attribute documentation. * gnat_rm.texi: Regenerate. * gnat_ugn.texi: Regenerate. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/doc/gnat_rm/implementation_defined_attributes.rst | 2 +- gcc/ada/gnat_rm.texi | 2 +- gcc/ada/gnat_ugn.texi | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gcc/ada/doc/gnat_rm/implementation_defined_attributes.rst b/gcc/ada/doc/gnat_rm/implementation_defined_attributes.rst index 728d63a8e92..877d043f42e 100644 --- a/gcc/ada/doc/gnat_rm/implementation_defined_attributes.rst +++ b/gcc/ada/doc/gnat_rm/implementation_defined_attributes.rst @@ -1239,7 +1239,7 @@ The ``Super`` attribute can be applied to objects of tagged types in order to obtain a view conversion to the most immediate specific parent type. It cannot be applied to objects of types without any ancestors, or types whose -immediate parent is abstract. +immediate parent is an interface type. .. code-block:: ada diff --git a/gcc/ada/gnat_rm.texi b/gcc/ada/gnat_rm.texi index 1e6fb093672..e8fa3079e47 100644 --- a/gcc/ada/gnat_rm.texi +++ b/gcc/ada/gnat_rm.texi @@ -11712,7 +11712,7 @@ The @code{Super} attribute can be applied to objects of tagged types in order to obtain a view conversion to the most immediate specific parent type. It cannot be applied to objects of types without any ancestors, or types whose -immediate parent is abstract. +immediate parent is an interface type. @example type T1 is tagged null record; diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi index 73f496fcdab..04e181bcb24 100644 --- a/gcc/ada/gnat_ugn.texi +++ b/gcc/ada/gnat_ugn.texi @@ -29645,8 +29645,8 @@ to permit their use in free software. @printindex ge -@anchor{gnat_ugn/gnat_utility_programs switches-related-to-project-files}@w{ } @anchor{d1}@w{ } +@anchor{gnat_ugn/gnat_utility_programs switches-related-to-project-files}@w{ } @c %**end of body @bye From patchwork Thu Jun 13 13:33:22 2024 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: 1947417 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=VUUuZ/Ed; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W0Npn6CBjz20Xd for ; Thu, 13 Jun 2024 23:41:05 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2F3C83882052 for ; Thu, 13 Jun 2024 13:41:04 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) by sourceware.org (Postfix) with ESMTPS id AC58F3882052 for ; Thu, 13 Jun 2024 13:34:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AC58F3882052 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 AC58F3882052 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::331 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718285648; cv=none; b=gStllDWZR81acc0cOKpoJRbvIEp6Hq8cBJEhm18OfNGJRl7NJs9Y2gr9t215p79Ylvq6oj4+igGOtmJCvhemyewILX1Eau6B1jNlJ0vRc12q8Ee7I6jEDl2Vt0e0WAI69AjKOZSEEF5l3rfgcTeyBxcT84oE3TMzg0KDUOMUGUw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718285648; c=relaxed/simple; bh=tb5M3X1xgbT+MG2GTdK+fP/2onyNr1/YM5Q/vV4sbUc=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=W8J5Vzz80j4vMNja0n7WsDFTpkIa59LsXAbqvBkMGTRUdWf3kBS2crbuhNPC2zOElFiZZplks3vXvZlRl8GLqEhJo+1ECZIhc8+QkdPW+TgQG9BQJ0a40CsgUfYps6nBQYhYrwhpn3l6zZIW6XG8QGqQLlz01MfcODiLQ7DJgmM= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-4217926991fso9982315e9.3 for ; Thu, 13 Jun 2024 06:34:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1718285642; x=1718890442; 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=wFmek1K3CtWnKlIYTjKjpkV7mNa7QgNoJzo4FXcwt5c=; b=VUUuZ/EdmBD2CoA5Wf/ReKmWCFpd/BYWZFGPWwu7wsG0yDRMsRglCorKlNfMEIRAb8 0ARHVpWpEeEgGqefJZFmt4xxkoicmcp7GziRIrAmqv9O+Hx3JOpIvsquQBE0ICd0ceO8 hvV0QtAsBchRG6KsZCNXpJtXmcJL31yrERgkTUpeO3EFID672pp3gXz7IfD9opwtIVG8 E7lr6+HR17yKK6JNxz0+Wffkya2AveF++YH3lVmpi542muYC9GQW3Jk1fVosFkQuOYU6 oT7P4AKTBay73H/n25vvyoyeJB0cD7BE2dyhPQaQ1wa6q9+7g4daAnigddJ5JTxC9uaF WpRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718285642; x=1718890442; 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=wFmek1K3CtWnKlIYTjKjpkV7mNa7QgNoJzo4FXcwt5c=; b=fNE4yU1JGKj/0+D3YZxxq6zE/UgsT6J4+i8BpPxXjztYTHwsQLwD6RePSE3ZT1h2ci DWa9Oa/P7eRyVTxv5kJ+KmE9+CH2uYIRShSk0ASQeFVOkzxQvUh+Dmdt1Ln9f1MvzBBA 3kUiUe7C4pW4ec0NTCjNtGWrSQW6olRNHBm7da9a5LIeJszlglY5W2y2s/rTwiLOPXes frZEW7tKuHtTno52Q6YRqZivBdLEyP2IDpfCMCe/IPedAu21tU/Pl/ajeO4SRoiPxJ6z UHTfXBVck/snpY4YLDlLQZk5NzSiTx2j7L+kto+CpYVVmila31zN/EXWjTD3JyOyyvGF sSKw== X-Gm-Message-State: AOJu0Yy5iMg5Lo6u8z7flb3TsYzAAQAW+uB+DzIkF4PxwSb2gCuRg9tg 7mlTowicBc7yoNZsFXa9Q15jflVOJWgZFMOKyRJ9CccKFHtD9fW8jgRWl2Iiu0x+rZAEXlPYqOw = X-Google-Smtp-Source: AGHT+IHuRupQtJ3FTsTPocetCfCFGgpIyjdT7nMKmBq4SkdL1ULq+9myNLYTgKakoJIjlOSDa7O3ow== X-Received: by 2002:a05:600c:3b15:b0:422:4fcd:d4b3 with SMTP id 5b1f17b1804b1-422866bfc37mr37236925e9.37.1718285642476; Thu, 13 Jun 2024 06:34:02 -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-422870e9145sm62391955e9.22.2024.06.13.06.34.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 06:34:02 -0700 (PDT) From: =?utf-8?q?Marc_Poulhi=C3=A8s?= To: gcc-patches@gcc.gnu.org Cc: Javier Miranda Subject: [COMMITTED 16/30] ada: Interfaces order disables class-wide prefix notation calls Date: Thu, 13 Jun 2024 15:33:22 +0200 Message-ID: <20240613133338.1809385-16-poulhies@adacore.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240613133338.1809385-1-poulhies@adacore.com> References: <20240613133338.1809385-1-poulhies@adacore.com> 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.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org From: Javier Miranda When the first formal parameter of a subprogram is a class-wide interface type (or an access to a class-wide interface type), changing the order of the interface types implemented by a type declaration T enables or disables the ability to use the prefix notation to call it with objects of type T. When the call is disabled the compiler rejects it reporting an error. gcc/ada/ * sem_ch4.adb (Traverse_Interfaces): Add missing support for climbing to parents of interface types. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_ch4.adb | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/gcc/ada/sem_ch4.adb b/gcc/ada/sem_ch4.adb index 03364dade9f..b59a56c139b 100644 --- a/gcc/ada/sem_ch4.adb +++ b/gcc/ada/sem_ch4.adb @@ -9805,11 +9805,23 @@ package body Sem_Ch4 is begin Error := False; + -- When climbing through the parents of an interface type, + -- look for acceptable class-wide homonyms associated with + -- the interface type. + + if Is_Interface (Anc_Type) then + Traverse_Homonyms (Anc_Type, Error); + + if Error then + return; + end if; + end if; + Intface := First (Intface_List); while Present (Intface) loop -- Look for acceptable class-wide homonyms associated with the - -- interface. + -- interface type. Traverse_Homonyms (Etype (Intface), Error); @@ -9828,6 +9840,15 @@ package body Sem_Ch4 is Next (Intface); end loop; + + -- For derived interface types continue the search climbing to + -- the parent type. + + if Is_Interface (Anc_Type) + and then Etype (Anc_Type) /= Anc_Type + then + Traverse_Interfaces (Etype (Anc_Type), Error); + end if; end Traverse_Interfaces; -- Start of processing for Try_Class_Wide_Operation From patchwork Thu Jun 13 13:33:23 2024 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: 1947409 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=a1viJiLi; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W0NmQ52T9z1ydW for ; Thu, 13 Jun 2024 23:39:02 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id F2C6F3882060 for ; Thu, 13 Jun 2024 13:39:00 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [IPv6:2a00:1450:4864:20::229]) by sourceware.org (Postfix) with ESMTPS id E15403882053 for ; Thu, 13 Jun 2024 13:34:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E15403882053 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 E15403882053 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::229 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718285657; cv=none; b=x0I0EMW77jexBegBNFaj+05iEQ/ioZcjb4x9nDp3dtv1wxA4gJJPfR3HB6MtAhbqx+XMrqm1/WFTQ+YoTUchuTcfn7nQt5co2qzgPVUQRu4nyJ85ciwR8LJuh4kclUT5OQylg7yV6yp4Y9KRaNmgY4wNI5VPQrBNmJq3Yx64sWY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718285657; c=relaxed/simple; bh=m/wTl7yCzqUPY2Et3v8JV1XjJ09XLD52cu6Ibs9chX8=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=g1LqqGtvTa1ZLKLg4lBomqC6QyuFHSAl7yrKyocxkedCKNTMEFUrc5jdx/IjIs5FuoIGvr6HYrOICSi5fsU2rZ36Yw5adoihqJ/g0tuKE8OUUBgc6X2EF+6CtvfShVMvgKiJIGGu6KONHWIMq3e7l0MwPlo5VYRIQQpa/57Posc= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-lj1-x229.google.com with SMTP id 38308e7fff4ca-2ebe0a81dc8so11066671fa.2 for ; Thu, 13 Jun 2024 06:34:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1718285643; x=1718890443; 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=oVFZp0f4xRasSAjuNxf1MM1bTU2sTUZPhUTjX5K+ph0=; b=a1viJiLix1OVbzuJTKy6j51kfBF4ZLSKWjTOcxrn9lcGKB87lfwbjuutuOO1vLruZf zhYwkq+KRHKQyO6qvfE6a6DeMwsdBNhsPa1Qb4hZm2TA4h+tPg+0Ljm+BA9nFkq3mzpP HGYGsXok+GIvO3RRzZNQyR6MNA0IBqzbSgc56vzX5cS3B6SwPphgMhrQ6kgcPFb8JHNg Pj2+m8gKjCSrmecWjNvPmBDeDNhH+5Wr2QYda16317BTFyaXgDj4sqygrZOvonGLdASF jcSuKabM0X+af7e3TXJveuaMm6HB27b0NhXNreZdJUsWLixO33SnMQ8nQj7qpjfHEKxt 5gbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718285643; x=1718890443; 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=oVFZp0f4xRasSAjuNxf1MM1bTU2sTUZPhUTjX5K+ph0=; b=tqYOuQdu3xHXd+qd376J6EMxIbJ2pIZZm/hcdO9xTcY4HVPht9XyFoWb8sE+YcWA3N vH97TO4fYqptfGSJNVSLiN7omlyAabVgoIJTCf0uN2jja0n/ovDaGC/OhDrgrqHMVaPv iQRfSrOfXCO1Hpw5h1Znm4B0V6nFh98bOdmkNDipjQdGptX2U47TJKnyfa8S8j0TWKLa wTfpgYOiVXWQNP3215Xo0UnOG4J1MU3XKE3xOsCSw/iCZM22oOSgMWpUgpRvQtwHyGdS EAXyfTmmyTZLRgB7Mr9jH8sWYo/UlvZlr54fruxAYnmIZN31ukHGEKtwvHKHzUPsICdb QG9Q== X-Gm-Message-State: AOJu0YwQX8pjlKS0VcHHv+S3CSgYDznYx5iuCE6ah7GJFEghxLxx5MIb zzrm8BEHeGNm59H6dCtCGTG2LCGJylLuup63YmuaWg7GxNrXSXByZE1kywnOn8RrY7RmaaWqpFM = X-Google-Smtp-Source: AGHT+IFkztpK2Rgwi2zeXLr0i1D5Dbrq89dYmnIqc/xpnP430we/9ctQiQwQjIcg2nyCQjtL5sFfmA== X-Received: by 2002:a2e:6a16:0:b0:2eb:f365:8745 with SMTP id 38308e7fff4ca-2ebfc8f0f7emr37773901fa.1.1718285643260; Thu, 13 Jun 2024 06:34:03 -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-422870e9145sm62391955e9.22.2024.06.13.06.34.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 06:34:02 -0700 (PDT) From: =?utf-8?q?Marc_Poulhi=C3=A8s?= To: gcc-patches@gcc.gnu.org Cc: Yannick Moy Subject: [COMMITTED 17/30] ada: List subprogram body entities in scopes Date: Thu, 13 Jun 2024 15:33:23 +0200 Message-ID: <20240613133338.1809385-17-poulhies@adacore.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240613133338.1809385-1-poulhies@adacore.com> References: <20240613133338.1809385-1-poulhies@adacore.com> MIME-Version: 1.0 X-Spam-Status: No, score=-13.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_ASCII_DIVIDERS, 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.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org From: Yannick Moy Add entities of kind E_Subprogram_Body to the list of entities associated to a given scope. This ensures that representation information is correctly output for object and type declarations inside these subprogram bodies. This is useful for outputing that information fron the compiler with the switch -gnatR, as well as for getting precise representation information inside GNATprove. Remove ad-hoc code inside repinfo.adb that retrieved this information in only some cases. gcc/ada/ * exp_ch5.adb (Expand_Iterator_Loop_Over_Container): Skip entities of kind E_Subprogram_Body. * repinfo.adb (List_Entities): Remove special case for subprogram bodies. * sem_ch6.adb (Analyze_Subprogram_Body_Helper): List subprogram body entities in the enclosing scope. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/exp_ch5.adb | 8 ++++++- gcc/ada/repinfo.adb | 57 +-------------------------------------------- gcc/ada/sem_ch6.adb | 9 +++++++ 3 files changed, 17 insertions(+), 57 deletions(-) diff --git a/gcc/ada/exp_ch5.adb b/gcc/ada/exp_ch5.adb index f397086d73a..b97e3bb7eee 100644 --- a/gcc/ada/exp_ch5.adb +++ b/gcc/ada/exp_ch5.adb @@ -5351,10 +5351,16 @@ package body Exp_Ch5 is Ent := First_Entity (Cont_Type_Pack); while Present (Ent) loop + + -- Ignore subprogram bodies + + if Ekind (Ent) = E_Subprogram_Body then + null; + -- Get_Element_Access function with one parameter called -- Position. - if Chars (Ent) = Name_Get_Element_Access + elsif Chars (Ent) = Name_Get_Element_Access and then Ekind (Ent) = E_Function and then Present (First_Formal (Ent)) and then Chars (First_Formal (Ent)) = Name_Position diff --git a/gcc/ada/repinfo.adb b/gcc/ada/repinfo.adb index 28e4a642765..7dada5358f7 100644 --- a/gcc/ada/repinfo.adb +++ b/gcc/ada/repinfo.adb @@ -457,34 +457,7 @@ package body Repinfo is Bytes_Big_Endian : Boolean; In_Subprogram : Boolean := False) is - Body_E : Entity_Id; - E : Entity_Id; - - function Find_Declaration (E : Entity_Id) return Node_Id; - -- Utility to retrieve declaration node for entity in the - -- case of package bodies and subprograms. - - ---------------------- - -- Find_Declaration -- - ---------------------- - - function Find_Declaration (E : Entity_Id) return Node_Id is - Decl : Node_Id; - - begin - Decl := Parent (E); - while Present (Decl) - and then Nkind (Decl) /= N_Package_Body - and then Nkind (Decl) /= N_Subprogram_Declaration - and then Nkind (Decl) /= N_Subprogram_Body - loop - Decl := Parent (Decl); - end loop; - - return Decl; - end Find_Declaration; - - -- Start of processing for List_Entities + E : Entity_Id; begin -- List entity if we have one, and it is not a renaming declaration. @@ -609,34 +582,6 @@ package body Repinfo is Next_Entity (E); end loop; - - -- For a package body, the entities of the visible subprograms are - -- declared in the corresponding spec. Iterate over its entities in - -- order to handle properly the subprogram bodies. Skip bodies in - -- subunits, which are listed independently. - - if Ekind (Ent) = E_Package_Body - and then Present (Corresponding_Spec (Find_Declaration (Ent))) - then - E := First_Entity (Corresponding_Spec (Find_Declaration (Ent))); - while Present (E) loop - if Is_Subprogram (E) - and then - Nkind (Find_Declaration (E)) = N_Subprogram_Declaration - then - Body_E := Corresponding_Body (Find_Declaration (E)); - - if Present (Body_E) - and then - Nkind (Parent (Find_Declaration (Body_E))) /= N_Subunit - then - List_Entities (Body_E, Bytes_Big_Endian); - end if; - end if; - - Next_Entity (E); - end loop; - end if; end if; end List_Entities; diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb index 50dac5c4a51..3252af79748 100644 --- a/gcc/ada/sem_ch6.adb +++ b/gcc/ada/sem_ch6.adb @@ -4083,6 +4083,15 @@ package body Sem_Ch6 is else Set_Corresponding_Spec (N, Spec_Id); + -- The body entity is not used for semantics or code generation, + -- but it is attached to the entity list of the enclosing scope + -- to allow listing its entities when outputting representation + -- information. + + if Scope (Spec_Id) /= Standard_Standard then + Append_Entity (Body_Id, Scope (Spec_Id)); + end if; + -- Ada 2005 (AI-345): If the operation is a primitive operation -- of a concurrent type, the type of the first parameter has been -- replaced with the corresponding record, which is the proper From patchwork Thu Jun 13 13:33:24 2024 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: 1947406 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=ZAxtOzWh; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W0NlC0DfKz1ydW for ; Thu, 13 Jun 2024 23:37:59 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4CC4F3882668 for ; Thu, 13 Jun 2024 13:37:57 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by sourceware.org (Postfix) with ESMTPS id 2FC97388206F for ; Thu, 13 Jun 2024 13:34:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2FC97388206F 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 2FC97388206F Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::32a ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718285658; cv=none; b=ukZG3itSKRr/JpFLfDn42e2NK0SyP6CCw8emrnUhaTJjtgLGuXchv3A5aH+JqduPuN9XUXSoNtM0UbpMJ5erxld4yjhSDxqKmMhpKnD9ZyrOoHVptvddL7Oxw3bOhWVfUhzjOuYA92lVFLra+D7FtCSTKAGjGeVAGByBuvCYXVU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718285658; c=relaxed/simple; bh=D/AeLQDt6A1/NwhxweDK7njps5FWdYfYLASS4Laqkpk=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=c0n9bCKmHmmIXG4kb6XQ8JnMdm/xtwKE38HiMs/TDZzB6rHOKpxVh1CMUo2pFmjLfqa36UcNR5SJrm4jk5hz89Ue2QU3/M8OpbBQvw0LX9jRVvLvcIPUhMYwFYCX6M7wwT4Vcrxm1oWopJSpKk+KU8O4GnlpvNeOlylsS8kX/u8= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-42172ab4b60so10554115e9.0 for ; Thu, 13 Jun 2024 06:34:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1718285644; x=1718890444; 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=KFpBQXHco/orKFzDuhOC5mkXKNWHRH5aLan0ovrYSak=; b=ZAxtOzWhla8g+SZlDcXSdrmGZpJHeg5Lbh3GbfW03XghfrygQvPC72cb79prZ9u9iq sKWlqRwrWa30CLJczCRehOshIsGvDaWS8gmmUQpvmuOUiuxQTSt0Tx+CrXywtC58NzUq crNQgC8kPvYBjuCDQS1FwQ1A0VjS2jrL61b0XfocmyqbYiilCgl6GddHvdGHXpK9NQIi eI1b5ayWhpYk12drr6/awUiamnLifK22A+pMKMqmEHMDMLlMVGkI+7XIY5oJ1pX92HwD BK+Ed33UQ0hwwBLu6leMd3c1cMmYzotVxrJQsS2M2KCeGOJLOme5aTEGe7hvsgPqmSa6 xRaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718285644; x=1718890444; 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=KFpBQXHco/orKFzDuhOC5mkXKNWHRH5aLan0ovrYSak=; b=tPvmiEtSUOqPLaoBy6Y5/BfXVK2yevoGUqZ6JWHaO7wO4NC4QnnMfGzN5nfIAn/1RN yEDS05itoJHfs18ZC5xTTOJJJO9EeVZ/gsoxaswrom/r9H/0qRL4dtPDS6XWNHzwegH0 /e4yqijpRrBVvqzbdCl2DgsQzldCVPbGI9BU12acRUvNjerluRHFsanrJangBV9ANhKI 0bOIqs10l8/mbC2MiJmFZFCYH3kCFp8bRuPd+ur0PWJafD7vjbgbMJlWuTas11GWFDbI vcBKDrpq0py8PHpcVDzLik5UImLPsSIN86FK0DaT1p/tYSfNXOnzJsYiTwfsNYQD1A9H zWoA== X-Gm-Message-State: AOJu0YwZBCtnnNPhD6w91uF6E8jQaHDRK+2vPTN+O5TONR06wTy0meA6 1jbPEMG38KAELPVkcY+xqvOME+KWdTKg34p0BzDzGbk4y6D0+59Ul9BQrvkFKjkKd8LJoFkTd2c = X-Google-Smtp-Source: AGHT+IGZQj+KYWEo0Tp8+Ky9AkBu16YNoMrBAN7TM6UxgVad5zzkD8W7TjHm7nXZnTn7BLyLmiOAAg== X-Received: by 2002:a05:600c:1d1c:b0:421:f68f:a144 with SMTP id 5b1f17b1804b1-422867beeccmr49946385e9.36.1718285644010; Thu, 13 Jun 2024 06:34:04 -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-422870e9145sm62391955e9.22.2024.06.13.06.34.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 06:34:03 -0700 (PDT) From: =?utf-8?q?Marc_Poulhi=C3=A8s?= To: gcc-patches@gcc.gnu.org Cc: Viljar Indus Subject: [COMMITTED 18/30] ada: Simplify code in Cannot_Inline Date: Thu, 13 Jun 2024 15:33:24 +0200 Message-ID: <20240613133338.1809385-18-poulhies@adacore.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240613133338.1809385-1-poulhies@adacore.com> References: <20240613133338.1809385-1-poulhies@adacore.com> 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.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org From: Viljar Indus gcc/ada/ * inline.adb (Cannot_Inline): Simplify string handling logic. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/inline.adb | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/gcc/ada/inline.adb b/gcc/ada/inline.adb index 8e98fb5ad10..f5c54263515 100644 --- a/gcc/ada/inline.adb +++ b/gcc/ada/inline.adb @@ -2110,6 +2110,11 @@ package body Inline is Is_Serious : Boolean := False; Suppress_Info : Boolean := False) is + Inline_Prefix : constant String := "cannot inline"; + + function Starts_With (S, Prefix : String) return Boolean is + (S (S'First .. S'First + Prefix'Length - 1) = Prefix); + begin -- In GNATprove mode, inlining is the technical means by which the -- higher-level goal of contextual analysis is reached, so issue @@ -2117,20 +2122,15 @@ package body Inline is -- subprogram, rather than failure to inline it. if GNATprove_Mode - and then Msg (Msg'First .. Msg'First + 12) = "cannot inline" + and then Starts_With (Msg, Inline_Prefix) then declare - Len1 : constant Positive := - String'("cannot inline")'Length; - Len2 : constant Positive := - String'("info: no contextual analysis of")'Length; - - New_Msg : String (1 .. Msg'Length + Len2 - Len1); + Msg_Txt : constant String := + Msg (Msg'First + Inline_Prefix'Length .. Msg'Last); + New_Msg : constant String := + "info: no contextual analysis of" & Msg_Txt; begin - New_Msg (1 .. Len2) := "info: no contextual analysis of"; - New_Msg (Len2 + 1 .. Msg'Length + Len2 - Len1) := - Msg (Msg'First + Len1 .. Msg'Last); Cannot_Inline (New_Msg, N, Subp, Is_Serious, Suppress_Info); return; end; From patchwork Thu Jun 13 13:33:25 2024 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: 1947407 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=RA214zhF; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W0NlP74gtz1ydW for ; Thu, 13 Jun 2024 23:38:09 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0E8473882121 for ; Thu, 13 Jun 2024 13:38:08 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by sourceware.org (Postfix) with ESMTPS id 37D513882079 for ; Thu, 13 Jun 2024 13:34:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 37D513882079 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 37D513882079 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::32e ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718285657; cv=none; b=aTJTPOaN5LT8gxWT0MMJbrhVhuAOHWK26Ltajj+LaeYZP3NfiYBC6FYykr+gViD1eJg161LCX7RxJpJMRz6VqOz7/NP7rh22iMfwic05O3HIy5Vkx+c2gool57J6+x5vgSEwTLjv/Rj3KVpM5sNIzmoT+WRFTY7N8zODriuoNTo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718285657; c=relaxed/simple; bh=cqffY2Yk7eikBEvKKztmQVLXniiYGfWKujj+/7uXzik=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=Mhv58mB+dseformI9M/XMgX77ylLf0rVfe9Jaa+QRIYiCE9KU1tJ+Bi+HNNXyMsSlBfspoa/ZwBYw3FJMvsn0CP4wOW7bNxxycFYpFDBswpeQuQK1grkWAxRPBaVBH4K+7B74cwTn0Kf9YVCv6oDkiIC9/I+l7JQrQJh8paAVFc= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-42108856c33so13537905e9.1 for ; Thu, 13 Jun 2024 06:34:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1718285645; x=1718890445; 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=DUd/yTkFhxNdq1trEoGxiN3fv7IgweNsFZCVyqSpXKA=; b=RA214zhFVVKJoNcrS56yLyrVBQlGAl4jjvrDqcaUXxCHLA20fvEnBb0hUVEENe0dTW UDWPgGlc0izfGWjdNhyIZLzZepq7XaI/lmKuF8Wze5P4wr2t1OOTSLSdntaCsjVBEAqo e5oOeXhKEhqJAVn/UPUWVvJAtfQjpcwKXthUScccfYqH5UYHdoOKYwT7DSrnROu6yLDn ocAREdafdaPJBMP5aISDjiCg3mjmZzmigax8oIO5oBfN33wdXCX+hzuiowJl9WyqSSPE PU+sDR/0/z3L/UAg7pdk4obsu3Tkexf80JKwXmFQBEXS42pwAZqF1UMR3/aU4VQ0tJ8w ca3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718285645; x=1718890445; 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=DUd/yTkFhxNdq1trEoGxiN3fv7IgweNsFZCVyqSpXKA=; b=KB+O4jfG22YF7v4N7jyC17CzB9dEcbwYjPnxj0hK5C9hqxzZIHTBNUGKX2MUa2MLvO BYKHegqVZ5rTU87dK6rvDwYSMxAkPOvIzkwiJvXhGYKWTssNnpa5PawoXQIan4s5YZn2 PIQOxSDINaWOJNz2CXPOlRu25tq6QPdptwRHFvy3rrAbB9INDYVoaTcV8KW9aBeDAGXL laMZqp3XGKwYQtRAAjaQ12hL71L9kVy8lKLcYRXvJLBB7uoWK0X0VygrOCYxYI0Dth8d o8vYuAqK25F/DNMrebci6QqZ6OdKTvYcF02lzRNN+LiMGraNHp4DuuIaWeUPgk3DPQOY gT+Q== X-Gm-Message-State: AOJu0YzUkPNR6uF2ybEd4pZMl9dPMEYKe+MoUKTC8qHI3pxt3k3mcmEQ 4N8A6626FYPsTNcJW96MLZHCdluHVEwNA8ycS0jK4g2KDNMAo2vi3KQ2bwpTCOD7dtAEX+Nakgo = X-Google-Smtp-Source: AGHT+IEt371lOren32fQ56QolSAPCkFDWDj3ynX7OuagInCqyi6HdndhV0agOInpexjp850p/Kt8ew== X-Received: by 2002:a05:600c:35cf:b0:422:1def:e1ac with SMTP id 5b1f17b1804b1-422b89b1573mr24903155e9.20.1718285644788; Thu, 13 Jun 2024 06:34:04 -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-422870e9145sm62391955e9.22.2024.06.13.06.34.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 06:34:04 -0700 (PDT) From: =?utf-8?q?Marc_Poulhi=C3=A8s?= To: gcc-patches@gcc.gnu.org Cc: Viljar Indus Subject: [COMMITTED 19/30] ada: Convert an info message to a continuation Date: Thu, 13 Jun 2024 15:33:25 +0200 Message-ID: <20240613133338.1809385-19-poulhies@adacore.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240613133338.1809385-1-poulhies@adacore.com> References: <20240613133338.1809385-1-poulhies@adacore.com> 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.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org From: Viljar Indus The info message about the freeze point should be considered a continuation of the error message about the change of visibility after the freeze point. This improves the error layout for formatted error messages with the -gnatdF switch. gcc/ada/ * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): change the info message to a continuation message. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_ch13.adb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb index 32b3333c157..e585336ab0e 100644 --- a/gcc/ada/sem_ch13.adb +++ b/gcc/ada/sem_ch13.adb @@ -11150,9 +11150,10 @@ package body Sem_Ch13 is Error_Msg_NE ("!visibility of aspect for& changes after freeze point", ASN, Ent); + Error_Msg_Sloc := Sloc (Freeze_Node (Ent)); Error_Msg_NE - ("info: & is frozen here, (RM 13.1.1 (13/3))??", - Freeze_Node (Ent), Ent); + ("\& is frozen #, (RM 13.1.1 (13/3))", + ASN, Ent); end if; end Check_Aspect_At_End_Of_Declarations; From patchwork Thu Jun 13 13:33:26 2024 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: 1947414 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=SdtRo8Mb; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W0Nnr2BRTz20Xd for ; Thu, 13 Jun 2024 23:40:16 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 973F23882643 for ; Thu, 13 Jun 2024 13:40:14 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-lj1-x22d.google.com (mail-lj1-x22d.google.com [IPv6:2a00:1450:4864:20::22d]) by sourceware.org (Postfix) with ESMTPS id A7217388212D for ; Thu, 13 Jun 2024 13:34:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A7217388212D 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 A7217388212D Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::22d ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718285657; cv=none; b=YGaZWlg8aB1HtZEzLPYtJuho1ZhcPakTiSxTwMvTRAz7qF4WzOWMLCVUFkecEYr3j2Bj9PB0ha8kIRkSEZxaCXQTZcDf7NPTsrtYZcFwpUvrUDtzhzwcYivyIwBHOm99kXsdy3RSOMsJ7yB3W0G2XuBeU09TeXXIdNXk3KKdwMc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718285657; c=relaxed/simple; bh=F+WDz4MsZklmGKBF72UXTgXwLfX+1CkNhr66Di2bkYA=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=mA00qCqHzB33/ChQNWPQM/1qJLnxl1UakJhsxlDgB3GA8bv5oy+3rihXAeDKNHhhR6l3As+PdTgMEfwZk/xcofwfLTygogvmk0NRbprII3nEiCvUMe45zw5kvOhEWp7N7oouvkHp3ulnflvGdK6VxPtz/8s9xm0YIyo5y9lr2SE= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-lj1-x22d.google.com with SMTP id 38308e7fff4ca-2ebed33cb65so10499281fa.2 for ; Thu, 13 Jun 2024 06:34:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1718285645; x=1718890445; 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=NjtC8xXaCW0osUfnUGz93kGJOMg373YcMbWEU3oucWg=; b=SdtRo8Mb/vAuXG4WIyc285k39Hf91hfLdHfcHhxVe66t2tLsTMML93UfjtcuX+BXX+ zoBhfPq5QuzgvCdotKf/aTvNiY0qRFcAkZPuhgLb42I98fdIPKVkDfKQACYVeI2JT3n+ ptYHYdqRIzgxIOoD5HVTsHh80dP9wDpsr9Dn0Mq/TGms4Wq9haejILe+MtcgFjXwqxKJ BxoqO/WBd6HV/zhnQK5w6xyC5V3ngdAogS7/KgETTvRaVRVA7Pm4gEZ9wEgeQvIxJBML zl1E/vk5y3ErqAI5qD1uV1QD8F2eI+Tp0Nam/bIgbpguGR32K70JXTUy69fsOuNp2ACu uvAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718285645; x=1718890445; 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=NjtC8xXaCW0osUfnUGz93kGJOMg373YcMbWEU3oucWg=; b=tVnx7jfUjPfj4PYj1ljDN+Mrab+JKAhe8OpYXEJdxRVWz8jW4RJyuGc9X1g/lwydmP uSwe4NOGarviawGCUlmgand3hqTh+hjvMnWAoDR+3V8pY60Dxa37P5TQ/pLTRlRdDZjJ 7mrGUa5aNU8sBwz9mIcJvSuOh0QGhASc1HXx+EynXMvBN4D1T1SGelcXgvyCVy6Grbx6 1dttYdU/+RlBv//tb+YIy9xSd0v6aWb3BoTLugG4X5p1eicybRhIw4L68dE9ejne05sh pBW4PVDgDWPP1gR9ZeDZd0QWM2mrQfvn8jiETcx6q2//lnhTnHA1KdP00MNhXKHSjZNn fyYg== X-Gm-Message-State: AOJu0YyUlFYjHPhwI2N6v6CMRWDpu1C7L6PWjkJ0ct3WIDB4zU+eE4RB 2eEHXAcDd2u8enzgKReQZZ9yd/K4TTaVBj9BZq98HdD0hmJhXuEApZ3diiz4z4sDZ8vpLsBi318 = X-Google-Smtp-Source: AGHT+IHchbSbuIbuR5bwVU+vpAy0ZqoB6V4dxpSN6AIwJiw6zDI1hCRxnfTAIp8yHG5Eq6oxq66x0Q== X-Received: by 2002:a05:6512:3b28:b0:52b:8c88:2d6b with SMTP id 2adb3069b0e04-52c9a3b8dedmr4124375e87.11.1718285645579; Thu, 13 Jun 2024 06:34:05 -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-422870e9145sm62391955e9.22.2024.06.13.06.34.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 06:34:05 -0700 (PDT) From: =?utf-8?q?Marc_Poulhi=C3=A8s?= To: gcc-patches@gcc.gnu.org Cc: Viljar Indus Subject: [COMMITTED 20/30] ada: Remove warning insertion characters from info messages Date: Thu, 13 Jun 2024 15:33:26 +0200 Message-ID: <20240613133338.1809385-20-poulhies@adacore.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240613133338.1809385-1-poulhies@adacore.com> References: <20240613133338.1809385-1-poulhies@adacore.com> 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.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org From: Viljar Indus Remove warning insertion characters without switch characters from info messages. gcc/ada/ * par-ch7.adb: Remove warning characters from info message * par-endh.adb: Remove warning characters from info message * sem_res.adb: Remove warning characters from info message Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/par-ch7.adb | 2 +- gcc/ada/par-endh.adb | 2 +- gcc/ada/sem_res.adb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gcc/ada/par-ch7.adb b/gcc/ada/par-ch7.adb index cd535e56bc2..c71e25770f3 100644 --- a/gcc/ada/par-ch7.adb +++ b/gcc/ada/par-ch7.adb @@ -233,7 +233,7 @@ package body Ch7 is if Aspect_Sloc /= No_Location and then not Aspect_Specifications_Present then - Error_Msg_SC ("info: aspect specifications belong here??"); + Error_Msg_SC ("info: aspect specifications belong here"); Move_Aspects (From => Dummy_Node, To => Package_Node); end if; diff --git a/gcc/ada/par-endh.adb b/gcc/ada/par-endh.adb index 0563051894d..0345f8018ca 100644 --- a/gcc/ada/par-endh.adb +++ b/gcc/ada/par-endh.adb @@ -412,7 +412,7 @@ package body Endh is Error_Msg_SC ("misplaced aspects for package declaration"); Error_Msg - ("info: aspect specifications belong here??", Is_Loc); + ("info: aspect specifications belong here", Is_Loc); P_Aspect_Specifications (Empty, Semicolon => True); -- Other cases where aspect specifications are not allowed diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb index d2eca7c5459..c55e1f50604 100644 --- a/gcc/ada/sem_res.adb +++ b/gcc/ada/sem_res.adb @@ -7397,7 +7397,7 @@ package body Sem_Res is else if Debug_Flag_Underscore_F then Error_Msg_NE - ("info: analyzing call to & in context?", N, Nam_UA); + ("info: analyzing call to & in context", N, Nam_UA); end if; Expand_Inlined_Call (N, Nam_UA, Nam); From patchwork Thu Jun 13 13:33:27 2024 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: 1947418 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=DRZQmOy6; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W0NqQ1nFnz20Xd for ; Thu, 13 Jun 2024 23:41:38 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7DBBF388212D for ; Thu, 13 Jun 2024 13:41:36 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-lj1-x233.google.com (mail-lj1-x233.google.com [IPv6:2a00:1450:4864:20::233]) by sourceware.org (Postfix) with ESMTPS id D8F0E3882100 for ; Thu, 13 Jun 2024 13:34:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D8F0E3882100 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 D8F0E3882100 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::233 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718285662; cv=none; b=YvcJV9IkBK8zQHn+zb8mgGyO74xZ7w35vWCTB5ni/oTMqQ+uU7kclCsBQ7Z2PMZmziXa7yAb0nF0Z4jkqJFN2aHjTH0rQ9M3VnfNQ5ho6dUOkdS64hKGw7fzoOYoJuPe+b5Qbc7aDZun6dee/mSFOhouSN/QHWSSOH2MMzpOmGM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718285662; c=relaxed/simple; bh=bMQJ1q2kFs5rstywbnXgXAB4TG6XqiJpn2cL9f74CbE=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=baP8OQVHPBQm/QDdhNUzefp3Lyd7rwAkjpmVh4RC0zd9eAeBsZElZfDaT3feGgfL0ZzT2YcwEMC2ddTNUt9vRPDob2ndEDZp1O+UUfAGuLG86MyOrdc6AnK4Sn773QiXplVxaEJLLhw3CRKPYgvU+VzsDysemugMs0Bq7GvE1GM= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-lj1-x233.google.com with SMTP id 38308e7fff4ca-2ebdfe26242so11411181fa.0 for ; Thu, 13 Jun 2024 06:34:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1718285646; x=1718890446; 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=zyWtuIyJdq+SjGAFXe+Ob7b4RoHr2WdmUmV0lW/IlEs=; b=DRZQmOy6ZpUh4a3eKqA66JOsa8qf1Tad6OqVsAiVjw7YLQLSChfbqyCeFQn4ztFi/7 vEsJlIskLQcsoE25IHrb9ejtq7Q6H9PyjcrTZmDek4BTySt9BHfy1DBKH2QtrzvQEO0I TLm1/IOECKhOXfd4T/NjuMAr2WCYOXf+xwuwldO5U75j/Wa6fRwcmBjq6lDzPyrZirYQ wiauENhvnz6Ga1GQltRDB2705FQFgADt+Hshtczou0jrULUAkUOhbUDMFXGXhaDIf4v0 J8XONOEymDGGs3YtVvzv+2bQ7gUNLRuTV7LxtSZzb7oDjBTZKy1eHfOBlaba5zHzAB7J yPaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718285646; x=1718890446; 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=zyWtuIyJdq+SjGAFXe+Ob7b4RoHr2WdmUmV0lW/IlEs=; b=MQ5F+ZVvENT2duYLQZhDjncgaWmAool6I/nP5WZBT8Z+yNk/sW23icIsWOUKGYchKq UWtk81K0MKyb70QsxUwjyLsTjD7pq9/OZtY+4kixuqCMCOAcxe2NWmrPhvilKYVlOT1R n0RyZqxQ7U2QNwVujJLh6g2E9zvzS2LqSm9QpkT8hxHjI8UUE8UPVwAj6k8F0sxaFNTK B4FfW9HLj2CaEqnWiqS6xsYAioXdPWyaIB5lo77vq4x8QJIaizkNZCcm65N1/Gt0Oca9 48gn19/S5O40WZFUV3s/hut7vr94+EReLyaZjhu5bx9b4gpkBEX5kFZ1UP9G/L6hs5gT IdZQ== X-Gm-Message-State: AOJu0Ywj18lzLgv9Rw/1Sb0GhzcUMUEn6MFtfXcr3PTw2vP2iTEA+Lj1 Wg/HEFbWmW4zZXo59L32sbOlKLV73SCC/Igf0lz1LtVbMGDIrIvsUwG/1sye+ebhDcnw2v0cvIA = X-Google-Smtp-Source: AGHT+IE+9J/9Fkp6xIzkb3ZftHvteDMy4M+4r0PedoivLJQZ9dL4dx9+gjDAjz0nieYIKiWXuu5b6g== X-Received: by 2002:a2e:a791:0:b0:2eb:d95f:10cb with SMTP id 38308e7fff4ca-2ebfca4cc05mr39139731fa.41.1718285646409; Thu, 13 Jun 2024 06:34:06 -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-422870e9145sm62391955e9.22.2024.06.13.06.34.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 06:34:05 -0700 (PDT) From: =?utf-8?q?Marc_Poulhi=C3=A8s?= To: gcc-patches@gcc.gnu.org Cc: Viljar Indus Subject: [COMMITTED 21/30] ada: Remove message about goto rewritten as a loop Date: Thu, 13 Jun 2024 15:33:27 +0200 Message-ID: <20240613133338.1809385-21-poulhies@adacore.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240613133338.1809385-1-poulhies@adacore.com> References: <20240613133338.1809385-1-poulhies@adacore.com> 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.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org From: Viljar Indus This message provides only inner details of how the compiler handles this kind of construct and does not provide meaningful information that the user can interact on. gcc/ada/ * par-labl.adb (Rewrite_As_Loop): Remove info message Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/par-labl.adb | 3 --- 1 file changed, 3 deletions(-) diff --git a/gcc/ada/par-labl.adb b/gcc/ada/par-labl.adb index 7b793c06ecd..7ef897f0b48 100644 --- a/gcc/ada/par-labl.adb +++ b/gcc/ada/par-labl.adb @@ -356,9 +356,6 @@ procedure Labl is Remove (Loop_Header); Rewrite (Loop_End, Loop_Stmt); - Error_Msg_N - ("info: code between label and backwards goto rewritten as loop??", - Loop_End); end Rewrite_As_Loop; -------------- From patchwork Thu Jun 13 13:33:28 2024 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: 1947410 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=A7xwjlKy; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W0NmZ3nv7z1ydW for ; Thu, 13 Jun 2024 23:39:10 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C1E9D3882653 for ; Thu, 13 Jun 2024 13:39:08 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [IPv6:2a00:1450:4864:20::22a]) by sourceware.org (Postfix) with ESMTPS id C93203882166 for ; Thu, 13 Jun 2024 13:34:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C93203882166 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 C93203882166 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::22a ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718285663; cv=none; b=DqEPUqTO+MVObBLRW4NY6zeB6LU0l40zUD4Yo24MEAyKFKFX+8dVCOK70Ml8uQvxiRT2XtZWUT17QXhR17ZnWllyk87BqCZktBUtuF0BzvrDPm28WJS75EXzXTcYZwCDB3PpD3X+TSCfjPIsEZB2y1fCeOBIfT8Z4gYfFp+mtZ0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718285663; c=relaxed/simple; bh=Gjsc+lKob1VSqLuUZHMIMPmvEkHq6hYxVkzyAg4zhtY=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=HV2ArC4ijOE0+z76aZVs1YW/PIw/i/LR8utc8koP63GYDQb1E1/a4GpiIc8AkhmSsJDiEUapkXpJa+LbeA08DsHKWoTrp+gX5+pn9+WU23TsQhg2gwmii0e1mT3UrFf+EnVyX6yCTg531/rcm7phg3kndcEeDkLl1toF4Y+gMks= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-lj1-x22a.google.com with SMTP id 38308e7fff4ca-2ebdfe26217so8901161fa.2 for ; Thu, 13 Jun 2024 06:34:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1718285647; x=1718890447; 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=hIQIKhFeai8J+4t/EMn1vfZRKvdRkNmFT7afo/teKic=; b=A7xwjlKyGGPeVLyMxTFhJTNp1aDaAPSYGu630HsvFkHkeISHx+FdvvNESHDpP88CbB DvT87jassZ9/yPe/SoTjLDY3xhOH5VRH+J45wn5q67oy2EinuC5qVi+xyGM3xep3tVsi V+jiwEakuA9thyktCIJmnrCbyG0SzWM4ASYC1ko4s8pQTUBgzqB/oNpFrLbMNjjHp9zZ 5dJQaVH/JVKOX3i/buVf/5zf0rdJY5FXt9exUv70X2RwVceUdjFWcp8lExMCK5WR20rh ZFjG2RXLxw8IfkL6MEGgOaYv0i/hLU5QbPX5quOKyb1RA4W/2Yoaw66revke594rc8Ed g2cA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718285647; x=1718890447; 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=hIQIKhFeai8J+4t/EMn1vfZRKvdRkNmFT7afo/teKic=; b=RFxNk/dRiYamoxa6Q/wBxarTI3cajWJC5o1WN91E1qIssvsna6tajWTpiw/vZVzTLn z6i6FdcYc0cUChM20EhPYqwWVq7mY/UuAccwEp4Qmkksc9GWxsLhjeEGsStwNu9R/QtE EBVbpKpy8x31gFZsWP2KCjb/ApVg294khXpOTIMwXwwDbHXBRavIkoFtDJXXoMGTYZ5z jzjLq/05TIyiPvn4dsc4yt/Q6UaIGQAqmEeroBt8AqHRx+jW0RigV50IfKMEs32oJ1NC NzhQ/roGLolu5hJ5zKb4dwJmQrvSZv3mlH6shtPpPA5yUez6HnDiBzrYWqrxnz198k5x D5Fw== X-Gm-Message-State: AOJu0YwW3doDmtjY1z+H9Irff+t7/inNwl1HXccAXB8/JXWHfzhesLyG FeL7SgAdc4FVlBlQJBYeQBzrW8/NLTWPOhUQbRQCSJTpOwvjgC2gTO0hzUkDbk60Cs0lrWmDts4 = X-Google-Smtp-Source: AGHT+IEL7/sSdIZ54PJnZUbDJkylLqn5MgsVnNZxjL4gX0tHT3wUYXxpsP0MTciKG7rdAtYrTyw2dg== X-Received: by 2002:a05:651c:1a1e:b0:2eb:fbba:cbe6 with SMTP id 38308e7fff4ca-2ebfc8ff55dmr33826261fa.1.1718285647204; Thu, 13 Jun 2024 06:34:07 -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-422870e9145sm62391955e9.22.2024.06.13.06.34.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 06:34:06 -0700 (PDT) From: =?utf-8?q?Marc_Poulhi=C3=A8s?= To: gcc-patches@gcc.gnu.org Cc: Bob Duff Subject: [COMMITTED 22/30] ada: Minor cleanups in generic formal matching Date: Thu, 13 Jun 2024 15:33:28 +0200 Message-ID: <20240613133338.1809385-22-poulhies@adacore.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240613133338.1809385-1-poulhies@adacore.com> References: <20240613133338.1809385-1-poulhies@adacore.com> 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.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org From: Bob Duff Minor rewording of a warning. Disallow positional notation for <> (but disable this check), and fix resulting errors. Copy use clauses. gcc/ada/ * sem_ch12.adb (Check_Fixed_Point_Actual): Minor rewording; it seems more proper to say "operator" rather than "operation". (Matching_Actual): Give an error for <> in positional notation. This is a syntax error. Disable this for now. (Analyze_Associations): Copy the use clause in all cases. The "mustn't recopy" comment seems wrong, because New_Copy_Tree preserves Slocs. * libgnat/a-ticoau.ads: Fix violation of new postion-box error. * libgnat/a-wtcoau.ads: Likewise. * libgnat/a-ztcoau.ads: Likewise. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/libgnat/a-ticoau.ads | 2 +- gcc/ada/libgnat/a-wtcoau.ads | 2 +- gcc/ada/libgnat/a-ztcoau.ads | 2 +- gcc/ada/sem_ch12.adb | 28 ++++++++++++++-------------- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/gcc/ada/libgnat/a-ticoau.ads b/gcc/ada/libgnat/a-ticoau.ads index 223e8237604..58feea3af71 100644 --- a/gcc/ada/libgnat/a-ticoau.ads +++ b/gcc/ada/libgnat/a-ticoau.ads @@ -42,7 +42,7 @@ private generic type Num is digits <>; - with package Aux is new Ada.Text_IO.Float_Aux (Num, <>, <>); + with package Aux is new Ada.Text_IO.Float_Aux (Num, others => <>); package Ada.Text_IO.Complex_Aux is diff --git a/gcc/ada/libgnat/a-wtcoau.ads b/gcc/ada/libgnat/a-wtcoau.ads index 854b7b9fb60..781582dff9b 100644 --- a/gcc/ada/libgnat/a-wtcoau.ads +++ b/gcc/ada/libgnat/a-wtcoau.ads @@ -42,7 +42,7 @@ private generic type Num is digits <>; - with package Aux is new Ada.Wide_Text_IO.Float_Aux (Num, <>, <>); + with package Aux is new Ada.Wide_Text_IO.Float_Aux (Num, others => <>); package Ada.Wide_Text_IO.Complex_Aux is diff --git a/gcc/ada/libgnat/a-ztcoau.ads b/gcc/ada/libgnat/a-ztcoau.ads index 953ed5d9a18..89f19e8e1d3 100644 --- a/gcc/ada/libgnat/a-ztcoau.ads +++ b/gcc/ada/libgnat/a-ztcoau.ads @@ -26,7 +26,7 @@ private generic type Num is digits <>; - with package Aux is new Ada.Wide_Wide_Text_IO.Float_Aux (Num, <>, <>); + with package Aux is new Ada.Wide_Wide_Text_IO.Float_Aux (Num, others => <>); package Ada.Wide_Wide_Text_IO.Complex_Aux is diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb index 7daa35f7fe1..93e81fd9539 100644 --- a/gcc/ada/sem_ch12.adb +++ b/gcc/ada/sem_ch12.adb @@ -1402,8 +1402,8 @@ package body Sem_Ch12 is if No (Formal) then Error_Msg_Sloc := Sloc (Node (Elem)); Error_Msg_NE - ("?instance uses predefined operation, not primitive " - & "operation&#", Actual, Node (Elem)); + ("?instance uses predefined, not primitive, operator&#", + Actual, Node (Elem)); end if; end if; @@ -1490,6 +1490,16 @@ package body Sem_Ch12 is -- Case of positional parameter corresponding to current formal elsif No (Selector_Name (Actual)) then + -- A "<>" without "name =>" is illegal syntax + + if Box_Present (Actual) then + if False then -- ??? + -- Disable this for now, because we have various code that + -- needs to be updated. + Error_Msg_N ("box requires named notation", Actual); + end if; + end if; + Found_Assoc := Actual; Act := Explicit_Generic_Actual_Parameter (Actual); Num_Matched := Num_Matched + 1; @@ -2208,22 +2218,12 @@ package body Sem_Ch12 is end Explicit_Freeze_Check; end if; - -- For use type and use package appearing in the generic part, - -- we have already copied them, so we can just move them where - -- they belong (we mustn't recopy them since this would mess up - -- the Sloc values). + -- Copy use clauses to where they belong when N_Use_Package_Clause | N_Use_Type_Clause => - if Nkind (Original_Node (I_Node)) = - N_Formal_Package_Declaration - then - Append (New_Copy_Tree (Formal), Assoc_List); - else - Remove (Formal); - Append (Formal, Assoc_List); - end if; + Append (New_Copy_Tree (Formal), Assoc_List); when others => raise Program_Error; From patchwork Thu Jun 13 13:33:29 2024 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: 1947419 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=AoI1i8mt; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W0Nr246X9z20Xd for ; Thu, 13 Jun 2024 23:42:10 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C3BFF388264B for ; Thu, 13 Jun 2024 13:42:08 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-lj1-x22f.google.com (mail-lj1-x22f.google.com [IPv6:2a00:1450:4864:20::22f]) by sourceware.org (Postfix) with ESMTPS id 713CE3882130 for ; Thu, 13 Jun 2024 13:34:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 713CE3882130 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 713CE3882130 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::22f ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718285663; cv=none; b=D8IcwjoPACrY8SNSeQGpolmzUXpEHlu6jv1EmjPJZ7+9u41fYl5OlJ/vVi376zvnt3oY7uaOY3xmq9rfYCxbbs4BPi30WEDKwUQEJnOsE88pIvBnzpmn/4jKaCaDvcGKYO36pM1OeRGU7stNlC8feMDVT4Yv2+F45DkzLq/LuLg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718285663; c=relaxed/simple; bh=PBQCZ6whJeycA30KECYlNTQPLVZDw8xx2si3SfWkzLQ=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=Dc2PK+KNxhiK86ei7DwYYdlkDBUJdK8UjohcWCCDMqqWSTxpmi231+5H8BdfEGNZ+zOMBFI6xQr0T1a9b+hb7jE/BPxpIw4W5j6hvOofkYf5q1ooysb91P6ShCNWCboeeFfARtq/hkOMjr+l9poTTz+dJOBFRl3gIHTikqy5wKM= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-lj1-x22f.google.com with SMTP id 38308e7fff4ca-2eaa89464a3so10285891fa.3 for ; Thu, 13 Jun 2024 06:34:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1718285648; x=1718890448; 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=GtcxcS8HIez68QWDWcPhPkuxN5nJqIaoe8eVK7QlFPk=; b=AoI1i8mtF/6tz1Qd2dNoEezfYkDyUKGYqOwOD4vFIFVNHv6D7RLlN2lJYP/ZwxFR/9 2wdJFQdiOriyn+6W1aPpsRj0wt6wEdXrXzotA66UMyoVpSv2ALFsArg1xZ4ieGYZTNAm n8xEm8XQYIDb1uJItFoTiwIydltB9svsoKkmJeA9qv+q1VLm1Ea6F9g5xUgrc5unGj48 LzRQ0qNEPmM90F8vzXa2Bh55AFoX+0DBoBQMbyhfy7RukTaBzZOyh7gys/FHWq/sY9Wa BrCHqhf9Kc4LwFkj1FSJdnpYw82mKUj9CiEClClPbOXzkW99x/9g0QGx10nZhYYOeRfQ kDyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718285648; x=1718890448; 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=GtcxcS8HIez68QWDWcPhPkuxN5nJqIaoe8eVK7QlFPk=; b=jToajCBO2/L/L4i/o9JfmCPpiouJmwV/RQCpF4gOrXPr1v7rG1T9gEH4hRDm+1it3X hoTYCWbgYkkKJ6+zRZbVLcugrMlRO++vVi4DorvU+Cva+bRt/FHNJJFuMe2qVH9KUePq oeXXRAUpCgcMviAD73fJ/oTOfAZZEPYDcDlBvpbdChQur2ltAiXo1+8mLPk11GTC0R6/ 3AhtjgKqglduJqNCXIP9xH9ivJQ0yoYE0muWU2PeA55Eia3l6we/glV3/msNvoCGg+nK PaNa5pDe8IKaaM8P2OhhDUF9hwCoiEluBvxernYVFxEoJTXfrKiHH5yAE7m1tzmFveEW WLJw== X-Gm-Message-State: AOJu0Yx+f+Yq6ffu8Peh0eioJwvD+T01DJIiacgz4dNLy5PLpG+ovZbZ Ttq3loTcSE8/HhXvCcx6iNJ9KYUIxo7/f4orpPDe0VEa5WaaC+o1nAom4IOIeTcI+mPfSeLBaFQ = X-Google-Smtp-Source: AGHT+IGTimqvIecM8v7zeAenMBg7rP3Px48VxXxZ9LxFl+ELAvL9HDmMD3w/SGf3dbIxOm5bBJueRA== X-Received: by 2002:a05:651c:2113:b0:2eb:f8ae:1cb0 with SMTP id 38308e7fff4ca-2ebfc99f52fmr38764891fa.37.1718285647994; Thu, 13 Jun 2024 06:34:07 -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-422870e9145sm62391955e9.22.2024.06.13.06.34.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 06:34:07 -0700 (PDT) From: =?utf-8?q?Marc_Poulhi=C3=A8s?= To: gcc-patches@gcc.gnu.org Cc: Steve Baird Subject: [COMMITTED 23/30] ada: Deep copy of an expression sometimes fails to copy entities Date: Thu, 13 Jun 2024 15:33:29 +0200 Message-ID: <20240613133338.1809385-23-poulhies@adacore.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240613133338.1809385-1-poulhies@adacore.com> References: <20240613133338.1809385-1-poulhies@adacore.com> 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.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org From: Steve Baird An entity can be defined within an expression (the best example is probably a declare expression, but a quantified expression is another; there are others). When making a deep copy of an expression, the Entity nodes for such entities were sometimes not copied, apparently for performance reasons. This caused correctness problems in some cases, so do not perform that "optimization". gcc/ada/ * sem_util.adb (New_Copy_Tree.Visit_Entity): Delete code that prevented copying some entities. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_util.adb | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index 438dea79977..e8120c2adda 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -23907,27 +23907,6 @@ package body Sem_Util is elsif EWA_Inner_Scope_Level > 0 then return; - -- Nothing to do when the entity does not denote a construct that - -- may appear within an N_Expression_With_Actions node. Relaxing - -- this restriction leads to a performance penalty. - - -- ??? this list is flaky, and may hide dormant bugs - -- Should functions be included??? - - -- Quantified expressions contain an entity declaration that must - -- always be replaced when the expander is active, even if it has - -- not been analyzed yet like e.g. in predicates. - - elsif Ekind (Id) not in E_Block - | E_Constant - | E_Label - | E_Procedure - | E_Variable - and then not Is_Entity_Of_Quantified_Expression (Id) - and then not Is_Type (Id) - then - return; - -- Nothing to do when the entity was already visited elsif NCT_Tables_In_Use From patchwork Thu Jun 13 13:33:30 2024 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: 1947420 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=Shpk5GQF; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W0NrT1Tlgz20Xd for ; Thu, 13 Jun 2024 23:42:33 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7A7C83882177 for ; Thu, 13 Jun 2024 13:42:31 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by sourceware.org (Postfix) with ESMTPS id E8BE33882072 for ; Thu, 13 Jun 2024 13:34:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E8BE33882072 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 E8BE33882072 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::32f ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718285662; cv=none; b=qXBBHsFMdwSWYbVy9qe6BDmz8Y33dSybV0FSqQ7ZEToNeDp81OwlLAH6jEq24pAeINiP3gKQu2rwRum2fFG5WUCJ5AAjO4FzcQAyf/QZGamJ6yZgzw5rIaypnSqvlEUFcWsDOHLsR1xiYJTRsO90HPYQlTB++0yzwbX369qEzHw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718285662; c=relaxed/simple; bh=OpwJUdmmjuUcHyC9cnAqK6WWQjUojpoRt0xFjTvA5CI=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=J4GnCyVvbC61UbFQm3W4Lu9WuhM0UkN2+T2nGf3wgrIi87IteIlS1pr9Y56GkTLy4cgefT9i8sUElrr9PdMvGwidI8VTSJ1la+95+ILPC34/YKQ5LgeUCp0hwNl7Mp9EdSaOHib2+aJYpejIn5wD0soAsXj6yQHQPtRO09/1wQY= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-4217dbeb4caso9272175e9.1 for ; Thu, 13 Jun 2024 06:34:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1718285649; x=1718890449; 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=Vl4K992/EgHkqZWak7PR8TZRPCqI2FysxFoNicoSJTQ=; b=Shpk5GQFZP9UKp3XECihGPW82qn8Zg8N96BxXSUY7w4DDf0Ny9BiB/Wf+Ai5uGrMGo w3GwCMGPDtjW5shwm/5tpKqIvLBuLJQSebBXDD5ynpjrJ0itEu0oLcJ9+N0/LyivQr5i 0dyA11yzX901SAXJ6dtfbpleJqJ8VR5TzzXzayE7O0BYb9JKs/nsTgPpqQp10W7ZE0CN OD9MFcq+kdaXH8fg7AesWfDg/Eq9W9TRQ4EsSJq4QtDlc8o4EacmoFMJSOFAzZr2p+kE LqlKY+vojVp34CzlQxcPTlQH0w+jUNq3ggY6+AggRgOOfPpnlA250gdvqsi2ViKF5CMQ tocg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718285649; x=1718890449; 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=Vl4K992/EgHkqZWak7PR8TZRPCqI2FysxFoNicoSJTQ=; b=a1uETQikx0rxWko9sv4DH795+xe/smLsK4pjFw5dRUazry2OQSZeuioY6/vUZuQMX0 4ZcWuSCGD4sjN1dbtB+/yih8/jncLDihn997ELl3k/Q7eyKD7TL+Yfy7+mdG1+ypXQxz yR7eyMfOaoyRKvSSK+C/zcCZ/MwZxnoswFJFymwK176NF+ZJZRveGjxiJDYqlrTNq96e dXuBvSmYh3hllVe+X8kyDrsbuhEzzZYfS52rRunuCCva9rRnn+JoEg6EiA5zN+UH+xhO 7E5TqArGfTFlJyucoNUIVGR7Np9mN8NnqEKNjbqlxOjIjMRq+NyNuCteXi/WjuGy4Ath AmIA== X-Gm-Message-State: AOJu0Ywb01wP83sJ95gEhzZsCFWquK+EybwBVUt+Z3+VBB8NSR8KSmiV pcaZ+EY4a2/k1o6ftBvWBZCZT8zD3S+/PfuOQ5WJ/5LOsUQnJNMBR7yDIvKIKzKJS/BGaFKxKiE = X-Google-Smtp-Source: AGHT+IG/wHQYOxeEsOgsHdPUziaqu3dbtqvuELx6MLx/hg6zjFJdidCZxyxHTV9C0/QjSKpUpfBtTQ== X-Received: by 2002:a05:600c:45cc:b0:421:21d2:abf5 with SMTP id 5b1f17b1804b1-422865acc67mr42618275e9.31.1718285648758; Thu, 13 Jun 2024 06:34:08 -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-422870e9145sm62391955e9.22.2024.06.13.06.34.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 06:34:08 -0700 (PDT) From: =?utf-8?q?Marc_Poulhi=C3=A8s?= To: gcc-patches@gcc.gnu.org Cc: Viljar Indus Subject: [COMMITTED 24/30] ada: Revert changing a GNATProve mode message to a non-warning Date: Thu, 13 Jun 2024 15:33:30 +0200 Message-ID: <20240613133338.1809385-24-poulhies@adacore.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240613133338.1809385-1-poulhies@adacore.com> References: <20240613133338.1809385-1-poulhies@adacore.com> 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.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org From: Viljar Indus GNATProve compiles the program multiple times. During the first run the warnings are suppressed. These messages need to be suppressed during that run in order to avoid having them duplicated in the following runs. Revert the previous changes as there currently is not a way to simply suppress info messages. gcc/ada/ * sem_res.adb (Resolve_Call): add warning insertion character into the info message. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_res.adb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb index c55e1f50604..d2eca7c5459 100644 --- a/gcc/ada/sem_res.adb +++ b/gcc/ada/sem_res.adb @@ -7397,7 +7397,7 @@ package body Sem_Res is else if Debug_Flag_Underscore_F then Error_Msg_NE - ("info: analyzing call to & in context", N, Nam_UA); + ("info: analyzing call to & in context?", N, Nam_UA); end if; Expand_Inlined_Call (N, Nam_UA, Nam); From patchwork Thu Jun 13 13:33:31 2024 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: 1947421 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=kyeb4mdO; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W0NsM2TRVz20Xd for ; Thu, 13 Jun 2024 23:43:19 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 336AA3882126 for ; Thu, 13 Jun 2024 13:43:17 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-lj1-x233.google.com (mail-lj1-x233.google.com [IPv6:2a00:1450:4864:20::233]) by sourceware.org (Postfix) with ESMTPS id 37E523882073 for ; Thu, 13 Jun 2024 13:34:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 37E523882073 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 37E523882073 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::233 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718285666; cv=none; b=gT2TORgqjW7dIffRHuUZ/M2P0d3ulAMk/rUE9NX+0JlGSOsPM+kwO4mwdOPwAVGWWMkdEqLMBp210tzeL/8UZJ4nj9stxI9ZqXA+KzrbnlMA/ywP0Qvr9p+Bgp9oFHfqifE162TrpGPYplXPqFs3dEcj9HKKhRmBZaDiuKtiyTM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718285666; c=relaxed/simple; bh=e6hUEIWNUeXPVlaMuh64/wfcu/gDeUN5uVvZ8C8Fyho=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=WBTJPHSItk8TZcGhezdtG6L8pbRKwZFXlg/W7UZKFgZ6MCwzu5UVwwFs4Xvlz6r3y6WWo0EPqBGqRfHyyBP058JlDzVnFK5q02A53sR9627pv2CG5CbXtd6IJF986yksWo6785E45OmiySUuifGP+wPrJ0GKJOOjKkIKY+hJqF0= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-lj1-x233.google.com with SMTP id 38308e7fff4ca-2ebe40673e8so9696101fa.3 for ; Thu, 13 Jun 2024 06:34:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1718285650; x=1718890450; 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=rHpZq/XNFpxPTql7f+DbwXo9lafs5kmhL5ccYJl2/dk=; b=kyeb4mdOOD3KRSHxuxWQBwT6KMwnQ3dSdc5TRhmiCL+jF8s0M78FnIse98z/C6Y86s M0K/4/1vCuclCmGQ4qp+UMGm7xD0lNuXG8MRHWrBo4MtTVXNBEk29gHMRr1M33ysbT3Q sKOJyhRFHi0JO55UwlIdGu0EBXmqqw6clomR+w7KJLEVMQ0ROrd8IL5ywmKcRTXIiM8b L2neeDhQ8eyYs7Ir9G0sSyrC62NhBK1PO8xWAp5ybfNl7yXLRj8mA3blnBHQkM3CceO0 GaBk/g1dlteRImp/z23LTiC6BtHsA+5DN7JLKPWCAVBGEsMl9Hl+eofpehQpjyJnyqXx p1jQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718285650; x=1718890450; 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=rHpZq/XNFpxPTql7f+DbwXo9lafs5kmhL5ccYJl2/dk=; b=rC4rumUq4thvfxszfnlkKKN8ocQPbuWwWTm9Tbqp0DO9vWCNK4qKqjSKHIst88q28i e5Ic1sTkmGnAsIdYlrS6uh7v76A6NGDpyAzTCCoe66j6dXGWabHqXrHZcCSoEU13Q/lW B4v0ZpM4cynJ3ko97lZ5mnYmz0D/qmxUL2GDOlwuVRvNx+EZsbm/t1Gebb9IY5SDQYCH g303311jFYFoPMgJwfPq69Fchx/3uzoJHjBP9pW/Z9fwojab6DaERJbZphwbJmEwgck0 RU6QZIUNIpnYnHvMPAQw1neBl6XDYG3XeWAwXo+24xETzEF1Sf+LXU47mR89HYwyg/KS 837w== X-Gm-Message-State: AOJu0Yyb0bxMbfMBaleBX88e8y7K9PujT+t3POVbBw/YbSHyPbjnlxVj dVkUXU5wTyWUJFn/kEqfwzvreDBCcCMcW7/qLt8JE9OE7d/aeRbuTBRpyt8HH1AsqS/kJfy43pM = X-Google-Smtp-Source: AGHT+IGaWjaKE5168PXfxmjrWYiJk7AYPlS6TwrFB3AcRW8/t+fi79LoVAaWu77HdELPm/6BmadMUg== X-Received: by 2002:a2e:9b13:0:b0:2eb:de21:94a1 with SMTP id 38308e7fff4ca-2ebfc964026mr27667261fa.43.1718285649652; Thu, 13 Jun 2024 06:34:09 -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-422870e9145sm62391955e9.22.2024.06.13.06.34.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 06:34:09 -0700 (PDT) From: =?utf-8?q?Marc_Poulhi=C3=A8s?= To: gcc-patches@gcc.gnu.org Cc: Javier Miranda Subject: [COMMITTED 25/30] ada: Missing postcondition runtime check in inherited primitive Date: Thu, 13 Jun 2024 15:33:31 +0200 Message-ID: <20240613133338.1809385-25-poulhies@adacore.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240613133338.1809385-1-poulhies@adacore.com> References: <20240613133338.1809385-1-poulhies@adacore.com> MIME-Version: 1.0 X-Spam-Status: No, score=-13.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_ASCII_DIVIDERS, 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.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org From: Javier Miranda When a derived tagged type implements more interface interface types than its parent type, and a primitive inherited from its parent type covers a primitive of these additional interface types that has classwide postconditions, the code generated by the compiler does not check the classwide postconditions inherited from the interface primitive. gcc/ada/ * freeze.ads (Check_Condition_Entities): Complete documentation. * freeze.adb (Check_Inherited_Conditions): Extend its functionality to build two kind of wrappers: the existing LSP wrappers, and wrappers required to handle postconditions of interface primitives implemented by inherited primitives. (Build_Inherited_Condition_Pragmas): Rename formal. (Freeze_Record_Type): For derived tagged types, move call to Check_Inherited_Conditions to subprogram Freeze_Entity_Checks; done to improve the performance of Check_Inherited_Conditions since it can rely on the internal entities that link interface primitives with tagged type primitives that implement them. (Check_Interface_Primitives_Strub_Mode): New subprogram. * sem_ch13.adb (Freeze_Entity_Checks): Call Check_Inherited_Conditions. Call Check_Inherited_Conditions with derived interface types to check strub mode compatibility of their primitives. * sem_disp.adb (Check_Dispatching_Operation): Adjust assertion to accept wrappers of interface primitives that have classwide postconditions. * exp_disp.adb (Write_DT): Adding text to identify wrappers. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/exp_disp.adb | 4 + gcc/ada/freeze.adb | 305 +++++++++++++++++++++++++++++++++---------- gcc/ada/freeze.ads | 13 +- gcc/ada/sem_ch13.adb | 19 ++- gcc/ada/sem_disp.adb | 13 +- 5 files changed, 269 insertions(+), 85 deletions(-) diff --git a/gcc/ada/exp_disp.adb b/gcc/ada/exp_disp.adb index 666f84ec688..77256ac5af1 100644 --- a/gcc/ada/exp_disp.adb +++ b/gcc/ada/exp_disp.adb @@ -8755,6 +8755,10 @@ package body Exp_Disp is Write_Str ("(predefined) "); end if; + if Is_Wrapper (Prim) then + Write_Str ("(wrapper) "); + end if; + -- Prefix the name of the primitive with its corresponding tagged -- type to facilitate seeing inherited primitives. diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb index c872050dd35..c4c524f4685 100644 --- a/gcc/ada/freeze.adb +++ b/gcc/ada/freeze.adb @@ -1520,7 +1520,17 @@ package body Freeze is Op_Node : Elmt_Id; Par_Prim : Entity_Id; Prim : Entity_Id; - Wrapper_Needed : Boolean; + + type Wrapper_Kind is (No_Wrapper, LSP_Wrapper, Postcond_Wrapper); + + Wrapper_Needed : Wrapper_Kind; + -- Kind of wrapper needed by a given inherited primitive of tagged + -- type R: + -- * No_Wrapper: No wrapper is needed. + -- * LSP_Wrapper: Wrapper that handles inherited class-wide pre/post + -- conditions that call overridden primitives. + -- * Postcond_Wrapper: Wrapper that handles postconditions of interface + -- primitives. function Build_DTW_Body (Loc : Source_Ptr; @@ -1536,8 +1546,8 @@ package body Freeze is -- Build the spec of the dispatch table wrapper procedure Build_Inherited_Condition_Pragmas - (Subp : Entity_Id; - Wrapper_Needed : out Boolean); + (Subp : Entity_Id; + LSP_Wrapper_Needed : out Boolean); -- Build corresponding pragmas for an operation whose ancestor has -- class-wide pre/postconditions. If the operation is inherited then -- Wrapper_Needed is returned True to force the creation of a wrapper @@ -1545,6 +1555,10 @@ package body Freeze is -- the pragmas are constructed only to verify their legality, in case -- they contain calls to other primitives that may have been overridden. + procedure Check_Interface_Primitives_Strub_Mode; + -- Called when R is an interface type to check strub mode compatibility + -- all its primitives. + function Needs_Wrapper (Class_Cond : Node_Id; Subp : Entity_Id; @@ -1638,7 +1652,6 @@ package body Freeze is -- Add minimal decoration of fields Mutate_Ekind (DTW_Id, Ekind (Par_Prim)); - Set_LSP_Subprogram (DTW_Id, Par_Prim); Set_Is_Dispatch_Table_Wrapper (DTW_Id); Set_Is_Wrapper (DTW_Id); @@ -1656,8 +1669,8 @@ package body Freeze is --------------------------------------- procedure Build_Inherited_Condition_Pragmas - (Subp : Entity_Id; - Wrapper_Needed : out Boolean) + (Subp : Entity_Id; + LSP_Wrapper_Needed : out Boolean) is Class_Pre : constant Node_Id := Class_Preconditions (Ultimate_Alias (Subp)); @@ -1666,7 +1679,7 @@ package body Freeze is New_Prag : Node_Id; begin - Wrapper_Needed := False; + LSP_Wrapper_Needed := False; if No (Class_Pre) and then No (Class_Post) then return; @@ -1679,7 +1692,7 @@ package body Freeze is if Present (Class_Pre) and then Needs_Wrapper (Class_Pre, Subp, Par_Prim) then - Wrapper_Needed := True; + LSP_Wrapper_Needed := True; end if; -- For class-wide postconditions we evaluate whether the wrapper is @@ -1689,7 +1702,7 @@ package body Freeze is if Present (Class_Post) and then Needs_Wrapper (Class_Post, Subp, Par_Prim) then - Wrapper_Needed := True; + LSP_Wrapper_Needed := True; -- Update the class-wide postcondition @@ -1732,6 +1745,101 @@ package body Freeze is end if; end Build_Inherited_Condition_Pragmas; + ------------------------------------------- + -- Check_Interface_Primitives_Strub_Mode -- + ------------------------------------------- + + procedure Check_Interface_Primitives_Strub_Mode is + Elmt : Elmt_Id; + Iface_Elmt : Elmt_Id; + Iface : Entity_Id; + Iface_Prim : Entity_Id; + Ifaces_List : Elist_Id; + Op_Node : Elmt_Id; + Prim : Entity_Id; + Prim_Iface : Entity_Id; + + begin + pragma Assert (Is_Interface (R)); + + -- Collect interfaces extended by interface type R + + Collect_Interfaces (R, Ifaces_List); + + Op_Node := First_Elmt (Prim_Ops); + while Present (Op_Node) loop + Prim := Node (Op_Node); + Prim_Iface := R; + Par_Prim := Overridden_Operation (Prim); + + -- We only need to check entities defined in the sources + + -- Check that overrider and overridden primitives have the same + -- strub mode. + + if Present (Par_Prim) then + Check_Same_Strub_Mode (Prim, Par_Prim); + + -- No need to check internally added predefined primitives since + -- they all have the same strub mode. + + elsif Is_Predefined_Dispatching_Operation (Prim) + and then not Comes_From_Source (Prim) + then + null; + + -- Check strub mode of matching primitives of all the interface + -- types, since several interface types may define primitives with + -- the same profile that will be implemented by a single primitive + -- of tagged types implementing R, and therefore must have the + -- same strub mode. + + else + -- If this interface primitive has been inherited this is an + -- internal entity we rely on its renamed entity (which is the + -- entity defined in the sources). + + if Present (Alias (Prim)) then + Prim := Ultimate_Alias (Prim); + Prim_Iface := Find_Dispatching_Type (Prim); + end if; + + -- Search for primitives conformant with this one in the other + -- interface types. + + Iface_Elmt := First_Elmt (Ifaces_List); + while Present (Iface_Elmt) loop + Iface := Node (Iface_Elmt); + + if Iface /= Prim_Iface then + Elmt := First_Elmt (Primitive_Operations (Iface)); + while Present (Elmt) loop + Iface_Prim := Node (Elmt); + + if Chars (Iface_Prim) = Chars (Prim) + and then Comes_From_Source (Iface_Prim) + and then Is_Interface_Conformant + (Prim_Iface, Iface_Prim, Prim) + then + -- Check the strub mode passing the original + -- primitive (instead of its alias); required + -- to report the error at the right location. + + Check_Same_Strub_Mode (Node (Op_Node), Iface_Prim); + end if; + + Next_Elmt (Elmt); + end loop; + end if; + + Next_Elmt (Iface_Elmt); + end loop; + end if; + + Next_Elmt (Op_Node); + end loop; + end Check_Interface_Primitives_Strub_Mode; + ------------------- -- Needs_Wrapper -- ------------------- @@ -1801,14 +1909,14 @@ package body Freeze is return Result; end Needs_Wrapper; - Ifaces_List : Elist_Id := No_Elist; - Ifaces_Listed : Boolean := False; - -- Cache the list of interface operations inherited by R - - Wrappers_List : Elist_Id := No_Elist; + Wrappers_List : Elist_Id := No_Elist; -- List containing identifiers of built wrappers. Used to defer building -- and analyzing their class-wide precondition subprograms. + Postcond_Candidates_List : Elist_Id := No_Elist; + -- List containing inherited primitives of tagged type R that implement + -- interface primitives that have postconditions. + -- Start of processing for Check_Inherited_Conditions begin @@ -1834,15 +1942,23 @@ package body Freeze is end loop; end if; + -- For interface types we only need to check strub mode compatibility + -- of their primitives (since they don't have wrappers). + + if Is_Interface (R) then + Check_Interface_Primitives_Strub_Mode; + return; + end if; + -- Perform validity checks on the inherited conditions of overriding -- operations, for conformance with LSP, and apply SPARK-specific -- restrictions on inherited conditions. Op_Node := First_Elmt (Prim_Ops); while Present (Op_Node) loop - Prim := Node (Op_Node); - + Prim := Node (Op_Node); Par_Prim := Overridden_Operation (Prim); + if Present (Par_Prim) and then Comes_From_Source (Prim) then @@ -1873,54 +1989,34 @@ package body Freeze is if GNATprove_Mode then Collect_Inherited_Class_Wide_Conditions (Prim); end if; - end if; - -- Go over operations inherited from interfaces and check - -- them for strub mode compatibility as well. + -- Check strub mode compatibility of primitives that implement + -- interface primitives. - if Has_Interfaces (R) - and then Is_Dispatching_Operation (Prim) - and then Find_Dispatching_Type (Prim) = R - then - declare - Elmt : Elmt_Id; - Iface_Elmt : Elmt_Id; - Iface : Entity_Id; - Iface_Prim : Entity_Id; - - begin - -- Collect the interfaces only once. We haven't - -- finished freezing yet, so we can't use the faster - -- search from Sem_Disp.Covered_Interface_Primitives. - - if not Ifaces_Listed then - Collect_Interfaces (R, Ifaces_List); - Ifaces_Listed := True; - end if; + elsif Present (Interface_Alias (Prim)) then + Check_Same_Strub_Mode (Alias (Prim), Interface_Alias (Prim)); + end if; - Iface_Elmt := First_Elmt (Ifaces_List); - while Present (Iface_Elmt) loop - Iface := Node (Iface_Elmt); + Next_Elmt (Op_Node); + end loop; - Elmt := First_Elmt (Primitive_Operations (Iface)); - while Present (Elmt) loop - Iface_Prim := Node (Elmt); + -- Collect inherited primitives that may need a wrapper to handle + -- postconditions of interface primitives; done to improve the + -- performance when checking if postcondition wrappers are needed. - if Iface_Prim /= Par_Prim - and then Chars (Iface_Prim) = Chars (Prim) - and then Comes_From_Source (Iface_Prim) - and then Is_Interface_Conformant - (R, Iface_Prim, Prim) - then - Check_Same_Strub_Mode (Prim, Iface_Prim); - end if; + Op_Node := First_Elmt (Prim_Ops); + while Present (Op_Node) loop + Prim := Node (Op_Node); - Next_Elmt (Elmt); - end loop; + if Present (Interface_Alias (Prim)) + and then not Comes_From_Source (Alias (Prim)) + and then Present (Class_Postconditions (Interface_Alias (Prim))) + then + if No (Postcond_Candidates_List) then + Postcond_Candidates_List := New_Elmt_List; + end if; - Next_Elmt (Iface_Elmt); - end loop; - end; + Append_Unique_Elmt (Alias (Prim), Postcond_Candidates_List); end if; Next_Elmt (Op_Node); @@ -1935,7 +2031,7 @@ package body Freeze is while Present (Op_Node) loop Decls := Empty_List; Prim := Node (Op_Node); - Wrapper_Needed := False; + Wrapper_Needed := No_Wrapper; -- Skip internal entities built for mapping interface primitives @@ -1955,16 +2051,80 @@ package body Freeze is end if; -- Analyze the contract items of the parent operation, and - -- determine whether a wrapper is needed. This is determined - -- when the condition is rewritten in sem_prag, using the - -- mapping between overridden and overriding operations built - -- in the loop above. + -- determine whether this inherited primitive needs a LSP + -- wrapper. This is determined when the condition is rewritten + -- in sem_prag, using the mapping between overridden and + -- overriding operations built in the loop above. - Analyze_Entry_Or_Subprogram_Contract (Par_Prim); - Build_Inherited_Condition_Pragmas (Prim, Wrapper_Needed); + declare + LSP_Wrapper_Needed : Boolean; + + begin + Analyze_Entry_Or_Subprogram_Contract (Par_Prim); + Build_Inherited_Condition_Pragmas (Prim, LSP_Wrapper_Needed); + + if LSP_Wrapper_Needed then + Wrapper_Needed := LSP_Wrapper; + end if; + end; + + -- If the LSP wrapper is not needed but the tagged type R + -- implements additional interface types, and this inherited + -- primitive covers an interface primitive of these additional + -- interface types that has class-wide postconditions, then it + -- requires a postconditions wrapper. + + if Wrapper_Needed = No_Wrapper + and then Present (Interfaces (R)) + and then Present (Postcond_Candidates_List) + and then Contains (Postcond_Candidates_List, Prim) + then + declare + Elmt : Elmt_Id; + Ent : Entity_Id; + Iface : Entity_Id; + Iface_Elmt : Elmt_Id; + + begin + Elmt := First_Elmt (Prim_Ops); + while Present (Elmt) loop + Ent := Node (Elmt); + + -- Perform the search relying on the internal entities + -- that link tagged type primitives with interface + -- primitives. + + if Present (Interface_Alias (Ent)) + and then (Alias (Ent)) = Prim + and then + Present (Class_Postconditions (Interface_Alias (Ent))) + then + Iface := Find_Dispatching_Type (Interface_Alias (Ent)); + + -- We only need to locate primitives of additional + -- interfaces implemented by tagged type R (since + -- inherited primitives of parent types that cover + -- primitives of inherited interface types don't + -- need a wrapper). + + Iface_Elmt := First_Elmt (Interfaces (R)); + while Present (Iface_Elmt) loop + if Node (Iface_Elmt) = Iface then + Wrapper_Needed := Postcond_Wrapper; + exit; + end if; + + Next_Elmt (Iface_Elmt); + end loop; + end if; + + Next_Elmt (Elmt); + end loop; + end; + end if; end if; - if Wrapper_Needed + if Wrapper_Needed /= No_Wrapper and then not Is_Abstract_Subprogram (Par_Prim) and then Expander_Active then @@ -2004,6 +2164,14 @@ package body Freeze is DTW_Decl := Make_Subprogram_Declaration (Loc, Specification => DTW_Spec); + -- LSP wrappers reference the parent primitive that has the + -- the class-wide pre/post condition that calls overridden + -- primitives. + + if Wrapper_Needed = LSP_Wrapper then + Set_LSP_Subprogram (DTW_Id, Par_Prim); + end if; + -- The spec of the wrapper has been built using the source -- location of its parent primitive; we must update it now -- (with the source location of the internal primitive built @@ -5810,13 +5978,6 @@ package body Freeze is end loop; end; end if; - - -- For a derived tagged type, check whether inherited primitives - -- might require a wrapper to handle class-wide conditions. - - if Is_Tagged_Type (Rec) and then Is_Derived_Type (Rec) then - Check_Inherited_Conditions (Rec); - end if; end Freeze_Record_Type; ------------------------------- diff --git a/gcc/ada/freeze.ads b/gcc/ada/freeze.ads index 066d8f054f6..4bc03c4ef59 100644 --- a/gcc/ada/freeze.ads +++ b/gcc/ada/freeze.ads @@ -170,11 +170,14 @@ package Freeze is procedure Check_Inherited_Conditions (R : Entity_Id; Late_Overriding : Boolean := False); - -- For a tagged derived type R, create wrappers for inherited operations - -- that have class-wide conditions, so it can be properly rewritten if - -- it involves calls to other overriding primitives. Late_Overriding is - -- True when we are processing the body of a primitive with no previous - -- spec defined after R is frozen (see Check_Dispatching_Operation). + -- R is a derived tagged type or a derived interface type. For a derived + -- interface type R, check strub mode compatibility of its primitives; for + -- a tagged derived type R, in addition to check strub mode compatibility, + -- create wrappers for inherited operations that have class-wide conditions + -- so it can be properly rewritten if it involves calls to other overriding + -- primitives. Late_Overriding is True when we are processing the body of a + -- primitive with no previous spec defined after R is frozen (see procedure + -- Check_Dispatching_Operation). procedure Explode_Initialization_Compound_Statement (E : Entity_Id); -- If Initialization_Statements (E) is an N_Compound_Statement, insert its diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb index e585336ab0e..d065dd8dfda 100644 --- a/gcc/ada/sem_ch13.adb +++ b/gcc/ada/sem_ch13.adb @@ -13027,8 +13027,6 @@ package body Sem_Ch13 is and then Nongeneric_Case and then Ekind (E) = E_Record_Type and then Is_Tagged_Type (E) - and then not Is_Interface (E) - and then Has_Interfaces (E) then -- This would be a good common place to call the routine that checks -- overriding of interface primitives (and thus factorize calls to @@ -13036,7 +13034,22 @@ package body Sem_Ch13 is -- compiler). However, this is not possible because it causes -- spurious errors in case of late overriding. - Add_Internal_Interface_Entities (E); + if Has_Interfaces (E) + and then not Is_Interface (E) + then + Add_Internal_Interface_Entities (E); + end if; + + -- For a derived tagged type, check strub mode compatibility of + -- its primitives and whether inherited primitives might require + -- a wrapper to handle class-wide conditions. For derived interface + -- check strub mode compatibility of its primitives. + + if Is_Derived_Type (E) + and then not In_Generic_Scope (E) + then + Check_Inherited_Conditions (E); + end if; end if; -- After all forms of overriding have been resolved, a tagged type may diff --git a/gcc/ada/sem_disp.adb b/gcc/ada/sem_disp.adb index fd521a09bc0..9c498ee9a3f 100644 --- a/gcc/ada/sem_disp.adb +++ b/gcc/ada/sem_disp.adb @@ -1388,10 +1388,13 @@ package body Sem_Disp is -- 3. Subprograms associated with stream attributes (built by -- New_Stream_Subprogram) or with the Put_Image attribute. - -- 4. Wrappers built for inherited operations with inherited class- - -- wide conditions, where the conditions include calls to other - -- overridden primitives. The wrappers include checks on these - -- modified conditions. (AI12-195). + -- 4. Wrappers built for inherited operations. We have two kinds: + -- * Wrappers built for inherited operations with inherited class- + -- wide conditions, where the conditions include calls to other + -- overridden primitives. The wrappers include checks on these + -- modified conditions (AI12-195). + -- * Wrappers built for inherited operations that implement + -- interface primitives that have class-wide postconditions. -- 5. Declarations built for subprograms without separate specs that -- are eligible for inlining in GNATprove (inside @@ -1419,7 +1422,7 @@ package body Sem_Disp is or else (Is_Wrapper (Subp) - and then Present (LSP_Subprogram (Subp))) + and then Is_Dispatch_Table_Wrapper (Subp)) or else GNATprove_Mode); From patchwork Thu Jun 13 13:33:32 2024 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: 1947415 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=QKUD0uAD; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W0NpK6tSvz20Xd for ; Thu, 13 Jun 2024 23:40:41 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3DE683882643 for ; Thu, 13 Jun 2024 13:40:40 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by sourceware.org (Postfix) with ESMTPS id B3D343882169 for ; Thu, 13 Jun 2024 13:34:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B3D343882169 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 B3D343882169 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::336 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718285666; cv=none; b=RiZGv/zBZVMaoeWMrKPzDiSRhZtQW+3yAKNhE3hWUnFTbBqTJEX+6XqMaO8a2obVrMxQIe2IjszfFSp/+s4glnRH3snFqUtag5OMztmHYGs1UZDdKgDG5HjyXpMMHC6AM3nPSejYVK9RCxMnbHBG6XfQjEjHcaZtHHYm8+UzyNY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718285666; c=relaxed/simple; bh=2bUoCIbQjbAnz3ymTqtdcEmT4zKAcYaPgqTj9VRx3xQ=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=IRrwRmPH71YzUUPYvlqdT8WfkLb5J6KVi9bNEIXapUUb1LnE3qQPx8Hh0AqWM0V5dUJeBH2kV1Lrtz9jlODBXCa8cGhwAv8YlZ5YZWub7rY5gbunQJ0fVucy3jNiD0I5+HoJu3WEWB/3GQakj37VyWqoRDfiVQIprHFyM0j5Gx4= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-4217926991fso9983925e9.3 for ; Thu, 13 Jun 2024 06:34:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1718285650; x=1718890450; 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=DPWdPalwbcz00IyeBFPXfeNEEHfOUC6G9Mj6kZJFkrM=; b=QKUD0uADrV46xSSPTYN4Pmw2IalgcJUHmGcOkI4LLyxr2buYPJxfqeN77XwBFXJXEZ 72bvEHpbtCVoVtiQ5SoEkVBEskXqcI172AbX6tmww1rTKlI8gUr4g3BS7lEEo2Y1JWe8 HYGXJx8BFu6+YcBqB0j7qhYO9WpF6rGuDyK4hf+b7DJ00G2Kt/dR91JHHDR7rJTLyXi1 zohVtlC9+8DQyhHqn7IRbpM1dKenrPc210UtEA/AbjDX0OeIj+cbFhxjhC1DFfpB8Vwi RVxoz++tnST+PsIacu7M7j6wl4JkmisnY6B22ujHMa5/+zR+dI16/p/qDJyJ7Wv0himQ XhEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718285650; x=1718890450; 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=DPWdPalwbcz00IyeBFPXfeNEEHfOUC6G9Mj6kZJFkrM=; b=OQjlGJKNjHkgIbezDdKZhHNKAmQSGfZ428XylTwstJ7GoblyEWFEiK6x9rvMPCNF+6 C/HdoP/6EPNGvxPzbIAZNwmXSKqSZM2bUaXh3Vm6JgzbM94lr6pYnR8Y8g/WNYa2nekS YLC0TF/QFiyU5Z3m3XWjDhmsmoNWzsJuGHUxYQh4OA0I6l+ePQKqfewL4KYNDVJK0s05 vgXzoaxRM6wbPRHXG37Kh5MHzIwIcYCxbk/WcQr9Z/TSI3YjqLWfie4QwxTqG4t1lO6G 1zxctLwMImUN/SYdvEgEXGOTxdclkv3LMvA2ePhY5QgVsaqwiiXPe190j7Lgo2bclxDR 5Xzw== X-Gm-Message-State: AOJu0YyVeaZps3m6Xg2roZ1kTJGWiePccRyd3dkNWcwb9FM+bmt8YbcX qS50ZB7CTtyf1vyrk6KwPRynqqHheuNDKexDdKtbUS1Dt7+I83jwGUh5AD01l6rbJqaGtLIYVZI = X-Google-Smtp-Source: AGHT+IFPjs5fyDF8V6f8NVNle114yGm9ighp6US5Lhgh+qoy2PZMuAu6frEKEO5u4sCixW1C/9qIbg== X-Received: by 2002:a05:600c:468c:b0:421:8445:4f8d with SMTP id 5b1f17b1804b1-422866bf75amr32952815e9.38.1718285650538; Thu, 13 Jun 2024 06:34:10 -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-422870e9145sm62391955e9.22.2024.06.13.06.34.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 06:34:09 -0700 (PDT) From: =?utf-8?q?Marc_Poulhi=C3=A8s?= To: gcc-patches@gcc.gnu.org Cc: Yannick Moy Subject: [COMMITTED 26/30] ada: Fix test for giving hint on ambiguous aggregate Date: Thu, 13 Jun 2024 15:33:32 +0200 Message-ID: <20240613133338.1809385-26-poulhies@adacore.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240613133338.1809385-1-poulhies@adacore.com> References: <20240613133338.1809385-1-poulhies@adacore.com> 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.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org From: Yannick Moy In the case the type of an aggregate cannot be determined due to an ambiguity, caused by the existence of container aggregates, a hint can be given by GNAT. The test for giving this hint should be the Ada language version, not the fact that extensions are allowed. Now fixed. There is no impact on code generation. gcc/ada/ * sem_util.adb (Check_Ambiguous_Aggregate): Fix test. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_util.adb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index e8120c2adda..3d12f552f41 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -2387,7 +2387,7 @@ package body Sem_Util is Actual : Node_Id; begin - if All_Extensions_Allowed then + if Ada_Version >= Ada_2022 then Actual := First_Actual (Call); while Present (Actual) loop if Nkind (Actual) = N_Aggregate then From patchwork Thu Jun 13 13:33:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marc_Poulhi=C3=A8s?= X-Patchwork-Id: 1947426 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=bt6yXEq5; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (unknown [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W0Nxt5dyWz23tw for ; Thu, 13 Jun 2024 23:47:14 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D7CE7388211C for ; Thu, 13 Jun 2024 13:47:02 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by sourceware.org (Postfix) with ESMTPS id 539243882167 for ; Thu, 13 Jun 2024 13:34:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 539243882167 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 539243882167 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::333 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718285675; cv=none; b=tIemAs9K3QGi3zMjBu6gI9nxio8JFB4SHwtKePCj174X8lX3hgjxifWMFoeCFMWqPU0gqpqdZsJ0zTU2iUQ3XtHsDNJOsX3qvS12x4/d6Empa2zxeVNR1lEo18M3k3dWU/LZtfWldYpg5UKykEynGu9D1aMiuSvZT980TdpPBpE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718285675; c=relaxed/simple; bh=MHpXw2JUeGWcor3w7jPGUFPLZKRwTaSC9+fxlaGHmOs=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=jLNcLYuHbmPBGLitvz5hky4hdVbnLVflYsg9h1/2UDUYy13Ql3L2EzaK/8Ryd+trBbGe0/78hmOHEtkFMLqsYNOxkz8/pm1BIaAIAHnj7nqdxSrOzSKbne3MS9Tq/sgiu6a0PhRy/oyeHpiRMQpx9KnQKIWyroLTKHAGx6mmYzA= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-421eab59723so8340635e9.3 for ; Thu, 13 Jun 2024 06:34:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1718285654; x=1718890454; 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=A3N3lUpz80A1/ZcliK7c1puBQSA2Ydb5sNG8MJmXB9o=; b=bt6yXEq5H+0zn43QxW04AJdE2UibG/QDClrqQNT5uEv02/ALU6ELl3rzDdfN8JJ822 /buKGKTwaWGjDGZ4BzG+Sv0NoTYT3o68sZyjwij6fhCFI9ZbYLt/GV6rHOePYTqVWMWs BW6B3X2yzpQKsBnG+UJREglfarS/x/S5tAc6ncysMzttx+STC1p1zsQdvVnRRiT3X2vp YDMw4N/oE/qmXSvKAamCkQZckF55C2klivcrUqmf5gyrgtKYbsQwthZVYFhUkphtrk/o KjHVSEHirZoF87kBMfQ59Ojbt1As7pVL+YQIU1xP91XIjA26+9nBDFcZ3OlF0OMZ8pxh irTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718285654; x=1718890454; 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=A3N3lUpz80A1/ZcliK7c1puBQSA2Ydb5sNG8MJmXB9o=; b=tL+ueaRSHzPzdfWwLY1aCXcfpx/I0kfFL1J2F56qAQRdK2nulBtQ5mzZs7DZ6ajdS3 RqvOeV3nyjHHgxT6w1RiwAmytChCKek8zKPrcJ6Elqt+J1B15tkv/btFvoD5EDbMBwYs ffDzGrNRWyJLh+vs5Jrp1Pjx1uSk10S7KP+eqGiZSc3H687uTAWlq0xg81pR7lWrAYmU QdlCj+DMtlEgpyR6Jres4ghT2Qmyr+M04X+ZsalCKa2lRxhEbn+j5ALGO9J07S97yqxu MA9zYfw+Tx38GfwCLp9nICisvnTGpcDJ+fZBttVb44w/Fe2ucM3pQC1as52oloXhzUSQ +yKQ== X-Gm-Message-State: AOJu0YxD6O7cLmACnQehhwBa1Na6kc0idWLjkfsxkP8oVlXbgKKUAN6I SoK3k3F5Yon98YZrKOWsryU6Vz1GJmnZGzSXSKMCMNwGfUYWJKk5Ag6gvY8aiYOJ+FLhQFFKvw4 = X-Google-Smtp-Source: AGHT+IEobFGEx82W2NcbpRWtvUmddYgKnD9e6EViP0AooG5Q5JBFh0Km9KoDWwlBOUhbAy2fAHCLRw== X-Received: by 2002:a05:600c:4706:b0:421:72f3:33b5 with SMTP id 5b1f17b1804b1-422867c0951mr39465335e9.35.1718285651897; Thu, 13 Jun 2024 06:34:11 -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-422870e9145sm62391955e9.22.2024.06.13.06.34.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 06:34:10 -0700 (PDT) From: =?utf-8?q?Marc_Poulhi=C3=A8s?= To: gcc-patches@gcc.gnu.org Cc: Eric Botcazou Subject: [COMMITTED 27/30] ada: Remove Iterable from list of GNAT-specific attributes Date: Thu, 13 Jun 2024 15:33:33 +0200 Message-ID: <20240613133338.1809385-27-poulhies@adacore.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240613133338.1809385-1-poulhies@adacore.com> References: <20240613133338.1809385-1-poulhies@adacore.com> 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.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org From: Eric Botcazou The attribute is rejected except in attribute definition clauses, where it is silently ignored (it's a by-product of the processing of the aspect). gcc/ada/ * doc/gnat_rm/implementation_defined_attributes.rst (Iterable): Delete entry. * gnat_rm.texi: Regenerate. * gnat_ugn.texi: Regenerate. Tested on x86_64-pc-linux-gnu, committed on master. --- .../implementation_defined_attributes.rst | 6 - gcc/ada/gnat_rm.texi | 1001 ++++++++--------- gcc/ada/gnat_ugn.texi | 2 +- 3 files changed, 496 insertions(+), 513 deletions(-) diff --git a/gcc/ada/doc/gnat_rm/implementation_defined_attributes.rst b/gcc/ada/doc/gnat_rm/implementation_defined_attributes.rst index 877d043f42e..d5a55b920fe 100644 --- a/gcc/ada/doc/gnat_rm/implementation_defined_attributes.rst +++ b/gcc/ada/doc/gnat_rm/implementation_defined_attributes.rst @@ -565,12 +565,6 @@ uninitialized value of the type if pragma Initialize_Scalars is used, including the ability to modify the value with the binder -Sxx flag and relevant environment variables at run time. -Attribute Iterable -================== -.. index:: Iterable - -Equivalent to Aspect Iterable. - Attribute Large =============== .. index:: Ada 83 attributes diff --git a/gcc/ada/gnat_rm.texi b/gcc/ada/gnat_rm.texi index e8fa3079e47..2764ebdaf04 100644 --- a/gcc/ada/gnat_rm.texi +++ b/gcc/ada/gnat_rm.texi @@ -406,7 +406,6 @@ Implementation Defined Attributes * Attribute Initialized:: * Attribute Integer_Value:: * Attribute Invalid_Value:: -* Attribute Iterable:: * Attribute Large:: * Attribute Library_Level:: * Attribute Loop_Entry:: @@ -10250,7 +10249,6 @@ consideration, you should minimize the use of these attributes. * Attribute Initialized:: * Attribute Integer_Value:: * Attribute Invalid_Value:: -* Attribute Iterable:: * Attribute Large:: * Attribute Library_Level:: * Attribute Loop_Entry:: @@ -10929,7 +10927,7 @@ that there are full range checks, to ensure that the result is in range. This attribute is primarily intended for use in implementation of the standard input-output functions for fixed-point values. -@node Attribute Invalid_Value,Attribute Iterable,Attribute Integer_Value,Implementation Defined Attributes +@node Attribute Invalid_Value,Attribute Large,Attribute Integer_Value,Implementation Defined Attributes @anchor{gnat_rm/implementation_defined_attributes attribute-invalid-value}@anchor{194} @section Attribute Invalid_Value @@ -10943,17 +10941,8 @@ uninitialized value of the type if pragma Initialize_Scalars is used, including the ability to modify the value with the binder -Sxx flag and relevant environment variables at run time. -@node Attribute Iterable,Attribute Large,Attribute Invalid_Value,Implementation Defined Attributes -@anchor{gnat_rm/implementation_defined_attributes attribute-iterable}@anchor{195} -@section Attribute Iterable - - -@geindex Iterable - -Equivalent to Aspect Iterable. - -@node Attribute Large,Attribute Library_Level,Attribute Iterable,Implementation Defined Attributes -@anchor{gnat_rm/implementation_defined_attributes attribute-large}@anchor{196} +@node Attribute Large,Attribute Library_Level,Attribute Invalid_Value,Implementation Defined Attributes +@anchor{gnat_rm/implementation_defined_attributes attribute-large}@anchor{195} @section Attribute Large @@ -10966,7 +10955,7 @@ the Ada 83 reference manual for an exact description of the semantics of this attribute. @node Attribute Library_Level,Attribute Loop_Entry,Attribute Large,Implementation Defined Attributes -@anchor{gnat_rm/implementation_defined_attributes attribute-library-level}@anchor{197} +@anchor{gnat_rm/implementation_defined_attributes attribute-library-level}@anchor{196} @section Attribute Library_Level @@ -10992,7 +10981,7 @@ end Gen; @end example @node Attribute Loop_Entry,Attribute Machine_Size,Attribute Library_Level,Implementation Defined Attributes -@anchor{gnat_rm/implementation_defined_attributes attribute-loop-entry}@anchor{198} +@anchor{gnat_rm/implementation_defined_attributes attribute-loop-entry}@anchor{197} @section Attribute Loop_Entry @@ -11025,7 +11014,7 @@ entry. This copy is not performed if the loop is not entered, or if the corresponding pragmas are ignored or disabled. @node Attribute Machine_Size,Attribute Mantissa,Attribute Loop_Entry,Implementation Defined Attributes -@anchor{gnat_rm/implementation_defined_attributes attribute-machine-size}@anchor{199} +@anchor{gnat_rm/implementation_defined_attributes attribute-machine-size}@anchor{198} @section Attribute Machine_Size @@ -11035,7 +11024,7 @@ This attribute is identical to the @code{Object_Size} attribute. It is provided for compatibility with the DEC Ada 83 attribute of this name. @node Attribute Mantissa,Attribute Maximum_Alignment,Attribute Machine_Size,Implementation Defined Attributes -@anchor{gnat_rm/implementation_defined_attributes attribute-mantissa}@anchor{19a} +@anchor{gnat_rm/implementation_defined_attributes attribute-mantissa}@anchor{199} @section Attribute Mantissa @@ -11048,7 +11037,7 @@ the Ada 83 reference manual for an exact description of the semantics of this attribute. @node Attribute Maximum_Alignment,Attribute Max_Integer_Size,Attribute Mantissa,Implementation Defined Attributes -@anchor{gnat_rm/implementation_defined_attributes attribute-maximum-alignment}@anchor{19b}@anchor{gnat_rm/implementation_defined_attributes id2}@anchor{19c} +@anchor{gnat_rm/implementation_defined_attributes attribute-maximum-alignment}@anchor{19a}@anchor{gnat_rm/implementation_defined_attributes id2}@anchor{19b} @section Attribute Maximum_Alignment @@ -11064,7 +11053,7 @@ for an object, guaranteeing that it is properly aligned in all cases. @node Attribute Max_Integer_Size,Attribute Mechanism_Code,Attribute Maximum_Alignment,Implementation Defined Attributes -@anchor{gnat_rm/implementation_defined_attributes attribute-max-integer-size}@anchor{19d} +@anchor{gnat_rm/implementation_defined_attributes attribute-max-integer-size}@anchor{19c} @section Attribute Max_Integer_Size @@ -11075,7 +11064,7 @@ prefix) provides the size of the largest supported integer type for the target. The result is a static constant. @node Attribute Mechanism_Code,Attribute Null_Parameter,Attribute Max_Integer_Size,Implementation Defined Attributes -@anchor{gnat_rm/implementation_defined_attributes attribute-mechanism-code}@anchor{19e} +@anchor{gnat_rm/implementation_defined_attributes attribute-mechanism-code}@anchor{19d} @section Attribute Mechanism_Code @@ -11106,7 +11095,7 @@ by reference @end table @node Attribute Null_Parameter,Attribute Object_Size,Attribute Mechanism_Code,Implementation Defined Attributes -@anchor{gnat_rm/implementation_defined_attributes attribute-null-parameter}@anchor{19f} +@anchor{gnat_rm/implementation_defined_attributes attribute-null-parameter}@anchor{19e} @section Attribute Null_Parameter @@ -11131,7 +11120,7 @@ There is no way of indicating this without the @code{Null_Parameter} attribute. @node Attribute Object_Size,Attribute Old,Attribute Null_Parameter,Implementation Defined Attributes -@anchor{gnat_rm/implementation_defined_attributes attribute-object-size}@anchor{14e}@anchor{gnat_rm/implementation_defined_attributes id3}@anchor{1a0} +@anchor{gnat_rm/implementation_defined_attributes attribute-object-size}@anchor{14e}@anchor{gnat_rm/implementation_defined_attributes id3}@anchor{19f} @section Attribute Object_Size @@ -11201,7 +11190,7 @@ Similar additional checks are performed in other contexts requiring statically matching subtypes. @node Attribute Old,Attribute Passed_By_Reference,Attribute Object_Size,Implementation Defined Attributes -@anchor{gnat_rm/implementation_defined_attributes attribute-old}@anchor{1a1} +@anchor{gnat_rm/implementation_defined_attributes attribute-old}@anchor{1a0} @section Attribute Old @@ -11216,7 +11205,7 @@ definition are allowed under control of implementation defined pragma @code{Unevaluated_Use_Of_Old}. @node Attribute Passed_By_Reference,Attribute Pool_Address,Attribute Old,Implementation Defined Attributes -@anchor{gnat_rm/implementation_defined_attributes attribute-passed-by-reference}@anchor{1a2} +@anchor{gnat_rm/implementation_defined_attributes attribute-passed-by-reference}@anchor{1a1} @section Attribute Passed_By_Reference @@ -11232,7 +11221,7 @@ passed by copy in calls. For scalar types, the result is always @code{False} and is static. For non-scalar types, the result is nonstatic. @node Attribute Pool_Address,Attribute Range_Length,Attribute Passed_By_Reference,Implementation Defined Attributes -@anchor{gnat_rm/implementation_defined_attributes attribute-pool-address}@anchor{1a3} +@anchor{gnat_rm/implementation_defined_attributes attribute-pool-address}@anchor{1a2} @section Attribute Pool_Address @@ -11254,7 +11243,7 @@ For an object created by @code{new}, @code{Ptr.all'Pool_Address} is what is passed to @code{Allocate} and returned from @code{Deallocate}. @node Attribute Range_Length,Attribute Restriction_Set,Attribute Pool_Address,Implementation Defined Attributes -@anchor{gnat_rm/implementation_defined_attributes attribute-range-length}@anchor{1a4} +@anchor{gnat_rm/implementation_defined_attributes attribute-range-length}@anchor{1a3} @section Attribute Range_Length @@ -11267,7 +11256,7 @@ applied to the index subtype of a one dimensional array always gives the same result as @code{Length} applied to the array itself. @node Attribute Restriction_Set,Attribute Result,Attribute Range_Length,Implementation Defined Attributes -@anchor{gnat_rm/implementation_defined_attributes attribute-restriction-set}@anchor{1a5} +@anchor{gnat_rm/implementation_defined_attributes attribute-restriction-set}@anchor{1a4} @section Attribute Restriction_Set @@ -11337,7 +11326,7 @@ Restrictions pragma, they are not analyzed semantically, so they do not have a type. @node Attribute Result,Attribute Round,Attribute Restriction_Set,Implementation Defined Attributes -@anchor{gnat_rm/implementation_defined_attributes attribute-result}@anchor{1a6} +@anchor{gnat_rm/implementation_defined_attributes attribute-result}@anchor{1a5} @section Attribute Result @@ -11350,7 +11339,7 @@ For a further discussion of the use of this attribute and examples of its use, see the description of pragma Postcondition. @node Attribute Round,Attribute Safe_Emax,Attribute Result,Implementation Defined Attributes -@anchor{gnat_rm/implementation_defined_attributes attribute-round}@anchor{1a7} +@anchor{gnat_rm/implementation_defined_attributes attribute-round}@anchor{1a6} @section Attribute Round @@ -11361,7 +11350,7 @@ also permits the use of the @code{'Round} attribute for ordinary fixed point types. @node Attribute Safe_Emax,Attribute Safe_Large,Attribute Round,Implementation Defined Attributes -@anchor{gnat_rm/implementation_defined_attributes attribute-safe-emax}@anchor{1a8} +@anchor{gnat_rm/implementation_defined_attributes attribute-safe-emax}@anchor{1a7} @section Attribute Safe_Emax @@ -11374,7 +11363,7 @@ the Ada 83 reference manual for an exact description of the semantics of this attribute. @node Attribute Safe_Large,Attribute Safe_Small,Attribute Safe_Emax,Implementation Defined Attributes -@anchor{gnat_rm/implementation_defined_attributes attribute-safe-large}@anchor{1a9} +@anchor{gnat_rm/implementation_defined_attributes attribute-safe-large}@anchor{1a8} @section Attribute Safe_Large @@ -11387,7 +11376,7 @@ the Ada 83 reference manual for an exact description of the semantics of this attribute. @node Attribute Safe_Small,Attribute Scalar_Storage_Order,Attribute Safe_Large,Implementation Defined Attributes -@anchor{gnat_rm/implementation_defined_attributes attribute-safe-small}@anchor{1aa} +@anchor{gnat_rm/implementation_defined_attributes attribute-safe-small}@anchor{1a9} @section Attribute Safe_Small @@ -11400,7 +11389,7 @@ the Ada 83 reference manual for an exact description of the semantics of this attribute. @node Attribute Scalar_Storage_Order,Attribute Simple_Storage_Pool,Attribute Safe_Small,Implementation Defined Attributes -@anchor{gnat_rm/implementation_defined_attributes attribute-scalar-storage-order}@anchor{15c}@anchor{gnat_rm/implementation_defined_attributes id4}@anchor{1ab} +@anchor{gnat_rm/implementation_defined_attributes attribute-scalar-storage-order}@anchor{15c}@anchor{gnat_rm/implementation_defined_attributes id4}@anchor{1aa} @section Attribute Scalar_Storage_Order @@ -11563,7 +11552,7 @@ Note that debuggers may be unable to display the correct value of scalar components of a type for which the opposite storage order is specified. @node Attribute Simple_Storage_Pool,Attribute Small,Attribute Scalar_Storage_Order,Implementation Defined Attributes -@anchor{gnat_rm/implementation_defined_attributes attribute-simple-storage-pool}@anchor{ec}@anchor{gnat_rm/implementation_defined_attributes id5}@anchor{1ac} +@anchor{gnat_rm/implementation_defined_attributes attribute-simple-storage-pool}@anchor{ec}@anchor{gnat_rm/implementation_defined_attributes id5}@anchor{1ab} @section Attribute Simple_Storage_Pool @@ -11626,7 +11615,7 @@ as defined in section 13.11.2 of the Ada Reference Manual, except that the term `simple storage pool' is substituted for `storage pool'. @node Attribute Small,Attribute Small_Denominator,Attribute Simple_Storage_Pool,Implementation Defined Attributes -@anchor{gnat_rm/implementation_defined_attributes attribute-small}@anchor{1ad} +@anchor{gnat_rm/implementation_defined_attributes attribute-small}@anchor{1ac} @section Attribute Small @@ -11642,7 +11631,7 @@ the Ada 83 reference manual for an exact description of the semantics of this attribute when applied to floating-point types. @node Attribute Small_Denominator,Attribute Small_Numerator,Attribute Small,Implementation Defined Attributes -@anchor{gnat_rm/implementation_defined_attributes attribute-small-denominator}@anchor{1ae} +@anchor{gnat_rm/implementation_defined_attributes attribute-small-denominator}@anchor{1ad} @section Attribute Small_Denominator @@ -11655,7 +11644,7 @@ denominator in the representation of @code{typ'Small} as a rational number with coprime factors (i.e. as an irreducible fraction). @node Attribute Small_Numerator,Attribute Storage_Unit,Attribute Small_Denominator,Implementation Defined Attributes -@anchor{gnat_rm/implementation_defined_attributes attribute-small-numerator}@anchor{1af} +@anchor{gnat_rm/implementation_defined_attributes attribute-small-numerator}@anchor{1ae} @section Attribute Small_Numerator @@ -11668,7 +11657,7 @@ numerator in the representation of @code{typ'Small} as a rational number with coprime factors (i.e. as an irreducible fraction). @node Attribute Storage_Unit,Attribute Stub_Type,Attribute Small_Numerator,Implementation Defined Attributes -@anchor{gnat_rm/implementation_defined_attributes attribute-storage-unit}@anchor{1b0} +@anchor{gnat_rm/implementation_defined_attributes attribute-storage-unit}@anchor{1af} @section Attribute Storage_Unit @@ -11678,7 +11667,7 @@ with coprime factors (i.e. as an irreducible fraction). prefix) provides the same value as @code{System.Storage_Unit}. @node Attribute Stub_Type,Attribute Super,Attribute Storage_Unit,Implementation Defined Attributes -@anchor{gnat_rm/implementation_defined_attributes attribute-stub-type}@anchor{1b1} +@anchor{gnat_rm/implementation_defined_attributes attribute-stub-type}@anchor{1b0} @section Attribute Stub_Type @@ -11702,7 +11691,7 @@ unit @code{System.Partition_Interface}. Use of this attribute will create an implicit dependency on this unit. @node Attribute Super,Attribute System_Allocator_Alignment,Attribute Stub_Type,Implementation Defined Attributes -@anchor{gnat_rm/implementation_defined_attributes attribute-super}@anchor{1b2} +@anchor{gnat_rm/implementation_defined_attributes attribute-super}@anchor{1b1} @section Attribute Super @@ -11729,7 +11718,7 @@ end; @end example @node Attribute System_Allocator_Alignment,Attribute Target_Name,Attribute Super,Implementation Defined Attributes -@anchor{gnat_rm/implementation_defined_attributes attribute-system-allocator-alignment}@anchor{1b3} +@anchor{gnat_rm/implementation_defined_attributes attribute-system-allocator-alignment}@anchor{1b2} @section Attribute System_Allocator_Alignment @@ -11746,7 +11735,7 @@ with alignment too large or to enable a realignment circuitry if the alignment request is larger than this value. @node Attribute Target_Name,Attribute To_Address,Attribute System_Allocator_Alignment,Implementation Defined Attributes -@anchor{gnat_rm/implementation_defined_attributes attribute-target-name}@anchor{1b4} +@anchor{gnat_rm/implementation_defined_attributes attribute-target-name}@anchor{1b3} @section Attribute Target_Name @@ -11759,7 +11748,7 @@ standard gcc target name without the terminating slash (for example, GNAT 5.0 on windows yields “i586-pc-mingw32msv”). @node Attribute To_Address,Attribute To_Any,Attribute Target_Name,Implementation Defined Attributes -@anchor{gnat_rm/implementation_defined_attributes attribute-to-address}@anchor{1b5} +@anchor{gnat_rm/implementation_defined_attributes attribute-to-address}@anchor{1b4} @section Attribute To_Address @@ -11782,7 +11771,7 @@ modular manner (e.g., -1 means the same as 16#FFFF_FFFF# on a 32 bits machine). @node Attribute To_Any,Attribute Type_Class,Attribute To_Address,Implementation Defined Attributes -@anchor{gnat_rm/implementation_defined_attributes attribute-to-any}@anchor{1b6} +@anchor{gnat_rm/implementation_defined_attributes attribute-to-any}@anchor{1b5} @section Attribute To_Any @@ -11792,7 +11781,7 @@ This internal attribute is used for the generation of remote subprogram stubs in the context of the Distributed Systems Annex. @node Attribute Type_Class,Attribute Type_Key,Attribute To_Any,Implementation Defined Attributes -@anchor{gnat_rm/implementation_defined_attributes attribute-type-class}@anchor{1b7} +@anchor{gnat_rm/implementation_defined_attributes attribute-type-class}@anchor{1b6} @section Attribute Type_Class @@ -11822,7 +11811,7 @@ applies to all concurrent types. This attribute is designed to be compatible with the DEC Ada 83 attribute of the same name. @node Attribute Type_Key,Attribute TypeCode,Attribute Type_Class,Implementation Defined Attributes -@anchor{gnat_rm/implementation_defined_attributes attribute-type-key}@anchor{1b8} +@anchor{gnat_rm/implementation_defined_attributes attribute-type-key}@anchor{1b7} @section Attribute Type_Key @@ -11834,7 +11823,7 @@ about the type or subtype. This provides improved compatibility with other implementations that support this attribute. @node Attribute TypeCode,Attribute Unconstrained_Array,Attribute Type_Key,Implementation Defined Attributes -@anchor{gnat_rm/implementation_defined_attributes attribute-typecode}@anchor{1b9} +@anchor{gnat_rm/implementation_defined_attributes attribute-typecode}@anchor{1b8} @section Attribute TypeCode @@ -11844,7 +11833,7 @@ This internal attribute is used for the generation of remote subprogram stubs in the context of the Distributed Systems Annex. @node Attribute Unconstrained_Array,Attribute Universal_Literal_String,Attribute TypeCode,Implementation Defined Attributes -@anchor{gnat_rm/implementation_defined_attributes attribute-unconstrained-array}@anchor{1ba} +@anchor{gnat_rm/implementation_defined_attributes attribute-unconstrained-array}@anchor{1b9} @section Attribute Unconstrained_Array @@ -11858,7 +11847,7 @@ still static, and yields the result of applying this test to the generic actual. @node Attribute Universal_Literal_String,Attribute Unrestricted_Access,Attribute Unconstrained_Array,Implementation Defined Attributes -@anchor{gnat_rm/implementation_defined_attributes attribute-universal-literal-string}@anchor{1bb} +@anchor{gnat_rm/implementation_defined_attributes attribute-universal-literal-string}@anchor{1ba} @section Attribute Universal_Literal_String @@ -11886,7 +11875,7 @@ end; @end example @node Attribute Unrestricted_Access,Attribute Update,Attribute Universal_Literal_String,Implementation Defined Attributes -@anchor{gnat_rm/implementation_defined_attributes attribute-unrestricted-access}@anchor{1bc} +@anchor{gnat_rm/implementation_defined_attributes attribute-unrestricted-access}@anchor{1bb} @section Attribute Unrestricted_Access @@ -12073,7 +12062,7 @@ In general this is a risky approach. It may appear to “work” but such uses o of GNAT to another, so are best avoided if possible. @node Attribute Update,Attribute Valid_Value,Attribute Unrestricted_Access,Implementation Defined Attributes -@anchor{gnat_rm/implementation_defined_attributes attribute-update}@anchor{1bd} +@anchor{gnat_rm/implementation_defined_attributes attribute-update}@anchor{1bc} @section Attribute Update @@ -12154,7 +12143,7 @@ A := A'Update ((1, 2) => 20, (3, 4) => 30); which changes element (1,2) to 20 and (3,4) to 30. @node Attribute Valid_Value,Attribute Valid_Scalars,Attribute Update,Implementation Defined Attributes -@anchor{gnat_rm/implementation_defined_attributes attribute-valid-value}@anchor{1be} +@anchor{gnat_rm/implementation_defined_attributes attribute-valid-value}@anchor{1bd} @section Attribute Valid_Value @@ -12166,7 +12155,7 @@ a String, and returns Boolean. @code{T'Valid_Value (S)} returns True if and only if @code{T'Value (S)} would not raise Constraint_Error. @node Attribute Valid_Scalars,Attribute VADS_Size,Attribute Valid_Value,Implementation Defined Attributes -@anchor{gnat_rm/implementation_defined_attributes attribute-valid-scalars}@anchor{1bf} +@anchor{gnat_rm/implementation_defined_attributes attribute-valid-scalars}@anchor{1be} @section Attribute Valid_Scalars @@ -12200,7 +12189,7 @@ write a function with a single use of the attribute, and then call that function from multiple places. @node Attribute VADS_Size,Attribute Value_Size,Attribute Valid_Scalars,Implementation Defined Attributes -@anchor{gnat_rm/implementation_defined_attributes attribute-vads-size}@anchor{1c0} +@anchor{gnat_rm/implementation_defined_attributes attribute-vads-size}@anchor{1bf} @section Attribute VADS_Size @@ -12220,7 +12209,7 @@ gives the result that would be obtained by applying the attribute to the corresponding type. @node Attribute Value_Size,Attribute Wchar_T_Size,Attribute VADS_Size,Implementation Defined Attributes -@anchor{gnat_rm/implementation_defined_attributes attribute-value-size}@anchor{16c}@anchor{gnat_rm/implementation_defined_attributes id6}@anchor{1c1} +@anchor{gnat_rm/implementation_defined_attributes attribute-value-size}@anchor{16c}@anchor{gnat_rm/implementation_defined_attributes id6}@anchor{1c0} @section Attribute Value_Size @@ -12234,7 +12223,7 @@ a value of the given subtype. It is the same as @code{type'Size}, but, unlike @code{Size}, may be set for non-first subtypes. @node Attribute Wchar_T_Size,Attribute Word_Size,Attribute Value_Size,Implementation Defined Attributes -@anchor{gnat_rm/implementation_defined_attributes attribute-wchar-t-size}@anchor{1c2} +@anchor{gnat_rm/implementation_defined_attributes attribute-wchar-t-size}@anchor{1c1} @section Attribute Wchar_T_Size @@ -12246,7 +12235,7 @@ primarily for constructing the definition of this type in package @code{Interfaces.C}. The result is a static constant. @node Attribute Word_Size,,Attribute Wchar_T_Size,Implementation Defined Attributes -@anchor{gnat_rm/implementation_defined_attributes attribute-word-size}@anchor{1c3} +@anchor{gnat_rm/implementation_defined_attributes attribute-word-size}@anchor{1c2} @section Attribute Word_Size @@ -12257,7 +12246,7 @@ prefix) provides the value @code{System.Word_Size}. The result is a static constant. @node Standard and Implementation Defined Restrictions,Implementation Advice,Implementation Defined Attributes,Top -@anchor{gnat_rm/standard_and_implementation_defined_restrictions doc}@anchor{1c4}@anchor{gnat_rm/standard_and_implementation_defined_restrictions id1}@anchor{1c5}@anchor{gnat_rm/standard_and_implementation_defined_restrictions standard-and-implementation-defined-restrictions}@anchor{9} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions doc}@anchor{1c3}@anchor{gnat_rm/standard_and_implementation_defined_restrictions id1}@anchor{1c4}@anchor{gnat_rm/standard_and_implementation_defined_restrictions standard-and-implementation-defined-restrictions}@anchor{9} @chapter Standard and Implementation Defined Restrictions @@ -12286,7 +12275,7 @@ language defined or GNAT-specific, are listed in the following. @end menu @node Partition-Wide Restrictions,Program Unit Level Restrictions,,Standard and Implementation Defined Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions id2}@anchor{1c6}@anchor{gnat_rm/standard_and_implementation_defined_restrictions partition-wide-restrictions}@anchor{1c7} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions id2}@anchor{1c5}@anchor{gnat_rm/standard_and_implementation_defined_restrictions partition-wide-restrictions}@anchor{1c6} @section Partition-Wide Restrictions @@ -12379,7 +12368,7 @@ then all compilation units in the partition must obey the restriction). @end menu @node Immediate_Reclamation,Max_Asynchronous_Select_Nesting,,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions immediate-reclamation}@anchor{1c8} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions immediate-reclamation}@anchor{1c7} @subsection Immediate_Reclamation @@ -12391,7 +12380,7 @@ deallocation, any storage reserved at run time for an object is immediately reclaimed when the object no longer exists. @node Max_Asynchronous_Select_Nesting,Max_Entry_Queue_Length,Immediate_Reclamation,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions max-asynchronous-select-nesting}@anchor{1c9} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions max-asynchronous-select-nesting}@anchor{1c8} @subsection Max_Asynchronous_Select_Nesting @@ -12403,7 +12392,7 @@ detected at compile time. Violations of this restriction with values other than zero cause Storage_Error to be raised. @node Max_Entry_Queue_Length,Max_Protected_Entries,Max_Asynchronous_Select_Nesting,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions max-entry-queue-length}@anchor{1ca} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions max-entry-queue-length}@anchor{1c9} @subsection Max_Entry_Queue_Length @@ -12424,7 +12413,7 @@ compatibility purposes (and a warning will be generated for its use if warnings on obsolescent features are activated). @node Max_Protected_Entries,Max_Select_Alternatives,Max_Entry_Queue_Length,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions max-protected-entries}@anchor{1cb} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions max-protected-entries}@anchor{1ca} @subsection Max_Protected_Entries @@ -12435,7 +12424,7 @@ bounds of every entry family of a protected unit shall be static, or shall be defined by a discriminant of a subtype whose corresponding bound is static. @node Max_Select_Alternatives,Max_Storage_At_Blocking,Max_Protected_Entries,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions max-select-alternatives}@anchor{1cc} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions max-select-alternatives}@anchor{1cb} @subsection Max_Select_Alternatives @@ -12444,7 +12433,7 @@ defined by a discriminant of a subtype whose corresponding bound is static. [RM D.7] Specifies the maximum number of alternatives in a selective accept. @node Max_Storage_At_Blocking,Max_Task_Entries,Max_Select_Alternatives,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions max-storage-at-blocking}@anchor{1cd} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions max-storage-at-blocking}@anchor{1cc} @subsection Max_Storage_At_Blocking @@ -12455,7 +12444,7 @@ Storage_Size that can be retained by a blocked task. A violation of this restriction causes Storage_Error to be raised. @node Max_Task_Entries,Max_Tasks,Max_Storage_At_Blocking,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions max-task-entries}@anchor{1ce} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions max-task-entries}@anchor{1cd} @subsection Max_Task_Entries @@ -12468,7 +12457,7 @@ defined by a discriminant of a subtype whose corresponding bound is static. @node Max_Tasks,No_Abort_Statements,Max_Task_Entries,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions max-tasks}@anchor{1cf} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions max-tasks}@anchor{1ce} @subsection Max_Tasks @@ -12481,7 +12470,7 @@ time. Violations of this restriction with values other than zero cause Storage_Error to be raised. @node No_Abort_Statements,No_Access_Parameter_Allocators,Max_Tasks,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-abort-statements}@anchor{1d0} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-abort-statements}@anchor{1cf} @subsection No_Abort_Statements @@ -12491,7 +12480,7 @@ Storage_Error to be raised. no calls to Task_Identification.Abort_Task. @node No_Access_Parameter_Allocators,No_Access_Subprograms,No_Abort_Statements,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-access-parameter-allocators}@anchor{1d1} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-access-parameter-allocators}@anchor{1d0} @subsection No_Access_Parameter_Allocators @@ -12502,7 +12491,7 @@ occurrences of an allocator as the actual parameter to an access parameter. @node No_Access_Subprograms,No_Allocators,No_Access_Parameter_Allocators,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-access-subprograms}@anchor{1d2} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-access-subprograms}@anchor{1d1} @subsection No_Access_Subprograms @@ -12512,7 +12501,7 @@ parameter. declarations of access-to-subprogram types. @node No_Allocators,No_Anonymous_Allocators,No_Access_Subprograms,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-allocators}@anchor{1d3} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-allocators}@anchor{1d2} @subsection No_Allocators @@ -12522,7 +12511,7 @@ declarations of access-to-subprogram types. occurrences of an allocator. @node No_Anonymous_Allocators,No_Asynchronous_Control,No_Allocators,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-anonymous-allocators}@anchor{1d4} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-anonymous-allocators}@anchor{1d3} @subsection No_Anonymous_Allocators @@ -12532,7 +12521,7 @@ occurrences of an allocator. occurrences of an allocator of anonymous access type. @node No_Asynchronous_Control,No_Calendar,No_Anonymous_Allocators,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-asynchronous-control}@anchor{1d5} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-asynchronous-control}@anchor{1d4} @subsection No_Asynchronous_Control @@ -12542,7 +12531,7 @@ occurrences of an allocator of anonymous access type. dependences on the predefined package Asynchronous_Task_Control. @node No_Calendar,No_Coextensions,No_Asynchronous_Control,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-calendar}@anchor{1d6} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-calendar}@anchor{1d5} @subsection No_Calendar @@ -12552,7 +12541,7 @@ dependences on the predefined package Asynchronous_Task_Control. dependences on package Calendar. @node No_Coextensions,No_Default_Initialization,No_Calendar,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-coextensions}@anchor{1d7} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-coextensions}@anchor{1d6} @subsection No_Coextensions @@ -12562,7 +12551,7 @@ dependences on package Calendar. coextensions. See 3.10.2. @node No_Default_Initialization,No_Delay,No_Coextensions,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-default-initialization}@anchor{1d8} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-default-initialization}@anchor{1d7} @subsection No_Default_Initialization @@ -12579,7 +12568,7 @@ is to prohibit all cases of variables declared without a specific initializer (including the case of OUT scalar parameters). @node No_Delay,No_Dependence,No_Default_Initialization,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-delay}@anchor{1d9} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-delay}@anchor{1d8} @subsection No_Delay @@ -12589,7 +12578,7 @@ initializer (including the case of OUT scalar parameters). delay statements and no semantic dependences on package Calendar. @node No_Dependence,No_Direct_Boolean_Operators,No_Delay,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-dependence}@anchor{1da} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-dependence}@anchor{1d9} @subsection No_Dependence @@ -12632,7 +12621,7 @@ to support specific constructs of the language. Here are some examples: @end itemize @node No_Direct_Boolean_Operators,No_Dispatch,No_Dependence,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-direct-boolean-operators}@anchor{1db} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-direct-boolean-operators}@anchor{1da} @subsection No_Direct_Boolean_Operators @@ -12645,7 +12634,7 @@ protocol requires the use of short-circuit (and then, or else) forms for all composite boolean operations. @node No_Dispatch,No_Dispatching_Calls,No_Direct_Boolean_Operators,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-dispatch}@anchor{1dc} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-dispatch}@anchor{1db} @subsection No_Dispatch @@ -12655,7 +12644,7 @@ composite boolean operations. occurrences of @code{T'Class}, for any (tagged) subtype @code{T}. @node No_Dispatching_Calls,No_Dynamic_Attachment,No_Dispatch,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-dispatching-calls}@anchor{1dd} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-dispatching-calls}@anchor{1dc} @subsection No_Dispatching_Calls @@ -12716,7 +12705,7 @@ end Example; @end example @node No_Dynamic_Attachment,No_Dynamic_Priorities,No_Dispatching_Calls,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-dynamic-attachment}@anchor{1de} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-dynamic-attachment}@anchor{1dd} @subsection No_Dynamic_Attachment @@ -12735,7 +12724,7 @@ compatibility purposes (and a warning will be generated for its use if warnings on obsolescent features are activated). @node No_Dynamic_Priorities,No_Entry_Calls_In_Elaboration_Code,No_Dynamic_Attachment,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-dynamic-priorities}@anchor{1df} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-dynamic-priorities}@anchor{1de} @subsection No_Dynamic_Priorities @@ -12744,7 +12733,7 @@ warnings on obsolescent features are activated). [RM D.7] There are no semantic dependencies on the package Dynamic_Priorities. @node No_Entry_Calls_In_Elaboration_Code,No_Enumeration_Maps,No_Dynamic_Priorities,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-entry-calls-in-elaboration-code}@anchor{1e0} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-entry-calls-in-elaboration-code}@anchor{1df} @subsection No_Entry_Calls_In_Elaboration_Code @@ -12756,7 +12745,7 @@ restriction, the compiler can assume that no code past an accept statement in a task can be executed at elaboration time. @node No_Enumeration_Maps,No_Exception_Handlers,No_Entry_Calls_In_Elaboration_Code,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-enumeration-maps}@anchor{1e1} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-enumeration-maps}@anchor{1e0} @subsection No_Enumeration_Maps @@ -12767,7 +12756,7 @@ enumeration maps are used (that is Image and Value attributes applied to enumeration types). @node No_Exception_Handlers,No_Exception_Propagation,No_Enumeration_Maps,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-exception-handlers}@anchor{1e2} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-exception-handlers}@anchor{1e1} @subsection No_Exception_Handlers @@ -12792,7 +12781,7 @@ statement generated by the compiler). The Line parameter when nonzero represents the line number in the source program where the raise occurs. @node No_Exception_Propagation,No_Exception_Registration,No_Exception_Handlers,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-exception-propagation}@anchor{1e3} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-exception-propagation}@anchor{1e2} @subsection No_Exception_Propagation @@ -12809,7 +12798,7 @@ the package GNAT.Current_Exception is not permitted, and reraise statements (raise with no operand) are not permitted. @node No_Exception_Registration,No_Exceptions,No_Exception_Propagation,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-exception-registration}@anchor{1e4} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-exception-registration}@anchor{1e3} @subsection No_Exception_Registration @@ -12823,7 +12812,7 @@ code is simplified by omitting the otherwise-required global registration of exceptions when they are declared. @node No_Exceptions,No_Finalization,No_Exception_Registration,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-exceptions}@anchor{1e5} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-exceptions}@anchor{1e4} @subsection No_Exceptions @@ -12834,7 +12823,7 @@ raise statements and no exception handlers and also suppresses the generation of language-defined run-time checks. @node No_Finalization,No_Fixed_Point,No_Exceptions,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-finalization}@anchor{1e6} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-finalization}@anchor{1e5} @subsection No_Finalization @@ -12875,7 +12864,7 @@ object or a nested component, either declared on the stack or on the heap. The deallocation of a controlled object no longer finalizes its contents. @node No_Fixed_Point,No_Floating_Point,No_Finalization,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-fixed-point}@anchor{1e7} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-fixed-point}@anchor{1e6} @subsection No_Fixed_Point @@ -12885,7 +12874,7 @@ deallocation of a controlled object no longer finalizes its contents. occurrences of fixed point types and operations. @node No_Floating_Point,No_Implicit_Conditionals,No_Fixed_Point,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-floating-point}@anchor{1e8} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-floating-point}@anchor{1e7} @subsection No_Floating_Point @@ -12895,7 +12884,7 @@ occurrences of fixed point types and operations. occurrences of floating point types and operations. @node No_Implicit_Conditionals,No_Implicit_Dynamic_Code,No_Floating_Point,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-implicit-conditionals}@anchor{1e9} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-implicit-conditionals}@anchor{1e8} @subsection No_Implicit_Conditionals @@ -12911,7 +12900,7 @@ normal manner. Constructs generating implicit conditionals include comparisons of composite objects and the Max/Min attributes. @node No_Implicit_Dynamic_Code,No_Implicit_Heap_Allocations,No_Implicit_Conditionals,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-implicit-dynamic-code}@anchor{1ea} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-implicit-dynamic-code}@anchor{1e9} @subsection No_Implicit_Dynamic_Code @@ -12941,7 +12930,7 @@ foreign-language convention; primitive operations of nested tagged types. @node No_Implicit_Heap_Allocations,No_Implicit_Protected_Object_Allocations,No_Implicit_Dynamic_Code,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-implicit-heap-allocations}@anchor{1eb} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-implicit-heap-allocations}@anchor{1ea} @subsection No_Implicit_Heap_Allocations @@ -12950,7 +12939,7 @@ types. [RM D.7] No constructs are allowed to cause implicit heap allocation. @node No_Implicit_Protected_Object_Allocations,No_Implicit_Task_Allocations,No_Implicit_Heap_Allocations,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-implicit-protected-object-allocations}@anchor{1ec} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-implicit-protected-object-allocations}@anchor{1eb} @subsection No_Implicit_Protected_Object_Allocations @@ -12960,7 +12949,7 @@ types. protected object. @node No_Implicit_Task_Allocations,No_Initialize_Scalars,No_Implicit_Protected_Object_Allocations,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-implicit-task-allocations}@anchor{1ed} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-implicit-task-allocations}@anchor{1ec} @subsection No_Implicit_Task_Allocations @@ -12969,7 +12958,7 @@ protected object. [GNAT] No constructs are allowed to cause implicit heap allocation of a task. @node No_Initialize_Scalars,No_IO,No_Implicit_Task_Allocations,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-initialize-scalars}@anchor{1ee} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-initialize-scalars}@anchor{1ed} @subsection No_Initialize_Scalars @@ -12981,7 +12970,7 @@ code, and in particular eliminates dummy null initialization routines that are otherwise generated for some record and array types. @node No_IO,No_Local_Allocators,No_Initialize_Scalars,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-io}@anchor{1ef} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-io}@anchor{1ee} @subsection No_IO @@ -12992,7 +12981,7 @@ dependences on any of the library units Sequential_IO, Direct_IO, Text_IO, Wide_Text_IO, Wide_Wide_Text_IO, or Stream_IO. @node No_Local_Allocators,No_Local_Protected_Objects,No_IO,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-local-allocators}@anchor{1f0} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-local-allocators}@anchor{1ef} @subsection No_Local_Allocators @@ -13003,7 +12992,7 @@ occurrences of an allocator in subprograms, generic subprograms, tasks, and entry bodies. @node No_Local_Protected_Objects,No_Local_Tagged_Types,No_Local_Allocators,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-local-protected-objects}@anchor{1f1} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-local-protected-objects}@anchor{1f0} @subsection No_Local_Protected_Objects @@ -13013,7 +13002,7 @@ and entry bodies. only declared at the library level. @node No_Local_Tagged_Types,No_Local_Timing_Events,No_Local_Protected_Objects,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-local-tagged-types}@anchor{1f2} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-local-tagged-types}@anchor{1f1} @subsection No_Local_Tagged_Types @@ -13023,7 +13012,7 @@ only declared at the library level. declared at the library level. @node No_Local_Timing_Events,No_Long_Long_Integers,No_Local_Tagged_Types,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-local-timing-events}@anchor{1f3} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-local-timing-events}@anchor{1f2} @subsection No_Local_Timing_Events @@ -13033,7 +13022,7 @@ declared at the library level. declared at the library level. @node No_Long_Long_Integers,No_Multiple_Elaboration,No_Local_Timing_Events,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-long-long-integers}@anchor{1f4} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-long-long-integers}@anchor{1f3} @subsection No_Long_Long_Integers @@ -13045,7 +13034,7 @@ implicit base type is Long_Long_Integer, and modular types whose size exceeds Long_Integer’Size. @node No_Multiple_Elaboration,No_Nested_Finalization,No_Long_Long_Integers,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-multiple-elaboration}@anchor{1f5} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-multiple-elaboration}@anchor{1f4} @subsection No_Multiple_Elaboration @@ -13061,7 +13050,7 @@ possible, including non-Ada main programs and Stand Alone libraries, are not permitted and will be diagnosed by the binder. @node No_Nested_Finalization,No_Protected_Type_Allocators,No_Multiple_Elaboration,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-nested-finalization}@anchor{1f6} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-nested-finalization}@anchor{1f5} @subsection No_Nested_Finalization @@ -13070,7 +13059,7 @@ permitted and will be diagnosed by the binder. [RM D.7] All objects requiring finalization are declared at the library level. @node No_Protected_Type_Allocators,No_Protected_Types,No_Nested_Finalization,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-protected-type-allocators}@anchor{1f7} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-protected-type-allocators}@anchor{1f6} @subsection No_Protected_Type_Allocators @@ -13080,7 +13069,7 @@ permitted and will be diagnosed by the binder. expressions that attempt to allocate protected objects. @node No_Protected_Types,No_Recursion,No_Protected_Type_Allocators,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-protected-types}@anchor{1f8} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-protected-types}@anchor{1f7} @subsection No_Protected_Types @@ -13090,7 +13079,7 @@ expressions that attempt to allocate protected objects. declarations of protected types or protected objects. @node No_Recursion,No_Reentrancy,No_Protected_Types,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-recursion}@anchor{1f9} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-recursion}@anchor{1f8} @subsection No_Recursion @@ -13100,7 +13089,7 @@ declarations of protected types or protected objects. part of its execution. @node No_Reentrancy,No_Relative_Delay,No_Recursion,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-reentrancy}@anchor{1fa} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-reentrancy}@anchor{1f9} @subsection No_Reentrancy @@ -13110,7 +13099,7 @@ part of its execution. two tasks at the same time. @node No_Relative_Delay,No_Requeue_Statements,No_Reentrancy,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-relative-delay}@anchor{1fb} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-relative-delay}@anchor{1fa} @subsection No_Relative_Delay @@ -13121,7 +13110,7 @@ relative statements and prevents expressions such as @code{delay 1.23;} from appearing in source code. @node No_Requeue_Statements,No_Secondary_Stack,No_Relative_Delay,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-requeue-statements}@anchor{1fc} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-requeue-statements}@anchor{1fb} @subsection No_Requeue_Statements @@ -13139,7 +13128,7 @@ compatibility purposes (and a warning will be generated for its use if warnings on oNobsolescent features are activated). @node No_Secondary_Stack,No_Select_Statements,No_Requeue_Statements,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-secondary-stack}@anchor{1fd} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-secondary-stack}@anchor{1fc} @subsection No_Secondary_Stack @@ -13152,7 +13141,7 @@ stack is used to implement functions returning unconstrained objects secondary stacks for tasks (excluding the environment task) at run time. @node No_Select_Statements,No_Specific_Termination_Handlers,No_Secondary_Stack,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-select-statements}@anchor{1fe} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-select-statements}@anchor{1fd} @subsection No_Select_Statements @@ -13162,7 +13151,7 @@ secondary stacks for tasks (excluding the environment task) at run time. kind are permitted, that is the keyword @code{select} may not appear. @node No_Specific_Termination_Handlers,No_Specification_of_Aspect,No_Select_Statements,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-specific-termination-handlers}@anchor{1ff} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-specific-termination-handlers}@anchor{1fe} @subsection No_Specific_Termination_Handlers @@ -13172,7 +13161,7 @@ kind are permitted, that is the keyword @code{select} may not appear. or to Ada.Task_Termination.Specific_Handler. @node No_Specification_of_Aspect,No_Standard_Allocators_After_Elaboration,No_Specific_Termination_Handlers,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-specification-of-aspect}@anchor{200} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-specification-of-aspect}@anchor{1ff} @subsection No_Specification_of_Aspect @@ -13183,7 +13172,7 @@ specification, attribute definition clause, or pragma is given for a given aspect. @node No_Standard_Allocators_After_Elaboration,No_Standard_Storage_Pools,No_Specification_of_Aspect,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-standard-allocators-after-elaboration}@anchor{201} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-standard-allocators-after-elaboration}@anchor{200} @subsection No_Standard_Allocators_After_Elaboration @@ -13195,7 +13184,7 @@ library items of the partition has completed. Otherwise, Storage_Error is raised. @node No_Standard_Storage_Pools,No_Stream_Optimizations,No_Standard_Allocators_After_Elaboration,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-standard-storage-pools}@anchor{202} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-standard-storage-pools}@anchor{201} @subsection No_Standard_Storage_Pools @@ -13207,7 +13196,7 @@ have an explicit Storage_Pool attribute defined specifying a user-defined storage pool. @node No_Stream_Optimizations,No_Streams,No_Standard_Storage_Pools,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-stream-optimizations}@anchor{203} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-stream-optimizations}@anchor{202} @subsection No_Stream_Optimizations @@ -13220,7 +13209,7 @@ due to their superior performance. When this restriction is in effect, the compiler performs all IO operations on a per-character basis. @node No_Streams,No_Tagged_Type_Registration,No_Stream_Optimizations,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-streams}@anchor{204} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-streams}@anchor{203} @subsection No_Streams @@ -13247,7 +13236,7 @@ configuration pragmas to avoid exposing entity names at binary level for the entire partition. @node No_Tagged_Type_Registration,No_Task_Allocators,No_Streams,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-tagged-type-registration}@anchor{205} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-tagged-type-registration}@anchor{204} @subsection No_Tagged_Type_Registration @@ -13262,7 +13251,7 @@ are declared. This restriction may be necessary in order to also apply the No_Elaboration_Code restriction. @node No_Task_Allocators,No_Task_At_Interrupt_Priority,No_Tagged_Type_Registration,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-task-allocators}@anchor{206} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-task-allocators}@anchor{205} @subsection No_Task_Allocators @@ -13272,7 +13261,7 @@ the No_Elaboration_Code restriction. or types containing task subcomponents. @node No_Task_At_Interrupt_Priority,No_Task_Attributes_Package,No_Task_Allocators,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-task-at-interrupt-priority}@anchor{207} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-task-at-interrupt-priority}@anchor{206} @subsection No_Task_At_Interrupt_Priority @@ -13284,7 +13273,7 @@ a consequence, the tasks are always created with a priority below that an interrupt priority. @node No_Task_Attributes_Package,No_Task_Hierarchy,No_Task_At_Interrupt_Priority,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-task-attributes-package}@anchor{208} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-task-attributes-package}@anchor{207} @subsection No_Task_Attributes_Package @@ -13301,7 +13290,7 @@ compatibility purposes (and a warning will be generated for its use if warnings on obsolescent features are activated). @node No_Task_Hierarchy,No_Task_Termination,No_Task_Attributes_Package,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-task-hierarchy}@anchor{209} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-task-hierarchy}@anchor{208} @subsection No_Task_Hierarchy @@ -13311,7 +13300,7 @@ warnings on obsolescent features are activated). directly on the environment task of the partition. @node No_Task_Termination,No_Tasking,No_Task_Hierarchy,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-task-termination}@anchor{20a} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-task-termination}@anchor{209} @subsection No_Task_Termination @@ -13320,7 +13309,7 @@ directly on the environment task of the partition. [RM D.7] Tasks that terminate are erroneous. @node No_Tasking,No_Terminate_Alternatives,No_Task_Termination,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-tasking}@anchor{20b} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-tasking}@anchor{20a} @subsection No_Tasking @@ -13333,7 +13322,7 @@ and cause an error message to be output either by the compiler or binder. @node No_Terminate_Alternatives,No_Unchecked_Access,No_Tasking,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-terminate-alternatives}@anchor{20c} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-terminate-alternatives}@anchor{20b} @subsection No_Terminate_Alternatives @@ -13342,7 +13331,7 @@ binder. [RM D.7] There are no selective accepts with terminate alternatives. @node No_Unchecked_Access,No_Unchecked_Conversion,No_Terminate_Alternatives,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-unchecked-access}@anchor{20d} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-unchecked-access}@anchor{20c} @subsection No_Unchecked_Access @@ -13352,7 +13341,7 @@ binder. occurrences of the Unchecked_Access attribute. @node No_Unchecked_Conversion,No_Unchecked_Deallocation,No_Unchecked_Access,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-unchecked-conversion}@anchor{20e} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-unchecked-conversion}@anchor{20d} @subsection No_Unchecked_Conversion @@ -13362,7 +13351,7 @@ occurrences of the Unchecked_Access attribute. dependences on the predefined generic function Unchecked_Conversion. @node No_Unchecked_Deallocation,No_Use_Of_Attribute,No_Unchecked_Conversion,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-unchecked-deallocation}@anchor{20f} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-unchecked-deallocation}@anchor{20e} @subsection No_Unchecked_Deallocation @@ -13372,7 +13361,7 @@ dependences on the predefined generic function Unchecked_Conversion. dependences on the predefined generic procedure Unchecked_Deallocation. @node No_Use_Of_Attribute,No_Use_Of_Entity,No_Unchecked_Deallocation,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-use-of-attribute}@anchor{210} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-use-of-attribute}@anchor{20f} @subsection No_Use_Of_Attribute @@ -13382,7 +13371,7 @@ dependences on the predefined generic procedure Unchecked_Deallocation. earlier versions of Ada. @node No_Use_Of_Entity,No_Use_Of_Pragma,No_Use_Of_Attribute,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-use-of-entity}@anchor{211} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-use-of-entity}@anchor{210} @subsection No_Use_Of_Entity @@ -13402,7 +13391,7 @@ No_Use_Of_Entity => Ada.Text_IO.Put_Line @end example @node No_Use_Of_Pragma,Pure_Barriers,No_Use_Of_Entity,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-use-of-pragma}@anchor{212} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-use-of-pragma}@anchor{211} @subsection No_Use_Of_Pragma @@ -13412,7 +13401,7 @@ No_Use_Of_Entity => Ada.Text_IO.Put_Line earlier versions of Ada. @node Pure_Barriers,Simple_Barriers,No_Use_Of_Pragma,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions pure-barriers}@anchor{213} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions pure-barriers}@anchor{212} @subsection Pure_Barriers @@ -13463,7 +13452,7 @@ but still ensures absence of side effects, exceptions, and recursion during the evaluation of the barriers. @node Simple_Barriers,Static_Priorities,Pure_Barriers,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions simple-barriers}@anchor{214} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions simple-barriers}@anchor{213} @subsection Simple_Barriers @@ -13482,7 +13471,7 @@ compatibility purposes (and a warning will be generated for its use if warnings on obsolescent features are activated). @node Static_Priorities,Static_Storage_Size,Simple_Barriers,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions static-priorities}@anchor{215} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions static-priorities}@anchor{214} @subsection Static_Priorities @@ -13493,7 +13482,7 @@ are static, and that there are no dependences on the package @code{Ada.Dynamic_Priorities}. @node Static_Storage_Size,,Static_Priorities,Partition-Wide Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions static-storage-size}@anchor{216} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions static-storage-size}@anchor{215} @subsection Static_Storage_Size @@ -13503,7 +13492,7 @@ are static, and that there are no dependences on the package in a Storage_Size pragma or attribute definition clause is static. @node Program Unit Level Restrictions,,Partition-Wide Restrictions,Standard and Implementation Defined Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions id3}@anchor{217}@anchor{gnat_rm/standard_and_implementation_defined_restrictions program-unit-level-restrictions}@anchor{218} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions id3}@anchor{216}@anchor{gnat_rm/standard_and_implementation_defined_restrictions program-unit-level-restrictions}@anchor{217} @section Program Unit Level Restrictions @@ -13534,7 +13523,7 @@ other compilation units in the partition. @end menu @node No_Elaboration_Code,No_Dynamic_Accessibility_Checks,,Program Unit Level Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-elaboration-code}@anchor{219} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-elaboration-code}@anchor{218} @subsection No_Elaboration_Code @@ -13590,7 +13579,7 @@ associated with the unit. This counter is typically used to check for access before elaboration and to control multiple elaboration attempts. @node No_Dynamic_Accessibility_Checks,No_Dynamic_Sized_Objects,No_Elaboration_Code,Program Unit Level Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-dynamic-accessibility-checks}@anchor{21a} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-dynamic-accessibility-checks}@anchor{219} @subsection No_Dynamic_Accessibility_Checks @@ -13639,7 +13628,7 @@ In all other cases, the level of T is as defined by the existing rules of Ada. @end itemize @node No_Dynamic_Sized_Objects,No_Entry_Queue,No_Dynamic_Accessibility_Checks,Program Unit Level Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-dynamic-sized-objects}@anchor{21b} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-dynamic-sized-objects}@anchor{21a} @subsection No_Dynamic_Sized_Objects @@ -13657,7 +13646,7 @@ access discriminants. It is often a good idea to combine this restriction with No_Secondary_Stack. @node No_Entry_Queue,No_Implementation_Aspect_Specifications,No_Dynamic_Sized_Objects,Program Unit Level Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-entry-queue}@anchor{21c} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-entry-queue}@anchor{21b} @subsection No_Entry_Queue @@ -13670,7 +13659,7 @@ checked at compile time. A program execution is erroneous if an attempt is made to queue a second task on such an entry. @node No_Implementation_Aspect_Specifications,No_Implementation_Attributes,No_Entry_Queue,Program Unit Level Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-implementation-aspect-specifications}@anchor{21d} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-implementation-aspect-specifications}@anchor{21c} @subsection No_Implementation_Aspect_Specifications @@ -13681,7 +13670,7 @@ GNAT-defined aspects are present. With this restriction, the only aspects that can be used are those defined in the Ada Reference Manual. @node No_Implementation_Attributes,No_Implementation_Identifiers,No_Implementation_Aspect_Specifications,Program Unit Level Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-implementation-attributes}@anchor{21e} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-implementation-attributes}@anchor{21d} @subsection No_Implementation_Attributes @@ -13693,7 +13682,7 @@ attributes that can be used are those defined in the Ada Reference Manual. @node No_Implementation_Identifiers,No_Implementation_Pragmas,No_Implementation_Attributes,Program Unit Level Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-implementation-identifiers}@anchor{21f} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-implementation-identifiers}@anchor{21e} @subsection No_Implementation_Identifiers @@ -13704,7 +13693,7 @@ implementation-defined identifiers (marked with pragma Implementation_Defined) occur within language-defined packages. @node No_Implementation_Pragmas,No_Implementation_Restrictions,No_Implementation_Identifiers,Program Unit Level Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-implementation-pragmas}@anchor{220} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-implementation-pragmas}@anchor{21f} @subsection No_Implementation_Pragmas @@ -13715,7 +13704,7 @@ GNAT-defined pragmas are present. With this restriction, the only pragmas that can be used are those defined in the Ada Reference Manual. @node No_Implementation_Restrictions,No_Implementation_Units,No_Implementation_Pragmas,Program Unit Level Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-implementation-restrictions}@anchor{221} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-implementation-restrictions}@anchor{220} @subsection No_Implementation_Restrictions @@ -13727,7 +13716,7 @@ are present. With this restriction, the only other restriction identifiers that can be used are those defined in the Ada Reference Manual. @node No_Implementation_Units,No_Implicit_Aliasing,No_Implementation_Restrictions,Program Unit Level Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-implementation-units}@anchor{222} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-implementation-units}@anchor{221} @subsection No_Implementation_Units @@ -13738,7 +13727,7 @@ mention in the context clause of any implementation-defined descendants of packages Ada, Interfaces, or System. @node No_Implicit_Aliasing,No_Implicit_Loops,No_Implementation_Units,Program Unit Level Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-implicit-aliasing}@anchor{223} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-implicit-aliasing}@anchor{222} @subsection No_Implicit_Aliasing @@ -13753,7 +13742,7 @@ to be aliased, and in such cases, it can always be replaced by the standard attribute Unchecked_Access which is preferable. @node No_Implicit_Loops,No_Obsolescent_Features,No_Implicit_Aliasing,Program Unit Level Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-implicit-loops}@anchor{224} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-implicit-loops}@anchor{223} @subsection No_Implicit_Loops @@ -13770,7 +13759,7 @@ arrays larger than about 5000 scalar components. Note that if this restriction is set in the spec of a package, it will not apply to its body. @node No_Obsolescent_Features,No_Wide_Characters,No_Implicit_Loops,Program Unit Level Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-obsolescent-features}@anchor{225} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-obsolescent-features}@anchor{224} @subsection No_Obsolescent_Features @@ -13780,7 +13769,7 @@ is set in the spec of a package, it will not apply to its body. features are used, as defined in Annex J of the Ada Reference Manual. @node No_Wide_Characters,Static_Dispatch_Tables,No_Obsolescent_Features,Program Unit Level Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-wide-characters}@anchor{226} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-wide-characters}@anchor{225} @subsection No_Wide_Characters @@ -13794,7 +13783,7 @@ appear in the program (that is literals representing characters not in type @code{Character}). @node Static_Dispatch_Tables,SPARK_05,No_Wide_Characters,Program Unit Level Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions static-dispatch-tables}@anchor{227} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions static-dispatch-tables}@anchor{226} @subsection Static_Dispatch_Tables @@ -13804,7 +13793,7 @@ type @code{Character}). associated with dispatch tables can be placed in read-only memory. @node SPARK_05,,Static_Dispatch_Tables,Program Unit Level Restrictions -@anchor{gnat_rm/standard_and_implementation_defined_restrictions spark-05}@anchor{228} +@anchor{gnat_rm/standard_and_implementation_defined_restrictions spark-05}@anchor{227} @subsection SPARK_05 @@ -13827,7 +13816,7 @@ gnatprove -P project.gpr --mode=check_all @end example @node Implementation Advice,Implementation Defined Characteristics,Standard and Implementation Defined Restrictions,Top -@anchor{gnat_rm/implementation_advice doc}@anchor{229}@anchor{gnat_rm/implementation_advice id1}@anchor{22a}@anchor{gnat_rm/implementation_advice implementation-advice}@anchor{a} +@anchor{gnat_rm/implementation_advice doc}@anchor{228}@anchor{gnat_rm/implementation_advice id1}@anchor{229}@anchor{gnat_rm/implementation_advice implementation-advice}@anchor{a} @chapter Implementation Advice @@ -13925,7 +13914,7 @@ case the text describes what GNAT does and why. @end menu @node RM 1 1 3 20 Error Detection,RM 1 1 3 31 Child Units,,Implementation Advice -@anchor{gnat_rm/implementation_advice rm-1-1-3-20-error-detection}@anchor{22b} +@anchor{gnat_rm/implementation_advice rm-1-1-3-20-error-detection}@anchor{22a} @section RM 1.1.3(20): Error Detection @@ -13942,7 +13931,7 @@ or diagnosed at compile time. @geindex Child Units @node RM 1 1 3 31 Child Units,RM 1 1 5 12 Bounded Errors,RM 1 1 3 20 Error Detection,Implementation Advice -@anchor{gnat_rm/implementation_advice rm-1-1-3-31-child-units}@anchor{22c} +@anchor{gnat_rm/implementation_advice rm-1-1-3-31-child-units}@anchor{22b} @section RM 1.1.3(31): Child Units @@ -13958,7 +13947,7 @@ Followed. @geindex Bounded errors @node RM 1 1 5 12 Bounded Errors,RM 2 8 16 Pragmas,RM 1 1 3 31 Child Units,Implementation Advice -@anchor{gnat_rm/implementation_advice rm-1-1-5-12-bounded-errors}@anchor{22d} +@anchor{gnat_rm/implementation_advice rm-1-1-5-12-bounded-errors}@anchor{22c} @section RM 1.1.5(12): Bounded Errors @@ -13975,7 +13964,7 @@ runtime. @geindex Pragmas @node RM 2 8 16 Pragmas,RM 2 8 17-19 Pragmas,RM 1 1 5 12 Bounded Errors,Implementation Advice -@anchor{gnat_rm/implementation_advice id2}@anchor{22e}@anchor{gnat_rm/implementation_advice rm-2-8-16-pragmas}@anchor{22f} +@anchor{gnat_rm/implementation_advice id2}@anchor{22d}@anchor{gnat_rm/implementation_advice rm-2-8-16-pragmas}@anchor{22e} @section RM 2.8(16): Pragmas @@ -14088,7 +14077,7 @@ that this advice not be followed. For details see @ref{7,,Implementation Defined Pragmas}. @node RM 2 8 17-19 Pragmas,RM 3 5 2 5 Alternative Character Sets,RM 2 8 16 Pragmas,Implementation Advice -@anchor{gnat_rm/implementation_advice rm-2-8-17-19-pragmas}@anchor{230} +@anchor{gnat_rm/implementation_advice rm-2-8-17-19-pragmas}@anchor{22f} @section RM 2.8(17-19): Pragmas @@ -14109,14 +14098,14 @@ replacing @code{library_items}.” @end itemize @end quotation -See @ref{22f,,RM 2.8(16); Pragmas}. +See @ref{22e,,RM 2.8(16); Pragmas}. @geindex Character Sets @geindex Alternative Character Sets @node RM 3 5 2 5 Alternative Character Sets,RM 3 5 4 28 Integer Types,RM 2 8 17-19 Pragmas,Implementation Advice -@anchor{gnat_rm/implementation_advice rm-3-5-2-5-alternative-character-sets}@anchor{231} +@anchor{gnat_rm/implementation_advice rm-3-5-2-5-alternative-character-sets}@anchor{230} @section RM 3.5.2(5): Alternative Character Sets @@ -14144,7 +14133,7 @@ there is no such restriction. @geindex Integer types @node RM 3 5 4 28 Integer Types,RM 3 5 4 29 Integer Types,RM 3 5 2 5 Alternative Character Sets,Implementation Advice -@anchor{gnat_rm/implementation_advice rm-3-5-4-28-integer-types}@anchor{232} +@anchor{gnat_rm/implementation_advice rm-3-5-4-28-integer-types}@anchor{231} @section RM 3.5.4(28): Integer Types @@ -14163,7 +14152,7 @@ are supported for convenient interface to C, and so that all hardware types of the machine are easily available. @node RM 3 5 4 29 Integer Types,RM 3 5 5 8 Enumeration Values,RM 3 5 4 28 Integer Types,Implementation Advice -@anchor{gnat_rm/implementation_advice rm-3-5-4-29-integer-types}@anchor{233} +@anchor{gnat_rm/implementation_advice rm-3-5-4-29-integer-types}@anchor{232} @section RM 3.5.4(29): Integer Types @@ -14179,7 +14168,7 @@ Followed. @geindex Enumeration values @node RM 3 5 5 8 Enumeration Values,RM 3 5 7 17 Float Types,RM 3 5 4 29 Integer Types,Implementation Advice -@anchor{gnat_rm/implementation_advice rm-3-5-5-8-enumeration-values}@anchor{234} +@anchor{gnat_rm/implementation_advice rm-3-5-5-8-enumeration-values}@anchor{233} @section RM 3.5.5(8): Enumeration Values @@ -14199,7 +14188,7 @@ Followed. @geindex Float types @node RM 3 5 7 17 Float Types,RM 3 6 2 11 Multidimensional Arrays,RM 3 5 5 8 Enumeration Values,Implementation Advice -@anchor{gnat_rm/implementation_advice rm-3-5-7-17-float-types}@anchor{235} +@anchor{gnat_rm/implementation_advice rm-3-5-7-17-float-types}@anchor{234} @section RM 3.5.7(17): Float Types @@ -14229,7 +14218,7 @@ is a software rather than a hardware format. @geindex multidimensional @node RM 3 6 2 11 Multidimensional Arrays,RM 9 6 30-31 Duration’Small,RM 3 5 7 17 Float Types,Implementation Advice -@anchor{gnat_rm/implementation_advice rm-3-6-2-11-multidimensional-arrays}@anchor{236} +@anchor{gnat_rm/implementation_advice rm-3-6-2-11-multidimensional-arrays}@anchor{235} @section RM 3.6.2(11): Multidimensional Arrays @@ -14247,7 +14236,7 @@ Followed. @geindex Duration'Small @node RM 9 6 30-31 Duration’Small,RM 10 2 1 12 Consistent Representation,RM 3 6 2 11 Multidimensional Arrays,Implementation Advice -@anchor{gnat_rm/implementation_advice rm-9-6-30-31-duration-small}@anchor{237} +@anchor{gnat_rm/implementation_advice rm-9-6-30-31-duration-small}@anchor{236} @section RM 9.6(30-31): Duration’Small @@ -14268,7 +14257,7 @@ it need not be the same time base as used for @code{Calendar.Clock}.” Followed. @node RM 10 2 1 12 Consistent Representation,RM 11 4 1 19 Exception Information,RM 9 6 30-31 Duration’Small,Implementation Advice -@anchor{gnat_rm/implementation_advice rm-10-2-1-12-consistent-representation}@anchor{238} +@anchor{gnat_rm/implementation_advice rm-10-2-1-12-consistent-representation}@anchor{237} @section RM 10.2.1(12): Consistent Representation @@ -14290,7 +14279,7 @@ advice without severely impacting efficiency of execution. @geindex Exception information @node RM 11 4 1 19 Exception Information,RM 11 5 28 Suppression of Checks,RM 10 2 1 12 Consistent Representation,Implementation Advice -@anchor{gnat_rm/implementation_advice rm-11-4-1-19-exception-information}@anchor{239} +@anchor{gnat_rm/implementation_advice rm-11-4-1-19-exception-information}@anchor{238} @section RM 11.4.1(19): Exception Information @@ -14321,7 +14310,7 @@ Pragma @code{Discard_Names}. @geindex suppression of @node RM 11 5 28 Suppression of Checks,RM 13 1 21-24 Representation Clauses,RM 11 4 1 19 Exception Information,Implementation Advice -@anchor{gnat_rm/implementation_advice rm-11-5-28-suppression-of-checks}@anchor{23a} +@anchor{gnat_rm/implementation_advice rm-11-5-28-suppression-of-checks}@anchor{239} @section RM 11.5(28): Suppression of Checks @@ -14336,7 +14325,7 @@ Followed. @geindex Representation clauses @node RM 13 1 21-24 Representation Clauses,RM 13 2 6-8 Packed Types,RM 11 5 28 Suppression of Checks,Implementation Advice -@anchor{gnat_rm/implementation_advice rm-13-1-21-24-representation-clauses}@anchor{23b} +@anchor{gnat_rm/implementation_advice rm-13-1-21-24-representation-clauses}@anchor{23a} @section RM 13.1 (21-24): Representation Clauses @@ -14385,7 +14374,7 @@ Followed. @geindex Packed types @node RM 13 2 6-8 Packed Types,RM 13 3 14-19 Address Clauses,RM 13 1 21-24 Representation Clauses,Implementation Advice -@anchor{gnat_rm/implementation_advice rm-13-2-6-8-packed-types}@anchor{23c} +@anchor{gnat_rm/implementation_advice rm-13-2-6-8-packed-types}@anchor{23b} @section RM 13.2(6-8): Packed Types @@ -14416,7 +14405,7 @@ subcomponent of the packed type. @geindex Address clauses @node RM 13 3 14-19 Address Clauses,RM 13 3 29-35 Alignment Clauses,RM 13 2 6-8 Packed Types,Implementation Advice -@anchor{gnat_rm/implementation_advice rm-13-3-14-19-address-clauses}@anchor{23d} +@anchor{gnat_rm/implementation_advice rm-13-3-14-19-address-clauses}@anchor{23c} @section RM 13.3(14-19): Address Clauses @@ -14469,7 +14458,7 @@ Followed. @geindex Alignment clauses @node RM 13 3 29-35 Alignment Clauses,RM 13 3 42-43 Size Clauses,RM 13 3 14-19 Address Clauses,Implementation Advice -@anchor{gnat_rm/implementation_advice rm-13-3-29-35-alignment-clauses}@anchor{23e} +@anchor{gnat_rm/implementation_advice rm-13-3-29-35-alignment-clauses}@anchor{23d} @section RM 13.3(29-35): Alignment Clauses @@ -14526,7 +14515,7 @@ Followed. @geindex Size clauses @node RM 13 3 42-43 Size Clauses,RM 13 3 50-56 Size Clauses,RM 13 3 29-35 Alignment Clauses,Implementation Advice -@anchor{gnat_rm/implementation_advice rm-13-3-42-43-size-clauses}@anchor{23f} +@anchor{gnat_rm/implementation_advice rm-13-3-42-43-size-clauses}@anchor{23e} @section RM 13.3(42-43): Size Clauses @@ -14544,7 +14533,7 @@ object’s @code{Alignment} (if the @code{Alignment} is nonzero).” Followed. @node RM 13 3 50-56 Size Clauses,RM 13 3 71-73 Component Size Clauses,RM 13 3 42-43 Size Clauses,Implementation Advice -@anchor{gnat_rm/implementation_advice rm-13-3-50-56-size-clauses}@anchor{240} +@anchor{gnat_rm/implementation_advice rm-13-3-50-56-size-clauses}@anchor{23f} @section RM 13.3(50-56): Size Clauses @@ -14595,7 +14584,7 @@ Followed. @geindex Component_Size clauses @node RM 13 3 71-73 Component Size Clauses,RM 13 4 9-10 Enumeration Representation Clauses,RM 13 3 50-56 Size Clauses,Implementation Advice -@anchor{gnat_rm/implementation_advice rm-13-3-71-73-component-size-clauses}@anchor{241} +@anchor{gnat_rm/implementation_advice rm-13-3-71-73-component-size-clauses}@anchor{240} @section RM 13.3(71-73): Component Size Clauses @@ -14629,7 +14618,7 @@ Followed. @geindex enumeration @node RM 13 4 9-10 Enumeration Representation Clauses,RM 13 5 1 17-22 Record Representation Clauses,RM 13 3 71-73 Component Size Clauses,Implementation Advice -@anchor{gnat_rm/implementation_advice rm-13-4-9-10-enumeration-representation-clauses}@anchor{242} +@anchor{gnat_rm/implementation_advice rm-13-4-9-10-enumeration-representation-clauses}@anchor{241} @section RM 13.4(9-10): Enumeration Representation Clauses @@ -14651,7 +14640,7 @@ Followed. @geindex records @node RM 13 5 1 17-22 Record Representation Clauses,RM 13 5 2 5 Storage Place Attributes,RM 13 4 9-10 Enumeration Representation Clauses,Implementation Advice -@anchor{gnat_rm/implementation_advice rm-13-5-1-17-22-record-representation-clauses}@anchor{243} +@anchor{gnat_rm/implementation_advice rm-13-5-1-17-22-record-representation-clauses}@anchor{242} @section RM 13.5.1(17-22): Record Representation Clauses @@ -14711,7 +14700,7 @@ and all mentioned features are implemented. @geindex Storage place attributes @node RM 13 5 2 5 Storage Place Attributes,RM 13 5 3 7-8 Bit Ordering,RM 13 5 1 17-22 Record Representation Clauses,Implementation Advice -@anchor{gnat_rm/implementation_advice rm-13-5-2-5-storage-place-attributes}@anchor{244} +@anchor{gnat_rm/implementation_advice rm-13-5-2-5-storage-place-attributes}@anchor{243} @section RM 13.5.2(5): Storage Place Attributes @@ -14731,7 +14720,7 @@ Followed. There are no such components in GNAT. @geindex Bit ordering @node RM 13 5 3 7-8 Bit Ordering,RM 13 7 37 Address as Private,RM 13 5 2 5 Storage Place Attributes,Implementation Advice -@anchor{gnat_rm/implementation_advice rm-13-5-3-7-8-bit-ordering}@anchor{245} +@anchor{gnat_rm/implementation_advice rm-13-5-3-7-8-bit-ordering}@anchor{244} @section RM 13.5.3(7-8): Bit Ordering @@ -14751,7 +14740,7 @@ Thus non-default bit ordering is not supported. @geindex as private type @node RM 13 7 37 Address as Private,RM 13 7 1 16 Address Operations,RM 13 5 3 7-8 Bit Ordering,Implementation Advice -@anchor{gnat_rm/implementation_advice rm-13-7-37-address-as-private}@anchor{246} +@anchor{gnat_rm/implementation_advice rm-13-7-37-address-as-private}@anchor{245} @section RM 13.7(37): Address as Private @@ -14769,7 +14758,7 @@ Followed. @geindex operations of @node RM 13 7 1 16 Address Operations,RM 13 9 14-17 Unchecked Conversion,RM 13 7 37 Address as Private,Implementation Advice -@anchor{gnat_rm/implementation_advice rm-13-7-1-16-address-operations}@anchor{247} +@anchor{gnat_rm/implementation_advice rm-13-7-1-16-address-operations}@anchor{246} @section RM 13.7.1(16): Address Operations @@ -14787,7 +14776,7 @@ operation raises @code{Program_Error}, since all operations make sense. @geindex Unchecked conversion @node RM 13 9 14-17 Unchecked Conversion,RM 13 11 23-25 Implicit Heap Usage,RM 13 7 1 16 Address Operations,Implementation Advice -@anchor{gnat_rm/implementation_advice rm-13-9-14-17-unchecked-conversion}@anchor{248} +@anchor{gnat_rm/implementation_advice rm-13-9-14-17-unchecked-conversion}@anchor{247} @section RM 13.9(14-17): Unchecked Conversion @@ -14831,7 +14820,7 @@ Followed. @geindex implicit @node RM 13 11 23-25 Implicit Heap Usage,RM 13 11 2 17 Unchecked Deallocation,RM 13 9 14-17 Unchecked Conversion,Implementation Advice -@anchor{gnat_rm/implementation_advice rm-13-11-23-25-implicit-heap-usage}@anchor{249} +@anchor{gnat_rm/implementation_advice rm-13-11-23-25-implicit-heap-usage}@anchor{248} @section RM 13.11(23-25): Implicit Heap Usage @@ -14882,7 +14871,7 @@ Followed. @geindex Unchecked deallocation @node RM 13 11 2 17 Unchecked Deallocation,RM 13 13 2 1 6 Stream Oriented Attributes,RM 13 11 23-25 Implicit Heap Usage,Implementation Advice -@anchor{gnat_rm/implementation_advice rm-13-11-2-17-unchecked-deallocation}@anchor{24a} +@anchor{gnat_rm/implementation_advice rm-13-11-2-17-unchecked-deallocation}@anchor{249} @section RM 13.11.2(17): Unchecked Deallocation @@ -14897,7 +14886,7 @@ Followed. @geindex Stream oriented attributes @node RM 13 13 2 1 6 Stream Oriented Attributes,RM A 1 52 Names of Predefined Numeric Types,RM 13 11 2 17 Unchecked Deallocation,Implementation Advice -@anchor{gnat_rm/implementation_advice rm-13-13-2-1-6-stream-oriented-attributes}@anchor{24b} +@anchor{gnat_rm/implementation_advice rm-13-13-2-1-6-stream-oriented-attributes}@anchor{24a} @section RM 13.13.2(1.6): Stream Oriented Attributes @@ -14928,7 +14917,7 @@ scalar types. This XDR alternative can be enabled via the binder switch -xdr. @geindex Stream oriented attributes @node RM A 1 52 Names of Predefined Numeric Types,RM A 3 2 49 Ada Characters Handling,RM 13 13 2 1 6 Stream Oriented Attributes,Implementation Advice -@anchor{gnat_rm/implementation_advice rm-a-1-52-names-of-predefined-numeric-types}@anchor{24c} +@anchor{gnat_rm/implementation_advice rm-a-1-52-names-of-predefined-numeric-types}@anchor{24b} @section RM A.1(52): Names of Predefined Numeric Types @@ -14946,7 +14935,7 @@ Followed. @geindex Ada.Characters.Handling @node RM A 3 2 49 Ada Characters Handling,RM A 4 4 106 Bounded-Length String Handling,RM A 1 52 Names of Predefined Numeric Types,Implementation Advice -@anchor{gnat_rm/implementation_advice rm-a-3-2-49-ada-characters-handling}@anchor{24d} +@anchor{gnat_rm/implementation_advice rm-a-3-2-49-ada-characters-handling}@anchor{24c} @section RM A.3.2(49): @code{Ada.Characters.Handling} @@ -14963,7 +14952,7 @@ Followed. GNAT provides no such localized definitions. @geindex Bounded-length strings @node RM A 4 4 106 Bounded-Length String Handling,RM A 5 2 46-47 Random Number Generation,RM A 3 2 49 Ada Characters Handling,Implementation Advice -@anchor{gnat_rm/implementation_advice rm-a-4-4-106-bounded-length-string-handling}@anchor{24e} +@anchor{gnat_rm/implementation_advice rm-a-4-4-106-bounded-length-string-handling}@anchor{24d} @section RM A.4.4(106): Bounded-Length String Handling @@ -14978,7 +14967,7 @@ Followed. No implicit pointers or dynamic allocation are used. @geindex Random number generation @node RM A 5 2 46-47 Random Number Generation,RM A 10 7 23 Get_Immediate,RM A 4 4 106 Bounded-Length String Handling,Implementation Advice -@anchor{gnat_rm/implementation_advice rm-a-5-2-46-47-random-number-generation}@anchor{24f} +@anchor{gnat_rm/implementation_advice rm-a-5-2-46-47-random-number-generation}@anchor{24e} @section RM A.5.2(46-47): Random Number Generation @@ -15007,7 +14996,7 @@ condition here to hold true. @geindex Get_Immediate @node RM A 10 7 23 Get_Immediate,RM A 18 Containers,RM A 5 2 46-47 Random Number Generation,Implementation Advice -@anchor{gnat_rm/implementation_advice rm-a-10-7-23-get-immediate}@anchor{250} +@anchor{gnat_rm/implementation_advice rm-a-10-7-23-get-immediate}@anchor{24f} @section RM A.10.7(23): @code{Get_Immediate} @@ -15031,7 +15020,7 @@ this functionality. @geindex Containers @node RM A 18 Containers,RM B 1 39-41 Pragma Export,RM A 10 7 23 Get_Immediate,Implementation Advice -@anchor{gnat_rm/implementation_advice rm-a-18-containers}@anchor{251} +@anchor{gnat_rm/implementation_advice rm-a-18-containers}@anchor{250} @section RM A.18: @code{Containers} @@ -15052,7 +15041,7 @@ follow the implementation advice. @geindex Export @node RM B 1 39-41 Pragma Export,RM B 2 12-13 Package Interfaces,RM A 18 Containers,Implementation Advice -@anchor{gnat_rm/implementation_advice rm-b-1-39-41-pragma-export}@anchor{252} +@anchor{gnat_rm/implementation_advice rm-b-1-39-41-pragma-export}@anchor{251} @section RM B.1(39-41): Pragma @code{Export} @@ -15100,7 +15089,7 @@ Followed. @geindex Interfaces @node RM B 2 12-13 Package Interfaces,RM B 3 63-71 Interfacing with C,RM B 1 39-41 Pragma Export,Implementation Advice -@anchor{gnat_rm/implementation_advice rm-b-2-12-13-package-interfaces}@anchor{253} +@anchor{gnat_rm/implementation_advice rm-b-2-12-13-package-interfaces}@anchor{252} @section RM B.2(12-13): Package @code{Interfaces} @@ -15130,7 +15119,7 @@ Followed. GNAT provides all the packages described in this section. @geindex interfacing with @node RM B 3 63-71 Interfacing with C,RM B 4 95-98 Interfacing with COBOL,RM B 2 12-13 Package Interfaces,Implementation Advice -@anchor{gnat_rm/implementation_advice rm-b-3-63-71-interfacing-with-c}@anchor{254} +@anchor{gnat_rm/implementation_advice rm-b-3-63-71-interfacing-with-c}@anchor{253} @section RM B.3(63-71): Interfacing with C @@ -15218,7 +15207,7 @@ Followed. @geindex interfacing with @node RM B 4 95-98 Interfacing with COBOL,RM B 5 22-26 Interfacing with Fortran,RM B 3 63-71 Interfacing with C,Implementation Advice -@anchor{gnat_rm/implementation_advice rm-b-4-95-98-interfacing-with-cobol}@anchor{255} +@anchor{gnat_rm/implementation_advice rm-b-4-95-98-interfacing-with-cobol}@anchor{254} @section RM B.4(95-98): Interfacing with COBOL @@ -15259,7 +15248,7 @@ Followed. @geindex interfacing with @node RM B 5 22-26 Interfacing with Fortran,RM C 1 3-5 Access to Machine Operations,RM B 4 95-98 Interfacing with COBOL,Implementation Advice -@anchor{gnat_rm/implementation_advice rm-b-5-22-26-interfacing-with-fortran}@anchor{256} +@anchor{gnat_rm/implementation_advice rm-b-5-22-26-interfacing-with-fortran}@anchor{255} @section RM B.5(22-26): Interfacing with Fortran @@ -15310,7 +15299,7 @@ Followed. @geindex Machine operations @node RM C 1 3-5 Access to Machine Operations,RM C 1 10-16 Access to Machine Operations,RM B 5 22-26 Interfacing with Fortran,Implementation Advice -@anchor{gnat_rm/implementation_advice rm-c-1-3-5-access-to-machine-operations}@anchor{257} +@anchor{gnat_rm/implementation_advice rm-c-1-3-5-access-to-machine-operations}@anchor{256} @section RM C.1(3-5): Access to Machine Operations @@ -15345,7 +15334,7 @@ object that is specified as exported.” Followed. @node RM C 1 10-16 Access to Machine Operations,RM C 3 28 Interrupt Support,RM C 1 3-5 Access to Machine Operations,Implementation Advice -@anchor{gnat_rm/implementation_advice rm-c-1-10-16-access-to-machine-operations}@anchor{258} +@anchor{gnat_rm/implementation_advice rm-c-1-10-16-access-to-machine-operations}@anchor{257} @section RM C.1(10-16): Access to Machine Operations @@ -15406,7 +15395,7 @@ Followed on any target supporting such operations. @geindex Interrupt support @node RM C 3 28 Interrupt Support,RM C 3 1 20-21 Protected Procedure Handlers,RM C 1 10-16 Access to Machine Operations,Implementation Advice -@anchor{gnat_rm/implementation_advice rm-c-3-28-interrupt-support}@anchor{259} +@anchor{gnat_rm/implementation_advice rm-c-3-28-interrupt-support}@anchor{258} @section RM C.3(28): Interrupt Support @@ -15424,7 +15413,7 @@ of interrupt blocking. @geindex Protected procedure handlers @node RM C 3 1 20-21 Protected Procedure Handlers,RM C 3 2 25 Package Interrupts,RM C 3 28 Interrupt Support,Implementation Advice -@anchor{gnat_rm/implementation_advice rm-c-3-1-20-21-protected-procedure-handlers}@anchor{25a} +@anchor{gnat_rm/implementation_advice rm-c-3-1-20-21-protected-procedure-handlers}@anchor{259} @section RM C.3.1(20-21): Protected Procedure Handlers @@ -15450,7 +15439,7 @@ Followed. Compile time warnings are given when possible. @geindex Interrupts @node RM C 3 2 25 Package Interrupts,RM C 4 14 Pre-elaboration Requirements,RM C 3 1 20-21 Protected Procedure Handlers,Implementation Advice -@anchor{gnat_rm/implementation_advice rm-c-3-2-25-package-interrupts}@anchor{25b} +@anchor{gnat_rm/implementation_advice rm-c-3-2-25-package-interrupts}@anchor{25a} @section RM C.3.2(25): Package @code{Interrupts} @@ -15468,7 +15457,7 @@ Followed. @geindex Pre-elaboration requirements @node RM C 4 14 Pre-elaboration Requirements,RM C 5 8 Pragma Discard_Names,RM C 3 2 25 Package Interrupts,Implementation Advice -@anchor{gnat_rm/implementation_advice rm-c-4-14-pre-elaboration-requirements}@anchor{25c} +@anchor{gnat_rm/implementation_advice rm-c-4-14-pre-elaboration-requirements}@anchor{25b} @section RM C.4(14): Pre-elaboration Requirements @@ -15484,7 +15473,7 @@ Followed. Executable code is generated in some cases, e.g., loops to initialize large arrays. @node RM C 5 8 Pragma Discard_Names,RM C 7 2 30 The Package Task_Attributes,RM C 4 14 Pre-elaboration Requirements,Implementation Advice -@anchor{gnat_rm/implementation_advice rm-c-5-8-pragma-discard-names}@anchor{25d} +@anchor{gnat_rm/implementation_advice rm-c-5-8-pragma-discard-names}@anchor{25c} @section RM C.5(8): Pragma @code{Discard_Names} @@ -15502,7 +15491,7 @@ Followed. @geindex Task_Attributes @node RM C 7 2 30 The Package Task_Attributes,RM D 3 17 Locking Policies,RM C 5 8 Pragma Discard_Names,Implementation Advice -@anchor{gnat_rm/implementation_advice rm-c-7-2-30-the-package-task-attributes}@anchor{25e} +@anchor{gnat_rm/implementation_advice rm-c-7-2-30-the-package-task-attributes}@anchor{25d} @section RM C.7.2(30): The Package Task_Attributes @@ -15523,7 +15512,7 @@ Not followed. This implementation is not targeted to such a domain. @geindex Locking Policies @node RM D 3 17 Locking Policies,RM D 4 16 Entry Queuing Policies,RM C 7 2 30 The Package Task_Attributes,Implementation Advice -@anchor{gnat_rm/implementation_advice rm-d-3-17-locking-policies}@anchor{25f} +@anchor{gnat_rm/implementation_advice rm-d-3-17-locking-policies}@anchor{25e} @section RM D.3(17): Locking Policies @@ -15540,7 +15529,7 @@ whose names (@code{Inheritance_Locking} and @geindex Entry queuing policies @node RM D 4 16 Entry Queuing Policies,RM D 6 9-10 Preemptive Abort,RM D 3 17 Locking Policies,Implementation Advice -@anchor{gnat_rm/implementation_advice rm-d-4-16-entry-queuing-policies}@anchor{260} +@anchor{gnat_rm/implementation_advice rm-d-4-16-entry-queuing-policies}@anchor{25f} @section RM D.4(16): Entry Queuing Policies @@ -15555,7 +15544,7 @@ Followed. No such implementation-defined queuing policies exist. @geindex Preemptive abort @node RM D 6 9-10 Preemptive Abort,RM D 7 21 Tasking Restrictions,RM D 4 16 Entry Queuing Policies,Implementation Advice -@anchor{gnat_rm/implementation_advice rm-d-6-9-10-preemptive-abort}@anchor{261} +@anchor{gnat_rm/implementation_advice rm-d-6-9-10-preemptive-abort}@anchor{260} @section RM D.6(9-10): Preemptive Abort @@ -15581,7 +15570,7 @@ Followed. @geindex Tasking restrictions @node RM D 7 21 Tasking Restrictions,RM D 8 47-49 Monotonic Time,RM D 6 9-10 Preemptive Abort,Implementation Advice -@anchor{gnat_rm/implementation_advice rm-d-7-21-tasking-restrictions}@anchor{262} +@anchor{gnat_rm/implementation_advice rm-d-7-21-tasking-restrictions}@anchor{261} @section RM D.7(21): Tasking Restrictions @@ -15600,7 +15589,7 @@ pragma @code{Profile (Restricted)} for more details. @geindex monotonic @node RM D 8 47-49 Monotonic Time,RM E 5 28-29 Partition Communication Subsystem,RM D 7 21 Tasking Restrictions,Implementation Advice -@anchor{gnat_rm/implementation_advice rm-d-8-47-49-monotonic-time}@anchor{263} +@anchor{gnat_rm/implementation_advice rm-d-8-47-49-monotonic-time}@anchor{262} @section RM D.8(47-49): Monotonic Time @@ -15635,7 +15624,7 @@ Followed. @geindex PCS @node RM E 5 28-29 Partition Communication Subsystem,RM F 7 COBOL Support,RM D 8 47-49 Monotonic Time,Implementation Advice -@anchor{gnat_rm/implementation_advice rm-e-5-28-29-partition-communication-subsystem}@anchor{264} +@anchor{gnat_rm/implementation_advice rm-e-5-28-29-partition-communication-subsystem}@anchor{263} @section RM E.5(28-29): Partition Communication Subsystem @@ -15663,7 +15652,7 @@ GNAT. @geindex COBOL support @node RM F 7 COBOL Support,RM F 1 2 Decimal Radix Support,RM E 5 28-29 Partition Communication Subsystem,Implementation Advice -@anchor{gnat_rm/implementation_advice rm-f-7-cobol-support}@anchor{265} +@anchor{gnat_rm/implementation_advice rm-f-7-cobol-support}@anchor{264} @section RM F(7): COBOL Support @@ -15683,7 +15672,7 @@ Followed. @geindex Decimal radix support @node RM F 1 2 Decimal Radix Support,RM G Numerics,RM F 7 COBOL Support,Implementation Advice -@anchor{gnat_rm/implementation_advice rm-f-1-2-decimal-radix-support}@anchor{266} +@anchor{gnat_rm/implementation_advice rm-f-1-2-decimal-radix-support}@anchor{265} @section RM F.1(2): Decimal Radix Support @@ -15699,7 +15688,7 @@ representations. @geindex Numerics @node RM G Numerics,RM G 1 1 56-58 Complex Types,RM F 1 2 Decimal Radix Support,Implementation Advice -@anchor{gnat_rm/implementation_advice rm-g-numerics}@anchor{267} +@anchor{gnat_rm/implementation_advice rm-g-numerics}@anchor{266} @section RM G: Numerics @@ -15719,7 +15708,7 @@ Followed. @geindex Complex types @node RM G 1 1 56-58 Complex Types,RM G 1 2 49 Complex Elementary Functions,RM G Numerics,Implementation Advice -@anchor{gnat_rm/implementation_advice rm-g-1-1-56-58-complex-types}@anchor{268} +@anchor{gnat_rm/implementation_advice rm-g-1-1-56-58-complex-types}@anchor{267} @section RM G.1.1(56-58): Complex Types @@ -15781,7 +15770,7 @@ Followed. @geindex Complex elementary functions @node RM G 1 2 49 Complex Elementary Functions,RM G 2 4 19 Accuracy Requirements,RM G 1 1 56-58 Complex Types,Implementation Advice -@anchor{gnat_rm/implementation_advice rm-g-1-2-49-complex-elementary-functions}@anchor{269} +@anchor{gnat_rm/implementation_advice rm-g-1-2-49-complex-elementary-functions}@anchor{268} @section RM G.1.2(49): Complex Elementary Functions @@ -15803,7 +15792,7 @@ Followed. @geindex Accuracy requirements @node RM G 2 4 19 Accuracy Requirements,RM G 2 6 15 Complex Arithmetic Accuracy,RM G 1 2 49 Complex Elementary Functions,Implementation Advice -@anchor{gnat_rm/implementation_advice rm-g-2-4-19-accuracy-requirements}@anchor{26a} +@anchor{gnat_rm/implementation_advice rm-g-2-4-19-accuracy-requirements}@anchor{269} @section RM G.2.4(19): Accuracy Requirements @@ -15827,7 +15816,7 @@ Followed. @geindex complex arithmetic @node RM G 2 6 15 Complex Arithmetic Accuracy,RM H 6 15/2 Pragma Partition_Elaboration_Policy,RM G 2 4 19 Accuracy Requirements,Implementation Advice -@anchor{gnat_rm/implementation_advice rm-g-2-6-15-complex-arithmetic-accuracy}@anchor{26b} +@anchor{gnat_rm/implementation_advice rm-g-2-6-15-complex-arithmetic-accuracy}@anchor{26a} @section RM G.2.6(15): Complex Arithmetic Accuracy @@ -15845,7 +15834,7 @@ Followed. @geindex Sequential elaboration policy @node RM H 6 15/2 Pragma Partition_Elaboration_Policy,,RM G 2 6 15 Complex Arithmetic Accuracy,Implementation Advice -@anchor{gnat_rm/implementation_advice rm-h-6-15-2-pragma-partition-elaboration-policy}@anchor{26c} +@anchor{gnat_rm/implementation_advice rm-h-6-15-2-pragma-partition-elaboration-policy}@anchor{26b} @section RM H.6(15/2): Pragma Partition_Elaboration_Policy @@ -15860,7 +15849,7 @@ immediately terminated.” Not followed. @node Implementation Defined Characteristics,Intrinsic Subprograms,Implementation Advice,Top -@anchor{gnat_rm/implementation_defined_characteristics doc}@anchor{26d}@anchor{gnat_rm/implementation_defined_characteristics id1}@anchor{26e}@anchor{gnat_rm/implementation_defined_characteristics implementation-defined-characteristics}@anchor{b} +@anchor{gnat_rm/implementation_defined_characteristics doc}@anchor{26c}@anchor{gnat_rm/implementation_defined_characteristics id1}@anchor{26d}@anchor{gnat_rm/implementation_defined_characteristics implementation-defined-characteristics}@anchor{b} @chapter Implementation Defined Characteristics @@ -17155,7 +17144,7 @@ When the @code{Pattern} parameter is not the null string, it is interpreted according to the syntax of regular expressions as defined in the @code{GNAT.Regexp} package. -See @ref{26f,,GNAT.Regexp (g-regexp.ads)}. +See @ref{26e,,GNAT.Regexp (g-regexp.ads)}. @itemize * @@ -18253,7 +18242,7 @@ Information on those subjects is not yet available. Execution is erroneous in that case. @node Intrinsic Subprograms,Representation Clauses and Pragmas,Implementation Defined Characteristics,Top -@anchor{gnat_rm/intrinsic_subprograms doc}@anchor{270}@anchor{gnat_rm/intrinsic_subprograms id1}@anchor{271}@anchor{gnat_rm/intrinsic_subprograms intrinsic-subprograms}@anchor{c} +@anchor{gnat_rm/intrinsic_subprograms doc}@anchor{26f}@anchor{gnat_rm/intrinsic_subprograms id1}@anchor{270}@anchor{gnat_rm/intrinsic_subprograms intrinsic-subprograms}@anchor{c} @chapter Intrinsic Subprograms @@ -18291,7 +18280,7 @@ Ada standard does not require Ada compilers to implement this feature. @end menu @node Intrinsic Operators,Compilation_ISO_Date,,Intrinsic Subprograms -@anchor{gnat_rm/intrinsic_subprograms id2}@anchor{272}@anchor{gnat_rm/intrinsic_subprograms intrinsic-operators}@anchor{273} +@anchor{gnat_rm/intrinsic_subprograms id2}@anchor{271}@anchor{gnat_rm/intrinsic_subprograms intrinsic-operators}@anchor{272} @section Intrinsic Operators @@ -18322,7 +18311,7 @@ It is also possible to specify such operators for private types, if the full views are appropriate arithmetic types. @node Compilation_ISO_Date,Compilation_Date,Intrinsic Operators,Intrinsic Subprograms -@anchor{gnat_rm/intrinsic_subprograms compilation-iso-date}@anchor{274}@anchor{gnat_rm/intrinsic_subprograms id3}@anchor{275} +@anchor{gnat_rm/intrinsic_subprograms compilation-iso-date}@anchor{273}@anchor{gnat_rm/intrinsic_subprograms id3}@anchor{274} @section Compilation_ISO_Date @@ -18336,7 +18325,7 @@ application program should simply call the function the current compilation (in local time format YYYY-MM-DD). @node Compilation_Date,Compilation_Time,Compilation_ISO_Date,Intrinsic Subprograms -@anchor{gnat_rm/intrinsic_subprograms compilation-date}@anchor{276}@anchor{gnat_rm/intrinsic_subprograms id4}@anchor{277} +@anchor{gnat_rm/intrinsic_subprograms compilation-date}@anchor{275}@anchor{gnat_rm/intrinsic_subprograms id4}@anchor{276} @section Compilation_Date @@ -18346,7 +18335,7 @@ Same as Compilation_ISO_Date, except the string is in the form MMM DD YYYY. @node Compilation_Time,Enclosing_Entity,Compilation_Date,Intrinsic Subprograms -@anchor{gnat_rm/intrinsic_subprograms compilation-time}@anchor{278}@anchor{gnat_rm/intrinsic_subprograms id5}@anchor{279} +@anchor{gnat_rm/intrinsic_subprograms compilation-time}@anchor{277}@anchor{gnat_rm/intrinsic_subprograms id5}@anchor{278} @section Compilation_Time @@ -18360,7 +18349,7 @@ application program should simply call the function the current compilation (in local time format HH:MM:SS). @node Enclosing_Entity,Exception_Information,Compilation_Time,Intrinsic Subprograms -@anchor{gnat_rm/intrinsic_subprograms enclosing-entity}@anchor{27a}@anchor{gnat_rm/intrinsic_subprograms id6}@anchor{27b} +@anchor{gnat_rm/intrinsic_subprograms enclosing-entity}@anchor{279}@anchor{gnat_rm/intrinsic_subprograms id6}@anchor{27a} @section Enclosing_Entity @@ -18374,7 +18363,7 @@ application program should simply call the function the current subprogram, package, task, entry, or protected subprogram. @node Exception_Information,Exception_Message,Enclosing_Entity,Intrinsic Subprograms -@anchor{gnat_rm/intrinsic_subprograms exception-information}@anchor{27c}@anchor{gnat_rm/intrinsic_subprograms id7}@anchor{27d} +@anchor{gnat_rm/intrinsic_subprograms exception-information}@anchor{27b}@anchor{gnat_rm/intrinsic_subprograms id7}@anchor{27c} @section Exception_Information @@ -18388,7 +18377,7 @@ so an application program should simply call the function the exception information associated with the current exception. @node Exception_Message,Exception_Name,Exception_Information,Intrinsic Subprograms -@anchor{gnat_rm/intrinsic_subprograms exception-message}@anchor{27e}@anchor{gnat_rm/intrinsic_subprograms id8}@anchor{27f} +@anchor{gnat_rm/intrinsic_subprograms exception-message}@anchor{27d}@anchor{gnat_rm/intrinsic_subprograms id8}@anchor{27e} @section Exception_Message @@ -18402,7 +18391,7 @@ so an application program should simply call the function the message associated with the current exception. @node Exception_Name,File,Exception_Message,Intrinsic Subprograms -@anchor{gnat_rm/intrinsic_subprograms exception-name}@anchor{280}@anchor{gnat_rm/intrinsic_subprograms id9}@anchor{281} +@anchor{gnat_rm/intrinsic_subprograms exception-name}@anchor{27f}@anchor{gnat_rm/intrinsic_subprograms id9}@anchor{280} @section Exception_Name @@ -18416,7 +18405,7 @@ so an application program should simply call the function the name of the current exception. @node File,Line,Exception_Name,Intrinsic Subprograms -@anchor{gnat_rm/intrinsic_subprograms file}@anchor{282}@anchor{gnat_rm/intrinsic_subprograms id10}@anchor{283} +@anchor{gnat_rm/intrinsic_subprograms file}@anchor{281}@anchor{gnat_rm/intrinsic_subprograms id10}@anchor{282} @section File @@ -18430,7 +18419,7 @@ application program should simply call the function file. @node Line,Shifts and Rotates,File,Intrinsic Subprograms -@anchor{gnat_rm/intrinsic_subprograms id11}@anchor{284}@anchor{gnat_rm/intrinsic_subprograms line}@anchor{285} +@anchor{gnat_rm/intrinsic_subprograms id11}@anchor{283}@anchor{gnat_rm/intrinsic_subprograms line}@anchor{284} @section Line @@ -18444,7 +18433,7 @@ application program should simply call the function source line. @node Shifts and Rotates,Source_Location,Line,Intrinsic Subprograms -@anchor{gnat_rm/intrinsic_subprograms id12}@anchor{286}@anchor{gnat_rm/intrinsic_subprograms shifts-and-rotates}@anchor{287} +@anchor{gnat_rm/intrinsic_subprograms id12}@anchor{285}@anchor{gnat_rm/intrinsic_subprograms shifts-and-rotates}@anchor{286} @section Shifts and Rotates @@ -18487,7 +18476,7 @@ corresponding operator for modular type. In particular, shifting a negative number may change its sign bit to positive. @node Source_Location,,Shifts and Rotates,Intrinsic Subprograms -@anchor{gnat_rm/intrinsic_subprograms id13}@anchor{288}@anchor{gnat_rm/intrinsic_subprograms source-location}@anchor{289} +@anchor{gnat_rm/intrinsic_subprograms id13}@anchor{287}@anchor{gnat_rm/intrinsic_subprograms source-location}@anchor{288} @section Source_Location @@ -18501,7 +18490,7 @@ application program should simply call the function source file location. @node Representation Clauses and Pragmas,Standard Library Routines,Intrinsic Subprograms,Top -@anchor{gnat_rm/representation_clauses_and_pragmas doc}@anchor{28a}@anchor{gnat_rm/representation_clauses_and_pragmas id1}@anchor{28b}@anchor{gnat_rm/representation_clauses_and_pragmas representation-clauses-and-pragmas}@anchor{d} +@anchor{gnat_rm/representation_clauses_and_pragmas doc}@anchor{289}@anchor{gnat_rm/representation_clauses_and_pragmas id1}@anchor{28a}@anchor{gnat_rm/representation_clauses_and_pragmas representation-clauses-and-pragmas}@anchor{d} @chapter Representation Clauses and Pragmas @@ -18547,7 +18536,7 @@ and this section describes the additional capabilities provided. @end menu @node Alignment Clauses,Size Clauses,,Representation Clauses and Pragmas -@anchor{gnat_rm/representation_clauses_and_pragmas alignment-clauses}@anchor{28c}@anchor{gnat_rm/representation_clauses_and_pragmas id2}@anchor{28d} +@anchor{gnat_rm/representation_clauses_and_pragmas alignment-clauses}@anchor{28b}@anchor{gnat_rm/representation_clauses_and_pragmas id2}@anchor{28c} @section Alignment Clauses @@ -18569,7 +18558,7 @@ For elementary types, the alignment is the minimum of the actual size of objects of the type divided by @code{Storage_Unit}, and the maximum alignment supported by the target. (This maximum alignment is given by the GNAT-specific attribute -@code{Standard'Maximum_Alignment}; see @ref{19b,,Attribute Maximum_Alignment}.) +@code{Standard'Maximum_Alignment}; see @ref{19a,,Attribute Maximum_Alignment}.) @geindex Maximum_Alignment attribute @@ -18678,7 +18667,7 @@ assumption is non-portable, and other compilers may choose different alignments for the subtype @code{RS}. @node Size Clauses,Storage_Size Clauses,Alignment Clauses,Representation Clauses and Pragmas -@anchor{gnat_rm/representation_clauses_and_pragmas id3}@anchor{28e}@anchor{gnat_rm/representation_clauses_and_pragmas size-clauses}@anchor{28f} +@anchor{gnat_rm/representation_clauses_and_pragmas id3}@anchor{28d}@anchor{gnat_rm/representation_clauses_and_pragmas size-clauses}@anchor{28e} @section Size Clauses @@ -18755,7 +18744,7 @@ if it is known that a Size value can be accommodated in an object of type Integer. @node Storage_Size Clauses,Size of Variant Record Objects,Size Clauses,Representation Clauses and Pragmas -@anchor{gnat_rm/representation_clauses_and_pragmas id4}@anchor{290}@anchor{gnat_rm/representation_clauses_and_pragmas storage-size-clauses}@anchor{291} +@anchor{gnat_rm/representation_clauses_and_pragmas id4}@anchor{28f}@anchor{gnat_rm/representation_clauses_and_pragmas storage-size-clauses}@anchor{290} @section Storage_Size Clauses @@ -18828,7 +18817,7 @@ Of course in practice, there will not be any explicit allocators in the case of such an access declaration. @node Size of Variant Record Objects,Biased Representation,Storage_Size Clauses,Representation Clauses and Pragmas -@anchor{gnat_rm/representation_clauses_and_pragmas id5}@anchor{292}@anchor{gnat_rm/representation_clauses_and_pragmas size-of-variant-record-objects}@anchor{293} +@anchor{gnat_rm/representation_clauses_and_pragmas id5}@anchor{291}@anchor{gnat_rm/representation_clauses_and_pragmas size-of-variant-record-objects}@anchor{292} @section Size of Variant Record Objects @@ -18938,7 +18927,7 @@ the maximum size, regardless of the current variant value, the variant value. @node Biased Representation,Value_Size and Object_Size Clauses,Size of Variant Record Objects,Representation Clauses and Pragmas -@anchor{gnat_rm/representation_clauses_and_pragmas biased-representation}@anchor{294}@anchor{gnat_rm/representation_clauses_and_pragmas id6}@anchor{295} +@anchor{gnat_rm/representation_clauses_and_pragmas biased-representation}@anchor{293}@anchor{gnat_rm/representation_clauses_and_pragmas id6}@anchor{294} @section Biased Representation @@ -18976,7 +18965,7 @@ biased representation can be used for all discrete types except for enumeration types for which a representation clause is given. @node Value_Size and Object_Size Clauses,Component_Size Clauses,Biased Representation,Representation Clauses and Pragmas -@anchor{gnat_rm/representation_clauses_and_pragmas id7}@anchor{296}@anchor{gnat_rm/representation_clauses_and_pragmas value-size-and-object-size-clauses}@anchor{297} +@anchor{gnat_rm/representation_clauses_and_pragmas id7}@anchor{295}@anchor{gnat_rm/representation_clauses_and_pragmas value-size-and-object-size-clauses}@anchor{296} @section Value_Size and Object_Size Clauses @@ -19292,7 +19281,7 @@ definition clause forces biased representation. This warning can be turned off using @code{-gnatw.B}. @node Component_Size Clauses,Bit_Order Clauses,Value_Size and Object_Size Clauses,Representation Clauses and Pragmas -@anchor{gnat_rm/representation_clauses_and_pragmas component-size-clauses}@anchor{298}@anchor{gnat_rm/representation_clauses_and_pragmas id8}@anchor{299} +@anchor{gnat_rm/representation_clauses_and_pragmas component-size-clauses}@anchor{297}@anchor{gnat_rm/representation_clauses_and_pragmas id8}@anchor{298} @section Component_Size Clauses @@ -19340,7 +19329,7 @@ and a pragma Pack for the same array type. if such duplicate clauses are given, the pragma Pack will be ignored. @node Bit_Order Clauses,Effect of Bit_Order on Byte Ordering,Component_Size Clauses,Representation Clauses and Pragmas -@anchor{gnat_rm/representation_clauses_and_pragmas bit-order-clauses}@anchor{29a}@anchor{gnat_rm/representation_clauses_and_pragmas id9}@anchor{29b} +@anchor{gnat_rm/representation_clauses_and_pragmas bit-order-clauses}@anchor{299}@anchor{gnat_rm/representation_clauses_and_pragmas id9}@anchor{29a} @section Bit_Order Clauses @@ -19446,7 +19435,7 @@ if desired. The following section contains additional details regarding the issue of byte ordering. @node Effect of Bit_Order on Byte Ordering,Pragma Pack for Arrays,Bit_Order Clauses,Representation Clauses and Pragmas -@anchor{gnat_rm/representation_clauses_and_pragmas effect-of-bit-order-on-byte-ordering}@anchor{29c}@anchor{gnat_rm/representation_clauses_and_pragmas id10}@anchor{29d} +@anchor{gnat_rm/representation_clauses_and_pragmas effect-of-bit-order-on-byte-ordering}@anchor{29b}@anchor{gnat_rm/representation_clauses_and_pragmas id10}@anchor{29c} @section Effect of Bit_Order on Byte Ordering @@ -19703,7 +19692,7 @@ to set the boolean constant @code{Master_Byte_First} in an appropriate manner. @node Pragma Pack for Arrays,Pragma Pack for Records,Effect of Bit_Order on Byte Ordering,Representation Clauses and Pragmas -@anchor{gnat_rm/representation_clauses_and_pragmas id11}@anchor{29e}@anchor{gnat_rm/representation_clauses_and_pragmas pragma-pack-for-arrays}@anchor{29f} +@anchor{gnat_rm/representation_clauses_and_pragmas id11}@anchor{29d}@anchor{gnat_rm/representation_clauses_and_pragmas pragma-pack-for-arrays}@anchor{29e} @section Pragma Pack for Arrays @@ -19823,7 +19812,7 @@ Here 31-bit packing is achieved as required, and no warning is generated, since in this case the programmer intention is clear. @node Pragma Pack for Records,Record Representation Clauses,Pragma Pack for Arrays,Representation Clauses and Pragmas -@anchor{gnat_rm/representation_clauses_and_pragmas id12}@anchor{2a0}@anchor{gnat_rm/representation_clauses_and_pragmas pragma-pack-for-records}@anchor{2a1} +@anchor{gnat_rm/representation_clauses_and_pragmas id12}@anchor{29f}@anchor{gnat_rm/representation_clauses_and_pragmas pragma-pack-for-records}@anchor{2a0} @section Pragma Pack for Records @@ -19907,7 +19896,7 @@ array that is longer than 64 bits, so it is itself non-packable on boundary, and takes an integral number of bytes, i.e., 72 bits. @node Record Representation Clauses,Handling of Records with Holes,Pragma Pack for Records,Representation Clauses and Pragmas -@anchor{gnat_rm/representation_clauses_and_pragmas id13}@anchor{2a2}@anchor{gnat_rm/representation_clauses_and_pragmas record-representation-clauses}@anchor{2a3} +@anchor{gnat_rm/representation_clauses_and_pragmas id13}@anchor{2a1}@anchor{gnat_rm/representation_clauses_and_pragmas record-representation-clauses}@anchor{2a2} @section Record Representation Clauses @@ -19986,7 +19975,7 @@ end record; @end example @node Handling of Records with Holes,Enumeration Clauses,Record Representation Clauses,Representation Clauses and Pragmas -@anchor{gnat_rm/representation_clauses_and_pragmas handling-of-records-with-holes}@anchor{2a4}@anchor{gnat_rm/representation_clauses_and_pragmas id14}@anchor{2a5} +@anchor{gnat_rm/representation_clauses_and_pragmas handling-of-records-with-holes}@anchor{2a3}@anchor{gnat_rm/representation_clauses_and_pragmas id14}@anchor{2a4} @section Handling of Records with Holes @@ -20062,7 +20051,7 @@ for Hrec'Size use 64; @end example @node Enumeration Clauses,Address Clauses,Handling of Records with Holes,Representation Clauses and Pragmas -@anchor{gnat_rm/representation_clauses_and_pragmas enumeration-clauses}@anchor{2a6}@anchor{gnat_rm/representation_clauses_and_pragmas id15}@anchor{2a7} +@anchor{gnat_rm/representation_clauses_and_pragmas enumeration-clauses}@anchor{2a5}@anchor{gnat_rm/representation_clauses_and_pragmas id15}@anchor{2a6} @section Enumeration Clauses @@ -20105,7 +20094,7 @@ the overhead of converting representation values to the corresponding positional values, (i.e., the value delivered by the @code{Pos} attribute). @node Address Clauses,Use of Address Clauses for Memory-Mapped I/O,Enumeration Clauses,Representation Clauses and Pragmas -@anchor{gnat_rm/representation_clauses_and_pragmas address-clauses}@anchor{2a8}@anchor{gnat_rm/representation_clauses_and_pragmas id16}@anchor{2a9} +@anchor{gnat_rm/representation_clauses_and_pragmas address-clauses}@anchor{2a7}@anchor{gnat_rm/representation_clauses_and_pragmas id16}@anchor{2a8} @section Address Clauses @@ -20445,7 +20434,7 @@ then the program compiles without the warning and when run will generate the output @code{X was not clobbered}. @node Use of Address Clauses for Memory-Mapped I/O,Effect of Convention on Representation,Address Clauses,Representation Clauses and Pragmas -@anchor{gnat_rm/representation_clauses_and_pragmas id17}@anchor{2aa}@anchor{gnat_rm/representation_clauses_and_pragmas use-of-address-clauses-for-memory-mapped-i-o}@anchor{2ab} +@anchor{gnat_rm/representation_clauses_and_pragmas id17}@anchor{2a9}@anchor{gnat_rm/representation_clauses_and_pragmas use-of-address-clauses-for-memory-mapped-i-o}@anchor{2aa} @section Use of Address Clauses for Memory-Mapped I/O @@ -20503,7 +20492,7 @@ provides the pragma @code{Volatile_Full_Access} which can be used in lieu of pragma @code{Atomic} and will give the additional guarantee. @node Effect of Convention on Representation,Conventions and Anonymous Access Types,Use of Address Clauses for Memory-Mapped I/O,Representation Clauses and Pragmas -@anchor{gnat_rm/representation_clauses_and_pragmas effect-of-convention-on-representation}@anchor{2ac}@anchor{gnat_rm/representation_clauses_and_pragmas id18}@anchor{2ad} +@anchor{gnat_rm/representation_clauses_and_pragmas effect-of-convention-on-representation}@anchor{2ab}@anchor{gnat_rm/representation_clauses_and_pragmas id18}@anchor{2ac} @section Effect of Convention on Representation @@ -20581,7 +20570,7 @@ when one of these values is read, any nonzero value is treated as True. @end itemize @node Conventions and Anonymous Access Types,Determining the Representations chosen by GNAT,Effect of Convention on Representation,Representation Clauses and Pragmas -@anchor{gnat_rm/representation_clauses_and_pragmas conventions-and-anonymous-access-types}@anchor{2ae}@anchor{gnat_rm/representation_clauses_and_pragmas id19}@anchor{2af} +@anchor{gnat_rm/representation_clauses_and_pragmas conventions-and-anonymous-access-types}@anchor{2ad}@anchor{gnat_rm/representation_clauses_and_pragmas id19}@anchor{2ae} @section Conventions and Anonymous Access Types @@ -20657,7 +20646,7 @@ package ConvComp is @end example @node Determining the Representations chosen by GNAT,,Conventions and Anonymous Access Types,Representation Clauses and Pragmas -@anchor{gnat_rm/representation_clauses_and_pragmas determining-the-representations-chosen-by-gnat}@anchor{2b0}@anchor{gnat_rm/representation_clauses_and_pragmas id20}@anchor{2b1} +@anchor{gnat_rm/representation_clauses_and_pragmas determining-the-representations-chosen-by-gnat}@anchor{2af}@anchor{gnat_rm/representation_clauses_and_pragmas id20}@anchor{2b0} @section Determining the Representations chosen by GNAT @@ -20809,7 +20798,7 @@ generated by the compiler into the original source to fix and guarantee the actual representation to be used. @node Standard Library Routines,The Implementation of Standard I/O,Representation Clauses and Pragmas,Top -@anchor{gnat_rm/standard_library_routines doc}@anchor{2b2}@anchor{gnat_rm/standard_library_routines id1}@anchor{2b3}@anchor{gnat_rm/standard_library_routines standard-library-routines}@anchor{e} +@anchor{gnat_rm/standard_library_routines doc}@anchor{2b1}@anchor{gnat_rm/standard_library_routines id1}@anchor{2b2}@anchor{gnat_rm/standard_library_routines standard-library-routines}@anchor{e} @chapter Standard Library Routines @@ -21633,7 +21622,7 @@ For packages in Interfaces and System, all the RM defined packages are available in GNAT, see the Ada 2012 RM for full details. @node The Implementation of Standard I/O,The GNAT Library,Standard Library Routines,Top -@anchor{gnat_rm/the_implementation_of_standard_i_o doc}@anchor{2b4}@anchor{gnat_rm/the_implementation_of_standard_i_o id1}@anchor{2b5}@anchor{gnat_rm/the_implementation_of_standard_i_o the-implementation-of-standard-i-o}@anchor{f} +@anchor{gnat_rm/the_implementation_of_standard_i_o doc}@anchor{2b3}@anchor{gnat_rm/the_implementation_of_standard_i_o id1}@anchor{2b4}@anchor{gnat_rm/the_implementation_of_standard_i_o the-implementation-of-standard-i-o}@anchor{f} @chapter The Implementation of Standard I/O @@ -21685,7 +21674,7 @@ these additional facilities are also described in this chapter. @end menu @node Standard I/O Packages,FORM Strings,,The Implementation of Standard I/O -@anchor{gnat_rm/the_implementation_of_standard_i_o id2}@anchor{2b6}@anchor{gnat_rm/the_implementation_of_standard_i_o standard-i-o-packages}@anchor{2b7} +@anchor{gnat_rm/the_implementation_of_standard_i_o id2}@anchor{2b5}@anchor{gnat_rm/the_implementation_of_standard_i_o standard-i-o-packages}@anchor{2b6} @section Standard I/O Packages @@ -21756,7 +21745,7 @@ flush the common I/O streams and in particular Standard_Output before elaborating the Ada code. @node FORM Strings,Direct_IO,Standard I/O Packages,The Implementation of Standard I/O -@anchor{gnat_rm/the_implementation_of_standard_i_o form-strings}@anchor{2b8}@anchor{gnat_rm/the_implementation_of_standard_i_o id3}@anchor{2b9} +@anchor{gnat_rm/the_implementation_of_standard_i_o form-strings}@anchor{2b7}@anchor{gnat_rm/the_implementation_of_standard_i_o id3}@anchor{2b8} @section FORM Strings @@ -21782,7 +21771,7 @@ unrecognized keyword appears in a form string, it is silently ignored and not considered invalid. @node Direct_IO,Sequential_IO,FORM Strings,The Implementation of Standard I/O -@anchor{gnat_rm/the_implementation_of_standard_i_o direct-io}@anchor{2ba}@anchor{gnat_rm/the_implementation_of_standard_i_o id4}@anchor{2bb} +@anchor{gnat_rm/the_implementation_of_standard_i_o direct-io}@anchor{2b9}@anchor{gnat_rm/the_implementation_of_standard_i_o id4}@anchor{2ba} @section Direct_IO @@ -21801,7 +21790,7 @@ There is no limit on the size of Direct_IO files, they are expanded as necessary to accommodate whatever records are written to the file. @node Sequential_IO,Text_IO,Direct_IO,The Implementation of Standard I/O -@anchor{gnat_rm/the_implementation_of_standard_i_o id5}@anchor{2bc}@anchor{gnat_rm/the_implementation_of_standard_i_o sequential-io}@anchor{2bd} +@anchor{gnat_rm/the_implementation_of_standard_i_o id5}@anchor{2bb}@anchor{gnat_rm/the_implementation_of_standard_i_o sequential-io}@anchor{2bc} @section Sequential_IO @@ -21848,7 +21837,7 @@ using Stream_IO, and this is the preferred mechanism. In particular, the above program fragment rewritten to use Stream_IO will work correctly. @node Text_IO,Wide_Text_IO,Sequential_IO,The Implementation of Standard I/O -@anchor{gnat_rm/the_implementation_of_standard_i_o id6}@anchor{2be}@anchor{gnat_rm/the_implementation_of_standard_i_o text-io}@anchor{2bf} +@anchor{gnat_rm/the_implementation_of_standard_i_o id6}@anchor{2bd}@anchor{gnat_rm/the_implementation_of_standard_i_o text-io}@anchor{2be} @section Text_IO @@ -21931,7 +21920,7 @@ the file. @end menu @node Stream Pointer Positioning,Reading and Writing Non-Regular Files,,Text_IO -@anchor{gnat_rm/the_implementation_of_standard_i_o id7}@anchor{2c0}@anchor{gnat_rm/the_implementation_of_standard_i_o stream-pointer-positioning}@anchor{2c1} +@anchor{gnat_rm/the_implementation_of_standard_i_o id7}@anchor{2bf}@anchor{gnat_rm/the_implementation_of_standard_i_o stream-pointer-positioning}@anchor{2c0} @subsection Stream Pointer Positioning @@ -21967,7 +21956,7 @@ between two Ada files, then the difference may be observable in some situations. @node Reading and Writing Non-Regular Files,Get_Immediate,Stream Pointer Positioning,Text_IO -@anchor{gnat_rm/the_implementation_of_standard_i_o id8}@anchor{2c2}@anchor{gnat_rm/the_implementation_of_standard_i_o reading-and-writing-non-regular-files}@anchor{2c3} +@anchor{gnat_rm/the_implementation_of_standard_i_o id8}@anchor{2c1}@anchor{gnat_rm/the_implementation_of_standard_i_o reading-and-writing-non-regular-files}@anchor{2c2} @subsection Reading and Writing Non-Regular Files @@ -22018,7 +22007,7 @@ to read data past that end of file indication, until another end of file indication is entered. @node Get_Immediate,Treating Text_IO Files as Streams,Reading and Writing Non-Regular Files,Text_IO -@anchor{gnat_rm/the_implementation_of_standard_i_o get-immediate}@anchor{2c4}@anchor{gnat_rm/the_implementation_of_standard_i_o id9}@anchor{2c5} +@anchor{gnat_rm/the_implementation_of_standard_i_o get-immediate}@anchor{2c3}@anchor{gnat_rm/the_implementation_of_standard_i_o id9}@anchor{2c4} @subsection Get_Immediate @@ -22036,7 +22025,7 @@ possible), it is undefined whether the FF character will be treated as a page mark. @node Treating Text_IO Files as Streams,Text_IO Extensions,Get_Immediate,Text_IO -@anchor{gnat_rm/the_implementation_of_standard_i_o id10}@anchor{2c6}@anchor{gnat_rm/the_implementation_of_standard_i_o treating-text-io-files-as-streams}@anchor{2c7} +@anchor{gnat_rm/the_implementation_of_standard_i_o id10}@anchor{2c5}@anchor{gnat_rm/the_implementation_of_standard_i_o treating-text-io-files-as-streams}@anchor{2c6} @subsection Treating Text_IO Files as Streams @@ -22052,7 +22041,7 @@ skipped and the effect is similar to that described above for @code{Get_Immediate}. @node Text_IO Extensions,Text_IO Facilities for Unbounded Strings,Treating Text_IO Files as Streams,Text_IO -@anchor{gnat_rm/the_implementation_of_standard_i_o id11}@anchor{2c8}@anchor{gnat_rm/the_implementation_of_standard_i_o text-io-extensions}@anchor{2c9} +@anchor{gnat_rm/the_implementation_of_standard_i_o id11}@anchor{2c7}@anchor{gnat_rm/the_implementation_of_standard_i_o text-io-extensions}@anchor{2c8} @subsection Text_IO Extensions @@ -22080,7 +22069,7 @@ the string is to be read. @end itemize @node Text_IO Facilities for Unbounded Strings,,Text_IO Extensions,Text_IO -@anchor{gnat_rm/the_implementation_of_standard_i_o id12}@anchor{2ca}@anchor{gnat_rm/the_implementation_of_standard_i_o text-io-facilities-for-unbounded-strings}@anchor{2cb} +@anchor{gnat_rm/the_implementation_of_standard_i_o id12}@anchor{2c9}@anchor{gnat_rm/the_implementation_of_standard_i_o text-io-facilities-for-unbounded-strings}@anchor{2ca} @subsection Text_IO Facilities for Unbounded Strings @@ -22128,7 +22117,7 @@ files @code{a-szuzti.ads} and @code{a-szuzti.adb} provides similar extended @code{Wide_Wide_Text_IO} functionality for unbounded wide wide strings. @node Wide_Text_IO,Wide_Wide_Text_IO,Text_IO,The Implementation of Standard I/O -@anchor{gnat_rm/the_implementation_of_standard_i_o id13}@anchor{2cc}@anchor{gnat_rm/the_implementation_of_standard_i_o wide-text-io}@anchor{2cd} +@anchor{gnat_rm/the_implementation_of_standard_i_o id13}@anchor{2cb}@anchor{gnat_rm/the_implementation_of_standard_i_o wide-text-io}@anchor{2cc} @section Wide_Text_IO @@ -22375,12 +22364,12 @@ input also causes Constraint_Error to be raised. @end menu @node Stream Pointer Positioning<2>,Reading and Writing Non-Regular Files<2>,,Wide_Text_IO -@anchor{gnat_rm/the_implementation_of_standard_i_o id14}@anchor{2ce}@anchor{gnat_rm/the_implementation_of_standard_i_o stream-pointer-positioning-1}@anchor{2cf} +@anchor{gnat_rm/the_implementation_of_standard_i_o id14}@anchor{2cd}@anchor{gnat_rm/the_implementation_of_standard_i_o stream-pointer-positioning-1}@anchor{2ce} @subsection Stream Pointer Positioning @code{Ada.Wide_Text_IO} is similar to @code{Ada.Text_IO} in its handling -of stream pointer positioning (@ref{2bf,,Text_IO}). There is one additional +of stream pointer positioning (@ref{2be,,Text_IO}). There is one additional case: If @code{Ada.Wide_Text_IO.Look_Ahead} reads a character outside the @@ -22399,7 +22388,7 @@ to a normal program using @code{Wide_Text_IO}. However, this discrepancy can be observed if the wide text file shares a stream with another file. @node Reading and Writing Non-Regular Files<2>,,Stream Pointer Positioning<2>,Wide_Text_IO -@anchor{gnat_rm/the_implementation_of_standard_i_o id15}@anchor{2d0}@anchor{gnat_rm/the_implementation_of_standard_i_o reading-and-writing-non-regular-files-1}@anchor{2d1} +@anchor{gnat_rm/the_implementation_of_standard_i_o id15}@anchor{2cf}@anchor{gnat_rm/the_implementation_of_standard_i_o reading-and-writing-non-regular-files-1}@anchor{2d0} @subsection Reading and Writing Non-Regular Files @@ -22410,7 +22399,7 @@ treated as data characters), and @code{End_Of_Page} always returns it is possible to read beyond an end of file. @node Wide_Wide_Text_IO,Stream_IO,Wide_Text_IO,The Implementation of Standard I/O -@anchor{gnat_rm/the_implementation_of_standard_i_o id16}@anchor{2d2}@anchor{gnat_rm/the_implementation_of_standard_i_o wide-wide-text-io}@anchor{2d3} +@anchor{gnat_rm/the_implementation_of_standard_i_o id16}@anchor{2d1}@anchor{gnat_rm/the_implementation_of_standard_i_o wide-wide-text-io}@anchor{2d2} @section Wide_Wide_Text_IO @@ -22579,12 +22568,12 @@ input also causes Constraint_Error to be raised. @end menu @node Stream Pointer Positioning<3>,Reading and Writing Non-Regular Files<3>,,Wide_Wide_Text_IO -@anchor{gnat_rm/the_implementation_of_standard_i_o id17}@anchor{2d4}@anchor{gnat_rm/the_implementation_of_standard_i_o stream-pointer-positioning-2}@anchor{2d5} +@anchor{gnat_rm/the_implementation_of_standard_i_o id17}@anchor{2d3}@anchor{gnat_rm/the_implementation_of_standard_i_o stream-pointer-positioning-2}@anchor{2d4} @subsection Stream Pointer Positioning @code{Ada.Wide_Wide_Text_IO} is similar to @code{Ada.Text_IO} in its handling -of stream pointer positioning (@ref{2bf,,Text_IO}). There is one additional +of stream pointer positioning (@ref{2be,,Text_IO}). There is one additional case: If @code{Ada.Wide_Wide_Text_IO.Look_Ahead} reads a character outside the @@ -22603,7 +22592,7 @@ to a normal program using @code{Wide_Wide_Text_IO}. However, this discrepancy can be observed if the wide text file shares a stream with another file. @node Reading and Writing Non-Regular Files<3>,,Stream Pointer Positioning<3>,Wide_Wide_Text_IO -@anchor{gnat_rm/the_implementation_of_standard_i_o id18}@anchor{2d6}@anchor{gnat_rm/the_implementation_of_standard_i_o reading-and-writing-non-regular-files-2}@anchor{2d7} +@anchor{gnat_rm/the_implementation_of_standard_i_o id18}@anchor{2d5}@anchor{gnat_rm/the_implementation_of_standard_i_o reading-and-writing-non-regular-files-2}@anchor{2d6} @subsection Reading and Writing Non-Regular Files @@ -22614,7 +22603,7 @@ treated as data characters), and @code{End_Of_Page} always returns it is possible to read beyond an end of file. @node Stream_IO,Text Translation,Wide_Wide_Text_IO,The Implementation of Standard I/O -@anchor{gnat_rm/the_implementation_of_standard_i_o id19}@anchor{2d8}@anchor{gnat_rm/the_implementation_of_standard_i_o stream-io}@anchor{2d9} +@anchor{gnat_rm/the_implementation_of_standard_i_o id19}@anchor{2d7}@anchor{gnat_rm/the_implementation_of_standard_i_o stream-io}@anchor{2d8} @section Stream_IO @@ -22636,7 +22625,7 @@ manner described for stream attributes. @end itemize @node Text Translation,Shared Files,Stream_IO,The Implementation of Standard I/O -@anchor{gnat_rm/the_implementation_of_standard_i_o id20}@anchor{2da}@anchor{gnat_rm/the_implementation_of_standard_i_o text-translation}@anchor{2db} +@anchor{gnat_rm/the_implementation_of_standard_i_o id20}@anchor{2d9}@anchor{gnat_rm/the_implementation_of_standard_i_o text-translation}@anchor{2da} @section Text Translation @@ -22670,7 +22659,7 @@ mode. (corresponds to_O_U16TEXT). @end itemize @node Shared Files,Filenames encoding,Text Translation,The Implementation of Standard I/O -@anchor{gnat_rm/the_implementation_of_standard_i_o id21}@anchor{2dc}@anchor{gnat_rm/the_implementation_of_standard_i_o shared-files}@anchor{2dd} +@anchor{gnat_rm/the_implementation_of_standard_i_o id21}@anchor{2db}@anchor{gnat_rm/the_implementation_of_standard_i_o shared-files}@anchor{2dc} @section Shared Files @@ -22733,7 +22722,7 @@ heterogeneous input-output. Although this approach will work in GNAT if for this purpose (using the stream attributes) @node Filenames encoding,File content encoding,Shared Files,The Implementation of Standard I/O -@anchor{gnat_rm/the_implementation_of_standard_i_o filenames-encoding}@anchor{2de}@anchor{gnat_rm/the_implementation_of_standard_i_o id22}@anchor{2df} +@anchor{gnat_rm/the_implementation_of_standard_i_o filenames-encoding}@anchor{2dd}@anchor{gnat_rm/the_implementation_of_standard_i_o id22}@anchor{2de} @section Filenames encoding @@ -22773,7 +22762,7 @@ platform. On the other Operating Systems the run-time is supporting UTF-8 natively. @node File content encoding,Open Modes,Filenames encoding,The Implementation of Standard I/O -@anchor{gnat_rm/the_implementation_of_standard_i_o file-content-encoding}@anchor{2e0}@anchor{gnat_rm/the_implementation_of_standard_i_o id23}@anchor{2e1} +@anchor{gnat_rm/the_implementation_of_standard_i_o file-content-encoding}@anchor{2df}@anchor{gnat_rm/the_implementation_of_standard_i_o id23}@anchor{2e0} @section File content encoding @@ -22806,7 +22795,7 @@ Unicode 8-bit encoding This encoding is only supported on the Windows platform. @node Open Modes,Operations on C Streams,File content encoding,The Implementation of Standard I/O -@anchor{gnat_rm/the_implementation_of_standard_i_o id24}@anchor{2e2}@anchor{gnat_rm/the_implementation_of_standard_i_o open-modes}@anchor{2e3} +@anchor{gnat_rm/the_implementation_of_standard_i_o id24}@anchor{2e1}@anchor{gnat_rm/the_implementation_of_standard_i_o open-modes}@anchor{2e2} @section Open Modes @@ -22909,7 +22898,7 @@ subsequently requires switching from reading to writing or vice-versa, then the file is reopened in @code{r+} mode to permit the required operation. @node Operations on C Streams,Interfacing to C Streams,Open Modes,The Implementation of Standard I/O -@anchor{gnat_rm/the_implementation_of_standard_i_o id25}@anchor{2e4}@anchor{gnat_rm/the_implementation_of_standard_i_o operations-on-c-streams}@anchor{2e5} +@anchor{gnat_rm/the_implementation_of_standard_i_o id25}@anchor{2e3}@anchor{gnat_rm/the_implementation_of_standard_i_o operations-on-c-streams}@anchor{2e4} @section Operations on C Streams @@ -23069,7 +23058,7 @@ end Interfaces.C_Streams; @end example @node Interfacing to C Streams,,Operations on C Streams,The Implementation of Standard I/O -@anchor{gnat_rm/the_implementation_of_standard_i_o id26}@anchor{2e6}@anchor{gnat_rm/the_implementation_of_standard_i_o interfacing-to-c-streams}@anchor{2e7} +@anchor{gnat_rm/the_implementation_of_standard_i_o id26}@anchor{2e5}@anchor{gnat_rm/the_implementation_of_standard_i_o interfacing-to-c-streams}@anchor{2e6} @section Interfacing to C Streams @@ -23162,7 +23151,7 @@ imported from a C program, allowing an Ada file to operate on an existing C file. @node The GNAT Library,Interfacing to Other Languages,The Implementation of Standard I/O,Top -@anchor{gnat_rm/the_gnat_library doc}@anchor{2e8}@anchor{gnat_rm/the_gnat_library id1}@anchor{2e9}@anchor{gnat_rm/the_gnat_library the-gnat-library}@anchor{10} +@anchor{gnat_rm/the_gnat_library doc}@anchor{2e7}@anchor{gnat_rm/the_gnat_library id1}@anchor{2e8}@anchor{gnat_rm/the_gnat_library the-gnat-library}@anchor{10} @chapter The GNAT Library @@ -23347,7 +23336,7 @@ of GNAT, and will generate a warning message. @end menu @node Ada Characters Latin_9 a-chlat9 ads,Ada Characters Wide_Latin_1 a-cwila1 ads,,The GNAT Library -@anchor{gnat_rm/the_gnat_library ada-characters-latin-9-a-chlat9-ads}@anchor{2ea}@anchor{gnat_rm/the_gnat_library id2}@anchor{2eb} +@anchor{gnat_rm/the_gnat_library ada-characters-latin-9-a-chlat9-ads}@anchor{2e9}@anchor{gnat_rm/the_gnat_library id2}@anchor{2ea} @section @code{Ada.Characters.Latin_9} (@code{a-chlat9.ads}) @@ -23364,7 +23353,7 @@ is specifically authorized by the Ada Reference Manual (RM A.3.3(27)). @node Ada Characters Wide_Latin_1 a-cwila1 ads,Ada Characters Wide_Latin_9 a-cwila9 ads,Ada Characters Latin_9 a-chlat9 ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library ada-characters-wide-latin-1-a-cwila1-ads}@anchor{2ec}@anchor{gnat_rm/the_gnat_library id3}@anchor{2ed} +@anchor{gnat_rm/the_gnat_library ada-characters-wide-latin-1-a-cwila1-ads}@anchor{2eb}@anchor{gnat_rm/the_gnat_library id3}@anchor{2ec} @section @code{Ada.Characters.Wide_Latin_1} (@code{a-cwila1.ads}) @@ -23381,7 +23370,7 @@ is specifically authorized by the Ada Reference Manual (RM A.3.3(27)). @node Ada Characters Wide_Latin_9 a-cwila9 ads,Ada Characters Wide_Wide_Latin_1 a-chzla1 ads,Ada Characters Wide_Latin_1 a-cwila1 ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library ada-characters-wide-latin-9-a-cwila9-ads}@anchor{2ee}@anchor{gnat_rm/the_gnat_library id4}@anchor{2ef} +@anchor{gnat_rm/the_gnat_library ada-characters-wide-latin-9-a-cwila9-ads}@anchor{2ed}@anchor{gnat_rm/the_gnat_library id4}@anchor{2ee} @section @code{Ada.Characters.Wide_Latin_9} (@code{a-cwila9.ads}) @@ -23398,7 +23387,7 @@ is specifically authorized by the Ada Reference Manual (RM A.3.3(27)). @node Ada Characters Wide_Wide_Latin_1 a-chzla1 ads,Ada Characters Wide_Wide_Latin_9 a-chzla9 ads,Ada Characters Wide_Latin_9 a-cwila9 ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library ada-characters-wide-wide-latin-1-a-chzla1-ads}@anchor{2f0}@anchor{gnat_rm/the_gnat_library id5}@anchor{2f1} +@anchor{gnat_rm/the_gnat_library ada-characters-wide-wide-latin-1-a-chzla1-ads}@anchor{2ef}@anchor{gnat_rm/the_gnat_library id5}@anchor{2f0} @section @code{Ada.Characters.Wide_Wide_Latin_1} (@code{a-chzla1.ads}) @@ -23415,7 +23404,7 @@ is specifically authorized by the Ada Reference Manual (RM A.3.3(27)). @node Ada Characters Wide_Wide_Latin_9 a-chzla9 ads,Ada Containers Bounded_Holders a-coboho ads,Ada Characters Wide_Wide_Latin_1 a-chzla1 ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library ada-characters-wide-wide-latin-9-a-chzla9-ads}@anchor{2f2}@anchor{gnat_rm/the_gnat_library id6}@anchor{2f3} +@anchor{gnat_rm/the_gnat_library ada-characters-wide-wide-latin-9-a-chzla9-ads}@anchor{2f1}@anchor{gnat_rm/the_gnat_library id6}@anchor{2f2} @section @code{Ada.Characters.Wide_Wide_Latin_9} (@code{a-chzla9.ads}) @@ -23432,7 +23421,7 @@ is specifically authorized by the Ada Reference Manual (RM A.3.3(27)). @node Ada Containers Bounded_Holders a-coboho ads,Ada Command_Line Environment a-colien ads,Ada Characters Wide_Wide_Latin_9 a-chzla9 ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library ada-containers-bounded-holders-a-coboho-ads}@anchor{2f4}@anchor{gnat_rm/the_gnat_library id7}@anchor{2f5} +@anchor{gnat_rm/the_gnat_library ada-containers-bounded-holders-a-coboho-ads}@anchor{2f3}@anchor{gnat_rm/the_gnat_library id7}@anchor{2f4} @section @code{Ada.Containers.Bounded_Holders} (@code{a-coboho.ads}) @@ -23444,7 +23433,7 @@ This child of @code{Ada.Containers} defines a modified version of Indefinite_Holders that avoids heap allocation. @node Ada Command_Line Environment a-colien ads,Ada Command_Line Remove a-colire ads,Ada Containers Bounded_Holders a-coboho ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library ada-command-line-environment-a-colien-ads}@anchor{2f6}@anchor{gnat_rm/the_gnat_library id8}@anchor{2f7} +@anchor{gnat_rm/the_gnat_library ada-command-line-environment-a-colien-ads}@anchor{2f5}@anchor{gnat_rm/the_gnat_library id8}@anchor{2f6} @section @code{Ada.Command_Line.Environment} (@code{a-colien.ads}) @@ -23457,7 +23446,7 @@ provides a mechanism for obtaining environment values on systems where this concept makes sense. @node Ada Command_Line Remove a-colire ads,Ada Command_Line Response_File a-clrefi ads,Ada Command_Line Environment a-colien ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library ada-command-line-remove-a-colire-ads}@anchor{2f8}@anchor{gnat_rm/the_gnat_library id9}@anchor{2f9} +@anchor{gnat_rm/the_gnat_library ada-command-line-remove-a-colire-ads}@anchor{2f7}@anchor{gnat_rm/the_gnat_library id9}@anchor{2f8} @section @code{Ada.Command_Line.Remove} (@code{a-colire.ads}) @@ -23475,7 +23464,7 @@ to further calls to the subprograms in @code{Ada.Command_Line}. These calls will not see the removed argument. @node Ada Command_Line Response_File a-clrefi ads,Ada Direct_IO C_Streams a-diocst ads,Ada Command_Line Remove a-colire ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library ada-command-line-response-file-a-clrefi-ads}@anchor{2fa}@anchor{gnat_rm/the_gnat_library id10}@anchor{2fb} +@anchor{gnat_rm/the_gnat_library ada-command-line-response-file-a-clrefi-ads}@anchor{2f9}@anchor{gnat_rm/the_gnat_library id10}@anchor{2fa} @section @code{Ada.Command_Line.Response_File} (@code{a-clrefi.ads}) @@ -23495,7 +23484,7 @@ Using a response file allow passing a set of arguments to an executable longer than the maximum allowed by the system on the command line. @node Ada Direct_IO C_Streams a-diocst ads,Ada Exceptions Is_Null_Occurrence a-einuoc ads,Ada Command_Line Response_File a-clrefi ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library ada-direct-io-c-streams-a-diocst-ads}@anchor{2fc}@anchor{gnat_rm/the_gnat_library id11}@anchor{2fd} +@anchor{gnat_rm/the_gnat_library ada-direct-io-c-streams-a-diocst-ads}@anchor{2fb}@anchor{gnat_rm/the_gnat_library id11}@anchor{2fc} @section @code{Ada.Direct_IO.C_Streams} (@code{a-diocst.ads}) @@ -23510,7 +23499,7 @@ extracted from a file opened on the Ada side, and an Ada file can be constructed from a stream opened on the C side. @node Ada Exceptions Is_Null_Occurrence a-einuoc ads,Ada Exceptions Last_Chance_Handler a-elchha ads,Ada Direct_IO C_Streams a-diocst ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library ada-exceptions-is-null-occurrence-a-einuoc-ads}@anchor{2fe}@anchor{gnat_rm/the_gnat_library id12}@anchor{2ff} +@anchor{gnat_rm/the_gnat_library ada-exceptions-is-null-occurrence-a-einuoc-ads}@anchor{2fd}@anchor{gnat_rm/the_gnat_library id12}@anchor{2fe} @section @code{Ada.Exceptions.Is_Null_Occurrence} (@code{a-einuoc.ads}) @@ -23524,7 +23513,7 @@ exception occurrence (@code{Null_Occurrence}) without raising an exception. @node Ada Exceptions Last_Chance_Handler a-elchha ads,Ada Exceptions Traceback a-exctra ads,Ada Exceptions Is_Null_Occurrence a-einuoc ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library ada-exceptions-last-chance-handler-a-elchha-ads}@anchor{300}@anchor{gnat_rm/the_gnat_library id13}@anchor{301} +@anchor{gnat_rm/the_gnat_library ada-exceptions-last-chance-handler-a-elchha-ads}@anchor{2ff}@anchor{gnat_rm/the_gnat_library id13}@anchor{300} @section @code{Ada.Exceptions.Last_Chance_Handler} (@code{a-elchha.ads}) @@ -23538,7 +23527,7 @@ exceptions (hence the name last chance), and perform clean ups before terminating the program. Note that this subprogram never returns. @node Ada Exceptions Traceback a-exctra ads,Ada Sequential_IO C_Streams a-siocst ads,Ada Exceptions Last_Chance_Handler a-elchha ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library ada-exceptions-traceback-a-exctra-ads}@anchor{302}@anchor{gnat_rm/the_gnat_library id14}@anchor{303} +@anchor{gnat_rm/the_gnat_library ada-exceptions-traceback-a-exctra-ads}@anchor{301}@anchor{gnat_rm/the_gnat_library id14}@anchor{302} @section @code{Ada.Exceptions.Traceback} (@code{a-exctra.ads}) @@ -23551,7 +23540,7 @@ give a traceback array of addresses based on an exception occurrence. @node Ada Sequential_IO C_Streams a-siocst ads,Ada Streams Stream_IO C_Streams a-ssicst ads,Ada Exceptions Traceback a-exctra ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library ada-sequential-io-c-streams-a-siocst-ads}@anchor{304}@anchor{gnat_rm/the_gnat_library id15}@anchor{305} +@anchor{gnat_rm/the_gnat_library ada-sequential-io-c-streams-a-siocst-ads}@anchor{303}@anchor{gnat_rm/the_gnat_library id15}@anchor{304} @section @code{Ada.Sequential_IO.C_Streams} (@code{a-siocst.ads}) @@ -23566,7 +23555,7 @@ extracted from a file opened on the Ada side, and an Ada file can be constructed from a stream opened on the C side. @node Ada Streams Stream_IO C_Streams a-ssicst ads,Ada Strings Unbounded Text_IO a-suteio ads,Ada Sequential_IO C_Streams a-siocst ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library ada-streams-stream-io-c-streams-a-ssicst-ads}@anchor{306}@anchor{gnat_rm/the_gnat_library id16}@anchor{307} +@anchor{gnat_rm/the_gnat_library ada-streams-stream-io-c-streams-a-ssicst-ads}@anchor{305}@anchor{gnat_rm/the_gnat_library id16}@anchor{306} @section @code{Ada.Streams.Stream_IO.C_Streams} (@code{a-ssicst.ads}) @@ -23581,7 +23570,7 @@ extracted from a file opened on the Ada side, and an Ada file can be constructed from a stream opened on the C side. @node Ada Strings Unbounded Text_IO a-suteio ads,Ada Strings Wide_Unbounded Wide_Text_IO a-swuwti ads,Ada Streams Stream_IO C_Streams a-ssicst ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library ada-strings-unbounded-text-io-a-suteio-ads}@anchor{308}@anchor{gnat_rm/the_gnat_library id17}@anchor{309} +@anchor{gnat_rm/the_gnat_library ada-strings-unbounded-text-io-a-suteio-ads}@anchor{307}@anchor{gnat_rm/the_gnat_library id17}@anchor{308} @section @code{Ada.Strings.Unbounded.Text_IO} (@code{a-suteio.ads}) @@ -23598,7 +23587,7 @@ strings, avoiding the necessity for an intermediate operation with ordinary strings. @node Ada Strings Wide_Unbounded Wide_Text_IO a-swuwti ads,Ada Strings Wide_Wide_Unbounded Wide_Wide_Text_IO a-szuzti ads,Ada Strings Unbounded Text_IO a-suteio ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library ada-strings-wide-unbounded-wide-text-io-a-swuwti-ads}@anchor{30a}@anchor{gnat_rm/the_gnat_library id18}@anchor{30b} +@anchor{gnat_rm/the_gnat_library ada-strings-wide-unbounded-wide-text-io-a-swuwti-ads}@anchor{309}@anchor{gnat_rm/the_gnat_library id18}@anchor{30a} @section @code{Ada.Strings.Wide_Unbounded.Wide_Text_IO} (@code{a-swuwti.ads}) @@ -23615,7 +23604,7 @@ wide strings, avoiding the necessity for an intermediate operation with ordinary wide strings. @node Ada Strings Wide_Wide_Unbounded Wide_Wide_Text_IO a-szuzti ads,Ada Task_Initialization a-tasini ads,Ada Strings Wide_Unbounded Wide_Text_IO a-swuwti ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library ada-strings-wide-wide-unbounded-wide-wide-text-io-a-szuzti-ads}@anchor{30c}@anchor{gnat_rm/the_gnat_library id19}@anchor{30d} +@anchor{gnat_rm/the_gnat_library ada-strings-wide-wide-unbounded-wide-wide-text-io-a-szuzti-ads}@anchor{30b}@anchor{gnat_rm/the_gnat_library id19}@anchor{30c} @section @code{Ada.Strings.Wide_Wide_Unbounded.Wide_Wide_Text_IO} (@code{a-szuzti.ads}) @@ -23632,7 +23621,7 @@ wide wide strings, avoiding the necessity for an intermediate operation with ordinary wide wide strings. @node Ada Task_Initialization a-tasini ads,Ada Text_IO C_Streams a-tiocst ads,Ada Strings Wide_Wide_Unbounded Wide_Wide_Text_IO a-szuzti ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library ada-task-initialization-a-tasini-ads}@anchor{30e}@anchor{gnat_rm/the_gnat_library id20}@anchor{30f} +@anchor{gnat_rm/the_gnat_library ada-task-initialization-a-tasini-ads}@anchor{30d}@anchor{gnat_rm/the_gnat_library id20}@anchor{30e} @section @code{Ada.Task_Initialization} (@code{a-tasini.ads}) @@ -23644,7 +23633,7 @@ parameterless procedures. Note that such a handler is only invoked for those tasks activated after the handler is set. @node Ada Text_IO C_Streams a-tiocst ads,Ada Text_IO Reset_Standard_Files a-tirsfi ads,Ada Task_Initialization a-tasini ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library ada-text-io-c-streams-a-tiocst-ads}@anchor{310}@anchor{gnat_rm/the_gnat_library id21}@anchor{311} +@anchor{gnat_rm/the_gnat_library ada-text-io-c-streams-a-tiocst-ads}@anchor{30f}@anchor{gnat_rm/the_gnat_library id21}@anchor{310} @section @code{Ada.Text_IO.C_Streams} (@code{a-tiocst.ads}) @@ -23659,7 +23648,7 @@ extracted from a file opened on the Ada side, and an Ada file can be constructed from a stream opened on the C side. @node Ada Text_IO Reset_Standard_Files a-tirsfi ads,Ada Wide_Characters Unicode a-wichun ads,Ada Text_IO C_Streams a-tiocst ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library ada-text-io-reset-standard-files-a-tirsfi-ads}@anchor{312}@anchor{gnat_rm/the_gnat_library id22}@anchor{313} +@anchor{gnat_rm/the_gnat_library ada-text-io-reset-standard-files-a-tirsfi-ads}@anchor{311}@anchor{gnat_rm/the_gnat_library id22}@anchor{312} @section @code{Ada.Text_IO.Reset_Standard_Files} (@code{a-tirsfi.ads}) @@ -23674,7 +23663,7 @@ execution (for example a standard input file may be redefined to be interactive). @node Ada Wide_Characters Unicode a-wichun ads,Ada Wide_Text_IO C_Streams a-wtcstr ads,Ada Text_IO Reset_Standard_Files a-tirsfi ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library ada-wide-characters-unicode-a-wichun-ads}@anchor{314}@anchor{gnat_rm/the_gnat_library id23}@anchor{315} +@anchor{gnat_rm/the_gnat_library ada-wide-characters-unicode-a-wichun-ads}@anchor{313}@anchor{gnat_rm/the_gnat_library id23}@anchor{314} @section @code{Ada.Wide_Characters.Unicode} (@code{a-wichun.ads}) @@ -23687,7 +23676,7 @@ This package provides subprograms that allow categorization of Wide_Character values according to Unicode categories. @node Ada Wide_Text_IO C_Streams a-wtcstr ads,Ada Wide_Text_IO Reset_Standard_Files a-wrstfi ads,Ada Wide_Characters Unicode a-wichun ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library ada-wide-text-io-c-streams-a-wtcstr-ads}@anchor{316}@anchor{gnat_rm/the_gnat_library id24}@anchor{317} +@anchor{gnat_rm/the_gnat_library ada-wide-text-io-c-streams-a-wtcstr-ads}@anchor{315}@anchor{gnat_rm/the_gnat_library id24}@anchor{316} @section @code{Ada.Wide_Text_IO.C_Streams} (@code{a-wtcstr.ads}) @@ -23702,7 +23691,7 @@ extracted from a file opened on the Ada side, and an Ada file can be constructed from a stream opened on the C side. @node Ada Wide_Text_IO Reset_Standard_Files a-wrstfi ads,Ada Wide_Wide_Characters Unicode a-zchuni ads,Ada Wide_Text_IO C_Streams a-wtcstr ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library ada-wide-text-io-reset-standard-files-a-wrstfi-ads}@anchor{318}@anchor{gnat_rm/the_gnat_library id25}@anchor{319} +@anchor{gnat_rm/the_gnat_library ada-wide-text-io-reset-standard-files-a-wrstfi-ads}@anchor{317}@anchor{gnat_rm/the_gnat_library id25}@anchor{318} @section @code{Ada.Wide_Text_IO.Reset_Standard_Files} (@code{a-wrstfi.ads}) @@ -23717,7 +23706,7 @@ execution (for example a standard input file may be redefined to be interactive). @node Ada Wide_Wide_Characters Unicode a-zchuni ads,Ada Wide_Wide_Text_IO C_Streams a-ztcstr ads,Ada Wide_Text_IO Reset_Standard_Files a-wrstfi ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library ada-wide-wide-characters-unicode-a-zchuni-ads}@anchor{31a}@anchor{gnat_rm/the_gnat_library id26}@anchor{31b} +@anchor{gnat_rm/the_gnat_library ada-wide-wide-characters-unicode-a-zchuni-ads}@anchor{319}@anchor{gnat_rm/the_gnat_library id26}@anchor{31a} @section @code{Ada.Wide_Wide_Characters.Unicode} (@code{a-zchuni.ads}) @@ -23730,7 +23719,7 @@ This package provides subprograms that allow categorization of Wide_Wide_Character values according to Unicode categories. @node Ada Wide_Wide_Text_IO C_Streams a-ztcstr ads,Ada Wide_Wide_Text_IO Reset_Standard_Files a-zrstfi ads,Ada Wide_Wide_Characters Unicode a-zchuni ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library ada-wide-wide-text-io-c-streams-a-ztcstr-ads}@anchor{31c}@anchor{gnat_rm/the_gnat_library id27}@anchor{31d} +@anchor{gnat_rm/the_gnat_library ada-wide-wide-text-io-c-streams-a-ztcstr-ads}@anchor{31b}@anchor{gnat_rm/the_gnat_library id27}@anchor{31c} @section @code{Ada.Wide_Wide_Text_IO.C_Streams} (@code{a-ztcstr.ads}) @@ -23745,7 +23734,7 @@ extracted from a file opened on the Ada side, and an Ada file can be constructed from a stream opened on the C side. @node Ada Wide_Wide_Text_IO Reset_Standard_Files a-zrstfi ads,GNAT Altivec g-altive ads,Ada Wide_Wide_Text_IO C_Streams a-ztcstr ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library ada-wide-wide-text-io-reset-standard-files-a-zrstfi-ads}@anchor{31e}@anchor{gnat_rm/the_gnat_library id28}@anchor{31f} +@anchor{gnat_rm/the_gnat_library ada-wide-wide-text-io-reset-standard-files-a-zrstfi-ads}@anchor{31d}@anchor{gnat_rm/the_gnat_library id28}@anchor{31e} @section @code{Ada.Wide_Wide_Text_IO.Reset_Standard_Files} (@code{a-zrstfi.ads}) @@ -23760,7 +23749,7 @@ change during execution (for example a standard input file may be redefined to be interactive). @node GNAT Altivec g-altive ads,GNAT Altivec Conversions g-altcon ads,Ada Wide_Wide_Text_IO Reset_Standard_Files a-zrstfi ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-altivec-g-altive-ads}@anchor{320}@anchor{gnat_rm/the_gnat_library id29}@anchor{321} +@anchor{gnat_rm/the_gnat_library gnat-altivec-g-altive-ads}@anchor{31f}@anchor{gnat_rm/the_gnat_library id29}@anchor{320} @section @code{GNAT.Altivec} (@code{g-altive.ads}) @@ -23773,7 +23762,7 @@ definitions of constants and types common to all the versions of the binding. @node GNAT Altivec Conversions g-altcon ads,GNAT Altivec Vector_Operations g-alveop ads,GNAT Altivec g-altive ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-altivec-conversions-g-altcon-ads}@anchor{322}@anchor{gnat_rm/the_gnat_library id30}@anchor{323} +@anchor{gnat_rm/the_gnat_library gnat-altivec-conversions-g-altcon-ads}@anchor{321}@anchor{gnat_rm/the_gnat_library id30}@anchor{322} @section @code{GNAT.Altivec.Conversions} (@code{g-altcon.ads}) @@ -23784,7 +23773,7 @@ binding. This package provides the Vector/View conversion routines. @node GNAT Altivec Vector_Operations g-alveop ads,GNAT Altivec Vector_Types g-alvety ads,GNAT Altivec Conversions g-altcon ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-altivec-vector-operations-g-alveop-ads}@anchor{324}@anchor{gnat_rm/the_gnat_library id31}@anchor{325} +@anchor{gnat_rm/the_gnat_library gnat-altivec-vector-operations-g-alveop-ads}@anchor{323}@anchor{gnat_rm/the_gnat_library id31}@anchor{324} @section @code{GNAT.Altivec.Vector_Operations} (@code{g-alveop.ads}) @@ -23798,7 +23787,7 @@ library. The hard binding is provided as a separate package. This unit is common to both bindings. @node GNAT Altivec Vector_Types g-alvety ads,GNAT Altivec Vector_Views g-alvevi ads,GNAT Altivec Vector_Operations g-alveop ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-altivec-vector-types-g-alvety-ads}@anchor{326}@anchor{gnat_rm/the_gnat_library id32}@anchor{327} +@anchor{gnat_rm/the_gnat_library gnat-altivec-vector-types-g-alvety-ads}@anchor{325}@anchor{gnat_rm/the_gnat_library id32}@anchor{326} @section @code{GNAT.Altivec.Vector_Types} (@code{g-alvety.ads}) @@ -23810,7 +23799,7 @@ This package exposes the various vector types part of the Ada binding to AltiVec facilities. @node GNAT Altivec Vector_Views g-alvevi ads,GNAT Array_Split g-arrspl ads,GNAT Altivec Vector_Types g-alvety ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-altivec-vector-views-g-alvevi-ads}@anchor{328}@anchor{gnat_rm/the_gnat_library id33}@anchor{329} +@anchor{gnat_rm/the_gnat_library gnat-altivec-vector-views-g-alvevi-ads}@anchor{327}@anchor{gnat_rm/the_gnat_library id33}@anchor{328} @section @code{GNAT.Altivec.Vector_Views} (@code{g-alvevi.ads}) @@ -23825,7 +23814,7 @@ vector elements and provides a simple way to initialize vector objects. @node GNAT Array_Split g-arrspl ads,GNAT AWK g-awk ads,GNAT Altivec Vector_Views g-alvevi ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-array-split-g-arrspl-ads}@anchor{32a}@anchor{gnat_rm/the_gnat_library id34}@anchor{32b} +@anchor{gnat_rm/the_gnat_library gnat-array-split-g-arrspl-ads}@anchor{329}@anchor{gnat_rm/the_gnat_library id34}@anchor{32a} @section @code{GNAT.Array_Split} (@code{g-arrspl.ads}) @@ -23838,7 +23827,7 @@ an array wherever the separators appear, and provide direct access to the resulting slices. @node GNAT AWK g-awk ads,GNAT Binary_Search g-binsea ads,GNAT Array_Split g-arrspl ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-awk-g-awk-ads}@anchor{32c}@anchor{gnat_rm/the_gnat_library id35}@anchor{32d} +@anchor{gnat_rm/the_gnat_library gnat-awk-g-awk-ads}@anchor{32b}@anchor{gnat_rm/the_gnat_library id35}@anchor{32c} @section @code{GNAT.AWK} (@code{g-awk.ads}) @@ -23853,7 +23842,7 @@ or more files containing formatted data. The file is viewed as a database where each record is a line and a field is a data element in this line. @node GNAT Binary_Search g-binsea ads,GNAT Bind_Environment g-binenv ads,GNAT AWK g-awk ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-binary-search-g-binsea-ads}@anchor{32e}@anchor{gnat_rm/the_gnat_library id36}@anchor{32f} +@anchor{gnat_rm/the_gnat_library gnat-binary-search-g-binsea-ads}@anchor{32d}@anchor{gnat_rm/the_gnat_library id36}@anchor{32e} @section @code{GNAT.Binary_Search} (@code{g-binsea.ads}) @@ -23865,7 +23854,7 @@ Allow binary search of a sorted array (or of an array-like container; the generic does not reference the array directly). @node GNAT Bind_Environment g-binenv ads,GNAT Branch_Prediction g-brapre ads,GNAT Binary_Search g-binsea ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-bind-environment-g-binenv-ads}@anchor{330}@anchor{gnat_rm/the_gnat_library id37}@anchor{331} +@anchor{gnat_rm/the_gnat_library gnat-bind-environment-g-binenv-ads}@anchor{32f}@anchor{gnat_rm/the_gnat_library id37}@anchor{330} @section @code{GNAT.Bind_Environment} (@code{g-binenv.ads}) @@ -23878,7 +23867,7 @@ These associations can be specified using the @code{-V} binder command line switch. @node GNAT Branch_Prediction g-brapre ads,GNAT Bounded_Buffers g-boubuf ads,GNAT Bind_Environment g-binenv ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-branch-prediction-g-brapre-ads}@anchor{332}@anchor{gnat_rm/the_gnat_library id38}@anchor{333} +@anchor{gnat_rm/the_gnat_library gnat-branch-prediction-g-brapre-ads}@anchor{331}@anchor{gnat_rm/the_gnat_library id38}@anchor{332} @section @code{GNAT.Branch_Prediction} (@code{g-brapre.ads}) @@ -23889,7 +23878,7 @@ line switch. Provides routines giving hints to the branch predictor of the code generator. @node GNAT Bounded_Buffers g-boubuf ads,GNAT Bounded_Mailboxes g-boumai ads,GNAT Branch_Prediction g-brapre ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-bounded-buffers-g-boubuf-ads}@anchor{334}@anchor{gnat_rm/the_gnat_library id39}@anchor{335} +@anchor{gnat_rm/the_gnat_library gnat-bounded-buffers-g-boubuf-ads}@anchor{333}@anchor{gnat_rm/the_gnat_library id39}@anchor{334} @section @code{GNAT.Bounded_Buffers} (@code{g-boubuf.ads}) @@ -23904,7 +23893,7 @@ useful directly or as parts of the implementations of other abstractions, such as mailboxes. @node GNAT Bounded_Mailboxes g-boumai ads,GNAT Bubble_Sort g-bubsor ads,GNAT Bounded_Buffers g-boubuf ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-bounded-mailboxes-g-boumai-ads}@anchor{336}@anchor{gnat_rm/the_gnat_library id40}@anchor{337} +@anchor{gnat_rm/the_gnat_library gnat-bounded-mailboxes-g-boumai-ads}@anchor{335}@anchor{gnat_rm/the_gnat_library id40}@anchor{336} @section @code{GNAT.Bounded_Mailboxes} (@code{g-boumai.ads}) @@ -23917,7 +23906,7 @@ such as mailboxes. Provides a thread-safe asynchronous intertask mailbox communication facility. @node GNAT Bubble_Sort g-bubsor ads,GNAT Bubble_Sort_A g-busora ads,GNAT Bounded_Mailboxes g-boumai ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-bubble-sort-g-bubsor-ads}@anchor{338}@anchor{gnat_rm/the_gnat_library id41}@anchor{339} +@anchor{gnat_rm/the_gnat_library gnat-bubble-sort-g-bubsor-ads}@anchor{337}@anchor{gnat_rm/the_gnat_library id41}@anchor{338} @section @code{GNAT.Bubble_Sort} (@code{g-bubsor.ads}) @@ -23932,7 +23921,7 @@ data items. Exchange and comparison procedures are provided by passing access-to-procedure values. @node GNAT Bubble_Sort_A g-busora ads,GNAT Bubble_Sort_G g-busorg ads,GNAT Bubble_Sort g-bubsor ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-bubble-sort-a-g-busora-ads}@anchor{33a}@anchor{gnat_rm/the_gnat_library id42}@anchor{33b} +@anchor{gnat_rm/the_gnat_library gnat-bubble-sort-a-g-busora-ads}@anchor{339}@anchor{gnat_rm/the_gnat_library id42}@anchor{33a} @section @code{GNAT.Bubble_Sort_A} (@code{g-busora.ads}) @@ -23948,7 +23937,7 @@ access-to-procedure values. This is an older version, retained for compatibility. Usually @code{GNAT.Bubble_Sort} will be preferable. @node GNAT Bubble_Sort_G g-busorg ads,GNAT Byte_Order_Mark g-byorma ads,GNAT Bubble_Sort_A g-busora ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-bubble-sort-g-g-busorg-ads}@anchor{33c}@anchor{gnat_rm/the_gnat_library id43}@anchor{33d} +@anchor{gnat_rm/the_gnat_library gnat-bubble-sort-g-g-busorg-ads}@anchor{33b}@anchor{gnat_rm/the_gnat_library id43}@anchor{33c} @section @code{GNAT.Bubble_Sort_G} (@code{g-busorg.ads}) @@ -23964,7 +23953,7 @@ if the procedures can be inlined, at the expense of duplicating code for multiple instantiations. @node GNAT Byte_Order_Mark g-byorma ads,GNAT Byte_Swapping g-bytswa ads,GNAT Bubble_Sort_G g-busorg ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-byte-order-mark-g-byorma-ads}@anchor{33e}@anchor{gnat_rm/the_gnat_library id44}@anchor{33f} +@anchor{gnat_rm/the_gnat_library gnat-byte-order-mark-g-byorma-ads}@anchor{33d}@anchor{gnat_rm/the_gnat_library id44}@anchor{33e} @section @code{GNAT.Byte_Order_Mark} (@code{g-byorma.ads}) @@ -23980,7 +23969,7 @@ the encoding of the string. The routine includes detection of special XML sequences for various UCS input formats. @node GNAT Byte_Swapping g-bytswa ads,GNAT Calendar g-calend ads,GNAT Byte_Order_Mark g-byorma ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-byte-swapping-g-bytswa-ads}@anchor{340}@anchor{gnat_rm/the_gnat_library id45}@anchor{341} +@anchor{gnat_rm/the_gnat_library gnat-byte-swapping-g-bytswa-ads}@anchor{33f}@anchor{gnat_rm/the_gnat_library id45}@anchor{340} @section @code{GNAT.Byte_Swapping} (@code{g-bytswa.ads}) @@ -23994,7 +23983,7 @@ General routines for swapping the bytes in 2-, 4-, and 8-byte quantities. Machine-specific implementations are available in some cases. @node GNAT Calendar g-calend ads,GNAT Calendar Time_IO g-catiio ads,GNAT Byte_Swapping g-bytswa ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-calendar-g-calend-ads}@anchor{342}@anchor{gnat_rm/the_gnat_library id46}@anchor{343} +@anchor{gnat_rm/the_gnat_library gnat-calendar-g-calend-ads}@anchor{341}@anchor{gnat_rm/the_gnat_library id46}@anchor{342} @section @code{GNAT.Calendar} (@code{g-calend.ads}) @@ -24008,7 +23997,7 @@ Also provides conversion of @code{Ada.Calendar.Time} values to and from the C @code{timeval} format. @node GNAT Calendar Time_IO g-catiio ads,GNAT CRC32 g-crc32 ads,GNAT Calendar g-calend ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-calendar-time-io-g-catiio-ads}@anchor{344}@anchor{gnat_rm/the_gnat_library id47}@anchor{345} +@anchor{gnat_rm/the_gnat_library gnat-calendar-time-io-g-catiio-ads}@anchor{343}@anchor{gnat_rm/the_gnat_library id47}@anchor{344} @section @code{GNAT.Calendar.Time_IO} (@code{g-catiio.ads}) @@ -24019,7 +24008,7 @@ C @code{timeval} format. @geindex GNAT.Calendar.Time_IO (g-catiio.ads) @node GNAT CRC32 g-crc32 ads,GNAT Case_Util g-casuti ads,GNAT Calendar Time_IO g-catiio ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-crc32-g-crc32-ads}@anchor{346}@anchor{gnat_rm/the_gnat_library id48}@anchor{347} +@anchor{gnat_rm/the_gnat_library gnat-crc32-g-crc32-ads}@anchor{345}@anchor{gnat_rm/the_gnat_library id48}@anchor{346} @section @code{GNAT.CRC32} (@code{g-crc32.ads}) @@ -24036,7 +24025,7 @@ of this algorithm see Aug. 1988. Sarwate, D.V. @node GNAT Case_Util g-casuti ads,GNAT CGI g-cgi ads,GNAT CRC32 g-crc32 ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-case-util-g-casuti-ads}@anchor{348}@anchor{gnat_rm/the_gnat_library id49}@anchor{349} +@anchor{gnat_rm/the_gnat_library gnat-case-util-g-casuti-ads}@anchor{347}@anchor{gnat_rm/the_gnat_library id49}@anchor{348} @section @code{GNAT.Case_Util} (@code{g-casuti.ads}) @@ -24051,7 +24040,7 @@ without the overhead of the full casing tables in @code{Ada.Characters.Handling}. @node GNAT CGI g-cgi ads,GNAT CGI Cookie g-cgicoo ads,GNAT Case_Util g-casuti ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-cgi-g-cgi-ads}@anchor{34a}@anchor{gnat_rm/the_gnat_library id50}@anchor{34b} +@anchor{gnat_rm/the_gnat_library gnat-cgi-g-cgi-ads}@anchor{349}@anchor{gnat_rm/the_gnat_library id50}@anchor{34a} @section @code{GNAT.CGI} (@code{g-cgi.ads}) @@ -24066,7 +24055,7 @@ builds a table whose index is the key and provides some services to deal with this table. @node GNAT CGI Cookie g-cgicoo ads,GNAT CGI Debug g-cgideb ads,GNAT CGI g-cgi ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-cgi-cookie-g-cgicoo-ads}@anchor{34c}@anchor{gnat_rm/the_gnat_library id51}@anchor{34d} +@anchor{gnat_rm/the_gnat_library gnat-cgi-cookie-g-cgicoo-ads}@anchor{34b}@anchor{gnat_rm/the_gnat_library id51}@anchor{34c} @section @code{GNAT.CGI.Cookie} (@code{g-cgicoo.ads}) @@ -24081,7 +24070,7 @@ Common Gateway Interface (CGI). It exports services to deal with Web cookies (piece of information kept in the Web client software). @node GNAT CGI Debug g-cgideb ads,GNAT Command_Line g-comlin ads,GNAT CGI Cookie g-cgicoo ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-cgi-debug-g-cgideb-ads}@anchor{34e}@anchor{gnat_rm/the_gnat_library id52}@anchor{34f} +@anchor{gnat_rm/the_gnat_library gnat-cgi-debug-g-cgideb-ads}@anchor{34d}@anchor{gnat_rm/the_gnat_library id52}@anchor{34e} @section @code{GNAT.CGI.Debug} (@code{g-cgideb.ads}) @@ -24093,7 +24082,7 @@ This is a package to help debugging CGI (Common Gateway Interface) programs written in Ada. @node GNAT Command_Line g-comlin ads,GNAT Compiler_Version g-comver ads,GNAT CGI Debug g-cgideb ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-command-line-g-comlin-ads}@anchor{350}@anchor{gnat_rm/the_gnat_library id53}@anchor{351} +@anchor{gnat_rm/the_gnat_library gnat-command-line-g-comlin-ads}@anchor{34f}@anchor{gnat_rm/the_gnat_library id53}@anchor{350} @section @code{GNAT.Command_Line} (@code{g-comlin.ads}) @@ -24106,7 +24095,7 @@ including the ability to scan for named switches with optional parameters and expand file names using wildcard notations. @node GNAT Compiler_Version g-comver ads,GNAT Ctrl_C g-ctrl_c ads,GNAT Command_Line g-comlin ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-compiler-version-g-comver-ads}@anchor{352}@anchor{gnat_rm/the_gnat_library id54}@anchor{353} +@anchor{gnat_rm/the_gnat_library gnat-compiler-version-g-comver-ads}@anchor{351}@anchor{gnat_rm/the_gnat_library id54}@anchor{352} @section @code{GNAT.Compiler_Version} (@code{g-comver.ads}) @@ -24124,7 +24113,7 @@ of the compiler if a consistent tool set is used to compile all units of a partition). @node GNAT Ctrl_C g-ctrl_c ads,GNAT Current_Exception g-curexc ads,GNAT Compiler_Version g-comver ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-ctrl-c-g-ctrl-c-ads}@anchor{354}@anchor{gnat_rm/the_gnat_library id55}@anchor{355} +@anchor{gnat_rm/the_gnat_library gnat-ctrl-c-g-ctrl-c-ads}@anchor{353}@anchor{gnat_rm/the_gnat_library id55}@anchor{354} @section @code{GNAT.Ctrl_C} (@code{g-ctrl_c.ads}) @@ -24135,7 +24124,7 @@ of a partition). Provides a simple interface to handle Ctrl-C keyboard events. @node GNAT Current_Exception g-curexc ads,GNAT Debug_Pools g-debpoo ads,GNAT Ctrl_C g-ctrl_c ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-current-exception-g-curexc-ads}@anchor{356}@anchor{gnat_rm/the_gnat_library id56}@anchor{357} +@anchor{gnat_rm/the_gnat_library gnat-current-exception-g-curexc-ads}@anchor{355}@anchor{gnat_rm/the_gnat_library id56}@anchor{356} @section @code{GNAT.Current_Exception} (@code{g-curexc.ads}) @@ -24152,7 +24141,7 @@ This is particularly useful in simulating typical facilities for obtaining information about exceptions provided by Ada 83 compilers. @node GNAT Debug_Pools g-debpoo ads,GNAT Debug_Utilities g-debuti ads,GNAT Current_Exception g-curexc ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-debug-pools-g-debpoo-ads}@anchor{358}@anchor{gnat_rm/the_gnat_library id57}@anchor{359} +@anchor{gnat_rm/the_gnat_library gnat-debug-pools-g-debpoo-ads}@anchor{357}@anchor{gnat_rm/the_gnat_library id57}@anchor{358} @section @code{GNAT.Debug_Pools} (@code{g-debpoo.ads}) @@ -24169,7 +24158,7 @@ problems. See @code{The GNAT Debug_Pool Facility} section in the @cite{GNAT User’s Guide}. @node GNAT Debug_Utilities g-debuti ads,GNAT Decode_String g-decstr ads,GNAT Debug_Pools g-debpoo ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-debug-utilities-g-debuti-ads}@anchor{35a}@anchor{gnat_rm/the_gnat_library id58}@anchor{35b} +@anchor{gnat_rm/the_gnat_library gnat-debug-utilities-g-debuti-ads}@anchor{359}@anchor{gnat_rm/the_gnat_library id58}@anchor{35a} @section @code{GNAT.Debug_Utilities} (@code{g-debuti.ads}) @@ -24182,7 +24171,7 @@ to and from string images of address values. Supports both C and Ada formats for hexadecimal literals. @node GNAT Decode_String g-decstr ads,GNAT Decode_UTF8_String g-deutst ads,GNAT Debug_Utilities g-debuti ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-decode-string-g-decstr-ads}@anchor{35c}@anchor{gnat_rm/the_gnat_library id59}@anchor{35d} +@anchor{gnat_rm/the_gnat_library gnat-decode-string-g-decstr-ads}@anchor{35b}@anchor{gnat_rm/the_gnat_library id59}@anchor{35c} @section @code{GNAT.Decode_String} (@code{g-decstr.ads}) @@ -24206,7 +24195,7 @@ Useful in conjunction with Unicode character coding. Note there is a preinstantiation for UTF-8. See next entry. @node GNAT Decode_UTF8_String g-deutst ads,GNAT Directory_Operations g-dirope ads,GNAT Decode_String g-decstr ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-decode-utf8-string-g-deutst-ads}@anchor{35e}@anchor{gnat_rm/the_gnat_library id60}@anchor{35f} +@anchor{gnat_rm/the_gnat_library gnat-decode-utf8-string-g-deutst-ads}@anchor{35d}@anchor{gnat_rm/the_gnat_library id60}@anchor{35e} @section @code{GNAT.Decode_UTF8_String} (@code{g-deutst.ads}) @@ -24227,7 +24216,7 @@ preinstantiation for UTF-8. See next entry. A preinstantiation of GNAT.Decode_Strings for UTF-8 encoding. @node GNAT Directory_Operations g-dirope ads,GNAT Directory_Operations Iteration g-diopit ads,GNAT Decode_UTF8_String g-deutst ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-directory-operations-g-dirope-ads}@anchor{360}@anchor{gnat_rm/the_gnat_library id61}@anchor{361} +@anchor{gnat_rm/the_gnat_library gnat-directory-operations-g-dirope-ads}@anchor{35f}@anchor{gnat_rm/the_gnat_library id61}@anchor{360} @section @code{GNAT.Directory_Operations} (@code{g-dirope.ads}) @@ -24240,7 +24229,7 @@ the current directory, making new directories, and scanning the files in a directory. @node GNAT Directory_Operations Iteration g-diopit ads,GNAT Dynamic_HTables g-dynhta ads,GNAT Directory_Operations g-dirope ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-directory-operations-iteration-g-diopit-ads}@anchor{362}@anchor{gnat_rm/the_gnat_library id62}@anchor{363} +@anchor{gnat_rm/the_gnat_library gnat-directory-operations-iteration-g-diopit-ads}@anchor{361}@anchor{gnat_rm/the_gnat_library id62}@anchor{362} @section @code{GNAT.Directory_Operations.Iteration} (@code{g-diopit.ads}) @@ -24252,7 +24241,7 @@ A child unit of GNAT.Directory_Operations providing additional operations for iterating through directories. @node GNAT Dynamic_HTables g-dynhta ads,GNAT Dynamic_Tables g-dyntab ads,GNAT Directory_Operations Iteration g-diopit ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-dynamic-htables-g-dynhta-ads}@anchor{364}@anchor{gnat_rm/the_gnat_library id63}@anchor{365} +@anchor{gnat_rm/the_gnat_library gnat-dynamic-htables-g-dynhta-ads}@anchor{363}@anchor{gnat_rm/the_gnat_library id63}@anchor{364} @section @code{GNAT.Dynamic_HTables} (@code{g-dynhta.ads}) @@ -24270,7 +24259,7 @@ dynamic instances of the hash table, while an instantiation of @code{GNAT.HTable} creates a single instance of the hash table. @node GNAT Dynamic_Tables g-dyntab ads,GNAT Encode_String g-encstr ads,GNAT Dynamic_HTables g-dynhta ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-dynamic-tables-g-dyntab-ads}@anchor{366}@anchor{gnat_rm/the_gnat_library id64}@anchor{367} +@anchor{gnat_rm/the_gnat_library gnat-dynamic-tables-g-dyntab-ads}@anchor{365}@anchor{gnat_rm/the_gnat_library id64}@anchor{366} @section @code{GNAT.Dynamic_Tables} (@code{g-dyntab.ads}) @@ -24290,7 +24279,7 @@ dynamic instances of the table, while an instantiation of @code{GNAT.Table} creates a single instance of the table type. @node GNAT Encode_String g-encstr ads,GNAT Encode_UTF8_String g-enutst ads,GNAT Dynamic_Tables g-dyntab ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-encode-string-g-encstr-ads}@anchor{368}@anchor{gnat_rm/the_gnat_library id65}@anchor{369} +@anchor{gnat_rm/the_gnat_library gnat-encode-string-g-encstr-ads}@anchor{367}@anchor{gnat_rm/the_gnat_library id65}@anchor{368} @section @code{GNAT.Encode_String} (@code{g-encstr.ads}) @@ -24312,7 +24301,7 @@ encoding method. Useful in conjunction with Unicode character coding. Note there is a preinstantiation for UTF-8. See next entry. @node GNAT Encode_UTF8_String g-enutst ads,GNAT Exception_Actions g-excact ads,GNAT Encode_String g-encstr ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-encode-utf8-string-g-enutst-ads}@anchor{36a}@anchor{gnat_rm/the_gnat_library id66}@anchor{36b} +@anchor{gnat_rm/the_gnat_library gnat-encode-utf8-string-g-enutst-ads}@anchor{369}@anchor{gnat_rm/the_gnat_library id66}@anchor{36a} @section @code{GNAT.Encode_UTF8_String} (@code{g-enutst.ads}) @@ -24333,7 +24322,7 @@ Note there is a preinstantiation for UTF-8. See next entry. A preinstantiation of GNAT.Encode_Strings for UTF-8 encoding. @node GNAT Exception_Actions g-excact ads,GNAT Exception_Traces g-exctra ads,GNAT Encode_UTF8_String g-enutst ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-exception-actions-g-excact-ads}@anchor{36c}@anchor{gnat_rm/the_gnat_library id67}@anchor{36d} +@anchor{gnat_rm/the_gnat_library gnat-exception-actions-g-excact-ads}@anchor{36b}@anchor{gnat_rm/the_gnat_library id67}@anchor{36c} @section @code{GNAT.Exception_Actions} (@code{g-excact.ads}) @@ -24346,7 +24335,7 @@ for specific exceptions, or when any exception is raised. This can be used for instance to force a core dump to ease debugging. @node GNAT Exception_Traces g-exctra ads,GNAT Exceptions g-except ads,GNAT Exception_Actions g-excact ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-exception-traces-g-exctra-ads}@anchor{36e}@anchor{gnat_rm/the_gnat_library id68}@anchor{36f} +@anchor{gnat_rm/the_gnat_library gnat-exception-traces-g-exctra-ads}@anchor{36d}@anchor{gnat_rm/the_gnat_library id68}@anchor{36e} @section @code{GNAT.Exception_Traces} (@code{g-exctra.ads}) @@ -24360,7 +24349,7 @@ Provides an interface allowing to control automatic output upon exception occurrences. @node GNAT Exceptions g-except ads,GNAT Expect g-expect ads,GNAT Exception_Traces g-exctra ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-exceptions-g-except-ads}@anchor{370}@anchor{gnat_rm/the_gnat_library id69}@anchor{371} +@anchor{gnat_rm/the_gnat_library gnat-exceptions-g-except-ads}@anchor{36f}@anchor{gnat_rm/the_gnat_library id69}@anchor{370} @section @code{GNAT.Exceptions} (@code{g-except.ads}) @@ -24381,7 +24370,7 @@ predefined exceptions, and for example allows raising @code{Constraint_Error} with a message from a pure subprogram. @node GNAT Expect g-expect ads,GNAT Expect TTY g-exptty ads,GNAT Exceptions g-except ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-expect-g-expect-ads}@anchor{372}@anchor{gnat_rm/the_gnat_library id70}@anchor{373} +@anchor{gnat_rm/the_gnat_library gnat-expect-g-expect-ads}@anchor{371}@anchor{gnat_rm/the_gnat_library id70}@anchor{372} @section @code{GNAT.Expect} (@code{g-expect.ads}) @@ -24397,7 +24386,7 @@ It is not implemented for cross ports, and in particular is not implemented for VxWorks or LynxOS. @node GNAT Expect TTY g-exptty ads,GNAT Float_Control g-flocon ads,GNAT Expect g-expect ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-expect-tty-g-exptty-ads}@anchor{374}@anchor{gnat_rm/the_gnat_library id71}@anchor{375} +@anchor{gnat_rm/the_gnat_library gnat-expect-tty-g-exptty-ads}@anchor{373}@anchor{gnat_rm/the_gnat_library id71}@anchor{374} @section @code{GNAT.Expect.TTY} (@code{g-exptty.ads}) @@ -24409,7 +24398,7 @@ ports. It is not implemented for cross ports, and in particular is not implemented for VxWorks or LynxOS. @node GNAT Float_Control g-flocon ads,GNAT Formatted_String g-forstr ads,GNAT Expect TTY g-exptty ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-float-control-g-flocon-ads}@anchor{376}@anchor{gnat_rm/the_gnat_library id72}@anchor{377} +@anchor{gnat_rm/the_gnat_library gnat-float-control-g-flocon-ads}@anchor{375}@anchor{gnat_rm/the_gnat_library id72}@anchor{376} @section @code{GNAT.Float_Control} (@code{g-flocon.ads}) @@ -24423,7 +24412,7 @@ library calls may cause this mode to be modified, and the Reset procedure in this package can be used to reestablish the required mode. @node GNAT Formatted_String g-forstr ads,GNAT Generic_Fast_Math_Functions g-gfmafu ads,GNAT Float_Control g-flocon ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-formatted-string-g-forstr-ads}@anchor{378}@anchor{gnat_rm/the_gnat_library id73}@anchor{379} +@anchor{gnat_rm/the_gnat_library gnat-formatted-string-g-forstr-ads}@anchor{377}@anchor{gnat_rm/the_gnat_library id73}@anchor{378} @section @code{GNAT.Formatted_String} (@code{g-forstr.ads}) @@ -24438,7 +24427,7 @@ derived from Integer, Float or enumerations as values for the formatted string. @node GNAT Generic_Fast_Math_Functions g-gfmafu ads,GNAT Heap_Sort g-heasor ads,GNAT Formatted_String g-forstr ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-generic-fast-math-functions-g-gfmafu-ads}@anchor{37a}@anchor{gnat_rm/the_gnat_library id74}@anchor{37b} +@anchor{gnat_rm/the_gnat_library gnat-generic-fast-math-functions-g-gfmafu-ads}@anchor{379}@anchor{gnat_rm/the_gnat_library id74}@anchor{37a} @section @code{GNAT.Generic_Fast_Math_Functions} (@code{g-gfmafu.ads}) @@ -24456,7 +24445,7 @@ have a vector implementation that can be automatically used by the compiler when auto-vectorization is enabled. @node GNAT Heap_Sort g-heasor ads,GNAT Heap_Sort_A g-hesora ads,GNAT Generic_Fast_Math_Functions g-gfmafu ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-heap-sort-g-heasor-ads}@anchor{37c}@anchor{gnat_rm/the_gnat_library id75}@anchor{37d} +@anchor{gnat_rm/the_gnat_library gnat-heap-sort-g-heasor-ads}@anchor{37b}@anchor{gnat_rm/the_gnat_library id75}@anchor{37c} @section @code{GNAT.Heap_Sort} (@code{g-heasor.ads}) @@ -24470,7 +24459,7 @@ access-to-procedure values. The algorithm used is a modified heap sort that performs approximately N*log(N) comparisons in the worst case. @node GNAT Heap_Sort_A g-hesora ads,GNAT Heap_Sort_G g-hesorg ads,GNAT Heap_Sort g-heasor ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-heap-sort-a-g-hesora-ads}@anchor{37e}@anchor{gnat_rm/the_gnat_library id76}@anchor{37f} +@anchor{gnat_rm/the_gnat_library gnat-heap-sort-a-g-hesora-ads}@anchor{37d}@anchor{gnat_rm/the_gnat_library id76}@anchor{37e} @section @code{GNAT.Heap_Sort_A} (@code{g-hesora.ads}) @@ -24486,7 +24475,7 @@ This differs from @code{GNAT.Heap_Sort} in having a less convenient interface, but may be slightly more efficient. @node GNAT Heap_Sort_G g-hesorg ads,GNAT HTable g-htable ads,GNAT Heap_Sort_A g-hesora ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-heap-sort-g-g-hesorg-ads}@anchor{380}@anchor{gnat_rm/the_gnat_library id77}@anchor{381} +@anchor{gnat_rm/the_gnat_library gnat-heap-sort-g-g-hesorg-ads}@anchor{37f}@anchor{gnat_rm/the_gnat_library id77}@anchor{380} @section @code{GNAT.Heap_Sort_G} (@code{g-hesorg.ads}) @@ -24500,7 +24489,7 @@ if the procedures can be inlined, at the expense of duplicating code for multiple instantiations. @node GNAT HTable g-htable ads,GNAT IO g-io ads,GNAT Heap_Sort_G g-hesorg ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-htable-g-htable-ads}@anchor{382}@anchor{gnat_rm/the_gnat_library id78}@anchor{383} +@anchor{gnat_rm/the_gnat_library gnat-htable-g-htable-ads}@anchor{381}@anchor{gnat_rm/the_gnat_library id78}@anchor{382} @section @code{GNAT.HTable} (@code{g-htable.ads}) @@ -24513,7 +24502,7 @@ data. Provides two approaches, one a simple static approach, and the other allowing arbitrary dynamic hash tables. @node GNAT IO g-io ads,GNAT IO_Aux g-io_aux ads,GNAT HTable g-htable ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-io-g-io-ads}@anchor{384}@anchor{gnat_rm/the_gnat_library id79}@anchor{385} +@anchor{gnat_rm/the_gnat_library gnat-io-g-io-ads}@anchor{383}@anchor{gnat_rm/the_gnat_library id79}@anchor{384} @section @code{GNAT.IO} (@code{g-io.ads}) @@ -24529,7 +24518,7 @@ Standard_Input, and writing characters, strings and integers to either Standard_Output or Standard_Error. @node GNAT IO_Aux g-io_aux ads,GNAT Lock_Files g-locfil ads,GNAT IO g-io ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-io-aux-g-io-aux-ads}@anchor{386}@anchor{gnat_rm/the_gnat_library id80}@anchor{387} +@anchor{gnat_rm/the_gnat_library gnat-io-aux-g-io-aux-ads}@anchor{385}@anchor{gnat_rm/the_gnat_library id80}@anchor{386} @section @code{GNAT.IO_Aux} (@code{g-io_aux.ads}) @@ -24543,7 +24532,7 @@ Provides some auxiliary functions for use with Text_IO, including a test for whether a file exists, and functions for reading a line of text. @node GNAT Lock_Files g-locfil ads,GNAT MBBS_Discrete_Random g-mbdira ads,GNAT IO_Aux g-io_aux ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-lock-files-g-locfil-ads}@anchor{388}@anchor{gnat_rm/the_gnat_library id81}@anchor{389} +@anchor{gnat_rm/the_gnat_library gnat-lock-files-g-locfil-ads}@anchor{387}@anchor{gnat_rm/the_gnat_library id81}@anchor{388} @section @code{GNAT.Lock_Files} (@code{g-locfil.ads}) @@ -24557,7 +24546,7 @@ Provides a general interface for using files as locks. Can be used for providing program level synchronization. @node GNAT MBBS_Discrete_Random g-mbdira ads,GNAT MBBS_Float_Random g-mbflra ads,GNAT Lock_Files g-locfil ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-mbbs-discrete-random-g-mbdira-ads}@anchor{38a}@anchor{gnat_rm/the_gnat_library id82}@anchor{38b} +@anchor{gnat_rm/the_gnat_library gnat-mbbs-discrete-random-g-mbdira-ads}@anchor{389}@anchor{gnat_rm/the_gnat_library id82}@anchor{38a} @section @code{GNAT.MBBS_Discrete_Random} (@code{g-mbdira.ads}) @@ -24569,7 +24558,7 @@ The original implementation of @code{Ada.Numerics.Discrete_Random}. Uses a modified version of the Blum-Blum-Shub generator. @node GNAT MBBS_Float_Random g-mbflra ads,GNAT MD5 g-md5 ads,GNAT MBBS_Discrete_Random g-mbdira ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-mbbs-float-random-g-mbflra-ads}@anchor{38c}@anchor{gnat_rm/the_gnat_library id83}@anchor{38d} +@anchor{gnat_rm/the_gnat_library gnat-mbbs-float-random-g-mbflra-ads}@anchor{38b}@anchor{gnat_rm/the_gnat_library id83}@anchor{38c} @section @code{GNAT.MBBS_Float_Random} (@code{g-mbflra.ads}) @@ -24581,7 +24570,7 @@ The original implementation of @code{Ada.Numerics.Float_Random}. Uses a modified version of the Blum-Blum-Shub generator. @node GNAT MD5 g-md5 ads,GNAT Memory_Dump g-memdum ads,GNAT MBBS_Float_Random g-mbflra ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-md5-g-md5-ads}@anchor{38e}@anchor{gnat_rm/the_gnat_library id84}@anchor{38f} +@anchor{gnat_rm/the_gnat_library gnat-md5-g-md5-ads}@anchor{38d}@anchor{gnat_rm/the_gnat_library id84}@anchor{38e} @section @code{GNAT.MD5} (@code{g-md5.ads}) @@ -24594,7 +24583,7 @@ the HMAC-MD5 message authentication function as described in RFC 2104 and FIPS PUB 198. @node GNAT Memory_Dump g-memdum ads,GNAT Most_Recent_Exception g-moreex ads,GNAT MD5 g-md5 ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-memory-dump-g-memdum-ads}@anchor{390}@anchor{gnat_rm/the_gnat_library id85}@anchor{391} +@anchor{gnat_rm/the_gnat_library gnat-memory-dump-g-memdum-ads}@anchor{38f}@anchor{gnat_rm/the_gnat_library id85}@anchor{390} @section @code{GNAT.Memory_Dump} (@code{g-memdum.ads}) @@ -24607,7 +24596,7 @@ standard output or standard error files. Uses GNAT.IO for actual output. @node GNAT Most_Recent_Exception g-moreex ads,GNAT OS_Lib g-os_lib ads,GNAT Memory_Dump g-memdum ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-most-recent-exception-g-moreex-ads}@anchor{392}@anchor{gnat_rm/the_gnat_library id86}@anchor{393} +@anchor{gnat_rm/the_gnat_library gnat-most-recent-exception-g-moreex-ads}@anchor{391}@anchor{gnat_rm/the_gnat_library id86}@anchor{392} @section @code{GNAT.Most_Recent_Exception} (@code{g-moreex.ads}) @@ -24621,7 +24610,7 @@ various logging purposes, including duplicating functionality of some Ada 83 implementation dependent extensions. @node GNAT OS_Lib g-os_lib ads,GNAT Perfect_Hash_Generators g-pehage ads,GNAT Most_Recent_Exception g-moreex ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-os-lib-g-os-lib-ads}@anchor{394}@anchor{gnat_rm/the_gnat_library id87}@anchor{395} +@anchor{gnat_rm/the_gnat_library gnat-os-lib-g-os-lib-ads}@anchor{393}@anchor{gnat_rm/the_gnat_library id87}@anchor{394} @section @code{GNAT.OS_Lib} (@code{g-os_lib.ads}) @@ -24637,7 +24626,7 @@ including a portable spawn procedure, and access to environment variables and error return codes. @node GNAT Perfect_Hash_Generators g-pehage ads,GNAT Random_Numbers g-rannum ads,GNAT OS_Lib g-os_lib ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-perfect-hash-generators-g-pehage-ads}@anchor{396}@anchor{gnat_rm/the_gnat_library id88}@anchor{397} +@anchor{gnat_rm/the_gnat_library gnat-perfect-hash-generators-g-pehage-ads}@anchor{395}@anchor{gnat_rm/the_gnat_library id88}@anchor{396} @section @code{GNAT.Perfect_Hash_Generators} (@code{g-pehage.ads}) @@ -24655,7 +24644,7 @@ hashcode are in the same order. These hashing functions are very convenient for use with realtime applications. @node GNAT Random_Numbers g-rannum ads,GNAT Regexp g-regexp ads,GNAT Perfect_Hash_Generators g-pehage ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-random-numbers-g-rannum-ads}@anchor{398}@anchor{gnat_rm/the_gnat_library id89}@anchor{399} +@anchor{gnat_rm/the_gnat_library gnat-random-numbers-g-rannum-ads}@anchor{397}@anchor{gnat_rm/the_gnat_library id89}@anchor{398} @section @code{GNAT.Random_Numbers} (@code{g-rannum.ads}) @@ -24667,7 +24656,7 @@ Provides random number capabilities which extend those available in the standard Ada library and are more convenient to use. @node GNAT Regexp g-regexp ads,GNAT Registry g-regist ads,GNAT Random_Numbers g-rannum ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-regexp-g-regexp-ads}@anchor{26f}@anchor{gnat_rm/the_gnat_library id90}@anchor{39a} +@anchor{gnat_rm/the_gnat_library gnat-regexp-g-regexp-ads}@anchor{26e}@anchor{gnat_rm/the_gnat_library id90}@anchor{399} @section @code{GNAT.Regexp} (@code{g-regexp.ads}) @@ -24683,7 +24672,7 @@ simplest of the three pattern matching packages provided, and is particularly suitable for ‘file globbing’ applications. @node GNAT Registry g-regist ads,GNAT Regpat g-regpat ads,GNAT Regexp g-regexp ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-registry-g-regist-ads}@anchor{39b}@anchor{gnat_rm/the_gnat_library id91}@anchor{39c} +@anchor{gnat_rm/the_gnat_library gnat-registry-g-regist-ads}@anchor{39a}@anchor{gnat_rm/the_gnat_library id91}@anchor{39b} @section @code{GNAT.Registry} (@code{g-regist.ads}) @@ -24697,7 +24686,7 @@ registry API, but at a lower level of abstraction, refer to the Win32.Winreg package provided with the Win32Ada binding @node GNAT Regpat g-regpat ads,GNAT Rewrite_Data g-rewdat ads,GNAT Registry g-regist ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-regpat-g-regpat-ads}@anchor{39d}@anchor{gnat_rm/the_gnat_library id92}@anchor{39e} +@anchor{gnat_rm/the_gnat_library gnat-regpat-g-regpat-ads}@anchor{39c}@anchor{gnat_rm/the_gnat_library id92}@anchor{39d} @section @code{GNAT.Regpat} (@code{g-regpat.ads}) @@ -24712,7 +24701,7 @@ from the original V7 style regular expression library written in C by Henry Spencer (and binary compatible with this C library). @node GNAT Rewrite_Data g-rewdat ads,GNAT Secondary_Stack_Info g-sestin ads,GNAT Regpat g-regpat ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-rewrite-data-g-rewdat-ads}@anchor{39f}@anchor{gnat_rm/the_gnat_library id93}@anchor{3a0} +@anchor{gnat_rm/the_gnat_library gnat-rewrite-data-g-rewdat-ads}@anchor{39e}@anchor{gnat_rm/the_gnat_library id93}@anchor{39f} @section @code{GNAT.Rewrite_Data} (@code{g-rewdat.ads}) @@ -24726,7 +24715,7 @@ full content to be processed is not loaded into memory all at once. This makes this interface usable for large files or socket streams. @node GNAT Secondary_Stack_Info g-sestin ads,GNAT Semaphores g-semaph ads,GNAT Rewrite_Data g-rewdat ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-secondary-stack-info-g-sestin-ads}@anchor{3a1}@anchor{gnat_rm/the_gnat_library id94}@anchor{3a2} +@anchor{gnat_rm/the_gnat_library gnat-secondary-stack-info-g-sestin-ads}@anchor{3a0}@anchor{gnat_rm/the_gnat_library id94}@anchor{3a1} @section @code{GNAT.Secondary_Stack_Info} (@code{g-sestin.ads}) @@ -24738,7 +24727,7 @@ Provides the capability to query the high water mark of the current task’s secondary stack. @node GNAT Semaphores g-semaph ads,GNAT Serial_Communications g-sercom ads,GNAT Secondary_Stack_Info g-sestin ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-semaphores-g-semaph-ads}@anchor{3a3}@anchor{gnat_rm/the_gnat_library id95}@anchor{3a4} +@anchor{gnat_rm/the_gnat_library gnat-semaphores-g-semaph-ads}@anchor{3a2}@anchor{gnat_rm/the_gnat_library id95}@anchor{3a3} @section @code{GNAT.Semaphores} (@code{g-semaph.ads}) @@ -24749,7 +24738,7 @@ secondary stack. Provides classic counting and binary semaphores using protected types. @node GNAT Serial_Communications g-sercom ads,GNAT SHA1 g-sha1 ads,GNAT Semaphores g-semaph ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-serial-communications-g-sercom-ads}@anchor{3a5}@anchor{gnat_rm/the_gnat_library id96}@anchor{3a6} +@anchor{gnat_rm/the_gnat_library gnat-serial-communications-g-sercom-ads}@anchor{3a4}@anchor{gnat_rm/the_gnat_library id96}@anchor{3a5} @section @code{GNAT.Serial_Communications} (@code{g-sercom.ads}) @@ -24761,7 +24750,7 @@ Provides a simple interface to send and receive data over a serial port. This is only supported on GNU/Linux and Windows. @node GNAT SHA1 g-sha1 ads,GNAT SHA224 g-sha224 ads,GNAT Serial_Communications g-sercom ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-sha1-g-sha1-ads}@anchor{3a7}@anchor{gnat_rm/the_gnat_library id97}@anchor{3a8} +@anchor{gnat_rm/the_gnat_library gnat-sha1-g-sha1-ads}@anchor{3a6}@anchor{gnat_rm/the_gnat_library id97}@anchor{3a7} @section @code{GNAT.SHA1} (@code{g-sha1.ads}) @@ -24774,7 +24763,7 @@ and RFC 3174, and the HMAC-SHA1 message authentication function as described in RFC 2104 and FIPS PUB 198. @node GNAT SHA224 g-sha224 ads,GNAT SHA256 g-sha256 ads,GNAT SHA1 g-sha1 ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-sha224-g-sha224-ads}@anchor{3a9}@anchor{gnat_rm/the_gnat_library id98}@anchor{3aa} +@anchor{gnat_rm/the_gnat_library gnat-sha224-g-sha224-ads}@anchor{3a8}@anchor{gnat_rm/the_gnat_library id98}@anchor{3a9} @section @code{GNAT.SHA224} (@code{g-sha224.ads}) @@ -24787,7 +24776,7 @@ and the HMAC-SHA224 message authentication function as described in RFC 2104 and FIPS PUB 198. @node GNAT SHA256 g-sha256 ads,GNAT SHA384 g-sha384 ads,GNAT SHA224 g-sha224 ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-sha256-g-sha256-ads}@anchor{3ab}@anchor{gnat_rm/the_gnat_library id99}@anchor{3ac} +@anchor{gnat_rm/the_gnat_library gnat-sha256-g-sha256-ads}@anchor{3aa}@anchor{gnat_rm/the_gnat_library id99}@anchor{3ab} @section @code{GNAT.SHA256} (@code{g-sha256.ads}) @@ -24800,7 +24789,7 @@ and the HMAC-SHA256 message authentication function as described in RFC 2104 and FIPS PUB 198. @node GNAT SHA384 g-sha384 ads,GNAT SHA512 g-sha512 ads,GNAT SHA256 g-sha256 ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-sha384-g-sha384-ads}@anchor{3ad}@anchor{gnat_rm/the_gnat_library id100}@anchor{3ae} +@anchor{gnat_rm/the_gnat_library gnat-sha384-g-sha384-ads}@anchor{3ac}@anchor{gnat_rm/the_gnat_library id100}@anchor{3ad} @section @code{GNAT.SHA384} (@code{g-sha384.ads}) @@ -24813,7 +24802,7 @@ and the HMAC-SHA384 message authentication function as described in RFC 2104 and FIPS PUB 198. @node GNAT SHA512 g-sha512 ads,GNAT Signals g-signal ads,GNAT SHA384 g-sha384 ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-sha512-g-sha512-ads}@anchor{3af}@anchor{gnat_rm/the_gnat_library id101}@anchor{3b0} +@anchor{gnat_rm/the_gnat_library gnat-sha512-g-sha512-ads}@anchor{3ae}@anchor{gnat_rm/the_gnat_library id101}@anchor{3af} @section @code{GNAT.SHA512} (@code{g-sha512.ads}) @@ -24826,7 +24815,7 @@ and the HMAC-SHA512 message authentication function as described in RFC 2104 and FIPS PUB 198. @node GNAT Signals g-signal ads,GNAT Sockets g-socket ads,GNAT SHA512 g-sha512 ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-signals-g-signal-ads}@anchor{3b1}@anchor{gnat_rm/the_gnat_library id102}@anchor{3b2} +@anchor{gnat_rm/the_gnat_library gnat-signals-g-signal-ads}@anchor{3b0}@anchor{gnat_rm/the_gnat_library id102}@anchor{3b1} @section @code{GNAT.Signals} (@code{g-signal.ads}) @@ -24838,7 +24827,7 @@ Provides the ability to manipulate the blocked status of signals on supported targets. @node GNAT Sockets g-socket ads,GNAT Source_Info g-souinf ads,GNAT Signals g-signal ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-sockets-g-socket-ads}@anchor{3b3}@anchor{gnat_rm/the_gnat_library id103}@anchor{3b4} +@anchor{gnat_rm/the_gnat_library gnat-sockets-g-socket-ads}@anchor{3b2}@anchor{gnat_rm/the_gnat_library id103}@anchor{3b3} @section @code{GNAT.Sockets} (@code{g-socket.ads}) @@ -24853,7 +24842,7 @@ on all native GNAT ports and on VxWorks cross ports. It is not implemented for the LynxOS cross port. @node GNAT Source_Info g-souinf ads,GNAT Spelling_Checker g-speche ads,GNAT Sockets g-socket ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-source-info-g-souinf-ads}@anchor{3b5}@anchor{gnat_rm/the_gnat_library id104}@anchor{3b6} +@anchor{gnat_rm/the_gnat_library gnat-source-info-g-souinf-ads}@anchor{3b4}@anchor{gnat_rm/the_gnat_library id104}@anchor{3b5} @section @code{GNAT.Source_Info} (@code{g-souinf.ads}) @@ -24867,7 +24856,7 @@ subprograms yielding the date and time of the current compilation (like the C macros @code{__DATE__} and @code{__TIME__}) @node GNAT Spelling_Checker g-speche ads,GNAT Spelling_Checker_Generic g-spchge ads,GNAT Source_Info g-souinf ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-spelling-checker-g-speche-ads}@anchor{3b7}@anchor{gnat_rm/the_gnat_library id105}@anchor{3b8} +@anchor{gnat_rm/the_gnat_library gnat-spelling-checker-g-speche-ads}@anchor{3b6}@anchor{gnat_rm/the_gnat_library id105}@anchor{3b7} @section @code{GNAT.Spelling_Checker} (@code{g-speche.ads}) @@ -24879,7 +24868,7 @@ Provides a function for determining whether one string is a plausible near misspelling of another string. @node GNAT Spelling_Checker_Generic g-spchge ads,GNAT Spitbol Patterns g-spipat ads,GNAT Spelling_Checker g-speche ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-spelling-checker-generic-g-spchge-ads}@anchor{3b9}@anchor{gnat_rm/the_gnat_library id106}@anchor{3ba} +@anchor{gnat_rm/the_gnat_library gnat-spelling-checker-generic-g-spchge-ads}@anchor{3b8}@anchor{gnat_rm/the_gnat_library id106}@anchor{3b9} @section @code{GNAT.Spelling_Checker_Generic} (@code{g-spchge.ads}) @@ -24892,7 +24881,7 @@ determining whether one string is a plausible near misspelling of another string. @node GNAT Spitbol Patterns g-spipat ads,GNAT Spitbol g-spitbo ads,GNAT Spelling_Checker_Generic g-spchge ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-spitbol-patterns-g-spipat-ads}@anchor{3bb}@anchor{gnat_rm/the_gnat_library id107}@anchor{3bc} +@anchor{gnat_rm/the_gnat_library gnat-spitbol-patterns-g-spipat-ads}@anchor{3ba}@anchor{gnat_rm/the_gnat_library id107}@anchor{3bb} @section @code{GNAT.Spitbol.Patterns} (@code{g-spipat.ads}) @@ -24908,7 +24897,7 @@ the SNOBOL4 dynamic pattern construction and matching capabilities, using the efficient algorithm developed by Robert Dewar for the SPITBOL system. @node GNAT Spitbol g-spitbo ads,GNAT Spitbol Table_Boolean g-sptabo ads,GNAT Spitbol Patterns g-spipat ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-spitbol-g-spitbo-ads}@anchor{3bd}@anchor{gnat_rm/the_gnat_library id108}@anchor{3be} +@anchor{gnat_rm/the_gnat_library gnat-spitbol-g-spitbo-ads}@anchor{3bc}@anchor{gnat_rm/the_gnat_library id108}@anchor{3bd} @section @code{GNAT.Spitbol} (@code{g-spitbo.ads}) @@ -24923,7 +24912,7 @@ useful for constructing arbitrary mappings from strings in the style of the SNOBOL4 TABLE function. @node GNAT Spitbol Table_Boolean g-sptabo ads,GNAT Spitbol Table_Integer g-sptain ads,GNAT Spitbol g-spitbo ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-spitbol-table-boolean-g-sptabo-ads}@anchor{3bf}@anchor{gnat_rm/the_gnat_library id109}@anchor{3c0} +@anchor{gnat_rm/the_gnat_library gnat-spitbol-table-boolean-g-sptabo-ads}@anchor{3be}@anchor{gnat_rm/the_gnat_library id109}@anchor{3bf} @section @code{GNAT.Spitbol.Table_Boolean} (@code{g-sptabo.ads}) @@ -24938,7 +24927,7 @@ for type @code{Standard.Boolean}, giving an implementation of sets of string values. @node GNAT Spitbol Table_Integer g-sptain ads,GNAT Spitbol Table_VString g-sptavs ads,GNAT Spitbol Table_Boolean g-sptabo ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-spitbol-table-integer-g-sptain-ads}@anchor{3c1}@anchor{gnat_rm/the_gnat_library id110}@anchor{3c2} +@anchor{gnat_rm/the_gnat_library gnat-spitbol-table-integer-g-sptain-ads}@anchor{3c0}@anchor{gnat_rm/the_gnat_library id110}@anchor{3c1} @section @code{GNAT.Spitbol.Table_Integer} (@code{g-sptain.ads}) @@ -24955,7 +24944,7 @@ for type @code{Standard.Integer}, giving an implementation of maps from string to integer values. @node GNAT Spitbol Table_VString g-sptavs ads,GNAT SSE g-sse ads,GNAT Spitbol Table_Integer g-sptain ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-spitbol-table-vstring-g-sptavs-ads}@anchor{3c3}@anchor{gnat_rm/the_gnat_library id111}@anchor{3c4} +@anchor{gnat_rm/the_gnat_library gnat-spitbol-table-vstring-g-sptavs-ads}@anchor{3c2}@anchor{gnat_rm/the_gnat_library id111}@anchor{3c3} @section @code{GNAT.Spitbol.Table_VString} (@code{g-sptavs.ads}) @@ -24972,7 +24961,7 @@ a variable length string type, giving an implementation of general maps from strings to strings. @node GNAT SSE g-sse ads,GNAT SSE Vector_Types g-ssvety ads,GNAT Spitbol Table_VString g-sptavs ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-sse-g-sse-ads}@anchor{3c5}@anchor{gnat_rm/the_gnat_library id112}@anchor{3c6} +@anchor{gnat_rm/the_gnat_library gnat-sse-g-sse-ads}@anchor{3c4}@anchor{gnat_rm/the_gnat_library id112}@anchor{3c5} @section @code{GNAT.SSE} (@code{g-sse.ads}) @@ -24984,7 +24973,7 @@ targets. It exposes vector component types together with a general introduction to the binding contents and use. @node GNAT SSE Vector_Types g-ssvety ads,GNAT String_Hash g-strhas ads,GNAT SSE g-sse ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-sse-vector-types-g-ssvety-ads}@anchor{3c7}@anchor{gnat_rm/the_gnat_library id113}@anchor{3c8} +@anchor{gnat_rm/the_gnat_library gnat-sse-vector-types-g-ssvety-ads}@anchor{3c6}@anchor{gnat_rm/the_gnat_library id113}@anchor{3c7} @section @code{GNAT.SSE.Vector_Types} (@code{g-ssvety.ads}) @@ -24993,7 +24982,7 @@ introduction to the binding contents and use. SSE vector types for use with SSE related intrinsics. @node GNAT String_Hash g-strhas ads,GNAT Strings g-string ads,GNAT SSE Vector_Types g-ssvety ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-string-hash-g-strhas-ads}@anchor{3c9}@anchor{gnat_rm/the_gnat_library id114}@anchor{3ca} +@anchor{gnat_rm/the_gnat_library gnat-string-hash-g-strhas-ads}@anchor{3c8}@anchor{gnat_rm/the_gnat_library id114}@anchor{3c9} @section @code{GNAT.String_Hash} (@code{g-strhas.ads}) @@ -25005,7 +24994,7 @@ Provides a generic hash function working on arrays of scalars. Both the scalar type and the hash result type are parameters. @node GNAT Strings g-string ads,GNAT String_Split g-strspl ads,GNAT String_Hash g-strhas ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-strings-g-string-ads}@anchor{3cb}@anchor{gnat_rm/the_gnat_library id115}@anchor{3cc} +@anchor{gnat_rm/the_gnat_library gnat-strings-g-string-ads}@anchor{3ca}@anchor{gnat_rm/the_gnat_library id115}@anchor{3cb} @section @code{GNAT.Strings} (@code{g-string.ads}) @@ -25015,7 +25004,7 @@ Common String access types and related subprograms. Basically it defines a string access and an array of string access types. @node GNAT String_Split g-strspl ads,GNAT Table g-table ads,GNAT Strings g-string ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-string-split-g-strspl-ads}@anchor{3cd}@anchor{gnat_rm/the_gnat_library id116}@anchor{3ce} +@anchor{gnat_rm/the_gnat_library gnat-string-split-g-strspl-ads}@anchor{3cc}@anchor{gnat_rm/the_gnat_library id116}@anchor{3cd} @section @code{GNAT.String_Split} (@code{g-strspl.ads}) @@ -25029,7 +25018,7 @@ to the resulting slices. This package is instantiated from @code{GNAT.Array_Split}. @node GNAT Table g-table ads,GNAT Task_Lock g-tasloc ads,GNAT String_Split g-strspl ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-table-g-table-ads}@anchor{3cf}@anchor{gnat_rm/the_gnat_library id117}@anchor{3d0} +@anchor{gnat_rm/the_gnat_library gnat-table-g-table-ads}@anchor{3ce}@anchor{gnat_rm/the_gnat_library id117}@anchor{3cf} @section @code{GNAT.Table} (@code{g-table.ads}) @@ -25049,7 +25038,7 @@ while an instantiation of @code{GNAT.Dynamic_Tables} creates a type that can be used to define dynamic instances of the table. @node GNAT Task_Lock g-tasloc ads,GNAT Time_Stamp g-timsta ads,GNAT Table g-table ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-task-lock-g-tasloc-ads}@anchor{3d1}@anchor{gnat_rm/the_gnat_library id118}@anchor{3d2} +@anchor{gnat_rm/the_gnat_library gnat-task-lock-g-tasloc-ads}@anchor{3d0}@anchor{gnat_rm/the_gnat_library id118}@anchor{3d1} @section @code{GNAT.Task_Lock} (@code{g-tasloc.ads}) @@ -25066,7 +25055,7 @@ single global task lock. Appropriate for use in situations where contention between tasks is very rarely expected. @node GNAT Time_Stamp g-timsta ads,GNAT Threads g-thread ads,GNAT Task_Lock g-tasloc ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-time-stamp-g-timsta-ads}@anchor{3d3}@anchor{gnat_rm/the_gnat_library id119}@anchor{3d4} +@anchor{gnat_rm/the_gnat_library gnat-time-stamp-g-timsta-ads}@anchor{3d2}@anchor{gnat_rm/the_gnat_library id119}@anchor{3d3} @section @code{GNAT.Time_Stamp} (@code{g-timsta.ads}) @@ -25081,7 +25070,7 @@ represents the current date and time in ISO 8601 format. This is a very simple routine with minimal code and there are no dependencies on any other unit. @node GNAT Threads g-thread ads,GNAT Traceback g-traceb ads,GNAT Time_Stamp g-timsta ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-threads-g-thread-ads}@anchor{3d5}@anchor{gnat_rm/the_gnat_library id120}@anchor{3d6} +@anchor{gnat_rm/the_gnat_library gnat-threads-g-thread-ads}@anchor{3d4}@anchor{gnat_rm/the_gnat_library id120}@anchor{3d5} @section @code{GNAT.Threads} (@code{g-thread.ads}) @@ -25098,7 +25087,7 @@ further details if your program has threads that are created by a non-Ada environment which then accesses Ada code. @node GNAT Traceback g-traceb ads,GNAT Traceback Symbolic g-trasym ads,GNAT Threads g-thread ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-traceback-g-traceb-ads}@anchor{3d7}@anchor{gnat_rm/the_gnat_library id121}@anchor{3d8} +@anchor{gnat_rm/the_gnat_library gnat-traceback-g-traceb-ads}@anchor{3d6}@anchor{gnat_rm/the_gnat_library id121}@anchor{3d7} @section @code{GNAT.Traceback} (@code{g-traceb.ads}) @@ -25110,7 +25099,7 @@ Provides a facility for obtaining non-symbolic traceback information, useful in various debugging situations. @node GNAT Traceback Symbolic g-trasym ads,GNAT UTF_32 g-utf_32 ads,GNAT Traceback g-traceb ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-traceback-symbolic-g-trasym-ads}@anchor{3d9}@anchor{gnat_rm/the_gnat_library id122}@anchor{3da} +@anchor{gnat_rm/the_gnat_library gnat-traceback-symbolic-g-trasym-ads}@anchor{3d8}@anchor{gnat_rm/the_gnat_library id122}@anchor{3d9} @section @code{GNAT.Traceback.Symbolic} (@code{g-trasym.ads}) @@ -25119,7 +25108,7 @@ in various debugging situations. @geindex Trace back facilities @node GNAT UTF_32 g-utf_32 ads,GNAT UTF_32_Spelling_Checker g-u3spch ads,GNAT Traceback Symbolic g-trasym ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-utf-32-g-utf-32-ads}@anchor{3db}@anchor{gnat_rm/the_gnat_library id123}@anchor{3dc} +@anchor{gnat_rm/the_gnat_library gnat-utf-32-g-utf-32-ads}@anchor{3da}@anchor{gnat_rm/the_gnat_library id123}@anchor{3db} @section @code{GNAT.UTF_32} (@code{g-utf_32.ads}) @@ -25138,7 +25127,7 @@ lower case to upper case fold routine corresponding to the Ada 2005 rules for identifier equivalence. @node GNAT UTF_32_Spelling_Checker g-u3spch ads,GNAT Wide_Spelling_Checker g-wispch ads,GNAT UTF_32 g-utf_32 ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-utf-32-spelling-checker-g-u3spch-ads}@anchor{3dd}@anchor{gnat_rm/the_gnat_library id124}@anchor{3de} +@anchor{gnat_rm/the_gnat_library gnat-utf-32-spelling-checker-g-u3spch-ads}@anchor{3dc}@anchor{gnat_rm/the_gnat_library id124}@anchor{3dd} @section @code{GNAT.UTF_32_Spelling_Checker} (@code{g-u3spch.ads}) @@ -25151,7 +25140,7 @@ near misspelling of another wide wide string, where the strings are represented using the UTF_32_String type defined in System.Wch_Cnv. @node GNAT Wide_Spelling_Checker g-wispch ads,GNAT Wide_String_Split g-wistsp ads,GNAT UTF_32_Spelling_Checker g-u3spch ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-wide-spelling-checker-g-wispch-ads}@anchor{3df}@anchor{gnat_rm/the_gnat_library id125}@anchor{3e0} +@anchor{gnat_rm/the_gnat_library gnat-wide-spelling-checker-g-wispch-ads}@anchor{3de}@anchor{gnat_rm/the_gnat_library id125}@anchor{3df} @section @code{GNAT.Wide_Spelling_Checker} (@code{g-wispch.ads}) @@ -25163,7 +25152,7 @@ Provides a function for determining whether one wide string is a plausible near misspelling of another wide string. @node GNAT Wide_String_Split g-wistsp ads,GNAT Wide_Wide_Spelling_Checker g-zspche ads,GNAT Wide_Spelling_Checker g-wispch ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-wide-string-split-g-wistsp-ads}@anchor{3e1}@anchor{gnat_rm/the_gnat_library id126}@anchor{3e2} +@anchor{gnat_rm/the_gnat_library gnat-wide-string-split-g-wistsp-ads}@anchor{3e0}@anchor{gnat_rm/the_gnat_library id126}@anchor{3e1} @section @code{GNAT.Wide_String_Split} (@code{g-wistsp.ads}) @@ -25177,7 +25166,7 @@ to the resulting slices. This package is instantiated from @code{GNAT.Array_Split}. @node GNAT Wide_Wide_Spelling_Checker g-zspche ads,GNAT Wide_Wide_String_Split g-zistsp ads,GNAT Wide_String_Split g-wistsp ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-wide-wide-spelling-checker-g-zspche-ads}@anchor{3e3}@anchor{gnat_rm/the_gnat_library id127}@anchor{3e4} +@anchor{gnat_rm/the_gnat_library gnat-wide-wide-spelling-checker-g-zspche-ads}@anchor{3e2}@anchor{gnat_rm/the_gnat_library id127}@anchor{3e3} @section @code{GNAT.Wide_Wide_Spelling_Checker} (@code{g-zspche.ads}) @@ -25189,7 +25178,7 @@ Provides a function for determining whether one wide wide string is a plausible near misspelling of another wide wide string. @node GNAT Wide_Wide_String_Split g-zistsp ads,Interfaces C Extensions i-cexten ads,GNAT Wide_Wide_Spelling_Checker g-zspche ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-wide-wide-string-split-g-zistsp-ads}@anchor{3e5}@anchor{gnat_rm/the_gnat_library id128}@anchor{3e6} +@anchor{gnat_rm/the_gnat_library gnat-wide-wide-string-split-g-zistsp-ads}@anchor{3e4}@anchor{gnat_rm/the_gnat_library id128}@anchor{3e5} @section @code{GNAT.Wide_Wide_String_Split} (@code{g-zistsp.ads}) @@ -25203,7 +25192,7 @@ to the resulting slices. This package is instantiated from @code{GNAT.Array_Split}. @node Interfaces C Extensions i-cexten ads,Interfaces C Streams i-cstrea ads,GNAT Wide_Wide_String_Split g-zistsp ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library id129}@anchor{3e7}@anchor{gnat_rm/the_gnat_library interfaces-c-extensions-i-cexten-ads}@anchor{3e8} +@anchor{gnat_rm/the_gnat_library id129}@anchor{3e6}@anchor{gnat_rm/the_gnat_library interfaces-c-extensions-i-cexten-ads}@anchor{3e7} @section @code{Interfaces.C.Extensions} (@code{i-cexten.ads}) @@ -25214,7 +25203,7 @@ for use with either manually or automatically generated bindings to C libraries. @node Interfaces C Streams i-cstrea ads,Interfaces Packed_Decimal i-pacdec ads,Interfaces C Extensions i-cexten ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library id130}@anchor{3e9}@anchor{gnat_rm/the_gnat_library interfaces-c-streams-i-cstrea-ads}@anchor{3ea} +@anchor{gnat_rm/the_gnat_library id130}@anchor{3e8}@anchor{gnat_rm/the_gnat_library interfaces-c-streams-i-cstrea-ads}@anchor{3e9} @section @code{Interfaces.C.Streams} (@code{i-cstrea.ads}) @@ -25227,7 +25216,7 @@ This package is a binding for the most commonly used operations on C streams. @node Interfaces Packed_Decimal i-pacdec ads,Interfaces VxWorks i-vxwork ads,Interfaces C Streams i-cstrea ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library id131}@anchor{3eb}@anchor{gnat_rm/the_gnat_library interfaces-packed-decimal-i-pacdec-ads}@anchor{3ec} +@anchor{gnat_rm/the_gnat_library id131}@anchor{3ea}@anchor{gnat_rm/the_gnat_library interfaces-packed-decimal-i-pacdec-ads}@anchor{3eb} @section @code{Interfaces.Packed_Decimal} (@code{i-pacdec.ads}) @@ -25242,7 +25231,7 @@ from a packed decimal format compatible with that used on IBM mainframes. @node Interfaces VxWorks i-vxwork ads,Interfaces VxWorks IO i-vxwoio ads,Interfaces Packed_Decimal i-pacdec ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library id132}@anchor{3ed}@anchor{gnat_rm/the_gnat_library interfaces-vxworks-i-vxwork-ads}@anchor{3ee} +@anchor{gnat_rm/the_gnat_library id132}@anchor{3ec}@anchor{gnat_rm/the_gnat_library interfaces-vxworks-i-vxwork-ads}@anchor{3ed} @section @code{Interfaces.VxWorks} (@code{i-vxwork.ads}) @@ -25256,7 +25245,7 @@ mainframes. This package provides a limited binding to the VxWorks API. @node Interfaces VxWorks IO i-vxwoio ads,System Address_Image s-addima ads,Interfaces VxWorks i-vxwork ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library id133}@anchor{3ef}@anchor{gnat_rm/the_gnat_library interfaces-vxworks-io-i-vxwoio-ads}@anchor{3f0} +@anchor{gnat_rm/the_gnat_library id133}@anchor{3ee}@anchor{gnat_rm/the_gnat_library interfaces-vxworks-io-i-vxwoio-ads}@anchor{3ef} @section @code{Interfaces.VxWorks.IO} (@code{i-vxwoio.ads}) @@ -25279,7 +25268,7 @@ function codes. A particular use of this package is to enable the use of Get_Immediate under VxWorks. @node System Address_Image s-addima ads,System Assertions s-assert ads,Interfaces VxWorks IO i-vxwoio ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library id134}@anchor{3f1}@anchor{gnat_rm/the_gnat_library system-address-image-s-addima-ads}@anchor{3f2} +@anchor{gnat_rm/the_gnat_library id134}@anchor{3f0}@anchor{gnat_rm/the_gnat_library system-address-image-s-addima-ads}@anchor{3f1} @section @code{System.Address_Image} (@code{s-addima.ads}) @@ -25295,7 +25284,7 @@ function that gives an (implementation dependent) string which identifies an address. @node System Assertions s-assert ads,System Atomic_Counters s-atocou ads,System Address_Image s-addima ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library id135}@anchor{3f3}@anchor{gnat_rm/the_gnat_library system-assertions-s-assert-ads}@anchor{3f4} +@anchor{gnat_rm/the_gnat_library id135}@anchor{3f2}@anchor{gnat_rm/the_gnat_library system-assertions-s-assert-ads}@anchor{3f3} @section @code{System.Assertions} (@code{s-assert.ads}) @@ -25311,7 +25300,7 @@ by an run-time assertion failure, as well as the routine that is used internally to raise this assertion. @node System Atomic_Counters s-atocou ads,System Memory s-memory ads,System Assertions s-assert ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library id136}@anchor{3f5}@anchor{gnat_rm/the_gnat_library system-atomic-counters-s-atocou-ads}@anchor{3f6} +@anchor{gnat_rm/the_gnat_library id136}@anchor{3f4}@anchor{gnat_rm/the_gnat_library system-atomic-counters-s-atocou-ads}@anchor{3f5} @section @code{System.Atomic_Counters} (@code{s-atocou.ads}) @@ -25325,7 +25314,7 @@ on most targets, including all Alpha, AARCH64, ARM, ia64, PowerPC, SPARC V9, x86, and x86_64 platforms. @node System Memory s-memory ads,System Multiprocessors s-multip ads,System Atomic_Counters s-atocou ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library id137}@anchor{3f7}@anchor{gnat_rm/the_gnat_library system-memory-s-memory-ads}@anchor{3f8} +@anchor{gnat_rm/the_gnat_library id137}@anchor{3f6}@anchor{gnat_rm/the_gnat_library system-memory-s-memory-ads}@anchor{3f7} @section @code{System.Memory} (@code{s-memory.ads}) @@ -25343,7 +25332,7 @@ calls to this unit may be made for low level allocation uses (for example see the body of @code{GNAT.Tables}). @node System Multiprocessors s-multip ads,System Multiprocessors Dispatching_Domains s-mudido ads,System Memory s-memory ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library id138}@anchor{3f9}@anchor{gnat_rm/the_gnat_library system-multiprocessors-s-multip-ads}@anchor{3fa} +@anchor{gnat_rm/the_gnat_library id138}@anchor{3f8}@anchor{gnat_rm/the_gnat_library system-multiprocessors-s-multip-ads}@anchor{3f9} @section @code{System.Multiprocessors} (@code{s-multip.ads}) @@ -25356,7 +25345,7 @@ in GNAT we also make it available in Ada 95 and Ada 2005 (where it is technically an implementation-defined addition). @node System Multiprocessors Dispatching_Domains s-mudido ads,System Partition_Interface s-parint ads,System Multiprocessors s-multip ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library id139}@anchor{3fb}@anchor{gnat_rm/the_gnat_library system-multiprocessors-dispatching-domains-s-mudido-ads}@anchor{3fc} +@anchor{gnat_rm/the_gnat_library id139}@anchor{3fa}@anchor{gnat_rm/the_gnat_library system-multiprocessors-dispatching-domains-s-mudido-ads}@anchor{3fb} @section @code{System.Multiprocessors.Dispatching_Domains} (@code{s-mudido.ads}) @@ -25369,7 +25358,7 @@ in GNAT we also make it available in Ada 95 and Ada 2005 (where it is technically an implementation-defined addition). @node System Partition_Interface s-parint ads,System Pool_Global s-pooglo ads,System Multiprocessors Dispatching_Domains s-mudido ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library id140}@anchor{3fd}@anchor{gnat_rm/the_gnat_library system-partition-interface-s-parint-ads}@anchor{3fe} +@anchor{gnat_rm/the_gnat_library id140}@anchor{3fc}@anchor{gnat_rm/the_gnat_library system-partition-interface-s-parint-ads}@anchor{3fd} @section @code{System.Partition_Interface} (@code{s-parint.ads}) @@ -25382,7 +25371,7 @@ is used primarily in a distribution context when using Annex E with @code{GLADE}. @node System Pool_Global s-pooglo ads,System Pool_Local s-pooloc ads,System Partition_Interface s-parint ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library id141}@anchor{3ff}@anchor{gnat_rm/the_gnat_library system-pool-global-s-pooglo-ads}@anchor{400} +@anchor{gnat_rm/the_gnat_library id141}@anchor{3fe}@anchor{gnat_rm/the_gnat_library system-pool-global-s-pooglo-ads}@anchor{3ff} @section @code{System.Pool_Global} (@code{s-pooglo.ads}) @@ -25399,7 +25388,7 @@ declared. It uses malloc/free to allocate/free and does not attempt to do any automatic reclamation. @node System Pool_Local s-pooloc ads,System Restrictions s-restri ads,System Pool_Global s-pooglo ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library id142}@anchor{401}@anchor{gnat_rm/the_gnat_library system-pool-local-s-pooloc-ads}@anchor{402} +@anchor{gnat_rm/the_gnat_library id142}@anchor{400}@anchor{gnat_rm/the_gnat_library system-pool-local-s-pooloc-ads}@anchor{401} @section @code{System.Pool_Local} (@code{s-pooloc.ads}) @@ -25416,7 +25405,7 @@ a list of allocated blocks, so that all storage allocated for the pool can be freed automatically when the pool is finalized. @node System Restrictions s-restri ads,System Rident s-rident ads,System Pool_Local s-pooloc ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library id143}@anchor{403}@anchor{gnat_rm/the_gnat_library system-restrictions-s-restri-ads}@anchor{404} +@anchor{gnat_rm/the_gnat_library id143}@anchor{402}@anchor{gnat_rm/the_gnat_library system-restrictions-s-restri-ads}@anchor{403} @section @code{System.Restrictions} (@code{s-restri.ads}) @@ -25432,7 +25421,7 @@ compiler determined information on which restrictions are violated by one or more packages in the partition. @node System Rident s-rident ads,System Strings Stream_Ops s-ststop ads,System Restrictions s-restri ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library id144}@anchor{405}@anchor{gnat_rm/the_gnat_library system-rident-s-rident-ads}@anchor{406} +@anchor{gnat_rm/the_gnat_library id144}@anchor{404}@anchor{gnat_rm/the_gnat_library system-rident-s-rident-ads}@anchor{405} @section @code{System.Rident} (@code{s-rident.ads}) @@ -25448,7 +25437,7 @@ since the necessary instantiation is included in package System.Restrictions. @node System Strings Stream_Ops s-ststop ads,System Unsigned_Types s-unstyp ads,System Rident s-rident ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library id145}@anchor{407}@anchor{gnat_rm/the_gnat_library system-strings-stream-ops-s-ststop-ads}@anchor{408} +@anchor{gnat_rm/the_gnat_library id145}@anchor{406}@anchor{gnat_rm/the_gnat_library system-strings-stream-ops-s-ststop-ads}@anchor{407} @section @code{System.Strings.Stream_Ops} (@code{s-ststop.ads}) @@ -25464,7 +25453,7 @@ stream attributes are applied to string types, but the subprograms in this package can be used directly by application programs. @node System Unsigned_Types s-unstyp ads,System Wch_Cnv s-wchcnv ads,System Strings Stream_Ops s-ststop ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library id146}@anchor{409}@anchor{gnat_rm/the_gnat_library system-unsigned-types-s-unstyp-ads}@anchor{40a} +@anchor{gnat_rm/the_gnat_library id146}@anchor{408}@anchor{gnat_rm/the_gnat_library system-unsigned-types-s-unstyp-ads}@anchor{409} @section @code{System.Unsigned_Types} (@code{s-unstyp.ads}) @@ -25477,7 +25466,7 @@ also contains some related definitions for other specialized types used by the compiler in connection with packed array types. @node System Wch_Cnv s-wchcnv ads,System Wch_Con s-wchcon ads,System Unsigned_Types s-unstyp ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library id147}@anchor{40b}@anchor{gnat_rm/the_gnat_library system-wch-cnv-s-wchcnv-ads}@anchor{40c} +@anchor{gnat_rm/the_gnat_library id147}@anchor{40a}@anchor{gnat_rm/the_gnat_library system-wch-cnv-s-wchcnv-ads}@anchor{40b} @section @code{System.Wch_Cnv} (@code{s-wchcnv.ads}) @@ -25498,7 +25487,7 @@ encoding method. It uses definitions in package @code{System.Wch_Con}. @node System Wch_Con s-wchcon ads,,System Wch_Cnv s-wchcnv ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library id148}@anchor{40d}@anchor{gnat_rm/the_gnat_library system-wch-con-s-wchcon-ads}@anchor{40e} +@anchor{gnat_rm/the_gnat_library id148}@anchor{40c}@anchor{gnat_rm/the_gnat_library system-wch-con-s-wchcon-ads}@anchor{40d} @section @code{System.Wch_Con} (@code{s-wchcon.ads}) @@ -25510,7 +25499,7 @@ in ordinary strings. These definitions are used by the package @code{System.Wch_Cnv}. @node Interfacing to Other Languages,Specialized Needs Annexes,The GNAT Library,Top -@anchor{gnat_rm/interfacing_to_other_languages doc}@anchor{40f}@anchor{gnat_rm/interfacing_to_other_languages id1}@anchor{410}@anchor{gnat_rm/interfacing_to_other_languages interfacing-to-other-languages}@anchor{11} +@anchor{gnat_rm/interfacing_to_other_languages doc}@anchor{40e}@anchor{gnat_rm/interfacing_to_other_languages id1}@anchor{40f}@anchor{gnat_rm/interfacing_to_other_languages interfacing-to-other-languages}@anchor{11} @chapter Interfacing to Other Languages @@ -25528,7 +25517,7 @@ provided. @end menu @node Interfacing to C,Interfacing to C++,,Interfacing to Other Languages -@anchor{gnat_rm/interfacing_to_other_languages id2}@anchor{411}@anchor{gnat_rm/interfacing_to_other_languages interfacing-to-c}@anchor{412} +@anchor{gnat_rm/interfacing_to_other_languages id2}@anchor{410}@anchor{gnat_rm/interfacing_to_other_languages interfacing-to-c}@anchor{411} @section Interfacing to C @@ -25668,7 +25657,7 @@ of the length corresponding to the @code{type'Size} value in Ada. @end itemize @node Interfacing to C++,Interfacing to COBOL,Interfacing to C,Interfacing to Other Languages -@anchor{gnat_rm/interfacing_to_other_languages id3}@anchor{49}@anchor{gnat_rm/interfacing_to_other_languages id4}@anchor{413} +@anchor{gnat_rm/interfacing_to_other_languages id3}@anchor{49}@anchor{gnat_rm/interfacing_to_other_languages id4}@anchor{412} @section Interfacing to C++ @@ -25725,7 +25714,7 @@ The @code{External_Name} is the name of the C++ RTTI symbol. You can then cover a specific C++ exception in an exception handler. @node Interfacing to COBOL,Interfacing to Fortran,Interfacing to C++,Interfacing to Other Languages -@anchor{gnat_rm/interfacing_to_other_languages id5}@anchor{414}@anchor{gnat_rm/interfacing_to_other_languages interfacing-to-cobol}@anchor{415} +@anchor{gnat_rm/interfacing_to_other_languages id5}@anchor{413}@anchor{gnat_rm/interfacing_to_other_languages interfacing-to-cobol}@anchor{414} @section Interfacing to COBOL @@ -25733,7 +25722,7 @@ Interfacing to COBOL is achieved as described in section B.4 of the Ada Reference Manual. @node Interfacing to Fortran,Interfacing to non-GNAT Ada code,Interfacing to COBOL,Interfacing to Other Languages -@anchor{gnat_rm/interfacing_to_other_languages id6}@anchor{416}@anchor{gnat_rm/interfacing_to_other_languages interfacing-to-fortran}@anchor{417} +@anchor{gnat_rm/interfacing_to_other_languages id6}@anchor{415}@anchor{gnat_rm/interfacing_to_other_languages interfacing-to-fortran}@anchor{416} @section Interfacing to Fortran @@ -25743,7 +25732,7 @@ multi-dimensional array causes the array to be stored in column-major order as required for convenient interface to Fortran. @node Interfacing to non-GNAT Ada code,,Interfacing to Fortran,Interfacing to Other Languages -@anchor{gnat_rm/interfacing_to_other_languages id7}@anchor{418}@anchor{gnat_rm/interfacing_to_other_languages interfacing-to-non-gnat-ada-code}@anchor{419} +@anchor{gnat_rm/interfacing_to_other_languages id7}@anchor{417}@anchor{gnat_rm/interfacing_to_other_languages interfacing-to-non-gnat-ada-code}@anchor{418} @section Interfacing to non-GNAT Ada code @@ -25767,7 +25756,7 @@ values or simple record types without variants, or simple array types with fixed bounds. @node Specialized Needs Annexes,Implementation of Specific Ada Features,Interfacing to Other Languages,Top -@anchor{gnat_rm/specialized_needs_annexes doc}@anchor{41a}@anchor{gnat_rm/specialized_needs_annexes id1}@anchor{41b}@anchor{gnat_rm/specialized_needs_annexes specialized-needs-annexes}@anchor{12} +@anchor{gnat_rm/specialized_needs_annexes doc}@anchor{419}@anchor{gnat_rm/specialized_needs_annexes id1}@anchor{41a}@anchor{gnat_rm/specialized_needs_annexes specialized-needs-annexes}@anchor{12} @chapter Specialized Needs Annexes @@ -25808,7 +25797,7 @@ in Ada 2005) is fully implemented. @end table @node Implementation of Specific Ada Features,Implementation of Ada 2012 Features,Specialized Needs Annexes,Top -@anchor{gnat_rm/implementation_of_specific_ada_features doc}@anchor{41c}@anchor{gnat_rm/implementation_of_specific_ada_features id1}@anchor{41d}@anchor{gnat_rm/implementation_of_specific_ada_features implementation-of-specific-ada-features}@anchor{13} +@anchor{gnat_rm/implementation_of_specific_ada_features doc}@anchor{41b}@anchor{gnat_rm/implementation_of_specific_ada_features id1}@anchor{41c}@anchor{gnat_rm/implementation_of_specific_ada_features implementation-of-specific-ada-features}@anchor{13} @chapter Implementation of Specific Ada Features @@ -25827,7 +25816,7 @@ facilities. @end menu @node Machine Code Insertions,GNAT Implementation of Tasking,,Implementation of Specific Ada Features -@anchor{gnat_rm/implementation_of_specific_ada_features id2}@anchor{41e}@anchor{gnat_rm/implementation_of_specific_ada_features machine-code-insertions}@anchor{175} +@anchor{gnat_rm/implementation_of_specific_ada_features id2}@anchor{41d}@anchor{gnat_rm/implementation_of_specific_ada_features machine-code-insertions}@anchor{175} @section Machine Code Insertions @@ -25995,7 +25984,7 @@ according to normal visibility rules. In particular if there is no qualification is required. @node GNAT Implementation of Tasking,GNAT Implementation of Shared Passive Packages,Machine Code Insertions,Implementation of Specific Ada Features -@anchor{gnat_rm/implementation_of_specific_ada_features gnat-implementation-of-tasking}@anchor{41f}@anchor{gnat_rm/implementation_of_specific_ada_features id3}@anchor{420} +@anchor{gnat_rm/implementation_of_specific_ada_features gnat-implementation-of-tasking}@anchor{41e}@anchor{gnat_rm/implementation_of_specific_ada_features id3}@anchor{41f} @section GNAT Implementation of Tasking @@ -26011,7 +26000,7 @@ to compliance with the Real-Time Systems Annex. @end menu @node Mapping Ada Tasks onto the Underlying Kernel Threads,Ensuring Compliance with the Real-Time Annex,,GNAT Implementation of Tasking -@anchor{gnat_rm/implementation_of_specific_ada_features id4}@anchor{421}@anchor{gnat_rm/implementation_of_specific_ada_features mapping-ada-tasks-onto-the-underlying-kernel-threads}@anchor{422} +@anchor{gnat_rm/implementation_of_specific_ada_features id4}@anchor{420}@anchor{gnat_rm/implementation_of_specific_ada_features mapping-ada-tasks-onto-the-underlying-kernel-threads}@anchor{421} @subsection Mapping Ada Tasks onto the Underlying Kernel Threads @@ -26080,7 +26069,7 @@ support this functionality when the parent contains more than one task. @geindex Forking a new process @node Ensuring Compliance with the Real-Time Annex,Support for Locking Policies,Mapping Ada Tasks onto the Underlying Kernel Threads,GNAT Implementation of Tasking -@anchor{gnat_rm/implementation_of_specific_ada_features ensuring-compliance-with-the-real-time-annex}@anchor{423}@anchor{gnat_rm/implementation_of_specific_ada_features id5}@anchor{424} +@anchor{gnat_rm/implementation_of_specific_ada_features ensuring-compliance-with-the-real-time-annex}@anchor{422}@anchor{gnat_rm/implementation_of_specific_ada_features id5}@anchor{423} @subsection Ensuring Compliance with the Real-Time Annex @@ -26131,7 +26120,7 @@ placed at the end. @c Support_for_Locking_Policies @node Support for Locking Policies,,Ensuring Compliance with the Real-Time Annex,GNAT Implementation of Tasking -@anchor{gnat_rm/implementation_of_specific_ada_features support-for-locking-policies}@anchor{425} +@anchor{gnat_rm/implementation_of_specific_ada_features support-for-locking-policies}@anchor{424} @subsection Support for Locking Policies @@ -26165,7 +26154,7 @@ then ceiling locking is used. Otherwise, the @code{Ceiling_Locking} policy is ignored. @node GNAT Implementation of Shared Passive Packages,Code Generation for Array Aggregates,GNAT Implementation of Tasking,Implementation of Specific Ada Features -@anchor{gnat_rm/implementation_of_specific_ada_features gnat-implementation-of-shared-passive-packages}@anchor{426}@anchor{gnat_rm/implementation_of_specific_ada_features id6}@anchor{427} +@anchor{gnat_rm/implementation_of_specific_ada_features gnat-implementation-of-shared-passive-packages}@anchor{425}@anchor{gnat_rm/implementation_of_specific_ada_features id6}@anchor{426} @section GNAT Implementation of Shared Passive Packages @@ -26263,7 +26252,7 @@ This is used to provide the required locking semantics for proper protected object synchronization. @node Code Generation for Array Aggregates,The Size of Discriminated Records with Default Discriminants,GNAT Implementation of Shared Passive Packages,Implementation of Specific Ada Features -@anchor{gnat_rm/implementation_of_specific_ada_features code-generation-for-array-aggregates}@anchor{428}@anchor{gnat_rm/implementation_of_specific_ada_features id7}@anchor{429} +@anchor{gnat_rm/implementation_of_specific_ada_features code-generation-for-array-aggregates}@anchor{427}@anchor{gnat_rm/implementation_of_specific_ada_features id7}@anchor{428} @section Code Generation for Array Aggregates @@ -26294,7 +26283,7 @@ component values and static subtypes also lead to simpler code. @end menu @node Static constant aggregates with static bounds,Constant aggregates with unconstrained nominal types,,Code Generation for Array Aggregates -@anchor{gnat_rm/implementation_of_specific_ada_features id8}@anchor{42a}@anchor{gnat_rm/implementation_of_specific_ada_features static-constant-aggregates-with-static-bounds}@anchor{42b} +@anchor{gnat_rm/implementation_of_specific_ada_features id8}@anchor{429}@anchor{gnat_rm/implementation_of_specific_ada_features static-constant-aggregates-with-static-bounds}@anchor{42a} @subsection Static constant aggregates with static bounds @@ -26341,7 +26330,7 @@ Zero2: constant two_dim := (others => (others => 0)); @end example @node Constant aggregates with unconstrained nominal types,Aggregates with static bounds,Static constant aggregates with static bounds,Code Generation for Array Aggregates -@anchor{gnat_rm/implementation_of_specific_ada_features constant-aggregates-with-unconstrained-nominal-types}@anchor{42c}@anchor{gnat_rm/implementation_of_specific_ada_features id9}@anchor{42d} +@anchor{gnat_rm/implementation_of_specific_ada_features constant-aggregates-with-unconstrained-nominal-types}@anchor{42b}@anchor{gnat_rm/implementation_of_specific_ada_features id9}@anchor{42c} @subsection Constant aggregates with unconstrained nominal types @@ -26356,7 +26345,7 @@ Cr_Unc : constant One_Unc := (12,24,36); @end example @node Aggregates with static bounds,Aggregates with nonstatic bounds,Constant aggregates with unconstrained nominal types,Code Generation for Array Aggregates -@anchor{gnat_rm/implementation_of_specific_ada_features aggregates-with-static-bounds}@anchor{42e}@anchor{gnat_rm/implementation_of_specific_ada_features id10}@anchor{42f} +@anchor{gnat_rm/implementation_of_specific_ada_features aggregates-with-static-bounds}@anchor{42d}@anchor{gnat_rm/implementation_of_specific_ada_features id10}@anchor{42e} @subsection Aggregates with static bounds @@ -26384,7 +26373,7 @@ end loop; @end example @node Aggregates with nonstatic bounds,Aggregates in assignment statements,Aggregates with static bounds,Code Generation for Array Aggregates -@anchor{gnat_rm/implementation_of_specific_ada_features aggregates-with-nonstatic-bounds}@anchor{430}@anchor{gnat_rm/implementation_of_specific_ada_features id11}@anchor{431} +@anchor{gnat_rm/implementation_of_specific_ada_features aggregates-with-nonstatic-bounds}@anchor{42f}@anchor{gnat_rm/implementation_of_specific_ada_features id11}@anchor{430} @subsection Aggregates with nonstatic bounds @@ -26395,7 +26384,7 @@ have to be applied to sub-arrays individually, if they do not have statically compatible subtypes. @node Aggregates in assignment statements,,Aggregates with nonstatic bounds,Code Generation for Array Aggregates -@anchor{gnat_rm/implementation_of_specific_ada_features aggregates-in-assignment-statements}@anchor{432}@anchor{gnat_rm/implementation_of_specific_ada_features id12}@anchor{433} +@anchor{gnat_rm/implementation_of_specific_ada_features aggregates-in-assignment-statements}@anchor{431}@anchor{gnat_rm/implementation_of_specific_ada_features id12}@anchor{432} @subsection Aggregates in assignment statements @@ -26437,7 +26426,7 @@ a temporary (created either by the front-end or the code generator) and then that temporary will be copied onto the target. @node The Size of Discriminated Records with Default Discriminants,Image Values For Nonscalar Types,Code Generation for Array Aggregates,Implementation of Specific Ada Features -@anchor{gnat_rm/implementation_of_specific_ada_features id13}@anchor{434}@anchor{gnat_rm/implementation_of_specific_ada_features the-size-of-discriminated-records-with-default-discriminants}@anchor{435} +@anchor{gnat_rm/implementation_of_specific_ada_features id13}@anchor{433}@anchor{gnat_rm/implementation_of_specific_ada_features the-size-of-discriminated-records-with-default-discriminants}@anchor{434} @section The Size of Discriminated Records with Default Discriminants @@ -26517,7 +26506,7 @@ say) must be consistent, so it is imperative that the object, once created, remain invariant. @node Image Values For Nonscalar Types,Strict Conformance to the Ada Reference Manual,The Size of Discriminated Records with Default Discriminants,Implementation of Specific Ada Features -@anchor{gnat_rm/implementation_of_specific_ada_features id14}@anchor{436}@anchor{gnat_rm/implementation_of_specific_ada_features image-values-for-nonscalar-types}@anchor{437} +@anchor{gnat_rm/implementation_of_specific_ada_features id14}@anchor{435}@anchor{gnat_rm/implementation_of_specific_ada_features image-values-for-nonscalar-types}@anchor{436} @section Image Values For Nonscalar Types @@ -26537,7 +26526,7 @@ control of image text is required for some type T, then T’Put_Image should be explicitly specified. @node Strict Conformance to the Ada Reference Manual,,Image Values For Nonscalar Types,Implementation of Specific Ada Features -@anchor{gnat_rm/implementation_of_specific_ada_features id15}@anchor{438}@anchor{gnat_rm/implementation_of_specific_ada_features strict-conformance-to-the-ada-reference-manual}@anchor{439} +@anchor{gnat_rm/implementation_of_specific_ada_features id15}@anchor{437}@anchor{gnat_rm/implementation_of_specific_ada_features strict-conformance-to-the-ada-reference-manual}@anchor{438} @section Strict Conformance to the Ada Reference Manual @@ -26564,7 +26553,7 @@ behavior (although at the cost of a significant performance penalty), so infinite and NaN values are properly generated. @node Implementation of Ada 2012 Features,GNAT language extensions,Implementation of Specific Ada Features,Top -@anchor{gnat_rm/implementation_of_ada_2012_features doc}@anchor{43a}@anchor{gnat_rm/implementation_of_ada_2012_features id1}@anchor{43b}@anchor{gnat_rm/implementation_of_ada_2012_features implementation-of-ada-2012-features}@anchor{14} +@anchor{gnat_rm/implementation_of_ada_2012_features doc}@anchor{439}@anchor{gnat_rm/implementation_of_ada_2012_features id1}@anchor{43a}@anchor{gnat_rm/implementation_of_ada_2012_features implementation-of-ada-2012-features}@anchor{14} @chapter Implementation of Ada 2012 Features @@ -28730,7 +28719,7 @@ RM References: 4.03.01 (17) @end itemize @node GNAT language extensions,Security Hardening Features,Implementation of Ada 2012 Features,Top -@anchor{gnat_rm/gnat_language_extensions doc}@anchor{43c}@anchor{gnat_rm/gnat_language_extensions gnat-language-extensions}@anchor{43d}@anchor{gnat_rm/gnat_language_extensions id1}@anchor{43e} +@anchor{gnat_rm/gnat_language_extensions doc}@anchor{43b}@anchor{gnat_rm/gnat_language_extensions gnat-language-extensions}@anchor{43c}@anchor{gnat_rm/gnat_language_extensions id1}@anchor{43d} @chapter GNAT language extensions @@ -28761,7 +28750,7 @@ prototyping phase. @end menu @node How to activate the extended GNAT Ada superset,Curated Extensions,,GNAT language extensions -@anchor{gnat_rm/gnat_language_extensions how-to-activate-the-extended-gnat-ada-superset}@anchor{43f} +@anchor{gnat_rm/gnat_language_extensions how-to-activate-the-extended-gnat-ada-superset}@anchor{43e} @section How to activate the extended GNAT Ada superset @@ -28800,7 +28789,7 @@ for serious projects, and is only means as a playground/technology preview. @end cartouche @node Curated Extensions,Experimental Language Extensions,How to activate the extended GNAT Ada superset,GNAT language extensions -@anchor{gnat_rm/gnat_language_extensions curated-extensions}@anchor{440}@anchor{gnat_rm/gnat_language_extensions curated-language-extensions}@anchor{69} +@anchor{gnat_rm/gnat_language_extensions curated-extensions}@anchor{43f}@anchor{gnat_rm/gnat_language_extensions curated-language-extensions}@anchor{69} @section Curated Extensions @@ -28817,7 +28806,7 @@ for serious projects, and is only means as a playground/technology preview. @end menu @node Local Declarations Without Block,Conditional when constructs,,Curated Extensions -@anchor{gnat_rm/gnat_language_extensions local-declarations-without-block}@anchor{441} +@anchor{gnat_rm/gnat_language_extensions local-declarations-without-block}@anchor{440} @subsection Local Declarations Without Block @@ -28840,7 +28829,7 @@ end if; @end example @node Conditional when constructs,Fixed lower bounds for array types and subtypes,Local Declarations Without Block,Curated Extensions -@anchor{gnat_rm/gnat_language_extensions conditional-when-constructs}@anchor{442} +@anchor{gnat_rm/gnat_language_extensions conditional-when-constructs}@anchor{441} @subsection Conditional when constructs @@ -28912,7 +28901,7 @@ Link to the original RFC: @indicateurl{https://github.com/AdaCore/ada-spark-rfcs/blob/master/prototyped/rfc-conditional-when-constructs.rst} @node Fixed lower bounds for array types and subtypes,Prefixed-view notation for calls to primitive subprograms of untagged types,Conditional when constructs,Curated Extensions -@anchor{gnat_rm/gnat_language_extensions fixed-lower-bounds-for-array-types-and-subtypes}@anchor{443} +@anchor{gnat_rm/gnat_language_extensions fixed-lower-bounds-for-array-types-and-subtypes}@anchor{442} @subsection Fixed lower bounds for array types and subtypes @@ -28966,7 +28955,7 @@ Link to the original RFC: @indicateurl{https://github.com/AdaCore/ada-spark-rfcs/blob/master/prototyped/rfc-fixed-lower-bound.rst} @node Prefixed-view notation for calls to primitive subprograms of untagged types,Expression defaults for generic formal functions,Fixed lower bounds for array types and subtypes,Curated Extensions -@anchor{gnat_rm/gnat_language_extensions prefixed-view-notation-for-calls-to-primitive-subprograms-of-untagged-types}@anchor{444} +@anchor{gnat_rm/gnat_language_extensions prefixed-view-notation-for-calls-to-primitive-subprograms-of-untagged-types}@anchor{443} @subsection Prefixed-view notation for calls to primitive subprograms of untagged types @@ -29019,7 +29008,7 @@ Link to the original RFC: @indicateurl{https://github.com/AdaCore/ada-spark-rfcs/blob/master/prototyped/rfc-prefixed-untagged.rst} @node Expression defaults for generic formal functions,String interpolation,Prefixed-view notation for calls to primitive subprograms of untagged types,Curated Extensions -@anchor{gnat_rm/gnat_language_extensions expression-defaults-for-generic-formal-functions}@anchor{445} +@anchor{gnat_rm/gnat_language_extensions expression-defaults-for-generic-formal-functions}@anchor{444} @subsection Expression defaults for generic formal functions @@ -29048,7 +29037,7 @@ Link to the original RFC: @indicateurl{https://github.com/AdaCore/ada-spark-rfcs/blob/master/prototyped/rfc-expression-functions-as-default-for-generic-formal-function-parameters.rst} @node String interpolation,Constrained attribute for generic objects,Expression defaults for generic formal functions,Curated Extensions -@anchor{gnat_rm/gnat_language_extensions string-interpolation}@anchor{446} +@anchor{gnat_rm/gnat_language_extensions string-interpolation}@anchor{445} @subsection String interpolation @@ -29214,7 +29203,7 @@ Here is a link to the original RFC : @indicateurl{https://github.com/AdaCore/ada-spark-rfcs/blob/master/prototyped/rfc-string-interpolation.rst} @node Constrained attribute for generic objects,Static aspect on intrinsic functions,String interpolation,Curated Extensions -@anchor{gnat_rm/gnat_language_extensions constrained-attribute-for-generic-objects}@anchor{447} +@anchor{gnat_rm/gnat_language_extensions constrained-attribute-for-generic-objects}@anchor{446} @subsection Constrained attribute for generic objects @@ -29222,7 +29211,7 @@ The @code{Constrained} attribute is permitted for objects of generic types. The result indicates whether the corresponding actual is constrained. @node Static aspect on intrinsic functions,,Constrained attribute for generic objects,Curated Extensions -@anchor{gnat_rm/gnat_language_extensions static-aspect-on-intrinsic-functions}@anchor{448} +@anchor{gnat_rm/gnat_language_extensions static-aspect-on-intrinsic-functions}@anchor{447} @subsection @code{Static} aspect on intrinsic functions @@ -29231,7 +29220,7 @@ and the compiler will evaluate some of these intrinsics statically, in particular the @code{Shift_Left} and @code{Shift_Right} intrinsics. @node Experimental Language Extensions,,Curated Extensions,GNAT language extensions -@anchor{gnat_rm/gnat_language_extensions experimental-language-extensions}@anchor{6a}@anchor{gnat_rm/gnat_language_extensions id2}@anchor{449} +@anchor{gnat_rm/gnat_language_extensions experimental-language-extensions}@anchor{6a}@anchor{gnat_rm/gnat_language_extensions id2}@anchor{448} @section Experimental Language Extensions @@ -29243,7 +29232,7 @@ particular the @code{Shift_Left} and @code{Shift_Right} intrinsics. @end menu @node Pragma Storage_Model,Simpler accessibility model,,Experimental Language Extensions -@anchor{gnat_rm/gnat_language_extensions pragma-storage-model}@anchor{44a} +@anchor{gnat_rm/gnat_language_extensions pragma-storage-model}@anchor{449} @subsection Pragma Storage_Model @@ -29258,7 +29247,7 @@ Here is a link to the full RFC: @indicateurl{https://github.com/AdaCore/ada-spark-rfcs/blob/master/prototyped/rfc-storage-model.rst} @node Simpler accessibility model,Case pattern matching,Pragma Storage_Model,Experimental Language Extensions -@anchor{gnat_rm/gnat_language_extensions simpler-accessibility-model}@anchor{44b} +@anchor{gnat_rm/gnat_language_extensions simpler-accessibility-model}@anchor{44a} @subsection Simpler accessibility model @@ -29271,7 +29260,7 @@ Here is a link to the full RFC: @indicateurl{https://github.com/AdaCore/ada-spark-rfcs/blob/master/prototyped/rfc-simpler-accessibility.md} @node Case pattern matching,,Simpler accessibility model,Experimental Language Extensions -@anchor{gnat_rm/gnat_language_extensions case-pattern-matching}@anchor{44c} +@anchor{gnat_rm/gnat_language_extensions case-pattern-matching}@anchor{44b} @subsection Case pattern matching @@ -29403,7 +29392,7 @@ Link to the original RFC: @indicateurl{https://github.com/AdaCore/ada-spark-rfcs/blob/master/prototyped/rfc-pattern-matching.rst} @node Security Hardening Features,Obsolescent Features,GNAT language extensions,Top -@anchor{gnat_rm/security_hardening_features doc}@anchor{44d}@anchor{gnat_rm/security_hardening_features id1}@anchor{44e}@anchor{gnat_rm/security_hardening_features security-hardening-features}@anchor{15} +@anchor{gnat_rm/security_hardening_features doc}@anchor{44c}@anchor{gnat_rm/security_hardening_features id1}@anchor{44d}@anchor{gnat_rm/security_hardening_features security-hardening-features}@anchor{15} @chapter Security Hardening Features @@ -29425,7 +29414,7 @@ change. @end menu @node Register Scrubbing,Stack Scrubbing,,Security Hardening Features -@anchor{gnat_rm/security_hardening_features register-scrubbing}@anchor{44f} +@anchor{gnat_rm/security_hardening_features register-scrubbing}@anchor{44e} @section Register Scrubbing @@ -29461,7 +29450,7 @@ programming languages, see @cite{Using the GNU Compiler Collection (GCC)}. @c Stack Scrubbing: @node Stack Scrubbing,Hardened Conditionals,Register Scrubbing,Security Hardening Features -@anchor{gnat_rm/security_hardening_features stack-scrubbing}@anchor{450} +@anchor{gnat_rm/security_hardening_features stack-scrubbing}@anchor{44f} @section Stack Scrubbing @@ -29605,7 +29594,7 @@ Bar_Callable_Ptr. @c Hardened Conditionals: @node Hardened Conditionals,Hardened Booleans,Stack Scrubbing,Security Hardening Features -@anchor{gnat_rm/security_hardening_features hardened-conditionals}@anchor{451} +@anchor{gnat_rm/security_hardening_features hardened-conditionals}@anchor{450} @section Hardened Conditionals @@ -29695,7 +29684,7 @@ be used with other programming languages supported by GCC. @c Hardened Booleans: @node Hardened Booleans,Control Flow Redundancy,Hardened Conditionals,Security Hardening Features -@anchor{gnat_rm/security_hardening_features hardened-booleans}@anchor{452} +@anchor{gnat_rm/security_hardening_features hardened-booleans}@anchor{451} @section Hardened Booleans @@ -29756,7 +29745,7 @@ and more details on that attribute, see @cite{Using the GNU Compiler Collection @c Control Flow Redundancy: @node Control Flow Redundancy,,Hardened Booleans,Security Hardening Features -@anchor{gnat_rm/security_hardening_features control-flow-redundancy}@anchor{453} +@anchor{gnat_rm/security_hardening_features control-flow-redundancy}@anchor{452} @section Control Flow Redundancy @@ -29924,7 +29913,7 @@ see @cite{Using the GNU Compiler Collection (GCC)}. These options can be used with other programming languages supported by GCC. @node Obsolescent Features,Compatibility and Porting Guide,Security Hardening Features,Top -@anchor{gnat_rm/obsolescent_features doc}@anchor{454}@anchor{gnat_rm/obsolescent_features id1}@anchor{455}@anchor{gnat_rm/obsolescent_features obsolescent-features}@anchor{16} +@anchor{gnat_rm/obsolescent_features doc}@anchor{453}@anchor{gnat_rm/obsolescent_features id1}@anchor{454}@anchor{gnat_rm/obsolescent_features obsolescent-features}@anchor{16} @chapter Obsolescent Features @@ -29943,7 +29932,7 @@ compatibility purposes. @end menu @node pragma No_Run_Time,pragma Ravenscar,,Obsolescent Features -@anchor{gnat_rm/obsolescent_features id2}@anchor{456}@anchor{gnat_rm/obsolescent_features pragma-no-run-time}@anchor{457} +@anchor{gnat_rm/obsolescent_features id2}@anchor{455}@anchor{gnat_rm/obsolescent_features pragma-no-run-time}@anchor{456} @section pragma No_Run_Time @@ -29956,7 +29945,7 @@ preferred usage is to use an appropriately configured run-time that includes just those features that are to be made accessible. @node pragma Ravenscar,pragma Restricted_Run_Time,pragma No_Run_Time,Obsolescent Features -@anchor{gnat_rm/obsolescent_features id3}@anchor{458}@anchor{gnat_rm/obsolescent_features pragma-ravenscar}@anchor{459} +@anchor{gnat_rm/obsolescent_features id3}@anchor{457}@anchor{gnat_rm/obsolescent_features pragma-ravenscar}@anchor{458} @section pragma Ravenscar @@ -29965,7 +29954,7 @@ The pragma @code{Ravenscar} has exactly the same effect as pragma is part of the new Ada 2005 standard. @node pragma Restricted_Run_Time,pragma Task_Info,pragma Ravenscar,Obsolescent Features -@anchor{gnat_rm/obsolescent_features id4}@anchor{45a}@anchor{gnat_rm/obsolescent_features pragma-restricted-run-time}@anchor{45b} +@anchor{gnat_rm/obsolescent_features id4}@anchor{459}@anchor{gnat_rm/obsolescent_features pragma-restricted-run-time}@anchor{45a} @section pragma Restricted_Run_Time @@ -29975,7 +29964,7 @@ preferred since the Ada 2005 pragma @code{Profile} is intended for this kind of implementation dependent addition. @node pragma Task_Info,package System Task_Info s-tasinf ads,pragma Restricted_Run_Time,Obsolescent Features -@anchor{gnat_rm/obsolescent_features id5}@anchor{45c}@anchor{gnat_rm/obsolescent_features pragma-task-info}@anchor{45d} +@anchor{gnat_rm/obsolescent_features id5}@anchor{45b}@anchor{gnat_rm/obsolescent_features pragma-task-info}@anchor{45c} @section pragma Task_Info @@ -30001,7 +29990,7 @@ in the spec of package System.Task_Info in the runtime library. @node package System Task_Info s-tasinf ads,,pragma Task_Info,Obsolescent Features -@anchor{gnat_rm/obsolescent_features package-system-task-info}@anchor{45e}@anchor{gnat_rm/obsolescent_features package-system-task-info-s-tasinf-ads}@anchor{45f} +@anchor{gnat_rm/obsolescent_features package-system-task-info}@anchor{45d}@anchor{gnat_rm/obsolescent_features package-system-task-info-s-tasinf-ads}@anchor{45e} @section package System.Task_Info (@code{s-tasinf.ads}) @@ -30011,7 +30000,7 @@ to support the @code{Task_Info} pragma. The predefined Ada package standard replacement for GNAT’s @code{Task_Info} functionality. @node Compatibility and Porting Guide,GNU Free Documentation License,Obsolescent Features,Top -@anchor{gnat_rm/compatibility_and_porting_guide doc}@anchor{460}@anchor{gnat_rm/compatibility_and_porting_guide compatibility-and-porting-guide}@anchor{17}@anchor{gnat_rm/compatibility_and_porting_guide id1}@anchor{461} +@anchor{gnat_rm/compatibility_and_porting_guide doc}@anchor{45f}@anchor{gnat_rm/compatibility_and_porting_guide compatibility-and-porting-guide}@anchor{17}@anchor{gnat_rm/compatibility_and_porting_guide id1}@anchor{460} @chapter Compatibility and Porting Guide @@ -30033,7 +30022,7 @@ applications developed in other Ada environments. @end menu @node Writing Portable Fixed-Point Declarations,Compatibility with Ada 83,,Compatibility and Porting Guide -@anchor{gnat_rm/compatibility_and_porting_guide id2}@anchor{462}@anchor{gnat_rm/compatibility_and_porting_guide writing-portable-fixed-point-declarations}@anchor{463} +@anchor{gnat_rm/compatibility_and_porting_guide id2}@anchor{461}@anchor{gnat_rm/compatibility_and_porting_guide writing-portable-fixed-point-declarations}@anchor{462} @section Writing Portable Fixed-Point Declarations @@ -30155,7 +30144,7 @@ If you follow this scheme you will be guaranteed that your fixed-point types will be portable. @node Compatibility with Ada 83,Compatibility between Ada 95 and Ada 2005,Writing Portable Fixed-Point Declarations,Compatibility and Porting Guide -@anchor{gnat_rm/compatibility_and_porting_guide compatibility-with-ada-83}@anchor{464}@anchor{gnat_rm/compatibility_and_porting_guide id3}@anchor{465} +@anchor{gnat_rm/compatibility_and_porting_guide compatibility-with-ada-83}@anchor{463}@anchor{gnat_rm/compatibility_and_porting_guide id3}@anchor{464} @section Compatibility with Ada 83 @@ -30183,7 +30172,7 @@ following subsections treat the most likely issues to be encountered. @end menu @node Legal Ada 83 programs that are illegal in Ada 95,More deterministic semantics,,Compatibility with Ada 83 -@anchor{gnat_rm/compatibility_and_porting_guide id4}@anchor{466}@anchor{gnat_rm/compatibility_and_porting_guide legal-ada-83-programs-that-are-illegal-in-ada-95}@anchor{467} +@anchor{gnat_rm/compatibility_and_porting_guide id4}@anchor{465}@anchor{gnat_rm/compatibility_and_porting_guide legal-ada-83-programs-that-are-illegal-in-ada-95}@anchor{466} @subsection Legal Ada 83 programs that are illegal in Ada 95 @@ -30283,7 +30272,7 @@ the fix is usually simply to add the @code{(<>)} to the generic declaration. @end itemize @node More deterministic semantics,Changed semantics,Legal Ada 83 programs that are illegal in Ada 95,Compatibility with Ada 83 -@anchor{gnat_rm/compatibility_and_porting_guide id5}@anchor{468}@anchor{gnat_rm/compatibility_and_porting_guide more-deterministic-semantics}@anchor{469} +@anchor{gnat_rm/compatibility_and_porting_guide id5}@anchor{467}@anchor{gnat_rm/compatibility_and_porting_guide more-deterministic-semantics}@anchor{468} @subsection More deterministic semantics @@ -30311,7 +30300,7 @@ which open select branches are executed. @end itemize @node Changed semantics,Other language compatibility issues,More deterministic semantics,Compatibility with Ada 83 -@anchor{gnat_rm/compatibility_and_porting_guide changed-semantics}@anchor{46a}@anchor{gnat_rm/compatibility_and_porting_guide id6}@anchor{46b} +@anchor{gnat_rm/compatibility_and_porting_guide changed-semantics}@anchor{469}@anchor{gnat_rm/compatibility_and_porting_guide id6}@anchor{46a} @subsection Changed semantics @@ -30353,7 +30342,7 @@ covers only the restricted range. @end itemize @node Other language compatibility issues,,Changed semantics,Compatibility with Ada 83 -@anchor{gnat_rm/compatibility_and_porting_guide id7}@anchor{46c}@anchor{gnat_rm/compatibility_and_porting_guide other-language-compatibility-issues}@anchor{46d} +@anchor{gnat_rm/compatibility_and_porting_guide id7}@anchor{46b}@anchor{gnat_rm/compatibility_and_porting_guide other-language-compatibility-issues}@anchor{46c} @subsection Other language compatibility issues @@ -30386,7 +30375,7 @@ include @code{pragma Interface} and the floating point type attributes @end itemize @node Compatibility between Ada 95 and Ada 2005,Implementation-dependent characteristics,Compatibility with Ada 83,Compatibility and Porting Guide -@anchor{gnat_rm/compatibility_and_porting_guide compatibility-between-ada-95-and-ada-2005}@anchor{46e}@anchor{gnat_rm/compatibility_and_porting_guide id8}@anchor{46f} +@anchor{gnat_rm/compatibility_and_porting_guide compatibility-between-ada-95-and-ada-2005}@anchor{46d}@anchor{gnat_rm/compatibility_and_porting_guide id8}@anchor{46e} @section Compatibility between Ada 95 and Ada 2005 @@ -30458,7 +30447,7 @@ can declare a function returning a value from an anonymous access type. @end itemize @node Implementation-dependent characteristics,Compatibility with Other Ada Systems,Compatibility between Ada 95 and Ada 2005,Compatibility and Porting Guide -@anchor{gnat_rm/compatibility_and_porting_guide id9}@anchor{470}@anchor{gnat_rm/compatibility_and_porting_guide implementation-dependent-characteristics}@anchor{471} +@anchor{gnat_rm/compatibility_and_porting_guide id9}@anchor{46f}@anchor{gnat_rm/compatibility_and_porting_guide implementation-dependent-characteristics}@anchor{470} @section Implementation-dependent characteristics @@ -30481,7 +30470,7 @@ transition from certain Ada 83 compilers. @end menu @node Implementation-defined pragmas,Implementation-defined attributes,,Implementation-dependent characteristics -@anchor{gnat_rm/compatibility_and_porting_guide id10}@anchor{472}@anchor{gnat_rm/compatibility_and_porting_guide implementation-defined-pragmas}@anchor{473} +@anchor{gnat_rm/compatibility_and_porting_guide id10}@anchor{471}@anchor{gnat_rm/compatibility_and_porting_guide implementation-defined-pragmas}@anchor{472} @subsection Implementation-defined pragmas @@ -30503,7 +30492,7 @@ avoiding compiler rejection of units that contain such pragmas; they are not relevant in a GNAT context and hence are not otherwise implemented. @node Implementation-defined attributes,Libraries,Implementation-defined pragmas,Implementation-dependent characteristics -@anchor{gnat_rm/compatibility_and_porting_guide id11}@anchor{474}@anchor{gnat_rm/compatibility_and_porting_guide implementation-defined-attributes}@anchor{475} +@anchor{gnat_rm/compatibility_and_porting_guide id11}@anchor{473}@anchor{gnat_rm/compatibility_and_porting_guide implementation-defined-attributes}@anchor{474} @subsection Implementation-defined attributes @@ -30517,7 +30506,7 @@ Ada 83, GNAT supplies the attributes @code{Bit}, @code{Machine_Size} and @code{Type_Class}. @node Libraries,Elaboration order,Implementation-defined attributes,Implementation-dependent characteristics -@anchor{gnat_rm/compatibility_and_porting_guide id12}@anchor{476}@anchor{gnat_rm/compatibility_and_porting_guide libraries}@anchor{477} +@anchor{gnat_rm/compatibility_and_porting_guide id12}@anchor{475}@anchor{gnat_rm/compatibility_and_porting_guide libraries}@anchor{476} @subsection Libraries @@ -30546,7 +30535,7 @@ be preferable to retrofit the application using modular types. @end itemize @node Elaboration order,Target-specific aspects,Libraries,Implementation-dependent characteristics -@anchor{gnat_rm/compatibility_and_porting_guide elaboration-order}@anchor{478}@anchor{gnat_rm/compatibility_and_porting_guide id13}@anchor{479} +@anchor{gnat_rm/compatibility_and_porting_guide elaboration-order}@anchor{477}@anchor{gnat_rm/compatibility_and_porting_guide id13}@anchor{478} @subsection Elaboration order @@ -30582,7 +30571,7 @@ pragmas either globally (as an effect of the `-gnatE' switch) or locally @end itemize @node Target-specific aspects,,Elaboration order,Implementation-dependent characteristics -@anchor{gnat_rm/compatibility_and_porting_guide id14}@anchor{47a}@anchor{gnat_rm/compatibility_and_porting_guide target-specific-aspects}@anchor{47b} +@anchor{gnat_rm/compatibility_and_porting_guide id14}@anchor{479}@anchor{gnat_rm/compatibility_and_porting_guide target-specific-aspects}@anchor{47a} @subsection Target-specific aspects @@ -30595,10 +30584,10 @@ on the robustness of the original design. Moreover, Ada 95 (and thus Ada 2005 and Ada 2012) are sometimes incompatible with typical Ada 83 compiler practices regarding implicit packing, the meaning of the Size attribute, and the size of access values. -GNAT’s approach to these issues is described in @ref{47c,,Representation Clauses}. +GNAT’s approach to these issues is described in @ref{47b,,Representation Clauses}. @node Compatibility with Other Ada Systems,Representation Clauses,Implementation-dependent characteristics,Compatibility and Porting Guide -@anchor{gnat_rm/compatibility_and_porting_guide compatibility-with-other-ada-systems}@anchor{47d}@anchor{gnat_rm/compatibility_and_porting_guide id15}@anchor{47e} +@anchor{gnat_rm/compatibility_and_porting_guide compatibility-with-other-ada-systems}@anchor{47c}@anchor{gnat_rm/compatibility_and_porting_guide id15}@anchor{47d} @section Compatibility with Other Ada Systems @@ -30641,7 +30630,7 @@ far beyond this minimal set, as described in the next section. @end itemize @node Representation Clauses,Compatibility with HP Ada 83,Compatibility with Other Ada Systems,Compatibility and Porting Guide -@anchor{gnat_rm/compatibility_and_porting_guide id16}@anchor{47f}@anchor{gnat_rm/compatibility_and_porting_guide representation-clauses}@anchor{47c} +@anchor{gnat_rm/compatibility_and_porting_guide id16}@anchor{47e}@anchor{gnat_rm/compatibility_and_porting_guide representation-clauses}@anchor{47b} @section Representation Clauses @@ -30734,7 +30723,7 @@ with thin pointers. @end itemize @node Compatibility with HP Ada 83,,Representation Clauses,Compatibility and Porting Guide -@anchor{gnat_rm/compatibility_and_porting_guide compatibility-with-hp-ada-83}@anchor{480}@anchor{gnat_rm/compatibility_and_porting_guide id17}@anchor{481} +@anchor{gnat_rm/compatibility_and_porting_guide compatibility-with-hp-ada-83}@anchor{47f}@anchor{gnat_rm/compatibility_and_porting_guide id17}@anchor{480} @section Compatibility with HP Ada 83 @@ -30764,7 +30753,7 @@ extension of package System. @end itemize @node GNU Free Documentation License,Index,Compatibility and Porting Guide,Top -@anchor{share/gnu_free_documentation_license doc}@anchor{482}@anchor{share/gnu_free_documentation_license gnu-fdl}@anchor{1}@anchor{share/gnu_free_documentation_license gnu-free-documentation-license}@anchor{483} +@anchor{share/gnu_free_documentation_license doc}@anchor{481}@anchor{share/gnu_free_documentation_license gnu-fdl}@anchor{1}@anchor{share/gnu_free_documentation_license gnu-free-documentation-license}@anchor{482} @chapter GNU Free Documentation License diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi index 04e181bcb24..73f496fcdab 100644 --- a/gcc/ada/gnat_ugn.texi +++ b/gcc/ada/gnat_ugn.texi @@ -29645,8 +29645,8 @@ to permit their use in free software. @printindex ge -@anchor{d1}@w{ } @anchor{gnat_ugn/gnat_utility_programs switches-related-to-project-files}@w{ } +@anchor{d1}@w{ } @c %**end of body @bye From patchwork Thu Jun 13 13:33:34 2024 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: 1947411 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=lFJi2peW; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W0Nn13Wxpz1ydW for ; Thu, 13 Jun 2024 23:39:32 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 160A23882AC6 for ; Thu, 13 Jun 2024 13:39:31 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by sourceware.org (Postfix) with ESMTPS id 333FE388217B for ; Thu, 13 Jun 2024 13:34:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 333FE388217B 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 333FE388217B Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::32c ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718285668; cv=none; b=DrW4RpDwYtgJ/caJD4Glg1XHLjwncomqTeqUmT6n/zZ04wKKJtS+XddzjuNRd2bI/s/DWRr5O/9nbSkIMr4Viy4ZETCWn31GpoKSer9awji3PcK0wv99wgrMFeXmHxicllT66zABF0d6imkKxL5nckQCFJ88fFzkXF1VKXwsKt8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718285668; c=relaxed/simple; bh=spXRZG821em32Hmr1cjy/DPkl+K8HLW0msCt1spH6+U=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=Ou8HrmJlsSkrPI59pfyhsyL/39a8Weyz7ohXrBBqTn/9t6Js2gzVf9pdqaNl0ALxcHyFRgchVOmkWj5Me563DwTh8BSlkmgFQp57JBkTv5Xz7NqSpsZMtON7+dDB7TdwDkegxtaUeqo+BnNQp8IQM7LWJNwGgRt8YwxOJZJWpxQ= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-42138eadf64so9159575e9.3 for ; Thu, 13 Jun 2024 06:34:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1718285653; x=1718890453; 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=xi/hjSdPEPDIQSHa8MijJ4WvGg/Wb5xQLBMirOez6Ms=; b=lFJi2peW1OIvaMvyQ/Ccq2bhKwSv088KTpHFPg1Odoo6uPxQopv6ekkQbbAB7SHo3B duViBfat5AKOAuS+k2v8/fRf9xEM1LMFz9Hu+zA8esupvoN2zHp9EYBYO3t0FFFpfdpb bH1ZR8fkLwQA8tMamolxBlYUcvYJaqTFHesRWAiRCFZy2joV0OADdfILbH9ckG2yjN7k Z4Xzq5OboBx3VZqYI57nbxelOcAhAyBsykpv6+lnHKgKqiN+VAdQqW13/jOH3bugNJVy Cd7EAIIwcf5C/3TUUKa676bPepzSSt7xSD49CYXRl/7xUcJLIPs0iUEAgrp0nbk9lMkj j9hQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718285653; x=1718890453; 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=xi/hjSdPEPDIQSHa8MijJ4WvGg/Wb5xQLBMirOez6Ms=; b=mkiAOw1UM8unuBM4Iiaf2cZrynpfsEMwWqya4FTt6iYq1i4YCK8FKoKeoJcR44eWhG aE0vf0p6ET5qag4IHpwdF+4nEtLujoa4eG9YgHvYPaCRCG+0TUypkSiY0Y/Esn1M0ffu 20UKTWDU6wX3vhYoKib7hOAknJI///s8X3AUbyedi5aGy5Lqsew6fX+bPqiYmsHaqeM+ nqdmtEjbJ6d728A/DVzKwCs92ZsmjL6JBj6SuhJT75EuAXKP0rWSRl9lKF/D/vx7dHys P73rBZAxkJQEN1cBLjS3np8e5Bh2mb9hGe0HgiOgGHmrS5d6PzODmofwdu0KNCJ9AOCF dO8g== X-Gm-Message-State: AOJu0YxEpocQ9VW74iHYmVQMOwmvtprBoqkiHggpBjr78r7OxaezTzs8 MFwUb1nASEbXW73Hv9BHC1/MLSBru13YB+ZHBFQKwXxFVEsEuDtM240RxiRS24u5mXVa8iwNdDU = X-Google-Smtp-Source: AGHT+IFhMjfGFINU6JrvYVsRY+AKF2yTxbX4pdLQ6hNagSiei6OtZz50v+5iIWapMcYOXw5gz2Gc5w== X-Received: by 2002:a05:600c:a46:b0:422:683b:df2a with SMTP id 5b1f17b1804b1-422862acc15mr45974305e9.13.1718285652906; Thu, 13 Jun 2024 06:34: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-422870e9145sm62391955e9.22.2024.06.13.06.34.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 06:34:12 -0700 (PDT) From: =?utf-8?q?Marc_Poulhi=C3=A8s?= To: gcc-patches@gcc.gnu.org Cc: Eric Botcazou Subject: [COMMITTED 28/30] ada: Fix segmentation fault on slice of array with Unbounded_String component Date: Thu, 13 Jun 2024 15:33:34 +0200 Message-ID: <20240613133338.1809385-28-poulhies@adacore.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240613133338.1809385-1-poulhies@adacore.com> References: <20240613133338.1809385-1-poulhies@adacore.com> 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.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org From: Eric Botcazou This fixes a regression introduced by the overhaul of the implementation of finalization. When the first subtype of an array type is declared as constrained, the Finalize_Address primitive of the base type synthesized by the compiler is tailored to this first subtype, which means that this primitive cannot be used for other subtypes of the array type, which may for example be generated when an aggregate is assigned to a slice of an object of the first subtype. The straightforward solution would be to synthesize the Finalize_Address primitive for the base type instead, but its clean implementation would require changing the way allocators are implemented to always allocate the bounds alongside the data, which may turn out to be delicate. This instead changes the compiler to synthesize a local Finalize_Address primitive in the problematic cases, which should be rare in practice, and also contains a fixlet for Find_Last_Init, which fails to get to the base type again in the indirect case and, therefore, mishandles array subtypes. gcc/ada/ * exp_ch7.adb (Attach_Object_To_Master_Node): Fix formatting. (Build_Finalizer.Process_Object_Declaration): Synthesize a local Finalize_Address primitive if the object's subtype is an array that has a constrained first subtype and is not this first subtype. * exp_util.adb (Find_Last_Init): Get again to the base type in the indirect case. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/exp_ch7.adb | 115 ++++++++++++++++++++++++++++++++++--------- gcc/ada/exp_util.adb | 2 +- 2 files changed, 93 insertions(+), 24 deletions(-) diff --git a/gcc/ada/exp_ch7.adb b/gcc/ada/exp_ch7.adb index b34b4c967fb..eacdd17fc4c 100644 --- a/gcc/ada/exp_ch7.adb +++ b/gcc/ada/exp_ch7.adb @@ -839,7 +839,7 @@ package body Exp_Ch7 is and then Needs_BIP_Collection (Func_Id) then declare - Ptr_Typ : constant Node_Id := Make_Temporary (Loc, 'P'); + Ptr_Typ : constant Node_Id := Make_Temporary (Loc, 'P'); Param : constant Entity_Id := Make_Defining_Identifier (Loc, Name_V); @@ -861,27 +861,26 @@ package body Exp_Ch7 is Fin_Body := Make_Subprogram_Body (Loc, Specification => - Make_Procedure_Specification (Loc, - Defining_Unit_Name => Fin_Id, - - Parameter_Specifications => New_List ( - Make_Parameter_Specification (Loc, - Defining_Identifier => Param, - Parameter_Type => - New_Occurrence_Of (RTE (RE_Address), Loc)))), - - Declarations => New_List ( - Make_Full_Type_Declaration (Loc, - Defining_Identifier => Ptr_Typ, - Type_Definition => - Make_Access_To_Object_Definition (Loc, - All_Present => True, - Subtype_Indication => - New_Occurrence_Of (Obj_Typ, Loc)))), + Make_Procedure_Specification (Loc, + Defining_Unit_Name => Fin_Id, + Parameter_Specifications => New_List ( + Make_Parameter_Specification (Loc, + Defining_Identifier => Param, + Parameter_Type => + New_Occurrence_Of (RTE (RE_Address), Loc)))), + + Declarations => New_List ( + Make_Full_Type_Declaration (Loc, + Defining_Identifier => Ptr_Typ, + Type_Definition => + Make_Access_To_Object_Definition (Loc, + All_Present => True, + Subtype_Indication => + New_Occurrence_Of (Obj_Typ, Loc)))), - Handled_Statement_Sequence => - Make_Handled_Sequence_Of_Statements (Loc, - Statements => Fin_Stmts)); + Handled_Statement_Sequence => + Make_Handled_Sequence_Of_Statements (Loc, + Statements => Fin_Stmts)); Insert_After_And_Analyze (Master_Node_Ins, Fin_Body, Suppress => All_Checks); @@ -2652,7 +2651,7 @@ package body Exp_Ch7 is -- Processing for simple protected objects. Such objects require -- manual finalization of their lock managers. Generate: - -- procedure obj_type_nnFD (v :system__address) is + -- procedure obj_typ_nnFD (v : system__address) is -- type Ptr_Typ is access all Obj_Typ; -- Rnn : Obj_Typ renames Ptr_Typ!(v).all; -- begin @@ -2661,7 +2660,7 @@ package body Exp_Ch7 is -- exception -- when others => -- null; - -- end obj_type_nnFD; + -- end obj_typ_nnFD; if Is_Protected or else (Has_Simple_Protected_Object (Obj_Typ) @@ -2758,6 +2757,76 @@ package body Exp_Ch7 is Master_Node_Ins := Fin_Body; end; + -- If the object's subtype is an array that has a constrained first + -- subtype and is not this first subtype, we need to build a special + -- Finalize_Address primitive for the object's subtype because the + -- Finalize_Address primitive of the base type has been tailored to + -- the first subtype (see Make_Finalize_Address_Stmts). Generate: + + -- procedure obj_typ_nnFD (v : system__address) is + -- type Ptr_Typ is access all Obj_Typ; + -- begin + -- obj_typBDF (Ptr_Typ!(v).all, f => true); + -- end obj_typ_nnFD; + + elsif Is_Array_Type (Etype (Obj_Id)) + and then Is_Constrained (First_Subtype (Etype (Obj_Id))) + and then Etype (Obj_Id) /= First_Subtype (Etype (Obj_Id)) + then + declare + Ptr_Typ : constant Node_Id := Make_Temporary (Loc, 'P'); + Param : constant Entity_Id := + Make_Defining_Identifier (Loc, Name_V); + + Fin_Body : Node_Id; + + begin + Obj_Typ := Etype (Obj_Id); + + Fin_Id := + Make_Defining_Identifier (Loc, + Make_TSS_Name_Local + (Obj_Typ, TSS_Finalize_Address)); + + Fin_Body := + Make_Subprogram_Body (Loc, + Specification => + Make_Procedure_Specification (Loc, + Defining_Unit_Name => Fin_Id, + Parameter_Specifications => New_List ( + Make_Parameter_Specification (Loc, + Defining_Identifier => Param, + Parameter_Type => + New_Occurrence_Of (RTE (RE_Address), Loc)))), + + Declarations => New_List ( + Make_Full_Type_Declaration (Loc, + Defining_Identifier => Ptr_Typ, + Type_Definition => + Make_Access_To_Object_Definition (Loc, + All_Present => True, + Subtype_Indication => + New_Occurrence_Of (Obj_Typ, Loc)))), + + Handled_Statement_Sequence => + Make_Handled_Sequence_Of_Statements (Loc, + Statements => New_List ( + Make_Final_Call ( + Obj_Ref => + Make_Explicit_Dereference (Loc, + Prefix => + Unchecked_Convert_To (Ptr_Typ, + Make_Identifier (Loc, Name_V))), + Typ => Obj_Typ)))); + + Push_Scope (Scope (Obj_Id)); + Insert_After_And_Analyze + (Master_Node_Ins, Fin_Body, Suppress => All_Checks); + Pop_Scope; + + Master_Node_Ins := Fin_Body; + end; + else Fin_Id := Finalize_Address (Obj_Typ); diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb index 6e2168a80e9..3307f816d15 100644 --- a/gcc/ada/exp_util.adb +++ b/gcc/ada/exp_util.adb @@ -6433,7 +6433,7 @@ package body Exp_Util is Obj_Typ := Base_Type (Etype (Obj_Id)); if Is_Access_Type (Obj_Typ) then - Obj_Typ := Available_View (Designated_Type (Obj_Typ)); + Obj_Typ := Base_Type (Available_View (Designated_Type (Obj_Typ))); end if; -- Handle the initialization type of the object declaration From patchwork Thu Jun 13 13:33:35 2024 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: 1947425 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=cRXEWzDa; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W0Nvk42h9z20KL for ; Thu, 13 Jun 2024 23:45:22 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D15BA388216C for ; Thu, 13 Jun 2024 13:45:20 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by sourceware.org (Postfix) with ESMTPS id 3D334388215D for ; Thu, 13 Jun 2024 13:34:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3D334388215D 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 3D334388215D Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::335 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718285668; cv=none; b=o/UlcQsnS7p7DJdI565yq3/ZO1zsvFbvhmVPx+SgVQGQjIaLrP6NMLn0jCpzT0dSBkAQWUo6+aJsSJ4TwDeALeOtYg2nXVvFe21xtu793O+qIltRbLyoskGX1hMQqfFwLhb4Op1hOKcXyVKRvjF+74pJdRpjyFkAU6/4XiOTBHk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718285668; c=relaxed/simple; bh=nPOcUSKnHIRt1+OtnuWSjrOpJO7jRMMJBCKgESYR/4U=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=h25t7mpnxwPzNJgCPdzrOcy3TsTVyFGLyVNXv/tWMp9UdRvE16/majsMbJWjlZEdW4fjAPq6ALpE/U5chtHyvik33vWg0DxdLhgCrlSkyzy1JoUqM8Swo+yfv6qiNQOfFUA7s0/vm/LbVMoCGGtBWOO45K8c0Daeq5UO7g8lECk= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-4218180a122so7841555e9.1 for ; Thu, 13 Jun 2024 06:34:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1718285654; x=1718890454; 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=k1bzj0nvjmzsGaEdnFPdRyR0cWcNEza6EearAV/IOBA=; b=cRXEWzDa4fF+9AZm5WLz2Hv1OX26kESs/VB9ry5Lasum31JwRSDDHo6+A+R9Qz0+nV ERsVN6kMFoKlmYGce24T9GRzYDjbYTIZD7q1oRpCFagekCUJa1+gdeu1X51YcJQK9dXU RBsCV8vNZsriKGoN7tP5VgEXzU3Dv3mmaqVk45LvQVVghdKDpr4D6CaiAD5Ec1btUbhj s7qtX3JAKFXm+wUWzD7H5n1eWHhSJJKosH8+ovK/y+TCoIKTJNLfRDJi0Loxs4O2A6mP NkFkni4k5RC+cr06X0cX61hbHUxhcG4jlKleQBp9cTVW3cuggChZsgUXIabQhLO6Z0HX GmtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718285654; x=1718890454; 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=k1bzj0nvjmzsGaEdnFPdRyR0cWcNEza6EearAV/IOBA=; b=fq7T4fd5wxx3eMp804xb1M0FhumHnCMS7x1+7kBvWd1xM6DcDTyTkKljNzjNk5VXBr 2ZPAnXdtpw30Czo46f/VDOL/7a9i4GjBtE4K3uXBnr//4baLRnFHGFeBGHJ+wkYpLRvy F4Fppuk7120LephZAs/UdxIpx6TIy3VCUVvqabs1hpZOw53XnVdwrGiapvrIGWOkRkmW ESTjLuHw6OyNtAOK7jet4Dtc2ydnp9GWKBEruVC1VLGDebOhbJcJIUOeDD7Y000ranbm OrFd9DkGlIhQeINPOGOluYCbqBPfa1KO4u1pSu7Pxn2AkA+0dnbO2W/x3g1XRQhwNEJ9 FmLA== X-Gm-Message-State: AOJu0YyvuxkasCg58bL+/kP2tXzmlk2wo5XhoexjKGHM4DQNHwVyoh61 sOb/1IKDL2lvXdzZbUYWRwO2r0rh+rPk1vaPC9kM40T0PI0hNmWT+cm/AP7GtJJAUg1O70MssCo = X-Google-Smtp-Source: AGHT+IHR0wV4+2qCASgWl+Y/XulGDvD/XasRKlUurTztqQol5IY7aeqfLNIPiMeT8p8aHBT6NQyg1A== X-Received: by 2002:a05:600c:5117:b0:41a:908c:b841 with SMTP id 5b1f17b1804b1-422865ac05amr52941995e9.32.1718285653726; Thu, 13 Jun 2024 06:34:13 -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-422870e9145sm62391955e9.22.2024.06.13.06.34.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 06:34:13 -0700 (PDT) From: =?utf-8?q?Marc_Poulhi=C3=A8s?= To: gcc-patches@gcc.gnu.org Cc: Viljar Indus Subject: [COMMITTED 29/30] ada: Remove -gnatdJ switch Date: Thu, 13 Jun 2024 15:33:35 +0200 Message-ID: <20240613133338.1809385-29-poulhies@adacore.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240613133338.1809385-1-poulhies@adacore.com> References: <20240613133338.1809385-1-poulhies@adacore.com> MIME-Version: 1.0 X-Spam-Status: No, score=-13.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_ASCII_DIVIDERS, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE, WEIRD_QUOTING 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.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org From: Viljar Indus Using -gnatdJ with various other switches was error prone. Remove this switch since the primary users of this mode GNATCheck and Codepeer no longer need it. gcc/ada/ * debug.adb: Remove mentions of -gnatdJ. * errout.adb: Remove printing subprogram names to JSON. * erroutc.adb: Remove printing subprogram names in messages. * erroutc.ads: Remove Node and Subprogram_Name_Ptr used for -gnatdJ. * errutil.adb: Remove Node used for -gnatdJ * gnat1drv.adb: Remove references of -gnatdJ and Include_Subprgram_In_Messages. * opt.ads: Remove Include_Subprgram_In_Messages * par-util.adb: Remove behavior related to Include_Subprgram_In_Messages. * sem_util.adb: Remove Subprogram_Name used for -gnatdJ Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/debug.adb | 6 --- gcc/ada/errout.adb | 62 +++++++---------------- gcc/ada/erroutc.adb | 20 +------- gcc/ada/erroutc.ads | 18 ------- gcc/ada/errutil.adb | 3 +- gcc/ada/gnat1drv.adb | 7 --- gcc/ada/opt.ads | 4 -- gcc/ada/par-util.adb | 6 --- gcc/ada/sem_util.adb | 116 ------------------------------------------- 9 files changed, 22 insertions(+), 220 deletions(-) diff --git a/gcc/ada/debug.adb b/gcc/ada/debug.adb index 540db2a9942..602a8fa0b63 100644 --- a/gcc/ada/debug.adb +++ b/gcc/ada/debug.adb @@ -67,7 +67,6 @@ package body Debug is -- dG Generate all warnings including those normally suppressed -- dH Hold (kill) call to gigi -- dI Inhibit internal name numbering in gnatG listing - -- dJ Prepend subprogram name in messages -- dK Kill all error messages -- dL Ignore external calls from instances for elaboration -- dM Assume all variables are modified (no current values) @@ -615,11 +614,6 @@ package body Debug is -- is used in the fixed bugs run to minimize system and version -- dependency in filed -gnatD or -gnatG output. - -- dJ Prepend the name of the enclosing subprogram in compiler messages - -- (errors, warnings, style checks). This is useful in particular to - -- integrate compiler warnings in static analysis tools such as - -- CodePeer. - -- dK Kill all error messages. This debug flag suppresses the output -- of all error messages. It is used in regression tests where the -- error messages are target dependent and irrelevant. diff --git a/gcc/ada/errout.adb b/gcc/ada/errout.adb index 92c4f6a4635..76c461a2fd7 100644 --- a/gcc/ada/errout.adb +++ b/gcc/ada/errout.adb @@ -100,8 +100,7 @@ package body Errout is (Msg : String; Span : Source_Span; Opan : Source_Span; - Msg_Cont : Boolean; - Node : Node_Id); + Msg_Cont : Boolean); -- This is the low-level routine used to post messages after dealing with -- the issue of messages placed on instantiations (which get broken up -- into separate calls in Error_Msg). Span is the location on which the @@ -112,9 +111,7 @@ package body Errout is -- copy. So typically we can see Opan pointing to the template location -- in an instantiation copy when Span points to the source location of -- the actual instantiation (i.e the line with the new). Msg_Cont is - -- set true if this is a continuation message. Node is the relevant - -- Node_Id for this message, to be used to compute the enclosing entity if - -- Opt.Include_Subprogram_In_Messages is set. + -- set true if this is a continuation message. function No_Warnings (N : Node_Or_Entity_Id) return Boolean; -- Determines if warnings should be suppressed for the given node @@ -475,7 +472,7 @@ package body Errout is -- Error_Msg_Internal to place the message in the requested location. if Instantiation (Sindex) = No_Location then - Error_Msg_Internal (Msg, Flag_Span, Flag_Span, False, N); + Error_Msg_Internal (Msg, Flag_Span, Flag_Span, False); return; end if; @@ -573,32 +570,28 @@ package body Errout is (Msg => "info: in inlined body #", Span => To_Span (Actual_Error_Loc), Opan => Flag_Span, - Msg_Cont => Msg_Cont_Status, - Node => N); + Msg_Cont => Msg_Cont_Status); elsif Is_Warning_Msg then Error_Msg_Internal (Msg => Warn_Insertion & "in inlined body #", Span => To_Span (Actual_Error_Loc), Opan => Flag_Span, - Msg_Cont => Msg_Cont_Status, - Node => N); + Msg_Cont => Msg_Cont_Status); elsif Is_Style_Msg then Error_Msg_Internal (Msg => "style: in inlined body #", Span => To_Span (Actual_Error_Loc), Opan => Flag_Span, - Msg_Cont => Msg_Cont_Status, - Node => N); + Msg_Cont => Msg_Cont_Status); else Error_Msg_Internal (Msg => "error in inlined body #", Span => To_Span (Actual_Error_Loc), Opan => Flag_Span, - Msg_Cont => Msg_Cont_Status, - Node => N); + Msg_Cont => Msg_Cont_Status); end if; -- Case of generic instantiation @@ -609,32 +602,28 @@ package body Errout is (Msg => "info: in instantiation #", Span => To_Span (Actual_Error_Loc), Opan => Flag_Span, - Msg_Cont => Msg_Cont_Status, - Node => N); + Msg_Cont => Msg_Cont_Status); elsif Is_Warning_Msg then Error_Msg_Internal (Msg => Warn_Insertion & "in instantiation #", Span => To_Span (Actual_Error_Loc), Opan => Flag_Span, - Msg_Cont => Msg_Cont_Status, - Node => N); + Msg_Cont => Msg_Cont_Status); elsif Is_Style_Msg then Error_Msg_Internal (Msg => "style: in instantiation #", Span => To_Span (Actual_Error_Loc), Opan => Flag_Span, - Msg_Cont => Msg_Cont_Status, - Node => N); + Msg_Cont => Msg_Cont_Status); else Error_Msg_Internal (Msg => "instantiation error #", Span => To_Span (Actual_Error_Loc), Opan => Flag_Span, - Msg_Cont => Msg_Cont_Status, - Node => N); + Msg_Cont => Msg_Cont_Status); end if; end if; end if; @@ -653,8 +642,7 @@ package body Errout is (Msg => Msg, Span => To_Span (Actual_Error_Loc), Opan => Flag_Span, - Msg_Cont => Msg_Cont_Status, - Node => N); + Msg_Cont => Msg_Cont_Status); end; end Error_Msg; @@ -944,8 +932,7 @@ package body Errout is (Msg : String; Span : Source_Span; Opan : Source_Span; - Msg_Cont : Boolean; - Node : Node_Id) + Msg_Cont : Boolean) is Sptr : constant Source_Ptr := Span.Ptr; Optr : constant Source_Ptr := Opan.Ptr; @@ -1247,8 +1234,7 @@ package body Errout is Serious => Is_Serious_Error, Uncond => Is_Unconditional_Msg, Msg_Cont => Continuation, - Deleted => False, - Node => Node)); + Deleted => False)); Cur_Msg := Errors.Last; -- Test if warning to be treated as error @@ -1471,8 +1457,7 @@ package body Errout is (Msg => Msg, Span => Span, Opan => Opan, - Msg_Cont => True, - Node => Node); + Msg_Cont => True); end; end if; end Error_Msg_Internal; @@ -2026,9 +2011,9 @@ package body Errout is -- Warn for unmatched Warnings (Off, ...) if SWE.Open then - Error_Msg_N + Error_Msg ("?.w?pragma Warnings Off with no matching Warnings On", - SWE.Node); + SWE.Start); -- Warn for ineffective Warnings (Off, ..) @@ -2041,9 +2026,9 @@ package body Errout is and then not (SWE.Msg'Length > 3 and then SWE.Msg (2 .. 3) = "-W") then - Error_Msg_N + Error_Msg ("?.w?no warning suppressed by this pragma", - SWE.Node); + SWE.Start); end if; end if; end; @@ -2394,9 +2379,6 @@ package body Errout is -- whose value is the JSON location of Error.Sptr.Ptr. If Sptr.First and -- Sptr.Last are different from Sptr.Ptr, they will be printed as JSON -- locations under the names "start" and "finish". - -- When Include_Subprogram_In_Messages is true (-gnatdJ) an additional, - -- non-standard, attribute named "subprogram" will be added, allowing - -- precisely identifying the subprogram surrounding the span. ----------------------- -- Is_Continuation -- @@ -2473,12 +2455,6 @@ package body Errout is Write_JSON_Location (Span.Last); end if; - if Include_Subprogram_In_Messages then - Write_Str (",""subprogram"":"""); - Write_JSON_Escaped_String (Subprogram_Name_Ptr (Error.Node)); - Write_Str (""""); - end if; - Write_Str ("}"); end Write_JSON_Span; diff --git a/gcc/ada/erroutc.adb b/gcc/ada/erroutc.adb index cef04d5daf2..f404018c44d 100644 --- a/gcc/ada/erroutc.adb +++ b/gcc/ada/erroutc.adb @@ -339,7 +339,6 @@ package body Erroutc is w (" Uncond = ", E.Uncond); w (" Msg_Cont = ", E.Msg_Cont); w (" Deleted = ", E.Deleted); - w (" Node = ", Int (E.Node)); Write_Eol; end dmsg; @@ -698,20 +697,7 @@ package body Erroutc is -- Postfix warning tag to message if needed if Tag /= "" and then Warning_Doc_Switch then - if Include_Subprogram_In_Messages then - Txt := - new String' - (Subprogram_Name_Ptr (E_Msg.Node) & - ": " & Text.all & ' ' & Tag); - else - Txt := new String'(Text.all & ' ' & Tag); - end if; - - elsif Include_Subprogram_In_Messages - and then (E_Msg.Warn or else E_Msg.Style) - then - Txt := - new String'(Subprogram_Name_Ptr (E_Msg.Node) & ": " & Text.all); + Txt := new String'(Text.all & ' ' & Tag); else Txt := Text; end if; @@ -744,8 +730,7 @@ package body Erroutc is elsif E_Msg.Warn then Txt := new String'(SGR_Warning & "warning: " & SGR_Reset & Txt.all); - -- No prefix needed for style message, "(style)" is there already, - -- although not necessarily in first position if -gnatdJ is used. + -- No prefix needed for style message, "(style)" is there already elsif E_Msg.Style then if Txt (Txt'First .. Txt'First + 6) = "(style)" then @@ -1674,7 +1659,6 @@ package body Erroutc is ((Start => Loc, Msg => new String'(Msg), Stop => Source_Last (Get_Source_File_Index (Loc)), - Node => Node, Reason => Reason, Open => True, Used => Used, diff --git a/gcc/ada/erroutc.ads b/gcc/ada/erroutc.ads index 1c43bce2b21..5d48d5b899f 100644 --- a/gcc/ada/erroutc.ads +++ b/gcc/ada/erroutc.ads @@ -149,11 +149,6 @@ package Erroutc is -- output. This is used for internal processing for the case of an -- illegal instantiation. See Error_Msg routine for further details. - type Subprogram_Name_Type is access function (N : Node_Id) return String; - Subprogram_Name_Ptr : Subprogram_Name_Type; - -- Indirect call to Sem_Util.Subprogram_Name to break circular - -- dependency with the static elaboration model. - ---------------------------- -- Message ID Definitions -- ---------------------------- @@ -276,11 +271,6 @@ package Erroutc is Deleted : Boolean; -- If this flag is set, the message is not printed. This is used -- in the circuit for deleting duplicate/redundant error messages. - - Node : Node_Id; - -- If set, points to the node relevant for this message which will be - -- used to compute the enclosing subprogram name if - -- Opt.Include_Subprogram_In_Messages is set. end record; package Errors is new Table.Table ( @@ -352,14 +342,6 @@ package Erroutc is -- Starting and ending source pointers for the range. These are always -- from the same source file. - Node : Node_Id; - -- Node for the pragma Warnings occurrence. We store it to compute the - -- enclosing subprogram if -gnatdJ is enabled and a message about this - -- clause needs to be emitted. Note that we cannot remove the Start - -- component above and use Sloc (Node) on message display instead - -- because -gnatD output can already have messed with slocs at the point - -- when warnings about ineffective clauses are emitted. - Reason : String_Id; -- Reason string from pragma Warnings, or null string if none diff --git a/gcc/ada/errutil.adb b/gcc/ada/errutil.adb index bac9d4b15f1..4f5aa216461 100644 --- a/gcc/ada/errutil.adb +++ b/gcc/ada/errutil.adb @@ -223,8 +223,7 @@ package body Errutil is Serious => Is_Serious_Error, Uncond => Is_Unconditional_Msg, Msg_Cont => Continuation, - Deleted => False, - Node => Empty)); + Deleted => False)); Cur_Msg := Errors.Last; Prev_Msg := No_Error_Msg; diff --git a/gcc/ada/gnat1drv.adb b/gcc/ada/gnat1drv.adb index 081d9435f4a..754dab82862 100644 --- a/gcc/ada/gnat1drv.adb +++ b/gcc/ada/gnat1drv.adb @@ -207,13 +207,6 @@ procedure Gnat1drv is Error_To_Warning := True; end if; - -- -gnatdJ sets Include_Subprogram_In_Messages, adding the related - -- subprogram as part of the error and warning messages. - - if Debug_Flag_JJ then - Include_Subprogram_In_Messages := True; - end if; - -- Disable CodePeer_Mode in Check_Syntax, since we need front-end -- expansion. diff --git a/gcc/ada/opt.ads b/gcc/ada/opt.ads index 5f402cf5d6e..d24b9b941ff 100644 --- a/gcc/ada/opt.ads +++ b/gcc/ada/opt.ads @@ -816,10 +816,6 @@ package Opt is -- cause implicit packing instead of generating an error message. Set by -- use of pragma Implicit_Packing. - Include_Subprogram_In_Messages : Boolean := False; - -- GNAT - -- Set True to include the enclosing subprogram in compiler messages. - Init_Or_Norm_Scalars : Boolean := False; -- GNAT, GNATBIND -- Set True if a pragma Initialize_Scalars applies to the current unit. diff --git a/gcc/ada/par-util.adb b/gcc/ada/par-util.adb index 8ed5947f4a0..f254026431f 100644 --- a/gcc/ada/par-util.adb +++ b/gcc/ada/par-util.adb @@ -689,12 +689,6 @@ package body Util is pragma Assert (Scope.Last > 0); Scope.Decrement_Last; - if Include_Subprogram_In_Messages - and then Scopes (Scope.Last).Labl /= Error - then - Current_Node := Scopes (Scope.Last).Labl; - end if; - if Debug_Flag_P then Error_Msg_Uint_1 := UI_From_Int (Scope.Last); Error_Msg_SC ("decrement scope stack ptr, new value = ^!"); diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index 3d12f552f41..1705b5817b9 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -30,7 +30,6 @@ with Debug; use Debug; with Einfo.Utils; use Einfo.Utils; with Elists; use Elists; with Errout; use Errout; -with Erroutc; use Erroutc; with Exp_Ch6; use Exp_Ch6; with Exp_Ch11; use Exp_Ch11; with Exp_Util; use Exp_Util; @@ -171,12 +170,6 @@ package body Sem_Util is -- routine does not take simple flow diagnostics into account, it relies on -- static facts such as the presence of null exclusions. - function Subprogram_Name (N : Node_Id) return String; - -- Return the fully qualified name of the enclosing subprogram for the - -- given node N, with file:line:col information appended, e.g. - -- "subp:file:line:col", corresponding to the source location of the - -- body of the subprogram. - ----------------------------- -- Abstract_Interface_List -- ----------------------------- @@ -28074,113 +28067,6 @@ package body Sem_Util is and then Has_Loop_Entry_Attributes (Entity (Identifier (Stmt))); end Subject_To_Loop_Entry_Attributes; - --------------------- - -- Subprogram_Name -- - --------------------- - - function Subprogram_Name (N : Node_Id) return String is - Buf : Bounded_String; - Ent : Node_Id := N; - Nod : Node_Id; - - begin - while Present (Ent) loop - case Nkind (Ent) is - when N_Subprogram_Body => - Ent := Defining_Unit_Name (Specification (Ent)); - exit; - - when N_Subprogram_Declaration => - Nod := Corresponding_Body (Ent); - - if Present (Nod) then - Ent := Nod; - else - Ent := Defining_Unit_Name (Specification (Ent)); - end if; - - exit; - - when N_Subprogram_Instantiation - | N_Package_Body - | N_Package_Specification - => - Ent := Defining_Unit_Name (Ent); - exit; - - when N_Protected_Type_Declaration => - Ent := Corresponding_Body (Ent); - exit; - - when N_Protected_Body - | N_Task_Body - => - Ent := Defining_Identifier (Ent); - exit; - - when N_Entity => - exit; - - when others => - null; - end case; - - Ent := Parent (Ent); - end loop; - - if No (Ent) then - return "unknown subprogram:unknown file:0:0"; - end if; - - -- If the subprogram is a child unit, use its simple name to start the - -- construction of the fully qualified name. - - if Nkind (Ent) = N_Defining_Program_Unit_Name then - Ent := Defining_Identifier (Ent); - end if; - - Append_Entity_Name (Buf, Ent); - - -- Append homonym number if needed - - if Nkind (N) in N_Entity and then Has_Homonym (N) then - declare - H : Entity_Id := Homonym (N); - Nr : Nat := 1; - - begin - while Present (H) loop - if Scope (H) = Scope (N) then - Nr := Nr + 1; - end if; - - H := Homonym (H); - end loop; - - if Nr > 1 then - Append (Buf, '#'); - Append (Buf, Nr); - end if; - end; - end if; - - -- Append source location of Ent to Buf so that the string will - -- look like "subp:file:line:col". - - declare - Loc : constant Source_Ptr := Sloc (Ent); - begin - Append (Buf, ':'); - Append (Buf, Reference_Name (Get_Source_File_Index (Loc))); - Append (Buf, ':'); - Append (Buf, Nat (Get_Logical_Line_Number (Loc))); - Append (Buf, ':'); - Append (Buf, Nat (Get_Column_Number (Loc))); - end; - - return +Buf; - end Subprogram_Name; - ------------------------------- -- Support_Atomic_Primitives -- ------------------------------- @@ -31395,6 +31281,4 @@ package body Sem_Util is end Storage_Model_Support; -begin - Erroutc.Subprogram_Name_Ptr := Subprogram_Name'Access; end Sem_Util; From patchwork Thu Jun 13 13:33:36 2024 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: 1947422 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=Oh2f/rUB; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W0NtF3vt5z20Xd for ; Thu, 13 Jun 2024 23:44:05 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id AF60E388215F for ; Thu, 13 Jun 2024 13:44:03 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) by sourceware.org (Postfix) with ESMTPS id D1E8A3882644 for ; Thu, 13 Jun 2024 13:34:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D1E8A3882644 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 D1E8A3882644 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::331 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718285668; cv=none; b=rXqGvtPUNg+F05mrDWlPLBN8B2PPRbvxD+gPYXVDqjKb5FD4Is4Q2BODNmElNWF9GN2Dyop6d0Y/KSDXTz7fmukR0BUCPYfiZgUn8qRUyQ6fNzFuH4r4ozrxetspwJnx/h2+4OqzkWavdNCZVLXkVnCxv4GJqUW+ImNTlG6VPd8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718285668; c=relaxed/simple; bh=/NfPSZcFdDBUUIbL20pFvsvxPBVjWYNVW7UGg6sYhjE=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=kkXd09T3ibBYd3sySmZil+kq4y/8jZqjP+fC2Q7ujILuZCyrvKxgYKQPCkfdw8iK0atABjM/ACt2pjuEFQL8Fx3HZ08euCzLJHkDvn/rWnssP+488tyzrIOdpX1/OaSrz6tWrpn+mbetGT/ZRNoNjHxjdCFJR6eYAp6Su2eYXqY= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-42108856c33so13538885e9.1 for ; Thu, 13 Jun 2024 06:34:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1718285654; x=1718890454; 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=1WEf+++SlNoF5oBhHBdDssbYDrhxqgQivIzGETlApBA=; b=Oh2f/rUBZ83Ixm939/0KislcTQ4Uq/6SzG/6GID9rGLpkX2jONB4COqyMYejBtF1iv hGGZQHN7FHbTmOXFmprFAk9ilG94speWrDmHK5B/fpbTja7wzuzH2J32v7jvlQHEeqFK n7TWshEkkbJIVXcPo6k1X42oC79d2q+vYxWV7k6koPKNC8lx9SzM9JfuwMJeKakUyFVa Jh0OKRAPu4hx756yL++UNR2mbi7ghpQAeYepV6ramkQsTp+n2NUaTm6AlvW+2cAs9JcF CV9Mai64McSpvGLsBvLecRDu38JlH6tPId7hlKj5EqVEtqjYb63xNsyZkmfBNPP6mNmb Pn+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718285654; x=1718890454; 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=1WEf+++SlNoF5oBhHBdDssbYDrhxqgQivIzGETlApBA=; b=VKL6s0xvpF09L/Nq/QTaorUYxKVecQKKM4TDFUc2HG64ZK+14wrV47MjPxz8ClqxPy YNFNHZRc7/QUfSz0/UXLZJ5DRNTPqSDjLYvExbNSGCK0Bnz4kIKQQD3X2eQsfpOtkYec LQKJFY+fEsLTjnY+dHIpWze/tZjof94weIK1C3uQbVicRNHJJdj74CFhGLGqOSry/hbO hRmHXJgxiToyjFhGqCxpbzBR37jySEktZOn73BVzluiN08O/czdnG4P/Yxxoo9RgKmVS ykkTf4lzWtzm09ZAqfvlIHOhwV0nQwGoy6HaZ7rgEkGnyUzM5SuA8bfyPTWD0iZou0Re TibA== X-Gm-Message-State: AOJu0Yy42BHAHwojUvMazunqq2K0qBncmgJmnEVYPuLDftrU+lou54FJ k5US3QMCHkDtVxOKgKIiSu94VJglqGcjZvdrtdaQKKXpFLi5bEqtQADPfnKEaXva1YyG3zRH5OM = X-Google-Smtp-Source: AGHT+IFzGCgg7644M+ZGUS9loC2DmePeIiXELeBi6DraNmW2uo5IHHm3t0rsxBmhCsvOgIZNDmBMwQ== X-Received: by 2002:a05:600c:3b04:b0:421:20e3:a25 with SMTP id 5b1f17b1804b1-42304190656mr5240785e9.1.1718285654633; Thu, 13 Jun 2024 06:34:14 -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-422870e9145sm62391955e9.22.2024.06.13.06.34.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 06:34:14 -0700 (PDT) From: =?utf-8?q?Marc_Poulhi=C3=A8s?= To: gcc-patches@gcc.gnu.org Cc: Steve Baird Subject: [COMMITTED 30/30] ada: Compiler goes into loop Date: Thu, 13 Jun 2024 15:33:36 +0200 Message-ID: <20240613133338.1809385-30-poulhies@adacore.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240613133338.1809385-1-poulhies@adacore.com> References: <20240613133338.1809385-1-poulhies@adacore.com> 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.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org From: Steve Baird In some cases that are difficult to characterize, the compiler fails an assertion check (if the compiler is built with assertions enabled) or loops forever (if assertions are not enabled). One way this can happen is if Exp_Util.Insert_Actions is called with an N_Itype_Reference node as its first parameter. This, in turn, can happen when an instance of Exp_Attr.Expand_N_Attribute_Reference.Built_And_Insert_Type_Attr_Subp calls Insert_Action (which will call Insert_Actions). gcc/ada/ * exp_util.adb (Insert_Actions): Code was relying on an incorrect assumption that an N_Itype_Reference cannot occur in declaration list or a statement list. Fix the code to handle this case. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/exp_util.adb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb index 3307f816d15..58ab557a250 100644 --- a/gcc/ada/exp_util.adb +++ b/gcc/ada/exp_util.adb @@ -8101,6 +8101,10 @@ package body Exp_Util is | N_Task_Body | N_Task_Body_Stub + -- Other things that can occur in stmt or decl lists + + | N_Itype_Reference + -- Use clauses can appear in lists of declarations | N_Use_Package_Clause @@ -8370,7 +8374,6 @@ package body Exp_Util is | N_Integer_Literal | N_Iterator_Specification | N_Interpolated_String_Literal - | N_Itype_Reference | N_Label | N_Loop_Parameter_Specification | N_Mod_Clause