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]

Re: [PATCH,c++] rewrite vtable initialization construction to use VECs


On Tue, 2010-06-15 at 05:22 -0700, Nathan Froyd wrote:

> Ah, whoops, I clearly didn't look closely enough to see what platforms I
> should have been testing on.  I think the patch below does the trick.
> Could you please try it and report back?
> 
> -Nathan
> 
> Index: class.c
> ===================================================================
> --- class.c	(revision 160473)
> +++ class.c	(working copy)
> @@ -7624,7 +7624,7 @@ build_vtbl_initializer (tree binfo,
>  
>  	  for (j = 1; j < TARGET_VTABLE_DATA_ENTRY_DISTANCE; ++j)
>  	    {
> -	      constructor_elt *f = VEC_index (constructor_elt, *inits,
> +	      constructor_elt *f = VEC_index (constructor_elt, vid.inits,
>  					      new_position + j);
>  	      f->index = NULL_TREE;
>  	      f->value = build1 (NOP_EXPR, vtable_entry_type,

Well, the bootstrap worked and I got a compiler built but I get a bunch
of failures during C++ and libstdc++ testing.  Does the attached failure
and backtrace give you any ideas on where the problem might be?

Using libstdc++-v3/testsuite/20_util/allocator/1.cc as an example, the
test compiles but fails during execution in 32 bit mode.  It works in 64
bit mode when TARGET_VTABLE_DATA_ENTRY_DISTANCE is 1.

Steve Ellcey
sje@cup.hp.com

(gdb) r
Starting
program: /proj/opensrc/nightly/build-ia64-hp-hpux11.23-trunk/obj_gcc/ia64-hp-hpux11.23/libstdc++-v3/testsuite/1.exe 

Program received signal SIGSEGV, Segmentation fault
  si_code: 2 - SEGV_ACCERR - Invalid Permissions for object.
0x200000006585b5f0 in __dynamic_cast (src2dst=0)
    at /proj/opensrc/nightly/src/trunk/libstdc++-v3/libsupc
++/dyncast.cc:61
61                                  dst_type, whole_ptr, src_type,
src_ptr, result);



(gdb) bt
#0  0x200000006585b5f0 in __dynamic_cast (src2dst=0)
    at /proj/opensrc/nightly/src/trunk/libstdc++-v3/libsupc
++/dyncast.cc:61
#1  0x20000000657c3120 in bool std::has_facet<std::ctype<char> > ()

from /proj/opensrc/nightly/build-ia64-hp-hpux11.23-trunk/obj_gcc/ia64-hp-hpux11.23/libstdc++-v3/src/.libs/libstdc++.so.6
#2  0x2000000065793ff0 in std::basic_ios<char,std::char_traits<char>
>::_M_cache_locale () at basic_ios.tcc:158
#3  0x2000000065794290 in std::basic_ios<char,std::char_traits<char>
>::init ()
    at basic_ios.tcc:131
#4  0x2000000065764ca0 in std::ios_base::Init::Init (this=0x656afa38)
    at ostream:83
#5  0x40017d0 in __static_initialization_and_destruction_0
(__initialize_p=1, 
    __priority=65535)
#6  0x40018b0 in _GLOBAL__I_check_new ()
#7  0x20000000658a8300:0 in EM_mark_BOS+0x50 ()
from /usr/lib/hpux32/dld.so


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