This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/38712] New: [c++0x] ICE: Segmentation fault in auto function when decltype uses parameter pack expansion


Could probably reduce this further:

template<class... T> struct Y {}; 

template<int... N> struct X {}; 

template<int N, class... T>
int g(Y<T...>) { return 0; } 

template<class F, class... A, int... N> 
auto foo(F f, Y<A...> t, X<N...>) -> decltype(f(g<N>(t)...))
{ return f(g<N>(t)...); }

void bar(int) { }

int main() { 
  Y<int> y;
  foo(bar, y, X<0>()); //line 16
}

Compile with -std=c++0x gives:

seg.cpp:16: internal compiler error: Segmentation fault


-- 
           Summary: [c++0x] ICE: Segmentation fault in auto function when
                    decltype uses parameter pack expansion
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: cfairles at gcc dot gnu dot org
 GCC build triplet: x86_64-redhat-linux
  GCC host triplet: x86_64-redhat-linux
GCC target triplet: x86_64-redhat-linux


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]