PR ipa/83051
[official-gcc.git] / gcc / testsuite / gfortran.dg / kind_1.f90
blob3230bfa5f6432617b51980242550c2ed753e84ac
1 ! { dg-do compile }
3 ! PR 63363: No diagnostic for passing function as actual argument to KIND
5 ! Contributed by Ian Harvey <ian_harvey@bigpond.com>
7 type :: t
8 end type
9 type(t) :: d
10 class(*), allocatable :: c
12 print *, KIND(d) ! { dg-error "must be of intrinsic type" }
13 print *, KIND(c) ! { dg-error "must be of intrinsic type" }
15 print *, KIND(f) ! { dg-error "must be a data entity" }
16 print *, KIND(f())
17 print *, KIND(s) ! { dg-error "must be a data entity" }
18 contains
19 FUNCTION f()
20 INTEGER(SELECTED_INT_KIND(4)) :: f
21 END FUNCTION
22 subroutine s
23 end subroutine
24 END