Files
clang-p2996/flang/test/Semantics/dfloat.f90
peter klausler 617be2756f [flang] Support DFLOAT legacy extension intrinsic function
Like the similar legacy extension FLOAT(), DFLOAT() represents a
conversion from default integer to DOUBLE PRECISION.  Rewrite
into a conversion operation.

Differential Revision: https://reviews.llvm.org/D107489
2021-08-04 12:18:41 -07:00

16 lines
423 B
Fortran

! RUN: %flang_fc1 -fdebug-unparse %s 2>&1 | FileCheck %s
! Checks that a call to the legacy extension intrinsic function
! DFLOAT is transmogrified into a type conversion operation.
module m
!CHECK: d = 1._8
double precision :: d = dfloat(1)
contains
subroutine sub(n)
integer, intent(in) :: n
!CHECK: 2._8
print *, dfloat(2)
!CHECK: real(n,kind=8)
print *, dfloat(n)
end subroutine
end module