Debian Codegraph @

gcc/testsuite/gfortran.dg/result_in_spec_4.f90

raw
1 ! { dg-do compile }
2 !
3 ! PR fortran/49648
4 ! ICE for calls to a use-associated function returning an array whose spec
5 ! depends on a function call.
6
7 ! Contributed by Tobias Burnus <[email protected]>
8
9 module m2
10 COMPLEX, SAVE, ALLOCATABLE :: P(:)
11 contains
12 FUNCTION getPhaseMatrix() RESULT(PM)
13 COMPLEX:: PM(SIZE(P),3)
14 PM=0.0
15 END FUNCTION
16 end module m2
17
18 module m
19 use m2
20 contains
21 SUBROUTINE gf_generateEmbPot()
22 COMPLEX :: sigma2(3,3)
23 sigma2 = MATMUL(getPhaseMatrix(), sigma2)
24 END SUBROUTINE
25 end module m