2017-11-05 Paul Thomas <pault@gcc.gnu.org>
[official-gcc.git] / gcc / testsuite / gfortran.dg / spellcheck-procedure_2.f90
bloba6ea5f9f280e1ff16c28fdb991734b5362ee2c11
1 ! { dg-do compile }
2 ! test levenshtein based spelling suggestions
5 program spellchekc
6 implicit none (external) ! { dg-warning "GNU Extension: IMPORT NONE with spec list" }
8 interface
9 subroutine bark_unless_zero(iarg)
10 implicit none
11 integer, intent(in) :: iarg
12 end subroutine bark_unless_zero
13 end interface
15 integer :: i
16 i = 0
18 if (i /= 1) call abort
19 call bark_unless_0(i) ! { dg-error "not explicitly declared; did you mean .bark_unless_zero.\\?" }
20 ! call complain_about_0(i) ! { -dg-error "not explicitly declared; did you mean .complain_about_zero.\\?" }
22 contains
23 ! We cannot reliably see this ATM, would need an unambiguous bit somewhere
24 subroutine complain_about_zero(iarg)
25 integer, intent(in) :: iarg
26 if (iarg /= 0) call abort
27 end subroutine complain_about_zero
29 end program spellchekc
31 subroutine bark_unless_zero(iarg)
32 implicit none
33 integer, intent(in) :: iarg
34 if (iarg /= 0) call abort
35 end subroutine bark_unless_zero