PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gfortran.dg / spellcheck-procedure_1.f90
blob2afce4a1dc7ec10d6c50b3609b8209c80931fef0
1 ! { dg-do compile }
2 ! test levenshtein based spelling suggestions
4 module mymod1
5 implicit none
6 contains
7 function something_else (iarg1)
8 integer :: something_else
9 integer, intent(in) :: iarg1
10 something_else = iarg1 + 42
11 end function something_else
12 function add_fourtytwo (iarg1)
13 integer :: add_fourtytwo
14 integer, intent(in) :: iarg1
15 add_fourtytwo = iarg1 + 42
16 end function add_fourtytwo
17 end module mymod1
19 function myadd(iarg1, iarg2)
20 implicit none
21 integer :: myadd
22 integer, intent(in) :: iarg1, iarg2
23 myadd = iarg1 + iarg2
24 end function myadd
26 program spellchekc
27 use mymod1, something_good => something_else
28 implicit none
30 integer :: myadd, i, j, myvar
31 i = 0
32 j = 0
34 j = something_goof(j) ! { dg-error "no IMPLICIT type; did you mean .something_good.\\?" }
35 j = myaddd(i, j) ! { dg-error "no IMPLICIT type; did you mean .myadd.\\?" }
36 if (j /= 42) STOP 1
37 j = add_fourtytow(i, j) ! { dg-error "no IMPLICIT type; did you mean .add_fourtytwo.\\?" }
38 myval = myadd(i, j) ! { dg-error "no IMPLICIT type; did you mean .myvar.\\?" }
39 if (j /= 42 * 2) STOP 2
41 end program spellchekc