-
-
Notifications
You must be signed in to change notification settings - Fork 162
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
fix: Update real function to provide correct kind #5797
Conversation
Also add a test for this. |
Per #5797 (comment), see if you can modify the generator script to insert the modification for complex correctly, using the existing mechanism. That way we don't need to duplicate / manually maintain the two functions. |
@HarshilShah1804 just a heads up. If you check program main
complex(8) :: arr2(3) = [(5._8, 7._8), (8.2_8, 7.12_8), (1.2_8, 3.4_8)]
print *, kind(real(arr2))
end program $ lfortran a.f90
8
$ gfortran a.f90 && ./a.out
8 You can follow its implementation and it'll be a simple fix. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've left some comments. Can you please address them?
This looks good otherwise. Thanks for fixing it!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Thanks!
Fix #4629
The real function is updated so that if a kind is specified, the output is of that kind, otherwise the same kind as the input.
For
Output