annotate gcc/testsuite/gfortran.dg/use_12.f90 @ 132:d34655255c78

update gcc-8.2
author mir3636
date Thu, 25 Oct 2018 10:21:07 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 ! { dg-do compile }
kono
parents:
diff changeset
2 ! { dg-options "-Wreturn-type" }
kono
parents:
diff changeset
3 ! Tests the fix of PR34545, in which the 'numclusters' that determines the size
kono
parents:
diff changeset
4 ! of fnres was not properly associated.
kono
parents:
diff changeset
5 !
kono
parents:
diff changeset
6 ! Reported by Jon D. Richards <jon_d_r@msn.com>
kono
parents:
diff changeset
7 !
kono
parents:
diff changeset
8 module m1
kono
parents:
diff changeset
9 integer :: numclusters = 2
kono
parents:
diff changeset
10 end module m1
kono
parents:
diff changeset
11
kono
parents:
diff changeset
12 module m2
kono
parents:
diff changeset
13 contains
kono
parents:
diff changeset
14 function get_nfirst( ) result(fnres) ! { dg-warning "not set" }
kono
parents:
diff changeset
15 use m1, only: numclusters
kono
parents:
diff changeset
16 real :: fnres(numclusters) ! change to REAL and it works!!
kono
parents:
diff changeset
17 end function get_nfirst
kono
parents:
diff changeset
18 end module m2
kono
parents:
diff changeset
19
kono
parents:
diff changeset
20 program kmeans_driver
kono
parents:
diff changeset
21 use m1
kono
parents:
diff changeset
22 use m2
kono
parents:
diff changeset
23 integer :: nfirst(3)
kono
parents:
diff changeset
24 nfirst(1:numclusters) = get_nfirst( )
kono
parents:
diff changeset
25 end program kmeans_driver