-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
[Clang] Condition is always true which is caused by a possible copy-pasted bug in CGOpenMPRuntime.cpp #61319
Comments
@llvm/issue-subscribers-clang-codegen |
@llvm/issue-subscribers-openmp |
Yes, thanks for pointing out. Do you want to submit a patch? |
You are welcome. We are glad to know this issue is useful to the community. That's enough. |
@llvm/issue-subscribers-good-first-issue |
@SamTebbs33 , Do I have to modify the failing tests and create new ones to regress for the added conditions? |
I'm not familiar with that file, so I'm not sure what tests are failing but you can try fixing the condition and changing any tests that need to be changed as as a result of that. |
Hi, I want to take this issue. As I am a beginner I just wanted to know how can I run the test cases after fixing the condition. |
Hi @s-pratik I am working on this issue.No one is assigning issues as far as I know.Just pick any as if it's not closed. |
You can run the
Generally, if all the tests still pass after making a change you can try modifying the tests to catch the new change. |
@jhuber6 How do I get which tests are failing? I have changed some tests to test the current condition but I can't see the details of which tests are failing, I am only getting a summary. I have tried the -v (--verbose) flag but I can't get the tests .How can I get the files and the details? Testing Time: 2577.47s |
If you get that final summary, that means none of the tests failed. This bug doesn't trigger any existing tests, so you would need to either create or modify a test. I don't know if there's an existing test that covers something similar, it's usually a good place to start. |
@jhuber6 The first unit tests I could find are for functions that are 6 levels higher from this function .The function is very low level and couldn't find a way to affect it from the higher functions. |
This fix is extremely minor. Adding a new test that stimulates it will be difficult. Personally I wouldn't bother making a new test. |
Thanks @jhuber6 . Can you please approve the patch at https://reviews.llvm.org/D146370? I am in outreachy intern and I need to document an approved patch. |
There was a bug in the getAArch64MTV function on the third if statement which returns truth as reported by this issue [[ #61319 |[Clang] Condition is always true which is caused by a possible copy-pasted bug in CGOpenMPRuntime.cpp ]]. All the testcases are passing. The first unit tests I could find are for functions that are 6 levels from this issue. The function is very low level and couldn't find a way to affect it from the higher functions. Reviewed By: jhuber6 Differential Revision: https://reviews.llvm.org/D146370
Fixed by -c1ab198. |
llvm-project/clang/lib/CodeGen/CGOpenMPRuntime.cpp
Line 11173 in 7b338a6
kind ==
is likely omitted. Therefore the condition on L11173 is always true.Correct code:
Current code:
The text was updated successfully, but these errors were encountered: