Advertisement
Guest User

Untitled

a guest
May 3rd, 2015
283
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. diff --git a/gcc/c/c-decl.c b/gcc/c/c-decl.c
  2. index 4f6761d..0326cc7 100644
  3. --- a/gcc/c/c-decl.c
  4. +++ b/gcc/c/c-decl.c
  5. @@ -2527,6 +2527,13 @@ merge_decls (tree newdecl, tree olddecl, tree newtype, tree oldtype)
  6. {
  7. TREE_STATIC (olddecl) = TREE_STATIC (newdecl);
  8. TREE_PUBLIC (olddecl) = TREE_PUBLIC (newdecl);
  9. +
  10. + if (TREE_CODE (olddecl) == VAR_DECL
  11. + && TREE_CODE (newdecl) == VAR_DECL
  12. + && !lookup_attribute ("common", DECL_ATTRIBUTES (newdecl))
  13. + && !lookup_attribute ("nocommon", DECL_ATTRIBUTES (newdecl))
  14. + && !DECL_COMMON (olddecl))
  15. + DECL_COMMON (newdecl) = 0;
  16. }
  17.  
  18. if (TREE_CODE (newdecl) == FUNCTION_DECL)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement