(start_decl): Set DECL_COMMON before calling decl_attributes.
authorRichard Kenner <kenner@gcc.gnu.org>
Tue, 6 Jun 1995 22:39:24 +0000 (18:39 -0400)
committerRichard Kenner <kenner@gcc.gnu.org>
Tue, 6 Jun 1995 22:39:24 +0000 (18:39 -0400)
From-SVN: r9895

gcc/c-decl.c

index e7beed87eddc62fa2fed9ac0d94c94766ecef791..af56e9bba9f4223392a93a7a00603a77f35bb528 100644 (file)
@@ -3533,6 +3533,10 @@ start_decl (declarator, declspecs, initialized, attributes, prefix_attributes)
   if (TREE_CODE (decl) == FUNCTION_DECL)
     gen_aux_info_record (decl, 0, 0, TYPE_ARG_TYPES (TREE_TYPE (decl)) != 0);
 
+  /* For C and Objective-C, we by default put things in .common when
+     possible.  */
+  DECL_COMMON (decl) = 1;
+
   /* Set attributes here so if duplicate decl, will have proper attributes.  */
   decl_attributes (decl, attributes, prefix_attributes);
 
@@ -3540,10 +3544,6 @@ start_decl (declarator, declspecs, initialized, attributes, prefix_attributes)
      TEM may equal DECL or it may be a previous decl of the same name.  */
   tem = pushdecl (decl);
 
-  /* For C and Objective-C, we by default put things in .common when
-     possible.  */
-  DECL_COMMON (tem) = 1;
-
   /* For a local variable, define the RTL now.  */
   if (current_binding_level != global_binding_level
       /* But not if this is a duplicate decl