Commit 1daf95b
Fix use of uninitialized FT in s_TSat Newton loop
The do while condition checked abs(FT) before FT was ever assigned.
Fortran .or. is not short-circuit, so abs(FT) was always evaluated
on the first iteration even though (ns == 0) guaranteed loop entry.
Restructure to do...exit: compute FT first, then check convergence.
Logically identical, no uninitialized reads, no intrinsics, safe on
all GPU device compilers (exit maps to a plain conditional branch).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent a2c4d1d commit 1daf95b
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
717 | 717 | | |
718 | 718 | | |
719 | 719 | | |
720 | | - | |
| 720 | + | |
721 | 721 | | |
722 | 722 | | |
723 | 723 | | |
| |||
738 | 738 | | |
739 | 739 | | |
740 | 740 | | |
| 741 | + | |
741 | 742 | | |
742 | 743 | | |
743 | 744 | | |
| |||
0 commit comments