]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
dwarf2out.c (scope_die_for): If the containing scope is a TRANSLATION_UNIT_DECL,...
authorDaniel Jacobowitz <dan@codesourcery.com>
Mon, 31 Jan 2005 23:19:34 +0000 (23:19 +0000)
committerDaniel Jacobowitz <drow@gcc.gnu.org>
Mon, 31 Jan 2005 23:19:34 +0000 (23:19 +0000)
2004-09-22  Mark Mitchell  <mark@codesourcery.com>
* gcc/dwarf2out.c (scope_die_for): If the containing scope is a
TRANSLATION_UNIT_DECL, consider it to be a global.

From-SVN: r94504

gcc/ChangeLog
gcc/dwarf2out.c

index 6b5bad2e13be60ec0c718441fd9d2e9c956f9149..6e15b90ae26699b5e4dc5bb51c5342248f312308 100644 (file)
@@ -1,3 +1,9 @@
+2005-01-31  Daniel Jacobowitz  <dan@codesourcery.com>
+
+       2004-09-22  Mark Mitchell  <mark@codesourcery.com>
+       * gcc/dwarf2out.c (scope_die_for): If the containing scope is a
+       TRANSLATION_UNIT_DECL, consider it to be a global.
+
 2005-01-29  Alan Modra  <amodra@bigpond.net.au>
 
        * unwind-dw2.c (execute_stack_op): Add missing cases for
index 9416023c57620fb2489d6a2b8a490da827340a9a..d59cc1d3ab57ae7c6df4a5302fcb62a18372ed6d 100644 (file)
@@ -1,6 +1,6 @@
 /* Output Dwarf2 format symbol table information from GCC.
    Copyright (C) 1992, 1993, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-   2003, 2004 Free Software Foundation, Inc.
+   2003, 2004, 2005 Free Software Foundation, Inc.
    Contributed by Gary Funck (gary@intrepid.com).
    Derived from DWARF 1 implementation of Ron Guilmette (rfg@monkeys.com).
    Extensively modified by Jason Merrill (jason@cygnus.com).
@@ -10264,7 +10264,8 @@ scope_die_for (tree t, dw_die_ref context_die)
   if (containing_scope && TREE_CODE (containing_scope) == FUNCTION_TYPE)
     containing_scope = NULL_TREE;
 
-  if (containing_scope == NULL_TREE)
+  if (containing_scope == NULL_TREE 
+      || TREE_CODE (containing_scope) == TRANSLATION_UNIT_DECL)
     scope_die = comp_unit_die;
   else if (TYPE_P (containing_scope))
     {