1 // { dg-do compile { target c++14 } } 2 f(int * p)3 constexpr int f(int* p) { return *p; } g(int n)4 constexpr int g(int n) 5 { 6 int sum = 0; 7 for (int i = 1; i <= n; ++i) 8 sum += f(&i); 9 return sum; 10 } 11 12 static_assert(g(3) == 3+2+1,""); 13