```01:       SUBROUTINE DLAG2S( M, N, A, LDA, SA, LDSA, INFO )
02: *
03: *  -- LAPACK PROTOTYPE auxiliary routine (version 3.1.2) --
04: *     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
05: *     August 2007
06: *
07: *     ..
08: *     .. Scalar Arguments ..
09:       INTEGER            INFO, LDA, LDSA, M, N
10: *     ..
11: *     .. Array Arguments ..
12:       REAL               SA( LDSA, * )
13:       DOUBLE PRECISION   A( LDA, * )
14: *     ..
15: *
16: *  Purpose
17: *  =======
18: *
19: *  DLAG2S converts a DOUBLE PRECISION matrix, SA, to a SINGLE
20: *  PRECISION matrix, A.
21: *
22: *  RMAX is the overflow for the SINGLE PRECISION arithmetic
23: *  DLAG2S checks that all the entries of A are between -RMAX and
24: *  RMAX. If not the convertion is aborted and a flag is raised.
25: *
26: *  This is an auxiliary routine so there is no argument checking.
27: *
28: *  Arguments
29: *  =========
30: *
31: *  M       (input) INTEGER
32: *          The number of lines of the matrix A.  M >= 0.
33: *
34: *  N       (input) INTEGER
35: *          The number of columns of the matrix A.  N >= 0.
36: *
37: *  A       (input) DOUBLE PRECISION array, dimension (LDA,N)
38: *          On entry, the M-by-N coefficient matrix A.
39: *
40: *  LDA     (input) INTEGER
41: *          The leading dimension of the array A.  LDA >= max(1,M).
42: *
43: *  SA      (output) REAL array, dimension (LDSA,N)
44: *          On exit, if INFO=0, the M-by-N coefficient matrix SA; if
45: *          INFO>0, the content of SA is unspecified.
46: *
47: *  LDSA    (input) INTEGER
48: *          The leading dimension of the array SA.  LDSA >= max(1,M).
49: *
50: *  INFO    (output) INTEGER
51: *          = 0:  successful exit.
52: *          = 1:  an entry of the matrix A is greater than the SINGLE
53: *                PRECISION overflow threshold, in this case, the content
54: *                of SA in exit is unspecified.
55: *
56: *  =========
57: *
58: *     .. Local Scalars ..
59:       INTEGER            I, J
60:       DOUBLE PRECISION   RMAX
61: *     ..
62: *     .. External Functions ..
63:       REAL               SLAMCH
64:       EXTERNAL           SLAMCH
65: *     ..
66: *     .. Executable Statements ..
67: *
68:       RMAX = SLAMCH( 'O' )
69:       DO 20 J = 1, N
70:          DO 10 I = 1, M
71:             IF( ( A( I, J ).LT.-RMAX ) .OR. ( A( I, J ).GT.RMAX ) ) THEN
72:                INFO = 1
73:                GO TO 30
74:             END IF
75:             SA( I, J ) = A( I, J )
76:    10    CONTINUE
77:    20 CONTINUE
78:       INFO = 0
79:    30 CONTINUE
80:       RETURN
81: *
82: *     End of DLAG2S
83: *
84:       END
85: ```