[COMMITTED,32/51] ada: Linker_Section not inherited by object from unconstrained parent subtype
| Message ID | 20260602084541.3829876-32-poulhies@adacore.com |
|---|---|
| State | Committed |
| Commit | 280e68a6d3fd5045e6c1b1f6937f00c81333a307 |
| Headers |
Return-Path: <gcc-patches-bounces~patchwork=sourceware.org@gcc.gnu.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id F341C4BA2E2F for <patchwork@sourceware.org>; Tue, 2 Jun 2026 09:21:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F341C4BA2E2F Authentication-Results: sourceware.org; dkim=pass (2048-bit key, secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=g+UMXAv/ X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) by sourceware.org (Postfix) with ESMTPS id DA8064BA23EB for <gcc-patches@gcc.gnu.org>; Tue, 2 Jun 2026 08:46:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DA8064BA23EB 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 DA8064BA23EB Authentication-Results: sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::32b ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1780389984; cv=none; b=pj9ZcUZPpgomNsPnbsq3oDCMqKFnhwrG6BBPIc1ZREQx1T3U2kslqPBn2yiTP/qkDfk1D1/oNBoZyaVHsklHZ1pIVd1vsskReVs6kKfVT4pn20m/bDxDHun5MeeGxKdaFVIS3Ys0Xvp1TMrDEqT6x6MHITJP9GcfCihMIMW8cWY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1780389984; c=relaxed/simple; bh=hpSMTUIDsp6mDp4obHkV0i2F4J67bNoNK6BrxYmc/kk=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=nxQO1sPk6PKxaavXoQHiScgqKkk4RSD4XZHQf6KfvcgNTDME11Vj+irjlIOiWywnfDdmF9MHU3v2iIXPRzhNij0L2aHPK3eHPKcj23IyqqMZZioKf2B0mXq1gN2QnThsMeTTUVoHIPUW04kLZGYAJcrgvwAYWBomC4Xdg8GwP70= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (2048-bit key, secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=g+UMXAv/ DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DA8064BA23EB Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-490a765d410so25328765e9.1 for <gcc-patches@gcc.gnu.org>; Tue, 02 Jun 2026 01:46:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1780389983; x=1780994783; 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=QtXononjuNc3UPG3Mw2aCAAZvMGZRXcbs2fVVnEwgPY=; b=g+UMXAv/dh+x3ez422TnSduzwkBOqc8oSlOIeQ2J0TNCS9XyZvCyMHJaNc2ZwrqpPR bwPCK9kIhbYQx/P+lp+QQPhWFYZb1PAtp1Uh/KVKerMyZvT621bmZoc1Zaqs81IFUuXw YqwTdE9mdtYdBTBHNOUn+svz5tECSByAPe6sHraQuDJtZu1QKLrlcBrmhFiig/vEhySn CKU+v5pldoQbdfqrWSRBRDsxi+7FCNWFGFstf/t+k7Ps67YTCYiTLU9qtokfKW9dk4KB FF8AQ3UtYv35EpdBzdfn71PgxMAhV/soBpzMHdON4nmIZxxf6S1jTwAJ/My7zDuYZakA sxqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780389983; x=1780994783; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=QtXononjuNc3UPG3Mw2aCAAZvMGZRXcbs2fVVnEwgPY=; b=Y/ol6gvbSXrqihZTkqTpWJobpuiJYpMCYt3kTsUJdu1lcQX5UNUXqARRN+lcAeUgPV Avbq50puwlkqGy3Z3QABdkKKm3OlJoCrFZ4eb9ra3x51ivXXOyv7TsFZSt8GlAKhy/oA ZlRdnfoKBNEM+qTQKGpvoyHxHI0gbV27KlEM9npD2xUCOf5QzCfgaPBj856O8xGAcV50 MDixhnFKg3EH7A5JcJvfddOvSbSNFXojl5wn2FrnW4mHOsBQIzXMhyb1RLcyc4kLbcxX /uT37sW4LK35IAQWogMFNMEedCmvd/MdbDspK4I4M4A+4iAG1ootrG+zJwjZWKvmQ+d9 m1DA== X-Gm-Message-State: AOJu0YxKqsAn8Jpl/34ni//A6ZCNFYx5XRO1phqmgbg+Suz6xi3Yq0ll Xg4LTOZYOACB/PJDqG4b5ehBdQ61mAVXKrmoxgCycMZflQFYJK4nF/sfT+QT3UJZZJg+mVX+Bkj G5kk= X-Gm-Gg: Acq92OEYm8dTEjOWUiuYvWx+UQSq13GDU6+PfJ2qipP6xiOyCeKw2U30bg9ZBlBDIyI ICvh9sDsV4qqVDE73+47ZnFpLWPqaPK7M3SEOLlojDNe1VHAVu17jWA19JTLNSnt2eQxIzOAT7Y Dy7eQnMhP9c1IRbnuxHI0ILAd6YU9WYBNppDvGowRZJkOQaaopq403y5AWSqjZRgdo0xgu3EtdD ikhFeZNV3/4bRmlbj7ycQF4BDZAPkerEDBiELD+WU+qncVZPbCkz3jrOOdfKKuSwe03OOuL+NTo s6rxmWlrnkUZwAY/GKyvxwsK9t40JCZuTXc3o0EeYY9wQaCQtEAZyYI3xG42ZOcc2g3GGNB6uF2 200+UUWz0FkqSnQusbfXZfODDSQ4lZultio7Fska1SoEIo6Y0Dl0beikD0v/93ZobHKdTqfBGfF 7npOUuhAEdao3HEWizNLFZJlLUQyXCfXBuDwpza0PH9rn9huftvQYlAmrU+2egWqlt4r62rfzlD 542w5KW+ST4e6zRSfA4FkIBxkl6jkV1U3hIHgb9Eg== X-Received: by 2002:a05:600c:6091:b0:490:6237:521b with SMTP id 5b1f17b1804b1-490a2b6b21cmr272621655e9.27.1780389982590; Tue, 02 Jun 2026 01:46:22 -0700 (PDT) Received: from mecano.telnowedge.local (lmontsouris-659-1-24-67.w81-250.abo.wanadoo.fr. [81.250.175.67]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-490ab55d39csm33907625e9.35.2026.06.02.01.46.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jun 2026 01:46:22 -0700 (PDT) From: =?utf-8?q?Marc_Poulhi=C3=A8s?= <poulhies@adacore.com> To: gcc-patches@gcc.gnu.org Cc: Gary Dismukes <dismukes@adacore.com> Subject: [COMMITTED 32/51] ada: Linker_Section not inherited by object from unconstrained parent subtype Date: Tue, 2 Jun 2026 10:45:20 +0200 Message-ID: <20260602084541.3829876-32-poulhies@adacore.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260602084541.3829876-1-poulhies@adacore.com> References: <20260602084541.3829876-1-poulhies@adacore.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-13.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_BLOCKED, RCVD_IN_PBL, SPF_HELO_NONE, SPF_PASS, TXREP shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces~patchwork=sourceware.org@gcc.gnu.org |
| Series |
[COMMITTED,01/51] ada: Rename Private_Component function
|
|
Commit Message
Marc Poulhiès
June 2, 2026, 8:45 a.m. UTC
From: Gary Dismukes <dismukes@adacore.com>
In the case of an object_declaration with a subtype_indication
whose subtype_mark denotes an unconstrained parent subtype (like
"type Unconstrained_String is new String") that itself specifies
the Linker_Section aspect or pragma, the object is not being inherited
from the type like it should be, and so will not be allocated in
the section specified by the aspect or pragma.
gcc/ada/ChangeLog:
* sem_ch3.adb (Copy_Parent_Attributes): Inherit Linker_Section_Pragma.
Tested on x86_64-pc-linux-gnu, committed on master.
---
gcc/ada/sem_ch3.adb | 2 ++
1 file changed, 2 insertions(+)
diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index 1f8d86eb631..e07d24c1565 100644 --- a/gcc/ada/sem_ch3.adb +++ b/gcc/ada/sem_ch3.adb @@ -5800,6 +5800,8 @@ package body Sem_Ch3 is Set_Treat_As_Volatile (Id, Treat_As_Volatile (T)); Set_Is_Generic_Type (Id, Is_Generic_Type (Base_Type (T))); Set_Convention (Id, Convention (T)); + Set_Linker_Section_Pragma + (Id, Linker_Section_Pragma (Base_Type (T))); end Copy_Parent_Attributes; -- Start of processing for Analyze_Subtype_Declaration