(make_decl_rtl): Allow section attribute if...
authorRichard Kenner <kenner@gcc.gnu.org>
Mon, 10 Apr 1995 12:20:36 +0000 (08:20 -0400)
committerRichard Kenner <kenner@gcc.gnu.org>
Mon, 10 Apr 1995 12:20:36 +0000 (08:20 -0400)
(make_decl_rtl): Allow section attribute if -fno-common or variable is
not to be placed in common for some other reason.

From-SVN: r9348

gcc/varasm.c

index 818628ba27385415f3db46c42ad96c565987449f..865de4813e8518df82d01ac80de493d9728fed84 100644 (file)
@@ -538,7 +538,9 @@ make_decl_rtl (decl, asmspec, top_level)
         unit that behaved thusly).  So warn the user.  */
       else if (TREE_CODE (decl) == VAR_DECL
               && DECL_SECTION_NAME (decl) != NULL_TREE
-              && DECL_INITIAL (decl) == NULL_TREE)
+              && DECL_INITIAL (decl) == NULL_TREE
+              && DECL_COMMON (decl)
+              && ! flag_no_common)
        {
          warning_with_decl (decl,
                             "section attribute ignored for uninitialized variable `%s'");