1 // PR c++/80864 2 // { dg-do compile { target c++11 } } 3 4 struct S { 5 int c[3]; 6 }; 7 8 template <typename T, int N> 9 void fn()10fn () 11 { 12 constexpr S s1 = S{N}; 13 constexpr S s2 = S{{N, N}}; 14 constexpr S s3 = S{N, N}; 15 constexpr S s4 = {N}; 16 constexpr S s5 = {{N}}; 17 constexpr S s6 = {N, N}; 18 constexpr S s7{{N}}; 19 constexpr S s8{S{N}}; 20 constexpr S s9{S{{N}}}; 21 constexpr S s10{S{{N}}}; 22 constexpr S s11 = S({N}); 23 constexpr S s12 = S({{N}}); 24 constexpr S s13 = {{N}}; 25 constexpr S s14 = {{N, N, N}}; 26 } 27 28 void foo()29foo () 30 { 31 fn<int, 10>(); 32 } 33