blob: 8eee2e0af3090c013921a003e50a37435ae26861 [file] [log] [blame]
// { dg-do compile { target c++14 } }
// { dg-additional-options "-Wno-return-type" }
constexpr int
foo (int i)
{
int a[i] = { }; // { dg-error "7:ISO C\\+\\+ forbids variable length array .a" }
if (i == 23) return 0;
}
constexpr int j = foo (1); // { dg-error "flows off the end|in .constexpr. expansion of" }