1 /* PR91038 */
2 /* { dg-do run } */
3 /* { dg-options "-O2 -Wunused-variable" } */
4 
5 
6 #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
7 
8 struct lbm {
9 
10 	int D;
11 	const int* DQ;
12 
13 } D2Q9 = { 2,
14 	(const int*)&(const int[9][2]){
15 		{ 0, 0 },
16 		{ 1, 0 }, { 0, 1 }, { -1, 0 }, { 0, -1 },
17 		{ 1, 1 }, { -1, 1 }, { -1, -1 }, { 1, -1 },
18 	}
19 };
20 
zouhe_left(void)21 void zouhe_left(void)
22 {
23 	__auto_type xx = (*({ int N = 2; struct lbm __x = D2Q9; ((const int(*)[9][N])__x.DQ); }));
24 
25 	if (1 != xx[1][0])
26 		__builtin_abort();
27 
28 	if (2 != ARRAY_SIZE(xx[1]))
29 		__builtin_abort();
30 
31 	if (1 != (*({ int N = 2; struct lbm __x = D2Q9; ((const int(*)[9][N])__x.DQ); }))[1][0])
32 		__builtin_abort();
33 
34 	if (2 != ARRAY_SIZE(*({ int N = 2; struct lbm __x = D2Q9; ((const int(*)[9][N])__x.DQ); })[1]))
35 		__builtin_abort();
36 }
37 
main()38 int main()
39 {
40 	zouhe_left();
41 	return 0;
42 }
43 
44 
45