utils.c (create_var_decl): Only set DECL_COMMON on VAR_DECLs.

2005-07-09  Andrew Pinski  <pinskia@physics.uc.edu>

        * utils.c (create_var_decl): Only set DECL_COMMON on
        VAR_DECLs. Only set SET_DECL_ASSEMBLER_NAME on
        VAR_OR_FUNCTION_DECL_P.

From-SVN: r101831
This commit is contained in:
Andrew Pinski 2005-07-09 15:50:56 +00:00 committed by Andrew Pinski
parent 3ed8593d45
commit 7c6ef73e9b
2 changed files with 9 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2005-07-09 Andrew Pinski <pinskia@physics.uc.edu>
* utils.c (create_var_decl): Only set DECL_COMMON on
VAR_DECLs. Only set SET_DECL_ASSEMBLER_NAME on
VAR_OR_FUNCTION_DECL_P.
2005-07-08 Daniel Berlin <dberlin@dberlin.org>
* utils.c (create_param_decl): DECL_ARG_TYPE_AS_WRITTEN is

View File

@ -1282,7 +1282,8 @@ create_var_decl (tree var_name, tree asm_name, tree type, tree var_init,
support global BSS sections, uninitialized global variables would
go in DATA instead, thus increasing the size of the executable. */
#if !defined(ASM_OUTPUT_BSS) && !defined(ASM_OUTPUT_ALIGNED_BSS)
DECL_COMMON (var_decl) = !flag_no_common;
if (TREE_CODE (var_decl) == VAR_DECL)
DECL_COMMON (var_decl) = !flag_no_common;
#endif
DECL_INITIAL (var_decl) = var_init;
TREE_READONLY (var_decl) = const_flag;
@ -1299,7 +1300,7 @@ create_var_decl (tree var_name, tree asm_name, tree type, tree var_init,
TREE_STATIC (var_decl)
= public_flag || (global_bindings_p () ? !extern_flag : static_flag);
if (asm_name)
if (asm_name && VAR_OR_FUNCTION_DECL_P (var_decl))
SET_DECL_ASSEMBLER_NAME (var_decl, asm_name);
process_attributes (var_decl, attr_list);