blob: 339abb69019e1b43b720f8fa98142534f1b08219 [file] [log] [blame]
// PR c++/96197
// { dg-do compile { target c++14 } }
struct S {
S* p = this;
};
constexpr S ary[5000] = {};
constexpr int foo() {
int count = 0;
for (int i = 0; i < 5000; i++)
if (ary[i].p != nullptr)
count++;
return count;
}
constexpr int bar = foo();