Description: Fix NaN propagation in DCOMBSSQ and SCOMBSSQ
 Backported upon request from Jeroen Ooms, needed for R 4.0.
Origin: backport, https://github.com/Reference-LAPACK/lapack/pull/390
Last-Update: 2020-04-02
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/SRC/dcombssq.f
+++ b/SRC/dcombssq.f
@@ -80,6 +80,8 @@
       IF( V1( 1 ).GE.V2( 1 ) ) THEN
          IF( V1( 1 ).NE.ZERO ) THEN
             V1( 2 ) = V1( 2 ) + ( V2( 1 ) / V1( 1 ) )**2 * V2( 2 )
+         ELSE
+            V1( 2 ) = V1( 2 ) + V2( 2 )
          END IF
       ELSE
          V1( 2 ) = V2( 2 ) + ( V1( 1 ) / V2( 1 ) )**2 * V1( 2 )
--- a/SRC/scombssq.f
+++ b/SRC/scombssq.f
@@ -80,6 +80,8 @@
       IF( V1( 1 ).GE.V2( 1 ) ) THEN
          IF( V1( 1 ).NE.ZERO ) THEN
             V1( 2 ) = V1( 2 ) + ( V2( 1 ) / V1( 1 ) )**2 * V2( 2 )
+         ELSE
+            V1( 2 ) = V1( 2 ) + V2( 2 )
          END IF
       ELSE
          V1( 2 ) = V2( 2 ) + ( V1( 1 ) / V2( 1 ) )**2 * V1( 2 )
