// PR c++/85977, Incorrect handling of array reference size deduction // { dg-do compile { target c++11 } } template void fn1 (const char (&)[N]) { static_assert (N == 3, "fn1");} template void fn2 (const short (&)[N]) { static_assert (N == 3, "fn2");} template void fn3 (const int (&)[N]) { static_assert (N == 3, "fn2");} template void fn4 (const long (&)[N]) { static_assert (N == 3, "fn4");} template void fn5 (const unsigned char (&)[N]) { static_assert (N == 3, "fn5");} template void fn6 (const unsigned short (&)[N]) { static_assert (N == 3, "fn6");} template void fn7 (const unsigned int (&)[N]) { static_assert (N == 3, "fn7");} template void fn8 (const unsigned int (&)[N]) { static_assert (N == 3, "fn8");} void bar () { fn1 ({1, 2, 3}); fn2 ({1, 2, 3}); fn3 ({1, 2, 3}); fn4 ({1, 2, 3}); fn5 ({1, 2, 3}); fn6 ({1, 2, 3}); fn7 ({1, 2, 3}); fn8 ({1, 2, 3}); }