[Bug c++/33094] New: ICE on valid C++ virtual template static member in namespace
ian at airs dot com
gcc-bugzilla@gcc.gnu.org
Fri Aug 17 03:27:00 GMT 2007
This C++ code gets an ICE with gcc 4.2 and with mainline. I believe this is
valid C++ code.
namespace
{
template <typename T>
class A
{
virtual T f1() { return c; }
static const T c = 0;
};
A<int> v;
}
foo.cc: In instantiation of Âconst int <unnamed>::A<int>::cÂ:
foo.cc:7: instantiated from ÂT<unnamed>::A<T>::f1() [with T = int]Â
foo.cc:11: instantiated from here
foo.cc:8: internal compiler error: in make_rtl_for_nonlocal_decl, at
cp/decl.c:4967
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
--
Summary: ICE on valid C++ virtual template static member in
namespace
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ian at airs dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33094
More information about the Gcc-bugs
mailing list