aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr113013.c
blob: b34964071b731d24917aaebdfd6888431277cfb2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* PR tree-optimization/113013 */
/* { dg-do compile } */
/* { dg-options "-std=gnu99 -O2" } */

struct S { short x; } s;
void *foo () __attribute__((__alloc_size__(1)));
struct S *p;

__SIZE_TYPE__
bar (void)
{
  p = foo (s);
  return __builtin_dynamic_object_size (p, 0);
}