1 // PR c++/71711
2 // { dg-do compile { target c++17 } }
3 
4 template < int > struct A {};
5 template < int ... N > void unary_left (A < (... + N) >);
6 template < int ... N > void unary_right (A < (N + ...) >);
7 template < int ... N > void binary_left (A < (42 + ... + N) >);
8 template < int ... N > void binary_right (A < (N + ... + 42) >);
9 
bar()10 void bar ()
11 {
12   // { dg-final { scan-assembler "_Z10unary_leftIJLi1ELi2ELi3EEEv1AIXflplT_EE" } }
13   unary_left < 1, 2, 3 > ({});
14   // { dg-final { scan-assembler "_Z11unary_rightIJLi1ELi2ELi3EEEv1AIXfrplT_EE" } }
15   unary_right < 1, 2, 3 > ({});
16   // { dg-final { scan-assembler "_Z11binary_leftIJLi1ELi2ELi3EEEv1AIXfLplLi42ET_EE" } }
17   binary_left < 1, 2, 3 > ({});
18   // { dg-final { scan-assembler "_Z12binary_rightIJLi1ELi2ELi3EEEv1AIXfRplT_Li42EEE" } }
19   binary_right < 1, 2, 3 > ({});
20 }
21