blob: 3ee6d747087614df2d0c74162ba9d866ecf0c1c4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
/* { dg-do compile } */
/* { dg-options "-O2 -Warray-bounds" } */
extern void tramp ();
int is_trampoline (void* function) /* { dg-bogus "arrays of functions are not meaningful" } */
{
void* tramp_address = tramp;
if (!(((unsigned long)function & 3) == 2))
return 0;
return (((long *) ((char*)function - 2))[0]
== ((long *) ((char*)tramp_address-2))[0]); /* { dg-warning "outside array bounds" } */
}
|