This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Internal compiler error 71 while instantiating a template with a function parameter
- To: bug-g++ at prep dot ai dot mit dot edu, egcs-bugs at cygnus dot com
- Subject: Internal compiler error 71 while instantiating a template with a function parameter
- From: gswart <gswart at nc dot com>
- Date: Tue, 15 Sep 1998 08:16:24 -0700
This program compiles under SunPro 4.2 and MS VCC 5.0 but gets internal
error 71 under GCC 2.8.1 or EGCS 1.0.2.
sundev4% cd
sundev4% g++ -v
Reading specs from
/opt/GCC281/lib/gcc-lib/sparc-sun-solaris2.6/2.8.1/specs
gcc version 2.8.1
sundev4% g++ ttest.cpp
ttest.cpp:21: Internal compiler error 71.
ttest.cpp:21: Please submit a full bug report to
`bug-g++@prep.ai.mit.edu'.
sundev4% uname -a
SunOS sundev4 5.6 Generic_105181-06 sun4u sparc SUNW,Ultra-5_10
sundev4% CC -V
CC: WorkShop Compilers 4.2 18 Sep 1997 C++ 4.2 patch 104631-04
sundev4% CC ttest.cpp
sundev4% ./a.out
sundev4% cat ttest.cpp
#include <stdlib.h>
class NvPool
{};
class NvObject
{
public:
static NvPool * MyPool();
};
template<class ClassType, NvPool * (*StaticPool)()> class NvClass
{
public:
size_t EntrySize() const { return sizeof(ClassType);}
NvPool * EntryPool() const { return StaticPool();}
};
template<class ClassType> class NvClassXYZ : public
NvClass<ClassType,NvObject::MyPool>
{};
main()
{
NvClassXYZ<NvObject>();
}
sundev4%
---
bash-2.01$ uname -a
CYGWIN32_NT GARRET 4.0 19.1 i686 unknown
bash-2.01$ cl ttest.cpp
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 11.00.7022 for
80x86
Copyright (C) Microsoft Corp 1984-1997. All rights reserved.
ttest.cpp
ttest.cpp(25) : warning C4508: 'main' : function should return a value;
'void' return type assumed
Microsoft (R) 32-Bit Incremental Linker Version 5.10.7303
Copyright (C) Microsoft Corp 1992-1997. All rights reserved.
/out:ttest.exe
ttest.obj
bash-2.01$ ./ttest.exe
bash-2.01$ g++ -v
Reading specs from
C:\Cygnus\B19\H-i386-cygwin32\lib\gcc-lib\i386-cygwin32\egcs2.90.27\specs
gcc version egcs-2.90.27 980315 (egcs-1.0.2 release)
bash-2.01$ g++ ttest.cpp
ttest.cpp:19: Internal compiler error 71.
ttest.cpp:19: Please submit a full bug report to `egcs-bugs@cygnus.com'.
bash-2.01$