// PR c++/69251 - [6 Regression] ICE (segmentation fault) in unify_array_domain // on i686-linux-gnu // { dg-do compile } // { dg-additional-options "-Wno-error=pedantic" } struct A { int n; char a[]; // { dg-warning "8:ISO C\\+\\+ forbids flexible array member" } }; template struct B; // The following definition shouldn't be needed but is provided to prevent // the test from failing with an error due to PR c++/69349 - template // substitution error for flexible array members. (This doesn't compromise // the validity of this test since all it tests for is the absennce of // the ICE.) template struct B { typedef int X; }; template struct B { typedef int X; }; template struct C { typedef typename B::X X; }; template int foo (T&, typename C::X = 0) { return 0; } void bar (A *a) { foo (a->a); }