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
This is in part due to the fact that the bind(c) attribute is part of the Fortran 2003 standard and the snippet is not valid Fortran 2003. The function must be in a module that uses the iso_c_binding module. A valid minimum failing example would be:
module mfe
use iso_c_binding
implicit none
contains
function wat(x, y) result(z) bind(c, name='wat')
integer(c_int), intent(in) :: x, y
integer(c_int) :: z
z = x + 7
end function wat
end module mfe
This compiles happily with gfortran on macOS 10.12.6 However, this still throw an assertion error with NumPy 1.13.3
I get the same error in both Python 3.6 and 2.7 installed from MacPorts. I cloned the repo and managed to build tags v1.6.0 and v1.7.0 against the native Python (2.7), but I still get the error.
So, is this a user error trying to parse the source using f2py.crackfortran.crackfortran or a parer error as referenced in the closed issue? Are there any other tags where this was to have been fixed?
Update: Fixed the attributes to properly declare the types of the arguments.
Related to #2275 (I opened a new issue per @charris request).
See this gist for a repro. Observed with
numpy==1.13.1
in Python 3.6. The source causing a failure is:The text was updated successfully, but these errors were encountered: