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

             Bug #: 54604
           Summary: ICE (segv) calling explicitly member function template
                    specialization in a lambda
    Classification: Unclassified
           Product: gcc
           Version: 4.7.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: delon...@fb.com


Small repro case:

% cat crash.cpp
class C {
public:
  template<bool Fun> void f() { }
  template<bool Fun> void g() {
    auto foo = [&]() { f<Fun>(); };
  }
};

int main() {
   C c;
   c.g<false>();
}

% g++_4.7 -std=gnu++0x crash.cpp
crash.cpp: In instantiation of ‘C::g() [with bool Fun = false]::<lambda()>’:
crash.cpp:5:18:   required from ‘struct C::g() [with bool Fun =
false]::<lambda()>’
crash.cpp:5:34:   required from ‘void C::g() [with bool Fun = false]’
crash.cpp:11:15:   required from here
crash.cpp:5:24: 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.

Reply via email to