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

           Summary: internal compiler error: in tsubst_pack_expansion
                    (triggered by decltype)
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: schmidt-thi...@ismll.de


Created attachment 22963
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22963
preprocessed source file

gcc (svn rev. 166057) throws an internal compiler error when 
compiling the attached file "bug-gcc-compiler-error.ii"

> g++ -std=c++0x bug-gcc-compiler-error.ii
bug-gcc-compiler-error.cpp: In function ‘int main()’:
bug-gcc-compiler-error.cpp:33: internal compiler error: in
tsubst_pack_expansion, at cp/pt.c:7544

The code compiles fine if the definition of "reverse" is replaced
by:

template <template <typename... __ARGS> class _F, typename _T, typename...
_ARGS>
_T reverse (_T x1, _ARGS... args) {
  return _F<_T, _ARGS...>::call_function(x1, args...);
}

gcc was build from source and configured via
> configure --prefix=/opt/prog/gcc/ -enable-languages=c,c++,fortran 
> --disable-multilib
on ubuntu
> uname -a
Linux lst-desktop 2.6.32-24-generic #39-Ubuntu SMP Wed Jul 28 05:14:15 UTC 2010
x86_64 GNU/Linux

Reply via email to