This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
c++/155: Re: g++ bug? (Internal compiler error)
- To: gcc-gnats at gcc dot gnu dot org
- Subject: c++/155: Re: g++ bug? (Internal compiler error)
- From: "Martin v. Loewis" <martin at loewis dot home dot cs dot tu-berlin dot de>
- Date: Wed, 29 Mar 2000 21:34:07 +0200
- References: <38E1F52E.35B23E92@nmu.alcatel.fr>
- Resent-Cc: gcc-prs at gcc dot gnu dot org, guiot at nmu dot alcatel dot fr
- Resent-Reply-To: gcc-gnats@gcc.gnu.org, "Martin v. Loewis" <martin@loewis.home.cs.tu-berlin.de>
>Number: 155
>Category: c++
>Synopsis: pointer-to-member as template argument
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: analyzed
>Class: ice-on-legal-code
>Submitter-Id: net
>Arrival-Date: Wed Mar 29 11:56:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator: Marc Guiot du Doignon <guiot@nmu.alcatel.fr>
>Release: 2.95.2
>Organization:
>Environment:
>Description:
Original-Message-ID: <38E1F52E.35B23E92@nmu.alcatel.fr>
Date: Wed, 29 Mar 2000 14:21:02 +0200
The program below gives an error with g++ 2.95.2 and newer. (not with
aCC 1.21)
I also try it with the online compilation.
$ cat testGcc.cc
template <class T, void (T::*FOO)()>
class info
{
public :
info(){}
void operator()(T* t)
{
(t->*FOO)();
}
};
class toto
{
public :
virtual void foo() = 0;
info<toto, &toto::foo> inf;
};
without virtual it work well.
$ gcc -v --save-temps -c testGcc.cc
Reading specs from
/udir/guiot/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.96/specs
gcc version 2.96 20000221 (experimental)
/udir/guiot/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.96/cpp -lang-c++ -v
-D__GNUC__=2 -D__GNUG__=2 -D__GNUC_MINOR__=96 -D__GNUC_PATCHLEVEL__=0
-D__cplusplus -Dhppa -Dhp9000s800 -D__hp9000s800 -Dhp9k8 -DPWB -Dhpux
-Dunix -D__hppa__ -D__hp9000s800__ -D__hp9000s800 -D__hp9k8__ -D__PWB__
-D__hpux__ -D__unix__ -D__hppa -D__hp9000s800 -D__hp9k8 -D__PWB -D__hpux
-D__unix -Asystem(unix) -Asystem(hpux) -Acpu(hppa) -Amachine(hppa)
-D__EXCEPTIONS -D__hp9000s700 -D_PA_RISC1_1 -D_HPUX_SOURCE
-D_HIUX_SOURCE -D__STDC_EXT__ testGcc.cc testGcc.ii
GNU CPP version 2.96 20000221 (experimental) (cpplib)
(hppa)
#include "..." search starts here:
#include <...> search starts here:
/udir/guiot/include/g++-3
/udir/guiot/include
/udir/guiot/hppa1.1-hp-hpux10.20/include
/udir/guiot/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.96/include
/usr/include
End of search list.
/udir/guiot/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.96/cc1plus testGcc.ii
-quiet -dumpbase testGcc.cc -version -o testGcc.s
GNU C++ version 2.96 20000221 (experimental) (hppa1.1-hp-hpux10.20)
compiled by GNU C version 2.96 20000214 (experimental).
testGcc.cc:16: Internal compiler error.
testGcc.cc:16: Please submit a full bug report.
testGcc.cc:16: See <URL:http://www.gnu.org/software/gcc/bugs.html> for
testGcc.cc:16: instructions.
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: