From: Jonathan Yong <10walls@gmail.com> Date: Wed, 31 Jan 2024 13:31:30 +0000 (+0000) Subject: uninit-pr108968-register.c: use __UINTPTR_TYPE__ for LLP64 X-Git-Tag: basepoints/gcc-15~1474 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3fed1609f61088c4e607d6987d86579f684bf4dc;p=thirdparty%2Fgcc.git 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. --- diff --git a/gcc/testsuite/c-c++-common/analyzer/uninit-pr108968-register.c b/gcc/testsuite/c-c++-common/analyzer/uninit-pr108968-register.c index a76c09e7b14c..e9a1c21990b9 100644 --- a/gcc/testsuite/c-c++-common/analyzer/uninit-pr108968-register.c +++ b/gcc/testsuite/c-c++-common/analyzer/uninit-pr108968-register.c @@ -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'" } */ }