gcc/testsuite/g++.dg/tree-ssa/initlist-opt3.C
raw| 1 | // PR c++/108266 |
| 2 | // { dg-do compile { target c++11 } } |
| 3 | // { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } } |
| 4 | |
| 5 | #include <initializer_list> |
| 6 | #include <vector> |
| 7 | |
| 8 | struct S { S (const char *); }; |
| 9 | void bar (std::vector<S>); |
| 10 | |
| 11 | template <int N> |
| 12 | void |
| 13 | foo () |
| 14 | { |
| 15 | bar ({"", ""}); |
| 16 | } |
| 17 | |
| 18 | void |
| 19 | baz () |
| 20 | { |
| 21 | foo<0> (); |
| 22 | } |