From: Nils-Christian Kempke <nils-christian.kempke@intel.com>
To: gdb-patches@sourceware.org
Subject: [PATCH 0/1][PR fortran/29053&29054] Fix regressions in GDB intrinsic handling
Date: Fri, 22 Apr 2022 12:52:57 +0200 [thread overview]
Message-ID: <20220422105258.3516128-1-nils-christian.kempke@intel.com> (raw)
The patch submitted here
https://sourceware.org/pipermail/gdb-patches/2022-April/187649.html
introduced regressions in the testsuite when running the unix/-m32
board, as described here
https://sourceware.org/pipermail/gdb-patches/2022-April/187807.html
and in the GDB bugzilla entries
https://sourceware.org/bugzilla/show_bug.cgi?id=29053
and
https://sourceware.org/bugzilla/show_bug.cgi?id=29054
Thanks to Tom for spotting these - I am not sure how they slipped
through..
The reason for the failures however was, that the affected tests tried
to allocate Fortran arrays of sizes/dimensions bigger than 4 byte signed
integers, even when on 32 bit machines.
This lead to either compiler errors, as described in 29054, where an
array of size bigger than the max signed 4 byte integer was being
allocated which got caught by gfortran. Or, as described in 29053, this
resulted in unexpected behavior of intrinsic functions called on arrays,
where the size itself was small enough to fit into a 4 byte signed
integer but instead the dimensions were outside of these limits.
For fixing this we saw ourselves presented with two options - either
remove the overflow test for 4 byte integer overflow or keep them and
fix them.
We for now decided to keep them and fixed the tests instead. The given
patch does this in two ways. First, a compile time detection for 32 bit
systems was necessary, in order to not allocate arrays with critical
dimensions/sizes when on 32 bit machines. This was done using the
intrinsic module ISO_C_BINDING and from there C_NULL_PTR (Fortran 2003)
and C_SIZEOF (Fortran 2008). We here check the size of a C pointer at
runtime to determine the system we are on.
Second, the lbound-ubound.exp file itself was adapted. When running on a
32 bit target some of the test were disabled.
The tests compile and run with gcc/gfortran and icx/ifx. They compile
but trigger some unrelated FAILS with icc/ifort where we are not sure
when these can be resolved.
The changes were tested for gcc/gfortran on unix/-32, unix,
native-remote, and native-extended-remote (the last two more out of
habit). As icx/ifx does not support 32 bit currently only the other
three boards were run here.
Thanks,
Nils
Nils-Christian Kempke (1):
gdb/testsuite: fix testsuite regressions for unix/-m32 board
gdb/testsuite/gdb.fortran/lbound-ubound.F90 | 39 ++++++++++++---
gdb/testsuite/gdb.fortran/lbound-ubound.exp | 13 +++--
gdb/testsuite/gdb.fortran/size.f90 | 55 ++++++++++++++++-----
3 files changed, 86 insertions(+), 21 deletions(-)
--
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
next reply other threads:[~2022-04-22 10:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-22 10:52 Nils-Christian Kempke [this message]
2022-04-22 10:52 ` [PATCH 1/1][PR fortran/29053&29054] gdb/testsuite: fix testsuite regressions for unix/-m32 board Nils-Christian Kempke
2022-05-05 6:26 ` Tom de Vries
2022-05-10 12:52 ` 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=20220422105258.3516128-1-nils-christian.kempke@intel.com \
--to=nils-christian.kempke@intel.com \
--cc=gdb-patches@sourceware.org \
/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).