aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr112488-1.c
blob: b53295c4366da0aad1ccd097766191ef212cc4b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* { dg-do compile }
 * { dg-options "-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)) abort();
}