diff options
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r-- | gcc/c-decl.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 1d6c40d..efed682 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -3012,8 +3012,11 @@ start_decl (struct c_declarator *declarator, struct c_declspecs *declspecs, TEM may equal DECL or it may be a previous decl of the same name. */ tem = pushdecl (decl); - if (initialized) - DECL_EXTERNAL (tem) = 0; + if (initialized && DECL_EXTERNAL (tem)) + { + DECL_EXTERNAL (tem) = 0; + TREE_STATIC (tem) = 1; + } return tem; } |