forked from iains/gcc-14-branch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
analyzer: fix uninit false +ves reading from DECL_HARD_REGISTER [PR10…
…8968] gcc/analyzer/ChangeLog: PR analyzer/108968 * region-model.cc (region_model::get_rvalue_1): Handle VAR_DECLs with a DECL_HARD_REGISTER by returning UNKNOWN. gcc/testsuite/ChangeLog: PR analyzer/108968 * gcc.dg/analyzer/uninit-pr108968-register.c: New test. Signed-off-by: David Malcolm <[email protected]>
- Loading branch information
1 parent
4d82022
commit 20bd258
Showing
2 changed files
with
17 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* { dg-do compile { target x86_64-*-* } } */ | ||
|
||
#define STACK_SIZE 4096 | ||
struct cpu_info {}; | ||
struct cpu_info *get_cpu_info(void) | ||
{ | ||
register unsigned long sp asm("rsp"); | ||
return (struct cpu_info *)((sp | (STACK_SIZE - 1)) + 1) - 1; /* { dg-bogus "use of uninitialized value 'sp'" } */ | ||
} |