Closed sscalpone closed 1 month ago
@perazz Any idea what could be the problem? (I never use these compilers)
Sorry, I had not seen this issue. There is a variable in LAPACK that's named lk
which is the same name as the library's logical
kind:
One solution is to rename either variable. Probably the integer variables in LAPACK, as I guess the logical kind is used elsewhere in stdlib
One solution is to rename either variable. Probably the integer variables in LAPACK, as I guess the logical kind is used elsewhere in stdlib
I renamed the local variable in six different files. This change allowed the files to compile.
One solution is to rename either variable. Probably the integer variables in LAPACK, as I guess the logical kind is used elsewhere in stdlib
You could also "rename" inside the LAPACK module when importing it:
use stdlib_kinds, only: stdlib_lk => lk, ...
Description
There's some non-standard non-portable Fortran code at line 55569 of stdlib_linalg_lapack_s.fypp.
Forward reference to 'lk' is not allowed in the same specification part. Some compilers will allow the use of 'lk' at line 55569 to reference the outer 'lk' and then from line 55570 onward use the 'lk' that is defined on line 55570.
Expected Behaviour
The code would compile. We see an error with XLF, NAG, and LLVM flang.
Version of stdlib
33559f551d1c7f22ea2511e4f7e779e2aed410c3
Platform and Architecture
Linux
Additional Information
In the following subroutines, I changed the local declaration and all uses of 'lk' to 'llk' and things compiled fine.