nvptx, libgfortran: Switch out of "minimal" mode
[official-gcc.git] / gcc / testsuite / gfortran.dg / pr67884.f90
blobd50264240b33ccc14ab7c9e703c8c6e1a6536477
1 ! { dg-do compile }
2 ! PR fortran/67884
3 ! Original code contribute by Gerhard Steinmetz
4 program p
5 integer i
6 print *, [(f(i), i=1,3)]
7 print *, [(g(i), i=1,3)]
8 contains
9 function f(n) ! { dg-error "has a deferred type parameter" }
10 integer :: n
11 character(:) :: f
12 character(3) :: c = 'abc'
13 f = c(n:n)
14 end
15 function g(n) result(z) ! { dg-error "has a deferred type parameter" }
16 integer :: n
17 character(:) :: z
18 character(3) :: c = 'abc'
19 z = c(n:n)
20 end
21 end program p