Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/gcc/c/c-decl.c b/gcc/c/c-decl.c
- index 4f6761d..0326cc7 100644
- --- a/gcc/c/c-decl.c
- +++ b/gcc/c/c-decl.c
- @@ -2527,6 +2527,13 @@ merge_decls (tree newdecl, tree olddecl, tree newtype, tree oldtype)
- {
- TREE_STATIC (olddecl) = TREE_STATIC (newdecl);
- TREE_PUBLIC (olddecl) = TREE_PUBLIC (newdecl);
- +
- + if (TREE_CODE (olddecl) == VAR_DECL
- + && TREE_CODE (newdecl) == VAR_DECL
- + && !lookup_attribute ("common", DECL_ATTRIBUTES (newdecl))
- + && !lookup_attribute ("nocommon", DECL_ATTRIBUTES (newdecl))
- + && !DECL_COMMON (olddecl))
- + DECL_COMMON (newdecl) = 0;
- }
- if (TREE_CODE (newdecl) == FUNCTION_DECL)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement