ooo-build r11317 - trunk/patches/test



Author: michael
Date: Fri Jan 18 12:32:58 2008
New Revision: 11317
URL: http://svn.gnome.org/viewvc/ooo-build?rev=11317&view=rev

Log:
fix nasty crasher & cleanup debug output.


Modified:
   trunk/patches/test/gcc-vt-copy-3.diff

Modified: trunk/patches/test/gcc-vt-copy-3.diff
==============================================================================
--- trunk/patches/test/gcc-vt-copy-3.diff	(original)
+++ trunk/patches/test/gcc-vt-copy-3.diff	Fri Jan 18 12:32:58 2008
@@ -1,6 +1,6 @@
 diff -u -r -x '*~' -x testsuite -x libjava -x cc-nptl -x build-dir -x '*.orig' -x obj-i586-suse-linux -x texis -x Makeconfig -x version.h -x '*.o' -x '*.1' -x 'Makefile*' -x 'config*' -x libtool -x '*.info' -x '*.tex' pristine-gcc-4.2.1-simple/gcc/cgraph.c gcc-4.2.1-simple/gcc/cgraph.c
 --- pristine-gcc-4.2.1-simple/gcc/cgraph.c	2007-03-13 10:38:31.000000000 +0000
-+++ gcc-4.2.1-simple/gcc/cgraph.c	2008-01-15 16:49:44.000000000 +0000
++++ gcc-4.2.1-simple/gcc/cgraph.c	2008-01-18 12:30:23.000000000 +0000
 @@ -928,6 +928,11 @@
  void
  cgraph_varpool_mark_needed_node (struct cgraph_varpool_node *node)
@@ -27,7 +27,7 @@
  
 diff -u -r -x '*~' -x testsuite -x libjava -x cc-nptl -x build-dir -x '*.orig' -x obj-i586-suse-linux -x texis -x Makeconfig -x version.h -x '*.o' -x '*.1' -x 'Makefile*' -x 'config*' -x libtool -x '*.info' -x '*.tex' pristine-gcc-4.2.1-simple/gcc/cp/class.c gcc-4.2.1-simple/gcc/cp/class.c
 --- pristine-gcc-4.2.1-simple/gcc/cp/class.c	2007-07-05 10:02:39.000000000 +0100
-+++ gcc-4.2.1-simple/gcc/cp/class.c	2008-01-17 11:32:50.000000000 +0000
++++ gcc-4.2.1-simple/gcc/cp/class.c	2008-01-18 12:34:50.000000000 +0000
 @@ -136,7 +136,7 @@
  static tree fixed_type_or_null (tree, int *, int *);
  static tree build_simple_base_path (tree expr, tree binfo);
@@ -105,7 +105,7 @@
  
  /* Returns the binfo for the primary base of BINFO.  If the resulting
     BINFO is a virtual base, and it is inherited elsewhere in the
-@@ -6637,6 +6683,140 @@
+@@ -6637,6 +6683,148 @@
    dump_thunk (stderr, 0, fn);
  }
  
@@ -178,8 +178,9 @@
 +  tree inits = NULL_TREE;
 +  tree st;
 +  
-+  fprintf (stderr, "Copy data for '%s'\n",
-+	   type_as_string (t, TFF_PLAIN_IDENTIFIER));
++  if (getenv ("MOREDEBUG"))
++    fprintf (stderr, "Copy data for '%s'\n",
++	     type_as_string (t, TFF_PLAIN_IDENTIFIER));
 +  for (st = slot_relocs; st; st = TREE_CHAIN(st)) 
 +    {
 +      tree orig_binfo = TREE_PURPOSE(st);
@@ -190,21 +191,28 @@
 +      unsigned int src_offset = 0;
 +      int elide_leading_bits = 1;
 +
-+      fprintf (stderr, "\tfrom %s (%d) entries\n",
-+	       orig_binfo ? type_as_string (orig_binfo, TFF_PLAIN_IDENTIFIER) : "<null pad>",
-+	       list_length (init_list));
++      if (getenv ("MOREDEBUG"))
++	fprintf (stderr, "\tfrom %s (%d) entries\n",
++		 orig_binfo ? type_as_string (orig_binfo, TFF_PLAIN_IDENTIFIER) : "<null pad>",
++		 list_length (init_list));
 +      for (v = init_list; v; v = TREE_CHAIN(v))
 +	{
 +	  if (!TREE_VALUE(v))
-+	    fprintf (stderr, "\t%3d\tNULL\n", dest_offset);
++	    {
++	      if (getenv ("MOREDEBUG"))
++		fprintf (stderr, "\t%3d\tNULL\n", dest_offset);
++	    }
 +	  else
 +	    {
 +	      tree fn = TREE_VALUE(v);
 +	      elide_leading_bits = 0;
-+	      fprintf (stderr, "\t%3d\t%s ", dest_offset,
-+		       expr_as_string (fn, TFF_PLAIN_IDENTIFIER));
-+	      fprintf (stderr, "[ %s ]\n",
-+		       expr_as_string (DECL_VINDEX (fn), TFF_PLAIN_IDENTIFIER));
++	      if (getenv ("MOREDEBUG"))
++		{
++		  fprintf (stderr, "\t%3d\t%s ", dest_offset,
++			   expr_as_string (fn, TFF_PLAIN_IDENTIFIER));
++		  fprintf (stderr, "[ %s ]\n",
++			   expr_as_string (DECL_VINDEX (fn), TFF_PLAIN_IDENTIFIER));
++		}
 +	      bitmap |= 1 << i;
 +	    }
 +	  /* don't waste space for non-copies */
@@ -246,7 +254,7 @@
  /* Virtual function table initialization.  */
  
  /* Create all the necessary vtables for T and its base classes.  */
-@@ -6647,19 +6827,30 @@
+@@ -6647,19 +6835,30 @@
    tree list;
    tree vbase;
  
@@ -279,7 +287,7 @@
      }
  
    if (BINFO_VTABLE (TYPE_BINFO (t)))
-@@ -6676,6 +6867,10 @@
+@@ -6676,6 +6875,10 @@
    layout_vtable_decl (binfo, list_length (inits));
    decl = get_vtbl_decl_for_binfo (binfo);
    initialize_artificial_var (decl, inits);
@@ -290,7 +298,7 @@
    dump_vtable (BINFO_TYPE (binfo), binfo, decl);
  }
  
-@@ -6945,6 +7140,7 @@
+@@ -6945,6 +7148,7 @@
    tree inits;
    tree id;
    tree vbase;
@@ -298,7 +306,7 @@
  
    /* See if we've already created this construction vtable group.  */
    id = mangle_ctor_vtbl_for_type (t, binfo);
-@@ -6955,11 +7151,13 @@
+@@ -6955,11 +7159,13 @@
    /* Build a version of VTBL (with the wrong type) for use in
       constructing the addresses of secondary vtables in the
       construction vtable group.  */
@@ -313,7 +321,7 @@
  
    /* Add the vtables for each of our virtual bases using the vbase in T
       binfo.  */
-@@ -6973,7 +7171,7 @@
+@@ -6973,7 +7179,7 @@
  	continue;
        b = copied_binfo (vbase, binfo);
  
@@ -322,7 +330,7 @@
      }
    inits = TREE_VALUE (list);
  
-@@ -6986,6 +7184,11 @@
+@@ -6986,6 +7192,11 @@
    CLASSTYPE_VTABLES (t) = chainon (CLASSTYPE_VTABLES (t), vtbl);
    initialize_artificial_var (vtbl, inits);
    dump_vtable (t, binfo, vtbl);
@@ -334,7 +342,7 @@
  }
  
  /* Add the vtbl initializers for BINFO (and its bases other than
-@@ -7003,7 +7206,8 @@
+@@ -7003,7 +7214,8 @@
  		       tree orig_binfo,
  		       tree rtti_binfo,
  		       tree t,
@@ -344,7 +352,7 @@
  {
    int i;
    tree base_binfo;
-@@ -7026,7 +7230,7 @@
+@@ -7026,7 +7238,7 @@
    TREE_VALUE (inits)
      = chainon (TREE_VALUE (inits),
  	       dfs_accumulate_vtbl_inits (binfo, orig_binfo,
@@ -353,7 +361,7 @@
  
    /* Walk the BINFO and its bases.  We walk in preorder so that as we
       initialize each vtable we can figure out at what offset the
-@@ -7041,7 +7245,7 @@
+@@ -7041,7 +7253,7 @@
        accumulate_vtbl_inits (base_binfo,
  			     BINFO_BASE_BINFO (orig_binfo, i),
  			     rtti_binfo, t,
@@ -362,7 +370,7 @@
      }
  }
  
-@@ -7053,7 +7257,8 @@
+@@ -7053,7 +7265,8 @@
  			   tree orig_binfo,
  			   tree rtti_binfo,
  			   tree t,
@@ -372,7 +380,7 @@
  {
    tree inits = NULL_TREE;
    tree vtbl = NULL_TREE;
-@@ -7120,7 +7325,7 @@
+@@ -7120,7 +7333,7 @@
  
        /* Compute the initializer for this vtable.  */
        inits = build_vtbl_initializer (binfo, orig_binfo, t, rtti_binfo,
@@ -381,48 +389,7 @@
  
        /* Figure out the position to which the VPTR should point.  */
        vtbl = TREE_PURPOSE (l);
-@@ -7154,6 +7359,40 @@
-   return inits;
- }
- 
-+#ifdef REALLY_BROKEN_NOW
-+static void
-+dump_slot_relocs (tree t, tree slot_relocs)
-+{
-+  tree st;
-+  fprintf (stderr, "Copy data for '%s'\n",
-+           type_as_string (t, TFF_PLAIN_IDENTIFIER));
-+
-+  for (st = slot_relocs; st; st = TREE_CHAIN(st)) 
-+    {
-+        /* This is not correct anymore - not a binfo ... */
-+        tree orig_binfo = TREE_PURPOSE(st);
-+        tree init_list = TREE_VALUE(st);
-+        tree v;
-+        fprintf (stderr, "\tfrom %s (%d) entries\n",
-+                 type_as_string (orig_binfo, TFF_PLAIN_IDENTIFIER),
-+                 list_length (init_list));
-+        for (v = init_list; v; v = TREE_CHAIN(v)) 
-+          {
-+            if (!TREE_VALUE(v))
-+                fprintf (stderr, "\t\tNULL\n");
-+            else
-+              {
-+                tree fn = TREE_VALUE(v);
-+                fprintf (stderr, "\t\t%s ",
-+                         expr_as_string (fn, TFF_PLAIN_IDENTIFIER));
-+                fprintf (stderr, "[ %s ]\n",
-+                         expr_as_string (DECL_VINDEX (fn), TFF_PLAIN_IDENTIFIER));
-+              }
-+          }
-+    }
-+}
-+#endif
-+
- static GTY(()) tree abort_fndecl_addr;
- 
- /* Construct the initializer for BINFO's virtual function table.  BINFO
-@@ -7184,7 +7423,8 @@
+@@ -7184,7 +7397,8 @@
  			tree orig_binfo,
  			tree t,
  			tree rtti_binfo,
@@ -432,7 +399,7 @@
  {
    tree v, b;
    tree vfun_inits;
-@@ -7192,6 +7432,8 @@
+@@ -7192,6 +7406,8 @@
    unsigned ix;
    tree vbinfo;
    VEC(tree,gc) *vbases;
@@ -441,7 +408,7 @@
  
    /* Initialize VID.  */
    memset (&vid, 0, sizeof (vid));
-@@ -7213,7 +7455,7 @@
+@@ -7213,7 +7429,7 @@
       signature, we share the vcall offsets.  */
    vid.fns = VEC_alloc (tree, gc, 32);
    /* Add the vcall and vbase offset entries.  */
@@ -450,7 +417,7 @@
  
    /* Clear BINFO_VTABLE_PATH_MARKED; it's set by
       build_vbase_offset_vtbl_entries.  */
-@@ -7240,18 +7482,52 @@
+@@ -7240,18 +7456,55 @@
  	}
      }
  
@@ -478,20 +445,23 @@
       initializers.  */
    vfun_inits = NULL_TREE;
 +
-+  fprintf (stderr, "Init vtable idx %d: ",
-+           slot_relocs ? list_length (*slot_relocs) : -1);
-+  fprintf (stderr, " (%s)",
-+           type_as_string (t, TFF_PLAIN_IDENTIFIER));
-+  fprintf (stderr, " (%s)",
-+           type_as_string (binfo, TFF_PLAIN_IDENTIFIER));
-+  fprintf (stderr, " (%s) -",
-+           type_as_string (orig_binfo, TFF_PLAIN_IDENTIFIER));
-+  fprintf (stderr, " (%s) -",
-+           type_as_string (rtti_binfo, TFF_PLAIN_IDENTIFIER));
-+  if (get_primary_binfo (binfo))
++  if (getenv ("MOREDEBUG"))
++    {
++      fprintf (stderr, "Init vtable idx %d: ",
++	       slot_relocs ? list_length (*slot_relocs) : -1);
 +      fprintf (stderr, " (%s)",
-+               type_as_string (get_primary_binfo (binfo), TFF_PLAIN_IDENTIFIER));
-+  fprintf (stderr, "** %d inits **\n", num_inits);
++	       type_as_string (t, TFF_PLAIN_IDENTIFIER));
++      fprintf (stderr, " (%s)",
++	       type_as_string (binfo, TFF_PLAIN_IDENTIFIER));
++      fprintf (stderr, " (%s) -",
++	       type_as_string (orig_binfo, TFF_PLAIN_IDENTIFIER));
++      fprintf (stderr, " (%s) -",
++	       type_as_string (rtti_binfo, TFF_PLAIN_IDENTIFIER));
++      if (get_primary_binfo (binfo))
++	fprintf (stderr, " (%s)",
++		 type_as_string (get_primary_binfo (binfo), TFF_PLAIN_IDENTIFIER));
++      fprintf (stderr, "** %d inits **\n", num_inits);
++    }
 +
    for (v = BINFO_VIRTUALS (orig_binfo); v; v = TREE_CHAIN (v))
      {
@@ -504,7 +474,7 @@
  
        fn = BV_FN (v);
        fn_original = fn;
-@@ -7281,7 +7557,10 @@
+@@ -7281,7 +7534,10 @@
  	{
  	  /* We found a defn before a lost primary; go ahead as normal.  */
  	  if (look_for_overrides_here (BINFO_TYPE (b), fn_original))
@@ -516,7 +486,7 @@
  
  	  /* The nearest definition is from a lost primary; clear the
  	     slot.  */
-@@ -7299,6 +7578,9 @@
+@@ -7299,6 +7555,9 @@
  	  delta = BV_DELTA (v);
  	  vcall_index = BV_VCALL_INDEX (v);
  
@@ -526,7 +496,7 @@
  	  gcc_assert (TREE_CODE (delta) == INTEGER_CST);
  	  gcc_assert (TREE_CODE (fn) == FUNCTION_DECL);
  
-@@ -7319,9 +7601,40 @@
+@@ -7319,9 +7578,40 @@
  		  if (!DECL_NAME (fn))
  		    finish_thunk (fn);
  		}
@@ -570,7 +540,7 @@
  	    }
  	}
  
-@@ -7346,8 +7659,34 @@
+@@ -7346,8 +7636,34 @@
  	}
        else
  	vfun_inits = tree_cons (NULL_TREE, init, vfun_inits);
@@ -605,7 +575,7 @@
    /* The initializers for virtual functions were built up in reverse
       order; straighten them out now.  */
    vfun_inits = nreverse (vfun_inits);
-@@ -7363,7 +7702,8 @@
+@@ -7363,7 +7679,8 @@
     offsets in BINFO, which is in the hierarchy dominated by T.  */
  
  static void
@@ -615,7 +585,7 @@
  {
    tree b;
  
-@@ -7371,10 +7711,17 @@
+@@ -7371,10 +7688,17 @@
       corresponding to the primary base class.  */
    b = get_primary_binfo (binfo);
    if (b)
@@ -735,35 +705,8 @@
    pop_namespace ();
 diff -u -r -x '*~' -x testsuite -x libjava -x cc-nptl -x build-dir -x '*.orig' -x obj-i586-suse-linux -x texis -x Makeconfig -x version.h -x '*.o' -x '*.1' -x 'Makefile*' -x 'config*' -x libtool -x '*.info' -x '*.tex' pristine-gcc-4.2.1-simple/gcc/cp/decl2.c gcc-4.2.1-simple/gcc/cp/decl2.c
 --- pristine-gcc-4.2.1-simple/gcc/cp/decl2.c	2007-06-28 14:16:12.000000000 +0100
-+++ gcc-4.2.1-simple/gcc/cp/decl2.c	2008-01-16 18:13:11.000000000 +0000
-@@ -1530,6 +1530,26 @@
-      info.  */
-   note_debug_info_needed (ctype);
- 
-+  fprintf (stderr, "Emit vtable for '%s'",
-+           type_as_string (ctype, TFF_PLAIN_IDENTIFIER));
-+  /* search for our type here:
-+
-+ Find it in the list ... and emit it !
-+
-++tree vtable_copy_slots;
-++
-++static void
-++append_slot_relocs (tree t, tree slot_relocs)
-++{
-++  if (slot_relocs)
-++    vtable_copy_slots = tree_cons (t, slot_relocs,
-++                                   vtable_copy_slots);
-+
-+  and emit some fun in a .vtreloc section for this vtable:
-+  with a given name, mangled from the type name [!]
-+  */
-+  
-+
-   return true;
- }
- 
-@@ -2910,6 +2930,46 @@
++++ gcc-4.2.1-simple/gcc/cp/decl2.c	2008-01-18 12:32:46.000000000 +0000
+@@ -2910,6 +2910,45 @@
      finish_objects (function_key, priority, body);
  }
  
@@ -792,16 +735,15 @@
 +	  DECL_COMDAT (decl) = 1;
 +	  ctor = build_constructor_from_list (TREE_TYPE (decl), inits);
 +	  initialize_artificial_var (decl, ctor);
-+	  TREE_PUBLIC (decl) = 0;
-+	  DECL_WEAK (decl) = 1;
-+	  DECL_INTERFACE_KNOWN (decl) = 1;
-+	  DECL_ALIGN (decl) = 4;
-+	  DECL_ALIGN (ctor) = 4;
-+	  finish_decl (decl, ctor, NULL_TREE);
-+	  
-+	  fprintf (stderr, "Generate vtreloc variable '%s' comdat? %d",
-+		   decl_as_string (decl, TFF_PLAIN_IDENTIFIER),
-+		   DECL_COMDAT (decl));
++/*
++//	  TREE_PUBLIC (decl) = 0;
++//	  DECL_WEAK (decl) = 1;
++//	  DECL_INTERFACE_KNOWN (decl) = 1;
++*/
++	  if (getenv ("MOREDEBUG"))
++	    fprintf (stderr, "Generate vtreloc variable '%s' comdat? %d\n",
++		     decl_as_string (decl, TFF_PLAIN_IDENTIFIER),
++		     DECL_COMDAT (decl));
 +	}
 +    }
 +}
@@ -810,23 +752,7 @@
  /* Generate constructor and destructor functions for the priority
     indicated by N.  */
  
-@@ -3128,11 +3188,15 @@
- 	 get emitted.  */
-       for (i = VEC_length (tree, unemitted_tinfo_decls);
- 	   VEC_iterate (tree, unemitted_tinfo_decls, --i, t);)
-+      {
-+          fprintf (stderr, "Emit tinfo decl for '%s'\n",
-+                   decl_as_string (t, TFF_PLAIN_IDENTIFIER));
- 	if (emit_tinfo_decl (t))
- 	  {
- 	    reconsider = true;
- 	    VEC_unordered_remove (tree, unemitted_tinfo_decls, i);
- 	  }
-+      }
- 
-       /* The list of objects with static storage duration is built up
- 	 in reverse order.  We clear STATIC_AGGREGATES so that any new
-@@ -3312,6 +3376,9 @@
+@@ -3312,6 +3351,9 @@
  	}
      }
  
@@ -838,8 +764,8 @@
  
 diff -u -r -x '*~' -x testsuite -x libjava -x cc-nptl -x build-dir -x '*.orig' -x obj-i586-suse-linux -x texis -x Makeconfig -x version.h -x '*.o' -x '*.1' -x 'Makefile*' -x 'config*' -x libtool -x '*.info' -x '*.tex' pristine-gcc-4.2.1-simple/gcc/cp/mangle.c gcc-4.2.1-simple/gcc/cp/mangle.c
 --- pristine-gcc-4.2.1-simple/gcc/cp/mangle.c	2006-12-11 12:16:19.000000000 +0000
-+++ gcc-4.2.1-simple/gcc/cp/mangle.c	2008-01-18 10:06:08.000000000 +0000
-@@ -2670,6 +2670,77 @@
++++ gcc-4.2.1-simple/gcc/cp/mangle.c	2008-01-18 12:32:28.000000000 +0000
+@@ -2670,6 +2670,76 @@
    return mangle_special_for_type (type, "TV");
  }
  
@@ -894,7 +820,6 @@
 +  write_order_complexity_for_type (type);
 +  write_type (type);
 +  name = finish_mangling (/*warn=*/false);
-+  fprintf (stderr, "name '%s'\n", name);
 +
 +  return name;
 +}
@@ -938,25 +863,3 @@
  /* In a VAR_DECL, nonzero if the decl is a register variable with
     an explicit asm specification.  */
  #define DECL_HARD_REGISTER(NODE)  (VAR_DECL_CHECK (NODE)->decl_with_vis.hard_register)
-diff -u -r -x '*~' -x testsuite -x libjava -x cc-nptl -x build-dir -x '*.orig' -x obj-i586-suse-linux -x texis -x Makeconfig -x version.h -x '*.o' -x '*.1' -x 'Makefile*' -x 'config*' -x libtool -x '*.info' -x '*.tex' pristine-gcc-4.2.1-simple/gcc/varasm.c gcc-4.2.1-simple/gcc/varasm.c
---- pristine-gcc-4.2.1-simple/gcc/varasm.c	2008-01-10 09:49:03.000000000 +0000
-+++ gcc-4.2.1-simple/gcc/varasm.c	2008-01-17 11:08:40.000000000 +0000
-@@ -1550,6 +1550,8 @@
- void
- assemble_align (int align)
- {
-+  if (getenv ("DEBUG"))
-+    fprintf (stderr, "assemble align %d\n", align);
-   if (align > BITS_PER_UNIT)
-     {
-       ASM_OUTPUT_ALIGN (asm_out_file, floor_log2 (align / BITS_PER_UNIT));
-@@ -1564,6 +1566,9 @@
-   int pos = 0;
-   int maximum = 2000;
- 
-+  if (getenv ("DEBUG"))
-+    fprintf (stderr, "assemble string '%s'\n", p);
-+
-   /* If the string is very long, split it up.  */
- 
-   while (pos < size)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]