uninit-pr108968-register.c: use __UINTPTR_TYPE__ for LLP64
Ensure sp variable is long enough by using __UINTPTR_TYPE__ for rsp. gcc/testsuite/ChangeLog: * c-c++-common/analyzer/uninit-pr108968-register.c: Use __UINTPTR_TYPE__ instead of unsigned long for LLP64.
This commit is contained in:
parent
dcf579cb61
commit
3fed1609f6
1 changed files with 1 additions and 1 deletions
|
@ -4,6 +4,6 @@
|
|||
struct cpu_info {};
|
||||
struct cpu_info *get_cpu_info(void)
|
||||
{
|
||||
register unsigned long sp asm("rsp");
|
||||
register __UINTPTR_TYPE__ sp asm("rsp");
|
||||
return (struct cpu_info *)((sp | (STACK_SIZE - 1)) + 1) - 1; /* { dg-bogus "use of uninitialized value 'sp'" } */
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue