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

kargl at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P4
                 CC|                            |kargl at gcc dot gnu.org

--- Comment #1 from kargl at gcc dot gnu.org ---
Confirmed, although the original code uses an extension, REAL*4.

This is a better testcase.

program test

   implicit none

   integer, parameter :: k = kind(1.e0)    ! This works.
!   integer, parameter :: k = kind(1.d0)   ! This gives error. See F2018:C1519

!   intrinsic abs, acos    ! This is needed, but should not be.

   procedure(real(k)), pointer :: pf => ABS

!   intrinsic abs, acos    ! Or, this is needed, but should not be.

   print *, pf(-6.5_k)
   if(pf(-6.5_k) /= ABS(-6.5_k)) STOP 1

   pf => ACOS
   print '(Z8.8)', pf(0.54030231_k)

   ! Never a good idea to check equality of floating-pointing entities.
   if (abs(pf(0.54030231_k) - ACOS(0.54030231_k)) > 1e-7) STOP 2

   print *, 'PASS'

end program

Reply via email to