PR ipa/83051
[official-gcc.git] / gcc / testsuite / gfortran.dg / result_in_spec_4.f90
blob5228b9b84291a82e99f3f4d0e503f58713c0c867
1 ! { dg-do compile }
3 ! PR fortran/49648
4 ! ICE for calls to a use-associated function returning an array whose spec
5 ! depends on a function call.
7 ! Contributed by Tobias Burnus <burnus@net-b.de>
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
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