summaryrefslogtreecommitdiffstats
path: root/test cases/fortran/9 cpp/fortran.f
blob: 255872c9160e5aaf1d48148edd1adba7f6662db1 (plain)
1
2
3
4
5
6
7
8
9
10
11
      function fortran() bind(C)
      use, intrinsic :: iso_c_binding, only: dp=>c_double
      implicit none

      real(dp) :: r, fortran

      call random_number(r)

      fortran = 2._dp**r

      end function fortran