From patchwork Mon May 13 08:36:45 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: 1934635 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=A7Yqwr0S; 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 4VdCrd2vnlz20d6 for ; Mon, 13 May 2024 18:51:13 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9B10B38708DF for ; Mon, 13 May 2024 08:51:11 +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 94DCF38708A8 for ; Mon, 13 May 2024 08:36:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 94DCF38708A8 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 94DCF38708A8 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=1715589452; cv=none; b=EsOl5X92MtDpnYkIGigcQcJq0GDPXHqeNcdMXJ3RXDyHX8Kp8Jea+C4723bI4U4dURRyeMWZoTDHQDcLJAyl0FOjtZ1lQwZ08JdbODBIywwjB07btDx6tYg6FTtdkcAlPMVg7tRpXQwbk5dYmP58O5RIUbNWDZWBnPIud7eMQwM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715589452; c=relaxed/simple; bh=WdYbmzDHuSCenvRb5BkdXH/0o/EoMDEsSWttah0bpFM=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=aLYn2rCwTSAe99nvb+AYat1qjB3VdVwRRzzPLwAvOoSXdZ9BTeGTlsEB2uDl43eikYl+PgYLC6bE9sUKMuuEutT1iEzID/jq6wlKLbGBZj0ajGAlNXOgJ1QKXp3OeChRnr9cA9x9EfcILE0yZZGJHrcqVswhyjrkwIMBKssFPvw= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-420180b58c3so3205015e9.2 for ; Mon, 13 May 2024 01:36:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1715589407; x=1716194207; 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=ZvGwKJLwjK1NAGjkVhJtr6d4zyzpPGuFMYxrNTMCxUE=; b=A7Yqwr0SLbsRqz4w3yOCWFcbjZ8vXiPlvBdUw6b98lZVB1+M3UacYq4s3HHKT5MWjL PbFb2dxaYzJOzD5Ft1JUAZOxwwRggC9fyHr5xAFRL1/oYbjhthlabvL2iZM2KbGT9g9O QfnbGvZhw5afHHrUzTO7xevgUr/dOgwz4CjS5zXakNlUzRtsmYktbBsJVwHER9uIebwS u8oCeKdYN65sNvjFuPpKHerVVlN3vqaW2h5BaES/Wba0ITQPL2XaleD98L8end75JEWj Vx4EHVGpd0JhWn1Lm0LBtx66xiBHedZh6u+bwxfXznbyYz8WJG/8MW/LGGTY4JVvEH/s hOpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715589407; x=1716194207; 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=ZvGwKJLwjK1NAGjkVhJtr6d4zyzpPGuFMYxrNTMCxUE=; b=QnQCr2hyK2SC7r1prRq0lQ330PlKC/8gkv8ipuFqi9ch1x3P24YyI/PZmiUhtbXpd9 lb+RIgz5nUhoo4ILac66Kd5l2SEGoNwV6VDokyLHE1jcZVmg5FA2e7cCBkF8yHw1Qjyb f8dQRmol5acPAREJCySPdRRwqlXUeyi06KduWrm0H9OkFOA7PLunWPILERAXhGlXqHDT QoWQm0R6ycj07zF16Xu30fJzmbTj2oSaroFrn4PXJ2y3CChxR+GnU3tmfoHCJw+YK5BG OMVchI8+D+aUojq6Jsb/YGdEKPte+UihJ351oKof/eNrWwv1jJ7XnCnzAcOrPXfUzIko UDSg== X-Gm-Message-State: AOJu0YxT5Y9UzphnF1xf5IqE6gV9E7Jj8ZYbUu7EAVwldBdfbFN9N6JY Z1Paw4LAUF+zHMBI14IFk34CRSCSt5Pt7oGqoi/hdWFBEBdVoDNK1WC2Nti4/8t7Ba8uePN9xkE = X-Google-Smtp-Source: AGHT+IFC52CyhFu2gWnsPJy3Sn6MP1B3fzw10KddWPqZ2bhFIakiPGbAzMYGwNQxyohBgiWpuywTzg== X-Received: by 2002:a05:600c:198a:b0:41b:fc3a:f1ef with SMTP id 5b1f17b1804b1-41feac5a3damr61083665e9.33.1715589407266; Mon, 13 May 2024 01:36:47 -0700 (PDT) Received: from localhost.localdomain ([2001:861:3382:1a90:cf0f:cd6c:7a6a:cbed]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42015deac1asm30289685e9.17.2024.05.13.01.36.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 May 2024 01:36:46 -0700 (PDT) From: =?utf-8?q?Marc_Poulhi=C3=A8s?= To: gcc-patches@gcc.gnu.org Cc: Piotr Trojanek Subject: [COMMITTED] ada: Revert recent change for Put_Image and Object_Size attributes Date: Mon, 13 May 2024 10:36:45 +0200 Message-ID: <20240513083646.166283-1-poulhies@adacore.com> X-Mailer: git-send-email 2.43.2 MIME-Version: 1.0 X-Spam-Status: No, score=-13.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org 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 Recent change for attribute Object_Size caused spurious errors when restriction No_Implementation_Attributes is active and attribute Object_Size is introduced by expansion of dispatching operations. Temporarily revert that change for a further investigation. gcc/ada/ * sem_attr.adb (Attribute_22): Remove Put_Image and Object_Size. * sem_attr.ads (Attribute_Imp_Def): Restore Object_Size. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_attr.adb | 4 +--- gcc/ada/sem_attr.ads | 11 +++++++++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb index b979ffdf0b1..65442d45a85 100644 --- a/gcc/ada/sem_attr.adb +++ b/gcc/ada/sem_attr.adb @@ -181,9 +181,7 @@ package body Sem_Attr is (Attribute_Enum_Rep | Attribute_Enum_Val | Attribute_Index | - Attribute_Object_Size | - Attribute_Preelaborable_Initialization | - Attribute_Put_Image => True, + Attribute_Preelaborable_Initialization => True, others => False); -- The following array contains all attributes that imply a modification diff --git a/gcc/ada/sem_attr.ads b/gcc/ada/sem_attr.ads index 65b7b534711..4c9f27043c6 100644 --- a/gcc/ada/sem_attr.ads +++ b/gcc/ada/sem_attr.ads @@ -373,6 +373,17 @@ package Sem_Attr is -- other composite object passed by reference, there is no other way -- of specifying that a zero address should be passed. + ----------------- + -- Object_Size -- + ----------------- + + Attribute_Object_Size => True, + -- Type'Object_Size is the same as Type'Size for all types except + -- fixed-point types and discrete types. For fixed-point types and + -- discrete types, this attribute gives the size used for default + -- allocation of objects and components of the size. See section in + -- Einfo ("Handling of Type'Size values") for further details. + ------------------------- -- Passed_By_Reference -- -------------------------