public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Andrew Burgess <aburgess@redhat.com>
To: Nils-Christian Kempke <nils-christian.kempke@intel.com>,
	gdb-patches@sourceware.org
Cc: JiniSusan.George@amd.com,
	Nils-Christian Kempke <nils-christian.kempke@intel.com>
Subject: Re: [PATCH v2 16/16] gdb/testsuite: fixup common-block.exp for intel compilers
Date: Tue, 31 May 2022 17:08:21 +0100	[thread overview]
Message-ID: <87leuhd6ru.fsf@redhat.com> (raw)
In-Reply-To: <20220531092423.2361679-7-nils-christian.kempke@intel.com>

Nils-Christian Kempke <nils-christian.kempke@intel.com> writes:

> 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.

LGTM.

Thanks,
Andrew

> ---
>  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 <http://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


  reply	other threads:[~2022-05-31 16:08 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-31  9:24 [PATCH v2 00/16] Fortran compiler identification and ifx testsuite support Nils-Christian Kempke
2022-05-31  9:24 ` [PATCH v2 03/16] gdb/testsuite: Fix fortran types for Intel compilers Nils-Christian Kempke
2022-05-31 14:15   ` Andrew Burgess
2022-05-31 14:48     ` Kempke, Nils-Christian
2022-05-31  9:24 ` [PATCH v2 04/16] gdb/testsuite: move getting_compiler_info to front of gdb_compile Nils-Christian Kempke
2022-05-31 16:00   ` Andrew Burgess
2022-05-31  9:24 ` [PATCH v2 06/16] gdb/testsuite: rename intel next gen c/cpp compilers Nils-Christian Kempke
2022-05-31 14:47   ` Andrew Burgess
2022-05-31  9:24 ` [PATCH v2 10/16] testsuite, fortran: Add '-debug-parameters all' when using ifx/ifort Nils-Christian Kempke
2022-05-31 16:03   ` Andrew Burgess
2022-05-31  9:24 ` [PATCH v2 12/16] testsuite, fortran: fix info-types for intel compilers Nils-Christian Kempke
2022-05-31 16:06   ` Andrew Burgess
2022-06-01  5:25     ` Tom de Vries
2022-06-01  9:21       ` Kempke, Nils-Christian
2022-06-03  6:53         ` Tom de Vries
2022-05-31  9:24 ` [PATCH v2 16/16] gdb/testsuite: fixup common-block.exp " Nils-Christian Kempke
2022-05-31 16:08   ` Andrew Burgess [this message]
2022-05-31 16:14 ` [PATCH v2 00/16] Fortran compiler identification and ifx testsuite support Andrew Burgess
2022-05-31 16:27   ` Kempke, Nils-Christian
2022-05-31 19:33   ` Tom de Vries
2022-06-01  4:54     ` Tom de Vries
2022-06-01  5:13       ` Tom de Vries
2022-06-01  6:44         ` Kempke, Nils-Christian
2022-06-01  7:10           ` Kempke, Nils-Christian
2022-06-01  7:32             ` Tom de Vries
2022-06-01  9:23               ` Kempke, Nils-Christian

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87leuhd6ru.fsf@redhat.com \
    --to=aburgess@redhat.com \
    --cc=JiniSusan.George@amd.com \
    --cc=gdb-patches@sourceware.org \
    --cc=nils-christian.kempke@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).