From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7876) id 70D30395A075; Tue, 31 May 2022 14:46:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 70D30395A075 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] gdb/testsuite: fixup common-block.exp for intel compilers X-Act-Checkin: binutils-gdb X-Git-Author: Nils-Christian Kempke X-Git-Refname: refs/heads/master X-Git-Oldrev: 0df017fbca3070682ffa62a3b302a30e028adfb6 X-Git-Newrev: ebad7c66133526eb9ea9b21dad2df49a65200df0 Message-Id: <20220531144629.70D30395A075@sourceware.org> Date: Tue, 31 May 2022 14:46:29 +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:46:29 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Debad7c661335= 26eb9ea9b21dad2df49a65200df0 commit ebad7c66133526eb9ea9b21dad2df49a65200df0 Author: Nils-Christian Kempke Date: Tue May 31 16:43:45 2022 +0200 gdb/testsuite: fixup common-block.exp for intel compilers =20 The order in which the variables in info common and info locals are displayed is compiler (and dwarf) dependent. While all symbols should be displayed the order is not fixed. =20 I added a gdb_test_multiple that lets ifx and ifort pass in cases where only the order differs. Diff: --- gdb/testsuite/gdb.fortran/common-block.exp | 38 ++++++++++++++++++++++++++= +--- 1 file changed, 35 insertions(+), 3 deletions(-) diff --git a/gdb/testsuite/gdb.fortran/common-block.exp b/gdb/testsuite/gdb= .fortran/common-block.exp index e6555f536dd..e8d7c222134 100644 --- a/gdb/testsuite/gdb.fortran/common-block.exp +++ b/gdb/testsuite/gdb.fortran/common-block.exp @@ -54,8 +54,27 @@ gdb_test "whatis fo_o$suffix" "No symbol \"fo_o$suffix\"= in current context." gdb_test "ptype fo_o$suffix" "No symbol \"fo_o$suffix\" in current context= ." gdb_test "p fo_o$suffix" "No symbol \"fo_o$suffix\" in current context." =20 -gdb_test "info locals" "ix_x =3D 11\r\niy_y =3D 22\r\niz_z =3D 33\r\nix = =3D 1\r\niy =3D 2\r\niz =3D 3" "info locals out" -gdb_test "info common" "Contents of F77 COMMON block 'fo_o':\r\nix_x =3D 1= 1\r\niy_y =3D 22\r\niz_z =3D 33\r\n\r\nContents of F77 COMMON block 'foo':\= r\nix =3D 1\r\niy =3D 2\r\niz =3D 3" "info common out" +gdb_test_multiple "info locals" "info locals out" { + # gfortran + -re -wrap "ix_x =3D 11\r\niy_y =3D 22\r\niz_z =3D 33\r\nix =3D 1\r\niy= =3D 2\r\niz =3D 3" { + pass $gdb_test_name + } + # ifx/ifort/flang + -re -wrap "ix =3D 1\r\niy =3D 2\r\niz =3D 3\r\nix_x =3D 11\r\niy_y =3D= 22\r\niz_z =3D 33" { + pass $gdb_test_name + } +} + +gdb_test_multiple "info common" "info common out" { + # gfortran + -re -wrap "Contents of F77 COMMON block 'fo_o':\r\nix_x =3D 11\r\niy_y= =3D 22\r\niz_z =3D 33\r\n\r\nContents of F77 COMMON block 'foo':\r\nix =3D= 1\r\niy =3D 2\r\niz =3D 3" { + pass $gdb_test_name + } + # ifx/ifort/flang + -re -wrap "Contents of F77 COMMON block 'foo_?':\r\nix =3D 1\r\niy =3D= 2\r\niz =3D 3\r\n\r\nContents of F77 COMMON block 'fo_o_?':\r\nix_x =3D 11= \r\niy_y =3D 22\r\niz_z =3D 33" { + pass $gdb_test_name + } +} =20 gdb_test "ptype ix" "type =3D $int4" "ptype ix out" gdb_test "ptype iy" "type =3D $real4" "ptype iy out" @@ -81,7 +100,20 @@ gdb_test "whatis fo_o$suffix" "No symbol \"fo_o$suffix\= " in current context." "w gdb_test "ptype fo_o$suffix" "No symbol \"fo_o$suffix\" in current context= ." "ptype fo_o$suffix in" gdb_test "p fo_o$suffix" "No symbol \"fo_o$suffix\" in current context." "= p fo_o$suffix in" =20 -gdb_test "info locals" "ix =3D 11\r\niy2 =3D 22\r\niz =3D 33\r\nix_x =3D 1= \r\niy_y =3D 2\r\niz_z2 =3D 3\r\niy =3D 5\r\niz_z =3D 55" "info locals in" +gdb_test_multiple "info locals" "info locals in" { + # gfortran + -re -wrap "ix =3D 11\r\niy2 =3D 22\r\niz =3D 33\r\nix_x =3D 1\r\niy_y = =3D 2\r\niz_z2 =3D 3\r\niy =3D 5\r\niz_z =3D 55" { + pass $gdb_test_name + } + # ifx + -re -wrap "ix =3D 11\r\niy2 =3D 22\r\niz =3D 33\r\nix_x =3D 1\r\niy_y = =3D 2\r\niz_z2 =3D 3\r\niz_z =3D 55\r\niy =3D 5" { + pass $gdb_test_name + } + # ifort + -re -wrap "iz_z =3D 55\r\niy =3D 5\r\nix =3D 11\r\niy2 =3D 22\r\niz = =3D 33\r\nix_x =3D 1\r\niy_y =3D 2\r\niz_z2 =3D 3" { + pass $gdb_test_name + } +} gdb_test "info common" "Contents of F77 COMMON block 'fo_o':\r\nix =3D 11\= r\niy2 =3D 22\r\niz =3D 33\r\n\r\nContents of F77 COMMON block 'foo':\r\nix= _x =3D 1\r\niy_y =3D 2\r\niz_z2 =3D 3" "info common in" =20 gdb_test "ptype ix" "type =3D $int4" "ptype ix in"