view gcc/testsuite/g++.dg/overload/VLA.C @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 04ced10e8804
children
line wrap: on
line source

//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" }
}