https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88568
--- Comment #25 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Tue Apr 30 20:39:17 2019 New Revision: 270723 URL: https://gcc.gnu.org/viewcvs?rev=270723&root=gcc&view=rev Log: Backported from mainline 2019-03-09 Jakub Jelinek <ja...@redhat.com> PR c/88568 * attribs.c (handle_dll_attribute): Don't clear TREE_STATIC for dllimport on VAR_DECLs with RECORD_TYPE or UNION_TYPE DECL_CONTEXT. * g++.dg/other/pr88568.C: New test. Added: branches/gcc-8-branch/gcc/testsuite/g++.dg/other/pr88568.C Modified: branches/gcc-8-branch/gcc/ChangeLog branches/gcc-8-branch/gcc/attribs.c branches/gcc-8-branch/gcc/testsuite/ChangeLog