aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/gnu-compoundlit-2.c
blob: dcc57753077f740d4becd5adfc2d23bf4f76e5bf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* { dg-do run } */
/* { dg-options "-std=gnu23 -Wall" } */

[[gnu::noinline,gnu::noipa]]
static bool f(int n)
{
	struct foo { char a[n]; };
	struct foo x = { };

	return 0 == __builtin_memcmp(&x, &(struct foo){ }, sizeof x);
}

int main()
{
	if (!f(7))
		__builtin_abort();

	return 0;
}