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: LTO ICE in D Frontend


On July 10, 2014 8:31:54 AM CEST, Iain Buclaw <ibuclaw@gdcproject.org> wrote:
>Hi,
>
>I'm trying to get to the bottom of a bug when using the D front-end
>with -flto.
>
>When compiling anything, it always ICEs at in
>streamer_get_pickled_tree, at tree-streamer-in.c.
>
>The of it appears to be that the LTO frontend seems to never retrieve
>what it is expected to find.  But I don't know what could be missing
>from the code generation on my side to sort that out.
>
>
>The following minimal test that yields an ICE.
>---
>extern(C) int test = void;
>
>
>I had set a breakpoint at hash_tree and looked at debug_tree output
>from an equivalent program in C++, but nothing stands out as wrong
>here to me.
>
>Any insight would be helpful.
>
>
>// D
>DECL_NAME:
> <identifier_node 0x7ffff66981b8 test>
>
>DECL_CONTEXT: (null_tree)

This should have a translation unit decl here.

Richard.

>DECL_SIZE:
> <integer_cst 0x7ffff6540d98 type <integer_type 0x7ffff65500a8
>bitsizetype> constant 32>
>
>DECL_SIZE_UNIT:
> <integer_cst 0x7ffff6540db0 type <integer_type 0x7ffff6550000
>sizetype> constant 4>
>
>
>VAR_DECL:
> <var_decl 0x7ffff6548a20 test
>    type <integer_type 0x7ffff65505e8 int public SI
>        size <integer_cst 0x7ffff6540d98 constant 32>
>        unit size <integer_cst 0x7ffff6540db0 constant 4>
>        align 32 symtab 0 alias set 0 canonical type 0x7ffff65505e8
>precision 32 min <integer_cst 0x7ffff6540d50 -2147483648> max
><integer_cst 0x7ffff
>6540d68 2147483647>
>        pointer_to_this <pointer_type 0x7ffff6557690>>
>    used public static tls-initial-exec SI file test.d line 1 col 0
>size <integer_cst 0x7ffff6540d98 32> unit size <integer_cst
>0x7ffff6540db0 4>
>    align 32
>    (mem/c:SI (symbol_ref:DI ("test") [flags 0x2a] <var_decl
>0x7ffff6548a20 test>) [0 test+0 S4 A32])>
>
>
>
>
>// C++
>DECL_NAME:
> <identifier_node 0x7ffff66ad210 test public bindings <0x7ffff66ab078>
>local bindings <(nil)>>
>
>DECL_CONTEXT:
><translation_unit_decl 0x7ffff65580a0 D.1 VOID file (null) line 0 col 0
>    align 1>
>
>DECL_SIZE:
> <integer_cst 0x7ffff655e030 type <integer_type 0x7ffff655a0a8
>bitsizetype> constant 32>
>
>DECL_SIZE_UNIT:
> <integer_cst 0x7ffff655e048 type <integer_type 0x7ffff655a000
>sizetype> constant 4>
>
> VAR_DECL:
>  <var_decl 0x7ffff654aa20 test
>    type <integer_type 0x7ffff655a5e8 int public SI
>        size <integer_cst 0x7ffff655e030 constant 32>
>        unit size <integer_cst 0x7ffff655e048 constant 4>
>        align 32 symtab 0 alias set 0 canonical type 0x7ffff655a5e8
>precision 32 min <integer_cst 0x7ffff6540fd8 -2147483648> max
><integer_cst 0x7ffff
>655e000 2147483647>
>        pointer_to_this <pointer_type 0x7ffff6562690>>
>    public static SI file test2.cc line 2 col 5 size <integer_cst
>0x7ffff655e030 32> unit size <integer_cst 0x7ffff655e048 4>
>    align 32 context <translation_unit_decl 0x7ffff65580a0 D.1>
>
>    (mem/c:SI (symbol_ref:DI ("test") [flags 0x2] <var_decl
>0x7ffff654aa20 test>) [0 test+0 S4 A32]) chain <function_decl
>0x7ffff66a8600 __cxa_call_un
>expected>>



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