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

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).