This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug debug/31899] [4.2/4.3 regression] -g and using declaration causing ICE in reference_to_unused
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Oct 2007 16:55:46 -0000
- Subject: [Bug debug/31899] [4.2/4.3 regression] -g and using declaration causing ICE in reference_to_unused
- References: <bug-31899-1827@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #9 from rguenth at gcc dot gnu dot org 2007-10-02 16:55 -------
else if (!cgraph_global_info_ready
&& (TREE_CODE (*tp) == VAR_DECL || TREE_CODE (*tp) ==
FUNCTION_DECL))
gcc_unreachable ();
the problem is that the C++ FE emits debug info for global using decls from
parsing:
...
#9 0x082a825e in cp_emit_debug_info_for_using (t=0xb7d6705c, context=0x0)
at /home/richard/src/trunk/gcc/cp/name-lookup.c:5223
---Type <return> to continue, or q <return> to quit---
#10 0x0829f5ef in do_toplevel_using_decl (decl=0xb7d61870, scope=0xb7d61798,
name=0xb7d66708) at /home/richard/src/trunk/gcc/cp/name-lookup.c:3360
#11 0x081bca90 in cp_parser_using_declaration (parser=0xb7cd22a4,
access_declaration_p=0 '\0')
at /home/richard/src/trunk/gcc/cp/parser.c:11695
...
via the imported_module_or_decl debug hook. I guess we should simply queue
these with the varpool. Or probably invent a new pool for just this use.
Or just weaken the sanity check.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31899