PR middle-end/77674
[official-gcc.git] / gcc / testsuite / gfortran.dg / implicit_4.f90
blobda8da9643c65d4c1086f9389cf1d08cfa71fd72e
1 ! { dg-do compile }
2 ! Verify error diagnosis for invalid combinations of IMPLICIT statements
3 IMPLICIT NONE
4 IMPLICIT NONE ! { dg-error "Duplicate" }
5 END
7 SUBROUTINE a
8 IMPLICIT REAL(b-j)
9 implicit none ! { dg-error "IMPLICIT NONE .type. statement at .1. following an IMPLICIT statement" }
10 END SUBROUTINE a
12 subroutine b
13 implicit none
14 implicit real(g-k) ! { dg-error "IMPLICIT statement at .1. following an IMPLICIT NONE .type. statement" }
15 end subroutine b
17 subroutine c
18 implicit real(a-b)
19 implicit integer (b-c) ! { dg-error "already" }
20 implicit real(d-f), complex(f-g) ! { dg-error "already" }
21 end subroutine c