PR c++/92106 - ICE with structured bindings and -Wreturn-local-addr.
authorMarek Polacek <polacek@redhat.com>
Mon, 21 Oct 2019 18:22:41 +0000 (18:22 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Mon, 21 Oct 2019 18:22:41 +0000 (18:22 +0000)
commite011c0100a83030e0cfd230658debbb6c97660a1
tree5b68eeb520900fd22acd1fdab5c5631d394a1157
parentf3b3331a4baf8a8595e9383501b617f1638eb2f0
PR c++/92106 - ICE with structured bindings and -Wreturn-local-addr.

* typeck.c (maybe_warn_about_returning_address_of_local): Avoid
recursing on null initializer and return false instead.

* g++.dg/cpp1z/decomp50.C: New test.

From-SVN: r277264
gcc/cp/ChangeLog
gcc/cp/typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp1z/decomp50.C [new file with mode: 0644]