-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
-Warray-bounds warning with asm goto in impossible switch cases #51024
Comments
It looks like something is going wrong with CFG analysis for asm goto, and we're treating the operand of the asm goto as "reachable" regardless of the surrounding CFG. The warning should be suppressed. Briefly looked at it, but it's a bit more complicated than I thought. If someone wants to look, maybe start with AnalysisBasedWarnings::IssueWarnings and CFGBuilder::VisitGCCAsmStmt? |
github-actions bot
pushed a commit
to tstellar/llvm-project
that referenced
this issue
Jan 7, 2022
When performing CFG based analyses, don't forget to check the child statements of an asm goto, such as the expressions used for inputs+outputs. Fixes: llvm#51024 Fixes: ClangBuiltLinux/linux#1439 Reviewed By: void, jyknight, jyu2, efriedma Differential Revision: https://reviews.llvm.org/D116059 (cherry picked from commit 3a604fd)
tstellar
pushed a commit
that referenced
this issue
Jan 8, 2022
When performing CFG based analyses, don't forget to check the child statements of an asm goto, such as the expressions used for inputs+outputs. Fixes: #51024 Fixes: ClangBuiltLinux/linux#1439 Reviewed By: void, jyknight, jyu2, efriedma Differential Revision: https://reviews.llvm.org/D116059 (cherry picked from commit 3a604fd)
haoNoQ
pushed a commit
to swiftlang/llvm-project
that referenced
this issue
Feb 23, 2022
When performing CFG based analyses, don't forget to check the child statements of an asm goto, such as the expressions used for inputs+outputs. Fixes: llvm#51024 Fixes: ClangBuiltLinux/linux#1439 Reviewed By: void, jyknight, jyu2, efriedma Differential Revision: https://reviews.llvm.org/D116059 (cherry picked from commit 3a604fd)
s194604
pushed a commit
to s194604/patmos-llvm-project
that referenced
this issue
Apr 10, 2022
When performing CFG based analyses, don't forget to check the child statements of an asm goto, such as the expressions used for inputs+outputs. Fixes: llvm/llvm-project#51024 Fixes: ClangBuiltLinux/linux#1439 Reviewed By: void, jyknight, jyu2, efriedma Differential Revision: https://reviews.llvm.org/D116059 (cherry picked from commit 3a604fd)
bryanpkc
pushed a commit
to flang-compiler/classic-flang-llvm-project
that referenced
this issue
Apr 20, 2022
When performing CFG based analyses, don't forget to check the child statements of an asm goto, such as the expressions used for inputs+outputs. Fixes: llvm/llvm-project#51024 Fixes: ClangBuiltLinux/linux#1439 Reviewed By: void, jyknight, jyu2, efriedma Differential Revision: https://reviews.llvm.org/D116059 (cherry picked from commit 3a604fd)
mem-frob
pushed a commit
to draperlaboratory/hope-llvm-project
that referenced
this issue
Oct 7, 2022
When performing CFG based analyses, don't forget to check the child statements of an asm goto, such as the expressions used for inputs+outputs. Fixes: llvm/llvm-project#51024 Fixes: ClangBuiltLinux/linux#1439 Reviewed By: void, jyknight, jyu2, efriedma Differential Revision: https://reviews.llvm.org/D116059
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Extended Description
A piece of code in the Linux kernel triggers -Warray-bounds when it appears that it should not (initial report). Attached is a small reproducer, which has been derived from arch/powerpc/kernel/signal_32.c.
This appears similar to #35463 but the second function appears to do the right thing and not warn so I do not think that it is the same situation.
The text was updated successfully, but these errors were encountered: