This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: g++ internal error: mem_func explicit instantiation
- To: gcc-bugs at gcc dot gnu dot org
- Subject: Re: g++ internal error: mem_func explicit instantiation
- From: Alexander Krotov <ank at namesurfer dot com>
- Date: Thu, 27 Jul 2000 19:19:02 +0300
- Organization: NameSurfer Ltd.
- References: <20000727190322.A67415@namesurfer.com>
On Thu, Jul 27, 2000 at 07:03:22PM +0300, Alexander Krotov wrote:
Hi!
G++ 2.95.2 complains about internal error when compiling
following (simplified) code:
----------------------------------------------------------------------------
#include <iostream>
#include <vector>
#include <functional>
#include <algorithm>
class MyClass
{
public:
void probochka() {}
void prob(int x) const {}
};
int main(void)
{
vector<MyClass> critters;
for_each(critters.begin(),critters.end(),
mem_fun_ref<void, MyClass&>(&MyClass::probochka));
}
----------------------------------------------------------------------------
Options -c -v.
gcc version 2.95.2 19991024 (release)
FreeBSD 3.4.
kama /tmp $ g++ -v -c tbb.c
Reading specs from /usr/local/lib/gcc-lib/i386-portbld-freebsd3.4/2.95.2/specs
gcc version 2.95.2 19991024 (release)
> /usr/local/lib/gcc-lib/i386-portbld-freebsd3.4/2.95.2/cpp -lang-c++ -v -D__GNUC__=2 -D__GNUG__=2 -D__GNUC_MINOR__=95 -D__cplusplus -Di386 -Dunix -D__FreeBSD__=3 -D__i386__ -D__unix__ -D__FreeBSD__=3 -D__i386 -D__unix -Acpu(i386) -Amachine(i386) -Asystem(unix) -Asystem(FreeBSD) -D__EXCEPTIONS -D__ELF__ tbb.c /var/tmp/cce67428.ii
GNU CPP version 2.95.2 19991024 (release) (i386 FreeBSD/ELF)
#include "..." search starts here:
#include <...> search starts here:
/usr/local/lib/gcc-lib/i386-portbld-freebsd3.4/2.95.2/include/g++
/usr/local/include
/usr/local/lib/gcc-lib/i386-portbld-freebsd3.4/2.95.2/../../../../i386-portbld-freebsd3.4/include
/usr/local/lib/gcc-lib/i386-portbld-freebsd3.4/2.95.2/include
/usr/include
End of search list.
The following default directories have been omitted from the search path:
End of omitted list.
/usr/local/lib/gcc-lib/i386-portbld-freebsd3.4/2.95.2/cc1plus /var/tmp/cce67428.ii -quiet -dumpbase tbb.cc -version -o /var/tmp/ccd67428.s
GNU C++ version 2.95.2 19991024 (release) (i386-portbld-freebsd3.4) compiled by GNU C version 2.95.2 19991024 (release).
tbb.c: In function `int main()':
tbb.c:17: Internal compiler error.
tbb.c:17: Please submit a full bug report.
tbb.c:17: See <URL:http://www.gnu.org/software/gcc/faq.html#bugreport> for instructions.
--
Alexander Krotov gsm: +358 40-725 7216
Product Developer fax: +358 9-478 1030
NameSurfer Ltd. http://www.namesurfer.com