Skip analyzer strndup test on hppa*-*-hpux*
[official-gcc.git] / gcc / testsuite / gcc.dg / vla-stexp-7.c
blob3091b9184c21fc757302cec531462ab15bb6441f
1 /* PR91038 */
2 /* { dg-do run } */
3 /* { dg-options "-O2 -Wunused-variable" } */
6 #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
8 struct lbm {
10 int D;
11 const int* DQ;
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 },
21 void zouhe_left(void)
23 __auto_type xx = (*({ int N = 2; struct lbm __x = D2Q9; ((const int(*)[9][N])__x.DQ); }));
25 if (1 != xx[1][0])
26 __builtin_abort();
28 if (2 != ARRAY_SIZE(xx[1]))
29 __builtin_abort();
31 if (1 != (*({ int N = 2; struct lbm __x = D2Q9; ((const int(*)[9][N])__x.DQ); }))[1][0])
32 __builtin_abort();
34 if (2 != ARRAY_SIZE(*({ int N = 2; struct lbm __x = D2Q9; ((const int(*)[9][N])__x.DQ); })[1]))
35 __builtin_abort();
38 int main()
40 zouhe_left();
41 return 0;