I think this is related to,
- How many BLAS libraries have this error? (scroll to the last couple of messages from early 2025)
- Fortran complex dot routines error · Issue #3993 · OpenMathLib/OpenBLAS · GitHub
The easiest workaround would be to call the CBLAS version instead: GitHub - tenomoto/dotwrp: A wrapper for CBLAS *dot* functions in Accelerate framework of Mac OS X
You can also do so from Fortran:
interface
subroutine cblas_zdotc_sub(n,x,incx,y,incy,dotc) bind(c,name="cblas_zdotc_sub")
integer, value :: n, incx, incy
complex(8), intent(in) :: x(*), y(*)
complex(8), intent(out) :: dotc
end subroutine
end interface