ICE in g++ 3.4.0 (cygwin) and 3.4.3 ("GNU C++ version 3.4.3 (i686-pc-cygwin)").
OK for g++ 3.3.1 ("GNU C++ version 3.3.1 (mingw special 20030804-1) (mingw32)"
and "GNU C++ version 3.3.1 (cygming special) (i686-pc-cygwin)").
Test case (legal code!):
template <typename Class>
struct the_base{
template <void (Class::*Fn)()> void foo() { }
};
template <typename T>
struct derivedT: the_base<derivedT<T> > {
typedef the_base<derivedT<T> > parent;
void ice(){
this->parent::template foo< &derivedT<T>::ice>();
}
};
int main() {
derivedT<int> dT;
dT.ice();
}
Output (command line: "c++ -v gccfail.cpp"):
...
GNU C++ version 3.4.3 (i686-pc-cygwin)
compiled by GNU C version 3.4.0.
...
gccfail.cpp: In member function `void derivedT<T>::ice() [with T = int]':
gccfail.cpp:16: instantiated from here
gccfail.cpp:10: internal compiler error: in build_base_path, at cp/class.c:275
...
Regards,
Vladimir Marko
--
Summary: [Regression] ICE with mem-fun-ptr as template parameter
for nested function template (build_base_path,
cp/class.c)
Product: gcc
Version: 3.4.3
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: SWElef at post dot sk
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18407