Fix SCO5 namespace/dwarf interaction bug.
authorJim Wilson <wilson@cygnus.com>
Tue, 19 May 1998 15:31:53 +0000 (15:31 +0000)
committerJim Wilson <wilson@gcc.gnu.org>
Tue, 19 May 1998 15:31:53 +0000 (08:31 -0700)
* dwarfout.c (dwarfout_file_scope_decl, case TYPE_DECL): Ignore
LANG_TYPE trees with DECL_SOURCE_LINE of 0.

From-SVN: r19883

gcc/ChangeLog
gcc/dwarfout.c

index e1660b19f997b8f3a28613b176c9b02a8135506f..811a157a4b0f0a1901e50fd2df624d6e45180d14 100644 (file)
@@ -1,3 +1,8 @@
+1998-05-19  Jim Wilson  <wilson@cygnus.com>
+
+       * dwarfout.c (dwarfout_file_scope_decl, case TYPE_DECL): Ignore
+       LANG_TYPE trees with DECL_SOURCE_LINE of 0.
+
 Tue May 19 15:07:54 1998  Todd Vierling  <tv@netbsd.org>
 
        * arm/netbsd.h: Ensure DWARF2_UNWIND_INFO is undefined.
index e80a2c9a92fd5da07e8c025a461e0423c8535336..ce9df47efd385699496bb3365521db62c5e544f6 100644 (file)
@@ -5190,8 +5190,18 @@ dwarfout_file_scope_decl (decl, set_finalizing)
         really need to output these (non-fundamental) types because other
         DIEs may contain references to them.  */
 
+      /* Also ignore language dependent types here, because they are probably
+        also built-in types.  If we didn't ignore them, then we would get
+        references to undefined labels because output_type doesn't support
+        them.   So, for now, we need to ignore them to avoid assembler
+        errors.  */
+
+      /* ??? This code is different than the equivalent code in dwarf2out.c.
+        The dwarf2out.c code is probably more correct.  */
+
       if (DECL_SOURCE_LINE (decl) == 0
-         && type_is_fundamental (TREE_TYPE (decl)))
+         && (type_is_fundamental (TREE_TYPE (decl))
+             || TREE_CODE (TREE_TYPE (decl)) == LANG_TYPE))
        return;
 
       /* If we are in terse mode, don't generate any DIEs to represent