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

Wrong error triggered: an ambiguous reference to symbol #120

Open
clementval opened this issue Dec 5, 2018 · 5 comments
Open

Wrong error triggered: an ambiguous reference to symbol #120

clementval opened this issue Dec 5, 2018 · 5 comments

Comments

@clementval
Copy link
Collaborator

The following valid Fortran code trigger an error.

module real_size
  integer, parameter :: RR=4
end module real_size
real(RR) function fct1(t)
  use real_size
implicit none
  real(RR) t
end
"function.F90", line 4: an ambiguous reference to symbol 'rr'
"function.F90", line 4: Invalid type spec
@h-murai
Copy link
Collaborator

h-murai commented Apr 9, 2019

@clementval Do you have any idea about this issue? Otherwise, I'll investigate it because someone is waiting for the solution.

@clementval
Copy link
Collaborator Author

@h-murai Let me have a quick look again at this issue

@clementval
Copy link
Collaborator Author

@h-murai Ok, I remember this problem. RR is defined first in the function return type and therefore, when it is imported from the use statement, it becomes ambiguous.
I do not have a fix right now but I can work on one.

@g009266 What is your use case? A quick work around is to declare the return type inside the declaration part.

@g009266
Copy link

g009266 commented Apr 9, 2019 via email

@clementval
Copy link
Collaborator Author

@g009266 Sure, will look for a fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants