blob: 276c92041fd950b98e2079098a154add92ac0dac (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
void *alloc(unsigned long)__attribute__((alloc_size(1)));
_Bool sta(void)
{
void *ptr = alloc(4);
return __builtin_object_size(ptr, 0) == 4;
}
_Bool dyn(unsigned long n)
{
void *ptr = alloc(n);
return __builtin_object_size(ptr, 0) == n;
}
/*
* check-name: builtin-objsize-dyn
* check-command: test-linearize -Wno-decl $file
* check-known-to-fail
*
* check-output-ignore
* check-output-returns: 1
*/
|