[Bug c++/15038] New: ICE on template instantiation
peter at empeg dot com
gcc-bugzilla@gcc.gnu.org
Wed Apr 21 11:15:00 GMT 2004
GCC 3.4.0 release, bootstrapped native compiler for x86 linux. (Also happens
with i686-linux cross-compiler to xscale-elf.)
The authors of the code probably meant to declare the ByteCount constructor
"explicit", but it shouldn't ICE just because they didn't.
This is a regression from both GCC 2.95.3 and 3.3.2 -- they both compile this fine.
Full compiler version:
----
Reading specs from /home/peter/gcc3temp/lib/gcc/i686-empeg-linux/3.4.0/specs
Configured with: ../gcc-3.4.0/configure --build=i686-empeg-linux
--target=i686-empeg-linux --host=i686-empeg-linux --prefix=/home/peter/gcc3temp
--enable-languages=c,c++
Thread model: posix
gcc version 3.4.0
----
Compiler output:
----
vismgr.cpp: In member function `bool Visual::DrawsAllPixels() const':
vismgr.cpp:30: internal compiler error: in instantiate_template, at cp/pt.c:8668
Please submit a full bug report,
with preprocessed source if appropriate.
----
Preprocessed file:
----
# 1 "vismgr.cpp"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "vismgr.cpp"
typedef long long LONGLONG;
class ByteCount
{
public:
typedef LONGLONG BaseType;
BaseType m_bytes;
template<typename T>
inline ByteCount( T bytes ) :
m_bytes( static_cast<BaseType>(bytes) )
{
}
friend bool operator!=( const ByteCount &x, const ByteCount &y );
};
class Visual
{
public:
int m_render_type;
bool m_fullscreen;
enum { Render_transparent = 1,
Render_opaque,
Render_modify,
Render_16bit};
bool DrawsAllPixels() const
{
return m_fullscreen && (m_render_type != Render_modify);
}
};
----
--
Summary: ICE on template instantiation
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: peter at empeg dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: u686-linux-gnu
GCC host triplet: i686-linux-gnu
GCC target triplet: i686-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15038
More information about the Gcc-bugs
mailing list