ooo-build r11478 - trunk/patches/test
- From: michael svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r11478 - trunk/patches/test
- Date: Thu, 31 Jan 2008 12:11:44 +0000 (GMT)
Author: michael
Date: Thu Jan 31 12:11:44 2008
New Revision: 11478
URL: http://svn.gnome.org/viewvc/ooo-build?rev=11478&view=rev
Log:
fix a couple of debugging / output bugs, fix a BTYPE comparison
and fix construction vtable generation.
Modified:
trunk/patches/test/suse-vtrelocs-gcc.diff
Modified: trunk/patches/test/suse-vtrelocs-gcc.diff
==============================================================================
--- trunk/patches/test/suse-vtrelocs-gcc.diff (original)
+++ trunk/patches/test/suse-vtrelocs-gcc.diff Thu Jan 31 12:11:44 2008
@@ -12,7 +12,7 @@
diff -u -r -x '*~' -x '*.rej' -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-30 16:57:56.000000000 +0000
++++ gcc-4.2.1-simple/gcc/cp/class.c 2008-01-31 12:09:33.000000000 +0000
@@ -181,8 +181,7 @@
static tree end_of_class (tree, int);
static bool layout_empty_base (tree, tree, splay_tree);
@@ -168,7 +168,7 @@
{
tree list;
tree vbase;
-@@ -6662,8 +6775,426 @@
+@@ -6662,8 +6775,442 @@
accumulate_vtbl_inits (vbase, vbase, TYPE_BINFO (t), t, list);
}
@@ -218,11 +218,18 @@
+ unsigned HOST_WIDE_INT ix;
+ VEC(constructor_elt,gc) *vtable;
+
-+ if (!getenv ("MOREDEBUG"))
-+ return;
-+
-+ fprintf (stderr, "VTable(!?) for '%s'\n",
-+ type_as_string (BINFO_TYPE (binfo), TFF_PLAIN_IDENTIFIER));
++ if (t != NULL && BINFO_TYPE(t) != binfo)
++ {
++ fprintf (stderr, "Constr VTable for %s-in-",
++ type_as_string (BINFO_TYPE (binfo), TFF_PLAIN_IDENTIFIER));
++ fprintf (stderr, "%s\n",
++ type_as_string (t, TFF_PLAIN_IDENTIFIER));
++ }
++ else
++ {
++ fprintf (stderr, "VTable for %s\n",
++ type_as_string (BINFO_TYPE (binfo), TFF_PLAIN_IDENTIFIER));
++ }
+
+ vtable = get_vtinit_for_binfo (binfo, t, 0);
+ if (!vtable)
@@ -338,9 +345,10 @@
+ for (i = 0; i < VEC_length(vt_copy_record, vt_copies); i++)
+ {
+ vt_copy_record *cpy = VEC_index (vt_copy_record, vt_copies, i);
-+ fprintf (stderr, "\tcopy from %s+%d to %s+%d mask 0x%x\n",
++ fprintf (stderr, "\tcopy from %s+%d to ",
+ type_as_string (BINFO_TYPE (cpy->src->binfo), TFF_PLAIN_IDENTIFIER),
-+ cpy->src->offset + cpy->offset,
++ cpy->src->offset + cpy->offset);
++ fprintf (stderr, "%s+%d mask 0x%x\n",
+ type_as_string (BINFO_TYPE (cpy->dest->binfo), TFF_PLAIN_IDENTIFIER),
+ cpy->dest->offset + cpy->offset,
+ cpy->bitmap);
@@ -399,12 +407,15 @@
+ }
+
+ if (verbose_debug)
-+ fprintf (stderr, "compare: %s %s %s (0x%x) [%s]\n",
-+ expr_as_string (src_fn, TFF_PLAIN_IDENTIFIER),
-+ src_fn == dest_fn ? "==" : "!=",
-+ expr_as_string (dest_fn, TFF_PLAIN_IDENTIFIER),
-+ bitmap,
-+ src_fn == abort_fndecl ? "pure-virt" : "non-pure virt");
++ {
++ fprintf (stderr, "compare: %s %s ",
++ expr_as_string (src_fn, TFF_PLAIN_IDENTIFIER),
++ src_fn == dest_fn ? "==" : "!=");
++ fprintf (stderr, "%s (0x%x) [%s]\n",
++ expr_as_string (dest_fn, TFF_PLAIN_IDENTIFIER),
++ bitmap,
++ src_fn == abort_fndecl ? "pure-virt" : "non-pure virt");
++ }
+
+ if (!elide_leading_zeros)
+ bits_set++;
@@ -434,9 +445,6 @@
+ */
+ vtable = VEC_copy(constructor_elt,gc,vinits);
+
-+ /* FIXME: copy & backup the original data before we mangle it
-+ for future reference [!] */
-+
+ if (verbose_debug)
+ fprintf (stderr, "re-writing vtable:\n");
+ for (i = 0; i < VEC_length(vt_copy_record, vt_copies); i++)
@@ -544,20 +552,28 @@
+ else
+ fprintf (stderr, "Error: already set!\n");
+
-+ debug_vtable (binfo, t);
-+
+ if (getenv ("MOREDEBUG"))
-+ fprintf (stderr, "Inherited from:\n");
-+ for (i = 0; BINFO_BASE_ITERATE (TYPE_BINFO (t), i, base_binfo); i++)
+ {
-+ tree btype = BINFO_TYPE (base_binfo);
-+ debug_vtable (TYPE_BINFO (btype), NULL_TREE);
++ debug_vtable (binfo, t);
++
++ fprintf (stderr, "Inherited from:\n");
++ if (TYPE_BINFO (t) != binfo)
++ {
++ debug_vtable (binfo, NULL_TREE);
++ }
++ for (i = 0; BINFO_BASE_ITERATE (binfo, i, base_binfo); i++)
++ {
++ tree btype = BINFO_TYPE (base_binfo);
++ debug_vtable (TYPE_BINFO (btype), NULL_TREE);
++ }
+ }
+
+ src_frags = VEC_alloc(vt_fragment,heap,4);
+ dest_frags = VEC_alloc(vt_fragment,heap,4);
+ vtdecompose_frags (binfo, t, &dest_frags);
-+ for (i = 0; BINFO_BASE_ITERATE (TYPE_BINFO (t), i, base_binfo); i++)
++ if (TYPE_BINFO (t) != binfo)
++ vtdecompose_frags (binfo, NULL_TREE, &src_frags);
++ for (i = 0; BINFO_BASE_ITERATE (binfo, i, base_binfo); i++)
+ vtdecompose_frags (TYPE_BINFO (BINFO_TYPE (base_binfo)), NULL_TREE, &src_frags);
+ /* FIXME: do we want virtual bases here too ? */
+
@@ -596,7 +612,7 @@
}
/* Initialize the vtable for BINFO with the INITS. */
-@@ -6984,6 +7515,17 @@
+@@ -6984,6 +7531,17 @@
/* Initialize the construction vtable. */
CLASSTYPE_VTABLES (t) = chainon (CLASSTYPE_VTABLES (t), vtbl);
@@ -711,7 +727,7 @@
pop_namespace ();
diff -u -r -x '*~' -x '*.rej' -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-29 14:10:21.000000000 +0000
++++ gcc-4.2.1-simple/gcc/cp/mangle.c 2008-01-31 12:05:37.000000000 +0000
@@ -2670,6 +2670,112 @@
return mangle_special_for_type (type, "TV");
}
@@ -785,7 +801,7 @@
+ const tree t,
+ const char *prefix)
+{
-+ int constr = BINFO_TYPE (t) != binfo; /* test: one */
++ int constr = TYPE_BINFO (t) != binfo; /* test: one */
+ const char *name;
+
+ start_mangling (t, /*ident_p=*/true);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]