Commit dbf02a2c by Jakub Jelinek Committed by Jakub Jelinek

re PR c/88568 ('dllimport' no longer implies 'extern' in C)

	PR c/88568
	* attribs.c (handle_dll_attribute): Clear TREE_STATIC after setting
	DECL_EXTERNAL.

	* gcc.dg/pr88568.c: New test.

From-SVN: r267799
parent aa6c5afe
2019-01-10 Jakub Jelinek <jakub@redhat.com>
PR c/88568
* attribs.c (handle_dll_attribute): Clear TREE_STATIC after setting
DECL_EXTERNAL.
2019-01-10 Tamar Christina <tamar.christina@arm.com> 2019-01-10 Tamar Christina <tamar.christina@arm.com>
* config/arm/arm-builtins.c * config/arm/arm-builtins.c
......
...@@ -1691,6 +1691,8 @@ handle_dll_attribute (tree * pnode, tree name, tree args, int flags, ...@@ -1691,6 +1691,8 @@ handle_dll_attribute (tree * pnode, tree name, tree args, int flags,
a function global scope, unless declared static. */ a function global scope, unless declared static. */
if (current_function_decl != NULL_TREE && !TREE_STATIC (node)) if (current_function_decl != NULL_TREE && !TREE_STATIC (node))
TREE_PUBLIC (node) = 1; TREE_PUBLIC (node) = 1;
/* Clear TREE_STATIC because DECL_EXTERNAL is set. */
TREE_STATIC (node) = 0;
} }
if (*no_add_attrs == false) if (*no_add_attrs == false)
......
2019-01-10 Jakub Jelinek <jakub@redhat.com>
PR c/88568
* gcc.dg/pr88568.c: New test.
2019-01-10 Tamar Christina <tamar.christina@arm.com> 2019-01-10 Tamar Christina <tamar.christina@arm.com>
* gcc.target/aarch64/advsimd-intrinsics/vector-complex.c: Add AArch32 regexpr. * gcc.target/aarch64/advsimd-intrinsics/vector-complex.c: Add AArch32 regexpr.
......
/* PR c/88568 */
/* { dg-do compile } */
/* { dg-require-dll "" } */
__attribute__((dllimport)) struct S var; /* { dg-bogus "storage size of .var. isn.t known" } */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment