gcc 2.95.2 ICE with templates
PETER NORDLUND
peter_nordlund@swipnet.se
Mon Feb 21 13:50:00 GMT 2000
The code below generates an ICE under Cygwin
20.1.
See bottom of mail for compilation
output.
See also enclosed tar-file with some .ii and .s
files
ÃÂ
template <typename SINGLETON, typename
MANAGER> class SingletonTraits { };
ÃÂ
template <typename SINGLETON, typename
MANAGER> class Singleton { public: ÃÂ typedef typename
ÃÂ ÃÂ ÃÂ SingletonTraits<SINGLETON,
MANAGER>::InstantiatorType InstantiatorType; };
ÃÂ
class NoCleanupMgr2 {};
ÃÂ
// Traits class // template <typename
SINGLETON> struct SingletonTraits<SINGLETON, NoCleanupMgr2>ÃÂ
{ ÃÂ typedef NoCleanupMgr2 InstantiatorType; };
ÃÂ
class S: public Singleton<S, NoCleanupMgr2>
{ ÃÂ friend class Singleton<S, NoCleanupMgr2>::InstantiatorType; //
Line 20 };
ÃÂ
int main(){ ÃÂ return 0; }
ÃÂ
#if 0 src>>g++ bug2.cpp bug2.cpp:20:
Internal compiler error. bug2.cpp:20: Please submit a full bug
report. bug2.cpp:20: See < URL:http://www.gnu.org/software/gcc/faq.html#bugreport >
for instructions. src>>uname -a CYGWIN_NT-4.0 LILY 20.1 (0.3/1/1)
1998-12-3 20:39:18 i586 unknown src>>g++ -v Reading specs from file://F/ntprog/cygwin/gcc-2.95/install-2.95.2/H-i586-cygwin32/bin /../lib/gcc-lib/i586-cygwin32/2.95.2/specs gcc
version 2.95.2 19991024 (release) #endif
Bug2.tgz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Bug2.tgz
Type: application/x-gzip
Size: 1260 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-bugs/attachments/20000221/45a4766e/attachment.bin>
More information about the Gcc-bugs
mailing list