From: FX <fxcoudert@gmail.com>
To: Fortran <fortran@gcc.gnu.org>
Subject: [committed] Fix FMA test case
Date: Mon, 3 Oct 2022 09:39:07 +0200 [thread overview]
Message-ID: <7E31370F-4100-4A32-8F05-055E8569D106@gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 327 bytes --]
I’ve committed the attached patch as obvious, relaxing the IEEE_FMA tests to remove some floating-point equality tests that failed on various targets (powerpc in this case): https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107062
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=31d7c8bc2630e1b5a35ccce97ac862c4920ba582
FX
[-- Attachment #2: 0001-Fortran-fix-testcases.patch --]
[-- Type: application/octet-stream, Size: 2631 bytes --]
From 31d7c8bc2630e1b5a35ccce97ac862c4920ba582 Mon Sep 17 00:00:00 2001
From: Francois-Xavier Coudert <fxcoudert@gmail.com>
Date: Mon, 3 Oct 2022 09:24:10 +0200
Subject: [PATCH] Fortran: fix testcases
Remove unreliable test for IEEE_FMA(), which fails on powerpc.
Adjust stop codes for modes_1.f90.
2022-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
gcc/testsuite/
PR fortran/107062
* gfortran.dg/ieee/fma_1.f90: Fix test.
* gfortran.dg/ieee/modes_1.f90: Fix test.
---
gcc/testsuite/gfortran.dg/ieee/fma_1.f90 | 4 ----
gcc/testsuite/gfortran.dg/ieee/modes_1.f90 | 6 +++---
2 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/gcc/testsuite/gfortran.dg/ieee/fma_1.f90 b/gcc/testsuite/gfortran.dg/ieee/fma_1.f90
index 34636426c98..320c73a0c3c 100644
--- a/gcc/testsuite/gfortran.dg/ieee/fma_1.f90
+++ b/gcc/testsuite/gfortran.dg/ieee/fma_1.f90
@@ -38,7 +38,6 @@
print *, sx1 * sx2 + sx3
print *, ieee_fma(sx1, sx2, sx3)
if (ieee_fma(sx1, sx2, sx3) /= real(3, kind(sx1)) / 2) stop 4
- !if (ieee_fma(sx1, sx2, sx3) == sx1 * sx2 + sx3) stop 5
! Double
@@ -57,7 +56,6 @@
print *, dx1 * dx2 + dx3
print *, ieee_fma(dx1, dx2, dx3)
if (ieee_fma(dx1, dx2, dx3) /= real(3, kind(dx1)) / 2) stop 4
- !if (ieee_fma(dx1, dx2, dx3) == dx1 * dx2 + dx3) stop 5
! Large kind 1
@@ -76,7 +74,6 @@
print *, lx1 * lx2 + lx3
print *, ieee_fma(lx1, lx2, lx3)
if (ieee_fma(lx1, lx2, lx3) /= real(3, kind(lx1)) / 2) stop 4
- if (ieee_fma(lx1, lx2, lx3) == lx1 * lx2 + lx3) stop 5
! Large kind 2
@@ -95,6 +92,5 @@
print *, wx1 * wx2 + wx3
print *, ieee_fma(wx1, wx2, wx3)
if (ieee_fma(wx1, wx2, wx3) /= real(3, kind(wx1)) / 2) stop 4
- if (ieee_fma(wx1, wx2, wx3) == wx1 * wx2 + wx3) stop 5
end
diff --git a/gcc/testsuite/gfortran.dg/ieee/modes_1.f90 b/gcc/testsuite/gfortran.dg/ieee/modes_1.f90
index b6ab28847f7..205c47f3800 100644
--- a/gcc/testsuite/gfortran.dg/ieee/modes_1.f90
+++ b/gcc/testsuite/gfortran.dg/ieee/modes_1.f90
@@ -81,15 +81,15 @@ program foo
! Check again
if (ieee_support_underflow_control()) then
call ieee_get_underflow_mode(f)
- if (.not. f) stop 3
+ if (.not. f) stop 4
endif
if (ieee_support_rounding(ieee_down)) then
call ieee_get_rounding_mode(rmode)
- if (rmode /= ieee_down) stop 4
+ if (rmode /= ieee_down) stop 5
endif
if (ieee_support_halting(ieee_overflow)) then
call ieee_get_halting_mode(ieee_overflow, f)
- if (f) stop 5
+ if (f) stop 6
endif
end program foo
--
2.37.0 (Apple Git-136)
reply other threads:[~2022-10-03 7:39 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=7E31370F-4100-4A32-8F05-055E8569D106@gmail.com \
--to=fxcoudert@gmail.com \
--cc=fortran@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).