ooo-build r11326 - trunk/patches/test



Author: michael
Date: Fri Jan 18 21:39:50 2008
New Revision: 11326
URL: http://svn.gnome.org/viewvc/ooo-build?rev=11326&view=rev

Log:
fix most thunk vtrelocs.


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 21:39:50 2008
@@ -1,21 +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-18 12:30:23.000000000 +0000
-@@ -928,6 +928,11 @@
- void
- cgraph_varpool_mark_needed_node (struct cgraph_varpool_node *node)
- {
-+  if (getenv ("DEBUG")) {
-+    fprintf (stderr, "Mark node '%s' as needed\n",
-+	     cgraph_varpool_node_name (node));
-+    dump_cgraph_varpool_node (stderr, node);
-+  }
-   if (!node->needed && node->finalized
-       && !TREE_ASM_WRITTEN (node->decl))
-     cgraph_varpool_enqueue_needed_node (node);
 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/collect2.c gcc-4.2.1-simple/gcc/collect2.c
 --- pristine-gcc-4.2.1-simple/gcc/collect2.c	2006-12-11 12:18:13.000000000 +0000
-+++ gcc-4.2.1-simple/gcc/collect2.c	2008-01-10 12:20:49.000000000 +0000
++++ gcc-4.2.1-simple/gcc/collect2.c	2008-01-18 14:08:10.000000000 +0000
 @@ -175,7 +175,7 @@
  static int aixrtl_flag;			/* true if -brtl */
  #endif
@@ -27,7 +12,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-18 12:34:50.000000000 +0000
++++ gcc-4.2.1-simple/gcc/cp/class.c	2008-01-18 21:35:34.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);
@@ -52,7 +37,18 @@
  static void clone_constructors_and_destructors (tree);
  static tree build_clone (tree, tree);
  static void update_vtable_entry_for_fn (tree, tree, tree, tree *, unsigned);
-@@ -6355,6 +6355,52 @@
+@@ -2013,6 +2013,10 @@
+       return;
+     }
+   overrider_target = overrider_fn = TREE_PURPOSE (overrider);
++  fprintf (stderr, "override %d %d\n",
++	   TREE_VALUE (overrider) != binfo,
++	   first_defn != binfo);
++  BV_INHERITED(*virtuals) = TREE_VALUE (overrider) != binfo;
+ 
+   /* Check for adjusting covariant return types.  */
+   over_return = TREE_TYPE (TREE_TYPE (overrider_target));
+@@ -6355,6 +6359,47 @@
    return decl;
  }
  
@@ -75,7 +71,6 @@
 +      TYPE_ALIGN (atype) = BITS_PER_UNIT * 4;
 +
 +      d = build_lang_decl (VAR_DECL, name, atype);
-+      DECL_VTRELOC_INIT(d) = 1;
 +      DECL_ALIGN(d) = 1;
 +      DECL_USER_ALIGN(d) = 1;
 +      DECL_SECTION_NAME(d) = mangle_vtreloc_section_for_type (t);
@@ -94,18 +89,14 @@
 +      DECL_NOT_REALLY_EXTERN (d) = 1;
 +      set_linkage_according_to_type (t, d);
 +      pushdecl_top_level_and_finish (d, NULL_TREE);
-+
-+      /* Add decl to the global array of tinfo decls.  */
-+      /*      VEC_safe_push (tree, gc, unemitted_tinfo_decls, d); */
 +    }
 +
-+  /* FIXME: adding this screws with inheritance badly ! */
 +  return d;
 +}
  
  /* 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,148 @@
+@@ -6637,6 +6682,148 @@
    dump_thunk (stderr, 0, fn);
  }
  
@@ -254,7 +245,7 @@
  /* Virtual function table initialization.  */
  
  /* Create all the necessary vtables for T and its base classes.  */
-@@ -6647,19 +6835,30 @@
+@@ -6647,19 +6834,30 @@
    tree list;
    tree vbase;
  
@@ -287,18 +278,7 @@
      }
  
    if (BINFO_VTABLE (TYPE_BINFO (t)))
-@@ -6676,6 +6875,10 @@
-   layout_vtable_decl (binfo, list_length (inits));
-   decl = get_vtbl_decl_for_binfo (binfo);
-   initialize_artificial_var (decl, inits);
-+/*  mark_used (decl); */ /* Wasteful - but necessary -
-+                       otherwise we need to build
-+                       .vtrelocs data as we emit
-+                       such a var_decl */
-   dump_vtable (BINFO_TYPE (binfo), binfo, decl);
- }
- 
-@@ -6945,6 +7148,7 @@
+@@ -6945,6 +7143,7 @@
    tree inits;
    tree id;
    tree vbase;
@@ -306,7 +286,7 @@
  
    /* See if we've already created this construction vtable group.  */
    id = mangle_ctor_vtbl_for_type (t, binfo);
-@@ -6955,11 +7159,13 @@
+@@ -6955,11 +7154,13 @@
    /* Build a version of VTBL (with the wrong type) for use in
       constructing the addresses of secondary vtables in the
       construction vtable group.  */
@@ -321,7 +301,7 @@
  
    /* Add the vtables for each of our virtual bases using the vbase in T
       binfo.  */
-@@ -6973,7 +7179,7 @@
+@@ -6973,7 +7174,7 @@
  	continue;
        b = copied_binfo (vbase, binfo);
  
@@ -330,7 +310,7 @@
      }
    inits = TREE_VALUE (list);
  
-@@ -6986,6 +7192,11 @@
+@@ -6986,6 +7187,11 @@
    CLASSTYPE_VTABLES (t) = chainon (CLASSTYPE_VTABLES (t), vtbl);
    initialize_artificial_var (vtbl, inits);
    dump_vtable (t, binfo, vtbl);
@@ -342,7 +322,7 @@
  }
  
  /* Add the vtbl initializers for BINFO (and its bases other than
-@@ -7003,7 +7214,8 @@
+@@ -7003,7 +7209,8 @@
  		       tree orig_binfo,
  		       tree rtti_binfo,
  		       tree t,
@@ -352,7 +332,7 @@
  {
    int i;
    tree base_binfo;
-@@ -7026,7 +7238,7 @@
+@@ -7026,7 +7233,7 @@
    TREE_VALUE (inits)
      = chainon (TREE_VALUE (inits),
  	       dfs_accumulate_vtbl_inits (binfo, orig_binfo,
@@ -361,7 +341,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 +7253,7 @@
+@@ -7041,7 +7248,7 @@
        accumulate_vtbl_inits (base_binfo,
  			     BINFO_BASE_BINFO (orig_binfo, i),
  			     rtti_binfo, t,
@@ -370,7 +350,7 @@
      }
  }
  
-@@ -7053,7 +7265,8 @@
+@@ -7053,7 +7260,8 @@
  			   tree orig_binfo,
  			   tree rtti_binfo,
  			   tree t,
@@ -380,7 +360,7 @@
  {
    tree inits = NULL_TREE;
    tree vtbl = NULL_TREE;
-@@ -7120,7 +7333,7 @@
+@@ -7120,7 +7328,7 @@
  
        /* Compute the initializer for this vtable.  */
        inits = build_vtbl_initializer (binfo, orig_binfo, t, rtti_binfo,
@@ -389,7 +369,7 @@
  
        /* Figure out the position to which the VPTR should point.  */
        vtbl = TREE_PURPOSE (l);
-@@ -7184,7 +7397,8 @@
+@@ -7184,7 +7392,8 @@
  			tree orig_binfo,
  			tree t,
  			tree rtti_binfo,
@@ -399,7 +379,7 @@
  {
    tree v, b;
    tree vfun_inits;
-@@ -7192,6 +7406,8 @@
+@@ -7192,6 +7401,8 @@
    unsigned ix;
    tree vbinfo;
    VEC(tree,gc) *vbases;
@@ -408,7 +388,7 @@
  
    /* Initialize VID.  */
    memset (&vid, 0, sizeof (vid));
-@@ -7213,7 +7429,7 @@
+@@ -7213,7 +7424,7 @@
       signature, we share the vcall offsets.  */
    vid.fns = VEC_alloc (tree, gc, 32);
    /* Add the vcall and vbase offset entries.  */
@@ -417,7 +397,7 @@
  
    /* Clear BINFO_VTABLE_PATH_MARKED; it's set by
       build_vbase_offset_vtbl_entries.  */
-@@ -7240,18 +7456,55 @@
+@@ -7240,20 +7451,57 @@
  	}
      }
  
@@ -472,9 +452,12 @@
 +      tree slot_fn = NULL_TREE;
 +      tree first_overrider = NULL_TREE;
  
-       fn = BV_FN (v);
+-      fn = BV_FN (v);
++      fn = BV_FN (v); /* v! */
        fn_original = fn;
-@@ -7281,7 +7534,10 @@
+       if (DECL_THUNK_P (fn))
+ 	{
+@@ -7281,7 +7529,10 @@
  	{
  	  /* We found a defn before a lost primary; go ahead as normal.  */
  	  if (look_for_overrides_here (BINFO_TYPE (b), fn_original))
@@ -486,7 +469,7 @@
  
  	  /* The nearest definition is from a lost primary; clear the
  	     slot.  */
-@@ -7299,6 +7555,9 @@
+@@ -7299,6 +7550,9 @@
  	  delta = BV_DELTA (v);
  	  vcall_index = BV_VCALL_INDEX (v);
  
@@ -496,17 +479,59 @@
  	  gcc_assert (TREE_CODE (delta) == INTEGER_CST);
  	  gcc_assert (TREE_CODE (fn) == FUNCTION_DECL);
  
-@@ -7319,9 +7578,40 @@
+@@ -7313,15 +7567,81 @@
+ 	    }
+ 	  else
+ 	    {
+-	      if (!integer_zerop (delta) || vcall_index)
++#if 0
++	      if (slot_relocs && first_overrider
++		  && BINFO_TYPE (first_overrider) != t
++		  /* necessary for virtual inheritance */
++		  && BINFO_TYPE (first_overrider) != binfo)
++               {
++                 /* accumulate information about overriding */
++                 gcc_assert (BINFO_VTABLE (first_overrider));
++                 slot_fn = fn;
++                 init = fold_build1 (NOP_EXPR,
++                                     vtable_entry_type,
++                                     build_int_cst (build_pointer_type (void_type_node),
++                                                    0xdeadbeef));
++               }
++	      else if (!integer_zerop (delta) || vcall_index)
+ 		{
+ 		  fn = make_thunk (fn, /*this_adjusting=*/1, delta, vcall_index);
  		  if (!DECL_NAME (fn))
  		    finish_thunk (fn);
  		}
 -	      /* Take the address of the function, considering it to be of an
 -		 appropriate generic type.  */
 -	      init = build1 (ADDR_EXPR, vfunc_ptr_type_node, fn);
-+             else if (slot_relocs && first_overrider
-+                      && BINFO_TYPE (first_overrider) != t
-+                      /* necessary for virtual inheritance */
-+                      && BINFO_TYPE (first_overrider) != binfo)
++#endif
++
++	      // FIXME: switched these around !
++	      if (!integer_zerop (delta) || vcall_index)
++		{
++		  if (BV_INHERITED (v))
++		    {
++		      slot_fn = fn;
++		      init = fold_build1 (NOP_EXPR,
++					  vtable_entry_type,
++					  build_int_cst (build_pointer_type (void_type_node),
++							 0xdeadf000));
++		      fprintf (stderr,"inherited thunk!\n");
++		    }
++		  else
++		    {
++		      fn = make_thunk (fn, /*this_adjusting=*/1, delta, vcall_index);
++		      if (!DECL_NAME (fn))
++			finish_thunk (fn);
++		    }
++		}
++	      else if (slot_relocs && first_overrider
++		  && BINFO_TYPE (first_overrider) != t
++		  /* necessary for virtual inheritance */
++		  && BINFO_TYPE (first_overrider) != binfo)
 +               {
 +                 /* accumulate information about overriding */
 +                 gcc_assert (BINFO_VTABLE (first_overrider));
@@ -516,7 +541,7 @@
 +                                     build_int_cst (build_pointer_type (void_type_node),
 +                                                    0xdeadbeef));
 +               }
-+/*              fprintf (stderr, " %s : ",
++              fprintf (stderr, " %s : ",
 +                       expr_as_string (fn, TFF_PLAIN_IDENTIFIER));
 +              fprintf (stderr, " %s !=? ",
 +                       type_as_string (BINFO_TYPE (first_overrider), TFF_PLAIN_IDENTIFIER));
@@ -529,7 +554,7 @@
 +                       BINFO_INHERITANCE_CHAIN (t),
 +                       BINFO_INHERITANCE_CHAIN (binfo),
 +                       BINFO_INHERITANCE_CHAIN (orig_binfo),
-+                       BINFO_INHERITANCE_CHAIN (rtti_binfo)); */
++                       BINFO_INHERITANCE_CHAIN (rtti_binfo));
 +
 +              if (!init)
 +                {
@@ -540,7 +565,7 @@
  	    }
  	}
  
-@@ -7346,8 +7636,34 @@
+@@ -7346,8 +7666,34 @@
  	}
        else
  	vfun_inits = tree_cons (NULL_TREE, init, vfun_inits);
@@ -575,7 +600,7 @@
    /* The initializers for virtual functions were built up in reverse
       order; straighten them out now.  */
    vfun_inits = nreverse (vfun_inits);
-@@ -7363,7 +7679,8 @@
+@@ -7363,7 +7709,8 @@
     offsets in BINFO, which is in the hierarchy dominated by T.  */
  
  static void
@@ -585,7 +610,7 @@
  {
    tree b;
  
-@@ -7371,10 +7688,17 @@
+@@ -7371,10 +7718,17 @@
       corresponding to the primary base class.  */
    b = get_primary_binfo (binfo);
    if (b)
@@ -606,7 +631,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/cp-tree.h gcc-4.2.1-simple/gcc/cp/cp-tree.h
 --- pristine-gcc-4.2.1-simple/gcc/cp/cp-tree.h	2007-07-24 09:14:47.000000000 +0100
-+++ gcc-4.2.1-simple/gcc/cp/cp-tree.h	2008-01-16 16:25:17.000000000 +0000
++++ gcc-4.2.1-simple/gcc/cp/cp-tree.h	2008-01-18 21:18:56.000000000 +0000
 @@ -498,6 +498,7 @@
      CPTI_UNKNOWN_TYPE,
      CPTI_VTBL_TYPE,
@@ -623,17 +648,24 @@
  #define std_node			cp_global_trees[CPTI_STD]
  #define abi_node			cp_global_trees[CPTI_ABI]
  #define const_type_info_type_node	cp_global_trees[CPTI_CONST_TYPE_INFO_TYPE]
-@@ -3392,6 +3394,14 @@
+@@ -1466,6 +1468,9 @@
+ /* The function to call.  */
+ #define BV_FN(NODE) (TREE_VALUE (NODE))
+ 
++/* Inherited, rather than implemented by the class itself. */
++#define BV_INHERITED(NODE) (TREE_THIS_VOLATILE(NODE))
++
+ 
+ /* For FUNCTION_TYPE or METHOD_TYPE, a list of the exceptions that
+    this type can raise.  Each TREE_VALUE is a _TYPE.  The TREE_VALUE
+@@ -3392,6 +3397,11 @@
     TREE_PURPOSE slot.  */
  extern GTY(()) tree static_aggregates;
  
-+/* foo */
-+extern GTY(()) tree vtable_copy_slots;
-+
 +/* A list of inherited vtable slots which are copies of other slots
 +   The source address is stored in the TREE_VALUE slot and the
 +   destination is stored in the TREE_PURPOSE slot. */
-+/* extern GTY(()) tree vtable_slot_copies; */
++extern GTY(()) tree vtable_copy_slots;
 +
  /* Functions called along with real static constructors and destructors.  */
  
@@ -657,7 +689,7 @@
  extern tree mangle_thunk			(tree, int, tree, tree);
 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/decl.c gcc-4.2.1-simple/gcc/cp/decl.c
 --- pristine-gcc-4.2.1-simple/gcc/cp/decl.c	2007-07-24 09:14:45.000000000 +0100
-+++ gcc-4.2.1-simple/gcc/cp/decl.c	2008-01-10 12:20:49.000000000 +0000
++++ gcc-4.2.1-simple/gcc/cp/decl.c	2008-01-18 14:08:10.000000000 +0000
 @@ -124,6 +124,10 @@
  	tree vtbl_type_node;
  	tree vtbl_ptr_type_node;
@@ -705,7 +737,7 @@
    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-18 12:32:46.000000000 +0000
++++ gcc-4.2.1-simple/gcc/cp/decl2.c	2008-01-18 14:08:10.000000000 +0000
 @@ -2910,6 +2910,45 @@
      finish_objects (function_key, priority, body);
  }
@@ -764,7 +796,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/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 12:32:28.000000000 +0000
++++ gcc-4.2.1-simple/gcc/cp/mangle.c	2008-01-18 14:08:10.000000000 +0000
 @@ -2670,6 +2670,76 @@
    return mangle_special_for_type (type, "TV");
  }
@@ -842,24 +874,56 @@
  /* Returns an identifier for the mangled name of the VTT for TYPE.  */
  
  tree
-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/tree.h gcc-4.2.1-simple/gcc/tree.h
---- pristine-gcc-4.2.1-simple/gcc/tree.h	2008-01-10 09:49:05.000000000 +0000
-+++ gcc-4.2.1-simple/gcc/tree.h	2008-01-10 12:20:49.000000000 +0000
-@@ -2892,6 +2892,7 @@
-  unsigned based_on_restrict_p : 1;
-  /* Used by C++.  Might become a generic decl flag.  */
-  unsigned shadowed_for_var_p : 1;
-+ unsigned vtreloc_init:1;
- 
-  /* Don't belong to VAR_DECL exclusively.  */
-  unsigned in_system_header_flag : 1;
-@@ -2918,6 +2919,9 @@
-    is not error_mark_node, then the decl cannot be put in .common.  */
- #define DECL_COMMON(NODE) (DECL_WITH_VIS_CHECK (NODE)->decl_with_vis.common_flag)
- 
-+/* should we be emitted in a vtreloc section ? */
-+#define DECL_VTRELOC_INIT(NODE) (DECL_WITH_VIS_CHECK (NODE)->decl_with_vis.vtreloc_init)
-+
- /* 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/cp/method.c gcc-4.2.1-simple/gcc/cp/method.c
+--- pristine-gcc-4.2.1-simple/gcc/cp/method.c	2006-12-11 12:16:19.000000000 +0000
++++ gcc-4.2.1-simple/gcc/cp/method.c	2008-01-18 15:26:30.000000000 +0000
+@@ -169,6 +169,9 @@
+   TREE_CHAIN (thunk) = DECL_THUNKS (function);
+   DECL_THUNKS (function) = thunk;
+ 
++  fprintf (stderr, "make_thunk for '%s'\n",
++	   decl_as_string (function, TFF_PLAIN_IDENTIFIER));
++
+   return thunk;
+ }
+ 
+@@ -426,6 +429,9 @@
+   DECL_ARGUMENTS (thunk_fndecl) = a;
+   BLOCK_VARS (DECL_INITIAL (thunk_fndecl)) = a;
+ 
++  fprintf (stderr, "Generate thunk '%s'\n",
++	   decl_as_string (thunk_fndecl, TFF_PLAIN_IDENTIFIER));
++
+   if (this_adjusting
+       && targetm.asm_out.can_output_mi_thunk (thunk_fndecl, fixed_offset,
+ 					      virtual_value, alias))
+@@ -521,6 +527,8 @@
+ 
+       thunk_fndecl = finish_function (0);
+       tree_lowering_passes (thunk_fndecl);
++
++      // causes emit_associated_thunks to be called ... [hmm ]
+       expand_body (thunk_fndecl);
+     }
+ 
+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/semantics.c gcc-4.2.1-simple/gcc/cp/semantics.c
+--- pristine-gcc-4.2.1-simple/gcc/cp/semantics.c	2008-01-10 09:49:05.000000000 +0000
++++ gcc-4.2.1-simple/gcc/cp/semantics.c	2008-01-18 15:39:24.000000000 +0000
+@@ -55,7 +55,7 @@
+ 
+ static tree maybe_convert_cond (tree);
+ static tree simplify_aggr_init_exprs_r (tree *, int *, void *);
+-static void emit_associated_thunks (tree);
++void emit_associated_thunks (tree);
+ static tree finalize_nrv_r (tree *, int *, void *);
+ 
+ 
+@@ -3017,7 +3017,7 @@
+ 
+ /* Emit all thunks to FN that should be emitted when FN is emitted.  */
+ 
+-static void
++void
+ emit_associated_thunks (tree fn)
+ {
+   /* When we use vcall offsets, we emit thunks with the virtual



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