-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
f2py fortran parsing fails in case commented line present in parameter list #2848
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I would like to attach the test and pyf files to this report. If this is possible here could anyone tell me how to do this, since this is not obvious at all to me. |
You can put them up as gists (https://gist.github.com/) or put them somewhere else and link to them. Unfortunately Github doesn't support attachments too well. |
Thanks for your help. The files are here: https://gist.github.com/4664883 |
Is this still an issue? |
yes, this issue is still present. |
python3 version gives the same error. |
#18416 contains the fix. |
BUG: Fix f2py parsing continued lines that follow comment lines.
A simple piece of valid fortran code, using commented lines in between parameters in a subroutine parameter list currently lets f2py produce bogus results.
See for example this code:
this gfortran statements compiles the code without a single warning:
>gfortran -c -Wall test.F90
When producing the signature file the following warning is shown:
In the signature file subroutine name and associated parameter list remain undefined and a bogus subroutine named unknown_subroutine without parameters is defined in stead:
after removing the 2 comments the test runs just fine:
The f2py version used for testing was: numpy-f2py-1.6.2-1.fc17.x86_64
python version was: python-2.7.3-7.2.fc17.x86_64
gfortran version was: gcc-gfortran-4.7.2-2.fc17.x86_64
executed 20-Dec-2012 on Fedora 17 (64-bit)
The text was updated successfully, but these errors were encountered: