2017-10-30 0:54 GMT+01:00 Peter Dunn <pdu...@usc.edu.au>:
> Thanks for this direction.
>
> But I am still confused, as the problem persists after attending to any
> possible issue: That piece of identified code only has four variables, and I
> can account for them all.
>
> The two variables its and aimrerr are now explicitly initialised. So they
> cannot be the problem.
>
> The variables maxit and relerr are inputs to the subroutine... and both are
> explicitly initialised in the only subroutine which calls smallp. So I can’t
> see how that can be a problem. (Clearly they cannot be initialised in the
> subroutine smallp or their input values are overwritten.)

Found it. "relerr" may be uninitialised because "w" is uninitialised
in smallp (tweedie 2.2.5, line 2169).

When you try to debug this kind of things, you must track not only
explicit initialisations, but also all the assignments with possibly
uninitialised variables.

BTW, I also see:

tweedie.f:335:0:

             if ( funvalue .LT. exp(-lambda) ) then

Warning: 'lambda' may be used uninitialized in this function
[-Wmaybe-uninitialized]

Regards,
Iñaki

______________________________________________
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

Reply via email to