From 8ebf4c8f615220cb0102d62358245b5fa883b169 Mon Sep 17 00:00:00 2001 From: NAKATA Maho Date: Sat, 24 Oct 2026 20:37:41 +0900 Subject: [PATCH] Fix real norm workspace arguments in CGECXX and ZGECXX CLANGE and ZLANGE require real WORK arrays; pass RWORK rather than the complex WORK array when computing FNRMK. Their Frobenius-norm paths do not reference the workspace, so this corrects the Fortran interface without changing the numerical algorithm. Checked all four precisions: the real callers already have the correct types. Same-unit caller/callee compilation rejects C/Z before the patch and accepts all four after it. Native query and numerical smoke checks passed 96 cases per version (before and after). --- SRC/cgecxx.f | 2 +- SRC/zgecxx.f | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/SRC/cgecxx.f b/SRC/cgecxx.f index 7bda3deda5..70b300351f 100644 --- a/SRC/cgecxx.f +++ b/SRC/cgecxx.f @@ -1627,7 +1627,7 @@ SUBROUTINE CGECXX( FACT, USESD, M, N, * IF( MIN( MRESID, NRESID ).NE.0 ) THEN FNRMK = CLANGE( 'F', MRESID, NRESID, A( K+1, K+1 ), - $ LDA, WORK ) + $ LDA, RWORK ) ELSE FNRMK = ZERO END IF diff --git a/SRC/zgecxx.f b/SRC/zgecxx.f index 851c5020d2..f764676c3f 100644 --- a/SRC/zgecxx.f +++ b/SRC/zgecxx.f @@ -1629,7 +1629,7 @@ SUBROUTINE ZGECXX( FACT, USESD, M, N, * IF( MIN( MRESID, NRESID ).NE.0 ) THEN FNRMK = ZLANGE( 'F', MRESID, NRESID, A( K+1, K+1 ), - $ LDA, WORK ) + $ LDA, RWORK ) ELSE FNRMK = ZERO END IF