-
-
Notifications
You must be signed in to change notification settings - Fork 129
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
Corrected keywords for intrinsic functions #3123
Conversation
Thanks! Can you please add tests to ensure this change actually works? Here is the design that we need to move to: #3090 |
Sure, I'll start working on it. Thanks! |
I have corrected the names. |
Excellent, I think that starts to look good! |
I think this looks great. Can you please resolve the conflicts? Let's see if tests pass. |
There seems to be some problem with the file: intrinsics_107 |
For file intrinsics_107:
so I changed 32 to 64. But now the Test on GitHub fails, error:
|
Leave |
Hey @Kishan-Ved
resolve the conflicts and then do
And then update the test references and finally run the integration tests. I think, you didn't do |
Will these steps remove my changes? |
Done. |
But I would like to know this though, how to fix such things without losing my changes? |
integration_tests/intrinsics_107.f90
Outdated
END PROGRAM |
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.
remove this change
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 didn't change this, how do I remove 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.
Use
git checkout main -- integration_tests/intrinsics_107.f90
git commit
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 did this, but it says there's no such file found
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.
Do git fetch origin
first. Ensure origin
points to https://github.com/lfortran/lfortran
.
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.
Sir I tried that, I still get the error:
(lf) kishan@kishan-IdeaPad-3-15IIL05:~/Desktop/lfortran$ git checkout main -- integration_tests/intrinsics_107.f90 error: pathspec 'integration_tests/intrinsics_107.f90' did not match any file(s) known to git
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.
It's right here: https://github.com/lfortran/lfortran/blob/main/integration_tests/intrinsics_107.f90, so you need to figure out why you don't have it in your local git. You might be in a wrong branch, wrong directory, didn't checkout the latest main, and so on.
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.
Sir I figured this out 👍🏻, I got to learn a new thing today 🙂. Thank you.
There is a new file, intrinsics_108, should I change my file to a higher number? |
Yes. |
See here https://github.com/lcompilers/lpython/blob/30b5bfc41774833fb94ec0c2e1926ce33be10fdb/doc/src/rebasing.md how to use git for these kinds of rebasing and cleanup tasks. |
I think we should keep x and y in hypot. (According to: https://gcc.gnu.org/onlinedocs/gfortran/HYPOT.html) |
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.
This looks good to me. I just left some comments for improvement.
@@ -0,0 +1,3 @@ | |||
program intrinsics_118 | |||
print *, hypot( x = 1.e0_4, y = 0.5e0_4 ) | |||
end program intrinsics_118 |
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.
You can add error stop conditions in this file too.
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.
@Kishan-Ved please submit a new PR with this improvement. I already set this one to merge.
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.
Ok Sir. I'll do it.
if ( .not. product( array = x, mask = mask ) == 15 ) error stop | ||
if ( .not. product( x, mask = mask ) == 15 ) error stop | ||
if ( .not. product( x, mask ) == 15 ) error stop | ||
end |
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.
We can follow this for other examples too to ensure that this approach works for all the cases - when we're putting some parameters as arguments directly (line 6) and while some are inserted as keywords(line 4 an line 5).
Thanks for finishing the PR! |
Fixes: #3076
Credit/Reference: #3105