    INTEGER          IWORK(LIWORK)
      DOUBLE PRECISION A(LDA,NMAX), AS(LDA,NMAX), DWORK(LDWORK),
     $                 G(LDG,NMAX), Q(LDQ,NMAX), T(LDT,NMAX),
     $                 U(LDU,NMAX), X(LDX,NMAX)
*     .. External Functions ..
      LOGICAL          LSAME, SELECT
      EXTERNAL         LSAME, SELECT
*     .. External Subroutines ..
      EXTERNAL         DGEES, DGESV, DLACPY, DLASET, DSWAP, DSYMM,
     $                 MA02AD, MA02ED, MB01RU, SB02MD, SB02SD
*     .. Executable Statements ..
*