jrheller/kdtree2 — pull request #1 by hbjusa (2014-01-27 17:46:16+00:00)
Title: Fix f90 global

Here is a patch to the f90 code that fixes an issue which can cause the module to return incorrect values. The problem is the use of a module global result variable. When certain compilers are used with optimization turned on, the global variable can be overwritten by different threads of an unrolled loop (or something like that). This patch fixes the problem by eliminating the global variable and defining the result locally in the routines where it is needed. The other minor changes are to whitespace in the source, so that it can compile more easily on different compilers.