Debian Codegraph @

gcc/testsuite/gcc.dg/pr114831-1.c

raw
1 /* { dg-do compile }
2 * { dg-options "-std=c23" } */
3
4 void f(int n)
5 {
6 int a[n];
7 goto foo; /* { dg-error "jump into scope" "variably modified" } */
8 typeof(a) b1;
9 foo:
10 }
11
12 void g(int n)
13 {
14 int a2[1][n];
15 goto foo; /* { dg-error "jump into scope" "variably modified" } */
16 typeof((n++,a2)) b2;
17 foo:
18 }
19
20 void h(int n)
21 {
22 int a[n];
23 typeof(a) b1;
24 goto foo; /* { dg-error "jump into scope" "variably modified" } */
25 typeof(&b1) b;
26 foo:
27 }