program gfcbug43call try_fit(1)call try_fit(1)contains subroutine try_fit(k)call fit(1,debug=.true.)end subroutine try_fitsubroutine fit(k,debug)logical,intent(in),optional::debugdo j=1,2maxerr1=funk(r,x1,x1)end do if(debug)then print*,"help"end if end subroutine fitend program gfcbug43