Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Burgess via Gdb-patches <gdb-patches@sourceware.org>
To: Nils-Christian Kempke <nils-christian.kempke@intel.com>,
	gdb-patches@sourceware.org
Cc: JiniSusan.George@amd.com
Subject: Re: [PATCH 13/18] testsuite, fortran: fix info-types for intel compilers
Date: Wed, 11 May 2022 13:06:27 +0100	[thread overview]
Message-ID: <87zgjojmt8.fsf@redhat.com> (raw)
In-Reply-To: <20220510142437.1397399-14-nils-christian.kempke@intel.com>

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

> First, the emitted symbol character*1 which is checked in the test
> is not even referenced as a type in the compiled examples.  It seems
> to be a gfortran specific check for some type that gets emitted always.
> I changed the test to use check_optional_entry here to allow the
> symbol's absence.
>
> Second, the line checked for s1 was hardcoded in the test.  Given that
> the type is actually defined on line 41 (which is what is emitted by
> ifx) it even seems wrong.  I changed the line check for s1 to actually
> check for 41 and a gfortran bug has been filed here
>
>    https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105454
>
> The test is now marked as xfail for gfortran.
>
> Third, the test was checking for s1 to be emitted by info types.  This
> would mean that the type is put into compilation unit scope in the DWARF
> but, as it is local to the main program this is actually not expected
> and gfortran specific.
> Since I already added the xfail for gfortran here, I opted to also make
> this check gfortran specific.
> ---
>  gdb/testsuite/gdb.fortran/info-types.exp | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/gdb/testsuite/gdb.fortran/info-types.exp b/gdb/testsuite/gdb.fortran/info-types.exp
> index 67fe4d79c5..06770aada1 100644
> --- a/gdb/testsuite/gdb.fortran/info-types.exp
> +++ b/gdb/testsuite/gdb.fortran/info-types.exp
> @@ -41,12 +41,16 @@ set real4 [fortran_real4]
>  GDBInfoSymbols::run_command "info types"
>  GDBInfoSymbols::check_header "All defined types:"
>  
> -GDBInfoSymbols::check_entry "${srcfile}" "" "${character1}"
> +GDBInfoSymbols::check_optional_entry "${srcfile}" "" "${character1}"

Could we not just add a reference to character*1 type?  I'm happy to
take this change, but just adding a use might make a stronger test?

>  GDBInfoSymbols::check_entry "${srcfile}" "" "${integer4}"
>  GDBInfoSymbols::check_entry "${srcfile}" "" "${logical4}"
>  GDBInfoSymbols::check_entry "${srcfile}" "$decimal" "Type m1t1;"
>  GDBInfoSymbols::check_entry "${srcfile}" "" "${real4}"
> -GDBInfoSymbols::check_entry "${srcfile}" "37" "Type s1;"
> +
> +if { [test_compiler_info {gfortran-*} f90] } {
> +    setup_xfail *-*-* gcc/105454
> +    GDBInfoSymbols::check_entry "${srcfile}" "41" "Type s1;"
> +}

Shouldn't the GDBInfoSymbols::check_entry call be outside of the if
block?  I think, with your change, the test will _only_ be run on
gfortran, which is not what you wanted.

Thanks,
Andrew


>  
>  return 0
>  
> @@ -62,5 +66,5 @@ gdb_test "info types" \
>  	 "(35:\[\t \]+Type __vtype_mod1_M1t1;" \
>  	 ")?$decimal:\[\t \]+Type m1t1;" \
>  	 "\[\t \]+${real4}" \
> -	 "37:\[\t \]+Type s1;(" \
> +	 "41:\[\t \]+Type s1;(" \
>  	 ".*)?"]
> -- 
> 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-11 12:06 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-10 14:24 [PATCH 00/18] Fortran compiler identification and ifx testsuite support Nils-Christian Kempke via Gdb-patches
2022-05-10 14:24 ` [PATCH 01/18] gdb/testsuite: remove F77_FOR_TARGET support Nils-Christian Kempke via Gdb-patches
2022-05-10 14:24 ` [PATCH 02/18] gdb/testsuite: Use -module option for Intel Fortran compilers Nils-Christian Kempke via Gdb-patches
2022-05-10 14:24 ` [PATCH 03/18] gdb/testsuite: Fix fortran types for Intel compilers Nils-Christian Kempke via Gdb-patches
2022-05-11  9:49   ` Andrew Burgess via Gdb-patches
2022-05-11  9:57     ` Kempke, Nils-Christian via Gdb-patches
2022-05-10 14:24 ` [PATCH 04/18] gdb/testsuite: add local variable for passing 'getting_compiler_info' to gdb_compile Nils-Christian Kempke via Gdb-patches
2022-05-11 10:10   ` Andrew Burgess via Gdb-patches
2022-05-11 14:24     ` Kempke, Nils-Christian via Gdb-patches
2022-05-10 14:24 ` [PATCH 05/18] gdb/testsuite: add Fortran compiler identification to GDB Nils-Christian Kempke via Gdb-patches
2022-05-10 14:24 ` [PATCH 06/18] gdb/testsuite: rename intel next gen c/cpp compilers Nils-Christian Kempke via Gdb-patches
2022-05-11 11:23   ` Andrew Burgess via Gdb-patches
2022-05-11 14:28     ` Kempke, Nils-Christian via Gdb-patches
2022-05-10 14:24 ` [PATCH 07/18] gdb/testsuite: disable charset.exp for intel compilers Nils-Christian Kempke via Gdb-patches
2022-05-10 14:24 ` [PATCH 08/18] testsuite, fortran: make print-formatted.exp more robust Nils-Christian Kempke via Gdb-patches
2022-05-11 11:32   ` Andrew Burgess via Gdb-patches
2022-05-11 14:32     ` Kempke, Nils-Christian via Gdb-patches
2022-05-10 14:24 ` [PATCH 09/18] testsuite, fortran: add required external keyword Nils-Christian Kempke via Gdb-patches
2022-05-10 14:24 ` [PATCH 10/18] testsuite, fortran: add compiler dependent types to dynamic-ptype-whatis Nils-Christian Kempke via Gdb-patches
2022-05-10 14:24 ` [PATCH 11/18] testsuite, fortran: Add '-debug-parameters all' when compiling with ifx Nils-Christian Kempke via Gdb-patches
2022-05-11 11:56   ` Andrew Burgess via Gdb-patches
2022-05-11 14:36     ` Kempke, Nils-Christian via Gdb-patches
2022-05-10 14:24 ` [PATCH 12/18] testsuite/lib: add check_optional_entry for GDBInfoSymbols Nils-Christian Kempke via Gdb-patches
2022-05-10 14:24 ` [PATCH 13/18] testsuite, fortran: fix info-types for intel compilers Nils-Christian Kempke via Gdb-patches
2022-05-11 12:06   ` Andrew Burgess via Gdb-patches [this message]
2022-05-11 15:20     ` Kempke, Nils-Christian via Gdb-patches
2022-05-11 16:43       ` Kempke, Nils-Christian via Gdb-patches
2022-05-30 10:33         ` Andrew Burgess via Gdb-patches
2022-05-30 10:32       ` Andrew Burgess via Gdb-patches
2022-05-10 14:24 ` [PATCH 14/18] testsuite, fortran: Add type info of formal parameter for Intel compilers Nils-Christian Kempke via Gdb-patches
2022-05-10 14:24 ` [PATCH 15/18] testsuite, fortran: allow additional completions in module.exp Nils-Christian Kempke via Gdb-patches
2022-05-10 14:24 ` [PATCH 16/18] gdb, testsuite, fortran: fix double free in mixed-lang-stack.exp Nils-Christian Kempke via Gdb-patches
2022-05-10 14:24 ` [PATCH 17/18] gdb, testsuite, fortran: fixup mixed-lang-stack for Intel/LLVM compilers Nils-Christian Kempke via Gdb-patches
2022-05-10 14:24 ` [PATCH 18/18] gdb/testsuite: fixup common-block.exp for intel compilers Nils-Christian Kempke via Gdb-patches
2022-05-11 13:29   ` Andrew Burgess via Gdb-patches
2022-05-11 15:31     ` Kempke, Nils-Christian via Gdb-patches
2022-05-16  6:36       ` George, Jini Susan via Gdb-patches
2022-05-16  7:59         ` Kempke, Nils-Christian via Gdb-patches
2022-05-11 13:32 ` [PATCH 00/18] Fortran compiler identification and ifx testsuite support Andrew Burgess via Gdb-patches

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=87zgjojmt8.fsf@redhat.com \
    --to=gdb-patches@sourceware.org \
    --cc=JiniSusan.George@amd.com \
    --cc=aburgess@redhat.com \
    --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