1! { dg-do compile } 2! test levenshtein based spelling suggestions 3 4module 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 17end module mymod1 18 19function myadd(iarg1, iarg2) 20 implicit none 21 integer :: myadd 22 integer, intent(in) :: iarg1, iarg2 23 myadd = iarg1 + iarg2 24end function myadd 25 26program spellchekc 27 use mymod1, something_good => something_else 28 implicit none 29 30 integer :: myadd, i, j, myvar 31 i = 0 32 j = 0 33 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 40 41end program spellchekc 42