This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
GCC 2.95.2 bug report
- To: bug-gcc at gnu dot org
- Subject: GCC 2.95.2 bug report
- From: Mike Yang <yang at research dot att dot com>
- Date: Mon, 20 Mar 2000 11:40:05 -0500 (EST)
Hi there:
I'd like to report an instance with the 2.95.2 compiler. I hope I've
included all the relevant information.
Thanks!
Mike
slk-yang[9523] g++ -v --save-temps tmfp-gcc-bug.cc
Reading specs from
/usr/common/egcs5222.2.95.2/lib/gcc-lib/i686-pc-linux-gnu/2.95.2/specs
gcc version 2.95.2 19991024 (release)
/usr/common/egcs5222.2.95.2/lib/gcc-lib/i686-pc-linux-gnu/2.95.2/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__ -Di686 -Dpentiumpro -D__i686
-D__i686__ -D__pentiumpro -D__pentiumpro__ tmfp-gcc-bug.cc tmfp-gcc-bug.ii
GNU CPP version 2.95.2 19991024 (release) (i386 Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
/usr/common/egcs5222.2.95.2/lib/gcc-lib/i686-pc-linux-gnu/2.95.2/../../../../include/g++-3
/usr/common/egcs5222.2.95.2/lib/gcc-lib/i686-pc-linux-gnu/2.95.2/../../../../i686-pc-linux-gnu/include
/usr/common/egcs5222.2.95.2/lib/gcc-lib/i686-pc-linux-gnu/2.95.2/include
/usr/include
End of search list.
The following default directories have been omitted from the search path:
/usr/local/include
End of omitted list.
/usr/common/egcs5222.2.95.2/lib/gcc-lib/i686-pc-linux-gnu/2.95.2/cc1plus
tmfp-gcc-bug.ii -quiet -dumpbase tmfp-gcc-bug.cc -version -o
tmfp-gcc-bug.s
GNU C++ version 2.95.2 19991024 (release) (i686-pc-linux-gnu) compiled by
GNU C version 2.95.2 19991024 (release).
tmfp-gcc-bug.cc: In function `int main(...)':
tmfp-gcc-bug.cc:26: Internal compiler error.
tmfp-gcc-bug.cc:26: Please submit a full bug report.
tmfp-gcc-bug.cc:26: See
<URL:http://www.gnu.org/software/gcc/faq.html#bugreport> for instructions.
# 1 "tmfp-gcc-bug.cc"
template <class T> class Poller{};
template <class T> class Bind {
public:
template <class Y, class Aout, class Ref>
Poller<Y> sendp( Aout(Ref::*)()) {
return Poller<Y>();
}
template <class Ref>
Poller<void> sendp( void (Ref::*)()) {
return Poller<void>();
}
};
class Foo {
public:
double w(){}
};
void main() {
Bind<int> f;
f.sendp<int>(&Foo::w);
}
#define _BUG_ 1
template <class T> class Poller{};
template <class T> class Bind {
public:
template <class Y, class Aout, class Ref>
Poller<Y> sendp( Aout(Ref::*)()) {
return Poller<Y>();
}
#if ( _BUG_ == 1)
template <class Ref>
Poller<void> sendp( void (Ref::*)()) {
return Poller<void>();
}
#endif
};
class Foo {
public:
double w(){}
};
void main() {
Bind<int> f;
f.sendp<int>(&Foo::w);
}