aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp1z/constexpr-lambda16.C
blob: ad5d885427cb8767f531e267e6b4e0399f0b3d82 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// PR c++/80642
// { dg-do compile { target c++14 } }

int main()
{
  [](auto i)
    {
      if (i)
        {
	  int j;
	  static int k;
	  return i + j;
        }
      return i;
    }(0);
}