blob: 3ae44b4f25a9cc51c0a160adb3aa545e675b34cc [file] [log] [blame]
// PR c++/94938
// { dg-additional-options "-Wtype-limits" }
template<unsigned N> struct B { unsigned arr[N]; };
template<> struct B<1u> { int arr[10]; };
template <unsigned N> bool
foo(B<N> l)
{
int i = 0;
return l.arr[i] < 0;
}
void
j()
{
B<1u> b;
foo (b);
B<2u> b2;
// I think that in this instantiation we could warn, but it breaks
// gcc bootstrap (marek 5/2020).
foo (b2);
}