(root)/
gcc-13.2.0/
gcc/
testsuite/
g++.dg/
cpp0x/
lambda/
lambda-61135.C
// { dg-do compile { target c++11 } }

struct Base
{
  virtual int b() const{return 1;};
};

struct Super:Base{};

int main()
{
  constexpr Super s;
  []{s.b();}();  // { dg-error "not captured" }
}