From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id uEwfOzx3emIAdAUAWB0awg (envelope-from ) for ; Tue, 10 May 2022 10:31:24 -0400 Received: by simark.ca (Postfix, from userid 112) id ED90B1E21F; Tue, 10 May 2022 10:31:24 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=UCbiLw84; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from 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 RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 70B941E01D for ; Tue, 10 May 2022 10:31:24 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E6995395446A for ; Tue, 10 May 2022 14:31:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E6995395446A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1652193083; bh=gKslyI80kPsiWhZvbo+QZfN+OR+wn44fi/ufBJRsbiQ=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=UCbiLw84UtPnWFl8eUDTFQeKUpgHtAr7m/xBDV+hqt32KHItcER+BFhVGgAQv/JmM 5fmqKqxEHaf74HSO5yXaLnReDRTq6YvKPwpyElMzxFS/du3FP5loj9EVq17ucwKHYg S43OqhkdSCG9yYrudIfFziXXoYvcD+M/byA15YCg= Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by sourceware.org (Postfix) with ESMTPS id DD4E33954406 for ; Tue, 10 May 2022 14:25:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DD4E33954406 X-IronPort-AV: E=McAfee;i="6400,9594,10342"; a="268227717" X-IronPort-AV: E=Sophos;i="5.91,214,1647327600"; d="scan'208";a="268227717" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2022 07:25:46 -0700 X-IronPort-AV: E=Sophos;i="5.91,214,1647327600"; d="scan'208";a="669902829" Received: from labpcdell3650-003.iul.intel.com (HELO localhost) ([172.28.49.87]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2022 07:25:45 -0700 To: gdb-patches@sourceware.org Subject: [PATCH 13/18] testsuite, fortran: fix info-types for intel compilers Date: Tue, 10 May 2022 16:24:32 +0200 Message-Id: <20220510142437.1397399-14-nils-christian.kempke@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220510142437.1397399-1-nils-christian.kempke@intel.com> References: <20220510142437.1397399-1-nils-christian.kempke@intel.com> 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.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Nils-Christian Kempke via Gdb-patches Reply-To: Nils-Christian Kempke Cc: JiniSusan.George@amd.com, aburgess@redhat.com Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" First, the emitted symbol character*1 which is checked in the test is not even referenced as a type in the compiled examples. It seems to be a gfortran specific check for some type that gets emitted always. I changed the test to use check_optional_entry here to allow the symbol's absence. Second, the line checked for s1 was hardcoded in the test. Given that the type is actually defined on line 41 (which is what is emitted by ifx) it even seems wrong. I changed the line check for s1 to actually check for 41 and a gfortran bug has been filed here https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105454 The test is now marked as xfail for gfortran. Third, the test was checking for s1 to be emitted by info types. This would mean that the type is put into compilation unit scope in the DWARF but, as it is local to the main program this is actually not expected and gfortran specific. Since I already added the xfail for gfortran here, I opted to also make this check gfortran specific. --- gdb/testsuite/gdb.fortran/info-types.exp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/gdb/testsuite/gdb.fortran/info-types.exp b/gdb/testsuite/gdb.fortran/info-types.exp index 67fe4d79c5..06770aada1 100644 --- a/gdb/testsuite/gdb.fortran/info-types.exp +++ b/gdb/testsuite/gdb.fortran/info-types.exp @@ -41,12 +41,16 @@ set real4 [fortran_real4] GDBInfoSymbols::run_command "info types" GDBInfoSymbols::check_header "All defined types:" -GDBInfoSymbols::check_entry "${srcfile}" "" "${character1}" +GDBInfoSymbols::check_optional_entry "${srcfile}" "" "${character1}" GDBInfoSymbols::check_entry "${srcfile}" "" "${integer4}" GDBInfoSymbols::check_entry "${srcfile}" "" "${logical4}" GDBInfoSymbols::check_entry "${srcfile}" "$decimal" "Type m1t1;" GDBInfoSymbols::check_entry "${srcfile}" "" "${real4}" -GDBInfoSymbols::check_entry "${srcfile}" "37" "Type s1;" + +if { [test_compiler_info {gfortran-*} f90] } { + setup_xfail *-*-* gcc/105454 + GDBInfoSymbols::check_entry "${srcfile}" "41" "Type s1;" +} return 0 @@ -62,5 +66,5 @@ gdb_test "info types" \ "(35:\[\t \]+Type __vtype_mod1_M1t1;" \ ")?$decimal:\[\t \]+Type m1t1;" \ "\[\t \]+${real4}" \ - "37:\[\t \]+Type s1;(" \ + "41:\[\t \]+Type s1;(" \ ".*)?"] -- 2.25.1 Intel Deutschland GmbH Registered Address: Am Campeon 10, 85579 Neubiberg, Germany Tel: +49 89 99 8853-0, www.intel.de Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva Chairperson of the Supervisory Board: Nicole Lau Registered Office: Munich Commercial Register: Amtsgericht Muenchen HRB 186928