public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rearnsha at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/107071] gfortran.dg/ieee/modes_1.f90 fails on aarch64-linux
Date: Fri, 30 Sep 2022 12:42:16 +0000	[thread overview]
Message-ID: <bug-107071-4-sTWnoE32us@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-107071-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107071

--- Comment #8 from Richard Earnshaw <rearnsha at gcc dot gnu.org> ---
(In reply to Francois-Xavier Coudert from comment #7)
> @Richard The test in gfortran.dg/ieee/modes_1.f90 is not doing that. It is
> checking that the floating-point modes (rounding mode, underflow mode, and
> halting modes) can be set and restored. It is not actually performing any FP
> operation at all.

This is to do with the trapping, though, isn't it?  The failing test is trying
to test the halting mode setting and restoration.  The code is currently
assuming that because the flag bit exists, it can set and restore it, but
although the bit is defined in the architecture, on some (most) implementations
it's RAZ/WI (read-as-zero, write-ignored).  So the code that assumes this goes
wrong.

I might be slightly on the wrong lines here, but in the glibc fp support we
have

int
support_fpu_trap (int flag)
{
  return support_fpu_flag (flag);
}

So we're immediately assuming that if we have the flag, we can support the
trap.  And of course, support_fpu_flag only tests that the relevant flag bit is
defined, not if the HW supports changing it.

  parent reply	other threads:[~2022-09-30 12:42 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-28 15:36 [Bug fortran/107071] New: " fxcoudert at gcc dot gnu.org
2022-09-28 15:57 ` [Bug fortran/107071] " schwab@linux-m68k.org
2022-09-28 15:59 ` fxcoudert at gcc dot gnu.org
2022-09-29  8:22 ` schwab@linux-m68k.org
2022-09-29  9:09 ` schwab@linux-m68k.org
2022-09-29  9:20 ` fxcoudert at gcc dot gnu.org
2022-09-29 15:19 ` rearnsha at gcc dot gnu.org
2022-09-29 15:45 ` fxcoudert at gcc dot gnu.org
2022-09-30 12:42 ` rearnsha at gcc dot gnu.org [this message]
2022-09-30 17:42 ` fxcoudert at gcc dot gnu.org
2022-10-03  9:19 ` rearnsha at gcc dot gnu.org
2023-11-24  1:34 ` pinskia at gcc dot gnu.org
2024-02-14 18:25 ` tnfchris at gcc dot gnu.org
2024-02-21 11:43 ` cvs-commit at gcc dot gnu.org

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=bug-107071-4-sTWnoE32us@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.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).