Backported from mainline
2019-01-10 Jakub Jelinek <jakub@redhat.com>
PR c/88568
* tree.c (handle_dll_attribute): Clear TREE_STATIC after setting
DECL_EXTERNAL.
* gcc.dg/pr88568.c: New test.
From-SVN: r275086
2019-08-30 Jakub Jelinek <jakub@redhat.com>
Backported from mainline
+ 2019-01-10 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/88568
+ * tree.c (handle_dll_attribute): Clear TREE_STATIC after setting
+ DECL_EXTERNAL.
+
2019-01-05 Jakub Jelinek <jakub@redhat.com>
PR middle-end/82564
2019-08-30 Jakub Jelinek <jakub@redhat.com>
Backported from mainline
+ 2019-01-10 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/88568
+ * gcc.dg/pr88568.c: New test.
+
2019-01-05 Jakub Jelinek <jakub@redhat.com>
PR middle-end/82564
--- /dev/null
+/* PR c/88568 */
+/* { dg-do compile } */
+/* { dg-require-dll "" } */
+__attribute__((dllimport)) struct S var; /* { dg-bogus "storage size of .var. isn.t known" } */
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;
}
if (*no_add_attrs == false)