On the eigenvalues of matrices with prescribed upper triangular part