From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id AUPKDVFa+Gk29REAWB0awg (envelope-from ) for ; Mon, 04 May 2026 04:35:29 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=GShIkbwW; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 27C021E0BA; Mon, 04 May 2026 04:35:29 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 993821E093 for ; Mon, 04 May 2026 04:35:27 -0400 (EDT) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 5B53F4BAE7DA for ; Mon, 4 May 2026 08:35:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5B53F4BAE7DA Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=GShIkbwW Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) by sourceware.org (Postfix) with ESMTPS id 2122A4BAE7D8 for ; Mon, 4 May 2026 08:34:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2122A4BAE7D8 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=intel.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 2122A4BAE7D8 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=192.198.163.17 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777883689; cv=none; b=k7UjALiCUuQSeQSW+irsjEIFaqg7M5pRcoSvxEGcXdT9Yg7Fnl9APLYaZZtR1yLXaIAfw0C+/oYpZHAyiq9wVXx/e8Cd82rTtPn6HqNlgP1JsuTE0x3sLTauZiHI8wQjZSGekIndqyYKx2ibgM4bnFMcPIE7G6z8CifElgZcDnc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777883689; c=relaxed/simple; bh=ze18yvSgKEdXiOFDIqz26WffP7IWSgO7qLlk+pAMnTo=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=T0f1Q6Or9Z6SlIJPIF+X+Mxs2m45c7RWMJTUlU0v3wZEZR4jFWOYAEfKEsyB9OcfxOXX72iEnN42buc6naxAiDCs5+cCm4aG/Ztptv7w9JwccQutgTmvYu5SJ4WUAcEJ6JfTQ6VBhRiaFFpolBzRjgmIxAofY1LcXHJX/DMbsTs= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2122A4BAE7D8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1777883689; x=1809419689; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=ze18yvSgKEdXiOFDIqz26WffP7IWSgO7qLlk+pAMnTo=; b=GShIkbwWa+bMXpuivczyL6+24PhFgRXJ1+RzFRq6w2JVoA2DmgP8oSds xLI9C7j2cJlZOWhEnpkJligXrmwhEzthA8lPFe24S+wqgJc7ES2cVdqtr d7GGp78Xq/NeCwjrIrHlxE5z7q6S2pS0Rwun7WW0WjmgTED26E68N4mVX LeRUUgH+tSatvdbFE5A8m3YcMeRQxfkq85TTRr3TzP3qGl0pxEiFON706 d/JC3wvqFY9+0lVNDyWcJ61RvjJTmPMTzMtoad+T8VIqA63Jnt1+3ixxj vSiPJZSGIn1zKD6/M/9aZqR/hAuOQp6ugJSCKDg9bu63tnKqw1w51v0i0 w==; X-CSE-ConnectionGUID: 9UoL2mWeS3KdQ/ZRjWXCbw== X-CSE-MsgGUID: mjeQNyulRXizNvY5d23ADQ== X-IronPort-AV: E=McAfee;i="6800,10657,11775"; a="78600644" X-IronPort-AV: E=Sophos;i="6.23,215,1770624000"; d="scan'208";a="78600644" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 May 2026 01:34:47 -0700 X-CSE-ConnectionGUID: m6J+hOuYRtqdDDjRAXPrWw== X-CSE-MsgGUID: DObnXM0YTg+w7VEvbXC2VA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.23,215,1770624000"; d="scan'208";a="234435155" Received: from soc-5cg53737g3.clients.intel.com (HELO localhost) ([172.28.226.46]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 May 2026 01:34:46 -0700 From: Abdul Basit Ijaz To: gdb-patches@sourceware.org Cc: abdul.b.ijaz@intel.com, tom@tromey.com Subject: [PATCH v2 0/1] gdb/dwarf: Use the function scope for DW_TAG_imported_declaration Date: Mon, 4 May 2026 10:34:39 +0200 Message-Id: <20260504083440.387223-1-abdul.b.ijaz@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org All Fortran imported variable aliases (`use module, alias => var`) were being added to "global scope", regardless of whether they appeared in: - Program/module scope (should be global) - Function scope (should be local) This caused conflicts when different functions had the same alias name pointing to different variables. This patch modifies the case for DW_TAG_imported_declaration in the function new_symbol () to use cu->list_in_scope instead of global symbols for all languages. This ensures that function-scoped aliases use the current scope rather than being forced into the global scope. Changes since V1: - Fixes the feedback from Tom: https://sourceware.org/pipermail/gdb-patches/2026-May/227098.html Thanks & Best Regards, Abdul Basit Abdul Basit Ijaz (1): gdb/dwarf: Use the function scope for DW_TAG_imported_declaration gdb/dwarf2/read.c | 10 +++ .../gdb.fortran/module_declarations.exp | 62 +++++++++++++++++++ .../gdb.fortran/module_declarations.f90 | 59 ++++++++++++++++++ 3 files changed, 131 insertions(+) create mode 100644 gdb/testsuite/gdb.fortran/module_declarations.exp create mode 100644 gdb/testsuite/gdb.fortran/module_declarations.f90 -- 2.34.1 Intel Deutschland GmbH Registered Address: Dornacher Strasse 1, 85622 Feldkirchen, Germany Tel: +49 89 991 430, www.intel.de Managing Directors: Harry Demas, Jeffrey Schneiderman, Yin Chong Sorrell Chairperson of the Supervisory Board: Nicole Lau Registered Seat: Munich Commercial Register: Amtsgericht Muenchen HRB 186928