2019-08-30 Jakub Jelinek <jakub@redhat.com>
Backported from mainline
+ 2019-03-09 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/88568
+ * tree.c (handle_dll_attribute): Don't clear TREE_STATIC for
+ dllimport on VAR_DECLs with RECORD_TYPE or UNION_TYPE DECL_CONTEXT.
+
2019-03-05 Jakub Jelinek <jakub@redhat.com>
PR target/89587
2019-08-30 Jakub Jelinek <jakub@redhat.com>
Backported from mainline
+ 2019-03-09 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/88568
+ * g++.dg/other/pr88568.C: New test.
+
2019-03-08 Jakub Jelinek <jakub@redhat.com>
PR c++/82075
a function global scope, unless declared static. */
if (current_function_decl != NULL_TREE && !TREE_STATIC (node))
TREE_PUBLIC (node) = 1;
- /* Clear TREE_STATIC because DECL_EXTERNAL is set. */
- TREE_STATIC (node) = 0;
+ /* Clear TREE_STATIC because DECL_EXTERNAL is set, unless
+ it is a C++ static data member. */
+ if (DECL_CONTEXT (node) == NULL_TREE
+ || !RECORD_OR_UNION_TYPE_P (DECL_CONTEXT (node)))
+ TREE_STATIC (node) = 0;
}
if (*no_add_attrs == false)