diff options
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/varasm.c | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2c60ad5..4ee46e9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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, diff --git a/gcc/varasm.c b/gcc/varasm.c index aa1c355..6b02b34 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -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; |