From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by sourceware.org (Postfix) with ESMTPS id 9280C386F463 for ; Tue, 31 May 2022 09:25:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9280C386F463 X-IronPort-AV: E=McAfee;i="6400,9594,10363"; a="275203211" X-IronPort-AV: E=Sophos;i="5.91,264,1647327600"; d="scan'208";a="275203211" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2022 02:25:19 -0700 X-IronPort-AV: E=Sophos;i="5.91,264,1647327600"; d="scan'208";a="611752668" Received: from labpcdell3650-003.iul.intel.com (HELO localhost) ([172.28.49.87]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2022 02:25:18 -0700 From: Nils-Christian Kempke To: gdb-patches@sourceware.org Cc: aburgess@redhat.com, JiniSusan.George@amd.com, Nils-Christian Kempke Subject: [PATCH v2 16/16] gdb/testsuite: fixup common-block.exp for intel compilers Date: Tue, 31 May 2022 11:24:23 +0200 Message-Id: <20220531092423.2361679-7-nils-christian.kempke@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220531092423.2361679-1-nils-christian.kempke@intel.com> References: <20220531092423.2361679-1-nils-christian.kempke@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-10.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org 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: , X-List-Received-Date: Tue, 31 May 2022 09:25:22 -0000 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. I added a gdb_test_multiple that lets ifx and ifort pass in cases where only the order differs. --- 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 e6555f536d..e8d7c22213 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." -gdb_test "info locals" "ix_x = 11\r\niy_y = 22\r\niz_z = 33\r\nix = 1\r\niy = 2\r\niz = 3" "info locals out" -gdb_test "info common" "Contents of F77 COMMON block 'fo_o':\r\nix_x = 11\r\niy_y = 22\r\niz_z = 33\r\n\r\nContents of F77 COMMON block 'foo':\r\nix = 1\r\niy = 2\r\niz = 3" "info common out" +gdb_test_multiple "info locals" "info locals out" { + # gfortran + -re -wrap "ix_x = 11\r\niy_y = 22\r\niz_z = 33\r\nix = 1\r\niy = 2\r\niz = 3" { + pass $gdb_test_name + } + # ifx/ifort/flang + -re -wrap "ix = 1\r\niy = 2\r\niz = 3\r\nix_x = 11\r\niy_y = 22\r\niz_z = 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 = 11\r\niy_y = 22\r\niz_z = 33\r\n\r\nContents of F77 COMMON block 'foo':\r\nix = 1\r\niy = 2\r\niz = 3" { + pass $gdb_test_name + } + # ifx/ifort/flang + -re -wrap "Contents of F77 COMMON block 'foo_?':\r\nix = 1\r\niy = 2\r\niz = 3\r\n\r\nContents of F77 COMMON block 'fo_o_?':\r\nix_x = 11\r\niy_y = 22\r\niz_z = 33" { + pass $gdb_test_name + } +} gdb_test "ptype ix" "type = $int4" "ptype ix out" gdb_test "ptype iy" "type = $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" -gdb_test "info locals" "ix = 11\r\niy2 = 22\r\niz = 33\r\nix_x = 1\r\niy_y = 2\r\niz_z2 = 3\r\niy = 5\r\niz_z = 55" "info locals in" +gdb_test_multiple "info locals" "info locals in" { + # gfortran + -re -wrap "ix = 11\r\niy2 = 22\r\niz = 33\r\nix_x = 1\r\niy_y = 2\r\niz_z2 = 3\r\niy = 5\r\niz_z = 55" { + pass $gdb_test_name + } + # ifx + -re -wrap "ix = 11\r\niy2 = 22\r\niz = 33\r\nix_x = 1\r\niy_y = 2\r\niz_z2 = 3\r\niz_z = 55\r\niy = 5" { + pass $gdb_test_name + } + # ifort + -re -wrap "iz_z = 55\r\niy = 5\r\nix = 11\r\niy2 = 22\r\niz = 33\r\nix_x = 1\r\niy_y = 2\r\niz_z2 = 3" { + pass $gdb_test_name + } +} gdb_test "info common" "Contents of F77 COMMON block 'fo_o':\r\nix = 11\r\niy2 = 22\r\niz = 33\r\n\r\nContents of F77 COMMON block 'foo':\r\nix_x = 1\r\niy_y = 2\r\niz_z2 = 3" "info common in" gdb_test "ptype ix" "type = $int4" "ptype ix in" -- 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