From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id CBe4Hul2emIAdAUAWB0awg (envelope-from ) for ; Tue, 10 May 2022 10:30:01 -0400 Received: by simark.ca (Postfix, from userid 112) id 78FC71E21F; Tue, 10 May 2022 10:30:01 -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=WUiIPAnJ; 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=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (ip-8-43-85-97.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 CB0981E01D for ; Tue, 10 May 2022 10:30:00 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 112E7395444C for ; Tue, 10 May 2022 14:30:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 112E7395444C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1652193000; bh=j+/ncKmhm+7X/MumiEgrqQmteBQVHt223rTuhhWKVjQ=; 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=WUiIPAnJL2PlYyRmbHR9d0R16ytbYymFl1pBrUewChh2GJwB7L6AWsts2a806ay5m F/zoww+FwJonaSSrgqhWEyvFVzjx93n1rNMG3WCPy/8hLgyM5IWhNZ+kcdAIvURtw1 pSY/gPgcfOH4T8MQ169Y+ya90RFKqBwGZ4kfbwrI= Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by sourceware.org (Postfix) with ESMTPS id 0333A3954403 for ; Tue, 10 May 2022 14:25:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0333A3954403 X-IronPort-AV: E=McAfee;i="6400,9594,10342"; a="269523957" X-IronPort-AV: E=Sophos;i="5.91,214,1647327600"; d="scan'208";a="269523957" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2022 07:25:34 -0700 X-IronPort-AV: E=Sophos;i="5.91,214,1647327600"; d="scan'208";a="711043140" Received: from labpcdell3650-003.iul.intel.com (HELO localhost) ([172.28.49.87]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2022 07:25:32 -0700 To: gdb-patches@sourceware.org Subject: [PATCH 10/18] testsuite, fortran: add compiler dependent types to dynamic-ptype-whatis Date: Tue, 10 May 2022 16:24:29 +0200 Message-Id: <20220510142437.1397399-11-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" The test was earlier not using the compiler dependent type print system in fortran.exp. I changed this. It should generally improve the test performance for different compilers. For ifx and gfortran I do not see any failures. --- .../gdb.fortran/dynamic-ptype-whatis.exp | 79 ++++++++++--------- 1 file changed, 41 insertions(+), 38 deletions(-) diff --git a/gdb/testsuite/gdb.fortran/dynamic-ptype-whatis.exp b/gdb/testsuite/gdb.fortran/dynamic-ptype-whatis.exp index 7367b1d46b..f0463f4f62 100644 --- a/gdb/testsuite/gdb.fortran/dynamic-ptype-whatis.exp +++ b/gdb/testsuite/gdb.fortran/dynamic-ptype-whatis.exp @@ -34,62 +34,65 @@ if {![fortran_runto_main]} { gdb_breakpoint [gdb_get_line_number "Break Here"] gdb_continue_to_breakpoint "Break Here" -gdb_test "whatis var1" "type = real\\(kind=4\\) \\(3\\)" -gdb_test "whatis var2" "type = real\\(kind=4\\), allocatable \\(4\\)" +set real4 [fortran_real4] +set int4 [fortran_int4] + +gdb_test "whatis var1" "type = ${real4} \\(3\\)" +gdb_test "whatis var2" "type = ${real4}, allocatable \\(4\\)" gdb_test "whatis var3" "type = Type type1" gdb_test "whatis var4" "type = Type type2" gdb_test "whatis var5" "type = Type type3" gdb_test "whatis var6" "type = Type type4" gdb_test "whatis var7" "type = Type type5" -gdb_test "ptype var1" "type = real\\(kind=4\\) \\(3\\)" -gdb_test "ptype var2" "type = real\\(kind=4\\), allocatable \\(4\\)" +gdb_test "ptype var1" "type = ${real4} \\(3\\)" +gdb_test "ptype var2" "type = ${real4}, allocatable \\(4\\)" gdb_test "ptype var3" \ [ multi_line "type = Type type1" \ - " integer\\(kind=4\\) :: spacer" \ - " integer\\(kind=4\\) :: t1_i" \ + " ${int4} :: spacer" \ + " ${int4} :: t1_i" \ "End Type type1" ] gdb_test "ptype var4" \ [multi_line "type = Type type2" \ - " integer\\(kind=4\\) :: spacer" \ + " ${int4} :: spacer" \ " Type type1, allocatable :: t2_array\\(3\\)" \ "End Type type2"] gdb_test "ptype var5" \ [ multi_line "type = Type type3" \ - " integer\\(kind=4\\) :: spacer" \ + " ${int4} :: spacer" \ " Type type1 :: t3_array\\(3\\)"\ "End Type type3" ] gdb_test "ptype var6" \ [ multi_line "type = Type type4" \ - " integer\\(kind=4\\) :: spacer" \ + " ${int4} :: spacer" \ " Type type2, allocatable :: t4_array\\(3\\)" \ "End Type type4" ] gdb_test "ptype var7" \ [ multi_line "type = Type type5" \ - " integer\\(kind=4\\) :: spacer" \ + " ${int4} :: spacer" \ " Type type2 :: t5_array\\(4\\)" \ "End Type type5" ] -gdb_test "whatis var3%t1_i" "type = integer\\(kind=4\\)" +gdb_test "whatis var3%t1_i" "type = ${int4}" gdb_test "whatis var4%t2_array" "type = Type type1, allocatable \\(3\\)" gdb_test "whatis var5%t3_array" "type = Type type1 \\(3\\)" gdb_test "whatis var6%t4_array" "type = Type type2, allocatable \\(3\\)" gdb_test "whatis var7%t5_array" "type = Type type2 \\(4\\)" -gdb_test "ptype var3%t1_i" "type = integer\\(kind=4\\)" +gdb_test "ptype var3%t1_i" "type = ${int4}" gdb_test "ptype var4%t2_array" [ multi_line "type = Type type1" \ - " integer\\(kind=4\\) :: spacer" \ - " integer\\(kind=4\\) :: t1_i" \ + " ${int4} :: spacer" \ + " ${int4} :: t1_i" \ "End Type type1, allocatable \\(3\\)" ] gdb_test "ptype var5%t3_array" [ multi_line "type = Type type1" \ - " integer\\(kind=4\\) :: spacer" \ - " integer\\(kind=4\\) :: t1_i" \ + " ${int4} :: spacer" \ + " ${int4} :: t1_i" \ "End Type type1 \\(3\\)" ] gdb_test "ptype var6%t4_array" \ [ multi_line "type = Type type2" \ - " integer\\(kind=4\\) :: spacer" \ + " ${int4} :: spacer" \ " Type type1, allocatable :: t2_array\\(:\\)" \ "End Type type2, allocatable \\(3\\)" ] gdb_test "ptype var7%t5_array" \ [ multi_line "type = Type type2" \ - " integer\\(kind=4\\) :: spacer" \ + " ${int4} :: spacer" \ " Type type1, allocatable :: t2_array\\(:\\)" \ "End Type type2 \\(4\\)" ] gdb_test "whatis var4%t2_array(1)" "type = Type type1" @@ -98,41 +101,41 @@ gdb_test "whatis var6%t4_array(1)" "type = Type type2" gdb_test "whatis var7%t5_array(1)" "type = Type type2" gdb_test "ptype var4%t2_array(1)" \ [ multi_line "type = Type type1" \ - " integer\\(kind=4\\) :: spacer" \ - " integer\\(kind=4\\) :: t1_i" \ + " ${int4} :: spacer" \ + " ${int4} :: t1_i" \ "End Type type1" ] gdb_test "ptype var5%t3_array(1)" \ [ multi_line "type = Type type1" \ - " integer\\(kind=4\\) :: spacer" \ - " integer\\(kind=4\\) :: t1_i" \ + " ${int4} :: spacer" \ + " ${int4} :: t1_i" \ "End Type type1" ] gdb_test "ptype var6%t4_array(1)" \ [ multi_line "type = Type type2" \ - " integer\\(kind=4\\) :: spacer" \ + " ${int4} :: spacer" \ " Type type1, allocatable :: t2_array\\(2\\)" \ "End Type type2" ] gdb_test "ptype var7%t5_array(1)" \ [ multi_line "type = Type type2" \ - " integer\\(kind=4\\) :: spacer" \ + " ${int4} :: spacer" \ " Type type1, allocatable :: t2_array\\(2\\)" \ "End Type type2" ] -gdb_test "whatis var4%t2_array(1)%t1_i" "type = integer\\(kind=4\\)" -gdb_test "whatis var5%t3_array(1)%t1_i" "type = integer\\(kind=4\\)" +gdb_test "whatis var4%t2_array(1)%t1_i" "type = ${int4}" +gdb_test "whatis var5%t3_array(1)%t1_i" "type = ${int4}" gdb_test "whatis var6%t4_array(1)%t2_array" \ "type = Type type1, allocatable \\(2\\)" gdb_test "whatis var7%t5_array(1)%t2_array" \ "type = Type type1, allocatable \\(2\\)" -gdb_test "ptype var4%t2_array(1)%t1_i" "type = integer\\(kind=4\\)" -gdb_test "ptype var5%t3_array(1)%t1_i" "type = integer\\(kind=4\\)" +gdb_test "ptype var4%t2_array(1)%t1_i" "type = ${int4}" +gdb_test "ptype var5%t3_array(1)%t1_i" "type = ${int4}" gdb_test "ptype var6%t4_array(1)%t2_array" \ [ multi_line "type = Type type1" \ - " integer\\(kind=4\\) :: spacer" \ - " integer\\(kind=4\\) :: t1_i" \ + " ${int4} :: spacer" \ + " ${int4} :: t1_i" \ "End Type type1, allocatable \\(2\\)" ] gdb_test "ptype var7%t5_array(1)%t2_array" \ [ multi_line "type = Type type1" \ - " integer\\(kind=4\\) :: spacer" \ - " integer\\(kind=4\\) :: t1_i" \ + " ${int4} :: spacer" \ + " ${int4} :: t1_i" \ "End Type type1, allocatable \\(2\\)" ] gdb_test "whatis var6%t4_array(1)%t2_array(1)" \ "type = Type type1" @@ -141,18 +144,18 @@ gdb_test "whatis var7%t5_array(1)%t2_array(1)" \ gdb_test "ptype var6%t4_array(1)%t2_array(1)" \ [ multi_line \ "type = Type type1" \ - " integer\\(kind=4\\) :: spacer" \ - " integer\\(kind=4\\) :: t1_i" \ + " ${int4} :: spacer" \ + " ${int4} :: t1_i" \ "End Type type1" ] gdb_test "ptype var7%t5_array(1)%t2_array(1)" \ [ multi_line \ "type = Type type1" \ - " integer\\(kind=4\\) :: spacer" \ - " integer\\(kind=4\\) :: t1_i" \ + " ${int4} :: spacer" \ + " ${int4} :: t1_i" \ "End Type type1" ] gdb_test "ptype var8%ptr_1%t2_array" \ [ multi_line \ "type = Type type1" \ - " integer\\(kind=4\\) :: spacer" \ - " integer\\(kind=4\\) :: t1_i" \ + " ${int4} :: spacer" \ + " ${int4} :: t1_i" \ "End Type type1, allocatable \\(3\\)" ] -- 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