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