diff options
author | Doug Kwan <dougkwan@google.com> | 2007-10-03 10:01:43 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2007-10-03 10:01:43 +0000 |
commit | 7a3c4b3ef39ecd9b3d7aab86f188871d9ea5f11a (patch) | |
tree | 043e9600c1cc47e4b07a13ed9b3cf7943cd51d38 /gcc/dwarf2out.c | |
parent | 05dddae1341a2d7ddcb0313983b8545fed03df9c (diff) | |
download | gcc-7a3c4b3ef39ecd9b3d7aab86f188871d9ea5f11a.zip gcc-7a3c4b3ef39ecd9b3d7aab86f188871d9ea5f11a.tar.gz gcc-7a3c4b3ef39ecd9b3d7aab86f188871d9ea5f11a.tar.bz2 |
re PR debug/31899 (-g and using declaration causing ICE in reference_to_unused)
2007-10-03 Doug Kwan <dougkwan@google.com>
Richard Guenther <rguenther@suse.de>
PR debug/31899
* dwarf2out.c (reference_to_unused): Disable sanity checking,
be conservative instead.
* g++.dg/debug/using3.C: New testcase.
Co-Authored-By: Richard Guenther <rguenther@suse.de>
From-SVN: r128978
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r-- | gcc/dwarf2out.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 9ca68fb..05fd445 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -10344,9 +10344,12 @@ reference_to_unused (tree * tp, int * walk_subtrees, return *tp; else if (!flag_unit_at_a_time) return NULL_TREE; + /* ??? The C++ FE emits debug information for using decls, so + putting gcc_unreachable here falls over. See PR31899. For now + be conservative. */ else if (!cgraph_global_info_ready && (TREE_CODE (*tp) == VAR_DECL || TREE_CODE (*tp) == FUNCTION_DECL)) - gcc_unreachable (); + return *tp; else if (DECL_P (*tp) && TREE_CODE (*tp) == VAR_DECL) { struct varpool_node *node = varpool_node (*tp); |