https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83958
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Sat Mar 3 13:16:27 2018 New Revision: 258172 URL: https://gcc.gnu.org/viewcvs?rev=258172&root=gcc&view=rev Log: Backported from mainline 2018-01-23 Jakub Jelinek <ja...@redhat.com> PR c++/83958 * decl.c (cp_finish_decomp): Diagnose if reference structure binding refers to incomplete type. * g++.dg/cpp1z/decomp35.C: New test. Added: branches/gcc-7-branch/gcc/testsuite/g++.dg/cpp1z/decomp35.C Modified: branches/gcc-7-branch/gcc/cp/ChangeLog branches/gcc-7-branch/gcc/cp/decl.c branches/gcc-7-branch/gcc/testsuite/ChangeLog