// PR c++/92106 - ICE with structured bindings and -Wreturn-local-addr. // { dg-do compile { target c++17 } } template struct B; template struct B<_Tp *> { typedef _Tp& reference; }; struct C { template using rebind = _Up *; }; template class D { public: typename B<_Iterator>::reference operator*(); void operator++(); }; template bool operator!=(D<_Iterator, _Container>, D<_Iterator, _Container>); template class F { public: typedef _Tp value_type; }; template struct G { template struct H { using type = C::rebind<_Tp>; }; using const_pointer = typename H::type; }; template > class I { typedef D::const_pointer, int> const_iterator; public: const_iterator begin(); const_iterator end(); }; struct A { struct J { int name; int value; }; I members; template const int *find(Key) { for (const auto &[name, value] : members) // See // for why we don't warn here. return &value; // { dg-bogus "address of local variable" } return nullptr; } }; int main() { A a; a.find(""); }