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 00/18] Fortran compiler identification and ifx testsuite support
Date: Wed, 11 May 2022 14:32:29 +0100 [thread overview]
Message-ID: <87tu9wjitu.fsf@redhat.com> (raw)
In-Reply-To: <20220510142437.1397399-1-nils-christian.kempke@intel.com>
Nils-Christian Kempke via Gdb-patches <gdb-patches@sourceware.org>
writes:
> Hi all,
>
> this series is a collection of patches we have prepared that was
> targeted at improving the overall passrate of the Intel ifx compiler
> within the Fortran testsuite. It also includes a new way for the
> testsuite to identify the Fortran compilers and their version.
Thanks for doing all this.
I've looked through all these patches, and everything looks good to me.
There's a few minor issues I spotted, I've sent emails about those,
everything else in this series is approved.
Thanks,
Andrew
>
>
> There are a few places in the gdb.fortran part of the testsuite that
> needed to be adapted for ifx. Some of these changes make the
> testsuite a bit less taylored to the gfortran specifics. Some of the
> changes fix flags and such to better support running the testsuite
> with ifx.
>
> While doing this and after initially submitting a patch here
>
> https://sourceware.org/pipermail/gdb-patches/2021-December/184612.html
>
> and in the follow-up discussion here
>
> https://sourceware.org/pipermail/gdb-patches/2022-January/185064.html
>
> we decided to change the testsuite a bit more and add a Frotran specific
> compiler identification to the Fortran testsuite.
>
> Generally, the procedures test_compiler_info and get_compiler_info are
> used in the testsuite to detect a certain compiler (e.g. gcc-*). This
> info is then used to set certain flags/kfails etc.
>
> The procedure get_compiler_info would, upon calling it, take the files
> compiler.c/compiler.cc (depending on wether or not the c++ option was
> passed to them) and run them through the respective C/CXX preprocessors
> of the compiler given via CC_FOR_TARGET/CXX_FOR_TARGET (or gcc/gfortran
> if these were not set). It would detect compiler specific macro
> definitions and retrun the compiler used, as well as its version in a
> string. As there was no separate option available for Fortran, using
> get_compiler_info inside a Fortran test would always default to the C
> compiler detection and return the version and name of the C compiler
> defined in CC_FOR_TARGET (or gcc if none was set).
>
> This meant, that running the testsuite while defining a F90_FOR_TARGET
> would, in order to set the right flags and kfails within the testsuite
> run, require one to also set the CC_FOR_TARGET to the C compiler that
> would 'correspond' to the Fortran one. So F90_FOR_TARGET=ifx would
> require CC_FOR_TARGET=icx, flang would require clang and so on.
> Running the Fortran testsuite with only F90_FOR_TARGET=ifx would be the
> equivalent of setting CC_FOR_TARGET=gcc. The test_compiler_info would
> return gcc-* in this case and compiler specific settings not be applied.
> Especially, this made it impossible to run heterogenous combinations of
> C and Fortran compilers and still have all flags/kfails setup correctly.
>
> In order to improve this (and the rest of our patches are base on this)
> we added a new option to get/test_compiler_info: 'f90'. We added a
> Fortran compiler identification mechanism similar to the existing C/CXX
> ones by adding the file compiler.F90. Similar to C/CXX, the Fortran
> compiler detection preprocesses the compiler.F90 file and, depending on
> the macros defined by the compiler, will return the Fortran compiler
> name and version.
>
> We want to note here, that preprocessing is not part of the Fortran
> standard. It was used here as it seems to be common for most compilers
> to have this feature in place (in fact, we don't know of any modern
> Fortran compilers that don't have it).
>
> We added detection for gfortran, ifx, ifort, classic flang, llvm flang,
> and armflang. While we tested the detection for all compilers with
> their latest available versions, we could not test the armflang compiler
> identification. We would kindly ask someone from arm (and I'll cc
> someone in this patch who I've written mails with before) to test these
> detection changes for us. They were extracted from the latest online
> armflang documentation.
>
> At last, when adding the Fortran compiler identification we were faced
> with the problem of properly maintaining F77_FOR_TARGET. We think, this
> feature is not maintained anymore and the last usage of it was removed
> many years ago. Thus, we decided to remove F77_FOR_TARGET from the
> testsuite.
>
> All these changes were tested for regressions on a x86_64 Ubunut20.04
> machine running the boards unix, unix/-m32, native-gdbserver, and
> native-extended-gdbserver (-m32 is acually only properly supported for
> gfortran and ifort as far as we know).
>
> This series did not show any regressions but imporves the testsuite
> support for ifx significantly (in some places also for ifort and flang).
>
> We're looking forward to feedback!
>
> Cheers,
>
> Nils
>
> Abdul Basit Ijaz (1):
> gdb/testsuite: Use -module option for Intel Fortran compilers
>
> Cristian Sandu (1):
> gdb/testsuite: add Fortran compiler identification to GDB
>
> Felix Willgerodt (1):
> gdb/testsuite: Fix fortran types for Intel compilers.
>
> Nils-Christian Kempke (15):
> gdb/testsuite: remove F77_FOR_TARGET support
> gdb/testsuite: add local variable for passing 'getting_compiler_info'
> to gdb_compile
> gdb/testsuite: rename intel next gen c/cpp compilers
> gdb/testsuite: disable charset.exp for intel compilers
> testsuite, fortran: make print-formatted.exp more robust
> testsuite, fortran: add required external keyword
> testsuite, fortran: add compiler dependent types to
> dynamic-ptype-whatis
> testsuite, fortran: Add '-debug-parameters all' when compiling with
> ifx
> testsuite/lib: add check_optional_entry for GDBInfoSymbols
> testsuite, fortran: fix info-types for intel compilers
> testsuite, fortran: Add type info of formal parameter for Intel
> compilers.
> testsuite, fortran: allow additional completions in module.exp
> gdb, testsuite, fortran: fix double free in mixed-lang-stack.exp
> gdb, testsuite, fortran: fixup mixed-lang-stack for Intel/LLVM
> compilers
> gdb/testsuite: fixup common-block.exp for intel compilers
>
> gdb/testsuite/boards/cc-with-tweaks.exp | 5 -
> gdb/testsuite/boards/debug-types.exp | 1 -
> gdb/testsuite/boards/gold-gdb-index.exp | 1 -
> gdb/testsuite/gdb.fortran/assumedrank.exp | 6 +-
> gdb/testsuite/gdb.fortran/charset.exp | 5 +
> .../gdb.fortran/class-allocatable-array.exp | 4 +-
> gdb/testsuite/gdb.fortran/common-block.exp | 38 ++++++-
> .../gdb.fortran/derived-type-striding.exp | 2 +-
> .../gdb.fortran/dynamic-ptype-whatis.exp | 79 +++++++-------
> gdb/testsuite/gdb.fortran/function-calls.f90 | 1 +
> gdb/testsuite/gdb.fortran/info-types.exp | 10 +-
> gdb/testsuite/gdb.fortran/library-module.exp | 2 +-
> .../gdb.fortran/mixed-lang-stack.cpp | 12 +--
> .../gdb.fortran/mixed-lang-stack.exp | 21 ++--
> gdb/testsuite/gdb.fortran/module.exp | 5 +-
> gdb/testsuite/gdb.fortran/namelist.exp | 2 +-
> gdb/testsuite/gdb.fortran/nested-funcs-2.exp | 3 +-
> gdb/testsuite/gdb.fortran/print-formatted.exp | 3 +-
> gdb/testsuite/gdb.fortran/print-formatted.f90 | 1 +
> .../gdb.fortran/ptype-on-functions.exp | 12 ++-
> gdb/testsuite/gdb.fortran/vla-type.exp | 2 +-
> gdb/testsuite/lib/compiler.F90 | 69 ++++++++++++
> gdb/testsuite/lib/compiler.c | 2 +-
> gdb/testsuite/lib/compiler.cc | 2 +-
> gdb/testsuite/lib/fortran.exp | 100 +++++++++++-------
> gdb/testsuite/lib/future.exp | 21 +---
> gdb/testsuite/lib/gdb.exp | 61 +++++++----
> gdb/testsuite/lib/sym-info-cmds.exp | 18 +++-
> 28 files changed, 317 insertions(+), 171 deletions(-)
> create mode 100644 gdb/testsuite/lib/compiler.F90
>
> --
> 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
prev parent reply other threads:[~2022-05-11 13:32 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-10 14:24 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
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 ` Andrew Burgess via Gdb-patches [this message]
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=87tu9wjitu.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