On 10/15/19 2:41 PM, Jakub Jelinek wrote:
On Tue, Oct 15, 2019 at 02:28:12PM -0400, Marek Polacek wrote:--- /dev/null +++ gcc/testsuite/g++.dg/cpp1z/decomp50.C @@ -0,0 +1,51 @@ +// PR c++/92106 - ICE with structured bindings and -Wreturn-local-addr. +// { dg-do compile { target c++17 } } + +template <typename> struct B; +template <typename _Tp> struct B<_Tp *> { typedef _Tp reference; };I've looked at the unreduced testcase and it seems to have template <typename _Tp> struct B<_Tp *> { typedef _Tp& reference; }; for this line instead. I'd think it would be better to change the testcase, so that it is well defined rather than undefined then. It is struct iterator_traits<_Tp*>, right? Otherwise, the patch LGTM, but I'll defer to Jason as the maintainer.
OK with that change. Jason
