aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/vla-sizeof0.c
blob: a58fd300f062960493bdef6b245f02dcf6028da2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#define N 2
#define T int

static unsigned int foo(int x)
{
	T a[(1,N)];

	return sizeof(a) == (N * sizeof(T));
}

/*
 * check-name: vla-sizeof cte,cte
 * check-command: test-linearize -Wvla $file
 *
 * check-output-ignore
 * check-output-contains: ret\\.32 *\\$1
 *
 * check-error-start
 * check-error-end
 */