This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11917] New: Iternal compiler error, template/sizeof-related
- From: "alf_p_steinbach at yahoo dot no" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Aug 2003 12:00:21 -0000
- Subject: [Bug c++/11917] New: Iternal compiler error, template/sizeof-related
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11917
Summary: Iternal compiler error, template/sizeof-related
Product: gcc
Version: 3.2.2
Status: UNCONFIRMED
Severity: critical
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: alf_p_steinbach at yahoo dot no
CC: gcc-bugs at gcc dot gnu dot org
static int x();
template< class T >
class C
{
protected:
static int const xSize = sizeof( x() );
public:
enum{ value = sizeof( xSize ) };
};
struct A{};
int main()
{
int const whatever = C<A>::value;
}
================================================================
when compiled with
g++ a.cpp
yields
a.cpp: In instantiation of `const int C<A>::xSize':
a.cpp:19: instantiated from `C<A>'
a.cpp:19: instantiated from here
a.cpp:8: Internal compiler error in instantiate_decl, at cp/pt.c:10052
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.