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

           Summary: [C++0x] ICE on lambda inside switch with case labels
                    in the lambda
           Product: gcc
           Version: 4.6.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: ja...@gcc.gnu.org
                CC: ja...@gcc.gnu.org


#include <functional>

int
main ()
{
  std::function<void (void)> l;
  switch (3)
  {
    l = [](){ case 3: break; };
  }
}

ICEs during gimplification, my guess is that this is invalid code and should be
rejected by the frontend already, complain that the case 3 is used outside of
switch.

Reply via email to