public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/64022] New: [F2003][IEEE] ieee_support_flag does not handle kind=10 and kind=16 REAL variables
@ 2014-11-22 8:58 burnus at gcc dot gnu.org
2014-11-28 13:10 ` [Bug fortran/64022] " fxcoudert at gcc dot gnu.org
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: burnus at gcc dot gnu.org @ 2014-11-22 8:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64022
Bug ID: 64022
Summary: [F2003][IEEE] ieee_support_flag does not handle
kind=10 and kind=16 REAL variables
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Keywords: rejects-valid
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: burnus at gcc dot gnu.org
CC: fxcoudert at gcc dot gnu.org
Reported by Ian D Chivers and Jane Sleightholme. The following program is
rejected at compile time with:
if ( ieee_support_flag(ieee_all(i),z) ) then
1
Error: There is no specific function for the generic 'ieee_support_flag' at (1)
In the program below, "z" is a REAL(kind=16) variable but kind=10 has the same
issue.
module precision_module
implicit none
integer, parameter :: &
sp = selected_real_kind( 6, 37)
integer, parameter :: &
dp = selected_real_kind(15, 307)
integer, parameter :: &
qp = selected_real_kind(30, 291)
end module precision_module
program ch3402
use precision_module
use ieee_arithmetic
implicit none
real (sp) :: x = 1.0
real (dp) :: y = 1.0_dp
real (qp) :: z = 1.0_qp
integer :: i
character*20 , dimension(5) :: flags = &
(/ 'IEEE_DIVIDE_BY_ZERO ' , &
'IEEE_INEXACT ' , &
'IEEE_INVALID ' , &
'IEEE_OVERFLOW ' , &
'IEEE_UNDERFLOW ' /)
do i=1,5
if ( ieee_support_flag(ieee_all(i),x) ) then
write(unit=*,fmt=10) flags(i)
10 format(a20,' 32 bit support')
endif
if ( ieee_support_flag(ieee_all(i),y) ) then
write(unit=*,fmt=20) flags(i)
20 format(a20,' 64 bit support')
endif
if ( ieee_support_flag(ieee_all(i),z) ) then
write(unit=*,fmt=30)flags(i)
30 format(a20,'128 bit support')
endif
end do
end program ch3402
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/64022] [F2003][IEEE] ieee_support_flag does not handle kind=10 and kind=16 REAL variables
2014-11-22 8:58 [Bug fortran/64022] New: [F2003][IEEE] ieee_support_flag does not handle kind=10 and kind=16 REAL variables burnus at gcc dot gnu.org
@ 2014-11-28 13:10 ` fxcoudert at gcc dot gnu.org
2015-04-22 12:02 ` jakub at gcc dot gnu.org
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: fxcoudert at gcc dot gnu.org @ 2014-11-28 13:10 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64022
--- Comment #2 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> ---
Additional (related) issue:
The following program
module precision_module
implicit none
integer, parameter :: &
sp = selected_real_kind( 6, 37)
integer, parameter :: &
dp = selected_real_kind(15, 307)
integer, parameter :: &
qp = selected_real_kind(30, 291)
end module precision_module
program ch3406
use precision_module
use ieee_arithmetic
implicit none
real (sp) :: x0 = 0.0
real (dp) :: y0 = 0.0_dp
real (qp) :: z0 = 0.0_qp
real (sp) :: x1 = 1.0
real (dp) :: y1 = 1.0_dp
real (qp) :: z1 = 1.0_qp
real (sp) :: xnan = 1.0
real (dp) :: ynan = 1.0_dp
real (qp) :: znan = 1.0_qp
real (sp) :: xinfinite = 1.0
real (dp) :: yinfinite = 1.0_dp
real (qp) :: zinfinite = 1.0_qp
xinfinite=x1/x0
yinfinite=y1/y0
zinfinite=z1/z0
xnan=x0/x0
ynan=y0/y0
znan=z0/z0
if ( ieee_support_datatype(x1) ) then
print *,' 32 bit IEEE support'
print *,' inf ' , ieee_support_inf(x1)
print *,' nan ' , ieee_support_nan(x1)
print *,' 1/0 finite',ieee_is_finite(xinfinite)
print *,' 0/0 nan',ieee_is_nan(xnan)
endif
if ( ieee_support_datatype(y1) ) then
print *,' 64 bit IEEE support'
print *,' inf ' , ieee_support_inf(y1)
print *,' nan ' , ieee_support_nan(y1)
print *,' 1/0 finite',ieee_is_finite(yinfinite)
print *,' 0/0 nan',ieee_is_nan(ynan)
endif
if ( ieee_support_datatype(z1) ) then
print *,' 128 bit IEEE support'
print *,' inf ' , ieee_support_inf(z1)
print *,' nan ' , ieee_support_nan(z1)
print *,' 1/0 finite',ieee_is_finite(zinfinite)
print *,' 0/0 nan',ieee_is_nan(znan)
endif
end program ch3406
generates the following compilation message
d:\document\fortran\third_edition\examples>gfortran ch3406.f90
ch3406.f90:50.26:
print *,' 1/0 finite',ieee_is_finite(zinfinite)
1
Error: There is no specific function for the generic 'ieee_is_finite' at (1)
ch3406.f90:51.23:
print *,' 0/0 nan',ieee_is_nan(znan)
1
Error: There is no specific function for the generic 'ieee_is_nan' at (1)
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/64022] [F2003][IEEE] ieee_support_flag does not handle kind=10 and kind=16 REAL variables
2014-11-22 8:58 [Bug fortran/64022] New: [F2003][IEEE] ieee_support_flag does not handle kind=10 and kind=16 REAL variables burnus at gcc dot gnu.org
2014-11-28 13:10 ` [Bug fortran/64022] " fxcoudert at gcc dot gnu.org
@ 2015-04-22 12:02 ` jakub at gcc dot gnu.org
2015-07-16 9:16 ` rguenth at gcc dot gnu.org
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-04-22 12:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64022
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|5.0 |5.2
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 5.1 has been released.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/64022] [F2003][IEEE] ieee_support_flag does not handle kind=10 and kind=16 REAL variables
2014-11-22 8:58 [Bug fortran/64022] New: [F2003][IEEE] ieee_support_flag does not handle kind=10 and kind=16 REAL variables burnus at gcc dot gnu.org
2014-11-28 13:10 ` [Bug fortran/64022] " fxcoudert at gcc dot gnu.org
2015-04-22 12:02 ` jakub at gcc dot gnu.org
@ 2015-07-16 9:16 ` rguenth at gcc dot gnu.org
2015-08-04 7:27 ` fxcoudert at gcc dot gnu.org
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-07-16 9:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64022
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|5.2 |5.3
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 5.2 is being released, adjusting target milestone to 5.3.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/64022] [F2003][IEEE] ieee_support_flag does not handle kind=10 and kind=16 REAL variables
2014-11-22 8:58 [Bug fortran/64022] New: [F2003][IEEE] ieee_support_flag does not handle kind=10 and kind=16 REAL variables burnus at gcc dot gnu.org
` (2 preceding siblings ...)
2015-07-16 9:16 ` rguenth at gcc dot gnu.org
@ 2015-08-04 7:27 ` fxcoudert at gcc dot gnu.org
2015-08-04 15:08 ` hjl.tools at gmail dot com
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: fxcoudert at gcc dot gnu.org @ 2015-08-04 7:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64022
--- Comment #5 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> ---
Author: fxcoudert
Date: Tue Aug 4 07:27:19 2015
New Revision: 226548
URL: https://gcc.gnu.org/viewcvs?rev=226548&root=gcc&view=rev
Log:
PR fortran/64022
* simplify.c (gfc_simplify_ieee_selected_real_kind): Extend IEEE
support to all real kinds.
* ieee/ieee_exceptions.F90: Support all real kinds.
* ieee/ieee_arithmetic.F90: Likewise.
* ieee/ieee_helper.c (ieee_class_helper_10,
ieee_class_helper_16): New functions
* gfortran.map (GFORTRAN_1.7): Add entries.
* gfortran.dg/ieee/ieee_7.f90: Adjust test.
* gfortran.dg/ieee/large_1.f90: New test.
Added:
trunk/gcc/testsuite/gfortran.dg/ieee/large_1.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/simplify.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gfortran.dg/ieee/ieee_7.f90
trunk/libgfortran/ChangeLog
trunk/libgfortran/gfortran.map
trunk/libgfortran/ieee/ieee_arithmetic.F90
trunk/libgfortran/ieee/ieee_exceptions.F90
trunk/libgfortran/ieee/ieee_helper.c
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/64022] [F2003][IEEE] ieee_support_flag does not handle kind=10 and kind=16 REAL variables
2014-11-22 8:58 [Bug fortran/64022] New: [F2003][IEEE] ieee_support_flag does not handle kind=10 and kind=16 REAL variables burnus at gcc dot gnu.org
` (3 preceding siblings ...)
2015-08-04 7:27 ` fxcoudert at gcc dot gnu.org
@ 2015-08-04 15:08 ` hjl.tools at gmail dot com
2015-08-04 15:18 ` kargl at gcc dot gnu.org
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: hjl.tools at gmail dot com @ 2015-08-04 15:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64022
--- Comment #6 from H.J. Lu <hjl.tools at gmail dot com> ---
I am seeing:
FAIL: gfortran.dg/ieee/large_1.f90 -O0 (test for excess errors)
FAIL: gfortran.dg/ieee/large_1.f90 -O1 (test for excess errors)
FAIL: gfortran.dg/ieee/large_1.f90 -O2 (test for excess errors)
FAIL: gfortran.dg/ieee/large_1.f90 -O3 -fomit-frame-pointer -funroll-loops
-fpeel-loops -ftracer -finline-functions (test for excess errors)
FAIL: gfortran.dg/ieee/large_1.f90 -O3 -g (test for excess errors)
FAIL: gfortran.dg/ieee/large_1.f90 -Os (test for excess errors)
on Fedora 22/x86.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/64022] [F2003][IEEE] ieee_support_flag does not handle kind=10 and kind=16 REAL variables
2014-11-22 8:58 [Bug fortran/64022] New: [F2003][IEEE] ieee_support_flag does not handle kind=10 and kind=16 REAL variables burnus at gcc dot gnu.org
` (4 preceding siblings ...)
2015-08-04 15:08 ` hjl.tools at gmail dot com
@ 2015-08-04 15:18 ` kargl at gcc dot gnu.org
2015-08-04 16:06 ` fxcoudert at gcc dot gnu.org
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: kargl at gcc dot gnu.org @ 2015-08-04 15:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64022
kargl at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kargl at gcc dot gnu.org
--- Comment #7 from kargl at gcc dot gnu.org ---
(In reply to H.J. Lu from comment #6)
> I am seeing:
>
> FAIL: gfortran.dg/ieee/large_1.f90 -O0 (test for excess errors)
> FAIL: gfortran.dg/ieee/large_1.f90 -O1 (test for excess errors)
> FAIL: gfortran.dg/ieee/large_1.f90 -O2 (test for excess errors)
> FAIL: gfortran.dg/ieee/large_1.f90 -O3 -fomit-frame-pointer -funroll-loops
> -fpeel-loops -ftracer -finline-functions (test for excess errors)
> FAIL: gfortran.dg/ieee/large_1.f90 -O3 -g (test for excess errors)
> FAIL: gfortran.dg/ieee/large_1.f90 -Os (test for excess errors)
>
> on Fedora 22/x86.
So, what is the the log file? We can't see
inside your computer or head!
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/64022] [F2003][IEEE] ieee_support_flag does not handle kind=10 and kind=16 REAL variables
2014-11-22 8:58 [Bug fortran/64022] New: [F2003][IEEE] ieee_support_flag does not handle kind=10 and kind=16 REAL variables burnus at gcc dot gnu.org
` (5 preceding siblings ...)
2015-08-04 15:18 ` kargl at gcc dot gnu.org
@ 2015-08-04 16:06 ` fxcoudert at gcc dot gnu.org
2015-08-06 8:39 ` fxcoudert at gcc dot gnu.org
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: fxcoudert at gcc dot gnu.org @ 2015-08-04 16:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64022
--- Comment #8 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> ---
(In reply to H.J. Lu from comment #6)
> FAIL: gfortran.dg/ieee/large_1.f90 -O0 (test for excess errors)
This is fixed by the following patch, waiting for approval:
https://gcc.gnu.org/ml/gcc-patches/2015-08/msg00124.html
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/64022] [F2003][IEEE] ieee_support_flag does not handle kind=10 and kind=16 REAL variables
2014-11-22 8:58 [Bug fortran/64022] New: [F2003][IEEE] ieee_support_flag does not handle kind=10 and kind=16 REAL variables burnus at gcc dot gnu.org
` (6 preceding siblings ...)
2015-08-04 16:06 ` fxcoudert at gcc dot gnu.org
@ 2015-08-06 8:39 ` fxcoudert at gcc dot gnu.org
2015-08-06 20:55 ` fxcoudert at gcc dot gnu.org
2015-08-10 5:14 ` uros at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: fxcoudert at gcc dot gnu.org @ 2015-08-06 8:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64022
--- Comment #9 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> ---
Author: fxcoudert
Date: Thu Aug 6 08:38:59 2015
New Revision: 226665
URL: https://gcc.gnu.org/viewcvs?rev=226665&root=gcc&view=rev
Log:
PR fortran/64022
* gfortran.dg/ieee/large_1.f90: Adjust test.
Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gfortran.dg/ieee/large_1.f90
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/64022] [F2003][IEEE] ieee_support_flag does not handle kind=10 and kind=16 REAL variables
2014-11-22 8:58 [Bug fortran/64022] New: [F2003][IEEE] ieee_support_flag does not handle kind=10 and kind=16 REAL variables burnus at gcc dot gnu.org
` (7 preceding siblings ...)
2015-08-06 8:39 ` fxcoudert at gcc dot gnu.org
@ 2015-08-06 20:55 ` fxcoudert at gcc dot gnu.org
2015-08-10 5:14 ` uros at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: fxcoudert at gcc dot gnu.org @ 2015-08-06 20:55 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64022
Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Version|5.0 |6.0
Resolution|--- |FIXED
--- Comment #11 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> ---
Fixed on trunk.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/64022] [F2003][IEEE] ieee_support_flag does not handle kind=10 and kind=16 REAL variables
2014-11-22 8:58 [Bug fortran/64022] New: [F2003][IEEE] ieee_support_flag does not handle kind=10 and kind=16 REAL variables burnus at gcc dot gnu.org
` (8 preceding siblings ...)
2015-08-06 20:55 ` fxcoudert at gcc dot gnu.org
@ 2015-08-10 5:14 ` uros at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: uros at gcc dot gnu.org @ 2015-08-10 5:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64022
--- Comment #12 from uros at gcc dot gnu.org ---
Author: uros
Date: Mon Aug 10 05:13:01 2015
New Revision: 226755
URL: https://gcc.gnu.org/viewcvs?rev=226755&root=gcc&view=rev
Log:
PR fortran/64022
* gfortran.dg/ieee/large_4.f90: New test.
Added:
trunk/gcc/testsuite/gfortran.dg/ieee/large_4.f90
Modified:
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2015-08-10 5:14 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-22 8:58 [Bug fortran/64022] New: [F2003][IEEE] ieee_support_flag does not handle kind=10 and kind=16 REAL variables burnus at gcc dot gnu.org
2014-11-28 13:10 ` [Bug fortran/64022] " fxcoudert at gcc dot gnu.org
2015-04-22 12:02 ` jakub at gcc dot gnu.org
2015-07-16 9:16 ` rguenth at gcc dot gnu.org
2015-08-04 7:27 ` fxcoudert at gcc dot gnu.org
2015-08-04 15:08 ` hjl.tools at gmail dot com
2015-08-04 15:18 ` kargl at gcc dot gnu.org
2015-08-04 16:06 ` fxcoudert at gcc dot gnu.org
2015-08-06 8:39 ` fxcoudert at gcc dot gnu.org
2015-08-06 20:55 ` fxcoudert at gcc dot gnu.org
2015-08-10 5:14 ` uros at gcc dot gnu.org
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).