]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/gcc.dg/vla-stexp-9.c
Update copyright years.
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / vla-stexp-9.c
CommitLineData
4e6bf0b9
MU
1/* PR91038 */
2/* { dg-do run } */
3/* { dg-options "-O2 -Wunused-variable" } */
4
5
6
7void foo(void)
8{
9 if (2 * sizeof(int) != sizeof((*({ int N = 2; int (*x)[9][N] = 0; x; })[1])))
10 __builtin_abort();
11}
12
13void bar(void)
14{
15 if (2 * sizeof(int) != sizeof((*({ int N = 2; int (*x)[9][N] = 0; x; })[0])))
16 __builtin_abort();
17}
18
19void bar0(void)
20{
21 if (2 * 9 * sizeof(int) != sizeof((*({ int N = 2; int (*x)[9][N] = 0; x; }))))
22 __builtin_abort();
23}
24
25void bar11(void)
26{
27 sizeof(*((*({ int N = 2; int (*x)[9][N] = 0; x; }) + 0)));
28}
29
30void bar12(void)
31{
32 if (2 * sizeof(int) != sizeof(*((*({ int N = 2; int (*x)[9][N] = 0; x; }) ))))
33 __builtin_abort();
34}
35
36void bar1(void)
37{
38 if (2 * sizeof(int) != sizeof(*((*({ int N = 2; int (*x)[9][N] = 0; x; }) + 0))))
39 __builtin_abort();
40}
41
42
43
44
45int main()
46{
47 foo();
48 bar0();
49 bar12();
50 bar1();
51 bar();
52}
53