aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr112488-2.c
blob: b5e5fbd3f2bba26e3395f36eb2aef33a924419b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* { dg-do compile }
 * { dg-options "-std=gnu23 -O1" } */

extern void abort(void);

int test(int *n, struct T { char a[*n], b[*n]; }*) {
  return sizeof(struct T) - sizeof(struct T);
}

void f1(int *p) {
  if (test(p, 0)) abort();
}