From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 8NSsBq53emIidAUAWB0awg (envelope-from ) for ; Tue, 10 May 2022 10:33:18 -0400 Received: by simark.ca (Postfix, from userid 112) id 186611E21F; Tue, 10 May 2022 10:33:18 -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=XOARH48l; 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 91D961E01D for ; Tue, 10 May 2022 10:33:17 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 39206395445D for ; Tue, 10 May 2022 14:33:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 39206395445D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1652193197; bh=8j9rCpbV1hcM7YvN+oxWZNvaEI2Sny7uJ17GxIxS/7w=; 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=XOARH48lSZB6nH1NQd66nVoexQszM6Rhv7qUcfg2PPALeEHs8dLhEGl2etnxkV3pQ rRTECzxuX7sRQHmxO4M2wohihvj9X9nGwfIME2m13hp83LaqsHC5JVVHHQFDbhqmqG xVyYi2uFN4OsaKN0E+GGtPXeayqFuuwBpYHLKVWQ= Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by sourceware.org (Postfix) with ESMTPS id 37D4C3954409 for ; Tue, 10 May 2022 14:26:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 37D4C3954409 X-IronPort-AV: E=McAfee;i="6400,9594,10342"; a="332423925" X-IronPort-AV: E=Sophos;i="5.91,214,1647327600"; d="scan'208";a="332423925" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2022 07:26:07 -0700 X-IronPort-AV: E=Sophos;i="5.91,214,1647327600"; d="scan'208";a="565665384" Received: from labpcdell3650-003.iul.intel.com (HELO localhost) ([172.28.49.87]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2022 07:26:05 -0700 To: gdb-patches@sourceware.org Subject: [PATCH 18/18] gdb/testsuite: fixup common-block.exp for intel compilers Date: Tue, 10 May 2022 16:24:37 +0200 Message-Id: <20220510142437.1397399-19-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 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 ac39a4a575..fc38b8d772 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 "ix_x = 11\r\niy_y = 22\r\niz_z = 33\r\nix = 1\r\niy = 2\r\niz = 3.*$gdb_prompt $" { + pass $gdb_test_name + } + # ifx/ifort + -re "ix = 1\r\niy = 2\r\niz = 3\r\nix_x = 11\r\niy_y = 22\r\niz_z = 33.*$gdb_prompt $" { + pass $gdb_test_name + } +} + +gdb_test_multiple "info common" "info common out" { + # gfortran + -re "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.*$gdb_prompt $" { + pass $gdb_test_name + } + # ifx/ifort + -re "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.*$gdb_prompt $" { + 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 "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.*$gdb_prompt $" { + pass $gdb_test_name + } + # ifx + -re "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.*$gdb_prompt $" { + pass $gdb_test_name + } + # ifort + -re "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.*$gdb_prompt $" { + 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