aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/ext/flexary15.C
blob: da5f5f43123eca995eac464eb9c749df0f7e74ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// PR c++/69912 - [6 regression] ICE in build_ctor_subob_ref initializing
//                a flexible array member
// { dg-do compile }
// { dg-options "-Wno-pedantic -Wno-write-strings -fpermissive" }

struct S {
  int n; 
  char *a[];
};

void foo (const char *a)
{
  static const S s = { 1, { a, "b" } };   // { dg-warning "invalid conversion" }
}