https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86208
--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Fri Oct 12 14:43:18 2018 New Revision: 265103 URL: https://gcc.gnu.org/viewcvs?rev=265103&root=gcc&view=rev Log: Backported from mainline 2018-07-16 Jakub Jelinek <ja...@redhat.com> PR c++/3698 PR c++/86208 * cp-gimplify.c (cp_genericize_r): When using extern_decl_map, or in TREE_USED flag from stmt to h->to. * g++.dg/opt/pr3698.C: New test. Added: branches/gcc-7-branch/gcc/testsuite/g++.dg/opt/pr3698.C Modified: branches/gcc-7-branch/gcc/cp/ChangeLog branches/gcc-7-branch/gcc/cp/cp-gimplify.c branches/gcc-7-branch/gcc/testsuite/ChangeLog