The following code, compiled with -g, causes an ICE on 4.2.0 RC3 (20070501) and on my most recent 4.3.0 snapshot build (20070427):
--------------------- namespace NS { int x = 0; int &ref = x; } using NS::ref; --------------------- test/ice.cc:6: internal compiler error: in reference_to_unused, at dwarf2out.c:10128 This compiles cleanly with both 4.1.2 and 4.2.0 RC1 (20070316), suggesting that this was exposed by a fairly recent patch. Note that, in particular, this impacts code using Boost.Lambda in the following style: #include <boost/lambda/lambda.hpp> using boost::lambda::_1; ... -- Summary: [4.2/4.3 regression] -g and using declaration causing ICE in reference_to_unused Product: gcc Version: 4.2.0 Status: UNCONFIRMED Severity: major Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: zak at transversal dot com GCC build triplet: x86_64_pc_linux_gnu GCC host triplet: x86_64-pc-linux-gnu GCC target triplet: x86_64_pc_linux_gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31899