This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

C++ PATCH: Do not synthesize thunks


This patch fixes an abort on a rather large test case that I could not
successfully shrink down.  Clearly, however, it makes no sense to be
synthesizing thunks.

Tested on i686-pc-linux-gnu, applied on the mainline.

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com

2003-01-06  Mark Mitchell  <mark@codesourcery.com>

	* decl2.c (mark_used): Do not synthesize thunks.

Index: cp/decl2.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/decl2.c,v
retrieving revision 1.590
diff -c -5 -p -r1.590 decl2.c
*** cp/decl2.c	3 Jan 2003 23:13:09 -0000	1.590
--- cp/decl2.c	7 Jan 2003 01:19:18 -0000
*************** mark_used (tree decl)
*** 4612,4621 ****
--- 4612,4622 ----
  
    /* Is it a synthesized method that needs to be synthesized?  */
    if (TREE_CODE (decl) == FUNCTION_DECL
        && DECL_NONSTATIC_MEMBER_FUNCTION_P (decl)
        && DECL_ARTIFICIAL (decl) 
+       && !DECL_THUNK_P (decl)
        && ! DECL_INITIAL (decl)
        /* Kludge: don't synthesize for default args.  */
        && current_function_decl)
      {
        synthesize_method (decl);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]