]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
varasm.c (make_decl_rtl): Treat decls with a DECL_CONTEXT of TRANSLATION_UNIT_DECL...
authorMark Mitchell <mark@codesourcery.com>
Fri, 11 Jul 2003 21:20:18 +0000 (21:20 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Fri, 11 Jul 2003 21:20:18 +0000 (21:20 +0000)
* varasm.c (make_decl_rtl): Treat decls with a DECL_CONTEXT of
TRANSLATION_UNIT_DECL as top_level.

From-SVN: r69244

gcc/ChangeLog
gcc/varasm.c

index 2c60ad5cc7b98bc51d0019f19341733f85e05b3f..4ee46e92f3f781f883e3da47876faefd31b73fe3 100644 (file)
@@ -1,3 +1,8 @@
+2003-07-11  Mark Mitchell  <mark@codesourcery.com>
+
+       * varasm.c (make_decl_rtl): Treat decls with a DECL_CONTEXT of
+       TRANSLATION_UNIT_DECL as top_level.
+
 2003-07-11  Jakub Jelinek  <jakub@redhat.com>
 
        * optabs.c (prepare_cmp_insn): Try cmpmemM first if it exists,
index aa1c3557de79e72bd7717517bb59f7fc953a2fb7..6b02b3477cffb1d5fef12a1f44be528af73fb5a6 100644 (file)
@@ -750,7 +750,9 @@ decode_reg_name (const char *asmspec)
 void
 make_decl_rtl (tree decl, const char *asmspec)
 {
-  int top_level = (DECL_CONTEXT (decl) == NULL_TREE);
+  int top_level = (DECL_CONTEXT (decl) == NULL_TREE
+                  || (TREE_CODE (DECL_CONTEXT (decl))
+                      == TRANSLATION_UNIT_DECL));
   const char *name = 0;
   const char *new_name = 0;
   int reg_number;