Debian Codegraph @

gcc/testsuite/gcc.dg/pr116481.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -Warray-bounds" } */
3
4 extern void tramp ();
5
6 int is_trampoline (void* function) /* { dg-bogus "arrays of functions are not meaningful" } */
7 {
8 void* tramp_address = tramp;
9 if (!(((__UINTPTR_TYPE__)function & 3) == 2))
10 return 0;
11 return (((long *) ((char*)function - 2))[0]
12 == ((long *) ((char*)tramp_address-2))[0]); /* { dg-warning "outside array bounds" } */
13 }
14 /* { dg-warning "accessing data memory with program memory address.*" "" { target avr-*-* } .-2 } */