blob: 9692cc842b678452d37e76d0e8b353dc281b2153 [file] [log] [blame]
static __attribute__((__pure__)) int pure_int(int v)
{
int i = v;
return i;
}
static __attribute__((__pure__)) void *pure_ptr(void *p)
{
void *i = p;
return i;
}
static void foo(int v, void *p)
{
int val = pure_int(v);
void *ptr = pure_ptr(p);
(void)val;
(void)ptr;
}
/*
* check-name: Pure function attribute
*/