Debian Codegraph @

gcc/testsuite/gfortran.dg/whole_file_8.f90

raw
1 ! { dg-do compile }
2 ! Test the fix for the third problem in PR40011, where false
3 ! type/rank mismatches were found in the main program calls.
4 !
5 ! Contributed by Dominique d'Humieres <[email protected]>
6 !
7 subroutine test_d(fn, val, res)
8 double precision fn
9 double precision val, res
10
11 print *, fn(val), res
12 end subroutine
13
14 subroutine test_c(fn, val, res)
15 complex fn
16 complex val, res
17
18 print *, fn(val), res
19 end subroutine
20
21 program specifics
22
23 intrinsic dcos
24 intrinsic dcosh
25 intrinsic dexp
26
27 intrinsic conjg
28
29 call test_d (dcos, 1d0, dcos(1d0))
30 call test_d (dcosh, 1d0, dcosh(1d0))
31 call test_d (dexp, 1d0, dexp(1d0))
32
33 call test_c (conjg, (1.0,1.0) , conjg((1.0,1.0)))
34
35 end program