https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67699

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
#2  0x000000000070544c in symtab_node::get (decl=0x7ffff68d9b40)
    at /space/rguenther/src/svn/gcc-5-branch/gcc/cgraph.h:365
365         gcc_checking_assert (TREE_CODE (decl) == FUNCTION_DECL
(gdb) l
360       static inline symtab_node *get (const_tree decl)
361       {
362     #ifdef ENABLE_CHECKING
363         /* Check that we are called for sane type of object - functions
364            and static or external variables.  */
365         gcc_checking_assert (TREE_CODE (decl) == FUNCTION_DECL
366                              || (TREE_CODE (decl) == VAR_DECL
367                                  && (TREE_STATIC (decl) || DECL_EXTERNAL
(decl)
368                                      || in_lto_p)));
(gdb) p debug_tree (decl)
 <var_decl 0x7ffff68d9b40 bar
    type <array_type 0x7ffff6a405e8
...
    readonly decl_1 decl_5 DI file t.ii line 2 col 23 size <integer_cst
0x7ffff68cce58 64> unit size <integer_cst 0x7ffff68cce70 8>
    align 32 context <function_decl 0x7ffff6a411b0 foo>>

and we are not in_lto_p (this is cc1plus).  And we're coming from (tataa)

940           create_references (encoder, vnode);
941           /* For proper debug info, we need to ship the origins, too.  */
942           if (DECL_ABSTRACT_ORIGIN (vnode->decl))
943             {
944               varpool_node *origin_node
945                 = varpool_node::get (DECL_ABSTRACT_ORIGIN (vnode->decl));

that's on the GCC 5 branch.  ISTR fixing this on trunk - ah, but only for
the early LTO debug work.

Hmm.  Let's see if we can survive removing that code - it got added during
GCC 4.9 development.  But we never actually stream DECL_ABSTRACT_ORIGIN...

Reply via email to