From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7876) id EFC9D395A025; Tue, 31 May 2022 14:45:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EFC9D395A025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Nils-Christian Kempke To: gdb-cvs@sourceware.org Subject: [binutils-gdb] testsuite, fortran: add compiler dependent types to dynamic-ptype-whatis X-Act-Checkin: binutils-gdb X-Git-Author: Nils-Christian Kempke X-Git-Refname: refs/heads/master X-Git-Oldrev: 93bbd6c793f028afde22d6a6ad52edd812be8160 X-Git-Newrev: 15868bc88317eac5c8995d3208f939a79d352561 Message-Id: <20220531144553.EFC9D395A025@sourceware.org> Date: Tue, 31 May 2022 14:45:53 +0000 (GMT) X-BeenThere: gdb-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 May 2022 14:45:54 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D15868bc88317= eac5c8995d3208f939a79d352561 commit 15868bc88317eac5c8995d3208f939a79d352561 Author: Nils-Christian Kempke Date: Tue May 31 16:43:44 2022 +0200 testsuite, fortran: add compiler dependent types to dynamic-ptype-whatis =20 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. Diff: --- gdb/testsuite/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/tests= uite/gdb.fortran/dynamic-ptype-whatis.exp index 7367b1d46b8..f0463f4f62b 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" =20 -gdb_test "whatis var1" "type =3D real\\(kind=3D4\\) \\(3\\)" -gdb_test "whatis var2" "type =3D real\\(kind=3D4\\), allocatable \\(4\\)" +set real4 [fortran_real4] +set int4 [fortran_int4] + +gdb_test "whatis var1" "type =3D ${real4} \\(3\\)" +gdb_test "whatis var2" "type =3D ${real4}, allocatable \\(4\\)" gdb_test "whatis var3" "type =3D Type type1" gdb_test "whatis var4" "type =3D Type type2" gdb_test "whatis var5" "type =3D Type type3" gdb_test "whatis var6" "type =3D Type type4" gdb_test "whatis var7" "type =3D Type type5" -gdb_test "ptype var1" "type =3D real\\(kind=3D4\\) \\(3\\)" -gdb_test "ptype var2" "type =3D real\\(kind=3D4\\), allocatable \\(4\\)" +gdb_test "ptype var1" "type =3D ${real4} \\(3\\)" +gdb_test "ptype var2" "type =3D ${real4}, allocatable \\(4\\)" gdb_test "ptype var3" \ [ multi_line "type =3D Type type1" \ - " integer\\(kind=3D4\\) :: spacer" \ - " integer\\(kind=3D4\\) :: t1_i" \ + " ${int4} :: spacer" \ + " ${int4} :: t1_i" \ "End Type type1" ] gdb_test "ptype var4" \ [multi_line "type =3D Type type2" \ - " integer\\(kind=3D4\\) :: spacer" \ + " ${int4} :: spacer" \ " Type type1, allocatable :: t2_array\\(3\\)" \ "End Type type2"] gdb_test "ptype var5" \ [ multi_line "type =3D Type type3" \ - " integer\\(kind=3D4\\) :: spacer" \ + " ${int4} :: spacer" \ " Type type1 :: t3_array\\(3\\)"\ "End Type type3" ] gdb_test "ptype var6" \ [ multi_line "type =3D Type type4" \ - " integer\\(kind=3D4\\) :: spacer" \ + " ${int4} :: spacer" \ " Type type2, allocatable :: t4_array\\(3\\)" \ "End Type type4" ] gdb_test "ptype var7" \ [ multi_line "type =3D Type type5" \ - " integer\\(kind=3D4\\) :: spacer" \ + " ${int4} :: spacer" \ " Type type2 :: t5_array\\(4\\)" \ "End Type type5" ] -gdb_test "whatis var3%t1_i" "type =3D integer\\(kind=3D4\\)" +gdb_test "whatis var3%t1_i" "type =3D ${int4}" gdb_test "whatis var4%t2_array" "type =3D Type type1, allocatable \\(3\\)" gdb_test "whatis var5%t3_array" "type =3D Type type1 \\(3\\)" gdb_test "whatis var6%t4_array" "type =3D Type type2, allocatable \\(3\\)" gdb_test "whatis var7%t5_array" "type =3D Type type2 \\(4\\)" -gdb_test "ptype var3%t1_i" "type =3D integer\\(kind=3D4\\)" +gdb_test "ptype var3%t1_i" "type =3D ${int4}" gdb_test "ptype var4%t2_array" [ multi_line "type =3D Type type1" \ - " integer\\(kind=3D4\\) :: spacer" \ - " integer\\(kind=3D4\\) :: t1_i" \ + " ${int4} :: spacer" \ + " ${int4} :: t1_i" \ "End Type type1, allocatable \\(3\\)" ] gdb_test "ptype var5%t3_array" [ multi_line "type =3D Type type1" \ - " integer\\(kind=3D4\\) :: spacer" \ - " integer\\(kind=3D4\\) :: t1_i" \ + " ${int4} :: spacer" \ + " ${int4} :: t1_i" \ "End Type type1 \\(3\\)" ] gdb_test "ptype var6%t4_array" \ [ multi_line "type =3D Type type2" \ - " integer\\(kind=3D4\\) :: spacer" \ + " ${int4} :: spacer" \ " Type type1, allocatable :: t2_array\\(:\\)" \ "End Type type2, allocatable \\(3\\)" ] gdb_test "ptype var7%t5_array" \ [ multi_line "type =3D Type type2" \ - " integer\\(kind=3D4\\) :: spacer" \ + " ${int4} :: spacer" \ " Type type1, allocatable :: t2_array\\(:\\)" \ "End Type type2 \\(4\\)" ] gdb_test "whatis var4%t2_array(1)" "type =3D Type type1" @@ -98,41 +101,41 @@ gdb_test "whatis var6%t4_array(1)" "type =3D Type type= 2" gdb_test "whatis var7%t5_array(1)" "type =3D Type type2" gdb_test "ptype var4%t2_array(1)" \ [ multi_line "type =3D Type type1" \ - " integer\\(kind=3D4\\) :: spacer" \ - " integer\\(kind=3D4\\) :: t1_i" \ + " ${int4} :: spacer" \ + " ${int4} :: t1_i" \ "End Type type1" ] gdb_test "ptype var5%t3_array(1)" \ [ multi_line "type =3D Type type1" \ - " integer\\(kind=3D4\\) :: spacer" \ - " integer\\(kind=3D4\\) :: t1_i" \ + " ${int4} :: spacer" \ + " ${int4} :: t1_i" \ "End Type type1" ] gdb_test "ptype var6%t4_array(1)" \ [ multi_line "type =3D Type type2" \ - " integer\\(kind=3D4\\) :: spacer" \ + " ${int4} :: spacer" \ " Type type1, allocatable :: t2_array\\(2\\)" \ "End Type type2" ] gdb_test "ptype var7%t5_array(1)" \ [ multi_line "type =3D Type type2" \ - " integer\\(kind=3D4\\) :: spacer" \ + " ${int4} :: spacer" \ " Type type1, allocatable :: t2_array\\(2\\)" \ "End Type type2" ] -gdb_test "whatis var4%t2_array(1)%t1_i" "type =3D integer\\(kind=3D4\\)" -gdb_test "whatis var5%t3_array(1)%t1_i" "type =3D integer\\(kind=3D4\\)" +gdb_test "whatis var4%t2_array(1)%t1_i" "type =3D ${int4}" +gdb_test "whatis var5%t3_array(1)%t1_i" "type =3D ${int4}" gdb_test "whatis var6%t4_array(1)%t2_array" \ "type =3D Type type1, allocatable \\(2\\)" gdb_test "whatis var7%t5_array(1)%t2_array" \ "type =3D Type type1, allocatable \\(2\\)" -gdb_test "ptype var4%t2_array(1)%t1_i" "type =3D integer\\(kind=3D4\\)" -gdb_test "ptype var5%t3_array(1)%t1_i" "type =3D integer\\(kind=3D4\\)" +gdb_test "ptype var4%t2_array(1)%t1_i" "type =3D ${int4}" +gdb_test "ptype var5%t3_array(1)%t1_i" "type =3D ${int4}" gdb_test "ptype var6%t4_array(1)%t2_array" \ [ multi_line "type =3D Type type1" \ - " integer\\(kind=3D4\\) :: spacer" \ - " integer\\(kind=3D4\\) :: t1_i" \ + " ${int4} :: spacer" \ + " ${int4} :: t1_i" \ "End Type type1, allocatable \\(2\\)" ] gdb_test "ptype var7%t5_array(1)%t2_array" \ [ multi_line "type =3D Type type1" \ - " integer\\(kind=3D4\\) :: spacer" \ - " integer\\(kind=3D4\\) :: t1_i" \ + " ${int4} :: spacer" \ + " ${int4} :: t1_i" \ "End Type type1, allocatable \\(2\\)" ] gdb_test "whatis var6%t4_array(1)%t2_array(1)" \ "type =3D 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 =3D Type type1" \ - " integer\\(kind=3D4\\) :: spacer" \ - " integer\\(kind=3D4\\) :: t1_i" \ + " ${int4} :: spacer" \ + " ${int4} :: t1_i" \ "End Type type1" ] gdb_test "ptype var7%t5_array(1)%t2_array(1)" \ [ multi_line \ "type =3D Type type1" \ - " integer\\(kind=3D4\\) :: spacer" \ - " integer\\(kind=3D4\\) :: t1_i" \ + " ${int4} :: spacer" \ + " ${int4} :: t1_i" \ "End Type type1" ] gdb_test "ptype var8%ptr_1%t2_array" \ [ multi_line \ "type =3D Type type1" \ - " integer\\(kind=3D4\\) :: spacer" \ - " integer\\(kind=3D4\\) :: t1_i" \ + " ${int4} :: spacer" \ + " ${int4} :: t1_i" \ "End Type type1, allocatable \\(3\\)" ]