This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Internal Compiler Error 56 on Template instantantiaon
- To: gcc-bugs at gcc dot gnu dot org
- Subject: Internal Compiler Error 56 on Template instantantiaon
- From: Henner Zeller <hzeller at axent dot com>
- Date: Thu, 8 Jun 2000 16:14:48 -0700 (PDT)
Hi,
I am using
- gcc 2.95.3 ( from 17. May 2000 RedHat package, compiled
from source)
- Linux 2.2.14 with libc 2.1.3 and binutils 2.9.5.0.22
The following source produces an error (see attachment). In short: getting
a pointer to a static template member function of a class leads to
an internal compiler error 56.
The complete output of 'gcc -v bug.cc' is:
----------------------8<--------------------------------------
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.95.3/specs gcc
version 2.95.3 19991030 (prerelease)
/usr/lib/gcc-lib/i386-redhat-linux/2.95.3/cpp -lang-c++ -v -D__GNUC__=2
-D__GNUG__=2 -D__GNUC_MINOR__=95 -D__cplusplus -D__ELF__ -Dunix -D__i386__
-Dlinux -D__ELF__ -D__unix__ -D__i386__ -D__linux__ -D__unix -D__linux
-Asystem(posix) -D__EXCEPTIONS -Acpu(i386) -Amachine(i386) -Di386 -D__i386
-D__i386__ bug.cc /tmp/ccUB4Z4S.ii GNU CPP version 2.95.3 19991030
(prerelease) (i386 Linux/ELF) #include "..." search starts here: #include
<...> search starts here:
/usr/lib/gcc-lib/i386-redhat-linux/2.95.3/../../../../include/g++-3
/usr/local/include
/usr/lib/gcc-lib/i386-redhat-linux/2.95.3/include
/usr/include End of search list. The following default directories have
been omitted from the search path:
/usr/lib/gcc-lib/i386-redhat-linux/2.95.3/../../../../i386-redhat-linux/include
End of omitted list.
/usr/lib/gcc-lib/i386-redhat-linux/2.95.3/cc1plus /tmp/ccUB4Z4S.ii -quiet
-dumpbase bug.cc -version -o /tmp/ccALKQVC.s GNU C++ version 2.95.3
19991030 (prerelease) (i386-redhat-linux) compiled by GNU C version 2.95.3
19991030 (prerelease). bug.cc: In function `int main()': bug.cc:9:
Internal compiler error 56. bug.cc:9: Please submit a full bug report.
bug.cc:9: See <URL:http://www.gnu.org/software/gcc/bugs.html> for
instructions.
-------------------------------------------
if you need further information, please let me know.
BTW: The 2.95 gcc rocks! You're doing a truly wonderful job,
keep up the good work!!
Regards,
-hen
class A {
public:
template <class T> static void foo() { T x = 1; x++; }
};
int main() {
A::foo<int>(); // ok
void (*fptr)() = A::foo<int>; // Compiler error 56
fptr();
}