Message ID | 20241025091107.485741-35-poulhies@adacore.com |
---|---|
State | Committed |
Commit | 7124671cadc5a9f21bb9332b5fd68d29fdcdef52 |
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 server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2DC7A3858435 for <patchwork@sourceware.org>; Fri, 25 Oct 2024 09:21:45 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) by sourceware.org (Postfix) with ESMTPS id 8E4C9385842C for <gcc-patches@gcc.gnu.org>; Fri, 25 Oct 2024 09:12:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8E4C9385842C 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 8E4C9385842C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::42b ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1729847543; cv=none; b=n0TJIy1kMq1H6sX0psfAH3Ycgq/6V4XhOF2TXajgi5xWIL7smRxUtUN7Muq39ViDFuZNnrGN0zP+wJqNIyLkCzWt/0RagBfTX0ROwda4gn2A8azxzvWc59Os0O7PT9hkS/oAzGnsezS6rbUs2tqEW8RdDMKs2r7H3RLF2YXGXKQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1729847543; c=relaxed/simple; bh=971XCbHvWjtrfo5cLny6PNnULYu3GGrDGhFez+hlens=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=mDjZo/bkrgGSCzQGYwRkeBAQLnT/aTmPPuiuZ+jlzoyLhAWn2ox83J2+9mpFDBdP6qDGY7ueyHm5ZpYfRprLQMNHDRpAk+F1ynTOu5sXXHs0eNA7wSXVmW1pEyK/yDuVei8bJZYTPONAEsLqzv7KKrfFQ9tIfKGpBQAl8JXv+/Y= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-37d70df0b1aso1410002f8f.3 for <gcc-patches@gcc.gnu.org>; Fri, 25 Oct 2024 02:12:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1729847519; x=1730452319; 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=KMLCN5zgcI7peRq/R9+SVM89OrqR/nHEu4M0FGHpWcY=; b=hLu2CRhMOZ/8NC7akQ5e/SUZQwXcSsBiIT72wyUn+OuoWM8RCvdW8Ser2mdQX+fKoZ 7vMg7MJfU8M/NvIPFRhVdp0W6nwjh+vb4wwHovVDQFojB8xCRj13r46yu3p8oNWlA9OO 29aynRQCZlAXaqDbmRBkxQVdk/HnO51+TtXW6pz1zpwsXJ6jXaMeFWvLjA0gDsq3w7GG 2ysEjo1GUROsb77XCdcRF4VSzTFLrydV5dLHA2C3VMyxEurKeba1AlhPdL8om5JJ9Vy0 CI8VQkCeMOfSXqSnzeW++iFOx7mzEMRVJMNhIrjD8DdV3TztwB3LoodJXzLaRm6e0B4F yaEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729847519; x=1730452319; 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=KMLCN5zgcI7peRq/R9+SVM89OrqR/nHEu4M0FGHpWcY=; b=OI2aZjarCFR18mrmUXYKW1SpoxFFzJZ5p+8yTieJb1Y9tPUt1xIMPwx1dI8sD6Nd2X o5SegC4ytUTBguTtu+ROcL0dzB4C6niGseDSA86kaaHcMCzkCW5w4HGuu5wDB47csnYR z8c206CfWF5FqIVvB5cy16NT+mvy1wGeJnqQwtQrkU97m77YLxzQCfixr9B3oawbXq0f SGlxE3ea7j1u38Ah6S9PiJlFYP2KXsVFWO6MLnWkP8oGeXcBqI8PiAg20vh7D/KbdlAk hiat3tbDlsAKw++YEVMLlm5GDldFFR2Ax8BShHoLMqTJZj3GDiEBY4XF+orHsZy9FwNI Kvkw== X-Gm-Message-State: AOJu0Yy9eoV2BIWzKCJwaHMSoWVx+KM4VJOFvdj3/JoT+lYeFhFzK83Z FK5pfku8jmX+AZDltjU1psJtui42BYTb02NS4iSzouZXQwPRh5RjtW1Sa8q5zkz8Xkk0AKQZX0Y = X-Google-Smtp-Source: AGHT+IFgB8iheHgJQWKtsqI5aAJT2VIvwf7AMLlV09kGWt6HG7DIlvItnfNnpSYeqYxqOCCMJqYpYQ== X-Received: by 2002:a5d:69ce:0:b0:37d:51f8:46fd with SMTP id ffacd0b85a97d-38045868bf7mr3457865f8f.22.1729847519178; Fri, 25 Oct 2024 02:11:59 -0700 (PDT) Received: from localhost.localdomain ([2001:861:3382:1a90:2626:b78c:6271:6c01]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38058b47aa8sm1013079f8f.51.2024.10.25.02.11.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2024 02:11:58 -0700 (PDT) From: =?utf-8?q?Marc_Poulhi=C3=A8s?= <poulhies@adacore.com> To: gcc-patches@gcc.gnu.org Cc: Tom Tromey <tromey@adacore.com> Subject: [COMMITTED 35/35] ada: Change scope of XUB type Date: Fri, 25 Oct 2024 11:11:04 +0200 Message-ID: <20241025091107.485741-35-poulhies@adacore.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241025091107.485741-1-poulhies@adacore.com> References: <20241025091107.485741-1-poulhies@adacore.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-13.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP 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 <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/35] ada: Pass parameters of full access unconstrained array types by copy in calls
|
|
Checks
Context | Check | Description |
---|---|---|
linaro-tcwg-bot/tcwg_gcc_build--master-arm | fail | Patch failed to apply |
linaro-tcwg-bot/tcwg_gcc_build--master-aarch64 | fail | Patch failed to apply |
Commit Message
Marc Poulhiès
Oct. 25, 2024, 9:11 a.m. UTC
From: Tom Tromey <tromey@adacore.com>
An earlier patch in the "nameless" series caused a regression with
-fgnat-encodings=all. Previously, all artificial types were emitted
in the CU scope in the DWARF, but with the patch, an "XUB" type is
emitted in the function scope. This causes gdb lookups to erroneously
find the XUB type rather than the type that gdb expects to find.
Note that I don't know why the earlier code worked, because decl.cc
clearly sets the XUB type's context to be the current function.
This patch changes the type's context so that it is nested in a type
that is conveniently available.
gcc/ada/ChangeLog:
* gcc-interface/decl.cc (gnat_to_gnu_entity): Use gnu_fat_type as the type
context for a XUB type.
Tested on x86_64-pc-linux-gnu, committed on master.
---
gcc/ada/gcc-interface/decl.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/ada/gcc-interface/decl.cc b/gcc/ada/gcc-interface/decl.cc index 372d72a18b6..3404b747ddf 100644 --- a/gcc/ada/gcc-interface/decl.cc +++ b/gcc/ada/gcc-interface/decl.cc @@ -2401,7 +2401,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, bool definition) = chainon (gnu_template_fields, gnu_temp_fields[index]); finish_record_type (gnu_template_type, gnu_template_fields, 0, debug_info_p); - TYPE_CONTEXT (gnu_template_type) = current_function_decl; + TYPE_CONTEXT (gnu_template_type) = gnu_fat_type; /* If Component_Size is not already specified, annotate it with the size of the component. */