http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58502
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target| |x86_64-*-*, i?86-*-* Status|UNCONFIRMED |NEW Last reconfirmed| |2013-09-23 CC| |tmsriram at google dot com Component|lto |target Ever confirmed|0 |1 --- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> --- #1 0x0000000000c34951 in tree_is_indexable (t=<result_decl 0x7ffff6e810f0>) at /space/rguenther/src/svn/trunk/gcc/lto-streamer-out.c:131 131 return variably_modified_type_p (TREE_TYPE (DECL_CONTEXT (t)), NULL_TREE); (gdb) call debug_tree (t) <result_decl 0x7ffff6e810f0 D.2277 type <pointer_type 0x7ffff6d1fc78 type <void_type 0x7ffff6d1fbd0 void VOID align 8 symtab 0 alias set -1 canonical type 0x7ffff6d1fbd0 pointer_to_this <pointer_type 0x7ffff6d1fc78>> public unsigned DI size <integer_cst 0x7ffff6d150c0 constant 64> unit size <integer_cst 0x7ffff6d150e0 constant 8> align 64 symtab 0 alias set -1 canonical type 0x7ffff6d1fc78 pointer_to_this <pointer_type 0x7ffff6d2eb28>> unsigned ignored DI file (null) line 0 col 0 size <integer_cst 0x7ffff6d150c0 64> unit size <integer_cst 0x7ffff6d150e0 8> align 64> (gdb) call t->decl_minimal.context $1 = <tree 0x0> it seems the decl doesn't have DECL_CONTEXT set despite being a RESULT_DECL. (gdb) p function $2 = <function_decl 0x7ffff6e7af00 _Z3foov.resolver> target bug: /* Build result decl and add to function_decl. */ t = build_decl (UNKNOWN_LOCATION, RESULT_DECL, NULL_TREE, ptr_type_node); DECL_ARTIFICIAL (t) = 1; DECL_IGNORED_P (t) = 1; DECL_RESULT (decl) = t; which fails to set DECL_CONTEXT (t) = decl.