OSDN Git Service

2005-07-09 Andrew Pinski <pinskia@physics.uc.edu>
authorpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 9 Jul 2005 15:50:56 +0000 (15:50 +0000)
committerpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 9 Jul 2005 15:50:56 +0000 (15:50 +0000)
        * utils.c (create_var_decl): Only set DECL_COMMON on
        VAR_DECLs. Only set SET_DECL_ASSEMBLER_NAME on
        VAR_OR_FUNCTION_DECL_P.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101831 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ada/ChangeLog
gcc/ada/utils.c

index de7f06c..6eda59a 100644 (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
index ab86a49..edd1706 100644 (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);