1 // PR tree-optimization/104601
3 // { dg-options "-std=c++17 -Wno-unused-result" }
4 // { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
10 inline std::optional<int>
11 foo (std::vector<int>::iterator b, std::vector<int>::iterator c,
12 std::optional<int> h (int))
15 find_if (b, c, [&](auto e) { d = h(e); return d; });
28 std::vector<int> g(10);
31 auto e = foo (b, c, bar);