Skip to content
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

bug in rectify.py #249

Closed
skdebray opened this issue May 31, 2019 · 2 comments
Closed

bug in rectify.py #249

skdebray opened this issue May 31, 2019 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@skdebray
Copy link
Contributor

The code for AST fixup (rectify.py) does not correctly handle user-defined functions in the Fortran source. For example, given the following program:

      integer function foo(x)
      implicit none
      integer x
      foo = x + 1234567      ! return value of the function
      end function foo

      program main
      integer u, foo
      u = foo(3)
 10   format(I8)
      write (*,10) u
      end program main

the output from rectify.py has only the following line for the function foo(), i.e., the body of foo() is missing:

    <function name="foo" />

and grep 123456 <rectified-file-name> is empty.

@skdebray skdebray added the bug Something isn't working label May 31, 2019
@hlim1
Copy link
Contributor

hlim1 commented Jun 1, 2019

I've fixed the issue and made a pull request.
The fix was made in both rectify.py and pyTranslate.py.

@hlim1
Copy link
Contributor

hlim1 commented Jun 2, 2019

Bug has been fixed. Closing this issue.

@hlim1 hlim1 closed this as completed Jun 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants