OSDN Git Service

* gcc.dg/compat/scalar-by-value-3_main.c: New file.
[pf3gnuchains/gcc-fork.git] / gcc / dwarfout.c
index e9a35bb..8555443 100644 (file)
@@ -1,6 +1,6 @@
 /* Output Dwarf format symbol table information from the GNU C compiler.
-   Copyright (C) 1992, 1993, 1995, 1996, 1997, 1998, 2002,
-   1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+   Copyright (C) 1992, 1993, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+   2002, 2003 Free Software Foundation, Inc.
    Contributed by Ron Guilmette (rfg@monkeys.com) of Network Computing Devices.
 
 This file is part of GCC.
@@ -581,6 +581,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 #include "toplev.h"
 #include "tm_p.h"
 #include "debug.h"
+#include "target.h"
 #include "langhooks.h"
 
 /* NOTE: In the comments in this file, many references are made to
@@ -1293,7 +1294,8 @@ const struct gcc_debug_hooks dwarf_debug_hooks =
   dwarfout_global_decl,
   dwarfout_deferred_inline_function,
   debug_nothing_tree,          /* outlining_inline_function */
-  debug_nothing_rtx            /* label */
+  debug_nothing_rtx,           /* label */
+  debug_nothing_int            /* handle_pch */
 };
 \f
 /************************ general utility functions **************************/
@@ -2097,9 +2099,7 @@ output_mem_loc_descriptor (rtl)
      which is actually within the array.  That's *not* necessarily the
      same as the zeroth element of the array.  */
 
-#ifdef ASM_SIMPLIFY_DWARF_ADDR
-  rtl = ASM_SIMPLIFY_DWARF_ADDR (rtl);
-#endif
+  rtl = (*targetm.delegitimize_address) (rtl);
 
   switch (GET_CODE (rtl))
     {
@@ -4180,7 +4180,8 @@ static void
 output_inheritance_die (arg)
      void *arg;
 {
-  tree binfo = arg;
+  tree binfo = ((tree *)arg)[0];
+  tree access = ((tree *)arg)[1];
 
   ASM_OUTPUT_DWARF_TAG (asm_out_file, TAG_inheritance);
   sibling_attribute ();
@@ -4191,12 +4192,12 @@ output_inheritance_die (arg)
       ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_virtual);
       ASM_OUTPUT_DWARF_STRING_NEWLINE (asm_out_file, "");
     }
-  if (TREE_VIA_PUBLIC (binfo))
+  if (access == access_public_node)
     {
       ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_public);
       ASM_OUTPUT_DWARF_STRING_NEWLINE (asm_out_file, "");
     }
-  else if (TREE_VIA_PROTECTED (binfo))
+  else if (access == access_protected_node)
     {
       ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_protected);
       ASM_OUTPUT_DWARF_STRING_NEWLINE (asm_out_file, "");
@@ -4897,18 +4898,25 @@ output_type (type, containing_scope)
 
        if (COMPLETE_TYPE_P (type))
          {
+           tree binfo = TYPE_BINFO (type);
+           
            /* First output info about the base classes.  */
-           if (TYPE_BINFO (type) && TYPE_BINFO_BASETYPES (type))
+           if (binfo)
              {
-               register tree bases = TYPE_BINFO_BASETYPES (type);
-               register int n_bases = TREE_VEC_LENGTH (bases);
+               tree bases = BINFO_BASETYPES (binfo);
+               tree accesses = BINFO_BASEACCESSES (binfo);
+               register int n_bases = BINFO_N_BASETYPES (binfo);
                register int i;
 
                for (i = 0; i < n_bases; i++)
                  {
-                   tree binfo = TREE_VEC_ELT (bases, i);
+                   tree arg[2];
+
+                   arg[0] = TREE_VEC_ELT (bases, i);
+                   arg[1] = (accesses ? TREE_VEC_ELT (accesses, i)
+                             : access_public_node);
                    output_type (BINFO_TYPE (binfo), containing_scope);
-                   output_die (output_inheritance_die, binfo);
+                   output_die (output_inheritance_die, arg);
                  }
              }
 
@@ -6277,7 +6285,7 @@ dwarfout_init (main_input_filename)
            char *dirname;
 
            if (!pwd)
-             fatal_io_error ("can't get current directory");
+             fatal_error ("can't get current directory: %m");
 
            dirname = concat (pwd, "/", NULL);
            ASM_OUTPUT_DWARF_STRING_NEWLINE (asm_out_file, dirname);