You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
! -*- f90 -*-
! Note: the context of this file is case sensitive.
python module testnl !in
interface ! in :testnl
module Test_Module ! in :testnl:test_f2py_intent.f90
subroutine Test_Routine(len_fname,fname,iStat) !in :testnl:test_f2py_intent.f90:Test_Module
integer, optional,check(len(fname)>=len_fname),depend(fname) :: len_fname=len(fname)
character dimension(len_fname) :: fname
integer :: iStat
end subroutine Test_Routine
end module Test_Module
end interface
end python module testnl
! This file was auto-generated with f2py (version:1.21.2).
! See http://cens.ioc.ee/projects/f2py2e/
--no-lower isn't actually doing what is expected (i.e. things are still in scream-case). Also, although the intent specs are present, they are also mangled.
! -*- f90 -*-
! Note: the context of this file is case sensitive.
python module testnl ! in
interface ! in :testnl
module test_module ! in :testnl:repro.f90
subroutine test_routine(len_fname,fname,istat) ! in :testnl:repro.f90:test_module
integer, optional,intent(in),check(shape(fname, 0) == len_fname),depend(fname) :: len_fname=shape(fname, 0)
character dimension(len_fname),intent(in) :: fname
integer intent(out) :: istat
end subroutine test_routine
end module test_module
end interface
end python module testnl
! This file was auto-generated with f2py (version:1.23.0.dev0+1087.g0eaa40db3).
! See:
! https://web.archive.org/web/20140822061353/http://cens.ioc.ee/projects/f2py2e
Note that the istat variable gets integer intent(out) :: istat instead of integer, intent(out).
Then again, it also is unclear why it is valid to pass --no-lower to what is clearly not F77 code (module / bind(c) are both F90 features). A warning should be issued.
Describe the issue:
f2py generation of .pyf files works with default options but loses the intent specs when --no-lower is specified
See example below, its missing intent specs. If run without the --no-lower option it works fine.
Reproduce the code example:
Error message:
NumPy/Python version information:
1.21.2 3.7.11 (default, Jul 27 2021, 09:42:29) [MSC v.1916 64 bit (AMD64)]
The text was updated successfully, but these errors were encountered: