Debian Codegraph @

gcc/testsuite/gfortran.dg/submodule_33.f08

raw
1 ! { dg-do compile }
2 !
3 ! PR fortran/99798
4 ! This example used to trigger an ICE caused by a premature release of the G
5 ! symbol (with its argument X) following the rejection of the subroutine in
6 ! the submodule.
7
8 module m
9 interface
10 module integer function g(x)
11 integer, intent(in) :: x
12 end
13 end interface
14 end
15 submodule(m) m2
16 contains
17 subroutine g(x) ! { dg-error "FUNCTION attribute conflicts with SUBROUTINE" }
18 integer, intent(in) :: x ! { dg-error "Unexpected data declaration" }
19 end
20 end