Automatic Differentiation Built Into LFortran

For BLAS the adjoint routines have already appeared: Algorithm 1005: Fortran Subroutines for Reverse Mode Algorithmic Differentiation of BLAS Matrix Operations: ACM Transactions on Mathematical Software: Vol 46, No 1

For other matrix problems, this document may be of help. (Thanks again to @lkedward for posting it in a previous discussion.)