This is the mail archive of the gcc@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: more m32c brokenness


On Wed, Apr 9, 2008 at 3:28 AM, DJ Delorie <dj@redhat.com> wrote:
>
>  Continuation of the last one, different bug, building libstdc++ ...
>  Look familiar to anyone?  If not, I'll try to hunt down the cause.
>  The culprit is this line:
>
>     D.25530 = (unsigned int) D.25529;
>
>  For m32cm, "int" is 16 bits, "long" is 32 bits, and "void*" is 24
>  bits.  A cast to unsigned int truncates a pointer.

What size is the internal 'sizetype'?  Is there an integer type with
the same width as the pointer type?  Basically the problems look
like converting a pointer to an integer always either extends or
truncates which is both prohibited in the GIMPLE IL (as the
pointer doesn't have a sign we don't know whether to sign-
or zero-extend it).

Richard.

>  [ gdb ] up
>  #3  0x085588ec in verify_gimple_2 (stmts=0xb6e7c738) at ../../gcc/gcc/tree-cfg.c:4126
>  4126                bool err2 = verify_gimple_stmt (stmt);
>
>  [ gdb ] call debug_generic_expr (stmts)
>  D.25526 = &this->D.17063._vptr.basic_ostream;
>  D.25527 = *D.25526;
>  D.25528 = D.25527 + -12;
>  D.25529 = *D.25528;
>  D.25530 = (unsigned int) D.25529;
>  D.25531 = this + D.25530;
>  *.LTHUNK0 (D.25531);
>
>
>  ./cc1plus  -fpreprocessed strstream.ii -quiet -dumpbase strstream.cc -mcpu=m32cm -auxbase-strip strstream.o -g -O2 -Wall -Wextra -Wwrite-strings -Wcast-qual -Wno-deprecated -version -fno-implicit-templates -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -o strstream.s
>
>  #0  verify_gimple_expr (expr=0xb6e79e80) at ../../gcc/gcc/tree-cfg.c:3653
>  #1  0x08557d3b in verify_gimple_modify_stmt (stmt=0xb6e7c7c4) at ../../gcc/gcc/tree-cfg.c:4012
>  #2  0x08557ed7 in verify_gimple_stmt (stmt=0xb6e7c7c4) at ../../gcc/gcc/tree-cfg.c:4045
>  #3  0x085588ec in verify_gimple_2 (stmts=0xb6e7c738) at ../../gcc/gcc/tree-cfg.c:4126
>  #4  0x08558943 in verify_gimple_1 (stmts=0xb6e7c738) at ../../gcc/gcc/tree-cfg.c:4143
>  #5  0x0840a079 in gimplify_body (body_p=0xb738da68, fndecl=0xb738da10, do_parms=1 '\001')
>     at ../../gcc/gcc/gimplify.c:6536
>  #6  0x0840a5b5 in gimplify_function_tree (fndecl=0xb738da10) at ../../gcc/gcc/gimplify.c:6576
>  #7  0x08214aee in c_genericize (fndecl=0xb738da10) at ../../gcc/gcc/c-gimplify.c:105
>  #8  0x081cc445 in cp_genericize (fndecl=0xb738da10) at ../../gcc/gcc/cp/cp-gimplify.c:774
>  #9  0x0807e438 in finish_function (flags=0) at ../../gcc/gcc/cp/decl.c:11923
>  #10 0x081759e7 in use_thunk (thunk_fndecl=0xb738da10, emit_p=1 '\001') at ../../gcc/gcc/cp/method.c:525
>  #11 0x081829cd in emit_associated_thunks (fn=0xb738d850) at ../../gcc/gcc/cp/semantics.c:3157
>  #12 0x08762f00 in cgraph_expand_function (node=0xb743bc80) at ../../gcc/gcc/cgraphunit.c:1156
>  #13 0x08765c77 in cgraph_optimize () at ../../gcc/gcc/cgraphunit.c:1220
>  #14 0x0810a7fd in cp_write_global_declarations () at ../../gcc/gcc/cp/decl2.c:3471
>  #15 0x08539e6b in toplev_main (argc=23, argv=0xbfad1944) at ../../gcc/gcc/toplev.c:971
>  #16 0x08225332 in main (argc=Cannot access memory at address 0x1
>  ) at ../../gcc/gcc/main.c:35
>
>


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