summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/overload/VLA.C
blob: 0c748f50c7d9e06d9a1a3d855d8ff5b91a0a06f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//Origin: kengole@us.ibm.com

//PR c++/2478
// G++ was rejecting this as it could not convert `int (*)[]' to `int (*)[0]'.
// Using the C99 VLA style arrays in a struct.

// { dg-do compile }

struct S {
  int (*p)[];
} B;

void foo() {
  int (*p)[];
  B.p=p;  // { dg-bogus "cannot convert" }
}