g++ dies with a tree check ICE when the source below is compiled with -g:
$ cc1plus -g x.cc void foo() x.cc:6: internal compiler error: tree check: expected class 'declaration', have 'exceptional' (@@dummy) in lookup_decl_die, at dwarf2out.c:5415 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. $ Environment: System: Linux karma 2.6.8.1 #20 Mon Sep 13 23:48:47 EDT 2004 i686 i686 i386 GNU/Linux Architecture: i686 <machine, os, target, libraries (multiple lines)> host: i686-pc-linux-gnu build: i686-pc-linux-gnu target: i686-pc-linux-gnu configured with: /home/sss/gcc/gcc/configure --prefix=/usr/local/gcc --enable-threads=posix --enable-long-long --enable-languages=c,c++,f95 How-To-Repeat: Compile with -g: ---------------------------------------- int toupper (int); namespace std { using ::toupper; } void foo() { using std::toupper; } ---------------------------------------- ------- Additional Comments From snyder at fnal dot gov 2005-01-10 21:39 ------- Fix: <how to correct or work around the problem, if known (multiple lines)> -- Summary: 4.0: ICE: tree_check in lookup_local_die with local `using' Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: critical Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: snyder at fnal dot gov CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: i686-pc-linux-gnu GCC host triplet: i686-pc-linux-gnu GCC target triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19367