This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/33094] New: ICE on valid C++ virtual template static member in namespace
- From: "ian at airs dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Aug 2007 03:26:51 -0000
- Subject: [Bug c++/33094] New: ICE on valid C++ virtual template static member in namespace
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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