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

F_Front: segfault when importing a function that receives an array of length returned by another function #168

Open
skosukhin opened this issue Nov 6, 2020 · 0 comments

Comments

@skosukhin
Copy link
Contributor

We have file a.f90:

MODULE A
CONTAINS
  PURE INTEGER FUNCTION get_size()
    get_size = 5
  END FUNCTION get_size

  SUBROUTINE foo(a)
    INTEGER, INTENT(IN) :: a(get_size())    
  END SUBROUTINE foo
END MODULE A

And file b.f90:

MODULE B
  USE A, ONLY: foo
END MODULE B

The following commands result in a segfault:

$F_Front a.f90 >/dev/null
$F_Front b.f90 >/dev/null
Segmentation fault

However, when we put both modules into the same translation unit, the problem is gone:

$cat ./a.f90 > ./c.f90
$cat ./b.f90 >> ./c.f90
$F_Front c.f90 >/dev/null && echo "Success"
Success
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant