re PR debug/11473 (ICE with -gstabs when empty struct inheits from an empty struct)
[gcc.git] / gcc / dbxout.c
index 188b060f40a8b99659775f2b81b7e1c8b133ec7e..770b0be14c112a5ece50ff172e943a89111ee710 100644 (file)
@@ -195,11 +195,6 @@ struct dbx_file GTY(())
   struct dbx_file *prev;              /* Chain to traverse all pending bincls.  */
 };
 
-#ifdef DBX_USE_BINCL
-/* If zero then there is no pending BINCL.  */
-static int pending_bincls = 0;
-#endif
-
 /* This is the top of the stack.  */
 
 static GTY(()) struct dbx_file *current_file;
@@ -241,6 +236,11 @@ static GTY(()) int lastfile_is_base;
 
 #if defined (DBX_DEBUGGING_INFO) || defined (XCOFF_DEBUGGING_INFO)
 
+#ifdef DBX_USE_BINCL
+/* If zero then there is no pending BINCL.  */
+static int pending_bincls = 0;
+#endif
+
 /* The original input file name.  */
 static const char *base_input_file;
 
@@ -562,7 +562,7 @@ dbxout_typedefs (tree syms)
 }
 
 #ifdef DBX_USE_BINCL
-/* Emit BINCL stab using given name.   */
+/* Emit BINCL stab using given name.  */
 static void
 emit_bincl_stab (const char *name)
 {
@@ -574,7 +574,7 @@ emit_bincl_stab (const char *name)
 /* If there are pending bincls then it is time to emit all of them.  */
 
 static inline void
-emit_pending_bincls_if_required ()
+emit_pending_bincls_if_required (void)
 {
   if (pending_bincls)
     emit_pending_bincls ();
@@ -583,7 +583,7 @@ emit_pending_bincls_if_required ()
 /* Emit all pending bincls.  */
 
 static void
-emit_pending_bincls ()
+emit_pending_bincls (void)
 {
   struct dbx_file *f = current_file;
 
@@ -616,7 +616,7 @@ emit_pending_bincls ()
 #else
 
 static inline void
-emit_pending_bincls_if_required () {}
+emit_pending_bincls_if_required (void) {}
 #endif
 
 /* Change to reading from a new source file.  Generate a N_BINCL stab.  */
@@ -1756,9 +1756,7 @@ dbxout_type (tree type, int full)
                                * BITS_PER_UNIT);
                putc (',', asmfile);
                CHARS (1);
-               print_wide_int (tree_low_cst (DECL_SIZE
-                                             (TYPE_NAME
-                                              (BINFO_TYPE (child))),
+               print_wide_int (tree_low_cst (TYPE_SIZE (BINFO_TYPE (child)),
                                              0)
                                * BITS_PER_UNIT);
                putc (';', asmfile);