Compiler error with ifort 17.0.0 on pastixf.f90
Hi,
PaStiX rev "master 628bc7b2" fails to build, producing the compiler error below on file pastixf.f90. The Fortran compiler used is Intel ifort 17.0.0.
Building Fortran object wrappers/fortran90/CMakeFiles/pastixf.dir/src/pastixf.f90.o
/home/cvtoauma/Linalg/pastix.git/wrappers/fortran90/src/pastixf.f90(548): error #8011: A pointer dummy argument with the
INTENT(IN) attribute shall not appear as an actual argument if the associated dummy argument has the INTENT(OUT) or INTENT(INOUT)
attribute. [FILENAME]
call c_f_pointer(filename_aux, filename)
-----------------------------------^
compilation aborted for /home/cvtoauma/Linalg/pastix.git/wrappers/fortran90/src/pastixf.f90 (code 1)
The following patch seems to fix the issue (the compiler seems to assume that all the arguments of pointed functions are inout):
diff --git a/wrappers/fortran90/src/pastixf.f90 b/wrappers/fortran90/src/pastixf.f90
index ee1fc94..72c6787 100644
--- a/wrappers/fortran90/src/pastixf.f90
+++ b/wrappers/fortran90/src/pastixf.f90
@@ -538,7 +538,7 @@ contains
real(kind=c_double), intent(inout), dimension(dparm_size), target :: dparm
integer(kind=c_int), intent(inout), target :: check
integer(c_int), intent(inout), target :: driver
- character(kind=c_char), intent(in), pointer :: filename
+ character(kind=c_char), intent(inout), pointer :: filename
type(c_ptr) :: argv_aux
type(c_ptr) :: filename_aux
Best regards,
Olivier