#!/bin/sh
set -ue
cd $ADTTMP

cat << EOF > tmp.f
        Program LinearEquations
        Implicit none
        Real*4 A(3,3), b(3)
        integer i, j, pivot(3), ok
        call SGESV(9, 1, A, 3, pivot, b, 3, ok)
        end


        SUBROUTINE XERBLA(srcname, info)
        PRINT *,'OVERRIDE SUCCESSFUL'
        RETURN
        END
EOF
gfortran tmp.f -llapack
./a.out 2>&1 | grep "OVERRIDE SUCCESSFUL"

