Debian Codegraph @

gcc/testsuite/gfortran.dg/end_subroutine_2.f90

raw
1 ! { dg-do compile }
2 ! { dg-options "-std=f2003" }
3 !
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
16
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
24