PR tree-optimization/86415 - strlen() not folded for substrings within constant arrays
[official-gcc.git] / gcc / testsuite / gfortran.dg / end_subroutine_2.f90
blob8f2e3d10a1354c84a387b5406b2ebbc3fb06f345
1 ! { dg-do compile }
2 ! { dg-options "-std=f2003" }
4 program main
5 interface
6 subroutine foo()
7 end
8 integer function bar()
9 end
10 end interface
11 contains
12 subroutine test()
13 end ! { dg-error "Fortran 2008: END statement instead of END SUBROUTINE" }
14 end subroutine ! To silence successive errors
15 end program
17 subroutine test2()
18 contains
19 integer function f()
20 f = 42
21 end ! { dg-error "Fortran 2008: END statement instead of END FUNCTION" }
22 end function ! To silence successive errors
23 end subroutine test2