[Bug c++/11917] New: Iternal compiler error, template/sizeof-related
alf_p_steinbach at yahoo dot no
gcc-bugzilla@gcc.gnu.org
Thu Aug 14 12:00:00 GMT 2003
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.
More information about the Gcc-bugs
mailing list