Debian Codegraph @

gcc/testsuite/c-c++-common/analyzer/uninit-pr108968-register.c

raw
1 /* { dg-do compile { target x86_64-*-* } } */
2
3 #define STACK_SIZE 4096
4 struct cpu_info {};
5 struct cpu_info *get_cpu_info(void)
6 {
7 register __UINTPTR_TYPE__ sp asm("rsp");
8 return (struct cpu_info *)((sp | (STACK_SIZE - 1)) + 1) - 1; /* { dg-bogus "use of uninitialized value 'sp'" } */
9 }