http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46587

           Summary: ICE when instantiating template member function in
                    another template member
           Product: gcc
           Version: 4.5.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: crexfex...@yandex.ru


$ cat >test.cc
struct x {
    template <typename T> void op1(void) { &x::op2<T>; }
    template <typename T> void op2(void) {}
};

int main(void) {
    x().op1<int>();
    return 0;
}

$ g++ -Wall test.cc
test.cc: In member function 'void x::op1() [with T = int]':
test.cc:7:18:   instantiated from here
test.cc:2:44: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

$ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-pc-linux-gnu/4.5.1/lto-wrapper
Target: i686-pc-linux-gnu
Configured with: ../configure --prefix=/usr
--enable-languages=c,c++,fortran,objc,obj-c++,ada --enable-shared
--enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
--enable-gnu-unique-object --enable-lto --enable-plugin --disable-multilib
--disable-libstdcxx-pch --with-system-zlib --with-ppl --with-cloog
--libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man
--infodir=/usr/share/info
Thread model: posix
gcc version 4.5.1 (GCC)

Reply via email to